vendor.js 1.3 MB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493264942649526496264972649826499265002650126502265032650426505265062650726508265092651026511265122651326514265152651626517265182651926520265212652226523265242652526526265272652826529265302653126532265332653426535265362653726538265392654026541265422654326544265452654626547265482654926550265512655226553265542655526556265572655826559265602656126562265632656426565265662656726568265692657026571265722657326574265752657626577265782657926580265812658226583265842658526586265872658826589265902659126592265932659426595265962659726598265992660026601266022660326604266052660626607266082660926610266112661226613266142661526616266172661826619266202662126622266232662426625266262662726628266292663026631266322663326634266352663626637266382663926640266412664226643266442664526646266472664826649266502665126652266532665426655266562665726658266592666026661266622666326664266652666626667266682666926670266712667226673266742667526676266772667826679266802668126682266832668426685266862668726688266892669026691266922669326694266952669626697266982669926700267012670226703267042670526706267072670826709267102671126712267132671426715267162671726718267192672026721267222672326724267252672626727267282672926730267312673226733267342673526736267372673826739267402674126742267432674426745267462674726748267492675026751267522675326754267552675626757267582675926760267612676226763267642676526766267672676826769267702677126772267732677426775267762677726778267792678026781267822678326784267852678626787267882678926790267912679226793267942679526796267972679826799268002680126802268032680426805268062680726808268092681026811268122681326814268152681626817268182681926820268212682226823268242682526826268272682826829268302683126832268332683426835268362683726838268392684026841268422684326844268452684626847268482684926850268512685226853268542685526856268572685826859268602686126862268632686426865268662686726868268692687026871268722687326874268752687626877268782687926880268812688226883268842688526886268872688826889268902689126892268932689426895268962689726898268992690026901269022690326904269052690626907269082690926910269112691226913269142691526916269172691826919269202692126922269232692426925269262692726928269292693026931269322693326934269352693626937269382693926940269412694226943269442694526946269472694826949269502695126952269532695426955269562695726958269592696026961269622696326964269652696626967269682696926970269712697226973269742697526976269772697826979269802698126982269832698426985269862698726988269892699026991269922699326994269952699626997269982699927000270012700227003270042700527006270072700827009270102701127012270132701427015270162701727018270192702027021270222702327024270252702627027270282702927030270312703227033270342703527036270372703827039270402704127042270432704427045270462704727048270492705027051270522705327054270552705627057270582705927060270612706227063270642706527066270672706827069270702707127072270732707427075270762707727078270792708027081270822708327084270852708627087270882708927090270912709227093270942709527096270972709827099271002710127102271032710427105271062710727108271092711027111271122711327114271152711627117271182711927120271212712227123271242712527126271272712827129271302713127132271332713427135271362713727138271392714027141271422714327144271452714627147271482714927150271512715227153271542715527156271572715827159271602716127162271632716427165271662716727168271692717027171271722717327174271752717627177271782717927180271812718227183271842718527186271872718827189271902719127192271932719427195271962719727198271992720027201272022720327204272052720627207272082720927210272112721227213272142721527216272172721827219272202722127222272232722427225272262722727228272292723027231272322723327234272352723627237272382723927240272412724227243272442724527246272472724827249272502725127252272532725427255272562725727258272592726027261272622726327264272652726627267272682726927270272712727227273272742727527276272772727827279272802728127282272832728427285272862728727288272892729027291272922729327294272952729627297272982729927300273012730227303273042730527306273072730827309273102731127312273132731427315273162731727318273192732027321273222732327324273252732627327273282732927330273312733227333273342733527336273372733827339273402734127342273432734427345273462734727348273492735027351273522735327354273552735627357273582735927360273612736227363273642736527366273672736827369273702737127372273732737427375273762737727378273792738027381273822738327384273852738627387273882738927390273912739227393273942739527396273972739827399274002740127402274032740427405274062740727408274092741027411274122741327414274152741627417274182741927420274212742227423274242742527426274272742827429274302743127432274332743427435274362743727438274392744027441274422744327444274452744627447274482744927450274512745227453274542745527456274572745827459274602746127462274632746427465274662746727468274692747027471274722747327474274752747627477274782747927480274812748227483274842748527486274872748827489274902749127492274932749427495274962749727498274992750027501275022750327504275052750627507275082750927510275112751227513275142751527516275172751827519275202752127522275232752427525275262752727528275292753027531275322753327534275352753627537275382753927540275412754227543275442754527546275472754827549275502755127552275532755427555275562755727558275592756027561275622756327564275652756627567275682756927570275712757227573275742757527576275772757827579275802758127582275832758427585275862758727588275892759027591275922759327594275952759627597275982759927600276012760227603276042760527606276072760827609276102761127612276132761427615276162761727618276192762027621276222762327624276252762627627276282762927630276312763227633276342763527636276372763827639276402764127642276432764427645276462764727648276492765027651276522765327654276552765627657276582765927660276612766227663276642766527666276672766827669276702767127672276732767427675276762767727678276792768027681276822768327684276852768627687276882768927690276912769227693276942769527696276972769827699277002770127702277032770427705277062770727708277092771027711277122771327714277152771627717277182771927720277212772227723277242772527726277272772827729277302773127732277332773427735277362773727738277392774027741277422774327744277452774627747277482774927750277512775227753277542775527756277572775827759277602776127762277632776427765277662776727768277692777027771277722777327774277752777627777277782777927780277812778227783277842778527786277872778827789277902779127792277932779427795277962779727798277992780027801278022780327804278052780627807278082780927810278112781227813278142781527816278172781827819278202782127822278232782427825278262782727828278292783027831278322783327834278352783627837278382783927840278412784227843278442784527846278472784827849278502785127852278532785427855278562785727858278592786027861278622786327864278652786627867278682786927870278712787227873278742787527876278772787827879278802788127882278832788427885278862788727888278892789027891278922789327894278952789627897278982789927900279012790227903279042790527906279072790827909279102791127912279132791427915279162791727918279192792027921279222792327924279252792627927279282792927930279312793227933279342793527936279372793827939279402794127942279432794427945279462794727948279492795027951279522795327954279552795627957279582795927960279612796227963279642796527966279672796827969279702797127972279732797427975279762797727978279792798027981279822798327984279852798627987279882798927990279912799227993279942799527996279972799827999280002800128002280032800428005280062800728008280092801028011280122801328014280152801628017280182801928020280212802228023280242802528026280272802828029280302803128032280332803428035280362803728038280392804028041280422804328044280452804628047280482804928050280512805228053280542805528056280572805828059280602806128062280632806428065280662806728068280692807028071280722807328074280752807628077280782807928080280812808228083280842808528086280872808828089280902809128092280932809428095280962809728098280992810028101281022810328104281052810628107281082810928110281112811228113281142811528116281172811828119281202812128122281232812428125281262812728128281292813028131281322813328134281352813628137281382813928140281412814228143281442814528146281472814828149281502815128152281532815428155281562815728158281592816028161281622816328164281652816628167281682816928170281712817228173281742817528176281772817828179281802818128182281832818428185281862818728188281892819028191281922819328194281952819628197281982819928200282012820228203282042820528206282072820828209282102821128212282132821428215282162821728218282192822028221282222822328224282252822628227282282822928230282312823228233282342823528236282372823828239282402824128242282432824428245282462824728248282492825028251282522825328254282552825628257282582825928260282612826228263282642826528266282672826828269282702827128272282732827428275282762827728278282792828028281282822828328284282852828628287282882828928290282912829228293282942829528296282972829828299283002830128302283032830428305283062830728308283092831028311283122831328314283152831628317283182831928320283212832228323283242832528326283272832828329283302833128332283332833428335283362833728338283392834028341283422834328344283452834628347283482834928350283512835228353283542835528356283572835828359283602836128362283632836428365283662836728368283692837028371283722837328374283752837628377283782837928380283812838228383283842838528386283872838828389283902839128392283932839428395283962839728398283992840028401284022840328404284052840628407284082840928410284112841228413284142841528416284172841828419284202842128422284232842428425284262842728428284292843028431284322843328434284352843628437284382843928440284412844228443284442844528446284472844828449284502845128452284532845428455284562845728458284592846028461284622846328464284652846628467284682846928470284712847228473284742847528476284772847828479284802848128482284832848428485284862848728488284892849028491284922849328494284952849628497284982849928500285012850228503285042850528506285072850828509285102851128512285132851428515285162851728518285192852028521285222852328524285252852628527285282852928530285312853228533285342853528536285372853828539285402854128542285432854428545285462854728548285492855028551285522855328554285552855628557285582855928560285612856228563285642856528566285672856828569285702857128572285732857428575285762857728578285792858028581285822858328584285852858628587285882858928590285912859228593285942859528596285972859828599286002860128602286032860428605286062860728608286092861028611286122861328614286152861628617286182861928620286212862228623286242862528626286272862828629286302863128632286332863428635286362863728638286392864028641286422864328644286452864628647286482864928650286512865228653286542865528656286572865828659286602866128662286632866428665286662866728668286692867028671286722867328674286752867628677286782867928680286812868228683286842868528686286872868828689286902869128692286932869428695286962869728698286992870028701287022870328704287052870628707287082870928710287112871228713287142871528716287172871828719287202872128722287232872428725287262872728728287292873028731287322873328734287352873628737287382873928740287412874228743287442874528746287472874828749287502875128752287532875428755287562875728758287592876028761287622876328764287652876628767287682876928770287712877228773287742877528776287772877828779287802878128782287832878428785287862878728788287892879028791287922879328794287952879628797287982879928800288012880228803288042880528806288072880828809288102881128812288132881428815288162881728818288192882028821288222882328824288252882628827288282882928830288312883228833288342883528836288372883828839288402884128842288432884428845288462884728848288492885028851288522885328854288552885628857288582885928860288612886228863288642886528866288672886828869288702887128872288732887428875288762887728878288792888028881288822888328884288852888628887288882888928890288912889228893288942889528896288972889828899289002890128902289032890428905289062890728908289092891028911289122891328914289152891628917289182891928920289212892228923289242892528926289272892828929289302893128932289332893428935289362893728938289392894028941289422894328944289452894628947289482894928950289512895228953289542895528956289572895828959289602896128962289632896428965289662896728968289692897028971289722897328974289752897628977289782897928980289812898228983289842898528986289872898828989289902899128992289932899428995289962899728998289992900029001290022900329004290052900629007290082900929010290112901229013290142901529016290172901829019290202902129022290232902429025290262902729028290292903029031290322903329034290352903629037290382903929040290412904229043290442904529046290472904829049290502905129052290532905429055290562905729058290592906029061290622906329064290652906629067290682906929070290712907229073290742907529076290772907829079290802908129082290832908429085290862908729088290892909029091290922909329094290952909629097290982909929100291012910229103291042910529106291072910829109291102911129112291132911429115291162911729118291192912029121291222912329124291252912629127291282912929130291312913229133291342913529136291372913829139291402914129142291432914429145291462914729148291492915029151291522915329154291552915629157291582915929160291612916229163291642916529166291672916829169291702917129172291732917429175291762917729178291792918029181291822918329184291852918629187291882918929190291912919229193291942919529196291972919829199292002920129202292032920429205292062920729208292092921029211292122921329214292152921629217292182921929220292212922229223292242922529226292272922829229292302923129232292332923429235292362923729238292392924029241292422924329244292452924629247292482924929250292512925229253292542925529256292572925829259292602926129262292632926429265292662926729268292692927029271292722927329274292752927629277292782927929280292812928229283292842928529286292872928829289292902929129292292932929429295292962929729298292992930029301293022930329304293052930629307293082930929310293112931229313293142931529316293172931829319293202932129322293232932429325293262932729328293292933029331293322933329334293352933629337293382933929340293412934229343293442934529346293472934829349293502935129352293532935429355293562935729358293592936029361293622936329364293652936629367293682936929370293712937229373293742937529376293772937829379293802938129382293832938429385293862938729388293892939029391293922939329394293952939629397293982939929400294012940229403294042940529406294072940829409294102941129412294132941429415294162941729418294192942029421294222942329424294252942629427294282942929430294312943229433294342943529436294372943829439294402944129442294432944429445294462944729448294492945029451294522945329454294552945629457294582945929460294612946229463294642946529466294672946829469294702947129472294732947429475294762947729478294792948029481294822948329484294852948629487294882948929490294912949229493294942949529496294972949829499295002950129502295032950429505295062950729508295092951029511295122951329514295152951629517295182951929520295212952229523295242952529526295272952829529295302953129532295332953429535295362953729538295392954029541295422954329544295452954629547295482954929550295512955229553295542955529556295572955829559295602956129562295632956429565295662956729568295692957029571295722957329574295752957629577295782957929580295812958229583295842958529586295872958829589295902959129592295932959429595295962959729598295992960029601296022960329604296052960629607296082960929610296112961229613296142961529616296172961829619296202962129622296232962429625296262962729628296292963029631296322963329634296352963629637296382963929640296412964229643296442964529646296472964829649296502965129652296532965429655296562965729658296592966029661296622966329664296652966629667296682966929670296712967229673296742967529676296772967829679296802968129682296832968429685296862968729688296892969029691296922969329694296952969629697296982969929700297012970229703297042970529706297072970829709297102971129712297132971429715297162971729718297192972029721297222972329724297252972629727297282972929730297312973229733297342973529736297372973829739297402974129742297432974429745297462974729748297492975029751297522975329754297552975629757297582975929760297612976229763297642976529766297672976829769297702977129772297732977429775297762977729778297792978029781297822978329784297852978629787297882978929790297912979229793297942979529796297972979829799298002980129802298032980429805298062980729808298092981029811298122981329814298152981629817298182981929820298212982229823298242982529826298272982829829298302983129832298332983429835298362983729838298392984029841298422984329844298452984629847298482984929850298512985229853298542985529856298572985829859298602986129862298632986429865298662986729868298692987029871298722987329874298752987629877298782987929880298812988229883298842988529886298872988829889298902989129892298932989429895298962989729898298992990029901299022990329904299052990629907299082990929910299112991229913299142991529916299172991829919299202992129922299232992429925299262992729928299292993029931299322993329934299352993629937299382993929940299412994229943299442994529946299472994829949299502995129952299532995429955299562995729958299592996029961299622996329964299652996629967299682996929970299712997229973299742997529976299772997829979299802998129982299832998429985299862998729988299892999029991299922999329994299952999629997299982999930000300013000230003300043000530006300073000830009300103001130012300133001430015300163001730018300193002030021300223002330024300253002630027300283002930030300313003230033300343003530036300373003830039300403004130042300433004430045300463004730048300493005030051300523005330054300553005630057300583005930060300613006230063300643006530066300673006830069300703007130072300733007430075300763007730078300793008030081300823008330084300853008630087300883008930090300913009230093300943009530096300973009830099301003010130102301033010430105301063010730108301093011030111301123011330114301153011630117301183011930120301213012230123301243012530126301273012830129301303013130132301333013430135301363013730138301393014030141301423014330144301453014630147301483014930150301513015230153301543015530156301573015830159301603016130162301633016430165301663016730168301693017030171301723017330174301753017630177301783017930180301813018230183301843018530186301873018830189301903019130192301933019430195301963019730198301993020030201302023020330204302053020630207302083020930210302113021230213302143021530216302173021830219302203022130222302233022430225302263022730228302293023030231302323023330234302353023630237302383023930240302413024230243302443024530246302473024830249302503025130252302533025430255302563025730258302593026030261302623026330264302653026630267302683026930270302713027230273302743027530276302773027830279302803028130282302833028430285302863028730288302893029030291302923029330294302953029630297302983029930300303013030230303303043030530306303073030830309303103031130312303133031430315303163031730318303193032030321303223032330324303253032630327303283032930330303313033230333303343033530336303373033830339303403034130342303433034430345303463034730348303493035030351303523035330354303553035630357303583035930360303613036230363303643036530366303673036830369303703037130372303733037430375303763037730378303793038030381303823038330384303853038630387303883038930390303913039230393303943039530396303973039830399304003040130402304033040430405304063040730408304093041030411304123041330414304153041630417304183041930420304213042230423304243042530426304273042830429304303043130432304333043430435304363043730438304393044030441304423044330444304453044630447304483044930450304513045230453304543045530456304573045830459304603046130462304633046430465304663046730468304693047030471304723047330474304753047630477304783047930480304813048230483304843048530486304873048830489304903049130492304933049430495304963049730498304993050030501305023050330504305053050630507305083050930510305113051230513305143051530516305173051830519305203052130522305233052430525305263052730528305293053030531305323053330534305353053630537305383053930540305413054230543305443054530546305473054830549305503055130552305533055430555305563055730558305593056030561305623056330564305653056630567305683056930570305713057230573305743057530576305773057830579305803058130582305833058430585305863058730588305893059030591305923059330594305953059630597305983059930600306013060230603306043060530606306073060830609306103061130612306133061430615306163061730618306193062030621306223062330624306253062630627306283062930630306313063230633306343063530636306373063830639306403064130642306433064430645306463064730648306493065030651306523065330654306553065630657306583065930660306613066230663306643066530666306673066830669306703067130672306733067430675306763067730678306793068030681306823068330684306853068630687306883068930690306913069230693306943069530696306973069830699307003070130702307033070430705307063070730708307093071030711307123071330714307153071630717307183071930720307213072230723307243072530726307273072830729307303073130732307333073430735307363073730738307393074030741307423074330744307453074630747307483074930750307513075230753307543075530756307573075830759307603076130762307633076430765307663076730768307693077030771307723077330774307753077630777307783077930780307813078230783307843078530786307873078830789307903079130792307933079430795307963079730798307993080030801308023080330804308053080630807308083080930810308113081230813308143081530816308173081830819308203082130822308233082430825308263082730828308293083030831308323083330834308353083630837308383083930840308413084230843308443084530846308473084830849308503085130852308533085430855308563085730858308593086030861308623086330864308653086630867308683086930870308713087230873308743087530876308773087830879308803088130882308833088430885308863088730888308893089030891308923089330894308953089630897308983089930900309013090230903309043090530906309073090830909309103091130912309133091430915309163091730918309193092030921309223092330924309253092630927309283092930930309313093230933309343093530936309373093830939309403094130942309433094430945309463094730948309493095030951309523095330954309553095630957309583095930960309613096230963309643096530966309673096830969309703097130972309733097430975309763097730978309793098030981309823098330984309853098630987309883098930990309913099230993309943099530996309973099830999310003100131002310033100431005310063100731008310093101031011310123101331014310153101631017310183101931020310213102231023310243102531026310273102831029310303103131032310333103431035310363103731038310393104031041310423104331044310453104631047310483104931050310513105231053310543105531056310573105831059310603106131062310633106431065310663106731068310693107031071310723107331074310753107631077310783107931080310813108231083310843108531086310873108831089310903109131092310933109431095310963109731098310993110031101311023110331104311053110631107311083110931110311113111231113311143111531116311173111831119311203112131122311233112431125311263112731128311293113031131311323113331134311353113631137311383113931140311413114231143311443114531146311473114831149311503115131152311533115431155311563115731158311593116031161311623116331164311653116631167311683116931170311713117231173311743117531176311773117831179311803118131182311833118431185311863118731188311893119031191311923119331194311953119631197311983119931200312013120231203312043120531206312073120831209312103121131212312133121431215312163121731218312193122031221312223122331224312253122631227312283122931230312313123231233312343123531236312373123831239312403124131242312433124431245312463124731248312493125031251312523125331254312553125631257312583125931260312613126231263312643126531266312673126831269312703127131272312733127431275312763127731278312793128031281312823128331284312853128631287312883128931290312913129231293312943129531296312973129831299313003130131302313033130431305313063130731308313093131031311313123131331314313153131631317313183131931320313213132231323313243132531326313273132831329313303133131332313333133431335313363133731338313393134031341313423134331344313453134631347313483134931350313513135231353313543135531356313573135831359313603136131362313633136431365313663136731368313693137031371313723137331374313753137631377313783137931380313813138231383313843138531386313873138831389313903139131392313933139431395313963139731398313993140031401314023140331404314053140631407314083140931410314113141231413314143141531416314173141831419314203142131422314233142431425314263142731428314293143031431314323143331434314353143631437314383143931440314413144231443314443144531446314473144831449314503145131452314533145431455314563145731458314593146031461314623146331464314653146631467314683146931470314713147231473314743147531476314773147831479314803148131482314833148431485314863148731488314893149031491314923149331494314953149631497314983149931500315013150231503315043150531506315073150831509315103151131512315133151431515315163151731518315193152031521315223152331524315253152631527315283152931530315313153231533315343153531536315373153831539315403154131542315433154431545315463154731548315493155031551315523155331554315553155631557315583155931560315613156231563315643156531566315673156831569315703157131572315733157431575315763157731578315793158031581315823158331584315853158631587315883158931590315913159231593315943159531596315973159831599316003160131602316033160431605316063160731608316093161031611316123161331614316153161631617316183161931620316213162231623316243162531626316273162831629316303163131632316333163431635316363163731638316393164031641316423164331644316453164631647316483164931650316513165231653316543165531656316573165831659316603166131662316633166431665316663166731668316693167031671316723167331674316753167631677316783167931680316813168231683316843168531686316873168831689316903169131692316933169431695316963169731698316993170031701317023170331704317053170631707317083170931710317113171231713317143171531716317173171831719317203172131722317233172431725317263172731728317293173031731317323173331734317353173631737317383173931740317413174231743317443174531746317473174831749317503175131752317533175431755317563175731758317593176031761317623176331764317653176631767317683176931770317713177231773317743177531776317773177831779317803178131782317833178431785317863178731788317893179031791317923179331794317953179631797317983179931800318013180231803318043180531806318073180831809318103181131812318133181431815318163181731818318193182031821318223182331824318253182631827318283182931830318313183231833318343183531836318373183831839318403184131842318433184431845318463184731848318493185031851318523185331854318553185631857318583185931860318613186231863318643186531866318673186831869318703187131872318733187431875318763187731878318793188031881318823188331884318853188631887318883188931890318913189231893318943189531896318973189831899319003190131902319033190431905319063190731908319093191031911319123191331914319153191631917319183191931920319213192231923319243192531926319273192831929319303193131932319333193431935319363193731938319393194031941319423194331944319453194631947319483194931950319513195231953319543195531956319573195831959319603196131962319633196431965319663196731968319693197031971319723197331974319753197631977319783197931980319813198231983319843198531986319873198831989319903199131992319933199431995319963199731998319993200032001320023200332004320053200632007320083200932010320113201232013320143201532016320173201832019320203202132022320233202432025320263202732028320293203032031320323203332034320353203632037320383203932040320413204232043320443204532046320473204832049320503205132052320533205432055320563205732058320593206032061320623206332064320653206632067320683206932070320713207232073320743207532076320773207832079320803208132082320833208432085320863208732088320893209032091320923209332094320953209632097320983209932100321013210232103321043210532106321073210832109321103211132112321133211432115321163211732118321193212032121321223212332124321253212632127321283212932130321313213232133321343213532136321373213832139321403214132142321433214432145321463214732148321493215032151321523215332154321553215632157321583215932160321613216232163321643216532166321673216832169321703217132172321733217432175321763217732178321793218032181321823218332184321853218632187321883218932190321913219232193321943219532196321973219832199322003220132202322033220432205322063220732208322093221032211322123221332214322153221632217322183221932220322213222232223322243222532226322273222832229322303223132232322333223432235322363223732238322393224032241322423224332244322453224632247322483224932250322513225232253322543225532256322573225832259322603226132262322633226432265322663226732268322693227032271322723227332274322753227632277322783227932280322813228232283322843228532286322873228832289322903229132292322933229432295322963229732298322993230032301323023230332304323053230632307323083230932310323113231232313323143231532316323173231832319323203232132322323233232432325323263232732328323293233032331323323233332334323353233632337323383233932340323413234232343323443234532346323473234832349323503235132352323533235432355323563235732358323593236032361323623236332364323653236632367323683236932370323713237232373323743237532376323773237832379323803238132382323833238432385323863238732388323893239032391323923239332394323953239632397323983239932400324013240232403324043240532406324073240832409324103241132412324133241432415324163241732418324193242032421324223242332424324253242632427324283242932430324313243232433324343243532436324373243832439324403244132442324433244432445324463244732448324493245032451324523245332454324553245632457324583245932460324613246232463324643246532466324673246832469324703247132472324733247432475324763247732478324793248032481324823248332484324853248632487324883248932490324913249232493324943249532496324973249832499325003250132502325033250432505325063250732508325093251032511325123251332514325153251632517325183251932520325213252232523325243252532526325273252832529325303253132532325333253432535325363253732538325393254032541325423254332544325453254632547325483254932550325513255232553325543255532556325573255832559325603256132562325633256432565325663256732568325693257032571325723257332574325753257632577325783257932580325813258232583325843258532586325873258832589325903259132592325933259432595325963259732598325993260032601326023260332604326053260632607326083260932610326113261232613326143261532616326173261832619326203262132622326233262432625326263262732628326293263032631326323263332634326353263632637326383263932640326413264232643326443264532646326473264832649326503265132652326533265432655326563265732658326593266032661326623266332664326653266632667326683266932670326713267232673326743267532676326773267832679326803268132682326833268432685326863268732688326893269032691326923269332694326953269632697326983269932700327013270232703327043270532706327073270832709327103271132712327133271432715327163271732718327193272032721327223272332724327253272632727327283272932730327313273232733327343273532736327373273832739327403274132742327433274432745327463274732748327493275032751327523275332754327553275632757327583275932760327613276232763327643276532766327673276832769327703277132772327733277432775327763277732778327793278032781327823278332784327853278632787327883278932790327913279232793327943279532796327973279832799328003280132802328033280432805328063280732808328093281032811328123281332814328153281632817328183281932820328213282232823328243282532826328273282832829328303283132832328333283432835328363283732838328393284032841328423284332844328453284632847328483284932850328513285232853328543285532856328573285832859328603286132862328633286432865328663286732868328693287032871328723287332874328753287632877328783287932880328813288232883328843288532886328873288832889328903289132892328933289432895328963289732898328993290032901329023290332904329053290632907329083290932910329113291232913329143291532916329173291832919329203292132922329233292432925329263292732928329293293032931329323293332934329353293632937329383293932940329413294232943329443294532946329473294832949329503295132952329533295432955329563295732958329593296032961329623296332964329653296632967329683296932970329713297232973329743297532976329773297832979329803298132982329833298432985329863298732988329893299032991329923299332994329953299632997329983299933000330013300233003330043300533006330073300833009330103301133012330133301433015330163301733018330193302033021330223302333024330253302633027330283302933030330313303233033330343303533036330373303833039330403304133042330433304433045330463304733048330493305033051330523305333054330553305633057330583305933060330613306233063330643306533066330673306833069330703307133072330733307433075330763307733078330793308033081330823308333084330853308633087330883308933090330913309233093330943309533096330973309833099331003310133102331033310433105331063310733108331093311033111331123311333114331153311633117331183311933120331213312233123331243312533126331273312833129331303313133132331333313433135331363313733138331393314033141331423314333144331453314633147331483314933150331513315233153331543315533156331573315833159331603316133162331633316433165331663316733168331693317033171331723317333174331753317633177331783317933180331813318233183331843318533186331873318833189331903319133192331933319433195331963319733198331993320033201332023320333204332053320633207332083320933210332113321233213332143321533216332173321833219332203322133222332233322433225332263322733228332293323033231332323323333234332353323633237332383323933240332413324233243332443324533246332473324833249332503325133252332533325433255332563325733258332593326033261332623326333264332653326633267332683326933270332713327233273332743327533276332773327833279332803328133282332833328433285332863328733288332893329033291332923329333294332953329633297332983329933300333013330233303333043330533306333073330833309333103331133312333133331433315333163331733318333193332033321333223332333324333253332633327333283332933330333313333233333333343333533336333373333833339333403334133342333433334433345333463334733348333493335033351333523335333354333553335633357333583335933360333613336233363333643336533366333673336833369333703337133372333733337433375333763337733378333793338033381333823338333384333853338633387333883338933390333913339233393333943339533396333973339833399334003340133402334033340433405334063340733408334093341033411334123341333414334153341633417334183341933420334213342233423334243342533426334273342833429334303343133432334333343433435334363343733438334393344033441334423344333444334453344633447334483344933450334513345233453334543345533456334573345833459334603346133462334633346433465334663346733468334693347033471334723347333474334753347633477334783347933480334813348233483334843348533486334873348833489334903349133492334933349433495334963349733498334993350033501335023350333504335053350633507335083350933510335113351233513335143351533516335173351833519335203352133522335233352433525335263352733528335293353033531335323353333534335353353633537335383353933540335413354233543335443354533546335473354833549335503355133552335533355433555335563355733558335593356033561335623356333564335653356633567335683356933570335713357233573335743357533576335773357833579335803358133582335833358433585335863358733588335893359033591335923359333594335953359633597335983359933600336013360233603336043360533606336073360833609336103361133612336133361433615336163361733618336193362033621336223362333624336253362633627336283362933630336313363233633336343363533636336373363833639336403364133642336433364433645336463364733648336493365033651336523365333654336553365633657336583365933660336613366233663336643366533666336673366833669336703367133672336733367433675336763367733678336793368033681336823368333684336853368633687336883368933690336913369233693336943369533696336973369833699337003370133702337033370433705337063370733708337093371033711337123371333714337153371633717337183371933720337213372233723337243372533726337273372833729337303373133732337333373433735337363373733738337393374033741337423374333744337453374633747337483374933750337513375233753337543375533756337573375833759337603376133762337633376433765337663376733768337693377033771337723377333774337753377633777337783377933780337813378233783337843378533786337873378833789337903379133792337933379433795337963379733798337993380033801338023380333804338053380633807338083380933810338113381233813338143381533816338173381833819338203382133822338233382433825338263382733828338293383033831338323383333834338353383633837338383383933840338413384233843338443384533846338473384833849338503385133852338533385433855338563385733858338593386033861338623386333864338653386633867338683386933870338713387233873338743387533876338773387833879338803388133882338833388433885338863388733888338893389033891338923389333894338953389633897338983389933900339013390233903339043390533906339073390833909339103391133912339133391433915339163391733918339193392033921339223392333924339253392633927339283392933930339313393233933339343393533936339373393833939339403394133942339433394433945339463394733948339493395033951339523395333954339553395633957339583395933960339613396233963339643396533966339673396833969339703397133972339733397433975339763397733978339793398033981339823398333984339853398633987339883398933990339913399233993339943399533996339973399833999340003400134002340033400434005340063400734008340093401034011340123401334014340153401634017340183401934020340213402234023340243402534026340273402834029340303403134032340333403434035340363403734038340393404034041340423404334044340453404634047340483404934050340513405234053340543405534056340573405834059340603406134062340633406434065340663406734068340693407034071340723407334074340753407634077340783407934080340813408234083340843408534086340873408834089340903409134092340933409434095340963409734098340993410034101341023410334104341053410634107341083410934110341113411234113341143411534116341173411834119341203412134122341233412434125341263412734128341293413034131341323413334134341353413634137341383413934140341413414234143341443414534146341473414834149341503415134152341533415434155341563415734158341593416034161341623416334164341653416634167341683416934170341713417234173341743417534176341773417834179341803418134182341833418434185341863418734188341893419034191341923419334194341953419634197341983419934200342013420234203342043420534206342073420834209342103421134212342133421434215342163421734218342193422034221342223422334224342253422634227342283422934230342313423234233342343423534236342373423834239342403424134242342433424434245342463424734248342493425034251342523425334254342553425634257342583425934260342613426234263342643426534266342673426834269342703427134272342733427434275342763427734278342793428034281342823428334284342853428634287342883428934290342913429234293342943429534296342973429834299343003430134302343033430434305343063430734308343093431034311343123431334314343153431634317343183431934320343213432234323343243432534326343273432834329343303433134332343333433434335343363433734338343393434034341343423434334344343453434634347343483434934350343513435234353343543435534356343573435834359343603436134362343633436434365343663436734368343693437034371343723437334374343753437634377343783437934380343813438234383343843438534386343873438834389343903439134392343933439434395343963439734398343993440034401344023440334404344053440634407344083440934410344113441234413344143441534416344173441834419344203442134422344233442434425344263442734428344293443034431344323443334434344353443634437344383443934440344413444234443344443444534446344473444834449344503445134452344533445434455344563445734458344593446034461344623446334464344653446634467344683446934470344713447234473344743447534476344773447834479344803448134482344833448434485344863448734488344893449034491344923449334494344953449634497344983449934500345013450234503345043450534506345073450834509345103451134512345133451434515345163451734518345193452034521345223452334524345253452634527345283452934530345313453234533345343453534536345373453834539345403454134542345433454434545345463454734548345493455034551345523455334554345553455634557345583455934560345613456234563345643456534566345673456834569345703457134572345733457434575345763457734578345793458034581345823458334584345853458634587345883458934590345913459234593345943459534596345973459834599346003460134602346033460434605346063460734608346093461034611346123461334614346153461634617346183461934620346213462234623346243462534626346273462834629346303463134632346333463434635346363463734638346393464034641346423464334644346453464634647346483464934650346513465234653346543465534656346573465834659346603466134662346633466434665346663466734668346693467034671346723467334674346753467634677346783467934680346813468234683346843468534686346873468834689346903469134692346933469434695346963469734698346993470034701347023470334704347053470634707347083470934710347113471234713347143471534716347173471834719347203472134722347233472434725347263472734728347293473034731347323473334734347353473634737347383473934740347413474234743347443474534746347473474834749347503475134752347533475434755347563475734758347593476034761347623476334764347653476634767347683476934770347713477234773347743477534776347773477834779347803478134782347833478434785347863478734788347893479034791347923479334794347953479634797347983479934800348013480234803348043480534806348073480834809348103481134812348133481434815348163481734818348193482034821348223482334824348253482634827348283482934830348313483234833348343483534836348373483834839348403484134842348433484434845348463484734848348493485034851348523485334854348553485634857348583485934860348613486234863348643486534866348673486834869348703487134872348733487434875348763487734878348793488034881348823488334884348853488634887348883488934890348913489234893348943489534896348973489834899349003490134902349033490434905349063490734908349093491034911349123491334914349153491634917349183491934920349213492234923349243492534926349273492834929349303493134932349333493434935349363493734938349393494034941349423494334944349453494634947349483494934950349513495234953349543495534956349573495834959349603496134962349633496434965349663496734968349693497034971349723497334974349753497634977349783497934980349813498234983349843498534986349873498834989349903499134992349933499434995349963499734998349993500035001350023500335004350053500635007350083500935010350113501235013350143501535016350173501835019350203502135022350233502435025350263502735028350293503035031350323503335034350353503635037350383503935040350413504235043350443504535046350473504835049350503505135052350533505435055350563505735058350593506035061350623506335064350653506635067350683506935070350713507235073350743507535076350773507835079350803508135082350833508435085350863508735088350893509035091350923509335094350953509635097350983509935100351013510235103351043510535106351073510835109351103511135112351133511435115351163511735118351193512035121351223512335124351253512635127351283512935130351313513235133351343513535136351373513835139351403514135142351433514435145351463514735148351493515035151351523515335154351553515635157351583515935160351613516235163351643516535166351673516835169351703517135172351733517435175351763517735178351793518035181351823518335184351853518635187351883518935190351913519235193351943519535196351973519835199352003520135202352033520435205352063520735208352093521035211352123521335214352153521635217352183521935220352213522235223352243522535226352273522835229352303523135232352333523435235352363523735238352393524035241352423524335244352453524635247352483524935250352513525235253352543525535256352573525835259352603526135262352633526435265352663526735268352693527035271352723527335274352753527635277352783527935280352813528235283352843528535286352873528835289352903529135292352933529435295352963529735298352993530035301353023530335304353053530635307353083530935310353113531235313353143531535316353173531835319353203532135322353233532435325353263532735328353293533035331353323533335334353353533635337353383533935340353413534235343353443534535346353473534835349353503535135352353533535435355353563535735358353593536035361353623536335364353653536635367353683536935370353713537235373353743537535376353773537835379353803538135382353833538435385353863538735388353893539035391353923539335394353953539635397353983539935400354013540235403354043540535406354073540835409354103541135412354133541435415354163541735418354193542035421354223542335424354253542635427354283542935430354313543235433354343543535436354373543835439354403544135442354433544435445354463544735448354493545035451354523545335454354553545635457354583545935460354613546235463354643546535466354673546835469354703547135472354733547435475354763547735478354793548035481354823548335484354853548635487354883548935490354913549235493354943549535496354973549835499355003550135502355033550435505355063550735508355093551035511355123551335514355153551635517355183551935520355213552235523355243552535526355273552835529355303553135532355333553435535355363553735538355393554035541355423554335544355453554635547355483554935550355513555235553355543555535556355573555835559355603556135562355633556435565355663556735568355693557035571355723557335574355753557635577355783557935580355813558235583355843558535586355873558835589355903559135592355933559435595355963559735598355993560035601356023560335604356053560635607356083560935610356113561235613356143561535616356173561835619356203562135622356233562435625356263562735628356293563035631356323563335634356353563635637356383563935640356413564235643356443564535646356473564835649356503565135652356533565435655356563565735658356593566035661356623566335664356653566635667356683566935670356713567235673356743567535676356773567835679356803568135682356833568435685356863568735688356893569035691356923569335694356953569635697356983569935700357013570235703357043570535706357073570835709357103571135712357133571435715357163571735718357193572035721357223572335724357253572635727357283572935730357313573235733357343573535736357373573835739357403574135742357433574435745357463574735748357493575035751357523575335754357553575635757357583575935760357613576235763357643576535766357673576835769357703577135772357733577435775357763577735778357793578035781357823578335784357853578635787357883578935790357913579235793357943579535796357973579835799358003580135802358033580435805358063580735808358093581035811358123581335814358153581635817358183581935820358213582235823358243582535826358273582835829358303583135832358333583435835358363583735838358393584035841358423584335844358453584635847358483584935850358513585235853358543585535856358573585835859358603586135862358633586435865358663586735868358693587035871358723587335874358753587635877358783587935880358813588235883358843588535886358873588835889358903589135892358933589435895358963589735898358993590035901359023590335904359053590635907359083590935910359113591235913359143591535916359173591835919359203592135922359233592435925359263592735928359293593035931359323593335934359353593635937359383593935940359413594235943359443594535946359473594835949359503595135952359533595435955359563595735958359593596035961359623596335964359653596635967359683596935970359713597235973359743597535976359773597835979359803598135982359833598435985359863598735988359893599035991359923599335994359953599635997359983599936000360013600236003360043600536006360073600836009360103601136012360133601436015360163601736018360193602036021360223602336024360253602636027360283602936030360313603236033360343603536036360373603836039360403604136042360433604436045360463604736048360493605036051360523605336054360553605636057360583605936060360613606236063360643606536066360673606836069360703607136072360733607436075360763607736078360793608036081360823608336084360853608636087360883608936090360913609236093360943609536096360973609836099361003610136102361033610436105361063610736108361093611036111361123611336114361153611636117361183611936120361213612236123361243612536126361273612836129361303613136132361333613436135361363613736138361393614036141361423614336144361453614636147361483614936150361513615236153361543615536156361573615836159361603616136162361633616436165361663616736168361693617036171361723617336174361753617636177361783617936180361813618236183361843618536186361873618836189361903619136192361933619436195361963619736198361993620036201362023620336204362053620636207362083620936210362113621236213362143621536216362173621836219362203622136222362233622436225362263622736228362293623036231362323623336234362353623636237362383623936240362413624236243362443624536246362473624836249362503625136252362533625436255362563625736258362593626036261362623626336264362653626636267362683626936270362713627236273362743627536276362773627836279362803628136282362833628436285362863628736288362893629036291362923629336294362953629636297362983629936300363013630236303363043630536306363073630836309363103631136312363133631436315363163631736318363193632036321363223632336324363253632636327363283632936330363313633236333363343633536336363373633836339363403634136342363433634436345363463634736348363493635036351363523635336354363553635636357363583635936360363613636236363363643636536366363673636836369363703637136372363733637436375363763637736378363793638036381363823638336384363853638636387363883638936390363913639236393363943639536396363973639836399364003640136402364033640436405364063640736408364093641036411364123641336414364153641636417364183641936420364213642236423364243642536426364273642836429364303643136432364333643436435364363643736438364393644036441364423644336444364453644636447364483644936450364513645236453364543645536456364573645836459364603646136462364633646436465364663646736468364693647036471364723647336474364753647636477364783647936480364813648236483364843648536486364873648836489364903649136492364933649436495364963649736498364993650036501365023650336504365053650636507365083650936510365113651236513365143651536516365173651836519365203652136522365233652436525365263652736528365293653036531365323653336534365353653636537365383653936540365413654236543365443654536546365473654836549365503655136552365533655436555365563655736558365593656036561365623656336564365653656636567365683656936570365713657236573365743657536576365773657836579365803658136582365833658436585365863658736588365893659036591365923659336594365953659636597365983659936600366013660236603366043660536606366073660836609366103661136612366133661436615366163661736618366193662036621366223662336624366253662636627366283662936630366313663236633366343663536636366373663836639366403664136642366433664436645366463664736648366493665036651366523665336654366553665636657366583665936660366613666236663366643666536666366673666836669366703667136672366733667436675366763667736678366793668036681366823668336684366853668636687366883668936690366913669236693366943669536696366973669836699367003670136702367033670436705367063670736708367093671036711367123671336714367153671636717367183671936720367213672236723367243672536726367273672836729367303673136732367333673436735367363673736738367393674036741367423674336744367453674636747367483674936750367513675236753367543675536756367573675836759367603676136762367633676436765367663676736768367693677036771367723677336774367753677636777367783677936780367813678236783367843678536786367873678836789367903679136792367933679436795367963679736798367993680036801368023680336804368053680636807368083680936810368113681236813368143681536816368173681836819368203682136822368233682436825368263682736828368293683036831368323683336834368353683636837368383683936840368413684236843368443684536846368473684836849368503685136852368533685436855368563685736858368593686036861368623686336864368653686636867368683686936870368713687236873368743687536876368773687836879368803688136882368833688436885368863688736888368893689036891368923689336894368953689636897368983689936900369013690236903369043690536906369073690836909369103691136912369133691436915369163691736918369193692036921369223692336924369253692636927369283692936930369313693236933369343693536936369373693836939369403694136942369433694436945369463694736948369493695036951369523695336954369553695636957369583695936960369613696236963369643696536966369673696836969369703697136972369733697436975369763697736978369793698036981369823698336984369853698636987369883698936990369913699236993369943699536996369973699836999370003700137002370033700437005370063700737008370093701037011370123701337014370153701637017370183701937020370213702237023370243702537026370273702837029370303703137032370333703437035370363703737038370393704037041370423704337044370453704637047370483704937050370513705237053370543705537056370573705837059370603706137062370633706437065370663706737068370693707037071370723707337074370753707637077370783707937080370813708237083370843708537086370873708837089370903709137092370933709437095370963709737098370993710037101371023710337104371053710637107371083710937110371113711237113371143711537116371173711837119371203712137122371233712437125371263712737128371293713037131371323713337134371353713637137371383713937140371413714237143371443714537146371473714837149371503715137152371533715437155371563715737158371593716037161371623716337164371653716637167371683716937170371713717237173371743717537176371773717837179371803718137182371833718437185371863718737188371893719037191371923719337194371953719637197371983719937200372013720237203372043720537206372073720837209372103721137212372133721437215372163721737218372193722037221372223722337224372253722637227372283722937230372313723237233372343723537236372373723837239372403724137242372433724437245372463724737248372493725037251372523725337254372553725637257372583725937260372613726237263372643726537266372673726837269372703727137272372733727437275372763727737278372793728037281372823728337284372853728637287372883728937290372913729237293372943729537296372973729837299373003730137302373033730437305373063730737308373093731037311373123731337314373153731637317373183731937320373213732237323373243732537326373273732837329373303733137332373333733437335373363733737338373393734037341373423734337344373453734637347373483734937350373513735237353373543735537356373573735837359373603736137362373633736437365373663736737368373693737037371373723737337374373753737637377373783737937380373813738237383373843738537386373873738837389373903739137392373933739437395373963739737398373993740037401374023740337404374053740637407374083740937410374113741237413374143741537416374173741837419374203742137422374233742437425374263742737428374293743037431374323743337434374353743637437374383743937440374413744237443374443744537446374473744837449374503745137452374533745437455374563745737458374593746037461374623746337464374653746637467374683746937470374713747237473374743747537476374773747837479374803748137482374833748437485374863748737488374893749037491374923749337494374953749637497374983749937500375013750237503375043750537506375073750837509375103751137512375133751437515375163751737518375193752037521375223752337524375253752637527375283752937530375313753237533375343753537536375373753837539375403754137542375433754437545375463754737548375493755037551375523755337554375553755637557375583755937560375613756237563375643756537566375673756837569375703757137572375733757437575375763757737578375793758037581375823758337584375853758637587375883758937590375913759237593375943759537596375973759837599376003760137602376033760437605376063760737608376093761037611376123761337614376153761637617376183761937620376213762237623376243762537626376273762837629376303763137632376333763437635376363763737638376393764037641376423764337644376453764637647376483764937650376513765237653376543765537656376573765837659376603766137662376633766437665376663766737668376693767037671376723767337674376753767637677376783767937680376813768237683376843768537686376873768837689376903769137692376933769437695376963769737698376993770037701377023770337704377053770637707377083770937710377113771237713377143771537716377173771837719377203772137722377233772437725377263772737728377293773037731377323773337734377353773637737377383773937740377413774237743377443774537746377473774837749377503775137752377533775437755377563775737758377593776037761377623776337764377653776637767377683776937770377713777237773377743777537776377773777837779377803778137782377833778437785377863778737788377893779037791377923779337794377953779637797377983779937800378013780237803378043780537806378073780837809378103781137812378133781437815378163781737818378193782037821378223782337824378253782637827378283782937830378313783237833378343783537836378373783837839378403784137842378433784437845378463784737848378493785037851378523785337854378553785637857378583785937860378613786237863378643786537866378673786837869378703787137872378733787437875378763787737878378793788037881378823788337884378853788637887378883788937890378913789237893378943789537896378973789837899379003790137902379033790437905379063790737908379093791037911379123791337914379153791637917379183791937920379213792237923379243792537926379273792837929379303793137932379333793437935379363793737938379393794037941379423794337944379453794637947379483794937950379513795237953379543795537956379573795837959379603796137962379633796437965379663796737968379693797037971379723797337974379753797637977379783797937980379813798237983379843798537986379873798837989379903799137992379933799437995379963799737998379993800038001380023800338004380053800638007380083800938010380113801238013380143801538016380173801838019380203802138022380233802438025380263802738028380293803038031380323803338034380353803638037380383803938040380413804238043380443804538046380473804838049380503805138052380533805438055380563805738058380593806038061380623806338064380653806638067380683806938070380713807238073380743807538076380773807838079380803808138082380833808438085380863808738088380893809038091380923809338094380953809638097380983809938100381013810238103381043810538106381073810838109381103811138112381133811438115381163811738118381193812038121381223812338124381253812638127381283812938130381313813238133381343813538136381373813838139381403814138142381433814438145381463814738148381493815038151381523815338154381553815638157381583815938160381613816238163381643816538166381673816838169381703817138172381733817438175381763817738178381793818038181381823818338184381853818638187381883818938190381913819238193381943819538196381973819838199382003820138202382033820438205382063820738208382093821038211382123821338214382153821638217382183821938220382213822238223382243822538226382273822838229382303823138232382333823438235382363823738238382393824038241382423824338244382453824638247382483824938250382513825238253382543825538256382573825838259382603826138262382633826438265382663826738268382693827038271382723827338274382753827638277382783827938280382813828238283382843828538286382873828838289382903829138292382933829438295382963829738298382993830038301383023830338304383053830638307383083830938310383113831238313383143831538316383173831838319383203832138322383233832438325383263832738328383293833038331383323833338334383353833638337383383833938340383413834238343383443834538346383473834838349383503835138352383533835438355383563835738358383593836038361383623836338364383653836638367383683836938370383713837238373383743837538376383773837838379383803838138382383833838438385383863838738388383893839038391383923839338394383953839638397383983839938400384013840238403384043840538406384073840838409384103841138412384133841438415384163841738418384193842038421384223842338424384253842638427384283842938430384313843238433384343843538436384373843838439384403844138442384433844438445384463844738448384493845038451384523845338454384553845638457384583845938460384613846238463384643846538466384673846838469384703847138472384733847438475384763847738478384793848038481384823848338484384853848638487384883848938490384913849238493384943849538496384973849838499385003850138502385033850438505385063850738508385093851038511385123851338514385153851638517385183851938520385213852238523385243852538526385273852838529385303853138532385333853438535385363853738538385393854038541385423854338544385453854638547385483854938550385513855238553385543855538556385573855838559385603856138562385633856438565385663856738568385693857038571385723857338574385753857638577385783857938580385813858238583385843858538586385873858838589385903859138592385933859438595385963859738598385993860038601386023860338604386053860638607386083860938610386113861238613386143861538616386173861838619386203862138622386233862438625386263862738628386293863038631386323863338634386353863638637386383863938640386413864238643386443864538646386473864838649386503865138652386533865438655386563865738658386593866038661386623866338664386653866638667386683866938670386713867238673386743867538676386773867838679386803868138682386833868438685386863868738688386893869038691386923869338694386953869638697386983869938700387013870238703387043870538706387073870838709387103871138712387133871438715387163871738718387193872038721387223872338724387253872638727387283872938730387313873238733387343873538736387373873838739387403874138742387433874438745387463874738748387493875038751387523875338754387553875638757387583875938760387613876238763387643876538766387673876838769387703877138772387733877438775387763877738778387793878038781387823878338784387853878638787387883878938790387913879238793387943879538796387973879838799388003880138802388033880438805388063880738808388093881038811388123881338814388153881638817388183881938820388213882238823388243882538826388273882838829388303883138832388333883438835388363883738838388393884038841388423884338844388453884638847388483884938850388513885238853388543885538856388573885838859388603886138862388633886438865388663886738868388693887038871388723887338874388753887638877388783887938880388813888238883388843888538886388873888838889388903889138892388933889438895388963889738898388993890038901389023890338904389053890638907389083890938910389113891238913389143891538916389173891838919389203892138922389233892438925389263892738928389293893038931389323893338934389353893638937389383893938940389413894238943389443894538946389473894838949389503895138952389533895438955389563895738958389593896038961389623896338964389653896638967389683896938970389713897238973389743897538976389773897838979389803898138982389833898438985389863898738988389893899038991389923899338994389953899638997389983899939000390013900239003390043900539006390073900839009390103901139012390133901439015390163901739018390193902039021390223902339024390253902639027390283902939030390313903239033390343903539036390373903839039390403904139042390433904439045390463904739048390493905039051390523905339054390553905639057390583905939060390613906239063390643906539066390673906839069390703907139072390733907439075390763907739078390793908039081390823908339084390853908639087390883908939090390913909239093390943909539096390973909839099391003910139102391033910439105391063910739108391093911039111391123911339114391153911639117391183911939120391213912239123391243912539126391273912839129391303913139132391333913439135391363913739138391393914039141391423914339144391453914639147391483914939150391513915239153391543915539156391573915839159391603916139162391633916439165391663916739168391693917039171391723917339174391753917639177391783917939180391813918239183391843918539186391873918839189391903919139192391933919439195391963919739198391993920039201392023920339204392053920639207392083920939210392113921239213392143921539216392173921839219392203922139222392233922439225392263922739228392293923039231392323923339234392353923639237392383923939240392413924239243392443924539246392473924839249392503925139252392533925439255392563925739258392593926039261392623926339264392653926639267392683926939270392713927239273392743927539276392773927839279392803928139282392833928439285392863928739288392893929039291392923929339294392953929639297392983929939300393013930239303393043930539306393073930839309393103931139312393133931439315393163931739318393193932039321393223932339324393253932639327393283932939330393313933239333393343933539336393373933839339393403934139342393433934439345393463934739348393493935039351393523935339354393553935639357393583935939360393613936239363393643936539366393673936839369393703937139372393733937439375393763937739378393793938039381393823938339384393853938639387393883938939390393913939239393393943939539396393973939839399394003940139402394033940439405394063940739408394093941039411394123941339414394153941639417394183941939420394213942239423394243942539426394273942839429394303943139432394333943439435394363943739438394393944039441394423944339444394453944639447394483944939450394513945239453394543945539456394573945839459394603946139462394633946439465394663946739468394693947039471394723947339474394753947639477394783947939480394813948239483394843948539486394873948839489394903949139492394933949439495394963949739498394993950039501395023950339504395053950639507395083950939510395113951239513395143951539516395173951839519395203952139522395233952439525395263952739528395293953039531395323953339534395353953639537395383953939540395413954239543395443954539546395473954839549395503955139552395533955439555395563955739558395593956039561395623956339564395653956639567395683956939570395713957239573395743957539576395773957839579395803958139582395833958439585395863958739588395893959039591395923959339594395953959639597395983959939600396013960239603396043960539606396073960839609396103961139612396133961439615396163961739618396193962039621396223962339624396253962639627396283962939630396313963239633396343963539636396373963839639396403964139642396433964439645396463964739648396493965039651396523965339654396553965639657396583965939660396613966239663396643966539666396673966839669396703967139672396733967439675396763967739678396793968039681396823968339684396853968639687396883968939690396913969239693396943969539696396973969839699397003970139702397033970439705397063970739708397093971039711397123971339714397153971639717397183971939720397213972239723397243972539726397273972839729397303973139732397333973439735397363973739738397393974039741397423974339744397453974639747397483974939750397513975239753397543975539756397573975839759397603976139762397633976439765397663976739768397693977039771397723977339774397753977639777397783977939780397813978239783397843978539786397873978839789397903979139792397933979439795397963979739798397993980039801398023980339804398053980639807398083980939810398113981239813398143981539816398173981839819398203982139822398233982439825398263982739828398293983039831398323983339834398353983639837398383983939840398413984239843398443984539846398473984839849398503985139852398533985439855398563985739858398593986039861398623986339864398653986639867398683986939870398713987239873398743987539876398773987839879398803988139882398833988439885398863988739888398893989039891398923989339894398953989639897398983989939900399013990239903399043990539906399073990839909399103991139912399133991439915399163991739918399193992039921399223992339924399253992639927399283992939930399313993239933399343993539936399373993839939399403994139942399433994439945399463994739948399493995039951399523995339954399553995639957399583995939960399613996239963399643996539966399673996839969399703997139972399733997439975399763997739978399793998039981399823998339984399853998639987399883998939990399913999239993399943999539996399973999839999400004000140002400034000440005400064000740008400094001040011400124001340014400154001640017400184001940020400214002240023400244002540026400274002840029400304003140032400334003440035400364003740038400394004040041400424004340044400454004640047400484004940050400514005240053400544005540056400574005840059400604006140062400634006440065400664006740068400694007040071400724007340074400754007640077400784007940080400814008240083400844008540086400874008840089400904009140092400934009440095400964009740098400994010040101401024010340104401054010640107401084010940110401114011240113401144011540116401174011840119401204012140122401234012440125401264012740128401294013040131401324013340134401354013640137401384013940140401414014240143401444014540146401474014840149401504015140152401534015440155401564015740158401594016040161401624016340164401654016640167401684016940170401714017240173401744017540176401774017840179401804018140182401834018440185401864018740188401894019040191401924019340194401954019640197401984019940200402014020240203402044020540206402074020840209402104021140212402134021440215402164021740218402194022040221402224022340224402254022640227402284022940230402314023240233402344023540236402374023840239402404024140242402434024440245402464024740248402494025040251402524025340254402554025640257402584025940260402614026240263402644026540266402674026840269402704027140272402734027440275402764027740278402794028040281402824028340284402854028640287402884028940290402914029240293402944029540296402974029840299403004030140302403034030440305403064030740308403094031040311403124031340314403154031640317403184031940320403214032240323403244032540326403274032840329403304033140332403334033440335403364033740338403394034040341403424034340344403454034640347403484034940350403514035240353403544035540356403574035840359403604036140362403634036440365403664036740368403694037040371403724037340374403754037640377403784037940380403814038240383403844038540386403874038840389403904039140392403934039440395403964039740398403994040040401404024040340404404054040640407404084040940410404114041240413404144041540416404174041840419404204042140422404234042440425404264042740428404294043040431404324043340434404354043640437404384043940440404414044240443404444044540446404474044840449404504045140452404534045440455404564045740458404594046040461404624046340464404654046640467404684046940470404714047240473404744047540476404774047840479404804048140482404834048440485404864048740488404894049040491404924049340494404954049640497404984049940500405014050240503405044050540506405074050840509405104051140512405134051440515405164051740518405194052040521405224052340524405254052640527405284052940530405314053240533405344053540536405374053840539405404054140542405434054440545405464054740548405494055040551405524055340554405554055640557405584055940560405614056240563405644056540566405674056840569405704057140572405734057440575405764057740578405794058040581405824058340584405854058640587405884058940590405914059240593405944059540596405974059840599406004060140602406034060440605406064060740608406094061040611406124061340614406154061640617406184061940620406214062240623406244062540626406274062840629406304063140632406334063440635406364063740638406394064040641406424064340644406454064640647406484064940650406514065240653406544065540656406574065840659406604066140662406634066440665406664066740668406694067040671406724067340674406754067640677406784067940680406814068240683406844068540686406874068840689406904069140692406934069440695406964069740698406994070040701407024070340704407054070640707407084070940710407114071240713407144071540716407174071840719407204072140722407234072440725407264072740728407294073040731407324073340734407354073640737407384073940740407414074240743407444074540746407474074840749407504075140752407534075440755407564075740758407594076040761407624076340764407654076640767407684076940770407714077240773407744077540776407774077840779407804078140782407834078440785407864078740788407894079040791407924079340794407954079640797407984079940800408014080240803408044080540806408074080840809408104081140812408134081440815408164081740818408194082040821408224082340824408254082640827408284082940830408314083240833408344083540836408374083840839408404084140842408434084440845408464084740848408494085040851408524085340854408554085640857408584085940860408614086240863408644086540866408674086840869408704087140872408734087440875408764087740878408794088040881408824088340884408854088640887408884088940890408914089240893408944089540896408974089840899409004090140902409034090440905409064090740908409094091040911409124091340914409154091640917409184091940920409214092240923409244092540926409274092840929409304093140932409334093440935409364093740938409394094040941409424094340944409454094640947409484094940950409514095240953409544095540956409574095840959409604096140962409634096440965409664096740968409694097040971409724097340974409754097640977409784097940980409814098240983409844098540986409874098840989409904099140992409934099440995409964099740998409994100041001410024100341004410054100641007410084100941010410114101241013410144101541016410174101841019410204102141022410234102441025410264102741028410294103041031410324103341034410354103641037410384103941040410414104241043410444104541046410474104841049410504105141052410534105441055410564105741058410594106041061410624106341064410654106641067410684106941070410714107241073410744107541076410774107841079410804108141082410834108441085410864108741088410894109041091410924109341094410954109641097410984109941100411014110241103411044110541106411074110841109411104111141112411134111441115411164111741118411194112041121411224112341124411254112641127411284112941130411314113241133411344113541136411374113841139411404114141142411434114441145411464114741148411494115041151411524115341154411554115641157411584115941160411614116241163411644116541166411674116841169411704117141172411734117441175411764117741178411794118041181411824118341184411854118641187411884118941190411914119241193411944119541196411974119841199412004120141202412034120441205412064120741208412094121041211412124121341214412154121641217412184121941220412214122241223412244122541226412274122841229412304123141232412334123441235412364123741238412394124041241412424124341244412454124641247412484124941250412514125241253412544125541256412574125841259412604126141262412634126441265412664126741268412694127041271412724127341274412754127641277412784127941280412814128241283412844128541286412874128841289412904129141292412934129441295412964129741298412994130041301413024130341304413054130641307413084130941310413114131241313413144131541316413174131841319413204132141322413234132441325413264132741328413294133041331413324133341334413354133641337413384133941340413414134241343413444134541346413474134841349413504135141352413534135441355413564135741358413594136041361413624136341364413654136641367413684136941370413714137241373413744137541376413774137841379413804138141382413834138441385413864138741388413894139041391413924139341394413954139641397413984139941400414014140241403414044140541406414074140841409414104141141412414134141441415414164141741418414194142041421414224142341424414254142641427414284142941430414314143241433414344143541436414374143841439414404144141442414434144441445414464144741448414494145041451414524145341454414554145641457414584145941460414614146241463414644146541466414674146841469414704147141472414734147441475414764147741478414794148041481414824148341484414854148641487414884148941490414914149241493414944149541496414974149841499415004150141502415034150441505415064150741508415094151041511415124151341514415154151641517415184151941520415214152241523415244152541526415274152841529415304153141532415334153441535415364153741538415394154041541415424154341544415454154641547415484154941550415514155241553415544155541556415574155841559415604156141562415634156441565415664156741568415694157041571415724157341574415754157641577415784157941580415814158241583415844158541586415874158841589415904159141592415934159441595415964159741598415994160041601416024160341604416054160641607416084160941610416114161241613416144161541616416174161841619416204162141622416234162441625416264162741628416294163041631416324163341634416354163641637416384163941640416414164241643416444164541646416474164841649416504165141652416534165441655416564165741658416594166041661416624166341664416654166641667416684166941670416714167241673416744167541676416774167841679416804168141682416834168441685416864168741688416894169041691416924169341694416954169641697416984169941700417014170241703417044170541706417074170841709417104171141712417134171441715417164171741718417194172041721417224172341724417254172641727417284172941730417314173241733417344173541736417374173841739417404174141742417434174441745417464174741748417494175041751417524175341754417554175641757417584175941760417614176241763417644176541766417674176841769417704177141772417734177441775417764177741778417794178041781417824178341784417854178641787417884178941790417914179241793417944179541796417974179841799418004180141802418034180441805418064180741808418094181041811418124181341814418154181641817418184181941820418214182241823418244182541826418274182841829418304183141832418334183441835418364183741838418394184041841418424184341844418454184641847418484184941850418514185241853418544185541856418574185841859418604186141862418634186441865418664186741868418694187041871418724187341874418754187641877418784187941880418814188241883418844188541886418874188841889418904189141892418934189441895418964189741898418994190041901419024190341904419054190641907419084190941910419114191241913419144191541916419174191841919419204192141922419234192441925419264192741928419294193041931419324193341934419354193641937419384193941940419414194241943419444194541946419474194841949419504195141952419534195441955419564195741958419594196041961419624196341964419654196641967419684196941970419714197241973419744197541976419774197841979419804198141982419834198441985419864198741988419894199041991419924199341994419954199641997419984199942000420014200242003420044200542006420074200842009420104201142012420134201442015420164201742018420194202042021420224202342024420254202642027420284202942030420314203242033420344203542036420374203842039420404204142042420434204442045420464204742048420494205042051420524205342054420554205642057420584205942060420614206242063420644206542066420674206842069420704207142072420734207442075420764207742078420794208042081420824208342084420854208642087420884208942090420914209242093420944209542096420974209842099421004210142102421034210442105421064210742108421094211042111421124211342114421154211642117421184211942120421214212242123421244212542126421274212842129421304213142132421334213442135421364213742138421394214042141421424214342144421454214642147421484214942150421514215242153421544215542156421574215842159421604216142162421634216442165421664216742168421694217042171421724217342174421754217642177421784217942180421814218242183421844218542186421874218842189421904219142192421934219442195421964219742198421994220042201422024220342204422054220642207422084220942210422114221242213422144221542216422174221842219422204222142222422234222442225422264222742228422294223042231422324223342234422354223642237422384223942240422414224242243422444224542246422474224842249422504225142252422534225442255422564225742258422594226042261422624226342264422654226642267422684226942270422714227242273422744227542276422774227842279422804228142282422834228442285422864228742288422894229042291422924229342294422954229642297422984229942300423014230242303423044230542306423074230842309423104231142312423134231442315423164231742318423194232042321423224232342324423254232642327423284232942330423314233242333423344233542336423374233842339423404234142342423434234442345423464234742348423494235042351423524235342354423554235642357423584235942360423614236242363423644236542366423674236842369423704237142372423734237442375423764237742378423794238042381423824238342384423854238642387423884238942390423914239242393423944239542396423974239842399424004240142402424034240442405424064240742408424094241042411424124241342414424154241642417424184241942420424214242242423424244242542426424274242842429424304243142432424334243442435424364243742438424394244042441424424244342444424454244642447424484244942450424514245242453424544245542456424574245842459424604246142462424634246442465424664246742468424694247042471424724247342474424754247642477424784247942480424814248242483424844248542486424874248842489424904249142492424934249442495424964249742498424994250042501425024250342504425054250642507425084250942510425114251242513425144251542516425174251842519425204252142522425234252442525425264252742528425294253042531425324253342534425354253642537425384253942540425414254242543425444254542546425474254842549425504255142552425534255442555425564255742558425594256042561425624256342564425654256642567425684256942570425714257242573425744257542576425774257842579425804258142582425834258442585425864258742588425894259042591425924259342594425954259642597425984259942600426014260242603426044260542606426074260842609426104261142612426134261442615426164261742618426194262042621426224262342624426254262642627426284262942630426314263242633426344263542636426374263842639426404264142642426434264442645426464264742648426494265042651426524265342654426554265642657426584265942660426614266242663426644266542666426674266842669426704267142672426734267442675426764267742678426794268042681426824268342684426854268642687426884268942690426914269242693426944269542696426974269842699427004270142702427034270442705427064270742708427094271042711427124271342714427154271642717427184271942720427214272242723427244272542726427274272842729427304273142732427334273442735427364273742738427394274042741427424274342744427454274642747427484274942750427514275242753427544275542756427574275842759427604276142762427634276442765427664276742768427694277042771427724277342774427754277642777427784277942780427814278242783427844278542786427874278842789427904279142792427934279442795427964279742798427994280042801428024280342804428054280642807428084280942810428114281242813428144281542816428174281842819428204282142822428234282442825428264282742828428294283042831428324283342834428354283642837428384283942840428414284242843428444284542846428474284842849428504285142852428534285442855428564285742858428594286042861428624286342864428654286642867428684286942870428714287242873428744287542876428774287842879428804288142882428834288442885428864288742888428894289042891428924289342894428954289642897428984289942900429014290242903429044290542906429074290842909429104291142912429134291442915429164291742918429194292042921429224292342924429254292642927429284292942930429314293242933429344293542936429374293842939429404294142942429434294442945429464294742948429494295042951429524295342954429554295642957429584295942960429614296242963429644296542966429674296842969429704297142972429734297442975429764297742978429794298042981429824298342984429854298642987429884298942990429914299242993429944299542996429974299842999430004300143002430034300443005430064300743008430094301043011430124301343014430154301643017430184301943020430214302243023430244302543026430274302843029430304303143032430334303443035430364303743038430394304043041430424304343044430454304643047430484304943050430514305243053430544305543056430574305843059430604306143062430634306443065430664306743068430694307043071430724307343074430754307643077430784307943080430814308243083430844308543086430874308843089430904309143092430934309443095430964309743098430994310043101431024310343104431054310643107431084310943110431114311243113431144311543116431174311843119431204312143122431234312443125431264312743128431294313043131431324313343134431354313643137431384313943140431414314243143431444314543146431474314843149431504315143152431534315443155431564315743158431594316043161431624316343164431654316643167431684316943170431714317243173431744317543176431774317843179431804318143182431834318443185431864318743188431894319043191431924319343194431954319643197431984319943200432014320243203432044320543206432074320843209432104321143212432134321443215432164321743218432194322043221432224322343224432254322643227432284322943230432314323243233432344323543236432374323843239432404324143242432434324443245432464324743248432494325043251432524325343254432554325643257432584325943260432614326243263432644326543266432674326843269432704327143272432734327443275432764327743278432794328043281432824328343284432854328643287432884328943290432914329243293432944329543296432974329843299433004330143302433034330443305433064330743308433094331043311433124331343314433154331643317433184331943320433214332243323433244332543326433274332843329433304333143332433334333443335433364333743338433394334043341433424334343344433454334643347433484334943350433514335243353433544335543356433574335843359433604336143362433634336443365433664336743368433694337043371433724337343374433754337643377433784337943380433814338243383433844338543386433874338843389433904339143392433934339443395433964339743398433994340043401434024340343404434054340643407434084340943410434114341243413434144341543416434174341843419434204342143422434234342443425434264342743428434294343043431434324343343434434354343643437434384343943440434414344243443434444344543446434474344843449434504345143452434534345443455434564345743458434594346043461434624346343464434654346643467434684346943470434714347243473434744347543476434774347843479434804348143482434834348443485434864348743488434894349043491434924349343494434954349643497434984349943500435014350243503435044350543506435074350843509435104351143512435134351443515435164351743518435194352043521435224352343524435254352643527435284352943530435314353243533435344353543536435374353843539435404354143542435434354443545435464354743548435494355043551435524355343554435554355643557435584355943560435614356243563435644356543566435674356843569435704357143572435734357443575435764357743578435794358043581435824358343584435854358643587435884358943590435914359243593435944359543596435974359843599436004360143602436034360443605436064360743608436094361043611436124361343614436154361643617436184361943620436214362243623436244362543626436274362843629436304363143632436334363443635436364363743638436394364043641436424364343644436454364643647436484364943650436514365243653436544365543656436574365843659436604366143662436634366443665436664366743668436694367043671436724367343674436754367643677436784367943680436814368243683436844368543686436874368843689436904369143692436934369443695436964369743698436994370043701437024370343704437054370643707437084370943710437114371243713437144371543716437174371843719437204372143722437234372443725437264372743728437294373043731437324373343734437354373643737437384373943740437414374243743437444374543746437474374843749437504375143752437534375443755437564375743758437594376043761437624376343764437654376643767437684376943770437714377243773437744377543776437774377843779437804378143782437834378443785437864378743788437894379043791437924379343794437954379643797437984379943800438014380243803438044380543806438074380843809438104381143812438134381443815438164381743818438194382043821438224382343824438254382643827438284382943830438314383243833438344383543836438374383843839438404384143842438434384443845438464384743848438494385043851438524385343854438554385643857438584385943860438614386243863438644386543866438674386843869438704387143872438734387443875438764387743878438794388043881438824388343884438854388643887438884388943890438914389243893438944389543896438974389843899439004390143902439034390443905439064390743908439094391043911439124391343914439154391643917439184391943920439214392243923439244392543926439274392843929439304393143932439334393443935439364393743938439394394043941
  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. }), _getDistrict$getArea$);
  9047. exports.default = _default;
  9048. /***/ }),
  9049. /***/ 35:
  9050. /*!***********************************************************!*\
  9051. !*** D:/IdeaProjects/zdsz_WeChatApplet/common/request.js ***!
  9052. \***********************************************************/
  9053. /*! no static exports found */
  9054. /***/ (function(module, exports, __webpack_require__) {
  9055. "use strict";
  9056. /* WEBPACK VAR INJECTION */(function(uni) {
  9057. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  9058. Object.defineProperty(exports, "__esModule", {
  9059. value: true
  9060. });
  9061. exports.default = void 0;
  9062. var _http = _interopRequireDefault(__webpack_require__(/*! ./http.js */ 36));
  9063. var _default = {
  9064. // 请求方法
  9065. requestEn: function requestEn(url) {
  9066. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  9067. var methods = arguments.length > 2 ? arguments[2] : undefined;
  9068. return new Promise(function (resolve, reject) {
  9069. // console.log(http.webUrl + url +'---'+ uni.getStorageSync('token'))
  9070. uni.request({
  9071. url: _http.default.webUrl + url,
  9072. method: methods ? methods : 'GET',
  9073. data: data,
  9074. success: function success(res) {
  9075. if (res.data.code === 200) {
  9076. resolve(res.data.data === undefined ? null : res.data.data);
  9077. } else if (res.data.code === 403 || res.data.code === 401) {
  9078. uni.showToast({
  9079. title: 'Token超时,请重新登录',
  9080. icon: 'none'
  9081. });
  9082. if (uni.getStorageSync('token')) {
  9083. uni.removeStorage({
  9084. key: 'token',
  9085. success: function success() {
  9086. uni.navigateTo({
  9087. url: '/pages/login/login'
  9088. });
  9089. }
  9090. });
  9091. } else {
  9092. uni.navigateTo({
  9093. url: '/pages/login/login'
  9094. });
  9095. }
  9096. } else {
  9097. uni.showToast({
  9098. title: res.data.msg ? res.data.msg : '系统异常',
  9099. icon: 'none'
  9100. });
  9101. }
  9102. },
  9103. fail: function fail() {
  9104. uni.showToast({
  9105. title: '网络异常',
  9106. icon: 'none'
  9107. });
  9108. }
  9109. });
  9110. });
  9111. },
  9112. // 请求方法
  9113. requestFn: function requestFn(url) {
  9114. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  9115. var methods = arguments.length > 2 ? arguments[2] : undefined;
  9116. return new Promise(function (resolve, reject) {
  9117. console.log(_http.default.webUrl + url + '---' + uni.getStorageSync('token'));
  9118. uni.request({
  9119. url: _http.default.webUrl + url,
  9120. method: methods ? methods : 'GET',
  9121. data: data,
  9122. header: {
  9123. "MAuthorization": "wxBearer ".concat(uni.getStorageSync('token') ? uni.getStorageSync('token') : ''),
  9124. "userType": 'MOdBILE'
  9125. },
  9126. success: function success(res) {
  9127. console.log(res);
  9128. if (res.data.code === 200) {
  9129. resolve(res.data.data === undefined ? null : res.data.data);
  9130. } else if (res.data.code === 403 || res.data.code === 401) {
  9131. uni.showToast({
  9132. title: 'Token超时,请重新登录',
  9133. icon: 'none'
  9134. });
  9135. if (uni.getStorageSync('token')) {
  9136. uni.removeStorage({
  9137. key: 'token',
  9138. success: function success() {
  9139. uni.navigateTo({
  9140. url: '/pages/login/login'
  9141. });
  9142. }
  9143. });
  9144. } else {
  9145. uni.navigateTo({
  9146. url: '/pages/login/login'
  9147. });
  9148. }
  9149. } else {
  9150. uni.showToast({
  9151. title: res.data.msg ? res.data.msg : '系统异常',
  9152. icon: 'none'
  9153. });
  9154. }
  9155. },
  9156. fail: function fail() {
  9157. uni.showToast({
  9158. title: '网络异常',
  9159. icon: 'none'
  9160. });
  9161. }
  9162. });
  9163. });
  9164. },
  9165. requestLo: function requestLo(url) {
  9166. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  9167. var methods = arguments.length > 2 ? arguments[2] : undefined;
  9168. return new Promise(function (resolve, reject) {
  9169. console.log(_http.default.webUrl + url);
  9170. uni.request({
  9171. url: _http.default.webUrl + url,
  9172. method: methods ? methods : 'GET',
  9173. data: data,
  9174. header: {
  9175. "userType": 'MOBILE'
  9176. },
  9177. success: function success(res) {
  9178. console.log(res);
  9179. if (res.data.code === 200) {
  9180. resolve(res.data === undefined ? null : res.data);
  9181. } else if (res.data.code === 403) {
  9182. uni.showToast({
  9183. title: res.data.msg ? res.data.msg : 'Token超时,请重新登录',
  9184. icon: 'none'
  9185. });
  9186. if (uni.getStorageSync('token')) {
  9187. uni.removeStorage({
  9188. key: 'token',
  9189. success: function success() {
  9190. uni.navigateTo({
  9191. url: '/pages/login/login'
  9192. });
  9193. }
  9194. });
  9195. } else {
  9196. uni.navigateTo({
  9197. url: '/pages/login/login'
  9198. });
  9199. }
  9200. } else {
  9201. uni.showToast({
  9202. title: res.data.msg ? res.data.msg : '系统异常',
  9203. icon: 'none'
  9204. });
  9205. }
  9206. },
  9207. fail: function fail() {
  9208. uni.showToast({
  9209. title: '网络异常',
  9210. icon: 'none'
  9211. });
  9212. }
  9213. });
  9214. });
  9215. }
  9216. };
  9217. exports.default = _default;
  9218. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  9219. /***/ }),
  9220. /***/ 358:
  9221. /*!***********************************************************************!*\
  9222. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/libs/util/emitter.js ***!
  9223. \***********************************************************************/
  9224. /*! no static exports found */
  9225. /***/ (function(module, exports, __webpack_require__) {
  9226. "use strict";
  9227. Object.defineProperty(exports, "__esModule", {
  9228. value: true
  9229. });
  9230. exports.default = void 0;
  9231. /**
  9232. * 递归使用 call 方式this指向
  9233. * @param componentName // 需要找的组件的名称
  9234. * @param eventName // 事件名称
  9235. * @param params // 需要传递的参数
  9236. */
  9237. function _broadcast(componentName, eventName, params) {
  9238. // 循环子节点找到名称一样的子节点 否则 递归 当前子节点
  9239. this.$children.map(function (child) {
  9240. if (componentName === child.$options.name) {
  9241. child.$emit.apply(child, [eventName].concat(params));
  9242. } else {
  9243. _broadcast.apply(child, [componentName, eventName].concat(params));
  9244. }
  9245. });
  9246. }
  9247. var _default = {
  9248. methods: {
  9249. /**
  9250. * 派发 (向上查找) (一个)
  9251. * @param componentName // 需要找的组件的名称
  9252. * @param eventName // 事件名称
  9253. * @param params // 需要传递的参数
  9254. */
  9255. dispatch: function dispatch(componentName, eventName, params) {
  9256. var parent = this.$parent || this.$root; //$parent 找到最近的父节点 $root 根节点
  9257. var name = parent.$options.name; // 获取当前组件实例的name
  9258. // 如果当前有节点 && 当前没名称 且 当前名称等于需要传进来的名称的时候就去查找当前的节点
  9259. // 循环出当前名称的一样的组件实例
  9260. while (parent && (!name || name !== componentName)) {
  9261. parent = parent.$parent;
  9262. if (parent) {
  9263. name = parent.$options.name;
  9264. }
  9265. }
  9266. // 有节点表示当前找到了name一样的实例
  9267. if (parent) {
  9268. parent.$emit.apply(parent, [eventName].concat(params));
  9269. }
  9270. },
  9271. /**
  9272. * 广播 (向下查找) (广播多个)
  9273. * @param componentName // 需要找的组件的名称
  9274. * @param eventName // 事件名称
  9275. * @param params // 需要传递的参数
  9276. */
  9277. broadcast: function broadcast(componentName, eventName, params) {
  9278. _broadcast.call(this, componentName, eventName, params);
  9279. }
  9280. }
  9281. };
  9282. exports.default = _default;
  9283. /***/ }),
  9284. /***/ 36:
  9285. /*!********************************************************!*\
  9286. !*** D:/IdeaProjects/zdsz_WeChatApplet/common/http.js ***!
  9287. \********************************************************/
  9288. /*! no static exports found */
  9289. /***/ (function(module, exports, __webpack_require__) {
  9290. "use strict";
  9291. Object.defineProperty(exports, "__esModule", {
  9292. value: true
  9293. });
  9294. exports.default = void 0;
  9295. // 配置信息
  9296. var _default = {
  9297. // webUrl: 'http://127.0.0.1:8080',
  9298. //webUrl: 'https://cczdsz.com/prod-api/',
  9299. // webUrl: 'http://192.168.0.129:8080',
  9300. webUrl: 'http://192.168.4.20:8080'
  9301. };
  9302. exports.default = _default;
  9303. /***/ }),
  9304. /***/ 37:
  9305. /*!******************************************************!*\
  9306. !*** D:/IdeaProjects/zdsz_WeChatApplet/api/login.js ***!
  9307. \******************************************************/
  9308. /*! no static exports found */
  9309. /***/ (function(module, exports, __webpack_require__) {
  9310. "use strict";
  9311. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  9312. Object.defineProperty(exports, "__esModule", {
  9313. value: true
  9314. });
  9315. exports.default = void 0;
  9316. var _request = _interopRequireDefault(__webpack_require__(/*! ../common/request.js */ 35));
  9317. var _default = {
  9318. // 登录
  9319. login: function login(data) {
  9320. return _request.default.requestEn('/mobile/user', data, 'POST');
  9321. }
  9322. };
  9323. exports.default = _default;
  9324. /***/ }),
  9325. /***/ 38:
  9326. /*!*********************************************************!*\
  9327. !*** D:/IdeaProjects/zdsz_WeChatApplet/common/utils.js ***!
  9328. \*********************************************************/
  9329. /*! no static exports found */
  9330. /***/ (function(module, exports, __webpack_require__) {
  9331. "use strict";
  9332. /* WEBPACK VAR INJECTION */(function(uni) {
  9333. Object.defineProperty(exports, "__esModule", {
  9334. value: true
  9335. });
  9336. exports.default = void 0;
  9337. var _default = {
  9338. // 页面提示信息函数
  9339. showPrompt: function showPrompt(msg) {
  9340. uni.showToast({
  9341. title: msg,
  9342. icon: 'none',
  9343. mask: true
  9344. });
  9345. },
  9346. // APP名称
  9347. appName: function appName() {
  9348. return "贞达市政工程";
  9349. },
  9350. formatRichText: function formatRichText(html) {
  9351. var newContent = html.replace(/<img[^>]*>/gi, function (match, capture) {
  9352. match = match.replace(/style="[^"]+"/gi, '').replace(/style='[^']+'/gi, '');
  9353. match = match.replace(/width="[^"]+"/gi, '').replace(/width='[^']+'/gi, '');
  9354. match = match.replace(/height="[^"]+"/gi, '').replace(/height='[^']+'/gi, '');
  9355. return match;
  9356. });
  9357. newContent = newContent.replace(/style="[^"]+"/gi, function (match, capture) {
  9358. match = match.replace(/width:[^;]+;/gi, 'max-width:100%;').replace(/width:[^;]+;/gi, 'max-width:100%;');
  9359. return match;
  9360. });
  9361. newContent = newContent.replace(/<br[^>]*\/>/gi, '');
  9362. newContent = newContent.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:block;margin-top:0;margin-bottom:0;"');
  9363. return newContent;
  9364. },
  9365. getHeight: function getHeight(e) {
  9366. console.log(e);
  9367. },
  9368. changeTwoDecimal_f: function changeTwoDecimal_f(x) {
  9369. var f_x = parseFloat(x);
  9370. if (isNaN(f_x)) {
  9371. return 0;
  9372. }
  9373. var f_x = Math.round(x * 100) / 100;
  9374. var s_x = f_x.toString();
  9375. var pos_decimal = s_x.indexOf('.');
  9376. if (pos_decimal < 0) {
  9377. pos_decimal = s_x.length;
  9378. s_x += '.';
  9379. }
  9380. while (s_x.length <= pos_decimal + 2) {
  9381. s_x += '0';
  9382. }
  9383. return s_x;
  9384. },
  9385. // token过期
  9386. tokenOverdue: function tokenOverdue() {
  9387. uni.setStorage({
  9388. key: "jumpUrl",
  9389. data: ''
  9390. });
  9391. uni.setStorage({
  9392. key: "jumpType",
  9393. data: ''
  9394. });
  9395. uni.navigateTo({
  9396. url: "/pages/login/login"
  9397. });
  9398. },
  9399. checkLoginTo: function checkLoginTo(url, type) {
  9400. console.log(type);
  9401. var status = uni.getStorageSync('token');
  9402. console.log(status);
  9403. if (status) {
  9404. uni.navigateTo({
  9405. url: url
  9406. });
  9407. } else {
  9408. uni.showModal({
  9409. title: '',
  9410. content: '您未登录,是否登录?',
  9411. success: function success(res) {
  9412. if (res.confirm) {
  9413. uni.setStorage({
  9414. key: "jumpUrl",
  9415. data: url
  9416. });
  9417. uni.setStorage({
  9418. key: "jumpType",
  9419. data: type
  9420. });
  9421. uni.navigateTo({
  9422. url: "/pages/login/login"
  9423. });
  9424. }
  9425. }
  9426. });
  9427. }
  9428. },
  9429. // 拨打电话
  9430. toCall: function toCall(tel) {
  9431. if (!tel) {
  9432. this.showPrompt('暂无商家电话');
  9433. return;
  9434. }
  9435. uni.makePhoneCall({
  9436. phoneNumber: tel
  9437. });
  9438. },
  9439. toBack: function toBack() {
  9440. uni.navigateBack({
  9441. delta: 1
  9442. });
  9443. },
  9444. // 图片预览
  9445. previewImage: function previewImage(url) {
  9446. var urlList = [];
  9447. if (typeof url == 'string') {
  9448. urlList.push(url);
  9449. } else {
  9450. urlList = url;
  9451. }
  9452. uni.previewImage({
  9453. urls: urlList
  9454. });
  9455. },
  9456. // 登录成功后的跳转
  9457. loginSuccess: function loginSuccess() {
  9458. var type = uni.getStorageSync('jumpType');
  9459. // console.log(type)
  9460. if (type) {
  9461. var url = uni.getStorageSync('jumpUrl');
  9462. // console.log(url)
  9463. if (!url) {
  9464. uni.navigateBack({
  9465. delta: 1
  9466. });
  9467. return;
  9468. }
  9469. if (type == 'page') {
  9470. uni.redirectTo({
  9471. url: url
  9472. });
  9473. } else {
  9474. uni.switchTab({
  9475. url: url,
  9476. fail: function fail(error) {
  9477. console.log(error);
  9478. }
  9479. });
  9480. }
  9481. } else {
  9482. // uni.switchTab({
  9483. // url: "/pages/index/index"
  9484. // })
  9485. uni.navigateBack({
  9486. delta: 1
  9487. });
  9488. }
  9489. },
  9490. parseNumber: function parseNumber(num) {
  9491. return num < 10 ? "0" + num : num;
  9492. },
  9493. // 时间格式化基类
  9494. dateFormat: function dateFormat(date, formatStr) {
  9495. var dateObj = {},
  9496. rStr = /\{([^}]+)\}/,
  9497. mons = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'];
  9498. dateObj["Y"] = date.getFullYear();
  9499. dateObj["M"] = date.getMonth() + 1;
  9500. dateObj["MM"] = this.parseNumber(dateObj["M"]);
  9501. dateObj["Mon"] = mons[dateObj['M'] - 1];
  9502. dateObj["D"] = date.getDate();
  9503. dateObj["DD"] = this.parseNumber(dateObj["D"]);
  9504. dateObj["h"] = date.getHours();
  9505. dateObj["hh"] = this.parseNumber(dateObj["h"]);
  9506. // dateObj["t"] = dateObj["h"] > 12 ? dateObj["h"] - 12 : dateObj["h"];
  9507. dateObj["t"] = dateObj["h"];
  9508. dateObj["tt"] = this.parseNumber(dateObj["t"]);
  9509. // dateObj["A"] = dateObj["h"] > 12 ? '下午' : '上午';
  9510. dateObj["i"] = date.getMinutes();
  9511. dateObj["ii"] = this.parseNumber(dateObj["i"]);
  9512. dateObj["s"] = date.getSeconds();
  9513. dateObj["ss"] = this.parseNumber(dateObj["s"]);
  9514. while (rStr.test(formatStr)) {
  9515. formatStr = formatStr.replace(rStr, dateObj[RegExp.$1]);
  9516. }
  9517. return formatStr;
  9518. },
  9519. // 时间格式 年月日时分秒
  9520. gettime: function gettime(shorttime, type) {
  9521. shorttime = shorttime.toString().length < 13 ? shorttime * 1000 : shorttime;
  9522. var now = new Date().getTime();
  9523. var cha = (now - parseInt(shorttime)) / 1000;
  9524. // type: 格式化类型 1为年月日时分秒 2为年月日时分 3为年月日
  9525. if (type == 1) {
  9526. return this.dateFormat(new Date(shorttime), "{Y}-{MM}-{DD} {t}:{ii}:{ss}");
  9527. } else if (type == 2) {
  9528. return this.dateFormat(new Date(shorttime), "{Y}-{MM}-{DD} {t}:{ii}");
  9529. } else if (type == 3) {
  9530. return this.dateFormat(new Date(shorttime), "{Y}-{MM}-{DD}");
  9531. }
  9532. },
  9533. // 时间格式 年月日
  9534. getDate: function getDate(shorttime) {
  9535. shorttime = shorttime.toString().length < 13 ? shorttime * 1000 : shorttime;
  9536. var now = new Date().getTime();
  9537. var cha = (now - parseInt(shorttime)) / 1000;
  9538. return this.dateFormat(new Date(shorttime), "{Y}-{MM}-{DD}");
  9539. },
  9540. // 时间格式 月日
  9541. getDateMd: function getDateMd(shorttime) {
  9542. shorttime = shorttime.toString().length < 13 ? shorttime * 1000 : shorttime;
  9543. var now = new Date().getTime();
  9544. var cha = (now - parseInt(shorttime)) / 1000;
  9545. return this.dateFormat(new Date(shorttime), "{MM}-{DD}");
  9546. },
  9547. getSevenDate: function getSevenDate(num) {
  9548. var date1 = new Date();
  9549. //今天时间
  9550. var time1 = (date1.getMonth() + 1 < 10 ? '0' + (date1.getMonth() + 1).toString() : date1.getMonth() + 1) + "-" + (date1.getDate() < 10 ? '0' + date1.getDate().toString() : date1.getDate());
  9551. var date2 = new Date(date1);
  9552. date2.setDate(date1.getDate() + num);
  9553. //num是正数表示之后的时间,num负数表示之前的时间,0表示今天
  9554. var time2 = date2.getMonth() + 1 + "-" + date2.getDate();
  9555. return this.getdiffdate(time1, time2, num);
  9556. },
  9557. //获取两日期之间日期列表函数
  9558. getdiffdate: function getdiffdate(stime, etime, num) {
  9559. //初始化日期列表,数组
  9560. var diffdate = new Array();
  9561. var i = 0;
  9562. //开始日期小于等于结束日期,并循环
  9563. while (i <= num - 1) {
  9564. diffdate.push({
  9565. dateStr: stime,
  9566. weekStr: this.getWeek(new Date().getFullYear().toString() + "-" + stime)
  9567. });
  9568. //获取开始日期时间戳
  9569. var stime_ts = new Date(stime).getTime();
  9570. // console.log('当前日期:'+stime +'当前时间戳:'+stime_ts)
  9571. //增加一天时间戳后的日期
  9572. var next_date = stime_ts + 24 * 60 * 60 * 1000;
  9573. //拼接年月日,这里的月份会返回(0-11),所以要+1
  9574. var next_dates_y = new Date(next_date).getFullYear() + '-';
  9575. var next_dates_m = new Date(next_date).getMonth() + 1 < 10 ? '0' + (new Date(next_date).getMonth() + 1) + '-' : new Date(next_date).getMonth() + 1 + '-';
  9576. var next_dates_d = new Date(next_date).getDate() < 10 ? '0' + new Date(next_date).getDate() : new Date(next_date).getDate();
  9577. stime = next_dates_m + next_dates_d;
  9578. // 增加数组key
  9579. i++;
  9580. }
  9581. return diffdate;
  9582. },
  9583. // 根据日期转换星期
  9584. getWeek: function getWeek(dateString) {
  9585. var dateArray = dateString.split("-");
  9586. var date = new Date(dateArray[0], parseInt(dateArray[1] - 1), dateArray[2]);
  9587. return "周" + "日一二三四五六".charAt(date.getDay());
  9588. },
  9589. // 获取当前位置
  9590. getNowAddress: function getNowAddress() {
  9591. console.log(222);
  9592. return new Promise(function (resolve, reject) {
  9593. var mapkey = '';
  9594. mapkey = 'c827c04d1d74d8589ec826fce02a135a';
  9595. console.log(mapkey);
  9596. var amapPlugin = new amap.AMapWX({
  9597. key: mapkey
  9598. });
  9599. amapPlugin.getRegeo({
  9600. success: function success(res) {
  9601. resolve(res[0]);
  9602. },
  9603. fail: function fail(error) {
  9604. console.log(error);
  9605. uni.showToast({
  9606. mask: true,
  9607. icon: "none",
  9608. title: error
  9609. });
  9610. }
  9611. });
  9612. });
  9613. }
  9614. };
  9615. exports.default = _default;
  9616. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  9617. /***/ }),
  9618. /***/ 380:
  9619. /*!*******************************************************************************!*\
  9620. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/libs/util/async-validator.js ***!
  9621. \*******************************************************************************/
  9622. /*! no static exports found */
  9623. /***/ (function(module, exports, __webpack_require__) {
  9624. "use strict";
  9625. /* WEBPACK VAR INJECTION */(function(process) {
  9626. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  9627. Object.defineProperty(exports, "__esModule", {
  9628. value: true
  9629. });
  9630. exports.default = void 0;
  9631. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  9632. function _extends() {
  9633. _extends = Object.assign || function (target) {
  9634. for (var i = 1; i < arguments.length; i++) {
  9635. var source = arguments[i];
  9636. for (var key in source) {
  9637. if (Object.prototype.hasOwnProperty.call(source, key)) {
  9638. target[key] = source[key];
  9639. }
  9640. }
  9641. }
  9642. return target;
  9643. };
  9644. return _extends.apply(this, arguments);
  9645. }
  9646. /* eslint no-console:0 */
  9647. var formatRegExp = /%[sdj%]/g;
  9648. var warning = function warning() {}; // don't print warning message when in production env or node runtime
  9649. 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') {
  9650. warning = function warning(type, errors) {
  9651. if (typeof console !== 'undefined' && console.warn) {
  9652. if (errors.every(function (e) {
  9653. return typeof e === 'string';
  9654. })) {
  9655. console.warn(type, errors);
  9656. }
  9657. }
  9658. };
  9659. }
  9660. function convertFieldsError(errors) {
  9661. if (!errors || !errors.length) return null;
  9662. var fields = {};
  9663. errors.forEach(function (error) {
  9664. var field = error.field;
  9665. fields[field] = fields[field] || [];
  9666. fields[field].push(error);
  9667. });
  9668. return fields;
  9669. }
  9670. function format() {
  9671. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  9672. args[_key] = arguments[_key];
  9673. }
  9674. var i = 1;
  9675. var f = args[0];
  9676. var len = args.length;
  9677. if (typeof f === 'function') {
  9678. return f.apply(null, args.slice(1));
  9679. }
  9680. if (typeof f === 'string') {
  9681. var str = String(f).replace(formatRegExp, function (x) {
  9682. if (x === '%%') {
  9683. return '%';
  9684. }
  9685. if (i >= len) {
  9686. return x;
  9687. }
  9688. switch (x) {
  9689. case '%s':
  9690. return String(args[i++]);
  9691. case '%d':
  9692. return Number(args[i++]);
  9693. case '%j':
  9694. try {
  9695. return JSON.stringify(args[i++]);
  9696. } catch (_) {
  9697. return '[Circular]';
  9698. }
  9699. break;
  9700. default:
  9701. return x;
  9702. }
  9703. });
  9704. for (var arg = args[i]; i < len; arg = args[++i]) {
  9705. str += " " + arg;
  9706. }
  9707. return str;
  9708. }
  9709. return f;
  9710. }
  9711. function isNativeStringType(type) {
  9712. return type === 'string' || type === 'url' || type === 'hex' || type === 'email' || type === 'pattern';
  9713. }
  9714. function isEmptyValue(value, type) {
  9715. if (value === undefined || value === null) {
  9716. return true;
  9717. }
  9718. if (type === 'array' && Array.isArray(value) && !value.length) {
  9719. return true;
  9720. }
  9721. if (isNativeStringType(type) && typeof value === 'string' && !value) {
  9722. return true;
  9723. }
  9724. return false;
  9725. }
  9726. function asyncParallelArray(arr, func, callback) {
  9727. var results = [];
  9728. var total = 0;
  9729. var arrLength = arr.length;
  9730. function count(errors) {
  9731. results.push.apply(results, errors);
  9732. total++;
  9733. if (total === arrLength) {
  9734. callback(results);
  9735. }
  9736. }
  9737. arr.forEach(function (a) {
  9738. func(a, count);
  9739. });
  9740. }
  9741. function asyncSerialArray(arr, func, callback) {
  9742. var index = 0;
  9743. var arrLength = arr.length;
  9744. function next(errors) {
  9745. if (errors && errors.length) {
  9746. callback(errors);
  9747. return;
  9748. }
  9749. var original = index;
  9750. index = index + 1;
  9751. if (original < arrLength) {
  9752. func(arr[original], next);
  9753. } else {
  9754. callback([]);
  9755. }
  9756. }
  9757. next([]);
  9758. }
  9759. function flattenObjArr(objArr) {
  9760. var ret = [];
  9761. Object.keys(objArr).forEach(function (k) {
  9762. ret.push.apply(ret, objArr[k]);
  9763. });
  9764. return ret;
  9765. }
  9766. function asyncMap(objArr, option, func, callback) {
  9767. if (option.first) {
  9768. var _pending = new Promise(function (resolve, reject) {
  9769. var next = function next(errors) {
  9770. callback(errors);
  9771. return errors.length ? reject({
  9772. errors: errors,
  9773. fields: convertFieldsError(errors)
  9774. }) : resolve();
  9775. };
  9776. var flattenArr = flattenObjArr(objArr);
  9777. asyncSerialArray(flattenArr, func, next);
  9778. });
  9779. _pending["catch"](function (e) {
  9780. return e;
  9781. });
  9782. return _pending;
  9783. }
  9784. var firstFields = option.firstFields || [];
  9785. if (firstFields === true) {
  9786. firstFields = Object.keys(objArr);
  9787. }
  9788. var objArrKeys = Object.keys(objArr);
  9789. var objArrLength = objArrKeys.length;
  9790. var total = 0;
  9791. var results = [];
  9792. var pending = new Promise(function (resolve, reject) {
  9793. var next = function next(errors) {
  9794. results.push.apply(results, errors);
  9795. total++;
  9796. if (total === objArrLength) {
  9797. callback(results);
  9798. return results.length ? reject({
  9799. errors: results,
  9800. fields: convertFieldsError(results)
  9801. }) : resolve();
  9802. }
  9803. };
  9804. if (!objArrKeys.length) {
  9805. callback(results);
  9806. resolve();
  9807. }
  9808. objArrKeys.forEach(function (key) {
  9809. var arr = objArr[key];
  9810. if (firstFields.indexOf(key) !== -1) {
  9811. asyncSerialArray(arr, func, next);
  9812. } else {
  9813. asyncParallelArray(arr, func, next);
  9814. }
  9815. });
  9816. });
  9817. pending["catch"](function (e) {
  9818. return e;
  9819. });
  9820. return pending;
  9821. }
  9822. function complementError(rule) {
  9823. return function (oe) {
  9824. if (oe && oe.message) {
  9825. oe.field = oe.field || rule.fullField;
  9826. return oe;
  9827. }
  9828. return {
  9829. message: typeof oe === 'function' ? oe() : oe,
  9830. field: oe.field || rule.fullField
  9831. };
  9832. };
  9833. }
  9834. function deepMerge(target, source) {
  9835. if (source) {
  9836. for (var s in source) {
  9837. if (source.hasOwnProperty(s)) {
  9838. var value = source[s];
  9839. if ((0, _typeof2.default)(value) === 'object' && (0, _typeof2.default)(target[s]) === 'object') {
  9840. target[s] = _extends({}, target[s], {}, value);
  9841. } else {
  9842. target[s] = value;
  9843. }
  9844. }
  9845. }
  9846. }
  9847. return target;
  9848. }
  9849. /**
  9850. * Rule for validating required fields.
  9851. *
  9852. * @param rule The validation rule.
  9853. * @param value The value of the field on the source object.
  9854. * @param source The source object being validated.
  9855. * @param errors An array of errors that this rule may add
  9856. * validation errors to.
  9857. * @param options The validation options.
  9858. * @param options.messages The validation messages.
  9859. */
  9860. function required(rule, value, source, errors, options, type) {
  9861. if (rule.required && (!source.hasOwnProperty(rule.field) || isEmptyValue(value, type || rule.type))) {
  9862. errors.push(format(options.messages.required, rule.fullField));
  9863. }
  9864. }
  9865. /**
  9866. * Rule for validating whitespace.
  9867. *
  9868. * @param rule The validation rule.
  9869. * @param value The value of the field on the source object.
  9870. * @param source The source object being validated.
  9871. * @param errors An array of errors that this rule may add
  9872. * validation errors to.
  9873. * @param options The validation options.
  9874. * @param options.messages The validation messages.
  9875. */
  9876. function whitespace(rule, value, source, errors, options) {
  9877. if (/^\s+$/.test(value) || value === '') {
  9878. errors.push(format(options.messages.whitespace, rule.fullField));
  9879. }
  9880. }
  9881. /* eslint max-len:0 */
  9882. var pattern = {
  9883. // http://emailregex.com/
  9884. 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,}))$/,
  9885. 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'),
  9886. hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
  9887. };
  9888. var types = {
  9889. integer: function integer(value) {
  9890. return types.number(value) && parseInt(value, 10) === value;
  9891. },
  9892. "float": function float(value) {
  9893. return types.number(value) && !types.integer(value);
  9894. },
  9895. array: function array(value) {
  9896. return Array.isArray(value);
  9897. },
  9898. regexp: function regexp(value) {
  9899. if (value instanceof RegExp) {
  9900. return true;
  9901. }
  9902. try {
  9903. return !!new RegExp(value);
  9904. } catch (e) {
  9905. return false;
  9906. }
  9907. },
  9908. date: function date(value) {
  9909. return typeof value.getTime === 'function' && typeof value.getMonth === 'function' && typeof value.getYear === 'function';
  9910. },
  9911. number: function number(value) {
  9912. if (isNaN(value)) {
  9913. return false;
  9914. }
  9915. // 修改源码,将字符串数值先转为数值
  9916. return typeof +value === 'number';
  9917. },
  9918. object: function object(value) {
  9919. return (0, _typeof2.default)(value) === 'object' && !types.array(value);
  9920. },
  9921. method: function method(value) {
  9922. return typeof value === 'function';
  9923. },
  9924. email: function email(value) {
  9925. return typeof value === 'string' && !!value.match(pattern.email) && value.length < 255;
  9926. },
  9927. url: function url(value) {
  9928. return typeof value === 'string' && !!value.match(pattern.url);
  9929. },
  9930. hex: function hex(value) {
  9931. return typeof value === 'string' && !!value.match(pattern.hex);
  9932. }
  9933. };
  9934. /**
  9935. * Rule for validating the type of a value.
  9936. *
  9937. * @param rule The validation rule.
  9938. * @param value The value of the field on the source object.
  9939. * @param source The source object being validated.
  9940. * @param errors An array of errors that this rule may add
  9941. * validation errors to.
  9942. * @param options The validation options.
  9943. * @param options.messages The validation messages.
  9944. */
  9945. function type(rule, value, source, errors, options) {
  9946. if (rule.required && value === undefined) {
  9947. required(rule, value, source, errors, options);
  9948. return;
  9949. }
  9950. var custom = ['integer', 'float', 'array', 'regexp', 'object', 'method', 'email', 'number', 'date', 'url', 'hex'];
  9951. var ruleType = rule.type;
  9952. if (custom.indexOf(ruleType) > -1) {
  9953. if (!types[ruleType](value)) {
  9954. errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
  9955. } // straight typeof check
  9956. } else if (ruleType && (0, _typeof2.default)(value) !== rule.type) {
  9957. errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
  9958. }
  9959. }
  9960. /**
  9961. * Rule for validating minimum and maximum allowed values.
  9962. *
  9963. * @param rule The validation rule.
  9964. * @param value The value of the field on the source object.
  9965. * @param source The source object being validated.
  9966. * @param errors An array of errors that this rule may add
  9967. * validation errors to.
  9968. * @param options The validation options.
  9969. * @param options.messages The validation messages.
  9970. */
  9971. function range(rule, value, source, errors, options) {
  9972. var len = typeof rule.len === 'number';
  9973. var min = typeof rule.min === 'number';
  9974. var max = typeof rule.max === 'number'; // 正则匹配码点范围从U+010000一直到U+10FFFF的文字(补充平面Supplementary Plane)
  9975. var spRegexp = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
  9976. var val = value;
  9977. var key = null;
  9978. var num = typeof value === 'number';
  9979. var str = typeof value === 'string';
  9980. var arr = Array.isArray(value);
  9981. if (num) {
  9982. key = 'number';
  9983. } else if (str) {
  9984. key = 'string';
  9985. } else if (arr) {
  9986. key = 'array';
  9987. } // if the value is not of a supported type for range validation
  9988. // the validation rule rule should use the
  9989. // type property to also test for a particular type
  9990. if (!key) {
  9991. return false;
  9992. }
  9993. if (arr) {
  9994. val = value.length;
  9995. }
  9996. if (str) {
  9997. // 处理码点大于U+010000的文字length属性不准确的bug,如"𠮷𠮷𠮷".length !== 3
  9998. val = value.replace(spRegexp, '_').length;
  9999. }
  10000. if (len) {
  10001. if (val !== rule.len) {
  10002. errors.push(format(options.messages[key].len, rule.fullField, rule.len));
  10003. }
  10004. } else if (min && !max && val < rule.min) {
  10005. errors.push(format(options.messages[key].min, rule.fullField, rule.min));
  10006. } else if (max && !min && val > rule.max) {
  10007. errors.push(format(options.messages[key].max, rule.fullField, rule.max));
  10008. } else if (min && max && (val < rule.min || val > rule.max)) {
  10009. errors.push(format(options.messages[key].range, rule.fullField, rule.min, rule.max));
  10010. }
  10011. }
  10012. var ENUM = 'enum';
  10013. /**
  10014. * Rule for validating a value exists in an enumerable list.
  10015. *
  10016. * @param rule The validation rule.
  10017. * @param value The value of the field on the source object.
  10018. * @param source The source object being validated.
  10019. * @param errors An array of errors that this rule may add
  10020. * validation errors to.
  10021. * @param options The validation options.
  10022. * @param options.messages The validation messages.
  10023. */
  10024. function enumerable(rule, value, source, errors, options) {
  10025. rule[ENUM] = Array.isArray(rule[ENUM]) ? rule[ENUM] : [];
  10026. if (rule[ENUM].indexOf(value) === -1) {
  10027. errors.push(format(options.messages[ENUM], rule.fullField, rule[ENUM].join(', ')));
  10028. }
  10029. }
  10030. /**
  10031. * Rule for validating a regular expression pattern.
  10032. *
  10033. * @param rule The validation rule.
  10034. * @param value The value of the field on the source object.
  10035. * @param source The source object being validated.
  10036. * @param errors An array of errors that this rule may add
  10037. * validation errors to.
  10038. * @param options The validation options.
  10039. * @param options.messages The validation messages.
  10040. */
  10041. function pattern$1(rule, value, source, errors, options) {
  10042. if (rule.pattern) {
  10043. if (rule.pattern instanceof RegExp) {
  10044. // if a RegExp instance is passed, reset `lastIndex` in case its `global`
  10045. // flag is accidentally set to `true`, which in a validation scenario
  10046. // is not necessary and the result might be misleading
  10047. rule.pattern.lastIndex = 0;
  10048. if (!rule.pattern.test(value)) {
  10049. errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
  10050. }
  10051. } else if (typeof rule.pattern === 'string') {
  10052. var _pattern = new RegExp(rule.pattern);
  10053. if (!_pattern.test(value)) {
  10054. errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
  10055. }
  10056. }
  10057. }
  10058. }
  10059. var rules = {
  10060. required: required,
  10061. whitespace: whitespace,
  10062. type: type,
  10063. range: range,
  10064. "enum": enumerable,
  10065. pattern: pattern$1
  10066. };
  10067. /**
  10068. * Performs validation for string types.
  10069. *
  10070. * @param rule The validation rule.
  10071. * @param value The value of the field on the source object.
  10072. * @param callback The callback function.
  10073. * @param source The source object being validated.
  10074. * @param options The validation options.
  10075. * @param options.messages The validation messages.
  10076. */
  10077. function string(rule, value, callback, source, options) {
  10078. var errors = [];
  10079. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10080. if (validate) {
  10081. if (isEmptyValue(value, 'string') && !rule.required) {
  10082. return callback();
  10083. }
  10084. rules.required(rule, value, source, errors, options, 'string');
  10085. if (!isEmptyValue(value, 'string')) {
  10086. rules.type(rule, value, source, errors, options);
  10087. rules.range(rule, value, source, errors, options);
  10088. rules.pattern(rule, value, source, errors, options);
  10089. if (rule.whitespace === true) {
  10090. rules.whitespace(rule, value, source, errors, options);
  10091. }
  10092. }
  10093. }
  10094. callback(errors);
  10095. }
  10096. /**
  10097. * Validates a function.
  10098. *
  10099. * @param rule The validation rule.
  10100. * @param value The value of the field on the source object.
  10101. * @param callback The callback function.
  10102. * @param source The source object being validated.
  10103. * @param options The validation options.
  10104. * @param options.messages The validation messages.
  10105. */
  10106. function method(rule, value, callback, source, options) {
  10107. var errors = [];
  10108. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10109. if (validate) {
  10110. if (isEmptyValue(value) && !rule.required) {
  10111. return callback();
  10112. }
  10113. rules.required(rule, value, source, errors, options);
  10114. if (value !== undefined) {
  10115. rules.type(rule, value, source, errors, options);
  10116. }
  10117. }
  10118. callback(errors);
  10119. }
  10120. /**
  10121. * Validates a number.
  10122. *
  10123. * @param rule The validation rule.
  10124. * @param value The value of the field on the source object.
  10125. * @param callback The callback function.
  10126. * @param source The source object being validated.
  10127. * @param options The validation options.
  10128. * @param options.messages The validation messages.
  10129. */
  10130. function number(rule, value, callback, source, options) {
  10131. var errors = [];
  10132. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10133. if (validate) {
  10134. if (value === '') {
  10135. value = undefined;
  10136. }
  10137. if (isEmptyValue(value) && !rule.required) {
  10138. return callback();
  10139. }
  10140. rules.required(rule, value, source, errors, options);
  10141. if (value !== undefined) {
  10142. rules.type(rule, value, source, errors, options);
  10143. rules.range(rule, value, source, errors, options);
  10144. }
  10145. }
  10146. callback(errors);
  10147. }
  10148. /**
  10149. * Validates a boolean.
  10150. *
  10151. * @param rule The validation rule.
  10152. * @param value The value of the field on the source object.
  10153. * @param callback The callback function.
  10154. * @param source The source object being validated.
  10155. * @param options The validation options.
  10156. * @param options.messages The validation messages.
  10157. */
  10158. function _boolean(rule, value, callback, source, options) {
  10159. var errors = [];
  10160. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10161. if (validate) {
  10162. if (isEmptyValue(value) && !rule.required) {
  10163. return callback();
  10164. }
  10165. rules.required(rule, value, source, errors, options);
  10166. if (value !== undefined) {
  10167. rules.type(rule, value, source, errors, options);
  10168. }
  10169. }
  10170. callback(errors);
  10171. }
  10172. /**
  10173. * Validates the regular expression type.
  10174. *
  10175. * @param rule The validation rule.
  10176. * @param value The value of the field on the source object.
  10177. * @param callback The callback function.
  10178. * @param source The source object being validated.
  10179. * @param options The validation options.
  10180. * @param options.messages The validation messages.
  10181. */
  10182. function regexp(rule, value, callback, source, options) {
  10183. var errors = [];
  10184. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10185. if (validate) {
  10186. if (isEmptyValue(value) && !rule.required) {
  10187. return callback();
  10188. }
  10189. rules.required(rule, value, source, errors, options);
  10190. if (!isEmptyValue(value)) {
  10191. rules.type(rule, value, source, errors, options);
  10192. }
  10193. }
  10194. callback(errors);
  10195. }
  10196. /**
  10197. * Validates a number is an integer.
  10198. *
  10199. * @param rule The validation rule.
  10200. * @param value The value of the field on the source object.
  10201. * @param callback The callback function.
  10202. * @param source The source object being validated.
  10203. * @param options The validation options.
  10204. * @param options.messages The validation messages.
  10205. */
  10206. function integer(rule, value, callback, source, options) {
  10207. var errors = [];
  10208. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10209. if (validate) {
  10210. if (isEmptyValue(value) && !rule.required) {
  10211. return callback();
  10212. }
  10213. rules.required(rule, value, source, errors, options);
  10214. if (value !== undefined) {
  10215. rules.type(rule, value, source, errors, options);
  10216. rules.range(rule, value, source, errors, options);
  10217. }
  10218. }
  10219. callback(errors);
  10220. }
  10221. /**
  10222. * Validates a number is a floating point number.
  10223. *
  10224. * @param rule The validation rule.
  10225. * @param value The value of the field on the source object.
  10226. * @param callback The callback function.
  10227. * @param source The source object being validated.
  10228. * @param options The validation options.
  10229. * @param options.messages The validation messages.
  10230. */
  10231. function floatFn(rule, value, callback, source, options) {
  10232. var errors = [];
  10233. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10234. if (validate) {
  10235. if (isEmptyValue(value) && !rule.required) {
  10236. return callback();
  10237. }
  10238. rules.required(rule, value, source, errors, options);
  10239. if (value !== undefined) {
  10240. rules.type(rule, value, source, errors, options);
  10241. rules.range(rule, value, source, errors, options);
  10242. }
  10243. }
  10244. callback(errors);
  10245. }
  10246. /**
  10247. * Validates an array.
  10248. *
  10249. * @param rule The validation rule.
  10250. * @param value The value of the field on the source object.
  10251. * @param callback The callback function.
  10252. * @param source The source object being validated.
  10253. * @param options The validation options.
  10254. * @param options.messages The validation messages.
  10255. */
  10256. function array(rule, value, callback, source, options) {
  10257. var errors = [];
  10258. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10259. if (validate) {
  10260. if (isEmptyValue(value, 'array') && !rule.required) {
  10261. return callback();
  10262. }
  10263. rules.required(rule, value, source, errors, options, 'array');
  10264. if (!isEmptyValue(value, 'array')) {
  10265. rules.type(rule, value, source, errors, options);
  10266. rules.range(rule, value, source, errors, options);
  10267. }
  10268. }
  10269. callback(errors);
  10270. }
  10271. /**
  10272. * Validates an object.
  10273. *
  10274. * @param rule The validation rule.
  10275. * @param value The value of the field on the source object.
  10276. * @param callback The callback function.
  10277. * @param source The source object being validated.
  10278. * @param options The validation options.
  10279. * @param options.messages The validation messages.
  10280. */
  10281. function object(rule, value, callback, source, options) {
  10282. var errors = [];
  10283. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10284. if (validate) {
  10285. if (isEmptyValue(value) && !rule.required) {
  10286. return callback();
  10287. }
  10288. rules.required(rule, value, source, errors, options);
  10289. if (value !== undefined) {
  10290. rules.type(rule, value, source, errors, options);
  10291. }
  10292. }
  10293. callback(errors);
  10294. }
  10295. var ENUM$1 = 'enum';
  10296. /**
  10297. * Validates an enumerable list.
  10298. *
  10299. * @param rule The validation rule.
  10300. * @param value The value of the field on the source object.
  10301. * @param callback The callback function.
  10302. * @param source The source object being validated.
  10303. * @param options The validation options.
  10304. * @param options.messages The validation messages.
  10305. */
  10306. function enumerable$1(rule, value, callback, source, options) {
  10307. var errors = [];
  10308. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10309. if (validate) {
  10310. if (isEmptyValue(value) && !rule.required) {
  10311. return callback();
  10312. }
  10313. rules.required(rule, value, source, errors, options);
  10314. if (value !== undefined) {
  10315. rules[ENUM$1](rule, value, source, errors, options);
  10316. }
  10317. }
  10318. callback(errors);
  10319. }
  10320. /**
  10321. * Validates a regular expression pattern.
  10322. *
  10323. * Performs validation when a rule only contains
  10324. * a pattern property but is not declared as a string type.
  10325. *
  10326. * @param rule The validation rule.
  10327. * @param value The value of the field on the source object.
  10328. * @param callback The callback function.
  10329. * @param source The source object being validated.
  10330. * @param options The validation options.
  10331. * @param options.messages The validation messages.
  10332. */
  10333. function pattern$2(rule, value, callback, source, options) {
  10334. var errors = [];
  10335. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10336. if (validate) {
  10337. if (isEmptyValue(value, 'string') && !rule.required) {
  10338. return callback();
  10339. }
  10340. rules.required(rule, value, source, errors, options);
  10341. if (!isEmptyValue(value, 'string')) {
  10342. rules.pattern(rule, value, source, errors, options);
  10343. }
  10344. }
  10345. callback(errors);
  10346. }
  10347. function date(rule, value, callback, source, options) {
  10348. var errors = [];
  10349. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10350. if (validate) {
  10351. if (isEmptyValue(value) && !rule.required) {
  10352. return callback();
  10353. }
  10354. rules.required(rule, value, source, errors, options);
  10355. if (!isEmptyValue(value)) {
  10356. var dateObject;
  10357. if (typeof value === 'number') {
  10358. dateObject = new Date(value);
  10359. } else {
  10360. dateObject = value;
  10361. }
  10362. rules.type(rule, dateObject, source, errors, options);
  10363. if (dateObject) {
  10364. rules.range(rule, dateObject.getTime(), source, errors, options);
  10365. }
  10366. }
  10367. }
  10368. callback(errors);
  10369. }
  10370. function required$1(rule, value, callback, source, options) {
  10371. var errors = [];
  10372. var type = Array.isArray(value) ? 'array' : (0, _typeof2.default)(value);
  10373. rules.required(rule, value, source, errors, options, type);
  10374. callback(errors);
  10375. }
  10376. function type$1(rule, value, callback, source, options) {
  10377. var ruleType = rule.type;
  10378. var errors = [];
  10379. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10380. if (validate) {
  10381. if (isEmptyValue(value, ruleType) && !rule.required) {
  10382. return callback();
  10383. }
  10384. rules.required(rule, value, source, errors, options, ruleType);
  10385. if (!isEmptyValue(value, ruleType)) {
  10386. rules.type(rule, value, source, errors, options);
  10387. }
  10388. }
  10389. callback(errors);
  10390. }
  10391. /**
  10392. * Performs validation for any type.
  10393. *
  10394. * @param rule The validation rule.
  10395. * @param value The value of the field on the source object.
  10396. * @param callback The callback function.
  10397. * @param source The source object being validated.
  10398. * @param options The validation options.
  10399. * @param options.messages The validation messages.
  10400. */
  10401. function any(rule, value, callback, source, options) {
  10402. var errors = [];
  10403. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10404. if (validate) {
  10405. if (isEmptyValue(value) && !rule.required) {
  10406. return callback();
  10407. }
  10408. rules.required(rule, value, source, errors, options);
  10409. }
  10410. callback(errors);
  10411. }
  10412. var validators = {
  10413. string: string,
  10414. method: method,
  10415. number: number,
  10416. "boolean": _boolean,
  10417. regexp: regexp,
  10418. integer: integer,
  10419. "float": floatFn,
  10420. array: array,
  10421. object: object,
  10422. "enum": enumerable$1,
  10423. pattern: pattern$2,
  10424. date: date,
  10425. url: type$1,
  10426. hex: type$1,
  10427. email: type$1,
  10428. required: required$1,
  10429. any: any
  10430. };
  10431. function newMessages() {
  10432. return {
  10433. "default": 'Validation error on field %s',
  10434. required: '%s is required',
  10435. "enum": '%s must be one of %s',
  10436. whitespace: '%s cannot be empty',
  10437. date: {
  10438. format: '%s date %s is invalid for format %s',
  10439. parse: '%s date could not be parsed, %s is invalid ',
  10440. invalid: '%s date %s is invalid'
  10441. },
  10442. types: {
  10443. string: '%s is not a %s',
  10444. method: '%s is not a %s (function)',
  10445. array: '%s is not an %s',
  10446. object: '%s is not an %s',
  10447. number: '%s is not a %s',
  10448. date: '%s is not a %s',
  10449. "boolean": '%s is not a %s',
  10450. integer: '%s is not an %s',
  10451. "float": '%s is not a %s',
  10452. regexp: '%s is not a valid %s',
  10453. email: '%s is not a valid %s',
  10454. url: '%s is not a valid %s',
  10455. hex: '%s is not a valid %s'
  10456. },
  10457. string: {
  10458. len: '%s must be exactly %s characters',
  10459. min: '%s must be at least %s characters',
  10460. max: '%s cannot be longer than %s characters',
  10461. range: '%s must be between %s and %s characters'
  10462. },
  10463. number: {
  10464. len: '%s must equal %s',
  10465. min: '%s cannot be less than %s',
  10466. max: '%s cannot be greater than %s',
  10467. range: '%s must be between %s and %s'
  10468. },
  10469. array: {
  10470. len: '%s must be exactly %s in length',
  10471. min: '%s cannot be less than %s in length',
  10472. max: '%s cannot be greater than %s in length',
  10473. range: '%s must be between %s and %s in length'
  10474. },
  10475. pattern: {
  10476. mismatch: '%s value %s does not match pattern %s'
  10477. },
  10478. clone: function clone() {
  10479. var cloned = JSON.parse(JSON.stringify(this));
  10480. cloned.clone = this.clone;
  10481. return cloned;
  10482. }
  10483. };
  10484. }
  10485. var messages = newMessages();
  10486. /**
  10487. * Encapsulates a validation schema.
  10488. *
  10489. * @param descriptor An object declaring validation rules
  10490. * for this schema.
  10491. */
  10492. function Schema(descriptor) {
  10493. this.rules = null;
  10494. this._messages = messages;
  10495. this.define(descriptor);
  10496. }
  10497. Schema.prototype = {
  10498. messages: function messages(_messages) {
  10499. if (_messages) {
  10500. this._messages = deepMerge(newMessages(), _messages);
  10501. }
  10502. return this._messages;
  10503. },
  10504. define: function define(rules) {
  10505. if (!rules) {
  10506. throw new Error('Cannot configure a schema with no rules');
  10507. }
  10508. if ((0, _typeof2.default)(rules) !== 'object' || Array.isArray(rules)) {
  10509. throw new Error('Rules must be an object');
  10510. }
  10511. this.rules = {};
  10512. var z;
  10513. var item;
  10514. for (z in rules) {
  10515. if (rules.hasOwnProperty(z)) {
  10516. item = rules[z];
  10517. this.rules[z] = Array.isArray(item) ? item : [item];
  10518. }
  10519. }
  10520. },
  10521. validate: function validate(source_, o, oc) {
  10522. var _this = this;
  10523. if (o === void 0) {
  10524. o = {};
  10525. }
  10526. if (oc === void 0) {
  10527. oc = function oc() {};
  10528. }
  10529. var source = source_;
  10530. var options = o;
  10531. var callback = oc;
  10532. if (typeof options === 'function') {
  10533. callback = options;
  10534. options = {};
  10535. }
  10536. if (!this.rules || Object.keys(this.rules).length === 0) {
  10537. if (callback) {
  10538. callback();
  10539. }
  10540. return Promise.resolve();
  10541. }
  10542. function complete(results) {
  10543. var i;
  10544. var errors = [];
  10545. var fields = {};
  10546. function add(e) {
  10547. if (Array.isArray(e)) {
  10548. var _errors;
  10549. errors = (_errors = errors).concat.apply(_errors, e);
  10550. } else {
  10551. errors.push(e);
  10552. }
  10553. }
  10554. for (i = 0; i < results.length; i++) {
  10555. add(results[i]);
  10556. }
  10557. if (!errors.length) {
  10558. errors = null;
  10559. fields = null;
  10560. } else {
  10561. fields = convertFieldsError(errors);
  10562. }
  10563. callback(errors, fields);
  10564. }
  10565. if (options.messages) {
  10566. var messages$1 = this.messages();
  10567. if (messages$1 === messages) {
  10568. messages$1 = newMessages();
  10569. }
  10570. deepMerge(messages$1, options.messages);
  10571. options.messages = messages$1;
  10572. } else {
  10573. options.messages = this.messages();
  10574. }
  10575. var arr;
  10576. var value;
  10577. var series = {};
  10578. var keys = options.keys || Object.keys(this.rules);
  10579. keys.forEach(function (z) {
  10580. arr = _this.rules[z];
  10581. value = source[z];
  10582. arr.forEach(function (r) {
  10583. var rule = r;
  10584. if (typeof rule.transform === 'function') {
  10585. if (source === source_) {
  10586. source = _extends({}, source);
  10587. }
  10588. value = source[z] = rule.transform(value);
  10589. }
  10590. if (typeof rule === 'function') {
  10591. rule = {
  10592. validator: rule
  10593. };
  10594. } else {
  10595. rule = _extends({}, rule);
  10596. }
  10597. rule.validator = _this.getValidationMethod(rule);
  10598. rule.field = z;
  10599. rule.fullField = rule.fullField || z;
  10600. rule.type = _this.getType(rule);
  10601. if (!rule.validator) {
  10602. return;
  10603. }
  10604. series[z] = series[z] || [];
  10605. series[z].push({
  10606. rule: rule,
  10607. value: value,
  10608. source: source,
  10609. field: z
  10610. });
  10611. });
  10612. });
  10613. var errorFields = {};
  10614. return asyncMap(series, options, function (data, doIt) {
  10615. var rule = data.rule;
  10616. var deep = (rule.type === 'object' || rule.type === 'array') && ((0, _typeof2.default)(rule.fields) === 'object' || (0, _typeof2.default)(rule.defaultField) === 'object');
  10617. deep = deep && (rule.required || !rule.required && data.value);
  10618. rule.field = data.field;
  10619. function addFullfield(key, schema) {
  10620. return _extends({}, schema, {
  10621. fullField: rule.fullField + "." + key
  10622. });
  10623. }
  10624. function cb(e) {
  10625. if (e === void 0) {
  10626. e = [];
  10627. }
  10628. var errors = e;
  10629. if (!Array.isArray(errors)) {
  10630. errors = [errors];
  10631. }
  10632. if (!options.suppressWarning && errors.length) {
  10633. Schema.warning('async-validator:', errors);
  10634. }
  10635. if (errors.length && rule.message) {
  10636. errors = [].concat(rule.message);
  10637. }
  10638. errors = errors.map(complementError(rule));
  10639. if (options.first && errors.length) {
  10640. errorFields[rule.field] = 1;
  10641. return doIt(errors);
  10642. }
  10643. if (!deep) {
  10644. doIt(errors);
  10645. } else {
  10646. // if rule is required but the target object
  10647. // does not exist fail at the rule level and don't
  10648. // go deeper
  10649. if (rule.required && !data.value) {
  10650. if (rule.message) {
  10651. errors = [].concat(rule.message).map(complementError(rule));
  10652. } else if (options.error) {
  10653. errors = [options.error(rule, format(options.messages.required, rule.field))];
  10654. } else {
  10655. errors = [];
  10656. }
  10657. return doIt(errors);
  10658. }
  10659. var fieldsSchema = {};
  10660. if (rule.defaultField) {
  10661. for (var k in data.value) {
  10662. if (data.value.hasOwnProperty(k)) {
  10663. fieldsSchema[k] = rule.defaultField;
  10664. }
  10665. }
  10666. }
  10667. fieldsSchema = _extends({}, fieldsSchema, {}, data.rule.fields);
  10668. for (var f in fieldsSchema) {
  10669. if (fieldsSchema.hasOwnProperty(f)) {
  10670. var fieldSchema = Array.isArray(fieldsSchema[f]) ? fieldsSchema[f] : [fieldsSchema[f]];
  10671. fieldsSchema[f] = fieldSchema.map(addFullfield.bind(null, f));
  10672. }
  10673. }
  10674. var schema = new Schema(fieldsSchema);
  10675. schema.messages(options.messages);
  10676. if (data.rule.options) {
  10677. data.rule.options.messages = options.messages;
  10678. data.rule.options.error = options.error;
  10679. }
  10680. schema.validate(data.value, data.rule.options || options, function (errs) {
  10681. var finalErrors = [];
  10682. if (errors && errors.length) {
  10683. finalErrors.push.apply(finalErrors, errors);
  10684. }
  10685. if (errs && errs.length) {
  10686. finalErrors.push.apply(finalErrors, errs);
  10687. }
  10688. doIt(finalErrors.length ? finalErrors : null);
  10689. });
  10690. }
  10691. }
  10692. var res;
  10693. if (rule.asyncValidator) {
  10694. res = rule.asyncValidator(rule, data.value, cb, data.source, options);
  10695. } else if (rule.validator) {
  10696. res = rule.validator(rule, data.value, cb, data.source, options);
  10697. if (res === true) {
  10698. cb();
  10699. } else if (res === false) {
  10700. cb(rule.message || rule.field + " fails");
  10701. } else if (res instanceof Array) {
  10702. cb(res);
  10703. } else if (res instanceof Error) {
  10704. cb(res.message);
  10705. }
  10706. }
  10707. if (res && res.then) {
  10708. res.then(function () {
  10709. return cb();
  10710. }, function (e) {
  10711. return cb(e);
  10712. });
  10713. }
  10714. }, function (results) {
  10715. complete(results);
  10716. });
  10717. },
  10718. getType: function getType(rule) {
  10719. if (rule.type === undefined && rule.pattern instanceof RegExp) {
  10720. rule.type = 'pattern';
  10721. }
  10722. if (typeof rule.validator !== 'function' && rule.type && !validators.hasOwnProperty(rule.type)) {
  10723. throw new Error(format('Unknown rule type %s', rule.type));
  10724. }
  10725. return rule.type || 'string';
  10726. },
  10727. getValidationMethod: function getValidationMethod(rule) {
  10728. if (typeof rule.validator === 'function') {
  10729. return rule.validator;
  10730. }
  10731. var keys = Object.keys(rule);
  10732. var messageIndex = keys.indexOf('message');
  10733. if (messageIndex !== -1) {
  10734. keys.splice(messageIndex, 1);
  10735. }
  10736. if (keys.length === 1 && keys[0] === 'required') {
  10737. return validators.required;
  10738. }
  10739. return validators[this.getType(rule)] || false;
  10740. }
  10741. };
  10742. Schema.register = function register(type, validator) {
  10743. if (typeof validator !== 'function') {
  10744. throw new Error('Cannot register a validator by type, validator is not a function');
  10745. }
  10746. validators[type] = validator;
  10747. };
  10748. Schema.warning = warning;
  10749. Schema.messages = messages;
  10750. var _default = Schema;
  10751. exports.default = _default;
  10752. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../HBuilderX.3.8.12.20230817/HBuilderX/plugins/uniapp-cli/node_modules/node-libs-browser/mock/process.js */ 381)))
  10753. /***/ }),
  10754. /***/ 381:
  10755. /*!********************************************************!*\
  10756. !*** ./node_modules/node-libs-browser/mock/process.js ***!
  10757. \********************************************************/
  10758. /*! no static exports found */
  10759. /***/ (function(module, exports, __webpack_require__) {
  10760. exports.nextTick = function nextTick(fn) {
  10761. var args = Array.prototype.slice.call(arguments);
  10762. args.shift();
  10763. setTimeout(function () {
  10764. fn.apply(null, args);
  10765. }, 0);
  10766. };
  10767. exports.platform = exports.arch =
  10768. exports.execPath = exports.title = 'browser';
  10769. exports.pid = 1;
  10770. exports.browser = true;
  10771. exports.env = {};
  10772. exports.argv = [];
  10773. exports.binding = function (name) {
  10774. throw new Error('No such module. (Possibly not yet loaded)')
  10775. };
  10776. (function () {
  10777. var cwd = '/';
  10778. var path;
  10779. exports.cwd = function () { return cwd };
  10780. exports.chdir = function (dir) {
  10781. if (!path) path = __webpack_require__(/*! path */ 382);
  10782. cwd = path.resolve(dir, cwd);
  10783. };
  10784. })();
  10785. exports.exit = exports.kill =
  10786. exports.umask = exports.dlopen =
  10787. exports.uptime = exports.memoryUsage =
  10788. exports.uvCounters = function() {};
  10789. exports.features = {};
  10790. /***/ }),
  10791. /***/ 382:
  10792. /*!***********************************************!*\
  10793. !*** ./node_modules/path-browserify/index.js ***!
  10794. \***********************************************/
  10795. /*! no static exports found */
  10796. /***/ (function(module, exports, __webpack_require__) {
  10797. /* WEBPACK VAR INJECTION */(function(process) {// .dirname, .basename, and .extname methods are extracted from Node.js v8.11.1,
  10798. // backported and transplited with Babel, with backwards-compat fixes
  10799. // Copyright Joyent, Inc. and other Node contributors.
  10800. //
  10801. // Permission is hereby granted, free of charge, to any person obtaining a
  10802. // copy of this software and associated documentation files (the
  10803. // "Software"), to deal in the Software without restriction, including
  10804. // without limitation the rights to use, copy, modify, merge, publish,
  10805. // distribute, sublicense, and/or sell copies of the Software, and to permit
  10806. // persons to whom the Software is furnished to do so, subject to the
  10807. // following conditions:
  10808. //
  10809. // The above copyright notice and this permission notice shall be included
  10810. // in all copies or substantial portions of the Software.
  10811. //
  10812. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  10813. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  10814. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  10815. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  10816. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  10817. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  10818. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  10819. // resolves . and .. elements in a path array with directory names there
  10820. // must be no slashes, empty elements, or device names (c:\) in the array
  10821. // (so also no leading and trailing slashes - it does not distinguish
  10822. // relative and absolute paths)
  10823. function normalizeArray(parts, allowAboveRoot) {
  10824. // if the path tries to go above the root, `up` ends up > 0
  10825. var up = 0;
  10826. for (var i = parts.length - 1; i >= 0; i--) {
  10827. var last = parts[i];
  10828. if (last === '.') {
  10829. parts.splice(i, 1);
  10830. } else if (last === '..') {
  10831. parts.splice(i, 1);
  10832. up++;
  10833. } else if (up) {
  10834. parts.splice(i, 1);
  10835. up--;
  10836. }
  10837. }
  10838. // if the path is allowed to go above the root, restore leading ..s
  10839. if (allowAboveRoot) {
  10840. for (; up--; up) {
  10841. parts.unshift('..');
  10842. }
  10843. }
  10844. return parts;
  10845. }
  10846. // path.resolve([from ...], to)
  10847. // posix version
  10848. exports.resolve = function() {
  10849. var resolvedPath = '',
  10850. resolvedAbsolute = false;
  10851. for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
  10852. var path = (i >= 0) ? arguments[i] : process.cwd();
  10853. // Skip empty and invalid entries
  10854. if (typeof path !== 'string') {
  10855. throw new TypeError('Arguments to path.resolve must be strings');
  10856. } else if (!path) {
  10857. continue;
  10858. }
  10859. resolvedPath = path + '/' + resolvedPath;
  10860. resolvedAbsolute = path.charAt(0) === '/';
  10861. }
  10862. // At this point the path should be resolved to a full absolute path, but
  10863. // handle relative paths to be safe (might happen when process.cwd() fails)
  10864. // Normalize the path
  10865. resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {
  10866. return !!p;
  10867. }), !resolvedAbsolute).join('/');
  10868. return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';
  10869. };
  10870. // path.normalize(path)
  10871. // posix version
  10872. exports.normalize = function(path) {
  10873. var isAbsolute = exports.isAbsolute(path),
  10874. trailingSlash = substr(path, -1) === '/';
  10875. // Normalize the path
  10876. path = normalizeArray(filter(path.split('/'), function(p) {
  10877. return !!p;
  10878. }), !isAbsolute).join('/');
  10879. if (!path && !isAbsolute) {
  10880. path = '.';
  10881. }
  10882. if (path && trailingSlash) {
  10883. path += '/';
  10884. }
  10885. return (isAbsolute ? '/' : '') + path;
  10886. };
  10887. // posix version
  10888. exports.isAbsolute = function(path) {
  10889. return path.charAt(0) === '/';
  10890. };
  10891. // posix version
  10892. exports.join = function() {
  10893. var paths = Array.prototype.slice.call(arguments, 0);
  10894. return exports.normalize(filter(paths, function(p, index) {
  10895. if (typeof p !== 'string') {
  10896. throw new TypeError('Arguments to path.join must be strings');
  10897. }
  10898. return p;
  10899. }).join('/'));
  10900. };
  10901. // path.relative(from, to)
  10902. // posix version
  10903. exports.relative = function(from, to) {
  10904. from = exports.resolve(from).substr(1);
  10905. to = exports.resolve(to).substr(1);
  10906. function trim(arr) {
  10907. var start = 0;
  10908. for (; start < arr.length; start++) {
  10909. if (arr[start] !== '') break;
  10910. }
  10911. var end = arr.length - 1;
  10912. for (; end >= 0; end--) {
  10913. if (arr[end] !== '') break;
  10914. }
  10915. if (start > end) return [];
  10916. return arr.slice(start, end - start + 1);
  10917. }
  10918. var fromParts = trim(from.split('/'));
  10919. var toParts = trim(to.split('/'));
  10920. var length = Math.min(fromParts.length, toParts.length);
  10921. var samePartsLength = length;
  10922. for (var i = 0; i < length; i++) {
  10923. if (fromParts[i] !== toParts[i]) {
  10924. samePartsLength = i;
  10925. break;
  10926. }
  10927. }
  10928. var outputParts = [];
  10929. for (var i = samePartsLength; i < fromParts.length; i++) {
  10930. outputParts.push('..');
  10931. }
  10932. outputParts = outputParts.concat(toParts.slice(samePartsLength));
  10933. return outputParts.join('/');
  10934. };
  10935. exports.sep = '/';
  10936. exports.delimiter = ':';
  10937. exports.dirname = function (path) {
  10938. if (typeof path !== 'string') path = path + '';
  10939. if (path.length === 0) return '.';
  10940. var code = path.charCodeAt(0);
  10941. var hasRoot = code === 47 /*/*/;
  10942. var end = -1;
  10943. var matchedSlash = true;
  10944. for (var i = path.length - 1; i >= 1; --i) {
  10945. code = path.charCodeAt(i);
  10946. if (code === 47 /*/*/) {
  10947. if (!matchedSlash) {
  10948. end = i;
  10949. break;
  10950. }
  10951. } else {
  10952. // We saw the first non-path separator
  10953. matchedSlash = false;
  10954. }
  10955. }
  10956. if (end === -1) return hasRoot ? '/' : '.';
  10957. if (hasRoot && end === 1) {
  10958. // return '//';
  10959. // Backwards-compat fix:
  10960. return '/';
  10961. }
  10962. return path.slice(0, end);
  10963. };
  10964. function basename(path) {
  10965. if (typeof path !== 'string') path = path + '';
  10966. var start = 0;
  10967. var end = -1;
  10968. var matchedSlash = true;
  10969. var i;
  10970. for (i = path.length - 1; i >= 0; --i) {
  10971. if (path.charCodeAt(i) === 47 /*/*/) {
  10972. // If we reached a path separator that was not part of a set of path
  10973. // separators at the end of the string, stop now
  10974. if (!matchedSlash) {
  10975. start = i + 1;
  10976. break;
  10977. }
  10978. } else if (end === -1) {
  10979. // We saw the first non-path separator, mark this as the end of our
  10980. // path component
  10981. matchedSlash = false;
  10982. end = i + 1;
  10983. }
  10984. }
  10985. if (end === -1) return '';
  10986. return path.slice(start, end);
  10987. }
  10988. // Uses a mixed approach for backwards-compatibility, as ext behavior changed
  10989. // in new Node.js versions, so only basename() above is backported here
  10990. exports.basename = function (path, ext) {
  10991. var f = basename(path);
  10992. if (ext && f.substr(-1 * ext.length) === ext) {
  10993. f = f.substr(0, f.length - ext.length);
  10994. }
  10995. return f;
  10996. };
  10997. exports.extname = function (path) {
  10998. if (typeof path !== 'string') path = path + '';
  10999. var startDot = -1;
  11000. var startPart = 0;
  11001. var end = -1;
  11002. var matchedSlash = true;
  11003. // Track the state of characters (if any) we see before our first dot and
  11004. // after any path separator we find
  11005. var preDotState = 0;
  11006. for (var i = path.length - 1; i >= 0; --i) {
  11007. var code = path.charCodeAt(i);
  11008. if (code === 47 /*/*/) {
  11009. // If we reached a path separator that was not part of a set of path
  11010. // separators at the end of the string, stop now
  11011. if (!matchedSlash) {
  11012. startPart = i + 1;
  11013. break;
  11014. }
  11015. continue;
  11016. }
  11017. if (end === -1) {
  11018. // We saw the first non-path separator, mark this as the end of our
  11019. // extension
  11020. matchedSlash = false;
  11021. end = i + 1;
  11022. }
  11023. if (code === 46 /*.*/) {
  11024. // If this is our first dot, mark it as the start of our extension
  11025. if (startDot === -1)
  11026. startDot = i;
  11027. else if (preDotState !== 1)
  11028. preDotState = 1;
  11029. } else if (startDot !== -1) {
  11030. // We saw a non-dot and non-path separator before our dot, so we should
  11031. // have a good chance at having a non-empty extension
  11032. preDotState = -1;
  11033. }
  11034. }
  11035. if (startDot === -1 || end === -1 ||
  11036. // We saw a non-dot character immediately before the dot
  11037. preDotState === 0 ||
  11038. // The (right-most) trimmed path component is exactly '..'
  11039. preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
  11040. return '';
  11041. }
  11042. return path.slice(startDot, end);
  11043. };
  11044. function filter (xs, f) {
  11045. if (xs.filter) return xs.filter(f);
  11046. var res = [];
  11047. for (var i = 0; i < xs.length; i++) {
  11048. if (f(xs[i], i, xs)) res.push(xs[i]);
  11049. }
  11050. return res;
  11051. }
  11052. // String.prototype.substr - negative index don't work in IE8
  11053. var substr = 'ab'.substr(-1) === 'b'
  11054. ? function (str, start, len) { return str.substr(start, len) }
  11055. : function (str, start, len) {
  11056. if (start < 0) start = str.length + start;
  11057. return str.substr(start, len);
  11058. }
  11059. ;
  11060. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../node-libs-browser/mock/process.js */ 381)))
  11061. /***/ }),
  11062. /***/ 39:
  11063. /*!**************************************************************!*\
  11064. !*** D:/IdeaProjects/zdsz_WeChatApplet/common/lodash.min.js ***!
  11065. \**************************************************************/
  11066. /*! no static exports found */
  11067. /***/ (function(module, exports, __webpack_require__) {
  11068. /* WEBPACK VAR INJECTION */(function(global, module) {var __WEBPACK_AMD_DEFINE_RESULT__;var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ 13);
  11069. /**
  11070. * @license
  11071. * Lodash lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
  11072. */
  11073. ;
  11074. (function () {
  11075. function n(n, t, r) {
  11076. switch (r.length) {
  11077. case 0:
  11078. return n.call(t);
  11079. case 1:
  11080. return n.call(t, r[0]);
  11081. case 2:
  11082. return n.call(t, r[0], r[1]);
  11083. case 3:
  11084. return n.call(t, r[0], r[1], r[2]);
  11085. }
  11086. return n.apply(t, r);
  11087. }
  11088. function t(n, t, r, e) {
  11089. for (var u = -1, i = null == n ? 0 : n.length; ++u < i;) {
  11090. var o = n[u];
  11091. t(e, o, r(o), n);
  11092. }
  11093. return e;
  11094. }
  11095. function r(n, t) {
  11096. for (var r = -1, e = null == n ? 0 : n.length; ++r < e && false !== t(n[r], r, n);) {
  11097. ;
  11098. }
  11099. return n;
  11100. }
  11101. function e(n, t) {
  11102. for (var r = null == n ? 0 : n.length; r-- && false !== t(n[r], r, n);) {
  11103. ;
  11104. }
  11105. return n;
  11106. }
  11107. function u(n, t) {
  11108. for (var r = -1, e = null == n ? 0 : n.length; ++r < e;) {
  11109. if (!t(n[r], r, n)) return false;
  11110. }
  11111. return true;
  11112. }
  11113. function i(n, t) {
  11114. for (var r = -1, e = null == n ? 0 : n.length, u = 0, i = []; ++r < e;) {
  11115. var o = n[r];
  11116. t(o, r, n) && (i[u++] = o);
  11117. }
  11118. return i;
  11119. }
  11120. function o(n, t) {
  11121. return !(null == n || !n.length) && -1 < v(n, t, 0);
  11122. }
  11123. function f(n, t, r) {
  11124. for (var e = -1, u = null == n ? 0 : n.length; ++e < u;) {
  11125. if (r(t, n[e])) return true;
  11126. }
  11127. return false;
  11128. }
  11129. function c(n, t) {
  11130. for (var r = -1, e = null == n ? 0 : n.length, u = Array(e); ++r < e;) {
  11131. u[r] = t(n[r], r, n);
  11132. }
  11133. return u;
  11134. }
  11135. function a(n, t) {
  11136. for (var r = -1, e = t.length, u = n.length; ++r < e;) {
  11137. n[u + r] = t[r];
  11138. }
  11139. return n;
  11140. }
  11141. function l(n, t, r, e) {
  11142. var u = -1,
  11143. i = null == n ? 0 : n.length;
  11144. for (e && i && (r = n[++u]); ++u < i;) {
  11145. r = t(r, n[u], u, n);
  11146. }
  11147. return r;
  11148. }
  11149. function s(n, t, r, e) {
  11150. var u = null == n ? 0 : n.length;
  11151. for (e && u && (r = n[--u]); u--;) {
  11152. r = t(r, n[u], u, n);
  11153. }
  11154. return r;
  11155. }
  11156. function h(n, t) {
  11157. for (var r = -1, e = null == n ? 0 : n.length; ++r < e;) {
  11158. if (t(n[r], r, n)) return true;
  11159. }
  11160. return false;
  11161. }
  11162. function p(n, t, r) {
  11163. var e;
  11164. return r(n, function (n, r, u) {
  11165. if (t(n, r, u)) return e = r, false;
  11166. }), e;
  11167. }
  11168. function _(n, t, r, e) {
  11169. var u = n.length;
  11170. for (r += e ? 1 : -1; e ? r-- : ++r < u;) {
  11171. if (t(n[r], r, n)) return r;
  11172. }
  11173. return -1;
  11174. }
  11175. function v(n, t, r) {
  11176. if (t === t) n: {
  11177. --r;
  11178. for (var e = n.length; ++r < e;) {
  11179. if (n[r] === t) {
  11180. n = r;
  11181. break n;
  11182. }
  11183. }
  11184. n = -1;
  11185. } else n = _(n, d, r);
  11186. return n;
  11187. }
  11188. function g(n, t, r, e) {
  11189. --r;
  11190. for (var u = n.length; ++r < u;) {
  11191. if (e(n[r], t)) return r;
  11192. }
  11193. return -1;
  11194. }
  11195. function d(n) {
  11196. return n !== n;
  11197. }
  11198. function y(n, t) {
  11199. var r = null == n ? 0 : n.length;
  11200. return r ? m(n, t) / r : F;
  11201. }
  11202. function b(n) {
  11203. return function (t) {
  11204. return null == t ? T : t[n];
  11205. };
  11206. }
  11207. function x(n) {
  11208. return function (t) {
  11209. return null == n ? T : n[t];
  11210. };
  11211. }
  11212. function j(n, t, r, e, u) {
  11213. return u(n, function (n, u, i) {
  11214. r = e ? (e = false, n) : t(r, n, u, i);
  11215. }), r;
  11216. }
  11217. function w(n, t) {
  11218. var r = n.length;
  11219. for (n.sort(t); r--;) {
  11220. n[r] = n[r].c;
  11221. }
  11222. return n;
  11223. }
  11224. function m(n, t) {
  11225. for (var r, e = -1, u = n.length; ++e < u;) {
  11226. var i = t(n[e]);
  11227. i !== T && (r = r === T ? i : r + i);
  11228. }
  11229. return r;
  11230. }
  11231. function A(n, t) {
  11232. for (var r = -1, e = Array(n); ++r < n;) {
  11233. e[r] = t(r);
  11234. }
  11235. return e;
  11236. }
  11237. function E(n, t) {
  11238. return c(t, function (t) {
  11239. return [t, n[t]];
  11240. });
  11241. }
  11242. function k(n) {
  11243. return function (t) {
  11244. return n(t);
  11245. };
  11246. }
  11247. function S(n, t) {
  11248. return c(t, function (t) {
  11249. return n[t];
  11250. });
  11251. }
  11252. function O(n, t) {
  11253. return n.has(t);
  11254. }
  11255. function I(n, t) {
  11256. for (var r = -1, e = n.length; ++r < e && -1 < v(t, n[r], 0);) {
  11257. ;
  11258. }
  11259. return r;
  11260. }
  11261. function R(n, t) {
  11262. for (var r = n.length; r-- && -1 < v(t, n[r], 0);) {
  11263. ;
  11264. }
  11265. return r;
  11266. }
  11267. function z(n) {
  11268. return "\\" + Un[n];
  11269. }
  11270. function W(n) {
  11271. var t = -1,
  11272. r = Array(n.size);
  11273. return n.forEach(function (n, e) {
  11274. r[++t] = [e, n];
  11275. }), r;
  11276. }
  11277. function B(n, t) {
  11278. return function (r) {
  11279. return n(t(r));
  11280. };
  11281. }
  11282. function L(n, t) {
  11283. for (var r = -1, e = n.length, u = 0, i = []; ++r < e;) {
  11284. var o = n[r];
  11285. o !== t && "__lodash_placeholder__" !== o || (n[r] = "__lodash_placeholder__", i[u++] = r);
  11286. }
  11287. return i;
  11288. }
  11289. function U(n) {
  11290. var t = -1,
  11291. r = Array(n.size);
  11292. return n.forEach(function (n) {
  11293. r[++t] = n;
  11294. }), r;
  11295. }
  11296. function C(n) {
  11297. var t = -1,
  11298. r = Array(n.size);
  11299. return n.forEach(function (n) {
  11300. r[++t] = [n, n];
  11301. }), r;
  11302. }
  11303. function D(n) {
  11304. if (Rn.test(n)) {
  11305. for (var t = On.lastIndex = 0; On.test(n);) {
  11306. ++t;
  11307. }
  11308. n = t;
  11309. } else n = Qn(n);
  11310. return n;
  11311. }
  11312. function M(n) {
  11313. return Rn.test(n) ? n.match(On) || [] : n.split("");
  11314. }
  11315. var T,
  11316. $ = 1 / 0,
  11317. F = NaN,
  11318. N = [["ary", 128], ["bind", 1], ["bindKey", 2], ["curry", 8], ["curryRight", 16], ["flip", 512], ["partial", 32], ["partialRight", 64], ["rearg", 256]],
  11319. P = /\b__p\+='';/g,
  11320. Z = /\b(__p\+=)''\+/g,
  11321. q = /(__e\(.*?\)|\b__t\))\+'';/g,
  11322. V = /&(?:amp|lt|gt|quot|#39);/g,
  11323. K = /[&<>"']/g,
  11324. G = RegExp(V.source),
  11325. H = RegExp(K.source),
  11326. J = /<%-([\s\S]+?)%>/g,
  11327. Y = /<%([\s\S]+?)%>/g,
  11328. Q = /<%=([\s\S]+?)%>/g,
  11329. X = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
  11330. nn = /^\w*$/,
  11331. tn = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,
  11332. rn = /[\\^$.*+?()[\]{}|]/g,
  11333. en = RegExp(rn.source),
  11334. un = /^\s+|\s+$/g,
  11335. on = /^\s+/,
  11336. fn = /\s+$/,
  11337. cn = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,
  11338. an = /\{\n\/\* \[wrapped with (.+)\] \*/,
  11339. ln = /,? & /,
  11340. sn = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,
  11341. hn = /\\(\\)?/g,
  11342. pn = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,
  11343. _n = /\w*$/,
  11344. vn = /^[-+]0x[0-9a-f]+$/i,
  11345. gn = /^0b[01]+$/i,
  11346. dn = /^\[object .+?Constructor\]$/,
  11347. yn = /^0o[0-7]+$/i,
  11348. bn = /^(?:0|[1-9]\d*)$/,
  11349. xn = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,
  11350. jn = /($^)/,
  11351. wn = /['\n\r\u2028\u2029\\]/g,
  11352. 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])?)*",
  11353. An = "(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])" + mn,
  11354. 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])",
  11355. kn = RegExp("['\u2019]", "g"),
  11356. Sn = RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]", "g"),
  11357. On = RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|" + En + mn, "g"),
  11358. 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"),
  11359. Rn = RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),
  11360. zn = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,
  11361. 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(" "),
  11362. Bn = {};
  11363. 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;
  11364. var Ln = {};
  11365. 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;
  11366. var Un = {
  11367. "\\": "\\",
  11368. "'": "'",
  11369. "\n": "n",
  11370. "\r": "r",
  11371. "\u2028": "u2028",
  11372. "\u2029": "u2029"
  11373. },
  11374. Cn = parseFloat,
  11375. Dn = parseInt,
  11376. Mn = (typeof global === "undefined" ? "undefined" : _typeof(global)) == "object" && global && global.Object === Object && global,
  11377. Tn = (typeof self === "undefined" ? "undefined" : _typeof(self)) == "object" && self && self.Object === Object && self,
  11378. $n = Mn || Tn || Function("return this")(),
  11379. Fn = ( false ? undefined : _typeof(exports)) == "object" && exports && !exports.nodeType && exports,
  11380. Nn = Fn && ( false ? undefined : _typeof(module)) == "object" && module && !module.nodeType && module,
  11381. Pn = Nn && Nn.exports === Fn,
  11382. Zn = Pn && Mn.process,
  11383. qn = function () {
  11384. try {
  11385. var n = Nn && Nn.f && Nn.f("util").types;
  11386. return n ? n : Zn && Zn.binding && Zn.binding("util");
  11387. } catch (n) {}
  11388. }(),
  11389. Vn = qn && qn.isArrayBuffer,
  11390. Kn = qn && qn.isDate,
  11391. Gn = qn && qn.isMap,
  11392. Hn = qn && qn.isRegExp,
  11393. Jn = qn && qn.isSet,
  11394. Yn = qn && qn.isTypedArray,
  11395. Qn = b("length"),
  11396. Xn = x({
  11397. "\xc0": "A",
  11398. "\xc1": "A",
  11399. "\xc2": "A",
  11400. "\xc3": "A",
  11401. "\xc4": "A",
  11402. "\xc5": "A",
  11403. "\xe0": "a",
  11404. "\xe1": "a",
  11405. "\xe2": "a",
  11406. "\xe3": "a",
  11407. "\xe4": "a",
  11408. "\xe5": "a",
  11409. "\xc7": "C",
  11410. "\xe7": "c",
  11411. "\xd0": "D",
  11412. "\xf0": "d",
  11413. "\xc8": "E",
  11414. "\xc9": "E",
  11415. "\xca": "E",
  11416. "\xcb": "E",
  11417. "\xe8": "e",
  11418. "\xe9": "e",
  11419. "\xea": "e",
  11420. "\xeb": "e",
  11421. "\xcc": "I",
  11422. "\xcd": "I",
  11423. "\xce": "I",
  11424. "\xcf": "I",
  11425. "\xec": "i",
  11426. "\xed": "i",
  11427. "\xee": "i",
  11428. "\xef": "i",
  11429. "\xd1": "N",
  11430. "\xf1": "n",
  11431. "\xd2": "O",
  11432. "\xd3": "O",
  11433. "\xd4": "O",
  11434. "\xd5": "O",
  11435. "\xd6": "O",
  11436. "\xd8": "O",
  11437. "\xf2": "o",
  11438. "\xf3": "o",
  11439. "\xf4": "o",
  11440. "\xf5": "o",
  11441. "\xf6": "o",
  11442. "\xf8": "o",
  11443. "\xd9": "U",
  11444. "\xda": "U",
  11445. "\xdb": "U",
  11446. "\xdc": "U",
  11447. "\xf9": "u",
  11448. "\xfa": "u",
  11449. "\xfb": "u",
  11450. "\xfc": "u",
  11451. "\xdd": "Y",
  11452. "\xfd": "y",
  11453. "\xff": "y",
  11454. "\xc6": "Ae",
  11455. "\xe6": "ae",
  11456. "\xde": "Th",
  11457. "\xfe": "th",
  11458. "\xdf": "ss",
  11459. "\u0100": "A",
  11460. "\u0102": "A",
  11461. "\u0104": "A",
  11462. "\u0101": "a",
  11463. "\u0103": "a",
  11464. "\u0105": "a",
  11465. "\u0106": "C",
  11466. "\u0108": "C",
  11467. "\u010A": "C",
  11468. "\u010C": "C",
  11469. "\u0107": "c",
  11470. "\u0109": "c",
  11471. "\u010B": "c",
  11472. "\u010D": "c",
  11473. "\u010E": "D",
  11474. "\u0110": "D",
  11475. "\u010F": "d",
  11476. "\u0111": "d",
  11477. "\u0112": "E",
  11478. "\u0114": "E",
  11479. "\u0116": "E",
  11480. "\u0118": "E",
  11481. "\u011A": "E",
  11482. "\u0113": "e",
  11483. "\u0115": "e",
  11484. "\u0117": "e",
  11485. "\u0119": "e",
  11486. "\u011B": "e",
  11487. "\u011C": "G",
  11488. "\u011E": "G",
  11489. "\u0120": "G",
  11490. "\u0122": "G",
  11491. "\u011D": "g",
  11492. "\u011F": "g",
  11493. "\u0121": "g",
  11494. "\u0123": "g",
  11495. "\u0124": "H",
  11496. "\u0126": "H",
  11497. "\u0125": "h",
  11498. "\u0127": "h",
  11499. "\u0128": "I",
  11500. "\u012A": "I",
  11501. "\u012C": "I",
  11502. "\u012E": "I",
  11503. "\u0130": "I",
  11504. "\u0129": "i",
  11505. "\u012B": "i",
  11506. "\u012D": "i",
  11507. "\u012F": "i",
  11508. "\u0131": "i",
  11509. "\u0134": "J",
  11510. "\u0135": "j",
  11511. "\u0136": "K",
  11512. "\u0137": "k",
  11513. "\u0138": "k",
  11514. "\u0139": "L",
  11515. "\u013B": "L",
  11516. "\u013D": "L",
  11517. "\u013F": "L",
  11518. "\u0141": "L",
  11519. "\u013A": "l",
  11520. "\u013C": "l",
  11521. "\u013E": "l",
  11522. "\u0140": "l",
  11523. "\u0142": "l",
  11524. "\u0143": "N",
  11525. "\u0145": "N",
  11526. "\u0147": "N",
  11527. "\u014A": "N",
  11528. "\u0144": "n",
  11529. "\u0146": "n",
  11530. "\u0148": "n",
  11531. "\u014B": "n",
  11532. "\u014C": "O",
  11533. "\u014E": "O",
  11534. "\u0150": "O",
  11535. "\u014D": "o",
  11536. "\u014F": "o",
  11537. "\u0151": "o",
  11538. "\u0154": "R",
  11539. "\u0156": "R",
  11540. "\u0158": "R",
  11541. "\u0155": "r",
  11542. "\u0157": "r",
  11543. "\u0159": "r",
  11544. "\u015A": "S",
  11545. "\u015C": "S",
  11546. "\u015E": "S",
  11547. "\u0160": "S",
  11548. "\u015B": "s",
  11549. "\u015D": "s",
  11550. "\u015F": "s",
  11551. "\u0161": "s",
  11552. "\u0162": "T",
  11553. "\u0164": "T",
  11554. "\u0166": "T",
  11555. "\u0163": "t",
  11556. "\u0165": "t",
  11557. "\u0167": "t",
  11558. "\u0168": "U",
  11559. "\u016A": "U",
  11560. "\u016C": "U",
  11561. "\u016E": "U",
  11562. "\u0170": "U",
  11563. "\u0172": "U",
  11564. "\u0169": "u",
  11565. "\u016B": "u",
  11566. "\u016D": "u",
  11567. "\u016F": "u",
  11568. "\u0171": "u",
  11569. "\u0173": "u",
  11570. "\u0174": "W",
  11571. "\u0175": "w",
  11572. "\u0176": "Y",
  11573. "\u0177": "y",
  11574. "\u0178": "Y",
  11575. "\u0179": "Z",
  11576. "\u017B": "Z",
  11577. "\u017D": "Z",
  11578. "\u017A": "z",
  11579. "\u017C": "z",
  11580. "\u017E": "z",
  11581. "\u0132": "IJ",
  11582. "\u0133": "ij",
  11583. "\u0152": "Oe",
  11584. "\u0153": "oe",
  11585. "\u0149": "'n",
  11586. "\u017F": "s"
  11587. }),
  11588. nt = x({
  11589. "&": "&amp;",
  11590. "<": "&lt;",
  11591. ">": "&gt;",
  11592. '"': "&quot;",
  11593. "'": "&#39;"
  11594. }),
  11595. tt = x({
  11596. "&amp;": "&",
  11597. "&lt;": "<",
  11598. "&gt;": ">",
  11599. "&quot;": '"',
  11600. "&#39;": "'"
  11601. }),
  11602. rt = function x(mn) {
  11603. function An(n) {
  11604. if (du(n) && !of(n) && !(n instanceof Un)) {
  11605. if (n instanceof On) return n;
  11606. if (ii.call(n, "__wrapped__")) return $e(n);
  11607. }
  11608. return new On(n);
  11609. }
  11610. function En() {}
  11611. function On(n, t) {
  11612. this.__wrapped__ = n, this.__actions__ = [], this.__chain__ = !!t, this.__index__ = 0, this.__values__ = T;
  11613. }
  11614. function Un(n) {
  11615. this.__wrapped__ = n, this.__actions__ = [], this.__dir__ = 1, this.__filtered__ = false, this.__iteratees__ = [], this.__takeCount__ = 4294967295, this.__views__ = [];
  11616. }
  11617. function Mn(n) {
  11618. var t = -1,
  11619. r = null == n ? 0 : n.length;
  11620. for (this.clear(); ++t < r;) {
  11621. var e = n[t];
  11622. this.set(e[0], e[1]);
  11623. }
  11624. }
  11625. function Tn(n) {
  11626. var t = -1,
  11627. r = null == n ? 0 : n.length;
  11628. for (this.clear(); ++t < r;) {
  11629. var e = n[t];
  11630. this.set(e[0], e[1]);
  11631. }
  11632. }
  11633. function Fn(n) {
  11634. var t = -1,
  11635. r = null == n ? 0 : n.length;
  11636. for (this.clear(); ++t < r;) {
  11637. var e = n[t];
  11638. this.set(e[0], e[1]);
  11639. }
  11640. }
  11641. function Nn(n) {
  11642. var t = -1,
  11643. r = null == n ? 0 : n.length;
  11644. for (this.__data__ = new Fn(); ++t < r;) {
  11645. this.add(n[t]);
  11646. }
  11647. }
  11648. function Zn(n) {
  11649. this.size = (this.__data__ = new Tn(n)).size;
  11650. }
  11651. function qn(n, t) {
  11652. var r,
  11653. e = of(n),
  11654. u = !e && uf(n),
  11655. i = !e && !u && cf(n),
  11656. o = !e && !u && !i && pf(n),
  11657. u = (e = e || u || i || o) ? A(n.length, Xu) : [],
  11658. f = u.length;
  11659. for (r in n) {
  11660. !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);
  11661. }
  11662. return u;
  11663. }
  11664. function Qn(n) {
  11665. var t = n.length;
  11666. return t ? n[ir(0, t - 1)] : T;
  11667. }
  11668. function et(n, t) {
  11669. return Ce(Ur(n), pt(t, 0, n.length));
  11670. }
  11671. function ut(n) {
  11672. return Ce(Ur(n));
  11673. }
  11674. function it(n, t, r) {
  11675. (r === T || au(n[t], r)) && (r !== T || t in n) || st(n, t, r);
  11676. }
  11677. function ot(n, t, r) {
  11678. var e = n[t];
  11679. ii.call(n, t) && au(e, r) && (r !== T || t in n) || st(n, t, r);
  11680. }
  11681. function ft(n, t) {
  11682. for (var r = n.length; r--;) {
  11683. if (au(n[r][0], t)) return r;
  11684. }
  11685. return -1;
  11686. }
  11687. function ct(n, t, r, e) {
  11688. return eo(n, function (n, u, i) {
  11689. t(e, n, r(n), i);
  11690. }), e;
  11691. }
  11692. function at(n, t) {
  11693. return n && Cr(t, zu(t), n);
  11694. }
  11695. function lt(n, t) {
  11696. return n && Cr(t, Wu(t), n);
  11697. }
  11698. function st(n, t, r) {
  11699. "__proto__" == t && mi ? mi(n, t, {
  11700. configurable: true,
  11701. enumerable: true,
  11702. value: r,
  11703. writable: true
  11704. }) : n[t] = r;
  11705. }
  11706. function ht(n, t) {
  11707. for (var r = -1, e = t.length, u = Vu(e), i = null == n; ++r < e;) {
  11708. u[r] = i ? T : Iu(n, t[r]);
  11709. }
  11710. return u;
  11711. }
  11712. function pt(n, t, r) {
  11713. return n === n && (r !== T && (n = n <= r ? n : r), t !== T && (n = n >= t ? n : t)), n;
  11714. }
  11715. function _t(n, t, e, u, i, o) {
  11716. var f,
  11717. c = 1 & t,
  11718. a = 2 & t,
  11719. l = 4 & t;
  11720. if (e && (f = i ? e(n, u, i, o) : e(n)), f !== T) return f;
  11721. if (!gu(n)) return n;
  11722. if (u = of(n)) {
  11723. if (f = me(n), !c) return Ur(n, f);
  11724. } else {
  11725. var s = _o(n),
  11726. h = "[object Function]" == s || "[object GeneratorFunction]" == s;
  11727. if (cf(n)) return Ir(n, c);
  11728. if ("[object Object]" == s || "[object Arguments]" == s || h && !i) {
  11729. if (f = a || h ? {} : Ae(n), !c) return a ? Mr(n, lt(f, n)) : Dr(n, at(f, n));
  11730. } else {
  11731. if (!Ln[s]) return i ? n : {};
  11732. f = Ee(n, s, c);
  11733. }
  11734. }
  11735. if (o || (o = new Zn()), i = o.get(n)) return i;
  11736. if (o.set(n, f), hf(n)) return n.forEach(function (r) {
  11737. f.add(_t(r, t, e, r, n, o));
  11738. }), f;
  11739. if (lf(n)) return n.forEach(function (r, u) {
  11740. f.set(u, _t(r, t, e, u, n, o));
  11741. }), f;
  11742. var a = l ? a ? ve : _e : a ? Wu : zu,
  11743. p = u ? T : a(n);
  11744. return r(p || n, function (r, u) {
  11745. p && (u = r, r = n[u]), ot(f, u, _t(r, t, e, u, n, o));
  11746. }), f;
  11747. }
  11748. function vt(n) {
  11749. var t = zu(n);
  11750. return function (r) {
  11751. return gt(r, n, t);
  11752. };
  11753. }
  11754. function gt(n, t, r) {
  11755. var e = r.length;
  11756. if (null == n) return !e;
  11757. for (n = Yu(n); e--;) {
  11758. var u = r[e],
  11759. i = t[u],
  11760. o = n[u];
  11761. if (o === T && !(u in n) || !i(o)) return false;
  11762. }
  11763. return true;
  11764. }
  11765. function dt(n, t, r) {
  11766. if (typeof n != "function") throw new ni("Expected a function");
  11767. return yo(function () {
  11768. n.apply(T, r);
  11769. }, t);
  11770. }
  11771. function yt(n, t, r, e) {
  11772. var u = -1,
  11773. i = o,
  11774. a = true,
  11775. l = n.length,
  11776. s = [],
  11777. h = t.length;
  11778. if (!l) return s;
  11779. r && (t = c(t, k(r))), e ? (i = f, a = false) : 200 <= t.length && (i = O, a = false, t = new Nn(t));
  11780. n: for (; ++u < l;) {
  11781. var p = n[u],
  11782. _ = null == r ? p : r(p),
  11783. p = e || 0 !== p ? p : 0;
  11784. if (a && _ === _) {
  11785. for (var v = h; v--;) {
  11786. if (t[v] === _) continue n;
  11787. }
  11788. s.push(p);
  11789. } else i(t, _, e) || s.push(p);
  11790. }
  11791. return s;
  11792. }
  11793. function bt(n, t) {
  11794. var r = true;
  11795. return eo(n, function (n, e, u) {
  11796. return r = !!t(n, e, u);
  11797. }), r;
  11798. }
  11799. function xt(n, t, r) {
  11800. for (var e = -1, u = n.length; ++e < u;) {
  11801. var i = n[e],
  11802. o = t(i);
  11803. if (null != o && (f === T ? o === o && !ju(o) : r(o, f))) var f = o,
  11804. c = i;
  11805. }
  11806. return c;
  11807. }
  11808. function jt(n, t) {
  11809. var r = [];
  11810. return eo(n, function (n, e, u) {
  11811. t(n, e, u) && r.push(n);
  11812. }), r;
  11813. }
  11814. function wt(n, t, r, e, u) {
  11815. var i = -1,
  11816. o = n.length;
  11817. for (r || (r = ke), u || (u = []); ++i < o;) {
  11818. var f = n[i];
  11819. 0 < t && r(f) ? 1 < t ? wt(f, t - 1, r, e, u) : a(u, f) : e || (u[u.length] = f);
  11820. }
  11821. return u;
  11822. }
  11823. function mt(n, t) {
  11824. return n && io(n, t, zu);
  11825. }
  11826. function At(n, t) {
  11827. return n && oo(n, t, zu);
  11828. }
  11829. function Et(n, t) {
  11830. return i(t, function (t) {
  11831. return pu(n[t]);
  11832. });
  11833. }
  11834. function kt(n, t) {
  11835. t = Sr(t, n);
  11836. for (var r = 0, e = t.length; null != n && r < e;) {
  11837. n = n[De(t[r++])];
  11838. }
  11839. return r && r == e ? n : T;
  11840. }
  11841. function St(n, t, r) {
  11842. return t = t(n), of(n) ? t : a(t, r(n));
  11843. }
  11844. function Ot(n) {
  11845. if (null == n) n = n === T ? "[object Undefined]" : "[object Null]";else if (wi && wi in Yu(n)) {
  11846. var t = ii.call(n, wi),
  11847. r = n[wi];
  11848. try {
  11849. n[wi] = T;
  11850. var e = true;
  11851. } catch (n) {}
  11852. var u = ci.call(n);
  11853. e && (t ? n[wi] = r : delete n[wi]), n = u;
  11854. } else n = ci.call(n);
  11855. return n;
  11856. }
  11857. function It(n, t) {
  11858. return n > t;
  11859. }
  11860. function Rt(n, t) {
  11861. return null != n && ii.call(n, t);
  11862. }
  11863. function zt(n, t) {
  11864. return null != n && t in Yu(n);
  11865. }
  11866. function Wt(n, t, r) {
  11867. for (var e = r ? f : o, u = n[0].length, i = n.length, a = i, l = Vu(i), s = 1 / 0, h = []; a--;) {
  11868. var p = n[a];
  11869. 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;
  11870. }
  11871. var p = n[0],
  11872. _ = -1,
  11873. v = l[0];
  11874. n: for (; ++_ < u && h.length < s;) {
  11875. var g = p[_],
  11876. d = t ? t(g) : g,
  11877. g = r || 0 !== g ? g : 0;
  11878. if (v ? !O(v, d) : !e(h, d, r)) {
  11879. for (a = i; --a;) {
  11880. var y = l[a];
  11881. if (y ? !O(y, d) : !e(n[a], d, r)) continue n;
  11882. }
  11883. v && v.push(d), h.push(g);
  11884. }
  11885. }
  11886. return h;
  11887. }
  11888. function Bt(n, t, r) {
  11889. var e = {};
  11890. return mt(n, function (n, u, i) {
  11891. t(e, r(n), u, i);
  11892. }), e;
  11893. }
  11894. function Lt(t, r, e) {
  11895. 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);
  11896. }
  11897. function Ut(n) {
  11898. return du(n) && "[object Arguments]" == Ot(n);
  11899. }
  11900. function Ct(n) {
  11901. return du(n) && "[object ArrayBuffer]" == Ot(n);
  11902. }
  11903. function Dt(n) {
  11904. return du(n) && "[object Date]" == Ot(n);
  11905. }
  11906. function Mt(n, t, r, e, u) {
  11907. if (n === t) t = true;else if (null == n || null == t || !du(n) && !du(t)) t = n !== n && t !== t;else n: {
  11908. var i = of(n),
  11909. o = of(t),
  11910. f = i ? "[object Array]" : _o(n),
  11911. c = o ? "[object Array]" : _o(t),
  11912. f = "[object Arguments]" == f ? "[object Object]" : f,
  11913. c = "[object Arguments]" == c ? "[object Object]" : c,
  11914. a = "[object Object]" == f,
  11915. o = "[object Object]" == c;
  11916. if ((c = f == c) && cf(n)) {
  11917. if (!cf(t)) {
  11918. t = false;
  11919. break n;
  11920. }
  11921. i = true, a = false;
  11922. }
  11923. 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 {
  11924. if (!(1 & r) && (i = a && ii.call(n, "__wrapped__"), f = o && ii.call(t, "__wrapped__"), i || f)) {
  11925. n = i ? n.value() : n, t = f ? t.value() : t, u || (u = new Zn()), t = Mt(n, t, r, e, u);
  11926. break n;
  11927. }
  11928. if (c) {
  11929. t: if (u || (u = new Zn()), i = 1 & r, f = _e(n), o = f.length, c = _e(t).length, o == c || i) {
  11930. for (a = o; a--;) {
  11931. var l = f[a];
  11932. if (!(i ? l in t : ii.call(t, l))) {
  11933. t = false;
  11934. break t;
  11935. }
  11936. }
  11937. if ((c = u.get(n)) && u.get(t)) t = c == t;else {
  11938. c = true, u.set(n, t), u.set(t, n);
  11939. for (var s = i; ++a < o;) {
  11940. var l = f[a],
  11941. h = n[l],
  11942. p = t[l];
  11943. if (e) var _ = i ? e(p, h, l, t, n, u) : e(h, p, l, n, t, u);
  11944. if (_ === T ? h !== p && !Mt(h, p, r, e, u) : !_) {
  11945. c = false;
  11946. break;
  11947. }
  11948. s || (s = "constructor" == l);
  11949. }
  11950. 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;
  11951. }
  11952. } else t = false;
  11953. } else t = false;
  11954. }
  11955. }
  11956. return t;
  11957. }
  11958. function Tt(n) {
  11959. return du(n) && "[object Map]" == _o(n);
  11960. }
  11961. function $t(n, t, r, e) {
  11962. var u = r.length,
  11963. i = u,
  11964. o = !e;
  11965. if (null == n) return !i;
  11966. for (n = Yu(n); u--;) {
  11967. var f = r[u];
  11968. if (o && f[2] ? f[1] !== n[f[0]] : !(f[0] in n)) return false;
  11969. }
  11970. for (; ++u < i;) {
  11971. var f = r[u],
  11972. c = f[0],
  11973. a = n[c],
  11974. l = f[1];
  11975. if (o && f[2]) {
  11976. if (a === T && !(c in n)) return false;
  11977. } else {
  11978. if (f = new Zn(), e) var s = e(a, l, c, n, t, f);
  11979. if (s === T ? !Mt(l, a, 3, e, f) : !s) return false;
  11980. }
  11981. }
  11982. return true;
  11983. }
  11984. function Ft(n) {
  11985. return !(!gu(n) || fi && fi in n) && (pu(n) ? si : dn).test(Me(n));
  11986. }
  11987. function Nt(n) {
  11988. return du(n) && "[object RegExp]" == Ot(n);
  11989. }
  11990. function Pt(n) {
  11991. return du(n) && "[object Set]" == _o(n);
  11992. }
  11993. function Zt(n) {
  11994. return du(n) && vu(n.length) && !!Bn[Ot(n)];
  11995. }
  11996. function qt(n) {
  11997. return typeof n == "function" ? n : null == n ? Tu : _typeof(n) == "object" ? of(n) ? Jt(n[0], n[1]) : Ht(n) : Pu(n);
  11998. }
  11999. function Vt(n) {
  12000. if (!ze(n)) return Bi(n);
  12001. var t,
  12002. r = [];
  12003. for (t in Yu(n)) {
  12004. ii.call(n, t) && "constructor" != t && r.push(t);
  12005. }
  12006. return r;
  12007. }
  12008. function Kt(n, t) {
  12009. return n < t;
  12010. }
  12011. function Gt(n, t) {
  12012. var r = -1,
  12013. e = lu(n) ? Vu(n.length) : [];
  12014. return eo(n, function (n, u, i) {
  12015. e[++r] = t(n, u, i);
  12016. }), e;
  12017. }
  12018. function Ht(n) {
  12019. var t = xe(n);
  12020. return 1 == t.length && t[0][2] ? We(t[0][0], t[0][1]) : function (r) {
  12021. return r === n || $t(r, n, t);
  12022. };
  12023. }
  12024. function Jt(n, t) {
  12025. return Ie(n) && t === t && !gu(t) ? We(De(n), t) : function (r) {
  12026. var e = Iu(r, n);
  12027. return e === T && e === t ? Ru(r, n) : Mt(t, e, 3);
  12028. };
  12029. }
  12030. function Yt(n, t, r, e, u) {
  12031. n !== t && io(t, function (i, o) {
  12032. if (gu(i)) {
  12033. u || (u = new Zn());
  12034. var f = u,
  12035. c = "__proto__" == o ? T : n[o],
  12036. a = "__proto__" == o ? T : t[o],
  12037. l = f.get(a);
  12038. if (l) it(n, o, l);else {
  12039. var l = e ? e(c, a, o + "", n, t, f) : T,
  12040. s = l === T;
  12041. if (s) {
  12042. var h = of(a),
  12043. p = !h && cf(a),
  12044. _ = !h && !p && pf(a),
  12045. l = a;
  12046. 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;
  12047. }
  12048. s && (f.set(a, l), Yt(l, a, r, e, f), f.delete(a)), it(n, o, l);
  12049. }
  12050. } else f = e ? e("__proto__" == o ? T : n[o], i, o + "", n, t, u) : T, f === T && (f = i), it(n, o, f);
  12051. }, Wu);
  12052. }
  12053. function Qt(n, t) {
  12054. var r = n.length;
  12055. if (r) return t += 0 > t ? r : 0, Se(t, r) ? n[t] : T;
  12056. }
  12057. function Xt(n, t, r) {
  12058. var e = -1;
  12059. return t = c(t.length ? t : [Tu], k(ye())), n = Gt(n, function (n) {
  12060. return {
  12061. a: c(t, function (t) {
  12062. return t(n);
  12063. }),
  12064. b: ++e,
  12065. c: n
  12066. };
  12067. }), w(n, function (n, t) {
  12068. var e;
  12069. n: {
  12070. e = -1;
  12071. for (var u = n.a, i = t.a, o = u.length, f = r.length; ++e < o;) {
  12072. var c = Wr(u[e], i[e]);
  12073. if (c) {
  12074. e = e >= f ? c : c * ("desc" == r[e] ? -1 : 1);
  12075. break n;
  12076. }
  12077. }
  12078. e = n.b - t.b;
  12079. }
  12080. return e;
  12081. });
  12082. }
  12083. function nr(n, t) {
  12084. return tr(n, t, function (t, r) {
  12085. return Ru(n, r);
  12086. });
  12087. }
  12088. function tr(n, t, r) {
  12089. for (var e = -1, u = t.length, i = {}; ++e < u;) {
  12090. var o = t[e],
  12091. f = kt(n, o);
  12092. r(f, o) && lr(i, Sr(o, n), f);
  12093. }
  12094. return i;
  12095. }
  12096. function rr(n) {
  12097. return function (t) {
  12098. return kt(t, n);
  12099. };
  12100. }
  12101. function er(n, t, r, e) {
  12102. var u = e ? g : v,
  12103. i = -1,
  12104. o = t.length,
  12105. f = n;
  12106. for (n === t && (t = Ur(t)), r && (f = c(n, k(r))); ++i < o;) {
  12107. for (var a = 0, l = t[i], l = r ? r(l) : l; -1 < (a = u(f, l, a, e));) {
  12108. f !== n && bi.call(f, a, 1), bi.call(n, a, 1);
  12109. }
  12110. }
  12111. return n;
  12112. }
  12113. function ur(n, t) {
  12114. for (var r = n ? t.length : 0, e = r - 1; r--;) {
  12115. var u = t[r];
  12116. if (r == e || u !== i) {
  12117. var i = u;
  12118. Se(u) ? bi.call(n, u, 1) : xr(n, u);
  12119. }
  12120. }
  12121. }
  12122. function ir(n, t) {
  12123. return n + Oi(Mi() * (t - n + 1));
  12124. }
  12125. function or(n, t) {
  12126. var r = "";
  12127. if (!n || 1 > t || 9007199254740991 < t) return r;
  12128. do {
  12129. t % 2 && (r += n), (t = Oi(t / 2)) && (n += n);
  12130. } while (t);
  12131. return r;
  12132. }
  12133. function fr(n, t) {
  12134. return bo(Be(n, t, Tu), n + "");
  12135. }
  12136. function cr(n) {
  12137. return Qn(Lu(n));
  12138. }
  12139. function ar(n, t) {
  12140. var r = Lu(n);
  12141. return Ce(r, pt(t, 0, r.length));
  12142. }
  12143. function lr(n, t, r, e) {
  12144. if (!gu(n)) return n;
  12145. t = Sr(t, n);
  12146. for (var u = -1, i = t.length, o = i - 1, f = n; null != f && ++u < i;) {
  12147. var c = De(t[u]),
  12148. a = r;
  12149. if (u != o) {
  12150. var l = f[c],
  12151. a = e ? e(l, c, f) : T;
  12152. a === T && (a = gu(l) ? l : Se(t[u + 1]) ? [] : {});
  12153. }
  12154. ot(f, c, a), f = f[c];
  12155. }
  12156. return n;
  12157. }
  12158. function sr(n) {
  12159. return Ce(Lu(n));
  12160. }
  12161. function hr(n, t, r) {
  12162. var e = -1,
  12163. u = n.length;
  12164. 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;) {
  12165. r[e] = n[e + t];
  12166. }
  12167. return r;
  12168. }
  12169. function pr(n, t) {
  12170. var r;
  12171. return eo(n, function (n, e, u) {
  12172. return r = t(n, e, u), !r;
  12173. }), !!r;
  12174. }
  12175. function _r(n, t, r) {
  12176. var e = 0,
  12177. u = null == n ? e : n.length;
  12178. if (typeof t == "number" && t === t && 2147483647 >= u) {
  12179. for (; e < u;) {
  12180. var i = e + u >>> 1,
  12181. o = n[i];
  12182. null !== o && !ju(o) && (r ? o <= t : o < t) ? e = i + 1 : u = i;
  12183. }
  12184. return u;
  12185. }
  12186. return vr(n, t, Tu, r);
  12187. }
  12188. function vr(n, t, r, e) {
  12189. t = r(t);
  12190. for (var u = 0, i = null == n ? 0 : n.length, o = t !== t, f = null === t, c = ju(t), a = t === T; u < i;) {
  12191. var l = Oi((u + i) / 2),
  12192. s = r(n[l]),
  12193. h = s !== T,
  12194. p = null === s,
  12195. _ = s === s,
  12196. v = ju(s);
  12197. (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;
  12198. }
  12199. return Ui(i, 4294967294);
  12200. }
  12201. function gr(n, t) {
  12202. for (var r = -1, e = n.length, u = 0, i = []; ++r < e;) {
  12203. var o = n[r],
  12204. f = t ? t(o) : o;
  12205. if (!r || !au(f, c)) {
  12206. var c = f;
  12207. i[u++] = 0 === o ? 0 : o;
  12208. }
  12209. }
  12210. return i;
  12211. }
  12212. function dr(n) {
  12213. return typeof n == "number" ? n : ju(n) ? F : +n;
  12214. }
  12215. function yr(n) {
  12216. if (typeof n == "string") return n;
  12217. if (of(n)) return c(n, yr) + "";
  12218. if (ju(n)) return to ? to.call(n) : "";
  12219. var t = n + "";
  12220. return "0" == t && 1 / n == -$ ? "-0" : t;
  12221. }
  12222. function br(n, t, r) {
  12223. var e = -1,
  12224. u = o,
  12225. i = n.length,
  12226. c = true,
  12227. a = [],
  12228. l = a;
  12229. if (r) c = false, u = f;else if (200 <= i) {
  12230. if (u = t ? null : lo(n)) return U(u);
  12231. c = false, u = O, l = new Nn();
  12232. } else l = t ? [] : a;
  12233. n: for (; ++e < i;) {
  12234. var s = n[e],
  12235. h = t ? t(s) : s,
  12236. s = r || 0 !== s ? s : 0;
  12237. if (c && h === h) {
  12238. for (var p = l.length; p--;) {
  12239. if (l[p] === h) continue n;
  12240. }
  12241. t && l.push(h), a.push(s);
  12242. } else u(l, h, r) || (l !== a && l.push(h), a.push(s));
  12243. }
  12244. return a;
  12245. }
  12246. function xr(n, t) {
  12247. return t = Sr(t, n), n = 2 > t.length ? n : kt(n, hr(t, 0, -1)), null == n || delete n[De(qe(t))];
  12248. }
  12249. function jr(n, t, r, e) {
  12250. for (var u = n.length, i = e ? u : -1; (e ? i-- : ++i < u) && t(n[i], i, n);) {
  12251. ;
  12252. }
  12253. return r ? hr(n, e ? 0 : i, e ? i + 1 : u) : hr(n, e ? i + 1 : 0, e ? u : i);
  12254. }
  12255. function wr(n, t) {
  12256. var r = n;
  12257. return r instanceof Un && (r = r.value()), l(t, function (n, t) {
  12258. return t.func.apply(t.thisArg, a([n], t.args));
  12259. }, r);
  12260. }
  12261. function mr(n, t, r) {
  12262. var e = n.length;
  12263. if (2 > e) return e ? br(n[0]) : [];
  12264. for (var u = -1, i = Vu(e); ++u < e;) {
  12265. for (var o = n[u], f = -1; ++f < e;) {
  12266. f != u && (i[u] = yt(i[u] || o, n[f], t, r));
  12267. }
  12268. }
  12269. return br(wt(i, 1), t, r);
  12270. }
  12271. function Ar(n, t, r) {
  12272. for (var e = -1, u = n.length, i = t.length, o = {}; ++e < u;) {
  12273. r(o, n[e], e < i ? t[e] : T);
  12274. }
  12275. return o;
  12276. }
  12277. function Er(n) {
  12278. return su(n) ? n : [];
  12279. }
  12280. function kr(n) {
  12281. return typeof n == "function" ? n : Tu;
  12282. }
  12283. function Sr(n, t) {
  12284. return of(n) ? n : Ie(n, t) ? [n] : xo(Ou(n));
  12285. }
  12286. function Or(n, t, r) {
  12287. var e = n.length;
  12288. return r = r === T ? e : r, !t && r >= e ? n : hr(n, t, r);
  12289. }
  12290. function Ir(n, t) {
  12291. if (t) return n.slice();
  12292. var r = n.length,
  12293. r = vi ? vi(r) : new n.constructor(r);
  12294. return n.copy(r), r;
  12295. }
  12296. function Rr(n) {
  12297. var t = new n.constructor(n.byteLength);
  12298. return new _i(t).set(new _i(n)), t;
  12299. }
  12300. function zr(n, t) {
  12301. return new n.constructor(t ? Rr(n.buffer) : n.buffer, n.byteOffset, n.length);
  12302. }
  12303. function Wr(n, t) {
  12304. if (n !== t) {
  12305. var r = n !== T,
  12306. e = null === n,
  12307. u = n === n,
  12308. i = ju(n),
  12309. o = t !== T,
  12310. f = null === t,
  12311. c = t === t,
  12312. a = ju(t);
  12313. if (!f && !a && !i && n > t || i && o && c && !f && !a || e && o && c || !r && c || !u) return 1;
  12314. if (!e && !i && !a && n < t || a && r && u && !e && !i || f && r && u || !o && u || !c) return -1;
  12315. }
  12316. return 0;
  12317. }
  12318. function Br(n, t, r, e) {
  12319. var u = -1,
  12320. i = n.length,
  12321. o = r.length,
  12322. f = -1,
  12323. c = t.length,
  12324. a = Li(i - o, 0),
  12325. l = Vu(c + a);
  12326. for (e = !e; ++f < c;) {
  12327. l[f] = t[f];
  12328. }
  12329. for (; ++u < o;) {
  12330. (e || u < i) && (l[r[u]] = n[u]);
  12331. }
  12332. for (; a--;) {
  12333. l[f++] = n[u++];
  12334. }
  12335. return l;
  12336. }
  12337. function Lr(n, t, r, e) {
  12338. var u = -1,
  12339. i = n.length,
  12340. o = -1,
  12341. f = r.length,
  12342. c = -1,
  12343. a = t.length,
  12344. l = Li(i - f, 0),
  12345. s = Vu(l + a);
  12346. for (e = !e; ++u < l;) {
  12347. s[u] = n[u];
  12348. }
  12349. for (l = u; ++c < a;) {
  12350. s[l + c] = t[c];
  12351. }
  12352. for (; ++o < f;) {
  12353. (e || u < i) && (s[l + r[o]] = n[u++]);
  12354. }
  12355. return s;
  12356. }
  12357. function Ur(n, t) {
  12358. var r = -1,
  12359. e = n.length;
  12360. for (t || (t = Vu(e)); ++r < e;) {
  12361. t[r] = n[r];
  12362. }
  12363. return t;
  12364. }
  12365. function Cr(n, t, r, e) {
  12366. var u = !r;
  12367. r || (r = {});
  12368. for (var i = -1, o = t.length; ++i < o;) {
  12369. var f = t[i],
  12370. c = e ? e(r[f], n[f], f, r, n) : T;
  12371. c === T && (c = n[f]), u ? st(r, f, c) : ot(r, f, c);
  12372. }
  12373. return r;
  12374. }
  12375. function Dr(n, t) {
  12376. return Cr(n, ho(n), t);
  12377. }
  12378. function Mr(n, t) {
  12379. return Cr(n, po(n), t);
  12380. }
  12381. function Tr(n, r) {
  12382. return function (e, u) {
  12383. var i = of(e) ? t : ct,
  12384. o = r ? r() : {};
  12385. return i(e, n, ye(u, 2), o);
  12386. };
  12387. }
  12388. function $r(n) {
  12389. return fr(function (t, r) {
  12390. var e = -1,
  12391. u = r.length,
  12392. i = 1 < u ? r[u - 1] : T,
  12393. o = 2 < u ? r[2] : T,
  12394. i = 3 < n.length && typeof i == "function" ? (u--, i) : T;
  12395. for (o && Oe(r[0], r[1], o) && (i = 3 > u ? T : i, u = 1), t = Yu(t); ++e < u;) {
  12396. (o = r[e]) && n(t, o, e, i);
  12397. }
  12398. return t;
  12399. });
  12400. }
  12401. function Fr(n, t) {
  12402. return function (r, e) {
  12403. if (null == r) return r;
  12404. if (!lu(r)) return n(r, e);
  12405. for (var u = r.length, i = t ? u : -1, o = Yu(r); (t ? i-- : ++i < u) && false !== e(o[i], i, o);) {
  12406. ;
  12407. }
  12408. return r;
  12409. };
  12410. }
  12411. function Nr(n) {
  12412. return function (t, r, e) {
  12413. var u = -1,
  12414. i = Yu(t);
  12415. e = e(t);
  12416. for (var o = e.length; o--;) {
  12417. var f = e[n ? o : ++u];
  12418. if (false === r(i[f], f, i)) break;
  12419. }
  12420. return t;
  12421. };
  12422. }
  12423. function Pr(n, t, r) {
  12424. function e() {
  12425. return (this && this !== $n && this instanceof e ? i : n).apply(u ? r : this, arguments);
  12426. }
  12427. var u = 1 & t,
  12428. i = Vr(n);
  12429. return e;
  12430. }
  12431. function Zr(n) {
  12432. return function (t) {
  12433. t = Ou(t);
  12434. var r = Rn.test(t) ? M(t) : T,
  12435. e = r ? r[0] : t.charAt(0);
  12436. return t = r ? Or(r, 1).join("") : t.slice(1), e[n]() + t;
  12437. };
  12438. }
  12439. function qr(n) {
  12440. return function (t) {
  12441. return l(Du(Cu(t).replace(kn, "")), n, "");
  12442. };
  12443. }
  12444. function Vr(n) {
  12445. return function () {
  12446. var t = arguments;
  12447. switch (t.length) {
  12448. case 0:
  12449. return new n();
  12450. case 1:
  12451. return new n(t[0]);
  12452. case 2:
  12453. return new n(t[0], t[1]);
  12454. case 3:
  12455. return new n(t[0], t[1], t[2]);
  12456. case 4:
  12457. return new n(t[0], t[1], t[2], t[3]);
  12458. case 5:
  12459. return new n(t[0], t[1], t[2], t[3], t[4]);
  12460. case 6:
  12461. return new n(t[0], t[1], t[2], t[3], t[4], t[5]);
  12462. case 7:
  12463. return new n(t[0], t[1], t[2], t[3], t[4], t[5], t[6]);
  12464. }
  12465. var r = ro(n.prototype),
  12466. t = n.apply(r, t);
  12467. return gu(t) ? t : r;
  12468. };
  12469. }
  12470. function Kr(t, r, e) {
  12471. function u() {
  12472. for (var o = arguments.length, f = Vu(o), c = o, a = de(u); c--;) {
  12473. f[c] = arguments[c];
  12474. }
  12475. 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);
  12476. }
  12477. var i = Vr(t);
  12478. return u;
  12479. }
  12480. function Gr(n) {
  12481. return function (t, r, e) {
  12482. var u = Yu(t);
  12483. if (!lu(t)) {
  12484. var i = ye(r, 3);
  12485. t = zu(t), r = function r(n) {
  12486. return i(u[n], n, u);
  12487. };
  12488. }
  12489. return r = n(t, r, e), -1 < r ? u[i ? t[r] : r] : T;
  12490. };
  12491. }
  12492. function Hr(n) {
  12493. return pe(function (t) {
  12494. var r = t.length,
  12495. e = r,
  12496. u = On.prototype.thru;
  12497. for (n && t.reverse(); e--;) {
  12498. var i = t[e];
  12499. if (typeof i != "function") throw new ni("Expected a function");
  12500. if (u && !o && "wrapper" == ge(i)) var o = new On([], true);
  12501. }
  12502. for (e = o ? e : r; ++e < r;) {
  12503. var i = t[e],
  12504. u = ge(i),
  12505. f = "wrapper" == u ? so(i) : T,
  12506. 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);
  12507. }
  12508. return function () {
  12509. var n = arguments,
  12510. e = n[0];
  12511. if (o && 1 == n.length && of(e)) return o.plant(e).value();
  12512. for (var u = 0, n = r ? t[u].apply(this, n) : e; ++u < r;) {
  12513. n = t[u].call(this, n);
  12514. }
  12515. return n;
  12516. };
  12517. });
  12518. }
  12519. function Jr(n, t, r, e, u, i, o, f, c, a) {
  12520. function l() {
  12521. for (var d = arguments.length, y = Vu(d), b = d; b--;) {
  12522. y[b] = arguments[b];
  12523. }
  12524. if (_) {
  12525. var x,
  12526. j = de(l),
  12527. b = y.length;
  12528. for (x = 0; b--;) {
  12529. y[b] === j && ++x;
  12530. }
  12531. }
  12532. 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);
  12533. if (j = h ? r : this, b = p ? j[n] : n, d = y.length, f) {
  12534. x = y.length;
  12535. for (var w = Ui(f.length, x), m = Ur(y); w--;) {
  12536. var A = f[w];
  12537. y[w] = Se(A, x) ? m[A] : T;
  12538. }
  12539. } else v && 1 < d && y.reverse();
  12540. return s && c < d && (y.length = c), this && this !== $n && this instanceof l && (b = g || Vr(b)), b.apply(j, y);
  12541. }
  12542. var s = 128 & t,
  12543. h = 1 & t,
  12544. p = 2 & t,
  12545. _ = 24 & t,
  12546. v = 512 & t,
  12547. g = p ? T : Vr(n);
  12548. return l;
  12549. }
  12550. function Yr(n, t) {
  12551. return function (r, e) {
  12552. return Bt(r, n, t(e));
  12553. };
  12554. }
  12555. function Qr(n, t) {
  12556. return function (r, e) {
  12557. var u;
  12558. if (r === T && e === T) return t;
  12559. if (r !== T && (u = r), e !== T) {
  12560. if (u === T) return e;
  12561. typeof r == "string" || typeof e == "string" ? (r = yr(r), e = yr(e)) : (r = dr(r), e = dr(e)), u = n(r, e);
  12562. }
  12563. return u;
  12564. };
  12565. }
  12566. function Xr(t) {
  12567. return pe(function (r) {
  12568. return r = c(r, k(ye())), fr(function (e) {
  12569. var u = this;
  12570. return t(r, function (t) {
  12571. return n(t, u, e);
  12572. });
  12573. });
  12574. });
  12575. }
  12576. function ne(n, t) {
  12577. t = t === T ? " " : yr(t);
  12578. var r = t.length;
  12579. 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));
  12580. }
  12581. function te(t, r, e, u) {
  12582. function i() {
  12583. 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;) {
  12584. s[a] = u[a];
  12585. }
  12586. for (; c--;) {
  12587. s[a++] = arguments[++r];
  12588. }
  12589. return n(h, o ? e : this, s);
  12590. }
  12591. var o = 1 & r,
  12592. f = Vr(t);
  12593. return i;
  12594. }
  12595. function re(n) {
  12596. return function (t, r, e) {
  12597. 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);
  12598. var u = -1;
  12599. r = Li(Si((r - t) / (e || 1)), 0);
  12600. for (var i = Vu(r); r--;) {
  12601. i[n ? r : ++u] = t, t += e;
  12602. }
  12603. return i;
  12604. };
  12605. }
  12606. function ee(n) {
  12607. return function (t, r) {
  12608. return typeof t == "string" && typeof r == "string" || (t = ku(t), r = ku(r)), n(t, r);
  12609. };
  12610. }
  12611. function ue(n, t, r, e, u, i, o, f, c, a) {
  12612. var l = 8 & t,
  12613. s = l ? o : T;
  12614. o = l ? T : o;
  12615. var h = l ? i : T;
  12616. 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);
  12617. }
  12618. function ie(n) {
  12619. var t = Ju[n];
  12620. return function (n, r) {
  12621. if (n = ku(n), r = null == r ? 0 : Ui(Au(r), 292)) {
  12622. var e = (Ou(n) + "e").split("e"),
  12623. e = t(e[0] + "e" + (+e[1] + r)),
  12624. e = (Ou(e) + "e").split("e");
  12625. return +(e[0] + "e" + (+e[1] - r));
  12626. }
  12627. return t(n);
  12628. };
  12629. }
  12630. function oe(n) {
  12631. return function (t) {
  12632. var r = _o(t);
  12633. return "[object Map]" == r ? W(t) : "[object Set]" == r ? C(t) : E(t, n(t));
  12634. };
  12635. }
  12636. function fe(n, t, r, e, u, i, o, f) {
  12637. var c = 2 & t;
  12638. if (!c && typeof n != "function") throw new ni("Expected a function");
  12639. var a = e ? e.length : 0;
  12640. 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) {
  12641. var l = e,
  12642. s = u;
  12643. e = u = T;
  12644. }
  12645. var h = c ? T : so(n);
  12646. 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);
  12647. }
  12648. function ce(n, t, r, e) {
  12649. return n === T || au(n, ri[r]) && !ii.call(e, r) ? t : n;
  12650. }
  12651. function ae(n, t, r, e, u, i) {
  12652. return gu(n) && gu(t) && (i.set(t, n), Yt(n, t, T, ae, i), i.delete(t)), n;
  12653. }
  12654. function le(n) {
  12655. return bu(n) ? T : n;
  12656. }
  12657. function se(n, t, r, e, u, i) {
  12658. var o = 1 & r,
  12659. f = n.length,
  12660. c = t.length;
  12661. if (f != c && !(o && c > f)) return false;
  12662. if ((c = i.get(n)) && i.get(t)) return c == t;
  12663. var c = -1,
  12664. a = true,
  12665. l = 2 & r ? new Nn() : T;
  12666. for (i.set(n, t), i.set(t, n); ++c < f;) {
  12667. var s = n[c],
  12668. p = t[c];
  12669. if (e) var _ = o ? e(p, s, c, t, n, i) : e(s, p, c, n, t, i);
  12670. if (_ !== T) {
  12671. if (_) continue;
  12672. a = false;
  12673. break;
  12674. }
  12675. if (l) {
  12676. if (!h(t, function (n, t) {
  12677. if (!O(l, t) && (s === n || u(s, n, r, e, i))) return l.push(t);
  12678. })) {
  12679. a = false;
  12680. break;
  12681. }
  12682. } else if (s !== p && !u(s, p, r, e, i)) {
  12683. a = false;
  12684. break;
  12685. }
  12686. }
  12687. return i.delete(n), i.delete(t), a;
  12688. }
  12689. function he(n, t, r, e, u, i, o) {
  12690. switch (r) {
  12691. case "[object DataView]":
  12692. if (n.byteLength != t.byteLength || n.byteOffset != t.byteOffset) break;
  12693. n = n.buffer, t = t.buffer;
  12694. case "[object ArrayBuffer]":
  12695. if (n.byteLength != t.byteLength || !i(new _i(n), new _i(t))) break;
  12696. return true;
  12697. case "[object Boolean]":
  12698. case "[object Date]":
  12699. case "[object Number]":
  12700. return au(+n, +t);
  12701. case "[object Error]":
  12702. return n.name == t.name && n.message == t.message;
  12703. case "[object RegExp]":
  12704. case "[object String]":
  12705. return n == t + "";
  12706. case "[object Map]":
  12707. var f = W;
  12708. case "[object Set]":
  12709. if (f || (f = U), n.size != t.size && !(1 & e)) break;
  12710. 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);
  12711. case "[object Symbol]":
  12712. if (no) return no.call(n) == no.call(t);
  12713. }
  12714. return false;
  12715. }
  12716. function pe(n) {
  12717. return bo(Be(n, T, Pe), n + "");
  12718. }
  12719. function _e(n) {
  12720. return St(n, zu, ho);
  12721. }
  12722. function ve(n) {
  12723. return St(n, Wu, po);
  12724. }
  12725. function ge(n) {
  12726. for (var t = n.name + "", r = Ki[t], e = ii.call(Ki, t) ? r.length : 0; e--;) {
  12727. var u = r[e],
  12728. i = u.func;
  12729. if (null == i || i == n) return u.name;
  12730. }
  12731. return t;
  12732. }
  12733. function de(n) {
  12734. return (ii.call(An, "placeholder") ? An : n).placeholder;
  12735. }
  12736. function ye() {
  12737. var n = An.iteratee || $u,
  12738. n = n === $u ? qt : n;
  12739. return arguments.length ? n(arguments[0], arguments[1]) : n;
  12740. }
  12741. function be(n, t) {
  12742. var r = n.__data__,
  12743. e = _typeof(t);
  12744. return ("string" == e || "number" == e || "symbol" == e || "boolean" == e ? "__proto__" !== t : null === t) ? r[typeof t == "string" ? "string" : "hash"] : r.map;
  12745. }
  12746. function xe(n) {
  12747. for (var t = zu(n), r = t.length; r--;) {
  12748. var e = t[r],
  12749. u = n[e];
  12750. t[r] = [e, u, u === u && !gu(u)];
  12751. }
  12752. return t;
  12753. }
  12754. function je(n, t) {
  12755. var r = null == n ? T : n[t];
  12756. return Ft(r) ? r : T;
  12757. }
  12758. function we(n, t, r) {
  12759. t = Sr(t, n);
  12760. for (var e = -1, u = t.length, i = false; ++e < u;) {
  12761. var o = De(t[e]);
  12762. if (!(i = null != n && r(n, o))) break;
  12763. n = n[o];
  12764. }
  12765. return i || ++e != u ? i : (u = null == n ? 0 : n.length, !!u && vu(u) && Se(o, u) && (of(n) || uf(n)));
  12766. }
  12767. function me(n) {
  12768. var t = n.length,
  12769. r = new n.constructor(t);
  12770. return t && "string" == typeof n[0] && ii.call(n, "index") && (r.index = n.index, r.input = n.input), r;
  12771. }
  12772. function Ae(n) {
  12773. return typeof n.constructor != "function" || ze(n) ? {} : ro(gi(n));
  12774. }
  12775. function Ee(n, t, r) {
  12776. var e = n.constructor;
  12777. switch (t) {
  12778. case "[object ArrayBuffer]":
  12779. return Rr(n);
  12780. case "[object Boolean]":
  12781. case "[object Date]":
  12782. return new e(+n);
  12783. case "[object DataView]":
  12784. return t = r ? Rr(n.buffer) : n.buffer, new n.constructor(t, n.byteOffset, n.byteLength);
  12785. case "[object Float32Array]":
  12786. case "[object Float64Array]":
  12787. case "[object Int8Array]":
  12788. case "[object Int16Array]":
  12789. case "[object Int32Array]":
  12790. case "[object Uint8Array]":
  12791. case "[object Uint8ClampedArray]":
  12792. case "[object Uint16Array]":
  12793. case "[object Uint32Array]":
  12794. return zr(n, r);
  12795. case "[object Map]":
  12796. return new e();
  12797. case "[object Number]":
  12798. case "[object String]":
  12799. return new e(n);
  12800. case "[object RegExp]":
  12801. return t = new n.constructor(n.source, _n.exec(n)), t.lastIndex = n.lastIndex, t;
  12802. case "[object Set]":
  12803. return new e();
  12804. case "[object Symbol]":
  12805. return no ? Yu(no.call(n)) : {};
  12806. }
  12807. }
  12808. function ke(n) {
  12809. return of(n) || uf(n) || !!(xi && n && n[xi]);
  12810. }
  12811. function Se(n, t) {
  12812. var r = _typeof(n);
  12813. return t = null == t ? 9007199254740991 : t, !!t && ("number" == r || "symbol" != r && bn.test(n)) && -1 < n && 0 == n % 1 && n < t;
  12814. }
  12815. function Oe(n, t, r) {
  12816. if (!gu(r)) return false;
  12817. var e = _typeof(t);
  12818. return !!("number" == e ? lu(r) && Se(t, r.length) : "string" == e && t in r) && au(r[t], n);
  12819. }
  12820. function Ie(n, t) {
  12821. if (of(n)) return false;
  12822. var r = _typeof(n);
  12823. return !("number" != r && "symbol" != r && "boolean" != r && null != n && !ju(n)) || nn.test(n) || !X.test(n) || null != t && n in Yu(t);
  12824. }
  12825. function Re(n) {
  12826. var t = ge(n),
  12827. r = An[t];
  12828. return typeof r == "function" && t in Un.prototype && (n === r || (t = so(r), !!t && n === t[0]));
  12829. }
  12830. function ze(n) {
  12831. var t = n && n.constructor;
  12832. return n === (typeof t == "function" && t.prototype || ri);
  12833. }
  12834. function We(n, t) {
  12835. return function (r) {
  12836. return null != r && r[n] === t && (t !== T || n in Yu(r));
  12837. };
  12838. }
  12839. function Be(t, r, e) {
  12840. return r = Li(r === T ? t.length - 1 : r, 0), function () {
  12841. for (var u = arguments, i = -1, o = Li(u.length - r, 0), f = Vu(o); ++i < o;) {
  12842. f[i] = u[r + i];
  12843. }
  12844. for (i = -1, o = Vu(r + 1); ++i < r;) {
  12845. o[i] = u[i];
  12846. }
  12847. return o[r] = e(f), n(t, this, o);
  12848. };
  12849. }
  12850. function Le(n, t, r) {
  12851. var e = t + "";
  12852. t = bo;
  12853. var u,
  12854. i = Te;
  12855. 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);
  12856. }
  12857. function Ue(n) {
  12858. var t = 0,
  12859. r = 0;
  12860. return function () {
  12861. var e = Ci(),
  12862. u = 16 - (e - r);
  12863. if (r = e, 0 < u) {
  12864. if (800 <= ++t) return arguments[0];
  12865. } else t = 0;
  12866. return n.apply(T, arguments);
  12867. };
  12868. }
  12869. function Ce(n, t) {
  12870. var r = -1,
  12871. e = n.length,
  12872. u = e - 1;
  12873. for (t = t === T ? e : t; ++r < t;) {
  12874. var e = ir(r, u),
  12875. i = n[e];
  12876. n[e] = n[r], n[r] = i;
  12877. }
  12878. return n.length = t, n;
  12879. }
  12880. function De(n) {
  12881. if (typeof n == "string" || ju(n)) return n;
  12882. var t = n + "";
  12883. return "0" == t && 1 / n == -$ ? "-0" : t;
  12884. }
  12885. function Me(n) {
  12886. if (null != n) {
  12887. try {
  12888. return ui.call(n);
  12889. } catch (n) {}
  12890. return n + "";
  12891. }
  12892. return "";
  12893. }
  12894. function Te(n, t) {
  12895. return r(N, function (r) {
  12896. var e = "_." + r[0];
  12897. t & r[1] && !o(n, e) && n.push(e);
  12898. }), n.sort();
  12899. }
  12900. function $e(n) {
  12901. if (n instanceof Un) return n.clone();
  12902. var t = new On(n.__wrapped__, n.__chain__);
  12903. return t.__actions__ = Ur(n.__actions__), t.__index__ = n.__index__, t.__values__ = n.__values__, t;
  12904. }
  12905. function Fe(n, t, r) {
  12906. var e = null == n ? 0 : n.length;
  12907. return e ? (r = null == r ? 0 : Au(r), 0 > r && (r = Li(e + r, 0)), _(n, ye(t, 3), r)) : -1;
  12908. }
  12909. function Ne(n, t, r) {
  12910. var e = null == n ? 0 : n.length;
  12911. if (!e) return -1;
  12912. var u = e - 1;
  12913. return r !== T && (u = Au(r), u = 0 > r ? Li(e + u, 0) : Ui(u, e - 1)), _(n, ye(t, 3), u, true);
  12914. }
  12915. function Pe(n) {
  12916. return (null == n ? 0 : n.length) ? wt(n, 1) : [];
  12917. }
  12918. function Ze(n) {
  12919. return n && n.length ? n[0] : T;
  12920. }
  12921. function qe(n) {
  12922. var t = null == n ? 0 : n.length;
  12923. return t ? n[t - 1] : T;
  12924. }
  12925. function Ve(n, t) {
  12926. return n && n.length && t && t.length ? er(n, t) : n;
  12927. }
  12928. function Ke(n) {
  12929. return null == n ? n : Ti.call(n);
  12930. }
  12931. function Ge(n) {
  12932. if (!n || !n.length) return [];
  12933. var t = 0;
  12934. return n = i(n, function (n) {
  12935. if (su(n)) return t = Li(n.length, t), true;
  12936. }), A(t, function (t) {
  12937. return c(n, b(t));
  12938. });
  12939. }
  12940. function He(t, r) {
  12941. if (!t || !t.length) return [];
  12942. var e = Ge(t);
  12943. return null == r ? e : c(e, function (t) {
  12944. return n(r, T, t);
  12945. });
  12946. }
  12947. function Je(n) {
  12948. return n = An(n), n.__chain__ = true, n;
  12949. }
  12950. function Ye(n, t) {
  12951. return t(n);
  12952. }
  12953. function Qe() {
  12954. return this;
  12955. }
  12956. function Xe(n, t) {
  12957. return (of(n) ? r : eo)(n, ye(t, 3));
  12958. }
  12959. function nu(n, t) {
  12960. return (of(n) ? e : uo)(n, ye(t, 3));
  12961. }
  12962. function tu(n, t) {
  12963. return (of(n) ? c : Gt)(n, ye(t, 3));
  12964. }
  12965. function ru(n, t, r) {
  12966. return t = r ? T : t, t = n && null == t ? n.length : t, fe(n, 128, T, T, T, T, t);
  12967. }
  12968. function eu(n, t) {
  12969. var r;
  12970. if (typeof t != "function") throw new ni("Expected a function");
  12971. return n = Au(n), function () {
  12972. return 0 < --n && (r = t.apply(this, arguments)), 1 >= n && (t = T), r;
  12973. };
  12974. }
  12975. function uu(n, t, r) {
  12976. return t = r ? T : t, n = fe(n, 8, T, T, T, T, T, t), n.placeholder = uu.placeholder, n;
  12977. }
  12978. function iu(n, t, r) {
  12979. return t = r ? T : t, n = fe(n, 16, T, T, T, T, T, t), n.placeholder = iu.placeholder, n;
  12980. }
  12981. function ou(n, t, r) {
  12982. function e(t) {
  12983. var r = c,
  12984. e = a;
  12985. return c = a = T, _ = t, s = n.apply(e, r);
  12986. }
  12987. function u(n) {
  12988. var r = n - p;
  12989. return n -= _, p === T || r >= t || 0 > r || g && n >= l;
  12990. }
  12991. function i() {
  12992. var n = Ko();
  12993. if (u(n)) return o(n);
  12994. var r,
  12995. e = yo;
  12996. r = n - _, n = t - (n - p), r = g ? Ui(n, l - r) : n, h = e(i, r);
  12997. }
  12998. function o(n) {
  12999. return h = T, d && c ? e(n) : (c = a = T, s);
  13000. }
  13001. function f() {
  13002. var n = Ko(),
  13003. r = u(n);
  13004. if (c = arguments, a = this, p = n, r) {
  13005. if (h === T) return _ = n = p, h = yo(i, t), v ? e(n) : s;
  13006. if (g) return h = yo(i, t), e(p);
  13007. }
  13008. return h === T && (h = yo(i, t)), s;
  13009. }
  13010. var c,
  13011. a,
  13012. l,
  13013. s,
  13014. h,
  13015. p,
  13016. _ = 0,
  13017. v = false,
  13018. g = false,
  13019. d = true;
  13020. if (typeof n != "function") throw new ni("Expected a function");
  13021. 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 () {
  13022. h !== T && ao(h), _ = 0, c = p = a = h = T;
  13023. }, f.flush = function () {
  13024. return h === T ? s : o(Ko());
  13025. }, f;
  13026. }
  13027. function fu(n, t) {
  13028. function r() {
  13029. var e = arguments,
  13030. u = t ? t.apply(this, e) : e[0],
  13031. i = r.cache;
  13032. return i.has(u) ? i.get(u) : (e = n.apply(this, e), r.cache = i.set(u, e) || i, e);
  13033. }
  13034. if (typeof n != "function" || null != t && typeof t != "function") throw new ni("Expected a function");
  13035. return r.cache = new (fu.Cache || Fn)(), r;
  13036. }
  13037. function cu(n) {
  13038. if (typeof n != "function") throw new ni("Expected a function");
  13039. return function () {
  13040. var t = arguments;
  13041. switch (t.length) {
  13042. case 0:
  13043. return !n.call(this);
  13044. case 1:
  13045. return !n.call(this, t[0]);
  13046. case 2:
  13047. return !n.call(this, t[0], t[1]);
  13048. case 3:
  13049. return !n.call(this, t[0], t[1], t[2]);
  13050. }
  13051. return !n.apply(this, t);
  13052. };
  13053. }
  13054. function au(n, t) {
  13055. return n === t || n !== n && t !== t;
  13056. }
  13057. function lu(n) {
  13058. return null != n && vu(n.length) && !pu(n);
  13059. }
  13060. function su(n) {
  13061. return du(n) && lu(n);
  13062. }
  13063. function hu(n) {
  13064. if (!du(n)) return false;
  13065. var t = Ot(n);
  13066. return "[object Error]" == t || "[object DOMException]" == t || typeof n.message == "string" && typeof n.name == "string" && !bu(n);
  13067. }
  13068. function pu(n) {
  13069. return !!gu(n) && (n = Ot(n), "[object Function]" == n || "[object GeneratorFunction]" == n || "[object AsyncFunction]" == n || "[object Proxy]" == n);
  13070. }
  13071. function _u(n) {
  13072. return typeof n == "number" && n == Au(n);
  13073. }
  13074. function vu(n) {
  13075. return typeof n == "number" && -1 < n && 0 == n % 1 && 9007199254740991 >= n;
  13076. }
  13077. function gu(n) {
  13078. var t = _typeof(n);
  13079. return null != n && ("object" == t || "function" == t);
  13080. }
  13081. function du(n) {
  13082. return null != n && _typeof(n) == "object";
  13083. }
  13084. function yu(n) {
  13085. return typeof n == "number" || du(n) && "[object Number]" == Ot(n);
  13086. }
  13087. function bu(n) {
  13088. 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));
  13089. }
  13090. function xu(n) {
  13091. return typeof n == "string" || !of(n) && du(n) && "[object String]" == Ot(n);
  13092. }
  13093. function ju(n) {
  13094. return _typeof(n) == "symbol" || du(n) && "[object Symbol]" == Ot(n);
  13095. }
  13096. function wu(n) {
  13097. if (!n) return [];
  13098. if (lu(n)) return xu(n) ? M(n) : Ur(n);
  13099. if (ji && n[ji]) {
  13100. n = n[ji]();
  13101. for (var t, r = []; !(t = n.next()).done;) {
  13102. r.push(t.value);
  13103. }
  13104. return r;
  13105. }
  13106. return t = _o(n), ("[object Map]" == t ? W : "[object Set]" == t ? U : Lu)(n);
  13107. }
  13108. function mu(n) {
  13109. return n ? (n = ku(n), n === $ || n === -$ ? 1.7976931348623157e308 * (0 > n ? -1 : 1) : n === n ? n : 0) : 0 === n ? n : 0;
  13110. }
  13111. function Au(n) {
  13112. n = mu(n);
  13113. var t = n % 1;
  13114. return n === n ? t ? n - t : n : 0;
  13115. }
  13116. function Eu(n) {
  13117. return n ? pt(Au(n), 0, 4294967295) : 0;
  13118. }
  13119. function ku(n) {
  13120. if (typeof n == "number") return n;
  13121. if (ju(n)) return F;
  13122. if (gu(n) && (n = typeof n.valueOf == "function" ? n.valueOf() : n, n = gu(n) ? n + "" : n), typeof n != "string") return 0 === n ? n : +n;
  13123. n = n.replace(un, "");
  13124. var t = gn.test(n);
  13125. return t || yn.test(n) ? Dn(n.slice(2), t ? 2 : 8) : vn.test(n) ? F : +n;
  13126. }
  13127. function Su(n) {
  13128. return Cr(n, Wu(n));
  13129. }
  13130. function Ou(n) {
  13131. return null == n ? "" : yr(n);
  13132. }
  13133. function Iu(n, t, r) {
  13134. return n = null == n ? T : kt(n, t), n === T ? r : n;
  13135. }
  13136. function Ru(n, t) {
  13137. return null != n && we(n, t, zt);
  13138. }
  13139. function zu(n) {
  13140. return lu(n) ? qn(n) : Vt(n);
  13141. }
  13142. function Wu(n) {
  13143. if (lu(n)) n = qn(n, true);else if (gu(n)) {
  13144. var t,
  13145. r = ze(n),
  13146. e = [];
  13147. for (t in n) {
  13148. ("constructor" != t || !r && ii.call(n, t)) && e.push(t);
  13149. }
  13150. n = e;
  13151. } else {
  13152. if (t = [], null != n) for (r in Yu(n)) {
  13153. t.push(r);
  13154. }
  13155. n = t;
  13156. }
  13157. return n;
  13158. }
  13159. function Bu(n, t) {
  13160. if (null == n) return {};
  13161. var r = c(ve(n), function (n) {
  13162. return [n];
  13163. });
  13164. return t = ye(t), tr(n, r, function (n, r) {
  13165. return t(n, r[0]);
  13166. });
  13167. }
  13168. function Lu(n) {
  13169. return null == n ? [] : S(n, zu(n));
  13170. }
  13171. function Uu(n) {
  13172. return Tf(Ou(n).toLowerCase());
  13173. }
  13174. function Cu(n) {
  13175. return (n = Ou(n)) && n.replace(xn, Xn).replace(Sn, "");
  13176. }
  13177. function Du(n, t, r) {
  13178. return n = Ou(n), t = r ? T : t, t === T ? zn.test(n) ? n.match(In) || [] : n.match(sn) || [] : n.match(t) || [];
  13179. }
  13180. function Mu(n) {
  13181. return function () {
  13182. return n;
  13183. };
  13184. }
  13185. function Tu(n) {
  13186. return n;
  13187. }
  13188. function $u(n) {
  13189. return qt(typeof n == "function" ? n : _t(n, 1));
  13190. }
  13191. function Fu(n, t, e) {
  13192. var u = zu(t),
  13193. i = Et(t, u);
  13194. null != e || gu(t) && (i.length || !u.length) || (e = t, t = n, n = this, i = Et(t, zu(t)));
  13195. var o = !(gu(e) && "chain" in e && !e.chain),
  13196. f = pu(n);
  13197. return r(i, function (r) {
  13198. var e = t[r];
  13199. n[r] = e, f && (n.prototype[r] = function () {
  13200. var t = this.__chain__;
  13201. if (o || t) {
  13202. var r = n(this.__wrapped__);
  13203. return (r.__actions__ = Ur(this.__actions__)).push({
  13204. func: e,
  13205. args: arguments,
  13206. thisArg: n
  13207. }), r.__chain__ = t, r;
  13208. }
  13209. return e.apply(n, a([this.value()], arguments));
  13210. });
  13211. }), n;
  13212. }
  13213. function Nu() {}
  13214. function Pu(n) {
  13215. return Ie(n) ? b(De(n)) : rr(n);
  13216. }
  13217. function Zu() {
  13218. return [];
  13219. }
  13220. function qu() {
  13221. return false;
  13222. }
  13223. mn = null == mn ? $n : rt.defaults($n.Object(), mn, rt.pick($n, Wn));
  13224. var Vu = mn.Array,
  13225. Ku = mn.Date,
  13226. Gu = mn.Error,
  13227. Hu = mn.Function,
  13228. Ju = mn.Math,
  13229. Yu = mn.Object,
  13230. Qu = mn.RegExp,
  13231. Xu = mn.String,
  13232. ni = mn.TypeError,
  13233. ti = Vu.prototype,
  13234. ri = Yu.prototype,
  13235. ei = mn["__core-js_shared__"],
  13236. ui = Hu.prototype.toString,
  13237. ii = ri.hasOwnProperty,
  13238. oi = 0,
  13239. fi = function () {
  13240. var n = /[^.]+$/.exec(ei && ei.keys && ei.keys.IE_PROTO || "");
  13241. return n ? "Symbol(src)_1." + n : "";
  13242. }(),
  13243. ci = ri.toString,
  13244. ai = ui.call(Yu),
  13245. li = $n._,
  13246. si = Qu("^" + ui.call(ii).replace(rn, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"),
  13247. hi = Pn ? mn.Buffer : T,
  13248. pi = mn.Symbol,
  13249. _i = mn.Uint8Array,
  13250. vi = hi ? hi.g : T,
  13251. gi = B(Yu.getPrototypeOf, Yu),
  13252. di = Yu.create,
  13253. yi = ri.propertyIsEnumerable,
  13254. bi = ti.splice,
  13255. xi = pi ? pi.isConcatSpreadable : T,
  13256. ji = pi ? pi.iterator : T,
  13257. wi = pi ? pi.toStringTag : T,
  13258. mi = function () {
  13259. try {
  13260. var n = je(Yu, "defineProperty");
  13261. return n({}, "", {}), n;
  13262. } catch (n) {}
  13263. }(),
  13264. Ai = mn.clearTimeout !== $n.clearTimeout && mn.clearTimeout,
  13265. Ei = Ku && Ku.now !== $n.Date.now && Ku.now,
  13266. ki = mn.setTimeout !== $n.setTimeout && mn.setTimeout,
  13267. Si = Ju.ceil,
  13268. Oi = Ju.floor,
  13269. Ii = Yu.getOwnPropertySymbols,
  13270. Ri = hi ? hi.isBuffer : T,
  13271. zi = mn.isFinite,
  13272. Wi = ti.join,
  13273. Bi = B(Yu.keys, Yu),
  13274. Li = Ju.max,
  13275. Ui = Ju.min,
  13276. Ci = Ku.now,
  13277. Di = mn.parseInt,
  13278. Mi = Ju.random,
  13279. Ti = ti.reverse,
  13280. $i = je(mn, "DataView"),
  13281. Fi = je(mn, "Map"),
  13282. Ni = je(mn, "Promise"),
  13283. Pi = je(mn, "Set"),
  13284. Zi = je(mn, "WeakMap"),
  13285. qi = je(Yu, "create"),
  13286. Vi = Zi && new Zi(),
  13287. Ki = {},
  13288. Gi = Me($i),
  13289. Hi = Me(Fi),
  13290. Ji = Me(Ni),
  13291. Yi = Me(Pi),
  13292. Qi = Me(Zi),
  13293. Xi = pi ? pi.prototype : T,
  13294. no = Xi ? Xi.valueOf : T,
  13295. to = Xi ? Xi.toString : T,
  13296. ro = function () {
  13297. function n() {}
  13298. return function (t) {
  13299. return gu(t) ? di ? di(t) : (n.prototype = t, t = new n(), n.prototype = T, t) : {};
  13300. };
  13301. }();
  13302. An.templateSettings = {
  13303. escape: J,
  13304. evaluate: Y,
  13305. interpolate: Q,
  13306. variable: "",
  13307. imports: {
  13308. _: An
  13309. }
  13310. }, 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 () {
  13311. this.__data__ = qi ? qi(null) : {}, this.size = 0;
  13312. }, Mn.prototype.delete = function (n) {
  13313. return n = this.has(n) && delete this.__data__[n], this.size -= n ? 1 : 0, n;
  13314. }, Mn.prototype.get = function (n) {
  13315. var t = this.__data__;
  13316. return qi ? (n = t[n], "__lodash_hash_undefined__" === n ? T : n) : ii.call(t, n) ? t[n] : T;
  13317. }, Mn.prototype.has = function (n) {
  13318. var t = this.__data__;
  13319. return qi ? t[n] !== T : ii.call(t, n);
  13320. }, Mn.prototype.set = function (n, t) {
  13321. var r = this.__data__;
  13322. return this.size += this.has(n) ? 0 : 1, r[n] = qi && t === T ? "__lodash_hash_undefined__" : t, this;
  13323. }, Tn.prototype.clear = function () {
  13324. this.__data__ = [], this.size = 0;
  13325. }, Tn.prototype.delete = function (n) {
  13326. var t = this.__data__;
  13327. return n = ft(t, n), !(0 > n) && (n == t.length - 1 ? t.pop() : bi.call(t, n, 1), --this.size, true);
  13328. }, Tn.prototype.get = function (n) {
  13329. var t = this.__data__;
  13330. return n = ft(t, n), 0 > n ? T : t[n][1];
  13331. }, Tn.prototype.has = function (n) {
  13332. return -1 < ft(this.__data__, n);
  13333. }, Tn.prototype.set = function (n, t) {
  13334. var r = this.__data__,
  13335. e = ft(r, n);
  13336. return 0 > e ? (++this.size, r.push([n, t])) : r[e][1] = t, this;
  13337. }, Fn.prototype.clear = function () {
  13338. this.size = 0, this.__data__ = {
  13339. hash: new Mn(),
  13340. map: new (Fi || Tn)(),
  13341. string: new Mn()
  13342. };
  13343. }, Fn.prototype.delete = function (n) {
  13344. return n = be(this, n).delete(n), this.size -= n ? 1 : 0, n;
  13345. }, Fn.prototype.get = function (n) {
  13346. return be(this, n).get(n);
  13347. }, Fn.prototype.has = function (n) {
  13348. return be(this, n).has(n);
  13349. }, Fn.prototype.set = function (n, t) {
  13350. var r = be(this, n),
  13351. e = r.size;
  13352. return r.set(n, t), this.size += r.size == e ? 0 : 1, this;
  13353. }, Nn.prototype.add = Nn.prototype.push = function (n) {
  13354. return this.__data__.set(n, "__lodash_hash_undefined__"), this;
  13355. }, Nn.prototype.has = function (n) {
  13356. return this.__data__.has(n);
  13357. }, Zn.prototype.clear = function () {
  13358. this.__data__ = new Tn(), this.size = 0;
  13359. }, Zn.prototype.delete = function (n) {
  13360. var t = this.__data__;
  13361. return n = t.delete(n), this.size = t.size, n;
  13362. }, Zn.prototype.get = function (n) {
  13363. return this.__data__.get(n);
  13364. }, Zn.prototype.has = function (n) {
  13365. return this.__data__.has(n);
  13366. }, Zn.prototype.set = function (n, t) {
  13367. var r = this.__data__;
  13368. if (r instanceof Tn) {
  13369. var e = r.__data__;
  13370. if (!Fi || 199 > e.length) return e.push([n, t]), this.size = ++r.size, this;
  13371. r = this.__data__ = new Fn(e);
  13372. }
  13373. return r.set(n, t), this.size = r.size, this;
  13374. };
  13375. var eo = Fr(mt),
  13376. uo = Fr(At, true),
  13377. io = Nr(),
  13378. oo = Nr(true),
  13379. fo = Vi ? function (n, t) {
  13380. return Vi.set(n, t), n;
  13381. } : Tu,
  13382. co = mi ? function (n, t) {
  13383. return mi(n, "toString", {
  13384. configurable: true,
  13385. enumerable: false,
  13386. value: Mu(t),
  13387. writable: true
  13388. });
  13389. } : Tu,
  13390. ao = Ai || function (n) {
  13391. return $n.clearTimeout(n);
  13392. },
  13393. lo = Pi && 1 / U(new Pi([, -0]))[1] == $ ? function (n) {
  13394. return new Pi(n);
  13395. } : Nu,
  13396. so = Vi ? function (n) {
  13397. return Vi.get(n);
  13398. } : Nu,
  13399. ho = Ii ? function (n) {
  13400. return null == n ? [] : (n = Yu(n), i(Ii(n), function (t) {
  13401. return yi.call(n, t);
  13402. }));
  13403. } : Zu,
  13404. po = Ii ? function (n) {
  13405. for (var t = []; n;) {
  13406. a(t, ho(n)), n = gi(n);
  13407. }
  13408. return t;
  13409. } : Zu,
  13410. _o = Ot;
  13411. ($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) {
  13412. var t = Ot(n);
  13413. if (n = (n = "[object Object]" == t ? n.constructor : T) ? Me(n) : "") switch (n) {
  13414. case Gi:
  13415. return "[object DataView]";
  13416. case Hi:
  13417. return "[object Map]";
  13418. case Ji:
  13419. return "[object Promise]";
  13420. case Yi:
  13421. return "[object Set]";
  13422. case Qi:
  13423. return "[object WeakMap]";
  13424. }
  13425. return t;
  13426. });
  13427. var vo = ei ? pu : qu,
  13428. go = Ue(fo),
  13429. yo = ki || function (n, t) {
  13430. return $n.setTimeout(n, t);
  13431. },
  13432. bo = Ue(co),
  13433. xo = function (n) {
  13434. n = fu(n, function (n) {
  13435. return 500 === t.size && t.clear(), n;
  13436. });
  13437. var t = n.cache;
  13438. return n;
  13439. }(function (n) {
  13440. var t = [];
  13441. return 46 === n.charCodeAt(0) && t.push(""), n.replace(tn, function (n, r, e, u) {
  13442. t.push(e ? u.replace(hn, "$1") : r || n);
  13443. }), t;
  13444. }),
  13445. jo = fr(function (n, t) {
  13446. return su(n) ? yt(n, wt(t, 1, su, true)) : [];
  13447. }),
  13448. wo = fr(function (n, t) {
  13449. var r = qe(t);
  13450. return su(r) && (r = T), su(n) ? yt(n, wt(t, 1, su, true), ye(r, 2)) : [];
  13451. }),
  13452. mo = fr(function (n, t) {
  13453. var r = qe(t);
  13454. return su(r) && (r = T), su(n) ? yt(n, wt(t, 1, su, true), T, r) : [];
  13455. }),
  13456. Ao = fr(function (n) {
  13457. var t = c(n, Er);
  13458. return t.length && t[0] === n[0] ? Wt(t) : [];
  13459. }),
  13460. Eo = fr(function (n) {
  13461. var t = qe(n),
  13462. r = c(n, Er);
  13463. return t === qe(r) ? t = T : r.pop(), r.length && r[0] === n[0] ? Wt(r, ye(t, 2)) : [];
  13464. }),
  13465. ko = fr(function (n) {
  13466. var t = qe(n),
  13467. r = c(n, Er);
  13468. return (t = typeof t == "function" ? t : T) && r.pop(), r.length && r[0] === n[0] ? Wt(r, T, t) : [];
  13469. }),
  13470. So = fr(Ve),
  13471. Oo = pe(function (n, t) {
  13472. var r = null == n ? 0 : n.length,
  13473. e = ht(n, t);
  13474. return ur(n, c(t, function (n) {
  13475. return Se(n, r) ? +n : n;
  13476. }).sort(Wr)), e;
  13477. }),
  13478. Io = fr(function (n) {
  13479. return br(wt(n, 1, su, true));
  13480. }),
  13481. Ro = fr(function (n) {
  13482. var t = qe(n);
  13483. return su(t) && (t = T), br(wt(n, 1, su, true), ye(t, 2));
  13484. }),
  13485. zo = fr(function (n) {
  13486. var t = qe(n),
  13487. t = typeof t == "function" ? t : T;
  13488. return br(wt(n, 1, su, true), T, t);
  13489. }),
  13490. Wo = fr(function (n, t) {
  13491. return su(n) ? yt(n, t) : [];
  13492. }),
  13493. Bo = fr(function (n) {
  13494. return mr(i(n, su));
  13495. }),
  13496. Lo = fr(function (n) {
  13497. var t = qe(n);
  13498. return su(t) && (t = T), mr(i(n, su), ye(t, 2));
  13499. }),
  13500. Uo = fr(function (n) {
  13501. var t = qe(n),
  13502. t = typeof t == "function" ? t : T;
  13503. return mr(i(n, su), T, t);
  13504. }),
  13505. Co = fr(Ge),
  13506. Do = fr(function (n) {
  13507. var t = n.length,
  13508. t = 1 < t ? n[t - 1] : T,
  13509. t = typeof t == "function" ? (n.pop(), t) : T;
  13510. return He(n, t);
  13511. }),
  13512. Mo = pe(function (n) {
  13513. function t(t) {
  13514. return ht(t, n);
  13515. }
  13516. var r = n.length,
  13517. e = r ? n[0] : 0,
  13518. u = this.__wrapped__;
  13519. return !(1 < r || this.__actions__.length) && u instanceof Un && Se(e) ? (u = u.slice(e, +e + (r ? 1 : 0)), u.__actions__.push({
  13520. func: Ye,
  13521. args: [t],
  13522. thisArg: T
  13523. }), new On(u, this.__chain__).thru(function (n) {
  13524. return r && !n.length && n.push(T), n;
  13525. })) : this.thru(t);
  13526. }),
  13527. To = Tr(function (n, t, r) {
  13528. ii.call(n, r) ? ++n[r] : st(n, r, 1);
  13529. }),
  13530. $o = Gr(Fe),
  13531. Fo = Gr(Ne),
  13532. No = Tr(function (n, t, r) {
  13533. ii.call(n, r) ? n[r].push(t) : st(n, r, [t]);
  13534. }),
  13535. Po = fr(function (t, r, e) {
  13536. var u = -1,
  13537. i = typeof r == "function",
  13538. o = lu(t) ? Vu(t.length) : [];
  13539. return eo(t, function (t) {
  13540. o[++u] = i ? n(r, t, e) : Lt(t, r, e);
  13541. }), o;
  13542. }),
  13543. Zo = Tr(function (n, t, r) {
  13544. st(n, r, t);
  13545. }),
  13546. qo = Tr(function (n, t, r) {
  13547. n[r ? 0 : 1].push(t);
  13548. }, function () {
  13549. return [[], []];
  13550. }),
  13551. Vo = fr(function (n, t) {
  13552. if (null == n) return [];
  13553. var r = t.length;
  13554. 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), []);
  13555. }),
  13556. Ko = Ei || function () {
  13557. return $n.Date.now();
  13558. },
  13559. Go = fr(function (n, t, r) {
  13560. var e = 1;
  13561. if (r.length) var u = L(r, de(Go)),
  13562. e = 32 | e;
  13563. return fe(n, e, t, r, u);
  13564. }),
  13565. Ho = fr(function (n, t, r) {
  13566. var e = 3;
  13567. if (r.length) var u = L(r, de(Ho)),
  13568. e = 32 | e;
  13569. return fe(t, e, n, r, u);
  13570. }),
  13571. Jo = fr(function (n, t) {
  13572. return dt(n, 1, t);
  13573. }),
  13574. Yo = fr(function (n, t, r) {
  13575. return dt(n, ku(t) || 0, r);
  13576. });
  13577. fu.Cache = Fn;
  13578. var Qo = fr(function (t, r) {
  13579. r = 1 == r.length && of(r[0]) ? c(r[0], k(ye())) : c(wt(r, 1), k(ye()));
  13580. var e = r.length;
  13581. return fr(function (u) {
  13582. for (var i = -1, o = Ui(u.length, e); ++i < o;) {
  13583. u[i] = r[i].call(this, u[i]);
  13584. }
  13585. return n(t, this, u);
  13586. });
  13587. }),
  13588. Xo = fr(function (n, t) {
  13589. return fe(n, 32, T, t, L(t, de(Xo)));
  13590. }),
  13591. nf = fr(function (n, t) {
  13592. return fe(n, 64, T, t, L(t, de(nf)));
  13593. }),
  13594. tf = pe(function (n, t) {
  13595. return fe(n, 256, T, T, T, t);
  13596. }),
  13597. rf = ee(It),
  13598. ef = ee(function (n, t) {
  13599. return n >= t;
  13600. }),
  13601. uf = Ut(function () {
  13602. return arguments;
  13603. }()) ? Ut : function (n) {
  13604. return du(n) && ii.call(n, "callee") && !yi.call(n, "callee");
  13605. },
  13606. of = Vu.isArray,
  13607. ff = Vn ? k(Vn) : Ct,
  13608. cf = Ri || qu,
  13609. af = Kn ? k(Kn) : Dt,
  13610. lf = Gn ? k(Gn) : Tt,
  13611. sf = Hn ? k(Hn) : Nt,
  13612. hf = Jn ? k(Jn) : Pt,
  13613. pf = Yn ? k(Yn) : Zt,
  13614. _f = ee(Kt),
  13615. vf = ee(function (n, t) {
  13616. return n <= t;
  13617. }),
  13618. gf = $r(function (n, t) {
  13619. if (ze(t) || lu(t)) Cr(t, zu(t), n);else for (var r in t) {
  13620. ii.call(t, r) && ot(n, r, t[r]);
  13621. }
  13622. }),
  13623. df = $r(function (n, t) {
  13624. Cr(t, Wu(t), n);
  13625. }),
  13626. yf = $r(function (n, t, r, e) {
  13627. Cr(t, Wu(t), n, e);
  13628. }),
  13629. bf = $r(function (n, t, r, e) {
  13630. Cr(t, zu(t), n, e);
  13631. }),
  13632. xf = pe(ht),
  13633. jf = fr(function (n, t) {
  13634. n = Yu(n);
  13635. var r = -1,
  13636. e = t.length,
  13637. u = 2 < e ? t[2] : T;
  13638. for (u && Oe(t[0], t[1], u) && (e = 1); ++r < e;) {
  13639. for (var u = t[r], i = Wu(u), o = -1, f = i.length; ++o < f;) {
  13640. var c = i[o],
  13641. a = n[c];
  13642. (a === T || au(a, ri[c]) && !ii.call(n, c)) && (n[c] = u[c]);
  13643. }
  13644. }
  13645. return n;
  13646. }),
  13647. wf = fr(function (t) {
  13648. return t.push(T, ae), n(Sf, T, t);
  13649. }),
  13650. mf = Yr(function (n, t, r) {
  13651. null != t && typeof t.toString != "function" && (t = ci.call(t)), n[t] = r;
  13652. }, Mu(Tu)),
  13653. Af = Yr(function (n, t, r) {
  13654. null != t && typeof t.toString != "function" && (t = ci.call(t)), ii.call(n, t) ? n[t].push(r) : n[t] = [r];
  13655. }, ye),
  13656. Ef = fr(Lt),
  13657. kf = $r(function (n, t, r) {
  13658. Yt(n, t, r);
  13659. }),
  13660. Sf = $r(function (n, t, r, e) {
  13661. Yt(n, t, r, e);
  13662. }),
  13663. Of = pe(function (n, t) {
  13664. var r = {};
  13665. if (null == n) return r;
  13666. var e = false;
  13667. t = c(t, function (t) {
  13668. return t = Sr(t, n), e || (e = 1 < t.length), t;
  13669. }), Cr(n, ve(n), r), e && (r = _t(r, 7, le));
  13670. for (var u = t.length; u--;) {
  13671. xr(r, t[u]);
  13672. }
  13673. return r;
  13674. }),
  13675. If = pe(function (n, t) {
  13676. return null == n ? {} : nr(n, t);
  13677. }),
  13678. Rf = oe(zu),
  13679. zf = oe(Wu),
  13680. Wf = qr(function (n, t, r) {
  13681. return t = t.toLowerCase(), n + (r ? Uu(t) : t);
  13682. }),
  13683. Bf = qr(function (n, t, r) {
  13684. return n + (r ? "-" : "") + t.toLowerCase();
  13685. }),
  13686. Lf = qr(function (n, t, r) {
  13687. return n + (r ? " " : "") + t.toLowerCase();
  13688. }),
  13689. Uf = Zr("toLowerCase"),
  13690. Cf = qr(function (n, t, r) {
  13691. return n + (r ? "_" : "") + t.toLowerCase();
  13692. }),
  13693. Df = qr(function (n, t, r) {
  13694. return n + (r ? " " : "") + Tf(t);
  13695. }),
  13696. Mf = qr(function (n, t, r) {
  13697. return n + (r ? " " : "") + t.toUpperCase();
  13698. }),
  13699. Tf = Zr("toUpperCase"),
  13700. $f = fr(function (t, r) {
  13701. try {
  13702. return n(t, T, r);
  13703. } catch (n) {
  13704. return hu(n) ? n : new Gu(n);
  13705. }
  13706. }),
  13707. Ff = pe(function (n, t) {
  13708. return r(t, function (t) {
  13709. t = De(t), st(n, t, Go(n[t], n));
  13710. }), n;
  13711. }),
  13712. Nf = Hr(),
  13713. Pf = Hr(true),
  13714. Zf = fr(function (n, t) {
  13715. return function (r) {
  13716. return Lt(r, n, t);
  13717. };
  13718. }),
  13719. qf = fr(function (n, t) {
  13720. return function (r) {
  13721. return Lt(n, r, t);
  13722. };
  13723. }),
  13724. Vf = Xr(c),
  13725. Kf = Xr(u),
  13726. Gf = Xr(h),
  13727. Hf = re(),
  13728. Jf = re(true),
  13729. Yf = Qr(function (n, t) {
  13730. return n + t;
  13731. }, 0),
  13732. Qf = ie("ceil"),
  13733. Xf = Qr(function (n, t) {
  13734. return n / t;
  13735. }, 1),
  13736. nc = ie("floor"),
  13737. tc = Qr(function (n, t) {
  13738. return n * t;
  13739. }, 1),
  13740. rc = ie("round"),
  13741. ec = Qr(function (n, t) {
  13742. return n - t;
  13743. }, 0);
  13744. return An.after = function (n, t) {
  13745. if (typeof t != "function") throw new ni("Expected a function");
  13746. return n = Au(n), function () {
  13747. if (1 > --n) return t.apply(this, arguments);
  13748. };
  13749. }, 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 () {
  13750. if (!arguments.length) return [];
  13751. var n = arguments[0];
  13752. return of(n) ? n : [n];
  13753. }, An.chain = Je, An.chunk = function (n, t, r) {
  13754. if (t = (r ? Oe(n, t, r) : t === T) ? 1 : Li(Au(t), 0), r = null == n ? 0 : n.length, !r || 1 > t) return [];
  13755. for (var e = 0, u = 0, i = Vu(Si(r / t)); e < r;) {
  13756. i[u++] = hr(n, e, e += t);
  13757. }
  13758. return i;
  13759. }, An.compact = function (n) {
  13760. for (var t = -1, r = null == n ? 0 : n.length, e = 0, u = []; ++t < r;) {
  13761. var i = n[t];
  13762. i && (u[e++] = i);
  13763. }
  13764. return u;
  13765. }, An.concat = function () {
  13766. var n = arguments.length;
  13767. if (!n) return [];
  13768. for (var t = Vu(n - 1), r = arguments[0]; n--;) {
  13769. t[n - 1] = arguments[n];
  13770. }
  13771. return a(of(r) ? Ur(r) : [r], wt(t, 1));
  13772. }, An.cond = function (t) {
  13773. var r = null == t ? 0 : t.length,
  13774. e = ye();
  13775. return t = r ? c(t, function (n) {
  13776. if ("function" != typeof n[1]) throw new ni("Expected a function");
  13777. return [e(n[0]), n[1]];
  13778. }) : [], fr(function (e) {
  13779. for (var u = -1; ++u < r;) {
  13780. var i = t[u];
  13781. if (n(i[0], this, e)) return n(i[1], this, e);
  13782. }
  13783. });
  13784. }, An.conforms = function (n) {
  13785. return vt(_t(n, 1));
  13786. }, An.constant = Mu, An.countBy = To, An.create = function (n, t) {
  13787. var r = ro(n);
  13788. return null == t ? r : at(r, t);
  13789. }, 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) {
  13790. var e = null == n ? 0 : n.length;
  13791. return e ? (t = r || t === T ? 1 : Au(t), hr(n, 0 > t ? 0 : t, e)) : [];
  13792. }, An.dropRight = function (n, t, r) {
  13793. var e = null == n ? 0 : n.length;
  13794. return e ? (t = r || t === T ? 1 : Au(t), t = e - t, hr(n, 0, 0 > t ? 0 : t)) : [];
  13795. }, An.dropRightWhile = function (n, t) {
  13796. return n && n.length ? jr(n, ye(t, 3), true, true) : [];
  13797. }, An.dropWhile = function (n, t) {
  13798. return n && n.length ? jr(n, ye(t, 3), true) : [];
  13799. }, An.fill = function (n, t, r, e) {
  13800. var u = null == n ? 0 : n.length;
  13801. if (!u) return [];
  13802. 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;) {
  13803. n[r++] = t;
  13804. }
  13805. return n;
  13806. }, An.filter = function (n, t) {
  13807. return (of(n) ? i : jt)(n, ye(t, 3));
  13808. }, An.flatMap = function (n, t) {
  13809. return wt(tu(n, t), 1);
  13810. }, An.flatMapDeep = function (n, t) {
  13811. return wt(tu(n, t), $);
  13812. }, An.flatMapDepth = function (n, t, r) {
  13813. return r = r === T ? 1 : Au(r), wt(tu(n, t), r);
  13814. }, An.flatten = Pe, An.flattenDeep = function (n) {
  13815. return (null == n ? 0 : n.length) ? wt(n, $) : [];
  13816. }, An.flattenDepth = function (n, t) {
  13817. return null != n && n.length ? (t = t === T ? 1 : Au(t), wt(n, t)) : [];
  13818. }, An.flip = function (n) {
  13819. return fe(n, 512);
  13820. }, An.flow = Nf, An.flowRight = Pf, An.fromPairs = function (n) {
  13821. for (var t = -1, r = null == n ? 0 : n.length, e = {}; ++t < r;) {
  13822. var u = n[t];
  13823. e[u[0]] = u[1];
  13824. }
  13825. return e;
  13826. }, An.functions = function (n) {
  13827. return null == n ? [] : Et(n, zu(n));
  13828. }, An.functionsIn = function (n) {
  13829. return null == n ? [] : Et(n, Wu(n));
  13830. }, An.groupBy = No, An.initial = function (n) {
  13831. return (null == n ? 0 : n.length) ? hr(n, 0, -1) : [];
  13832. }, 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) {
  13833. var r = {};
  13834. return t = ye(t, 3), mt(n, function (n, e, u) {
  13835. st(r, t(n, e, u), n);
  13836. }), r;
  13837. }, An.mapValues = function (n, t) {
  13838. var r = {};
  13839. return t = ye(t, 3), mt(n, function (n, e, u) {
  13840. st(r, e, t(n, e, u));
  13841. }), r;
  13842. }, An.matches = function (n) {
  13843. return Ht(_t(n, 1));
  13844. }, An.matchesProperty = function (n, t) {
  13845. return Jt(n, _t(t, 1));
  13846. }, 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) {
  13847. return n = Au(n), fr(function (t) {
  13848. return Qt(t, n);
  13849. });
  13850. }, An.omit = Of, An.omitBy = function (n, t) {
  13851. return Bu(n, cu(ye(t)));
  13852. }, An.once = function (n) {
  13853. return eu(2, n);
  13854. }, An.orderBy = function (n, t, r, e) {
  13855. return null == n ? [] : (of(t) || (t = null == t ? [] : [t]), r = e ? T : r, of(r) || (r = null == r ? [] : [r]), Xt(n, t, r));
  13856. }, 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) {
  13857. return function (t) {
  13858. return null == n ? T : kt(n, t);
  13859. };
  13860. }, An.pull = So, An.pullAll = Ve, An.pullAllBy = function (n, t, r) {
  13861. return n && n.length && t && t.length ? er(n, t, ye(r, 2)) : n;
  13862. }, An.pullAllWith = function (n, t, r) {
  13863. return n && n.length && t && t.length ? er(n, t, T, r) : n;
  13864. }, An.pullAt = Oo, An.range = Hf, An.rangeRight = Jf, An.rearg = tf, An.reject = function (n, t) {
  13865. return (of(n) ? i : jt)(n, cu(ye(t, 3)));
  13866. }, An.remove = function (n, t) {
  13867. var r = [];
  13868. if (!n || !n.length) return r;
  13869. var e = -1,
  13870. u = [],
  13871. i = n.length;
  13872. for (t = ye(t, 3); ++e < i;) {
  13873. var o = n[e];
  13874. t(o, e, n) && (r.push(o), u.push(e));
  13875. }
  13876. return ur(n, u), r;
  13877. }, An.rest = function (n, t) {
  13878. if (typeof n != "function") throw new ni("Expected a function");
  13879. return t = t === T ? t : Au(t), fr(n, t);
  13880. }, An.reverse = Ke, An.sampleSize = function (n, t, r) {
  13881. return t = (r ? Oe(n, t, r) : t === T) ? 1 : Au(t), (of(n) ? et : ar)(n, t);
  13882. }, An.set = function (n, t, r) {
  13883. return null == n ? n : lr(n, t, r);
  13884. }, An.setWith = function (n, t, r, e) {
  13885. return e = typeof e == "function" ? e : T, null == n ? n : lr(n, t, r, e);
  13886. }, An.shuffle = function (n) {
  13887. return (of(n) ? ut : sr)(n);
  13888. }, An.slice = function (n, t, r) {
  13889. var e = null == n ? 0 : n.length;
  13890. 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)) : [];
  13891. }, An.sortBy = Vo, An.sortedUniq = function (n) {
  13892. return n && n.length ? gr(n) : [];
  13893. }, An.sortedUniqBy = function (n, t) {
  13894. return n && n.length ? gr(n, ye(t, 2)) : [];
  13895. }, An.split = function (n, t, r) {
  13896. 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) : [];
  13897. }, An.spread = function (t, r) {
  13898. if (typeof t != "function") throw new ni("Expected a function");
  13899. return r = null == r ? 0 : Li(Au(r), 0), fr(function (e) {
  13900. var u = e[r];
  13901. return e = Or(e, 0, r), u && a(e, u), n(t, this, e);
  13902. });
  13903. }, An.tail = function (n) {
  13904. var t = null == n ? 0 : n.length;
  13905. return t ? hr(n, 1, t) : [];
  13906. }, An.take = function (n, t, r) {
  13907. return n && n.length ? (t = r || t === T ? 1 : Au(t), hr(n, 0, 0 > t ? 0 : t)) : [];
  13908. }, An.takeRight = function (n, t, r) {
  13909. var e = null == n ? 0 : n.length;
  13910. return e ? (t = r || t === T ? 1 : Au(t), t = e - t, hr(n, 0 > t ? 0 : t, e)) : [];
  13911. }, An.takeRightWhile = function (n, t) {
  13912. return n && n.length ? jr(n, ye(t, 3), false, true) : [];
  13913. }, An.takeWhile = function (n, t) {
  13914. return n && n.length ? jr(n, ye(t, 3)) : [];
  13915. }, An.tap = function (n, t) {
  13916. return t(n), n;
  13917. }, An.throttle = function (n, t, r) {
  13918. var e = true,
  13919. u = true;
  13920. if (typeof n != "function") throw new ni("Expected a function");
  13921. return gu(r) && (e = "leading" in r ? !!r.leading : e, u = "trailing" in r ? !!r.trailing : u), ou(n, t, {
  13922. leading: e,
  13923. maxWait: t,
  13924. trailing: u
  13925. });
  13926. }, An.thru = Ye, An.toArray = wu, An.toPairs = Rf, An.toPairsIn = zf, An.toPath = function (n) {
  13927. return of(n) ? c(n, De) : ju(n) ? [n] : Ur(xo(Ou(n)));
  13928. }, An.toPlainObject = Su, An.transform = function (n, t, e) {
  13929. var u = of(n),
  13930. i = u || cf(n) || pf(n);
  13931. if (t = ye(t, 4), null == e) {
  13932. var o = n && n.constructor;
  13933. e = i ? u ? new o() : [] : gu(n) && pu(o) ? ro(gi(n)) : {};
  13934. }
  13935. return (i ? r : mt)(n, function (n, r, u) {
  13936. return t(e, n, r, u);
  13937. }), e;
  13938. }, An.unary = function (n) {
  13939. return ru(n, 1);
  13940. }, An.union = Io, An.unionBy = Ro, An.unionWith = zo, An.uniq = function (n) {
  13941. return n && n.length ? br(n) : [];
  13942. }, An.uniqBy = function (n, t) {
  13943. return n && n.length ? br(n, ye(t, 2)) : [];
  13944. }, An.uniqWith = function (n, t) {
  13945. return t = typeof t == "function" ? t : T, n && n.length ? br(n, T, t) : [];
  13946. }, An.unset = function (n, t) {
  13947. return null == n || xr(n, t);
  13948. }, An.unzip = Ge, An.unzipWith = He, An.update = function (n, t, r) {
  13949. return null == n ? n : lr(n, t, kr(r)(kt(n, t)), void 0);
  13950. }, An.updateWith = function (n, t, r, e) {
  13951. return e = typeof e == "function" ? e : T, null != n && (n = lr(n, t, kr(r)(kt(n, t)), e)), n;
  13952. }, An.values = Lu, An.valuesIn = function (n) {
  13953. return null == n ? [] : S(n, Wu(n));
  13954. }, An.without = Wo, An.words = Du, An.wrap = function (n, t) {
  13955. return Xo(kr(t), n);
  13956. }, An.xor = Bo, An.xorBy = Lo, An.xorWith = Uo, An.zip = Co, An.zipObject = function (n, t) {
  13957. return Ar(n || [], t || [], ot);
  13958. }, An.zipObjectDeep = function (n, t) {
  13959. return Ar(n || [], t || [], lr);
  13960. }, 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) {
  13961. 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);
  13962. }, An.clone = function (n) {
  13963. return _t(n, 4);
  13964. }, An.cloneDeep = function (n) {
  13965. return _t(n, 5);
  13966. }, An.cloneDeepWith = function (n, t) {
  13967. return t = typeof t == "function" ? t : T, _t(n, 5, t);
  13968. }, An.cloneWith = function (n, t) {
  13969. return t = typeof t == "function" ? t : T, _t(n, 4, t);
  13970. }, An.conformsTo = function (n, t) {
  13971. return null == t || gt(n, t, zu(t));
  13972. }, An.deburr = Cu, An.defaultTo = function (n, t) {
  13973. return null == n || n !== n ? t : n;
  13974. }, An.divide = Xf, An.endsWith = function (n, t, r) {
  13975. n = Ou(n), t = yr(t);
  13976. var e = n.length,
  13977. e = r = r === T ? e : pt(Au(r), 0, e);
  13978. return r -= t.length, 0 <= r && n.slice(r, e) == t;
  13979. }, An.eq = au, An.escape = function (n) {
  13980. return (n = Ou(n)) && H.test(n) ? n.replace(K, nt) : n;
  13981. }, An.escapeRegExp = function (n) {
  13982. return (n = Ou(n)) && en.test(n) ? n.replace(rn, "\\$&") : n;
  13983. }, An.every = function (n, t, r) {
  13984. var e = of(n) ? u : bt;
  13985. return r && Oe(n, t, r) && (t = T), e(n, ye(t, 3));
  13986. }, An.find = $o, An.findIndex = Fe, An.findKey = function (n, t) {
  13987. return p(n, ye(t, 3), mt);
  13988. }, An.findLast = Fo, An.findLastIndex = Ne, An.findLastKey = function (n, t) {
  13989. return p(n, ye(t, 3), At);
  13990. }, An.floor = nc, An.forEach = Xe, An.forEachRight = nu, An.forIn = function (n, t) {
  13991. return null == n ? n : io(n, ye(t, 3), Wu);
  13992. }, An.forInRight = function (n, t) {
  13993. return null == n ? n : oo(n, ye(t, 3), Wu);
  13994. }, An.forOwn = function (n, t) {
  13995. return n && mt(n, ye(t, 3));
  13996. }, An.forOwnRight = function (n, t) {
  13997. return n && At(n, ye(t, 3));
  13998. }, An.get = Iu, An.gt = rf, An.gte = ef, An.has = function (n, t) {
  13999. return null != n && we(n, t, Rt);
  14000. }, An.hasIn = Ru, An.head = Ze, An.identity = Tu, An.includes = function (n, t, r, e) {
  14001. 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);
  14002. }, An.indexOf = function (n, t, r) {
  14003. var e = null == n ? 0 : n.length;
  14004. return e ? (r = null == r ? 0 : Au(r), 0 > r && (r = Li(e + r, 0)), v(n, t, r)) : -1;
  14005. }, An.inRange = function (n, t, r) {
  14006. return t = mu(t), r === T ? (r = t, t = 0) : r = mu(r), n = ku(n), n >= Ui(t, r) && n < Li(t, r);
  14007. }, An.invoke = Ef, An.isArguments = uf, An.isArray = of, An.isArrayBuffer = ff, An.isArrayLike = lu, An.isArrayLikeObject = su, An.isBoolean = function (n) {
  14008. return true === n || false === n || du(n) && "[object Boolean]" == Ot(n);
  14009. }, An.isBuffer = cf, An.isDate = af, An.isElement = function (n) {
  14010. return du(n) && 1 === n.nodeType && !bu(n);
  14011. }, An.isEmpty = function (n) {
  14012. if (null == n) return true;
  14013. if (lu(n) && (of(n) || typeof n == "string" || typeof n.splice == "function" || cf(n) || pf(n) || uf(n))) return !n.length;
  14014. var t = _o(n);
  14015. if ("[object Map]" == t || "[object Set]" == t) return !n.size;
  14016. if (ze(n)) return !Vt(n).length;
  14017. for (var r in n) {
  14018. if (ii.call(n, r)) return false;
  14019. }
  14020. return true;
  14021. }, An.isEqual = function (n, t) {
  14022. return Mt(n, t);
  14023. }, An.isEqualWith = function (n, t, r) {
  14024. var e = (r = typeof r == "function" ? r : T) ? r(n, t) : T;
  14025. return e === T ? Mt(n, t, T, r) : !!e;
  14026. }, An.isError = hu, An.isFinite = function (n) {
  14027. return typeof n == "number" && zi(n);
  14028. }, An.isFunction = pu, An.isInteger = _u, An.isLength = vu, An.isMap = lf, An.isMatch = function (n, t) {
  14029. return n === t || $t(n, t, xe(t));
  14030. }, An.isMatchWith = function (n, t, r) {
  14031. return r = typeof r == "function" ? r : T, $t(n, t, xe(t), r);
  14032. }, An.isNaN = function (n) {
  14033. return yu(n) && n != +n;
  14034. }, An.isNative = function (n) {
  14035. if (vo(n)) throw new Gu("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");
  14036. return Ft(n);
  14037. }, An.isNil = function (n) {
  14038. return null == n;
  14039. }, An.isNull = function (n) {
  14040. return null === n;
  14041. }, An.isNumber = yu, An.isObject = gu, An.isObjectLike = du, An.isPlainObject = bu, An.isRegExp = sf, An.isSafeInteger = function (n) {
  14042. return _u(n) && -9007199254740991 <= n && 9007199254740991 >= n;
  14043. }, An.isSet = hf, An.isString = xu, An.isSymbol = ju, An.isTypedArray = pf, An.isUndefined = function (n) {
  14044. return n === T;
  14045. }, An.isWeakMap = function (n) {
  14046. return du(n) && "[object WeakMap]" == _o(n);
  14047. }, An.isWeakSet = function (n) {
  14048. return du(n) && "[object WeakSet]" == Ot(n);
  14049. }, An.join = function (n, t) {
  14050. return null == n ? "" : Wi.call(n, t);
  14051. }, An.kebabCase = Bf, An.last = qe, An.lastIndexOf = function (n, t, r) {
  14052. var e = null == n ? 0 : n.length;
  14053. if (!e) return -1;
  14054. var u = e;
  14055. if (r !== T && (u = Au(r), u = 0 > u ? Li(e + u, 0) : Ui(u, e - 1)), t === t) {
  14056. for (r = u + 1; r-- && n[r] !== t;) {
  14057. ;
  14058. }
  14059. n = r;
  14060. } else n = _(n, d, u, true);
  14061. return n;
  14062. }, An.lowerCase = Lf, An.lowerFirst = Uf, An.lt = _f, An.lte = vf, An.max = function (n) {
  14063. return n && n.length ? xt(n, Tu, It) : T;
  14064. }, An.maxBy = function (n, t) {
  14065. return n && n.length ? xt(n, ye(t, 2), It) : T;
  14066. }, An.mean = function (n) {
  14067. return y(n, Tu);
  14068. }, An.meanBy = function (n, t) {
  14069. return y(n, ye(t, 2));
  14070. }, An.min = function (n) {
  14071. return n && n.length ? xt(n, Tu, Kt) : T;
  14072. }, An.minBy = function (n, t) {
  14073. return n && n.length ? xt(n, ye(t, 2), Kt) : T;
  14074. }, An.stubArray = Zu, An.stubFalse = qu, An.stubObject = function () {
  14075. return {};
  14076. }, An.stubString = function () {
  14077. return "";
  14078. }, An.stubTrue = function () {
  14079. return true;
  14080. }, An.multiply = tc, An.nth = function (n, t) {
  14081. return n && n.length ? Qt(n, Au(t)) : T;
  14082. }, An.noConflict = function () {
  14083. return $n._ === this && ($n._ = li), this;
  14084. }, An.noop = Nu, An.now = Ko, An.pad = function (n, t, r) {
  14085. n = Ou(n);
  14086. var e = (t = Au(t)) ? D(n) : 0;
  14087. return !t || e >= t ? n : (t = (t - e) / 2, ne(Oi(t), r) + n + ne(Si(t), r));
  14088. }, An.padEnd = function (n, t, r) {
  14089. n = Ou(n);
  14090. var e = (t = Au(t)) ? D(n) : 0;
  14091. return t && e < t ? n + ne(t - e, r) : n;
  14092. }, An.padStart = function (n, t, r) {
  14093. n = Ou(n);
  14094. var e = (t = Au(t)) ? D(n) : 0;
  14095. return t && e < t ? ne(t - e, r) + n : n;
  14096. }, An.parseInt = function (n, t, r) {
  14097. return r || null == t ? t = 0 : t && (t = +t), Di(Ou(n).replace(on, ""), t || 0);
  14098. }, An.random = function (n, t, r) {
  14099. 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) {
  14100. var e = n;
  14101. n = t, t = e;
  14102. }
  14103. return r || n % 1 || t % 1 ? (r = Mi(), Ui(n + r * (t - n + Cn("1e-" + ((r + "").length - 1))), t)) : ir(n, t);
  14104. }, An.reduce = function (n, t, r) {
  14105. var e = of(n) ? l : j,
  14106. u = 3 > arguments.length;
  14107. return e(n, ye(t, 4), r, u, eo);
  14108. }, An.reduceRight = function (n, t, r) {
  14109. var e = of(n) ? s : j,
  14110. u = 3 > arguments.length;
  14111. return e(n, ye(t, 4), r, u, uo);
  14112. }, An.repeat = function (n, t, r) {
  14113. return t = (r ? Oe(n, t, r) : t === T) ? 1 : Au(t), or(Ou(n), t);
  14114. }, An.replace = function () {
  14115. var n = arguments,
  14116. t = Ou(n[0]);
  14117. return 3 > n.length ? t : t.replace(n[1], n[2]);
  14118. }, An.result = function (n, t, r) {
  14119. t = Sr(t, n);
  14120. var e = -1,
  14121. u = t.length;
  14122. for (u || (u = 1, n = T); ++e < u;) {
  14123. var i = null == n ? T : n[De(t[e])];
  14124. i === T && (e = u, i = r), n = pu(i) ? i.call(n) : i;
  14125. }
  14126. return n;
  14127. }, An.round = rc, An.runInContext = x, An.sample = function (n) {
  14128. return (of(n) ? Qn : cr)(n);
  14129. }, An.size = function (n) {
  14130. if (null == n) return 0;
  14131. if (lu(n)) return xu(n) ? D(n) : n.length;
  14132. var t = _o(n);
  14133. return "[object Map]" == t || "[object Set]" == t ? n.size : Vt(n).length;
  14134. }, An.snakeCase = Cf, An.some = function (n, t, r) {
  14135. var e = of(n) ? h : pr;
  14136. return r && Oe(n, t, r) && (t = T), e(n, ye(t, 3));
  14137. }, An.sortedIndex = function (n, t) {
  14138. return _r(n, t);
  14139. }, An.sortedIndexBy = function (n, t, r) {
  14140. return vr(n, t, ye(r, 2));
  14141. }, An.sortedIndexOf = function (n, t) {
  14142. var r = null == n ? 0 : n.length;
  14143. if (r) {
  14144. var e = _r(n, t);
  14145. if (e < r && au(n[e], t)) return e;
  14146. }
  14147. return -1;
  14148. }, An.sortedLastIndex = function (n, t) {
  14149. return _r(n, t, true);
  14150. }, An.sortedLastIndexBy = function (n, t, r) {
  14151. return vr(n, t, ye(r, 2), true);
  14152. }, An.sortedLastIndexOf = function (n, t) {
  14153. if (null == n ? 0 : n.length) {
  14154. var r = _r(n, t, true) - 1;
  14155. if (au(n[r], t)) return r;
  14156. }
  14157. return -1;
  14158. }, An.startCase = Df, An.startsWith = function (n, t, r) {
  14159. return n = Ou(n), r = null == r ? 0 : pt(Au(r), 0, n.length), t = yr(t), n.slice(r, r + t.length) == t;
  14160. }, An.subtract = ec, An.sum = function (n) {
  14161. return n && n.length ? m(n, Tu) : 0;
  14162. }, An.sumBy = function (n, t) {
  14163. return n && n.length ? m(n, ye(t, 2)) : 0;
  14164. }, An.template = function (n, t, r) {
  14165. var e = An.templateSettings;
  14166. r && Oe(n, t, r) && (t = T), n = Ou(n), t = yf({}, t, e, ce), r = yf({}, t.imports, e.imports, ce);
  14167. var u,
  14168. i,
  14169. o = zu(r),
  14170. f = S(r, o),
  14171. c = 0;
  14172. r = t.interpolate || jn;
  14173. var a = "__p+='";
  14174. r = Qu((t.escape || jn).source + "|" + r.source + "|" + (r === Q ? pn : jn).source + "|" + (t.evaluate || jn).source + "|$", "g");
  14175. var l = "sourceURL" in t ? "//# sourceURL=" + t.sourceURL + "\n" : "";
  14176. if (n.replace(r, function (t, r, e, o, f, l) {
  14177. 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;
  14178. }), 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 () {
  14179. return Hu(o, l + "return " + a).apply(T, f);
  14180. }), t.source = a, hu(t)) throw t;
  14181. return t;
  14182. }, An.times = function (n, t) {
  14183. if (n = Au(n), 1 > n || 9007199254740991 < n) return [];
  14184. var r = 4294967295,
  14185. e = Ui(n, 4294967295);
  14186. for (t = ye(t), n -= 4294967295, e = A(e, t); ++r < n;) {
  14187. t(r);
  14188. }
  14189. return e;
  14190. }, An.toFinite = mu, An.toInteger = Au, An.toLength = Eu, An.toLower = function (n) {
  14191. return Ou(n).toLowerCase();
  14192. }, An.toNumber = ku, An.toSafeInteger = function (n) {
  14193. return n ? pt(Au(n), -9007199254740991, 9007199254740991) : 0 === n ? n : 0;
  14194. }, An.toString = Ou, An.toUpper = function (n) {
  14195. return Ou(n).toUpperCase();
  14196. }, An.trim = function (n, t, r) {
  14197. 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;
  14198. }, An.trimEnd = function (n, t, r) {
  14199. 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;
  14200. }, An.trimStart = function (n, t, r) {
  14201. 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;
  14202. }, An.truncate = function (n, t) {
  14203. var r = 30,
  14204. e = "...";
  14205. if (gu(t)) var u = "separator" in t ? t.separator : u,
  14206. r = "length" in t ? Au(t.length) : r,
  14207. e = "omission" in t ? yr(t.omission) : e;
  14208. n = Ou(n);
  14209. var i = n.length;
  14210. if (Rn.test(n)) var o = M(n),
  14211. i = o.length;
  14212. if (r >= i) return n;
  14213. if (i = r - D(e), 1 > i) return e;
  14214. if (r = o ? Or(o, 0, i).join("") : n.slice(0, i), u === T) return r + e;
  14215. if (o && (i += r.length - i), sf(u)) {
  14216. if (n.slice(i).search(u)) {
  14217. var f = r;
  14218. for (u.global || (u = Qu(u.source, Ou(_n.exec(u)) + "g")), u.lastIndex = 0; o = u.exec(f);) {
  14219. var c = o.index;
  14220. }
  14221. r = r.slice(0, c === T ? i : c);
  14222. }
  14223. } else n.indexOf(yr(u), i) != i && (u = r.lastIndexOf(u), -1 < u && (r = r.slice(0, u)));
  14224. return r + e;
  14225. }, An.unescape = function (n) {
  14226. return (n = Ou(n)) && G.test(n) ? n.replace(V, tt) : n;
  14227. }, An.uniqueId = function (n) {
  14228. var t = ++oi;
  14229. return Ou(n) + t;
  14230. }, An.upperCase = Mf, An.upperFirst = Tf, An.each = Xe, An.eachRight = nu, An.first = Ze, Fu(An, function () {
  14231. var n = {};
  14232. return mt(An, function (t, r) {
  14233. ii.call(An.prototype, r) || (n[r] = t);
  14234. }), n;
  14235. }(), {
  14236. chain: false
  14237. }), An.VERSION = "4.17.10", r("bind bindKey curry curryRight partial partialRight".split(" "), function (n) {
  14238. An[n].placeholder = An;
  14239. }), r(["drop", "take"], function (n, t) {
  14240. Un.prototype[n] = function (r) {
  14241. r = r === T ? 1 : Li(Au(r), 0);
  14242. var e = this.__filtered__ && !t ? new Un(this) : this.clone();
  14243. return e.__filtered__ ? e.__takeCount__ = Ui(r, e.__takeCount__) : e.__views__.push({
  14244. size: Ui(r, 4294967295),
  14245. type: n + (0 > e.__dir__ ? "Right" : "")
  14246. }), e;
  14247. }, Un.prototype[n + "Right"] = function (t) {
  14248. return this.reverse()[n](t).reverse();
  14249. };
  14250. }), r(["filter", "map", "takeWhile"], function (n, t) {
  14251. var r = t + 1,
  14252. e = 1 == r || 3 == r;
  14253. Un.prototype[n] = function (n) {
  14254. var t = this.clone();
  14255. return t.__iteratees__.push({
  14256. iteratee: ye(n, 3),
  14257. type: r
  14258. }), t.__filtered__ = t.__filtered__ || e, t;
  14259. };
  14260. }), r(["head", "last"], function (n, t) {
  14261. var r = "take" + (t ? "Right" : "");
  14262. Un.prototype[n] = function () {
  14263. return this[r](1).value()[0];
  14264. };
  14265. }), r(["initial", "tail"], function (n, t) {
  14266. var r = "drop" + (t ? "" : "Right");
  14267. Un.prototype[n] = function () {
  14268. return this.__filtered__ ? new Un(this) : this[r](1);
  14269. };
  14270. }), Un.prototype.compact = function () {
  14271. return this.filter(Tu);
  14272. }, Un.prototype.find = function (n) {
  14273. return this.filter(n).head();
  14274. }, Un.prototype.findLast = function (n) {
  14275. return this.reverse().find(n);
  14276. }, Un.prototype.invokeMap = fr(function (n, t) {
  14277. return typeof n == "function" ? new Un(this) : this.map(function (r) {
  14278. return Lt(r, n, t);
  14279. });
  14280. }), Un.prototype.reject = function (n) {
  14281. return this.filter(cu(ye(n)));
  14282. }, Un.prototype.slice = function (n, t) {
  14283. n = Au(n);
  14284. var r = this;
  14285. 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);
  14286. }, Un.prototype.takeRightWhile = function (n) {
  14287. return this.reverse().takeWhile(n).reverse();
  14288. }, Un.prototype.toArray = function () {
  14289. return this.take(4294967295);
  14290. }, mt(Un.prototype, function (n, t) {
  14291. var r = /^(?:filter|find|map|reject)|While$/.test(t),
  14292. e = /^(?:head|last)$/.test(t),
  14293. u = An[e ? "take" + ("last" == t ? "Right" : "") : t],
  14294. i = e || /^find/.test(t);
  14295. u && (An.prototype[t] = function () {
  14296. function t(n) {
  14297. return n = u.apply(An, a([n], f)), e && h ? n[0] : n;
  14298. }
  14299. var o = this.__wrapped__,
  14300. f = e ? [1] : arguments,
  14301. c = o instanceof Un,
  14302. l = f[0],
  14303. s = c || of(o);
  14304. s && r && typeof l == "function" && 1 != l.length && (c = s = false);
  14305. var h = this.__chain__,
  14306. p = !!this.__actions__.length,
  14307. l = i && !h,
  14308. c = c && !p;
  14309. return !i && s ? (o = c ? o : new Un(this), o = n.apply(o, f), o.__actions__.push({
  14310. func: Ye,
  14311. args: [t],
  14312. thisArg: T
  14313. }), new On(o, h)) : l && c ? n.apply(this, f) : (o = this.thru(t), l ? e ? o.value()[0] : o.value() : o);
  14314. });
  14315. }), r("pop push shift sort splice unshift".split(" "), function (n) {
  14316. var t = ti[n],
  14317. r = /^(?:push|sort|unshift)$/.test(n) ? "tap" : "thru",
  14318. e = /^(?:pop|shift)$/.test(n);
  14319. An.prototype[n] = function () {
  14320. var n = arguments;
  14321. if (e && !this.__chain__) {
  14322. var u = this.value();
  14323. return t.apply(of(u) ? u : [], n);
  14324. }
  14325. return this[r](function (r) {
  14326. return t.apply(of(r) ? r : [], n);
  14327. });
  14328. };
  14329. }), mt(Un.prototype, function (n, t) {
  14330. var r = An[t];
  14331. if (r) {
  14332. var e = r.name + "";
  14333. (Ki[e] || (Ki[e] = [])).push({
  14334. name: t,
  14335. func: r
  14336. });
  14337. }
  14338. }), Ki[Jr(T, 2).name] = [{
  14339. name: "wrapper",
  14340. func: T
  14341. }], Un.prototype.clone = function () {
  14342. var n = new Un(this.__wrapped__);
  14343. 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;
  14344. }, Un.prototype.reverse = function () {
  14345. if (this.__filtered__) {
  14346. var n = new Un(this);
  14347. n.__dir__ = -1, n.__filtered__ = true;
  14348. } else n = this.clone(), n.__dir__ *= -1;
  14349. return n;
  14350. }, Un.prototype.value = function () {
  14351. var n,
  14352. t = this.__wrapped__.value(),
  14353. r = this.__dir__,
  14354. e = of(t),
  14355. u = 0 > r,
  14356. i = e ? t.length : 0;
  14357. n = i;
  14358. for (var o = this.__views__, f = 0, c = -1, a = o.length; ++c < a;) {
  14359. var l = o[c],
  14360. s = l.size;
  14361. switch (l.type) {
  14362. case "drop":
  14363. f += s;
  14364. break;
  14365. case "dropRight":
  14366. n -= s;
  14367. break;
  14368. case "take":
  14369. n = Ui(n, f + s);
  14370. break;
  14371. case "takeRight":
  14372. f = Li(f, n - s);
  14373. }
  14374. }
  14375. if (n = {
  14376. start: f,
  14377. end: n
  14378. }, 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__);
  14379. e = [];
  14380. n: for (; n-- && a < l;) {
  14381. for (o += r, u = -1, i = t[o]; ++u < c;) {
  14382. var h = f[u],
  14383. s = h.type,
  14384. h = (0, h.iteratee)(i);
  14385. if (2 == s) i = h;else if (!h) {
  14386. if (1 == s) continue n;
  14387. break n;
  14388. }
  14389. }
  14390. e[a++] = i;
  14391. }
  14392. return e;
  14393. }, An.prototype.at = Mo, An.prototype.chain = function () {
  14394. return Je(this);
  14395. }, An.prototype.commit = function () {
  14396. return new On(this.value(), this.__chain__);
  14397. }, An.prototype.next = function () {
  14398. this.__values__ === T && (this.__values__ = wu(this.value()));
  14399. var n = this.__index__ >= this.__values__.length;
  14400. return {
  14401. done: n,
  14402. value: n ? T : this.__values__[this.__index__++]
  14403. };
  14404. }, An.prototype.plant = function (n) {
  14405. for (var t, r = this; r instanceof En;) {
  14406. var e = $e(r);
  14407. e.__index__ = 0, e.__values__ = T, t ? u.__wrapped__ = e : t = e;
  14408. var u = e,
  14409. r = r.__wrapped__;
  14410. }
  14411. return u.__wrapped__ = n, t;
  14412. }, An.prototype.reverse = function () {
  14413. var n = this.__wrapped__;
  14414. return n instanceof Un ? (this.__actions__.length && (n = new Un(this)), n = n.reverse(), n.__actions__.push({
  14415. func: Ye,
  14416. args: [Ke],
  14417. thisArg: T
  14418. }), new On(n, this.__chain__)) : this.thru(Ke);
  14419. }, An.prototype.toJSON = An.prototype.valueOf = An.prototype.value = function () {
  14420. return wr(this.__wrapped__, this.__actions__);
  14421. }, An.prototype.first = An.prototype.head, ji && (An.prototype[ji] = Qe), An;
  14422. }();
  14423. true && _typeof(__webpack_require__(/*! !webpack amd options */ 41)) == "object" && __webpack_require__(/*! !webpack amd options */ 41) ? ($n._ = rt, !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {
  14424. return rt;
  14425. }).call(exports, __webpack_require__, exports, module),
  14426. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__))) : Nn ? ((Nn.exports = rt)._ = rt, Fn._ = rt) : $n._ = rt;
  14427. }).call(this);
  14428. /* 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)))
  14429. /***/ }),
  14430. /***/ 4:
  14431. /*!**********************************************************************!*\
  14432. !*** ./node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
  14433. \**********************************************************************/
  14434. /*! no static exports found */
  14435. /***/ (function(module, exports) {
  14436. function _interopRequireDefault(obj) {
  14437. return obj && obj.__esModule ? obj : {
  14438. "default": obj
  14439. };
  14440. }
  14441. module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
  14442. /***/ }),
  14443. /***/ 40:
  14444. /*!***********************************!*\
  14445. !*** (webpack)/buildin/module.js ***!
  14446. \***********************************/
  14447. /*! no static exports found */
  14448. /***/ (function(module, exports) {
  14449. module.exports = function(module) {
  14450. if (!module.webpackPolyfill) {
  14451. module.deprecate = function() {};
  14452. module.paths = [];
  14453. // module.parent = undefined by default
  14454. if (!module.children) module.children = [];
  14455. Object.defineProperty(module, "loaded", {
  14456. enumerable: true,
  14457. get: function() {
  14458. return module.l;
  14459. }
  14460. });
  14461. Object.defineProperty(module, "id", {
  14462. enumerable: true,
  14463. get: function() {
  14464. return module.i;
  14465. }
  14466. });
  14467. module.webpackPolyfill = 1;
  14468. }
  14469. return module;
  14470. };
  14471. /***/ }),
  14472. /***/ 41:
  14473. /*!****************************************!*\
  14474. !*** (webpack)/buildin/amd-options.js ***!
  14475. \****************************************/
  14476. /*! no static exports found */
  14477. /***/ (function(module, exports) {
  14478. /* WEBPACK VAR INJECTION */(function(__webpack_amd_options__) {/* globals __webpack_amd_options__ */
  14479. module.exports = __webpack_amd_options__;
  14480. /* WEBPACK VAR INJECTION */}.call(this, {}))
  14481. /***/ }),
  14482. /***/ 42:
  14483. /*!***********************************************************!*\
  14484. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/index.js ***!
  14485. \***********************************************************/
  14486. /*! no static exports found */
  14487. /***/ (function(module, exports, __webpack_require__) {
  14488. "use strict";
  14489. /* WEBPACK VAR INJECTION */(function(uni) {
  14490. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  14491. Object.defineProperty(exports, "__esModule", {
  14492. value: true
  14493. });
  14494. exports.default = void 0;
  14495. var _mixin = _interopRequireDefault(__webpack_require__(/*! ./libs/mixin/mixin.js */ 43));
  14496. var _request = _interopRequireDefault(__webpack_require__(/*! ./libs/request */ 44));
  14497. var _queryParams = _interopRequireDefault(__webpack_require__(/*! ./libs/function/queryParams.js */ 48));
  14498. var _route = _interopRequireDefault(__webpack_require__(/*! ./libs/function/route.js */ 49));
  14499. var _timeFormat = _interopRequireDefault(__webpack_require__(/*! ./libs/function/timeFormat.js */ 53));
  14500. var _timeFrom = _interopRequireDefault(__webpack_require__(/*! ./libs/function/timeFrom.js */ 54));
  14501. var _colorGradient = _interopRequireDefault(__webpack_require__(/*! ./libs/function/colorGradient.js */ 55));
  14502. var _guid = _interopRequireDefault(__webpack_require__(/*! ./libs/function/guid.js */ 56));
  14503. var _color = _interopRequireDefault(__webpack_require__(/*! ./libs/function/color.js */ 57));
  14504. var _type2icon = _interopRequireDefault(__webpack_require__(/*! ./libs/function/type2icon.js */ 58));
  14505. var _randomArray = _interopRequireDefault(__webpack_require__(/*! ./libs/function/randomArray.js */ 59));
  14506. var _deepClone = _interopRequireDefault(__webpack_require__(/*! ./libs/function/deepClone.js */ 46));
  14507. var _deepMerge = _interopRequireDefault(__webpack_require__(/*! ./libs/function/deepMerge.js */ 45));
  14508. var _addUnit = _interopRequireDefault(__webpack_require__(/*! ./libs/function/addUnit.js */ 60));
  14509. var _test = _interopRequireDefault(__webpack_require__(/*! ./libs/function/test.js */ 47));
  14510. var _random = _interopRequireDefault(__webpack_require__(/*! ./libs/function/random.js */ 61));
  14511. var _trim = _interopRequireDefault(__webpack_require__(/*! ./libs/function/trim.js */ 62));
  14512. var _toast = _interopRequireDefault(__webpack_require__(/*! ./libs/function/toast.js */ 63));
  14513. var _getParent = _interopRequireDefault(__webpack_require__(/*! ./libs/function/getParent.js */ 64));
  14514. var _$parent = _interopRequireDefault(__webpack_require__(/*! ./libs/function/$parent.js */ 65));
  14515. var _sys = __webpack_require__(/*! ./libs/function/sys.js */ 66);
  14516. var _debounce = _interopRequireDefault(__webpack_require__(/*! ./libs/function/debounce.js */ 67));
  14517. var _throttle = _interopRequireDefault(__webpack_require__(/*! ./libs/function/throttle.js */ 68));
  14518. var _config = _interopRequireDefault(__webpack_require__(/*! ./libs/config/config.js */ 69));
  14519. var _zIndex = _interopRequireDefault(__webpack_require__(/*! ./libs/config/zIndex.js */ 70));
  14520. // 引入全局mixin
  14521. // 引入关于是否mixin集成小程序分享的配置
  14522. // import wxshare from './libs/mixin/mpShare.js'
  14523. // 全局挂载引入http相关请求拦截插件
  14524. function wranning(str) {
  14525. // 开发环境进行信息输出,主要是一些报错信息
  14526. // 这个环境的来由是在程序编写时候,点击hx编辑器运行调试代码的时候,详见:
  14527. // 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
  14528. if (true) {
  14529. console.warn(str);
  14530. }
  14531. }
  14532. // 尝试判断在根目录的/store中是否有$u.mixin.js,此文件uView默认为需要挂在到全局的vuex的state变量
  14533. // HX2.6.11版本,放到try中,控制台依然会警告,暂时不用此方式,
  14534. // let vuexStore = {};
  14535. // try {
  14536. // vuexStore = require("@/store/$u.mixin.js");
  14537. // } catch (e) {
  14538. // //TODO handle the exception
  14539. // }
  14540. // post类型对象参数转为get类型url参数
  14541. var $u = {
  14542. queryParams: _queryParams.default,
  14543. route: _route.default,
  14544. timeFormat: _timeFormat.default,
  14545. date: _timeFormat.default,
  14546. // 另名date
  14547. timeFrom: _timeFrom.default,
  14548. colorGradient: _colorGradient.default.colorGradient,
  14549. colorToRgba: _colorGradient.default.colorToRgba,
  14550. guid: _guid.default,
  14551. color: _color.default,
  14552. sys: _sys.sys,
  14553. os: _sys.os,
  14554. type2icon: _type2icon.default,
  14555. randomArray: _randomArray.default,
  14556. wranning: wranning,
  14557. get: _request.default.get,
  14558. post: _request.default.post,
  14559. put: _request.default.put,
  14560. 'delete': _request.default.delete,
  14561. hexToRgb: _colorGradient.default.hexToRgb,
  14562. rgbToHex: _colorGradient.default.rgbToHex,
  14563. test: _test.default,
  14564. random: _random.default,
  14565. deepClone: _deepClone.default,
  14566. deepMerge: _deepMerge.default,
  14567. getParent: _getParent.default,
  14568. $parent: _$parent.default,
  14569. addUnit: _addUnit.default,
  14570. trim: _trim.default,
  14571. type: ['primary', 'success', 'error', 'warning', 'info'],
  14572. http: _request.default,
  14573. toast: _toast.default,
  14574. config: _config.default,
  14575. // uView配置信息相关,比如版本号
  14576. zIndex: _zIndex.default,
  14577. debounce: _debounce.default,
  14578. throttle: _throttle.default
  14579. };
  14580. // $u挂载到uni对象上
  14581. uni.$u = $u;
  14582. var install = function install(Vue) {
  14583. Vue.mixin(_mixin.default);
  14584. if (Vue.prototype.openShare) {
  14585. Vue.mixin(mpShare);
  14586. }
  14587. // Vue.mixin(vuexStore);
  14588. // 时间格式化,同时两个名称,date和timeFormat
  14589. Vue.filter('timeFormat', function (timestamp, format) {
  14590. return (0, _timeFormat.default)(timestamp, format);
  14591. });
  14592. Vue.filter('date', function (timestamp, format) {
  14593. return (0, _timeFormat.default)(timestamp, format);
  14594. });
  14595. // 将多久以前的方法,注入到全局过滤器
  14596. Vue.filter('timeFrom', function (timestamp, format) {
  14597. return (0, _timeFrom.default)(timestamp, format);
  14598. });
  14599. Vue.prototype.$u = $u;
  14600. };
  14601. var _default = {
  14602. install: install
  14603. };
  14604. exports.default = _default;
  14605. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  14606. /***/ }),
  14607. /***/ 43:
  14608. /*!**********************************************************************!*\
  14609. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/libs/mixin/mixin.js ***!
  14610. \**********************************************************************/
  14611. /*! no static exports found */
  14612. /***/ (function(module, exports, __webpack_require__) {
  14613. /* WEBPACK VAR INJECTION */(function(uni) {module.exports = {
  14614. data: function data() {
  14615. return {};
  14616. },
  14617. onLoad: function onLoad() {
  14618. // getRect挂载到$u上,因为这方法需要使用in(this),所以无法把它独立成一个单独的文件导出
  14619. this.$u.getRect = this.$uGetRect;
  14620. },
  14621. methods: {
  14622. // 查询节点信息
  14623. // 目前此方法在支付宝小程序中无法获取组件跟接点的尺寸,为支付宝的bug(2020-07-21)
  14624. // 解决办法为在组件根部再套一个没有任何作用的view元素
  14625. $uGetRect: function $uGetRect(selector, all) {
  14626. var _this = this;
  14627. return new Promise(function (resolve) {
  14628. uni.createSelectorQuery().in(_this)[all ? 'selectAll' : 'select'](selector).boundingClientRect(function (rect) {
  14629. if (all && Array.isArray(rect) && rect.length) {
  14630. resolve(rect);
  14631. }
  14632. if (!all && rect) {
  14633. resolve(rect);
  14634. }
  14635. }).exec();
  14636. });
  14637. },
  14638. getParentData: function getParentData() {
  14639. var _this2 = this;
  14640. var parentName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
  14641. // 避免在created中去定义parent变量
  14642. if (!this.parent) this.parent = false;
  14643. // 这里的本质原理是,通过获取父组件实例(也即u-radio-group的this)
  14644. // 将父组件this中对应的参数,赋值给本组件(u-radio的this)的parentData对象中对应的属性
  14645. // 之所以需要这么做,是因为所有端中,头条小程序不支持通过this.parent.xxx去监听父组件参数的变化
  14646. this.parent = this.$u.$parent.call(this, parentName);
  14647. if (this.parent) {
  14648. // 历遍parentData中的属性,将parent中的同名属性赋值给parentData
  14649. Object.keys(this.parentData).map(function (key) {
  14650. _this2.parentData[key] = _this2.parent[key];
  14651. });
  14652. }
  14653. },
  14654. // 阻止事件冒泡
  14655. preventEvent: function preventEvent(e) {
  14656. e && e.stopPropagation && e.stopPropagation();
  14657. }
  14658. },
  14659. onReachBottom: function onReachBottom() {
  14660. uni.$emit('uOnReachBottom');
  14661. },
  14662. beforeDestroy: function beforeDestroy() {
  14663. var _this3 = this;
  14664. // 判断当前页面是否存在parent和children,一般在checkbox和checkbox-group父子联动的场景会有此情况
  14665. // 组件销毁时,移除子组件在父组件children数组中的实例,释放资源,避免数据混乱
  14666. if (this.parent && uni.$u.test.array(this.parent.children)) {
  14667. // 组件销毁时,移除父组件中的children数组中对应的实例
  14668. var childrenList = this.parent.children;
  14669. childrenList.map(function (child, index) {
  14670. // 如果相等,则移除
  14671. if (child === _this3) {
  14672. childrenList.splice(index, 1);
  14673. }
  14674. });
  14675. }
  14676. }
  14677. };
  14678. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  14679. /***/ }),
  14680. /***/ 44:
  14681. /*!************************************************************************!*\
  14682. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/libs/request/index.js ***!
  14683. \************************************************************************/
  14684. /*! no static exports found */
  14685. /***/ (function(module, exports, __webpack_require__) {
  14686. "use strict";
  14687. /* WEBPACK VAR INJECTION */(function(uni) {
  14688. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  14689. Object.defineProperty(exports, "__esModule", {
  14690. value: true
  14691. });
  14692. exports.default = void 0;
  14693. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  14694. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  14695. var _deepMerge = _interopRequireDefault(__webpack_require__(/*! ../function/deepMerge */ 45));
  14696. var _test = _interopRequireDefault(__webpack_require__(/*! ../function/test */ 47));
  14697. var Request = /*#__PURE__*/function () {
  14698. function Request() {
  14699. var _this = this;
  14700. (0, _classCallCheck2.default)(this, Request);
  14701. this.config = {
  14702. baseUrl: '',
  14703. // 请求的根域名
  14704. // 默认的请求头
  14705. header: {},
  14706. method: 'POST',
  14707. // 设置为json,返回后uni.request会对数据进行一次JSON.parse
  14708. dataType: 'json',
  14709. // 此参数无需处理,因为5+和支付宝小程序不支持,默认为text即可
  14710. responseType: 'text',
  14711. showLoading: true,
  14712. // 是否显示请求中的loading
  14713. loadingText: '请求中...',
  14714. loadingTime: 800,
  14715. // 在此时间内,请求还没回来的话,就显示加载中动画,单位ms
  14716. timer: null,
  14717. // 定时器
  14718. originalData: false,
  14719. // 是否在拦截器中返回服务端的原始数据,见文档说明
  14720. loadingMask: true // 展示loading的时候,是否给一个透明的蒙层,防止触摸穿透
  14721. };
  14722. // 拦截器
  14723. this.interceptor = {
  14724. // 请求前的拦截
  14725. request: null,
  14726. // 请求后的拦截
  14727. response: null
  14728. };
  14729. // get请求
  14730. this.get = function (url) {
  14731. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  14732. var header = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  14733. return _this.request({
  14734. method: 'GET',
  14735. url: url,
  14736. header: header,
  14737. data: data
  14738. });
  14739. };
  14740. // post请求
  14741. this.post = function (url) {
  14742. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  14743. var header = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  14744. return _this.request({
  14745. url: url,
  14746. method: 'POST',
  14747. header: header,
  14748. data: data
  14749. });
  14750. };
  14751. // put请求,不支持支付宝小程序(HX2.6.15)
  14752. this.put = function (url) {
  14753. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  14754. var header = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  14755. return _this.request({
  14756. url: url,
  14757. method: 'PUT',
  14758. header: header,
  14759. data: data
  14760. });
  14761. };
  14762. // delete请求,不支持支付宝和头条小程序(HX2.6.15)
  14763. this.delete = function (url) {
  14764. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  14765. var header = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  14766. return _this.request({
  14767. url: url,
  14768. method: 'DELETE',
  14769. header: header,
  14770. data: data
  14771. });
  14772. };
  14773. }
  14774. (0, _createClass2.default)(Request, [{
  14775. key: "setConfig",
  14776. value:
  14777. // 设置全局默认配置
  14778. function setConfig(customConfig) {
  14779. // 深度合并对象,否则会造成对象深层属性丢失
  14780. this.config = (0, _deepMerge.default)(this.config, customConfig);
  14781. }
  14782. // 主要请求部分
  14783. }, {
  14784. key: "request",
  14785. value: function request() {
  14786. var _this2 = this;
  14787. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  14788. // 检查请求拦截
  14789. if (this.interceptor.request && typeof this.interceptor.request === 'function') {
  14790. var tmpConfig = {};
  14791. var interceptorRequest = this.interceptor.request(options);
  14792. if (interceptorRequest === false) {
  14793. // 返回一个处于pending状态中的Promise,来取消原promise,避免进入then()回调
  14794. return new Promise(function () {});
  14795. }
  14796. this.options = interceptorRequest;
  14797. }
  14798. options.dataType = options.dataType || this.config.dataType;
  14799. options.responseType = options.responseType || this.config.responseType;
  14800. options.url = options.url || '';
  14801. options.params = options.params || {};
  14802. options.header = Object.assign({}, this.config.header, options.header);
  14803. options.method = options.method || this.config.method;
  14804. return new Promise(function (resolve, reject) {
  14805. options.complete = function (response) {
  14806. // 请求返回后,隐藏loading(如果请求返回快的话,可能会没有loading)
  14807. uni.hideLoading();
  14808. // 清除定时器,如果请求回来了,就无需loading
  14809. clearTimeout(_this2.config.timer);
  14810. _this2.config.timer = null;
  14811. // 判断用户对拦截返回数据的要求,如果originalData为true,返回所有的数据(response)到拦截器,否则只返回response.data
  14812. if (_this2.config.originalData) {
  14813. // 判断是否存在拦截器
  14814. if (_this2.interceptor.response && typeof _this2.interceptor.response === 'function') {
  14815. var resInterceptors = _this2.interceptor.response(response);
  14816. // 如果拦截器不返回false,就将拦截器返回的内容给this.$u.post的then回调
  14817. if (resInterceptors !== false) {
  14818. resolve(resInterceptors);
  14819. } else {
  14820. // 如果拦截器返回false,意味着拦截器定义者认为返回有问题,直接接入catch回调
  14821. reject(response);
  14822. }
  14823. } else {
  14824. // 如果要求返回原始数据,就算没有拦截器,也返回最原始的数据
  14825. resolve(response);
  14826. }
  14827. } else {
  14828. if (response.statusCode == 200) {
  14829. if (_this2.interceptor.response && typeof _this2.interceptor.response === 'function') {
  14830. var _resInterceptors = _this2.interceptor.response(response.data);
  14831. if (_resInterceptors !== false) {
  14832. resolve(_resInterceptors);
  14833. } else {
  14834. reject(response.data);
  14835. }
  14836. } else {
  14837. // 如果不是返回原始数据(originalData=false),且没有拦截器的情况下,返回纯数据给then回调
  14838. resolve(response.data);
  14839. }
  14840. } else {
  14841. // 不返回原始数据的情况下,服务器状态码不为200,modal弹框提示
  14842. // if(response.errMsg) {
  14843. // uni.showModal({
  14844. // title: response.errMsg
  14845. // });
  14846. // }
  14847. reject(response);
  14848. }
  14849. }
  14850. };
  14851. // 判断用户传递的URL是否/开头,如果不是,加上/,这里使用了uView的test.js验证库的url()方法
  14852. options.url = _test.default.url(options.url) ? options.url : _this2.config.baseUrl + (options.url.indexOf('/') == 0 ? options.url : '/' + options.url);
  14853. // 是否显示loading
  14854. // 加一个是否已有timer定时器的判断,否则有两个同时请求的时候,后者会清除前者的定时器id
  14855. // 而没有清除前者的定时器,导致前者超时,一直显示loading
  14856. if (_this2.config.showLoading && !_this2.config.timer) {
  14857. _this2.config.timer = setTimeout(function () {
  14858. uni.showLoading({
  14859. title: _this2.config.loadingText,
  14860. mask: _this2.config.loadingMask
  14861. });
  14862. _this2.config.timer = null;
  14863. }, _this2.config.loadingTime);
  14864. }
  14865. uni.request(options);
  14866. });
  14867. // .catch(res => {
  14868. // // 如果返回reject(),不让其进入this.$u.post().then().catch()后面的catct()
  14869. // // 因为很多人都会忘了写后面的catch(),导致报错捕获不到catch
  14870. // return new Promise(()=>{});
  14871. // })
  14872. }
  14873. }]);
  14874. return Request;
  14875. }();
  14876. var _default = new Request();
  14877. exports.default = _default;
  14878. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  14879. /***/ }),
  14880. /***/ 45:
  14881. /*!*****************************************************************************!*\
  14882. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/libs/function/deepMerge.js ***!
  14883. \*****************************************************************************/
  14884. /*! no static exports found */
  14885. /***/ (function(module, exports, __webpack_require__) {
  14886. "use strict";
  14887. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  14888. Object.defineProperty(exports, "__esModule", {
  14889. value: true
  14890. });
  14891. exports.default = void 0;
  14892. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  14893. var _deepClone = _interopRequireDefault(__webpack_require__(/*! ./deepClone */ 46));
  14894. // JS对象深度合并
  14895. function deepMerge() {
  14896. var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  14897. var source = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  14898. target = (0, _deepClone.default)(target);
  14899. if ((0, _typeof2.default)(target) !== 'object' || (0, _typeof2.default)(source) !== 'object') return false;
  14900. for (var prop in source) {
  14901. if (!source.hasOwnProperty(prop)) continue;
  14902. if (prop in target) {
  14903. if ((0, _typeof2.default)(target[prop]) !== 'object') {
  14904. target[prop] = source[prop];
  14905. } else {
  14906. if ((0, _typeof2.default)(source[prop]) !== 'object') {
  14907. target[prop] = source[prop];
  14908. } else {
  14909. if (target[prop].concat && source[prop].concat) {
  14910. target[prop] = target[prop].concat(source[prop]);
  14911. } else {
  14912. target[prop] = deepMerge(target[prop], source[prop]);
  14913. }
  14914. }
  14915. }
  14916. } else {
  14917. target[prop] = source[prop];
  14918. }
  14919. }
  14920. return target;
  14921. }
  14922. var _default = deepMerge;
  14923. exports.default = _default;
  14924. /***/ }),
  14925. /***/ 46:
  14926. /*!*****************************************************************************!*\
  14927. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/libs/function/deepClone.js ***!
  14928. \*****************************************************************************/
  14929. /*! no static exports found */
  14930. /***/ (function(module, exports, __webpack_require__) {
  14931. "use strict";
  14932. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  14933. Object.defineProperty(exports, "__esModule", {
  14934. value: true
  14935. });
  14936. exports.default = void 0;
  14937. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  14938. // 判断arr是否为一个数组,返回一个bool值
  14939. function isArray(arr) {
  14940. return Object.prototype.toString.call(arr) === '[object Array]';
  14941. }
  14942. // 深度克隆
  14943. function deepClone(obj) {
  14944. // 对常见的“非”值,直接返回原来值
  14945. if ([null, undefined, NaN, false].includes(obj)) return obj;
  14946. if ((0, _typeof2.default)(obj) !== "object" && typeof obj !== 'function') {
  14947. //原始类型直接返回
  14948. return obj;
  14949. }
  14950. var o = isArray(obj) ? [] : {};
  14951. for (var i in obj) {
  14952. if (obj.hasOwnProperty(i)) {
  14953. o[i] = (0, _typeof2.default)(obj[i]) === "object" ? deepClone(obj[i]) : obj[i];
  14954. }
  14955. }
  14956. return o;
  14957. }
  14958. var _default = deepClone;
  14959. exports.default = _default;
  14960. /***/ }),
  14961. /***/ 467:
  14962. /*!************************************************************************!*\
  14963. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/libs/util/province.js ***!
  14964. \************************************************************************/
  14965. /*! no static exports found */
  14966. /***/ (function(module, exports, __webpack_require__) {
  14967. "use strict";
  14968. Object.defineProperty(exports, "__esModule", {
  14969. value: true
  14970. });
  14971. exports.default = void 0;
  14972. var provinceData = [{
  14973. "label": "北京市",
  14974. "value": "11"
  14975. }, {
  14976. "label": "天津市",
  14977. "value": "12"
  14978. }, {
  14979. "label": "河北省",
  14980. "value": "13"
  14981. }, {
  14982. "label": "山西省",
  14983. "value": "14"
  14984. }, {
  14985. "label": "内蒙古自治区",
  14986. "value": "15"
  14987. }, {
  14988. "label": "辽宁省",
  14989. "value": "21"
  14990. }, {
  14991. "label": "吉林省",
  14992. "value": "22"
  14993. }, {
  14994. "label": "黑龙江省",
  14995. "value": "23"
  14996. }, {
  14997. "label": "上海市",
  14998. "value": "31"
  14999. }, {
  15000. "label": "江苏省",
  15001. "value": "32"
  15002. }, {
  15003. "label": "浙江省",
  15004. "value": "33"
  15005. }, {
  15006. "label": "安徽省",
  15007. "value": "34"
  15008. }, {
  15009. "label": "福建省",
  15010. "value": "35"
  15011. }, {
  15012. "label": "江西省",
  15013. "value": "36"
  15014. }, {
  15015. "label": "山东省",
  15016. "value": "37"
  15017. }, {
  15018. "label": "河南省",
  15019. "value": "41"
  15020. }, {
  15021. "label": "湖北省",
  15022. "value": "42"
  15023. }, {
  15024. "label": "湖南省",
  15025. "value": "43"
  15026. }, {
  15027. "label": "广东省",
  15028. "value": "44"
  15029. }, {
  15030. "label": "广西壮族自治区",
  15031. "value": "45"
  15032. }, {
  15033. "label": "海南省",
  15034. "value": "46"
  15035. }, {
  15036. "label": "重庆市",
  15037. "value": "50"
  15038. }, {
  15039. "label": "四川省",
  15040. "value": "51"
  15041. }, {
  15042. "label": "贵州省",
  15043. "value": "52"
  15044. }, {
  15045. "label": "云南省",
  15046. "value": "53"
  15047. }, {
  15048. "label": "西藏自治区",
  15049. "value": "54"
  15050. }, {
  15051. "label": "陕西省",
  15052. "value": "61"
  15053. }, {
  15054. "label": "甘肃省",
  15055. "value": "62"
  15056. }, {
  15057. "label": "青海省",
  15058. "value": "63"
  15059. }, {
  15060. "label": "宁夏回族自治区",
  15061. "value": "64"
  15062. }, {
  15063. "label": "新疆维吾尔自治区",
  15064. "value": "65"
  15065. }, {
  15066. "label": "台湾",
  15067. "value": "66"
  15068. }, {
  15069. "label": "香港",
  15070. "value": "67"
  15071. }, {
  15072. "label": "澳门",
  15073. "value": "68"
  15074. }];
  15075. var _default = provinceData;
  15076. exports.default = _default;
  15077. /***/ }),
  15078. /***/ 468:
  15079. /*!********************************************************************!*\
  15080. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/libs/util/city.js ***!
  15081. \********************************************************************/
  15082. /*! no static exports found */
  15083. /***/ (function(module, exports, __webpack_require__) {
  15084. "use strict";
  15085. Object.defineProperty(exports, "__esModule", {
  15086. value: true
  15087. });
  15088. exports.default = void 0;
  15089. var cityData = [[{
  15090. "label": "市辖区",
  15091. "value": "1101"
  15092. }], [{
  15093. "label": "市辖区",
  15094. "value": "1201"
  15095. }], [{
  15096. "label": "石家庄市",
  15097. "value": "1301"
  15098. }, {
  15099. "label": "唐山市",
  15100. "value": "1302"
  15101. }, {
  15102. "label": "秦皇岛市",
  15103. "value": "1303"
  15104. }, {
  15105. "label": "邯郸市",
  15106. "value": "1304"
  15107. }, {
  15108. "label": "邢台市",
  15109. "value": "1305"
  15110. }, {
  15111. "label": "保定市",
  15112. "value": "1306"
  15113. }, {
  15114. "label": "张家口市",
  15115. "value": "1307"
  15116. }, {
  15117. "label": "承德市",
  15118. "value": "1308"
  15119. }, {
  15120. "label": "沧州市",
  15121. "value": "1309"
  15122. }, {
  15123. "label": "廊坊市",
  15124. "value": "1310"
  15125. }, {
  15126. "label": "衡水市",
  15127. "value": "1311"
  15128. }], [{
  15129. "label": "太原市",
  15130. "value": "1401"
  15131. }, {
  15132. "label": "大同市",
  15133. "value": "1402"
  15134. }, {
  15135. "label": "阳泉市",
  15136. "value": "1403"
  15137. }, {
  15138. "label": "长治市",
  15139. "value": "1404"
  15140. }, {
  15141. "label": "晋城市",
  15142. "value": "1405"
  15143. }, {
  15144. "label": "朔州市",
  15145. "value": "1406"
  15146. }, {
  15147. "label": "晋中市",
  15148. "value": "1407"
  15149. }, {
  15150. "label": "运城市",
  15151. "value": "1408"
  15152. }, {
  15153. "label": "忻州市",
  15154. "value": "1409"
  15155. }, {
  15156. "label": "临汾市",
  15157. "value": "1410"
  15158. }, {
  15159. "label": "吕梁市",
  15160. "value": "1411"
  15161. }], [{
  15162. "label": "呼和浩特市",
  15163. "value": "1501"
  15164. }, {
  15165. "label": "包头市",
  15166. "value": "1502"
  15167. }, {
  15168. "label": "乌海市",
  15169. "value": "1503"
  15170. }, {
  15171. "label": "赤峰市",
  15172. "value": "1504"
  15173. }, {
  15174. "label": "通辽市",
  15175. "value": "1505"
  15176. }, {
  15177. "label": "鄂尔多斯市",
  15178. "value": "1506"
  15179. }, {
  15180. "label": "呼伦贝尔市",
  15181. "value": "1507"
  15182. }, {
  15183. "label": "巴彦淖尔市",
  15184. "value": "1508"
  15185. }, {
  15186. "label": "乌兰察布市",
  15187. "value": "1509"
  15188. }, {
  15189. "label": "兴安盟",
  15190. "value": "1522"
  15191. }, {
  15192. "label": "锡林郭勒盟",
  15193. "value": "1525"
  15194. }, {
  15195. "label": "阿拉善盟",
  15196. "value": "1529"
  15197. }], [{
  15198. "label": "沈阳市",
  15199. "value": "2101"
  15200. }, {
  15201. "label": "大连市",
  15202. "value": "2102"
  15203. }, {
  15204. "label": "鞍山市",
  15205. "value": "2103"
  15206. }, {
  15207. "label": "抚顺市",
  15208. "value": "2104"
  15209. }, {
  15210. "label": "本溪市",
  15211. "value": "2105"
  15212. }, {
  15213. "label": "丹东市",
  15214. "value": "2106"
  15215. }, {
  15216. "label": "锦州市",
  15217. "value": "2107"
  15218. }, {
  15219. "label": "营口市",
  15220. "value": "2108"
  15221. }, {
  15222. "label": "阜新市",
  15223. "value": "2109"
  15224. }, {
  15225. "label": "辽阳市",
  15226. "value": "2110"
  15227. }, {
  15228. "label": "盘锦市",
  15229. "value": "2111"
  15230. }, {
  15231. "label": "铁岭市",
  15232. "value": "2112"
  15233. }, {
  15234. "label": "朝阳市",
  15235. "value": "2113"
  15236. }, {
  15237. "label": "葫芦岛市",
  15238. "value": "2114"
  15239. }], [{
  15240. "label": "长春市",
  15241. "value": "2201"
  15242. }, {
  15243. "label": "吉林市",
  15244. "value": "2202"
  15245. }, {
  15246. "label": "四平市",
  15247. "value": "2203"
  15248. }, {
  15249. "label": "辽源市",
  15250. "value": "2204"
  15251. }, {
  15252. "label": "通化市",
  15253. "value": "2205"
  15254. }, {
  15255. "label": "白山市",
  15256. "value": "2206"
  15257. }, {
  15258. "label": "松原市",
  15259. "value": "2207"
  15260. }, {
  15261. "label": "白城市",
  15262. "value": "2208"
  15263. }, {
  15264. "label": "延边朝鲜族自治州",
  15265. "value": "2224"
  15266. }], [{
  15267. "label": "哈尔滨市",
  15268. "value": "2301"
  15269. }, {
  15270. "label": "齐齐哈尔市",
  15271. "value": "2302"
  15272. }, {
  15273. "label": "鸡西市",
  15274. "value": "2303"
  15275. }, {
  15276. "label": "鹤岗市",
  15277. "value": "2304"
  15278. }, {
  15279. "label": "双鸭山市",
  15280. "value": "2305"
  15281. }, {
  15282. "label": "大庆市",
  15283. "value": "2306"
  15284. }, {
  15285. "label": "伊春市",
  15286. "value": "2307"
  15287. }, {
  15288. "label": "佳木斯市",
  15289. "value": "2308"
  15290. }, {
  15291. "label": "七台河市",
  15292. "value": "2309"
  15293. }, {
  15294. "label": "牡丹江市",
  15295. "value": "2310"
  15296. }, {
  15297. "label": "黑河市",
  15298. "value": "2311"
  15299. }, {
  15300. "label": "绥化市",
  15301. "value": "2312"
  15302. }, {
  15303. "label": "大兴安岭地区",
  15304. "value": "2327"
  15305. }], [{
  15306. "label": "市辖区",
  15307. "value": "3101"
  15308. }], [{
  15309. "label": "南京市",
  15310. "value": "3201"
  15311. }, {
  15312. "label": "无锡市",
  15313. "value": "3202"
  15314. }, {
  15315. "label": "徐州市",
  15316. "value": "3203"
  15317. }, {
  15318. "label": "常州市",
  15319. "value": "3204"
  15320. }, {
  15321. "label": "苏州市",
  15322. "value": "3205"
  15323. }, {
  15324. "label": "南通市",
  15325. "value": "3206"
  15326. }, {
  15327. "label": "连云港市",
  15328. "value": "3207"
  15329. }, {
  15330. "label": "淮安市",
  15331. "value": "3208"
  15332. }, {
  15333. "label": "盐城市",
  15334. "value": "3209"
  15335. }, {
  15336. "label": "扬州市",
  15337. "value": "3210"
  15338. }, {
  15339. "label": "镇江市",
  15340. "value": "3211"
  15341. }, {
  15342. "label": "泰州市",
  15343. "value": "3212"
  15344. }, {
  15345. "label": "宿迁市",
  15346. "value": "3213"
  15347. }], [{
  15348. "label": "杭州市",
  15349. "value": "3301"
  15350. }, {
  15351. "label": "宁波市",
  15352. "value": "3302"
  15353. }, {
  15354. "label": "温州市",
  15355. "value": "3303"
  15356. }, {
  15357. "label": "嘉兴市",
  15358. "value": "3304"
  15359. }, {
  15360. "label": "湖州市",
  15361. "value": "3305"
  15362. }, {
  15363. "label": "绍兴市",
  15364. "value": "3306"
  15365. }, {
  15366. "label": "金华市",
  15367. "value": "3307"
  15368. }, {
  15369. "label": "衢州市",
  15370. "value": "3308"
  15371. }, {
  15372. "label": "舟山市",
  15373. "value": "3309"
  15374. }, {
  15375. "label": "台州市",
  15376. "value": "3310"
  15377. }, {
  15378. "label": "丽水市",
  15379. "value": "3311"
  15380. }], [{
  15381. "label": "合肥市",
  15382. "value": "3401"
  15383. }, {
  15384. "label": "芜湖市",
  15385. "value": "3402"
  15386. }, {
  15387. "label": "蚌埠市",
  15388. "value": "3403"
  15389. }, {
  15390. "label": "淮南市",
  15391. "value": "3404"
  15392. }, {
  15393. "label": "马鞍山市",
  15394. "value": "3405"
  15395. }, {
  15396. "label": "淮北市",
  15397. "value": "3406"
  15398. }, {
  15399. "label": "铜陵市",
  15400. "value": "3407"
  15401. }, {
  15402. "label": "安庆市",
  15403. "value": "3408"
  15404. }, {
  15405. "label": "黄山市",
  15406. "value": "3410"
  15407. }, {
  15408. "label": "滁州市",
  15409. "value": "3411"
  15410. }, {
  15411. "label": "阜阳市",
  15412. "value": "3412"
  15413. }, {
  15414. "label": "宿州市",
  15415. "value": "3413"
  15416. }, {
  15417. "label": "六安市",
  15418. "value": "3415"
  15419. }, {
  15420. "label": "亳州市",
  15421. "value": "3416"
  15422. }, {
  15423. "label": "池州市",
  15424. "value": "3417"
  15425. }, {
  15426. "label": "宣城市",
  15427. "value": "3418"
  15428. }], [{
  15429. "label": "福州市",
  15430. "value": "3501"
  15431. }, {
  15432. "label": "厦门市",
  15433. "value": "3502"
  15434. }, {
  15435. "label": "莆田市",
  15436. "value": "3503"
  15437. }, {
  15438. "label": "三明市",
  15439. "value": "3504"
  15440. }, {
  15441. "label": "泉州市",
  15442. "value": "3505"
  15443. }, {
  15444. "label": "漳州市",
  15445. "value": "3506"
  15446. }, {
  15447. "label": "南平市",
  15448. "value": "3507"
  15449. }, {
  15450. "label": "龙岩市",
  15451. "value": "3508"
  15452. }, {
  15453. "label": "宁德市",
  15454. "value": "3509"
  15455. }], [{
  15456. "label": "南昌市",
  15457. "value": "3601"
  15458. }, {
  15459. "label": "景德镇市",
  15460. "value": "3602"
  15461. }, {
  15462. "label": "萍乡市",
  15463. "value": "3603"
  15464. }, {
  15465. "label": "九江市",
  15466. "value": "3604"
  15467. }, {
  15468. "label": "新余市",
  15469. "value": "3605"
  15470. }, {
  15471. "label": "鹰潭市",
  15472. "value": "3606"
  15473. }, {
  15474. "label": "赣州市",
  15475. "value": "3607"
  15476. }, {
  15477. "label": "吉安市",
  15478. "value": "3608"
  15479. }, {
  15480. "label": "宜春市",
  15481. "value": "3609"
  15482. }, {
  15483. "label": "抚州市",
  15484. "value": "3610"
  15485. }, {
  15486. "label": "上饶市",
  15487. "value": "3611"
  15488. }], [{
  15489. "label": "济南市",
  15490. "value": "3701"
  15491. }, {
  15492. "label": "青岛市",
  15493. "value": "3702"
  15494. }, {
  15495. "label": "淄博市",
  15496. "value": "3703"
  15497. }, {
  15498. "label": "枣庄市",
  15499. "value": "3704"
  15500. }, {
  15501. "label": "东营市",
  15502. "value": "3705"
  15503. }, {
  15504. "label": "烟台市",
  15505. "value": "3706"
  15506. }, {
  15507. "label": "潍坊市",
  15508. "value": "3707"
  15509. }, {
  15510. "label": "济宁市",
  15511. "value": "3708"
  15512. }, {
  15513. "label": "泰安市",
  15514. "value": "3709"
  15515. }, {
  15516. "label": "威海市",
  15517. "value": "3710"
  15518. }, {
  15519. "label": "日照市",
  15520. "value": "3711"
  15521. }, {
  15522. "label": "莱芜市",
  15523. "value": "3712"
  15524. }, {
  15525. "label": "临沂市",
  15526. "value": "3713"
  15527. }, {
  15528. "label": "德州市",
  15529. "value": "3714"
  15530. }, {
  15531. "label": "聊城市",
  15532. "value": "3715"
  15533. }, {
  15534. "label": "滨州市",
  15535. "value": "3716"
  15536. }, {
  15537. "label": "菏泽市",
  15538. "value": "3717"
  15539. }], [{
  15540. "label": "郑州市",
  15541. "value": "4101"
  15542. }, {
  15543. "label": "开封市",
  15544. "value": "4102"
  15545. }, {
  15546. "label": "洛阳市",
  15547. "value": "4103"
  15548. }, {
  15549. "label": "平顶山市",
  15550. "value": "4104"
  15551. }, {
  15552. "label": "安阳市",
  15553. "value": "4105"
  15554. }, {
  15555. "label": "鹤壁市",
  15556. "value": "4106"
  15557. }, {
  15558. "label": "新乡市",
  15559. "value": "4107"
  15560. }, {
  15561. "label": "焦作市",
  15562. "value": "4108"
  15563. }, {
  15564. "label": "濮阳市",
  15565. "value": "4109"
  15566. }, {
  15567. "label": "许昌市",
  15568. "value": "4110"
  15569. }, {
  15570. "label": "漯河市",
  15571. "value": "4111"
  15572. }, {
  15573. "label": "三门峡市",
  15574. "value": "4112"
  15575. }, {
  15576. "label": "南阳市",
  15577. "value": "4113"
  15578. }, {
  15579. "label": "商丘市",
  15580. "value": "4114"
  15581. }, {
  15582. "label": "信阳市",
  15583. "value": "4115"
  15584. }, {
  15585. "label": "周口市",
  15586. "value": "4116"
  15587. }, {
  15588. "label": "驻马店市",
  15589. "value": "4117"
  15590. }, {
  15591. "label": "省直辖县级行政区划",
  15592. "value": "4190"
  15593. }], [{
  15594. "label": "武汉市",
  15595. "value": "4201"
  15596. }, {
  15597. "label": "黄石市",
  15598. "value": "4202"
  15599. }, {
  15600. "label": "十堰市",
  15601. "value": "4203"
  15602. }, {
  15603. "label": "宜昌市",
  15604. "value": "4205"
  15605. }, {
  15606. "label": "襄阳市",
  15607. "value": "4206"
  15608. }, {
  15609. "label": "鄂州市",
  15610. "value": "4207"
  15611. }, {
  15612. "label": "荆门市",
  15613. "value": "4208"
  15614. }, {
  15615. "label": "孝感市",
  15616. "value": "4209"
  15617. }, {
  15618. "label": "荆州市",
  15619. "value": "4210"
  15620. }, {
  15621. "label": "黄冈市",
  15622. "value": "4211"
  15623. }, {
  15624. "label": "咸宁市",
  15625. "value": "4212"
  15626. }, {
  15627. "label": "随州市",
  15628. "value": "4213"
  15629. }, {
  15630. "label": "恩施土家族苗族自治州",
  15631. "value": "4228"
  15632. }, {
  15633. "label": "省直辖县级行政区划",
  15634. "value": "4290"
  15635. }], [{
  15636. "label": "长沙市",
  15637. "value": "4301"
  15638. }, {
  15639. "label": "株洲市",
  15640. "value": "4302"
  15641. }, {
  15642. "label": "湘潭市",
  15643. "value": "4303"
  15644. }, {
  15645. "label": "衡阳市",
  15646. "value": "4304"
  15647. }, {
  15648. "label": "邵阳市",
  15649. "value": "4305"
  15650. }, {
  15651. "label": "岳阳市",
  15652. "value": "4306"
  15653. }, {
  15654. "label": "常德市",
  15655. "value": "4307"
  15656. }, {
  15657. "label": "张家界市",
  15658. "value": "4308"
  15659. }, {
  15660. "label": "益阳市",
  15661. "value": "4309"
  15662. }, {
  15663. "label": "郴州市",
  15664. "value": "4310"
  15665. }, {
  15666. "label": "永州市",
  15667. "value": "4311"
  15668. }, {
  15669. "label": "怀化市",
  15670. "value": "4312"
  15671. }, {
  15672. "label": "娄底市",
  15673. "value": "4313"
  15674. }, {
  15675. "label": "湘西土家族苗族自治州",
  15676. "value": "4331"
  15677. }], [{
  15678. "label": "广州市",
  15679. "value": "4401"
  15680. }, {
  15681. "label": "韶关市",
  15682. "value": "4402"
  15683. }, {
  15684. "label": "深圳市",
  15685. "value": "4403"
  15686. }, {
  15687. "label": "珠海市",
  15688. "value": "4404"
  15689. }, {
  15690. "label": "汕头市",
  15691. "value": "4405"
  15692. }, {
  15693. "label": "佛山市",
  15694. "value": "4406"
  15695. }, {
  15696. "label": "江门市",
  15697. "value": "4407"
  15698. }, {
  15699. "label": "湛江市",
  15700. "value": "4408"
  15701. }, {
  15702. "label": "茂名市",
  15703. "value": "4409"
  15704. }, {
  15705. "label": "肇庆市",
  15706. "value": "4412"
  15707. }, {
  15708. "label": "惠州市",
  15709. "value": "4413"
  15710. }, {
  15711. "label": "梅州市",
  15712. "value": "4414"
  15713. }, {
  15714. "label": "汕尾市",
  15715. "value": "4415"
  15716. }, {
  15717. "label": "河源市",
  15718. "value": "4416"
  15719. }, {
  15720. "label": "阳江市",
  15721. "value": "4417"
  15722. }, {
  15723. "label": "清远市",
  15724. "value": "4418"
  15725. }, {
  15726. "label": "东莞市",
  15727. "value": "4419"
  15728. }, {
  15729. "label": "中山市",
  15730. "value": "4420"
  15731. }, {
  15732. "label": "潮州市",
  15733. "value": "4451"
  15734. }, {
  15735. "label": "揭阳市",
  15736. "value": "4452"
  15737. }, {
  15738. "label": "云浮市",
  15739. "value": "4453"
  15740. }], [{
  15741. "label": "南宁市",
  15742. "value": "4501"
  15743. }, {
  15744. "label": "柳州市",
  15745. "value": "4502"
  15746. }, {
  15747. "label": "桂林市",
  15748. "value": "4503"
  15749. }, {
  15750. "label": "梧州市",
  15751. "value": "4504"
  15752. }, {
  15753. "label": "北海市",
  15754. "value": "4505"
  15755. }, {
  15756. "label": "防城港市",
  15757. "value": "4506"
  15758. }, {
  15759. "label": "钦州市",
  15760. "value": "4507"
  15761. }, {
  15762. "label": "贵港市",
  15763. "value": "4508"
  15764. }, {
  15765. "label": "玉林市",
  15766. "value": "4509"
  15767. }, {
  15768. "label": "百色市",
  15769. "value": "4510"
  15770. }, {
  15771. "label": "贺州市",
  15772. "value": "4511"
  15773. }, {
  15774. "label": "河池市",
  15775. "value": "4512"
  15776. }, {
  15777. "label": "来宾市",
  15778. "value": "4513"
  15779. }, {
  15780. "label": "崇左市",
  15781. "value": "4514"
  15782. }], [{
  15783. "label": "海口市",
  15784. "value": "4601"
  15785. }, {
  15786. "label": "三亚市",
  15787. "value": "4602"
  15788. }, {
  15789. "label": "三沙市",
  15790. "value": "4603"
  15791. }, {
  15792. "label": "儋州市",
  15793. "value": "4604"
  15794. }, {
  15795. "label": "省直辖县级行政区划",
  15796. "value": "4690"
  15797. }], [{
  15798. "label": "市辖区",
  15799. "value": "5001"
  15800. }, {
  15801. "label": "县",
  15802. "value": "5002"
  15803. }], [{
  15804. "label": "成都市",
  15805. "value": "5101"
  15806. }, {
  15807. "label": "自贡市",
  15808. "value": "5103"
  15809. }, {
  15810. "label": "攀枝花市",
  15811. "value": "5104"
  15812. }, {
  15813. "label": "泸州市",
  15814. "value": "5105"
  15815. }, {
  15816. "label": "德阳市",
  15817. "value": "5106"
  15818. }, {
  15819. "label": "绵阳市",
  15820. "value": "5107"
  15821. }, {
  15822. "label": "广元市",
  15823. "value": "5108"
  15824. }, {
  15825. "label": "遂宁市",
  15826. "value": "5109"
  15827. }, {
  15828. "label": "内江市",
  15829. "value": "5110"
  15830. }, {
  15831. "label": "乐山市",
  15832. "value": "5111"
  15833. }, {
  15834. "label": "南充市",
  15835. "value": "5113"
  15836. }, {
  15837. "label": "眉山市",
  15838. "value": "5114"
  15839. }, {
  15840. "label": "宜宾市",
  15841. "value": "5115"
  15842. }, {
  15843. "label": "广安市",
  15844. "value": "5116"
  15845. }, {
  15846. "label": "达州市",
  15847. "value": "5117"
  15848. }, {
  15849. "label": "雅安市",
  15850. "value": "5118"
  15851. }, {
  15852. "label": "巴中市",
  15853. "value": "5119"
  15854. }, {
  15855. "label": "资阳市",
  15856. "value": "5120"
  15857. }, {
  15858. "label": "阿坝藏族羌族自治州",
  15859. "value": "5132"
  15860. }, {
  15861. "label": "甘孜藏族自治州",
  15862. "value": "5133"
  15863. }, {
  15864. "label": "凉山彝族自治州",
  15865. "value": "5134"
  15866. }], [{
  15867. "label": "贵阳市",
  15868. "value": "5201"
  15869. }, {
  15870. "label": "六盘水市",
  15871. "value": "5202"
  15872. }, {
  15873. "label": "遵义市",
  15874. "value": "5203"
  15875. }, {
  15876. "label": "安顺市",
  15877. "value": "5204"
  15878. }, {
  15879. "label": "毕节市",
  15880. "value": "5205"
  15881. }, {
  15882. "label": "铜仁市",
  15883. "value": "5206"
  15884. }, {
  15885. "label": "黔西南布依族苗族自治州",
  15886. "value": "5223"
  15887. }, {
  15888. "label": "黔东南苗族侗族自治州",
  15889. "value": "5226"
  15890. }, {
  15891. "label": "黔南布依族苗族自治州",
  15892. "value": "5227"
  15893. }], [{
  15894. "label": "昆明市",
  15895. "value": "5301"
  15896. }, {
  15897. "label": "曲靖市",
  15898. "value": "5303"
  15899. }, {
  15900. "label": "玉溪市",
  15901. "value": "5304"
  15902. }, {
  15903. "label": "保山市",
  15904. "value": "5305"
  15905. }, {
  15906. "label": "昭通市",
  15907. "value": "5306"
  15908. }, {
  15909. "label": "丽江市",
  15910. "value": "5307"
  15911. }, {
  15912. "label": "普洱市",
  15913. "value": "5308"
  15914. }, {
  15915. "label": "临沧市",
  15916. "value": "5309"
  15917. }, {
  15918. "label": "楚雄彝族自治州",
  15919. "value": "5323"
  15920. }, {
  15921. "label": "红河哈尼族彝族自治州",
  15922. "value": "5325"
  15923. }, {
  15924. "label": "文山壮族苗族自治州",
  15925. "value": "5326"
  15926. }, {
  15927. "label": "西双版纳傣族自治州",
  15928. "value": "5328"
  15929. }, {
  15930. "label": "大理白族自治州",
  15931. "value": "5329"
  15932. }, {
  15933. "label": "德宏傣族景颇族自治州",
  15934. "value": "5331"
  15935. }, {
  15936. "label": "怒江傈僳族自治州",
  15937. "value": "5333"
  15938. }, {
  15939. "label": "迪庆藏族自治州",
  15940. "value": "5334"
  15941. }], [{
  15942. "label": "拉萨市",
  15943. "value": "5401"
  15944. }, {
  15945. "label": "日喀则市",
  15946. "value": "5402"
  15947. }, {
  15948. "label": "昌都市",
  15949. "value": "5403"
  15950. }, {
  15951. "label": "林芝市",
  15952. "value": "5404"
  15953. }, {
  15954. "label": "山南市",
  15955. "value": "5405"
  15956. }, {
  15957. "label": "那曲地区",
  15958. "value": "5424"
  15959. }, {
  15960. "label": "阿里地区",
  15961. "value": "5425"
  15962. }], [{
  15963. "label": "西安市",
  15964. "value": "6101"
  15965. }, {
  15966. "label": "铜川市",
  15967. "value": "6102"
  15968. }, {
  15969. "label": "宝鸡市",
  15970. "value": "6103"
  15971. }, {
  15972. "label": "咸阳市",
  15973. "value": "6104"
  15974. }, {
  15975. "label": "渭南市",
  15976. "value": "6105"
  15977. }, {
  15978. "label": "延安市",
  15979. "value": "6106"
  15980. }, {
  15981. "label": "汉中市",
  15982. "value": "6107"
  15983. }, {
  15984. "label": "榆林市",
  15985. "value": "6108"
  15986. }, {
  15987. "label": "安康市",
  15988. "value": "6109"
  15989. }, {
  15990. "label": "商洛市",
  15991. "value": "6110"
  15992. }], [{
  15993. "label": "兰州市",
  15994. "value": "6201"
  15995. }, {
  15996. "label": "嘉峪关市",
  15997. "value": "6202"
  15998. }, {
  15999. "label": "金昌市",
  16000. "value": "6203"
  16001. }, {
  16002. "label": "白银市",
  16003. "value": "6204"
  16004. }, {
  16005. "label": "天水市",
  16006. "value": "6205"
  16007. }, {
  16008. "label": "武威市",
  16009. "value": "6206"
  16010. }, {
  16011. "label": "张掖市",
  16012. "value": "6207"
  16013. }, {
  16014. "label": "平凉市",
  16015. "value": "6208"
  16016. }, {
  16017. "label": "酒泉市",
  16018. "value": "6209"
  16019. }, {
  16020. "label": "庆阳市",
  16021. "value": "6210"
  16022. }, {
  16023. "label": "定西市",
  16024. "value": "6211"
  16025. }, {
  16026. "label": "陇南市",
  16027. "value": "6212"
  16028. }, {
  16029. "label": "临夏回族自治州",
  16030. "value": "6229"
  16031. }, {
  16032. "label": "甘南藏族自治州",
  16033. "value": "6230"
  16034. }], [{
  16035. "label": "西宁市",
  16036. "value": "6301"
  16037. }, {
  16038. "label": "海东市",
  16039. "value": "6302"
  16040. }, {
  16041. "label": "海北藏族自治州",
  16042. "value": "6322"
  16043. }, {
  16044. "label": "黄南藏族自治州",
  16045. "value": "6323"
  16046. }, {
  16047. "label": "海南藏族自治州",
  16048. "value": "6325"
  16049. }, {
  16050. "label": "果洛藏族自治州",
  16051. "value": "6326"
  16052. }, {
  16053. "label": "玉树藏族自治州",
  16054. "value": "6327"
  16055. }, {
  16056. "label": "海西蒙古族藏族自治州",
  16057. "value": "6328"
  16058. }], [{
  16059. "label": "银川市",
  16060. "value": "6401"
  16061. }, {
  16062. "label": "石嘴山市",
  16063. "value": "6402"
  16064. }, {
  16065. "label": "吴忠市",
  16066. "value": "6403"
  16067. }, {
  16068. "label": "固原市",
  16069. "value": "6404"
  16070. }, {
  16071. "label": "中卫市",
  16072. "value": "6405"
  16073. }], [{
  16074. "label": "乌鲁木齐市",
  16075. "value": "6501"
  16076. }, {
  16077. "label": "克拉玛依市",
  16078. "value": "6502"
  16079. }, {
  16080. "label": "吐鲁番市",
  16081. "value": "6504"
  16082. }, {
  16083. "label": "哈密市",
  16084. "value": "6505"
  16085. }, {
  16086. "label": "昌吉回族自治州",
  16087. "value": "6523"
  16088. }, {
  16089. "label": "博尔塔拉蒙古自治州",
  16090. "value": "6527"
  16091. }, {
  16092. "label": "巴音郭楞蒙古自治州",
  16093. "value": "6528"
  16094. }, {
  16095. "label": "阿克苏地区",
  16096. "value": "6529"
  16097. }, {
  16098. "label": "克孜勒苏柯尔克孜自治州",
  16099. "value": "6530"
  16100. }, {
  16101. "label": "喀什地区",
  16102. "value": "6531"
  16103. }, {
  16104. "label": "和田地区",
  16105. "value": "6532"
  16106. }, {
  16107. "label": "伊犁哈萨克自治州",
  16108. "value": "6540"
  16109. }, {
  16110. "label": "塔城地区",
  16111. "value": "6542"
  16112. }, {
  16113. "label": "阿勒泰地区",
  16114. "value": "6543"
  16115. }, {
  16116. "label": "自治区直辖县级行政区划",
  16117. "value": "6590"
  16118. }], [{
  16119. "label": "台北",
  16120. "value": "6601"
  16121. }, {
  16122. "label": "高雄",
  16123. "value": "6602"
  16124. }, {
  16125. "label": "基隆",
  16126. "value": "6603"
  16127. }, {
  16128. "label": "台中",
  16129. "value": "6604"
  16130. }, {
  16131. "label": "台南",
  16132. "value": "6605"
  16133. }, {
  16134. "label": "新竹",
  16135. "value": "6606"
  16136. }, {
  16137. "label": "嘉义",
  16138. "value": "6607"
  16139. }, {
  16140. "label": "宜兰",
  16141. "value": "6608"
  16142. }, {
  16143. "label": "桃园",
  16144. "value": "6609"
  16145. }, {
  16146. "label": "苗栗",
  16147. "value": "6610"
  16148. }, {
  16149. "label": "彰化",
  16150. "value": "6611"
  16151. }, {
  16152. "label": "南投",
  16153. "value": "6612"
  16154. }, {
  16155. "label": "云林",
  16156. "value": "6613"
  16157. }, {
  16158. "label": "屏东",
  16159. "value": "6614"
  16160. }, {
  16161. "label": "台东",
  16162. "value": "6615"
  16163. }, {
  16164. "label": "花莲",
  16165. "value": "6616"
  16166. }, {
  16167. "label": "澎湖",
  16168. "value": "6617"
  16169. }], [{
  16170. "label": "香港岛",
  16171. "value": "6701"
  16172. }, {
  16173. "label": "九龙",
  16174. "value": "6702"
  16175. }, {
  16176. "label": "新界",
  16177. "value": "6703"
  16178. }], [{
  16179. "label": "澳门半岛",
  16180. "value": "6801"
  16181. }, {
  16182. "label": "氹仔岛",
  16183. "value": "6802"
  16184. }, {
  16185. "label": "路环岛",
  16186. "value": "6803"
  16187. }, {
  16188. "label": "路氹城",
  16189. "value": "6804"
  16190. }]];
  16191. var _default = cityData;
  16192. exports.default = _default;
  16193. /***/ }),
  16194. /***/ 469:
  16195. /*!********************************************************************!*\
  16196. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/libs/util/area.js ***!
  16197. \********************************************************************/
  16198. /*! no static exports found */
  16199. /***/ (function(module, exports, __webpack_require__) {
  16200. "use strict";
  16201. Object.defineProperty(exports, "__esModule", {
  16202. value: true
  16203. });
  16204. exports.default = void 0;
  16205. var areaData = [[[{
  16206. "label": "东城区",
  16207. "value": "110101"
  16208. }, {
  16209. "label": "西城区",
  16210. "value": "110102"
  16211. }, {
  16212. "label": "朝阳区",
  16213. "value": "110105"
  16214. }, {
  16215. "label": "丰台区",
  16216. "value": "110106"
  16217. }, {
  16218. "label": "石景山区",
  16219. "value": "110107"
  16220. }, {
  16221. "label": "海淀区",
  16222. "value": "110108"
  16223. }, {
  16224. "label": "门头沟区",
  16225. "value": "110109"
  16226. }, {
  16227. "label": "房山区",
  16228. "value": "110111"
  16229. }, {
  16230. "label": "通州区",
  16231. "value": "110112"
  16232. }, {
  16233. "label": "顺义区",
  16234. "value": "110113"
  16235. }, {
  16236. "label": "昌平区",
  16237. "value": "110114"
  16238. }, {
  16239. "label": "大兴区",
  16240. "value": "110115"
  16241. }, {
  16242. "label": "怀柔区",
  16243. "value": "110116"
  16244. }, {
  16245. "label": "平谷区",
  16246. "value": "110117"
  16247. }, {
  16248. "label": "密云区",
  16249. "value": "110118"
  16250. }, {
  16251. "label": "延庆区",
  16252. "value": "110119"
  16253. }]], [[{
  16254. "label": "和平区",
  16255. "value": "120101"
  16256. }, {
  16257. "label": "河东区",
  16258. "value": "120102"
  16259. }, {
  16260. "label": "河西区",
  16261. "value": "120103"
  16262. }, {
  16263. "label": "南开区",
  16264. "value": "120104"
  16265. }, {
  16266. "label": "河北区",
  16267. "value": "120105"
  16268. }, {
  16269. "label": "红桥区",
  16270. "value": "120106"
  16271. }, {
  16272. "label": "东丽区",
  16273. "value": "120110"
  16274. }, {
  16275. "label": "西青区",
  16276. "value": "120111"
  16277. }, {
  16278. "label": "津南区",
  16279. "value": "120112"
  16280. }, {
  16281. "label": "北辰区",
  16282. "value": "120113"
  16283. }, {
  16284. "label": "武清区",
  16285. "value": "120114"
  16286. }, {
  16287. "label": "宝坻区",
  16288. "value": "120115"
  16289. }, {
  16290. "label": "滨海新区",
  16291. "value": "120116"
  16292. }, {
  16293. "label": "宁河区",
  16294. "value": "120117"
  16295. }, {
  16296. "label": "静海区",
  16297. "value": "120118"
  16298. }, {
  16299. "label": "蓟州区",
  16300. "value": "120119"
  16301. }]], [[{
  16302. "label": "长安区",
  16303. "value": "130102"
  16304. }, {
  16305. "label": "桥西区",
  16306. "value": "130104"
  16307. }, {
  16308. "label": "新华区",
  16309. "value": "130105"
  16310. }, {
  16311. "label": "井陉矿区",
  16312. "value": "130107"
  16313. }, {
  16314. "label": "裕华区",
  16315. "value": "130108"
  16316. }, {
  16317. "label": "藁城区",
  16318. "value": "130109"
  16319. }, {
  16320. "label": "鹿泉区",
  16321. "value": "130110"
  16322. }, {
  16323. "label": "栾城区",
  16324. "value": "130111"
  16325. }, {
  16326. "label": "井陉县",
  16327. "value": "130121"
  16328. }, {
  16329. "label": "正定县",
  16330. "value": "130123"
  16331. }, {
  16332. "label": "行唐县",
  16333. "value": "130125"
  16334. }, {
  16335. "label": "灵寿县",
  16336. "value": "130126"
  16337. }, {
  16338. "label": "高邑县",
  16339. "value": "130127"
  16340. }, {
  16341. "label": "深泽县",
  16342. "value": "130128"
  16343. }, {
  16344. "label": "赞皇县",
  16345. "value": "130129"
  16346. }, {
  16347. "label": "无极县",
  16348. "value": "130130"
  16349. }, {
  16350. "label": "平山县",
  16351. "value": "130131"
  16352. }, {
  16353. "label": "元氏县",
  16354. "value": "130132"
  16355. }, {
  16356. "label": "赵县",
  16357. "value": "130133"
  16358. }, {
  16359. "label": "石家庄高新技术产业开发区",
  16360. "value": "130171"
  16361. }, {
  16362. "label": "石家庄循环化工园区",
  16363. "value": "130172"
  16364. }, {
  16365. "label": "辛集市",
  16366. "value": "130181"
  16367. }, {
  16368. "label": "晋州市",
  16369. "value": "130183"
  16370. }, {
  16371. "label": "新乐市",
  16372. "value": "130184"
  16373. }], [{
  16374. "label": "路南区",
  16375. "value": "130202"
  16376. }, {
  16377. "label": "路北区",
  16378. "value": "130203"
  16379. }, {
  16380. "label": "古冶区",
  16381. "value": "130204"
  16382. }, {
  16383. "label": "开平区",
  16384. "value": "130205"
  16385. }, {
  16386. "label": "丰南区",
  16387. "value": "130207"
  16388. }, {
  16389. "label": "丰润区",
  16390. "value": "130208"
  16391. }, {
  16392. "label": "曹妃甸区",
  16393. "value": "130209"
  16394. }, {
  16395. "label": "滦县",
  16396. "value": "130223"
  16397. }, {
  16398. "label": "滦南县",
  16399. "value": "130224"
  16400. }, {
  16401. "label": "乐亭县",
  16402. "value": "130225"
  16403. }, {
  16404. "label": "迁西县",
  16405. "value": "130227"
  16406. }, {
  16407. "label": "玉田县",
  16408. "value": "130229"
  16409. }, {
  16410. "label": "唐山市芦台经济技术开发区",
  16411. "value": "130271"
  16412. }, {
  16413. "label": "唐山市汉沽管理区",
  16414. "value": "130272"
  16415. }, {
  16416. "label": "唐山高新技术产业开发区",
  16417. "value": "130273"
  16418. }, {
  16419. "label": "河北唐山海港经济开发区",
  16420. "value": "130274"
  16421. }, {
  16422. "label": "遵化市",
  16423. "value": "130281"
  16424. }, {
  16425. "label": "迁安市",
  16426. "value": "130283"
  16427. }], [{
  16428. "label": "海港区",
  16429. "value": "130302"
  16430. }, {
  16431. "label": "山海关区",
  16432. "value": "130303"
  16433. }, {
  16434. "label": "北戴河区",
  16435. "value": "130304"
  16436. }, {
  16437. "label": "抚宁区",
  16438. "value": "130306"
  16439. }, {
  16440. "label": "青龙满族自治县",
  16441. "value": "130321"
  16442. }, {
  16443. "label": "昌黎县",
  16444. "value": "130322"
  16445. }, {
  16446. "label": "卢龙县",
  16447. "value": "130324"
  16448. }, {
  16449. "label": "秦皇岛市经济技术开发区",
  16450. "value": "130371"
  16451. }, {
  16452. "label": "北戴河新区",
  16453. "value": "130372"
  16454. }], [{
  16455. "label": "邯山区",
  16456. "value": "130402"
  16457. }, {
  16458. "label": "丛台区",
  16459. "value": "130403"
  16460. }, {
  16461. "label": "复兴区",
  16462. "value": "130404"
  16463. }, {
  16464. "label": "峰峰矿区",
  16465. "value": "130406"
  16466. }, {
  16467. "label": "肥乡区",
  16468. "value": "130407"
  16469. }, {
  16470. "label": "永年区",
  16471. "value": "130408"
  16472. }, {
  16473. "label": "临漳县",
  16474. "value": "130423"
  16475. }, {
  16476. "label": "成安县",
  16477. "value": "130424"
  16478. }, {
  16479. "label": "大名县",
  16480. "value": "130425"
  16481. }, {
  16482. "label": "涉县",
  16483. "value": "130426"
  16484. }, {
  16485. "label": "磁县",
  16486. "value": "130427"
  16487. }, {
  16488. "label": "邱县",
  16489. "value": "130430"
  16490. }, {
  16491. "label": "鸡泽县",
  16492. "value": "130431"
  16493. }, {
  16494. "label": "广平县",
  16495. "value": "130432"
  16496. }, {
  16497. "label": "馆陶县",
  16498. "value": "130433"
  16499. }, {
  16500. "label": "魏县",
  16501. "value": "130434"
  16502. }, {
  16503. "label": "曲周县",
  16504. "value": "130435"
  16505. }, {
  16506. "label": "邯郸经济技术开发区",
  16507. "value": "130471"
  16508. }, {
  16509. "label": "邯郸冀南新区",
  16510. "value": "130473"
  16511. }, {
  16512. "label": "武安市",
  16513. "value": "130481"
  16514. }], [{
  16515. "label": "桥东区",
  16516. "value": "130502"
  16517. }, {
  16518. "label": "桥西区",
  16519. "value": "130503"
  16520. }, {
  16521. "label": "邢台县",
  16522. "value": "130521"
  16523. }, {
  16524. "label": "临城县",
  16525. "value": "130522"
  16526. }, {
  16527. "label": "内丘县",
  16528. "value": "130523"
  16529. }, {
  16530. "label": "柏乡县",
  16531. "value": "130524"
  16532. }, {
  16533. "label": "隆尧县",
  16534. "value": "130525"
  16535. }, {
  16536. "label": "任县",
  16537. "value": "130526"
  16538. }, {
  16539. "label": "南和县",
  16540. "value": "130527"
  16541. }, {
  16542. "label": "宁晋县",
  16543. "value": "130528"
  16544. }, {
  16545. "label": "巨鹿县",
  16546. "value": "130529"
  16547. }, {
  16548. "label": "新河县",
  16549. "value": "130530"
  16550. }, {
  16551. "label": "广宗县",
  16552. "value": "130531"
  16553. }, {
  16554. "label": "平乡县",
  16555. "value": "130532"
  16556. }, {
  16557. "label": "威县",
  16558. "value": "130533"
  16559. }, {
  16560. "label": "清河县",
  16561. "value": "130534"
  16562. }, {
  16563. "label": "临西县",
  16564. "value": "130535"
  16565. }, {
  16566. "label": "河北邢台经济开发区",
  16567. "value": "130571"
  16568. }, {
  16569. "label": "南宫市",
  16570. "value": "130581"
  16571. }, {
  16572. "label": "沙河市",
  16573. "value": "130582"
  16574. }], [{
  16575. "label": "竞秀区",
  16576. "value": "130602"
  16577. }, {
  16578. "label": "莲池区",
  16579. "value": "130606"
  16580. }, {
  16581. "label": "满城区",
  16582. "value": "130607"
  16583. }, {
  16584. "label": "清苑区",
  16585. "value": "130608"
  16586. }, {
  16587. "label": "徐水区",
  16588. "value": "130609"
  16589. }, {
  16590. "label": "涞水县",
  16591. "value": "130623"
  16592. }, {
  16593. "label": "阜平县",
  16594. "value": "130624"
  16595. }, {
  16596. "label": "定兴县",
  16597. "value": "130626"
  16598. }, {
  16599. "label": "唐县",
  16600. "value": "130627"
  16601. }, {
  16602. "label": "高阳县",
  16603. "value": "130628"
  16604. }, {
  16605. "label": "容城县",
  16606. "value": "130629"
  16607. }, {
  16608. "label": "涞源县",
  16609. "value": "130630"
  16610. }, {
  16611. "label": "望都县",
  16612. "value": "130631"
  16613. }, {
  16614. "label": "安新县",
  16615. "value": "130632"
  16616. }, {
  16617. "label": "易县",
  16618. "value": "130633"
  16619. }, {
  16620. "label": "曲阳县",
  16621. "value": "130634"
  16622. }, {
  16623. "label": "蠡县",
  16624. "value": "130635"
  16625. }, {
  16626. "label": "顺平县",
  16627. "value": "130636"
  16628. }, {
  16629. "label": "博野县",
  16630. "value": "130637"
  16631. }, {
  16632. "label": "雄县",
  16633. "value": "130638"
  16634. }, {
  16635. "label": "保定高新技术产业开发区",
  16636. "value": "130671"
  16637. }, {
  16638. "label": "保定白沟新城",
  16639. "value": "130672"
  16640. }, {
  16641. "label": "涿州市",
  16642. "value": "130681"
  16643. }, {
  16644. "label": "定州市",
  16645. "value": "130682"
  16646. }, {
  16647. "label": "安国市",
  16648. "value": "130683"
  16649. }, {
  16650. "label": "高碑店市",
  16651. "value": "130684"
  16652. }], [{
  16653. "label": "桥东区",
  16654. "value": "130702"
  16655. }, {
  16656. "label": "桥西区",
  16657. "value": "130703"
  16658. }, {
  16659. "label": "宣化区",
  16660. "value": "130705"
  16661. }, {
  16662. "label": "下花园区",
  16663. "value": "130706"
  16664. }, {
  16665. "label": "万全区",
  16666. "value": "130708"
  16667. }, {
  16668. "label": "崇礼区",
  16669. "value": "130709"
  16670. }, {
  16671. "label": "张北县",
  16672. "value": "130722"
  16673. }, {
  16674. "label": "康保县",
  16675. "value": "130723"
  16676. }, {
  16677. "label": "沽源县",
  16678. "value": "130724"
  16679. }, {
  16680. "label": "尚义县",
  16681. "value": "130725"
  16682. }, {
  16683. "label": "蔚县",
  16684. "value": "130726"
  16685. }, {
  16686. "label": "阳原县",
  16687. "value": "130727"
  16688. }, {
  16689. "label": "怀安县",
  16690. "value": "130728"
  16691. }, {
  16692. "label": "怀来县",
  16693. "value": "130730"
  16694. }, {
  16695. "label": "涿鹿县",
  16696. "value": "130731"
  16697. }, {
  16698. "label": "赤城县",
  16699. "value": "130732"
  16700. }, {
  16701. "label": "张家口市高新技术产业开发区",
  16702. "value": "130771"
  16703. }, {
  16704. "label": "张家口市察北管理区",
  16705. "value": "130772"
  16706. }, {
  16707. "label": "张家口市塞北管理区",
  16708. "value": "130773"
  16709. }], [{
  16710. "label": "双桥区",
  16711. "value": "130802"
  16712. }, {
  16713. "label": "双滦区",
  16714. "value": "130803"
  16715. }, {
  16716. "label": "鹰手营子矿区",
  16717. "value": "130804"
  16718. }, {
  16719. "label": "承德县",
  16720. "value": "130821"
  16721. }, {
  16722. "label": "兴隆县",
  16723. "value": "130822"
  16724. }, {
  16725. "label": "滦平县",
  16726. "value": "130824"
  16727. }, {
  16728. "label": "隆化县",
  16729. "value": "130825"
  16730. }, {
  16731. "label": "丰宁满族自治县",
  16732. "value": "130826"
  16733. }, {
  16734. "label": "宽城满族自治县",
  16735. "value": "130827"
  16736. }, {
  16737. "label": "围场满族蒙古族自治县",
  16738. "value": "130828"
  16739. }, {
  16740. "label": "承德高新技术产业开发区",
  16741. "value": "130871"
  16742. }, {
  16743. "label": "平泉市",
  16744. "value": "130881"
  16745. }], [{
  16746. "label": "新华区",
  16747. "value": "130902"
  16748. }, {
  16749. "label": "运河区",
  16750. "value": "130903"
  16751. }, {
  16752. "label": "沧县",
  16753. "value": "130921"
  16754. }, {
  16755. "label": "青县",
  16756. "value": "130922"
  16757. }, {
  16758. "label": "东光县",
  16759. "value": "130923"
  16760. }, {
  16761. "label": "海兴县",
  16762. "value": "130924"
  16763. }, {
  16764. "label": "盐山县",
  16765. "value": "130925"
  16766. }, {
  16767. "label": "肃宁县",
  16768. "value": "130926"
  16769. }, {
  16770. "label": "南皮县",
  16771. "value": "130927"
  16772. }, {
  16773. "label": "吴桥县",
  16774. "value": "130928"
  16775. }, {
  16776. "label": "献县",
  16777. "value": "130929"
  16778. }, {
  16779. "label": "孟村回族自治县",
  16780. "value": "130930"
  16781. }, {
  16782. "label": "河北沧州经济开发区",
  16783. "value": "130971"
  16784. }, {
  16785. "label": "沧州高新技术产业开发区",
  16786. "value": "130972"
  16787. }, {
  16788. "label": "沧州渤海新区",
  16789. "value": "130973"
  16790. }, {
  16791. "label": "泊头市",
  16792. "value": "130981"
  16793. }, {
  16794. "label": "任丘市",
  16795. "value": "130982"
  16796. }, {
  16797. "label": "黄骅市",
  16798. "value": "130983"
  16799. }, {
  16800. "label": "河间市",
  16801. "value": "130984"
  16802. }], [{
  16803. "label": "安次区",
  16804. "value": "131002"
  16805. }, {
  16806. "label": "广阳区",
  16807. "value": "131003"
  16808. }, {
  16809. "label": "固安县",
  16810. "value": "131022"
  16811. }, {
  16812. "label": "永清县",
  16813. "value": "131023"
  16814. }, {
  16815. "label": "香河县",
  16816. "value": "131024"
  16817. }, {
  16818. "label": "大城县",
  16819. "value": "131025"
  16820. }, {
  16821. "label": "文安县",
  16822. "value": "131026"
  16823. }, {
  16824. "label": "大厂回族自治县",
  16825. "value": "131028"
  16826. }, {
  16827. "label": "廊坊经济技术开发区",
  16828. "value": "131071"
  16829. }, {
  16830. "label": "霸州市",
  16831. "value": "131081"
  16832. }, {
  16833. "label": "三河市",
  16834. "value": "131082"
  16835. }], [{
  16836. "label": "桃城区",
  16837. "value": "131102"
  16838. }, {
  16839. "label": "冀州区",
  16840. "value": "131103"
  16841. }, {
  16842. "label": "枣强县",
  16843. "value": "131121"
  16844. }, {
  16845. "label": "武邑县",
  16846. "value": "131122"
  16847. }, {
  16848. "label": "武强县",
  16849. "value": "131123"
  16850. }, {
  16851. "label": "饶阳县",
  16852. "value": "131124"
  16853. }, {
  16854. "label": "安平县",
  16855. "value": "131125"
  16856. }, {
  16857. "label": "故城县",
  16858. "value": "131126"
  16859. }, {
  16860. "label": "景县",
  16861. "value": "131127"
  16862. }, {
  16863. "label": "阜城县",
  16864. "value": "131128"
  16865. }, {
  16866. "label": "河北衡水经济开发区",
  16867. "value": "131171"
  16868. }, {
  16869. "label": "衡水滨湖新区",
  16870. "value": "131172"
  16871. }, {
  16872. "label": "深州市",
  16873. "value": "131182"
  16874. }]], [[{
  16875. "label": "小店区",
  16876. "value": "140105"
  16877. }, {
  16878. "label": "迎泽区",
  16879. "value": "140106"
  16880. }, {
  16881. "label": "杏花岭区",
  16882. "value": "140107"
  16883. }, {
  16884. "label": "尖草坪区",
  16885. "value": "140108"
  16886. }, {
  16887. "label": "万柏林区",
  16888. "value": "140109"
  16889. }, {
  16890. "label": "晋源区",
  16891. "value": "140110"
  16892. }, {
  16893. "label": "清徐县",
  16894. "value": "140121"
  16895. }, {
  16896. "label": "阳曲县",
  16897. "value": "140122"
  16898. }, {
  16899. "label": "娄烦县",
  16900. "value": "140123"
  16901. }, {
  16902. "label": "山西转型综合改革示范区",
  16903. "value": "140171"
  16904. }, {
  16905. "label": "古交市",
  16906. "value": "140181"
  16907. }], [{
  16908. "label": "城区",
  16909. "value": "140202"
  16910. }, {
  16911. "label": "矿区",
  16912. "value": "140203"
  16913. }, {
  16914. "label": "南郊区",
  16915. "value": "140211"
  16916. }, {
  16917. "label": "新荣区",
  16918. "value": "140212"
  16919. }, {
  16920. "label": "阳高县",
  16921. "value": "140221"
  16922. }, {
  16923. "label": "天镇县",
  16924. "value": "140222"
  16925. }, {
  16926. "label": "广灵县",
  16927. "value": "140223"
  16928. }, {
  16929. "label": "灵丘县",
  16930. "value": "140224"
  16931. }, {
  16932. "label": "浑源县",
  16933. "value": "140225"
  16934. }, {
  16935. "label": "左云县",
  16936. "value": "140226"
  16937. }, {
  16938. "label": "大同县",
  16939. "value": "140227"
  16940. }, {
  16941. "label": "山西大同经济开发区",
  16942. "value": "140271"
  16943. }], [{
  16944. "label": "城区",
  16945. "value": "140302"
  16946. }, {
  16947. "label": "矿区",
  16948. "value": "140303"
  16949. }, {
  16950. "label": "郊区",
  16951. "value": "140311"
  16952. }, {
  16953. "label": "平定县",
  16954. "value": "140321"
  16955. }, {
  16956. "label": "盂县",
  16957. "value": "140322"
  16958. }, {
  16959. "label": "山西阳泉经济开发区",
  16960. "value": "140371"
  16961. }], [{
  16962. "label": "城区",
  16963. "value": "140402"
  16964. }, {
  16965. "label": "郊区",
  16966. "value": "140411"
  16967. }, {
  16968. "label": "长治县",
  16969. "value": "140421"
  16970. }, {
  16971. "label": "襄垣县",
  16972. "value": "140423"
  16973. }, {
  16974. "label": "屯留县",
  16975. "value": "140424"
  16976. }, {
  16977. "label": "平顺县",
  16978. "value": "140425"
  16979. }, {
  16980. "label": "黎城县",
  16981. "value": "140426"
  16982. }, {
  16983. "label": "壶关县",
  16984. "value": "140427"
  16985. }, {
  16986. "label": "长子县",
  16987. "value": "140428"
  16988. }, {
  16989. "label": "武乡县",
  16990. "value": "140429"
  16991. }, {
  16992. "label": "沁县",
  16993. "value": "140430"
  16994. }, {
  16995. "label": "沁源县",
  16996. "value": "140431"
  16997. }, {
  16998. "label": "山西长治高新技术产业园区",
  16999. "value": "140471"
  17000. }, {
  17001. "label": "潞城市",
  17002. "value": "140481"
  17003. }], [{
  17004. "label": "城区",
  17005. "value": "140502"
  17006. }, {
  17007. "label": "沁水县",
  17008. "value": "140521"
  17009. }, {
  17010. "label": "阳城县",
  17011. "value": "140522"
  17012. }, {
  17013. "label": "陵川县",
  17014. "value": "140524"
  17015. }, {
  17016. "label": "泽州县",
  17017. "value": "140525"
  17018. }, {
  17019. "label": "高平市",
  17020. "value": "140581"
  17021. }], [{
  17022. "label": "朔城区",
  17023. "value": "140602"
  17024. }, {
  17025. "label": "平鲁区",
  17026. "value": "140603"
  17027. }, {
  17028. "label": "山阴县",
  17029. "value": "140621"
  17030. }, {
  17031. "label": "应县",
  17032. "value": "140622"
  17033. }, {
  17034. "label": "右玉县",
  17035. "value": "140623"
  17036. }, {
  17037. "label": "怀仁县",
  17038. "value": "140624"
  17039. }, {
  17040. "label": "山西朔州经济开发区",
  17041. "value": "140671"
  17042. }], [{
  17043. "label": "榆次区",
  17044. "value": "140702"
  17045. }, {
  17046. "label": "榆社县",
  17047. "value": "140721"
  17048. }, {
  17049. "label": "左权县",
  17050. "value": "140722"
  17051. }, {
  17052. "label": "和顺县",
  17053. "value": "140723"
  17054. }, {
  17055. "label": "昔阳县",
  17056. "value": "140724"
  17057. }, {
  17058. "label": "寿阳县",
  17059. "value": "140725"
  17060. }, {
  17061. "label": "太谷县",
  17062. "value": "140726"
  17063. }, {
  17064. "label": "祁县",
  17065. "value": "140727"
  17066. }, {
  17067. "label": "平遥县",
  17068. "value": "140728"
  17069. }, {
  17070. "label": "灵石县",
  17071. "value": "140729"
  17072. }, {
  17073. "label": "介休市",
  17074. "value": "140781"
  17075. }], [{
  17076. "label": "盐湖区",
  17077. "value": "140802"
  17078. }, {
  17079. "label": "临猗县",
  17080. "value": "140821"
  17081. }, {
  17082. "label": "万荣县",
  17083. "value": "140822"
  17084. }, {
  17085. "label": "闻喜县",
  17086. "value": "140823"
  17087. }, {
  17088. "label": "稷山县",
  17089. "value": "140824"
  17090. }, {
  17091. "label": "新绛县",
  17092. "value": "140825"
  17093. }, {
  17094. "label": "绛县",
  17095. "value": "140826"
  17096. }, {
  17097. "label": "垣曲县",
  17098. "value": "140827"
  17099. }, {
  17100. "label": "夏县",
  17101. "value": "140828"
  17102. }, {
  17103. "label": "平陆县",
  17104. "value": "140829"
  17105. }, {
  17106. "label": "芮城县",
  17107. "value": "140830"
  17108. }, {
  17109. "label": "永济市",
  17110. "value": "140881"
  17111. }, {
  17112. "label": "河津市",
  17113. "value": "140882"
  17114. }], [{
  17115. "label": "忻府区",
  17116. "value": "140902"
  17117. }, {
  17118. "label": "定襄县",
  17119. "value": "140921"
  17120. }, {
  17121. "label": "五台县",
  17122. "value": "140922"
  17123. }, {
  17124. "label": "代县",
  17125. "value": "140923"
  17126. }, {
  17127. "label": "繁峙县",
  17128. "value": "140924"
  17129. }, {
  17130. "label": "宁武县",
  17131. "value": "140925"
  17132. }, {
  17133. "label": "静乐县",
  17134. "value": "140926"
  17135. }, {
  17136. "label": "神池县",
  17137. "value": "140927"
  17138. }, {
  17139. "label": "五寨县",
  17140. "value": "140928"
  17141. }, {
  17142. "label": "岢岚县",
  17143. "value": "140929"
  17144. }, {
  17145. "label": "河曲县",
  17146. "value": "140930"
  17147. }, {
  17148. "label": "保德县",
  17149. "value": "140931"
  17150. }, {
  17151. "label": "偏关县",
  17152. "value": "140932"
  17153. }, {
  17154. "label": "五台山风景名胜区",
  17155. "value": "140971"
  17156. }, {
  17157. "label": "原平市",
  17158. "value": "140981"
  17159. }], [{
  17160. "label": "尧都区",
  17161. "value": "141002"
  17162. }, {
  17163. "label": "曲沃县",
  17164. "value": "141021"
  17165. }, {
  17166. "label": "翼城县",
  17167. "value": "141022"
  17168. }, {
  17169. "label": "襄汾县",
  17170. "value": "141023"
  17171. }, {
  17172. "label": "洪洞县",
  17173. "value": "141024"
  17174. }, {
  17175. "label": "古县",
  17176. "value": "141025"
  17177. }, {
  17178. "label": "安泽县",
  17179. "value": "141026"
  17180. }, {
  17181. "label": "浮山县",
  17182. "value": "141027"
  17183. }, {
  17184. "label": "吉县",
  17185. "value": "141028"
  17186. }, {
  17187. "label": "乡宁县",
  17188. "value": "141029"
  17189. }, {
  17190. "label": "大宁县",
  17191. "value": "141030"
  17192. }, {
  17193. "label": "隰县",
  17194. "value": "141031"
  17195. }, {
  17196. "label": "永和县",
  17197. "value": "141032"
  17198. }, {
  17199. "label": "蒲县",
  17200. "value": "141033"
  17201. }, {
  17202. "label": "汾西县",
  17203. "value": "141034"
  17204. }, {
  17205. "label": "侯马市",
  17206. "value": "141081"
  17207. }, {
  17208. "label": "霍州市",
  17209. "value": "141082"
  17210. }], [{
  17211. "label": "离石区",
  17212. "value": "141102"
  17213. }, {
  17214. "label": "文水县",
  17215. "value": "141121"
  17216. }, {
  17217. "label": "交城县",
  17218. "value": "141122"
  17219. }, {
  17220. "label": "兴县",
  17221. "value": "141123"
  17222. }, {
  17223. "label": "临县",
  17224. "value": "141124"
  17225. }, {
  17226. "label": "柳林县",
  17227. "value": "141125"
  17228. }, {
  17229. "label": "石楼县",
  17230. "value": "141126"
  17231. }, {
  17232. "label": "岚县",
  17233. "value": "141127"
  17234. }, {
  17235. "label": "方山县",
  17236. "value": "141128"
  17237. }, {
  17238. "label": "中阳县",
  17239. "value": "141129"
  17240. }, {
  17241. "label": "交口县",
  17242. "value": "141130"
  17243. }, {
  17244. "label": "孝义市",
  17245. "value": "141181"
  17246. }, {
  17247. "label": "汾阳市",
  17248. "value": "141182"
  17249. }]], [[{
  17250. "label": "新城区",
  17251. "value": "150102"
  17252. }, {
  17253. "label": "回民区",
  17254. "value": "150103"
  17255. }, {
  17256. "label": "玉泉区",
  17257. "value": "150104"
  17258. }, {
  17259. "label": "赛罕区",
  17260. "value": "150105"
  17261. }, {
  17262. "label": "土默特左旗",
  17263. "value": "150121"
  17264. }, {
  17265. "label": "托克托县",
  17266. "value": "150122"
  17267. }, {
  17268. "label": "和林格尔县",
  17269. "value": "150123"
  17270. }, {
  17271. "label": "清水河县",
  17272. "value": "150124"
  17273. }, {
  17274. "label": "武川县",
  17275. "value": "150125"
  17276. }, {
  17277. "label": "呼和浩特金海工业园区",
  17278. "value": "150171"
  17279. }, {
  17280. "label": "呼和浩特经济技术开发区",
  17281. "value": "150172"
  17282. }], [{
  17283. "label": "东河区",
  17284. "value": "150202"
  17285. }, {
  17286. "label": "昆都仑区",
  17287. "value": "150203"
  17288. }, {
  17289. "label": "青山区",
  17290. "value": "150204"
  17291. }, {
  17292. "label": "石拐区",
  17293. "value": "150205"
  17294. }, {
  17295. "label": "白云鄂博矿区",
  17296. "value": "150206"
  17297. }, {
  17298. "label": "九原区",
  17299. "value": "150207"
  17300. }, {
  17301. "label": "土默特右旗",
  17302. "value": "150221"
  17303. }, {
  17304. "label": "固阳县",
  17305. "value": "150222"
  17306. }, {
  17307. "label": "达尔罕茂明安联合旗",
  17308. "value": "150223"
  17309. }, {
  17310. "label": "包头稀土高新技术产业开发区",
  17311. "value": "150271"
  17312. }], [{
  17313. "label": "海勃湾区",
  17314. "value": "150302"
  17315. }, {
  17316. "label": "海南区",
  17317. "value": "150303"
  17318. }, {
  17319. "label": "乌达区",
  17320. "value": "150304"
  17321. }], [{
  17322. "label": "红山区",
  17323. "value": "150402"
  17324. }, {
  17325. "label": "元宝山区",
  17326. "value": "150403"
  17327. }, {
  17328. "label": "松山区",
  17329. "value": "150404"
  17330. }, {
  17331. "label": "阿鲁科尔沁旗",
  17332. "value": "150421"
  17333. }, {
  17334. "label": "巴林左旗",
  17335. "value": "150422"
  17336. }, {
  17337. "label": "巴林右旗",
  17338. "value": "150423"
  17339. }, {
  17340. "label": "林西县",
  17341. "value": "150424"
  17342. }, {
  17343. "label": "克什克腾旗",
  17344. "value": "150425"
  17345. }, {
  17346. "label": "翁牛特旗",
  17347. "value": "150426"
  17348. }, {
  17349. "label": "喀喇沁旗",
  17350. "value": "150428"
  17351. }, {
  17352. "label": "宁城县",
  17353. "value": "150429"
  17354. }, {
  17355. "label": "敖汉旗",
  17356. "value": "150430"
  17357. }], [{
  17358. "label": "科尔沁区",
  17359. "value": "150502"
  17360. }, {
  17361. "label": "科尔沁左翼中旗",
  17362. "value": "150521"
  17363. }, {
  17364. "label": "科尔沁左翼后旗",
  17365. "value": "150522"
  17366. }, {
  17367. "label": "开鲁县",
  17368. "value": "150523"
  17369. }, {
  17370. "label": "库伦旗",
  17371. "value": "150524"
  17372. }, {
  17373. "label": "奈曼旗",
  17374. "value": "150525"
  17375. }, {
  17376. "label": "扎鲁特旗",
  17377. "value": "150526"
  17378. }, {
  17379. "label": "通辽经济技术开发区",
  17380. "value": "150571"
  17381. }, {
  17382. "label": "霍林郭勒市",
  17383. "value": "150581"
  17384. }], [{
  17385. "label": "东胜区",
  17386. "value": "150602"
  17387. }, {
  17388. "label": "康巴什区",
  17389. "value": "150603"
  17390. }, {
  17391. "label": "达拉特旗",
  17392. "value": "150621"
  17393. }, {
  17394. "label": "准格尔旗",
  17395. "value": "150622"
  17396. }, {
  17397. "label": "鄂托克前旗",
  17398. "value": "150623"
  17399. }, {
  17400. "label": "鄂托克旗",
  17401. "value": "150624"
  17402. }, {
  17403. "label": "杭锦旗",
  17404. "value": "150625"
  17405. }, {
  17406. "label": "乌审旗",
  17407. "value": "150626"
  17408. }, {
  17409. "label": "伊金霍洛旗",
  17410. "value": "150627"
  17411. }], [{
  17412. "label": "海拉尔区",
  17413. "value": "150702"
  17414. }, {
  17415. "label": "扎赉诺尔区",
  17416. "value": "150703"
  17417. }, {
  17418. "label": "阿荣旗",
  17419. "value": "150721"
  17420. }, {
  17421. "label": "莫力达瓦达斡尔族自治旗",
  17422. "value": "150722"
  17423. }, {
  17424. "label": "鄂伦春自治旗",
  17425. "value": "150723"
  17426. }, {
  17427. "label": "鄂温克族自治旗",
  17428. "value": "150724"
  17429. }, {
  17430. "label": "陈巴尔虎旗",
  17431. "value": "150725"
  17432. }, {
  17433. "label": "新巴尔虎左旗",
  17434. "value": "150726"
  17435. }, {
  17436. "label": "新巴尔虎右旗",
  17437. "value": "150727"
  17438. }, {
  17439. "label": "满洲里市",
  17440. "value": "150781"
  17441. }, {
  17442. "label": "牙克石市",
  17443. "value": "150782"
  17444. }, {
  17445. "label": "扎兰屯市",
  17446. "value": "150783"
  17447. }, {
  17448. "label": "额尔古纳市",
  17449. "value": "150784"
  17450. }, {
  17451. "label": "根河市",
  17452. "value": "150785"
  17453. }], [{
  17454. "label": "临河区",
  17455. "value": "150802"
  17456. }, {
  17457. "label": "五原县",
  17458. "value": "150821"
  17459. }, {
  17460. "label": "磴口县",
  17461. "value": "150822"
  17462. }, {
  17463. "label": "乌拉特前旗",
  17464. "value": "150823"
  17465. }, {
  17466. "label": "乌拉特中旗",
  17467. "value": "150824"
  17468. }, {
  17469. "label": "乌拉特后旗",
  17470. "value": "150825"
  17471. }, {
  17472. "label": "杭锦后旗",
  17473. "value": "150826"
  17474. }], [{
  17475. "label": "集宁区",
  17476. "value": "150902"
  17477. }, {
  17478. "label": "卓资县",
  17479. "value": "150921"
  17480. }, {
  17481. "label": "化德县",
  17482. "value": "150922"
  17483. }, {
  17484. "label": "商都县",
  17485. "value": "150923"
  17486. }, {
  17487. "label": "兴和县",
  17488. "value": "150924"
  17489. }, {
  17490. "label": "凉城县",
  17491. "value": "150925"
  17492. }, {
  17493. "label": "察哈尔右翼前旗",
  17494. "value": "150926"
  17495. }, {
  17496. "label": "察哈尔右翼中旗",
  17497. "value": "150927"
  17498. }, {
  17499. "label": "察哈尔右翼后旗",
  17500. "value": "150928"
  17501. }, {
  17502. "label": "四子王旗",
  17503. "value": "150929"
  17504. }, {
  17505. "label": "丰镇市",
  17506. "value": "150981"
  17507. }], [{
  17508. "label": "乌兰浩特市",
  17509. "value": "152201"
  17510. }, {
  17511. "label": "阿尔山市",
  17512. "value": "152202"
  17513. }, {
  17514. "label": "科尔沁右翼前旗",
  17515. "value": "152221"
  17516. }, {
  17517. "label": "科尔沁右翼中旗",
  17518. "value": "152222"
  17519. }, {
  17520. "label": "扎赉特旗",
  17521. "value": "152223"
  17522. }, {
  17523. "label": "突泉县",
  17524. "value": "152224"
  17525. }], [{
  17526. "label": "二连浩特市",
  17527. "value": "152501"
  17528. }, {
  17529. "label": "锡林浩特市",
  17530. "value": "152502"
  17531. }, {
  17532. "label": "阿巴嘎旗",
  17533. "value": "152522"
  17534. }, {
  17535. "label": "苏尼特左旗",
  17536. "value": "152523"
  17537. }, {
  17538. "label": "苏尼特右旗",
  17539. "value": "152524"
  17540. }, {
  17541. "label": "东乌珠穆沁旗",
  17542. "value": "152525"
  17543. }, {
  17544. "label": "西乌珠穆沁旗",
  17545. "value": "152526"
  17546. }, {
  17547. "label": "太仆寺旗",
  17548. "value": "152527"
  17549. }, {
  17550. "label": "镶黄旗",
  17551. "value": "152528"
  17552. }, {
  17553. "label": "正镶白旗",
  17554. "value": "152529"
  17555. }, {
  17556. "label": "正蓝旗",
  17557. "value": "152530"
  17558. }, {
  17559. "label": "多伦县",
  17560. "value": "152531"
  17561. }, {
  17562. "label": "乌拉盖管委会",
  17563. "value": "152571"
  17564. }], [{
  17565. "label": "阿拉善左旗",
  17566. "value": "152921"
  17567. }, {
  17568. "label": "阿拉善右旗",
  17569. "value": "152922"
  17570. }, {
  17571. "label": "额济纳旗",
  17572. "value": "152923"
  17573. }, {
  17574. "label": "内蒙古阿拉善经济开发区",
  17575. "value": "152971"
  17576. }]], [[{
  17577. "label": "和平区",
  17578. "value": "210102"
  17579. }, {
  17580. "label": "沈河区",
  17581. "value": "210103"
  17582. }, {
  17583. "label": "大东区",
  17584. "value": "210104"
  17585. }, {
  17586. "label": "皇姑区",
  17587. "value": "210105"
  17588. }, {
  17589. "label": "铁西区",
  17590. "value": "210106"
  17591. }, {
  17592. "label": "苏家屯区",
  17593. "value": "210111"
  17594. }, {
  17595. "label": "浑南区",
  17596. "value": "210112"
  17597. }, {
  17598. "label": "沈北新区",
  17599. "value": "210113"
  17600. }, {
  17601. "label": "于洪区",
  17602. "value": "210114"
  17603. }, {
  17604. "label": "辽中区",
  17605. "value": "210115"
  17606. }, {
  17607. "label": "康平县",
  17608. "value": "210123"
  17609. }, {
  17610. "label": "法库县",
  17611. "value": "210124"
  17612. }, {
  17613. "label": "新民市",
  17614. "value": "210181"
  17615. }], [{
  17616. "label": "中山区",
  17617. "value": "210202"
  17618. }, {
  17619. "label": "西岗区",
  17620. "value": "210203"
  17621. }, {
  17622. "label": "沙河口区",
  17623. "value": "210204"
  17624. }, {
  17625. "label": "甘井子区",
  17626. "value": "210211"
  17627. }, {
  17628. "label": "旅顺口区",
  17629. "value": "210212"
  17630. }, {
  17631. "label": "金州区",
  17632. "value": "210213"
  17633. }, {
  17634. "label": "普兰店区",
  17635. "value": "210214"
  17636. }, {
  17637. "label": "长海县",
  17638. "value": "210224"
  17639. }, {
  17640. "label": "瓦房店市",
  17641. "value": "210281"
  17642. }, {
  17643. "label": "庄河市",
  17644. "value": "210283"
  17645. }], [{
  17646. "label": "铁东区",
  17647. "value": "210302"
  17648. }, {
  17649. "label": "铁西区",
  17650. "value": "210303"
  17651. }, {
  17652. "label": "立山区",
  17653. "value": "210304"
  17654. }, {
  17655. "label": "千山区",
  17656. "value": "210311"
  17657. }, {
  17658. "label": "台安县",
  17659. "value": "210321"
  17660. }, {
  17661. "label": "岫岩满族自治县",
  17662. "value": "210323"
  17663. }, {
  17664. "label": "海城市",
  17665. "value": "210381"
  17666. }], [{
  17667. "label": "新抚区",
  17668. "value": "210402"
  17669. }, {
  17670. "label": "东洲区",
  17671. "value": "210403"
  17672. }, {
  17673. "label": "望花区",
  17674. "value": "210404"
  17675. }, {
  17676. "label": "顺城区",
  17677. "value": "210411"
  17678. }, {
  17679. "label": "抚顺县",
  17680. "value": "210421"
  17681. }, {
  17682. "label": "新宾满族自治县",
  17683. "value": "210422"
  17684. }, {
  17685. "label": "清原满族自治县",
  17686. "value": "210423"
  17687. }], [{
  17688. "label": "平山区",
  17689. "value": "210502"
  17690. }, {
  17691. "label": "溪湖区",
  17692. "value": "210503"
  17693. }, {
  17694. "label": "明山区",
  17695. "value": "210504"
  17696. }, {
  17697. "label": "南芬区",
  17698. "value": "210505"
  17699. }, {
  17700. "label": "本溪满族自治县",
  17701. "value": "210521"
  17702. }, {
  17703. "label": "桓仁满族自治县",
  17704. "value": "210522"
  17705. }], [{
  17706. "label": "元宝区",
  17707. "value": "210602"
  17708. }, {
  17709. "label": "振兴区",
  17710. "value": "210603"
  17711. }, {
  17712. "label": "振安区",
  17713. "value": "210604"
  17714. }, {
  17715. "label": "宽甸满族自治县",
  17716. "value": "210624"
  17717. }, {
  17718. "label": "东港市",
  17719. "value": "210681"
  17720. }, {
  17721. "label": "凤城市",
  17722. "value": "210682"
  17723. }], [{
  17724. "label": "古塔区",
  17725. "value": "210702"
  17726. }, {
  17727. "label": "凌河区",
  17728. "value": "210703"
  17729. }, {
  17730. "label": "太和区",
  17731. "value": "210711"
  17732. }, {
  17733. "label": "黑山县",
  17734. "value": "210726"
  17735. }, {
  17736. "label": "义县",
  17737. "value": "210727"
  17738. }, {
  17739. "label": "凌海市",
  17740. "value": "210781"
  17741. }, {
  17742. "label": "北镇市",
  17743. "value": "210782"
  17744. }], [{
  17745. "label": "站前区",
  17746. "value": "210802"
  17747. }, {
  17748. "label": "西市区",
  17749. "value": "210803"
  17750. }, {
  17751. "label": "鲅鱼圈区",
  17752. "value": "210804"
  17753. }, {
  17754. "label": "老边区",
  17755. "value": "210811"
  17756. }, {
  17757. "label": "盖州市",
  17758. "value": "210881"
  17759. }, {
  17760. "label": "大石桥市",
  17761. "value": "210882"
  17762. }], [{
  17763. "label": "海州区",
  17764. "value": "210902"
  17765. }, {
  17766. "label": "新邱区",
  17767. "value": "210903"
  17768. }, {
  17769. "label": "太平区",
  17770. "value": "210904"
  17771. }, {
  17772. "label": "清河门区",
  17773. "value": "210905"
  17774. }, {
  17775. "label": "细河区",
  17776. "value": "210911"
  17777. }, {
  17778. "label": "阜新蒙古族自治县",
  17779. "value": "210921"
  17780. }, {
  17781. "label": "彰武县",
  17782. "value": "210922"
  17783. }], [{
  17784. "label": "白塔区",
  17785. "value": "211002"
  17786. }, {
  17787. "label": "文圣区",
  17788. "value": "211003"
  17789. }, {
  17790. "label": "宏伟区",
  17791. "value": "211004"
  17792. }, {
  17793. "label": "弓长岭区",
  17794. "value": "211005"
  17795. }, {
  17796. "label": "太子河区",
  17797. "value": "211011"
  17798. }, {
  17799. "label": "辽阳县",
  17800. "value": "211021"
  17801. }, {
  17802. "label": "灯塔市",
  17803. "value": "211081"
  17804. }], [{
  17805. "label": "双台子区",
  17806. "value": "211102"
  17807. }, {
  17808. "label": "兴隆台区",
  17809. "value": "211103"
  17810. }, {
  17811. "label": "大洼区",
  17812. "value": "211104"
  17813. }, {
  17814. "label": "盘山县",
  17815. "value": "211122"
  17816. }], [{
  17817. "label": "银州区",
  17818. "value": "211202"
  17819. }, {
  17820. "label": "清河区",
  17821. "value": "211204"
  17822. }, {
  17823. "label": "铁岭县",
  17824. "value": "211221"
  17825. }, {
  17826. "label": "西丰县",
  17827. "value": "211223"
  17828. }, {
  17829. "label": "昌图县",
  17830. "value": "211224"
  17831. }, {
  17832. "label": "调兵山市",
  17833. "value": "211281"
  17834. }, {
  17835. "label": "开原市",
  17836. "value": "211282"
  17837. }], [{
  17838. "label": "双塔区",
  17839. "value": "211302"
  17840. }, {
  17841. "label": "龙城区",
  17842. "value": "211303"
  17843. }, {
  17844. "label": "朝阳县",
  17845. "value": "211321"
  17846. }, {
  17847. "label": "建平县",
  17848. "value": "211322"
  17849. }, {
  17850. "label": "喀喇沁左翼蒙古族自治县",
  17851. "value": "211324"
  17852. }, {
  17853. "label": "北票市",
  17854. "value": "211381"
  17855. }, {
  17856. "label": "凌源市",
  17857. "value": "211382"
  17858. }], [{
  17859. "label": "连山区",
  17860. "value": "211402"
  17861. }, {
  17862. "label": "龙港区",
  17863. "value": "211403"
  17864. }, {
  17865. "label": "南票区",
  17866. "value": "211404"
  17867. }, {
  17868. "label": "绥中县",
  17869. "value": "211421"
  17870. }, {
  17871. "label": "建昌县",
  17872. "value": "211422"
  17873. }, {
  17874. "label": "兴城市",
  17875. "value": "211481"
  17876. }]], [[{
  17877. "label": "南关区",
  17878. "value": "220102"
  17879. }, {
  17880. "label": "宽城区",
  17881. "value": "220103"
  17882. }, {
  17883. "label": "朝阳区",
  17884. "value": "220104"
  17885. }, {
  17886. "label": "二道区",
  17887. "value": "220105"
  17888. }, {
  17889. "label": "绿园区",
  17890. "value": "220106"
  17891. }, {
  17892. "label": "双阳区",
  17893. "value": "220112"
  17894. }, {
  17895. "label": "九台区",
  17896. "value": "220113"
  17897. }, {
  17898. "label": "农安县",
  17899. "value": "220122"
  17900. }, {
  17901. "label": "长春经济技术开发区",
  17902. "value": "220171"
  17903. }, {
  17904. "label": "长春净月高新技术产业开发区",
  17905. "value": "220172"
  17906. }, {
  17907. "label": "长春高新技术产业开发区",
  17908. "value": "220173"
  17909. }, {
  17910. "label": "长春汽车经济技术开发区",
  17911. "value": "220174"
  17912. }, {
  17913. "label": "榆树市",
  17914. "value": "220182"
  17915. }, {
  17916. "label": "德惠市",
  17917. "value": "220183"
  17918. }], [{
  17919. "label": "昌邑区",
  17920. "value": "220202"
  17921. }, {
  17922. "label": "龙潭区",
  17923. "value": "220203"
  17924. }, {
  17925. "label": "船营区",
  17926. "value": "220204"
  17927. }, {
  17928. "label": "丰满区",
  17929. "value": "220211"
  17930. }, {
  17931. "label": "永吉县",
  17932. "value": "220221"
  17933. }, {
  17934. "label": "吉林经济开发区",
  17935. "value": "220271"
  17936. }, {
  17937. "label": "吉林高新技术产业开发区",
  17938. "value": "220272"
  17939. }, {
  17940. "label": "吉林中国新加坡食品区",
  17941. "value": "220273"
  17942. }, {
  17943. "label": "蛟河市",
  17944. "value": "220281"
  17945. }, {
  17946. "label": "桦甸市",
  17947. "value": "220282"
  17948. }, {
  17949. "label": "舒兰市",
  17950. "value": "220283"
  17951. }, {
  17952. "label": "磐石市",
  17953. "value": "220284"
  17954. }], [{
  17955. "label": "铁西区",
  17956. "value": "220302"
  17957. }, {
  17958. "label": "铁东区",
  17959. "value": "220303"
  17960. }, {
  17961. "label": "梨树县",
  17962. "value": "220322"
  17963. }, {
  17964. "label": "伊通满族自治县",
  17965. "value": "220323"
  17966. }, {
  17967. "label": "公主岭市",
  17968. "value": "220381"
  17969. }, {
  17970. "label": "双辽市",
  17971. "value": "220382"
  17972. }], [{
  17973. "label": "龙山区",
  17974. "value": "220402"
  17975. }, {
  17976. "label": "西安区",
  17977. "value": "220403"
  17978. }, {
  17979. "label": "东丰县",
  17980. "value": "220421"
  17981. }, {
  17982. "label": "东辽县",
  17983. "value": "220422"
  17984. }], [{
  17985. "label": "东昌区",
  17986. "value": "220502"
  17987. }, {
  17988. "label": "二道江区",
  17989. "value": "220503"
  17990. }, {
  17991. "label": "通化县",
  17992. "value": "220521"
  17993. }, {
  17994. "label": "辉南县",
  17995. "value": "220523"
  17996. }, {
  17997. "label": "柳河县",
  17998. "value": "220524"
  17999. }, {
  18000. "label": "梅河口市",
  18001. "value": "220581"
  18002. }, {
  18003. "label": "集安市",
  18004. "value": "220582"
  18005. }], [{
  18006. "label": "浑江区",
  18007. "value": "220602"
  18008. }, {
  18009. "label": "江源区",
  18010. "value": "220605"
  18011. }, {
  18012. "label": "抚松县",
  18013. "value": "220621"
  18014. }, {
  18015. "label": "靖宇县",
  18016. "value": "220622"
  18017. }, {
  18018. "label": "长白朝鲜族自治县",
  18019. "value": "220623"
  18020. }, {
  18021. "label": "临江市",
  18022. "value": "220681"
  18023. }], [{
  18024. "label": "宁江区",
  18025. "value": "220702"
  18026. }, {
  18027. "label": "前郭尔罗斯蒙古族自治县",
  18028. "value": "220721"
  18029. }, {
  18030. "label": "长岭县",
  18031. "value": "220722"
  18032. }, {
  18033. "label": "乾安县",
  18034. "value": "220723"
  18035. }, {
  18036. "label": "吉林松原经济开发区",
  18037. "value": "220771"
  18038. }, {
  18039. "label": "扶余市",
  18040. "value": "220781"
  18041. }], [{
  18042. "label": "洮北区",
  18043. "value": "220802"
  18044. }, {
  18045. "label": "镇赉县",
  18046. "value": "220821"
  18047. }, {
  18048. "label": "通榆县",
  18049. "value": "220822"
  18050. }, {
  18051. "label": "吉林白城经济开发区",
  18052. "value": "220871"
  18053. }, {
  18054. "label": "洮南市",
  18055. "value": "220881"
  18056. }, {
  18057. "label": "大安市",
  18058. "value": "220882"
  18059. }], [{
  18060. "label": "延吉市",
  18061. "value": "222401"
  18062. }, {
  18063. "label": "图们市",
  18064. "value": "222402"
  18065. }, {
  18066. "label": "敦化市",
  18067. "value": "222403"
  18068. }, {
  18069. "label": "珲春市",
  18070. "value": "222404"
  18071. }, {
  18072. "label": "龙井市",
  18073. "value": "222405"
  18074. }, {
  18075. "label": "和龙市",
  18076. "value": "222406"
  18077. }, {
  18078. "label": "汪清县",
  18079. "value": "222424"
  18080. }, {
  18081. "label": "安图县",
  18082. "value": "222426"
  18083. }]], [[{
  18084. "label": "道里区",
  18085. "value": "230102"
  18086. }, {
  18087. "label": "南岗区",
  18088. "value": "230103"
  18089. }, {
  18090. "label": "道外区",
  18091. "value": "230104"
  18092. }, {
  18093. "label": "平房区",
  18094. "value": "230108"
  18095. }, {
  18096. "label": "松北区",
  18097. "value": "230109"
  18098. }, {
  18099. "label": "香坊区",
  18100. "value": "230110"
  18101. }, {
  18102. "label": "呼兰区",
  18103. "value": "230111"
  18104. }, {
  18105. "label": "阿城区",
  18106. "value": "230112"
  18107. }, {
  18108. "label": "双城区",
  18109. "value": "230113"
  18110. }, {
  18111. "label": "依兰县",
  18112. "value": "230123"
  18113. }, {
  18114. "label": "方正县",
  18115. "value": "230124"
  18116. }, {
  18117. "label": "宾县",
  18118. "value": "230125"
  18119. }, {
  18120. "label": "巴彦县",
  18121. "value": "230126"
  18122. }, {
  18123. "label": "木兰县",
  18124. "value": "230127"
  18125. }, {
  18126. "label": "通河县",
  18127. "value": "230128"
  18128. }, {
  18129. "label": "延寿县",
  18130. "value": "230129"
  18131. }, {
  18132. "label": "尚志市",
  18133. "value": "230183"
  18134. }, {
  18135. "label": "五常市",
  18136. "value": "230184"
  18137. }], [{
  18138. "label": "龙沙区",
  18139. "value": "230202"
  18140. }, {
  18141. "label": "建华区",
  18142. "value": "230203"
  18143. }, {
  18144. "label": "铁锋区",
  18145. "value": "230204"
  18146. }, {
  18147. "label": "昂昂溪区",
  18148. "value": "230205"
  18149. }, {
  18150. "label": "富拉尔基区",
  18151. "value": "230206"
  18152. }, {
  18153. "label": "碾子山区",
  18154. "value": "230207"
  18155. }, {
  18156. "label": "梅里斯达斡尔族区",
  18157. "value": "230208"
  18158. }, {
  18159. "label": "龙江县",
  18160. "value": "230221"
  18161. }, {
  18162. "label": "依安县",
  18163. "value": "230223"
  18164. }, {
  18165. "label": "泰来县",
  18166. "value": "230224"
  18167. }, {
  18168. "label": "甘南县",
  18169. "value": "230225"
  18170. }, {
  18171. "label": "富裕县",
  18172. "value": "230227"
  18173. }, {
  18174. "label": "克山县",
  18175. "value": "230229"
  18176. }, {
  18177. "label": "克东县",
  18178. "value": "230230"
  18179. }, {
  18180. "label": "拜泉县",
  18181. "value": "230231"
  18182. }, {
  18183. "label": "讷河市",
  18184. "value": "230281"
  18185. }], [{
  18186. "label": "鸡冠区",
  18187. "value": "230302"
  18188. }, {
  18189. "label": "恒山区",
  18190. "value": "230303"
  18191. }, {
  18192. "label": "滴道区",
  18193. "value": "230304"
  18194. }, {
  18195. "label": "梨树区",
  18196. "value": "230305"
  18197. }, {
  18198. "label": "城子河区",
  18199. "value": "230306"
  18200. }, {
  18201. "label": "麻山区",
  18202. "value": "230307"
  18203. }, {
  18204. "label": "鸡东县",
  18205. "value": "230321"
  18206. }, {
  18207. "label": "虎林市",
  18208. "value": "230381"
  18209. }, {
  18210. "label": "密山市",
  18211. "value": "230382"
  18212. }], [{
  18213. "label": "向阳区",
  18214. "value": "230402"
  18215. }, {
  18216. "label": "工农区",
  18217. "value": "230403"
  18218. }, {
  18219. "label": "南山区",
  18220. "value": "230404"
  18221. }, {
  18222. "label": "兴安区",
  18223. "value": "230405"
  18224. }, {
  18225. "label": "东山区",
  18226. "value": "230406"
  18227. }, {
  18228. "label": "兴山区",
  18229. "value": "230407"
  18230. }, {
  18231. "label": "萝北县",
  18232. "value": "230421"
  18233. }, {
  18234. "label": "绥滨县",
  18235. "value": "230422"
  18236. }], [{
  18237. "label": "尖山区",
  18238. "value": "230502"
  18239. }, {
  18240. "label": "岭东区",
  18241. "value": "230503"
  18242. }, {
  18243. "label": "四方台区",
  18244. "value": "230505"
  18245. }, {
  18246. "label": "宝山区",
  18247. "value": "230506"
  18248. }, {
  18249. "label": "集贤县",
  18250. "value": "230521"
  18251. }, {
  18252. "label": "友谊县",
  18253. "value": "230522"
  18254. }, {
  18255. "label": "宝清县",
  18256. "value": "230523"
  18257. }, {
  18258. "label": "饶河县",
  18259. "value": "230524"
  18260. }], [{
  18261. "label": "萨尔图区",
  18262. "value": "230602"
  18263. }, {
  18264. "label": "龙凤区",
  18265. "value": "230603"
  18266. }, {
  18267. "label": "让胡路区",
  18268. "value": "230604"
  18269. }, {
  18270. "label": "红岗区",
  18271. "value": "230605"
  18272. }, {
  18273. "label": "大同区",
  18274. "value": "230606"
  18275. }, {
  18276. "label": "肇州县",
  18277. "value": "230621"
  18278. }, {
  18279. "label": "肇源县",
  18280. "value": "230622"
  18281. }, {
  18282. "label": "林甸县",
  18283. "value": "230623"
  18284. }, {
  18285. "label": "杜尔伯特蒙古族自治县",
  18286. "value": "230624"
  18287. }, {
  18288. "label": "大庆高新技术产业开发区",
  18289. "value": "230671"
  18290. }], [{
  18291. "label": "伊春区",
  18292. "value": "230702"
  18293. }, {
  18294. "label": "南岔区",
  18295. "value": "230703"
  18296. }, {
  18297. "label": "友好区",
  18298. "value": "230704"
  18299. }, {
  18300. "label": "西林区",
  18301. "value": "230705"
  18302. }, {
  18303. "label": "翠峦区",
  18304. "value": "230706"
  18305. }, {
  18306. "label": "新青区",
  18307. "value": "230707"
  18308. }, {
  18309. "label": "美溪区",
  18310. "value": "230708"
  18311. }, {
  18312. "label": "金山屯区",
  18313. "value": "230709"
  18314. }, {
  18315. "label": "五营区",
  18316. "value": "230710"
  18317. }, {
  18318. "label": "乌马河区",
  18319. "value": "230711"
  18320. }, {
  18321. "label": "汤旺河区",
  18322. "value": "230712"
  18323. }, {
  18324. "label": "带岭区",
  18325. "value": "230713"
  18326. }, {
  18327. "label": "乌伊岭区",
  18328. "value": "230714"
  18329. }, {
  18330. "label": "红星区",
  18331. "value": "230715"
  18332. }, {
  18333. "label": "上甘岭区",
  18334. "value": "230716"
  18335. }, {
  18336. "label": "嘉荫县",
  18337. "value": "230722"
  18338. }, {
  18339. "label": "铁力市",
  18340. "value": "230781"
  18341. }], [{
  18342. "label": "向阳区",
  18343. "value": "230803"
  18344. }, {
  18345. "label": "前进区",
  18346. "value": "230804"
  18347. }, {
  18348. "label": "东风区",
  18349. "value": "230805"
  18350. }, {
  18351. "label": "郊区",
  18352. "value": "230811"
  18353. }, {
  18354. "label": "桦南县",
  18355. "value": "230822"
  18356. }, {
  18357. "label": "桦川县",
  18358. "value": "230826"
  18359. }, {
  18360. "label": "汤原县",
  18361. "value": "230828"
  18362. }, {
  18363. "label": "同江市",
  18364. "value": "230881"
  18365. }, {
  18366. "label": "富锦市",
  18367. "value": "230882"
  18368. }, {
  18369. "label": "抚远市",
  18370. "value": "230883"
  18371. }], [{
  18372. "label": "新兴区",
  18373. "value": "230902"
  18374. }, {
  18375. "label": "桃山区",
  18376. "value": "230903"
  18377. }, {
  18378. "label": "茄子河区",
  18379. "value": "230904"
  18380. }, {
  18381. "label": "勃利县",
  18382. "value": "230921"
  18383. }], [{
  18384. "label": "东安区",
  18385. "value": "231002"
  18386. }, {
  18387. "label": "阳明区",
  18388. "value": "231003"
  18389. }, {
  18390. "label": "爱民区",
  18391. "value": "231004"
  18392. }, {
  18393. "label": "西安区",
  18394. "value": "231005"
  18395. }, {
  18396. "label": "林口县",
  18397. "value": "231025"
  18398. }, {
  18399. "label": "牡丹江经济技术开发区",
  18400. "value": "231071"
  18401. }, {
  18402. "label": "绥芬河市",
  18403. "value": "231081"
  18404. }, {
  18405. "label": "海林市",
  18406. "value": "231083"
  18407. }, {
  18408. "label": "宁安市",
  18409. "value": "231084"
  18410. }, {
  18411. "label": "穆棱市",
  18412. "value": "231085"
  18413. }, {
  18414. "label": "东宁市",
  18415. "value": "231086"
  18416. }], [{
  18417. "label": "爱辉区",
  18418. "value": "231102"
  18419. }, {
  18420. "label": "嫩江县",
  18421. "value": "231121"
  18422. }, {
  18423. "label": "逊克县",
  18424. "value": "231123"
  18425. }, {
  18426. "label": "孙吴县",
  18427. "value": "231124"
  18428. }, {
  18429. "label": "北安市",
  18430. "value": "231181"
  18431. }, {
  18432. "label": "五大连池市",
  18433. "value": "231182"
  18434. }], [{
  18435. "label": "北林区",
  18436. "value": "231202"
  18437. }, {
  18438. "label": "望奎县",
  18439. "value": "231221"
  18440. }, {
  18441. "label": "兰西县",
  18442. "value": "231222"
  18443. }, {
  18444. "label": "青冈县",
  18445. "value": "231223"
  18446. }, {
  18447. "label": "庆安县",
  18448. "value": "231224"
  18449. }, {
  18450. "label": "明水县",
  18451. "value": "231225"
  18452. }, {
  18453. "label": "绥棱县",
  18454. "value": "231226"
  18455. }, {
  18456. "label": "安达市",
  18457. "value": "231281"
  18458. }, {
  18459. "label": "肇东市",
  18460. "value": "231282"
  18461. }, {
  18462. "label": "海伦市",
  18463. "value": "231283"
  18464. }], [{
  18465. "label": "加格达奇区",
  18466. "value": "232701"
  18467. }, {
  18468. "label": "松岭区",
  18469. "value": "232702"
  18470. }, {
  18471. "label": "新林区",
  18472. "value": "232703"
  18473. }, {
  18474. "label": "呼中区",
  18475. "value": "232704"
  18476. }, {
  18477. "label": "呼玛县",
  18478. "value": "232721"
  18479. }, {
  18480. "label": "塔河县",
  18481. "value": "232722"
  18482. }, {
  18483. "label": "漠河县",
  18484. "value": "232723"
  18485. }]], [[{
  18486. "label": "黄浦区",
  18487. "value": "310101"
  18488. }, {
  18489. "label": "徐汇区",
  18490. "value": "310104"
  18491. }, {
  18492. "label": "长宁区",
  18493. "value": "310105"
  18494. }, {
  18495. "label": "静安区",
  18496. "value": "310106"
  18497. }, {
  18498. "label": "普陀区",
  18499. "value": "310107"
  18500. }, {
  18501. "label": "虹口区",
  18502. "value": "310109"
  18503. }, {
  18504. "label": "杨浦区",
  18505. "value": "310110"
  18506. }, {
  18507. "label": "闵行区",
  18508. "value": "310112"
  18509. }, {
  18510. "label": "宝山区",
  18511. "value": "310113"
  18512. }, {
  18513. "label": "嘉定区",
  18514. "value": "310114"
  18515. }, {
  18516. "label": "浦东新区",
  18517. "value": "310115"
  18518. }, {
  18519. "label": "金山区",
  18520. "value": "310116"
  18521. }, {
  18522. "label": "松江区",
  18523. "value": "310117"
  18524. }, {
  18525. "label": "青浦区",
  18526. "value": "310118"
  18527. }, {
  18528. "label": "奉贤区",
  18529. "value": "310120"
  18530. }, {
  18531. "label": "崇明区",
  18532. "value": "310151"
  18533. }]], [[{
  18534. "label": "玄武区",
  18535. "value": "320102"
  18536. }, {
  18537. "label": "秦淮区",
  18538. "value": "320104"
  18539. }, {
  18540. "label": "建邺区",
  18541. "value": "320105"
  18542. }, {
  18543. "label": "鼓楼区",
  18544. "value": "320106"
  18545. }, {
  18546. "label": "浦口区",
  18547. "value": "320111"
  18548. }, {
  18549. "label": "栖霞区",
  18550. "value": "320113"
  18551. }, {
  18552. "label": "雨花台区",
  18553. "value": "320114"
  18554. }, {
  18555. "label": "江宁区",
  18556. "value": "320115"
  18557. }, {
  18558. "label": "六合区",
  18559. "value": "320116"
  18560. }, {
  18561. "label": "溧水区",
  18562. "value": "320117"
  18563. }, {
  18564. "label": "高淳区",
  18565. "value": "320118"
  18566. }], [{
  18567. "label": "锡山区",
  18568. "value": "320205"
  18569. }, {
  18570. "label": "惠山区",
  18571. "value": "320206"
  18572. }, {
  18573. "label": "滨湖区",
  18574. "value": "320211"
  18575. }, {
  18576. "label": "梁溪区",
  18577. "value": "320213"
  18578. }, {
  18579. "label": "新吴区",
  18580. "value": "320214"
  18581. }, {
  18582. "label": "江阴市",
  18583. "value": "320281"
  18584. }, {
  18585. "label": "宜兴市",
  18586. "value": "320282"
  18587. }], [{
  18588. "label": "鼓楼区",
  18589. "value": "320302"
  18590. }, {
  18591. "label": "云龙区",
  18592. "value": "320303"
  18593. }, {
  18594. "label": "贾汪区",
  18595. "value": "320305"
  18596. }, {
  18597. "label": "泉山区",
  18598. "value": "320311"
  18599. }, {
  18600. "label": "铜山区",
  18601. "value": "320312"
  18602. }, {
  18603. "label": "丰县",
  18604. "value": "320321"
  18605. }, {
  18606. "label": "沛县",
  18607. "value": "320322"
  18608. }, {
  18609. "label": "睢宁县",
  18610. "value": "320324"
  18611. }, {
  18612. "label": "徐州经济技术开发区",
  18613. "value": "320371"
  18614. }, {
  18615. "label": "新沂市",
  18616. "value": "320381"
  18617. }, {
  18618. "label": "邳州市",
  18619. "value": "320382"
  18620. }], [{
  18621. "label": "天宁区",
  18622. "value": "320402"
  18623. }, {
  18624. "label": "钟楼区",
  18625. "value": "320404"
  18626. }, {
  18627. "label": "新北区",
  18628. "value": "320411"
  18629. }, {
  18630. "label": "武进区",
  18631. "value": "320412"
  18632. }, {
  18633. "label": "金坛区",
  18634. "value": "320413"
  18635. }, {
  18636. "label": "溧阳市",
  18637. "value": "320481"
  18638. }], [{
  18639. "label": "虎丘区",
  18640. "value": "320505"
  18641. }, {
  18642. "label": "吴中区",
  18643. "value": "320506"
  18644. }, {
  18645. "label": "相城区",
  18646. "value": "320507"
  18647. }, {
  18648. "label": "姑苏区",
  18649. "value": "320508"
  18650. }, {
  18651. "label": "吴江区",
  18652. "value": "320509"
  18653. }, {
  18654. "label": "苏州工业园区",
  18655. "value": "320571"
  18656. }, {
  18657. "label": "常熟市",
  18658. "value": "320581"
  18659. }, {
  18660. "label": "张家港市",
  18661. "value": "320582"
  18662. }, {
  18663. "label": "昆山市",
  18664. "value": "320583"
  18665. }, {
  18666. "label": "太仓市",
  18667. "value": "320585"
  18668. }], [{
  18669. "label": "崇川区",
  18670. "value": "320602"
  18671. }, {
  18672. "label": "港闸区",
  18673. "value": "320611"
  18674. }, {
  18675. "label": "通州区",
  18676. "value": "320612"
  18677. }, {
  18678. "label": "海安县",
  18679. "value": "320621"
  18680. }, {
  18681. "label": "如东县",
  18682. "value": "320623"
  18683. }, {
  18684. "label": "南通经济技术开发区",
  18685. "value": "320671"
  18686. }, {
  18687. "label": "启东市",
  18688. "value": "320681"
  18689. }, {
  18690. "label": "如皋市",
  18691. "value": "320682"
  18692. }, {
  18693. "label": "海门市",
  18694. "value": "320684"
  18695. }], [{
  18696. "label": "连云区",
  18697. "value": "320703"
  18698. }, {
  18699. "label": "海州区",
  18700. "value": "320706"
  18701. }, {
  18702. "label": "赣榆区",
  18703. "value": "320707"
  18704. }, {
  18705. "label": "东海县",
  18706. "value": "320722"
  18707. }, {
  18708. "label": "灌云县",
  18709. "value": "320723"
  18710. }, {
  18711. "label": "灌南县",
  18712. "value": "320724"
  18713. }, {
  18714. "label": "连云港经济技术开发区",
  18715. "value": "320771"
  18716. }, {
  18717. "label": "连云港高新技术产业开发区",
  18718. "value": "320772"
  18719. }], [{
  18720. "label": "淮安区",
  18721. "value": "320803"
  18722. }, {
  18723. "label": "淮阴区",
  18724. "value": "320804"
  18725. }, {
  18726. "label": "清江浦区",
  18727. "value": "320812"
  18728. }, {
  18729. "label": "洪泽区",
  18730. "value": "320813"
  18731. }, {
  18732. "label": "涟水县",
  18733. "value": "320826"
  18734. }, {
  18735. "label": "盱眙县",
  18736. "value": "320830"
  18737. }, {
  18738. "label": "金湖县",
  18739. "value": "320831"
  18740. }, {
  18741. "label": "淮安经济技术开发区",
  18742. "value": "320871"
  18743. }], [{
  18744. "label": "亭湖区",
  18745. "value": "320902"
  18746. }, {
  18747. "label": "盐都区",
  18748. "value": "320903"
  18749. }, {
  18750. "label": "大丰区",
  18751. "value": "320904"
  18752. }, {
  18753. "label": "响水县",
  18754. "value": "320921"
  18755. }, {
  18756. "label": "滨海县",
  18757. "value": "320922"
  18758. }, {
  18759. "label": "阜宁县",
  18760. "value": "320923"
  18761. }, {
  18762. "label": "射阳县",
  18763. "value": "320924"
  18764. }, {
  18765. "label": "建湖县",
  18766. "value": "320925"
  18767. }, {
  18768. "label": "盐城经济技术开发区",
  18769. "value": "320971"
  18770. }, {
  18771. "label": "东台市",
  18772. "value": "320981"
  18773. }], [{
  18774. "label": "广陵区",
  18775. "value": "321002"
  18776. }, {
  18777. "label": "邗江区",
  18778. "value": "321003"
  18779. }, {
  18780. "label": "江都区",
  18781. "value": "321012"
  18782. }, {
  18783. "label": "宝应县",
  18784. "value": "321023"
  18785. }, {
  18786. "label": "扬州经济技术开发区",
  18787. "value": "321071"
  18788. }, {
  18789. "label": "仪征市",
  18790. "value": "321081"
  18791. }, {
  18792. "label": "高邮市",
  18793. "value": "321084"
  18794. }], [{
  18795. "label": "京口区",
  18796. "value": "321102"
  18797. }, {
  18798. "label": "润州区",
  18799. "value": "321111"
  18800. }, {
  18801. "label": "丹徒区",
  18802. "value": "321112"
  18803. }, {
  18804. "label": "镇江新区",
  18805. "value": "321171"
  18806. }, {
  18807. "label": "丹阳市",
  18808. "value": "321181"
  18809. }, {
  18810. "label": "扬中市",
  18811. "value": "321182"
  18812. }, {
  18813. "label": "句容市",
  18814. "value": "321183"
  18815. }], [{
  18816. "label": "海陵区",
  18817. "value": "321202"
  18818. }, {
  18819. "label": "高港区",
  18820. "value": "321203"
  18821. }, {
  18822. "label": "姜堰区",
  18823. "value": "321204"
  18824. }, {
  18825. "label": "泰州医药高新技术产业开发区",
  18826. "value": "321271"
  18827. }, {
  18828. "label": "兴化市",
  18829. "value": "321281"
  18830. }, {
  18831. "label": "靖江市",
  18832. "value": "321282"
  18833. }, {
  18834. "label": "泰兴市",
  18835. "value": "321283"
  18836. }], [{
  18837. "label": "宿城区",
  18838. "value": "321302"
  18839. }, {
  18840. "label": "宿豫区",
  18841. "value": "321311"
  18842. }, {
  18843. "label": "沭阳县",
  18844. "value": "321322"
  18845. }, {
  18846. "label": "泗阳县",
  18847. "value": "321323"
  18848. }, {
  18849. "label": "泗洪县",
  18850. "value": "321324"
  18851. }, {
  18852. "label": "宿迁经济技术开发区",
  18853. "value": "321371"
  18854. }]], [[{
  18855. "label": "上城区",
  18856. "value": "330102"
  18857. }, {
  18858. "label": "下城区",
  18859. "value": "330103"
  18860. }, {
  18861. "label": "江干区",
  18862. "value": "330104"
  18863. }, {
  18864. "label": "拱墅区",
  18865. "value": "330105"
  18866. }, {
  18867. "label": "西湖区",
  18868. "value": "330106"
  18869. }, {
  18870. "label": "滨江区",
  18871. "value": "330108"
  18872. }, {
  18873. "label": "萧山区",
  18874. "value": "330109"
  18875. }, {
  18876. "label": "余杭区",
  18877. "value": "330110"
  18878. }, {
  18879. "label": "富阳区",
  18880. "value": "330111"
  18881. }, {
  18882. "label": "临安区",
  18883. "value": "330112"
  18884. }, {
  18885. "label": "桐庐县",
  18886. "value": "330122"
  18887. }, {
  18888. "label": "淳安县",
  18889. "value": "330127"
  18890. }, {
  18891. "label": "建德市",
  18892. "value": "330182"
  18893. }], [{
  18894. "label": "海曙区",
  18895. "value": "330203"
  18896. }, {
  18897. "label": "江北区",
  18898. "value": "330205"
  18899. }, {
  18900. "label": "北仑区",
  18901. "value": "330206"
  18902. }, {
  18903. "label": "镇海区",
  18904. "value": "330211"
  18905. }, {
  18906. "label": "鄞州区",
  18907. "value": "330212"
  18908. }, {
  18909. "label": "奉化区",
  18910. "value": "330213"
  18911. }, {
  18912. "label": "象山县",
  18913. "value": "330225"
  18914. }, {
  18915. "label": "宁海县",
  18916. "value": "330226"
  18917. }, {
  18918. "label": "余姚市",
  18919. "value": "330281"
  18920. }, {
  18921. "label": "慈溪市",
  18922. "value": "330282"
  18923. }], [{
  18924. "label": "鹿城区",
  18925. "value": "330302"
  18926. }, {
  18927. "label": "龙湾区",
  18928. "value": "330303"
  18929. }, {
  18930. "label": "瓯海区",
  18931. "value": "330304"
  18932. }, {
  18933. "label": "洞头区",
  18934. "value": "330305"
  18935. }, {
  18936. "label": "永嘉县",
  18937. "value": "330324"
  18938. }, {
  18939. "label": "平阳县",
  18940. "value": "330326"
  18941. }, {
  18942. "label": "苍南县",
  18943. "value": "330327"
  18944. }, {
  18945. "label": "文成县",
  18946. "value": "330328"
  18947. }, {
  18948. "label": "泰顺县",
  18949. "value": "330329"
  18950. }, {
  18951. "label": "温州经济技术开发区",
  18952. "value": "330371"
  18953. }, {
  18954. "label": "瑞安市",
  18955. "value": "330381"
  18956. }, {
  18957. "label": "乐清市",
  18958. "value": "330382"
  18959. }], [{
  18960. "label": "南湖区",
  18961. "value": "330402"
  18962. }, {
  18963. "label": "秀洲区",
  18964. "value": "330411"
  18965. }, {
  18966. "label": "嘉善县",
  18967. "value": "330421"
  18968. }, {
  18969. "label": "海盐县",
  18970. "value": "330424"
  18971. }, {
  18972. "label": "海宁市",
  18973. "value": "330481"
  18974. }, {
  18975. "label": "平湖市",
  18976. "value": "330482"
  18977. }, {
  18978. "label": "桐乡市",
  18979. "value": "330483"
  18980. }], [{
  18981. "label": "吴兴区",
  18982. "value": "330502"
  18983. }, {
  18984. "label": "南浔区",
  18985. "value": "330503"
  18986. }, {
  18987. "label": "德清县",
  18988. "value": "330521"
  18989. }, {
  18990. "label": "长兴县",
  18991. "value": "330522"
  18992. }, {
  18993. "label": "安吉县",
  18994. "value": "330523"
  18995. }], [{
  18996. "label": "越城区",
  18997. "value": "330602"
  18998. }, {
  18999. "label": "柯桥区",
  19000. "value": "330603"
  19001. }, {
  19002. "label": "上虞区",
  19003. "value": "330604"
  19004. }, {
  19005. "label": "新昌县",
  19006. "value": "330624"
  19007. }, {
  19008. "label": "诸暨市",
  19009. "value": "330681"
  19010. }, {
  19011. "label": "嵊州市",
  19012. "value": "330683"
  19013. }], [{
  19014. "label": "婺城区",
  19015. "value": "330702"
  19016. }, {
  19017. "label": "金东区",
  19018. "value": "330703"
  19019. }, {
  19020. "label": "武义县",
  19021. "value": "330723"
  19022. }, {
  19023. "label": "浦江县",
  19024. "value": "330726"
  19025. }, {
  19026. "label": "磐安县",
  19027. "value": "330727"
  19028. }, {
  19029. "label": "兰溪市",
  19030. "value": "330781"
  19031. }, {
  19032. "label": "义乌市",
  19033. "value": "330782"
  19034. }, {
  19035. "label": "东阳市",
  19036. "value": "330783"
  19037. }, {
  19038. "label": "永康市",
  19039. "value": "330784"
  19040. }], [{
  19041. "label": "柯城区",
  19042. "value": "330802"
  19043. }, {
  19044. "label": "衢江区",
  19045. "value": "330803"
  19046. }, {
  19047. "label": "常山县",
  19048. "value": "330822"
  19049. }, {
  19050. "label": "开化县",
  19051. "value": "330824"
  19052. }, {
  19053. "label": "龙游县",
  19054. "value": "330825"
  19055. }, {
  19056. "label": "江山市",
  19057. "value": "330881"
  19058. }], [{
  19059. "label": "定海区",
  19060. "value": "330902"
  19061. }, {
  19062. "label": "普陀区",
  19063. "value": "330903"
  19064. }, {
  19065. "label": "岱山县",
  19066. "value": "330921"
  19067. }, {
  19068. "label": "嵊泗县",
  19069. "value": "330922"
  19070. }], [{
  19071. "label": "椒江区",
  19072. "value": "331002"
  19073. }, {
  19074. "label": "黄岩区",
  19075. "value": "331003"
  19076. }, {
  19077. "label": "路桥区",
  19078. "value": "331004"
  19079. }, {
  19080. "label": "三门县",
  19081. "value": "331022"
  19082. }, {
  19083. "label": "天台县",
  19084. "value": "331023"
  19085. }, {
  19086. "label": "仙居县",
  19087. "value": "331024"
  19088. }, {
  19089. "label": "温岭市",
  19090. "value": "331081"
  19091. }, {
  19092. "label": "临海市",
  19093. "value": "331082"
  19094. }, {
  19095. "label": "玉环市",
  19096. "value": "331083"
  19097. }], [{
  19098. "label": "莲都区",
  19099. "value": "331102"
  19100. }, {
  19101. "label": "青田县",
  19102. "value": "331121"
  19103. }, {
  19104. "label": "缙云县",
  19105. "value": "331122"
  19106. }, {
  19107. "label": "遂昌县",
  19108. "value": "331123"
  19109. }, {
  19110. "label": "松阳县",
  19111. "value": "331124"
  19112. }, {
  19113. "label": "云和县",
  19114. "value": "331125"
  19115. }, {
  19116. "label": "庆元县",
  19117. "value": "331126"
  19118. }, {
  19119. "label": "景宁畲族自治县",
  19120. "value": "331127"
  19121. }, {
  19122. "label": "龙泉市",
  19123. "value": "331181"
  19124. }]], [[{
  19125. "label": "瑶海区",
  19126. "value": "340102"
  19127. }, {
  19128. "label": "庐阳区",
  19129. "value": "340103"
  19130. }, {
  19131. "label": "蜀山区",
  19132. "value": "340104"
  19133. }, {
  19134. "label": "包河区",
  19135. "value": "340111"
  19136. }, {
  19137. "label": "长丰县",
  19138. "value": "340121"
  19139. }, {
  19140. "label": "肥东县",
  19141. "value": "340122"
  19142. }, {
  19143. "label": "肥西县",
  19144. "value": "340123"
  19145. }, {
  19146. "label": "庐江县",
  19147. "value": "340124"
  19148. }, {
  19149. "label": "合肥高新技术产业开发区",
  19150. "value": "340171"
  19151. }, {
  19152. "label": "合肥经济技术开发区",
  19153. "value": "340172"
  19154. }, {
  19155. "label": "合肥新站高新技术产业开发区",
  19156. "value": "340173"
  19157. }, {
  19158. "label": "巢湖市",
  19159. "value": "340181"
  19160. }], [{
  19161. "label": "镜湖区",
  19162. "value": "340202"
  19163. }, {
  19164. "label": "弋江区",
  19165. "value": "340203"
  19166. }, {
  19167. "label": "鸠江区",
  19168. "value": "340207"
  19169. }, {
  19170. "label": "三山区",
  19171. "value": "340208"
  19172. }, {
  19173. "label": "芜湖县",
  19174. "value": "340221"
  19175. }, {
  19176. "label": "繁昌县",
  19177. "value": "340222"
  19178. }, {
  19179. "label": "南陵县",
  19180. "value": "340223"
  19181. }, {
  19182. "label": "无为县",
  19183. "value": "340225"
  19184. }, {
  19185. "label": "芜湖经济技术开发区",
  19186. "value": "340271"
  19187. }, {
  19188. "label": "安徽芜湖长江大桥经济开发区",
  19189. "value": "340272"
  19190. }], [{
  19191. "label": "龙子湖区",
  19192. "value": "340302"
  19193. }, {
  19194. "label": "蚌山区",
  19195. "value": "340303"
  19196. }, {
  19197. "label": "禹会区",
  19198. "value": "340304"
  19199. }, {
  19200. "label": "淮上区",
  19201. "value": "340311"
  19202. }, {
  19203. "label": "怀远县",
  19204. "value": "340321"
  19205. }, {
  19206. "label": "五河县",
  19207. "value": "340322"
  19208. }, {
  19209. "label": "固镇县",
  19210. "value": "340323"
  19211. }, {
  19212. "label": "蚌埠市高新技术开发区",
  19213. "value": "340371"
  19214. }, {
  19215. "label": "蚌埠市经济开发区",
  19216. "value": "340372"
  19217. }], [{
  19218. "label": "大通区",
  19219. "value": "340402"
  19220. }, {
  19221. "label": "田家庵区",
  19222. "value": "340403"
  19223. }, {
  19224. "label": "谢家集区",
  19225. "value": "340404"
  19226. }, {
  19227. "label": "八公山区",
  19228. "value": "340405"
  19229. }, {
  19230. "label": "潘集区",
  19231. "value": "340406"
  19232. }, {
  19233. "label": "凤台县",
  19234. "value": "340421"
  19235. }, {
  19236. "label": "寿县",
  19237. "value": "340422"
  19238. }], [{
  19239. "label": "花山区",
  19240. "value": "340503"
  19241. }, {
  19242. "label": "雨山区",
  19243. "value": "340504"
  19244. }, {
  19245. "label": "博望区",
  19246. "value": "340506"
  19247. }, {
  19248. "label": "当涂县",
  19249. "value": "340521"
  19250. }, {
  19251. "label": "含山县",
  19252. "value": "340522"
  19253. }, {
  19254. "label": "和县",
  19255. "value": "340523"
  19256. }], [{
  19257. "label": "杜集区",
  19258. "value": "340602"
  19259. }, {
  19260. "label": "相山区",
  19261. "value": "340603"
  19262. }, {
  19263. "label": "烈山区",
  19264. "value": "340604"
  19265. }, {
  19266. "label": "濉溪县",
  19267. "value": "340621"
  19268. }], [{
  19269. "label": "铜官区",
  19270. "value": "340705"
  19271. }, {
  19272. "label": "义安区",
  19273. "value": "340706"
  19274. }, {
  19275. "label": "郊区",
  19276. "value": "340711"
  19277. }, {
  19278. "label": "枞阳县",
  19279. "value": "340722"
  19280. }], [{
  19281. "label": "迎江区",
  19282. "value": "340802"
  19283. }, {
  19284. "label": "大观区",
  19285. "value": "340803"
  19286. }, {
  19287. "label": "宜秀区",
  19288. "value": "340811"
  19289. }, {
  19290. "label": "怀宁县",
  19291. "value": "340822"
  19292. }, {
  19293. "label": "潜山县",
  19294. "value": "340824"
  19295. }, {
  19296. "label": "太湖县",
  19297. "value": "340825"
  19298. }, {
  19299. "label": "宿松县",
  19300. "value": "340826"
  19301. }, {
  19302. "label": "望江县",
  19303. "value": "340827"
  19304. }, {
  19305. "label": "岳西县",
  19306. "value": "340828"
  19307. }, {
  19308. "label": "安徽安庆经济开发区",
  19309. "value": "340871"
  19310. }, {
  19311. "label": "桐城市",
  19312. "value": "340881"
  19313. }], [{
  19314. "label": "屯溪区",
  19315. "value": "341002"
  19316. }, {
  19317. "label": "黄山区",
  19318. "value": "341003"
  19319. }, {
  19320. "label": "徽州区",
  19321. "value": "341004"
  19322. }, {
  19323. "label": "歙县",
  19324. "value": "341021"
  19325. }, {
  19326. "label": "休宁县",
  19327. "value": "341022"
  19328. }, {
  19329. "label": "黟县",
  19330. "value": "341023"
  19331. }, {
  19332. "label": "祁门县",
  19333. "value": "341024"
  19334. }], [{
  19335. "label": "琅琊区",
  19336. "value": "341102"
  19337. }, {
  19338. "label": "南谯区",
  19339. "value": "341103"
  19340. }, {
  19341. "label": "来安县",
  19342. "value": "341122"
  19343. }, {
  19344. "label": "全椒县",
  19345. "value": "341124"
  19346. }, {
  19347. "label": "定远县",
  19348. "value": "341125"
  19349. }, {
  19350. "label": "凤阳县",
  19351. "value": "341126"
  19352. }, {
  19353. "label": "苏滁现代产业园",
  19354. "value": "341171"
  19355. }, {
  19356. "label": "滁州经济技术开发区",
  19357. "value": "341172"
  19358. }, {
  19359. "label": "天长市",
  19360. "value": "341181"
  19361. }, {
  19362. "label": "明光市",
  19363. "value": "341182"
  19364. }], [{
  19365. "label": "颍州区",
  19366. "value": "341202"
  19367. }, {
  19368. "label": "颍东区",
  19369. "value": "341203"
  19370. }, {
  19371. "label": "颍泉区",
  19372. "value": "341204"
  19373. }, {
  19374. "label": "临泉县",
  19375. "value": "341221"
  19376. }, {
  19377. "label": "太和县",
  19378. "value": "341222"
  19379. }, {
  19380. "label": "阜南县",
  19381. "value": "341225"
  19382. }, {
  19383. "label": "颍上县",
  19384. "value": "341226"
  19385. }, {
  19386. "label": "阜阳合肥现代产业园区",
  19387. "value": "341271"
  19388. }, {
  19389. "label": "阜阳经济技术开发区",
  19390. "value": "341272"
  19391. }, {
  19392. "label": "界首市",
  19393. "value": "341282"
  19394. }], [{
  19395. "label": "埇桥区",
  19396. "value": "341302"
  19397. }, {
  19398. "label": "砀山县",
  19399. "value": "341321"
  19400. }, {
  19401. "label": "萧县",
  19402. "value": "341322"
  19403. }, {
  19404. "label": "灵璧县",
  19405. "value": "341323"
  19406. }, {
  19407. "label": "泗县",
  19408. "value": "341324"
  19409. }, {
  19410. "label": "宿州马鞍山现代产业园区",
  19411. "value": "341371"
  19412. }, {
  19413. "label": "宿州经济技术开发区",
  19414. "value": "341372"
  19415. }], [{
  19416. "label": "金安区",
  19417. "value": "341502"
  19418. }, {
  19419. "label": "裕安区",
  19420. "value": "341503"
  19421. }, {
  19422. "label": "叶集区",
  19423. "value": "341504"
  19424. }, {
  19425. "label": "霍邱县",
  19426. "value": "341522"
  19427. }, {
  19428. "label": "舒城县",
  19429. "value": "341523"
  19430. }, {
  19431. "label": "金寨县",
  19432. "value": "341524"
  19433. }, {
  19434. "label": "霍山县",
  19435. "value": "341525"
  19436. }], [{
  19437. "label": "谯城区",
  19438. "value": "341602"
  19439. }, {
  19440. "label": "涡阳县",
  19441. "value": "341621"
  19442. }, {
  19443. "label": "蒙城县",
  19444. "value": "341622"
  19445. }, {
  19446. "label": "利辛县",
  19447. "value": "341623"
  19448. }], [{
  19449. "label": "贵池区",
  19450. "value": "341702"
  19451. }, {
  19452. "label": "东至县",
  19453. "value": "341721"
  19454. }, {
  19455. "label": "石台县",
  19456. "value": "341722"
  19457. }, {
  19458. "label": "青阳县",
  19459. "value": "341723"
  19460. }], [{
  19461. "label": "宣州区",
  19462. "value": "341802"
  19463. }, {
  19464. "label": "郎溪县",
  19465. "value": "341821"
  19466. }, {
  19467. "label": "广德县",
  19468. "value": "341822"
  19469. }, {
  19470. "label": "泾县",
  19471. "value": "341823"
  19472. }, {
  19473. "label": "绩溪县",
  19474. "value": "341824"
  19475. }, {
  19476. "label": "旌德县",
  19477. "value": "341825"
  19478. }, {
  19479. "label": "宣城市经济开发区",
  19480. "value": "341871"
  19481. }, {
  19482. "label": "宁国市",
  19483. "value": "341881"
  19484. }]], [[{
  19485. "label": "鼓楼区",
  19486. "value": "350102"
  19487. }, {
  19488. "label": "台江区",
  19489. "value": "350103"
  19490. }, {
  19491. "label": "仓山区",
  19492. "value": "350104"
  19493. }, {
  19494. "label": "马尾区",
  19495. "value": "350105"
  19496. }, {
  19497. "label": "晋安区",
  19498. "value": "350111"
  19499. }, {
  19500. "label": "闽侯县",
  19501. "value": "350121"
  19502. }, {
  19503. "label": "连江县",
  19504. "value": "350122"
  19505. }, {
  19506. "label": "罗源县",
  19507. "value": "350123"
  19508. }, {
  19509. "label": "闽清县",
  19510. "value": "350124"
  19511. }, {
  19512. "label": "永泰县",
  19513. "value": "350125"
  19514. }, {
  19515. "label": "平潭县",
  19516. "value": "350128"
  19517. }, {
  19518. "label": "福清市",
  19519. "value": "350181"
  19520. }, {
  19521. "label": "长乐市",
  19522. "value": "350182"
  19523. }], [{
  19524. "label": "思明区",
  19525. "value": "350203"
  19526. }, {
  19527. "label": "海沧区",
  19528. "value": "350205"
  19529. }, {
  19530. "label": "湖里区",
  19531. "value": "350206"
  19532. }, {
  19533. "label": "集美区",
  19534. "value": "350211"
  19535. }, {
  19536. "label": "同安区",
  19537. "value": "350212"
  19538. }, {
  19539. "label": "翔安区",
  19540. "value": "350213"
  19541. }], [{
  19542. "label": "城厢区",
  19543. "value": "350302"
  19544. }, {
  19545. "label": "涵江区",
  19546. "value": "350303"
  19547. }, {
  19548. "label": "荔城区",
  19549. "value": "350304"
  19550. }, {
  19551. "label": "秀屿区",
  19552. "value": "350305"
  19553. }, {
  19554. "label": "仙游县",
  19555. "value": "350322"
  19556. }], [{
  19557. "label": "梅列区",
  19558. "value": "350402"
  19559. }, {
  19560. "label": "三元区",
  19561. "value": "350403"
  19562. }, {
  19563. "label": "明溪县",
  19564. "value": "350421"
  19565. }, {
  19566. "label": "清流县",
  19567. "value": "350423"
  19568. }, {
  19569. "label": "宁化县",
  19570. "value": "350424"
  19571. }, {
  19572. "label": "大田县",
  19573. "value": "350425"
  19574. }, {
  19575. "label": "尤溪县",
  19576. "value": "350426"
  19577. }, {
  19578. "label": "沙县",
  19579. "value": "350427"
  19580. }, {
  19581. "label": "将乐县",
  19582. "value": "350428"
  19583. }, {
  19584. "label": "泰宁县",
  19585. "value": "350429"
  19586. }, {
  19587. "label": "建宁县",
  19588. "value": "350430"
  19589. }, {
  19590. "label": "永安市",
  19591. "value": "350481"
  19592. }], [{
  19593. "label": "鲤城区",
  19594. "value": "350502"
  19595. }, {
  19596. "label": "丰泽区",
  19597. "value": "350503"
  19598. }, {
  19599. "label": "洛江区",
  19600. "value": "350504"
  19601. }, {
  19602. "label": "泉港区",
  19603. "value": "350505"
  19604. }, {
  19605. "label": "惠安县",
  19606. "value": "350521"
  19607. }, {
  19608. "label": "安溪县",
  19609. "value": "350524"
  19610. }, {
  19611. "label": "永春县",
  19612. "value": "350525"
  19613. }, {
  19614. "label": "德化县",
  19615. "value": "350526"
  19616. }, {
  19617. "label": "金门县",
  19618. "value": "350527"
  19619. }, {
  19620. "label": "石狮市",
  19621. "value": "350581"
  19622. }, {
  19623. "label": "晋江市",
  19624. "value": "350582"
  19625. }, {
  19626. "label": "南安市",
  19627. "value": "350583"
  19628. }], [{
  19629. "label": "芗城区",
  19630. "value": "350602"
  19631. }, {
  19632. "label": "龙文区",
  19633. "value": "350603"
  19634. }, {
  19635. "label": "云霄县",
  19636. "value": "350622"
  19637. }, {
  19638. "label": "漳浦县",
  19639. "value": "350623"
  19640. }, {
  19641. "label": "诏安县",
  19642. "value": "350624"
  19643. }, {
  19644. "label": "长泰县",
  19645. "value": "350625"
  19646. }, {
  19647. "label": "东山县",
  19648. "value": "350626"
  19649. }, {
  19650. "label": "南靖县",
  19651. "value": "350627"
  19652. }, {
  19653. "label": "平和县",
  19654. "value": "350628"
  19655. }, {
  19656. "label": "华安县",
  19657. "value": "350629"
  19658. }, {
  19659. "label": "龙海市",
  19660. "value": "350681"
  19661. }], [{
  19662. "label": "延平区",
  19663. "value": "350702"
  19664. }, {
  19665. "label": "建阳区",
  19666. "value": "350703"
  19667. }, {
  19668. "label": "顺昌县",
  19669. "value": "350721"
  19670. }, {
  19671. "label": "浦城县",
  19672. "value": "350722"
  19673. }, {
  19674. "label": "光泽县",
  19675. "value": "350723"
  19676. }, {
  19677. "label": "松溪县",
  19678. "value": "350724"
  19679. }, {
  19680. "label": "政和县",
  19681. "value": "350725"
  19682. }, {
  19683. "label": "邵武市",
  19684. "value": "350781"
  19685. }, {
  19686. "label": "武夷山市",
  19687. "value": "350782"
  19688. }, {
  19689. "label": "建瓯市",
  19690. "value": "350783"
  19691. }], [{
  19692. "label": "新罗区",
  19693. "value": "350802"
  19694. }, {
  19695. "label": "永定区",
  19696. "value": "350803"
  19697. }, {
  19698. "label": "长汀县",
  19699. "value": "350821"
  19700. }, {
  19701. "label": "上杭县",
  19702. "value": "350823"
  19703. }, {
  19704. "label": "武平县",
  19705. "value": "350824"
  19706. }, {
  19707. "label": "连城县",
  19708. "value": "350825"
  19709. }, {
  19710. "label": "漳平市",
  19711. "value": "350881"
  19712. }], [{
  19713. "label": "蕉城区",
  19714. "value": "350902"
  19715. }, {
  19716. "label": "霞浦县",
  19717. "value": "350921"
  19718. }, {
  19719. "label": "古田县",
  19720. "value": "350922"
  19721. }, {
  19722. "label": "屏南县",
  19723. "value": "350923"
  19724. }, {
  19725. "label": "寿宁县",
  19726. "value": "350924"
  19727. }, {
  19728. "label": "周宁县",
  19729. "value": "350925"
  19730. }, {
  19731. "label": "柘荣县",
  19732. "value": "350926"
  19733. }, {
  19734. "label": "福安市",
  19735. "value": "350981"
  19736. }, {
  19737. "label": "福鼎市",
  19738. "value": "350982"
  19739. }]], [[{
  19740. "label": "东湖区",
  19741. "value": "360102"
  19742. }, {
  19743. "label": "西湖区",
  19744. "value": "360103"
  19745. }, {
  19746. "label": "青云谱区",
  19747. "value": "360104"
  19748. }, {
  19749. "label": "湾里区",
  19750. "value": "360105"
  19751. }, {
  19752. "label": "青山湖区",
  19753. "value": "360111"
  19754. }, {
  19755. "label": "新建区",
  19756. "value": "360112"
  19757. }, {
  19758. "label": "南昌县",
  19759. "value": "360121"
  19760. }, {
  19761. "label": "安义县",
  19762. "value": "360123"
  19763. }, {
  19764. "label": "进贤县",
  19765. "value": "360124"
  19766. }], [{
  19767. "label": "昌江区",
  19768. "value": "360202"
  19769. }, {
  19770. "label": "珠山区",
  19771. "value": "360203"
  19772. }, {
  19773. "label": "浮梁县",
  19774. "value": "360222"
  19775. }, {
  19776. "label": "乐平市",
  19777. "value": "360281"
  19778. }], [{
  19779. "label": "安源区",
  19780. "value": "360302"
  19781. }, {
  19782. "label": "湘东区",
  19783. "value": "360313"
  19784. }, {
  19785. "label": "莲花县",
  19786. "value": "360321"
  19787. }, {
  19788. "label": "上栗县",
  19789. "value": "360322"
  19790. }, {
  19791. "label": "芦溪县",
  19792. "value": "360323"
  19793. }], [{
  19794. "label": "濂溪区",
  19795. "value": "360402"
  19796. }, {
  19797. "label": "浔阳区",
  19798. "value": "360403"
  19799. }, {
  19800. "label": "柴桑区",
  19801. "value": "360404"
  19802. }, {
  19803. "label": "武宁县",
  19804. "value": "360423"
  19805. }, {
  19806. "label": "修水县",
  19807. "value": "360424"
  19808. }, {
  19809. "label": "永修县",
  19810. "value": "360425"
  19811. }, {
  19812. "label": "德安县",
  19813. "value": "360426"
  19814. }, {
  19815. "label": "都昌县",
  19816. "value": "360428"
  19817. }, {
  19818. "label": "湖口县",
  19819. "value": "360429"
  19820. }, {
  19821. "label": "彭泽县",
  19822. "value": "360430"
  19823. }, {
  19824. "label": "瑞昌市",
  19825. "value": "360481"
  19826. }, {
  19827. "label": "共青城市",
  19828. "value": "360482"
  19829. }, {
  19830. "label": "庐山市",
  19831. "value": "360483"
  19832. }], [{
  19833. "label": "渝水区",
  19834. "value": "360502"
  19835. }, {
  19836. "label": "分宜县",
  19837. "value": "360521"
  19838. }], [{
  19839. "label": "月湖区",
  19840. "value": "360602"
  19841. }, {
  19842. "label": "余江县",
  19843. "value": "360622"
  19844. }, {
  19845. "label": "贵溪市",
  19846. "value": "360681"
  19847. }], [{
  19848. "label": "章贡区",
  19849. "value": "360702"
  19850. }, {
  19851. "label": "南康区",
  19852. "value": "360703"
  19853. }, {
  19854. "label": "赣县区",
  19855. "value": "360704"
  19856. }, {
  19857. "label": "信丰县",
  19858. "value": "360722"
  19859. }, {
  19860. "label": "大余县",
  19861. "value": "360723"
  19862. }, {
  19863. "label": "上犹县",
  19864. "value": "360724"
  19865. }, {
  19866. "label": "崇义县",
  19867. "value": "360725"
  19868. }, {
  19869. "label": "安远县",
  19870. "value": "360726"
  19871. }, {
  19872. "label": "龙南县",
  19873. "value": "360727"
  19874. }, {
  19875. "label": "定南县",
  19876. "value": "360728"
  19877. }, {
  19878. "label": "全南县",
  19879. "value": "360729"
  19880. }, {
  19881. "label": "宁都县",
  19882. "value": "360730"
  19883. }, {
  19884. "label": "于都县",
  19885. "value": "360731"
  19886. }, {
  19887. "label": "兴国县",
  19888. "value": "360732"
  19889. }, {
  19890. "label": "会昌县",
  19891. "value": "360733"
  19892. }, {
  19893. "label": "寻乌县",
  19894. "value": "360734"
  19895. }, {
  19896. "label": "石城县",
  19897. "value": "360735"
  19898. }, {
  19899. "label": "瑞金市",
  19900. "value": "360781"
  19901. }], [{
  19902. "label": "吉州区",
  19903. "value": "360802"
  19904. }, {
  19905. "label": "青原区",
  19906. "value": "360803"
  19907. }, {
  19908. "label": "吉安县",
  19909. "value": "360821"
  19910. }, {
  19911. "label": "吉水县",
  19912. "value": "360822"
  19913. }, {
  19914. "label": "峡江县",
  19915. "value": "360823"
  19916. }, {
  19917. "label": "新干县",
  19918. "value": "360824"
  19919. }, {
  19920. "label": "永丰县",
  19921. "value": "360825"
  19922. }, {
  19923. "label": "泰和县",
  19924. "value": "360826"
  19925. }, {
  19926. "label": "遂川县",
  19927. "value": "360827"
  19928. }, {
  19929. "label": "万安县",
  19930. "value": "360828"
  19931. }, {
  19932. "label": "安福县",
  19933. "value": "360829"
  19934. }, {
  19935. "label": "永新县",
  19936. "value": "360830"
  19937. }, {
  19938. "label": "井冈山市",
  19939. "value": "360881"
  19940. }], [{
  19941. "label": "袁州区",
  19942. "value": "360902"
  19943. }, {
  19944. "label": "奉新县",
  19945. "value": "360921"
  19946. }, {
  19947. "label": "万载县",
  19948. "value": "360922"
  19949. }, {
  19950. "label": "上高县",
  19951. "value": "360923"
  19952. }, {
  19953. "label": "宜丰县",
  19954. "value": "360924"
  19955. }, {
  19956. "label": "靖安县",
  19957. "value": "360925"
  19958. }, {
  19959. "label": "铜鼓县",
  19960. "value": "360926"
  19961. }, {
  19962. "label": "丰城市",
  19963. "value": "360981"
  19964. }, {
  19965. "label": "樟树市",
  19966. "value": "360982"
  19967. }, {
  19968. "label": "高安市",
  19969. "value": "360983"
  19970. }], [{
  19971. "label": "临川区",
  19972. "value": "361002"
  19973. }, {
  19974. "label": "东乡区",
  19975. "value": "361003"
  19976. }, {
  19977. "label": "南城县",
  19978. "value": "361021"
  19979. }, {
  19980. "label": "黎川县",
  19981. "value": "361022"
  19982. }, {
  19983. "label": "南丰县",
  19984. "value": "361023"
  19985. }, {
  19986. "label": "崇仁县",
  19987. "value": "361024"
  19988. }, {
  19989. "label": "乐安县",
  19990. "value": "361025"
  19991. }, {
  19992. "label": "宜黄县",
  19993. "value": "361026"
  19994. }, {
  19995. "label": "金溪县",
  19996. "value": "361027"
  19997. }, {
  19998. "label": "资溪县",
  19999. "value": "361028"
  20000. }, {
  20001. "label": "广昌县",
  20002. "value": "361030"
  20003. }], [{
  20004. "label": "信州区",
  20005. "value": "361102"
  20006. }, {
  20007. "label": "广丰区",
  20008. "value": "361103"
  20009. }, {
  20010. "label": "上饶县",
  20011. "value": "361121"
  20012. }, {
  20013. "label": "玉山县",
  20014. "value": "361123"
  20015. }, {
  20016. "label": "铅山县",
  20017. "value": "361124"
  20018. }, {
  20019. "label": "横峰县",
  20020. "value": "361125"
  20021. }, {
  20022. "label": "弋阳县",
  20023. "value": "361126"
  20024. }, {
  20025. "label": "余干县",
  20026. "value": "361127"
  20027. }, {
  20028. "label": "鄱阳县",
  20029. "value": "361128"
  20030. }, {
  20031. "label": "万年县",
  20032. "value": "361129"
  20033. }, {
  20034. "label": "婺源县",
  20035. "value": "361130"
  20036. }, {
  20037. "label": "德兴市",
  20038. "value": "361181"
  20039. }]], [[{
  20040. "label": "历下区",
  20041. "value": "370102"
  20042. }, {
  20043. "label": "市中区",
  20044. "value": "370103"
  20045. }, {
  20046. "label": "槐荫区",
  20047. "value": "370104"
  20048. }, {
  20049. "label": "天桥区",
  20050. "value": "370105"
  20051. }, {
  20052. "label": "历城区",
  20053. "value": "370112"
  20054. }, {
  20055. "label": "长清区",
  20056. "value": "370113"
  20057. }, {
  20058. "label": "章丘区",
  20059. "value": "370114"
  20060. }, {
  20061. "label": "平阴县",
  20062. "value": "370124"
  20063. }, {
  20064. "label": "济阳县",
  20065. "value": "370125"
  20066. }, {
  20067. "label": "商河县",
  20068. "value": "370126"
  20069. }, {
  20070. "label": "济南高新技术产业开发区",
  20071. "value": "370171"
  20072. }], [{
  20073. "label": "市南区",
  20074. "value": "370202"
  20075. }, {
  20076. "label": "市北区",
  20077. "value": "370203"
  20078. }, {
  20079. "label": "黄岛区",
  20080. "value": "370211"
  20081. }, {
  20082. "label": "崂山区",
  20083. "value": "370212"
  20084. }, {
  20085. "label": "李沧区",
  20086. "value": "370213"
  20087. }, {
  20088. "label": "城阳区",
  20089. "value": "370214"
  20090. }, {
  20091. "label": "即墨区",
  20092. "value": "370215"
  20093. }, {
  20094. "label": "青岛高新技术产业开发区",
  20095. "value": "370271"
  20096. }, {
  20097. "label": "胶州市",
  20098. "value": "370281"
  20099. }, {
  20100. "label": "平度市",
  20101. "value": "370283"
  20102. }, {
  20103. "label": "莱西市",
  20104. "value": "370285"
  20105. }], [{
  20106. "label": "淄川区",
  20107. "value": "370302"
  20108. }, {
  20109. "label": "张店区",
  20110. "value": "370303"
  20111. }, {
  20112. "label": "博山区",
  20113. "value": "370304"
  20114. }, {
  20115. "label": "临淄区",
  20116. "value": "370305"
  20117. }, {
  20118. "label": "周村区",
  20119. "value": "370306"
  20120. }, {
  20121. "label": "桓台县",
  20122. "value": "370321"
  20123. }, {
  20124. "label": "高青县",
  20125. "value": "370322"
  20126. }, {
  20127. "label": "沂源县",
  20128. "value": "370323"
  20129. }], [{
  20130. "label": "市中区",
  20131. "value": "370402"
  20132. }, {
  20133. "label": "薛城区",
  20134. "value": "370403"
  20135. }, {
  20136. "label": "峄城区",
  20137. "value": "370404"
  20138. }, {
  20139. "label": "台儿庄区",
  20140. "value": "370405"
  20141. }, {
  20142. "label": "山亭区",
  20143. "value": "370406"
  20144. }, {
  20145. "label": "滕州市",
  20146. "value": "370481"
  20147. }], [{
  20148. "label": "东营区",
  20149. "value": "370502"
  20150. }, {
  20151. "label": "河口区",
  20152. "value": "370503"
  20153. }, {
  20154. "label": "垦利区",
  20155. "value": "370505"
  20156. }, {
  20157. "label": "利津县",
  20158. "value": "370522"
  20159. }, {
  20160. "label": "广饶县",
  20161. "value": "370523"
  20162. }, {
  20163. "label": "东营经济技术开发区",
  20164. "value": "370571"
  20165. }, {
  20166. "label": "东营港经济开发区",
  20167. "value": "370572"
  20168. }], [{
  20169. "label": "芝罘区",
  20170. "value": "370602"
  20171. }, {
  20172. "label": "福山区",
  20173. "value": "370611"
  20174. }, {
  20175. "label": "牟平区",
  20176. "value": "370612"
  20177. }, {
  20178. "label": "莱山区",
  20179. "value": "370613"
  20180. }, {
  20181. "label": "长岛县",
  20182. "value": "370634"
  20183. }, {
  20184. "label": "烟台高新技术产业开发区",
  20185. "value": "370671"
  20186. }, {
  20187. "label": "烟台经济技术开发区",
  20188. "value": "370672"
  20189. }, {
  20190. "label": "龙口市",
  20191. "value": "370681"
  20192. }, {
  20193. "label": "莱阳市",
  20194. "value": "370682"
  20195. }, {
  20196. "label": "莱州市",
  20197. "value": "370683"
  20198. }, {
  20199. "label": "蓬莱市",
  20200. "value": "370684"
  20201. }, {
  20202. "label": "招远市",
  20203. "value": "370685"
  20204. }, {
  20205. "label": "栖霞市",
  20206. "value": "370686"
  20207. }, {
  20208. "label": "海阳市",
  20209. "value": "370687"
  20210. }], [{
  20211. "label": "潍城区",
  20212. "value": "370702"
  20213. }, {
  20214. "label": "寒亭区",
  20215. "value": "370703"
  20216. }, {
  20217. "label": "坊子区",
  20218. "value": "370704"
  20219. }, {
  20220. "label": "奎文区",
  20221. "value": "370705"
  20222. }, {
  20223. "label": "临朐县",
  20224. "value": "370724"
  20225. }, {
  20226. "label": "昌乐县",
  20227. "value": "370725"
  20228. }, {
  20229. "label": "潍坊滨海经济技术开发区",
  20230. "value": "370772"
  20231. }, {
  20232. "label": "青州市",
  20233. "value": "370781"
  20234. }, {
  20235. "label": "诸城市",
  20236. "value": "370782"
  20237. }, {
  20238. "label": "寿光市",
  20239. "value": "370783"
  20240. }, {
  20241. "label": "安丘市",
  20242. "value": "370784"
  20243. }, {
  20244. "label": "高密市",
  20245. "value": "370785"
  20246. }, {
  20247. "label": "昌邑市",
  20248. "value": "370786"
  20249. }], [{
  20250. "label": "任城区",
  20251. "value": "370811"
  20252. }, {
  20253. "label": "兖州区",
  20254. "value": "370812"
  20255. }, {
  20256. "label": "微山县",
  20257. "value": "370826"
  20258. }, {
  20259. "label": "鱼台县",
  20260. "value": "370827"
  20261. }, {
  20262. "label": "金乡县",
  20263. "value": "370828"
  20264. }, {
  20265. "label": "嘉祥县",
  20266. "value": "370829"
  20267. }, {
  20268. "label": "汶上县",
  20269. "value": "370830"
  20270. }, {
  20271. "label": "泗水县",
  20272. "value": "370831"
  20273. }, {
  20274. "label": "梁山县",
  20275. "value": "370832"
  20276. }, {
  20277. "label": "济宁高新技术产业开发区",
  20278. "value": "370871"
  20279. }, {
  20280. "label": "曲阜市",
  20281. "value": "370881"
  20282. }, {
  20283. "label": "邹城市",
  20284. "value": "370883"
  20285. }], [{
  20286. "label": "泰山区",
  20287. "value": "370902"
  20288. }, {
  20289. "label": "岱岳区",
  20290. "value": "370911"
  20291. }, {
  20292. "label": "宁阳县",
  20293. "value": "370921"
  20294. }, {
  20295. "label": "东平县",
  20296. "value": "370923"
  20297. }, {
  20298. "label": "新泰市",
  20299. "value": "370982"
  20300. }, {
  20301. "label": "肥城市",
  20302. "value": "370983"
  20303. }], [{
  20304. "label": "环翠区",
  20305. "value": "371002"
  20306. }, {
  20307. "label": "文登区",
  20308. "value": "371003"
  20309. }, {
  20310. "label": "威海火炬高技术产业开发区",
  20311. "value": "371071"
  20312. }, {
  20313. "label": "威海经济技术开发区",
  20314. "value": "371072"
  20315. }, {
  20316. "label": "威海临港经济技术开发区",
  20317. "value": "371073"
  20318. }, {
  20319. "label": "荣成市",
  20320. "value": "371082"
  20321. }, {
  20322. "label": "乳山市",
  20323. "value": "371083"
  20324. }], [{
  20325. "label": "东港区",
  20326. "value": "371102"
  20327. }, {
  20328. "label": "岚山区",
  20329. "value": "371103"
  20330. }, {
  20331. "label": "五莲县",
  20332. "value": "371121"
  20333. }, {
  20334. "label": "莒县",
  20335. "value": "371122"
  20336. }, {
  20337. "label": "日照经济技术开发区",
  20338. "value": "371171"
  20339. }, {
  20340. "label": "日照国际海洋城",
  20341. "value": "371172"
  20342. }], [{
  20343. "label": "莱城区",
  20344. "value": "371202"
  20345. }, {
  20346. "label": "钢城区",
  20347. "value": "371203"
  20348. }], [{
  20349. "label": "兰山区",
  20350. "value": "371302"
  20351. }, {
  20352. "label": "罗庄区",
  20353. "value": "371311"
  20354. }, {
  20355. "label": "河东区",
  20356. "value": "371312"
  20357. }, {
  20358. "label": "沂南县",
  20359. "value": "371321"
  20360. }, {
  20361. "label": "郯城县",
  20362. "value": "371322"
  20363. }, {
  20364. "label": "沂水县",
  20365. "value": "371323"
  20366. }, {
  20367. "label": "兰陵县",
  20368. "value": "371324"
  20369. }, {
  20370. "label": "费县",
  20371. "value": "371325"
  20372. }, {
  20373. "label": "平邑县",
  20374. "value": "371326"
  20375. }, {
  20376. "label": "莒南县",
  20377. "value": "371327"
  20378. }, {
  20379. "label": "蒙阴县",
  20380. "value": "371328"
  20381. }, {
  20382. "label": "临沭县",
  20383. "value": "371329"
  20384. }, {
  20385. "label": "临沂高新技术产业开发区",
  20386. "value": "371371"
  20387. }, {
  20388. "label": "临沂经济技术开发区",
  20389. "value": "371372"
  20390. }, {
  20391. "label": "临沂临港经济开发区",
  20392. "value": "371373"
  20393. }], [{
  20394. "label": "德城区",
  20395. "value": "371402"
  20396. }, {
  20397. "label": "陵城区",
  20398. "value": "371403"
  20399. }, {
  20400. "label": "宁津县",
  20401. "value": "371422"
  20402. }, {
  20403. "label": "庆云县",
  20404. "value": "371423"
  20405. }, {
  20406. "label": "临邑县",
  20407. "value": "371424"
  20408. }, {
  20409. "label": "齐河县",
  20410. "value": "371425"
  20411. }, {
  20412. "label": "平原县",
  20413. "value": "371426"
  20414. }, {
  20415. "label": "夏津县",
  20416. "value": "371427"
  20417. }, {
  20418. "label": "武城县",
  20419. "value": "371428"
  20420. }, {
  20421. "label": "德州经济技术开发区",
  20422. "value": "371471"
  20423. }, {
  20424. "label": "德州运河经济开发区",
  20425. "value": "371472"
  20426. }, {
  20427. "label": "乐陵市",
  20428. "value": "371481"
  20429. }, {
  20430. "label": "禹城市",
  20431. "value": "371482"
  20432. }], [{
  20433. "label": "东昌府区",
  20434. "value": "371502"
  20435. }, {
  20436. "label": "阳谷县",
  20437. "value": "371521"
  20438. }, {
  20439. "label": "莘县",
  20440. "value": "371522"
  20441. }, {
  20442. "label": "茌平县",
  20443. "value": "371523"
  20444. }, {
  20445. "label": "东阿县",
  20446. "value": "371524"
  20447. }, {
  20448. "label": "冠县",
  20449. "value": "371525"
  20450. }, {
  20451. "label": "高唐县",
  20452. "value": "371526"
  20453. }, {
  20454. "label": "临清市",
  20455. "value": "371581"
  20456. }], [{
  20457. "label": "滨城区",
  20458. "value": "371602"
  20459. }, {
  20460. "label": "沾化区",
  20461. "value": "371603"
  20462. }, {
  20463. "label": "惠民县",
  20464. "value": "371621"
  20465. }, {
  20466. "label": "阳信县",
  20467. "value": "371622"
  20468. }, {
  20469. "label": "无棣县",
  20470. "value": "371623"
  20471. }, {
  20472. "label": "博兴县",
  20473. "value": "371625"
  20474. }, {
  20475. "label": "邹平县",
  20476. "value": "371626"
  20477. }], [{
  20478. "label": "牡丹区",
  20479. "value": "371702"
  20480. }, {
  20481. "label": "定陶区",
  20482. "value": "371703"
  20483. }, {
  20484. "label": "曹县",
  20485. "value": "371721"
  20486. }, {
  20487. "label": "单县",
  20488. "value": "371722"
  20489. }, {
  20490. "label": "成武县",
  20491. "value": "371723"
  20492. }, {
  20493. "label": "巨野县",
  20494. "value": "371724"
  20495. }, {
  20496. "label": "郓城县",
  20497. "value": "371725"
  20498. }, {
  20499. "label": "鄄城县",
  20500. "value": "371726"
  20501. }, {
  20502. "label": "东明县",
  20503. "value": "371728"
  20504. }, {
  20505. "label": "菏泽经济技术开发区",
  20506. "value": "371771"
  20507. }, {
  20508. "label": "菏泽高新技术开发区",
  20509. "value": "371772"
  20510. }]], [[{
  20511. "label": "中原区",
  20512. "value": "410102"
  20513. }, {
  20514. "label": "二七区",
  20515. "value": "410103"
  20516. }, {
  20517. "label": "管城回族区",
  20518. "value": "410104"
  20519. }, {
  20520. "label": "金水区",
  20521. "value": "410105"
  20522. }, {
  20523. "label": "上街区",
  20524. "value": "410106"
  20525. }, {
  20526. "label": "惠济区",
  20527. "value": "410108"
  20528. }, {
  20529. "label": "中牟县",
  20530. "value": "410122"
  20531. }, {
  20532. "label": "郑州经济技术开发区",
  20533. "value": "410171"
  20534. }, {
  20535. "label": "郑州高新技术产业开发区",
  20536. "value": "410172"
  20537. }, {
  20538. "label": "郑州航空港经济综合实验区",
  20539. "value": "410173"
  20540. }, {
  20541. "label": "巩义市",
  20542. "value": "410181"
  20543. }, {
  20544. "label": "荥阳市",
  20545. "value": "410182"
  20546. }, {
  20547. "label": "新密市",
  20548. "value": "410183"
  20549. }, {
  20550. "label": "新郑市",
  20551. "value": "410184"
  20552. }, {
  20553. "label": "登封市",
  20554. "value": "410185"
  20555. }], [{
  20556. "label": "龙亭区",
  20557. "value": "410202"
  20558. }, {
  20559. "label": "顺河回族区",
  20560. "value": "410203"
  20561. }, {
  20562. "label": "鼓楼区",
  20563. "value": "410204"
  20564. }, {
  20565. "label": "禹王台区",
  20566. "value": "410205"
  20567. }, {
  20568. "label": "祥符区",
  20569. "value": "410212"
  20570. }, {
  20571. "label": "杞县",
  20572. "value": "410221"
  20573. }, {
  20574. "label": "通许县",
  20575. "value": "410222"
  20576. }, {
  20577. "label": "尉氏县",
  20578. "value": "410223"
  20579. }, {
  20580. "label": "兰考县",
  20581. "value": "410225"
  20582. }], [{
  20583. "label": "老城区",
  20584. "value": "410302"
  20585. }, {
  20586. "label": "西工区",
  20587. "value": "410303"
  20588. }, {
  20589. "label": "瀍河回族区",
  20590. "value": "410304"
  20591. }, {
  20592. "label": "涧西区",
  20593. "value": "410305"
  20594. }, {
  20595. "label": "吉利区",
  20596. "value": "410306"
  20597. }, {
  20598. "label": "洛龙区",
  20599. "value": "410311"
  20600. }, {
  20601. "label": "孟津县",
  20602. "value": "410322"
  20603. }, {
  20604. "label": "新安县",
  20605. "value": "410323"
  20606. }, {
  20607. "label": "栾川县",
  20608. "value": "410324"
  20609. }, {
  20610. "label": "嵩县",
  20611. "value": "410325"
  20612. }, {
  20613. "label": "汝阳县",
  20614. "value": "410326"
  20615. }, {
  20616. "label": "宜阳县",
  20617. "value": "410327"
  20618. }, {
  20619. "label": "洛宁县",
  20620. "value": "410328"
  20621. }, {
  20622. "label": "伊川县",
  20623. "value": "410329"
  20624. }, {
  20625. "label": "洛阳高新技术产业开发区",
  20626. "value": "410371"
  20627. }, {
  20628. "label": "偃师市",
  20629. "value": "410381"
  20630. }], [{
  20631. "label": "新华区",
  20632. "value": "410402"
  20633. }, {
  20634. "label": "卫东区",
  20635. "value": "410403"
  20636. }, {
  20637. "label": "石龙区",
  20638. "value": "410404"
  20639. }, {
  20640. "label": "湛河区",
  20641. "value": "410411"
  20642. }, {
  20643. "label": "宝丰县",
  20644. "value": "410421"
  20645. }, {
  20646. "label": "叶县",
  20647. "value": "410422"
  20648. }, {
  20649. "label": "鲁山县",
  20650. "value": "410423"
  20651. }, {
  20652. "label": "郏县",
  20653. "value": "410425"
  20654. }, {
  20655. "label": "平顶山高新技术产业开发区",
  20656. "value": "410471"
  20657. }, {
  20658. "label": "平顶山市新城区",
  20659. "value": "410472"
  20660. }, {
  20661. "label": "舞钢市",
  20662. "value": "410481"
  20663. }, {
  20664. "label": "汝州市",
  20665. "value": "410482"
  20666. }], [{
  20667. "label": "文峰区",
  20668. "value": "410502"
  20669. }, {
  20670. "label": "北关区",
  20671. "value": "410503"
  20672. }, {
  20673. "label": "殷都区",
  20674. "value": "410505"
  20675. }, {
  20676. "label": "龙安区",
  20677. "value": "410506"
  20678. }, {
  20679. "label": "安阳县",
  20680. "value": "410522"
  20681. }, {
  20682. "label": "汤阴县",
  20683. "value": "410523"
  20684. }, {
  20685. "label": "滑县",
  20686. "value": "410526"
  20687. }, {
  20688. "label": "内黄县",
  20689. "value": "410527"
  20690. }, {
  20691. "label": "安阳高新技术产业开发区",
  20692. "value": "410571"
  20693. }, {
  20694. "label": "林州市",
  20695. "value": "410581"
  20696. }], [{
  20697. "label": "鹤山区",
  20698. "value": "410602"
  20699. }, {
  20700. "label": "山城区",
  20701. "value": "410603"
  20702. }, {
  20703. "label": "淇滨区",
  20704. "value": "410611"
  20705. }, {
  20706. "label": "浚县",
  20707. "value": "410621"
  20708. }, {
  20709. "label": "淇县",
  20710. "value": "410622"
  20711. }, {
  20712. "label": "鹤壁经济技术开发区",
  20713. "value": "410671"
  20714. }], [{
  20715. "label": "红旗区",
  20716. "value": "410702"
  20717. }, {
  20718. "label": "卫滨区",
  20719. "value": "410703"
  20720. }, {
  20721. "label": "凤泉区",
  20722. "value": "410704"
  20723. }, {
  20724. "label": "牧野区",
  20725. "value": "410711"
  20726. }, {
  20727. "label": "新乡县",
  20728. "value": "410721"
  20729. }, {
  20730. "label": "获嘉县",
  20731. "value": "410724"
  20732. }, {
  20733. "label": "原阳县",
  20734. "value": "410725"
  20735. }, {
  20736. "label": "延津县",
  20737. "value": "410726"
  20738. }, {
  20739. "label": "封丘县",
  20740. "value": "410727"
  20741. }, {
  20742. "label": "长垣县",
  20743. "value": "410728"
  20744. }, {
  20745. "label": "新乡高新技术产业开发区",
  20746. "value": "410771"
  20747. }, {
  20748. "label": "新乡经济技术开发区",
  20749. "value": "410772"
  20750. }, {
  20751. "label": "新乡市平原城乡一体化示范区",
  20752. "value": "410773"
  20753. }, {
  20754. "label": "卫辉市",
  20755. "value": "410781"
  20756. }, {
  20757. "label": "辉县市",
  20758. "value": "410782"
  20759. }], [{
  20760. "label": "解放区",
  20761. "value": "410802"
  20762. }, {
  20763. "label": "中站区",
  20764. "value": "410803"
  20765. }, {
  20766. "label": "马村区",
  20767. "value": "410804"
  20768. }, {
  20769. "label": "山阳区",
  20770. "value": "410811"
  20771. }, {
  20772. "label": "修武县",
  20773. "value": "410821"
  20774. }, {
  20775. "label": "博爱县",
  20776. "value": "410822"
  20777. }, {
  20778. "label": "武陟县",
  20779. "value": "410823"
  20780. }, {
  20781. "label": "温县",
  20782. "value": "410825"
  20783. }, {
  20784. "label": "焦作城乡一体化示范区",
  20785. "value": "410871"
  20786. }, {
  20787. "label": "沁阳市",
  20788. "value": "410882"
  20789. }, {
  20790. "label": "孟州市",
  20791. "value": "410883"
  20792. }], [{
  20793. "label": "华龙区",
  20794. "value": "410902"
  20795. }, {
  20796. "label": "清丰县",
  20797. "value": "410922"
  20798. }, {
  20799. "label": "南乐县",
  20800. "value": "410923"
  20801. }, {
  20802. "label": "范县",
  20803. "value": "410926"
  20804. }, {
  20805. "label": "台前县",
  20806. "value": "410927"
  20807. }, {
  20808. "label": "濮阳县",
  20809. "value": "410928"
  20810. }, {
  20811. "label": "河南濮阳工业园区",
  20812. "value": "410971"
  20813. }, {
  20814. "label": "濮阳经济技术开发区",
  20815. "value": "410972"
  20816. }], [{
  20817. "label": "魏都区",
  20818. "value": "411002"
  20819. }, {
  20820. "label": "建安区",
  20821. "value": "411003"
  20822. }, {
  20823. "label": "鄢陵县",
  20824. "value": "411024"
  20825. }, {
  20826. "label": "襄城县",
  20827. "value": "411025"
  20828. }, {
  20829. "label": "许昌经济技术开发区",
  20830. "value": "411071"
  20831. }, {
  20832. "label": "禹州市",
  20833. "value": "411081"
  20834. }, {
  20835. "label": "长葛市",
  20836. "value": "411082"
  20837. }], [{
  20838. "label": "源汇区",
  20839. "value": "411102"
  20840. }, {
  20841. "label": "郾城区",
  20842. "value": "411103"
  20843. }, {
  20844. "label": "召陵区",
  20845. "value": "411104"
  20846. }, {
  20847. "label": "舞阳县",
  20848. "value": "411121"
  20849. }, {
  20850. "label": "临颍县",
  20851. "value": "411122"
  20852. }, {
  20853. "label": "漯河经济技术开发区",
  20854. "value": "411171"
  20855. }], [{
  20856. "label": "湖滨区",
  20857. "value": "411202"
  20858. }, {
  20859. "label": "陕州区",
  20860. "value": "411203"
  20861. }, {
  20862. "label": "渑池县",
  20863. "value": "411221"
  20864. }, {
  20865. "label": "卢氏县",
  20866. "value": "411224"
  20867. }, {
  20868. "label": "河南三门峡经济开发区",
  20869. "value": "411271"
  20870. }, {
  20871. "label": "义马市",
  20872. "value": "411281"
  20873. }, {
  20874. "label": "灵宝市",
  20875. "value": "411282"
  20876. }], [{
  20877. "label": "宛城区",
  20878. "value": "411302"
  20879. }, {
  20880. "label": "卧龙区",
  20881. "value": "411303"
  20882. }, {
  20883. "label": "南召县",
  20884. "value": "411321"
  20885. }, {
  20886. "label": "方城县",
  20887. "value": "411322"
  20888. }, {
  20889. "label": "西峡县",
  20890. "value": "411323"
  20891. }, {
  20892. "label": "镇平县",
  20893. "value": "411324"
  20894. }, {
  20895. "label": "内乡县",
  20896. "value": "411325"
  20897. }, {
  20898. "label": "淅川县",
  20899. "value": "411326"
  20900. }, {
  20901. "label": "社旗县",
  20902. "value": "411327"
  20903. }, {
  20904. "label": "唐河县",
  20905. "value": "411328"
  20906. }, {
  20907. "label": "新野县",
  20908. "value": "411329"
  20909. }, {
  20910. "label": "桐柏县",
  20911. "value": "411330"
  20912. }, {
  20913. "label": "南阳高新技术产业开发区",
  20914. "value": "411371"
  20915. }, {
  20916. "label": "南阳市城乡一体化示范区",
  20917. "value": "411372"
  20918. }, {
  20919. "label": "邓州市",
  20920. "value": "411381"
  20921. }], [{
  20922. "label": "梁园区",
  20923. "value": "411402"
  20924. }, {
  20925. "label": "睢阳区",
  20926. "value": "411403"
  20927. }, {
  20928. "label": "民权县",
  20929. "value": "411421"
  20930. }, {
  20931. "label": "睢县",
  20932. "value": "411422"
  20933. }, {
  20934. "label": "宁陵县",
  20935. "value": "411423"
  20936. }, {
  20937. "label": "柘城县",
  20938. "value": "411424"
  20939. }, {
  20940. "label": "虞城县",
  20941. "value": "411425"
  20942. }, {
  20943. "label": "夏邑县",
  20944. "value": "411426"
  20945. }, {
  20946. "label": "豫东综合物流产业聚集区",
  20947. "value": "411471"
  20948. }, {
  20949. "label": "河南商丘经济开发区",
  20950. "value": "411472"
  20951. }, {
  20952. "label": "永城市",
  20953. "value": "411481"
  20954. }], [{
  20955. "label": "浉河区",
  20956. "value": "411502"
  20957. }, {
  20958. "label": "平桥区",
  20959. "value": "411503"
  20960. }, {
  20961. "label": "罗山县",
  20962. "value": "411521"
  20963. }, {
  20964. "label": "光山县",
  20965. "value": "411522"
  20966. }, {
  20967. "label": "新县",
  20968. "value": "411523"
  20969. }, {
  20970. "label": "商城县",
  20971. "value": "411524"
  20972. }, {
  20973. "label": "固始县",
  20974. "value": "411525"
  20975. }, {
  20976. "label": "潢川县",
  20977. "value": "411526"
  20978. }, {
  20979. "label": "淮滨县",
  20980. "value": "411527"
  20981. }, {
  20982. "label": "息县",
  20983. "value": "411528"
  20984. }, {
  20985. "label": "信阳高新技术产业开发区",
  20986. "value": "411571"
  20987. }], [{
  20988. "label": "川汇区",
  20989. "value": "411602"
  20990. }, {
  20991. "label": "扶沟县",
  20992. "value": "411621"
  20993. }, {
  20994. "label": "西华县",
  20995. "value": "411622"
  20996. }, {
  20997. "label": "商水县",
  20998. "value": "411623"
  20999. }, {
  21000. "label": "沈丘县",
  21001. "value": "411624"
  21002. }, {
  21003. "label": "郸城县",
  21004. "value": "411625"
  21005. }, {
  21006. "label": "淮阳县",
  21007. "value": "411626"
  21008. }, {
  21009. "label": "太康县",
  21010. "value": "411627"
  21011. }, {
  21012. "label": "鹿邑县",
  21013. "value": "411628"
  21014. }, {
  21015. "label": "河南周口经济开发区",
  21016. "value": "411671"
  21017. }, {
  21018. "label": "项城市",
  21019. "value": "411681"
  21020. }], [{
  21021. "label": "驿城区",
  21022. "value": "411702"
  21023. }, {
  21024. "label": "西平县",
  21025. "value": "411721"
  21026. }, {
  21027. "label": "上蔡县",
  21028. "value": "411722"
  21029. }, {
  21030. "label": "平舆县",
  21031. "value": "411723"
  21032. }, {
  21033. "label": "正阳县",
  21034. "value": "411724"
  21035. }, {
  21036. "label": "确山县",
  21037. "value": "411725"
  21038. }, {
  21039. "label": "泌阳县",
  21040. "value": "411726"
  21041. }, {
  21042. "label": "汝南县",
  21043. "value": "411727"
  21044. }, {
  21045. "label": "遂平县",
  21046. "value": "411728"
  21047. }, {
  21048. "label": "新蔡县",
  21049. "value": "411729"
  21050. }, {
  21051. "label": "河南驻马店经济开发区",
  21052. "value": "411771"
  21053. }], [{
  21054. "label": "济源市",
  21055. "value": "419001"
  21056. }]], [[{
  21057. "label": "江岸区",
  21058. "value": "420102"
  21059. }, {
  21060. "label": "江汉区",
  21061. "value": "420103"
  21062. }, {
  21063. "label": "硚口区",
  21064. "value": "420104"
  21065. }, {
  21066. "label": "汉阳区",
  21067. "value": "420105"
  21068. }, {
  21069. "label": "武昌区",
  21070. "value": "420106"
  21071. }, {
  21072. "label": "青山区",
  21073. "value": "420107"
  21074. }, {
  21075. "label": "洪山区",
  21076. "value": "420111"
  21077. }, {
  21078. "label": "东西湖区",
  21079. "value": "420112"
  21080. }, {
  21081. "label": "汉南区",
  21082. "value": "420113"
  21083. }, {
  21084. "label": "蔡甸区",
  21085. "value": "420114"
  21086. }, {
  21087. "label": "江夏区",
  21088. "value": "420115"
  21089. }, {
  21090. "label": "黄陂区",
  21091. "value": "420116"
  21092. }, {
  21093. "label": "新洲区",
  21094. "value": "420117"
  21095. }], [{
  21096. "label": "黄石港区",
  21097. "value": "420202"
  21098. }, {
  21099. "label": "西塞山区",
  21100. "value": "420203"
  21101. }, {
  21102. "label": "下陆区",
  21103. "value": "420204"
  21104. }, {
  21105. "label": "铁山区",
  21106. "value": "420205"
  21107. }, {
  21108. "label": "阳新县",
  21109. "value": "420222"
  21110. }, {
  21111. "label": "大冶市",
  21112. "value": "420281"
  21113. }], [{
  21114. "label": "茅箭区",
  21115. "value": "420302"
  21116. }, {
  21117. "label": "张湾区",
  21118. "value": "420303"
  21119. }, {
  21120. "label": "郧阳区",
  21121. "value": "420304"
  21122. }, {
  21123. "label": "郧西县",
  21124. "value": "420322"
  21125. }, {
  21126. "label": "竹山县",
  21127. "value": "420323"
  21128. }, {
  21129. "label": "竹溪县",
  21130. "value": "420324"
  21131. }, {
  21132. "label": "房县",
  21133. "value": "420325"
  21134. }, {
  21135. "label": "丹江口市",
  21136. "value": "420381"
  21137. }], [{
  21138. "label": "西陵区",
  21139. "value": "420502"
  21140. }, {
  21141. "label": "伍家岗区",
  21142. "value": "420503"
  21143. }, {
  21144. "label": "点军区",
  21145. "value": "420504"
  21146. }, {
  21147. "label": "猇亭区",
  21148. "value": "420505"
  21149. }, {
  21150. "label": "夷陵区",
  21151. "value": "420506"
  21152. }, {
  21153. "label": "远安县",
  21154. "value": "420525"
  21155. }, {
  21156. "label": "兴山县",
  21157. "value": "420526"
  21158. }, {
  21159. "label": "秭归县",
  21160. "value": "420527"
  21161. }, {
  21162. "label": "长阳土家族自治县",
  21163. "value": "420528"
  21164. }, {
  21165. "label": "五峰土家族自治县",
  21166. "value": "420529"
  21167. }, {
  21168. "label": "宜都市",
  21169. "value": "420581"
  21170. }, {
  21171. "label": "当阳市",
  21172. "value": "420582"
  21173. }, {
  21174. "label": "枝江市",
  21175. "value": "420583"
  21176. }], [{
  21177. "label": "襄城区",
  21178. "value": "420602"
  21179. }, {
  21180. "label": "樊城区",
  21181. "value": "420606"
  21182. }, {
  21183. "label": "襄州区",
  21184. "value": "420607"
  21185. }, {
  21186. "label": "南漳县",
  21187. "value": "420624"
  21188. }, {
  21189. "label": "谷城县",
  21190. "value": "420625"
  21191. }, {
  21192. "label": "保康县",
  21193. "value": "420626"
  21194. }, {
  21195. "label": "老河口市",
  21196. "value": "420682"
  21197. }, {
  21198. "label": "枣阳市",
  21199. "value": "420683"
  21200. }, {
  21201. "label": "宜城市",
  21202. "value": "420684"
  21203. }], [{
  21204. "label": "梁子湖区",
  21205. "value": "420702"
  21206. }, {
  21207. "label": "华容区",
  21208. "value": "420703"
  21209. }, {
  21210. "label": "鄂城区",
  21211. "value": "420704"
  21212. }], [{
  21213. "label": "东宝区",
  21214. "value": "420802"
  21215. }, {
  21216. "label": "掇刀区",
  21217. "value": "420804"
  21218. }, {
  21219. "label": "京山县",
  21220. "value": "420821"
  21221. }, {
  21222. "label": "沙洋县",
  21223. "value": "420822"
  21224. }, {
  21225. "label": "钟祥市",
  21226. "value": "420881"
  21227. }], [{
  21228. "label": "孝南区",
  21229. "value": "420902"
  21230. }, {
  21231. "label": "孝昌县",
  21232. "value": "420921"
  21233. }, {
  21234. "label": "大悟县",
  21235. "value": "420922"
  21236. }, {
  21237. "label": "云梦县",
  21238. "value": "420923"
  21239. }, {
  21240. "label": "应城市",
  21241. "value": "420981"
  21242. }, {
  21243. "label": "安陆市",
  21244. "value": "420982"
  21245. }, {
  21246. "label": "汉川市",
  21247. "value": "420984"
  21248. }], [{
  21249. "label": "沙市区",
  21250. "value": "421002"
  21251. }, {
  21252. "label": "荆州区",
  21253. "value": "421003"
  21254. }, {
  21255. "label": "公安县",
  21256. "value": "421022"
  21257. }, {
  21258. "label": "监利县",
  21259. "value": "421023"
  21260. }, {
  21261. "label": "江陵县",
  21262. "value": "421024"
  21263. }, {
  21264. "label": "荆州经济技术开发区",
  21265. "value": "421071"
  21266. }, {
  21267. "label": "石首市",
  21268. "value": "421081"
  21269. }, {
  21270. "label": "洪湖市",
  21271. "value": "421083"
  21272. }, {
  21273. "label": "松滋市",
  21274. "value": "421087"
  21275. }], [{
  21276. "label": "黄州区",
  21277. "value": "421102"
  21278. }, {
  21279. "label": "团风县",
  21280. "value": "421121"
  21281. }, {
  21282. "label": "红安县",
  21283. "value": "421122"
  21284. }, {
  21285. "label": "罗田县",
  21286. "value": "421123"
  21287. }, {
  21288. "label": "英山县",
  21289. "value": "421124"
  21290. }, {
  21291. "label": "浠水县",
  21292. "value": "421125"
  21293. }, {
  21294. "label": "蕲春县",
  21295. "value": "421126"
  21296. }, {
  21297. "label": "黄梅县",
  21298. "value": "421127"
  21299. }, {
  21300. "label": "龙感湖管理区",
  21301. "value": "421171"
  21302. }, {
  21303. "label": "麻城市",
  21304. "value": "421181"
  21305. }, {
  21306. "label": "武穴市",
  21307. "value": "421182"
  21308. }], [{
  21309. "label": "咸安区",
  21310. "value": "421202"
  21311. }, {
  21312. "label": "嘉鱼县",
  21313. "value": "421221"
  21314. }, {
  21315. "label": "通城县",
  21316. "value": "421222"
  21317. }, {
  21318. "label": "崇阳县",
  21319. "value": "421223"
  21320. }, {
  21321. "label": "通山县",
  21322. "value": "421224"
  21323. }, {
  21324. "label": "赤壁市",
  21325. "value": "421281"
  21326. }], [{
  21327. "label": "曾都区",
  21328. "value": "421303"
  21329. }, {
  21330. "label": "随县",
  21331. "value": "421321"
  21332. }, {
  21333. "label": "广水市",
  21334. "value": "421381"
  21335. }], [{
  21336. "label": "恩施市",
  21337. "value": "422801"
  21338. }, {
  21339. "label": "利川市",
  21340. "value": "422802"
  21341. }, {
  21342. "label": "建始县",
  21343. "value": "422822"
  21344. }, {
  21345. "label": "巴东县",
  21346. "value": "422823"
  21347. }, {
  21348. "label": "宣恩县",
  21349. "value": "422825"
  21350. }, {
  21351. "label": "咸丰县",
  21352. "value": "422826"
  21353. }, {
  21354. "label": "来凤县",
  21355. "value": "422827"
  21356. }, {
  21357. "label": "鹤峰县",
  21358. "value": "422828"
  21359. }], [{
  21360. "label": "仙桃市",
  21361. "value": "429004"
  21362. }, {
  21363. "label": "潜江市",
  21364. "value": "429005"
  21365. }, {
  21366. "label": "天门市",
  21367. "value": "429006"
  21368. }, {
  21369. "label": "神农架林区",
  21370. "value": "429021"
  21371. }]], [[{
  21372. "label": "芙蓉区",
  21373. "value": "430102"
  21374. }, {
  21375. "label": "天心区",
  21376. "value": "430103"
  21377. }, {
  21378. "label": "岳麓区",
  21379. "value": "430104"
  21380. }, {
  21381. "label": "开福区",
  21382. "value": "430105"
  21383. }, {
  21384. "label": "雨花区",
  21385. "value": "430111"
  21386. }, {
  21387. "label": "望城区",
  21388. "value": "430112"
  21389. }, {
  21390. "label": "长沙县",
  21391. "value": "430121"
  21392. }, {
  21393. "label": "浏阳市",
  21394. "value": "430181"
  21395. }, {
  21396. "label": "宁乡市",
  21397. "value": "430182"
  21398. }], [{
  21399. "label": "荷塘区",
  21400. "value": "430202"
  21401. }, {
  21402. "label": "芦淞区",
  21403. "value": "430203"
  21404. }, {
  21405. "label": "石峰区",
  21406. "value": "430204"
  21407. }, {
  21408. "label": "天元区",
  21409. "value": "430211"
  21410. }, {
  21411. "label": "株洲县",
  21412. "value": "430221"
  21413. }, {
  21414. "label": "攸县",
  21415. "value": "430223"
  21416. }, {
  21417. "label": "茶陵县",
  21418. "value": "430224"
  21419. }, {
  21420. "label": "炎陵县",
  21421. "value": "430225"
  21422. }, {
  21423. "label": "云龙示范区",
  21424. "value": "430271"
  21425. }, {
  21426. "label": "醴陵市",
  21427. "value": "430281"
  21428. }], [{
  21429. "label": "雨湖区",
  21430. "value": "430302"
  21431. }, {
  21432. "label": "岳塘区",
  21433. "value": "430304"
  21434. }, {
  21435. "label": "湘潭县",
  21436. "value": "430321"
  21437. }, {
  21438. "label": "湖南湘潭高新技术产业园区",
  21439. "value": "430371"
  21440. }, {
  21441. "label": "湘潭昭山示范区",
  21442. "value": "430372"
  21443. }, {
  21444. "label": "湘潭九华示范区",
  21445. "value": "430373"
  21446. }, {
  21447. "label": "湘乡市",
  21448. "value": "430381"
  21449. }, {
  21450. "label": "韶山市",
  21451. "value": "430382"
  21452. }], [{
  21453. "label": "珠晖区",
  21454. "value": "430405"
  21455. }, {
  21456. "label": "雁峰区",
  21457. "value": "430406"
  21458. }, {
  21459. "label": "石鼓区",
  21460. "value": "430407"
  21461. }, {
  21462. "label": "蒸湘区",
  21463. "value": "430408"
  21464. }, {
  21465. "label": "南岳区",
  21466. "value": "430412"
  21467. }, {
  21468. "label": "衡阳县",
  21469. "value": "430421"
  21470. }, {
  21471. "label": "衡南县",
  21472. "value": "430422"
  21473. }, {
  21474. "label": "衡山县",
  21475. "value": "430423"
  21476. }, {
  21477. "label": "衡东县",
  21478. "value": "430424"
  21479. }, {
  21480. "label": "祁东县",
  21481. "value": "430426"
  21482. }, {
  21483. "label": "衡阳综合保税区",
  21484. "value": "430471"
  21485. }, {
  21486. "label": "湖南衡阳高新技术产业园区",
  21487. "value": "430472"
  21488. }, {
  21489. "label": "湖南衡阳松木经济开发区",
  21490. "value": "430473"
  21491. }, {
  21492. "label": "耒阳市",
  21493. "value": "430481"
  21494. }, {
  21495. "label": "常宁市",
  21496. "value": "430482"
  21497. }], [{
  21498. "label": "双清区",
  21499. "value": "430502"
  21500. }, {
  21501. "label": "大祥区",
  21502. "value": "430503"
  21503. }, {
  21504. "label": "北塔区",
  21505. "value": "430511"
  21506. }, {
  21507. "label": "邵东县",
  21508. "value": "430521"
  21509. }, {
  21510. "label": "新邵县",
  21511. "value": "430522"
  21512. }, {
  21513. "label": "邵阳县",
  21514. "value": "430523"
  21515. }, {
  21516. "label": "隆回县",
  21517. "value": "430524"
  21518. }, {
  21519. "label": "洞口县",
  21520. "value": "430525"
  21521. }, {
  21522. "label": "绥宁县",
  21523. "value": "430527"
  21524. }, {
  21525. "label": "新宁县",
  21526. "value": "430528"
  21527. }, {
  21528. "label": "城步苗族自治县",
  21529. "value": "430529"
  21530. }, {
  21531. "label": "武冈市",
  21532. "value": "430581"
  21533. }], [{
  21534. "label": "岳阳楼区",
  21535. "value": "430602"
  21536. }, {
  21537. "label": "云溪区",
  21538. "value": "430603"
  21539. }, {
  21540. "label": "君山区",
  21541. "value": "430611"
  21542. }, {
  21543. "label": "岳阳县",
  21544. "value": "430621"
  21545. }, {
  21546. "label": "华容县",
  21547. "value": "430623"
  21548. }, {
  21549. "label": "湘阴县",
  21550. "value": "430624"
  21551. }, {
  21552. "label": "平江县",
  21553. "value": "430626"
  21554. }, {
  21555. "label": "岳阳市屈原管理区",
  21556. "value": "430671"
  21557. }, {
  21558. "label": "汨罗市",
  21559. "value": "430681"
  21560. }, {
  21561. "label": "临湘市",
  21562. "value": "430682"
  21563. }], [{
  21564. "label": "武陵区",
  21565. "value": "430702"
  21566. }, {
  21567. "label": "鼎城区",
  21568. "value": "430703"
  21569. }, {
  21570. "label": "安乡县",
  21571. "value": "430721"
  21572. }, {
  21573. "label": "汉寿县",
  21574. "value": "430722"
  21575. }, {
  21576. "label": "澧县",
  21577. "value": "430723"
  21578. }, {
  21579. "label": "临澧县",
  21580. "value": "430724"
  21581. }, {
  21582. "label": "桃源县",
  21583. "value": "430725"
  21584. }, {
  21585. "label": "石门县",
  21586. "value": "430726"
  21587. }, {
  21588. "label": "常德市西洞庭管理区",
  21589. "value": "430771"
  21590. }, {
  21591. "label": "津市市",
  21592. "value": "430781"
  21593. }], [{
  21594. "label": "永定区",
  21595. "value": "430802"
  21596. }, {
  21597. "label": "武陵源区",
  21598. "value": "430811"
  21599. }, {
  21600. "label": "慈利县",
  21601. "value": "430821"
  21602. }, {
  21603. "label": "桑植县",
  21604. "value": "430822"
  21605. }], [{
  21606. "label": "资阳区",
  21607. "value": "430902"
  21608. }, {
  21609. "label": "赫山区",
  21610. "value": "430903"
  21611. }, {
  21612. "label": "南县",
  21613. "value": "430921"
  21614. }, {
  21615. "label": "桃江县",
  21616. "value": "430922"
  21617. }, {
  21618. "label": "安化县",
  21619. "value": "430923"
  21620. }, {
  21621. "label": "益阳市大通湖管理区",
  21622. "value": "430971"
  21623. }, {
  21624. "label": "湖南益阳高新技术产业园区",
  21625. "value": "430972"
  21626. }, {
  21627. "label": "沅江市",
  21628. "value": "430981"
  21629. }], [{
  21630. "label": "北湖区",
  21631. "value": "431002"
  21632. }, {
  21633. "label": "苏仙区",
  21634. "value": "431003"
  21635. }, {
  21636. "label": "桂阳县",
  21637. "value": "431021"
  21638. }, {
  21639. "label": "宜章县",
  21640. "value": "431022"
  21641. }, {
  21642. "label": "永兴县",
  21643. "value": "431023"
  21644. }, {
  21645. "label": "嘉禾县",
  21646. "value": "431024"
  21647. }, {
  21648. "label": "临武县",
  21649. "value": "431025"
  21650. }, {
  21651. "label": "汝城县",
  21652. "value": "431026"
  21653. }, {
  21654. "label": "桂东县",
  21655. "value": "431027"
  21656. }, {
  21657. "label": "安仁县",
  21658. "value": "431028"
  21659. }, {
  21660. "label": "资兴市",
  21661. "value": "431081"
  21662. }], [{
  21663. "label": "零陵区",
  21664. "value": "431102"
  21665. }, {
  21666. "label": "冷水滩区",
  21667. "value": "431103"
  21668. }, {
  21669. "label": "祁阳县",
  21670. "value": "431121"
  21671. }, {
  21672. "label": "东安县",
  21673. "value": "431122"
  21674. }, {
  21675. "label": "双牌县",
  21676. "value": "431123"
  21677. }, {
  21678. "label": "道县",
  21679. "value": "431124"
  21680. }, {
  21681. "label": "江永县",
  21682. "value": "431125"
  21683. }, {
  21684. "label": "宁远县",
  21685. "value": "431126"
  21686. }, {
  21687. "label": "蓝山县",
  21688. "value": "431127"
  21689. }, {
  21690. "label": "新田县",
  21691. "value": "431128"
  21692. }, {
  21693. "label": "江华瑶族自治县",
  21694. "value": "431129"
  21695. }, {
  21696. "label": "永州经济技术开发区",
  21697. "value": "431171"
  21698. }, {
  21699. "label": "永州市金洞管理区",
  21700. "value": "431172"
  21701. }, {
  21702. "label": "永州市回龙圩管理区",
  21703. "value": "431173"
  21704. }], [{
  21705. "label": "鹤城区",
  21706. "value": "431202"
  21707. }, {
  21708. "label": "中方县",
  21709. "value": "431221"
  21710. }, {
  21711. "label": "沅陵县",
  21712. "value": "431222"
  21713. }, {
  21714. "label": "辰溪县",
  21715. "value": "431223"
  21716. }, {
  21717. "label": "溆浦县",
  21718. "value": "431224"
  21719. }, {
  21720. "label": "会同县",
  21721. "value": "431225"
  21722. }, {
  21723. "label": "麻阳苗族自治县",
  21724. "value": "431226"
  21725. }, {
  21726. "label": "新晃侗族自治县",
  21727. "value": "431227"
  21728. }, {
  21729. "label": "芷江侗族自治县",
  21730. "value": "431228"
  21731. }, {
  21732. "label": "靖州苗族侗族自治县",
  21733. "value": "431229"
  21734. }, {
  21735. "label": "通道侗族自治县",
  21736. "value": "431230"
  21737. }, {
  21738. "label": "怀化市洪江管理区",
  21739. "value": "431271"
  21740. }, {
  21741. "label": "洪江市",
  21742. "value": "431281"
  21743. }], [{
  21744. "label": "娄星区",
  21745. "value": "431302"
  21746. }, {
  21747. "label": "双峰县",
  21748. "value": "431321"
  21749. }, {
  21750. "label": "新化县",
  21751. "value": "431322"
  21752. }, {
  21753. "label": "冷水江市",
  21754. "value": "431381"
  21755. }, {
  21756. "label": "涟源市",
  21757. "value": "431382"
  21758. }], [{
  21759. "label": "吉首市",
  21760. "value": "433101"
  21761. }, {
  21762. "label": "泸溪县",
  21763. "value": "433122"
  21764. }, {
  21765. "label": "凤凰县",
  21766. "value": "433123"
  21767. }, {
  21768. "label": "花垣县",
  21769. "value": "433124"
  21770. }, {
  21771. "label": "保靖县",
  21772. "value": "433125"
  21773. }, {
  21774. "label": "古丈县",
  21775. "value": "433126"
  21776. }, {
  21777. "label": "永顺县",
  21778. "value": "433127"
  21779. }, {
  21780. "label": "龙山县",
  21781. "value": "433130"
  21782. }, {
  21783. "label": "湖南吉首经济开发区",
  21784. "value": "433172"
  21785. }, {
  21786. "label": "湖南永顺经济开发区",
  21787. "value": "433173"
  21788. }]], [[{
  21789. "label": "荔湾区",
  21790. "value": "440103"
  21791. }, {
  21792. "label": "越秀区",
  21793. "value": "440104"
  21794. }, {
  21795. "label": "海珠区",
  21796. "value": "440105"
  21797. }, {
  21798. "label": "天河区",
  21799. "value": "440106"
  21800. }, {
  21801. "label": "白云区",
  21802. "value": "440111"
  21803. }, {
  21804. "label": "黄埔区",
  21805. "value": "440112"
  21806. }, {
  21807. "label": "番禺区",
  21808. "value": "440113"
  21809. }, {
  21810. "label": "花都区",
  21811. "value": "440114"
  21812. }, {
  21813. "label": "南沙区",
  21814. "value": "440115"
  21815. }, {
  21816. "label": "从化区",
  21817. "value": "440117"
  21818. }, {
  21819. "label": "增城区",
  21820. "value": "440118"
  21821. }], [{
  21822. "label": "武江区",
  21823. "value": "440203"
  21824. }, {
  21825. "label": "浈江区",
  21826. "value": "440204"
  21827. }, {
  21828. "label": "曲江区",
  21829. "value": "440205"
  21830. }, {
  21831. "label": "始兴县",
  21832. "value": "440222"
  21833. }, {
  21834. "label": "仁化县",
  21835. "value": "440224"
  21836. }, {
  21837. "label": "翁源县",
  21838. "value": "440229"
  21839. }, {
  21840. "label": "乳源瑶族自治县",
  21841. "value": "440232"
  21842. }, {
  21843. "label": "新丰县",
  21844. "value": "440233"
  21845. }, {
  21846. "label": "乐昌市",
  21847. "value": "440281"
  21848. }, {
  21849. "label": "南雄市",
  21850. "value": "440282"
  21851. }], [{
  21852. "label": "罗湖区",
  21853. "value": "440303"
  21854. }, {
  21855. "label": "福田区",
  21856. "value": "440304"
  21857. }, {
  21858. "label": "南山区",
  21859. "value": "440305"
  21860. }, {
  21861. "label": "宝安区",
  21862. "value": "440306"
  21863. }, {
  21864. "label": "龙岗区",
  21865. "value": "440307"
  21866. }, {
  21867. "label": "盐田区",
  21868. "value": "440308"
  21869. }, {
  21870. "label": "龙华区",
  21871. "value": "440309"
  21872. }, {
  21873. "label": "坪山区",
  21874. "value": "440310"
  21875. }], [{
  21876. "label": "香洲区",
  21877. "value": "440402"
  21878. }, {
  21879. "label": "斗门区",
  21880. "value": "440403"
  21881. }, {
  21882. "label": "金湾区",
  21883. "value": "440404"
  21884. }], [{
  21885. "label": "龙湖区",
  21886. "value": "440507"
  21887. }, {
  21888. "label": "金平区",
  21889. "value": "440511"
  21890. }, {
  21891. "label": "濠江区",
  21892. "value": "440512"
  21893. }, {
  21894. "label": "潮阳区",
  21895. "value": "440513"
  21896. }, {
  21897. "label": "潮南区",
  21898. "value": "440514"
  21899. }, {
  21900. "label": "澄海区",
  21901. "value": "440515"
  21902. }, {
  21903. "label": "南澳县",
  21904. "value": "440523"
  21905. }], [{
  21906. "label": "禅城区",
  21907. "value": "440604"
  21908. }, {
  21909. "label": "南海区",
  21910. "value": "440605"
  21911. }, {
  21912. "label": "顺德区",
  21913. "value": "440606"
  21914. }, {
  21915. "label": "三水区",
  21916. "value": "440607"
  21917. }, {
  21918. "label": "高明区",
  21919. "value": "440608"
  21920. }], [{
  21921. "label": "蓬江区",
  21922. "value": "440703"
  21923. }, {
  21924. "label": "江海区",
  21925. "value": "440704"
  21926. }, {
  21927. "label": "新会区",
  21928. "value": "440705"
  21929. }, {
  21930. "label": "台山市",
  21931. "value": "440781"
  21932. }, {
  21933. "label": "开平市",
  21934. "value": "440783"
  21935. }, {
  21936. "label": "鹤山市",
  21937. "value": "440784"
  21938. }, {
  21939. "label": "恩平市",
  21940. "value": "440785"
  21941. }], [{
  21942. "label": "赤坎区",
  21943. "value": "440802"
  21944. }, {
  21945. "label": "霞山区",
  21946. "value": "440803"
  21947. }, {
  21948. "label": "坡头区",
  21949. "value": "440804"
  21950. }, {
  21951. "label": "麻章区",
  21952. "value": "440811"
  21953. }, {
  21954. "label": "遂溪县",
  21955. "value": "440823"
  21956. }, {
  21957. "label": "徐闻县",
  21958. "value": "440825"
  21959. }, {
  21960. "label": "廉江市",
  21961. "value": "440881"
  21962. }, {
  21963. "label": "雷州市",
  21964. "value": "440882"
  21965. }, {
  21966. "label": "吴川市",
  21967. "value": "440883"
  21968. }], [{
  21969. "label": "茂南区",
  21970. "value": "440902"
  21971. }, {
  21972. "label": "电白区",
  21973. "value": "440904"
  21974. }, {
  21975. "label": "高州市",
  21976. "value": "440981"
  21977. }, {
  21978. "label": "化州市",
  21979. "value": "440982"
  21980. }, {
  21981. "label": "信宜市",
  21982. "value": "440983"
  21983. }], [{
  21984. "label": "端州区",
  21985. "value": "441202"
  21986. }, {
  21987. "label": "鼎湖区",
  21988. "value": "441203"
  21989. }, {
  21990. "label": "高要区",
  21991. "value": "441204"
  21992. }, {
  21993. "label": "广宁县",
  21994. "value": "441223"
  21995. }, {
  21996. "label": "怀集县",
  21997. "value": "441224"
  21998. }, {
  21999. "label": "封开县",
  22000. "value": "441225"
  22001. }, {
  22002. "label": "德庆县",
  22003. "value": "441226"
  22004. }, {
  22005. "label": "四会市",
  22006. "value": "441284"
  22007. }], [{
  22008. "label": "惠城区",
  22009. "value": "441302"
  22010. }, {
  22011. "label": "惠阳区",
  22012. "value": "441303"
  22013. }, {
  22014. "label": "博罗县",
  22015. "value": "441322"
  22016. }, {
  22017. "label": "惠东县",
  22018. "value": "441323"
  22019. }, {
  22020. "label": "龙门县",
  22021. "value": "441324"
  22022. }], [{
  22023. "label": "梅江区",
  22024. "value": "441402"
  22025. }, {
  22026. "label": "梅县区",
  22027. "value": "441403"
  22028. }, {
  22029. "label": "大埔县",
  22030. "value": "441422"
  22031. }, {
  22032. "label": "丰顺县",
  22033. "value": "441423"
  22034. }, {
  22035. "label": "五华县",
  22036. "value": "441424"
  22037. }, {
  22038. "label": "平远县",
  22039. "value": "441426"
  22040. }, {
  22041. "label": "蕉岭县",
  22042. "value": "441427"
  22043. }, {
  22044. "label": "兴宁市",
  22045. "value": "441481"
  22046. }], [{
  22047. "label": "城区",
  22048. "value": "441502"
  22049. }, {
  22050. "label": "海丰县",
  22051. "value": "441521"
  22052. }, {
  22053. "label": "陆河县",
  22054. "value": "441523"
  22055. }, {
  22056. "label": "陆丰市",
  22057. "value": "441581"
  22058. }], [{
  22059. "label": "源城区",
  22060. "value": "441602"
  22061. }, {
  22062. "label": "紫金县",
  22063. "value": "441621"
  22064. }, {
  22065. "label": "龙川县",
  22066. "value": "441622"
  22067. }, {
  22068. "label": "连平县",
  22069. "value": "441623"
  22070. }, {
  22071. "label": "和平县",
  22072. "value": "441624"
  22073. }, {
  22074. "label": "东源县",
  22075. "value": "441625"
  22076. }], [{
  22077. "label": "江城区",
  22078. "value": "441702"
  22079. }, {
  22080. "label": "阳东区",
  22081. "value": "441704"
  22082. }, {
  22083. "label": "阳西县",
  22084. "value": "441721"
  22085. }, {
  22086. "label": "阳春市",
  22087. "value": "441781"
  22088. }], [{
  22089. "label": "清城区",
  22090. "value": "441802"
  22091. }, {
  22092. "label": "清新区",
  22093. "value": "441803"
  22094. }, {
  22095. "label": "佛冈县",
  22096. "value": "441821"
  22097. }, {
  22098. "label": "阳山县",
  22099. "value": "441823"
  22100. }, {
  22101. "label": "连山壮族瑶族自治县",
  22102. "value": "441825"
  22103. }, {
  22104. "label": "连南瑶族自治县",
  22105. "value": "441826"
  22106. }, {
  22107. "label": "英德市",
  22108. "value": "441881"
  22109. }, {
  22110. "label": "连州市",
  22111. "value": "441882"
  22112. }], [{
  22113. "label": "东莞市",
  22114. "value": "441900"
  22115. }], [{
  22116. "label": "中山市",
  22117. "value": "442000"
  22118. }], [{
  22119. "label": "湘桥区",
  22120. "value": "445102"
  22121. }, {
  22122. "label": "潮安区",
  22123. "value": "445103"
  22124. }, {
  22125. "label": "饶平县",
  22126. "value": "445122"
  22127. }], [{
  22128. "label": "榕城区",
  22129. "value": "445202"
  22130. }, {
  22131. "label": "揭东区",
  22132. "value": "445203"
  22133. }, {
  22134. "label": "揭西县",
  22135. "value": "445222"
  22136. }, {
  22137. "label": "惠来县",
  22138. "value": "445224"
  22139. }, {
  22140. "label": "普宁市",
  22141. "value": "445281"
  22142. }], [{
  22143. "label": "云城区",
  22144. "value": "445302"
  22145. }, {
  22146. "label": "云安区",
  22147. "value": "445303"
  22148. }, {
  22149. "label": "新兴县",
  22150. "value": "445321"
  22151. }, {
  22152. "label": "郁南县",
  22153. "value": "445322"
  22154. }, {
  22155. "label": "罗定市",
  22156. "value": "445381"
  22157. }]], [[{
  22158. "label": "兴宁区",
  22159. "value": "450102"
  22160. }, {
  22161. "label": "青秀区",
  22162. "value": "450103"
  22163. }, {
  22164. "label": "江南区",
  22165. "value": "450105"
  22166. }, {
  22167. "label": "西乡塘区",
  22168. "value": "450107"
  22169. }, {
  22170. "label": "良庆区",
  22171. "value": "450108"
  22172. }, {
  22173. "label": "邕宁区",
  22174. "value": "450109"
  22175. }, {
  22176. "label": "武鸣区",
  22177. "value": "450110"
  22178. }, {
  22179. "label": "隆安县",
  22180. "value": "450123"
  22181. }, {
  22182. "label": "马山县",
  22183. "value": "450124"
  22184. }, {
  22185. "label": "上林县",
  22186. "value": "450125"
  22187. }, {
  22188. "label": "宾阳县",
  22189. "value": "450126"
  22190. }, {
  22191. "label": "横县",
  22192. "value": "450127"
  22193. }], [{
  22194. "label": "城中区",
  22195. "value": "450202"
  22196. }, {
  22197. "label": "鱼峰区",
  22198. "value": "450203"
  22199. }, {
  22200. "label": "柳南区",
  22201. "value": "450204"
  22202. }, {
  22203. "label": "柳北区",
  22204. "value": "450205"
  22205. }, {
  22206. "label": "柳江区",
  22207. "value": "450206"
  22208. }, {
  22209. "label": "柳城县",
  22210. "value": "450222"
  22211. }, {
  22212. "label": "鹿寨县",
  22213. "value": "450223"
  22214. }, {
  22215. "label": "融安县",
  22216. "value": "450224"
  22217. }, {
  22218. "label": "融水苗族自治县",
  22219. "value": "450225"
  22220. }, {
  22221. "label": "三江侗族自治县",
  22222. "value": "450226"
  22223. }], [{
  22224. "label": "秀峰区",
  22225. "value": "450302"
  22226. }, {
  22227. "label": "叠彩区",
  22228. "value": "450303"
  22229. }, {
  22230. "label": "象山区",
  22231. "value": "450304"
  22232. }, {
  22233. "label": "七星区",
  22234. "value": "450305"
  22235. }, {
  22236. "label": "雁山区",
  22237. "value": "450311"
  22238. }, {
  22239. "label": "临桂区",
  22240. "value": "450312"
  22241. }, {
  22242. "label": "阳朔县",
  22243. "value": "450321"
  22244. }, {
  22245. "label": "灵川县",
  22246. "value": "450323"
  22247. }, {
  22248. "label": "全州县",
  22249. "value": "450324"
  22250. }, {
  22251. "label": "兴安县",
  22252. "value": "450325"
  22253. }, {
  22254. "label": "永福县",
  22255. "value": "450326"
  22256. }, {
  22257. "label": "灌阳县",
  22258. "value": "450327"
  22259. }, {
  22260. "label": "龙胜各族自治县",
  22261. "value": "450328"
  22262. }, {
  22263. "label": "资源县",
  22264. "value": "450329"
  22265. }, {
  22266. "label": "平乐县",
  22267. "value": "450330"
  22268. }, {
  22269. "label": "荔浦县",
  22270. "value": "450331"
  22271. }, {
  22272. "label": "恭城瑶族自治县",
  22273. "value": "450332"
  22274. }], [{
  22275. "label": "万秀区",
  22276. "value": "450403"
  22277. }, {
  22278. "label": "长洲区",
  22279. "value": "450405"
  22280. }, {
  22281. "label": "龙圩区",
  22282. "value": "450406"
  22283. }, {
  22284. "label": "苍梧县",
  22285. "value": "450421"
  22286. }, {
  22287. "label": "藤县",
  22288. "value": "450422"
  22289. }, {
  22290. "label": "蒙山县",
  22291. "value": "450423"
  22292. }, {
  22293. "label": "岑溪市",
  22294. "value": "450481"
  22295. }], [{
  22296. "label": "海城区",
  22297. "value": "450502"
  22298. }, {
  22299. "label": "银海区",
  22300. "value": "450503"
  22301. }, {
  22302. "label": "铁山港区",
  22303. "value": "450512"
  22304. }, {
  22305. "label": "合浦县",
  22306. "value": "450521"
  22307. }], [{
  22308. "label": "港口区",
  22309. "value": "450602"
  22310. }, {
  22311. "label": "防城区",
  22312. "value": "450603"
  22313. }, {
  22314. "label": "上思县",
  22315. "value": "450621"
  22316. }, {
  22317. "label": "东兴市",
  22318. "value": "450681"
  22319. }], [{
  22320. "label": "钦南区",
  22321. "value": "450702"
  22322. }, {
  22323. "label": "钦北区",
  22324. "value": "450703"
  22325. }, {
  22326. "label": "灵山县",
  22327. "value": "450721"
  22328. }, {
  22329. "label": "浦北县",
  22330. "value": "450722"
  22331. }], [{
  22332. "label": "港北区",
  22333. "value": "450802"
  22334. }, {
  22335. "label": "港南区",
  22336. "value": "450803"
  22337. }, {
  22338. "label": "覃塘区",
  22339. "value": "450804"
  22340. }, {
  22341. "label": "平南县",
  22342. "value": "450821"
  22343. }, {
  22344. "label": "桂平市",
  22345. "value": "450881"
  22346. }], [{
  22347. "label": "玉州区",
  22348. "value": "450902"
  22349. }, {
  22350. "label": "福绵区",
  22351. "value": "450903"
  22352. }, {
  22353. "label": "容县",
  22354. "value": "450921"
  22355. }, {
  22356. "label": "陆川县",
  22357. "value": "450922"
  22358. }, {
  22359. "label": "博白县",
  22360. "value": "450923"
  22361. }, {
  22362. "label": "兴业县",
  22363. "value": "450924"
  22364. }, {
  22365. "label": "北流市",
  22366. "value": "450981"
  22367. }], [{
  22368. "label": "右江区",
  22369. "value": "451002"
  22370. }, {
  22371. "label": "田阳县",
  22372. "value": "451021"
  22373. }, {
  22374. "label": "田东县",
  22375. "value": "451022"
  22376. }, {
  22377. "label": "平果县",
  22378. "value": "451023"
  22379. }, {
  22380. "label": "德保县",
  22381. "value": "451024"
  22382. }, {
  22383. "label": "那坡县",
  22384. "value": "451026"
  22385. }, {
  22386. "label": "凌云县",
  22387. "value": "451027"
  22388. }, {
  22389. "label": "乐业县",
  22390. "value": "451028"
  22391. }, {
  22392. "label": "田林县",
  22393. "value": "451029"
  22394. }, {
  22395. "label": "西林县",
  22396. "value": "451030"
  22397. }, {
  22398. "label": "隆林各族自治县",
  22399. "value": "451031"
  22400. }, {
  22401. "label": "靖西市",
  22402. "value": "451081"
  22403. }], [{
  22404. "label": "八步区",
  22405. "value": "451102"
  22406. }, {
  22407. "label": "平桂区",
  22408. "value": "451103"
  22409. }, {
  22410. "label": "昭平县",
  22411. "value": "451121"
  22412. }, {
  22413. "label": "钟山县",
  22414. "value": "451122"
  22415. }, {
  22416. "label": "富川瑶族自治县",
  22417. "value": "451123"
  22418. }], [{
  22419. "label": "金城江区",
  22420. "value": "451202"
  22421. }, {
  22422. "label": "宜州区",
  22423. "value": "451203"
  22424. }, {
  22425. "label": "南丹县",
  22426. "value": "451221"
  22427. }, {
  22428. "label": "天峨县",
  22429. "value": "451222"
  22430. }, {
  22431. "label": "凤山县",
  22432. "value": "451223"
  22433. }, {
  22434. "label": "东兰县",
  22435. "value": "451224"
  22436. }, {
  22437. "label": "罗城仫佬族自治县",
  22438. "value": "451225"
  22439. }, {
  22440. "label": "环江毛南族自治县",
  22441. "value": "451226"
  22442. }, {
  22443. "label": "巴马瑶族自治县",
  22444. "value": "451227"
  22445. }, {
  22446. "label": "都安瑶族自治县",
  22447. "value": "451228"
  22448. }, {
  22449. "label": "大化瑶族自治县",
  22450. "value": "451229"
  22451. }], [{
  22452. "label": "兴宾区",
  22453. "value": "451302"
  22454. }, {
  22455. "label": "忻城县",
  22456. "value": "451321"
  22457. }, {
  22458. "label": "象州县",
  22459. "value": "451322"
  22460. }, {
  22461. "label": "武宣县",
  22462. "value": "451323"
  22463. }, {
  22464. "label": "金秀瑶族自治县",
  22465. "value": "451324"
  22466. }, {
  22467. "label": "合山市",
  22468. "value": "451381"
  22469. }], [{
  22470. "label": "江州区",
  22471. "value": "451402"
  22472. }, {
  22473. "label": "扶绥县",
  22474. "value": "451421"
  22475. }, {
  22476. "label": "宁明县",
  22477. "value": "451422"
  22478. }, {
  22479. "label": "龙州县",
  22480. "value": "451423"
  22481. }, {
  22482. "label": "大新县",
  22483. "value": "451424"
  22484. }, {
  22485. "label": "天等县",
  22486. "value": "451425"
  22487. }, {
  22488. "label": "凭祥市",
  22489. "value": "451481"
  22490. }]], [[{
  22491. "label": "秀英区",
  22492. "value": "460105"
  22493. }, {
  22494. "label": "龙华区",
  22495. "value": "460106"
  22496. }, {
  22497. "label": "琼山区",
  22498. "value": "460107"
  22499. }, {
  22500. "label": "美兰区",
  22501. "value": "460108"
  22502. }], [{
  22503. "label": "海棠区",
  22504. "value": "460202"
  22505. }, {
  22506. "label": "吉阳区",
  22507. "value": "460203"
  22508. }, {
  22509. "label": "天涯区",
  22510. "value": "460204"
  22511. }, {
  22512. "label": "崖州区",
  22513. "value": "460205"
  22514. }], [{
  22515. "label": "西沙群岛",
  22516. "value": "460321"
  22517. }, {
  22518. "label": "南沙群岛",
  22519. "value": "460322"
  22520. }, {
  22521. "label": "中沙群岛的岛礁及其海域",
  22522. "value": "460323"
  22523. }], [{
  22524. "label": "儋州市",
  22525. "value": "460400"
  22526. }], [{
  22527. "label": "五指山市",
  22528. "value": "469001"
  22529. }, {
  22530. "label": "琼海市",
  22531. "value": "469002"
  22532. }, {
  22533. "label": "文昌市",
  22534. "value": "469005"
  22535. }, {
  22536. "label": "万宁市",
  22537. "value": "469006"
  22538. }, {
  22539. "label": "东方市",
  22540. "value": "469007"
  22541. }, {
  22542. "label": "定安县",
  22543. "value": "469021"
  22544. }, {
  22545. "label": "屯昌县",
  22546. "value": "469022"
  22547. }, {
  22548. "label": "澄迈县",
  22549. "value": "469023"
  22550. }, {
  22551. "label": "临高县",
  22552. "value": "469024"
  22553. }, {
  22554. "label": "白沙黎族自治县",
  22555. "value": "469025"
  22556. }, {
  22557. "label": "昌江黎族自治县",
  22558. "value": "469026"
  22559. }, {
  22560. "label": "乐东黎族自治县",
  22561. "value": "469027"
  22562. }, {
  22563. "label": "陵水黎族自治县",
  22564. "value": "469028"
  22565. }, {
  22566. "label": "保亭黎族苗族自治县",
  22567. "value": "469029"
  22568. }, {
  22569. "label": "琼中黎族苗族自治县",
  22570. "value": "469030"
  22571. }]], [[{
  22572. "label": "万州区",
  22573. "value": "500101"
  22574. }, {
  22575. "label": "涪陵区",
  22576. "value": "500102"
  22577. }, {
  22578. "label": "渝中区",
  22579. "value": "500103"
  22580. }, {
  22581. "label": "大渡口区",
  22582. "value": "500104"
  22583. }, {
  22584. "label": "江北区",
  22585. "value": "500105"
  22586. }, {
  22587. "label": "沙坪坝区",
  22588. "value": "500106"
  22589. }, {
  22590. "label": "九龙坡区",
  22591. "value": "500107"
  22592. }, {
  22593. "label": "南岸区",
  22594. "value": "500108"
  22595. }, {
  22596. "label": "北碚区",
  22597. "value": "500109"
  22598. }, {
  22599. "label": "綦江区",
  22600. "value": "500110"
  22601. }, {
  22602. "label": "大足区",
  22603. "value": "500111"
  22604. }, {
  22605. "label": "渝北区",
  22606. "value": "500112"
  22607. }, {
  22608. "label": "巴南区",
  22609. "value": "500113"
  22610. }, {
  22611. "label": "黔江区",
  22612. "value": "500114"
  22613. }, {
  22614. "label": "长寿区",
  22615. "value": "500115"
  22616. }, {
  22617. "label": "江津区",
  22618. "value": "500116"
  22619. }, {
  22620. "label": "合川区",
  22621. "value": "500117"
  22622. }, {
  22623. "label": "永川区",
  22624. "value": "500118"
  22625. }, {
  22626. "label": "南川区",
  22627. "value": "500119"
  22628. }, {
  22629. "label": "璧山区",
  22630. "value": "500120"
  22631. }, {
  22632. "label": "铜梁区",
  22633. "value": "500151"
  22634. }, {
  22635. "label": "潼南区",
  22636. "value": "500152"
  22637. }, {
  22638. "label": "荣昌区",
  22639. "value": "500153"
  22640. }, {
  22641. "label": "开州区",
  22642. "value": "500154"
  22643. }, {
  22644. "label": "梁平区",
  22645. "value": "500155"
  22646. }, {
  22647. "label": "武隆区",
  22648. "value": "500156"
  22649. }], [{
  22650. "label": "城口县",
  22651. "value": "500229"
  22652. }, {
  22653. "label": "丰都县",
  22654. "value": "500230"
  22655. }, {
  22656. "label": "垫江县",
  22657. "value": "500231"
  22658. }, {
  22659. "label": "忠县",
  22660. "value": "500233"
  22661. }, {
  22662. "label": "云阳县",
  22663. "value": "500235"
  22664. }, {
  22665. "label": "奉节县",
  22666. "value": "500236"
  22667. }, {
  22668. "label": "巫山县",
  22669. "value": "500237"
  22670. }, {
  22671. "label": "巫溪县",
  22672. "value": "500238"
  22673. }, {
  22674. "label": "石柱土家族自治县",
  22675. "value": "500240"
  22676. }, {
  22677. "label": "秀山土家族苗族自治县",
  22678. "value": "500241"
  22679. }, {
  22680. "label": "酉阳土家族苗族自治县",
  22681. "value": "500242"
  22682. }, {
  22683. "label": "彭水苗族土家族自治县",
  22684. "value": "500243"
  22685. }]], [[{
  22686. "label": "锦江区",
  22687. "value": "510104"
  22688. }, {
  22689. "label": "青羊区",
  22690. "value": "510105"
  22691. }, {
  22692. "label": "金牛区",
  22693. "value": "510106"
  22694. }, {
  22695. "label": "武侯区",
  22696. "value": "510107"
  22697. }, {
  22698. "label": "成华区",
  22699. "value": "510108"
  22700. }, {
  22701. "label": "龙泉驿区",
  22702. "value": "510112"
  22703. }, {
  22704. "label": "青白江区",
  22705. "value": "510113"
  22706. }, {
  22707. "label": "新都区",
  22708. "value": "510114"
  22709. }, {
  22710. "label": "温江区",
  22711. "value": "510115"
  22712. }, {
  22713. "label": "双流区",
  22714. "value": "510116"
  22715. }, {
  22716. "label": "郫都区",
  22717. "value": "510117"
  22718. }, {
  22719. "label": "金堂县",
  22720. "value": "510121"
  22721. }, {
  22722. "label": "大邑县",
  22723. "value": "510129"
  22724. }, {
  22725. "label": "蒲江县",
  22726. "value": "510131"
  22727. }, {
  22728. "label": "新津县",
  22729. "value": "510132"
  22730. }, {
  22731. "label": "都江堰市",
  22732. "value": "510181"
  22733. }, {
  22734. "label": "彭州市",
  22735. "value": "510182"
  22736. }, {
  22737. "label": "邛崃市",
  22738. "value": "510183"
  22739. }, {
  22740. "label": "崇州市",
  22741. "value": "510184"
  22742. }, {
  22743. "label": "简阳市",
  22744. "value": "510185"
  22745. }], [{
  22746. "label": "自流井区",
  22747. "value": "510302"
  22748. }, {
  22749. "label": "贡井区",
  22750. "value": "510303"
  22751. }, {
  22752. "label": "大安区",
  22753. "value": "510304"
  22754. }, {
  22755. "label": "沿滩区",
  22756. "value": "510311"
  22757. }, {
  22758. "label": "荣县",
  22759. "value": "510321"
  22760. }, {
  22761. "label": "富顺县",
  22762. "value": "510322"
  22763. }], [{
  22764. "label": "东区",
  22765. "value": "510402"
  22766. }, {
  22767. "label": "西区",
  22768. "value": "510403"
  22769. }, {
  22770. "label": "仁和区",
  22771. "value": "510411"
  22772. }, {
  22773. "label": "米易县",
  22774. "value": "510421"
  22775. }, {
  22776. "label": "盐边县",
  22777. "value": "510422"
  22778. }], [{
  22779. "label": "江阳区",
  22780. "value": "510502"
  22781. }, {
  22782. "label": "纳溪区",
  22783. "value": "510503"
  22784. }, {
  22785. "label": "龙马潭区",
  22786. "value": "510504"
  22787. }, {
  22788. "label": "泸县",
  22789. "value": "510521"
  22790. }, {
  22791. "label": "合江县",
  22792. "value": "510522"
  22793. }, {
  22794. "label": "叙永县",
  22795. "value": "510524"
  22796. }, {
  22797. "label": "古蔺县",
  22798. "value": "510525"
  22799. }], [{
  22800. "label": "旌阳区",
  22801. "value": "510603"
  22802. }, {
  22803. "label": "罗江区",
  22804. "value": "510604"
  22805. }, {
  22806. "label": "中江县",
  22807. "value": "510623"
  22808. }, {
  22809. "label": "广汉市",
  22810. "value": "510681"
  22811. }, {
  22812. "label": "什邡市",
  22813. "value": "510682"
  22814. }, {
  22815. "label": "绵竹市",
  22816. "value": "510683"
  22817. }], [{
  22818. "label": "涪城区",
  22819. "value": "510703"
  22820. }, {
  22821. "label": "游仙区",
  22822. "value": "510704"
  22823. }, {
  22824. "label": "安州区",
  22825. "value": "510705"
  22826. }, {
  22827. "label": "三台县",
  22828. "value": "510722"
  22829. }, {
  22830. "label": "盐亭县",
  22831. "value": "510723"
  22832. }, {
  22833. "label": "梓潼县",
  22834. "value": "510725"
  22835. }, {
  22836. "label": "北川羌族自治县",
  22837. "value": "510726"
  22838. }, {
  22839. "label": "平武县",
  22840. "value": "510727"
  22841. }, {
  22842. "label": "江油市",
  22843. "value": "510781"
  22844. }], [{
  22845. "label": "利州区",
  22846. "value": "510802"
  22847. }, {
  22848. "label": "昭化区",
  22849. "value": "510811"
  22850. }, {
  22851. "label": "朝天区",
  22852. "value": "510812"
  22853. }, {
  22854. "label": "旺苍县",
  22855. "value": "510821"
  22856. }, {
  22857. "label": "青川县",
  22858. "value": "510822"
  22859. }, {
  22860. "label": "剑阁县",
  22861. "value": "510823"
  22862. }, {
  22863. "label": "苍溪县",
  22864. "value": "510824"
  22865. }], [{
  22866. "label": "船山区",
  22867. "value": "510903"
  22868. }, {
  22869. "label": "安居区",
  22870. "value": "510904"
  22871. }, {
  22872. "label": "蓬溪县",
  22873. "value": "510921"
  22874. }, {
  22875. "label": "射洪县",
  22876. "value": "510922"
  22877. }, {
  22878. "label": "大英县",
  22879. "value": "510923"
  22880. }], [{
  22881. "label": "市中区",
  22882. "value": "511002"
  22883. }, {
  22884. "label": "东兴区",
  22885. "value": "511011"
  22886. }, {
  22887. "label": "威远县",
  22888. "value": "511024"
  22889. }, {
  22890. "label": "资中县",
  22891. "value": "511025"
  22892. }, {
  22893. "label": "内江经济开发区",
  22894. "value": "511071"
  22895. }, {
  22896. "label": "隆昌市",
  22897. "value": "511083"
  22898. }], [{
  22899. "label": "市中区",
  22900. "value": "511102"
  22901. }, {
  22902. "label": "沙湾区",
  22903. "value": "511111"
  22904. }, {
  22905. "label": "五通桥区",
  22906. "value": "511112"
  22907. }, {
  22908. "label": "金口河区",
  22909. "value": "511113"
  22910. }, {
  22911. "label": "犍为县",
  22912. "value": "511123"
  22913. }, {
  22914. "label": "井研县",
  22915. "value": "511124"
  22916. }, {
  22917. "label": "夹江县",
  22918. "value": "511126"
  22919. }, {
  22920. "label": "沐川县",
  22921. "value": "511129"
  22922. }, {
  22923. "label": "峨边彝族自治县",
  22924. "value": "511132"
  22925. }, {
  22926. "label": "马边彝族自治县",
  22927. "value": "511133"
  22928. }, {
  22929. "label": "峨眉山市",
  22930. "value": "511181"
  22931. }], [{
  22932. "label": "顺庆区",
  22933. "value": "511302"
  22934. }, {
  22935. "label": "高坪区",
  22936. "value": "511303"
  22937. }, {
  22938. "label": "嘉陵区",
  22939. "value": "511304"
  22940. }, {
  22941. "label": "南部县",
  22942. "value": "511321"
  22943. }, {
  22944. "label": "营山县",
  22945. "value": "511322"
  22946. }, {
  22947. "label": "蓬安县",
  22948. "value": "511323"
  22949. }, {
  22950. "label": "仪陇县",
  22951. "value": "511324"
  22952. }, {
  22953. "label": "西充县",
  22954. "value": "511325"
  22955. }, {
  22956. "label": "阆中市",
  22957. "value": "511381"
  22958. }], [{
  22959. "label": "东坡区",
  22960. "value": "511402"
  22961. }, {
  22962. "label": "彭山区",
  22963. "value": "511403"
  22964. }, {
  22965. "label": "仁寿县",
  22966. "value": "511421"
  22967. }, {
  22968. "label": "洪雅县",
  22969. "value": "511423"
  22970. }, {
  22971. "label": "丹棱县",
  22972. "value": "511424"
  22973. }, {
  22974. "label": "青神县",
  22975. "value": "511425"
  22976. }], [{
  22977. "label": "翠屏区",
  22978. "value": "511502"
  22979. }, {
  22980. "label": "南溪区",
  22981. "value": "511503"
  22982. }, {
  22983. "label": "宜宾县",
  22984. "value": "511521"
  22985. }, {
  22986. "label": "江安县",
  22987. "value": "511523"
  22988. }, {
  22989. "label": "长宁县",
  22990. "value": "511524"
  22991. }, {
  22992. "label": "高县",
  22993. "value": "511525"
  22994. }, {
  22995. "label": "珙县",
  22996. "value": "511526"
  22997. }, {
  22998. "label": "筠连县",
  22999. "value": "511527"
  23000. }, {
  23001. "label": "兴文县",
  23002. "value": "511528"
  23003. }, {
  23004. "label": "屏山县",
  23005. "value": "511529"
  23006. }], [{
  23007. "label": "广安区",
  23008. "value": "511602"
  23009. }, {
  23010. "label": "前锋区",
  23011. "value": "511603"
  23012. }, {
  23013. "label": "岳池县",
  23014. "value": "511621"
  23015. }, {
  23016. "label": "武胜县",
  23017. "value": "511622"
  23018. }, {
  23019. "label": "邻水县",
  23020. "value": "511623"
  23021. }, {
  23022. "label": "华蓥市",
  23023. "value": "511681"
  23024. }], [{
  23025. "label": "通川区",
  23026. "value": "511702"
  23027. }, {
  23028. "label": "达川区",
  23029. "value": "511703"
  23030. }, {
  23031. "label": "宣汉县",
  23032. "value": "511722"
  23033. }, {
  23034. "label": "开江县",
  23035. "value": "511723"
  23036. }, {
  23037. "label": "大竹县",
  23038. "value": "511724"
  23039. }, {
  23040. "label": "渠县",
  23041. "value": "511725"
  23042. }, {
  23043. "label": "达州经济开发区",
  23044. "value": "511771"
  23045. }, {
  23046. "label": "万源市",
  23047. "value": "511781"
  23048. }], [{
  23049. "label": "雨城区",
  23050. "value": "511802"
  23051. }, {
  23052. "label": "名山区",
  23053. "value": "511803"
  23054. }, {
  23055. "label": "荥经县",
  23056. "value": "511822"
  23057. }, {
  23058. "label": "汉源县",
  23059. "value": "511823"
  23060. }, {
  23061. "label": "石棉县",
  23062. "value": "511824"
  23063. }, {
  23064. "label": "天全县",
  23065. "value": "511825"
  23066. }, {
  23067. "label": "芦山县",
  23068. "value": "511826"
  23069. }, {
  23070. "label": "宝兴县",
  23071. "value": "511827"
  23072. }], [{
  23073. "label": "巴州区",
  23074. "value": "511902"
  23075. }, {
  23076. "label": "恩阳区",
  23077. "value": "511903"
  23078. }, {
  23079. "label": "通江县",
  23080. "value": "511921"
  23081. }, {
  23082. "label": "南江县",
  23083. "value": "511922"
  23084. }, {
  23085. "label": "平昌县",
  23086. "value": "511923"
  23087. }, {
  23088. "label": "巴中经济开发区",
  23089. "value": "511971"
  23090. }], [{
  23091. "label": "雁江区",
  23092. "value": "512002"
  23093. }, {
  23094. "label": "安岳县",
  23095. "value": "512021"
  23096. }, {
  23097. "label": "乐至县",
  23098. "value": "512022"
  23099. }], [{
  23100. "label": "马尔康市",
  23101. "value": "513201"
  23102. }, {
  23103. "label": "汶川县",
  23104. "value": "513221"
  23105. }, {
  23106. "label": "理县",
  23107. "value": "513222"
  23108. }, {
  23109. "label": "茂县",
  23110. "value": "513223"
  23111. }, {
  23112. "label": "松潘县",
  23113. "value": "513224"
  23114. }, {
  23115. "label": "九寨沟县",
  23116. "value": "513225"
  23117. }, {
  23118. "label": "金川县",
  23119. "value": "513226"
  23120. }, {
  23121. "label": "小金县",
  23122. "value": "513227"
  23123. }, {
  23124. "label": "黑水县",
  23125. "value": "513228"
  23126. }, {
  23127. "label": "壤塘县",
  23128. "value": "513230"
  23129. }, {
  23130. "label": "阿坝县",
  23131. "value": "513231"
  23132. }, {
  23133. "label": "若尔盖县",
  23134. "value": "513232"
  23135. }, {
  23136. "label": "红原县",
  23137. "value": "513233"
  23138. }], [{
  23139. "label": "康定市",
  23140. "value": "513301"
  23141. }, {
  23142. "label": "泸定县",
  23143. "value": "513322"
  23144. }, {
  23145. "label": "丹巴县",
  23146. "value": "513323"
  23147. }, {
  23148. "label": "九龙县",
  23149. "value": "513324"
  23150. }, {
  23151. "label": "雅江县",
  23152. "value": "513325"
  23153. }, {
  23154. "label": "道孚县",
  23155. "value": "513326"
  23156. }, {
  23157. "label": "炉霍县",
  23158. "value": "513327"
  23159. }, {
  23160. "label": "甘孜县",
  23161. "value": "513328"
  23162. }, {
  23163. "label": "新龙县",
  23164. "value": "513329"
  23165. }, {
  23166. "label": "德格县",
  23167. "value": "513330"
  23168. }, {
  23169. "label": "白玉县",
  23170. "value": "513331"
  23171. }, {
  23172. "label": "石渠县",
  23173. "value": "513332"
  23174. }, {
  23175. "label": "色达县",
  23176. "value": "513333"
  23177. }, {
  23178. "label": "理塘县",
  23179. "value": "513334"
  23180. }, {
  23181. "label": "巴塘县",
  23182. "value": "513335"
  23183. }, {
  23184. "label": "乡城县",
  23185. "value": "513336"
  23186. }, {
  23187. "label": "稻城县",
  23188. "value": "513337"
  23189. }, {
  23190. "label": "得荣县",
  23191. "value": "513338"
  23192. }], [{
  23193. "label": "西昌市",
  23194. "value": "513401"
  23195. }, {
  23196. "label": "木里藏族自治县",
  23197. "value": "513422"
  23198. }, {
  23199. "label": "盐源县",
  23200. "value": "513423"
  23201. }, {
  23202. "label": "德昌县",
  23203. "value": "513424"
  23204. }, {
  23205. "label": "会理县",
  23206. "value": "513425"
  23207. }, {
  23208. "label": "会东县",
  23209. "value": "513426"
  23210. }, {
  23211. "label": "宁南县",
  23212. "value": "513427"
  23213. }, {
  23214. "label": "普格县",
  23215. "value": "513428"
  23216. }, {
  23217. "label": "布拖县",
  23218. "value": "513429"
  23219. }, {
  23220. "label": "金阳县",
  23221. "value": "513430"
  23222. }, {
  23223. "label": "昭觉县",
  23224. "value": "513431"
  23225. }, {
  23226. "label": "喜德县",
  23227. "value": "513432"
  23228. }, {
  23229. "label": "冕宁县",
  23230. "value": "513433"
  23231. }, {
  23232. "label": "越西县",
  23233. "value": "513434"
  23234. }, {
  23235. "label": "甘洛县",
  23236. "value": "513435"
  23237. }, {
  23238. "label": "美姑县",
  23239. "value": "513436"
  23240. }, {
  23241. "label": "雷波县",
  23242. "value": "513437"
  23243. }]], [[{
  23244. "label": "南明区",
  23245. "value": "520102"
  23246. }, {
  23247. "label": "云岩区",
  23248. "value": "520103"
  23249. }, {
  23250. "label": "花溪区",
  23251. "value": "520111"
  23252. }, {
  23253. "label": "乌当区",
  23254. "value": "520112"
  23255. }, {
  23256. "label": "白云区",
  23257. "value": "520113"
  23258. }, {
  23259. "label": "观山湖区",
  23260. "value": "520115"
  23261. }, {
  23262. "label": "开阳县",
  23263. "value": "520121"
  23264. }, {
  23265. "label": "息烽县",
  23266. "value": "520122"
  23267. }, {
  23268. "label": "修文县",
  23269. "value": "520123"
  23270. }, {
  23271. "label": "清镇市",
  23272. "value": "520181"
  23273. }], [{
  23274. "label": "钟山区",
  23275. "value": "520201"
  23276. }, {
  23277. "label": "六枝特区",
  23278. "value": "520203"
  23279. }, {
  23280. "label": "水城县",
  23281. "value": "520221"
  23282. }, {
  23283. "label": "盘州市",
  23284. "value": "520281"
  23285. }], [{
  23286. "label": "红花岗区",
  23287. "value": "520302"
  23288. }, {
  23289. "label": "汇川区",
  23290. "value": "520303"
  23291. }, {
  23292. "label": "播州区",
  23293. "value": "520304"
  23294. }, {
  23295. "label": "桐梓县",
  23296. "value": "520322"
  23297. }, {
  23298. "label": "绥阳县",
  23299. "value": "520323"
  23300. }, {
  23301. "label": "正安县",
  23302. "value": "520324"
  23303. }, {
  23304. "label": "道真仡佬族苗族自治县",
  23305. "value": "520325"
  23306. }, {
  23307. "label": "务川仡佬族苗族自治县",
  23308. "value": "520326"
  23309. }, {
  23310. "label": "凤冈县",
  23311. "value": "520327"
  23312. }, {
  23313. "label": "湄潭县",
  23314. "value": "520328"
  23315. }, {
  23316. "label": "余庆县",
  23317. "value": "520329"
  23318. }, {
  23319. "label": "习水县",
  23320. "value": "520330"
  23321. }, {
  23322. "label": "赤水市",
  23323. "value": "520381"
  23324. }, {
  23325. "label": "仁怀市",
  23326. "value": "520382"
  23327. }], [{
  23328. "label": "西秀区",
  23329. "value": "520402"
  23330. }, {
  23331. "label": "平坝区",
  23332. "value": "520403"
  23333. }, {
  23334. "label": "普定县",
  23335. "value": "520422"
  23336. }, {
  23337. "label": "镇宁布依族苗族自治县",
  23338. "value": "520423"
  23339. }, {
  23340. "label": "关岭布依族苗族自治县",
  23341. "value": "520424"
  23342. }, {
  23343. "label": "紫云苗族布依族自治县",
  23344. "value": "520425"
  23345. }], [{
  23346. "label": "七星关区",
  23347. "value": "520502"
  23348. }, {
  23349. "label": "大方县",
  23350. "value": "520521"
  23351. }, {
  23352. "label": "黔西县",
  23353. "value": "520522"
  23354. }, {
  23355. "label": "金沙县",
  23356. "value": "520523"
  23357. }, {
  23358. "label": "织金县",
  23359. "value": "520524"
  23360. }, {
  23361. "label": "纳雍县",
  23362. "value": "520525"
  23363. }, {
  23364. "label": "威宁彝族回族苗族自治县",
  23365. "value": "520526"
  23366. }, {
  23367. "label": "赫章县",
  23368. "value": "520527"
  23369. }], [{
  23370. "label": "碧江区",
  23371. "value": "520602"
  23372. }, {
  23373. "label": "万山区",
  23374. "value": "520603"
  23375. }, {
  23376. "label": "江口县",
  23377. "value": "520621"
  23378. }, {
  23379. "label": "玉屏侗族自治县",
  23380. "value": "520622"
  23381. }, {
  23382. "label": "石阡县",
  23383. "value": "520623"
  23384. }, {
  23385. "label": "思南县",
  23386. "value": "520624"
  23387. }, {
  23388. "label": "印江土家族苗族自治县",
  23389. "value": "520625"
  23390. }, {
  23391. "label": "德江县",
  23392. "value": "520626"
  23393. }, {
  23394. "label": "沿河土家族自治县",
  23395. "value": "520627"
  23396. }, {
  23397. "label": "松桃苗族自治县",
  23398. "value": "520628"
  23399. }], [{
  23400. "label": "兴义市",
  23401. "value": "522301"
  23402. }, {
  23403. "label": "兴仁县",
  23404. "value": "522322"
  23405. }, {
  23406. "label": "普安县",
  23407. "value": "522323"
  23408. }, {
  23409. "label": "晴隆县",
  23410. "value": "522324"
  23411. }, {
  23412. "label": "贞丰县",
  23413. "value": "522325"
  23414. }, {
  23415. "label": "望谟县",
  23416. "value": "522326"
  23417. }, {
  23418. "label": "册亨县",
  23419. "value": "522327"
  23420. }, {
  23421. "label": "安龙县",
  23422. "value": "522328"
  23423. }], [{
  23424. "label": "凯里市",
  23425. "value": "522601"
  23426. }, {
  23427. "label": "黄平县",
  23428. "value": "522622"
  23429. }, {
  23430. "label": "施秉县",
  23431. "value": "522623"
  23432. }, {
  23433. "label": "三穗县",
  23434. "value": "522624"
  23435. }, {
  23436. "label": "镇远县",
  23437. "value": "522625"
  23438. }, {
  23439. "label": "岑巩县",
  23440. "value": "522626"
  23441. }, {
  23442. "label": "天柱县",
  23443. "value": "522627"
  23444. }, {
  23445. "label": "锦屏县",
  23446. "value": "522628"
  23447. }, {
  23448. "label": "剑河县",
  23449. "value": "522629"
  23450. }, {
  23451. "label": "台江县",
  23452. "value": "522630"
  23453. }, {
  23454. "label": "黎平县",
  23455. "value": "522631"
  23456. }, {
  23457. "label": "榕江县",
  23458. "value": "522632"
  23459. }, {
  23460. "label": "从江县",
  23461. "value": "522633"
  23462. }, {
  23463. "label": "雷山县",
  23464. "value": "522634"
  23465. }, {
  23466. "label": "麻江县",
  23467. "value": "522635"
  23468. }, {
  23469. "label": "丹寨县",
  23470. "value": "522636"
  23471. }], [{
  23472. "label": "都匀市",
  23473. "value": "522701"
  23474. }, {
  23475. "label": "福泉市",
  23476. "value": "522702"
  23477. }, {
  23478. "label": "荔波县",
  23479. "value": "522722"
  23480. }, {
  23481. "label": "贵定县",
  23482. "value": "522723"
  23483. }, {
  23484. "label": "瓮安县",
  23485. "value": "522725"
  23486. }, {
  23487. "label": "独山县",
  23488. "value": "522726"
  23489. }, {
  23490. "label": "平塘县",
  23491. "value": "522727"
  23492. }, {
  23493. "label": "罗甸县",
  23494. "value": "522728"
  23495. }, {
  23496. "label": "长顺县",
  23497. "value": "522729"
  23498. }, {
  23499. "label": "龙里县",
  23500. "value": "522730"
  23501. }, {
  23502. "label": "惠水县",
  23503. "value": "522731"
  23504. }, {
  23505. "label": "三都水族自治县",
  23506. "value": "522732"
  23507. }]], [[{
  23508. "label": "五华区",
  23509. "value": "530102"
  23510. }, {
  23511. "label": "盘龙区",
  23512. "value": "530103"
  23513. }, {
  23514. "label": "官渡区",
  23515. "value": "530111"
  23516. }, {
  23517. "label": "西山区",
  23518. "value": "530112"
  23519. }, {
  23520. "label": "东川区",
  23521. "value": "530113"
  23522. }, {
  23523. "label": "呈贡区",
  23524. "value": "530114"
  23525. }, {
  23526. "label": "晋宁区",
  23527. "value": "530115"
  23528. }, {
  23529. "label": "富民县",
  23530. "value": "530124"
  23531. }, {
  23532. "label": "宜良县",
  23533. "value": "530125"
  23534. }, {
  23535. "label": "石林彝族自治县",
  23536. "value": "530126"
  23537. }, {
  23538. "label": "嵩明县",
  23539. "value": "530127"
  23540. }, {
  23541. "label": "禄劝彝族苗族自治县",
  23542. "value": "530128"
  23543. }, {
  23544. "label": "寻甸回族彝族自治县",
  23545. "value": "530129"
  23546. }, {
  23547. "label": "安宁市",
  23548. "value": "530181"
  23549. }], [{
  23550. "label": "麒麟区",
  23551. "value": "530302"
  23552. }, {
  23553. "label": "沾益区",
  23554. "value": "530303"
  23555. }, {
  23556. "label": "马龙县",
  23557. "value": "530321"
  23558. }, {
  23559. "label": "陆良县",
  23560. "value": "530322"
  23561. }, {
  23562. "label": "师宗县",
  23563. "value": "530323"
  23564. }, {
  23565. "label": "罗平县",
  23566. "value": "530324"
  23567. }, {
  23568. "label": "富源县",
  23569. "value": "530325"
  23570. }, {
  23571. "label": "会泽县",
  23572. "value": "530326"
  23573. }, {
  23574. "label": "宣威市",
  23575. "value": "530381"
  23576. }], [{
  23577. "label": "红塔区",
  23578. "value": "530402"
  23579. }, {
  23580. "label": "江川区",
  23581. "value": "530403"
  23582. }, {
  23583. "label": "澄江县",
  23584. "value": "530422"
  23585. }, {
  23586. "label": "通海县",
  23587. "value": "530423"
  23588. }, {
  23589. "label": "华宁县",
  23590. "value": "530424"
  23591. }, {
  23592. "label": "易门县",
  23593. "value": "530425"
  23594. }, {
  23595. "label": "峨山彝族自治县",
  23596. "value": "530426"
  23597. }, {
  23598. "label": "新平彝族傣族自治县",
  23599. "value": "530427"
  23600. }, {
  23601. "label": "元江哈尼族彝族傣族自治县",
  23602. "value": "530428"
  23603. }], [{
  23604. "label": "隆阳区",
  23605. "value": "530502"
  23606. }, {
  23607. "label": "施甸县",
  23608. "value": "530521"
  23609. }, {
  23610. "label": "龙陵县",
  23611. "value": "530523"
  23612. }, {
  23613. "label": "昌宁县",
  23614. "value": "530524"
  23615. }, {
  23616. "label": "腾冲市",
  23617. "value": "530581"
  23618. }], [{
  23619. "label": "昭阳区",
  23620. "value": "530602"
  23621. }, {
  23622. "label": "鲁甸县",
  23623. "value": "530621"
  23624. }, {
  23625. "label": "巧家县",
  23626. "value": "530622"
  23627. }, {
  23628. "label": "盐津县",
  23629. "value": "530623"
  23630. }, {
  23631. "label": "大关县",
  23632. "value": "530624"
  23633. }, {
  23634. "label": "永善县",
  23635. "value": "530625"
  23636. }, {
  23637. "label": "绥江县",
  23638. "value": "530626"
  23639. }, {
  23640. "label": "镇雄县",
  23641. "value": "530627"
  23642. }, {
  23643. "label": "彝良县",
  23644. "value": "530628"
  23645. }, {
  23646. "label": "威信县",
  23647. "value": "530629"
  23648. }, {
  23649. "label": "水富县",
  23650. "value": "530630"
  23651. }], [{
  23652. "label": "古城区",
  23653. "value": "530702"
  23654. }, {
  23655. "label": "玉龙纳西族自治县",
  23656. "value": "530721"
  23657. }, {
  23658. "label": "永胜县",
  23659. "value": "530722"
  23660. }, {
  23661. "label": "华坪县",
  23662. "value": "530723"
  23663. }, {
  23664. "label": "宁蒗彝族自治县",
  23665. "value": "530724"
  23666. }], [{
  23667. "label": "思茅区",
  23668. "value": "530802"
  23669. }, {
  23670. "label": "宁洱哈尼族彝族自治县",
  23671. "value": "530821"
  23672. }, {
  23673. "label": "墨江哈尼族自治县",
  23674. "value": "530822"
  23675. }, {
  23676. "label": "景东彝族自治县",
  23677. "value": "530823"
  23678. }, {
  23679. "label": "景谷傣族彝族自治县",
  23680. "value": "530824"
  23681. }, {
  23682. "label": "镇沅彝族哈尼族拉祜族自治县",
  23683. "value": "530825"
  23684. }, {
  23685. "label": "江城哈尼族彝族自治县",
  23686. "value": "530826"
  23687. }, {
  23688. "label": "孟连傣族拉祜族佤族自治县",
  23689. "value": "530827"
  23690. }, {
  23691. "label": "澜沧拉祜族自治县",
  23692. "value": "530828"
  23693. }, {
  23694. "label": "西盟佤族自治县",
  23695. "value": "530829"
  23696. }], [{
  23697. "label": "临翔区",
  23698. "value": "530902"
  23699. }, {
  23700. "label": "凤庆县",
  23701. "value": "530921"
  23702. }, {
  23703. "label": "云县",
  23704. "value": "530922"
  23705. }, {
  23706. "label": "永德县",
  23707. "value": "530923"
  23708. }, {
  23709. "label": "镇康县",
  23710. "value": "530924"
  23711. }, {
  23712. "label": "双江拉祜族佤族布朗族傣族自治县",
  23713. "value": "530925"
  23714. }, {
  23715. "label": "耿马傣族佤族自治县",
  23716. "value": "530926"
  23717. }, {
  23718. "label": "沧源佤族自治县",
  23719. "value": "530927"
  23720. }], [{
  23721. "label": "楚雄市",
  23722. "value": "532301"
  23723. }, {
  23724. "label": "双柏县",
  23725. "value": "532322"
  23726. }, {
  23727. "label": "牟定县",
  23728. "value": "532323"
  23729. }, {
  23730. "label": "南华县",
  23731. "value": "532324"
  23732. }, {
  23733. "label": "姚安县",
  23734. "value": "532325"
  23735. }, {
  23736. "label": "大姚县",
  23737. "value": "532326"
  23738. }, {
  23739. "label": "永仁县",
  23740. "value": "532327"
  23741. }, {
  23742. "label": "元谋县",
  23743. "value": "532328"
  23744. }, {
  23745. "label": "武定县",
  23746. "value": "532329"
  23747. }, {
  23748. "label": "禄丰县",
  23749. "value": "532331"
  23750. }], [{
  23751. "label": "个旧市",
  23752. "value": "532501"
  23753. }, {
  23754. "label": "开远市",
  23755. "value": "532502"
  23756. }, {
  23757. "label": "蒙自市",
  23758. "value": "532503"
  23759. }, {
  23760. "label": "弥勒市",
  23761. "value": "532504"
  23762. }, {
  23763. "label": "屏边苗族自治县",
  23764. "value": "532523"
  23765. }, {
  23766. "label": "建水县",
  23767. "value": "532524"
  23768. }, {
  23769. "label": "石屏县",
  23770. "value": "532525"
  23771. }, {
  23772. "label": "泸西县",
  23773. "value": "532527"
  23774. }, {
  23775. "label": "元阳县",
  23776. "value": "532528"
  23777. }, {
  23778. "label": "红河县",
  23779. "value": "532529"
  23780. }, {
  23781. "label": "金平苗族瑶族傣族自治县",
  23782. "value": "532530"
  23783. }, {
  23784. "label": "绿春县",
  23785. "value": "532531"
  23786. }, {
  23787. "label": "河口瑶族自治县",
  23788. "value": "532532"
  23789. }], [{
  23790. "label": "文山市",
  23791. "value": "532601"
  23792. }, {
  23793. "label": "砚山县",
  23794. "value": "532622"
  23795. }, {
  23796. "label": "西畴县",
  23797. "value": "532623"
  23798. }, {
  23799. "label": "麻栗坡县",
  23800. "value": "532624"
  23801. }, {
  23802. "label": "马关县",
  23803. "value": "532625"
  23804. }, {
  23805. "label": "丘北县",
  23806. "value": "532626"
  23807. }, {
  23808. "label": "广南县",
  23809. "value": "532627"
  23810. }, {
  23811. "label": "富宁县",
  23812. "value": "532628"
  23813. }], [{
  23814. "label": "景洪市",
  23815. "value": "532801"
  23816. }, {
  23817. "label": "勐海县",
  23818. "value": "532822"
  23819. }, {
  23820. "label": "勐腊县",
  23821. "value": "532823"
  23822. }], [{
  23823. "label": "大理市",
  23824. "value": "532901"
  23825. }, {
  23826. "label": "漾濞彝族自治县",
  23827. "value": "532922"
  23828. }, {
  23829. "label": "祥云县",
  23830. "value": "532923"
  23831. }, {
  23832. "label": "宾川县",
  23833. "value": "532924"
  23834. }, {
  23835. "label": "弥渡县",
  23836. "value": "532925"
  23837. }, {
  23838. "label": "南涧彝族自治县",
  23839. "value": "532926"
  23840. }, {
  23841. "label": "巍山彝族回族自治县",
  23842. "value": "532927"
  23843. }, {
  23844. "label": "永平县",
  23845. "value": "532928"
  23846. }, {
  23847. "label": "云龙县",
  23848. "value": "532929"
  23849. }, {
  23850. "label": "洱源县",
  23851. "value": "532930"
  23852. }, {
  23853. "label": "剑川县",
  23854. "value": "532931"
  23855. }, {
  23856. "label": "鹤庆县",
  23857. "value": "532932"
  23858. }], [{
  23859. "label": "瑞丽市",
  23860. "value": "533102"
  23861. }, {
  23862. "label": "芒市",
  23863. "value": "533103"
  23864. }, {
  23865. "label": "梁河县",
  23866. "value": "533122"
  23867. }, {
  23868. "label": "盈江县",
  23869. "value": "533123"
  23870. }, {
  23871. "label": "陇川县",
  23872. "value": "533124"
  23873. }], [{
  23874. "label": "泸水市",
  23875. "value": "533301"
  23876. }, {
  23877. "label": "福贡县",
  23878. "value": "533323"
  23879. }, {
  23880. "label": "贡山独龙族怒族自治县",
  23881. "value": "533324"
  23882. }, {
  23883. "label": "兰坪白族普米族自治县",
  23884. "value": "533325"
  23885. }], [{
  23886. "label": "香格里拉市",
  23887. "value": "533401"
  23888. }, {
  23889. "label": "德钦县",
  23890. "value": "533422"
  23891. }, {
  23892. "label": "维西傈僳族自治县",
  23893. "value": "533423"
  23894. }]], [[{
  23895. "label": "城关区",
  23896. "value": "540102"
  23897. }, {
  23898. "label": "堆龙德庆区",
  23899. "value": "540103"
  23900. }, {
  23901. "label": "林周县",
  23902. "value": "540121"
  23903. }, {
  23904. "label": "当雄县",
  23905. "value": "540122"
  23906. }, {
  23907. "label": "尼木县",
  23908. "value": "540123"
  23909. }, {
  23910. "label": "曲水县",
  23911. "value": "540124"
  23912. }, {
  23913. "label": "达孜县",
  23914. "value": "540126"
  23915. }, {
  23916. "label": "墨竹工卡县",
  23917. "value": "540127"
  23918. }, {
  23919. "label": "格尔木藏青工业园区",
  23920. "value": "540171"
  23921. }, {
  23922. "label": "拉萨经济技术开发区",
  23923. "value": "540172"
  23924. }, {
  23925. "label": "西藏文化旅游创意园区",
  23926. "value": "540173"
  23927. }, {
  23928. "label": "达孜工业园区",
  23929. "value": "540174"
  23930. }], [{
  23931. "label": "桑珠孜区",
  23932. "value": "540202"
  23933. }, {
  23934. "label": "南木林县",
  23935. "value": "540221"
  23936. }, {
  23937. "label": "江孜县",
  23938. "value": "540222"
  23939. }, {
  23940. "label": "定日县",
  23941. "value": "540223"
  23942. }, {
  23943. "label": "萨迦县",
  23944. "value": "540224"
  23945. }, {
  23946. "label": "拉孜县",
  23947. "value": "540225"
  23948. }, {
  23949. "label": "昂仁县",
  23950. "value": "540226"
  23951. }, {
  23952. "label": "谢通门县",
  23953. "value": "540227"
  23954. }, {
  23955. "label": "白朗县",
  23956. "value": "540228"
  23957. }, {
  23958. "label": "仁布县",
  23959. "value": "540229"
  23960. }, {
  23961. "label": "康马县",
  23962. "value": "540230"
  23963. }, {
  23964. "label": "定结县",
  23965. "value": "540231"
  23966. }, {
  23967. "label": "仲巴县",
  23968. "value": "540232"
  23969. }, {
  23970. "label": "亚东县",
  23971. "value": "540233"
  23972. }, {
  23973. "label": "吉隆县",
  23974. "value": "540234"
  23975. }, {
  23976. "label": "聂拉木县",
  23977. "value": "540235"
  23978. }, {
  23979. "label": "萨嘎县",
  23980. "value": "540236"
  23981. }, {
  23982. "label": "岗巴县",
  23983. "value": "540237"
  23984. }], [{
  23985. "label": "卡若区",
  23986. "value": "540302"
  23987. }, {
  23988. "label": "江达县",
  23989. "value": "540321"
  23990. }, {
  23991. "label": "贡觉县",
  23992. "value": "540322"
  23993. }, {
  23994. "label": "类乌齐县",
  23995. "value": "540323"
  23996. }, {
  23997. "label": "丁青县",
  23998. "value": "540324"
  23999. }, {
  24000. "label": "察雅县",
  24001. "value": "540325"
  24002. }, {
  24003. "label": "八宿县",
  24004. "value": "540326"
  24005. }, {
  24006. "label": "左贡县",
  24007. "value": "540327"
  24008. }, {
  24009. "label": "芒康县",
  24010. "value": "540328"
  24011. }, {
  24012. "label": "洛隆县",
  24013. "value": "540329"
  24014. }, {
  24015. "label": "边坝县",
  24016. "value": "540330"
  24017. }], [{
  24018. "label": "巴宜区",
  24019. "value": "540402"
  24020. }, {
  24021. "label": "工布江达县",
  24022. "value": "540421"
  24023. }, {
  24024. "label": "米林县",
  24025. "value": "540422"
  24026. }, {
  24027. "label": "墨脱县",
  24028. "value": "540423"
  24029. }, {
  24030. "label": "波密县",
  24031. "value": "540424"
  24032. }, {
  24033. "label": "察隅县",
  24034. "value": "540425"
  24035. }, {
  24036. "label": "朗县",
  24037. "value": "540426"
  24038. }], [{
  24039. "label": "乃东区",
  24040. "value": "540502"
  24041. }, {
  24042. "label": "扎囊县",
  24043. "value": "540521"
  24044. }, {
  24045. "label": "贡嘎县",
  24046. "value": "540522"
  24047. }, {
  24048. "label": "桑日县",
  24049. "value": "540523"
  24050. }, {
  24051. "label": "琼结县",
  24052. "value": "540524"
  24053. }, {
  24054. "label": "曲松县",
  24055. "value": "540525"
  24056. }, {
  24057. "label": "措美县",
  24058. "value": "540526"
  24059. }, {
  24060. "label": "洛扎县",
  24061. "value": "540527"
  24062. }, {
  24063. "label": "加查县",
  24064. "value": "540528"
  24065. }, {
  24066. "label": "隆子县",
  24067. "value": "540529"
  24068. }, {
  24069. "label": "错那县",
  24070. "value": "540530"
  24071. }, {
  24072. "label": "浪卡子县",
  24073. "value": "540531"
  24074. }], [{
  24075. "label": "那曲县",
  24076. "value": "542421"
  24077. }, {
  24078. "label": "嘉黎县",
  24079. "value": "542422"
  24080. }, {
  24081. "label": "比如县",
  24082. "value": "542423"
  24083. }, {
  24084. "label": "聂荣县",
  24085. "value": "542424"
  24086. }, {
  24087. "label": "安多县",
  24088. "value": "542425"
  24089. }, {
  24090. "label": "申扎县",
  24091. "value": "542426"
  24092. }, {
  24093. "label": "索县",
  24094. "value": "542427"
  24095. }, {
  24096. "label": "班戈县",
  24097. "value": "542428"
  24098. }, {
  24099. "label": "巴青县",
  24100. "value": "542429"
  24101. }, {
  24102. "label": "尼玛县",
  24103. "value": "542430"
  24104. }, {
  24105. "label": "双湖县",
  24106. "value": "542431"
  24107. }], [{
  24108. "label": "普兰县",
  24109. "value": "542521"
  24110. }, {
  24111. "label": "札达县",
  24112. "value": "542522"
  24113. }, {
  24114. "label": "噶尔县",
  24115. "value": "542523"
  24116. }, {
  24117. "label": "日土县",
  24118. "value": "542524"
  24119. }, {
  24120. "label": "革吉县",
  24121. "value": "542525"
  24122. }, {
  24123. "label": "改则县",
  24124. "value": "542526"
  24125. }, {
  24126. "label": "措勤县",
  24127. "value": "542527"
  24128. }]], [[{
  24129. "label": "新城区",
  24130. "value": "610102"
  24131. }, {
  24132. "label": "碑林区",
  24133. "value": "610103"
  24134. }, {
  24135. "label": "莲湖区",
  24136. "value": "610104"
  24137. }, {
  24138. "label": "灞桥区",
  24139. "value": "610111"
  24140. }, {
  24141. "label": "未央区",
  24142. "value": "610112"
  24143. }, {
  24144. "label": "雁塔区",
  24145. "value": "610113"
  24146. }, {
  24147. "label": "阎良区",
  24148. "value": "610114"
  24149. }, {
  24150. "label": "临潼区",
  24151. "value": "610115"
  24152. }, {
  24153. "label": "长安区",
  24154. "value": "610116"
  24155. }, {
  24156. "label": "高陵区",
  24157. "value": "610117"
  24158. }, {
  24159. "label": "鄠邑区",
  24160. "value": "610118"
  24161. }, {
  24162. "label": "蓝田县",
  24163. "value": "610122"
  24164. }, {
  24165. "label": "周至县",
  24166. "value": "610124"
  24167. }], [{
  24168. "label": "王益区",
  24169. "value": "610202"
  24170. }, {
  24171. "label": "印台区",
  24172. "value": "610203"
  24173. }, {
  24174. "label": "耀州区",
  24175. "value": "610204"
  24176. }, {
  24177. "label": "宜君县",
  24178. "value": "610222"
  24179. }], [{
  24180. "label": "渭滨区",
  24181. "value": "610302"
  24182. }, {
  24183. "label": "金台区",
  24184. "value": "610303"
  24185. }, {
  24186. "label": "陈仓区",
  24187. "value": "610304"
  24188. }, {
  24189. "label": "凤翔县",
  24190. "value": "610322"
  24191. }, {
  24192. "label": "岐山县",
  24193. "value": "610323"
  24194. }, {
  24195. "label": "扶风县",
  24196. "value": "610324"
  24197. }, {
  24198. "label": "眉县",
  24199. "value": "610326"
  24200. }, {
  24201. "label": "陇县",
  24202. "value": "610327"
  24203. }, {
  24204. "label": "千阳县",
  24205. "value": "610328"
  24206. }, {
  24207. "label": "麟游县",
  24208. "value": "610329"
  24209. }, {
  24210. "label": "凤县",
  24211. "value": "610330"
  24212. }, {
  24213. "label": "太白县",
  24214. "value": "610331"
  24215. }], [{
  24216. "label": "秦都区",
  24217. "value": "610402"
  24218. }, {
  24219. "label": "杨陵区",
  24220. "value": "610403"
  24221. }, {
  24222. "label": "渭城区",
  24223. "value": "610404"
  24224. }, {
  24225. "label": "三原县",
  24226. "value": "610422"
  24227. }, {
  24228. "label": "泾阳县",
  24229. "value": "610423"
  24230. }, {
  24231. "label": "乾县",
  24232. "value": "610424"
  24233. }, {
  24234. "label": "礼泉县",
  24235. "value": "610425"
  24236. }, {
  24237. "label": "永寿县",
  24238. "value": "610426"
  24239. }, {
  24240. "label": "彬县",
  24241. "value": "610427"
  24242. }, {
  24243. "label": "长武县",
  24244. "value": "610428"
  24245. }, {
  24246. "label": "旬邑县",
  24247. "value": "610429"
  24248. }, {
  24249. "label": "淳化县",
  24250. "value": "610430"
  24251. }, {
  24252. "label": "武功县",
  24253. "value": "610431"
  24254. }, {
  24255. "label": "兴平市",
  24256. "value": "610481"
  24257. }], [{
  24258. "label": "临渭区",
  24259. "value": "610502"
  24260. }, {
  24261. "label": "华州区",
  24262. "value": "610503"
  24263. }, {
  24264. "label": "潼关县",
  24265. "value": "610522"
  24266. }, {
  24267. "label": "大荔县",
  24268. "value": "610523"
  24269. }, {
  24270. "label": "合阳县",
  24271. "value": "610524"
  24272. }, {
  24273. "label": "澄城县",
  24274. "value": "610525"
  24275. }, {
  24276. "label": "蒲城县",
  24277. "value": "610526"
  24278. }, {
  24279. "label": "白水县",
  24280. "value": "610527"
  24281. }, {
  24282. "label": "富平县",
  24283. "value": "610528"
  24284. }, {
  24285. "label": "韩城市",
  24286. "value": "610581"
  24287. }, {
  24288. "label": "华阴市",
  24289. "value": "610582"
  24290. }], [{
  24291. "label": "宝塔区",
  24292. "value": "610602"
  24293. }, {
  24294. "label": "安塞区",
  24295. "value": "610603"
  24296. }, {
  24297. "label": "延长县",
  24298. "value": "610621"
  24299. }, {
  24300. "label": "延川县",
  24301. "value": "610622"
  24302. }, {
  24303. "label": "子长县",
  24304. "value": "610623"
  24305. }, {
  24306. "label": "志丹县",
  24307. "value": "610625"
  24308. }, {
  24309. "label": "吴起县",
  24310. "value": "610626"
  24311. }, {
  24312. "label": "甘泉县",
  24313. "value": "610627"
  24314. }, {
  24315. "label": "富县",
  24316. "value": "610628"
  24317. }, {
  24318. "label": "洛川县",
  24319. "value": "610629"
  24320. }, {
  24321. "label": "宜川县",
  24322. "value": "610630"
  24323. }, {
  24324. "label": "黄龙县",
  24325. "value": "610631"
  24326. }, {
  24327. "label": "黄陵县",
  24328. "value": "610632"
  24329. }], [{
  24330. "label": "汉台区",
  24331. "value": "610702"
  24332. }, {
  24333. "label": "南郑区",
  24334. "value": "610703"
  24335. }, {
  24336. "label": "城固县",
  24337. "value": "610722"
  24338. }, {
  24339. "label": "洋县",
  24340. "value": "610723"
  24341. }, {
  24342. "label": "西乡县",
  24343. "value": "610724"
  24344. }, {
  24345. "label": "勉县",
  24346. "value": "610725"
  24347. }, {
  24348. "label": "宁强县",
  24349. "value": "610726"
  24350. }, {
  24351. "label": "略阳县",
  24352. "value": "610727"
  24353. }, {
  24354. "label": "镇巴县",
  24355. "value": "610728"
  24356. }, {
  24357. "label": "留坝县",
  24358. "value": "610729"
  24359. }, {
  24360. "label": "佛坪县",
  24361. "value": "610730"
  24362. }], [{
  24363. "label": "榆阳区",
  24364. "value": "610802"
  24365. }, {
  24366. "label": "横山区",
  24367. "value": "610803"
  24368. }, {
  24369. "label": "府谷县",
  24370. "value": "610822"
  24371. }, {
  24372. "label": "靖边县",
  24373. "value": "610824"
  24374. }, {
  24375. "label": "定边县",
  24376. "value": "610825"
  24377. }, {
  24378. "label": "绥德县",
  24379. "value": "610826"
  24380. }, {
  24381. "label": "米脂县",
  24382. "value": "610827"
  24383. }, {
  24384. "label": "佳县",
  24385. "value": "610828"
  24386. }, {
  24387. "label": "吴堡县",
  24388. "value": "610829"
  24389. }, {
  24390. "label": "清涧县",
  24391. "value": "610830"
  24392. }, {
  24393. "label": "子洲县",
  24394. "value": "610831"
  24395. }, {
  24396. "label": "神木市",
  24397. "value": "610881"
  24398. }], [{
  24399. "label": "汉滨区",
  24400. "value": "610902"
  24401. }, {
  24402. "label": "汉阴县",
  24403. "value": "610921"
  24404. }, {
  24405. "label": "石泉县",
  24406. "value": "610922"
  24407. }, {
  24408. "label": "宁陕县",
  24409. "value": "610923"
  24410. }, {
  24411. "label": "紫阳县",
  24412. "value": "610924"
  24413. }, {
  24414. "label": "岚皋县",
  24415. "value": "610925"
  24416. }, {
  24417. "label": "平利县",
  24418. "value": "610926"
  24419. }, {
  24420. "label": "镇坪县",
  24421. "value": "610927"
  24422. }, {
  24423. "label": "旬阳县",
  24424. "value": "610928"
  24425. }, {
  24426. "label": "白河县",
  24427. "value": "610929"
  24428. }], [{
  24429. "label": "商州区",
  24430. "value": "611002"
  24431. }, {
  24432. "label": "洛南县",
  24433. "value": "611021"
  24434. }, {
  24435. "label": "丹凤县",
  24436. "value": "611022"
  24437. }, {
  24438. "label": "商南县",
  24439. "value": "611023"
  24440. }, {
  24441. "label": "山阳县",
  24442. "value": "611024"
  24443. }, {
  24444. "label": "镇安县",
  24445. "value": "611025"
  24446. }, {
  24447. "label": "柞水县",
  24448. "value": "611026"
  24449. }]], [[{
  24450. "label": "城关区",
  24451. "value": "620102"
  24452. }, {
  24453. "label": "七里河区",
  24454. "value": "620103"
  24455. }, {
  24456. "label": "西固区",
  24457. "value": "620104"
  24458. }, {
  24459. "label": "安宁区",
  24460. "value": "620105"
  24461. }, {
  24462. "label": "红古区",
  24463. "value": "620111"
  24464. }, {
  24465. "label": "永登县",
  24466. "value": "620121"
  24467. }, {
  24468. "label": "皋兰县",
  24469. "value": "620122"
  24470. }, {
  24471. "label": "榆中县",
  24472. "value": "620123"
  24473. }, {
  24474. "label": "兰州新区",
  24475. "value": "620171"
  24476. }], [{
  24477. "label": "嘉峪关市",
  24478. "value": "620201"
  24479. }], [{
  24480. "label": "金川区",
  24481. "value": "620302"
  24482. }, {
  24483. "label": "永昌县",
  24484. "value": "620321"
  24485. }], [{
  24486. "label": "白银区",
  24487. "value": "620402"
  24488. }, {
  24489. "label": "平川区",
  24490. "value": "620403"
  24491. }, {
  24492. "label": "靖远县",
  24493. "value": "620421"
  24494. }, {
  24495. "label": "会宁县",
  24496. "value": "620422"
  24497. }, {
  24498. "label": "景泰县",
  24499. "value": "620423"
  24500. }], [{
  24501. "label": "秦州区",
  24502. "value": "620502"
  24503. }, {
  24504. "label": "麦积区",
  24505. "value": "620503"
  24506. }, {
  24507. "label": "清水县",
  24508. "value": "620521"
  24509. }, {
  24510. "label": "秦安县",
  24511. "value": "620522"
  24512. }, {
  24513. "label": "甘谷县",
  24514. "value": "620523"
  24515. }, {
  24516. "label": "武山县",
  24517. "value": "620524"
  24518. }, {
  24519. "label": "张家川回族自治县",
  24520. "value": "620525"
  24521. }], [{
  24522. "label": "凉州区",
  24523. "value": "620602"
  24524. }, {
  24525. "label": "民勤县",
  24526. "value": "620621"
  24527. }, {
  24528. "label": "古浪县",
  24529. "value": "620622"
  24530. }, {
  24531. "label": "天祝藏族自治县",
  24532. "value": "620623"
  24533. }], [{
  24534. "label": "甘州区",
  24535. "value": "620702"
  24536. }, {
  24537. "label": "肃南裕固族自治县",
  24538. "value": "620721"
  24539. }, {
  24540. "label": "民乐县",
  24541. "value": "620722"
  24542. }, {
  24543. "label": "临泽县",
  24544. "value": "620723"
  24545. }, {
  24546. "label": "高台县",
  24547. "value": "620724"
  24548. }, {
  24549. "label": "山丹县",
  24550. "value": "620725"
  24551. }], [{
  24552. "label": "崆峒区",
  24553. "value": "620802"
  24554. }, {
  24555. "label": "泾川县",
  24556. "value": "620821"
  24557. }, {
  24558. "label": "灵台县",
  24559. "value": "620822"
  24560. }, {
  24561. "label": "崇信县",
  24562. "value": "620823"
  24563. }, {
  24564. "label": "华亭县",
  24565. "value": "620824"
  24566. }, {
  24567. "label": "庄浪县",
  24568. "value": "620825"
  24569. }, {
  24570. "label": "静宁县",
  24571. "value": "620826"
  24572. }, {
  24573. "label": "平凉工业园区",
  24574. "value": "620871"
  24575. }], [{
  24576. "label": "肃州区",
  24577. "value": "620902"
  24578. }, {
  24579. "label": "金塔县",
  24580. "value": "620921"
  24581. }, {
  24582. "label": "瓜州县",
  24583. "value": "620922"
  24584. }, {
  24585. "label": "肃北蒙古族自治县",
  24586. "value": "620923"
  24587. }, {
  24588. "label": "阿克塞哈萨克族自治县",
  24589. "value": "620924"
  24590. }, {
  24591. "label": "玉门市",
  24592. "value": "620981"
  24593. }, {
  24594. "label": "敦煌市",
  24595. "value": "620982"
  24596. }], [{
  24597. "label": "西峰区",
  24598. "value": "621002"
  24599. }, {
  24600. "label": "庆城县",
  24601. "value": "621021"
  24602. }, {
  24603. "label": "环县",
  24604. "value": "621022"
  24605. }, {
  24606. "label": "华池县",
  24607. "value": "621023"
  24608. }, {
  24609. "label": "合水县",
  24610. "value": "621024"
  24611. }, {
  24612. "label": "正宁县",
  24613. "value": "621025"
  24614. }, {
  24615. "label": "宁县",
  24616. "value": "621026"
  24617. }, {
  24618. "label": "镇原县",
  24619. "value": "621027"
  24620. }], [{
  24621. "label": "安定区",
  24622. "value": "621102"
  24623. }, {
  24624. "label": "通渭县",
  24625. "value": "621121"
  24626. }, {
  24627. "label": "陇西县",
  24628. "value": "621122"
  24629. }, {
  24630. "label": "渭源县",
  24631. "value": "621123"
  24632. }, {
  24633. "label": "临洮县",
  24634. "value": "621124"
  24635. }, {
  24636. "label": "漳县",
  24637. "value": "621125"
  24638. }, {
  24639. "label": "岷县",
  24640. "value": "621126"
  24641. }], [{
  24642. "label": "武都区",
  24643. "value": "621202"
  24644. }, {
  24645. "label": "成县",
  24646. "value": "621221"
  24647. }, {
  24648. "label": "文县",
  24649. "value": "621222"
  24650. }, {
  24651. "label": "宕昌县",
  24652. "value": "621223"
  24653. }, {
  24654. "label": "康县",
  24655. "value": "621224"
  24656. }, {
  24657. "label": "西和县",
  24658. "value": "621225"
  24659. }, {
  24660. "label": "礼县",
  24661. "value": "621226"
  24662. }, {
  24663. "label": "徽县",
  24664. "value": "621227"
  24665. }, {
  24666. "label": "两当县",
  24667. "value": "621228"
  24668. }], [{
  24669. "label": "临夏市",
  24670. "value": "622901"
  24671. }, {
  24672. "label": "临夏县",
  24673. "value": "622921"
  24674. }, {
  24675. "label": "康乐县",
  24676. "value": "622922"
  24677. }, {
  24678. "label": "永靖县",
  24679. "value": "622923"
  24680. }, {
  24681. "label": "广河县",
  24682. "value": "622924"
  24683. }, {
  24684. "label": "和政县",
  24685. "value": "622925"
  24686. }, {
  24687. "label": "东乡族自治县",
  24688. "value": "622926"
  24689. }, {
  24690. "label": "积石山保安族东乡族撒拉族自治县",
  24691. "value": "622927"
  24692. }], [{
  24693. "label": "合作市",
  24694. "value": "623001"
  24695. }, {
  24696. "label": "临潭县",
  24697. "value": "623021"
  24698. }, {
  24699. "label": "卓尼县",
  24700. "value": "623022"
  24701. }, {
  24702. "label": "舟曲县",
  24703. "value": "623023"
  24704. }, {
  24705. "label": "迭部县",
  24706. "value": "623024"
  24707. }, {
  24708. "label": "玛曲县",
  24709. "value": "623025"
  24710. }, {
  24711. "label": "碌曲县",
  24712. "value": "623026"
  24713. }, {
  24714. "label": "夏河县",
  24715. "value": "623027"
  24716. }]], [[{
  24717. "label": "城东区",
  24718. "value": "630102"
  24719. }, {
  24720. "label": "城中区",
  24721. "value": "630103"
  24722. }, {
  24723. "label": "城西区",
  24724. "value": "630104"
  24725. }, {
  24726. "label": "城北区",
  24727. "value": "630105"
  24728. }, {
  24729. "label": "大通回族土族自治县",
  24730. "value": "630121"
  24731. }, {
  24732. "label": "湟中县",
  24733. "value": "630122"
  24734. }, {
  24735. "label": "湟源县",
  24736. "value": "630123"
  24737. }], [{
  24738. "label": "乐都区",
  24739. "value": "630202"
  24740. }, {
  24741. "label": "平安区",
  24742. "value": "630203"
  24743. }, {
  24744. "label": "民和回族土族自治县",
  24745. "value": "630222"
  24746. }, {
  24747. "label": "互助土族自治县",
  24748. "value": "630223"
  24749. }, {
  24750. "label": "化隆回族自治县",
  24751. "value": "630224"
  24752. }, {
  24753. "label": "循化撒拉族自治县",
  24754. "value": "630225"
  24755. }], [{
  24756. "label": "门源回族自治县",
  24757. "value": "632221"
  24758. }, {
  24759. "label": "祁连县",
  24760. "value": "632222"
  24761. }, {
  24762. "label": "海晏县",
  24763. "value": "632223"
  24764. }, {
  24765. "label": "刚察县",
  24766. "value": "632224"
  24767. }], [{
  24768. "label": "同仁县",
  24769. "value": "632321"
  24770. }, {
  24771. "label": "尖扎县",
  24772. "value": "632322"
  24773. }, {
  24774. "label": "泽库县",
  24775. "value": "632323"
  24776. }, {
  24777. "label": "河南蒙古族自治县",
  24778. "value": "632324"
  24779. }], [{
  24780. "label": "共和县",
  24781. "value": "632521"
  24782. }, {
  24783. "label": "同德县",
  24784. "value": "632522"
  24785. }, {
  24786. "label": "贵德县",
  24787. "value": "632523"
  24788. }, {
  24789. "label": "兴海县",
  24790. "value": "632524"
  24791. }, {
  24792. "label": "贵南县",
  24793. "value": "632525"
  24794. }], [{
  24795. "label": "玛沁县",
  24796. "value": "632621"
  24797. }, {
  24798. "label": "班玛县",
  24799. "value": "632622"
  24800. }, {
  24801. "label": "甘德县",
  24802. "value": "632623"
  24803. }, {
  24804. "label": "达日县",
  24805. "value": "632624"
  24806. }, {
  24807. "label": "久治县",
  24808. "value": "632625"
  24809. }, {
  24810. "label": "玛多县",
  24811. "value": "632626"
  24812. }], [{
  24813. "label": "玉树市",
  24814. "value": "632701"
  24815. }, {
  24816. "label": "杂多县",
  24817. "value": "632722"
  24818. }, {
  24819. "label": "称多县",
  24820. "value": "632723"
  24821. }, {
  24822. "label": "治多县",
  24823. "value": "632724"
  24824. }, {
  24825. "label": "囊谦县",
  24826. "value": "632725"
  24827. }, {
  24828. "label": "曲麻莱县",
  24829. "value": "632726"
  24830. }], [{
  24831. "label": "格尔木市",
  24832. "value": "632801"
  24833. }, {
  24834. "label": "德令哈市",
  24835. "value": "632802"
  24836. }, {
  24837. "label": "乌兰县",
  24838. "value": "632821"
  24839. }, {
  24840. "label": "都兰县",
  24841. "value": "632822"
  24842. }, {
  24843. "label": "天峻县",
  24844. "value": "632823"
  24845. }, {
  24846. "label": "大柴旦行政委员会",
  24847. "value": "632857"
  24848. }, {
  24849. "label": "冷湖行政委员会",
  24850. "value": "632858"
  24851. }, {
  24852. "label": "茫崖行政委员会",
  24853. "value": "632859"
  24854. }]], [[{
  24855. "label": "兴庆区",
  24856. "value": "640104"
  24857. }, {
  24858. "label": "西夏区",
  24859. "value": "640105"
  24860. }, {
  24861. "label": "金凤区",
  24862. "value": "640106"
  24863. }, {
  24864. "label": "永宁县",
  24865. "value": "640121"
  24866. }, {
  24867. "label": "贺兰县",
  24868. "value": "640122"
  24869. }, {
  24870. "label": "灵武市",
  24871. "value": "640181"
  24872. }], [{
  24873. "label": "大武口区",
  24874. "value": "640202"
  24875. }, {
  24876. "label": "惠农区",
  24877. "value": "640205"
  24878. }, {
  24879. "label": "平罗县",
  24880. "value": "640221"
  24881. }], [{
  24882. "label": "利通区",
  24883. "value": "640302"
  24884. }, {
  24885. "label": "红寺堡区",
  24886. "value": "640303"
  24887. }, {
  24888. "label": "盐池县",
  24889. "value": "640323"
  24890. }, {
  24891. "label": "同心县",
  24892. "value": "640324"
  24893. }, {
  24894. "label": "青铜峡市",
  24895. "value": "640381"
  24896. }], [{
  24897. "label": "原州区",
  24898. "value": "640402"
  24899. }, {
  24900. "label": "西吉县",
  24901. "value": "640422"
  24902. }, {
  24903. "label": "隆德县",
  24904. "value": "640423"
  24905. }, {
  24906. "label": "泾源县",
  24907. "value": "640424"
  24908. }, {
  24909. "label": "彭阳县",
  24910. "value": "640425"
  24911. }], [{
  24912. "label": "沙坡头区",
  24913. "value": "640502"
  24914. }, {
  24915. "label": "中宁县",
  24916. "value": "640521"
  24917. }, {
  24918. "label": "海原县",
  24919. "value": "640522"
  24920. }]], [[{
  24921. "label": "天山区",
  24922. "value": "650102"
  24923. }, {
  24924. "label": "沙依巴克区",
  24925. "value": "650103"
  24926. }, {
  24927. "label": "新市区",
  24928. "value": "650104"
  24929. }, {
  24930. "label": "水磨沟区",
  24931. "value": "650105"
  24932. }, {
  24933. "label": "头屯河区",
  24934. "value": "650106"
  24935. }, {
  24936. "label": "达坂城区",
  24937. "value": "650107"
  24938. }, {
  24939. "label": "米东区",
  24940. "value": "650109"
  24941. }, {
  24942. "label": "乌鲁木齐县",
  24943. "value": "650121"
  24944. }, {
  24945. "label": "乌鲁木齐经济技术开发区",
  24946. "value": "650171"
  24947. }, {
  24948. "label": "乌鲁木齐高新技术产业开发区",
  24949. "value": "650172"
  24950. }], [{
  24951. "label": "独山子区",
  24952. "value": "650202"
  24953. }, {
  24954. "label": "克拉玛依区",
  24955. "value": "650203"
  24956. }, {
  24957. "label": "白碱滩区",
  24958. "value": "650204"
  24959. }, {
  24960. "label": "乌尔禾区",
  24961. "value": "650205"
  24962. }], [{
  24963. "label": "高昌区",
  24964. "value": "650402"
  24965. }, {
  24966. "label": "鄯善县",
  24967. "value": "650421"
  24968. }, {
  24969. "label": "托克逊县",
  24970. "value": "650422"
  24971. }], [{
  24972. "label": "伊州区",
  24973. "value": "650502"
  24974. }, {
  24975. "label": "巴里坤哈萨克自治县",
  24976. "value": "650521"
  24977. }, {
  24978. "label": "伊吾县",
  24979. "value": "650522"
  24980. }], [{
  24981. "label": "昌吉市",
  24982. "value": "652301"
  24983. }, {
  24984. "label": "阜康市",
  24985. "value": "652302"
  24986. }, {
  24987. "label": "呼图壁县",
  24988. "value": "652323"
  24989. }, {
  24990. "label": "玛纳斯县",
  24991. "value": "652324"
  24992. }, {
  24993. "label": "奇台县",
  24994. "value": "652325"
  24995. }, {
  24996. "label": "吉木萨尔县",
  24997. "value": "652327"
  24998. }, {
  24999. "label": "木垒哈萨克自治县",
  25000. "value": "652328"
  25001. }], [{
  25002. "label": "博乐市",
  25003. "value": "652701"
  25004. }, {
  25005. "label": "阿拉山口市",
  25006. "value": "652702"
  25007. }, {
  25008. "label": "精河县",
  25009. "value": "652722"
  25010. }, {
  25011. "label": "温泉县",
  25012. "value": "652723"
  25013. }], [{
  25014. "label": "库尔勒市",
  25015. "value": "652801"
  25016. }, {
  25017. "label": "轮台县",
  25018. "value": "652822"
  25019. }, {
  25020. "label": "尉犁县",
  25021. "value": "652823"
  25022. }, {
  25023. "label": "若羌县",
  25024. "value": "652824"
  25025. }, {
  25026. "label": "且末县",
  25027. "value": "652825"
  25028. }, {
  25029. "label": "焉耆回族自治县",
  25030. "value": "652826"
  25031. }, {
  25032. "label": "和静县",
  25033. "value": "652827"
  25034. }, {
  25035. "label": "和硕县",
  25036. "value": "652828"
  25037. }, {
  25038. "label": "博湖县",
  25039. "value": "652829"
  25040. }, {
  25041. "label": "库尔勒经济技术开发区",
  25042. "value": "652871"
  25043. }], [{
  25044. "label": "阿克苏市",
  25045. "value": "652901"
  25046. }, {
  25047. "label": "温宿县",
  25048. "value": "652922"
  25049. }, {
  25050. "label": "库车县",
  25051. "value": "652923"
  25052. }, {
  25053. "label": "沙雅县",
  25054. "value": "652924"
  25055. }, {
  25056. "label": "新和县",
  25057. "value": "652925"
  25058. }, {
  25059. "label": "拜城县",
  25060. "value": "652926"
  25061. }, {
  25062. "label": "乌什县",
  25063. "value": "652927"
  25064. }, {
  25065. "label": "阿瓦提县",
  25066. "value": "652928"
  25067. }, {
  25068. "label": "柯坪县",
  25069. "value": "652929"
  25070. }], [{
  25071. "label": "阿图什市",
  25072. "value": "653001"
  25073. }, {
  25074. "label": "阿克陶县",
  25075. "value": "653022"
  25076. }, {
  25077. "label": "阿合奇县",
  25078. "value": "653023"
  25079. }, {
  25080. "label": "乌恰县",
  25081. "value": "653024"
  25082. }], [{
  25083. "label": "喀什市",
  25084. "value": "653101"
  25085. }, {
  25086. "label": "疏附县",
  25087. "value": "653121"
  25088. }, {
  25089. "label": "疏勒县",
  25090. "value": "653122"
  25091. }, {
  25092. "label": "英吉沙县",
  25093. "value": "653123"
  25094. }, {
  25095. "label": "泽普县",
  25096. "value": "653124"
  25097. }, {
  25098. "label": "莎车县",
  25099. "value": "653125"
  25100. }, {
  25101. "label": "叶城县",
  25102. "value": "653126"
  25103. }, {
  25104. "label": "麦盖提县",
  25105. "value": "653127"
  25106. }, {
  25107. "label": "岳普湖县",
  25108. "value": "653128"
  25109. }, {
  25110. "label": "伽师县",
  25111. "value": "653129"
  25112. }, {
  25113. "label": "巴楚县",
  25114. "value": "653130"
  25115. }, {
  25116. "label": "塔什库尔干塔吉克自治县",
  25117. "value": "653131"
  25118. }], [{
  25119. "label": "和田市",
  25120. "value": "653201"
  25121. }, {
  25122. "label": "和田县",
  25123. "value": "653221"
  25124. }, {
  25125. "label": "墨玉县",
  25126. "value": "653222"
  25127. }, {
  25128. "label": "皮山县",
  25129. "value": "653223"
  25130. }, {
  25131. "label": "洛浦县",
  25132. "value": "653224"
  25133. }, {
  25134. "label": "策勒县",
  25135. "value": "653225"
  25136. }, {
  25137. "label": "于田县",
  25138. "value": "653226"
  25139. }, {
  25140. "label": "民丰县",
  25141. "value": "653227"
  25142. }], [{
  25143. "label": "伊宁市",
  25144. "value": "654002"
  25145. }, {
  25146. "label": "奎屯市",
  25147. "value": "654003"
  25148. }, {
  25149. "label": "霍尔果斯市",
  25150. "value": "654004"
  25151. }, {
  25152. "label": "伊宁县",
  25153. "value": "654021"
  25154. }, {
  25155. "label": "察布查尔锡伯自治县",
  25156. "value": "654022"
  25157. }, {
  25158. "label": "霍城县",
  25159. "value": "654023"
  25160. }, {
  25161. "label": "巩留县",
  25162. "value": "654024"
  25163. }, {
  25164. "label": "新源县",
  25165. "value": "654025"
  25166. }, {
  25167. "label": "昭苏县",
  25168. "value": "654026"
  25169. }, {
  25170. "label": "特克斯县",
  25171. "value": "654027"
  25172. }, {
  25173. "label": "尼勒克县",
  25174. "value": "654028"
  25175. }], [{
  25176. "label": "塔城市",
  25177. "value": "654201"
  25178. }, {
  25179. "label": "乌苏市",
  25180. "value": "654202"
  25181. }, {
  25182. "label": "额敏县",
  25183. "value": "654221"
  25184. }, {
  25185. "label": "沙湾县",
  25186. "value": "654223"
  25187. }, {
  25188. "label": "托里县",
  25189. "value": "654224"
  25190. }, {
  25191. "label": "裕民县",
  25192. "value": "654225"
  25193. }, {
  25194. "label": "和布克赛尔蒙古自治县",
  25195. "value": "654226"
  25196. }], [{
  25197. "label": "阿勒泰市",
  25198. "value": "654301"
  25199. }, {
  25200. "label": "布尔津县",
  25201. "value": "654321"
  25202. }, {
  25203. "label": "富蕴县",
  25204. "value": "654322"
  25205. }, {
  25206. "label": "福海县",
  25207. "value": "654323"
  25208. }, {
  25209. "label": "哈巴河县",
  25210. "value": "654324"
  25211. }, {
  25212. "label": "青河县",
  25213. "value": "654325"
  25214. }, {
  25215. "label": "吉木乃县",
  25216. "value": "654326"
  25217. }], [{
  25218. "label": "石河子市",
  25219. "value": "659001"
  25220. }, {
  25221. "label": "阿拉尔市",
  25222. "value": "659002"
  25223. }, {
  25224. "label": "图木舒克市",
  25225. "value": "659003"
  25226. }, {
  25227. "label": "五家渠市",
  25228. "value": "659004"
  25229. }, {
  25230. "label": "铁门关市",
  25231. "value": "659006"
  25232. }]], [[{
  25233. "label": "台北",
  25234. "value": "660101"
  25235. }], [{
  25236. "label": "高雄",
  25237. "value": "660201"
  25238. }], [{
  25239. "label": "基隆",
  25240. "value": "660301"
  25241. }], [{
  25242. "label": "台中",
  25243. "value": "660401"
  25244. }], [{
  25245. "label": "台南",
  25246. "value": "660501"
  25247. }], [{
  25248. "label": "新竹",
  25249. "value": "660601"
  25250. }], [{
  25251. "label": "嘉义",
  25252. "value": "660701"
  25253. }], [{
  25254. "label": "宜兰",
  25255. "value": "660801"
  25256. }], [{
  25257. "label": "桃园",
  25258. "value": "660901"
  25259. }], [{
  25260. "label": "苗栗",
  25261. "value": "661001"
  25262. }], [{
  25263. "label": "彰化",
  25264. "value": "661101"
  25265. }], [{
  25266. "label": "南投",
  25267. "value": "661201"
  25268. }], [{
  25269. "label": "云林",
  25270. "value": "661301"
  25271. }], [{
  25272. "label": "屏东",
  25273. "value": "661401"
  25274. }], [{
  25275. "label": "台东",
  25276. "value": "661501"
  25277. }], [{
  25278. "label": "花莲",
  25279. "value": "661601"
  25280. }], [{
  25281. "label": "澎湖",
  25282. "value": "661701"
  25283. }]], [[{
  25284. "label": "香港岛",
  25285. "value": "670101"
  25286. }], [{
  25287. "label": "九龙",
  25288. "value": "670201"
  25289. }], [{
  25290. "label": "新界",
  25291. "value": "670301"
  25292. }]], [[{
  25293. "label": "澳门半岛",
  25294. "value": "680101"
  25295. }], [{
  25296. "label": "氹仔岛",
  25297. "value": "680201"
  25298. }], [{
  25299. "label": "路环岛",
  25300. "value": "680301"
  25301. }], [{
  25302. "label": "路氹城",
  25303. "value": "680401"
  25304. }]]];
  25305. var _default = areaData;
  25306. exports.default = _default;
  25307. /***/ }),
  25308. /***/ 47:
  25309. /*!************************************************************************!*\
  25310. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/libs/function/test.js ***!
  25311. \************************************************************************/
  25312. /*! no static exports found */
  25313. /***/ (function(module, exports, __webpack_require__) {
  25314. "use strict";
  25315. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  25316. Object.defineProperty(exports, "__esModule", {
  25317. value: true
  25318. });
  25319. exports.default = void 0;
  25320. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  25321. /**
  25322. * 验证电子邮箱格式
  25323. */
  25324. function email(value) {
  25325. return /[\w!#$%&'*+/=?^_`{|}~-]+(?:\.[\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\w](?:[\w-]*[\w])?\.)+[\w](?:[\w-]*[\w])?/.test(value);
  25326. }
  25327. /**
  25328. * 验证手机格式
  25329. */
  25330. function mobile(value) {
  25331. return /^1[3-9]\d{9}$/.test(value);
  25332. }
  25333. /**
  25334. * 验证URL格式
  25335. */
  25336. function url(value) {
  25337. return /http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w-.\/?%&=]*)?/.test(value);
  25338. }
  25339. /**
  25340. * 验证日期格式
  25341. */
  25342. function date(value) {
  25343. return !/Invalid|NaN/.test(new Date(value).toString());
  25344. }
  25345. /**
  25346. * 验证ISO类型的日期格式
  25347. */
  25348. function dateISO(value) {
  25349. return /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(value);
  25350. }
  25351. /**
  25352. * 验证十进制数字
  25353. */
  25354. function number(value) {
  25355. return /^[\+-]?(\d+\.?\d*|\.\d+|\d\.\d+e\+\d+)$/.test(value);
  25356. }
  25357. /**
  25358. * 验证整数
  25359. */
  25360. function digits(value) {
  25361. return /^\d+$/.test(value);
  25362. }
  25363. /**
  25364. * 验证身份证号码
  25365. */
  25366. function idCard(value) {
  25367. 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);
  25368. }
  25369. /**
  25370. * 是否车牌号
  25371. */
  25372. function carNo(value) {
  25373. // 新能源车牌
  25374. var xreg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([0-9]{5}[DF]$)|([DF][A-HJ-NP-Z0-9][0-9]{4}$))/;
  25375. // 旧车牌
  25376. var creg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$/;
  25377. if (value.length === 7) {
  25378. return creg.test(value);
  25379. } else if (value.length === 8) {
  25380. return xreg.test(value);
  25381. } else {
  25382. return false;
  25383. }
  25384. }
  25385. /**
  25386. * 金额,只允许2位小数
  25387. */
  25388. function amount(value) {
  25389. //金额,只允许保留两位小数
  25390. return /^[1-9]\d*(,\d{3})*(\.\d{1,2})?$|^0\.\d{1,2}$/.test(value);
  25391. }
  25392. /**
  25393. * 中文
  25394. */
  25395. function chinese(value) {
  25396. var reg = /^[\u4e00-\u9fa5]+$/gi;
  25397. return reg.test(value);
  25398. }
  25399. /**
  25400. * 只能输入字母
  25401. */
  25402. function letter(value) {
  25403. return /^[a-zA-Z]*$/.test(value);
  25404. }
  25405. /**
  25406. * 只能是字母或者数字
  25407. */
  25408. function enOrNum(value) {
  25409. //英文或者数字
  25410. var reg = /^[0-9a-zA-Z]*$/g;
  25411. return reg.test(value);
  25412. }
  25413. /**
  25414. * 验证是否包含某个值
  25415. */
  25416. function contains(value, param) {
  25417. return value.indexOf(param) >= 0;
  25418. }
  25419. /**
  25420. * 验证一个值范围[min, max]
  25421. */
  25422. function range(value, param) {
  25423. return value >= param[0] && value <= param[1];
  25424. }
  25425. /**
  25426. * 验证一个长度范围[min, max]
  25427. */
  25428. function rangeLength(value, param) {
  25429. return value.length >= param[0] && value.length <= param[1];
  25430. }
  25431. /**
  25432. * 是否固定电话
  25433. */
  25434. function landline(value) {
  25435. var reg = /^\d{3,4}-\d{7,8}(-\d{3,4})?$/;
  25436. return reg.test(value);
  25437. }
  25438. /**
  25439. * 判断是否为空
  25440. */
  25441. function empty(value) {
  25442. switch ((0, _typeof2.default)(value)) {
  25443. case 'undefined':
  25444. return true;
  25445. case 'string':
  25446. if (value.replace(/(^[ \t\n\r]*)|([ \t\n\r]*$)/g, '').length == 0) return true;
  25447. break;
  25448. case 'boolean':
  25449. if (!value) return true;
  25450. break;
  25451. case 'number':
  25452. if (0 === value || isNaN(value)) return true;
  25453. break;
  25454. case 'object':
  25455. if (null === value || value.length === 0) return true;
  25456. for (var i in value) {
  25457. return false;
  25458. }
  25459. return true;
  25460. }
  25461. return false;
  25462. }
  25463. /**
  25464. * 是否json字符串
  25465. */
  25466. function jsonString(value) {
  25467. if (typeof value == 'string') {
  25468. try {
  25469. var obj = JSON.parse(value);
  25470. if ((0, _typeof2.default)(obj) == 'object' && obj) {
  25471. return true;
  25472. } else {
  25473. return false;
  25474. }
  25475. } catch (e) {
  25476. return false;
  25477. }
  25478. }
  25479. return false;
  25480. }
  25481. /**
  25482. * 是否数组
  25483. */
  25484. function array(value) {
  25485. if (typeof Array.isArray === "function") {
  25486. return Array.isArray(value);
  25487. } else {
  25488. return Object.prototype.toString.call(value) === "[object Array]";
  25489. }
  25490. }
  25491. /**
  25492. * 是否对象
  25493. */
  25494. function object(value) {
  25495. return Object.prototype.toString.call(value) === '[object Object]';
  25496. }
  25497. /**
  25498. * 是否短信验证码
  25499. */
  25500. function code(value) {
  25501. var len = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 6;
  25502. return new RegExp("^\\d{".concat(len, "}$")).test(value);
  25503. }
  25504. var _default = {
  25505. email: email,
  25506. mobile: mobile,
  25507. url: url,
  25508. date: date,
  25509. dateISO: dateISO,
  25510. number: number,
  25511. digits: digits,
  25512. idCard: idCard,
  25513. carNo: carNo,
  25514. amount: amount,
  25515. chinese: chinese,
  25516. letter: letter,
  25517. enOrNum: enOrNum,
  25518. contains: contains,
  25519. range: range,
  25520. rangeLength: rangeLength,
  25521. empty: empty,
  25522. isEmpty: empty,
  25523. jsonString: jsonString,
  25524. landline: landline,
  25525. object: object,
  25526. array: array,
  25527. code: code
  25528. };
  25529. exports.default = _default;
  25530. /***/ }),
  25531. /***/ 48:
  25532. /*!*******************************************************************************!*\
  25533. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/libs/function/queryParams.js ***!
  25534. \*******************************************************************************/
  25535. /*! no static exports found */
  25536. /***/ (function(module, exports, __webpack_require__) {
  25537. "use strict";
  25538. Object.defineProperty(exports, "__esModule", {
  25539. value: true
  25540. });
  25541. exports.default = void 0;
  25542. /**
  25543. * 对象转url参数
  25544. * @param {*} data,对象
  25545. * @param {*} isPrefix,是否自动加上"?"
  25546. */
  25547. function queryParams() {
  25548. var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  25549. var isPrefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  25550. var arrayFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'brackets';
  25551. var prefix = isPrefix ? '?' : '';
  25552. var _result = [];
  25553. if (['indices', 'brackets', 'repeat', 'comma'].indexOf(arrayFormat) == -1) arrayFormat = 'brackets';
  25554. var _loop = function _loop(key) {
  25555. var value = data[key];
  25556. // 去掉为空的参数
  25557. if (['', undefined, null].indexOf(value) >= 0) {
  25558. return "continue";
  25559. }
  25560. // 如果值为数组,另行处理
  25561. if (value.constructor === Array) {
  25562. // e.g. {ids: [1, 2, 3]}
  25563. switch (arrayFormat) {
  25564. case 'indices':
  25565. // 结果: ids[0]=1&ids[1]=2&ids[2]=3
  25566. for (var i = 0; i < value.length; i++) {
  25567. _result.push(key + '[' + i + ']=' + value[i]);
  25568. }
  25569. break;
  25570. case 'brackets':
  25571. // 结果: ids[]=1&ids[]=2&ids[]=3
  25572. value.forEach(function (_value) {
  25573. _result.push(key + '[]=' + _value);
  25574. });
  25575. break;
  25576. case 'repeat':
  25577. // 结果: ids=1&ids=2&ids=3
  25578. value.forEach(function (_value) {
  25579. _result.push(key + '=' + _value);
  25580. });
  25581. break;
  25582. case 'comma':
  25583. // 结果: ids=1,2,3
  25584. var commaStr = "";
  25585. value.forEach(function (_value) {
  25586. commaStr += (commaStr ? "," : "") + _value;
  25587. });
  25588. _result.push(key + '=' + commaStr);
  25589. break;
  25590. default:
  25591. value.forEach(function (_value) {
  25592. _result.push(key + '[]=' + _value);
  25593. });
  25594. }
  25595. } else {
  25596. _result.push(key + '=' + value);
  25597. }
  25598. };
  25599. for (var key in data) {
  25600. var _ret = _loop(key);
  25601. if (_ret === "continue") continue;
  25602. }
  25603. return _result.length ? prefix + _result.join('&') : '';
  25604. }
  25605. var _default = queryParams;
  25606. exports.default = _default;
  25607. /***/ }),
  25608. /***/ 484:
  25609. /*!************************************************************************************!*\
  25610. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/uni-cloud/dist/index.js ***!
  25611. \************************************************************************************/
  25612. /*! no static exports found */
  25613. /***/ (function(module, exports, __webpack_require__) {
  25614. "use strict";
  25615. /* WEBPACK VAR INJECTION */(function(global, uni, wx) {
  25616. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  25617. Object.defineProperty(exports, "__esModule", {
  25618. value: true
  25619. });
  25620. exports.default = void 0;
  25621. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 50));
  25622. var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ 485));
  25623. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  25624. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  25625. var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 18));
  25626. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 52));
  25627. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  25628. var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ 486));
  25629. var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ 487));
  25630. var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ 488));
  25631. var _wrapNativeSuper2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/wrapNativeSuper */ 489));
  25632. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  25633. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  25634. var _uniI18n = __webpack_require__(/*! @dcloudio/uni-i18n */ 22);
  25635. var _pages = _interopRequireDefault(__webpack_require__(/*! @/pages.json */ 491));
  25636. 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; } } }; }
  25637. 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); }
  25638. 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; }
  25639. 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; }
  25640. 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; }
  25641. 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); }; }
  25642. 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; } }
  25643. "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self && self;
  25644. function n(e) {
  25645. return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
  25646. }
  25647. function s(e, t, n) {
  25648. return e(n = {
  25649. path: t,
  25650. exports: {},
  25651. require: function require(e, t) {
  25652. return function () {
  25653. throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs");
  25654. }(null == t && n.path);
  25655. }
  25656. }, n.exports), n.exports;
  25657. }
  25658. var r = s(function (e, t) {
  25659. var n;
  25660. e.exports = (n = n || function (e, t) {
  25661. var n = Object.create || function () {
  25662. function e() {}
  25663. return function (t) {
  25664. var n;
  25665. return e.prototype = t, n = new e(), e.prototype = null, n;
  25666. };
  25667. }(),
  25668. s = {},
  25669. r = s.lib = {},
  25670. i = r.Base = {
  25671. extend: function extend(e) {
  25672. var t = n(this);
  25673. return e && t.mixIn(e), t.hasOwnProperty("init") && this.init !== t.init || (t.init = function () {
  25674. t.$super.init.apply(this, arguments);
  25675. }), t.init.prototype = t, t.$super = this, t;
  25676. },
  25677. create: function create() {
  25678. var e = this.extend();
  25679. return e.init.apply(e, arguments), e;
  25680. },
  25681. init: function init() {},
  25682. mixIn: function mixIn(e) {
  25683. for (var t in e) {
  25684. e.hasOwnProperty(t) && (this[t] = e[t]);
  25685. }
  25686. e.hasOwnProperty("toString") && (this.toString = e.toString);
  25687. },
  25688. clone: function clone() {
  25689. return this.init.prototype.extend(this);
  25690. }
  25691. },
  25692. o = r.WordArray = i.extend({
  25693. init: function init(e, n) {
  25694. e = this.words = e || [], this.sigBytes = n != t ? n : 4 * e.length;
  25695. },
  25696. toString: function toString(e) {
  25697. return (e || c).stringify(this);
  25698. },
  25699. concat: function concat(e) {
  25700. var t = this.words,
  25701. n = e.words,
  25702. s = this.sigBytes,
  25703. r = e.sigBytes;
  25704. if (this.clamp(), s % 4) for (var i = 0; i < r; i++) {
  25705. var o = n[i >>> 2] >>> 24 - i % 4 * 8 & 255;
  25706. t[s + i >>> 2] |= o << 24 - (s + i) % 4 * 8;
  25707. } else for (i = 0; i < r; i += 4) {
  25708. t[s + i >>> 2] = n[i >>> 2];
  25709. }
  25710. return this.sigBytes += r, this;
  25711. },
  25712. clamp: function clamp() {
  25713. var t = this.words,
  25714. n = this.sigBytes;
  25715. t[n >>> 2] &= 4294967295 << 32 - n % 4 * 8, t.length = e.ceil(n / 4);
  25716. },
  25717. clone: function clone() {
  25718. var e = i.clone.call(this);
  25719. return e.words = this.words.slice(0), e;
  25720. },
  25721. random: function random(t) {
  25722. for (var n, s = [], r = function r(t) {
  25723. t = t;
  25724. var n = 987654321,
  25725. s = 4294967295;
  25726. return function () {
  25727. var r = ((n = 36969 * (65535 & n) + (n >> 16) & s) << 16) + (t = 18e3 * (65535 & t) + (t >> 16) & s) & s;
  25728. return r /= 4294967296, (r += .5) * (e.random() > .5 ? 1 : -1);
  25729. };
  25730. }, i = 0; i < t; i += 4) {
  25731. var a = r(4294967296 * (n || e.random()));
  25732. n = 987654071 * a(), s.push(4294967296 * a() | 0);
  25733. }
  25734. return new o.init(s, t);
  25735. }
  25736. }),
  25737. a = s.enc = {},
  25738. c = a.Hex = {
  25739. stringify: function stringify(e) {
  25740. for (var t = e.words, n = e.sigBytes, s = [], r = 0; r < n; r++) {
  25741. var i = t[r >>> 2] >>> 24 - r % 4 * 8 & 255;
  25742. s.push((i >>> 4).toString(16)), s.push((15 & i).toString(16));
  25743. }
  25744. return s.join("");
  25745. },
  25746. parse: function parse(e) {
  25747. for (var t = e.length, n = [], s = 0; s < t; s += 2) {
  25748. n[s >>> 3] |= parseInt(e.substr(s, 2), 16) << 24 - s % 8 * 4;
  25749. }
  25750. return new o.init(n, t / 2);
  25751. }
  25752. },
  25753. u = a.Latin1 = {
  25754. stringify: function stringify(e) {
  25755. for (var t = e.words, n = e.sigBytes, s = [], r = 0; r < n; r++) {
  25756. var i = t[r >>> 2] >>> 24 - r % 4 * 8 & 255;
  25757. s.push(String.fromCharCode(i));
  25758. }
  25759. return s.join("");
  25760. },
  25761. parse: function parse(e) {
  25762. for (var t = e.length, n = [], s = 0; s < t; s++) {
  25763. n[s >>> 2] |= (255 & e.charCodeAt(s)) << 24 - s % 4 * 8;
  25764. }
  25765. return new o.init(n, t);
  25766. }
  25767. },
  25768. h = a.Utf8 = {
  25769. stringify: function stringify(e) {
  25770. try {
  25771. return decodeURIComponent(escape(u.stringify(e)));
  25772. } catch (e) {
  25773. throw new Error("Malformed UTF-8 data");
  25774. }
  25775. },
  25776. parse: function parse(e) {
  25777. return u.parse(unescape(encodeURIComponent(e)));
  25778. }
  25779. },
  25780. l = r.BufferedBlockAlgorithm = i.extend({
  25781. reset: function reset() {
  25782. this._data = new o.init(), this._nDataBytes = 0;
  25783. },
  25784. _append: function _append(e) {
  25785. "string" == typeof e && (e = h.parse(e)), this._data.concat(e), this._nDataBytes += e.sigBytes;
  25786. },
  25787. _process: function _process(t) {
  25788. var n = this._data,
  25789. s = n.words,
  25790. r = n.sigBytes,
  25791. i = this.blockSize,
  25792. a = r / (4 * i),
  25793. c = (a = t ? e.ceil(a) : e.max((0 | a) - this._minBufferSize, 0)) * i,
  25794. u = e.min(4 * c, r);
  25795. if (c) {
  25796. for (var h = 0; h < c; h += i) {
  25797. this._doProcessBlock(s, h);
  25798. }
  25799. var l = s.splice(0, c);
  25800. n.sigBytes -= u;
  25801. }
  25802. return new o.init(l, u);
  25803. },
  25804. clone: function clone() {
  25805. var e = i.clone.call(this);
  25806. return e._data = this._data.clone(), e;
  25807. },
  25808. _minBufferSize: 0
  25809. });
  25810. r.Hasher = l.extend({
  25811. cfg: i.extend(),
  25812. init: function init(e) {
  25813. this.cfg = this.cfg.extend(e), this.reset();
  25814. },
  25815. reset: function reset() {
  25816. l.reset.call(this), this._doReset();
  25817. },
  25818. update: function update(e) {
  25819. return this._append(e), this._process(), this;
  25820. },
  25821. finalize: function finalize(e) {
  25822. return e && this._append(e), this._doFinalize();
  25823. },
  25824. blockSize: 16,
  25825. _createHelper: function _createHelper(e) {
  25826. return function (t, n) {
  25827. return new e.init(n).finalize(t);
  25828. };
  25829. },
  25830. _createHmacHelper: function _createHmacHelper(e) {
  25831. return function (t, n) {
  25832. return new d.HMAC.init(e, n).finalize(t);
  25833. };
  25834. }
  25835. });
  25836. var d = s.algo = {};
  25837. return s;
  25838. }(Math), n);
  25839. }),
  25840. i = r,
  25841. o = (s(function (e, t) {
  25842. var n;
  25843. e.exports = (n = i, function (e) {
  25844. var t = n,
  25845. s = t.lib,
  25846. r = s.WordArray,
  25847. i = s.Hasher,
  25848. o = t.algo,
  25849. a = [];
  25850. !function () {
  25851. for (var t = 0; t < 64; t++) {
  25852. a[t] = 4294967296 * e.abs(e.sin(t + 1)) | 0;
  25853. }
  25854. }();
  25855. var c = o.MD5 = i.extend({
  25856. _doReset: function _doReset() {
  25857. this._hash = new r.init([1732584193, 4023233417, 2562383102, 271733878]);
  25858. },
  25859. _doProcessBlock: function _doProcessBlock(e, t) {
  25860. for (var n = 0; n < 16; n++) {
  25861. var s = t + n,
  25862. r = e[s];
  25863. e[s] = 16711935 & (r << 8 | r >>> 24) | 4278255360 & (r << 24 | r >>> 8);
  25864. }
  25865. var i = this._hash.words,
  25866. o = e[t + 0],
  25867. c = e[t + 1],
  25868. p = e[t + 2],
  25869. f = e[t + 3],
  25870. g = e[t + 4],
  25871. m = e[t + 5],
  25872. y = e[t + 6],
  25873. _ = e[t + 7],
  25874. w = e[t + 8],
  25875. v = e[t + 9],
  25876. I = e[t + 10],
  25877. S = e[t + 11],
  25878. b = e[t + 12],
  25879. k = e[t + 13],
  25880. C = e[t + 14],
  25881. T = e[t + 15],
  25882. P = i[0],
  25883. A = i[1],
  25884. E = i[2],
  25885. O = i[3];
  25886. 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;
  25887. },
  25888. _doFinalize: function _doFinalize() {
  25889. var t = this._data,
  25890. n = t.words,
  25891. s = 8 * this._nDataBytes,
  25892. r = 8 * t.sigBytes;
  25893. n[r >>> 5] |= 128 << 24 - r % 32;
  25894. var i = e.floor(s / 4294967296),
  25895. o = s;
  25896. 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();
  25897. for (var a = this._hash, c = a.words, u = 0; u < 4; u++) {
  25898. var h = c[u];
  25899. c[u] = 16711935 & (h << 8 | h >>> 24) | 4278255360 & (h << 24 | h >>> 8);
  25900. }
  25901. return a;
  25902. },
  25903. clone: function clone() {
  25904. var e = i.clone.call(this);
  25905. return e._hash = this._hash.clone(), e;
  25906. }
  25907. });
  25908. function u(e, t, n, s, r, i, o) {
  25909. var a = e + (t & n | ~t & s) + r + o;
  25910. return (a << i | a >>> 32 - i) + t;
  25911. }
  25912. function h(e, t, n, s, r, i, o) {
  25913. var a = e + (t & s | n & ~s) + r + o;
  25914. return (a << i | a >>> 32 - i) + t;
  25915. }
  25916. function l(e, t, n, s, r, i, o) {
  25917. var a = e + (t ^ n ^ s) + r + o;
  25918. return (a << i | a >>> 32 - i) + t;
  25919. }
  25920. function d(e, t, n, s, r, i, o) {
  25921. var a = e + (n ^ (t | ~s)) + r + o;
  25922. return (a << i | a >>> 32 - i) + t;
  25923. }
  25924. t.MD5 = i._createHelper(c), t.HmacMD5 = i._createHmacHelper(c);
  25925. }(Math), n.MD5);
  25926. }), s(function (e, t) {
  25927. var n;
  25928. e.exports = (n = i, void function () {
  25929. var e = n,
  25930. t = e.lib.Base,
  25931. s = e.enc.Utf8;
  25932. e.algo.HMAC = t.extend({
  25933. init: function init(e, t) {
  25934. e = this._hasher = new e.init(), "string" == typeof t && (t = s.parse(t));
  25935. var n = e.blockSize,
  25936. r = 4 * n;
  25937. t.sigBytes > r && (t = e.finalize(t)), t.clamp();
  25938. for (var i = this._oKey = t.clone(), o = this._iKey = t.clone(), a = i.words, c = o.words, u = 0; u < n; u++) {
  25939. a[u] ^= 1549556828, c[u] ^= 909522486;
  25940. }
  25941. i.sigBytes = o.sigBytes = r, this.reset();
  25942. },
  25943. reset: function reset() {
  25944. var e = this._hasher;
  25945. e.reset(), e.update(this._iKey);
  25946. },
  25947. update: function update(e) {
  25948. return this._hasher.update(e), this;
  25949. },
  25950. finalize: function finalize(e) {
  25951. var t = this._hasher,
  25952. n = t.finalize(e);
  25953. return t.reset(), t.finalize(this._oKey.clone().concat(n));
  25954. }
  25955. });
  25956. }());
  25957. }), s(function (e, t) {
  25958. e.exports = i.HmacMD5;
  25959. })),
  25960. a = s(function (e, t) {
  25961. e.exports = i.enc.Utf8;
  25962. }),
  25963. c = s(function (e, t) {
  25964. var n;
  25965. e.exports = (n = i, function () {
  25966. var e = n,
  25967. t = e.lib.WordArray;
  25968. function s(e, n, s) {
  25969. for (var r = [], i = 0, o = 0; o < n; o++) {
  25970. if (o % 4) {
  25971. var a = s[e.charCodeAt(o - 1)] << o % 4 * 2,
  25972. c = s[e.charCodeAt(o)] >>> 6 - o % 4 * 2;
  25973. r[i >>> 2] |= (a | c) << 24 - i % 4 * 8, i++;
  25974. }
  25975. }
  25976. return t.create(r, i);
  25977. }
  25978. e.enc.Base64 = {
  25979. stringify: function stringify(e) {
  25980. var t = e.words,
  25981. n = e.sigBytes,
  25982. s = this._map;
  25983. e.clamp();
  25984. for (var r = [], i = 0; i < n; i += 3) {
  25985. 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++) {
  25986. r.push(s.charAt(o >>> 6 * (3 - a) & 63));
  25987. }
  25988. }
  25989. var c = s.charAt(64);
  25990. if (c) for (; r.length % 4;) {
  25991. r.push(c);
  25992. }
  25993. return r.join("");
  25994. },
  25995. parse: function parse(e) {
  25996. var t = e.length,
  25997. n = this._map,
  25998. r = this._reverseMap;
  25999. if (!r) {
  26000. r = this._reverseMap = [];
  26001. for (var i = 0; i < n.length; i++) {
  26002. r[n.charCodeAt(i)] = i;
  26003. }
  26004. }
  26005. var o = n.charAt(64);
  26006. if (o) {
  26007. var a = e.indexOf(o);
  26008. -1 !== a && (t = a);
  26009. }
  26010. return s(e, t, r);
  26011. },
  26012. _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
  26013. };
  26014. }(), n.enc.Base64);
  26015. });
  26016. var u = "FUNCTION",
  26017. h = "OBJECT",
  26018. l = "CLIENT_DB",
  26019. d = "pending",
  26020. p = "fullfilled",
  26021. f = "rejected";
  26022. function g(e) {
  26023. return Object.prototype.toString.call(e).slice(8, -1).toLowerCase();
  26024. }
  26025. function m(e) {
  26026. return "object" === g(e);
  26027. }
  26028. function y(e) {
  26029. return "function" == typeof e;
  26030. }
  26031. function _(e) {
  26032. return function () {
  26033. try {
  26034. return e.apply(e, arguments);
  26035. } catch (e) {
  26036. console.error(e);
  26037. }
  26038. };
  26039. }
  26040. var w = "REJECTED",
  26041. v = "NOT_PENDING";
  26042. var I = /*#__PURE__*/function () {
  26043. function I() {
  26044. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  26045. e = _ref.createPromise,
  26046. _ref$retryRule = _ref.retryRule,
  26047. t = _ref$retryRule === void 0 ? w : _ref$retryRule;
  26048. (0, _classCallCheck2.default)(this, I);
  26049. this.createPromise = e, this.status = null, this.promise = null, this.retryRule = t;
  26050. }
  26051. (0, _createClass2.default)(I, [{
  26052. key: "needRetry",
  26053. get: function get() {
  26054. if (!this.status) return !0;
  26055. switch (this.retryRule) {
  26056. case w:
  26057. return this.status === f;
  26058. case v:
  26059. return this.status !== d;
  26060. }
  26061. }
  26062. }, {
  26063. key: "exec",
  26064. value: function exec() {
  26065. var _this = this;
  26066. return this.needRetry ? (this.status = d, this.promise = this.createPromise().then(function (e) {
  26067. return _this.status = p, Promise.resolve(e);
  26068. }, function (e) {
  26069. return _this.status = f, Promise.reject(e);
  26070. }), this.promise) : this.promise;
  26071. }
  26072. }]);
  26073. return I;
  26074. }();
  26075. function S(e) {
  26076. return e && "string" == typeof e ? JSON.parse(e) : e;
  26077. }
  26078. var b = "development" === "development",
  26079. k = "mp-weixin",
  26080. C = "true" === undefined || !0 === undefined,
  26081. T = S([]),
  26082. P = "h5" === k ? "web" : "app-plus" === k ? "app" : k,
  26083. A = S(undefined),
  26084. E = S(undefined) || [],
  26085. O = true;
  26086. var x = "";
  26087. try {
  26088. x = (__webpack_require__(/*! uni-stat-config */ 492).default || __webpack_require__(/*! uni-stat-config */ 492)).appid;
  26089. } catch (e) {}
  26090. var R = {};
  26091. function U(e) {
  26092. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  26093. var n, s;
  26094. return n = R, s = e, Object.prototype.hasOwnProperty.call(n, s) || (R[e] = t), R[e];
  26095. }
  26096. "app" === P && (R = uni._globalUniCloudObj ? uni._globalUniCloudObj : uni._globalUniCloudObj = {});
  26097. var L = ["invoke", "success", "fail", "complete"],
  26098. N = U("_globalUniCloudInterceptor");
  26099. function D(e, t) {
  26100. N[e] || (N[e] = {}), m(t) && Object.keys(t).forEach(function (n) {
  26101. L.indexOf(n) > -1 && function (e, t, n) {
  26102. var s = N[e][t];
  26103. s || (s = N[e][t] = []), -1 === s.indexOf(n) && y(n) && s.push(n);
  26104. }(e, n, t[n]);
  26105. });
  26106. }
  26107. function F(e, t) {
  26108. N[e] || (N[e] = {}), m(t) ? Object.keys(t).forEach(function (n) {
  26109. L.indexOf(n) > -1 && function (e, t, n) {
  26110. var s = N[e][t];
  26111. if (!s) return;
  26112. var r = s.indexOf(n);
  26113. r > -1 && s.splice(r, 1);
  26114. }(e, n, t[n]);
  26115. }) : delete N[e];
  26116. }
  26117. function q(e, t) {
  26118. return e && 0 !== e.length ? e.reduce(function (e, n) {
  26119. return e.then(function () {
  26120. return n(t);
  26121. });
  26122. }, Promise.resolve()) : Promise.resolve();
  26123. }
  26124. function M(e, t) {
  26125. return N[e] && N[e][t] || [];
  26126. }
  26127. function K(e) {
  26128. D("callObject", e);
  26129. }
  26130. var j = U("_globalUniCloudListener"),
  26131. B = "response",
  26132. $ = "needLogin",
  26133. W = "refreshToken",
  26134. z = "clientdb",
  26135. J = "cloudfunction",
  26136. H = "cloudobject";
  26137. function G(e) {
  26138. return j[e] || (j[e] = []), j[e];
  26139. }
  26140. function V(e, t) {
  26141. var n = G(e);
  26142. n.includes(t) || n.push(t);
  26143. }
  26144. function Y(e, t) {
  26145. var n = G(e),
  26146. s = n.indexOf(t);
  26147. -1 !== s && n.splice(s, 1);
  26148. }
  26149. function Q(e, t) {
  26150. var n = G(e);
  26151. for (var _e2 = 0; _e2 < n.length; _e2++) {
  26152. (0, n[_e2])(t);
  26153. }
  26154. }
  26155. var X,
  26156. Z = !1;
  26157. function ee() {
  26158. return X || (X = new Promise(function (e) {
  26159. Z && e(), function t() {
  26160. if ("function" == typeof getCurrentPages) {
  26161. var _t2 = getCurrentPages();
  26162. _t2 && _t2[0] && (Z = !0, e());
  26163. }
  26164. Z || setTimeout(function () {
  26165. t();
  26166. }, 30);
  26167. }();
  26168. }), X);
  26169. }
  26170. function te(e) {
  26171. var t = {};
  26172. for (var _n2 in e) {
  26173. var _s2 = e[_n2];
  26174. y(_s2) && (t[_n2] = _(_s2));
  26175. }
  26176. return t;
  26177. }
  26178. var ne = /*#__PURE__*/function (_Error) {
  26179. (0, _inherits2.default)(ne, _Error);
  26180. var _super = _createSuper(ne);
  26181. function ne(e) {
  26182. var _this2;
  26183. (0, _classCallCheck2.default)(this, ne);
  26184. _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;
  26185. return _this2;
  26186. }
  26187. (0, _createClass2.default)(ne, [{
  26188. key: "toJson",
  26189. value: function toJson() {
  26190. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
  26191. if (!(e >= 10)) return e++, {
  26192. errCode: this.errCode,
  26193. errMsg: this.errMsg,
  26194. errSubject: this.errSubject,
  26195. cause: this.cause && this.cause.toJson ? this.cause.toJson(e) : this.cause
  26196. };
  26197. }
  26198. }]);
  26199. return ne;
  26200. }( /*#__PURE__*/(0, _wrapNativeSuper2.default)(Error));
  26201. var se = {
  26202. request: function request(e) {
  26203. return uni.request(e);
  26204. },
  26205. uploadFile: function uploadFile(e) {
  26206. return uni.uploadFile(e);
  26207. },
  26208. setStorageSync: function setStorageSync(e, t) {
  26209. return uni.setStorageSync(e, t);
  26210. },
  26211. getStorageSync: function getStorageSync(e) {
  26212. return uni.getStorageSync(e);
  26213. },
  26214. removeStorageSync: function removeStorageSync(e) {
  26215. return uni.removeStorageSync(e);
  26216. },
  26217. clearStorageSync: function clearStorageSync() {
  26218. return uni.clearStorageSync();
  26219. }
  26220. };
  26221. function re() {
  26222. return {
  26223. token: se.getStorageSync("uni_id_token") || se.getStorageSync("uniIdToken"),
  26224. tokenExpired: se.getStorageSync("uni_id_token_expired")
  26225. };
  26226. }
  26227. function ie() {
  26228. var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  26229. e = _ref2.token,
  26230. t = _ref2.tokenExpired;
  26231. e && se.setStorageSync("uni_id_token", e), t && se.setStorageSync("uni_id_token_expired", t);
  26232. }
  26233. var oe, ae;
  26234. function ce() {
  26235. return oe || (oe = uni.getSystemInfoSync()), oe;
  26236. }
  26237. function ue() {
  26238. var e, t;
  26239. try {
  26240. if (uni.getLaunchOptionsSync) {
  26241. if (uni.getLaunchOptionsSync.toString().indexOf("not yet implemented") > -1) return;
  26242. var _uni$getLaunchOptions = uni.getLaunchOptionsSync(),
  26243. _n3 = _uni$getLaunchOptions.scene,
  26244. _s3 = _uni$getLaunchOptions.channel;
  26245. e = _s3, t = _n3;
  26246. }
  26247. } catch (e) {}
  26248. return {
  26249. channel: e,
  26250. scene: t
  26251. };
  26252. }
  26253. function he() {
  26254. var e = uni.getLocale && uni.getLocale() || "en";
  26255. if (ae) return _objectSpread(_objectSpread({}, ae), {}, {
  26256. locale: e,
  26257. LOCALE: e
  26258. });
  26259. var t = ce(),
  26260. n = t.deviceId,
  26261. s = t.osName,
  26262. r = t.uniPlatform,
  26263. i = t.appId,
  26264. o = ["pixelRatio", "brand", "model", "system", "language", "version", "platform", "host", "SDKVersion", "swanNativeVersion", "app", "AppPlatform", "fontSizeSetting"];
  26265. for (var _e3 = 0; _e3 < o.length; _e3++) {
  26266. delete t[o[_e3]];
  26267. }
  26268. return ae = _objectSpread(_objectSpread({
  26269. PLATFORM: r,
  26270. OS: s,
  26271. APPID: i,
  26272. DEVICEID: n
  26273. }, ue()), t), _objectSpread(_objectSpread({}, ae), {}, {
  26274. locale: e,
  26275. LOCALE: e
  26276. });
  26277. }
  26278. var le = {
  26279. sign: function sign(e, t) {
  26280. var n = "";
  26281. return Object.keys(e).sort().forEach(function (t) {
  26282. e[t] && (n = n + "&" + t + "=" + e[t]);
  26283. }), n = n.slice(1), o(n, t).toString();
  26284. },
  26285. wrappedRequest: function wrappedRequest(e, t) {
  26286. return new Promise(function (n, s) {
  26287. t(Object.assign(e, {
  26288. complete: function complete(e) {
  26289. 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");
  26290. var t = e.data && e.data.header && e.data.header["x-serverless-request-id"] || e.header && e.header["request-id"];
  26291. if (!e.statusCode || e.statusCode >= 400) return s(new ne({
  26292. code: "SYS_ERR",
  26293. message: e.errMsg || "request:fail",
  26294. requestId: t
  26295. }));
  26296. var r = e.data;
  26297. if (r.error) return s(new ne({
  26298. code: r.error.code,
  26299. message: r.error.message,
  26300. requestId: t
  26301. }));
  26302. r.result = r.data, r.requestId = t, delete r.data, n(r);
  26303. }
  26304. }));
  26305. });
  26306. },
  26307. toBase64: function toBase64(e) {
  26308. return c.stringify(a.parse(e));
  26309. }
  26310. },
  26311. de = {
  26312. "uniCloud.init.paramRequired": "{param} required",
  26313. "uniCloud.uploadFile.fileError": "filePath should be instance of File"
  26314. };
  26315. var _e4 = (0, _uniI18n.initVueI18n)({
  26316. "zh-Hans": {
  26317. "uniCloud.init.paramRequired": "缺少参数:{param}",
  26318. "uniCloud.uploadFile.fileError": "filePath应为File对象"
  26319. },
  26320. "zh-Hant": {
  26321. "uniCloud.init.paramRequired": "缺少参数:{param}",
  26322. "uniCloud.uploadFile.fileError": "filePath应为File对象"
  26323. },
  26324. en: de,
  26325. fr: {
  26326. "uniCloud.init.paramRequired": "{param} required",
  26327. "uniCloud.uploadFile.fileError": "filePath should be instance of File"
  26328. },
  26329. es: {
  26330. "uniCloud.init.paramRequired": "{param} required",
  26331. "uniCloud.uploadFile.fileError": "filePath should be instance of File"
  26332. },
  26333. ja: de
  26334. }, "zh-Hans"),
  26335. pe = _e4.t;
  26336. var fe = /*#__PURE__*/function () {
  26337. function fe(e) {
  26338. var _this3 = this;
  26339. (0, _classCallCheck2.default)(this, fe);
  26340. ["spaceId", "clientSecret"].forEach(function (t) {
  26341. if (!Object.prototype.hasOwnProperty.call(e, t)) throw new Error(pe("uniCloud.init.paramRequired", {
  26342. param: t
  26343. }));
  26344. }), this.config = Object.assign({}, {
  26345. endpoint: 0 === e.spaceId.indexOf("mp-") ? "https://api.next.bspapp.com" : "https://api.bspapp.com"
  26346. }, 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({
  26347. createPromise: function createPromise() {
  26348. return _this3.requestAuth(_this3.setupRequest({
  26349. method: "serverless.auth.user.anonymousAuthorize",
  26350. params: "{}"
  26351. }, "auth")).then(function (e) {
  26352. if (!e.result || !e.result.accessToken) throw new ne({
  26353. code: "AUTH_FAILED",
  26354. message: "获取accessToken失败"
  26355. });
  26356. _this3.setAccessToken(e.result.accessToken);
  26357. });
  26358. },
  26359. retryRule: v
  26360. });
  26361. }
  26362. (0, _createClass2.default)(fe, [{
  26363. key: "hasAccessToken",
  26364. get: function get() {
  26365. return !!this.accessToken;
  26366. }
  26367. }, {
  26368. key: "setAccessToken",
  26369. value: function setAccessToken(e) {
  26370. this.accessToken = e;
  26371. }
  26372. }, {
  26373. key: "requestWrapped",
  26374. value: function requestWrapped(e) {
  26375. return le.wrappedRequest(e, this.adapter.request);
  26376. }
  26377. }, {
  26378. key: "requestAuth",
  26379. value: function requestAuth(e) {
  26380. return this.requestWrapped(e);
  26381. }
  26382. }, {
  26383. key: "request",
  26384. value: function request(e, t) {
  26385. var _this4 = this;
  26386. return Promise.resolve().then(function () {
  26387. return _this4.hasAccessToken ? t ? _this4.requestWrapped(e) : _this4.requestWrapped(e).catch(function (t) {
  26388. return new Promise(function (e, n) {
  26389. !t || "GATEWAY_INVALID_TOKEN" !== t.code && "InvalidParameter.InvalidToken" !== t.code ? n(t) : e();
  26390. }).then(function () {
  26391. return _this4.getAccessToken();
  26392. }).then(function () {
  26393. var t = _this4.rebuildRequest(e);
  26394. return _this4.request(t, !0);
  26395. });
  26396. }) : _this4.getAccessToken().then(function () {
  26397. var t = _this4.rebuildRequest(e);
  26398. return _this4.request(t, !0);
  26399. });
  26400. });
  26401. }
  26402. }, {
  26403. key: "rebuildRequest",
  26404. value: function rebuildRequest(e) {
  26405. var t = Object.assign({}, e);
  26406. 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;
  26407. }
  26408. }, {
  26409. key: "setupRequest",
  26410. value: function setupRequest(e, t) {
  26411. var n = Object.assign({}, e, {
  26412. spaceId: this.config.spaceId,
  26413. timestamp: Date.now()
  26414. }),
  26415. s = {
  26416. "Content-Type": "application/json"
  26417. };
  26418. return "auth" !== t && (n.token = this.accessToken, s["x-basement-token"] = this.accessToken), s["x-serverless-sign"] = le.sign(n, this.config.clientSecret), {
  26419. url: this.config.requestUrl,
  26420. method: "POST",
  26421. data: n,
  26422. dataType: "json",
  26423. header: s
  26424. };
  26425. }
  26426. }, {
  26427. key: "getAccessToken",
  26428. value: function getAccessToken() {
  26429. return this._getAccessTokenPromiseHub.exec();
  26430. }
  26431. }, {
  26432. key: "authorize",
  26433. value: function () {
  26434. var _authorize = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
  26435. return _regenerator.default.wrap(function _callee$(_context) {
  26436. while (1) {
  26437. switch (_context.prev = _context.next) {
  26438. case 0:
  26439. _context.next = 2;
  26440. return this.getAccessToken();
  26441. case 2:
  26442. case "end":
  26443. return _context.stop();
  26444. }
  26445. }
  26446. }, _callee, this);
  26447. }));
  26448. function authorize() {
  26449. return _authorize.apply(this, arguments);
  26450. }
  26451. return authorize;
  26452. }()
  26453. }, {
  26454. key: "callFunction",
  26455. value: function callFunction(e) {
  26456. var t = {
  26457. method: "serverless.function.runtime.invoke",
  26458. params: JSON.stringify({
  26459. functionTarget: e.name,
  26460. functionArgs: e.data || {}
  26461. })
  26462. };
  26463. return this.request(this.setupRequest(t));
  26464. }
  26465. }, {
  26466. key: "getOSSUploadOptionsFromPath",
  26467. value: function getOSSUploadOptionsFromPath(e) {
  26468. var t = {
  26469. method: "serverless.file.resource.generateProximalSign",
  26470. params: JSON.stringify(e)
  26471. };
  26472. return this.request(this.setupRequest(t));
  26473. }
  26474. }, {
  26475. key: "uploadFileToOSS",
  26476. value: function uploadFileToOSS(_ref3) {
  26477. var _this5 = this;
  26478. var e = _ref3.url,
  26479. t = _ref3.formData,
  26480. n = _ref3.name,
  26481. s = _ref3.filePath,
  26482. r = _ref3.fileType,
  26483. i = _ref3.onUploadProgress;
  26484. return new Promise(function (o, a) {
  26485. var c = _this5.adapter.uploadFile({
  26486. url: e,
  26487. formData: t,
  26488. name: n,
  26489. filePath: s,
  26490. fileType: r,
  26491. header: {
  26492. "X-OSS-server-side-encrpytion": "AES256"
  26493. },
  26494. success: function success(e) {
  26495. e && e.statusCode < 400 ? o(e) : a(new ne({
  26496. code: "UPLOAD_FAILED",
  26497. message: "文件上传失败"
  26498. }));
  26499. },
  26500. fail: function fail(e) {
  26501. a(new ne({
  26502. code: e.code || "UPLOAD_FAILED",
  26503. message: e.message || e.errMsg || "文件上传失败"
  26504. }));
  26505. }
  26506. });
  26507. "function" == typeof i && c && "function" == typeof c.onProgressUpdate && c.onProgressUpdate(function (e) {
  26508. i({
  26509. loaded: e.totalBytesSent,
  26510. total: e.totalBytesExpectedToSend
  26511. });
  26512. });
  26513. });
  26514. }
  26515. }, {
  26516. key: "reportOSSUpload",
  26517. value: function reportOSSUpload(e) {
  26518. var t = {
  26519. method: "serverless.file.resource.report",
  26520. params: JSON.stringify(e)
  26521. };
  26522. return this.request(this.setupRequest(t));
  26523. }
  26524. }, {
  26525. key: "uploadFile",
  26526. value: function () {
  26527. var _uploadFile = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(_ref4) {
  26528. var e, t, _ref4$fileType, n, _ref4$cloudPathAsReal, s, r, i, o, a, c, u, h, l, d, p, f, m, y, _, _e5, w;
  26529. return _regenerator.default.wrap(function _callee2$(_context2) {
  26530. while (1) {
  26531. switch (_context2.prev = _context2.next) {
  26532. case 0:
  26533. 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;
  26534. if (!("string" !== g(t))) {
  26535. _context2.next = 3;
  26536. break;
  26537. }
  26538. throw new ne({
  26539. code: "INVALID_PARAM",
  26540. message: "cloudPath必须为字符串类型"
  26541. });
  26542. case 3:
  26543. if (t = t.trim()) {
  26544. _context2.next = 5;
  26545. break;
  26546. }
  26547. throw new ne({
  26548. code: "INVALID_PARAM",
  26549. message: "cloudPath不可为空"
  26550. });
  26551. case 5:
  26552. if (!/:\/\//.test(t)) {
  26553. _context2.next = 7;
  26554. break;
  26555. }
  26556. throw new ne({
  26557. code: "INVALID_PARAM",
  26558. message: "cloudPath不合法"
  26559. });
  26560. case 7:
  26561. o = i && i.envType || this.config.envType;
  26562. if (!(s && ("/" !== t[0] && (t = "/" + t), t.indexOf("\\") > -1))) {
  26563. _context2.next = 10;
  26564. break;
  26565. }
  26566. throw new ne({
  26567. code: "INVALID_PARAM",
  26568. message: "使用cloudPath作为路径时,cloudPath不可包含“\\”"
  26569. });
  26570. case 10:
  26571. _context2.next = 12;
  26572. return this.getOSSUploadOptionsFromPath({
  26573. env: o,
  26574. filename: s ? t.split("/").pop() : t,
  26575. fileId: s ? t : void 0
  26576. });
  26577. case 12:
  26578. a = _context2.sent.result;
  26579. c = "https://" + a.cdnDomain + "/" + a.ossPath;
  26580. u = a.securityToken;
  26581. h = a.accessKeyId;
  26582. l = a.signature;
  26583. d = a.host;
  26584. p = a.ossPath;
  26585. f = a.id;
  26586. m = a.policy;
  26587. y = a.ossCallbackUrl;
  26588. _ = {
  26589. "Cache-Control": "max-age=2592000",
  26590. "Content-Disposition": "attachment",
  26591. OSSAccessKeyId: h,
  26592. Signature: l,
  26593. host: d,
  26594. id: f,
  26595. key: p,
  26596. policy: m,
  26597. success_action_status: 200
  26598. };
  26599. if (u && (_["x-oss-security-token"] = u), y) {
  26600. _e5 = JSON.stringify({
  26601. callbackUrl: y,
  26602. callbackBody: JSON.stringify({
  26603. fileId: f,
  26604. spaceId: this.config.spaceId
  26605. }),
  26606. callbackBodyType: "application/json"
  26607. });
  26608. _.callback = le.toBase64(_e5);
  26609. }
  26610. w = {
  26611. url: "https://" + a.host,
  26612. formData: _,
  26613. fileName: "file",
  26614. name: "file",
  26615. filePath: e,
  26616. fileType: n
  26617. };
  26618. _context2.next = 27;
  26619. return this.uploadFileToOSS(Object.assign({}, w, {
  26620. onUploadProgress: r
  26621. }));
  26622. case 27:
  26623. if (!y) {
  26624. _context2.next = 29;
  26625. break;
  26626. }
  26627. return _context2.abrupt("return", {
  26628. success: !0,
  26629. filePath: e,
  26630. fileID: c
  26631. });
  26632. case 29:
  26633. _context2.next = 31;
  26634. return this.reportOSSUpload({
  26635. id: f
  26636. });
  26637. case 31:
  26638. if (!_context2.sent.success) {
  26639. _context2.next = 33;
  26640. break;
  26641. }
  26642. return _context2.abrupt("return", {
  26643. success: !0,
  26644. filePath: e,
  26645. fileID: c
  26646. });
  26647. case 33:
  26648. throw new ne({
  26649. code: "UPLOAD_FAILED",
  26650. message: "文件上传失败"
  26651. });
  26652. case 34:
  26653. case "end":
  26654. return _context2.stop();
  26655. }
  26656. }
  26657. }, _callee2, this);
  26658. }));
  26659. function uploadFile(_x) {
  26660. return _uploadFile.apply(this, arguments);
  26661. }
  26662. return uploadFile;
  26663. }()
  26664. }, {
  26665. key: "getTempFileURL",
  26666. value: function getTempFileURL() {
  26667. var _ref5 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  26668. e = _ref5.fileList;
  26669. return new Promise(function (t, n) {
  26670. Array.isArray(e) && 0 !== e.length || n(new ne({
  26671. code: "INVALID_PARAM",
  26672. message: "fileList的元素必须是非空的字符串"
  26673. })), t({
  26674. fileList: e.map(function (e) {
  26675. return {
  26676. fileID: e,
  26677. tempFileURL: e
  26678. };
  26679. })
  26680. });
  26681. });
  26682. }
  26683. }, {
  26684. key: "getFileInfo",
  26685. value: function () {
  26686. var _getFileInfo = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
  26687. var _ref6,
  26688. e,
  26689. t,
  26690. _args3 = arguments;
  26691. return _regenerator.default.wrap(function _callee3$(_context3) {
  26692. while (1) {
  26693. switch (_context3.prev = _context3.next) {
  26694. case 0:
  26695. _ref6 = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {}, e = _ref6.fileList;
  26696. if (!(!Array.isArray(e) || 0 === e.length)) {
  26697. _context3.next = 3;
  26698. break;
  26699. }
  26700. throw new ne({
  26701. code: "INVALID_PARAM",
  26702. message: "fileList的元素必须是非空的字符串"
  26703. });
  26704. case 3:
  26705. t = {
  26706. method: "serverless.file.resource.info",
  26707. params: JSON.stringify({
  26708. id: e.map(function (e) {
  26709. return e.split("?")[0];
  26710. }).join(",")
  26711. })
  26712. };
  26713. _context3.next = 6;
  26714. return this.request(this.setupRequest(t));
  26715. case 6:
  26716. _context3.t0 = _context3.sent.result;
  26717. return _context3.abrupt("return", {
  26718. fileList: _context3.t0
  26719. });
  26720. case 8:
  26721. case "end":
  26722. return _context3.stop();
  26723. }
  26724. }
  26725. }, _callee3, this);
  26726. }));
  26727. function getFileInfo() {
  26728. return _getFileInfo.apply(this, arguments);
  26729. }
  26730. return getFileInfo;
  26731. }()
  26732. }]);
  26733. return fe;
  26734. }();
  26735. var ge = {
  26736. init: function init(e) {
  26737. var t = new fe(e),
  26738. n = {
  26739. signInAnonymously: function signInAnonymously() {
  26740. return t.authorize();
  26741. },
  26742. getLoginState: function getLoginState() {
  26743. return Promise.resolve(!1);
  26744. }
  26745. };
  26746. return t.auth = function () {
  26747. return n;
  26748. }, t.customAuth = t.auth, t;
  26749. }
  26750. };
  26751. var me = "undefined" != typeof location && "http:" === location.protocol ? "http:" : "https:";
  26752. var ye;
  26753. !function (e) {
  26754. e.local = "local", e.none = "none", e.session = "session";
  26755. }(ye || (ye = {}));
  26756. var _e = function _e() {};
  26757. var we = function we() {
  26758. var e;
  26759. if (!Promise) {
  26760. e = function e() {}, e.promise = {};
  26761. var _t3 = function _t3() {
  26762. throw new ne({
  26763. message: 'Your Node runtime does support ES6 Promises. Set "global.Promise" to your preferred implementation of promises.'
  26764. });
  26765. };
  26766. return Object.defineProperty(e.promise, "then", {
  26767. get: _t3
  26768. }), Object.defineProperty(e.promise, "catch", {
  26769. get: _t3
  26770. }), e;
  26771. }
  26772. var t = new Promise(function (t, n) {
  26773. e = function e(_e6, s) {
  26774. return _e6 ? n(_e6) : t(s);
  26775. };
  26776. });
  26777. return e.promise = t, e;
  26778. };
  26779. function ve(e) {
  26780. return void 0 === e;
  26781. }
  26782. function Ie(e) {
  26783. return "[object Null]" === Object.prototype.toString.call(e);
  26784. }
  26785. var Se;
  26786. function be(e) {
  26787. var t = (n = e, "[object Array]" === Object.prototype.toString.call(n) ? e : [e]);
  26788. var n;
  26789. var _iterator = _createForOfIteratorHelper(t),
  26790. _step;
  26791. try {
  26792. for (_iterator.s(); !(_step = _iterator.n()).done;) {
  26793. var _e7 = _step.value;
  26794. var _t4 = _e7.isMatch,
  26795. _n4 = _e7.genAdapter,
  26796. _s4 = _e7.runtime;
  26797. if (_t4()) return {
  26798. adapter: _n4(),
  26799. runtime: _s4
  26800. };
  26801. }
  26802. } catch (err) {
  26803. _iterator.e(err);
  26804. } finally {
  26805. _iterator.f();
  26806. }
  26807. }
  26808. !function (e) {
  26809. e.WEB = "web", e.WX_MP = "wx_mp";
  26810. }(Se || (Se = {}));
  26811. var ke = {
  26812. adapter: null,
  26813. runtime: void 0
  26814. },
  26815. Ce = ["anonymousUuidKey"];
  26816. var Te = /*#__PURE__*/function (_e8) {
  26817. (0, _inherits2.default)(Te, _e8);
  26818. var _super2 = _createSuper(Te);
  26819. function Te() {
  26820. var _this6;
  26821. (0, _classCallCheck2.default)(this, Te);
  26822. _this6 = _super2.call(this), ke.adapter.root.tcbObject || (ke.adapter.root.tcbObject = {});
  26823. return _this6;
  26824. }
  26825. (0, _createClass2.default)(Te, [{
  26826. key: "setItem",
  26827. value: function setItem(e, t) {
  26828. ke.adapter.root.tcbObject[e] = t;
  26829. }
  26830. }, {
  26831. key: "getItem",
  26832. value: function getItem(e) {
  26833. return ke.adapter.root.tcbObject[e];
  26834. }
  26835. }, {
  26836. key: "removeItem",
  26837. value: function removeItem(e) {
  26838. delete ke.adapter.root.tcbObject[e];
  26839. }
  26840. }, {
  26841. key: "clear",
  26842. value: function clear() {
  26843. delete ke.adapter.root.tcbObject;
  26844. }
  26845. }]);
  26846. return Te;
  26847. }(_e);
  26848. function Pe(e, t) {
  26849. switch (e) {
  26850. case "local":
  26851. return t.localStorage || new Te();
  26852. case "none":
  26853. return new Te();
  26854. default:
  26855. return t.sessionStorage || new Te();
  26856. }
  26857. }
  26858. var Ae = /*#__PURE__*/function () {
  26859. function Ae(e) {
  26860. (0, _classCallCheck2.default)(this, Ae);
  26861. if (!this._storage) {
  26862. this._persistence = ke.adapter.primaryStorage || e.persistence, this._storage = Pe(this._persistence, ke.adapter);
  26863. var _t5 = "access_token_".concat(e.env),
  26864. _n5 = "access_token_expire_".concat(e.env),
  26865. _s5 = "refresh_token_".concat(e.env),
  26866. _r = "anonymous_uuid_".concat(e.env),
  26867. _i = "login_type_".concat(e.env),
  26868. _o = "user_info_".concat(e.env);
  26869. this.keys = {
  26870. accessTokenKey: _t5,
  26871. accessTokenExpireKey: _n5,
  26872. refreshTokenKey: _s5,
  26873. anonymousUuidKey: _r,
  26874. loginTypeKey: _i,
  26875. userInfoKey: _o
  26876. };
  26877. }
  26878. }
  26879. (0, _createClass2.default)(Ae, [{
  26880. key: "updatePersistence",
  26881. value: function updatePersistence(e) {
  26882. if (e === this._persistence) return;
  26883. var t = "local" === this._persistence;
  26884. this._persistence = e;
  26885. var n = Pe(e, ke.adapter);
  26886. for (var _e9 in this.keys) {
  26887. var _s6 = this.keys[_e9];
  26888. if (t && Ce.includes(_e9)) continue;
  26889. var _r2 = this._storage.getItem(_s6);
  26890. ve(_r2) || Ie(_r2) || (n.setItem(_s6, _r2), this._storage.removeItem(_s6));
  26891. }
  26892. this._storage = n;
  26893. }
  26894. }, {
  26895. key: "setStore",
  26896. value: function setStore(e, t, n) {
  26897. if (!this._storage) return;
  26898. var s = {
  26899. version: n || "localCachev1",
  26900. content: t
  26901. },
  26902. r = JSON.stringify(s);
  26903. try {
  26904. this._storage.setItem(e, r);
  26905. } catch (e) {
  26906. throw e;
  26907. }
  26908. }
  26909. }, {
  26910. key: "getStore",
  26911. value: function getStore(e, t) {
  26912. try {
  26913. if (!this._storage) return;
  26914. } catch (e) {
  26915. return "";
  26916. }
  26917. t = t || "localCachev1";
  26918. var n = this._storage.getItem(e);
  26919. if (!n) return "";
  26920. if (n.indexOf(t) >= 0) {
  26921. return JSON.parse(n).content;
  26922. }
  26923. return "";
  26924. }
  26925. }, {
  26926. key: "removeStore",
  26927. value: function removeStore(e) {
  26928. this._storage.removeItem(e);
  26929. }
  26930. }]);
  26931. return Ae;
  26932. }();
  26933. var Ee = {},
  26934. Oe = {};
  26935. function xe(e) {
  26936. return Ee[e];
  26937. }
  26938. var Re = /*#__PURE__*/(0, _createClass2.default)(function Re(e, t) {
  26939. (0, _classCallCheck2.default)(this, Re);
  26940. this.data = t || null, this.name = e;
  26941. });
  26942. var Ue = /*#__PURE__*/function (_Re) {
  26943. (0, _inherits2.default)(Ue, _Re);
  26944. var _super3 = _createSuper(Ue);
  26945. function Ue(e, t) {
  26946. var _this7;
  26947. (0, _classCallCheck2.default)(this, Ue);
  26948. _this7 = _super3.call(this, "error", {
  26949. error: e,
  26950. data: t
  26951. }), _this7.error = e;
  26952. return _this7;
  26953. }
  26954. return (0, _createClass2.default)(Ue);
  26955. }(Re);
  26956. var Le = new ( /*#__PURE__*/function () {
  26957. function _class() {
  26958. (0, _classCallCheck2.default)(this, _class);
  26959. this._listeners = {};
  26960. }
  26961. (0, _createClass2.default)(_class, [{
  26962. key: "on",
  26963. value: function on(e, t) {
  26964. return function (e, t, n) {
  26965. n[e] = n[e] || [], n[e].push(t);
  26966. }(e, t, this._listeners), this;
  26967. }
  26968. }, {
  26969. key: "off",
  26970. value: function off(e, t) {
  26971. return function (e, t, n) {
  26972. if (n && n[e]) {
  26973. var _s7 = n[e].indexOf(t);
  26974. -1 !== _s7 && n[e].splice(_s7, 1);
  26975. }
  26976. }(e, t, this._listeners), this;
  26977. }
  26978. }, {
  26979. key: "fire",
  26980. value: function fire(e, t) {
  26981. if (e instanceof Ue) return console.error(e.error), this;
  26982. var n = "string" == typeof e ? new Re(e, t || {}) : e;
  26983. var s = n.name;
  26984. if (this._listens(s)) {
  26985. n.target = this;
  26986. var _e10 = this._listeners[s] ? (0, _toConsumableArray2.default)(this._listeners[s]) : [];
  26987. var _iterator2 = _createForOfIteratorHelper(_e10),
  26988. _step2;
  26989. try {
  26990. for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
  26991. var _t6 = _step2.value;
  26992. _t6.call(this, n);
  26993. }
  26994. } catch (err) {
  26995. _iterator2.e(err);
  26996. } finally {
  26997. _iterator2.f();
  26998. }
  26999. }
  27000. return this;
  27001. }
  27002. }, {
  27003. key: "_listens",
  27004. value: function _listens(e) {
  27005. return this._listeners[e] && this._listeners[e].length > 0;
  27006. }
  27007. }]);
  27008. return _class;
  27009. }())();
  27010. function Ne(e, t) {
  27011. Le.on(e, t);
  27012. }
  27013. function De(e) {
  27014. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  27015. Le.fire(e, t);
  27016. }
  27017. function Fe(e, t) {
  27018. Le.off(e, t);
  27019. }
  27020. var qe = "loginStateChanged",
  27021. Me = "loginStateExpire",
  27022. Ke = "loginTypeChanged",
  27023. je = "anonymousConverted",
  27024. Be = "refreshAccessToken";
  27025. var $e;
  27026. !function (e) {
  27027. 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";
  27028. }($e || ($e = {}));
  27029. var We = ["auth.getJwt", "auth.logout", "auth.signInWithTicket", "auth.signInAnonymously", "auth.signIn", "auth.fetchAccessTokenWithRefreshToken", "auth.signUpWithEmailAndPassword", "auth.activateEndUserMail", "auth.sendPasswordResetEmail", "auth.resetPasswordWithToken", "auth.isUsernameRegistered"],
  27030. ze = {
  27031. "X-SDK-Version": "1.3.5"
  27032. };
  27033. function Je(e, t, n) {
  27034. var s = e[t];
  27035. e[t] = function (t) {
  27036. var r = {},
  27037. i = {};
  27038. n.forEach(function (n) {
  27039. var _n$call = n.call(e, t),
  27040. s = _n$call.data,
  27041. o = _n$call.headers;
  27042. Object.assign(r, s), Object.assign(i, o);
  27043. });
  27044. var o = t.data;
  27045. return o && function () {
  27046. var e;
  27047. if (e = o, "[object FormData]" !== Object.prototype.toString.call(e)) t.data = _objectSpread(_objectSpread({}, o), r);else for (var _e11 in r) {
  27048. o.append(_e11, r[_e11]);
  27049. }
  27050. }(), t.headers = _objectSpread(_objectSpread({}, t.headers || {}), i), s.call(e, t);
  27051. };
  27052. }
  27053. function He() {
  27054. var e = Math.random().toString(16).slice(2);
  27055. return {
  27056. data: {
  27057. seqId: e
  27058. },
  27059. headers: _objectSpread(_objectSpread({}, ze), {}, {
  27060. "x-seqid": e
  27061. })
  27062. };
  27063. }
  27064. var Ge = /*#__PURE__*/function () {
  27065. function Ge() {
  27066. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  27067. (0, _classCallCheck2.default)(this, Ge);
  27068. var t;
  27069. this.config = e, this._reqClass = new ke.adapter.reqClass({
  27070. timeout: this.config.timeout,
  27071. timeoutMsg: "\u8BF7\u6C42\u5728".concat(this.config.timeout / 1e3, "s\u5185\u672A\u5B8C\u6210\uFF0C\u5DF2\u4E2D\u65AD"),
  27072. restrictedMethods: ["post"]
  27073. }), 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]);
  27074. }
  27075. (0, _createClass2.default)(Ge, [{
  27076. key: "post",
  27077. value: function () {
  27078. var _post = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(e) {
  27079. return _regenerator.default.wrap(function _callee4$(_context4) {
  27080. while (1) {
  27081. switch (_context4.prev = _context4.next) {
  27082. case 0:
  27083. _context4.next = 2;
  27084. return this._reqClass.post(e);
  27085. case 2:
  27086. return _context4.abrupt("return", _context4.sent);
  27087. case 3:
  27088. case "end":
  27089. return _context4.stop();
  27090. }
  27091. }
  27092. }, _callee4, this);
  27093. }));
  27094. function post(_x2) {
  27095. return _post.apply(this, arguments);
  27096. }
  27097. return post;
  27098. }()
  27099. }, {
  27100. key: "upload",
  27101. value: function () {
  27102. var _upload = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(e) {
  27103. return _regenerator.default.wrap(function _callee5$(_context5) {
  27104. while (1) {
  27105. switch (_context5.prev = _context5.next) {
  27106. case 0:
  27107. _context5.next = 2;
  27108. return this._reqClass.upload(e);
  27109. case 2:
  27110. return _context5.abrupt("return", _context5.sent);
  27111. case 3:
  27112. case "end":
  27113. return _context5.stop();
  27114. }
  27115. }
  27116. }, _callee5, this);
  27117. }));
  27118. function upload(_x3) {
  27119. return _upload.apply(this, arguments);
  27120. }
  27121. return upload;
  27122. }()
  27123. }, {
  27124. key: "download",
  27125. value: function () {
  27126. var _download = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(e) {
  27127. return _regenerator.default.wrap(function _callee6$(_context6) {
  27128. while (1) {
  27129. switch (_context6.prev = _context6.next) {
  27130. case 0:
  27131. _context6.next = 2;
  27132. return this._reqClass.download(e);
  27133. case 2:
  27134. return _context6.abrupt("return", _context6.sent);
  27135. case 3:
  27136. case "end":
  27137. return _context6.stop();
  27138. }
  27139. }
  27140. }, _callee6, this);
  27141. }));
  27142. function download(_x4) {
  27143. return _download.apply(this, arguments);
  27144. }
  27145. return download;
  27146. }()
  27147. }, {
  27148. key: "refreshAccessToken",
  27149. value: function () {
  27150. var _refreshAccessToken2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7() {
  27151. var e, t;
  27152. return _regenerator.default.wrap(function _callee7$(_context7) {
  27153. while (1) {
  27154. switch (_context7.prev = _context7.next) {
  27155. case 0:
  27156. this._refreshAccessTokenPromise || (this._refreshAccessTokenPromise = this._refreshAccessToken());
  27157. _context7.prev = 1;
  27158. _context7.next = 4;
  27159. return this._refreshAccessTokenPromise;
  27160. case 4:
  27161. e = _context7.sent;
  27162. _context7.next = 10;
  27163. break;
  27164. case 7:
  27165. _context7.prev = 7;
  27166. _context7.t0 = _context7["catch"](1);
  27167. t = _context7.t0;
  27168. case 10:
  27169. if (!(this._refreshAccessTokenPromise = null, this._shouldRefreshAccessTokenHook = null, t)) {
  27170. _context7.next = 12;
  27171. break;
  27172. }
  27173. throw t;
  27174. case 12:
  27175. return _context7.abrupt("return", e);
  27176. case 13:
  27177. case "end":
  27178. return _context7.stop();
  27179. }
  27180. }
  27181. }, _callee7, this, [[1, 7]]);
  27182. }));
  27183. function refreshAccessToken() {
  27184. return _refreshAccessToken2.apply(this, arguments);
  27185. }
  27186. return refreshAccessToken;
  27187. }()
  27188. }, {
  27189. key: "_refreshAccessToken",
  27190. value: function () {
  27191. var _refreshAccessToken3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8() {
  27192. var _this$_cache$keys, e, t, n, s, r, i, o, a, _e12, _e13, _t7, _s8;
  27193. return _regenerator.default.wrap(function _callee8$(_context8) {
  27194. while (1) {
  27195. switch (_context8.prev = _context8.next) {
  27196. case 0:
  27197. _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;
  27198. this._cache.removeStore(e), this._cache.removeStore(t);
  27199. i = this._cache.getStore(n);
  27200. if (i) {
  27201. _context8.next = 5;
  27202. break;
  27203. }
  27204. throw new ne({
  27205. message: "未登录CloudBase"
  27206. });
  27207. case 5:
  27208. o = {
  27209. refresh_token: i
  27210. };
  27211. _context8.next = 8;
  27212. return this.request("auth.fetchAccessTokenWithRefreshToken", o);
  27213. case 8:
  27214. a = _context8.sent;
  27215. if (!a.data.code) {
  27216. _context8.next = 21;
  27217. break;
  27218. }
  27219. _e12 = a.data.code;
  27220. if (!("SIGN_PARAM_INVALID" === _e12 || "REFRESH_TOKEN_EXPIRED" === _e12 || "INVALID_REFRESH_TOKEN" === _e12)) {
  27221. _context8.next = 20;
  27222. break;
  27223. }
  27224. if (!(this._cache.getStore(s) === $e.ANONYMOUS && "INVALID_REFRESH_TOKEN" === _e12)) {
  27225. _context8.next = 19;
  27226. break;
  27227. }
  27228. _e13 = this._cache.getStore(r);
  27229. _t7 = this._cache.getStore(n);
  27230. _context8.next = 17;
  27231. return this.send("auth.signInAnonymously", {
  27232. anonymous_uuid: _e13,
  27233. refresh_token: _t7
  27234. });
  27235. case 17:
  27236. _s8 = _context8.sent;
  27237. return _context8.abrupt("return", (this.setRefreshToken(_s8.refresh_token), this._refreshAccessToken()));
  27238. case 19:
  27239. De(Me), this._cache.removeStore(n);
  27240. case 20:
  27241. throw new ne({
  27242. code: a.data.code,
  27243. message: "\u5237\u65B0access token\u5931\u8D25\uFF1A".concat(a.data.code)
  27244. });
  27245. case 21:
  27246. if (!a.data.access_token) {
  27247. _context8.next = 23;
  27248. break;
  27249. }
  27250. 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()), {
  27251. accessToken: a.data.access_token,
  27252. accessTokenExpire: a.data.access_token_expire
  27253. }));
  27254. case 23:
  27255. a.data.refresh_token && (this._cache.removeStore(n), this._cache.setStore(n, a.data.refresh_token), this._refreshAccessToken());
  27256. case 24:
  27257. case "end":
  27258. return _context8.stop();
  27259. }
  27260. }
  27261. }, _callee8, this);
  27262. }));
  27263. function _refreshAccessToken() {
  27264. return _refreshAccessToken3.apply(this, arguments);
  27265. }
  27266. return _refreshAccessToken;
  27267. }()
  27268. }, {
  27269. key: "getAccessToken",
  27270. value: function () {
  27271. var _getAccessToken = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9() {
  27272. var _this$_cache$keys2, e, t, n, s, r, i;
  27273. return _regenerator.default.wrap(function _callee9$(_context9) {
  27274. while (1) {
  27275. switch (_context9.prev = _context9.next) {
  27276. case 0:
  27277. _this$_cache$keys2 = this._cache.keys, e = _this$_cache$keys2.accessTokenKey, t = _this$_cache$keys2.accessTokenExpireKey, n = _this$_cache$keys2.refreshTokenKey;
  27278. if (this._cache.getStore(n)) {
  27279. _context9.next = 3;
  27280. break;
  27281. }
  27282. throw new ne({
  27283. message: "refresh token不存在,登录状态异常"
  27284. });
  27285. case 3:
  27286. s = this._cache.getStore(e), r = this._cache.getStore(t), i = !0;
  27287. _context9.t0 = this._shouldRefreshAccessTokenHook;
  27288. if (!_context9.t0) {
  27289. _context9.next = 9;
  27290. break;
  27291. }
  27292. _context9.next = 8;
  27293. return this._shouldRefreshAccessTokenHook(s, r);
  27294. case 8:
  27295. _context9.t0 = !_context9.sent;
  27296. case 9:
  27297. _context9.t1 = _context9.t0;
  27298. if (!_context9.t1) {
  27299. _context9.next = 12;
  27300. break;
  27301. }
  27302. i = !1;
  27303. case 12:
  27304. return _context9.abrupt("return", (!s || !r || r < Date.now()) && i ? this.refreshAccessToken() : {
  27305. accessToken: s,
  27306. accessTokenExpire: r
  27307. });
  27308. case 13:
  27309. case "end":
  27310. return _context9.stop();
  27311. }
  27312. }
  27313. }, _callee9, this);
  27314. }));
  27315. function getAccessToken() {
  27316. return _getAccessToken.apply(this, arguments);
  27317. }
  27318. return getAccessToken;
  27319. }()
  27320. }, {
  27321. key: "request",
  27322. value: function () {
  27323. var _request = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10(e, t, n) {
  27324. var s, r, i, _e14, o, _e15, _e16, a, c, u, h, l, d, p, f, g;
  27325. return _regenerator.default.wrap(function _callee10$(_context10) {
  27326. while (1) {
  27327. switch (_context10.prev = _context10.next) {
  27328. case 0:
  27329. s = "x-tcb-trace_".concat(this.config.env);
  27330. r = "application/x-www-form-urlencoded";
  27331. i = _objectSpread({
  27332. action: e,
  27333. env: this.config.env,
  27334. dataVersion: "2019-08-16"
  27335. }, t);
  27336. if (!(-1 === We.indexOf(e))) {
  27337. _context10.next = 10;
  27338. break;
  27339. }
  27340. _e14 = this._cache.keys.refreshTokenKey;
  27341. _context10.t0 = this._cache.getStore(_e14);
  27342. if (!_context10.t0) {
  27343. _context10.next = 10;
  27344. break;
  27345. }
  27346. _context10.next = 9;
  27347. return this.getAccessToken();
  27348. case 9:
  27349. i.access_token = _context10.sent.accessToken;
  27350. case 10:
  27351. if ("storage.uploadFile" === e) {
  27352. o = new FormData();
  27353. for (_e15 in o) {
  27354. o.hasOwnProperty(_e15) && void 0 !== o[_e15] && o.append(_e15, i[_e15]);
  27355. }
  27356. r = "multipart/form-data";
  27357. } else {
  27358. r = "application/json", o = {};
  27359. for (_e16 in i) {
  27360. void 0 !== i[_e16] && (o[_e16] = i[_e16]);
  27361. }
  27362. }
  27363. a = {
  27364. headers: {
  27365. "content-type": r
  27366. }
  27367. };
  27368. n && n.onUploadProgress && (a.onUploadProgress = n.onUploadProgress);
  27369. c = this._localCache.getStore(s);
  27370. c && (a.headers["X-TCB-Trace"] = c);
  27371. u = t.parse, h = t.inQuery, l = t.search;
  27372. d = {
  27373. env: this.config.env
  27374. };
  27375. u && (d.parse = !0), h && (d = _objectSpread(_objectSpread({}, h), d));
  27376. p = function (e, t) {
  27377. var n = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  27378. var s = /\?/.test(t);
  27379. var r = "";
  27380. for (var _e17 in n) {
  27381. "" === r ? !s && (t += "?") : r += "&", r += "".concat(_e17, "=").concat(encodeURIComponent(n[_e17]));
  27382. }
  27383. return /^http(s)?\:\/\//.test(t += r) ? t : "".concat(e).concat(t);
  27384. }(me, "//tcb-api.tencentcloudapi.com/web", d);
  27385. l && (p += l);
  27386. _context10.next = 22;
  27387. return this.post(_objectSpread({
  27388. url: p,
  27389. data: o
  27390. }, a));
  27391. case 22:
  27392. f = _context10.sent;
  27393. g = f.header && f.header["x-tcb-trace"];
  27394. if (!(g && this._localCache.setStore(s, g), 200 !== Number(f.status) && 200 !== Number(f.statusCode) || !f.data)) {
  27395. _context10.next = 26;
  27396. break;
  27397. }
  27398. throw new ne({
  27399. code: "NETWORK_ERROR",
  27400. message: "network request error"
  27401. });
  27402. case 26:
  27403. return _context10.abrupt("return", f);
  27404. case 27:
  27405. case "end":
  27406. return _context10.stop();
  27407. }
  27408. }
  27409. }, _callee10, this);
  27410. }));
  27411. function request(_x5, _x6, _x7) {
  27412. return _request.apply(this, arguments);
  27413. }
  27414. return request;
  27415. }()
  27416. }, {
  27417. key: "send",
  27418. value: function () {
  27419. var _send = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11(e) {
  27420. var t,
  27421. n,
  27422. _n6,
  27423. _args11 = arguments;
  27424. return _regenerator.default.wrap(function _callee11$(_context11) {
  27425. while (1) {
  27426. switch (_context11.prev = _context11.next) {
  27427. case 0:
  27428. t = _args11.length > 1 && _args11[1] !== undefined ? _args11[1] : {};
  27429. _context11.next = 3;
  27430. return this.request(e, t, {
  27431. onUploadProgress: t.onUploadProgress
  27432. });
  27433. case 3:
  27434. n = _context11.sent;
  27435. if (!("ACCESS_TOKEN_EXPIRED" === n.data.code && -1 === We.indexOf(e))) {
  27436. _context11.next = 13;
  27437. break;
  27438. }
  27439. _context11.next = 7;
  27440. return this.refreshAccessToken();
  27441. case 7:
  27442. _context11.next = 9;
  27443. return this.request(e, t, {
  27444. onUploadProgress: t.onUploadProgress
  27445. });
  27446. case 9:
  27447. _n6 = _context11.sent;
  27448. if (!_n6.data.code) {
  27449. _context11.next = 12;
  27450. break;
  27451. }
  27452. throw new ne({
  27453. code: _n6.data.code,
  27454. message: _n6.data.message
  27455. });
  27456. case 12:
  27457. return _context11.abrupt("return", _n6.data);
  27458. case 13:
  27459. if (!n.data.code) {
  27460. _context11.next = 15;
  27461. break;
  27462. }
  27463. throw new ne({
  27464. code: n.data.code,
  27465. message: n.data.message
  27466. });
  27467. case 15:
  27468. return _context11.abrupt("return", n.data);
  27469. case 16:
  27470. case "end":
  27471. return _context11.stop();
  27472. }
  27473. }
  27474. }, _callee11, this);
  27475. }));
  27476. function send(_x8) {
  27477. return _send.apply(this, arguments);
  27478. }
  27479. return send;
  27480. }()
  27481. }, {
  27482. key: "setRefreshToken",
  27483. value: function setRefreshToken(e) {
  27484. var _this$_cache$keys3 = this._cache.keys,
  27485. t = _this$_cache$keys3.accessTokenKey,
  27486. n = _this$_cache$keys3.accessTokenExpireKey,
  27487. s = _this$_cache$keys3.refreshTokenKey;
  27488. this._cache.removeStore(t), this._cache.removeStore(n), this._cache.setStore(s, e);
  27489. }
  27490. }]);
  27491. return Ge;
  27492. }();
  27493. var Ve = {};
  27494. function Ye(e) {
  27495. return Ve[e];
  27496. }
  27497. var Qe = /*#__PURE__*/function () {
  27498. function Qe(e) {
  27499. (0, _classCallCheck2.default)(this, Qe);
  27500. this.config = e, this._cache = xe(e.env), this._request = Ye(e.env);
  27501. }
  27502. (0, _createClass2.default)(Qe, [{
  27503. key: "setRefreshToken",
  27504. value: function setRefreshToken(e) {
  27505. var _this$_cache$keys4 = this._cache.keys,
  27506. t = _this$_cache$keys4.accessTokenKey,
  27507. n = _this$_cache$keys4.accessTokenExpireKey,
  27508. s = _this$_cache$keys4.refreshTokenKey;
  27509. this._cache.removeStore(t), this._cache.removeStore(n), this._cache.setStore(s, e);
  27510. }
  27511. }, {
  27512. key: "setAccessToken",
  27513. value: function setAccessToken(e, t) {
  27514. var _this$_cache$keys5 = this._cache.keys,
  27515. n = _this$_cache$keys5.accessTokenKey,
  27516. s = _this$_cache$keys5.accessTokenExpireKey;
  27517. this._cache.setStore(n, e), this._cache.setStore(s, t);
  27518. }
  27519. }, {
  27520. key: "refreshUserInfo",
  27521. value: function () {
  27522. var _refreshUserInfo = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee12() {
  27523. var _yield$this$_request$, e;
  27524. return _regenerator.default.wrap(function _callee12$(_context12) {
  27525. while (1) {
  27526. switch (_context12.prev = _context12.next) {
  27527. case 0:
  27528. _context12.next = 2;
  27529. return this._request.send("auth.getUserInfo", {});
  27530. case 2:
  27531. _yield$this$_request$ = _context12.sent;
  27532. e = _yield$this$_request$.data;
  27533. return _context12.abrupt("return", (this.setLocalUserInfo(e), e));
  27534. case 5:
  27535. case "end":
  27536. return _context12.stop();
  27537. }
  27538. }
  27539. }, _callee12, this);
  27540. }));
  27541. function refreshUserInfo() {
  27542. return _refreshUserInfo.apply(this, arguments);
  27543. }
  27544. return refreshUserInfo;
  27545. }()
  27546. }, {
  27547. key: "setLocalUserInfo",
  27548. value: function setLocalUserInfo(e) {
  27549. var t = this._cache.keys.userInfoKey;
  27550. this._cache.setStore(t, e);
  27551. }
  27552. }]);
  27553. return Qe;
  27554. }();
  27555. var Xe = /*#__PURE__*/function () {
  27556. function Xe(e) {
  27557. (0, _classCallCheck2.default)(this, Xe);
  27558. if (!e) throw new ne({
  27559. code: "PARAM_ERROR",
  27560. message: "envId is not defined"
  27561. });
  27562. this._envId = e, this._cache = xe(this._envId), this._request = Ye(this._envId), this.setUserInfo();
  27563. }
  27564. (0, _createClass2.default)(Xe, [{
  27565. key: "linkWithTicket",
  27566. value: function linkWithTicket(e) {
  27567. if ("string" != typeof e) throw new ne({
  27568. code: "PARAM_ERROR",
  27569. message: "ticket must be string"
  27570. });
  27571. return this._request.send("auth.linkWithTicket", {
  27572. ticket: e
  27573. });
  27574. }
  27575. }, {
  27576. key: "linkWithRedirect",
  27577. value: function linkWithRedirect(e) {
  27578. e.signInWithRedirect();
  27579. }
  27580. }, {
  27581. key: "updatePassword",
  27582. value: function updatePassword(e, t) {
  27583. return this._request.send("auth.updatePassword", {
  27584. oldPassword: t,
  27585. newPassword: e
  27586. });
  27587. }
  27588. }, {
  27589. key: "updateEmail",
  27590. value: function updateEmail(e) {
  27591. return this._request.send("auth.updateEmail", {
  27592. newEmail: e
  27593. });
  27594. }
  27595. }, {
  27596. key: "updateUsername",
  27597. value: function updateUsername(e) {
  27598. if ("string" != typeof e) throw new ne({
  27599. code: "PARAM_ERROR",
  27600. message: "username must be a string"
  27601. });
  27602. return this._request.send("auth.updateUsername", {
  27603. username: e
  27604. });
  27605. }
  27606. }, {
  27607. key: "getLinkedUidList",
  27608. value: function () {
  27609. var _getLinkedUidList = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee13() {
  27610. var _yield$this$_request$2, e, t, n;
  27611. return _regenerator.default.wrap(function _callee13$(_context13) {
  27612. while (1) {
  27613. switch (_context13.prev = _context13.next) {
  27614. case 0:
  27615. _context13.next = 2;
  27616. return this._request.send("auth.getLinkedUidList", {});
  27617. case 2:
  27618. _yield$this$_request$2 = _context13.sent;
  27619. e = _yield$this$_request$2.data;
  27620. t = !1;
  27621. n = e.users;
  27622. return _context13.abrupt("return", (n.forEach(function (e) {
  27623. e.wxOpenId && e.wxPublicId && (t = !0);
  27624. }), {
  27625. users: n,
  27626. hasPrimaryUid: t
  27627. }));
  27628. case 7:
  27629. case "end":
  27630. return _context13.stop();
  27631. }
  27632. }
  27633. }, _callee13, this);
  27634. }));
  27635. function getLinkedUidList() {
  27636. return _getLinkedUidList.apply(this, arguments);
  27637. }
  27638. return getLinkedUidList;
  27639. }()
  27640. }, {
  27641. key: "setPrimaryUid",
  27642. value: function setPrimaryUid(e) {
  27643. return this._request.send("auth.setPrimaryUid", {
  27644. uid: e
  27645. });
  27646. }
  27647. }, {
  27648. key: "unlink",
  27649. value: function unlink(e) {
  27650. return this._request.send("auth.unlink", {
  27651. platform: e
  27652. });
  27653. }
  27654. }, {
  27655. key: "update",
  27656. value: function () {
  27657. var _update = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee14(e) {
  27658. var t, n, s, r, i, o, _yield$this$_request$3, a;
  27659. return _regenerator.default.wrap(function _callee14$(_context14) {
  27660. while (1) {
  27661. switch (_context14.prev = _context14.next) {
  27662. case 0:
  27663. t = e.nickName;
  27664. n = e.gender;
  27665. s = e.avatarUrl;
  27666. r = e.province;
  27667. i = e.country;
  27668. o = e.city;
  27669. _context14.next = 8;
  27670. return this._request.send("auth.updateUserInfo", {
  27671. nickName: t,
  27672. gender: n,
  27673. avatarUrl: s,
  27674. province: r,
  27675. country: i,
  27676. city: o
  27677. });
  27678. case 8:
  27679. _yield$this$_request$3 = _context14.sent;
  27680. a = _yield$this$_request$3.data;
  27681. this.setLocalUserInfo(a);
  27682. case 11:
  27683. case "end":
  27684. return _context14.stop();
  27685. }
  27686. }
  27687. }, _callee14, this);
  27688. }));
  27689. function update(_x9) {
  27690. return _update.apply(this, arguments);
  27691. }
  27692. return update;
  27693. }()
  27694. }, {
  27695. key: "refresh",
  27696. value: function () {
  27697. var _refresh = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee15() {
  27698. var _yield$this$_request$4, e;
  27699. return _regenerator.default.wrap(function _callee15$(_context15) {
  27700. while (1) {
  27701. switch (_context15.prev = _context15.next) {
  27702. case 0:
  27703. _context15.next = 2;
  27704. return this._request.send("auth.getUserInfo", {});
  27705. case 2:
  27706. _yield$this$_request$4 = _context15.sent;
  27707. e = _yield$this$_request$4.data;
  27708. return _context15.abrupt("return", (this.setLocalUserInfo(e), e));
  27709. case 5:
  27710. case "end":
  27711. return _context15.stop();
  27712. }
  27713. }
  27714. }, _callee15, this);
  27715. }));
  27716. function refresh() {
  27717. return _refresh.apply(this, arguments);
  27718. }
  27719. return refresh;
  27720. }()
  27721. }, {
  27722. key: "setUserInfo",
  27723. value: function setUserInfo() {
  27724. var _this8 = this;
  27725. var e = this._cache.keys.userInfoKey,
  27726. t = this._cache.getStore(e);
  27727. ["uid", "loginType", "openid", "wxOpenId", "wxPublicId", "unionId", "qqMiniOpenId", "email", "hasPassword", "customUserId", "nickName", "gender", "avatarUrl"].forEach(function (e) {
  27728. _this8[e] = t[e];
  27729. }), this.location = {
  27730. country: t.country,
  27731. province: t.province,
  27732. city: t.city
  27733. };
  27734. }
  27735. }, {
  27736. key: "setLocalUserInfo",
  27737. value: function setLocalUserInfo(e) {
  27738. var t = this._cache.keys.userInfoKey;
  27739. this._cache.setStore(t, e), this.setUserInfo();
  27740. }
  27741. }]);
  27742. return Xe;
  27743. }();
  27744. var Ze = /*#__PURE__*/function () {
  27745. function Ze(e) {
  27746. (0, _classCallCheck2.default)(this, Ze);
  27747. if (!e) throw new ne({
  27748. code: "PARAM_ERROR",
  27749. message: "envId is not defined"
  27750. });
  27751. this._cache = xe(e);
  27752. var _this$_cache$keys6 = this._cache.keys,
  27753. t = _this$_cache$keys6.refreshTokenKey,
  27754. n = _this$_cache$keys6.accessTokenKey,
  27755. s = _this$_cache$keys6.accessTokenExpireKey,
  27756. r = this._cache.getStore(t),
  27757. i = this._cache.getStore(n),
  27758. o = this._cache.getStore(s);
  27759. this.credential = {
  27760. refreshToken: r,
  27761. accessToken: i,
  27762. accessTokenExpire: o
  27763. }, this.user = new Xe(e);
  27764. }
  27765. (0, _createClass2.default)(Ze, [{
  27766. key: "isAnonymousAuth",
  27767. get: function get() {
  27768. return this.loginType === $e.ANONYMOUS;
  27769. }
  27770. }, {
  27771. key: "isCustomAuth",
  27772. get: function get() {
  27773. return this.loginType === $e.CUSTOM;
  27774. }
  27775. }, {
  27776. key: "isWeixinAuth",
  27777. get: function get() {
  27778. return this.loginType === $e.WECHAT || this.loginType === $e.WECHAT_OPEN || this.loginType === $e.WECHAT_PUBLIC;
  27779. }
  27780. }, {
  27781. key: "loginType",
  27782. get: function get() {
  27783. return this._cache.getStore(this._cache.keys.loginTypeKey);
  27784. }
  27785. }]);
  27786. return Ze;
  27787. }();
  27788. var et = /*#__PURE__*/function (_Qe) {
  27789. (0, _inherits2.default)(et, _Qe);
  27790. var _super4 = _createSuper(et);
  27791. function et() {
  27792. (0, _classCallCheck2.default)(this, et);
  27793. return _super4.apply(this, arguments);
  27794. }
  27795. (0, _createClass2.default)(et, [{
  27796. key: "signIn",
  27797. value: function () {
  27798. var _signIn = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee16() {
  27799. var _this$_cache$keys7, e, t, n, s, r, _e18;
  27800. return _regenerator.default.wrap(function _callee16$(_context16) {
  27801. while (1) {
  27802. switch (_context16.prev = _context16.next) {
  27803. case 0:
  27804. this._cache.updatePersistence("local");
  27805. _this$_cache$keys7 = this._cache.keys;
  27806. e = _this$_cache$keys7.anonymousUuidKey;
  27807. t = _this$_cache$keys7.refreshTokenKey;
  27808. n = this._cache.getStore(e) || void 0;
  27809. s = this._cache.getStore(t) || void 0;
  27810. _context16.next = 8;
  27811. return this._request.send("auth.signInAnonymously", {
  27812. anonymous_uuid: n,
  27813. refresh_token: s
  27814. });
  27815. case 8:
  27816. r = _context16.sent;
  27817. if (!(r.uuid && r.refresh_token)) {
  27818. _context16.next = 20;
  27819. break;
  27820. }
  27821. this._setAnonymousUUID(r.uuid);
  27822. this.setRefreshToken(r.refresh_token);
  27823. _context16.next = 14;
  27824. return this._request.refreshAccessToken();
  27825. case 14:
  27826. De(qe);
  27827. De(Ke, {
  27828. env: this.config.env,
  27829. loginType: $e.ANONYMOUS,
  27830. persistence: "local"
  27831. });
  27832. _e18 = new Ze(this.config.env);
  27833. _context16.next = 19;
  27834. return _e18.user.refresh();
  27835. case 19:
  27836. return _context16.abrupt("return", _e18);
  27837. case 20:
  27838. throw new ne({
  27839. message: "匿名登录失败"
  27840. });
  27841. case 21:
  27842. case "end":
  27843. return _context16.stop();
  27844. }
  27845. }
  27846. }, _callee16, this);
  27847. }));
  27848. function signIn() {
  27849. return _signIn.apply(this, arguments);
  27850. }
  27851. return signIn;
  27852. }()
  27853. }, {
  27854. key: "linkAndRetrieveDataWithTicket",
  27855. value: function () {
  27856. var _linkAndRetrieveDataWithTicket = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee17(e) {
  27857. var _this$_cache$keys8, t, n, s, r, i;
  27858. return _regenerator.default.wrap(function _callee17$(_context17) {
  27859. while (1) {
  27860. switch (_context17.prev = _context17.next) {
  27861. case 0:
  27862. _this$_cache$keys8 = this._cache.keys;
  27863. t = _this$_cache$keys8.anonymousUuidKey;
  27864. n = _this$_cache$keys8.refreshTokenKey;
  27865. s = this._cache.getStore(t);
  27866. r = this._cache.getStore(n);
  27867. _context17.next = 7;
  27868. return this._request.send("auth.linkAndRetrieveDataWithTicket", {
  27869. anonymous_uuid: s,
  27870. refresh_token: r,
  27871. ticket: e
  27872. });
  27873. case 7:
  27874. i = _context17.sent;
  27875. if (!i.refresh_token) {
  27876. _context17.next = 16;
  27877. break;
  27878. }
  27879. this._clearAnonymousUUID();
  27880. this.setRefreshToken(i.refresh_token);
  27881. _context17.next = 13;
  27882. return this._request.refreshAccessToken();
  27883. case 13:
  27884. De(je, {
  27885. env: this.config.env
  27886. });
  27887. De(Ke, {
  27888. loginType: $e.CUSTOM,
  27889. persistence: "local"
  27890. });
  27891. return _context17.abrupt("return", {
  27892. credential: {
  27893. refreshToken: i.refresh_token
  27894. }
  27895. });
  27896. case 16:
  27897. throw new ne({
  27898. message: "匿名转化失败"
  27899. });
  27900. case 17:
  27901. case "end":
  27902. return _context17.stop();
  27903. }
  27904. }
  27905. }, _callee17, this);
  27906. }));
  27907. function linkAndRetrieveDataWithTicket(_x10) {
  27908. return _linkAndRetrieveDataWithTicket.apply(this, arguments);
  27909. }
  27910. return linkAndRetrieveDataWithTicket;
  27911. }()
  27912. }, {
  27913. key: "_setAnonymousUUID",
  27914. value: function _setAnonymousUUID(e) {
  27915. var _this$_cache$keys9 = this._cache.keys,
  27916. t = _this$_cache$keys9.anonymousUuidKey,
  27917. n = _this$_cache$keys9.loginTypeKey;
  27918. this._cache.removeStore(t), this._cache.setStore(t, e), this._cache.setStore(n, $e.ANONYMOUS);
  27919. }
  27920. }, {
  27921. key: "_clearAnonymousUUID",
  27922. value: function _clearAnonymousUUID() {
  27923. this._cache.removeStore(this._cache.keys.anonymousUuidKey);
  27924. }
  27925. }]);
  27926. return et;
  27927. }(Qe);
  27928. var tt = /*#__PURE__*/function (_Qe2) {
  27929. (0, _inherits2.default)(tt, _Qe2);
  27930. var _super5 = _createSuper(tt);
  27931. function tt() {
  27932. (0, _classCallCheck2.default)(this, tt);
  27933. return _super5.apply(this, arguments);
  27934. }
  27935. (0, _createClass2.default)(tt, [{
  27936. key: "signIn",
  27937. value: function () {
  27938. var _signIn2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee18(e) {
  27939. var t, n;
  27940. return _regenerator.default.wrap(function _callee18$(_context18) {
  27941. while (1) {
  27942. switch (_context18.prev = _context18.next) {
  27943. case 0:
  27944. if (!("string" != typeof e)) {
  27945. _context18.next = 2;
  27946. break;
  27947. }
  27948. throw new ne({
  27949. code: "PARAM_ERROR",
  27950. message: "ticket must be a string"
  27951. });
  27952. case 2:
  27953. t = this._cache.keys.refreshTokenKey;
  27954. _context18.next = 5;
  27955. return this._request.send("auth.signInWithTicket", {
  27956. ticket: e,
  27957. refresh_token: this._cache.getStore(t) || ""
  27958. });
  27959. case 5:
  27960. n = _context18.sent;
  27961. if (!n.refresh_token) {
  27962. _context18.next = 15;
  27963. break;
  27964. }
  27965. this.setRefreshToken(n.refresh_token);
  27966. _context18.next = 10;
  27967. return this._request.refreshAccessToken();
  27968. case 10:
  27969. De(qe);
  27970. De(Ke, {
  27971. env: this.config.env,
  27972. loginType: $e.CUSTOM,
  27973. persistence: this.config.persistence
  27974. });
  27975. _context18.next = 14;
  27976. return this.refreshUserInfo();
  27977. case 14:
  27978. return _context18.abrupt("return", new Ze(this.config.env));
  27979. case 15:
  27980. throw new ne({
  27981. message: "自定义登录失败"
  27982. });
  27983. case 16:
  27984. case "end":
  27985. return _context18.stop();
  27986. }
  27987. }
  27988. }, _callee18, this);
  27989. }));
  27990. function signIn(_x11) {
  27991. return _signIn2.apply(this, arguments);
  27992. }
  27993. return signIn;
  27994. }()
  27995. }]);
  27996. return tt;
  27997. }(Qe);
  27998. var nt = /*#__PURE__*/function (_Qe3) {
  27999. (0, _inherits2.default)(nt, _Qe3);
  28000. var _super6 = _createSuper(nt);
  28001. function nt() {
  28002. (0, _classCallCheck2.default)(this, nt);
  28003. return _super6.apply(this, arguments);
  28004. }
  28005. (0, _createClass2.default)(nt, [{
  28006. key: "signIn",
  28007. value: function () {
  28008. var _signIn3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee19(e, t) {
  28009. var n, s, r, i, o;
  28010. return _regenerator.default.wrap(function _callee19$(_context19) {
  28011. while (1) {
  28012. switch (_context19.prev = _context19.next) {
  28013. case 0:
  28014. if (!("string" != typeof e)) {
  28015. _context19.next = 2;
  28016. break;
  28017. }
  28018. throw new ne({
  28019. code: "PARAM_ERROR",
  28020. message: "email must be a string"
  28021. });
  28022. case 2:
  28023. n = this._cache.keys.refreshTokenKey;
  28024. _context19.next = 5;
  28025. return this._request.send("auth.signIn", {
  28026. loginType: "EMAIL",
  28027. email: e,
  28028. password: t,
  28029. refresh_token: this._cache.getStore(n) || ""
  28030. });
  28031. case 5:
  28032. s = _context19.sent;
  28033. r = s.refresh_token;
  28034. i = s.access_token;
  28035. o = s.access_token_expire;
  28036. if (!r) {
  28037. _context19.next = 22;
  28038. break;
  28039. }
  28040. this.setRefreshToken(r);
  28041. if (!(i && o)) {
  28042. _context19.next = 15;
  28043. break;
  28044. }
  28045. this.setAccessToken(i, o);
  28046. _context19.next = 17;
  28047. break;
  28048. case 15:
  28049. _context19.next = 17;
  28050. return this._request.refreshAccessToken();
  28051. case 17:
  28052. _context19.next = 19;
  28053. return this.refreshUserInfo();
  28054. case 19:
  28055. De(qe);
  28056. De(Ke, {
  28057. env: this.config.env,
  28058. loginType: $e.EMAIL,
  28059. persistence: this.config.persistence
  28060. });
  28061. return _context19.abrupt("return", new Ze(this.config.env));
  28062. case 22:
  28063. throw s.code ? new ne({
  28064. code: s.code,
  28065. message: "\u90AE\u7BB1\u767B\u5F55\u5931\u8D25: ".concat(s.message)
  28066. }) : new ne({
  28067. message: "邮箱登录失败"
  28068. });
  28069. case 23:
  28070. case "end":
  28071. return _context19.stop();
  28072. }
  28073. }
  28074. }, _callee19, this);
  28075. }));
  28076. function signIn(_x12, _x13) {
  28077. return _signIn3.apply(this, arguments);
  28078. }
  28079. return signIn;
  28080. }()
  28081. }, {
  28082. key: "activate",
  28083. value: function () {
  28084. var _activate = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee20(e) {
  28085. return _regenerator.default.wrap(function _callee20$(_context20) {
  28086. while (1) {
  28087. switch (_context20.prev = _context20.next) {
  28088. case 0:
  28089. return _context20.abrupt("return", this._request.send("auth.activateEndUserMail", {
  28090. token: e
  28091. }));
  28092. case 1:
  28093. case "end":
  28094. return _context20.stop();
  28095. }
  28096. }
  28097. }, _callee20, this);
  28098. }));
  28099. function activate(_x14) {
  28100. return _activate.apply(this, arguments);
  28101. }
  28102. return activate;
  28103. }()
  28104. }, {
  28105. key: "resetPasswordWithToken",
  28106. value: function () {
  28107. var _resetPasswordWithToken = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee21(e, t) {
  28108. return _regenerator.default.wrap(function _callee21$(_context21) {
  28109. while (1) {
  28110. switch (_context21.prev = _context21.next) {
  28111. case 0:
  28112. return _context21.abrupt("return", this._request.send("auth.resetPasswordWithToken", {
  28113. token: e,
  28114. newPassword: t
  28115. }));
  28116. case 1:
  28117. case "end":
  28118. return _context21.stop();
  28119. }
  28120. }
  28121. }, _callee21, this);
  28122. }));
  28123. function resetPasswordWithToken(_x15, _x16) {
  28124. return _resetPasswordWithToken.apply(this, arguments);
  28125. }
  28126. return resetPasswordWithToken;
  28127. }()
  28128. }]);
  28129. return nt;
  28130. }(Qe);
  28131. var st = /*#__PURE__*/function (_Qe4) {
  28132. (0, _inherits2.default)(st, _Qe4);
  28133. var _super7 = _createSuper(st);
  28134. function st() {
  28135. (0, _classCallCheck2.default)(this, st);
  28136. return _super7.apply(this, arguments);
  28137. }
  28138. (0, _createClass2.default)(st, [{
  28139. key: "signIn",
  28140. value: function () {
  28141. var _signIn4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee22(e, t) {
  28142. var n, s, r, i, o;
  28143. return _regenerator.default.wrap(function _callee22$(_context22) {
  28144. while (1) {
  28145. switch (_context22.prev = _context22.next) {
  28146. case 0:
  28147. if (!("string" != typeof e)) {
  28148. _context22.next = 2;
  28149. break;
  28150. }
  28151. throw new ne({
  28152. code: "PARAM_ERROR",
  28153. message: "username must be a string"
  28154. });
  28155. case 2:
  28156. "string" != typeof t && (t = "", console.warn("password is empty"));
  28157. n = this._cache.keys.refreshTokenKey;
  28158. _context22.next = 6;
  28159. return this._request.send("auth.signIn", {
  28160. loginType: $e.USERNAME,
  28161. username: e,
  28162. password: t,
  28163. refresh_token: this._cache.getStore(n) || ""
  28164. });
  28165. case 6:
  28166. s = _context22.sent;
  28167. r = s.refresh_token;
  28168. i = s.access_token_expire;
  28169. o = s.access_token;
  28170. if (!r) {
  28171. _context22.next = 23;
  28172. break;
  28173. }
  28174. this.setRefreshToken(r);
  28175. if (!(o && i)) {
  28176. _context22.next = 16;
  28177. break;
  28178. }
  28179. this.setAccessToken(o, i);
  28180. _context22.next = 18;
  28181. break;
  28182. case 16:
  28183. _context22.next = 18;
  28184. return this._request.refreshAccessToken();
  28185. case 18:
  28186. _context22.next = 20;
  28187. return this.refreshUserInfo();
  28188. case 20:
  28189. De(qe);
  28190. De(Ke, {
  28191. env: this.config.env,
  28192. loginType: $e.USERNAME,
  28193. persistence: this.config.persistence
  28194. });
  28195. return _context22.abrupt("return", new Ze(this.config.env));
  28196. case 23:
  28197. throw s.code ? new ne({
  28198. code: s.code,
  28199. message: "\u7528\u6237\u540D\u5BC6\u7801\u767B\u5F55\u5931\u8D25: ".concat(s.message)
  28200. }) : new ne({
  28201. message: "用户名密码登录失败"
  28202. });
  28203. case 24:
  28204. case "end":
  28205. return _context22.stop();
  28206. }
  28207. }
  28208. }, _callee22, this);
  28209. }));
  28210. function signIn(_x17, _x18) {
  28211. return _signIn4.apply(this, arguments);
  28212. }
  28213. return signIn;
  28214. }()
  28215. }]);
  28216. return st;
  28217. }(Qe);
  28218. var rt = /*#__PURE__*/function () {
  28219. function rt(e) {
  28220. (0, _classCallCheck2.default)(this, rt);
  28221. 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);
  28222. }
  28223. (0, _createClass2.default)(rt, [{
  28224. key: "currentUser",
  28225. get: function get() {
  28226. var e = this.hasLoginState();
  28227. return e && e.user || null;
  28228. }
  28229. }, {
  28230. key: "loginType",
  28231. get: function get() {
  28232. return this._cache.getStore(this._cache.keys.loginTypeKey);
  28233. }
  28234. }, {
  28235. key: "anonymousAuthProvider",
  28236. value: function anonymousAuthProvider() {
  28237. return new et(this.config);
  28238. }
  28239. }, {
  28240. key: "customAuthProvider",
  28241. value: function customAuthProvider() {
  28242. return new tt(this.config);
  28243. }
  28244. }, {
  28245. key: "emailAuthProvider",
  28246. value: function emailAuthProvider() {
  28247. return new nt(this.config);
  28248. }
  28249. }, {
  28250. key: "usernameAuthProvider",
  28251. value: function usernameAuthProvider() {
  28252. return new st(this.config);
  28253. }
  28254. }, {
  28255. key: "signInAnonymously",
  28256. value: function () {
  28257. var _signInAnonymously = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee23() {
  28258. return _regenerator.default.wrap(function _callee23$(_context23) {
  28259. while (1) {
  28260. switch (_context23.prev = _context23.next) {
  28261. case 0:
  28262. return _context23.abrupt("return", new et(this.config).signIn());
  28263. case 1:
  28264. case "end":
  28265. return _context23.stop();
  28266. }
  28267. }
  28268. }, _callee23, this);
  28269. }));
  28270. function signInAnonymously() {
  28271. return _signInAnonymously.apply(this, arguments);
  28272. }
  28273. return signInAnonymously;
  28274. }()
  28275. }, {
  28276. key: "signInWithEmailAndPassword",
  28277. value: function () {
  28278. var _signInWithEmailAndPassword = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee24(e, t) {
  28279. return _regenerator.default.wrap(function _callee24$(_context24) {
  28280. while (1) {
  28281. switch (_context24.prev = _context24.next) {
  28282. case 0:
  28283. return _context24.abrupt("return", new nt(this.config).signIn(e, t));
  28284. case 1:
  28285. case "end":
  28286. return _context24.stop();
  28287. }
  28288. }
  28289. }, _callee24, this);
  28290. }));
  28291. function signInWithEmailAndPassword(_x19, _x20) {
  28292. return _signInWithEmailAndPassword.apply(this, arguments);
  28293. }
  28294. return signInWithEmailAndPassword;
  28295. }()
  28296. }, {
  28297. key: "signInWithUsernameAndPassword",
  28298. value: function signInWithUsernameAndPassword(e, t) {
  28299. return new st(this.config).signIn(e, t);
  28300. }
  28301. }, {
  28302. key: "linkAndRetrieveDataWithTicket",
  28303. value: function () {
  28304. var _linkAndRetrieveDataWithTicket2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee25(e) {
  28305. return _regenerator.default.wrap(function _callee25$(_context25) {
  28306. while (1) {
  28307. switch (_context25.prev = _context25.next) {
  28308. case 0:
  28309. this._anonymousAuthProvider || (this._anonymousAuthProvider = new et(this.config)), Ne(je, this._onAnonymousConverted);
  28310. _context25.next = 3;
  28311. return this._anonymousAuthProvider.linkAndRetrieveDataWithTicket(e);
  28312. case 3:
  28313. return _context25.abrupt("return", _context25.sent);
  28314. case 4:
  28315. case "end":
  28316. return _context25.stop();
  28317. }
  28318. }
  28319. }, _callee25, this);
  28320. }));
  28321. function linkAndRetrieveDataWithTicket(_x21) {
  28322. return _linkAndRetrieveDataWithTicket2.apply(this, arguments);
  28323. }
  28324. return linkAndRetrieveDataWithTicket;
  28325. }()
  28326. }, {
  28327. key: "signOut",
  28328. value: function () {
  28329. var _signOut = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee26() {
  28330. var _this$_cache$keys10, e, t, n, s, r;
  28331. return _regenerator.default.wrap(function _callee26$(_context26) {
  28332. while (1) {
  28333. switch (_context26.prev = _context26.next) {
  28334. case 0:
  28335. if (!(this.loginType === $e.ANONYMOUS)) {
  28336. _context26.next = 2;
  28337. break;
  28338. }
  28339. throw new ne({
  28340. message: "匿名用户不支持登出操作"
  28341. });
  28342. case 2:
  28343. _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);
  28344. if (s) {
  28345. _context26.next = 5;
  28346. break;
  28347. }
  28348. return _context26.abrupt("return");
  28349. case 5:
  28350. _context26.next = 7;
  28351. return this._request.send("auth.logout", {
  28352. refresh_token: s
  28353. });
  28354. case 7:
  28355. r = _context26.sent;
  28356. return _context26.abrupt("return", (this._cache.removeStore(e), this._cache.removeStore(t), this._cache.removeStore(n), De(qe), De(Ke, {
  28357. env: this.config.env,
  28358. loginType: $e.NULL,
  28359. persistence: this.config.persistence
  28360. }), r));
  28361. case 9:
  28362. case "end":
  28363. return _context26.stop();
  28364. }
  28365. }
  28366. }, _callee26, this);
  28367. }));
  28368. function signOut() {
  28369. return _signOut.apply(this, arguments);
  28370. }
  28371. return signOut;
  28372. }()
  28373. }, {
  28374. key: "signUpWithEmailAndPassword",
  28375. value: function () {
  28376. var _signUpWithEmailAndPassword = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee27(e, t) {
  28377. return _regenerator.default.wrap(function _callee27$(_context27) {
  28378. while (1) {
  28379. switch (_context27.prev = _context27.next) {
  28380. case 0:
  28381. return _context27.abrupt("return", this._request.send("auth.signUpWithEmailAndPassword", {
  28382. email: e,
  28383. password: t
  28384. }));
  28385. case 1:
  28386. case "end":
  28387. return _context27.stop();
  28388. }
  28389. }
  28390. }, _callee27, this);
  28391. }));
  28392. function signUpWithEmailAndPassword(_x22, _x23) {
  28393. return _signUpWithEmailAndPassword.apply(this, arguments);
  28394. }
  28395. return signUpWithEmailAndPassword;
  28396. }()
  28397. }, {
  28398. key: "sendPasswordResetEmail",
  28399. value: function () {
  28400. var _sendPasswordResetEmail = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee28(e) {
  28401. return _regenerator.default.wrap(function _callee28$(_context28) {
  28402. while (1) {
  28403. switch (_context28.prev = _context28.next) {
  28404. case 0:
  28405. return _context28.abrupt("return", this._request.send("auth.sendPasswordResetEmail", {
  28406. email: e
  28407. }));
  28408. case 1:
  28409. case "end":
  28410. return _context28.stop();
  28411. }
  28412. }
  28413. }, _callee28, this);
  28414. }));
  28415. function sendPasswordResetEmail(_x24) {
  28416. return _sendPasswordResetEmail.apply(this, arguments);
  28417. }
  28418. return sendPasswordResetEmail;
  28419. }()
  28420. }, {
  28421. key: "onLoginStateChanged",
  28422. value: function onLoginStateChanged(e) {
  28423. var _this9 = this;
  28424. Ne(qe, function () {
  28425. var t = _this9.hasLoginState();
  28426. e.call(_this9, t);
  28427. });
  28428. var t = this.hasLoginState();
  28429. e.call(this, t);
  28430. }
  28431. }, {
  28432. key: "onLoginStateExpired",
  28433. value: function onLoginStateExpired(e) {
  28434. Ne(Me, e.bind(this));
  28435. }
  28436. }, {
  28437. key: "onAccessTokenRefreshed",
  28438. value: function onAccessTokenRefreshed(e) {
  28439. Ne(Be, e.bind(this));
  28440. }
  28441. }, {
  28442. key: "onAnonymousConverted",
  28443. value: function onAnonymousConverted(e) {
  28444. Ne(je, e.bind(this));
  28445. }
  28446. }, {
  28447. key: "onLoginTypeChanged",
  28448. value: function onLoginTypeChanged(e) {
  28449. var _this10 = this;
  28450. Ne(Ke, function () {
  28451. var t = _this10.hasLoginState();
  28452. e.call(_this10, t);
  28453. });
  28454. }
  28455. }, {
  28456. key: "getAccessToken",
  28457. value: function () {
  28458. var _getAccessToken2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee29() {
  28459. return _regenerator.default.wrap(function _callee29$(_context29) {
  28460. while (1) {
  28461. switch (_context29.prev = _context29.next) {
  28462. case 0:
  28463. _context29.next = 2;
  28464. return this._request.getAccessToken();
  28465. case 2:
  28466. _context29.t0 = _context29.sent.accessToken;
  28467. _context29.t1 = this.config.env;
  28468. return _context29.abrupt("return", {
  28469. accessToken: _context29.t0,
  28470. env: _context29.t1
  28471. });
  28472. case 5:
  28473. case "end":
  28474. return _context29.stop();
  28475. }
  28476. }
  28477. }, _callee29, this);
  28478. }));
  28479. function getAccessToken() {
  28480. return _getAccessToken2.apply(this, arguments);
  28481. }
  28482. return getAccessToken;
  28483. }()
  28484. }, {
  28485. key: "hasLoginState",
  28486. value: function hasLoginState() {
  28487. var e = this._cache.keys.refreshTokenKey;
  28488. return this._cache.getStore(e) ? new Ze(this.config.env) : null;
  28489. }
  28490. }, {
  28491. key: "isUsernameRegistered",
  28492. value: function () {
  28493. var _isUsernameRegistered = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee30(e) {
  28494. var _yield$this$_request$5, t;
  28495. return _regenerator.default.wrap(function _callee30$(_context30) {
  28496. while (1) {
  28497. switch (_context30.prev = _context30.next) {
  28498. case 0:
  28499. if (!("string" != typeof e)) {
  28500. _context30.next = 2;
  28501. break;
  28502. }
  28503. throw new ne({
  28504. code: "PARAM_ERROR",
  28505. message: "username must be a string"
  28506. });
  28507. case 2:
  28508. _context30.next = 4;
  28509. return this._request.send("auth.isUsernameRegistered", {
  28510. username: e
  28511. });
  28512. case 4:
  28513. _yield$this$_request$5 = _context30.sent;
  28514. t = _yield$this$_request$5.data;
  28515. return _context30.abrupt("return", t && t.isRegistered);
  28516. case 7:
  28517. case "end":
  28518. return _context30.stop();
  28519. }
  28520. }
  28521. }, _callee30, this);
  28522. }));
  28523. function isUsernameRegistered(_x25) {
  28524. return _isUsernameRegistered.apply(this, arguments);
  28525. }
  28526. return isUsernameRegistered;
  28527. }()
  28528. }, {
  28529. key: "getLoginState",
  28530. value: function getLoginState() {
  28531. return Promise.resolve(this.hasLoginState());
  28532. }
  28533. }, {
  28534. key: "signInWithTicket",
  28535. value: function () {
  28536. var _signInWithTicket = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee31(e) {
  28537. return _regenerator.default.wrap(function _callee31$(_context31) {
  28538. while (1) {
  28539. switch (_context31.prev = _context31.next) {
  28540. case 0:
  28541. return _context31.abrupt("return", new tt(this.config).signIn(e));
  28542. case 1:
  28543. case "end":
  28544. return _context31.stop();
  28545. }
  28546. }
  28547. }, _callee31, this);
  28548. }));
  28549. function signInWithTicket(_x26) {
  28550. return _signInWithTicket.apply(this, arguments);
  28551. }
  28552. return signInWithTicket;
  28553. }()
  28554. }, {
  28555. key: "shouldRefreshAccessToken",
  28556. value: function shouldRefreshAccessToken(e) {
  28557. this._request._shouldRefreshAccessTokenHook = e.bind(this);
  28558. }
  28559. }, {
  28560. key: "getUserInfo",
  28561. value: function getUserInfo() {
  28562. return this._request.send("auth.getUserInfo", {}).then(function (e) {
  28563. return e.code ? e : _objectSpread(_objectSpread({}, e.data), {}, {
  28564. requestId: e.seqId
  28565. });
  28566. });
  28567. }
  28568. }, {
  28569. key: "getAuthHeader",
  28570. value: function getAuthHeader() {
  28571. var _this$_cache$keys11 = this._cache.keys,
  28572. e = _this$_cache$keys11.refreshTokenKey,
  28573. t = _this$_cache$keys11.accessTokenKey,
  28574. n = this._cache.getStore(e);
  28575. return {
  28576. "x-cloudbase-credentials": this._cache.getStore(t) + "/@@/" + n
  28577. };
  28578. }
  28579. }, {
  28580. key: "_onAnonymousConverted",
  28581. value: function _onAnonymousConverted(e) {
  28582. var t = e.data.env;
  28583. t === this.config.env && this._cache.updatePersistence(this.config.persistence);
  28584. }
  28585. }, {
  28586. key: "_onLoginTypeChanged",
  28587. value: function _onLoginTypeChanged(e) {
  28588. var _e$data = e.data,
  28589. t = _e$data.loginType,
  28590. n = _e$data.persistence,
  28591. s = _e$data.env;
  28592. s === this.config.env && (this._cache.updatePersistence(n), this._cache.setStore(this._cache.keys.loginTypeKey, t));
  28593. }
  28594. }]);
  28595. return rt;
  28596. }();
  28597. var it = function it(e, t) {
  28598. t = t || we();
  28599. var n = Ye(this.config.env),
  28600. s = e.cloudPath,
  28601. r = e.filePath,
  28602. i = e.onUploadProgress,
  28603. _e$fileType = e.fileType,
  28604. o = _e$fileType === void 0 ? "image" : _e$fileType;
  28605. return n.send("storage.getUploadMetadata", {
  28606. path: s
  28607. }).then(function (e) {
  28608. var _e$data2 = e.data,
  28609. a = _e$data2.url,
  28610. c = _e$data2.authorization,
  28611. u = _e$data2.token,
  28612. h = _e$data2.fileId,
  28613. l = _e$data2.cosFileId,
  28614. d = e.requestId,
  28615. p = {
  28616. key: s,
  28617. signature: c,
  28618. "x-cos-meta-fileid": l,
  28619. success_action_status: "201",
  28620. "x-cos-security-token": u
  28621. };
  28622. n.upload({
  28623. url: a,
  28624. data: p,
  28625. file: r,
  28626. name: s,
  28627. fileType: o,
  28628. onUploadProgress: i
  28629. }).then(function (e) {
  28630. 201 === e.statusCode ? t(null, {
  28631. fileID: h,
  28632. requestId: d
  28633. }) : t(new ne({
  28634. code: "STORAGE_REQUEST_FAIL",
  28635. message: "STORAGE_REQUEST_FAIL: ".concat(e.data)
  28636. }));
  28637. }).catch(function (e) {
  28638. t(e);
  28639. });
  28640. }).catch(function (e) {
  28641. t(e);
  28642. }), t.promise;
  28643. },
  28644. ot = function ot(e, t) {
  28645. t = t || we();
  28646. var n = Ye(this.config.env),
  28647. s = e.cloudPath;
  28648. return n.send("storage.getUploadMetadata", {
  28649. path: s
  28650. }).then(function (e) {
  28651. t(null, e);
  28652. }).catch(function (e) {
  28653. t(e);
  28654. }), t.promise;
  28655. },
  28656. at = function at(_ref7, t) {
  28657. var e = _ref7.fileList;
  28658. if (t = t || we(), !e || !Array.isArray(e)) return {
  28659. code: "INVALID_PARAM",
  28660. message: "fileList必须是非空的数组"
  28661. };
  28662. var _iterator3 = _createForOfIteratorHelper(e),
  28663. _step3;
  28664. try {
  28665. for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
  28666. var _t8 = _step3.value;
  28667. if (!_t8 || "string" != typeof _t8) return {
  28668. code: "INVALID_PARAM",
  28669. message: "fileList的元素必须是非空的字符串"
  28670. };
  28671. }
  28672. } catch (err) {
  28673. _iterator3.e(err);
  28674. } finally {
  28675. _iterator3.f();
  28676. }
  28677. var n = {
  28678. fileid_list: e
  28679. };
  28680. return Ye(this.config.env).send("storage.batchDeleteFile", n).then(function (e) {
  28681. e.code ? t(null, e) : t(null, {
  28682. fileList: e.data.delete_list,
  28683. requestId: e.requestId
  28684. });
  28685. }).catch(function (e) {
  28686. t(e);
  28687. }), t.promise;
  28688. },
  28689. ct = function ct(_ref8, t) {
  28690. var e = _ref8.fileList;
  28691. t = t || we(), e && Array.isArray(e) || t(null, {
  28692. code: "INVALID_PARAM",
  28693. message: "fileList必须是非空的数组"
  28694. });
  28695. var n = [];
  28696. var _iterator4 = _createForOfIteratorHelper(e),
  28697. _step4;
  28698. try {
  28699. for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
  28700. var _s9 = _step4.value;
  28701. "object" == (0, _typeof2.default)(_s9) ? (_s9.hasOwnProperty("fileID") && _s9.hasOwnProperty("maxAge") || t(null, {
  28702. code: "INVALID_PARAM",
  28703. message: "fileList的元素必须是包含fileID和maxAge的对象"
  28704. }), n.push({
  28705. fileid: _s9.fileID,
  28706. max_age: _s9.maxAge
  28707. })) : "string" == typeof _s9 ? n.push({
  28708. fileid: _s9
  28709. }) : t(null, {
  28710. code: "INVALID_PARAM",
  28711. message: "fileList的元素必须是字符串"
  28712. });
  28713. }
  28714. } catch (err) {
  28715. _iterator4.e(err);
  28716. } finally {
  28717. _iterator4.f();
  28718. }
  28719. var s = {
  28720. file_list: n
  28721. };
  28722. return Ye(this.config.env).send("storage.batchGetDownloadUrl", s).then(function (e) {
  28723. e.code ? t(null, e) : t(null, {
  28724. fileList: e.data.download_list,
  28725. requestId: e.requestId
  28726. });
  28727. }).catch(function (e) {
  28728. t(e);
  28729. }), t.promise;
  28730. },
  28731. ut = /*#__PURE__*/function () {
  28732. var _ref10 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee32(_ref9, t) {
  28733. var e, n, s, r;
  28734. return _regenerator.default.wrap(function _callee32$(_context32) {
  28735. while (1) {
  28736. switch (_context32.prev = _context32.next) {
  28737. case 0:
  28738. e = _ref9.fileID;
  28739. _context32.next = 3;
  28740. return ct.call(this, {
  28741. fileList: [{
  28742. fileID: e,
  28743. maxAge: 600
  28744. }]
  28745. });
  28746. case 3:
  28747. n = _context32.sent.fileList[0];
  28748. if (!("SUCCESS" !== n.code)) {
  28749. _context32.next = 6;
  28750. break;
  28751. }
  28752. return _context32.abrupt("return", t ? t(n) : new Promise(function (e) {
  28753. e(n);
  28754. }));
  28755. case 6:
  28756. s = Ye(this.config.env);
  28757. r = n.download_url;
  28758. if (!(r = encodeURI(r), !t)) {
  28759. _context32.next = 10;
  28760. break;
  28761. }
  28762. return _context32.abrupt("return", s.download({
  28763. url: r
  28764. }));
  28765. case 10:
  28766. _context32.t0 = t;
  28767. _context32.next = 13;
  28768. return s.download({
  28769. url: r
  28770. });
  28771. case 13:
  28772. _context32.t1 = _context32.sent;
  28773. (0, _context32.t0)(_context32.t1);
  28774. case 15:
  28775. case "end":
  28776. return _context32.stop();
  28777. }
  28778. }
  28779. }, _callee32, this);
  28780. }));
  28781. return function ut(_x27, _x28) {
  28782. return _ref10.apply(this, arguments);
  28783. };
  28784. }(),
  28785. ht = function ht(_ref11, i) {
  28786. var e = _ref11.name,
  28787. t = _ref11.data,
  28788. n = _ref11.query,
  28789. s = _ref11.parse,
  28790. r = _ref11.search;
  28791. var o = i || we();
  28792. var a;
  28793. try {
  28794. a = t ? JSON.stringify(t) : "";
  28795. } catch (e) {
  28796. return Promise.reject(e);
  28797. }
  28798. if (!e) return Promise.reject(new ne({
  28799. code: "PARAM_ERROR",
  28800. message: "函数名不能为空"
  28801. }));
  28802. var c = {
  28803. inQuery: n,
  28804. parse: s,
  28805. search: r,
  28806. function_name: e,
  28807. request_data: a
  28808. };
  28809. return Ye(this.config.env).send("functions.invokeFunction", c).then(function (e) {
  28810. if (e.code) o(null, e);else {
  28811. var _t9 = e.data.response_data;
  28812. if (s) o(null, {
  28813. result: _t9,
  28814. requestId: e.requestId
  28815. });else try {
  28816. _t9 = JSON.parse(e.data.response_data), o(null, {
  28817. result: _t9,
  28818. requestId: e.requestId
  28819. });
  28820. } catch (e) {
  28821. o(new ne({
  28822. message: "response data must be json"
  28823. }));
  28824. }
  28825. }
  28826. return o.promise;
  28827. }).catch(function (e) {
  28828. o(e);
  28829. }), o.promise;
  28830. },
  28831. lt = {
  28832. timeout: 15e3,
  28833. persistence: "session"
  28834. },
  28835. dt = {};
  28836. var pt = /*#__PURE__*/function () {
  28837. function pt(e) {
  28838. (0, _classCallCheck2.default)(this, pt);
  28839. this.config = e || this.config, this.authObj = void 0;
  28840. }
  28841. (0, _createClass2.default)(pt, [{
  28842. key: "init",
  28843. value: function init(e) {
  28844. switch (ke.adapter || (this.requestClient = new ke.adapter.reqClass({
  28845. timeout: e.timeout || 5e3,
  28846. timeoutMsg: "\u8BF7\u6C42\u5728".concat((e.timeout || 5e3) / 1e3, "s\u5185\u672A\u5B8C\u6210\uFF0C\u5DF2\u4E2D\u65AD")
  28847. })), this.config = _objectSpread(_objectSpread({}, lt), e), !0) {
  28848. case this.config.timeout > 6e5:
  28849. console.warn("timeout大于可配置上限[10分钟],已重置为上限数值"), this.config.timeout = 6e5;
  28850. break;
  28851. case this.config.timeout < 100:
  28852. console.warn("timeout小于可配置下限[100ms],已重置为下限数值"), this.config.timeout = 100;
  28853. }
  28854. return new pt(this.config);
  28855. }
  28856. }, {
  28857. key: "auth",
  28858. value: function auth() {
  28859. var _ref12 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  28860. e = _ref12.persistence;
  28861. if (this.authObj) return this.authObj;
  28862. var t = e || ke.adapter.primaryStorage || lt.persistence;
  28863. var n;
  28864. return t !== this.config.persistence && (this.config.persistence = t), function (e) {
  28865. var t = e.env;
  28866. Ee[t] = new Ae(e), Oe[t] = new Ae(_objectSpread(_objectSpread({}, e), {}, {
  28867. persistence: "local"
  28868. }));
  28869. }(this.config), n = this.config, Ve[n.env] = new Ge(n), this.authObj = new rt(this.config), this.authObj;
  28870. }
  28871. }, {
  28872. key: "on",
  28873. value: function on(e, t) {
  28874. return Ne.apply(this, [e, t]);
  28875. }
  28876. }, {
  28877. key: "off",
  28878. value: function off(e, t) {
  28879. return Fe.apply(this, [e, t]);
  28880. }
  28881. }, {
  28882. key: "callFunction",
  28883. value: function callFunction(e, t) {
  28884. return ht.apply(this, [e, t]);
  28885. }
  28886. }, {
  28887. key: "deleteFile",
  28888. value: function deleteFile(e, t) {
  28889. return at.apply(this, [e, t]);
  28890. }
  28891. }, {
  28892. key: "getTempFileURL",
  28893. value: function getTempFileURL(e, t) {
  28894. return ct.apply(this, [e, t]);
  28895. }
  28896. }, {
  28897. key: "downloadFile",
  28898. value: function downloadFile(e, t) {
  28899. return ut.apply(this, [e, t]);
  28900. }
  28901. }, {
  28902. key: "uploadFile",
  28903. value: function uploadFile(e, t) {
  28904. return it.apply(this, [e, t]);
  28905. }
  28906. }, {
  28907. key: "getUploadMetadata",
  28908. value: function getUploadMetadata(e, t) {
  28909. return ot.apply(this, [e, t]);
  28910. }
  28911. }, {
  28912. key: "registerExtension",
  28913. value: function registerExtension(e) {
  28914. dt[e.name] = e;
  28915. }
  28916. }, {
  28917. key: "invokeExtension",
  28918. value: function () {
  28919. var _invokeExtension = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee33(e, t) {
  28920. var n;
  28921. return _regenerator.default.wrap(function _callee33$(_context33) {
  28922. while (1) {
  28923. switch (_context33.prev = _context33.next) {
  28924. case 0:
  28925. n = dt[e];
  28926. if (n) {
  28927. _context33.next = 3;
  28928. break;
  28929. }
  28930. throw new ne({
  28931. message: "\u6269\u5C55".concat(e, " \u5FC5\u987B\u5148\u6CE8\u518C")
  28932. });
  28933. case 3:
  28934. _context33.next = 5;
  28935. return n.invoke(t, this);
  28936. case 5:
  28937. return _context33.abrupt("return", _context33.sent);
  28938. case 6:
  28939. case "end":
  28940. return _context33.stop();
  28941. }
  28942. }
  28943. }, _callee33, this);
  28944. }));
  28945. function invokeExtension(_x29, _x30) {
  28946. return _invokeExtension.apply(this, arguments);
  28947. }
  28948. return invokeExtension;
  28949. }()
  28950. }, {
  28951. key: "useAdapters",
  28952. value: function useAdapters(e) {
  28953. var _ref13 = be(e) || {},
  28954. t = _ref13.adapter,
  28955. n = _ref13.runtime;
  28956. t && (ke.adapter = t), n && (ke.runtime = n);
  28957. }
  28958. }]);
  28959. return pt;
  28960. }();
  28961. var ft = new pt();
  28962. function gt(e, t, n) {
  28963. void 0 === n && (n = {});
  28964. var s = /\?/.test(t),
  28965. r = "";
  28966. for (var i in n) {
  28967. "" === r ? !s && (t += "?") : r += "&", r += i + "=" + encodeURIComponent(n[i]);
  28968. }
  28969. return /^http(s)?:\/\//.test(t += r) ? t : "" + e + t;
  28970. }
  28971. var mt = /*#__PURE__*/function () {
  28972. function mt() {
  28973. (0, _classCallCheck2.default)(this, mt);
  28974. }
  28975. (0, _createClass2.default)(mt, [{
  28976. key: "post",
  28977. value: function post(e) {
  28978. var t = e.url,
  28979. n = e.data,
  28980. s = e.headers;
  28981. return new Promise(function (e, r) {
  28982. se.request({
  28983. url: gt("https:", t),
  28984. data: n,
  28985. method: "POST",
  28986. header: s,
  28987. success: function success(t) {
  28988. e(t);
  28989. },
  28990. fail: function fail(e) {
  28991. r(e);
  28992. }
  28993. });
  28994. });
  28995. }
  28996. }, {
  28997. key: "upload",
  28998. value: function upload(e) {
  28999. return new Promise(function (t, n) {
  29000. var s = e.url,
  29001. r = e.file,
  29002. i = e.data,
  29003. o = e.headers,
  29004. a = e.fileType,
  29005. c = se.uploadFile({
  29006. url: gt("https:", s),
  29007. name: "file",
  29008. formData: Object.assign({}, i),
  29009. filePath: r,
  29010. fileType: a,
  29011. header: o,
  29012. success: function success(e) {
  29013. var n = {
  29014. statusCode: e.statusCode,
  29015. data: e.data || {}
  29016. };
  29017. 200 === e.statusCode && i.success_action_status && (n.statusCode = parseInt(i.success_action_status, 10)), t(n);
  29018. },
  29019. fail: function fail(e) {
  29020. n(new Error(e.errMsg || "uploadFile:fail"));
  29021. }
  29022. });
  29023. "function" == typeof e.onUploadProgress && c && "function" == typeof c.onProgressUpdate && c.onProgressUpdate(function (t) {
  29024. e.onUploadProgress({
  29025. loaded: t.totalBytesSent,
  29026. total: t.totalBytesExpectedToSend
  29027. });
  29028. });
  29029. });
  29030. }
  29031. }]);
  29032. return mt;
  29033. }();
  29034. var yt = {
  29035. setItem: function setItem(e, t) {
  29036. se.setStorageSync(e, t);
  29037. },
  29038. getItem: function getItem(e) {
  29039. return se.getStorageSync(e);
  29040. },
  29041. removeItem: function removeItem(e) {
  29042. se.removeStorageSync(e);
  29043. },
  29044. clear: function clear() {
  29045. se.clearStorageSync();
  29046. }
  29047. };
  29048. var _t = {
  29049. genAdapter: function genAdapter() {
  29050. return {
  29051. root: {},
  29052. reqClass: mt,
  29053. localStorage: yt,
  29054. primaryStorage: "local"
  29055. };
  29056. },
  29057. isMatch: function isMatch() {
  29058. return !0;
  29059. },
  29060. runtime: "uni_app"
  29061. };
  29062. ft.useAdapters(_t);
  29063. var wt = ft,
  29064. vt = wt.init;
  29065. wt.init = function (e) {
  29066. e.env = e.spaceId;
  29067. var t = vt.call(this, e);
  29068. t.config.provider = "tencent", t.config.spaceId = e.spaceId;
  29069. var n = t.auth;
  29070. return t.auth = function (e) {
  29071. var t = n.call(this, e);
  29072. return ["linkAndRetrieveDataWithTicket", "signInAnonymously", "signOut", "getAccessToken", "getLoginState", "signInWithTicket", "getUserInfo"].forEach(function (e) {
  29073. var n;
  29074. t[e] = (n = t[e], function (e) {
  29075. e = e || {};
  29076. var _te = te(e),
  29077. t = _te.success,
  29078. s = _te.fail,
  29079. r = _te.complete;
  29080. if (!(t || s || r)) return n.call(this, e);
  29081. n.call(this, e).then(function (e) {
  29082. t && t(e), r && r(e);
  29083. }, function (e) {
  29084. s && s(e), r && r(e);
  29085. });
  29086. }).bind(t);
  29087. }), t;
  29088. }, t.customAuth = t.auth, t;
  29089. };
  29090. var It = wt;
  29091. var St = /*#__PURE__*/function (_fe) {
  29092. (0, _inherits2.default)(St, _fe);
  29093. var _super8 = _createSuper(St);
  29094. function St() {
  29095. (0, _classCallCheck2.default)(this, St);
  29096. return _super8.apply(this, arguments);
  29097. }
  29098. (0, _createClass2.default)(St, [{
  29099. key: "getAccessToken",
  29100. value: function getAccessToken() {
  29101. var _this11 = this;
  29102. return new Promise(function (e, t) {
  29103. var n = "Anonymous_Access_token";
  29104. _this11.setAccessToken(n), e(n);
  29105. });
  29106. }
  29107. }, {
  29108. key: "setupRequest",
  29109. value: function setupRequest(e, t) {
  29110. var n = Object.assign({}, e, {
  29111. spaceId: this.config.spaceId,
  29112. timestamp: Date.now()
  29113. }),
  29114. s = {
  29115. "Content-Type": "application/json"
  29116. };
  29117. "auth" !== t && (n.token = this.accessToken, s["x-basement-token"] = this.accessToken), s["x-serverless-sign"] = le.sign(n, this.config.clientSecret);
  29118. var r = he();
  29119. s["x-client-info"] = encodeURIComponent(JSON.stringify(r));
  29120. var _re = re(),
  29121. i = _re.token;
  29122. return s["x-client-token"] = i, {
  29123. url: this.config.requestUrl,
  29124. method: "POST",
  29125. data: n,
  29126. dataType: "json",
  29127. header: JSON.parse(JSON.stringify(s))
  29128. };
  29129. }
  29130. }, {
  29131. key: "uploadFileToOSS",
  29132. value: function uploadFileToOSS(_ref14) {
  29133. var _this12 = this;
  29134. var e = _ref14.url,
  29135. t = _ref14.formData,
  29136. n = _ref14.name,
  29137. s = _ref14.filePath,
  29138. r = _ref14.fileType,
  29139. i = _ref14.onUploadProgress;
  29140. return new Promise(function (o, a) {
  29141. var c = _this12.adapter.uploadFile({
  29142. url: e,
  29143. formData: t,
  29144. name: n,
  29145. filePath: s,
  29146. fileType: r,
  29147. success: function success(e) {
  29148. e && e.statusCode < 400 ? o(e) : a(new ne({
  29149. code: "UPLOAD_FAILED",
  29150. message: "文件上传失败"
  29151. }));
  29152. },
  29153. fail: function fail(e) {
  29154. a(new ne({
  29155. code: e.code || "UPLOAD_FAILED",
  29156. message: e.message || e.errMsg || "文件上传失败"
  29157. }));
  29158. }
  29159. });
  29160. "function" == typeof i && c && "function" == typeof c.onProgressUpdate && c.onProgressUpdate(function (e) {
  29161. i({
  29162. loaded: e.totalBytesSent,
  29163. total: e.totalBytesExpectedToSend
  29164. });
  29165. });
  29166. });
  29167. }
  29168. }, {
  29169. key: "uploadFile",
  29170. value: function uploadFile(_ref15) {
  29171. var _this13 = this;
  29172. var e = _ref15.filePath,
  29173. t = _ref15.cloudPath,
  29174. _ref15$fileType = _ref15.fileType,
  29175. n = _ref15$fileType === void 0 ? "image" : _ref15$fileType,
  29176. s = _ref15.onUploadProgress;
  29177. if (!t) throw new ne({
  29178. code: "CLOUDPATH_REQUIRED",
  29179. message: "cloudPath不可为空"
  29180. });
  29181. var r;
  29182. return this.getOSSUploadOptionsFromPath({
  29183. cloudPath: t
  29184. }).then(function (t) {
  29185. var _t$result = t.result,
  29186. i = _t$result.url,
  29187. o = _t$result.formData,
  29188. a = _t$result.name;
  29189. r = t.result.fileUrl;
  29190. var c = {
  29191. url: i,
  29192. formData: o,
  29193. name: a,
  29194. filePath: e,
  29195. fileType: n
  29196. };
  29197. return _this13.uploadFileToOSS(Object.assign({}, c, {
  29198. onUploadProgress: s
  29199. }));
  29200. }).then(function () {
  29201. return _this13.reportOSSUpload({
  29202. cloudPath: t
  29203. });
  29204. }).then(function (t) {
  29205. return new Promise(function (n, s) {
  29206. t.success ? n({
  29207. success: !0,
  29208. filePath: e,
  29209. fileID: r
  29210. }) : s(new ne({
  29211. code: "UPLOAD_FAILED",
  29212. message: "文件上传失败"
  29213. }));
  29214. });
  29215. });
  29216. }
  29217. }, {
  29218. key: "deleteFile",
  29219. value: function deleteFile(_ref16) {
  29220. var e = _ref16.fileList;
  29221. var t = {
  29222. method: "serverless.file.resource.delete",
  29223. params: JSON.stringify({
  29224. fileList: e
  29225. })
  29226. };
  29227. return this.request(this.setupRequest(t)).then(function (e) {
  29228. if (e.success) return e.result;
  29229. throw new ne({
  29230. code: "DELETE_FILE_FAILED",
  29231. message: "删除文件失败"
  29232. });
  29233. });
  29234. }
  29235. }, {
  29236. key: "getTempFileURL",
  29237. value: function getTempFileURL() {
  29238. var _ref17 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  29239. e = _ref17.fileList;
  29240. if (!Array.isArray(e) || 0 === e.length) throw new ne({
  29241. code: "INVALID_PARAM",
  29242. message: "fileList的元素必须是非空的字符串"
  29243. });
  29244. var t = {
  29245. method: "serverless.file.resource.getTempFileURL",
  29246. params: JSON.stringify({
  29247. fileList: e
  29248. })
  29249. };
  29250. return this.request(this.setupRequest(t)).then(function (e) {
  29251. if (e.success) return {
  29252. fileList: e.result.fileList.map(function (e) {
  29253. return {
  29254. fileID: e.fileID,
  29255. tempFileURL: e.tempFileURL
  29256. };
  29257. })
  29258. };
  29259. throw new ne({
  29260. code: "GET_TEMP_FILE_URL_FAILED",
  29261. message: "获取临时文件链接失败"
  29262. });
  29263. });
  29264. }
  29265. }]);
  29266. return St;
  29267. }(fe);
  29268. var bt = {
  29269. init: function init(e) {
  29270. var t = new St(e),
  29271. n = {
  29272. signInAnonymously: function signInAnonymously() {
  29273. return t.authorize();
  29274. },
  29275. getLoginState: function getLoginState() {
  29276. return Promise.resolve(!1);
  29277. }
  29278. };
  29279. return t.auth = function () {
  29280. return n;
  29281. }, t.customAuth = t.auth, t;
  29282. }
  29283. };
  29284. function kt(_ref18) {
  29285. var e = _ref18.data;
  29286. var t;
  29287. t = he();
  29288. var n = JSON.parse(JSON.stringify(e || {}));
  29289. if (Object.assign(n, {
  29290. clientInfo: t
  29291. }), !n.uniIdToken) {
  29292. var _re2 = re(),
  29293. _e19 = _re2.token;
  29294. _e19 && (n.uniIdToken = _e19);
  29295. }
  29296. return n;
  29297. }
  29298. function Ct() {
  29299. return _Ct.apply(this, arguments);
  29300. }
  29301. function _Ct() {
  29302. _Ct = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee54() {
  29303. var _this26 = this;
  29304. var _ref60,
  29305. e,
  29306. t,
  29307. _this$__dev__,
  29308. n,
  29309. s,
  29310. r,
  29311. i,
  29312. o,
  29313. a,
  29314. _args6 = arguments;
  29315. return _regenerator.default.wrap(function _callee54$(_context54) {
  29316. while (1) {
  29317. switch (_context54.prev = _context54.next) {
  29318. case 0:
  29319. _ref60 = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {}, e = _ref60.name, t = _ref60.data;
  29320. _context54.next = 3;
  29321. return this.__dev__.initLocalNetwork();
  29322. case 3:
  29323. _this$__dev__ = this.__dev__, n = _this$__dev__.localAddress, s = _this$__dev__.localPort, r = {
  29324. aliyun: "aliyun",
  29325. tencent: "tcb"
  29326. }[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);
  29327. return _context54.abrupt("return", new Promise(function (t, n) {
  29328. se.request({
  29329. method: "POST",
  29330. url: o,
  29331. data: {
  29332. name: e,
  29333. platform: P,
  29334. provider: r,
  29335. spaceId: i
  29336. },
  29337. timeout: 3e3,
  29338. success: function success(e) {
  29339. t(e);
  29340. },
  29341. fail: function fail() {
  29342. t({
  29343. data: {
  29344. code: "NETWORK_ERROR",
  29345. message: "连接本地调试服务失败,请检查客户端是否和主机在同一局域网下,自动切换为已部署的云函数。"
  29346. }
  29347. });
  29348. }
  29349. });
  29350. }).then(function () {
  29351. var _ref61 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  29352. e = _ref61.data;
  29353. var _ref62 = e || {},
  29354. t = _ref62.code,
  29355. n = _ref62.message;
  29356. return {
  29357. code: 0 === t ? 0 : t || "SYS_ERR",
  29358. message: n || "SYS_ERR"
  29359. };
  29360. }).then(function (_ref63) {
  29361. var n = _ref63.code,
  29362. s = _ref63.message;
  29363. if (0 !== n) {
  29364. switch (n) {
  29365. case "MODULE_ENCRYPTED":
  29366. 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"));
  29367. break;
  29368. case "FUNCTION_ENCRYPTED":
  29369. 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"));
  29370. break;
  29371. case "ACTION_ENCRYPTED":
  29372. console.error(s || "需要访问加密的uni-clientDB-action,自动切换为云端环境");
  29373. break;
  29374. case "NETWORK_ERROR":
  29375. {
  29376. var _e31 = "连接本地调试服务失败,请检查客户端是否和主机在同一局域网下";
  29377. throw console.error(_e31), new Error(_e31);
  29378. }
  29379. case "SWITCH_TO_CLOUD":
  29380. break;
  29381. default:
  29382. {
  29383. 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");
  29384. throw console.error(_e32), new Error(_e32);
  29385. }
  29386. }
  29387. return _this26._callCloudFunction({
  29388. name: e,
  29389. data: t
  29390. });
  29391. }
  29392. return new Promise(function (e, n) {
  29393. var s = kt.call(_this26, {
  29394. data: t
  29395. });
  29396. se.request({
  29397. method: "POST",
  29398. url: a,
  29399. data: {
  29400. provider: r,
  29401. platform: P,
  29402. param: s
  29403. },
  29404. success: function success() {
  29405. var _ref64 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  29406. t = _ref64.statusCode,
  29407. s = _ref64.data;
  29408. return !t || t >= 400 ? n(new ne({
  29409. code: s.code || "SYS_ERR",
  29410. message: s.message || "request:fail"
  29411. })) : e({
  29412. result: s
  29413. });
  29414. },
  29415. fail: function fail(e) {
  29416. n(new ne({
  29417. code: e.code || e.errCode || "SYS_ERR",
  29418. message: e.message || e.errMsg || "request:fail"
  29419. }));
  29420. }
  29421. });
  29422. });
  29423. }));
  29424. case 5:
  29425. case "end":
  29426. return _context54.stop();
  29427. }
  29428. }
  29429. }, _callee54, this);
  29430. }));
  29431. return _Ct.apply(this, arguments);
  29432. }
  29433. var Tt = [{
  29434. rule: /fc_function_not_found|FUNCTION_NOT_FOUND/,
  29435. content: ",云函数[{functionName}]在云端不存在,请检查此云函数名称是否正确以及该云函数是否已上传到服务空间",
  29436. mode: "append"
  29437. }];
  29438. var Pt = /[\\^$.*+?()[\]{}|]/g,
  29439. At = RegExp(Pt.source);
  29440. function Et(e, t, n) {
  29441. return e.replace(new RegExp((s = t) && At.test(s) ? s.replace(Pt, "\\$&") : s, "g"), n);
  29442. var s;
  29443. }
  29444. var Ot = "none",
  29445. xt = "request",
  29446. Rt = "response",
  29447. Ut = "both";
  29448. var Lt = /*#__PURE__*/function () {
  29449. function Lt() {
  29450. var _ref19 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  29451. e = _ref19.secretType,
  29452. t = _ref19.uniCloudIns;
  29453. (0, _classCallCheck2.default)(this, Lt);
  29454. this.clientType = "", this.secretType = e || Ot, this.uniCloudIns = t;
  29455. var _this$uniCloudIns$con = this.uniCloudIns.config,
  29456. n = _this$uniCloudIns$con.provider,
  29457. s = _this$uniCloudIns$con.spaceId;
  29458. var r;
  29459. this.provider = n, this.spaceId = s, this.scopedGlobalCache = (r = this.uniCloudIns, U("_globalUniCloudSecureNetworkCache__{spaceId}".replace("{spaceId}", r.config.spaceId)));
  29460. }
  29461. (0, _createClass2.default)(Lt, [{
  29462. key: "getSystemInfo",
  29463. value: function getSystemInfo() {
  29464. return this._systemInfo || (this._systemInfo = ce()), this._systemInfo;
  29465. }
  29466. }, {
  29467. key: "appId",
  29468. get: function get() {
  29469. return this.getSystemInfo().appId;
  29470. }
  29471. }, {
  29472. key: "deviceId",
  29473. get: function get() {
  29474. return this.getSystemInfo().deviceId;
  29475. }
  29476. }, {
  29477. key: "encryptData",
  29478. value: function () {
  29479. var _encryptData = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee34(e) {
  29480. return _regenerator.default.wrap(function _callee34$(_context34) {
  29481. while (1) {
  29482. switch (_context34.prev = _context34.next) {
  29483. case 0:
  29484. return _context34.abrupt("return", this.secretType === Ot ? e : this.platformEncryptData(e));
  29485. case 1:
  29486. case "end":
  29487. return _context34.stop();
  29488. }
  29489. }
  29490. }, _callee34, this);
  29491. }));
  29492. function encryptData(_x31) {
  29493. return _encryptData.apply(this, arguments);
  29494. }
  29495. return encryptData;
  29496. }()
  29497. }, {
  29498. key: "decryptResult",
  29499. value: function () {
  29500. var _decryptResult = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee35(e) {
  29501. var _ref20, t, n;
  29502. return _regenerator.default.wrap(function _callee35$(_context35) {
  29503. while (1) {
  29504. switch (_context35.prev = _context35.next) {
  29505. case 0:
  29506. if (!(this.secretType === Ot)) {
  29507. _context35.next = 2;
  29508. break;
  29509. }
  29510. return _context35.abrupt("return", e);
  29511. case 2:
  29512. _ref20 = e || {}, t = _ref20.errCode, n = _ref20.content;
  29513. return _context35.abrupt("return", t || !n ? e : this.secretType === xt ? n : this.platformDecryptResult(e));
  29514. case 4:
  29515. case "end":
  29516. return _context35.stop();
  29517. }
  29518. }
  29519. }, _callee35, this);
  29520. }));
  29521. function decryptResult(_x32) {
  29522. return _decryptResult.apply(this, arguments);
  29523. }
  29524. return decryptResult;
  29525. }()
  29526. }, {
  29527. key: "wrapVerifyClientCallFunction",
  29528. value: function wrapVerifyClientCallFunction(e) {
  29529. var t = this;
  29530. return /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee36() {
  29531. var _ref22,
  29532. n,
  29533. _ref22$data,
  29534. s,
  29535. r,
  29536. _args36 = arguments;
  29537. return _regenerator.default.wrap(function _callee36$(_context36) {
  29538. while (1) {
  29539. switch (_context36.prev = _context36.next) {
  29540. case 0:
  29541. _ref22 = _args36.length > 0 && _args36[0] !== undefined ? _args36[0] : {}, n = _ref22.name, _ref22$data = _ref22.data, s = _ref22$data === void 0 ? {} : _ref22$data;
  29542. _context36.next = 3;
  29543. return t.prepare();
  29544. case 3:
  29545. _context36.next = 5;
  29546. return t.platformGetSignOption();
  29547. case 5:
  29548. (s = JSON.parse(JSON.stringify(s)))._uniCloudOptions = _context36.sent;
  29549. _context36.next = 8;
  29550. return e({
  29551. name: n,
  29552. data: s
  29553. });
  29554. case 8:
  29555. r = _context36.sent;
  29556. _context36.t0 = t.isClientKeyNotFound(r);
  29557. if (!_context36.t0) {
  29558. _context36.next = 19;
  29559. break;
  29560. }
  29561. _context36.next = 13;
  29562. return t.prepare({
  29563. forceUpdate: !0
  29564. });
  29565. case 13:
  29566. _context36.next = 15;
  29567. return t.platformGetSignOption();
  29568. case 15:
  29569. s._uniCloudOptions = _context36.sent;
  29570. _context36.next = 18;
  29571. return e({
  29572. name: n,
  29573. data: s
  29574. });
  29575. case 18:
  29576. r = _context36.sent;
  29577. case 19:
  29578. return _context36.abrupt("return", r);
  29579. case 20:
  29580. case "end":
  29581. return _context36.stop();
  29582. }
  29583. }
  29584. }, _callee36);
  29585. }));
  29586. }
  29587. }, {
  29588. key: "wrapEncryptDataCallFunction",
  29589. value: function wrapEncryptDataCallFunction(e) {
  29590. var t = this;
  29591. return /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee37() {
  29592. var _ref24,
  29593. n,
  29594. _ref24$data,
  29595. s,
  29596. r,
  29597. i,
  29598. _r3,
  29599. _args37 = arguments;
  29600. return _regenerator.default.wrap(function _callee37$(_context37) {
  29601. while (1) {
  29602. switch (_context37.prev = _context37.next) {
  29603. case 0:
  29604. _ref24 = _args37.length > 0 && _args37[0] !== undefined ? _args37[0] : {}, n = _ref24.name, _ref24$data = _ref24.data, s = _ref24$data === void 0 ? {} : _ref24$data;
  29605. _context37.next = 3;
  29606. return t.prepare();
  29607. case 3:
  29608. _context37.next = 5;
  29609. return t.encryptData(s);
  29610. case 5:
  29611. r = _context37.sent;
  29612. _context37.next = 8;
  29613. return e({
  29614. name: n,
  29615. data: r
  29616. });
  29617. case 8:
  29618. i = _context37.sent;
  29619. if (!t.isClientKeyNotFound(i)) {
  29620. _context37.next = 21;
  29621. break;
  29622. }
  29623. _context37.next = 12;
  29624. return t.prepare({
  29625. forceUpdate: !0
  29626. });
  29627. case 12:
  29628. _context37.next = 14;
  29629. return t.encryptData(s);
  29630. case 14:
  29631. _r3 = _context37.sent;
  29632. _context37.next = 17;
  29633. return t.platformGetSignOption();
  29634. case 17:
  29635. s._uniCloudOptions = _context37.sent;
  29636. _context37.next = 20;
  29637. return e({
  29638. name: n,
  29639. data: _r3
  29640. });
  29641. case 20:
  29642. i = _context37.sent;
  29643. case 21:
  29644. _context37.next = 23;
  29645. return t.decryptResult(i.result);
  29646. case 23:
  29647. i.result = _context37.sent;
  29648. return _context37.abrupt("return", i);
  29649. case 25:
  29650. case "end":
  29651. return _context37.stop();
  29652. }
  29653. }
  29654. }, _callee37);
  29655. }));
  29656. }
  29657. }]);
  29658. return Lt;
  29659. }();
  29660. /*! MIT License. Copyright 2015-2018 Richard Moore <me@ricmoo.com>. See LICENSE.txt. */
  29661. function Nt(e) {
  29662. return parseInt(e) === e;
  29663. }
  29664. function Dt(e) {
  29665. if (!Nt(e.length)) return !1;
  29666. for (var t = 0; t < e.length; t++) {
  29667. if (!Nt(e[t]) || e[t] < 0 || e[t] > 255) return !1;
  29668. }
  29669. return !0;
  29670. }
  29671. function Ft(e, t) {
  29672. if (e.buffer && "Uint8Array" === e.name) return t && (e = e.slice ? e.slice() : Array.prototype.slice.call(e)), e;
  29673. if (Array.isArray(e)) {
  29674. if (!Dt(e)) throw new Error("Array contains invalid value: " + e);
  29675. return new Uint8Array(e);
  29676. }
  29677. if (Nt(e.length) && Dt(e)) return new Uint8Array(e);
  29678. throw new Error("unsupported array-like object");
  29679. }
  29680. function qt(e) {
  29681. return new Uint8Array(e);
  29682. }
  29683. function Mt(e, t, n, s, r) {
  29684. null == s && null == r || (e = e.slice ? e.slice(s, r) : Array.prototype.slice.call(e, s, r)), t.set(e, n);
  29685. }
  29686. var Kt,
  29687. jt = {
  29688. toBytes: function toBytes(e) {
  29689. var t = [],
  29690. n = 0;
  29691. for (e = encodeURI(e); n < e.length;) {
  29692. var s = e.charCodeAt(n++);
  29693. 37 === s ? (t.push(parseInt(e.substr(n, 2), 16)), n += 2) : t.push(s);
  29694. }
  29695. return Ft(t);
  29696. },
  29697. fromBytes: function fromBytes(e) {
  29698. for (var t = [], n = 0; n < e.length;) {
  29699. var s = e[n];
  29700. 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);
  29701. }
  29702. return t.join("");
  29703. }
  29704. },
  29705. Bt = (Kt = "0123456789abcdef", {
  29706. toBytes: function toBytes(e) {
  29707. for (var t = [], n = 0; n < e.length; n += 2) {
  29708. t.push(parseInt(e.substr(n, 2), 16));
  29709. }
  29710. return t;
  29711. },
  29712. fromBytes: function fromBytes(e) {
  29713. for (var t = [], n = 0; n < e.length; n++) {
  29714. var s = e[n];
  29715. t.push(Kt[(240 & s) >> 4] + Kt[15 & s]);
  29716. }
  29717. return t.join("");
  29718. }
  29719. }),
  29720. $t = {
  29721. 16: 10,
  29722. 24: 12,
  29723. 32: 14
  29724. },
  29725. 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],
  29726. 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],
  29727. 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],
  29728. 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],
  29729. 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],
  29730. 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],
  29731. 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],
  29732. 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],
  29733. 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],
  29734. 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],
  29735. 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],
  29736. 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],
  29737. 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],
  29738. 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],
  29739. 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];
  29740. function on(e) {
  29741. for (var t = [], n = 0; n < e.length; n += 4) {
  29742. t.push(e[n] << 24 | e[n + 1] << 16 | e[n + 2] << 8 | e[n + 3]);
  29743. }
  29744. return t;
  29745. }
  29746. var an = /*#__PURE__*/function () {
  29747. function an(e) {
  29748. (0, _classCallCheck2.default)(this, an);
  29749. if (!(this instanceof an)) throw Error("AES must be instanitated with `new`");
  29750. Object.defineProperty(this, "key", {
  29751. value: Ft(e, !0)
  29752. }), this._prepare();
  29753. }
  29754. (0, _createClass2.default)(an, [{
  29755. key: "_prepare",
  29756. value: function _prepare() {
  29757. var e = $t[this.key.length];
  29758. if (null == e) throw new Error("invalid key size (must be 16, 24 or 32 bytes)");
  29759. this._Ke = [], this._Kd = [];
  29760. for (var t = 0; t <= e; t++) {
  29761. this._Ke.push([0, 0, 0, 0]), this._Kd.push([0, 0, 0, 0]);
  29762. }
  29763. var n,
  29764. s = 4 * (e + 1),
  29765. r = this.key.length / 4,
  29766. i = on(this.key);
  29767. for (t = 0; t < r; t++) {
  29768. n = t >> 2, this._Ke[n][t % 4] = i[t], this._Kd[e - n][t % 4] = i[t];
  29769. }
  29770. for (var o, a = 0, c = r; c < s;) {
  29771. 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++) {
  29772. i[t] ^= i[t - 1];
  29773. } else {
  29774. for (t = 1; t < r / 2; t++) {
  29775. i[t] ^= i[t - 1];
  29776. }
  29777. 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;
  29778. for (t = r / 2 + 1; t < r; t++) {
  29779. i[t] ^= i[t - 1];
  29780. }
  29781. }
  29782. for (t = 0; t < r && c < s;) {
  29783. u = c >> 2, h = c % 4, this._Ke[u][h] = i[t], this._Kd[e - u][h] = i[t++], c++;
  29784. }
  29785. }
  29786. for (var u = 1; u < e; u++) {
  29787. for (var h = 0; h < 4; h++) {
  29788. o = this._Kd[u][h], this._Kd[u][h] = tn[o >> 24 & 255] ^ nn[o >> 16 & 255] ^ sn[o >> 8 & 255] ^ rn[255 & o];
  29789. }
  29790. }
  29791. }
  29792. }, {
  29793. key: "encrypt",
  29794. value: function encrypt(e) {
  29795. if (16 != e.length) throw new Error("invalid plaintext size (must be 16 bytes)");
  29796. for (var t = this._Ke.length - 1, n = [0, 0, 0, 0], s = on(e), r = 0; r < 4; r++) {
  29797. s[r] ^= this._Ke[0][r];
  29798. }
  29799. for (var i = 1; i < t; i++) {
  29800. for (r = 0; r < 4; r++) {
  29801. 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];
  29802. }
  29803. s = n.slice();
  29804. }
  29805. var o,
  29806. a = qt(16);
  29807. for (r = 0; r < 4; r++) {
  29808. 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);
  29809. }
  29810. return a;
  29811. }
  29812. }, {
  29813. key: "decrypt",
  29814. value: function decrypt(e) {
  29815. if (16 != e.length) throw new Error("invalid ciphertext size (must be 16 bytes)");
  29816. for (var t = this._Kd.length - 1, n = [0, 0, 0, 0], s = on(e), r = 0; r < 4; r++) {
  29817. s[r] ^= this._Kd[0][r];
  29818. }
  29819. for (var i = 1; i < t; i++) {
  29820. for (r = 0; r < 4; r++) {
  29821. 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];
  29822. }
  29823. s = n.slice();
  29824. }
  29825. var o,
  29826. a = qt(16);
  29827. for (r = 0; r < 4; r++) {
  29828. 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);
  29829. }
  29830. return a;
  29831. }
  29832. }]);
  29833. return an;
  29834. }();
  29835. var cn = /*#__PURE__*/function () {
  29836. function cn(e) {
  29837. (0, _classCallCheck2.default)(this, cn);
  29838. if (!(this instanceof cn)) throw Error("AES must be instanitated with `new`");
  29839. this.description = "Electronic Code Block", this.name = "ecb", this._aes = new an(e);
  29840. }
  29841. (0, _createClass2.default)(cn, [{
  29842. key: "encrypt",
  29843. value: function encrypt(e) {
  29844. if ((e = Ft(e)).length % 16 != 0) throw new Error("invalid plaintext size (must be multiple of 16 bytes)");
  29845. for (var t = qt(e.length), n = qt(16), s = 0; s < e.length; s += 16) {
  29846. Mt(e, n, 0, s, s + 16), Mt(n = this._aes.encrypt(n), t, s);
  29847. }
  29848. return t;
  29849. }
  29850. }, {
  29851. key: "decrypt",
  29852. value: function decrypt(e) {
  29853. if ((e = Ft(e)).length % 16 != 0) throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");
  29854. for (var t = qt(e.length), n = qt(16), s = 0; s < e.length; s += 16) {
  29855. Mt(e, n, 0, s, s + 16), Mt(n = this._aes.decrypt(n), t, s);
  29856. }
  29857. return t;
  29858. }
  29859. }]);
  29860. return cn;
  29861. }();
  29862. var un = /*#__PURE__*/function () {
  29863. function un(e, t) {
  29864. (0, _classCallCheck2.default)(this, un);
  29865. if (!(this instanceof un)) throw Error("AES must be instanitated with `new`");
  29866. if (this.description = "Cipher Block Chaining", this.name = "cbc", t) {
  29867. if (16 != t.length) throw new Error("invalid initialation vector size (must be 16 bytes)");
  29868. } else t = qt(16);
  29869. this._lastCipherblock = Ft(t, !0), this._aes = new an(e);
  29870. }
  29871. (0, _createClass2.default)(un, [{
  29872. key: "encrypt",
  29873. value: function encrypt(e) {
  29874. if ((e = Ft(e)).length % 16 != 0) throw new Error("invalid plaintext size (must be multiple of 16 bytes)");
  29875. for (var t = qt(e.length), n = qt(16), s = 0; s < e.length; s += 16) {
  29876. Mt(e, n, 0, s, s + 16);
  29877. for (var r = 0; r < 16; r++) {
  29878. n[r] ^= this._lastCipherblock[r];
  29879. }
  29880. this._lastCipherblock = this._aes.encrypt(n), Mt(this._lastCipherblock, t, s);
  29881. }
  29882. return t;
  29883. }
  29884. }, {
  29885. key: "decrypt",
  29886. value: function decrypt(e) {
  29887. if ((e = Ft(e)).length % 16 != 0) throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");
  29888. for (var t = qt(e.length), n = qt(16), s = 0; s < e.length; s += 16) {
  29889. Mt(e, n, 0, s, s + 16), n = this._aes.decrypt(n);
  29890. for (var r = 0; r < 16; r++) {
  29891. t[s + r] = n[r] ^ this._lastCipherblock[r];
  29892. }
  29893. Mt(e, this._lastCipherblock, 0, s, s + 16);
  29894. }
  29895. return t;
  29896. }
  29897. }]);
  29898. return un;
  29899. }();
  29900. var hn = /*#__PURE__*/function () {
  29901. function hn(e, t, n) {
  29902. (0, _classCallCheck2.default)(this, hn);
  29903. if (!(this instanceof hn)) throw Error("AES must be instanitated with `new`");
  29904. if (this.description = "Cipher Feedback", this.name = "cfb", t) {
  29905. if (16 != t.length) throw new Error("invalid initialation vector size (must be 16 size)");
  29906. } else t = qt(16);
  29907. n || (n = 1), this.segmentSize = n, this._shiftRegister = Ft(t, !0), this._aes = new an(e);
  29908. }
  29909. (0, _createClass2.default)(hn, [{
  29910. key: "encrypt",
  29911. value: function encrypt(e) {
  29912. if (e.length % this.segmentSize != 0) throw new Error("invalid plaintext size (must be segmentSize bytes)");
  29913. for (var t, n = Ft(e, !0), s = 0; s < n.length; s += this.segmentSize) {
  29914. t = this._aes.encrypt(this._shiftRegister);
  29915. for (var r = 0; r < this.segmentSize; r++) {
  29916. n[s + r] ^= t[r];
  29917. }
  29918. Mt(this._shiftRegister, this._shiftRegister, 0, this.segmentSize), Mt(n, this._shiftRegister, 16 - this.segmentSize, s, s + this.segmentSize);
  29919. }
  29920. return n;
  29921. }
  29922. }, {
  29923. key: "decrypt",
  29924. value: function decrypt(e) {
  29925. if (e.length % this.segmentSize != 0) throw new Error("invalid ciphertext size (must be segmentSize bytes)");
  29926. for (var t, n = Ft(e, !0), s = 0; s < n.length; s += this.segmentSize) {
  29927. t = this._aes.encrypt(this._shiftRegister);
  29928. for (var r = 0; r < this.segmentSize; r++) {
  29929. n[s + r] ^= t[r];
  29930. }
  29931. Mt(this._shiftRegister, this._shiftRegister, 0, this.segmentSize), Mt(e, this._shiftRegister, 16 - this.segmentSize, s, s + this.segmentSize);
  29932. }
  29933. return n;
  29934. }
  29935. }]);
  29936. return hn;
  29937. }();
  29938. var ln = /*#__PURE__*/function () {
  29939. function ln(e, t) {
  29940. (0, _classCallCheck2.default)(this, ln);
  29941. if (!(this instanceof ln)) throw Error("AES must be instanitated with `new`");
  29942. if (this.description = "Output Feedback", this.name = "ofb", t) {
  29943. if (16 != t.length) throw new Error("invalid initialation vector size (must be 16 bytes)");
  29944. } else t = qt(16);
  29945. this._lastPrecipher = Ft(t, !0), this._lastPrecipherIndex = 16, this._aes = new an(e);
  29946. }
  29947. (0, _createClass2.default)(ln, [{
  29948. key: "encrypt",
  29949. value: function encrypt(e) {
  29950. for (var t = Ft(e, !0), n = 0; n < t.length; n++) {
  29951. 16 === this._lastPrecipherIndex && (this._lastPrecipher = this._aes.encrypt(this._lastPrecipher), this._lastPrecipherIndex = 0), t[n] ^= this._lastPrecipher[this._lastPrecipherIndex++];
  29952. }
  29953. return t;
  29954. }
  29955. }, {
  29956. key: "decrypt",
  29957. value: function decrypt(e) {
  29958. return this.encrypt(e);
  29959. }
  29960. }]);
  29961. return ln;
  29962. }();
  29963. var dn = /*#__PURE__*/function () {
  29964. function dn(e) {
  29965. (0, _classCallCheck2.default)(this, dn);
  29966. if (!(this instanceof dn)) throw Error("Counter must be instanitated with `new`");
  29967. 0 === e || e || (e = 1), "number" == typeof e ? (this._counter = qt(16), this.setValue(e)) : this.setBytes(e);
  29968. }
  29969. (0, _createClass2.default)(dn, [{
  29970. key: "setValue",
  29971. value: function setValue(e) {
  29972. if ("number" != typeof e || parseInt(e) != e) throw new Error("invalid counter value (must be an integer)");
  29973. if (e > Number.MAX_SAFE_INTEGER) throw new Error("integer value out of safe range");
  29974. for (var t = 15; t >= 0; --t) {
  29975. this._counter[t] = e % 256, e = parseInt(e / 256);
  29976. }
  29977. }
  29978. }, {
  29979. key: "setBytes",
  29980. value: function setBytes(e) {
  29981. if (16 != (e = Ft(e, !0)).length) throw new Error("invalid counter bytes size (must be 16 bytes)");
  29982. this._counter = e;
  29983. }
  29984. }, {
  29985. key: "increment",
  29986. value: function increment() {
  29987. for (var e = 15; e >= 0; e--) {
  29988. if (255 !== this._counter[e]) {
  29989. this._counter[e]++;
  29990. break;
  29991. }
  29992. this._counter[e] = 0;
  29993. }
  29994. }
  29995. }]);
  29996. return dn;
  29997. }();
  29998. var pn = /*#__PURE__*/function () {
  29999. function pn(e, t) {
  30000. (0, _classCallCheck2.default)(this, pn);
  30001. if (!(this instanceof pn)) throw Error("AES must be instanitated with `new`");
  30002. 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);
  30003. }
  30004. (0, _createClass2.default)(pn, [{
  30005. key: "encrypt",
  30006. value: function encrypt(e) {
  30007. for (var t = Ft(e, !0), n = 0; n < t.length; n++) {
  30008. 16 === this._remainingCounterIndex && (this._remainingCounter = this._aes.encrypt(this._counter._counter), this._remainingCounterIndex = 0, this._counter.increment()), t[n] ^= this._remainingCounter[this._remainingCounterIndex++];
  30009. }
  30010. return t;
  30011. }
  30012. }, {
  30013. key: "decrypt",
  30014. value: function decrypt(e) {
  30015. return this.encrypt(e);
  30016. }
  30017. }]);
  30018. return pn;
  30019. }();
  30020. var fn = {
  30021. AES: an,
  30022. Counter: dn,
  30023. ModeOfOperation: {
  30024. ecb: cn,
  30025. cbc: un,
  30026. cfb: hn,
  30027. ofb: ln,
  30028. ctr: pn
  30029. },
  30030. utils: {
  30031. hex: Bt,
  30032. utf8: jt
  30033. },
  30034. padding: {
  30035. pkcs7: {
  30036. pad: function pad(e) {
  30037. var t = 16 - (e = Ft(e, !0)).length % 16,
  30038. n = qt(e.length + t);
  30039. Mt(e, n);
  30040. for (var s = e.length; s < n.length; s++) {
  30041. n[s] = t;
  30042. }
  30043. return n;
  30044. },
  30045. strip: function strip(e) {
  30046. if ((e = Ft(e, !0)).length < 16) throw new Error("PKCS#7 invalid length");
  30047. var t = e[e.length - 1];
  30048. if (t > 16) throw new Error("PKCS#7 padding byte out of range");
  30049. for (var n = e.length - t, s = 0; s < t; s++) {
  30050. if (e[n + s] !== t) throw new Error("PKCS#7 invalid padding byte");
  30051. }
  30052. var r = qt(n);
  30053. return Mt(e, r, 0, 0, n), r;
  30054. }
  30055. }
  30056. },
  30057. _arrayTest: {
  30058. coerceArray: Ft,
  30059. createArray: qt,
  30060. copyArray: Mt
  30061. }
  30062. };
  30063. function gn(e, t, n) {
  30064. var s = new Uint8Array(uni.base64ToArrayBuffer(t)),
  30065. r = fn.utils.utf8.toBytes(n),
  30066. i = fn.utils.utf8.toBytes(e),
  30067. o = new fn.ModeOfOperation.cbc(s, r),
  30068. a = fn.padding.pkcs7.pad(i),
  30069. c = o.encrypt(a);
  30070. return uni.arrayBufferToBase64(c);
  30071. }
  30072. var mn = {
  30073. code: 2e4,
  30074. message: "System error"
  30075. },
  30076. yn = {
  30077. code: 20101,
  30078. message: "Invalid client"
  30079. },
  30080. _n = {
  30081. code: 20102,
  30082. message: "Get encrypt key failed"
  30083. },
  30084. wn = {
  30085. 10001: "Secure network is not supported on current playground or unimpsdk",
  30086. 10003: "Config missing in current app. If the problem pesist, please contact DCloud.",
  30087. 10009: "Encrypt payload failed",
  30088. 10010: "Decrypt response failed"
  30089. };
  30090. function vn(e) {
  30091. var _ref25 = e || {},
  30092. t = _ref25.errSubject,
  30093. n = _ref25.subject,
  30094. s = _ref25.errCode,
  30095. r = _ref25.errMsg,
  30096. i = _ref25.code,
  30097. o = _ref25.message,
  30098. a = _ref25.cause;
  30099. return new ne({
  30100. subject: t || n || "uni-secure-network",
  30101. code: s || i || mn.code,
  30102. message: r || o,
  30103. cause: a
  30104. });
  30105. }
  30106. var In,
  30107. Sn,
  30108. bn = null;
  30109. var kn = /*#__PURE__*/function (_Lt) {
  30110. (0, _inherits2.default)(kn, _Lt);
  30111. var _super9 = _createSuper(kn);
  30112. function kn(e) {
  30113. var _this14;
  30114. (0, _classCallCheck2.default)(this, kn);
  30115. _this14 = _super9.call(this, e), _this14.clientType = "mp-weixin", _this14.userEncryptKey = null;
  30116. return _this14;
  30117. }
  30118. (0, _createClass2.default)(kn, [{
  30119. key: "isLogin",
  30120. value: function isLogin() {
  30121. return !!this.scopedGlobalCache.mpWeixinCode || !!this.scopedGlobalCache.mpWeixinOpenid;
  30122. }
  30123. }, {
  30124. key: "prepare",
  30125. value: function () {
  30126. var _prepare2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee38() {
  30127. return _regenerator.default.wrap(function _callee38$(_context38) {
  30128. while (1) {
  30129. switch (_context38.prev = _context38.next) {
  30130. case 0:
  30131. if (this.isLogin()) {
  30132. _context38.next = 7;
  30133. break;
  30134. }
  30135. if (this.scopedGlobalCache.initPromise) {
  30136. _context38.next = 3;
  30137. break;
  30138. }
  30139. throw new Error("`uniCloud.initSecureNetworkByWeixin` has not yet been called");
  30140. case 3:
  30141. _context38.next = 5;
  30142. return this.scopedGlobalCache.initPromise;
  30143. case 5:
  30144. if (this.isLogin()) {
  30145. _context38.next = 7;
  30146. break;
  30147. }
  30148. throw new Error("uniCloud.initSecureNetworkByWeixin` has not yet been called or successfully excuted");
  30149. case 7:
  30150. case "end":
  30151. return _context38.stop();
  30152. }
  30153. }
  30154. }, _callee38, this);
  30155. }));
  30156. function prepare() {
  30157. return _prepare2.apply(this, arguments);
  30158. }
  30159. return prepare;
  30160. }()
  30161. }, {
  30162. key: "getUserEncryptKey",
  30163. value: function () {
  30164. var _getUserEncryptKey = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee39() {
  30165. var _this15 = this;
  30166. var e;
  30167. return _regenerator.default.wrap(function _callee39$(_context39) {
  30168. while (1) {
  30169. switch (_context39.prev = _context39.next) {
  30170. case 0:
  30171. if (!this.userEncryptKey) {
  30172. _context39.next = 2;
  30173. break;
  30174. }
  30175. return _context39.abrupt("return", this.userEncryptKey);
  30176. case 2:
  30177. if (!(bn && bn.expireTime)) {
  30178. _context39.next = 6;
  30179. break;
  30180. }
  30181. e = Date.now();
  30182. if (!(bn.expireTime - e > 0)) {
  30183. _context39.next = 6;
  30184. break;
  30185. }
  30186. return _context39.abrupt("return", (this.userEncryptKey = bn, this.userEncryptKey));
  30187. case 6:
  30188. return _context39.abrupt("return", new Promise(function (e, t) {
  30189. uni.getUserCryptoManager().getLatestUserKey({
  30190. success: function success(t) {
  30191. bn = t, _this15.userEncryptKey = t, e(_this15.userEncryptKey);
  30192. },
  30193. fail: function fail(e) {
  30194. t(vn(_objectSpread(_objectSpread({}, _n), {}, {
  30195. cause: e
  30196. })));
  30197. }
  30198. });
  30199. }));
  30200. case 7:
  30201. case "end":
  30202. return _context39.stop();
  30203. }
  30204. }
  30205. }, _callee39, this);
  30206. }));
  30207. function getUserEncryptKey() {
  30208. return _getUserEncryptKey.apply(this, arguments);
  30209. }
  30210. return getUserEncryptKey;
  30211. }()
  30212. }, {
  30213. key: "getWxAppId",
  30214. value: function getWxAppId() {
  30215. return wx.getAccountInfoSync().miniProgram.appId;
  30216. }
  30217. }, {
  30218. key: "platformGetSignOption",
  30219. value: function () {
  30220. var _platformGetSignOption = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee40() {
  30221. var _yield$this$getUserEn, e, t, n;
  30222. return _regenerator.default.wrap(function _callee40$(_context40) {
  30223. while (1) {
  30224. switch (_context40.prev = _context40.next) {
  30225. case 0:
  30226. _context40.next = 2;
  30227. return this.getUserEncryptKey();
  30228. case 2:
  30229. _yield$this$getUserEn = _context40.sent;
  30230. e = _yield$this$getUserEn.encryptKey;
  30231. t = _yield$this$getUserEn.iv;
  30232. n = _yield$this$getUserEn.version;
  30233. return _context40.abrupt("return", {
  30234. verifyClientSign: gn(JSON.stringify({
  30235. data: JSON.stringify({}),
  30236. appId: this.appId,
  30237. deviceId: this.deviceId,
  30238. wxAppId: this.getWxAppId(),
  30239. simulator: "devtools" === ce().platform,
  30240. timestamp: Date.now()
  30241. }), e, t),
  30242. encryptKeyId: n,
  30243. mpWeixinCode: this.scopedGlobalCache.mpWeixinCode,
  30244. mpWeixinOpenid: this.scopedGlobalCache.mpWeixinOpenid
  30245. });
  30246. case 7:
  30247. case "end":
  30248. return _context40.stop();
  30249. }
  30250. }
  30251. }, _callee40, this);
  30252. }));
  30253. function platformGetSignOption() {
  30254. return _platformGetSignOption.apply(this, arguments);
  30255. }
  30256. return platformGetSignOption;
  30257. }()
  30258. }, {
  30259. key: "platformEncryptData",
  30260. value: function () {
  30261. var _platformEncryptData = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee41(e) {
  30262. var _yield$this$getUserEn2, t, n, s, r;
  30263. return _regenerator.default.wrap(function _callee41$(_context41) {
  30264. while (1) {
  30265. switch (_context41.prev = _context41.next) {
  30266. case 0:
  30267. _context41.next = 2;
  30268. return this.getUserEncryptKey();
  30269. case 2:
  30270. _yield$this$getUserEn2 = _context41.sent;
  30271. t = _yield$this$getUserEn2.encryptKey;
  30272. n = _yield$this$getUserEn2.iv;
  30273. s = _yield$this$getUserEn2.version;
  30274. r = {
  30275. secretType: this.secretType,
  30276. encryptKeyId: s,
  30277. mpWeixinCode: this.scopedGlobalCache.mpWeixinCode,
  30278. mpWeixinOpenid: this.scopedGlobalCache.mpWeixinOpenid
  30279. };
  30280. return _context41.abrupt("return", this.secretType === Rt ? {
  30281. content: e,
  30282. _uniCloudOptions: r
  30283. } : {
  30284. content: gn(JSON.stringify({
  30285. data: JSON.stringify(e),
  30286. appId: this.appId,
  30287. deviceId: this.deviceId,
  30288. wxAppId: this.getWxAppId(),
  30289. simulator: "devtools" === ce().platform,
  30290. timestamp: Date.now()
  30291. }), t, n),
  30292. _uniCloudOptions: r
  30293. });
  30294. case 8:
  30295. case "end":
  30296. return _context41.stop();
  30297. }
  30298. }
  30299. }, _callee41, this);
  30300. }));
  30301. function platformEncryptData(_x33) {
  30302. return _platformEncryptData.apply(this, arguments);
  30303. }
  30304. return platformEncryptData;
  30305. }()
  30306. }, {
  30307. key: "platformDecryptResult",
  30308. value: function () {
  30309. var _platformDecryptResult = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee42(e) {
  30310. var t, _yield$this$getUserEn3, n, s;
  30311. return _regenerator.default.wrap(function _callee42$(_context42) {
  30312. while (1) {
  30313. switch (_context42.prev = _context42.next) {
  30314. case 0:
  30315. t = e.content;
  30316. _context42.next = 3;
  30317. return this.getUserEncryptKey();
  30318. case 3:
  30319. _yield$this$getUserEn3 = _context42.sent;
  30320. n = _yield$this$getUserEn3.encryptKey;
  30321. s = _yield$this$getUserEn3.iv;
  30322. return _context42.abrupt("return", JSON.parse(function (e, t, n) {
  30323. var s = new Uint8Array(uni.base64ToArrayBuffer(e)),
  30324. r = new Uint8Array(uni.base64ToArrayBuffer(t)),
  30325. i = fn.utils.utf8.toBytes(n),
  30326. o = new fn.ModeOfOperation.cbc(r, i),
  30327. a = fn.padding.pkcs7.strip(o.decrypt(s));
  30328. return fn.utils.utf8.fromBytes(a);
  30329. }(t, n, s)));
  30330. case 7:
  30331. case "end":
  30332. return _context42.stop();
  30333. }
  30334. }
  30335. }, _callee42, this);
  30336. }));
  30337. function platformDecryptResult(_x34) {
  30338. return _platformDecryptResult.apply(this, arguments);
  30339. }
  30340. return platformDecryptResult;
  30341. }()
  30342. }, {
  30343. key: "isClientKeyNotFound",
  30344. value: function isClientKeyNotFound() {
  30345. return !1;
  30346. }
  30347. }]);
  30348. return kn;
  30349. }(Lt);
  30350. function Cn(e) {
  30351. var t = ["hasClientKey", "encryptGetClientKeyPayload", "setClientKey", "encrypt", "decrypt"],
  30352. n = {};
  30353. var _loop = function _loop(_s10) {
  30354. var r = t[_s10];
  30355. n[r] = function () {
  30356. for (var _len = arguments.length, t = new Array(_len), _key = 0; _key < _len; _key++) {
  30357. t[_key] = arguments[_key];
  30358. }
  30359. return new Promise(function (n, s) {
  30360. "function" == typeof e[r] ? e[r].apply(e, t.concat([function () {
  30361. var _ref26 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  30362. e = _ref26.type,
  30363. t = _ref26.data,
  30364. r = _ref26.errCode,
  30365. i = _ref26.errMsg,
  30366. o = _ref26.errSubject,
  30367. a = _ref26.message;
  30368. "success" === e ? n(t) : s(vn({
  30369. errCode: r,
  30370. errMsg: wn[r] || i || a,
  30371. errSubject: o
  30372. }));
  30373. }])) : s(vn({
  30374. message: "请检查manifest.json内是否开启安全网络模块,另外注意标准基座不支持安全网络模块"
  30375. }));
  30376. });
  30377. };
  30378. };
  30379. for (var _s10 = 0; _s10 < t.length; _s10++) {
  30380. _loop(_s10);
  30381. }
  30382. return n;
  30383. }
  30384. var Tn = /*#__PURE__*/function (_Lt2) {
  30385. (0, _inherits2.default)(Tn, _Lt2);
  30386. var _super10 = _createSuper(Tn);
  30387. function Tn(e) {
  30388. var _this16;
  30389. (0, _classCallCheck2.default)(this, Tn);
  30390. _this16 = _super10.call(this, e), _this16.clientType = "app", _this16.appUtils = _objectSpread({}, Cn(uni.requireNativePlugin("plus"))), _this16.systemInfo = In || (In = ce());
  30391. return _this16;
  30392. }
  30393. (0, _createClass2.default)(Tn, [{
  30394. key: "hasClientKey",
  30395. value: function () {
  30396. var _hasClientKey = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee43() {
  30397. return _regenerator.default.wrap(function _callee43$(_context43) {
  30398. while (1) {
  30399. switch (_context43.prev = _context43.next) {
  30400. case 0:
  30401. _context43.next = 2;
  30402. return this.appUtils.hasClientKey({
  30403. provider: this.provider,
  30404. spaceId: this.spaceId
  30405. });
  30406. case 2:
  30407. this._hasClientKey = _context43.sent;
  30408. return _context43.abrupt("return", this._hasClientKey);
  30409. case 4:
  30410. case "end":
  30411. return _context43.stop();
  30412. }
  30413. }
  30414. }, _callee43, this);
  30415. }));
  30416. function hasClientKey() {
  30417. return _hasClientKey.apply(this, arguments);
  30418. }
  30419. return hasClientKey;
  30420. }()
  30421. }, {
  30422. key: "getAppClientKey",
  30423. value: function () {
  30424. var _getAppClientKey = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee44() {
  30425. var _yield$this$appUtils$, e, t, n, s, r;
  30426. return _regenerator.default.wrap(function _callee44$(_context44) {
  30427. while (1) {
  30428. switch (_context44.prev = _context44.next) {
  30429. case 0:
  30430. _context44.next = 2;
  30431. return this.appUtils.encryptGetClientKeyPayload({
  30432. data: JSON.stringify({})
  30433. });
  30434. case 2:
  30435. _yield$this$appUtils$ = _context44.sent;
  30436. e = _yield$this$appUtils$.data;
  30437. t = _yield$this$appUtils$.key;
  30438. _context44.next = 7;
  30439. return this.uniCloudIns.callFunction({
  30440. name: "DCloud-clientDB",
  30441. data: {
  30442. redirectTo: "encryption",
  30443. action: "getAppClientKey",
  30444. data: e,
  30445. key: t
  30446. }
  30447. });
  30448. case 7:
  30449. _context44.t0 = _context44.sent.result;
  30450. if (_context44.t0) {
  30451. _context44.next = 10;
  30452. break;
  30453. }
  30454. _context44.t0 = {};
  30455. case 10:
  30456. n = _context44.t0;
  30457. if (!(0 !== n.errCode)) {
  30458. _context44.next = 13;
  30459. break;
  30460. }
  30461. throw function (e) {
  30462. return new ne({
  30463. subject: e.errSubject || "uni-secure-network",
  30464. code: e.errCode || e.code || mn.code,
  30465. message: e.errMsg || e.message
  30466. });
  30467. }(n);
  30468. case 13:
  30469. s = n.clientKey, r = n.key;
  30470. _context44.next = 16;
  30471. return this.appUtils.setClientKey({
  30472. provider: this.provider,
  30473. spaceId: this.spaceId,
  30474. clientKey: s,
  30475. key: r
  30476. });
  30477. case 16:
  30478. case "end":
  30479. return _context44.stop();
  30480. }
  30481. }
  30482. }, _callee44, this);
  30483. }));
  30484. function getAppClientKey() {
  30485. return _getAppClientKey.apply(this, arguments);
  30486. }
  30487. return getAppClientKey;
  30488. }()
  30489. }, {
  30490. key: "ensureClientKey",
  30491. value: function () {
  30492. var _ensureClientKey = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee45() {
  30493. var _this17 = this;
  30494. var _ref27,
  30495. _ref27$forceUpdate,
  30496. e,
  30497. _args45 = arguments;
  30498. return _regenerator.default.wrap(function _callee45$(_context45) {
  30499. while (1) {
  30500. switch (_context45.prev = _context45.next) {
  30501. case 0:
  30502. _ref27 = _args45.length > 0 && _args45[0] !== undefined ? _args45[0] : {}, _ref27$forceUpdate = _ref27.forceUpdate, e = _ref27$forceUpdate === void 0 ? !1 : _ref27$forceUpdate;
  30503. _context45.t1 = !0;
  30504. _context45.next = 4;
  30505. return this.hasClientKey();
  30506. case 4:
  30507. _context45.t2 = _context45.sent;
  30508. _context45.t0 = _context45.t1 !== _context45.t2;
  30509. if (_context45.t0) {
  30510. _context45.next = 8;
  30511. break;
  30512. }
  30513. _context45.t0 = e;
  30514. case 8:
  30515. if (!_context45.t0) {
  30516. _context45.next = 10;
  30517. break;
  30518. }
  30519. 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) {
  30520. _this17.scopedGlobalCache.initStatus = p;
  30521. }).catch(function (e) {
  30522. throw _this17.scopedGlobalCache.initStatus = f, e;
  30523. }), this.scopedGlobalCache.initStatus = d), this.scopedGlobalCache.initPromise));
  30524. case 10:
  30525. case "end":
  30526. return _context45.stop();
  30527. }
  30528. }
  30529. }, _callee45, this);
  30530. }));
  30531. function ensureClientKey() {
  30532. return _ensureClientKey.apply(this, arguments);
  30533. }
  30534. return ensureClientKey;
  30535. }()
  30536. }, {
  30537. key: "prepare",
  30538. value: function () {
  30539. var _prepare3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee46() {
  30540. var _ref28,
  30541. _ref28$forceUpdate,
  30542. e,
  30543. _args46 = arguments;
  30544. return _regenerator.default.wrap(function _callee46$(_context46) {
  30545. while (1) {
  30546. switch (_context46.prev = _context46.next) {
  30547. case 0:
  30548. _ref28 = _args46.length > 0 && _args46[0] !== undefined ? _args46[0] : {}, _ref28$forceUpdate = _ref28.forceUpdate, e = _ref28$forceUpdate === void 0 ? !1 : _ref28$forceUpdate;
  30549. _context46.next = 3;
  30550. return this.ensureClientKey({
  30551. forceUpdate: e
  30552. });
  30553. case 3:
  30554. case "end":
  30555. return _context46.stop();
  30556. }
  30557. }
  30558. }, _callee46, this);
  30559. }));
  30560. function prepare() {
  30561. return _prepare3.apply(this, arguments);
  30562. }
  30563. return prepare;
  30564. }()
  30565. }, {
  30566. key: "platformGetSignOption",
  30567. value: function () {
  30568. var _platformGetSignOption2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee47() {
  30569. var _yield$this$appUtils$2, e, t;
  30570. return _regenerator.default.wrap(function _callee47$(_context47) {
  30571. while (1) {
  30572. switch (_context47.prev = _context47.next) {
  30573. case 0:
  30574. _context47.next = 2;
  30575. return this.appUtils.encrypt({
  30576. provider: this.provider,
  30577. spaceId: this.spaceId,
  30578. data: JSON.stringify({})
  30579. });
  30580. case 2:
  30581. _yield$this$appUtils$2 = _context47.sent;
  30582. e = _yield$this$appUtils$2.data;
  30583. t = _yield$this$appUtils$2.key;
  30584. return _context47.abrupt("return", {
  30585. verifyClientSign: e,
  30586. encryptKeyId: t
  30587. });
  30588. case 6:
  30589. case "end":
  30590. return _context47.stop();
  30591. }
  30592. }
  30593. }, _callee47, this);
  30594. }));
  30595. function platformGetSignOption() {
  30596. return _platformGetSignOption2.apply(this, arguments);
  30597. }
  30598. return platformGetSignOption;
  30599. }()
  30600. }, {
  30601. key: "platformEncryptData",
  30602. value: function () {
  30603. var _platformEncryptData2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee48(e) {
  30604. var _yield$this$appUtils$3, t, n, s;
  30605. return _regenerator.default.wrap(function _callee48$(_context48) {
  30606. while (1) {
  30607. switch (_context48.prev = _context48.next) {
  30608. case 0:
  30609. _context48.next = 2;
  30610. return this.appUtils.encrypt({
  30611. provider: this.provider,
  30612. spaceId: this.spaceId,
  30613. data: JSON.stringify(e)
  30614. });
  30615. case 2:
  30616. _yield$this$appUtils$3 = _context48.sent;
  30617. t = _yield$this$appUtils$3.data;
  30618. n = _yield$this$appUtils$3.key;
  30619. s = {
  30620. secretType: this.secretType,
  30621. encryptKeyId: n
  30622. };
  30623. return _context48.abrupt("return", this.secretType === Rt ? {
  30624. content: e,
  30625. _uniCloudOptions: s
  30626. } : {
  30627. content: t,
  30628. _uniCloudOptions: s
  30629. });
  30630. case 7:
  30631. case "end":
  30632. return _context48.stop();
  30633. }
  30634. }
  30635. }, _callee48, this);
  30636. }));
  30637. function platformEncryptData(_x35) {
  30638. return _platformEncryptData2.apply(this, arguments);
  30639. }
  30640. return platformEncryptData;
  30641. }()
  30642. }, {
  30643. key: "platformDecryptResult",
  30644. value: function () {
  30645. var _platformDecryptResult2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee49(e) {
  30646. var t, _e$_uniCloudOptions, n, s, r;
  30647. return _regenerator.default.wrap(function _callee49$(_context49) {
  30648. while (1) {
  30649. switch (_context49.prev = _context49.next) {
  30650. case 0:
  30651. t = e.content;
  30652. _e$_uniCloudOptions = e._uniCloudOptions;
  30653. n = _e$_uniCloudOptions === void 0 ? {} : _e$_uniCloudOptions;
  30654. s = n.encryptKeyId;
  30655. _context49.next = 6;
  30656. return this.appUtils.decrypt({
  30657. provider: this.provider,
  30658. spaceId: this.spaceId,
  30659. data: t,
  30660. key: s
  30661. });
  30662. case 6:
  30663. r = _context49.sent;
  30664. return _context49.abrupt("return", JSON.parse(r.data));
  30665. case 8:
  30666. case "end":
  30667. return _context49.stop();
  30668. }
  30669. }
  30670. }, _callee49, this);
  30671. }));
  30672. function platformDecryptResult(_x36) {
  30673. return _platformDecryptResult2.apply(this, arguments);
  30674. }
  30675. return platformDecryptResult;
  30676. }()
  30677. }, {
  30678. key: "isClientKeyNotFound",
  30679. value: function isClientKeyNotFound() {
  30680. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  30681. var t = e.result || {};
  30682. return 70009 === t.errCode && "uni-secure-network" === t.errSubject;
  30683. }
  30684. }]);
  30685. return Tn;
  30686. }(Lt);
  30687. function Pn() {
  30688. var _ref29 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  30689. e = _ref29.secretType;
  30690. return e === xt || e === Rt || e === Ut;
  30691. }
  30692. function An() {
  30693. var _ref30 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  30694. e = _ref30.name,
  30695. _ref30$data = _ref30.data,
  30696. t = _ref30$data === void 0 ? {} : _ref30$data;
  30697. return "app" === P && "DCloud-clientDB" === e && "encryption" === t.redirectTo && "getAppClientKey" === t.action;
  30698. }
  30699. function En() {
  30700. var _ref31 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  30701. e = _ref31.provider,
  30702. t = _ref31.spaceId,
  30703. n = _ref31.functionName;
  30704. var _ce = ce(),
  30705. s = _ce.appId,
  30706. r = _ce.uniPlatform,
  30707. i = _ce.osName;
  30708. var o = r;
  30709. "app" === r && (o = i);
  30710. var a = function () {
  30711. var _ref32 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  30712. e = _ref32.provider,
  30713. t = _ref32.spaceId;
  30714. var n = T;
  30715. if (!n) return {};
  30716. e = function (e) {
  30717. return "tencent" === e ? "tcb" : e;
  30718. }(e);
  30719. var s = n.find(function (n) {
  30720. return n.provider === e && n.spaceId === t;
  30721. });
  30722. return s && s.config;
  30723. }({
  30724. provider: e,
  30725. spaceId: t
  30726. });
  30727. if (!a || !a.accessControl || !a.accessControl.enable) return !1;
  30728. var c = a.accessControl.function || {},
  30729. u = Object.keys(c);
  30730. if (0 === u.length) return !0;
  30731. var h = function (e, t) {
  30732. var n, s, r;
  30733. for (var _i2 = 0; _i2 < e.length; _i2++) {
  30734. var _o2 = e[_i2];
  30735. _o2 !== t ? "*" !== _o2 ? _o2.split(",").map(function (e) {
  30736. return e.trim();
  30737. }).indexOf(t) > -1 && (s = _o2) : r = _o2 : n = _o2;
  30738. }
  30739. return n || s || r;
  30740. }(u, n);
  30741. if (!h) return !1;
  30742. if ((c[h] || []).find(function () {
  30743. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  30744. return e.appId === s && (e.platform || "").toLowerCase() === o.toLowerCase();
  30745. })) return !0;
  30746. 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);
  30747. }
  30748. function On(_ref33) {
  30749. var e = _ref33.functionName,
  30750. t = _ref33.result,
  30751. n = _ref33.logPvd;
  30752. if (b && this.__dev__.debugLog && t && t.requestId) {
  30753. var _s11 = JSON.stringify({
  30754. spaceId: this.config.spaceId,
  30755. functionName: e,
  30756. requestId: t.requestId
  30757. });
  30758. console.log("[".concat(n, "-request]").concat(_s11, "[/").concat(n, "-request]"));
  30759. }
  30760. }
  30761. function xn(e) {
  30762. var t = e.callFunction,
  30763. n = function n(_n7) {
  30764. var _this18 = this;
  30765. var s = _n7.name;
  30766. _n7.data = kt.call(e, {
  30767. data: _n7.data
  30768. });
  30769. var r = {
  30770. aliyun: "aliyun",
  30771. tencent: "tcb",
  30772. tcb: "tcb"
  30773. }[this.config.provider],
  30774. i = Pn(_n7),
  30775. o = An(_n7),
  30776. a = i || o;
  30777. return t.call(this, _n7).then(function (e) {
  30778. return e.errCode = 0, !a && On.call(_this18, {
  30779. functionName: s,
  30780. result: e,
  30781. logPvd: r
  30782. }), Promise.resolve(e);
  30783. }, function (e) {
  30784. return !a && On.call(_this18, {
  30785. functionName: s,
  30786. result: e,
  30787. logPvd: r
  30788. }), e && e.message && (e.message = function () {
  30789. var _ref34 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  30790. _ref34$message = _ref34.message,
  30791. e = _ref34$message === void 0 ? "" : _ref34$message,
  30792. _ref34$extraInfo = _ref34.extraInfo,
  30793. t = _ref34$extraInfo === void 0 ? {} : _ref34$extraInfo,
  30794. _ref34$formatter = _ref34.formatter,
  30795. n = _ref34$formatter === void 0 ? [] : _ref34$formatter;
  30796. for (var _s12 = 0; _s12 < n.length; _s12++) {
  30797. var _n$_s = n[_s12],
  30798. _r4 = _n$_s.rule,
  30799. _i3 = _n$_s.content,
  30800. _o3 = _n$_s.mode,
  30801. _a = e.match(_r4);
  30802. if (!_a) continue;
  30803. var _c = _i3;
  30804. for (var _e20 = 1; _e20 < _a.length; _e20++) {
  30805. _c = Et(_c, "{$".concat(_e20, "}"), _a[_e20]);
  30806. }
  30807. for (var _e21 in t) {
  30808. _c = Et(_c, "{".concat(_e21, "}"), t[_e21]);
  30809. }
  30810. return "replace" === _o3 ? _c : e + _c;
  30811. }
  30812. return e;
  30813. }({
  30814. message: "[".concat(_n7.name, "]: ").concat(e.message),
  30815. formatter: Tt,
  30816. extraInfo: {
  30817. functionName: s
  30818. }
  30819. })), Promise.reject(e);
  30820. });
  30821. };
  30822. e.callFunction = function (t) {
  30823. var _e$config = e.config,
  30824. s = _e$config.provider,
  30825. r = _e$config.spaceId,
  30826. i = t.name;
  30827. var o, a;
  30828. 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) {
  30829. var e = _ref35.name,
  30830. _ref35$data = _ref35.data,
  30831. t = _ref35$data === void 0 ? {} : _ref35$data;
  30832. return "mp-weixin" === P && "uni-id-co" === e && "secureNetworkHandshakeByWeixin" === t.method;
  30833. }(t)) a = o.call(e, t);else if (Pn(t)) {
  30834. a = new Sn({
  30835. secretType: t.secretType,
  30836. uniCloudIns: e
  30837. }).wrapEncryptDataCallFunction(n.bind(e))(t);
  30838. } else if (En({
  30839. provider: s,
  30840. spaceId: r,
  30841. functionName: i
  30842. })) {
  30843. a = new Sn({
  30844. secretType: t.secretType,
  30845. uniCloudIns: e
  30846. }).wrapVerifyClientCallFunction(n.bind(e))(t);
  30847. } else a = o(t);
  30848. return Object.defineProperty(a, "result", {
  30849. get: function get() {
  30850. return console.warn("当前返回结果为Promise类型,不可直接访问其result属性,详情请参考:https://uniapp.dcloud.net.cn/uniCloud/faq?id=promise"), {};
  30851. }
  30852. }), a;
  30853. };
  30854. }
  30855. Sn = "mp-weixin" !== P && "app" !== P ? /*#__PURE__*/function () {
  30856. function _class2() {
  30857. (0, _classCallCheck2.default)(this, _class2);
  30858. throw vn({
  30859. message: "Platform ".concat(P, " is not supported by secure network")
  30860. });
  30861. }
  30862. return (0, _createClass2.default)(_class2);
  30863. }() : C ? "mp-weixin" === P ? kn : Tn : /*#__PURE__*/function () {
  30864. function _class3() {
  30865. (0, _classCallCheck2.default)(this, _class3);
  30866. throw vn({
  30867. message: "Platform ".concat(P, " is not enabled, please check whether secure network module is enabled in your manifest.json")
  30868. });
  30869. }
  30870. return (0, _createClass2.default)(_class3);
  30871. }();
  30872. var Rn = Symbol("CLIENT_DB_INTERNAL");
  30873. function Un(e, t) {
  30874. return e.then = "DoNotReturnProxyWithAFunctionNamedThen", e._internalType = Rn, e.inspect = null, e.__ob__ = void 0, new Proxy(e, {
  30875. get: function get(e, n, s) {
  30876. if ("_uniClient" === n) return null;
  30877. if ("symbol" == (0, _typeof2.default)(n)) return e[n];
  30878. if (n in e || "string" != typeof n) {
  30879. var _t10 = e[n];
  30880. return "function" == typeof _t10 ? _t10.bind(e) : _t10;
  30881. }
  30882. return t.get(e, n, s);
  30883. }
  30884. });
  30885. }
  30886. function Ln(e) {
  30887. return {
  30888. on: function on(t, n) {
  30889. e[t] = e[t] || [], e[t].indexOf(n) > -1 || e[t].push(n);
  30890. },
  30891. off: function off(t, n) {
  30892. e[t] = e[t] || [];
  30893. var s = e[t].indexOf(n);
  30894. -1 !== s && e[t].splice(s, 1);
  30895. }
  30896. };
  30897. }
  30898. var Nn = ["db.Geo", "db.command", "command.aggregate"];
  30899. function Dn(e, t) {
  30900. return Nn.indexOf("".concat(e, ".").concat(t)) > -1;
  30901. }
  30902. function Fn(e) {
  30903. switch (g(e)) {
  30904. case "array":
  30905. return e.map(function (e) {
  30906. return Fn(e);
  30907. });
  30908. case "object":
  30909. return e._internalType === Rn || Object.keys(e).forEach(function (t) {
  30910. e[t] = Fn(e[t]);
  30911. }), e;
  30912. case "regexp":
  30913. return {
  30914. $regexp: {
  30915. source: e.source,
  30916. flags: e.flags
  30917. }
  30918. };
  30919. case "date":
  30920. return {
  30921. $date: e.toISOString()
  30922. };
  30923. default:
  30924. return e;
  30925. }
  30926. }
  30927. function qn(e) {
  30928. return e && e.content && e.content.$method;
  30929. }
  30930. var Mn = /*#__PURE__*/function () {
  30931. function Mn(e, t, n) {
  30932. (0, _classCallCheck2.default)(this, Mn);
  30933. this.content = e, this.prevStage = t || null, this.udb = null, this._database = n;
  30934. }
  30935. (0, _createClass2.default)(Mn, [{
  30936. key: "toJSON",
  30937. value: function toJSON() {
  30938. var e = this;
  30939. var t = [e.content];
  30940. for (; e.prevStage;) {
  30941. e = e.prevStage, t.push(e.content);
  30942. }
  30943. return {
  30944. $db: t.reverse().map(function (e) {
  30945. return {
  30946. $method: e.$method,
  30947. $param: Fn(e.$param)
  30948. };
  30949. })
  30950. };
  30951. }
  30952. }, {
  30953. key: "toString",
  30954. value: function toString() {
  30955. return JSON.stringify(this.toJSON());
  30956. }
  30957. }, {
  30958. key: "getAction",
  30959. value: function getAction() {
  30960. var e = this.toJSON().$db.find(function (e) {
  30961. return "action" === e.$method;
  30962. });
  30963. return e && e.$param && e.$param[0];
  30964. }
  30965. }, {
  30966. key: "getCommand",
  30967. value: function getCommand() {
  30968. return {
  30969. $db: this.toJSON().$db.filter(function (e) {
  30970. return "action" !== e.$method;
  30971. })
  30972. };
  30973. }
  30974. }, {
  30975. key: "isAggregate",
  30976. get: function get() {
  30977. var e = this;
  30978. for (; e;) {
  30979. var t = qn(e),
  30980. _n8 = qn(e.prevStage);
  30981. if ("aggregate" === t && "collection" === _n8 || "pipeline" === t) return !0;
  30982. e = e.prevStage;
  30983. }
  30984. return !1;
  30985. }
  30986. }, {
  30987. key: "isCommand",
  30988. get: function get() {
  30989. var e = this;
  30990. for (; e;) {
  30991. if ("command" === qn(e)) return !0;
  30992. e = e.prevStage;
  30993. }
  30994. return !1;
  30995. }
  30996. }, {
  30997. key: "isAggregateCommand",
  30998. get: function get() {
  30999. var e = this;
  31000. for (; e;) {
  31001. var t = qn(e),
  31002. _n9 = qn(e.prevStage);
  31003. if ("aggregate" === t && "command" === _n9) return !0;
  31004. e = e.prevStage;
  31005. }
  31006. return !1;
  31007. }
  31008. }, {
  31009. key: "getNextStageFn",
  31010. value: function getNextStageFn(e) {
  31011. var t = this;
  31012. return function () {
  31013. return Kn({
  31014. $method: e,
  31015. $param: Fn(Array.from(arguments))
  31016. }, t, t._database);
  31017. };
  31018. }
  31019. }, {
  31020. key: "count",
  31021. get: function get() {
  31022. return this.isAggregate ? this.getNextStageFn("count") : function () {
  31023. return this._send("count", Array.from(arguments));
  31024. };
  31025. }
  31026. }, {
  31027. key: "remove",
  31028. get: function get() {
  31029. return this.isCommand ? this.getNextStageFn("remove") : function () {
  31030. return this._send("remove", Array.from(arguments));
  31031. };
  31032. }
  31033. }, {
  31034. key: "get",
  31035. value: function get() {
  31036. return this._send("get", Array.from(arguments));
  31037. }
  31038. }, {
  31039. key: "add",
  31040. get: function get() {
  31041. return this.isCommand ? this.getNextStageFn("add") : function () {
  31042. return this._send("add", Array.from(arguments));
  31043. };
  31044. }
  31045. }, {
  31046. key: "update",
  31047. value: function update() {
  31048. return this._send("update", Array.from(arguments));
  31049. }
  31050. }, {
  31051. key: "end",
  31052. value: function end() {
  31053. return this._send("end", Array.from(arguments));
  31054. }
  31055. }, {
  31056. key: "set",
  31057. get: function get() {
  31058. return this.isCommand ? this.getNextStageFn("set") : function () {
  31059. throw new Error("JQL禁止使用set方法");
  31060. };
  31061. }
  31062. }, {
  31063. key: "_send",
  31064. value: function _send(e, t) {
  31065. var n = this.getAction(),
  31066. s = this.getCommand();
  31067. if (s.$db.push({
  31068. $method: e,
  31069. $param: Fn(t)
  31070. }), b) {
  31071. var _e22 = s.$db.find(function (e) {
  31072. return "collection" === e.$method;
  31073. }),
  31074. _t11 = _e22 && _e22.$param;
  31075. _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- 如果主表数据量很小请忽略此信息,项目发行时不会出现此提示。");
  31076. }
  31077. return this._database._callCloudFunction({
  31078. action: n,
  31079. command: s
  31080. });
  31081. }
  31082. }]);
  31083. return Mn;
  31084. }();
  31085. function Kn(e, t, n) {
  31086. return Un(new Mn(e, t, n), {
  31087. get: function get(e, t) {
  31088. var s = "db";
  31089. return e && e.content && (s = e.content.$method), Dn(s, t) ? Kn({
  31090. $method: t
  31091. }, e, n) : function () {
  31092. return Kn({
  31093. $method: t,
  31094. $param: Fn(Array.from(arguments))
  31095. }, e, n);
  31096. };
  31097. }
  31098. });
  31099. }
  31100. function jn(_ref36) {
  31101. var e = _ref36.path,
  31102. t = _ref36.method;
  31103. return /*#__PURE__*/function () {
  31104. function _class4() {
  31105. (0, _classCallCheck2.default)(this, _class4);
  31106. this.param = Array.from(arguments);
  31107. }
  31108. (0, _createClass2.default)(_class4, [{
  31109. key: "toJSON",
  31110. value: function toJSON() {
  31111. return {
  31112. $newDb: [].concat((0, _toConsumableArray2.default)(e.map(function (e) {
  31113. return {
  31114. $method: e
  31115. };
  31116. })), [{
  31117. $method: t,
  31118. $param: this.param
  31119. }])
  31120. };
  31121. }
  31122. }, {
  31123. key: "toString",
  31124. value: function toString() {
  31125. return JSON.stringify(this.toJSON());
  31126. }
  31127. }]);
  31128. return _class4;
  31129. }();
  31130. }
  31131. function Bn(e) {
  31132. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  31133. return Un(new e(t), {
  31134. get: function get(e, t) {
  31135. return Dn("db", t) ? Kn({
  31136. $method: t
  31137. }, null, e) : function () {
  31138. return Kn({
  31139. $method: t,
  31140. $param: Fn(Array.from(arguments))
  31141. }, null, e);
  31142. };
  31143. }
  31144. });
  31145. }
  31146. var $n = /*#__PURE__*/function (_ref37) {
  31147. (0, _inherits2.default)($n, _ref37);
  31148. var _super11 = _createSuper($n);
  31149. function $n() {
  31150. (0, _classCallCheck2.default)(this, $n);
  31151. return _super11.apply(this, arguments);
  31152. }
  31153. (0, _createClass2.default)($n, [{
  31154. key: "_parseResult",
  31155. value: function _parseResult(e) {
  31156. return this._isJQL ? e.result : e;
  31157. }
  31158. }, {
  31159. key: "_callCloudFunction",
  31160. value: function _callCloudFunction(_ref38) {
  31161. var _this19 = this;
  31162. var e = _ref38.action,
  31163. t = _ref38.command,
  31164. n = _ref38.multiCommand,
  31165. s = _ref38.queryList;
  31166. function r(e, t) {
  31167. if (n && s) for (var _n10 = 0; _n10 < s.length; _n10++) {
  31168. var _r5 = s[_n10];
  31169. _r5.udb && "function" == typeof _r5.udb.setResult && (t ? _r5.udb.setResult(t) : _r5.udb.setResult(e.result.dataList[_n10]));
  31170. }
  31171. }
  31172. var i = this,
  31173. o = this._isJQL ? "databaseForJQL" : "database";
  31174. function a(e) {
  31175. return i._callback("error", [e]), q(M(o, "fail"), e).then(function () {
  31176. return q(M(o, "complete"), e);
  31177. }).then(function () {
  31178. return r(null, e), Q(B, {
  31179. type: z,
  31180. content: e
  31181. }), Promise.reject(e);
  31182. });
  31183. }
  31184. var c = q(M(o, "invoke")),
  31185. u = this._uniClient;
  31186. return c.then(function () {
  31187. return u.callFunction({
  31188. name: "DCloud-clientDB",
  31189. type: l,
  31190. data: {
  31191. action: e,
  31192. command: t,
  31193. multiCommand: n
  31194. }
  31195. });
  31196. }).then(function (e) {
  31197. var _e$result = e.result,
  31198. t = _e$result.code,
  31199. n = _e$result.message,
  31200. s = _e$result.token,
  31201. c = _e$result.tokenExpired,
  31202. _e$result$systemInfo = _e$result.systemInfo,
  31203. u = _e$result$systemInfo === void 0 ? [] : _e$result$systemInfo;
  31204. if (u) for (var _e23 = 0; _e23 < u.length; _e23++) {
  31205. var _u$_e = u[_e23],
  31206. _t12 = _u$_e.level,
  31207. _n11 = _u$_e.message,
  31208. _s13 = _u$_e.detail,
  31209. _r6 = console["app" === P && "warn" === _t12 ? "error" : _t12] || console.log;
  31210. var _i4 = "[System Info]" + _n11;
  31211. _s13 && (_i4 = "".concat(_i4, "\n\u8BE6\u7EC6\u4FE1\u606F\uFF1A").concat(_s13)), _r6(_i4);
  31212. }
  31213. if (t) {
  31214. return a(new ne({
  31215. code: t,
  31216. message: n,
  31217. requestId: e.requestId
  31218. }));
  31219. }
  31220. e.result.errCode = e.result.errCode || e.result.code, e.result.errMsg = e.result.errMsg || e.result.message, s && c && (ie({
  31221. token: s,
  31222. tokenExpired: c
  31223. }), _this19._callbackAuth("refreshToken", [{
  31224. token: s,
  31225. tokenExpired: c
  31226. }]), _this19._callback("refreshToken", [{
  31227. token: s,
  31228. tokenExpired: c
  31229. }]), Q(W, {
  31230. token: s,
  31231. tokenExpired: c
  31232. }));
  31233. var h = [{
  31234. prop: "affectedDocs",
  31235. tips: "affectedDocs不再推荐使用,请使用inserted/deleted/updated/data.length替代"
  31236. }, {
  31237. prop: "code",
  31238. tips: "code不再推荐使用,请使用errCode替代"
  31239. }, {
  31240. prop: "message",
  31241. tips: "message不再推荐使用,请使用errMsg替代"
  31242. }];
  31243. var _loop2 = function _loop2(_t13) {
  31244. var _h$_t = h[_t13],
  31245. n = _h$_t.prop,
  31246. s = _h$_t.tips;
  31247. if (n in e.result) {
  31248. var _t14 = e.result[n];
  31249. Object.defineProperty(e.result, n, {
  31250. get: function get() {
  31251. return console.warn(s), _t14;
  31252. }
  31253. });
  31254. }
  31255. };
  31256. for (var _t13 = 0; _t13 < h.length; _t13++) {
  31257. _loop2(_t13);
  31258. }
  31259. return function (e) {
  31260. return q(M(o, "success"), e).then(function () {
  31261. return q(M(o, "complete"), e);
  31262. }).then(function () {
  31263. r(e, null);
  31264. var t = i._parseResult(e);
  31265. return Q(B, {
  31266. type: z,
  31267. content: t
  31268. }), Promise.resolve(t);
  31269. });
  31270. }(e);
  31271. }, function (e) {
  31272. /fc_function_not_found|FUNCTION_NOT_FOUND/g.test(e.message) && console.warn("clientDB未初始化,请在web控制台保存一次schema以开启clientDB");
  31273. return a(new ne({
  31274. code: e.code || "SYSTEM_ERROR",
  31275. message: e.message,
  31276. requestId: e.requestId
  31277. }));
  31278. });
  31279. }
  31280. }]);
  31281. return $n;
  31282. }( /*#__PURE__*/function () {
  31283. function _class5() {
  31284. var _ref39 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  31285. _ref39$uniClient = _ref39.uniClient,
  31286. e = _ref39$uniClient === void 0 ? {} : _ref39$uniClient,
  31287. _ref39$isJQL = _ref39.isJQL,
  31288. t = _ref39$isJQL === void 0 ? !1 : _ref39$isJQL;
  31289. (0, _classCallCheck2.default)(this, _class5);
  31290. 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({}, {
  31291. get: function get(e, t) {
  31292. return {
  31293. $env: t
  31294. };
  31295. }
  31296. }), this.Geo = Un({}, {
  31297. get: function get(e, t) {
  31298. return jn({
  31299. path: ["Geo"],
  31300. method: t
  31301. });
  31302. }
  31303. }), this.serverDate = jn({
  31304. path: [],
  31305. method: "serverDate"
  31306. }), this.RegExp = jn({
  31307. path: [],
  31308. method: "RegExp"
  31309. });
  31310. }
  31311. (0, _createClass2.default)(_class5, [{
  31312. key: "getCloudEnv",
  31313. value: function getCloudEnv(e) {
  31314. if ("string" != typeof e || !e.trim()) throw new Error("getCloudEnv参数错误");
  31315. return {
  31316. $env: e.replace("$cloudEnv_", "")
  31317. };
  31318. }
  31319. }, {
  31320. key: "_callback",
  31321. value: function _callback(e, t) {
  31322. var n = this._dbCallBacks;
  31323. n[e] && n[e].forEach(function (e) {
  31324. e.apply(void 0, (0, _toConsumableArray2.default)(t));
  31325. });
  31326. }
  31327. }, {
  31328. key: "_callbackAuth",
  31329. value: function _callbackAuth(e, t) {
  31330. var n = this._authCallBacks;
  31331. n[e] && n[e].forEach(function (e) {
  31332. e.apply(void 0, (0, _toConsumableArray2.default)(t));
  31333. });
  31334. }
  31335. }, {
  31336. key: "multiSend",
  31337. value: function multiSend() {
  31338. var e = Array.from(arguments),
  31339. t = e.map(function (e) {
  31340. var t = e.getAction(),
  31341. n = e.getCommand();
  31342. if ("getTemp" !== n.$db[n.$db.length - 1].$method) throw new Error("multiSend只支持子命令内使用getTemp");
  31343. return {
  31344. action: t,
  31345. command: n
  31346. };
  31347. });
  31348. return this._callCloudFunction({
  31349. multiCommand: t,
  31350. queryList: e
  31351. });
  31352. }
  31353. }]);
  31354. return _class5;
  31355. }());
  31356. var Wn = "token无效,跳转登录页面",
  31357. zn = "token过期,跳转登录页面",
  31358. Jn = {
  31359. TOKEN_INVALID_TOKEN_EXPIRED: zn,
  31360. TOKEN_INVALID_INVALID_CLIENTID: Wn,
  31361. TOKEN_INVALID: Wn,
  31362. TOKEN_INVALID_WRONG_TOKEN: Wn,
  31363. TOKEN_INVALID_ANONYMOUS_USER: Wn
  31364. },
  31365. Hn = {
  31366. "uni-id-token-expired": zn,
  31367. "uni-id-check-token-failed": Wn,
  31368. "uni-id-token-not-exist": Wn,
  31369. "uni-id-check-device-feature-failed": Wn
  31370. };
  31371. function Gn(e, t) {
  31372. var n = "";
  31373. return n = e ? "".concat(e, "/").concat(t) : t, n.replace(/^\//, "");
  31374. }
  31375. function Vn() {
  31376. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  31377. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
  31378. var n = [],
  31379. s = [];
  31380. return e.forEach(function (e) {
  31381. !0 === e.needLogin ? n.push(Gn(t, e.path)) : !1 === e.needLogin && s.push(Gn(t, e.path));
  31382. }), {
  31383. needLoginPage: n,
  31384. notNeedLoginPage: s
  31385. };
  31386. }
  31387. function Yn(e) {
  31388. return e.split("?")[0].replace(/^\//, "");
  31389. }
  31390. function Qn() {
  31391. return function (e) {
  31392. var t = e && e.$page && e.$page.fullPath || "";
  31393. return t ? ("/" !== t.charAt(0) && (t = "/" + t), t) : t;
  31394. }(function () {
  31395. var e = getCurrentPages();
  31396. return e[e.length - 1];
  31397. }());
  31398. }
  31399. function Xn() {
  31400. return Yn(Qn());
  31401. }
  31402. function Zn() {
  31403. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
  31404. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  31405. if (!e) return !1;
  31406. if (!(t && t.list && t.list.length)) return !1;
  31407. var n = t.list,
  31408. s = Yn(e);
  31409. return n.some(function (e) {
  31410. return e.pagePath === s;
  31411. });
  31412. }
  31413. var es = !!_pages.default.uniIdRouter;
  31414. var _ref40 = function () {
  31415. var _ref21 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _pages.default,
  31416. _ref21$pages = _ref21.pages,
  31417. e = _ref21$pages === void 0 ? [] : _ref21$pages,
  31418. _ref21$subPackages = _ref21.subPackages,
  31419. n = _ref21$subPackages === void 0 ? [] : _ref21$subPackages,
  31420. _ref21$uniIdRouter = _ref21.uniIdRouter,
  31421. s = _ref21$uniIdRouter === void 0 ? {} : _ref21$uniIdRouter,
  31422. _ref21$tabBar = _ref21.tabBar,
  31423. r = _ref21$tabBar === void 0 ? {} : _ref21$tabBar;
  31424. var i = s.loginPage,
  31425. _s$needLogin = s.needLogin,
  31426. o = _s$needLogin === void 0 ? [] : _s$needLogin,
  31427. _s$resToLogin = s.resToLogin,
  31428. a = _s$resToLogin === void 0 ? !0 : _s$resToLogin,
  31429. _Vn = Vn(e),
  31430. c = _Vn.needLoginPage,
  31431. u = _Vn.notNeedLoginPage,
  31432. _ref23 = function () {
  31433. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  31434. var t = [],
  31435. n = [];
  31436. return e.forEach(function (e) {
  31437. var s = e.root,
  31438. _e$pages = e.pages,
  31439. r = _e$pages === void 0 ? [] : _e$pages,
  31440. _Vn2 = Vn(r, s),
  31441. i = _Vn2.needLoginPage,
  31442. o = _Vn2.notNeedLoginPage;
  31443. t.push.apply(t, (0, _toConsumableArray2.default)(i)), n.push.apply(n, (0, _toConsumableArray2.default)(o));
  31444. }), {
  31445. needLoginPage: t,
  31446. notNeedLoginPage: n
  31447. };
  31448. }(n),
  31449. h = _ref23.needLoginPage,
  31450. l = _ref23.notNeedLoginPage;
  31451. return {
  31452. loginPage: i,
  31453. routerNeedLogin: o,
  31454. resToLogin: a,
  31455. needLoginPage: [].concat((0, _toConsumableArray2.default)(c), (0, _toConsumableArray2.default)(h)),
  31456. notNeedLoginPage: [].concat((0, _toConsumableArray2.default)(u), (0, _toConsumableArray2.default)(l)),
  31457. loginPageInTabBar: Zn(i, r)
  31458. };
  31459. }(),
  31460. ts = _ref40.loginPage,
  31461. ns = _ref40.routerNeedLogin,
  31462. ss = _ref40.resToLogin,
  31463. rs = _ref40.needLoginPage,
  31464. is = _ref40.notNeedLoginPage,
  31465. os = _ref40.loginPageInTabBar;
  31466. if (rs.indexOf(ts) > -1) throw new Error("Login page [".concat(ts, "] should not be \"needLogin\", please check your pages.json"));
  31467. function as(e) {
  31468. var t = Xn();
  31469. if ("/" === e.charAt(0)) return e;
  31470. var _e$split = e.split("?"),
  31471. _e$split2 = (0, _slicedToArray2.default)(_e$split, 2),
  31472. n = _e$split2[0],
  31473. s = _e$split2[1],
  31474. r = n.replace(/^\//, "").split("/"),
  31475. i = t.split("/");
  31476. i.pop();
  31477. for (var _e24 = 0; _e24 < r.length; _e24++) {
  31478. var _t15 = r[_e24];
  31479. ".." === _t15 ? i.pop() : "." !== _t15 && i.push(_t15);
  31480. }
  31481. return "" === i[0] && i.shift(), "/" + i.join("/") + (s ? "?" + s : "");
  31482. }
  31483. function cs(e) {
  31484. var t = Yn(as(e));
  31485. return !(is.indexOf(t) > -1) && (rs.indexOf(t) > -1 || ns.some(function (t) {
  31486. return function (e, t) {
  31487. return new RegExp(t).test(e);
  31488. }(e, t);
  31489. }));
  31490. }
  31491. function us(_ref41) {
  31492. var e = _ref41.redirect;
  31493. var t = Yn(e),
  31494. n = Yn(ts);
  31495. return Xn() !== n && t !== n;
  31496. }
  31497. function hs() {
  31498. var _ref42 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  31499. e = _ref42.api,
  31500. t = _ref42.redirect;
  31501. if (!t || !us({
  31502. redirect: t
  31503. })) return;
  31504. var n = function (e, t) {
  31505. return "/" !== e.charAt(0) && (e = "/" + e), t ? e.indexOf("?") > -1 ? e + "&uniIdRedirectUrl=".concat(encodeURIComponent(t)) : e + "?uniIdRedirectUrl=".concat(encodeURIComponent(t)) : e;
  31506. }(ts, t);
  31507. os ? "navigateTo" !== e && "redirectTo" !== e || (e = "switchTab") : "switchTab" === e && (e = "navigateTo");
  31508. var s = {
  31509. navigateTo: uni.navigateTo,
  31510. redirectTo: uni.redirectTo,
  31511. switchTab: uni.switchTab,
  31512. reLaunch: uni.reLaunch
  31513. };
  31514. setTimeout(function () {
  31515. s[e]({
  31516. url: n
  31517. });
  31518. });
  31519. }
  31520. function ls() {
  31521. var _ref43 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  31522. e = _ref43.url;
  31523. var t = {
  31524. abortLoginPageJump: !1,
  31525. autoToLoginPage: !1
  31526. },
  31527. n = function () {
  31528. var _re3 = re(),
  31529. e = _re3.token,
  31530. t = _re3.tokenExpired;
  31531. var n;
  31532. if (e) {
  31533. if (t < Date.now()) {
  31534. var _e25 = "uni-id-token-expired";
  31535. n = {
  31536. errCode: _e25,
  31537. errMsg: Hn[_e25]
  31538. };
  31539. }
  31540. } else {
  31541. var _e26 = "uni-id-check-token-failed";
  31542. n = {
  31543. errCode: _e26,
  31544. errMsg: Hn[_e26]
  31545. };
  31546. }
  31547. return n;
  31548. }();
  31549. if (cs(e) && n) {
  31550. n.uniIdRedirectUrl = e;
  31551. if (G($).length > 0) return setTimeout(function () {
  31552. Q($, n);
  31553. }, 0), t.abortLoginPageJump = !0, t;
  31554. t.autoToLoginPage = !0;
  31555. }
  31556. return t;
  31557. }
  31558. function ds() {
  31559. !function () {
  31560. var e = Qn(),
  31561. _ls = ls({
  31562. url: e
  31563. }),
  31564. t = _ls.abortLoginPageJump,
  31565. n = _ls.autoToLoginPage;
  31566. t || n && hs({
  31567. api: "redirectTo",
  31568. redirect: e
  31569. });
  31570. }();
  31571. var e = ["navigateTo", "redirectTo", "reLaunch", "switchTab"];
  31572. var _loop3 = function _loop3(_t16) {
  31573. var n = e[_t16];
  31574. uni.addInterceptor(n, {
  31575. invoke: function invoke(e) {
  31576. var _ls2 = ls({
  31577. url: e.url
  31578. }),
  31579. t = _ls2.abortLoginPageJump,
  31580. s = _ls2.autoToLoginPage;
  31581. return t ? e : s ? (hs({
  31582. api: n,
  31583. redirect: as(e.url)
  31584. }), !1) : e;
  31585. }
  31586. });
  31587. };
  31588. for (var _t16 = 0; _t16 < e.length; _t16++) {
  31589. _loop3(_t16);
  31590. }
  31591. }
  31592. function ps() {
  31593. this.onResponse(function (e) {
  31594. var t = e.type,
  31595. n = e.content;
  31596. var s = !1;
  31597. switch (t) {
  31598. case "cloudobject":
  31599. s = function (e) {
  31600. if ("object" != (0, _typeof2.default)(e)) return !1;
  31601. var _ref44 = e || {},
  31602. t = _ref44.errCode;
  31603. return t in Hn;
  31604. }(n);
  31605. break;
  31606. case "clientdb":
  31607. s = function (e) {
  31608. if ("object" != (0, _typeof2.default)(e)) return !1;
  31609. var _ref45 = e || {},
  31610. t = _ref45.errCode;
  31611. return t in Jn;
  31612. }(n);
  31613. }
  31614. s && function () {
  31615. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  31616. var t = G($);
  31617. ee().then(function () {
  31618. var n = Qn();
  31619. if (n && us({
  31620. redirect: n
  31621. })) return t.length > 0 ? Q($, Object.assign({
  31622. uniIdRedirectUrl: n
  31623. }, e)) : void (ts && hs({
  31624. api: "navigateTo",
  31625. redirect: n
  31626. }));
  31627. });
  31628. }(n);
  31629. });
  31630. }
  31631. function fs(e) {
  31632. !function (e) {
  31633. e.onResponse = function (e) {
  31634. V(B, e);
  31635. }, e.offResponse = function (e) {
  31636. Y(B, e);
  31637. };
  31638. }(e), function (e) {
  31639. e.onNeedLogin = function (e) {
  31640. V($, e);
  31641. }, e.offNeedLogin = function (e) {
  31642. Y($, e);
  31643. }, es && (U("_globalUniCloudStatus").needLoginInit || (U("_globalUniCloudStatus").needLoginInit = !0, ee().then(function () {
  31644. ds.call(e);
  31645. }), ss && ps.call(e)));
  31646. }(e), function (e) {
  31647. e.onRefreshToken = function (e) {
  31648. V(W, e);
  31649. }, e.offRefreshToken = function (e) {
  31650. Y(W, e);
  31651. };
  31652. }(e);
  31653. }
  31654. var gs;
  31655. var ms = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
  31656. ys = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
  31657. function _s() {
  31658. var e = re().token || "",
  31659. t = e.split(".");
  31660. if (!e || 3 !== t.length) return {
  31661. uid: null,
  31662. role: [],
  31663. permission: [],
  31664. tokenExpired: 0
  31665. };
  31666. var n;
  31667. try {
  31668. n = JSON.parse((s = t[1], decodeURIComponent(gs(s).split("").map(function (e) {
  31669. return "%" + ("00" + e.charCodeAt(0).toString(16)).slice(-2);
  31670. }).join(""))));
  31671. } catch (e) {
  31672. throw new Error("获取当前用户信息出错,详细错误信息为:" + e.message);
  31673. }
  31674. var s;
  31675. return n.tokenExpired = 1e3 * n.exp, delete n.exp, delete n.iat, n;
  31676. }
  31677. gs = "function" != typeof atob ? function (e) {
  31678. 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.");
  31679. var t;
  31680. e += "==".slice(2 - (3 & e.length));
  31681. for (var n, s, r = "", i = 0; i < e.length;) {
  31682. 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);
  31683. }
  31684. return r;
  31685. } : atob;
  31686. var ws = s(function (e, t) {
  31687. Object.defineProperty(t, "__esModule", {
  31688. value: !0
  31689. });
  31690. var n = "chooseAndUploadFile:ok",
  31691. s = "chooseAndUploadFile:fail";
  31692. function r(e, t) {
  31693. return e.tempFiles.forEach(function (e, n) {
  31694. 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("."));
  31695. }), e.tempFilePaths || (e.tempFilePaths = e.tempFiles.map(function (e) {
  31696. return e.path;
  31697. })), e;
  31698. }
  31699. function i(e, t, _ref46) {
  31700. var s = _ref46.onChooseFile,
  31701. r = _ref46.onUploadProgress;
  31702. return t.then(function (e) {
  31703. if (s) {
  31704. var _t17 = s(e);
  31705. if (void 0 !== _t17) return Promise.resolve(_t17).then(function (t) {
  31706. return void 0 === t ? e : t;
  31707. });
  31708. }
  31709. return e;
  31710. }).then(function (t) {
  31711. return !1 === t ? {
  31712. errMsg: n,
  31713. tempFilePaths: [],
  31714. tempFiles: []
  31715. } : function (e, t) {
  31716. var s = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 5;
  31717. var r = arguments.length > 3 ? arguments[3] : undefined;
  31718. (t = Object.assign({}, t)).errMsg = n;
  31719. var i = t.tempFiles,
  31720. o = i.length;
  31721. var a = 0;
  31722. return new Promise(function (n) {
  31723. for (; a < s;) {
  31724. c();
  31725. }
  31726. function c() {
  31727. var s = a++;
  31728. if (s >= o) return void (!i.find(function (e) {
  31729. return !e.url && !e.errMsg;
  31730. }) && n(t));
  31731. var u = i[s];
  31732. e.uploadFile({
  31733. filePath: u.path,
  31734. cloudPath: u.cloudPath,
  31735. fileType: u.fileType,
  31736. onUploadProgress: function onUploadProgress(e) {
  31737. e.index = s, e.tempFile = u, e.tempFilePath = u.path, r && r(e);
  31738. }
  31739. }).then(function (e) {
  31740. u.url = e.fileID, s < o && c();
  31741. }).catch(function (e) {
  31742. u.errMsg = e.errMsg || e.message, s < o && c();
  31743. });
  31744. }
  31745. });
  31746. }(e, t, 5, r);
  31747. });
  31748. }
  31749. t.initChooseAndUploadFile = function (e) {
  31750. return function () {
  31751. var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
  31752. type: "all"
  31753. };
  31754. return "image" === t.type ? i(e, function (e) {
  31755. var t = e.count,
  31756. n = e.sizeType,
  31757. _e$sourceType = e.sourceType,
  31758. i = _e$sourceType === void 0 ? ["album", "camera"] : _e$sourceType,
  31759. o = e.extension;
  31760. return new Promise(function (e, a) {
  31761. uni.chooseImage({
  31762. count: t,
  31763. sizeType: n,
  31764. sourceType: i,
  31765. extension: o,
  31766. success: function success(t) {
  31767. e(r(t, "image"));
  31768. },
  31769. fail: function fail(e) {
  31770. a({
  31771. errMsg: e.errMsg.replace("chooseImage:fail", s)
  31772. });
  31773. }
  31774. });
  31775. });
  31776. }(t), t) : "video" === t.type ? i(e, function (e) {
  31777. var t = e.camera,
  31778. n = e.compressed,
  31779. i = e.maxDuration,
  31780. _e$sourceType2 = e.sourceType,
  31781. o = _e$sourceType2 === void 0 ? ["album", "camera"] : _e$sourceType2,
  31782. a = e.extension;
  31783. return new Promise(function (e, c) {
  31784. uni.chooseVideo({
  31785. camera: t,
  31786. compressed: n,
  31787. maxDuration: i,
  31788. sourceType: o,
  31789. extension: a,
  31790. success: function success(t) {
  31791. var n = t.tempFilePath,
  31792. s = t.duration,
  31793. i = t.size,
  31794. o = t.height,
  31795. a = t.width;
  31796. e(r({
  31797. errMsg: "chooseVideo:ok",
  31798. tempFilePaths: [n],
  31799. tempFiles: [{
  31800. name: t.tempFile && t.tempFile.name || "",
  31801. path: n,
  31802. size: i,
  31803. type: t.tempFile && t.tempFile.type || "",
  31804. width: a,
  31805. height: o,
  31806. duration: s,
  31807. fileType: "video",
  31808. cloudPath: ""
  31809. }]
  31810. }, "video"));
  31811. },
  31812. fail: function fail(e) {
  31813. c({
  31814. errMsg: e.errMsg.replace("chooseVideo:fail", s)
  31815. });
  31816. }
  31817. });
  31818. });
  31819. }(t), t) : i(e, function (e) {
  31820. var t = e.count,
  31821. n = e.extension;
  31822. return new Promise(function (e, i) {
  31823. var o = uni.chooseFile;
  31824. if ("undefined" != typeof wx && "function" == typeof wx.chooseMessageFile && (o = wx.chooseMessageFile), "function" != typeof o) return i({
  31825. errMsg: s + " 请指定 type 类型,该平台仅支持选择 image 或 video。"
  31826. });
  31827. o({
  31828. type: "all",
  31829. count: t,
  31830. extension: n,
  31831. success: function success(t) {
  31832. e(r(t));
  31833. },
  31834. fail: function fail(e) {
  31835. i({
  31836. errMsg: e.errMsg.replace("chooseFile:fail", s)
  31837. });
  31838. }
  31839. });
  31840. });
  31841. }(t), t);
  31842. };
  31843. };
  31844. }),
  31845. vs = n(ws);
  31846. var Is = "manual";
  31847. function Ss(e) {
  31848. return {
  31849. props: {
  31850. localdata: {
  31851. type: Array,
  31852. default: function _default() {
  31853. return [];
  31854. }
  31855. },
  31856. options: {
  31857. type: [Object, Array],
  31858. default: function _default() {
  31859. return {};
  31860. }
  31861. },
  31862. spaceInfo: {
  31863. type: Object,
  31864. default: function _default() {
  31865. return {};
  31866. }
  31867. },
  31868. collection: {
  31869. type: [String, Array],
  31870. default: ""
  31871. },
  31872. action: {
  31873. type: String,
  31874. default: ""
  31875. },
  31876. field: {
  31877. type: String,
  31878. default: ""
  31879. },
  31880. orderby: {
  31881. type: String,
  31882. default: ""
  31883. },
  31884. where: {
  31885. type: [String, Object],
  31886. default: ""
  31887. },
  31888. pageData: {
  31889. type: String,
  31890. default: "add"
  31891. },
  31892. pageCurrent: {
  31893. type: Number,
  31894. default: 1
  31895. },
  31896. pageSize: {
  31897. type: Number,
  31898. default: 20
  31899. },
  31900. getcount: {
  31901. type: [Boolean, String],
  31902. default: !1
  31903. },
  31904. gettree: {
  31905. type: [Boolean, String],
  31906. default: !1
  31907. },
  31908. gettreepath: {
  31909. type: [Boolean, String],
  31910. default: !1
  31911. },
  31912. startwith: {
  31913. type: String,
  31914. default: ""
  31915. },
  31916. limitlevel: {
  31917. type: Number,
  31918. default: 10
  31919. },
  31920. groupby: {
  31921. type: String,
  31922. default: ""
  31923. },
  31924. groupField: {
  31925. type: String,
  31926. default: ""
  31927. },
  31928. distinct: {
  31929. type: [Boolean, String],
  31930. default: !1
  31931. },
  31932. foreignKey: {
  31933. type: String,
  31934. default: ""
  31935. },
  31936. loadtime: {
  31937. type: String,
  31938. default: "auto"
  31939. },
  31940. manual: {
  31941. type: Boolean,
  31942. default: !1
  31943. }
  31944. },
  31945. data: function data() {
  31946. return {
  31947. mixinDatacomLoading: !1,
  31948. mixinDatacomHasMore: !1,
  31949. mixinDatacomResData: [],
  31950. mixinDatacomErrorMessage: "",
  31951. mixinDatacomPage: {}
  31952. };
  31953. },
  31954. created: function created() {
  31955. var _this20 = this;
  31956. this.mixinDatacomPage = {
  31957. current: this.pageCurrent,
  31958. size: this.pageSize,
  31959. count: 0
  31960. }, this.$watch(function () {
  31961. var e = [];
  31962. return ["pageCurrent", "pageSize", "localdata", "collection", "action", "field", "orderby", "where", "getont", "getcount", "gettree", "groupby", "groupField", "distinct"].forEach(function (t) {
  31963. e.push(_this20[t]);
  31964. }), e;
  31965. }, function (e, t) {
  31966. if (_this20.loadtime === Is) return;
  31967. var n = !1;
  31968. var s = [];
  31969. for (var _r7 = 2; _r7 < e.length; _r7++) {
  31970. e[_r7] !== t[_r7] && (s.push(e[_r7]), n = !0);
  31971. }
  31972. e[0] !== t[0] && (_this20.mixinDatacomPage.current = _this20.pageCurrent), _this20.mixinDatacomPage.size = _this20.pageSize, _this20.onMixinDatacomPropsChange(n, s);
  31973. });
  31974. },
  31975. methods: {
  31976. onMixinDatacomPropsChange: function onMixinDatacomPropsChange(e, t) {},
  31977. mixinDatacomEasyGet: function mixinDatacomEasyGet() {
  31978. var _this21 = this;
  31979. var _ref47 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  31980. _ref47$getone = _ref47.getone,
  31981. e = _ref47$getone === void 0 ? !1 : _ref47$getone,
  31982. t = _ref47.success,
  31983. n = _ref47.fail;
  31984. this.mixinDatacomLoading || (this.mixinDatacomLoading = !0, this.mixinDatacomErrorMessage = "", this.mixinDatacomGet().then(function (n) {
  31985. _this21.mixinDatacomLoading = !1;
  31986. var _n$result = n.result,
  31987. s = _n$result.data,
  31988. r = _n$result.count;
  31989. _this21.getcount && (_this21.mixinDatacomPage.count = r), _this21.mixinDatacomHasMore = s.length < _this21.pageSize;
  31990. var i = e ? s.length ? s[0] : void 0 : s;
  31991. _this21.mixinDatacomResData = i, t && t(i);
  31992. }).catch(function (e) {
  31993. _this21.mixinDatacomLoading = !1, _this21.mixinDatacomErrorMessage = e, n && n(e);
  31994. }));
  31995. },
  31996. mixinDatacomGet: function mixinDatacomGet() {
  31997. var _n12;
  31998. var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  31999. var n = e.database(this.spaceInfo);
  32000. var s = t.action || this.action;
  32001. s && (n = n.action(s));
  32002. var r = t.collection || this.collection;
  32003. n = Array.isArray(r) ? (_n12 = n).collection.apply(_n12, (0, _toConsumableArray2.default)(r)) : n.collection(r);
  32004. var i = t.where || this.where;
  32005. i && Object.keys(i).length && (n = n.where(i));
  32006. var o = t.field || this.field;
  32007. o && (n = n.field(o));
  32008. var a = t.foreignKey || this.foreignKey;
  32009. a && (n = n.foreignKey(a));
  32010. var c = t.groupby || this.groupby;
  32011. c && (n = n.groupBy(c));
  32012. var u = t.groupField || this.groupField;
  32013. u && (n = n.groupField(u));
  32014. !0 === (void 0 !== t.distinct ? t.distinct : this.distinct) && (n = n.distinct());
  32015. var h = t.orderby || this.orderby;
  32016. h && (n = n.orderBy(h));
  32017. var l = void 0 !== t.pageCurrent ? t.pageCurrent : this.mixinDatacomPage.current,
  32018. d = void 0 !== t.pageSize ? t.pageSize : this.mixinDatacomPage.size,
  32019. p = void 0 !== t.getcount ? t.getcount : this.getcount,
  32020. f = void 0 !== t.gettree ? t.gettree : this.gettree,
  32021. g = void 0 !== t.gettreepath ? t.gettreepath : this.gettreepath,
  32022. m = {
  32023. getCount: p
  32024. },
  32025. y = {
  32026. limitLevel: void 0 !== t.limitlevel ? t.limitlevel : this.limitlevel,
  32027. startWith: void 0 !== t.startwith ? t.startwith : this.startwith
  32028. };
  32029. return f && (m.getTree = y), g && (m.getTreePath = y), n = n.skip(d * (l - 1)).limit(d).get(m), n;
  32030. }
  32031. }
  32032. };
  32033. }
  32034. function bs(e) {
  32035. return function (t) {
  32036. var n = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  32037. n = function (e) {
  32038. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  32039. 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;
  32040. }({
  32041. customUI: !1,
  32042. loadingOptions: {
  32043. title: "加载中...",
  32044. mask: !0
  32045. },
  32046. errorOptions: {
  32047. type: "modal",
  32048. retry: !1
  32049. }
  32050. }, n);
  32051. var _n13 = n,
  32052. s = _n13.customUI,
  32053. r = _n13.loadingOptions,
  32054. i = _n13.errorOptions,
  32055. o = _n13.parseSystemError,
  32056. a = !s;
  32057. return new Proxy({}, {
  32058. get: function get(s, c) {
  32059. return function () {
  32060. var _ref48 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  32061. e = _ref48.fn,
  32062. t = _ref48.interceptorName,
  32063. n = _ref48.getCallbackArgs;
  32064. return /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee50() {
  32065. var _len2,
  32066. s,
  32067. _key2,
  32068. r,
  32069. i,
  32070. o,
  32071. _args = arguments;
  32072. return _regenerator.default.wrap(function _callee50$(_context50) {
  32073. while (1) {
  32074. switch (_context50.prev = _context50.next) {
  32075. case 0:
  32076. for (_len2 = _args.length, s = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  32077. s[_key2] = _args[_key2];
  32078. }
  32079. r = n ? n({
  32080. params: s
  32081. }) : {};
  32082. _context50.prev = 2;
  32083. _context50.next = 5;
  32084. return q(M(t, "invoke"), _objectSpread({}, r));
  32085. case 5:
  32086. _context50.next = 7;
  32087. return e.apply(void 0, s);
  32088. case 7:
  32089. i = _context50.sent;
  32090. _context50.next = 10;
  32091. return q(M(t, "success"), _objectSpread(_objectSpread({}, r), {}, {
  32092. result: i
  32093. }));
  32094. case 10:
  32095. return _context50.abrupt("return", i);
  32096. case 13:
  32097. _context50.prev = 13;
  32098. _context50.t0 = _context50["catch"](2);
  32099. o = _context50.t0;
  32100. _context50.next = 18;
  32101. return q(M(t, "fail"), _objectSpread(_objectSpread({}, r), {}, {
  32102. error: o
  32103. }));
  32104. case 18:
  32105. throw o;
  32106. case 19:
  32107. _context50.prev = 19;
  32108. _context50.next = 22;
  32109. return q(M(t, "complete"), o ? _objectSpread(_objectSpread({}, r), {}, {
  32110. error: o
  32111. }) : _objectSpread(_objectSpread({}, r), {}, {
  32112. result: i
  32113. }));
  32114. case 22:
  32115. return _context50.finish(19);
  32116. case 23:
  32117. case "end":
  32118. return _context50.stop();
  32119. }
  32120. }
  32121. }, _callee50, null, [[2, 13, 19, 23]]);
  32122. }));
  32123. }({
  32124. fn: function () {
  32125. var _s14 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee52() {
  32126. var l,
  32127. _len3,
  32128. u,
  32129. _key3,
  32130. d,
  32131. p,
  32132. _ref50,
  32133. f,
  32134. g,
  32135. m,
  32136. y,
  32137. _e27,
  32138. _yield,
  32139. _t18,
  32140. _n14,
  32141. _args4 = arguments;
  32142. return _regenerator.default.wrap(function _callee52$(_context52) {
  32143. while (1) {
  32144. switch (_context52.prev = _context52.next) {
  32145. case 0:
  32146. a && uni.showLoading({
  32147. title: r.title,
  32148. mask: r.mask
  32149. });
  32150. for (_len3 = _args4.length, u = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
  32151. u[_key3] = _args4[_key3];
  32152. }
  32153. d = {
  32154. name: t,
  32155. type: h,
  32156. data: {
  32157. method: c,
  32158. params: u
  32159. }
  32160. };
  32161. "object" == (0, _typeof2.default)(n.secretMethods) && function (e, t) {
  32162. var n = t.data.method,
  32163. s = e.secretMethods || {},
  32164. r = s[n] || s["*"];
  32165. r && (t.secretType = r);
  32166. }(n, d);
  32167. p = !1;
  32168. _context52.prev = 5;
  32169. _context52.next = 8;
  32170. return e.callFunction(d);
  32171. case 8:
  32172. l = _context52.sent;
  32173. _context52.next = 14;
  32174. break;
  32175. case 11:
  32176. _context52.prev = 11;
  32177. _context52.t0 = _context52["catch"](5);
  32178. p = !0, l = {
  32179. result: new ne(_context52.t0)
  32180. };
  32181. case 14:
  32182. _ref50 = l.result || {}, f = _ref50.errSubject, g = _ref50.errCode, m = _ref50.errMsg, y = _ref50.newToken;
  32183. if (!(a && uni.hideLoading(), y && y.token && y.tokenExpired && (ie(y), Q(W, _objectSpread({}, y))), g)) {
  32184. _context52.next = 39;
  32185. break;
  32186. }
  32187. _e27 = m;
  32188. if (!(p && o)) {
  32189. _context52.next = 24;
  32190. break;
  32191. }
  32192. _context52.next = 20;
  32193. return o({
  32194. objectName: t,
  32195. methodName: c,
  32196. params: u,
  32197. errSubject: f,
  32198. errCode: g,
  32199. errMsg: m
  32200. });
  32201. case 20:
  32202. _context52.t1 = _context52.sent.errMsg;
  32203. if (_context52.t1) {
  32204. _context52.next = 23;
  32205. break;
  32206. }
  32207. _context52.t1 = m;
  32208. case 23:
  32209. _e27 = _context52.t1;
  32210. case 24:
  32211. if (!a) {
  32212. _context52.next = 37;
  32213. break;
  32214. }
  32215. if (!("toast" === i.type)) {
  32216. _context52.next = 29;
  32217. break;
  32218. }
  32219. uni.showToast({
  32220. title: _e27,
  32221. icon: "none"
  32222. });
  32223. _context52.next = 37;
  32224. break;
  32225. case 29:
  32226. if (!("modal" !== i.type)) {
  32227. _context52.next = 31;
  32228. break;
  32229. }
  32230. throw new Error("Invalid errorOptions.type: ".concat(i.type));
  32231. case 31:
  32232. _context52.next = 33;
  32233. return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee51() {
  32234. var _ref52,
  32235. e,
  32236. t,
  32237. n,
  32238. s,
  32239. r,
  32240. _args2 = arguments;
  32241. return _regenerator.default.wrap(function _callee51$(_context51) {
  32242. while (1) {
  32243. switch (_context51.prev = _context51.next) {
  32244. case 0:
  32245. _ref52 = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {}, e = _ref52.title, t = _ref52.content, n = _ref52.showCancel, s = _ref52.cancelText, r = _ref52.confirmText;
  32246. return _context51.abrupt("return", new Promise(function (i, o) {
  32247. uni.showModal({
  32248. title: e,
  32249. content: t,
  32250. showCancel: n,
  32251. cancelText: s,
  32252. confirmText: r,
  32253. success: function success(e) {
  32254. i(e);
  32255. },
  32256. fail: function fail() {
  32257. i({
  32258. confirm: !1,
  32259. cancel: !0
  32260. });
  32261. }
  32262. });
  32263. }));
  32264. case 2:
  32265. case "end":
  32266. return _context51.stop();
  32267. }
  32268. }
  32269. }, _callee51);
  32270. }))({
  32271. title: "提示",
  32272. content: _e27,
  32273. showCancel: i.retry,
  32274. cancelText: "取消",
  32275. confirmText: i.retry ? "重试" : "确定"
  32276. });
  32277. case 33:
  32278. _yield = _context52.sent;
  32279. _t18 = _yield.confirm;
  32280. if (!(i.retry && _t18)) {
  32281. _context52.next = 37;
  32282. break;
  32283. }
  32284. return _context52.abrupt("return", s.apply(void 0, u));
  32285. case 37:
  32286. _n14 = new ne({
  32287. subject: f,
  32288. code: g,
  32289. message: m,
  32290. requestId: l.requestId
  32291. });
  32292. throw _n14.detail = l.result, Q(B, {
  32293. type: H,
  32294. content: _n14
  32295. }), _n14;
  32296. case 39:
  32297. return _context52.abrupt("return", (Q(B, {
  32298. type: H,
  32299. content: l.result
  32300. }), l.result));
  32301. case 40:
  32302. case "end":
  32303. return _context52.stop();
  32304. }
  32305. }
  32306. }, _callee52, null, [[5, 11]]);
  32307. }));
  32308. function s() {
  32309. return _s14.apply(this, arguments);
  32310. }
  32311. return s;
  32312. }(),
  32313. interceptorName: "callObject",
  32314. getCallbackArgs: function getCallbackArgs() {
  32315. var _ref53 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  32316. e = _ref53.params;
  32317. return {
  32318. objectName: t,
  32319. methodName: c,
  32320. params: e
  32321. };
  32322. }
  32323. });
  32324. }
  32325. });
  32326. };
  32327. }
  32328. function ks(e) {
  32329. return U("_globalUniCloudSecureNetworkCache__{spaceId}".replace("{spaceId}", e.config.spaceId));
  32330. }
  32331. function Cs() {
  32332. return _Cs.apply(this, arguments);
  32333. }
  32334. function _Cs() {
  32335. _Cs = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee55() {
  32336. var _ref65,
  32337. e,
  32338. _ref65$callLoginByWei,
  32339. t,
  32340. n,
  32341. s,
  32342. r,
  32343. _args7 = arguments;
  32344. return _regenerator.default.wrap(function _callee55$(_context55) {
  32345. while (1) {
  32346. switch (_context55.prev = _context55.next) {
  32347. case 0:
  32348. _ref65 = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : {}, e = _ref65.openid, _ref65$callLoginByWei = _ref65.callLoginByWeixin, t = _ref65$callLoginByWei === void 0 ? !1 : _ref65$callLoginByWei;
  32349. n = ks(this);
  32350. if (!("mp-weixin" !== P)) {
  32351. _context55.next = 4;
  32352. break;
  32353. }
  32354. throw new Error("[SecureNetwork] API `initSecureNetworkByWeixin` is not supported on platform `".concat(P, "`"));
  32355. case 4:
  32356. if (!(e && t)) {
  32357. _context55.next = 6;
  32358. break;
  32359. }
  32360. throw new Error("[SecureNetwork] openid and callLoginByWeixin cannot be passed at the same time");
  32361. case 6:
  32362. if (!e) {
  32363. _context55.next = 8;
  32364. break;
  32365. }
  32366. return _context55.abrupt("return", (n.mpWeixinOpenid = e, {}));
  32367. case 8:
  32368. _context55.next = 10;
  32369. return new Promise(function (e, t) {
  32370. uni.login({
  32371. success: function success(t) {
  32372. e(t.code);
  32373. },
  32374. fail: function fail(e) {
  32375. t(new Error(e.errMsg));
  32376. }
  32377. });
  32378. });
  32379. case 10:
  32380. s = _context55.sent;
  32381. r = this.importObject("uni-id-co", {
  32382. customUI: !0
  32383. });
  32384. _context55.next = 14;
  32385. return r.secureNetworkHandshakeByWeixin({
  32386. code: s,
  32387. callLoginByWeixin: t
  32388. });
  32389. case 14:
  32390. n.mpWeixinCode = s;
  32391. return _context55.abrupt("return", {
  32392. code: s
  32393. });
  32394. case 16:
  32395. case "end":
  32396. return _context55.stop();
  32397. }
  32398. }
  32399. }, _callee55, this);
  32400. }));
  32401. return _Cs.apply(this, arguments);
  32402. }
  32403. function Ts(_x37) {
  32404. return _Ts.apply(this, arguments);
  32405. }
  32406. function _Ts() {
  32407. _Ts = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee56(e) {
  32408. var t;
  32409. return _regenerator.default.wrap(function _callee56$(_context56) {
  32410. while (1) {
  32411. switch (_context56.prev = _context56.next) {
  32412. case 0:
  32413. t = ks(this);
  32414. return _context56.abrupt("return", (t.initPromise || (t.initPromise = Cs.call(this, e)), t.initPromise));
  32415. case 2:
  32416. case "end":
  32417. return _context56.stop();
  32418. }
  32419. }
  32420. }, _callee56, this);
  32421. }));
  32422. return _Ts.apply(this, arguments);
  32423. }
  32424. function Ps(e) {
  32425. return function () {
  32426. var _ref54 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  32427. t = _ref54.openid,
  32428. _ref54$callLoginByWei = _ref54.callLoginByWeixin,
  32429. n = _ref54$callLoginByWei === void 0 ? !1 : _ref54$callLoginByWei;
  32430. return Ts.call(e, {
  32431. openid: t,
  32432. callLoginByWeixin: n
  32433. });
  32434. };
  32435. }
  32436. function As(e) {
  32437. var t = {
  32438. getSystemInfo: uni.getSystemInfo,
  32439. getPushClientId: uni.getPushClientId
  32440. };
  32441. return function (n) {
  32442. return new Promise(function (s, r) {
  32443. t[e](_objectSpread(_objectSpread({}, n), {}, {
  32444. success: function success(e) {
  32445. s(e);
  32446. },
  32447. fail: function fail(e) {
  32448. r(e);
  32449. }
  32450. }));
  32451. });
  32452. };
  32453. }
  32454. var Es = /*#__PURE__*/function (_ref55) {
  32455. (0, _inherits2.default)(Es, _ref55);
  32456. var _super12 = _createSuper(Es);
  32457. function Es() {
  32458. var _this22;
  32459. (0, _classCallCheck2.default)(this, Es);
  32460. _this22 = _super12.call(this), _this22._uniPushMessageCallback = _this22._receivePushMessage.bind((0, _assertThisInitialized2.default)(_this22)), _this22._currentMessageId = -1, _this22._payloadQueue = [];
  32461. return _this22;
  32462. }
  32463. (0, _createClass2.default)(Es, [{
  32464. key: "init",
  32465. value: function init() {
  32466. var _this23 = this;
  32467. return Promise.all([As("getSystemInfo")(), As("getPushClientId")()]).then(function () {
  32468. var _ref56 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [],
  32469. _ref57 = (0, _slicedToArray2.default)(_ref56, 2),
  32470. _ref57$ = _ref57[0];
  32471. _ref57$ = _ref57$ === void 0 ? {} : _ref57$;
  32472. var e = _ref57$.appId,
  32473. _ref57$2 = _ref57[1];
  32474. _ref57$2 = _ref57$2 === void 0 ? {} : _ref57$2;
  32475. var t = _ref57$2.cid;
  32476. if (!e) throw new Error("Invalid appId, please check the manifest.json file");
  32477. if (!t) throw new Error("Invalid push client id");
  32478. _this23._appId = e, _this23._pushClientId = t, _this23._seqId = Date.now() + "-" + Math.floor(9e5 * Math.random() + 1e5), _this23.emit("open"), _this23._initMessageListener();
  32479. }, function (e) {
  32480. throw _this23.emit("error", e), _this23.close(), e;
  32481. });
  32482. }
  32483. }, {
  32484. key: "open",
  32485. value: function () {
  32486. var _open = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee53() {
  32487. return _regenerator.default.wrap(function _callee53$(_context53) {
  32488. while (1) {
  32489. switch (_context53.prev = _context53.next) {
  32490. case 0:
  32491. return _context53.abrupt("return", this.init());
  32492. case 1:
  32493. case "end":
  32494. return _context53.stop();
  32495. }
  32496. }
  32497. }, _callee53, this);
  32498. }));
  32499. function open() {
  32500. return _open.apply(this, arguments);
  32501. }
  32502. return open;
  32503. }()
  32504. }, {
  32505. key: "_isUniCloudSSE",
  32506. value: function _isUniCloudSSE(e) {
  32507. if ("receive" !== e.type) return !1;
  32508. var t = e && e.data && e.data.payload;
  32509. return !(!t || "UNI_CLOUD_SSE" !== t.channel || t.seqId !== this._seqId);
  32510. }
  32511. }, {
  32512. key: "_receivePushMessage",
  32513. value: function _receivePushMessage(e) {
  32514. if (!this._isUniCloudSSE(e)) return;
  32515. var t = e && e.data && e.data.payload,
  32516. n = t.action,
  32517. s = t.messageId,
  32518. r = t.message;
  32519. this._payloadQueue.push({
  32520. action: n,
  32521. messageId: s,
  32522. message: r
  32523. }), this._consumMessage();
  32524. }
  32525. }, {
  32526. key: "_consumMessage",
  32527. value: function _consumMessage() {
  32528. var _this24 = this;
  32529. for (;;) {
  32530. var _e28 = this._payloadQueue.find(function (e) {
  32531. return e.messageId === _this24._currentMessageId + 1;
  32532. });
  32533. if (!_e28) break;
  32534. this._currentMessageId++, this._parseMessagePayload(_e28);
  32535. }
  32536. }
  32537. }, {
  32538. key: "_parseMessagePayload",
  32539. value: function _parseMessagePayload(e) {
  32540. var t = e.action,
  32541. n = e.messageId,
  32542. s = e.message;
  32543. "end" === t ? this._end({
  32544. messageId: n,
  32545. message: s
  32546. }) : "message" === t && this._appendMessage({
  32547. messageId: n,
  32548. message: s
  32549. });
  32550. }
  32551. }, {
  32552. key: "_appendMessage",
  32553. value: function _appendMessage() {
  32554. var _ref58 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  32555. e = _ref58.messageId,
  32556. t = _ref58.message;
  32557. this.emit("message", t);
  32558. }
  32559. }, {
  32560. key: "_end",
  32561. value: function _end() {
  32562. var _ref59 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  32563. e = _ref59.messageId,
  32564. t = _ref59.message;
  32565. this.emit("end", t), this.close();
  32566. }
  32567. }, {
  32568. key: "_initMessageListener",
  32569. value: function _initMessageListener() {
  32570. uni.onPushMessage(this._uniPushMessageCallback);
  32571. }
  32572. }, {
  32573. key: "_destroy",
  32574. value: function _destroy() {
  32575. uni.offPushMessage(this._uniPushMessageCallback);
  32576. }
  32577. }, {
  32578. key: "toJSON",
  32579. value: function toJSON() {
  32580. return {
  32581. appId: this._appId,
  32582. pushClientId: this._pushClientId,
  32583. seqId: this._seqId
  32584. };
  32585. }
  32586. }, {
  32587. key: "close",
  32588. value: function close() {
  32589. this._destroy(), this.emit("close");
  32590. }
  32591. }]);
  32592. return Es;
  32593. }( /*#__PURE__*/function () {
  32594. function _class6() {
  32595. (0, _classCallCheck2.default)(this, _class6);
  32596. this._callback = {};
  32597. }
  32598. (0, _createClass2.default)(_class6, [{
  32599. key: "addListener",
  32600. value: function addListener(e, t) {
  32601. this._callback[e] || (this._callback[e] = []), this._callback[e].push(t);
  32602. }
  32603. }, {
  32604. key: "on",
  32605. value: function on(e, t) {
  32606. return this.addListener(e, t);
  32607. }
  32608. }, {
  32609. key: "removeListener",
  32610. value: function removeListener(e, t) {
  32611. if (!t) throw new Error('The "listener" argument must be of type function. Received undefined');
  32612. var n = this._callback[e];
  32613. if (!n) return;
  32614. var s = function (e, t) {
  32615. for (var _n15 = e.length - 1; _n15 >= 0; _n15--) {
  32616. if (e[_n15] === t) return _n15;
  32617. }
  32618. return -1;
  32619. }(n, t);
  32620. n.splice(s, 1);
  32621. }
  32622. }, {
  32623. key: "off",
  32624. value: function off(e, t) {
  32625. return this.removeListener(e, t);
  32626. }
  32627. }, {
  32628. key: "removeAllListener",
  32629. value: function removeAllListener(e) {
  32630. delete this._callback[e];
  32631. }
  32632. }, {
  32633. key: "emit",
  32634. value: function emit(e) {
  32635. var n = this._callback[e];
  32636. for (var _len4 = arguments.length, t = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
  32637. t[_key4 - 1] = arguments[_key4];
  32638. }
  32639. if (n) for (var _e29 = 0; _e29 < n.length; _e29++) {
  32640. n[_e29].apply(n, t);
  32641. }
  32642. }
  32643. }]);
  32644. return _class6;
  32645. }());
  32646. function Os(_x38, _x39) {
  32647. return _Os.apply(this, arguments);
  32648. }
  32649. function _Os() {
  32650. _Os = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee57(e, t) {
  32651. var n, _e33, s;
  32652. return _regenerator.default.wrap(function _callee57$(_context57) {
  32653. while (1) {
  32654. switch (_context57.prev = _context57.next) {
  32655. case 0:
  32656. n = "http://".concat(e, ":").concat(t, "/system/ping");
  32657. _context57.prev = 1;
  32658. _context57.next = 4;
  32659. return s = {
  32660. url: n,
  32661. timeout: 500
  32662. }, new Promise(function (e, t) {
  32663. se.request(_objectSpread(_objectSpread({}, s), {}, {
  32664. success: function success(t) {
  32665. e(t);
  32666. },
  32667. fail: function fail(e) {
  32668. t(e);
  32669. }
  32670. }));
  32671. });
  32672. case 4:
  32673. _e33 = _context57.sent;
  32674. return _context57.abrupt("return", !(!_e33.data || 0 !== _e33.data.code));
  32675. case 8:
  32676. _context57.prev = 8;
  32677. _context57.t0 = _context57["catch"](1);
  32678. return _context57.abrupt("return", !1);
  32679. case 11:
  32680. case "end":
  32681. return _context57.stop();
  32682. }
  32683. }
  32684. }, _callee57, null, [[1, 8]]);
  32685. }));
  32686. return _Os.apply(this, arguments);
  32687. }
  32688. function xs(_x40) {
  32689. return _xs.apply(this, arguments);
  32690. }
  32691. function _xs() {
  32692. _xs = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee59(e) {
  32693. var _ce2, _e34, _t20, t, _t$debugInfo, n, s, _yield2, r, i, o;
  32694. return _regenerator.default.wrap(function _callee59$(_context59) {
  32695. while (1) {
  32696. switch (_context59.prev = _context59.next) {
  32697. case 0:
  32698. if (b) {
  32699. _context59.next = 2;
  32700. break;
  32701. }
  32702. return _context59.abrupt("return", Promise.resolve());
  32703. case 2:
  32704. if ("app" === P) {
  32705. _ce2 = ce(), _e34 = _ce2.osName, _t20 = _ce2.osVersion;
  32706. "ios" === _e34 && function (e) {
  32707. if (!e || "string" != typeof e) return 0;
  32708. var t = e.match(/^(\d+)./);
  32709. return t && t[1] ? parseInt(t[1]) : 0;
  32710. }(_t20) >= 14 && console.warn("iOS 14及以上版本连接uniCloud本地调试服务需要允许客户端查找并连接到本地网络上的设备(仅开发模式生效,发行模式会连接uniCloud云端服务)");
  32711. }
  32712. t = e.__dev__;
  32713. if (t.debugInfo) {
  32714. _context59.next = 6;
  32715. break;
  32716. }
  32717. return _context59.abrupt("return");
  32718. case 6:
  32719. _t$debugInfo = t.debugInfo;
  32720. n = _t$debugInfo.address;
  32721. s = _t$debugInfo.servePort;
  32722. _context59.next = 11;
  32723. return function () {
  32724. var _ref66 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee58(e, t) {
  32725. var n, _s15, _r8;
  32726. return _regenerator.default.wrap(function _callee58$(_context58) {
  32727. while (1) {
  32728. switch (_context58.prev = _context58.next) {
  32729. case 0:
  32730. _s15 = 0;
  32731. case 1:
  32732. if (!(_s15 < e.length)) {
  32733. _context58.next = 11;
  32734. break;
  32735. }
  32736. _r8 = e[_s15];
  32737. _context58.next = 5;
  32738. return Os(_r8, t);
  32739. case 5:
  32740. if (!_context58.sent) {
  32741. _context58.next = 8;
  32742. break;
  32743. }
  32744. n = _r8;
  32745. return _context58.abrupt("break", 11);
  32746. case 8:
  32747. _s15++;
  32748. _context58.next = 1;
  32749. break;
  32750. case 11:
  32751. return _context58.abrupt("return", {
  32752. address: n,
  32753. port: t
  32754. });
  32755. case 12:
  32756. case "end":
  32757. return _context58.stop();
  32758. }
  32759. }
  32760. }, _callee58);
  32761. }));
  32762. return function (_x41, _x42) {
  32763. return _ref66.apply(this, arguments);
  32764. };
  32765. }()(n, s);
  32766. case 11:
  32767. _yield2 = _context59.sent;
  32768. r = _yield2.address;
  32769. if (!r) {
  32770. _context59.next = 15;
  32771. break;
  32772. }
  32773. return _context59.abrupt("return", (t.localAddress = r, void (t.localPort = s)));
  32774. case 15:
  32775. i = console["app" === P ? "error" : "warn"];
  32776. o = "";
  32777. 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)) {
  32778. _context59.next = 19;
  32779. break;
  32780. }
  32781. throw new Error(o);
  32782. case 19:
  32783. i(o);
  32784. case 20:
  32785. case "end":
  32786. return _context59.stop();
  32787. }
  32788. }
  32789. }, _callee59);
  32790. }));
  32791. return _xs.apply(this, arguments);
  32792. }
  32793. function Rs(e) {
  32794. e._initPromiseHub || (e._initPromiseHub = new I({
  32795. createPromise: function createPromise() {
  32796. var t = Promise.resolve();
  32797. var n;
  32798. n = 1, t = new Promise(function (e) {
  32799. setTimeout(function () {
  32800. e();
  32801. }, n);
  32802. });
  32803. var s = e.auth();
  32804. return t.then(function () {
  32805. return s.getLoginState();
  32806. }).then(function (e) {
  32807. return e ? Promise.resolve() : s.signInAnonymously();
  32808. });
  32809. }
  32810. }));
  32811. }
  32812. var Us = {
  32813. tcb: It,
  32814. tencent: It,
  32815. aliyun: ge,
  32816. private: bt
  32817. };
  32818. var Ls = new ( /*#__PURE__*/function () {
  32819. function _class7() {
  32820. (0, _classCallCheck2.default)(this, _class7);
  32821. }
  32822. (0, _createClass2.default)(_class7, [{
  32823. key: "init",
  32824. value: function init(e) {
  32825. var t = {};
  32826. var n = Us[e.provider];
  32827. if (!n) throw new Error("未提供正确的provider参数");
  32828. t = n.init(e), b && function (e) {
  32829. if (!b) return;
  32830. var t = {};
  32831. e.__dev__ = t, t.debugLog = b && ("web" === P && navigator.userAgent.indexOf("HBuilderX") > 0 || "app" === P);
  32832. var n = A;
  32833. n && !n.code && (t.debugInfo = n);
  32834. var s = new I({
  32835. createPromise: function createPromise() {
  32836. return xs(e);
  32837. }
  32838. });
  32839. t.initLocalNetwork = function () {
  32840. return s.exec();
  32841. };
  32842. }(t), Rs(t), xn(t), function (e) {
  32843. var t = e.uploadFile;
  32844. e.uploadFile = function (e) {
  32845. return t.call(this, e);
  32846. };
  32847. }(t), function (e) {
  32848. e.database = function (t) {
  32849. if (t && Object.keys(t).length > 0) return e.init(t).database();
  32850. if (this._database) return this._database;
  32851. var n = Bn($n, {
  32852. uniClient: e
  32853. });
  32854. return this._database = n, n;
  32855. }, e.databaseForJQL = function (t) {
  32856. if (t && Object.keys(t).length > 0) return e.init(t).databaseForJQL();
  32857. if (this._databaseForJQL) return this._databaseForJQL;
  32858. var n = Bn($n, {
  32859. uniClient: e,
  32860. isJQL: !0
  32861. });
  32862. return this._databaseForJQL = n, n;
  32863. };
  32864. }(t), function (e) {
  32865. e.getCurrentUserInfo = _s, e.chooseAndUploadFile = vs.initChooseAndUploadFile(e), Object.assign(e, {
  32866. get mixinDatacom() {
  32867. return Ss(e);
  32868. }
  32869. }), e.SSEChannel = Es, e.initSecureNetworkByWeixin = Ps(e), e.importObject = bs(e);
  32870. }(t);
  32871. return ["callFunction", "uploadFile", "deleteFile", "getTempFileURL", "downloadFile", "chooseAndUploadFile"].forEach(function (e) {
  32872. if (!t[e]) return;
  32873. var n = t[e];
  32874. t[e] = function () {
  32875. return n.apply(t, Array.from(arguments));
  32876. }, t[e] = function (e, t) {
  32877. return function (n) {
  32878. var _this25 = this;
  32879. var s = !1;
  32880. if ("callFunction" === t) {
  32881. var _e30 = n && n.type || u;
  32882. s = _e30 !== u;
  32883. }
  32884. var r = "callFunction" === t && !s,
  32885. i = this._initPromiseHub.exec();
  32886. n = n || {};
  32887. var _te2 = te(n),
  32888. o = _te2.success,
  32889. a = _te2.fail,
  32890. c = _te2.complete,
  32891. h = i.then(function () {
  32892. return s ? Promise.resolve() : q(M(t, "invoke"), n);
  32893. }).then(function () {
  32894. return e.call(_this25, n);
  32895. }).then(function (e) {
  32896. return s ? Promise.resolve(e) : q(M(t, "success"), e).then(function () {
  32897. return q(M(t, "complete"), e);
  32898. }).then(function () {
  32899. return r && Q(B, {
  32900. type: J,
  32901. content: e
  32902. }), Promise.resolve(e);
  32903. });
  32904. }, function (e) {
  32905. return s ? Promise.reject(e) : q(M(t, "fail"), e).then(function () {
  32906. return q(M(t, "complete"), e);
  32907. }).then(function () {
  32908. return Q(B, {
  32909. type: J,
  32910. content: e
  32911. }), Promise.reject(e);
  32912. });
  32913. });
  32914. if (!(o || a || c)) return h;
  32915. h.then(function (e) {
  32916. o && o(e), c && c(e), r && Q(B, {
  32917. type: J,
  32918. content: e
  32919. });
  32920. }, function (e) {
  32921. a && a(e), c && c(e), r && Q(B, {
  32922. type: J,
  32923. content: e
  32924. });
  32925. });
  32926. };
  32927. }(t[e], e).bind(t);
  32928. }), t.init = this.init, t;
  32929. }
  32930. }]);
  32931. return _class7;
  32932. }())();
  32933. (function () {
  32934. var e = E;
  32935. var t = {};
  32936. if (e && 1 === e.length) t = e[0], Ls = Ls.init(t), Ls._isDefault = !0;else {
  32937. var _t19 = ["auth", "callFunction", "uploadFile", "deleteFile", "getTempFileURL", "downloadFile", "database", "getCurrentUSerInfo", "importObject"];
  32938. var _n16;
  32939. _n16 = e && e.length > 0 ? "应用有多个服务空间,请通过uniCloud.init方法指定要使用的服务空间" : O ? "应用未关联服务空间,请在uniCloud目录右键关联服务空间" : "uni-app cli项目内使用uniCloud需要使用HBuilderX的运行菜单运行项目,且需要在uniCloud目录关联服务空间", _t19.forEach(function (e) {
  32940. Ls[e] = function () {
  32941. return console.error(_n16), Promise.reject(new ne({
  32942. code: "SYS_ERR",
  32943. message: _n16
  32944. }));
  32945. };
  32946. });
  32947. }
  32948. Object.assign(Ls, {
  32949. get mixinDatacom() {
  32950. return Ss(Ls);
  32951. }
  32952. }), fs(Ls), Ls.addInterceptor = D, Ls.removeInterceptor = F, Ls.interceptObject = K, b && "web" === P && (window.uniCloud = Ls);
  32953. })();
  32954. var Ns = Ls;
  32955. exports.default = Ns;
  32956. /* 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"]))
  32957. /***/ }),
  32958. /***/ 485:
  32959. /*!**********************************************************************!*\
  32960. !*** ./node_modules/@babel/runtime/helpers/assertThisInitialized.js ***!
  32961. \**********************************************************************/
  32962. /*! no static exports found */
  32963. /***/ (function(module, exports) {
  32964. function _assertThisInitialized(self) {
  32965. if (self === void 0) {
  32966. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  32967. }
  32968. return self;
  32969. }
  32970. module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports;
  32971. /***/ }),
  32972. /***/ 486:
  32973. /*!*********************************************************!*\
  32974. !*** ./node_modules/@babel/runtime/helpers/inherits.js ***!
  32975. \*********************************************************/
  32976. /*! no static exports found */
  32977. /***/ (function(module, exports, __webpack_require__) {
  32978. var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ 16);
  32979. function _inherits(subClass, superClass) {
  32980. if (typeof superClass !== "function" && superClass !== null) {
  32981. throw new TypeError("Super expression must either be null or a function");
  32982. }
  32983. subClass.prototype = Object.create(superClass && superClass.prototype, {
  32984. constructor: {
  32985. value: subClass,
  32986. writable: true,
  32987. configurable: true
  32988. }
  32989. });
  32990. Object.defineProperty(subClass, "prototype", {
  32991. writable: false
  32992. });
  32993. if (superClass) setPrototypeOf(subClass, superClass);
  32994. }
  32995. module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports;
  32996. /***/ }),
  32997. /***/ 487:
  32998. /*!**************************************************************************!*\
  32999. !*** ./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***!
  33000. \**************************************************************************/
  33001. /*! no static exports found */
  33002. /***/ (function(module, exports, __webpack_require__) {
  33003. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  33004. var assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized.js */ 485);
  33005. function _possibleConstructorReturn(self, call) {
  33006. if (call && (_typeof(call) === "object" || typeof call === "function")) {
  33007. return call;
  33008. } else if (call !== void 0) {
  33009. throw new TypeError("Derived constructors may only return object or undefined");
  33010. }
  33011. return assertThisInitialized(self);
  33012. }
  33013. module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports;
  33014. /***/ }),
  33015. /***/ 488:
  33016. /*!***************************************************************!*\
  33017. !*** ./node_modules/@babel/runtime/helpers/getPrototypeOf.js ***!
  33018. \***************************************************************/
  33019. /*! no static exports found */
  33020. /***/ (function(module, exports) {
  33021. function _getPrototypeOf(o) {
  33022. module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
  33023. return o.__proto__ || Object.getPrototypeOf(o);
  33024. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  33025. return _getPrototypeOf(o);
  33026. }
  33027. module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
  33028. /***/ }),
  33029. /***/ 489:
  33030. /*!****************************************************************!*\
  33031. !*** ./node_modules/@babel/runtime/helpers/wrapNativeSuper.js ***!
  33032. \****************************************************************/
  33033. /*! no static exports found */
  33034. /***/ (function(module, exports, __webpack_require__) {
  33035. var getPrototypeOf = __webpack_require__(/*! ./getPrototypeOf.js */ 488);
  33036. var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ 16);
  33037. var isNativeFunction = __webpack_require__(/*! ./isNativeFunction.js */ 490);
  33038. var construct = __webpack_require__(/*! ./construct.js */ 15);
  33039. function _wrapNativeSuper(Class) {
  33040. var _cache = typeof Map === "function" ? new Map() : undefined;
  33041. module.exports = _wrapNativeSuper = function _wrapNativeSuper(Class) {
  33042. if (Class === null || !isNativeFunction(Class)) return Class;
  33043. if (typeof Class !== "function") {
  33044. throw new TypeError("Super expression must either be null or a function");
  33045. }
  33046. if (typeof _cache !== "undefined") {
  33047. if (_cache.has(Class)) return _cache.get(Class);
  33048. _cache.set(Class, Wrapper);
  33049. }
  33050. function Wrapper() {
  33051. return construct(Class, arguments, getPrototypeOf(this).constructor);
  33052. }
  33053. Wrapper.prototype = Object.create(Class.prototype, {
  33054. constructor: {
  33055. value: Wrapper,
  33056. enumerable: false,
  33057. writable: true,
  33058. configurable: true
  33059. }
  33060. });
  33061. return setPrototypeOf(Wrapper, Class);
  33062. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  33063. return _wrapNativeSuper(Class);
  33064. }
  33065. module.exports = _wrapNativeSuper, module.exports.__esModule = true, module.exports["default"] = module.exports;
  33066. /***/ }),
  33067. /***/ 49:
  33068. /*!*************************************************************************!*\
  33069. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/libs/function/route.js ***!
  33070. \*************************************************************************/
  33071. /*! no static exports found */
  33072. /***/ (function(module, exports, __webpack_require__) {
  33073. "use strict";
  33074. /* WEBPACK VAR INJECTION */(function(uni) {
  33075. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  33076. Object.defineProperty(exports, "__esModule", {
  33077. value: true
  33078. });
  33079. exports.default = void 0;
  33080. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 50));
  33081. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 52));
  33082. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  33083. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  33084. /**
  33085. * 路由跳转方法,该方法相对于直接使用uni.xxx的好处是使用更加简单快捷
  33086. * 并且带有路由拦截功能
  33087. */
  33088. var Router = /*#__PURE__*/function () {
  33089. function Router() {
  33090. (0, _classCallCheck2.default)(this, Router);
  33091. // 原始属性定义
  33092. this.config = {
  33093. type: 'navigateTo',
  33094. url: '',
  33095. delta: 1,
  33096. // navigateBack页面后退时,回退的层数
  33097. params: {},
  33098. // 传递的参数
  33099. animationType: 'pop-in',
  33100. // 窗口动画,只在APP有效
  33101. animationDuration: 300,
  33102. // 窗口动画持续时间,单位毫秒,只在APP有效
  33103. intercept: false // 是否需要拦截
  33104. };
  33105. // 因为route方法是需要对外赋值给另外的对象使用,同时route内部有使用this,会导致route失去上下文
  33106. // 这里在构造函数中进行this绑定
  33107. this.route = this.route.bind(this);
  33108. }
  33109. // 判断url前面是否有"/",如果没有则加上,否则无法跳转
  33110. (0, _createClass2.default)(Router, [{
  33111. key: "addRootPath",
  33112. value: function addRootPath(url) {
  33113. return url[0] === '/' ? url : "/".concat(url);
  33114. }
  33115. // 整合路由参数
  33116. }, {
  33117. key: "mixinParam",
  33118. value: function mixinParam(url, params) {
  33119. url = url && this.addRootPath(url);
  33120. // 使用正则匹配,主要依据是判断是否有"/","?","="等,如“/page/index/index?name=mary"
  33121. // 如果有url中有get参数,转换后无需带上"?"
  33122. var query = '';
  33123. if (/.*\/.*\?.*=.*/.test(url)) {
  33124. // object对象转为get类型的参数
  33125. query = uni.$u.queryParams(params, false);
  33126. // 因为已有get参数,所以后面拼接的参数需要带上"&"隔开
  33127. return url += "&" + query;
  33128. } else {
  33129. // 直接拼接参数,因为此处url中没有后面的query参数,也就没有"?/&"之类的符号
  33130. query = uni.$u.queryParams(params);
  33131. return url += query;
  33132. }
  33133. }
  33134. // 对外的方法名称
  33135. }, {
  33136. key: "route",
  33137. value: function () {
  33138. var _route = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
  33139. var options,
  33140. params,
  33141. mergeConfig,
  33142. isNext,
  33143. _args = arguments;
  33144. return _regenerator.default.wrap(function _callee$(_context) {
  33145. while (1) {
  33146. switch (_context.prev = _context.next) {
  33147. case 0:
  33148. options = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
  33149. params = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
  33150. // 合并用户的配置和内部的默认配置
  33151. mergeConfig = {};
  33152. if (typeof options === 'string') {
  33153. // 如果options为字符串,则为route(url, params)的形式
  33154. mergeConfig.url = this.mixinParam(options, params);
  33155. mergeConfig.type = 'navigateTo';
  33156. } else {
  33157. mergeConfig = uni.$u.deepClone(options, this.config);
  33158. // 否则正常使用mergeConfig中的url和params进行拼接
  33159. mergeConfig.url = this.mixinParam(options.url, options.params);
  33160. }
  33161. if (params.intercept) {
  33162. this.config.intercept = params.intercept;
  33163. }
  33164. // params参数也带给拦截器
  33165. mergeConfig.params = params;
  33166. // 合并内外部参数
  33167. mergeConfig = uni.$u.deepMerge(this.config, mergeConfig);
  33168. // 判断用户是否定义了拦截器
  33169. if (!(typeof uni.$u.routeIntercept === 'function')) {
  33170. _context.next = 14;
  33171. break;
  33172. }
  33173. _context.next = 10;
  33174. return new Promise(function (resolve, reject) {
  33175. uni.$u.routeIntercept(mergeConfig, resolve);
  33176. });
  33177. case 10:
  33178. isNext = _context.sent;
  33179. // 如果isNext为true,则执行路由跳转
  33180. isNext && this.openPage(mergeConfig);
  33181. _context.next = 15;
  33182. break;
  33183. case 14:
  33184. this.openPage(mergeConfig);
  33185. case 15:
  33186. case "end":
  33187. return _context.stop();
  33188. }
  33189. }
  33190. }, _callee, this);
  33191. }));
  33192. function route() {
  33193. return _route.apply(this, arguments);
  33194. }
  33195. return route;
  33196. }() // 执行路由跳转
  33197. }, {
  33198. key: "openPage",
  33199. value: function openPage(config) {
  33200. // 解构参数
  33201. var url = config.url,
  33202. type = config.type,
  33203. delta = config.delta,
  33204. animationType = config.animationType,
  33205. animationDuration = config.animationDuration;
  33206. if (config.type == 'navigateTo' || config.type == 'to') {
  33207. uni.navigateTo({
  33208. url: url,
  33209. animationType: animationType,
  33210. animationDuration: animationDuration
  33211. });
  33212. }
  33213. if (config.type == 'redirectTo' || config.type == 'redirect') {
  33214. uni.redirectTo({
  33215. url: url
  33216. });
  33217. }
  33218. if (config.type == 'switchTab' || config.type == 'tab') {
  33219. uni.switchTab({
  33220. url: url
  33221. });
  33222. }
  33223. if (config.type == 'reLaunch' || config.type == 'launch') {
  33224. uni.reLaunch({
  33225. url: url
  33226. });
  33227. }
  33228. if (config.type == 'navigateBack' || config.type == 'back') {
  33229. uni.navigateBack({
  33230. delta: delta
  33231. });
  33232. }
  33233. }
  33234. }]);
  33235. return Router;
  33236. }();
  33237. var _default = new Router().route;
  33238. exports.default = _default;
  33239. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  33240. /***/ }),
  33241. /***/ 490:
  33242. /*!*****************************************************************!*\
  33243. !*** ./node_modules/@babel/runtime/helpers/isNativeFunction.js ***!
  33244. \*****************************************************************/
  33245. /*! no static exports found */
  33246. /***/ (function(module, exports) {
  33247. function _isNativeFunction(fn) {
  33248. return Function.toString.call(fn).indexOf("[native code]") !== -1;
  33249. }
  33250. module.exports = _isNativeFunction, module.exports.__esModule = true, module.exports["default"] = module.exports;
  33251. /***/ }),
  33252. /***/ 491:
  33253. /*!*********************************************************************************!*\
  33254. !*** D:/IdeaProjects/zdsz_WeChatApplet/pages.json?{"type":"origin-pages-json"} ***!
  33255. \*********************************************************************************/
  33256. /*! no static exports found */
  33257. /***/ (function(module, exports, __webpack_require__) {
  33258. "use strict";
  33259. Object.defineProperty(exports, "__esModule", {
  33260. value: true
  33261. });
  33262. exports.default = void 0;
  33263. var _default = {
  33264. "easycom": {
  33265. "^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue"
  33266. },
  33267. "pages": [{
  33268. "path": "pages/login/login",
  33269. "style": {
  33270. "navigationStyle": "custom"
  33271. }
  33272. }, {
  33273. "path": "pages/noLogin/PressureRegulatingBox/PressureRegulatingBox",
  33274. "style": {
  33275. "navigationStyle": "custom"
  33276. }
  33277. }, {
  33278. "path": "pages/index/index",
  33279. "style": {
  33280. "navigationStyle": "custom"
  33281. }
  33282. }, {
  33283. "path": "pages/noLogin/uploadProject",
  33284. "style": {
  33285. "navigationStyle": "custom"
  33286. }
  33287. }, {
  33288. "path": "pages/noLogin/typeList",
  33289. "style": {
  33290. "navigationStyle": "custom"
  33291. }
  33292. }, {
  33293. "path": "pages/noLogin/communitylist",
  33294. "style": {
  33295. "navigationStyle": "custom"
  33296. }
  33297. }, {
  33298. "path": "pages/noLogin/buildinglist",
  33299. "style": {
  33300. "navigationStyle": "custom"
  33301. }
  33302. }, {
  33303. "path": "pages/noLogin/unitlist",
  33304. "style": {
  33305. "navigationStyle": "custom"
  33306. }
  33307. }, {
  33308. "path": "pages/historyConstruction/historyDetail",
  33309. "style": {
  33310. "navigationStyle": "custom"
  33311. }
  33312. }, {
  33313. "path": "pages/noLogin/listProject",
  33314. "style": {
  33315. "navigationStyle": "custom"
  33316. }
  33317. }, {
  33318. "path": "pages/historyConstruction/updateInfo",
  33319. "style": {
  33320. "navigationBarTitleText": "修改"
  33321. }
  33322. }, {
  33323. "path": "pages/noLogin/cityProject",
  33324. "style": {
  33325. "navigationStyle": "custom"
  33326. }
  33327. }, {
  33328. "path": "pages/noLogin/data",
  33329. "style": {
  33330. "navigationStyle": "custom"
  33331. }
  33332. }, {
  33333. "path": "pages/noLogin/list",
  33334. "style": {
  33335. "navigationBarTitleText": "列表",
  33336. "enablePullDownRefresh": true
  33337. }
  33338. }, {
  33339. "path": "pages/notice/noticeDetail",
  33340. "style": {
  33341. "navigationStyle": "custom"
  33342. }
  33343. }, {
  33344. "path": "pages/notice/noticeList",
  33345. "style": {
  33346. "navigationStyle": "custom"
  33347. }
  33348. }, {
  33349. "path": "pages/cityConstrution/cityConstrution",
  33350. "style": {
  33351. "navigationStyle": "custom"
  33352. }
  33353. }, {
  33354. "path": "pages/historyConstruction/historyConstruction",
  33355. "style": {
  33356. "navigationStyle": "custom"
  33357. }
  33358. }, {
  33359. "path": "pages/service/service",
  33360. "style": {
  33361. "navigationStyle": "custom"
  33362. }
  33363. }, {
  33364. "path": "pages/aboutme/aboutme",
  33365. "style": {
  33366. "navigationStyle": "custom"
  33367. }
  33368. }, {
  33369. "path": "pages/chart/chart",
  33370. "style": {
  33371. "navigationStyle": "custom"
  33372. }
  33373. }, {
  33374. "path": "pages/chart/chartAll",
  33375. "style": {
  33376. "navigationStyle": "custom"
  33377. }
  33378. }, {
  33379. "path": "pages/chart/chartDetail",
  33380. "style": {
  33381. "navigationStyle": "custom"
  33382. }
  33383. }, {
  33384. "path": "pages/chart/newchartDetail",
  33385. "style": {
  33386. "navigationStyle": "custom"
  33387. }
  33388. }, {
  33389. "path": "pages/chart/chartList",
  33390. "style": {
  33391. "navigationBarTitleText": "工程管理"
  33392. }
  33393. }, {
  33394. "path": "pages/chart/details",
  33395. "style": {
  33396. "navigationBarTitleText": "详情"
  33397. }
  33398. }, {
  33399. "path": "pages/noLogin/repair",
  33400. "style": {
  33401. "navigationStyle": "custom"
  33402. }
  33403. }, {
  33404. "path": "pages/noLogin/My",
  33405. "style": {
  33406. "navigationStyle": "custom"
  33407. }
  33408. }, {
  33409. "path": "pages/noLogin/Myphoto",
  33410. "style": {
  33411. "navigationStyle": "custom"
  33412. }
  33413. }, {
  33414. "path": "pages/noLogin/home/home",
  33415. "style": {
  33416. "navigationBarTitleText": "",
  33417. "enablePullDownRefresh": false
  33418. }
  33419. }, {
  33420. "path": "pages/noLogin/emergencyRepairOrder/emergencyRepairOrder",
  33421. "style": {
  33422. "navigationBarTitleText": "",
  33423. "enablePullDownRefresh": false
  33424. }
  33425. }, {
  33426. "path": "pages/noLogin/WarningPileForm/WarningPileForm",
  33427. "style": {
  33428. "navigationBarTitleText": "",
  33429. "enablePullDownRefresh": false
  33430. }
  33431. }, {
  33432. "path": "pages/noLogin/WarningPileList",
  33433. "style": {
  33434. "navigationBarTitleText": "",
  33435. "enablePullDownRefresh": false
  33436. }
  33437. }, {
  33438. "path": "pages/noLogin/CourtyardNetworkManagement/CourtyardNetworkManagement",
  33439. "style": {
  33440. "navigationBarTitleText": "",
  33441. "enablePullDownRefresh": false
  33442. }
  33443. }],
  33444. "globalStyle": {
  33445. "navigationBarTextStyle": "black",
  33446. "navigationBarTitleText": "uni-app",
  33447. "navigationBarBackgroundColor": "#F8F8F8",
  33448. "backgroundColor": "#F8F8F8"
  33449. },
  33450. "tabBar": {
  33451. "list": [{
  33452. "pagePath": "pages/index/index",
  33453. "text": "首页",
  33454. "iconPath": "static/icon/logo.png",
  33455. "selectedIconPath": "static/icon/logo.png"
  33456. }, {
  33457. "pagePath": "pages/noLogin/typeList",
  33458. "text": "工作",
  33459. "iconPath": "static/icon/constructions.png",
  33460. "selectedIconPath": "static/icon/constructions.png"
  33461. }]
  33462. },
  33463. "condition": {
  33464. "current": 0,
  33465. "list": [{
  33466. "name": "",
  33467. "path": "",
  33468. "query": ""
  33469. }]
  33470. }
  33471. };
  33472. exports.default = _default;
  33473. /***/ }),
  33474. /***/ 492:
  33475. /*!********************************************************************!*\
  33476. !*** D:/IdeaProjects/zdsz_WeChatApplet/pages.json?{"type":"stat"} ***!
  33477. \********************************************************************/
  33478. /*! no static exports found */
  33479. /***/ (function(module, exports, __webpack_require__) {
  33480. "use strict";
  33481. Object.defineProperty(exports, "__esModule", {
  33482. value: true
  33483. });
  33484. exports.default = void 0;
  33485. var _default = {
  33486. "appid": "__UNI__5FB7046"
  33487. };
  33488. exports.default = _default;
  33489. /***/ }),
  33490. /***/ 493:
  33491. /*!**************************************************************************************************!*\
  33492. !*** D:/IdeaProjects/zdsz_WeChatApplet/uni_modules/qiun-data-charts/js_sdk/u-charts/u-charts.js ***!
  33493. \**************************************************************************************************/
  33494. /*! no static exports found */
  33495. /***/ (function(module, exports, __webpack_require__) {
  33496. "use strict";
  33497. /* WEBPACK VAR INJECTION */(function(module) {/*
  33498. * uCharts®
  33499. * 高性能跨平台图表库,支持H5、APP、小程序(微信/支付宝/百度/头条/QQ/360)、Vue、Taro等支持canvas的框架平台
  33500. * Copyright (c) 2021 QIUN®秋云 https://www.ucharts.cn All rights reserved.
  33501. * Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
  33502. * 复制使用请保留本段注释,感谢支持开源!
  33503. *
  33504. * uCharts®官方网站
  33505. * https://www.uCharts.cn
  33506. *
  33507. * 开源地址:
  33508. * https://gitee.com/uCharts/uCharts
  33509. *
  33510. * uni-app插件市场地址:
  33511. * http://ext.dcloud.net.cn/plugin?id=271
  33512. *
  33513. */
  33514. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  33515. Object.defineProperty(exports, "__esModule", {
  33516. value: true
  33517. });
  33518. exports.default = void 0;
  33519. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  33520. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  33521. var config = {
  33522. version: 'v2.3.6-20211201',
  33523. yAxisWidth: 15,
  33524. yAxisSplit: 5,
  33525. xAxisHeight: 22,
  33526. xAxisLineHeight: 22,
  33527. legendHeight: 15,
  33528. yAxisTitleWidth: 15,
  33529. padding: [10, 10, 10, 10],
  33530. pixelRatio: 1,
  33531. rotate: false,
  33532. columePadding: 3,
  33533. fontSize: 13,
  33534. fontColor: '#666666',
  33535. dataPointShape: ['circle', 'circle', 'circle', 'circle'],
  33536. color: ['#1890FF', '#91CB74', '#FAC858', '#EE6666', '#73C0DE', '#3CA272', '#FC8452', '#9A60B4', '#ea7ccc'],
  33537. linearColor: ['#0EE2F8', '#2BDCA8', '#FA7D8D', '#EB88E2', '#2AE3A0', '#0EE2F8', '#EB88E2', '#6773E3', '#F78A85'],
  33538. pieChartLinePadding: 15,
  33539. pieChartTextPadding: 5,
  33540. xAxisTextPadding: 3,
  33541. titleColor: '#333333',
  33542. titleFontSize: 20,
  33543. subtitleColor: '#999999',
  33544. subtitleFontSize: 15,
  33545. toolTipPadding: 3,
  33546. toolTipBackground: '#000000',
  33547. toolTipOpacity: 0.7,
  33548. toolTipLineHeight: 20,
  33549. radarLabelTextMargin: 13,
  33550. gaugeLabelTextMargin: 13
  33551. };
  33552. var assign = function assign(target) {
  33553. for (var _len2 = arguments.length, varArgs = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
  33554. varArgs[_key2 - 1] = arguments[_key2];
  33555. }
  33556. if (target == null) {
  33557. throw new TypeError('[uCharts] Cannot convert undefined or null to object');
  33558. }
  33559. if (!varArgs || varArgs.length <= 0) {
  33560. return target;
  33561. }
  33562. // 深度合并对象
  33563. function deepAssign(obj1, obj2) {
  33564. for (var key in obj2) {
  33565. obj1[key] = obj1[key] && obj1[key].toString() === "[object Object]" ? deepAssign(obj1[key], obj2[key]) : obj1[key] = obj2[key];
  33566. }
  33567. return obj1;
  33568. }
  33569. varArgs.forEach(function (val) {
  33570. target = deepAssign(target, val);
  33571. });
  33572. return target;
  33573. };
  33574. var util = {
  33575. toFixed: function toFixed(num, limit) {
  33576. limit = limit || 2;
  33577. if (this.isFloat(num)) {
  33578. num = num.toFixed(limit);
  33579. }
  33580. return num;
  33581. },
  33582. isFloat: function isFloat(num) {
  33583. return num % 1 !== 0;
  33584. },
  33585. approximatelyEqual: function approximatelyEqual(num1, num2) {
  33586. return Math.abs(num1 - num2) < 1e-10;
  33587. },
  33588. isSameSign: function isSameSign(num1, num2) {
  33589. return Math.abs(num1) === num1 && Math.abs(num2) === num2 || Math.abs(num1) !== num1 && Math.abs(num2) !== num2;
  33590. },
  33591. isSameXCoordinateArea: function isSameXCoordinateArea(p1, p2) {
  33592. return this.isSameSign(p1.x, p2.x);
  33593. },
  33594. isCollision: function isCollision(obj1, obj2) {
  33595. obj1.end = {};
  33596. obj1.end.x = obj1.start.x + obj1.width;
  33597. obj1.end.y = obj1.start.y - obj1.height;
  33598. obj2.end = {};
  33599. obj2.end.x = obj2.start.x + obj2.width;
  33600. obj2.end.y = obj2.start.y - obj2.height;
  33601. 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;
  33602. return !flag;
  33603. }
  33604. };
  33605. //兼容H5点击事件
  33606. function getH5Offset(e) {
  33607. e.mp = {
  33608. changedTouches: []
  33609. };
  33610. e.mp.changedTouches.push({
  33611. x: e.offsetX,
  33612. y: e.offsetY
  33613. });
  33614. return e;
  33615. }
  33616. // 经纬度转墨卡托
  33617. function lonlat2mercator(longitude, latitude) {
  33618. var mercator = Array(2);
  33619. var x = longitude * 20037508.34 / 180;
  33620. var y = Math.log(Math.tan((90 + latitude) * Math.PI / 360)) / (Math.PI / 180);
  33621. y = y * 20037508.34 / 180;
  33622. mercator[0] = x;
  33623. mercator[1] = y;
  33624. return mercator;
  33625. }
  33626. // 墨卡托转经纬度
  33627. function mercator2lonlat(longitude, latitude) {
  33628. var lonlat = Array(2);
  33629. var x = longitude / 20037508.34 * 180;
  33630. var y = latitude / 20037508.34 * 180;
  33631. y = 180 / Math.PI * (2 * Math.atan(Math.exp(y * Math.PI / 180)) - Math.PI / 2);
  33632. lonlat[0] = x;
  33633. lonlat[1] = y;
  33634. return lonlat;
  33635. }
  33636. // hex 转 rgba
  33637. function hexToRgb(hexValue, opc) {
  33638. var rgx = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
  33639. var hex = hexValue.replace(rgx, function (m, r, g, b) {
  33640. return r + r + g + g + b + b;
  33641. });
  33642. var rgb = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
  33643. var r = parseInt(rgb[1], 16);
  33644. var g = parseInt(rgb[2], 16);
  33645. var b = parseInt(rgb[3], 16);
  33646. return 'rgba(' + r + ',' + g + ',' + b + ',' + opc + ')';
  33647. }
  33648. function findRange(num, type, limit) {
  33649. if (isNaN(num)) {
  33650. throw new Error('[uCharts] series数据需为Number格式');
  33651. }
  33652. limit = limit || 10;
  33653. type = type ? type : 'upper';
  33654. var multiple = 1;
  33655. while (limit < 1) {
  33656. limit *= 10;
  33657. multiple *= 10;
  33658. }
  33659. if (type === 'upper') {
  33660. num = Math.ceil(num * multiple);
  33661. } else {
  33662. num = Math.floor(num * multiple);
  33663. }
  33664. while (num % limit !== 0) {
  33665. if (type === 'upper') {
  33666. num++;
  33667. } else {
  33668. num--;
  33669. }
  33670. }
  33671. return num / multiple;
  33672. }
  33673. function calCandleMA(dayArr, nameArr, colorArr, kdata) {
  33674. var seriesTemp = [];
  33675. for (var k = 0; k < dayArr.length; k++) {
  33676. var seriesItem = {
  33677. data: [],
  33678. name: nameArr[k],
  33679. color: colorArr[k]
  33680. };
  33681. for (var i = 0, len = kdata.length; i < len; i++) {
  33682. if (i < dayArr[k]) {
  33683. seriesItem.data.push(null);
  33684. continue;
  33685. }
  33686. var sum = 0;
  33687. for (var j = 0; j < dayArr[k]; j++) {
  33688. sum += kdata[i - j][1];
  33689. }
  33690. seriesItem.data.push(+(sum / dayArr[k]).toFixed(3));
  33691. }
  33692. seriesTemp.push(seriesItem);
  33693. }
  33694. return seriesTemp;
  33695. }
  33696. function calValidDistance(self, distance, chartData, config, opts) {
  33697. var dataChartAreaWidth = opts.width - opts.area[1] - opts.area[3];
  33698. var dataChartWidth = chartData.eachSpacing * (opts.chartData.xAxisData.xAxisPoints.length - 1);
  33699. var validDistance = distance;
  33700. if (distance >= 0) {
  33701. validDistance = 0;
  33702. self.uevent.trigger('scrollLeft');
  33703. self.scrollOption.position = 'left';
  33704. opts.xAxis.scrollPosition = 'left';
  33705. } else if (Math.abs(distance) >= dataChartWidth - dataChartAreaWidth) {
  33706. validDistance = dataChartAreaWidth - dataChartWidth;
  33707. self.uevent.trigger('scrollRight');
  33708. self.scrollOption.position = 'right';
  33709. opts.xAxis.scrollPosition = 'right';
  33710. } else {
  33711. self.scrollOption.position = distance;
  33712. opts.xAxis.scrollPosition = distance;
  33713. }
  33714. return validDistance;
  33715. }
  33716. function isInAngleRange(angle, startAngle, endAngle) {
  33717. function adjust(angle) {
  33718. while (angle < 0) {
  33719. angle += 2 * Math.PI;
  33720. }
  33721. while (angle > 2 * Math.PI) {
  33722. angle -= 2 * Math.PI;
  33723. }
  33724. return angle;
  33725. }
  33726. angle = adjust(angle);
  33727. startAngle = adjust(startAngle);
  33728. endAngle = adjust(endAngle);
  33729. if (startAngle > endAngle) {
  33730. endAngle += 2 * Math.PI;
  33731. if (angle < startAngle) {
  33732. angle += 2 * Math.PI;
  33733. }
  33734. }
  33735. return angle >= startAngle && angle <= endAngle;
  33736. }
  33737. function calRotateTranslate(x, y, h) {
  33738. var xv = x;
  33739. var yv = h - y;
  33740. var transX = xv + (h - yv - xv) / Math.sqrt(2);
  33741. transX *= -1;
  33742. var transY = (h - yv) * (Math.sqrt(2) - 1) - (h - yv - xv) / Math.sqrt(2);
  33743. return {
  33744. transX: transX,
  33745. transY: transY
  33746. };
  33747. }
  33748. function createCurveControlPoints(points, i) {
  33749. function isNotMiddlePoint(points, i) {
  33750. if (points[i - 1] && points[i + 1]) {
  33751. 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);
  33752. } else {
  33753. return false;
  33754. }
  33755. }
  33756. function isNotMiddlePointX(points, i) {
  33757. if (points[i - 1] && points[i + 1]) {
  33758. 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);
  33759. } else {
  33760. return false;
  33761. }
  33762. }
  33763. var a = 0.2;
  33764. var b = 0.2;
  33765. var pAx = null;
  33766. var pAy = null;
  33767. var pBx = null;
  33768. var pBy = null;
  33769. if (i < 1) {
  33770. pAx = points[0].x + (points[1].x - points[0].x) * a;
  33771. pAy = points[0].y + (points[1].y - points[0].y) * a;
  33772. } else {
  33773. pAx = points[i].x + (points[i + 1].x - points[i - 1].x) * a;
  33774. pAy = points[i].y + (points[i + 1].y - points[i - 1].y) * a;
  33775. }
  33776. if (i > points.length - 3) {
  33777. var last = points.length - 1;
  33778. pBx = points[last].x - (points[last].x - points[last - 1].x) * b;
  33779. pBy = points[last].y - (points[last].y - points[last - 1].y) * b;
  33780. } else {
  33781. pBx = points[i + 1].x - (points[i + 2].x - points[i].x) * b;
  33782. pBy = points[i + 1].y - (points[i + 2].y - points[i].y) * b;
  33783. }
  33784. if (isNotMiddlePoint(points, i + 1)) {
  33785. pBy = points[i + 1].y;
  33786. }
  33787. if (isNotMiddlePoint(points, i)) {
  33788. pAy = points[i].y;
  33789. }
  33790. if (isNotMiddlePointX(points, i + 1)) {
  33791. pBx = points[i + 1].x;
  33792. }
  33793. if (isNotMiddlePointX(points, i)) {
  33794. pAx = points[i].x;
  33795. }
  33796. if (pAy >= Math.max(points[i].y, points[i + 1].y) || pAy <= Math.min(points[i].y, points[i + 1].y)) {
  33797. pAy = points[i].y;
  33798. }
  33799. if (pBy >= Math.max(points[i].y, points[i + 1].y) || pBy <= Math.min(points[i].y, points[i + 1].y)) {
  33800. pBy = points[i + 1].y;
  33801. }
  33802. if (pAx >= Math.max(points[i].x, points[i + 1].x) || pAx <= Math.min(points[i].x, points[i + 1].x)) {
  33803. pAx = points[i].x;
  33804. }
  33805. if (pBx >= Math.max(points[i].x, points[i + 1].x) || pBx <= Math.min(points[i].x, points[i + 1].x)) {
  33806. pBx = points[i + 1].x;
  33807. }
  33808. return {
  33809. ctrA: {
  33810. x: pAx,
  33811. y: pAy
  33812. },
  33813. ctrB: {
  33814. x: pBx,
  33815. y: pBy
  33816. }
  33817. };
  33818. }
  33819. function convertCoordinateOrigin(x, y, center) {
  33820. return {
  33821. x: center.x + x,
  33822. y: center.y - y
  33823. };
  33824. }
  33825. function avoidCollision(obj, target) {
  33826. if (target) {
  33827. // is collision test
  33828. while (util.isCollision(obj, target)) {
  33829. if (obj.start.x > 0) {
  33830. obj.start.y--;
  33831. } else if (obj.start.x < 0) {
  33832. obj.start.y++;
  33833. } else {
  33834. if (obj.start.y > 0) {
  33835. obj.start.y++;
  33836. } else {
  33837. obj.start.y--;
  33838. }
  33839. }
  33840. }
  33841. }
  33842. return obj;
  33843. }
  33844. function fixPieSeries(series, opts, config) {
  33845. var pieSeriesArr = [];
  33846. if (series.length > 0 && series[0].data.constructor.toString().indexOf('Array') > -1) {
  33847. opts._pieSeries_ = series;
  33848. var oldseries = series[0].data;
  33849. for (var i = 0; i < oldseries.length; i++) {
  33850. oldseries[i].formatter = series[0].formatter;
  33851. oldseries[i].data = oldseries[i].value;
  33852. pieSeriesArr.push(oldseries[i]);
  33853. }
  33854. opts.series = pieSeriesArr;
  33855. } else {
  33856. pieSeriesArr = series;
  33857. }
  33858. return pieSeriesArr;
  33859. }
  33860. function fillSeries(series, opts, config) {
  33861. var index = 0;
  33862. for (var i = 0; i < series.length; i++) {
  33863. var item = series[i];
  33864. if (!item.color) {
  33865. item.color = config.color[index];
  33866. index = (index + 1) % config.color.length;
  33867. }
  33868. if (!item.linearIndex) {
  33869. item.linearIndex = i;
  33870. }
  33871. if (!item.index) {
  33872. item.index = 0;
  33873. }
  33874. if (!item.type) {
  33875. item.type = opts.type;
  33876. }
  33877. if (typeof item.show == "undefined") {
  33878. item.show = true;
  33879. }
  33880. if (!item.type) {
  33881. item.type = opts.type;
  33882. }
  33883. if (!item.pointShape) {
  33884. item.pointShape = "circle";
  33885. }
  33886. if (!item.legendShape) {
  33887. switch (item.type) {
  33888. case 'line':
  33889. item.legendShape = "line";
  33890. break;
  33891. case 'column':
  33892. item.legendShape = "rect";
  33893. break;
  33894. case 'area':
  33895. item.legendShape = "triangle";
  33896. break;
  33897. case 'bar':
  33898. item.legendShape = "rect";
  33899. break;
  33900. default:
  33901. item.legendShape = "circle";
  33902. }
  33903. }
  33904. }
  33905. return series;
  33906. }
  33907. function fillCustomColor(linearType, customColor, series, config) {
  33908. var newcolor = customColor || [];
  33909. if (linearType == 'custom' && newcolor.length == 0) {
  33910. newcolor = config.linearColor;
  33911. }
  33912. if (linearType == 'custom' && newcolor.length < series.length) {
  33913. var chazhi = series.length - newcolor.length;
  33914. for (var i = 0; i < chazhi; i++) {
  33915. newcolor.push(config.linearColor[(i + 1) % config.linearColor.length]);
  33916. }
  33917. }
  33918. return newcolor;
  33919. }
  33920. function getDataRange(minData, maxData) {
  33921. var limit = 0;
  33922. var range = maxData - minData;
  33923. if (range >= 10000) {
  33924. limit = 1000;
  33925. } else if (range >= 1000) {
  33926. limit = 100;
  33927. } else if (range >= 100) {
  33928. limit = 10;
  33929. } else if (range >= 10) {
  33930. limit = 5;
  33931. } else if (range >= 1) {
  33932. limit = 1;
  33933. } else if (range >= 0.1) {
  33934. limit = 0.1;
  33935. } else if (range >= 0.01) {
  33936. limit = 0.01;
  33937. } else if (range >= 0.001) {
  33938. limit = 0.001;
  33939. } else if (range >= 0.0001) {
  33940. limit = 0.0001;
  33941. } else if (range >= 0.00001) {
  33942. limit = 0.00001;
  33943. } else {
  33944. limit = 0.000001;
  33945. }
  33946. return {
  33947. minRange: findRange(minData, 'lower', limit),
  33948. maxRange: findRange(maxData, 'upper', limit)
  33949. };
  33950. }
  33951. function measureText(text, fontSize, context) {
  33952. var width = 0;
  33953. text = String(text);
  33954. if (context !== false && context !== undefined && context.setFontSize && context.measureText) {
  33955. context.setFontSize(fontSize);
  33956. return context.measureText(text).width;
  33957. } else {
  33958. var text = text.split('');
  33959. for (var i = 0; i < text.length; i++) {
  33960. var item = text[i];
  33961. if (/[a-zA-Z]/.test(item)) {
  33962. width += 7;
  33963. } else if (/[0-9]/.test(item)) {
  33964. width += 5.5;
  33965. } else if (/\./.test(item)) {
  33966. width += 2.7;
  33967. } else if (/-/.test(item)) {
  33968. width += 3.25;
  33969. } else if (/:/.test(item)) {
  33970. width += 2.5;
  33971. } else if (/[\u4e00-\u9fa5]/.test(item)) {
  33972. width += 10;
  33973. } else if (/\(|\)/.test(item)) {
  33974. width += 3.73;
  33975. } else if (/\s/.test(item)) {
  33976. width += 2.5;
  33977. } else if (/%/.test(item)) {
  33978. width += 8;
  33979. } else {
  33980. width += 10;
  33981. }
  33982. }
  33983. return width * fontSize / 10;
  33984. }
  33985. }
  33986. function dataCombine(series) {
  33987. return series.reduce(function (a, b) {
  33988. return (a.data ? a.data : a).concat(b.data);
  33989. }, []);
  33990. }
  33991. function dataCombineStack(series, len) {
  33992. var sum = new Array(len);
  33993. for (var j = 0; j < sum.length; j++) {
  33994. sum[j] = 0;
  33995. }
  33996. for (var i = 0; i < series.length; i++) {
  33997. for (var j = 0; j < sum.length; j++) {
  33998. sum[j] += series[i].data[j];
  33999. }
  34000. }
  34001. return series.reduce(function (a, b) {
  34002. return (a.data ? a.data : a).concat(b.data).concat(sum);
  34003. }, []);
  34004. }
  34005. function getTouches(touches, opts, e) {
  34006. var x, y;
  34007. if (touches.clientX) {
  34008. if (opts.rotate) {
  34009. y = opts.height - touches.clientX * opts.pix;
  34010. x = (touches.pageY - e.currentTarget.offsetTop - opts.height / opts.pix / 2 * (opts.pix - 1)) * opts.pix;
  34011. } else {
  34012. x = touches.clientX * opts.pix;
  34013. y = (touches.pageY - e.currentTarget.offsetTop - opts.height / opts.pix / 2 * (opts.pix - 1)) * opts.pix;
  34014. }
  34015. } else {
  34016. if (opts.rotate) {
  34017. y = opts.height - touches.x * opts.pix;
  34018. x = touches.y * opts.pix;
  34019. } else {
  34020. x = touches.x * opts.pix;
  34021. y = touches.y * opts.pix;
  34022. }
  34023. }
  34024. return {
  34025. x: x,
  34026. y: y
  34027. };
  34028. }
  34029. function getSeriesDataItem(series, index, group) {
  34030. var data = [];
  34031. var newSeries = [];
  34032. var indexIsArr = index.constructor.toString().indexOf('Array') > -1;
  34033. if (indexIsArr) {
  34034. var tempSeries = filterSeries(series);
  34035. for (var i = 0; i < group.length; i++) {
  34036. newSeries.push(tempSeries[group[i]]);
  34037. }
  34038. } else {
  34039. newSeries = series;
  34040. }
  34041. ;
  34042. for (var _i = 0; _i < newSeries.length; _i++) {
  34043. var item = newSeries[_i];
  34044. var tmpindex = -1;
  34045. if (indexIsArr) {
  34046. tmpindex = index[_i];
  34047. } else {
  34048. tmpindex = index;
  34049. }
  34050. if (item.data[tmpindex] !== null && typeof item.data[tmpindex] !== 'undefined' && item.show) {
  34051. var seriesItem = {};
  34052. seriesItem.color = item.color;
  34053. seriesItem.type = item.type;
  34054. seriesItem.style = item.style;
  34055. seriesItem.pointShape = item.pointShape;
  34056. seriesItem.disableLegend = item.disableLegend;
  34057. seriesItem.name = item.name;
  34058. seriesItem.show = item.show;
  34059. seriesItem.data = item.formatter ? item.formatter(item.data[tmpindex]) : item.data[tmpindex];
  34060. data.push(seriesItem);
  34061. }
  34062. }
  34063. return data;
  34064. }
  34065. function getMaxTextListLength(list, fontSize, context) {
  34066. var lengthList = list.map(function (item) {
  34067. return measureText(item, fontSize, context);
  34068. });
  34069. return Math.max.apply(null, lengthList);
  34070. }
  34071. function getRadarCoordinateSeries(length) {
  34072. var eachAngle = 2 * Math.PI / length;
  34073. var CoordinateSeries = [];
  34074. for (var i = 0; i < length; i++) {
  34075. CoordinateSeries.push(eachAngle * i);
  34076. }
  34077. return CoordinateSeries.map(function (item) {
  34078. return -1 * item + Math.PI / 2;
  34079. });
  34080. }
  34081. function getToolTipData(seriesData, opts, index, group, categories) {
  34082. var option = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {};
  34083. var calPoints = opts.chartData.calPoints ? opts.chartData.calPoints : [];
  34084. var points = {};
  34085. if (group.length > 0) {
  34086. var filterPoints = [];
  34087. for (var i = 0; i < group.length; i++) {
  34088. filterPoints.push(calPoints[group[i]]);
  34089. }
  34090. points = filterPoints[0][index[0]];
  34091. } else {
  34092. points = calPoints[0][index];
  34093. }
  34094. ;
  34095. var textList = seriesData.map(function (item) {
  34096. var titleText = null;
  34097. if (opts.categories && opts.categories.length > 0) {
  34098. titleText = categories[index];
  34099. }
  34100. ;
  34101. return {
  34102. text: option.formatter ? option.formatter(item, titleText, index, opts) : item.name + ': ' + item.data,
  34103. color: item.color
  34104. };
  34105. });
  34106. var offset = {
  34107. x: Math.round(points.x),
  34108. y: Math.round(points.y)
  34109. };
  34110. return {
  34111. textList: textList,
  34112. offset: offset
  34113. };
  34114. }
  34115. function getMixToolTipData(seriesData, opts, index, categories) {
  34116. var option = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
  34117. var points = opts.chartData.xAxisPoints[index] + opts.chartData.eachSpacing / 2;
  34118. var textList = seriesData.map(function (item) {
  34119. return {
  34120. text: option.formatter ? option.formatter(item, categories[index], index, opts) : item.name + ': ' + item.data,
  34121. color: item.color,
  34122. disableLegend: item.disableLegend ? true : false
  34123. };
  34124. });
  34125. textList = textList.filter(function (item) {
  34126. if (item.disableLegend !== true) {
  34127. return item;
  34128. }
  34129. });
  34130. var offset = {
  34131. x: Math.round(points),
  34132. y: 0
  34133. };
  34134. return {
  34135. textList: textList,
  34136. offset: offset
  34137. };
  34138. }
  34139. function getCandleToolTipData(series, seriesData, opts, index, categories, extra) {
  34140. var option = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : {};
  34141. var calPoints = opts.chartData.calPoints;
  34142. var upColor = extra.color.upFill;
  34143. var downColor = extra.color.downFill;
  34144. //颜色顺序为开盘,收盘,最低,最高
  34145. var color = [upColor, upColor, downColor, upColor];
  34146. var textList = [];
  34147. seriesData.map(function (item) {
  34148. if (index == 0) {
  34149. if (item.data[1] - item.data[0] < 0) {
  34150. color[1] = downColor;
  34151. } else {
  34152. color[1] = upColor;
  34153. }
  34154. } else {
  34155. if (item.data[0] < series[index - 1][1]) {
  34156. color[0] = downColor;
  34157. }
  34158. if (item.data[1] < item.data[0]) {
  34159. color[1] = downColor;
  34160. }
  34161. if (item.data[2] > series[index - 1][1]) {
  34162. color[2] = upColor;
  34163. }
  34164. if (item.data[3] < series[index - 1][1]) {
  34165. color[3] = downColor;
  34166. }
  34167. }
  34168. var text1 = {
  34169. text: '开盘:' + item.data[0],
  34170. color: color[0]
  34171. };
  34172. var text2 = {
  34173. text: '收盘:' + item.data[1],
  34174. color: color[1]
  34175. };
  34176. var text3 = {
  34177. text: '最低:' + item.data[2],
  34178. color: color[2]
  34179. };
  34180. var text4 = {
  34181. text: '最高:' + item.data[3],
  34182. color: color[3]
  34183. };
  34184. textList.push(text1, text2, text3, text4);
  34185. });
  34186. var validCalPoints = [];
  34187. var offset = {
  34188. x: 0,
  34189. y: 0
  34190. };
  34191. for (var i = 0; i < calPoints.length; i++) {
  34192. var points = calPoints[i];
  34193. if (typeof points[index] !== 'undefined' && points[index] !== null) {
  34194. validCalPoints.push(points[index]);
  34195. }
  34196. }
  34197. offset.x = Math.round(validCalPoints[0][0].x);
  34198. return {
  34199. textList: textList,
  34200. offset: offset
  34201. };
  34202. }
  34203. function filterSeries(series) {
  34204. var tempSeries = [];
  34205. for (var i = 0; i < series.length; i++) {
  34206. if (series[i].show == true) {
  34207. tempSeries.push(series[i]);
  34208. }
  34209. }
  34210. return tempSeries;
  34211. }
  34212. function findCurrentIndex(currentPoints, calPoints, opts, config) {
  34213. var offset = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
  34214. var current = {
  34215. index: -1,
  34216. group: []
  34217. };
  34218. var spacing = opts.chartData.eachSpacing / 2;
  34219. var xAxisPoints = [];
  34220. if (calPoints && calPoints.length > 0) {
  34221. if (!opts.categories) {
  34222. spacing = 0;
  34223. } else {
  34224. for (var i = 1; i < opts.chartData.xAxisPoints.length; i++) {
  34225. xAxisPoints.push(opts.chartData.xAxisPoints[i] - spacing);
  34226. }
  34227. if ((opts.type == 'line' || opts.type == 'area') && opts.xAxis.boundaryGap == 'justify') {
  34228. xAxisPoints = opts.chartData.xAxisPoints;
  34229. }
  34230. }
  34231. if (isInExactChartArea(currentPoints, opts, config)) {
  34232. if (!opts.categories) {
  34233. var timePoints = Array(calPoints.length);
  34234. for (var _i2 = 0; _i2 < calPoints.length; _i2++) {
  34235. timePoints[_i2] = Array(calPoints[_i2].length);
  34236. for (var j = 0; j < calPoints[_i2].length; j++) {
  34237. timePoints[_i2][j] = Math.abs(calPoints[_i2][j].x - currentPoints.x);
  34238. }
  34239. }
  34240. ;
  34241. var pointValue = Array(timePoints.length);
  34242. var pointIndex = Array(timePoints.length);
  34243. for (var _i3 = 0; _i3 < timePoints.length; _i3++) {
  34244. pointValue[_i3] = Math.min.apply(null, timePoints[_i3]);
  34245. pointIndex[_i3] = timePoints[_i3].indexOf(pointValue[_i3]);
  34246. }
  34247. var minValue = Math.min.apply(null, pointValue);
  34248. current.index = [];
  34249. for (var _i4 = 0; _i4 < pointValue.length; _i4++) {
  34250. if (pointValue[_i4] == minValue) {
  34251. current.group.push(_i4);
  34252. current.index.push(pointIndex[_i4]);
  34253. }
  34254. }
  34255. ;
  34256. } else {
  34257. xAxisPoints.forEach(function (item, index) {
  34258. if (currentPoints.x + offset + spacing > item) {
  34259. current.index = index;
  34260. }
  34261. });
  34262. }
  34263. }
  34264. }
  34265. return current;
  34266. }
  34267. function findBarChartCurrentIndex(currentPoints, calPoints, opts, config) {
  34268. var offset = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
  34269. var current = {
  34270. index: -1,
  34271. group: []
  34272. };
  34273. var spacing = opts.chartData.eachSpacing / 2;
  34274. var yAxisPoints = opts.chartData.yAxisPoints;
  34275. if (calPoints && calPoints.length > 0) {
  34276. if (isInExactChartArea(currentPoints, opts, config)) {
  34277. yAxisPoints.forEach(function (item, index) {
  34278. if (currentPoints.y + offset + spacing > item) {
  34279. current.index = index;
  34280. }
  34281. });
  34282. }
  34283. }
  34284. return current;
  34285. }
  34286. function findLegendIndex(currentPoints, legendData, opts) {
  34287. var currentIndex = -1;
  34288. var gap = 0;
  34289. if (isInExactLegendArea(currentPoints, legendData.area)) {
  34290. var points = legendData.points;
  34291. var index = -1;
  34292. for (var i = 0, len = points.length; i < len; i++) {
  34293. var item = points[i];
  34294. for (var j = 0; j < item.length; j++) {
  34295. index += 1;
  34296. var area = item[j]['area'];
  34297. if (area && currentPoints.x > area[0] - gap && currentPoints.x < area[2] + gap && currentPoints.y > area[1] - gap && currentPoints.y < area[3] + gap) {
  34298. currentIndex = index;
  34299. break;
  34300. }
  34301. }
  34302. }
  34303. return currentIndex;
  34304. }
  34305. return currentIndex;
  34306. }
  34307. function isInExactLegendArea(currentPoints, area) {
  34308. return currentPoints.x > area.start.x && currentPoints.x < area.end.x && currentPoints.y > area.start.y && currentPoints.y < area.end.y;
  34309. }
  34310. function isInExactChartArea(currentPoints, opts, config) {
  34311. 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];
  34312. }
  34313. function findRadarChartCurrentIndex(currentPoints, radarData, count) {
  34314. var eachAngleArea = 2 * Math.PI / count;
  34315. var currentIndex = -1;
  34316. if (isInExactPieChartArea(currentPoints, radarData.center, radarData.radius)) {
  34317. var fixAngle = function fixAngle(angle) {
  34318. if (angle < 0) {
  34319. angle += 2 * Math.PI;
  34320. }
  34321. if (angle > 2 * Math.PI) {
  34322. angle -= 2 * Math.PI;
  34323. }
  34324. return angle;
  34325. };
  34326. var angle = Math.atan2(radarData.center.y - currentPoints.y, currentPoints.x - radarData.center.x);
  34327. angle = -1 * angle;
  34328. if (angle < 0) {
  34329. angle += 2 * Math.PI;
  34330. }
  34331. var angleList = radarData.angleList.map(function (item) {
  34332. item = fixAngle(-1 * item);
  34333. return item;
  34334. });
  34335. angleList.forEach(function (item, index) {
  34336. var rangeStart = fixAngle(item - eachAngleArea / 2);
  34337. var rangeEnd = fixAngle(item + eachAngleArea / 2);
  34338. if (rangeEnd < rangeStart) {
  34339. rangeEnd += 2 * Math.PI;
  34340. }
  34341. if (angle >= rangeStart && angle <= rangeEnd || angle + 2 * Math.PI >= rangeStart && angle + 2 * Math.PI <= rangeEnd) {
  34342. currentIndex = index;
  34343. }
  34344. });
  34345. }
  34346. return currentIndex;
  34347. }
  34348. function findFunnelChartCurrentIndex(currentPoints, funnelData) {
  34349. var currentIndex = -1;
  34350. for (var i = 0, len = funnelData.series.length; i < len; i++) {
  34351. var item = funnelData.series[i];
  34352. if (currentPoints.x > item.funnelArea[0] && currentPoints.x < item.funnelArea[2] && currentPoints.y > item.funnelArea[1] && currentPoints.y < item.funnelArea[3]) {
  34353. currentIndex = i;
  34354. break;
  34355. }
  34356. }
  34357. return currentIndex;
  34358. }
  34359. function findWordChartCurrentIndex(currentPoints, wordData) {
  34360. var currentIndex = -1;
  34361. for (var i = 0, len = wordData.length; i < len; i++) {
  34362. var item = wordData[i];
  34363. if (currentPoints.x > item.area[0] && currentPoints.x < item.area[2] && currentPoints.y > item.area[1] && currentPoints.y < item.area[3]) {
  34364. currentIndex = i;
  34365. break;
  34366. }
  34367. }
  34368. return currentIndex;
  34369. }
  34370. function findMapChartCurrentIndex(currentPoints, opts) {
  34371. var currentIndex = -1;
  34372. var cData = opts.chartData.mapData;
  34373. var data = opts.series;
  34374. var tmp = pointToCoordinate(currentPoints.y, currentPoints.x, cData.bounds, cData.scale, cData.xoffset, cData.yoffset);
  34375. var poi = [tmp.x, tmp.y];
  34376. for (var i = 0, len = data.length; i < len; i++) {
  34377. var item = data[i].geometry.coordinates;
  34378. if (isPoiWithinPoly(poi, item, opts.chartData.mapData.mercator)) {
  34379. currentIndex = i;
  34380. break;
  34381. }
  34382. }
  34383. return currentIndex;
  34384. }
  34385. function findRoseChartCurrentIndex(currentPoints, pieData, opts) {
  34386. var currentIndex = -1;
  34387. var series = getRoseDataPoints(opts._series_, opts.extra.rose.type, pieData.radius, pieData.radius);
  34388. if (pieData && pieData.center && isInExactPieChartArea(currentPoints, pieData.center, pieData.radius)) {
  34389. var angle = Math.atan2(pieData.center.y - currentPoints.y, currentPoints.x - pieData.center.x);
  34390. angle = -angle;
  34391. if (opts.extra.rose && opts.extra.rose.offsetAngle) {
  34392. angle = angle - opts.extra.rose.offsetAngle * Math.PI / 180;
  34393. }
  34394. for (var i = 0, len = series.length; i < len; i++) {
  34395. if (isInAngleRange(angle, series[i]._start_, series[i]._start_ + series[i]._rose_proportion_ * 2 * Math.PI)) {
  34396. currentIndex = i;
  34397. break;
  34398. }
  34399. }
  34400. }
  34401. return currentIndex;
  34402. }
  34403. function findPieChartCurrentIndex(currentPoints, pieData, opts) {
  34404. var currentIndex = -1;
  34405. var series = getPieDataPoints(pieData.series);
  34406. if (pieData && pieData.center && isInExactPieChartArea(currentPoints, pieData.center, pieData.radius)) {
  34407. var angle = Math.atan2(pieData.center.y - currentPoints.y, currentPoints.x - pieData.center.x);
  34408. angle = -angle;
  34409. if (opts.extra.pie && opts.extra.pie.offsetAngle) {
  34410. angle = angle - opts.extra.pie.offsetAngle * Math.PI / 180;
  34411. }
  34412. if (opts.extra.ring && opts.extra.ring.offsetAngle) {
  34413. angle = angle - opts.extra.ring.offsetAngle * Math.PI / 180;
  34414. }
  34415. for (var i = 0, len = series.length; i < len; i++) {
  34416. if (isInAngleRange(angle, series[i]._start_, series[i]._start_ + series[i]._proportion_ * 2 * Math.PI)) {
  34417. currentIndex = i;
  34418. break;
  34419. }
  34420. }
  34421. }
  34422. return currentIndex;
  34423. }
  34424. function isInExactPieChartArea(currentPoints, center, radius) {
  34425. return Math.pow(currentPoints.x - center.x, 2) + Math.pow(currentPoints.y - center.y, 2) <= Math.pow(radius, 2);
  34426. }
  34427. function splitPoints(points, eachSeries) {
  34428. var newPoints = [];
  34429. var items = [];
  34430. points.forEach(function (item, index) {
  34431. if (eachSeries.connectNulls) {
  34432. if (item !== null) {
  34433. items.push(item);
  34434. }
  34435. } else {
  34436. if (item !== null) {
  34437. items.push(item);
  34438. } else {
  34439. if (items.length) {
  34440. newPoints.push(items);
  34441. }
  34442. items = [];
  34443. }
  34444. }
  34445. });
  34446. if (items.length) {
  34447. newPoints.push(items);
  34448. }
  34449. return newPoints;
  34450. }
  34451. function calLegendData(series, opts, config, chartData, context) {
  34452. var legendData = {
  34453. area: {
  34454. start: {
  34455. x: 0,
  34456. y: 0
  34457. },
  34458. end: {
  34459. x: 0,
  34460. y: 0
  34461. },
  34462. width: 0,
  34463. height: 0,
  34464. wholeWidth: 0,
  34465. wholeHeight: 0
  34466. },
  34467. points: [],
  34468. widthArr: [],
  34469. heightArr: []
  34470. };
  34471. if (opts.legend.show === false) {
  34472. chartData.legendData = legendData;
  34473. return legendData;
  34474. }
  34475. var padding = opts.legend.padding * opts.pix;
  34476. var margin = opts.legend.margin * opts.pix;
  34477. var fontSize = opts.legend.fontSize ? opts.legend.fontSize * opts.pix : config.fontSize;
  34478. var shapeWidth = 15 * opts.pix;
  34479. var shapeRight = 5 * opts.pix;
  34480. var lineHeight = Math.max(opts.legend.lineHeight * opts.pix, fontSize);
  34481. if (opts.legend.position == 'top' || opts.legend.position == 'bottom') {
  34482. var legendList = [];
  34483. var widthCount = 0;
  34484. var widthCountArr = [];
  34485. var currentRow = [];
  34486. for (var i = 0; i < series.length; i++) {
  34487. var item = series[i];
  34488. var itemWidth = shapeWidth + shapeRight + measureText(item.name || 'undefined', fontSize, context) + opts.legend.itemGap * opts.pix;
  34489. if (widthCount + itemWidth > opts.width - opts.area[1] - opts.area[3]) {
  34490. legendList.push(currentRow);
  34491. widthCountArr.push(widthCount - opts.legend.itemGap * opts.pix);
  34492. widthCount = itemWidth;
  34493. currentRow = [item];
  34494. } else {
  34495. widthCount += itemWidth;
  34496. currentRow.push(item);
  34497. }
  34498. }
  34499. if (currentRow.length) {
  34500. legendList.push(currentRow);
  34501. widthCountArr.push(widthCount - opts.legend.itemGap * opts.pix);
  34502. legendData.widthArr = widthCountArr;
  34503. var legendWidth = Math.max.apply(null, widthCountArr);
  34504. switch (opts.legend.float) {
  34505. case 'left':
  34506. legendData.area.start.x = opts.area[3];
  34507. legendData.area.end.x = opts.area[3] + legendWidth + 2 * padding;
  34508. break;
  34509. case 'right':
  34510. legendData.area.start.x = opts.width - opts.area[1] - legendWidth - 2 * padding;
  34511. legendData.area.end.x = opts.width - opts.area[1];
  34512. break;
  34513. default:
  34514. legendData.area.start.x = (opts.width - legendWidth) / 2 - padding;
  34515. legendData.area.end.x = (opts.width + legendWidth) / 2 + padding;
  34516. }
  34517. legendData.area.width = legendWidth + 2 * padding;
  34518. legendData.area.wholeWidth = legendWidth + 2 * padding;
  34519. legendData.area.height = legendList.length * lineHeight + 2 * padding;
  34520. legendData.area.wholeHeight = legendList.length * lineHeight + 2 * padding + 2 * margin;
  34521. legendData.points = legendList;
  34522. }
  34523. } else {
  34524. var len = series.length;
  34525. var maxHeight = opts.height - opts.area[0] - opts.area[2] - 2 * margin - 2 * padding;
  34526. var maxLength = Math.min(Math.floor(maxHeight / lineHeight), len);
  34527. legendData.area.height = maxLength * lineHeight + padding * 2;
  34528. legendData.area.wholeHeight = maxLength * lineHeight + padding * 2;
  34529. switch (opts.legend.float) {
  34530. case 'top':
  34531. legendData.area.start.y = opts.area[0] + margin;
  34532. legendData.area.end.y = opts.area[0] + margin + legendData.area.height;
  34533. break;
  34534. case 'bottom':
  34535. legendData.area.start.y = opts.height - opts.area[2] - margin - legendData.area.height;
  34536. legendData.area.end.y = opts.height - opts.area[2] - margin;
  34537. break;
  34538. default:
  34539. legendData.area.start.y = (opts.height - legendData.area.height) / 2;
  34540. legendData.area.end.y = (opts.height + legendData.area.height) / 2;
  34541. }
  34542. var lineNum = len % maxLength === 0 ? len / maxLength : Math.floor(len / maxLength + 1);
  34543. var _currentRow = [];
  34544. for (var _i5 = 0; _i5 < lineNum; _i5++) {
  34545. var temp = series.slice(_i5 * maxLength, _i5 * maxLength + maxLength);
  34546. _currentRow.push(temp);
  34547. }
  34548. legendData.points = _currentRow;
  34549. if (_currentRow.length) {
  34550. for (var _i6 = 0; _i6 < _currentRow.length; _i6++) {
  34551. var _item = _currentRow[_i6];
  34552. var maxWidth = 0;
  34553. for (var j = 0; j < _item.length; j++) {
  34554. var _itemWidth = shapeWidth + shapeRight + measureText(_item[j].name || 'undefined', fontSize, context) + opts.legend.itemGap * opts.pix;
  34555. if (_itemWidth > maxWidth) {
  34556. maxWidth = _itemWidth;
  34557. }
  34558. }
  34559. legendData.widthArr.push(maxWidth);
  34560. legendData.heightArr.push(_item.length * lineHeight + padding * 2);
  34561. }
  34562. var _legendWidth = 0;
  34563. for (var _i7 = 0; _i7 < legendData.widthArr.length; _i7++) {
  34564. _legendWidth += legendData.widthArr[_i7];
  34565. }
  34566. legendData.area.width = _legendWidth - opts.legend.itemGap * opts.pix + 2 * padding;
  34567. legendData.area.wholeWidth = legendData.area.width + padding;
  34568. }
  34569. }
  34570. switch (opts.legend.position) {
  34571. case 'top':
  34572. legendData.area.start.y = opts.area[0] + margin;
  34573. legendData.area.end.y = opts.area[0] + margin + legendData.area.height;
  34574. break;
  34575. case 'bottom':
  34576. legendData.area.start.y = opts.height - opts.area[2] - legendData.area.height - margin;
  34577. legendData.area.end.y = opts.height - opts.area[2] - margin;
  34578. break;
  34579. case 'left':
  34580. legendData.area.start.x = opts.area[3];
  34581. legendData.area.end.x = opts.area[3] + legendData.area.width;
  34582. break;
  34583. case 'right':
  34584. legendData.area.start.x = opts.width - opts.area[1] - legendData.area.width;
  34585. legendData.area.end.x = opts.width - opts.area[1];
  34586. break;
  34587. }
  34588. chartData.legendData = legendData;
  34589. return legendData;
  34590. }
  34591. function calCategoriesData(categories, opts, config, eachSpacing, context) {
  34592. var result = {
  34593. angle: 0,
  34594. xAxisHeight: config.xAxisHeight
  34595. };
  34596. var categoriesTextLenth = categories.map(function (item) {
  34597. return measureText(item, opts.xAxis.fontSize * opts.pix || config.fontSize, context);
  34598. });
  34599. var maxTextLength = Math.max.apply(this, categoriesTextLenth);
  34600. if (opts.xAxis.rotateLabel == true && maxTextLength + 2 * config.xAxisTextPadding > eachSpacing) {
  34601. result.angle = 45 * Math.PI / 180;
  34602. result.xAxisHeight = 2 * config.xAxisTextPadding + maxTextLength * Math.sin(result.angle);
  34603. }
  34604. return result;
  34605. }
  34606. function getXAxisTextList(series, opts, config, stack) {
  34607. var index = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : -1;
  34608. var data;
  34609. if (stack == 'stack') {
  34610. data = dataCombineStack(series, opts.categories.length);
  34611. } else {
  34612. data = dataCombine(series);
  34613. }
  34614. var sorted = [];
  34615. // remove null from data
  34616. data = data.filter(function (item) {
  34617. //return item !== null;
  34618. if ((0, _typeof2.default)(item) === 'object' && item !== null) {
  34619. if (item.constructor.toString().indexOf('Array') > -1) {
  34620. return item !== null;
  34621. } else {
  34622. return item.value !== null;
  34623. }
  34624. } else {
  34625. return item !== null;
  34626. }
  34627. });
  34628. data.map(function (item) {
  34629. if ((0, _typeof2.default)(item) === 'object') {
  34630. if (item.constructor.toString().indexOf('Array') > -1) {
  34631. if (opts.type == 'candle') {
  34632. item.map(function (subitem) {
  34633. sorted.push(subitem);
  34634. });
  34635. } else {
  34636. sorted.push(item[0]);
  34637. }
  34638. } else {
  34639. sorted.push(item.value);
  34640. }
  34641. } else {
  34642. sorted.push(item);
  34643. }
  34644. });
  34645. var minData = 0;
  34646. var maxData = 0;
  34647. if (sorted.length > 0) {
  34648. minData = Math.min.apply(this, sorted);
  34649. maxData = Math.max.apply(this, sorted);
  34650. }
  34651. //为了兼容v1.9.0之前的项目
  34652. if (index > -1) {
  34653. if (typeof opts.xAxis.data[index].min === 'number') {
  34654. minData = Math.min(opts.xAxis.data[index].min, minData);
  34655. }
  34656. if (typeof opts.xAxis.data[index].max === 'number') {
  34657. maxData = Math.max(opts.xAxis.data[index].max, maxData);
  34658. }
  34659. } else {
  34660. if (typeof opts.xAxis.min === 'number') {
  34661. minData = Math.min(opts.xAxis.min, minData);
  34662. }
  34663. if (typeof opts.xAxis.max === 'number') {
  34664. maxData = Math.max(opts.xAxis.max, maxData);
  34665. }
  34666. }
  34667. if (minData === maxData) {
  34668. var rangeSpan = maxData || 10;
  34669. maxData += rangeSpan;
  34670. }
  34671. //var dataRange = getDataRange(minData, maxData);
  34672. var minRange = minData;
  34673. var maxRange = maxData;
  34674. var range = [];
  34675. var eachRange = (maxRange - minRange) / opts.xAxis.splitNumber;
  34676. for (var i = 0; i <= opts.xAxis.splitNumber; i++) {
  34677. range.push(minRange + eachRange * i);
  34678. }
  34679. return range;
  34680. }
  34681. function calXAxisData(series, opts, config, context) {
  34682. //堆叠图重算Y轴
  34683. var columnstyle = assign({}, {
  34684. type: ""
  34685. }, opts.extra.bar);
  34686. var result = {
  34687. angle: 0,
  34688. xAxisHeight: config.xAxisHeight
  34689. };
  34690. result.ranges = getXAxisTextList(series, opts, config, columnstyle.type);
  34691. result.rangesFormat = result.ranges.map(function (item) {
  34692. //item = opts.xAxis.formatter ? opts.xAxis.formatter(item) : util.toFixed(item, 2);
  34693. item = util.toFixed(item, 2);
  34694. return item;
  34695. });
  34696. var xAxisScaleValues = result.ranges.map(function (item) {
  34697. // 如果刻度值是浮点数,则保留两位小数
  34698. item = util.toFixed(item, 2);
  34699. // 若有自定义格式则调用自定义的格式化函数
  34700. //item = opts.xAxis.formatter ? opts.xAxis.formatter(Number(item)) : item;
  34701. return item;
  34702. });
  34703. result = Object.assign(result, getXAxisPoints(xAxisScaleValues, opts, config));
  34704. // 计算X轴刻度的属性譬如每个刻度的间隔,刻度的起始点\结束点以及总长
  34705. var eachSpacing = result.eachSpacing;
  34706. var textLength = xAxisScaleValues.map(function (item) {
  34707. return measureText(item, opts.xAxis.fontSize * opts.pix || config.fontSize, context);
  34708. });
  34709. // get max length of categories text
  34710. var maxTextLength = Math.max.apply(this, textLength);
  34711. // 如果刻度值文本内容过长,则将其逆时针旋转45°
  34712. if (maxTextLength + 2 * config.xAxisTextPadding > eachSpacing) {
  34713. result.angle = 45 * Math.PI / 180;
  34714. result.xAxisHeight = 2 * config.xAxisTextPadding + maxTextLength * Math.sin(result.angle);
  34715. }
  34716. if (opts.xAxis.disabled === true) {
  34717. result.xAxisHeight = 0;
  34718. }
  34719. return result;
  34720. }
  34721. function getRadarDataPoints(angleList, center, radius, series, opts) {
  34722. var process = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 1;
  34723. var radarOption = opts.extra.radar || {};
  34724. radarOption.max = radarOption.max || 0;
  34725. var maxData = Math.max(radarOption.max, Math.max.apply(null, dataCombine(series)));
  34726. var data = [];
  34727. var _loop2 = function _loop2(i) {
  34728. var each = series[i];
  34729. var listItem = {};
  34730. listItem.color = each.color;
  34731. listItem.legendShape = each.legendShape;
  34732. listItem.pointShape = each.pointShape;
  34733. listItem.data = [];
  34734. each.data.forEach(function (item, index) {
  34735. var tmp = {};
  34736. tmp.angle = angleList[index];
  34737. tmp.proportion = item / maxData;
  34738. tmp.value = item;
  34739. tmp.position = convertCoordinateOrigin(radius * tmp.proportion * process * Math.cos(tmp.angle), radius * tmp.proportion * process * Math.sin(tmp.angle), center);
  34740. listItem.data.push(tmp);
  34741. });
  34742. data.push(listItem);
  34743. };
  34744. for (var i = 0; i < series.length; i++) {
  34745. _loop2(i);
  34746. }
  34747. return data;
  34748. }
  34749. function getPieDataPoints(series, radius) {
  34750. var process = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
  34751. var count = 0;
  34752. var _start_ = 0;
  34753. for (var i = 0; i < series.length; i++) {
  34754. var item = series[i];
  34755. item.data = item.data === null ? 0 : item.data;
  34756. count += item.data;
  34757. }
  34758. for (var _i8 = 0; _i8 < series.length; _i8++) {
  34759. var _item2 = series[_i8];
  34760. _item2.data = _item2.data === null ? 0 : _item2.data;
  34761. if (count === 0) {
  34762. _item2._proportion_ = 1 / series.length * process;
  34763. } else {
  34764. _item2._proportion_ = _item2.data / count * process;
  34765. }
  34766. _item2._radius_ = radius;
  34767. }
  34768. for (var _i9 = 0; _i9 < series.length; _i9++) {
  34769. var _item3 = series[_i9];
  34770. _item3._start_ = _start_;
  34771. _start_ += 2 * _item3._proportion_ * Math.PI;
  34772. }
  34773. return series;
  34774. }
  34775. function getFunnelDataPoints(series, radius, type, eachSpacing) {
  34776. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  34777. series = series.sort(function (a, b) {
  34778. return parseInt(b.data) - parseInt(a.data);
  34779. });
  34780. for (var i = 0; i < series.length; i++) {
  34781. if (type == 'funnel') {
  34782. series[i].radius = series[i].data / series[0].data * radius * process;
  34783. } else {
  34784. series[i].radius = eachSpacing * (series.length - i) / (eachSpacing * series.length) * radius * process;
  34785. }
  34786. series[i]._proportion_ = series[i].data / series[0].data;
  34787. }
  34788. if (type !== 'pyramid') {
  34789. series.reverse();
  34790. }
  34791. return series;
  34792. }
  34793. function getRoseDataPoints(series, type, minRadius, radius) {
  34794. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  34795. var count = 0;
  34796. var _start_ = 0;
  34797. var dataArr = [];
  34798. for (var i = 0; i < series.length; i++) {
  34799. var item = series[i];
  34800. item.data = item.data === null ? 0 : item.data;
  34801. count += item.data;
  34802. dataArr.push(item.data);
  34803. }
  34804. var minData = Math.min.apply(null, dataArr);
  34805. var maxData = Math.max.apply(null, dataArr);
  34806. var radiusLength = radius - minRadius;
  34807. for (var _i10 = 0; _i10 < series.length; _i10++) {
  34808. var _item4 = series[_i10];
  34809. _item4.data = _item4.data === null ? 0 : _item4.data;
  34810. if (count === 0) {
  34811. _item4._proportion_ = 1 / series.length * process;
  34812. _item4._rose_proportion_ = 1 / series.length * process;
  34813. } else {
  34814. _item4._proportion_ = _item4.data / count * process;
  34815. if (type == 'area') {
  34816. _item4._rose_proportion_ = 1 / series.length * process;
  34817. } else {
  34818. _item4._rose_proportion_ = _item4.data / count * process;
  34819. }
  34820. }
  34821. _item4._radius_ = minRadius + radiusLength * ((_item4.data - minData) / (maxData - minData)) || radius;
  34822. }
  34823. for (var _i11 = 0; _i11 < series.length; _i11++) {
  34824. var _item5 = series[_i11];
  34825. _item5._start_ = _start_;
  34826. _start_ += 2 * _item5._rose_proportion_ * Math.PI;
  34827. }
  34828. return series;
  34829. }
  34830. function getArcbarDataPoints(series, arcbarOption) {
  34831. var process = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
  34832. if (process == 1) {
  34833. process = 0.999999;
  34834. }
  34835. for (var i = 0; i < series.length; i++) {
  34836. var item = series[i];
  34837. item.data = item.data === null ? 0 : item.data;
  34838. var totalAngle = void 0;
  34839. if (arcbarOption.type == 'circle') {
  34840. totalAngle = 2;
  34841. } else {
  34842. if (arcbarOption.endAngle < arcbarOption.startAngle) {
  34843. totalAngle = 2 + arcbarOption.endAngle - arcbarOption.startAngle;
  34844. } else {
  34845. totalAngle = arcbarOption.startAngle - arcbarOption.endAngle;
  34846. }
  34847. }
  34848. item._proportion_ = totalAngle * item.data * process + arcbarOption.startAngle;
  34849. if (item._proportion_ >= 2) {
  34850. item._proportion_ = item._proportion_ % 2;
  34851. }
  34852. }
  34853. return series;
  34854. }
  34855. function getGaugeAxisPoints(categories, startAngle, endAngle) {
  34856. var totalAngle = startAngle - endAngle + 1;
  34857. var tempStartAngle = startAngle;
  34858. for (var i = 0; i < categories.length; i++) {
  34859. categories[i].value = categories[i].value === null ? 0 : categories[i].value;
  34860. categories[i]._startAngle_ = tempStartAngle;
  34861. categories[i]._endAngle_ = totalAngle * categories[i].value + startAngle;
  34862. if (categories[i]._endAngle_ >= 2) {
  34863. categories[i]._endAngle_ = categories[i]._endAngle_ % 2;
  34864. }
  34865. tempStartAngle = categories[i]._endAngle_;
  34866. }
  34867. return categories;
  34868. }
  34869. function getGaugeDataPoints(series, categories, gaugeOption) {
  34870. var process = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
  34871. for (var i = 0; i < series.length; i++) {
  34872. var item = series[i];
  34873. item.data = item.data === null ? 0 : item.data;
  34874. if (gaugeOption.pointer.color == 'auto') {
  34875. for (var _i12 = 0; _i12 < categories.length; _i12++) {
  34876. if (item.data <= categories[_i12].value) {
  34877. item.color = categories[_i12].color;
  34878. break;
  34879. }
  34880. }
  34881. } else {
  34882. item.color = gaugeOption.pointer.color;
  34883. }
  34884. var totalAngle = gaugeOption.startAngle - gaugeOption.endAngle + 1;
  34885. item._endAngle_ = totalAngle * item.data + gaugeOption.startAngle;
  34886. item._oldAngle_ = gaugeOption.oldAngle;
  34887. if (gaugeOption.oldAngle < gaugeOption.endAngle) {
  34888. item._oldAngle_ += 2;
  34889. }
  34890. if (item.data >= gaugeOption.oldData) {
  34891. item._proportion_ = (item._endAngle_ - item._oldAngle_) * process + gaugeOption.oldAngle;
  34892. } else {
  34893. item._proportion_ = item._oldAngle_ - (item._oldAngle_ - item._endAngle_) * process;
  34894. }
  34895. if (item._proportion_ >= 2) {
  34896. item._proportion_ = item._proportion_ % 2;
  34897. }
  34898. }
  34899. return series;
  34900. }
  34901. function getPieTextMaxLength(series, config, context, opts) {
  34902. series = getPieDataPoints(series);
  34903. var maxLength = 0;
  34904. for (var i = 0; i < series.length; i++) {
  34905. var item = series[i];
  34906. var text = item.formatter ? item.formatter(+item._proportion_.toFixed(2)) : util.toFixed(item._proportion_ * 100) + '%';
  34907. maxLength = Math.max(maxLength, measureText(text, item.textSize * opts.pix || config.fontSize, context));
  34908. }
  34909. return maxLength;
  34910. }
  34911. function fixColumeData(points, eachSpacing, columnLen, index, config, opts) {
  34912. return points.map(function (item) {
  34913. if (item === null) {
  34914. return null;
  34915. }
  34916. var seriesGap = 0;
  34917. var categoryGap = 0;
  34918. if (opts.type == 'mix') {
  34919. seriesGap = opts.extra.mix.column.seriesGap * opts.pix || 0;
  34920. categoryGap = opts.extra.mix.column.categoryGap * opts.pix || 0;
  34921. } else {
  34922. seriesGap = opts.extra.column.seriesGap * opts.pix || 0;
  34923. categoryGap = opts.extra.column.categoryGap * opts.pix || 0;
  34924. }
  34925. seriesGap = Math.min(seriesGap, eachSpacing / columnLen);
  34926. categoryGap = Math.min(categoryGap, eachSpacing / columnLen);
  34927. item.width = Math.ceil((eachSpacing - 2 * categoryGap - seriesGap * (columnLen - 1)) / columnLen);
  34928. if (opts.extra.mix && opts.extra.mix.column.width && +opts.extra.mix.column.width > 0) {
  34929. item.width = Math.min(item.width, +opts.extra.mix.column.width * opts.pix);
  34930. }
  34931. if (opts.extra.column && opts.extra.column.width && +opts.extra.column.width > 0) {
  34932. item.width = Math.min(item.width, +opts.extra.column.width * opts.pix);
  34933. }
  34934. if (item.width <= 0) {
  34935. item.width = 1;
  34936. }
  34937. item.x += (index + 0.5 - columnLen / 2) * (item.width + seriesGap);
  34938. return item;
  34939. });
  34940. }
  34941. function fixBarData(points, eachSpacing, columnLen, index, config, opts) {
  34942. return points.map(function (item) {
  34943. if (item === null) {
  34944. return null;
  34945. }
  34946. var seriesGap = 0;
  34947. var categoryGap = 0;
  34948. seriesGap = opts.extra.bar.seriesGap * opts.pix || 0;
  34949. categoryGap = opts.extra.bar.categoryGap * opts.pix || 0;
  34950. seriesGap = Math.min(seriesGap, eachSpacing / columnLen);
  34951. categoryGap = Math.min(categoryGap, eachSpacing / columnLen);
  34952. item.width = Math.ceil((eachSpacing - 2 * categoryGap - seriesGap * (columnLen - 1)) / columnLen);
  34953. if (opts.extra.bar && opts.extra.bar.width && +opts.extra.bar.width > 0) {
  34954. item.width = Math.min(item.width, +opts.extra.bar.width * opts.pix);
  34955. }
  34956. if (item.width <= 0) {
  34957. item.width = 1;
  34958. }
  34959. item.y += (index + 0.5 - columnLen / 2) * (item.width + seriesGap);
  34960. return item;
  34961. });
  34962. }
  34963. function fixColumeMeterData(points, eachSpacing, columnLen, index, config, opts, border) {
  34964. var categoryGap = opts.extra.column.categoryGap * opts.pix || 0;
  34965. return points.map(function (item) {
  34966. if (item === null) {
  34967. return null;
  34968. }
  34969. item.width = Math.ceil(eachSpacing - 2 * categoryGap);
  34970. if (opts.extra.column && opts.extra.column.width && +opts.extra.column.width > 0) {
  34971. item.width = Math.min(item.width, +opts.extra.column.width * opts.pix);
  34972. }
  34973. if (index > 0) {
  34974. item.width -= 2 * border;
  34975. }
  34976. return item;
  34977. });
  34978. }
  34979. function fixColumeStackData(points, eachSpacing, columnLen, index, config, opts, series) {
  34980. var categoryGap = opts.extra.column.categoryGap * opts.pix || 0;
  34981. return points.map(function (item, indexn) {
  34982. if (item === null) {
  34983. return null;
  34984. }
  34985. item.width = Math.ceil(eachSpacing - 2 * categoryGap);
  34986. if (opts.extra.column && opts.extra.column.width && +opts.extra.column.width > 0) {
  34987. item.width = Math.min(item.width, +opts.extra.column.width * opts.pix);
  34988. }
  34989. if (item.width <= 0) {
  34990. item.width = 1;
  34991. }
  34992. return item;
  34993. });
  34994. }
  34995. function fixBarStackData(points, eachSpacing, columnLen, index, config, opts, series) {
  34996. var categoryGap = opts.extra.bar.categoryGap * opts.pix || 0;
  34997. return points.map(function (item, indexn) {
  34998. if (item === null) {
  34999. return null;
  35000. }
  35001. item.width = Math.ceil(eachSpacing - 2 * categoryGap);
  35002. if (opts.extra.bar && opts.extra.bar.width && +opts.extra.bar.width > 0) {
  35003. item.width = Math.min(item.width, +opts.extra.bar.width * opts.pix);
  35004. }
  35005. if (item.width <= 0) {
  35006. item.width = 1;
  35007. }
  35008. return item;
  35009. });
  35010. }
  35011. function getXAxisPoints(categories, opts, config) {
  35012. var spacingValid = opts.width - opts.area[1] - opts.area[3];
  35013. var dataCount = opts.enableScroll ? Math.min(opts.xAxis.itemCount, categories.length) : categories.length;
  35014. if ((opts.type == 'line' || opts.type == 'area' || opts.type == 'scatter' || opts.type == 'bubble' || opts.type == 'bar') && dataCount > 1 && opts.xAxis.boundaryGap == 'justify') {
  35015. dataCount -= 1;
  35016. }
  35017. var eachSpacing = spacingValid / dataCount;
  35018. var xAxisPoints = [];
  35019. var startX = opts.area[3];
  35020. var endX = opts.width - opts.area[1];
  35021. categories.forEach(function (item, index) {
  35022. xAxisPoints.push(startX + index * eachSpacing);
  35023. });
  35024. if (opts.xAxis.boundaryGap !== 'justify') {
  35025. if (opts.enableScroll === true) {
  35026. xAxisPoints.push(startX + categories.length * eachSpacing);
  35027. } else {
  35028. xAxisPoints.push(endX);
  35029. }
  35030. }
  35031. return {
  35032. xAxisPoints: xAxisPoints,
  35033. startX: startX,
  35034. endX: endX,
  35035. eachSpacing: eachSpacing
  35036. };
  35037. }
  35038. function getCandleDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config) {
  35039. var process = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 1;
  35040. var points = [];
  35041. var validHeight = opts.height - opts.area[0] - opts.area[2];
  35042. data.forEach(function (item, index) {
  35043. if (item === null) {
  35044. points.push(null);
  35045. } else {
  35046. var cPoints = [];
  35047. item.forEach(function (items, indexs) {
  35048. var point = {};
  35049. point.x = xAxisPoints[index] + Math.round(eachSpacing / 2);
  35050. var value = items.value || items;
  35051. var height = validHeight * (value - minRange) / (maxRange - minRange);
  35052. height *= process;
  35053. point.y = opts.height - Math.round(height) - opts.area[2];
  35054. cPoints.push(point);
  35055. });
  35056. points.push(cPoints);
  35057. }
  35058. });
  35059. return points;
  35060. }
  35061. function getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config) {
  35062. var process = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 1;
  35063. var boundaryGap = 'center';
  35064. if (opts.type == 'line' || opts.type == 'area' || opts.type == 'scatter' || opts.type == 'bubble') {
  35065. boundaryGap = opts.xAxis.boundaryGap;
  35066. }
  35067. var points = [];
  35068. var validHeight = opts.height - opts.area[0] - opts.area[2];
  35069. var validWidth = opts.width - opts.area[1] - opts.area[3];
  35070. data.forEach(function (item, index) {
  35071. if (item === null) {
  35072. points.push(null);
  35073. } else {
  35074. var point = {};
  35075. point.color = item.color;
  35076. point.x = xAxisPoints[index];
  35077. var value = item;
  35078. if ((0, _typeof2.default)(item) === 'object' && item !== null) {
  35079. if (item.constructor.toString().indexOf('Array') > -1) {
  35080. var xranges, xminRange, xmaxRange;
  35081. xranges = [].concat(opts.chartData.xAxisData.ranges);
  35082. xminRange = xranges.shift();
  35083. xmaxRange = xranges.pop();
  35084. value = item[1];
  35085. point.x = opts.area[3] + validWidth * (item[0] - xminRange) / (xmaxRange - xminRange);
  35086. if (opts.type == 'bubble') {
  35087. point.r = item[2];
  35088. point.t = item[3];
  35089. }
  35090. } else {
  35091. value = item.value;
  35092. }
  35093. }
  35094. if (boundaryGap == 'center') {
  35095. point.x += eachSpacing / 2;
  35096. }
  35097. var height = validHeight * (value - minRange) / (maxRange - minRange);
  35098. height *= process;
  35099. point.y = opts.height - height - opts.area[2];
  35100. points.push(point);
  35101. }
  35102. });
  35103. return points;
  35104. }
  35105. function getBarDataPoints(data, minRange, maxRange, yAxisPoints, eachSpacing, opts, config) {
  35106. var process = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 1;
  35107. var points = [];
  35108. var validHeight = opts.height - opts.area[0] - opts.area[2];
  35109. var validWidth = opts.width - opts.area[1] - opts.area[3];
  35110. data.forEach(function (item, index) {
  35111. if (item === null) {
  35112. points.push(null);
  35113. } else {
  35114. var point = {};
  35115. point.color = item.color;
  35116. point.y = yAxisPoints[index];
  35117. var value = item;
  35118. if ((0, _typeof2.default)(item) === 'object' && item !== null) {
  35119. value = item.value;
  35120. }
  35121. var height = validWidth * (value - minRange) / (maxRange - minRange);
  35122. height *= process;
  35123. point.height = height;
  35124. point.value = value;
  35125. point.x = height + opts.area[3];
  35126. points.push(point);
  35127. }
  35128. });
  35129. return points;
  35130. }
  35131. function getStackDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, seriesIndex, stackSeries) {
  35132. var process = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : 1;
  35133. var points = [];
  35134. var validHeight = opts.height - opts.area[0] - opts.area[2];
  35135. data.forEach(function (item, index) {
  35136. if (item === null) {
  35137. points.push(null);
  35138. } else {
  35139. var point = {};
  35140. point.color = item.color;
  35141. point.x = xAxisPoints[index] + Math.round(eachSpacing / 2);
  35142. if (seriesIndex > 0) {
  35143. var value = 0;
  35144. for (var i = 0; i <= seriesIndex; i++) {
  35145. value += stackSeries[i].data[index];
  35146. }
  35147. var value0 = value - item;
  35148. var height = validHeight * (value - minRange) / (maxRange - minRange);
  35149. var height0 = validHeight * (value0 - minRange) / (maxRange - minRange);
  35150. } else {
  35151. var value = item;
  35152. var height = validHeight * (value - minRange) / (maxRange - minRange);
  35153. var height0 = 0;
  35154. }
  35155. var heightc = height0;
  35156. height *= process;
  35157. heightc *= process;
  35158. point.y = opts.height - Math.round(height) - opts.area[2];
  35159. point.y0 = opts.height - Math.round(heightc) - opts.area[2];
  35160. points.push(point);
  35161. }
  35162. });
  35163. return points;
  35164. }
  35165. function getBarStackDataPoints(data, minRange, maxRange, yAxisPoints, eachSpacing, opts, config, seriesIndex, stackSeries) {
  35166. var process = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : 1;
  35167. var points = [];
  35168. var validHeight = opts.width - opts.area[1] - opts.area[3];
  35169. data.forEach(function (item, index) {
  35170. if (item === null) {
  35171. points.push(null);
  35172. } else {
  35173. var point = {};
  35174. point.color = item.color;
  35175. point.y = yAxisPoints[index];
  35176. if (seriesIndex > 0) {
  35177. var value = 0;
  35178. for (var i = 0; i <= seriesIndex; i++) {
  35179. value += stackSeries[i].data[index];
  35180. }
  35181. var value0 = value - item;
  35182. var height = validHeight * (value - minRange) / (maxRange - minRange);
  35183. var height0 = validHeight * (value0 - minRange) / (maxRange - minRange);
  35184. } else {
  35185. var value = item;
  35186. var height = validHeight * (value - minRange) / (maxRange - minRange);
  35187. var height0 = 0;
  35188. }
  35189. var heightc = height0;
  35190. height *= process;
  35191. heightc *= process;
  35192. point.height = height - heightc;
  35193. point.x = opts.area[3] + height;
  35194. point.x0 = opts.area[3] + heightc;
  35195. points.push(point);
  35196. }
  35197. });
  35198. return points;
  35199. }
  35200. function getYAxisTextList(series, opts, config, stack, yData) {
  35201. var index = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : -1;
  35202. var data;
  35203. if (stack == 'stack') {
  35204. data = dataCombineStack(series, opts.categories.length);
  35205. } else {
  35206. data = dataCombine(series);
  35207. }
  35208. var sorted = [];
  35209. // remove null from data
  35210. data = data.filter(function (item) {
  35211. //return item !== null;
  35212. if ((0, _typeof2.default)(item) === 'object' && item !== null) {
  35213. if (item.constructor.toString().indexOf('Array') > -1) {
  35214. return item !== null;
  35215. } else {
  35216. return item.value !== null;
  35217. }
  35218. } else {
  35219. return item !== null;
  35220. }
  35221. });
  35222. data.map(function (item) {
  35223. if ((0, _typeof2.default)(item) === 'object') {
  35224. if (item.constructor.toString().indexOf('Array') > -1) {
  35225. if (opts.type == 'candle') {
  35226. item.map(function (subitem) {
  35227. sorted.push(subitem);
  35228. });
  35229. } else {
  35230. sorted.push(item[1]);
  35231. }
  35232. } else {
  35233. sorted.push(item.value);
  35234. }
  35235. } else {
  35236. sorted.push(item);
  35237. }
  35238. });
  35239. var minData = yData.min || 0;
  35240. var maxData = yData.max || 0;
  35241. if (sorted.length > 0) {
  35242. minData = Math.min.apply(this, sorted);
  35243. maxData = Math.max.apply(this, sorted);
  35244. }
  35245. //为了兼容v1.9.0之前的项目
  35246. // if (index > -1) {
  35247. // if (typeof opts.yAxis.data[index].min === 'number') {
  35248. // minData = Math.min(opts.yAxis.data[index].min, minData);
  35249. // }
  35250. // if (typeof opts.yAxis.data[index].max === 'number') {
  35251. // maxData = Math.max(opts.yAxis.data[index].max, maxData);
  35252. // }
  35253. // } else {
  35254. // if (typeof opts.yAxis.min === 'number') {
  35255. // minData = Math.min(opts.yAxis.min, minData);
  35256. // }
  35257. // if (typeof opts.yAxis.max === 'number') {
  35258. // maxData = Math.max(opts.yAxis.max, maxData);
  35259. // }
  35260. // }
  35261. if (minData === maxData) {
  35262. var rangeSpan = maxData || 10;
  35263. maxData += rangeSpan;
  35264. }
  35265. var dataRange = getDataRange(minData, maxData);
  35266. var minRange = yData.min === undefined || yData.min === null ? dataRange.minRange : yData.min;
  35267. var maxRange = yData.max === undefined || yData.min === null ? dataRange.maxRange : yData.max;
  35268. var range = [];
  35269. var eachRange = (maxRange - minRange) / opts.yAxis.splitNumber;
  35270. for (var i = 0; i <= opts.yAxis.splitNumber; i++) {
  35271. range.push(minRange + eachRange * i);
  35272. }
  35273. return range.reverse();
  35274. }
  35275. function calYAxisData(series, opts, config, context) {
  35276. //堆叠图重算Y轴
  35277. var columnstyle = assign({}, {
  35278. type: ""
  35279. }, opts.extra.column);
  35280. //如果是多Y轴,重新计算
  35281. var YLength = opts.yAxis.data.length;
  35282. var newSeries = new Array(YLength);
  35283. if (YLength > 0) {
  35284. for (var i = 0; i < YLength; i++) {
  35285. newSeries[i] = [];
  35286. for (var j = 0; j < series.length; j++) {
  35287. if (series[j].index == i) {
  35288. newSeries[i].push(series[j]);
  35289. }
  35290. }
  35291. }
  35292. var rangesArr = new Array(YLength);
  35293. var rangesFormatArr = new Array(YLength);
  35294. var yAxisWidthArr = new Array(YLength);
  35295. var _loop3 = function _loop3(_i13) {
  35296. var yData = opts.yAxis.data[_i13];
  35297. //如果总开关不显示,强制每个Y轴为不显示
  35298. if (opts.yAxis.disabled == true) {
  35299. yData.disabled = true;
  35300. }
  35301. if (yData.type === 'categories') {
  35302. if (!yData.formatter) {
  35303. yData.formatter = function (val) {
  35304. return val + (yData.unit || '');
  35305. };
  35306. }
  35307. yData.categories = yData.categories || opts.categories;
  35308. rangesArr[_i13] = yData.categories;
  35309. } else {
  35310. if (!yData.formatter) {
  35311. yData.formatter = function (val) {
  35312. return val.toFixed(yData.tofix) + (yData.unit || '');
  35313. };
  35314. }
  35315. rangesArr[_i13] = getYAxisTextList(newSeries[_i13], opts, config, columnstyle.type, yData, _i13);
  35316. }
  35317. var yAxisFontSizes = yData.fontSize * opts.pix || config.fontSize;
  35318. yAxisWidthArr[_i13] = {
  35319. position: yData.position ? yData.position : 'left',
  35320. width: 0
  35321. };
  35322. rangesFormatArr[_i13] = rangesArr[_i13].map(function (items) {
  35323. items = yData.formatter(items);
  35324. yAxisWidthArr[_i13].width = Math.max(yAxisWidthArr[_i13].width, measureText(items, yAxisFontSizes, context) + 5);
  35325. return items;
  35326. });
  35327. var calibration = yData.calibration ? 4 * opts.pix : 0;
  35328. yAxisWidthArr[_i13].width += calibration + 3 * opts.pix;
  35329. if (yData.disabled === true) {
  35330. yAxisWidthArr[_i13].width = 0;
  35331. }
  35332. };
  35333. for (var _i13 = 0; _i13 < YLength; _i13++) {
  35334. _loop3(_i13);
  35335. }
  35336. } else {
  35337. var rangesArr = new Array(1);
  35338. var rangesFormatArr = new Array(1);
  35339. var yAxisWidthArr = new Array(1);
  35340. if (opts.type === 'bar') {
  35341. rangesArr[0] = opts.categories;
  35342. if (!opts.yAxis.formatter) {
  35343. opts.yAxis.formatter = function (val) {
  35344. return val + (opts.yAxis.unit || '');
  35345. };
  35346. }
  35347. } else {
  35348. if (!opts.yAxis.formatter) {
  35349. opts.yAxis.formatter = function (val) {
  35350. return val.toFixed(opts.yAxis.tofix) + (opts.yAxis.unit || '');
  35351. };
  35352. }
  35353. rangesArr[0] = getYAxisTextList(series, opts, config, columnstyle.type, {});
  35354. }
  35355. yAxisWidthArr[0] = {
  35356. position: 'left',
  35357. width: 0
  35358. };
  35359. var yAxisFontSize = opts.yAxis.fontSize * opts.pix || config.fontSize;
  35360. rangesFormatArr[0] = rangesArr[0].map(function (item) {
  35361. item = opts.yAxis.formatter(item);
  35362. yAxisWidthArr[0].width = Math.max(yAxisWidthArr[0].width, measureText(item, yAxisFontSize, context) + 5);
  35363. return item;
  35364. });
  35365. yAxisWidthArr[0].width += 3 * opts.pix;
  35366. if (opts.yAxis.disabled === true) {
  35367. yAxisWidthArr[0] = {
  35368. position: 'left',
  35369. width: 0
  35370. };
  35371. opts.yAxis.data[0] = {
  35372. disabled: true
  35373. };
  35374. } else {
  35375. opts.yAxis.data[0] = {
  35376. disabled: false,
  35377. position: 'left',
  35378. max: opts.yAxis.max,
  35379. min: opts.yAxis.min,
  35380. formatter: opts.yAxis.formatter
  35381. };
  35382. if (opts.type === 'bar') {
  35383. opts.yAxis.data[0].categories = opts.categories;
  35384. opts.yAxis.data[0].type = 'categories';
  35385. }
  35386. }
  35387. }
  35388. return {
  35389. rangesFormat: rangesFormatArr,
  35390. ranges: rangesArr,
  35391. yAxisWidth: yAxisWidthArr
  35392. };
  35393. }
  35394. function calTooltipYAxisData(point, series, opts, config, eachSpacing) {
  35395. var ranges = [].concat(opts.chartData.yAxisData.ranges);
  35396. var spacingValid = opts.height - opts.area[0] - opts.area[2];
  35397. var minAxis = opts.area[0];
  35398. var items = [];
  35399. for (var i = 0; i < ranges.length; i++) {
  35400. var maxVal = ranges[i].shift();
  35401. var minVal = ranges[i].pop();
  35402. var item = maxVal - (maxVal - minVal) * (point - minAxis) / spacingValid;
  35403. item = opts.yAxis.data[i].formatter ? opts.yAxis.data[i].formatter(item) : item.toFixed(0);
  35404. items.push(String(item));
  35405. }
  35406. return items;
  35407. }
  35408. function calMarkLineData(points, opts) {
  35409. var minRange, maxRange;
  35410. var spacingValid = opts.height - opts.area[0] - opts.area[2];
  35411. for (var i = 0; i < points.length; i++) {
  35412. points[i].yAxisIndex = points[i].yAxisIndex ? points[i].yAxisIndex : 0;
  35413. var range = [].concat(opts.chartData.yAxisData.ranges[points[i].yAxisIndex]);
  35414. minRange = range.pop();
  35415. maxRange = range.shift();
  35416. var height = spacingValid * (points[i].value - minRange) / (maxRange - minRange);
  35417. points[i].y = opts.height - Math.round(height) - opts.area[2];
  35418. }
  35419. return points;
  35420. }
  35421. function contextRotate(context, opts) {
  35422. if (opts.rotateLock !== true) {
  35423. context.translate(opts.height, 0);
  35424. context.rotate(90 * Math.PI / 180);
  35425. } else if (opts._rotate_ !== true) {
  35426. context.translate(opts.height, 0);
  35427. context.rotate(90 * Math.PI / 180);
  35428. opts._rotate_ = true;
  35429. }
  35430. }
  35431. function drawPointShape(points, color, shape, context, opts) {
  35432. context.beginPath();
  35433. if (opts.dataPointShapeType == 'hollow') {
  35434. context.setStrokeStyle(color);
  35435. context.setFillStyle(opts.background);
  35436. context.setLineWidth(2 * opts.pix);
  35437. } else {
  35438. context.setStrokeStyle("#ffffff");
  35439. context.setFillStyle(color);
  35440. context.setLineWidth(1 * opts.pix);
  35441. }
  35442. if (shape === 'diamond') {
  35443. points.forEach(function (item, index) {
  35444. if (item !== null) {
  35445. context.moveTo(item.x, item.y - 4.5);
  35446. context.lineTo(item.x - 4.5, item.y);
  35447. context.lineTo(item.x, item.y + 4.5);
  35448. context.lineTo(item.x + 4.5, item.y);
  35449. context.lineTo(item.x, item.y - 4.5);
  35450. }
  35451. });
  35452. } else if (shape === 'circle') {
  35453. points.forEach(function (item, index) {
  35454. if (item !== null) {
  35455. context.moveTo(item.x + 2.5 * opts.pix, item.y);
  35456. context.arc(item.x, item.y, 3 * opts.pix, 0, 2 * Math.PI, false);
  35457. }
  35458. });
  35459. } else if (shape === 'square') {
  35460. points.forEach(function (item, index) {
  35461. if (item !== null) {
  35462. context.moveTo(item.x - 3.5, item.y - 3.5);
  35463. context.rect(item.x - 3.5, item.y - 3.5, 7, 7);
  35464. }
  35465. });
  35466. } else if (shape === 'triangle') {
  35467. points.forEach(function (item, index) {
  35468. if (item !== null) {
  35469. context.moveTo(item.x, item.y - 4.5);
  35470. context.lineTo(item.x - 4.5, item.y + 4.5);
  35471. context.lineTo(item.x + 4.5, item.y + 4.5);
  35472. context.lineTo(item.x, item.y - 4.5);
  35473. }
  35474. });
  35475. } else if (shape === 'triangle') {
  35476. return;
  35477. }
  35478. context.closePath();
  35479. context.fill();
  35480. context.stroke();
  35481. }
  35482. function drawRingTitle(opts, config, context, center) {
  35483. var titlefontSize = opts.title.fontSize || config.titleFontSize;
  35484. var subtitlefontSize = opts.subtitle.fontSize || config.subtitleFontSize;
  35485. var title = opts.title.name || '';
  35486. var subtitle = opts.subtitle.name || '';
  35487. var titleFontColor = opts.title.color || opts.fontColor;
  35488. var subtitleFontColor = opts.subtitle.color || opts.fontColor;
  35489. var titleHeight = title ? titlefontSize : 0;
  35490. var subtitleHeight = subtitle ? subtitlefontSize : 0;
  35491. var margin = 5;
  35492. if (subtitle) {
  35493. var textWidth = measureText(subtitle, subtitlefontSize * opts.pix, context);
  35494. var startX = center.x - textWidth / 2 + (opts.subtitle.offsetX || 0) * opts.pix;
  35495. var startY = center.y + subtitlefontSize * opts.pix / 2 + (opts.subtitle.offsetY || 0) * opts.pix;
  35496. if (title) {
  35497. startY += (titleHeight * opts.pix + margin) / 2;
  35498. }
  35499. context.beginPath();
  35500. context.setFontSize(subtitlefontSize * opts.pix);
  35501. context.setFillStyle(subtitleFontColor);
  35502. context.fillText(subtitle, startX, startY);
  35503. context.closePath();
  35504. context.stroke();
  35505. }
  35506. if (title) {
  35507. var _textWidth = measureText(title, titlefontSize * opts.pix, context);
  35508. var _startX = center.x - _textWidth / 2 + (opts.title.offsetX || 0);
  35509. var _startY = center.y + titlefontSize * opts.pix / 2 + (opts.title.offsetY || 0) * opts.pix;
  35510. if (subtitle) {
  35511. _startY -= (subtitleHeight * opts.pix + margin) / 2;
  35512. }
  35513. context.beginPath();
  35514. context.setFontSize(titlefontSize * opts.pix);
  35515. context.setFillStyle(titleFontColor);
  35516. context.fillText(title, _startX, _startY);
  35517. context.closePath();
  35518. context.stroke();
  35519. }
  35520. }
  35521. function drawPointText(points, series, config, context, opts) {
  35522. // 绘制数据文案
  35523. var data = series.data;
  35524. var textOffset = series.textOffset ? series.textOffset : 0;
  35525. points.forEach(function (item, index) {
  35526. if (item !== null) {
  35527. context.beginPath();
  35528. var fontSize = series.textSize ? series.textSize * opts.pix : config.fontSize;
  35529. context.setFontSize(fontSize);
  35530. context.setFillStyle(series.textColor || opts.fontColor);
  35531. var value = data[index];
  35532. if ((0, _typeof2.default)(data[index]) === 'object' && data[index] !== null) {
  35533. if (data[index].constructor.toString().indexOf('Array') > -1) {
  35534. value = data[index][1];
  35535. } else {
  35536. value = data[index].value;
  35537. }
  35538. }
  35539. var formatVal = series.formatter ? series.formatter(value, index) : value;
  35540. context.setTextAlign('center');
  35541. context.fillText(String(formatVal), item.x, item.y - 4 + textOffset * opts.pix);
  35542. context.closePath();
  35543. context.stroke();
  35544. context.setTextAlign('left');
  35545. }
  35546. });
  35547. }
  35548. function drawBarPointText(points, series, config, context, opts) {
  35549. // 绘制数据文案
  35550. var data = series.data;
  35551. var textOffset = series.textOffset ? series.textOffset : 0;
  35552. points.forEach(function (item, index) {
  35553. if (item !== null) {
  35554. context.beginPath();
  35555. var fontSize = series.textSize ? series.textSize * opts.pix : config.fontSize;
  35556. context.setFontSize(fontSize);
  35557. context.setFillStyle(series.textColor || opts.fontColor);
  35558. var value = data[index];
  35559. if ((0, _typeof2.default)(data[index]) === 'object' && data[index] !== null) {
  35560. value = data[index].value;
  35561. }
  35562. var formatVal = series.formatter ? series.formatter(value, index) : value;
  35563. context.setTextAlign('left');
  35564. context.fillText(String(formatVal), item.x + 4 * opts.pix, item.y + fontSize / 2 - 3);
  35565. context.closePath();
  35566. context.stroke();
  35567. }
  35568. });
  35569. }
  35570. function drawGaugeLabel(gaugeOption, radius, centerPosition, opts, config, context) {
  35571. radius -= gaugeOption.width / 2 + gaugeOption.labelOffset * opts.pix;
  35572. var totalAngle = gaugeOption.startAngle - gaugeOption.endAngle + 1;
  35573. var splitAngle = totalAngle / gaugeOption.splitLine.splitNumber;
  35574. var totalNumber = gaugeOption.endNumber - gaugeOption.startNumber;
  35575. var splitNumber = totalNumber / gaugeOption.splitLine.splitNumber;
  35576. var nowAngle = gaugeOption.startAngle;
  35577. var nowNumber = gaugeOption.startNumber;
  35578. for (var i = 0; i < gaugeOption.splitLine.splitNumber + 1; i++) {
  35579. var pos = {
  35580. x: radius * Math.cos(nowAngle * Math.PI),
  35581. y: radius * Math.sin(nowAngle * Math.PI)
  35582. };
  35583. var labelText = gaugeOption.formatter ? gaugeOption.formatter(nowNumber) : nowNumber;
  35584. pos.x += centerPosition.x - measureText(labelText, config.fontSize, context) / 2;
  35585. pos.y += centerPosition.y;
  35586. var startX = pos.x;
  35587. var startY = pos.y;
  35588. context.beginPath();
  35589. context.setFontSize(config.fontSize);
  35590. context.setFillStyle(gaugeOption.labelColor || opts.fontColor);
  35591. context.fillText(labelText, startX, startY + config.fontSize / 2);
  35592. context.closePath();
  35593. context.stroke();
  35594. nowAngle += splitAngle;
  35595. if (nowAngle >= 2) {
  35596. nowAngle = nowAngle % 2;
  35597. }
  35598. nowNumber += splitNumber;
  35599. }
  35600. }
  35601. function drawRadarLabel(angleList, radius, centerPosition, opts, config, context) {
  35602. var radarOption = opts.extra.radar || {};
  35603. radius += config.radarLabelTextMargin * opts.pix;
  35604. angleList.forEach(function (angle, index) {
  35605. var pos = {
  35606. x: radius * Math.cos(angle),
  35607. y: radius * Math.sin(angle)
  35608. };
  35609. var posRelativeCanvas = convertCoordinateOrigin(pos.x, pos.y, centerPosition);
  35610. var startX = posRelativeCanvas.x;
  35611. var startY = posRelativeCanvas.y;
  35612. if (util.approximatelyEqual(pos.x, 0)) {
  35613. startX -= measureText(opts.categories[index] || '', config.fontSize, context) / 2;
  35614. } else if (pos.x < 0) {
  35615. startX -= measureText(opts.categories[index] || '', config.fontSize, context);
  35616. }
  35617. context.beginPath();
  35618. context.setFontSize(config.fontSize);
  35619. context.setFillStyle(radarOption.labelColor || opts.fontColor);
  35620. context.fillText(opts.categories[index] || '', startX, startY + config.fontSize / 2);
  35621. context.closePath();
  35622. context.stroke();
  35623. });
  35624. }
  35625. function drawPieText(series, opts, config, context, radius, center) {
  35626. var lineRadius = config.pieChartLinePadding;
  35627. var textObjectCollection = [];
  35628. var lastTextObject = null;
  35629. var seriesConvert = series.map(function (item, index, series) {
  35630. var text = item.formatter ? item.formatter(item, index, series) : util.toFixed(item._proportion_.toFixed(4) * 100) + '%';
  35631. var arc = 2 * Math.PI - (item._start_ + 2 * Math.PI * item._proportion_ / 2);
  35632. if (item._rose_proportion_) {
  35633. arc = 2 * Math.PI - (item._start_ + 2 * Math.PI * item._rose_proportion_ / 2);
  35634. }
  35635. var color = item.color;
  35636. var radius = item._radius_;
  35637. return {
  35638. arc: arc,
  35639. text: text,
  35640. color: color,
  35641. radius: radius,
  35642. textColor: item.textColor,
  35643. textSize: item.textSize
  35644. };
  35645. });
  35646. for (var i = 0; i < seriesConvert.length; i++) {
  35647. var item = seriesConvert[i];
  35648. // line end
  35649. var orginX1 = Math.cos(item.arc) * (item.radius + lineRadius);
  35650. var orginY1 = Math.sin(item.arc) * (item.radius + lineRadius);
  35651. // line start
  35652. var orginX2 = Math.cos(item.arc) * item.radius;
  35653. var orginY2 = Math.sin(item.arc) * item.radius;
  35654. // text start
  35655. var orginX3 = orginX1 >= 0 ? orginX1 + config.pieChartTextPadding : orginX1 - config.pieChartTextPadding;
  35656. var orginY3 = orginY1;
  35657. var textWidth = measureText(item.text, item.textSize * opts.pix || config.fontSize, context);
  35658. var startY = orginY3;
  35659. if (lastTextObject && util.isSameXCoordinateArea(lastTextObject.start, {
  35660. x: orginX3
  35661. })) {
  35662. if (orginX3 > 0) {
  35663. startY = Math.min(orginY3, lastTextObject.start.y);
  35664. } else if (orginX1 < 0) {
  35665. startY = Math.max(orginY3, lastTextObject.start.y);
  35666. } else {
  35667. if (orginY3 > 0) {
  35668. startY = Math.max(orginY3, lastTextObject.start.y);
  35669. } else {
  35670. startY = Math.min(orginY3, lastTextObject.start.y);
  35671. }
  35672. }
  35673. }
  35674. if (orginX3 < 0) {
  35675. orginX3 -= textWidth;
  35676. }
  35677. var textObject = {
  35678. lineStart: {
  35679. x: orginX2,
  35680. y: orginY2
  35681. },
  35682. lineEnd: {
  35683. x: orginX1,
  35684. y: orginY1
  35685. },
  35686. start: {
  35687. x: orginX3,
  35688. y: startY
  35689. },
  35690. width: textWidth,
  35691. height: config.fontSize,
  35692. text: item.text,
  35693. color: item.color,
  35694. textColor: item.textColor,
  35695. textSize: item.textSize
  35696. };
  35697. lastTextObject = avoidCollision(textObject, lastTextObject);
  35698. textObjectCollection.push(lastTextObject);
  35699. }
  35700. for (var _i14 = 0; _i14 < textObjectCollection.length; _i14++) {
  35701. var _item6 = textObjectCollection[_i14];
  35702. var lineStartPoistion = convertCoordinateOrigin(_item6.lineStart.x, _item6.lineStart.y, center);
  35703. var lineEndPoistion = convertCoordinateOrigin(_item6.lineEnd.x, _item6.lineEnd.y, center);
  35704. var textPosition = convertCoordinateOrigin(_item6.start.x, _item6.start.y, center);
  35705. context.setLineWidth(1 * opts.pix);
  35706. context.setFontSize(_item6.textSize * opts.pix || config.fontSize);
  35707. context.beginPath();
  35708. context.setStrokeStyle(_item6.color);
  35709. context.setFillStyle(_item6.color);
  35710. context.moveTo(lineStartPoistion.x, lineStartPoistion.y);
  35711. var curveStartX = _item6.start.x < 0 ? textPosition.x + _item6.width : textPosition.x;
  35712. var textStartX = _item6.start.x < 0 ? textPosition.x - 5 : textPosition.x + 5;
  35713. context.quadraticCurveTo(lineEndPoistion.x, lineEndPoistion.y, curveStartX, textPosition.y);
  35714. context.moveTo(lineStartPoistion.x, lineStartPoistion.y);
  35715. context.stroke();
  35716. context.closePath();
  35717. context.beginPath();
  35718. context.moveTo(textPosition.x + _item6.width, textPosition.y);
  35719. context.arc(curveStartX, textPosition.y, 2, 0, 2 * Math.PI);
  35720. context.closePath();
  35721. context.fill();
  35722. context.beginPath();
  35723. context.setFontSize(_item6.textSize * opts.pix || config.fontSize);
  35724. context.setFillStyle(_item6.textColor || opts.fontColor);
  35725. context.fillText(_item6.text, textStartX, textPosition.y + 3);
  35726. context.closePath();
  35727. context.stroke();
  35728. context.closePath();
  35729. }
  35730. }
  35731. function drawToolTipSplitLine(offsetX, opts, config, context) {
  35732. var toolTipOption = opts.extra.tooltip || {};
  35733. toolTipOption.gridType = toolTipOption.gridType == undefined ? 'solid' : toolTipOption.gridType;
  35734. toolTipOption.dashLength = toolTipOption.dashLength == undefined ? 4 : toolTipOption.dashLength;
  35735. var startY = opts.area[0];
  35736. var endY = opts.height - opts.area[2];
  35737. if (toolTipOption.gridType == 'dash') {
  35738. context.setLineDash([toolTipOption.dashLength, toolTipOption.dashLength]);
  35739. }
  35740. context.setStrokeStyle(toolTipOption.gridColor || '#cccccc');
  35741. context.setLineWidth(1 * opts.pix);
  35742. context.beginPath();
  35743. context.moveTo(offsetX, startY);
  35744. context.lineTo(offsetX, endY);
  35745. context.stroke();
  35746. context.setLineDash([]);
  35747. if (toolTipOption.xAxisLabel) {
  35748. var labelText = opts.categories[opts.tooltip.index];
  35749. context.setFontSize(config.fontSize);
  35750. var textWidth = measureText(labelText, config.fontSize, context);
  35751. var textX = offsetX - 0.5 * textWidth;
  35752. var textY = endY;
  35753. context.beginPath();
  35754. context.setFillStyle(hexToRgb(toolTipOption.labelBgColor || config.toolTipBackground, toolTipOption.labelBgOpacity || config.toolTipOpacity));
  35755. context.setStrokeStyle(toolTipOption.labelBgColor || config.toolTipBackground);
  35756. context.setLineWidth(1 * opts.pix);
  35757. context.rect(textX - config.toolTipPadding, textY, textWidth + 2 * config.toolTipPadding, config.fontSize + 2 * config.toolTipPadding);
  35758. context.closePath();
  35759. context.stroke();
  35760. context.fill();
  35761. context.beginPath();
  35762. context.setFontSize(config.fontSize);
  35763. context.setFillStyle(toolTipOption.labelFontColor || opts.fontColor);
  35764. context.fillText(String(labelText), textX, textY + config.toolTipPadding + config.fontSize);
  35765. context.closePath();
  35766. context.stroke();
  35767. }
  35768. }
  35769. function drawMarkLine(opts, config, context) {
  35770. var markLineOption = assign({}, {
  35771. type: 'solid',
  35772. dashLength: 4,
  35773. data: []
  35774. }, opts.extra.markLine);
  35775. var startX = opts.area[3];
  35776. var endX = opts.width - opts.area[1];
  35777. var points = calMarkLineData(markLineOption.data, opts);
  35778. for (var i = 0; i < points.length; i++) {
  35779. var item = assign({}, {
  35780. lineColor: '#DE4A42',
  35781. showLabel: false,
  35782. labelFontColor: '#666666',
  35783. labelBgColor: '#DFE8FF',
  35784. labelBgOpacity: 0.8,
  35785. yAxisIndex: 0
  35786. }, points[i]);
  35787. if (markLineOption.type == 'dash') {
  35788. context.setLineDash([markLineOption.dashLength, markLineOption.dashLength]);
  35789. }
  35790. context.setStrokeStyle(item.lineColor);
  35791. context.setLineWidth(1 * opts.pix);
  35792. context.beginPath();
  35793. context.moveTo(startX, item.y);
  35794. context.lineTo(endX, item.y);
  35795. context.stroke();
  35796. context.setLineDash([]);
  35797. if (item.showLabel) {
  35798. var labelText = opts.yAxis.formatter ? opts.yAxis.formatter(item.value) : item.value;
  35799. context.setFontSize(config.fontSize);
  35800. var textWidth = measureText(labelText, config.fontSize, context);
  35801. var yAxisWidth = opts.chartData.yAxisData.yAxisWidth[0].width;
  35802. var bgStartX = opts.area[3] - textWidth - config.toolTipPadding * 2;
  35803. var bgEndX = opts.area[3];
  35804. var bgWidth = bgEndX - bgStartX;
  35805. var textX = bgEndX - config.toolTipPadding;
  35806. var textY = item.y;
  35807. context.setFillStyle(hexToRgb(item.labelBgColor, item.labelBgOpacity));
  35808. context.setStrokeStyle(item.labelBgColor);
  35809. context.setLineWidth(1 * opts.pix);
  35810. context.beginPath();
  35811. context.rect(bgStartX, textY - 0.5 * config.fontSize - config.toolTipPadding, bgWidth, config.fontSize + 2 * config.toolTipPadding);
  35812. context.closePath();
  35813. context.stroke();
  35814. context.fill();
  35815. context.setFontSize(config.fontSize);
  35816. context.setTextAlign('right');
  35817. context.setFillStyle(item.labelFontColor);
  35818. context.fillText(String(labelText), textX, textY + 0.5 * config.fontSize);
  35819. context.stroke();
  35820. context.setTextAlign('left');
  35821. }
  35822. }
  35823. }
  35824. function drawToolTipHorizentalLine(opts, config, context, eachSpacing, xAxisPoints) {
  35825. var toolTipOption = assign({}, {
  35826. gridType: 'solid',
  35827. dashLength: 4
  35828. }, opts.extra.tooltip);
  35829. var startX = opts.area[3];
  35830. var endX = opts.width - opts.area[1];
  35831. if (toolTipOption.gridType == 'dash') {
  35832. context.setLineDash([toolTipOption.dashLength, toolTipOption.dashLength]);
  35833. }
  35834. context.setStrokeStyle(toolTipOption.gridColor || '#cccccc');
  35835. context.setLineWidth(1 * opts.pix);
  35836. context.beginPath();
  35837. context.moveTo(startX, opts.tooltip.offset.y);
  35838. context.lineTo(endX, opts.tooltip.offset.y);
  35839. context.stroke();
  35840. context.setLineDash([]);
  35841. if (toolTipOption.yAxisLabel) {
  35842. var labelText = calTooltipYAxisData(opts.tooltip.offset.y, opts.series, opts, config, eachSpacing);
  35843. var widthArr = opts.chartData.yAxisData.yAxisWidth;
  35844. var tStartLeft = opts.area[3];
  35845. var tStartRight = opts.width - opts.area[1];
  35846. for (var i = 0; i < labelText.length; i++) {
  35847. context.setFontSize(config.fontSize);
  35848. var textWidth = measureText(labelText[i], config.fontSize, context);
  35849. var bgStartX = void 0,
  35850. bgEndX = void 0,
  35851. bgWidth = void 0;
  35852. if (widthArr[i].position == 'left') {
  35853. bgStartX = tStartLeft - widthArr[i].width;
  35854. bgEndX = Math.max(bgStartX, bgStartX + textWidth + config.toolTipPadding * 2);
  35855. } else {
  35856. bgStartX = tStartRight;
  35857. bgEndX = Math.max(bgStartX + widthArr[i].width, bgStartX + textWidth + config.toolTipPadding * 2);
  35858. }
  35859. bgWidth = bgEndX - bgStartX;
  35860. var textX = bgStartX + (bgWidth - textWidth) / 2;
  35861. var textY = opts.tooltip.offset.y;
  35862. context.beginPath();
  35863. context.setFillStyle(hexToRgb(toolTipOption.labelBgColor || config.toolTipBackground, toolTipOption.labelBgOpacity || config.toolTipOpacity));
  35864. context.setStrokeStyle(toolTipOption.labelBgColor || config.toolTipBackground);
  35865. context.setLineWidth(1 * opts.pix);
  35866. context.rect(bgStartX, textY - 0.5 * config.fontSize - config.toolTipPadding, bgWidth, config.fontSize + 2 * config.toolTipPadding);
  35867. context.closePath();
  35868. context.stroke();
  35869. context.fill();
  35870. context.beginPath();
  35871. context.setFontSize(config.fontSize);
  35872. context.setFillStyle(toolTipOption.labelFontColor || opts.fontColor);
  35873. context.fillText(labelText[i], textX, textY + 0.5 * config.fontSize);
  35874. context.closePath();
  35875. context.stroke();
  35876. if (widthArr[i].position == 'left') {
  35877. tStartLeft -= widthArr[i].width + opts.yAxis.padding * opts.pix;
  35878. } else {
  35879. tStartRight += widthArr[i].width + opts.yAxis.padding * opts.pix;
  35880. }
  35881. }
  35882. }
  35883. }
  35884. function drawToolTipSplitArea(offsetX, opts, config, context, eachSpacing) {
  35885. var toolTipOption = assign({}, {
  35886. activeBgColor: '#000000',
  35887. activeBgOpacity: 0.08
  35888. }, opts.extra.column);
  35889. var startY = opts.area[0];
  35890. var endY = opts.height - opts.area[2];
  35891. context.beginPath();
  35892. context.setFillStyle(hexToRgb(toolTipOption.activeBgColor, toolTipOption.activeBgOpacity));
  35893. context.rect(offsetX - eachSpacing / 2, startY, eachSpacing, endY - startY);
  35894. context.closePath();
  35895. context.fill();
  35896. context.setFillStyle("#FFFFFF");
  35897. }
  35898. function drawBarToolTipSplitArea(offsetX, opts, config, context, eachSpacing) {
  35899. var toolTipOption = assign({}, {
  35900. activeBgColor: '#000000',
  35901. activeBgOpacity: 0.08
  35902. }, opts.extra.bar);
  35903. var startX = opts.area[3];
  35904. var endX = opts.width - opts.area[1];
  35905. context.beginPath();
  35906. context.setFillStyle(hexToRgb(toolTipOption.activeBgColor, toolTipOption.activeBgOpacity));
  35907. context.rect(startX, offsetX - eachSpacing / 2, endX - startX, eachSpacing);
  35908. context.closePath();
  35909. context.fill();
  35910. context.setFillStyle("#FFFFFF");
  35911. }
  35912. function drawToolTip(textList, offset, opts, config, context, eachSpacing, xAxisPoints) {
  35913. var toolTipOption = assign({}, {
  35914. showBox: true,
  35915. showArrow: true,
  35916. showCategory: false,
  35917. bgColor: '#000000',
  35918. bgOpacity: 0.7,
  35919. borderColor: '#000000',
  35920. borderWidth: 0,
  35921. borderRadius: 0,
  35922. borderOpacity: 0.7,
  35923. fontColor: '#FFFFFF',
  35924. splitLine: true
  35925. }, opts.extra.tooltip);
  35926. if (toolTipOption.showCategory == true && opts.categories) {
  35927. textList.unshift({
  35928. text: opts.categories[opts.tooltip.index],
  35929. color: null
  35930. });
  35931. }
  35932. var legendWidth = 4 * opts.pix;
  35933. var legendMarginRight = 5 * opts.pix;
  35934. var arrowWidth = toolTipOption.showArrow ? 8 * opts.pix : 0;
  35935. var isOverRightBorder = false;
  35936. if (opts.type == 'line' || opts.type == 'area' || opts.type == 'candle' || opts.type == 'mix') {
  35937. if (toolTipOption.splitLine == true) {
  35938. drawToolTipSplitLine(opts.tooltip.offset.x, opts, config, context);
  35939. }
  35940. }
  35941. offset = assign({
  35942. x: 0,
  35943. y: 0
  35944. }, offset);
  35945. offset.y -= 8 * opts.pix;
  35946. var textWidth = textList.map(function (item) {
  35947. return measureText(item.text, config.fontSize, context);
  35948. });
  35949. var toolTipWidth = legendWidth + legendMarginRight + 4 * config.toolTipPadding + Math.max.apply(null, textWidth);
  35950. var toolTipHeight = 2 * config.toolTipPadding + textList.length * config.toolTipLineHeight;
  35951. if (toolTipOption.showBox == false) {
  35952. return;
  35953. }
  35954. // if beyond the right border
  35955. if (offset.x - Math.abs(opts._scrollDistance_ || 0) + arrowWidth + toolTipWidth > opts.width) {
  35956. isOverRightBorder = true;
  35957. }
  35958. if (toolTipHeight + offset.y > opts.height) {
  35959. offset.y = opts.height - toolTipHeight;
  35960. }
  35961. // draw background rect
  35962. context.beginPath();
  35963. context.setFillStyle(hexToRgb(toolTipOption.bgColor || config.toolTipBackground, toolTipOption.bgOpacity || config.toolTipOpacity));
  35964. context.setLineWidth(toolTipOption.borderWidth * opts.pix);
  35965. context.setStrokeStyle(hexToRgb(toolTipOption.borderColor, toolTipOption.borderOpacity));
  35966. var radius = toolTipOption.borderRadius;
  35967. if (isOverRightBorder) {
  35968. if (toolTipOption.showArrow) {
  35969. context.moveTo(offset.x, offset.y + 10 * opts.pix);
  35970. context.lineTo(offset.x - arrowWidth, offset.y + 10 * opts.pix + 5 * opts.pix);
  35971. }
  35972. context.arc(offset.x - arrowWidth - radius, offset.y + toolTipHeight - radius, radius, 0, Math.PI / 2, false);
  35973. context.arc(offset.x - arrowWidth - Math.round(toolTipWidth) + radius, offset.y + toolTipHeight - radius, radius, Math.PI / 2, Math.PI, false);
  35974. context.arc(offset.x - arrowWidth - Math.round(toolTipWidth) + radius, offset.y + radius, radius, -Math.PI, -Math.PI / 2, false);
  35975. context.arc(offset.x - arrowWidth - radius, offset.y + radius, radius, -Math.PI / 2, 0, false);
  35976. if (toolTipOption.showArrow) {
  35977. context.lineTo(offset.x - arrowWidth, offset.y + 10 * opts.pix - 5 * opts.pix);
  35978. context.lineTo(offset.x, offset.y + 10 * opts.pix);
  35979. }
  35980. } else {
  35981. if (toolTipOption.showArrow) {
  35982. context.moveTo(offset.x, offset.y + 10 * opts.pix);
  35983. context.lineTo(offset.x + arrowWidth, offset.y + 10 * opts.pix - 5 * opts.pix);
  35984. }
  35985. context.arc(offset.x + arrowWidth + radius, offset.y + radius, radius, -Math.PI, -Math.PI / 2, false);
  35986. context.arc(offset.x + arrowWidth + Math.round(toolTipWidth) - radius, offset.y + radius, radius, -Math.PI / 2, 0, false);
  35987. context.arc(offset.x + arrowWidth + Math.round(toolTipWidth) - radius, offset.y + toolTipHeight - radius, radius, 0, Math.PI / 2, false);
  35988. context.arc(offset.x + arrowWidth + radius, offset.y + toolTipHeight - radius, radius, Math.PI / 2, Math.PI, false);
  35989. if (toolTipOption.showArrow) {
  35990. context.lineTo(offset.x + arrowWidth, offset.y + 10 * opts.pix + 5 * opts.pix);
  35991. context.lineTo(offset.x, offset.y + 10 * opts.pix);
  35992. }
  35993. }
  35994. context.closePath();
  35995. context.fill();
  35996. if (toolTipOption.borderWidth > 0) {
  35997. context.stroke();
  35998. }
  35999. // draw legend
  36000. textList.forEach(function (item, index) {
  36001. if (item.color !== null) {
  36002. context.beginPath();
  36003. context.setFillStyle(item.color);
  36004. var startX = offset.x + arrowWidth + 2 * config.toolTipPadding;
  36005. var startY = offset.y + (config.toolTipLineHeight - config.fontSize) / 2 + config.toolTipLineHeight * index + config.toolTipPadding + 1;
  36006. if (isOverRightBorder) {
  36007. startX = offset.x - toolTipWidth - arrowWidth + 2 * config.toolTipPadding;
  36008. }
  36009. context.fillRect(startX, startY, legendWidth, config.fontSize);
  36010. context.closePath();
  36011. }
  36012. });
  36013. // draw text list
  36014. textList.forEach(function (item, index) {
  36015. var startX = offset.x + arrowWidth + 2 * config.toolTipPadding + legendWidth + legendMarginRight;
  36016. if (isOverRightBorder) {
  36017. startX = offset.x - toolTipWidth - arrowWidth + 2 * config.toolTipPadding + +legendWidth + legendMarginRight;
  36018. }
  36019. var startY = offset.y + (config.toolTipLineHeight - config.fontSize) / 2 + config.toolTipLineHeight * index + config.toolTipPadding;
  36020. context.beginPath();
  36021. context.setFontSize(config.fontSize);
  36022. context.setFillStyle(toolTipOption.fontColor);
  36023. context.fillText(item.text, startX, startY + config.fontSize);
  36024. context.closePath();
  36025. context.stroke();
  36026. });
  36027. }
  36028. function drawColumnDataPoints(series, opts, config, context) {
  36029. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  36030. var xAxisData = opts.chartData.xAxisData,
  36031. xAxisPoints = xAxisData.xAxisPoints,
  36032. eachSpacing = xAxisData.eachSpacing;
  36033. var columnOption = assign({}, {
  36034. type: 'group',
  36035. width: eachSpacing / 2,
  36036. meterBorder: 4,
  36037. meterFillColor: '#FFFFFF',
  36038. barBorderCircle: false,
  36039. barBorderRadius: [],
  36040. seriesGap: 2,
  36041. linearType: 'none',
  36042. linearOpacity: 1,
  36043. customColor: [],
  36044. colorStop: 0
  36045. }, opts.extra.column);
  36046. var calPoints = [];
  36047. context.save();
  36048. var leftNum = -2;
  36049. var rightNum = xAxisPoints.length + 2;
  36050. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  36051. context.translate(opts._scrollDistance_, 0);
  36052. leftNum = Math.floor(-opts._scrollDistance_ / eachSpacing) - 2;
  36053. rightNum = leftNum + opts.xAxis.itemCount + 4;
  36054. }
  36055. if (opts.tooltip && opts.tooltip.textList && opts.tooltip.textList.length && process === 1) {
  36056. drawToolTipSplitArea(opts.tooltip.offset.x, opts, config, context, eachSpacing);
  36057. }
  36058. columnOption.customColor = fillCustomColor(columnOption.linearType, columnOption.customColor, series, config);
  36059. series.forEach(function (eachSeries, seriesIndex) {
  36060. var ranges, minRange, maxRange;
  36061. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  36062. minRange = ranges.pop();
  36063. maxRange = ranges.shift();
  36064. var data = eachSeries.data;
  36065. switch (columnOption.type) {
  36066. case 'group':
  36067. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  36068. var tooltipPoints = getStackDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, seriesIndex, series, process);
  36069. calPoints.push(tooltipPoints);
  36070. points = fixColumeData(points, eachSpacing, series.length, seriesIndex, config, opts);
  36071. for (var i = 0; i < points.length; i++) {
  36072. var item = points[i];
  36073. //fix issues/I27B1N yyoinge & Joeshu
  36074. if (item !== null && i > leftNum && i < rightNum) {
  36075. var startX = item.x - item.width / 2;
  36076. var height = opts.height - item.y - opts.area[2];
  36077. context.beginPath();
  36078. var fillColor = item.color || eachSeries.color;
  36079. var strokeColor = item.color || eachSeries.color;
  36080. if (columnOption.linearType !== 'none') {
  36081. var grd = context.createLinearGradient(startX, item.y, startX, opts.height - opts.area[2]);
  36082. //透明渐变
  36083. if (columnOption.linearType == 'opacity') {
  36084. grd.addColorStop(0, hexToRgb(fillColor, columnOption.linearOpacity));
  36085. grd.addColorStop(1, hexToRgb(fillColor, 1));
  36086. } else {
  36087. grd.addColorStop(0, hexToRgb(columnOption.customColor[eachSeries.linearIndex], columnOption.linearOpacity));
  36088. grd.addColorStop(columnOption.colorStop, hexToRgb(columnOption.customColor[eachSeries.linearIndex], columnOption.linearOpacity));
  36089. grd.addColorStop(1, hexToRgb(fillColor, 1));
  36090. }
  36091. fillColor = grd;
  36092. }
  36093. // 圆角边框
  36094. if (columnOption.barBorderRadius && columnOption.barBorderRadius.length === 4 || columnOption.barBorderCircle === true) {
  36095. var left = startX;
  36096. var top = item.y;
  36097. var width = item.width;
  36098. var _height = opts.height - opts.area[2] - item.y;
  36099. if (columnOption.barBorderCircle) {
  36100. columnOption.barBorderRadius = [width / 2, width / 2, 0, 0];
  36101. }
  36102. var _columnOption$barBord = (0, _slicedToArray2.default)(columnOption.barBorderRadius, 4),
  36103. r0 = _columnOption$barBord[0],
  36104. r1 = _columnOption$barBord[1],
  36105. r2 = _columnOption$barBord[2],
  36106. r3 = _columnOption$barBord[3];
  36107. var minRadius = Math.min(width / 2, _height / 2);
  36108. r0 = r0 > minRadius ? minRadius : r0;
  36109. r1 = r1 > minRadius ? minRadius : r1;
  36110. r2 = r2 > minRadius ? minRadius : r2;
  36111. r3 = r3 > minRadius ? minRadius : r3;
  36112. r0 = r0 < 0 ? 0 : r0;
  36113. r1 = r1 < 0 ? 0 : r1;
  36114. r2 = r2 < 0 ? 0 : r2;
  36115. r3 = r3 < 0 ? 0 : r3;
  36116. context.arc(left + r0, top + r0, r0, -Math.PI, -Math.PI / 2);
  36117. context.arc(left + width - r1, top + r1, r1, -Math.PI / 2, 0);
  36118. context.arc(left + width - r2, top + _height - r2, r2, 0, Math.PI / 2);
  36119. context.arc(left + r3, top + _height - r3, r3, Math.PI / 2, Math.PI);
  36120. } else {
  36121. context.moveTo(startX, item.y);
  36122. context.lineTo(startX + item.width - 2, item.y);
  36123. context.lineTo(startX + item.width - 2, opts.height - opts.area[2]);
  36124. context.lineTo(startX, opts.height - opts.area[2]);
  36125. context.lineTo(startX, item.y);
  36126. context.setLineWidth(1);
  36127. context.setStrokeStyle(strokeColor);
  36128. }
  36129. context.setFillStyle(fillColor);
  36130. context.closePath();
  36131. //context.stroke();
  36132. context.fill();
  36133. }
  36134. }
  36135. ;
  36136. break;
  36137. case 'stack':
  36138. // 绘制堆叠数据图
  36139. var points = getStackDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, seriesIndex, series, process);
  36140. calPoints.push(points);
  36141. points = fixColumeStackData(points, eachSpacing, series.length, seriesIndex, config, opts, series);
  36142. for (var _i15 = 0; _i15 < points.length; _i15++) {
  36143. var _item7 = points[_i15];
  36144. if (_item7 !== null && _i15 > leftNum && _i15 < rightNum) {
  36145. context.beginPath();
  36146. var fillColor = _item7.color || eachSeries.color;
  36147. var startX = _item7.x - _item7.width / 2 + 1;
  36148. var height = opts.height - _item7.y - opts.area[2];
  36149. var height0 = opts.height - _item7.y0 - opts.area[2];
  36150. if (seriesIndex > 0) {
  36151. height -= height0;
  36152. }
  36153. context.setFillStyle(fillColor);
  36154. context.moveTo(startX, _item7.y);
  36155. context.fillRect(startX, _item7.y, _item7.width - 2, height);
  36156. context.closePath();
  36157. context.fill();
  36158. }
  36159. }
  36160. ;
  36161. break;
  36162. case 'meter':
  36163. // 绘制温度计数据图
  36164. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  36165. calPoints.push(points);
  36166. points = fixColumeMeterData(points, eachSpacing, series.length, seriesIndex, config, opts, columnOption.meterBorder);
  36167. if (seriesIndex == 0) {
  36168. for (var _i16 = 0; _i16 < points.length; _i16++) {
  36169. var _item8 = points[_i16];
  36170. if (_item8 !== null && _i16 > leftNum && _i16 < rightNum) {
  36171. //画背景颜色
  36172. context.beginPath();
  36173. context.setFillStyle(columnOption.meterFillColor);
  36174. var startX = _item8.x - _item8.width / 2;
  36175. var height = opts.height - _item8.y - opts.area[2];
  36176. if (columnOption.barBorderCircle) {
  36177. var barBorderRadius = (_item8.width - columnOption.meterBorder * 2) / 2;
  36178. if (barBorderRadius > height) {
  36179. barBorderRadius = height;
  36180. }
  36181. context.moveTo(startX + columnOption.meterBorder, opts.height - opts.area[2]);
  36182. context.lineTo(startX + columnOption.meterBorder, _item8.y + barBorderRadius);
  36183. context.arc(startX + _item8.width / 2, _item8.y + barBorderRadius, barBorderRadius, -Math.PI, 0);
  36184. context.lineTo(startX + _item8.width - columnOption.meterBorder, opts.height - opts.area[2]);
  36185. context.lineTo(startX, opts.height - opts.area[2]);
  36186. context.fill();
  36187. } else {
  36188. context.moveTo(startX, _item8.y);
  36189. context.fillRect(startX, _item8.y, _item8.width, height);
  36190. context.closePath();
  36191. context.fill();
  36192. }
  36193. //画边框线
  36194. if (columnOption.meterBorder > 0) {
  36195. context.beginPath();
  36196. context.setStrokeStyle(eachSeries.color);
  36197. context.setLineWidth(columnOption.meterBorder * opts.pix);
  36198. if (columnOption.barBorderCircle) {
  36199. var barBorderRadius = (_item8.width - columnOption.meterBorder) / 2;
  36200. if (barBorderRadius > height) {
  36201. barBorderRadius = height;
  36202. }
  36203. context.moveTo(startX + columnOption.meterBorder * 0.5, opts.height - opts.area[2]);
  36204. context.lineTo(startX + columnOption.meterBorder * 0.5, _item8.y + barBorderRadius);
  36205. context.arc(startX + _item8.width / 2, _item8.y + barBorderRadius - columnOption.meterBorder * 0.5, barBorderRadius, -Math.PI, 0);
  36206. context.lineTo(startX + _item8.width - columnOption.meterBorder * 0.5, opts.height - opts.area[2]);
  36207. } else {
  36208. context.moveTo(startX + columnOption.meterBorder * 0.5, _item8.y + height);
  36209. context.lineTo(startX + columnOption.meterBorder * 0.5, _item8.y + columnOption.meterBorder * 0.5);
  36210. context.lineTo(startX + _item8.width - columnOption.meterBorder * 0.5, _item8.y + columnOption.meterBorder * 0.5);
  36211. context.lineTo(startX + _item8.width - columnOption.meterBorder * 0.5, _item8.y + height);
  36212. }
  36213. context.stroke();
  36214. }
  36215. }
  36216. }
  36217. ;
  36218. } else {
  36219. for (var _i17 = 0; _i17 < points.length; _i17++) {
  36220. var _item9 = points[_i17];
  36221. if (_item9 !== null && _i17 > leftNum && _i17 < rightNum) {
  36222. context.beginPath();
  36223. context.setFillStyle(_item9.color || eachSeries.color);
  36224. var startX = _item9.x - _item9.width / 2;
  36225. var height = opts.height - _item9.y - opts.area[2];
  36226. if (columnOption.barBorderCircle) {
  36227. var barBorderRadius = _item9.width / 2;
  36228. if (barBorderRadius > height) {
  36229. barBorderRadius = height;
  36230. }
  36231. context.moveTo(startX, opts.height - opts.area[2]);
  36232. context.arc(startX + barBorderRadius, _item9.y + barBorderRadius, barBorderRadius, -Math.PI, -Math.PI / 2);
  36233. context.arc(startX + _item9.width - barBorderRadius, _item9.y + barBorderRadius, barBorderRadius, -Math.PI / 2, 0);
  36234. context.lineTo(startX + _item9.width, opts.height - opts.area[2]);
  36235. context.lineTo(startX, opts.height - opts.area[2]);
  36236. context.fill();
  36237. } else {
  36238. context.moveTo(startX, _item9.y);
  36239. context.fillRect(startX, _item9.y, _item9.width, height);
  36240. context.closePath();
  36241. context.fill();
  36242. }
  36243. }
  36244. }
  36245. ;
  36246. }
  36247. break;
  36248. }
  36249. });
  36250. if (opts.dataLabel !== false && process === 1) {
  36251. series.forEach(function (eachSeries, seriesIndex) {
  36252. var ranges, minRange, maxRange;
  36253. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  36254. minRange = ranges.pop();
  36255. maxRange = ranges.shift();
  36256. var data = eachSeries.data;
  36257. switch (columnOption.type) {
  36258. case 'group':
  36259. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  36260. points = fixColumeData(points, eachSpacing, series.length, seriesIndex, config, opts);
  36261. drawPointText(points, eachSeries, config, context, opts);
  36262. break;
  36263. case 'stack':
  36264. var points = getStackDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, seriesIndex, series, process);
  36265. drawPointText(points, eachSeries, config, context, opts);
  36266. break;
  36267. case 'meter':
  36268. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  36269. drawPointText(points, eachSeries, config, context, opts);
  36270. break;
  36271. }
  36272. });
  36273. }
  36274. context.restore();
  36275. return {
  36276. xAxisPoints: xAxisPoints,
  36277. calPoints: calPoints,
  36278. eachSpacing: eachSpacing
  36279. };
  36280. }
  36281. function drawBarDataPoints(series, opts, config, context) {
  36282. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  36283. var yAxisPoints = [];
  36284. var eachSpacing = (opts.height - opts.area[0] - opts.area[2]) / opts.categories.length;
  36285. for (var i = 0; i < opts.categories.length; i++) {
  36286. yAxisPoints.push(opts.area[0] + eachSpacing / 2 + eachSpacing * i);
  36287. }
  36288. var columnOption = assign({}, {
  36289. type: 'group',
  36290. width: eachSpacing / 2,
  36291. meterBorder: 4,
  36292. meterFillColor: '#FFFFFF',
  36293. barBorderCircle: false,
  36294. barBorderRadius: [],
  36295. seriesGap: 2,
  36296. linearType: 'none',
  36297. linearOpacity: 1,
  36298. customColor: [],
  36299. colorStop: 0
  36300. }, opts.extra.bar);
  36301. var calPoints = [];
  36302. context.save();
  36303. var leftNum = -2;
  36304. var rightNum = yAxisPoints.length + 2;
  36305. if (opts.tooltip && opts.tooltip.textList && opts.tooltip.textList.length && process === 1) {
  36306. drawBarToolTipSplitArea(opts.tooltip.offset.y, opts, config, context, eachSpacing);
  36307. }
  36308. columnOption.customColor = fillCustomColor(columnOption.linearType, columnOption.customColor, series, config);
  36309. series.forEach(function (eachSeries, seriesIndex) {
  36310. var ranges, minRange, maxRange;
  36311. ranges = [].concat(opts.chartData.xAxisData.ranges);
  36312. maxRange = ranges.pop();
  36313. minRange = ranges.shift();
  36314. var data = eachSeries.data;
  36315. switch (columnOption.type) {
  36316. case 'group':
  36317. var points = getBarDataPoints(data, minRange, maxRange, yAxisPoints, eachSpacing, opts, config, process);
  36318. var tooltipPoints = getBarStackDataPoints(data, minRange, maxRange, yAxisPoints, eachSpacing, opts, config, seriesIndex, series, process);
  36319. calPoints.push(tooltipPoints);
  36320. points = fixBarData(points, eachSpacing, series.length, seriesIndex, config, opts);
  36321. for (var _i18 = 0; _i18 < points.length; _i18++) {
  36322. var item = points[_i18];
  36323. //fix issues/I27B1N yyoinge & Joeshu
  36324. if (item !== null && _i18 > leftNum && _i18 < rightNum) {
  36325. //var startX = item.x - item.width / 2;
  36326. var startX = opts.area[3];
  36327. var startY = item.y - item.width / 2;
  36328. var height = item.height;
  36329. context.beginPath();
  36330. var fillColor = item.color || eachSeries.color;
  36331. var strokeColor = item.color || eachSeries.color;
  36332. if (columnOption.linearType !== 'none') {
  36333. var grd = context.createLinearGradient(startX, item.y, item.x, item.y);
  36334. //透明渐变
  36335. if (columnOption.linearType == 'opacity') {
  36336. grd.addColorStop(0, hexToRgb(fillColor, columnOption.linearOpacity));
  36337. grd.addColorStop(1, hexToRgb(fillColor, 1));
  36338. } else {
  36339. grd.addColorStop(0, hexToRgb(columnOption.customColor[eachSeries.linearIndex], columnOption.linearOpacity));
  36340. grd.addColorStop(columnOption.colorStop, hexToRgb(columnOption.customColor[eachSeries.linearIndex], columnOption.linearOpacity));
  36341. grd.addColorStop(1, hexToRgb(fillColor, 1));
  36342. }
  36343. fillColor = grd;
  36344. }
  36345. // 圆角边框
  36346. if (columnOption.barBorderRadius && columnOption.barBorderRadius.length === 4 || columnOption.barBorderCircle === true) {
  36347. var left = startX;
  36348. var width = item.width;
  36349. var top = item.y - item.width / 2;
  36350. var _height2 = item.heigh;
  36351. if (columnOption.barBorderCircle) {
  36352. columnOption.barBorderRadius = [width / 2, width / 2, 0, 0];
  36353. }
  36354. var _columnOption$barBord2 = (0, _slicedToArray2.default)(columnOption.barBorderRadius, 4),
  36355. r0 = _columnOption$barBord2[0],
  36356. r1 = _columnOption$barBord2[1],
  36357. r2 = _columnOption$barBord2[2],
  36358. r3 = _columnOption$barBord2[3];
  36359. var minRadius = Math.min(width / 2, _height2 / 2);
  36360. r0 = r0 > minRadius ? minRadius : r0;
  36361. r1 = r1 > minRadius ? minRadius : r1;
  36362. r2 = r2 > minRadius ? minRadius : r2;
  36363. r3 = r3 > minRadius ? minRadius : r3;
  36364. r0 = r0 < 0 ? 0 : r0;
  36365. r1 = r1 < 0 ? 0 : r1;
  36366. r2 = r2 < 0 ? 0 : r2;
  36367. r3 = r3 < 0 ? 0 : r3;
  36368. context.arc(left + r3, top + r3, r3, -Math.PI, -Math.PI / 2);
  36369. context.arc(item.x - r0, top + r0, r0, -Math.PI / 2, 0);
  36370. context.arc(item.x - r1, top + width - r1, r1, 0, Math.PI / 2);
  36371. context.arc(left + r2, top + width - r2, r2, Math.PI / 2, Math.PI);
  36372. } else {
  36373. context.moveTo(startX, startY);
  36374. context.lineTo(item.x, startY);
  36375. context.lineTo(item.x, startY + item.width - 2);
  36376. context.lineTo(startX, startY + item.width - 2);
  36377. context.lineTo(startX, startY);
  36378. context.setLineWidth(1);
  36379. context.setStrokeStyle(strokeColor);
  36380. }
  36381. context.setFillStyle(fillColor);
  36382. context.closePath();
  36383. //context.stroke();
  36384. context.fill();
  36385. }
  36386. }
  36387. ;
  36388. break;
  36389. case 'stack':
  36390. // 绘制堆叠数据图
  36391. var points = getBarStackDataPoints(data, minRange, maxRange, yAxisPoints, eachSpacing, opts, config, seriesIndex, series, process);
  36392. calPoints.push(points);
  36393. points = fixBarStackData(points, eachSpacing, series.length, seriesIndex, config, opts, series);
  36394. for (var _i19 = 0; _i19 < points.length; _i19++) {
  36395. var _item10 = points[_i19];
  36396. if (_item10 !== null && _i19 > leftNum && _i19 < rightNum) {
  36397. context.beginPath();
  36398. var fillColor = _item10.color || eachSeries.color;
  36399. var startX = _item10.x0;
  36400. context.setFillStyle(fillColor);
  36401. context.moveTo(startX, _item10.y - _item10.width / 2);
  36402. context.fillRect(startX, _item10.y - _item10.width / 2, _item10.height, _item10.width - 2);
  36403. context.closePath();
  36404. context.fill();
  36405. }
  36406. }
  36407. ;
  36408. break;
  36409. }
  36410. });
  36411. if (opts.dataLabel !== false && process === 1) {
  36412. series.forEach(function (eachSeries, seriesIndex) {
  36413. var ranges, minRange, maxRange;
  36414. ranges = [].concat(opts.chartData.xAxisData.ranges);
  36415. maxRange = ranges.pop();
  36416. minRange = ranges.shift();
  36417. var data = eachSeries.data;
  36418. switch (columnOption.type) {
  36419. case 'group':
  36420. var points = getBarDataPoints(data, minRange, maxRange, yAxisPoints, eachSpacing, opts, config, process);
  36421. points = fixBarData(points, eachSpacing, series.length, seriesIndex, config, opts);
  36422. drawBarPointText(points, eachSeries, config, context, opts);
  36423. break;
  36424. case 'stack':
  36425. var points = getBarStackDataPoints(data, minRange, maxRange, yAxisPoints, eachSpacing, opts, config, seriesIndex, series, process);
  36426. drawBarPointText(points, eachSeries, config, context, opts);
  36427. break;
  36428. }
  36429. });
  36430. }
  36431. return {
  36432. yAxisPoints: yAxisPoints,
  36433. calPoints: calPoints,
  36434. eachSpacing: eachSpacing
  36435. };
  36436. }
  36437. function drawCandleDataPoints(series, seriesMA, opts, config, context) {
  36438. var process = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 1;
  36439. var candleOption = assign({}, {
  36440. color: {},
  36441. average: {}
  36442. }, opts.extra.candle);
  36443. candleOption.color = assign({}, {
  36444. upLine: '#f04864',
  36445. upFill: '#f04864',
  36446. downLine: '#2fc25b',
  36447. downFill: '#2fc25b'
  36448. }, candleOption.color);
  36449. candleOption.average = assign({}, {
  36450. show: false,
  36451. name: [],
  36452. day: [],
  36453. color: config.color
  36454. }, candleOption.average);
  36455. opts.extra.candle = candleOption;
  36456. var xAxisData = opts.chartData.xAxisData,
  36457. xAxisPoints = xAxisData.xAxisPoints,
  36458. eachSpacing = xAxisData.eachSpacing;
  36459. var calPoints = [];
  36460. context.save();
  36461. var leftNum = -2;
  36462. var rightNum = xAxisPoints.length + 2;
  36463. var leftSpace = 0;
  36464. var rightSpace = opts.width + eachSpacing;
  36465. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  36466. context.translate(opts._scrollDistance_, 0);
  36467. leftNum = Math.floor(-opts._scrollDistance_ / eachSpacing) - 2;
  36468. rightNum = leftNum + opts.xAxis.itemCount + 4;
  36469. leftSpace = -opts._scrollDistance_ - eachSpacing * 2 + opts.area[3];
  36470. rightSpace = leftSpace + (opts.xAxis.itemCount + 4) * eachSpacing;
  36471. }
  36472. //画均线
  36473. if (candleOption.average.show || seriesMA) {
  36474. //Merge pull request !12 from 邱贵翔
  36475. seriesMA.forEach(function (eachSeries, seriesIndex) {
  36476. var ranges, minRange, maxRange;
  36477. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  36478. minRange = ranges.pop();
  36479. maxRange = ranges.shift();
  36480. var data = eachSeries.data;
  36481. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  36482. var splitPointList = splitPoints(points, eachSeries);
  36483. for (var i = 0; i < splitPointList.length; i++) {
  36484. var _points = splitPointList[i];
  36485. context.beginPath();
  36486. context.setStrokeStyle(eachSeries.color);
  36487. context.setLineWidth(1);
  36488. if (_points.length === 1) {
  36489. context.moveTo(_points[0].x, _points[0].y);
  36490. context.arc(_points[0].x, _points[0].y, 1, 0, 2 * Math.PI);
  36491. } else {
  36492. context.moveTo(_points[0].x, _points[0].y);
  36493. var startPoint = 0;
  36494. for (var j = 0; j < _points.length; j++) {
  36495. var item = _points[j];
  36496. if (startPoint == 0 && item.x > leftSpace) {
  36497. context.moveTo(item.x, item.y);
  36498. startPoint = 1;
  36499. }
  36500. if (j > 0 && item.x > leftSpace && item.x < rightSpace) {
  36501. var ctrlPoint = createCurveControlPoints(_points, j - 1);
  36502. context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y, item.x, item.y);
  36503. }
  36504. }
  36505. context.moveTo(_points[0].x, _points[0].y);
  36506. }
  36507. context.closePath();
  36508. context.stroke();
  36509. }
  36510. });
  36511. }
  36512. //画K线
  36513. series.forEach(function (eachSeries, seriesIndex) {
  36514. var ranges, minRange, maxRange;
  36515. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  36516. minRange = ranges.pop();
  36517. maxRange = ranges.shift();
  36518. var data = eachSeries.data;
  36519. var points = getCandleDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  36520. calPoints.push(points);
  36521. var splitPointList = splitPoints(points, eachSeries);
  36522. for (var i = 0; i < splitPointList[0].length; i++) {
  36523. if (i > leftNum && i < rightNum) {
  36524. var item = splitPointList[0][i];
  36525. context.beginPath();
  36526. //如果上涨
  36527. if (data[i][1] - data[i][0] > 0) {
  36528. context.setStrokeStyle(candleOption.color.upLine);
  36529. context.setFillStyle(candleOption.color.upFill);
  36530. context.setLineWidth(1 * opts.pix);
  36531. context.moveTo(item[3].x, item[3].y); //顶点
  36532. context.lineTo(item[1].x, item[1].y); //收盘中间点
  36533. context.lineTo(item[1].x - eachSpacing / 4, item[1].y); //收盘左侧点
  36534. context.lineTo(item[0].x - eachSpacing / 4, item[0].y); //开盘左侧点
  36535. context.lineTo(item[0].x, item[0].y); //开盘中间点
  36536. context.lineTo(item[2].x, item[2].y); //底点
  36537. context.lineTo(item[0].x, item[0].y); //开盘中间点
  36538. context.lineTo(item[0].x + eachSpacing / 4, item[0].y); //开盘右侧点
  36539. context.lineTo(item[1].x + eachSpacing / 4, item[1].y); //收盘右侧点
  36540. context.lineTo(item[1].x, item[1].y); //收盘中间点
  36541. context.moveTo(item[3].x, item[3].y); //顶点
  36542. } else {
  36543. context.setStrokeStyle(candleOption.color.downLine);
  36544. context.setFillStyle(candleOption.color.downFill);
  36545. context.setLineWidth(1 * opts.pix);
  36546. context.moveTo(item[3].x, item[3].y); //顶点
  36547. context.lineTo(item[0].x, item[0].y); //开盘中间点
  36548. context.lineTo(item[0].x - eachSpacing / 4, item[0].y); //开盘左侧点
  36549. context.lineTo(item[1].x - eachSpacing / 4, item[1].y); //收盘左侧点
  36550. context.lineTo(item[1].x, item[1].y); //收盘中间点
  36551. context.lineTo(item[2].x, item[2].y); //底点
  36552. context.lineTo(item[1].x, item[1].y); //收盘中间点
  36553. context.lineTo(item[1].x + eachSpacing / 4, item[1].y); //收盘右侧点
  36554. context.lineTo(item[0].x + eachSpacing / 4, item[0].y); //开盘右侧点
  36555. context.lineTo(item[0].x, item[0].y); //开盘中间点
  36556. context.moveTo(item[3].x, item[3].y); //顶点
  36557. }
  36558. context.closePath();
  36559. context.fill();
  36560. context.stroke();
  36561. }
  36562. }
  36563. });
  36564. context.restore();
  36565. return {
  36566. xAxisPoints: xAxisPoints,
  36567. calPoints: calPoints,
  36568. eachSpacing: eachSpacing
  36569. };
  36570. }
  36571. function drawAreaDataPoints(series, opts, config, context) {
  36572. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  36573. var areaOption = assign({}, {
  36574. type: 'straight',
  36575. opacity: 0.2,
  36576. addLine: false,
  36577. width: 2,
  36578. gradient: false
  36579. }, opts.extra.area);
  36580. var xAxisData = opts.chartData.xAxisData,
  36581. xAxisPoints = xAxisData.xAxisPoints,
  36582. eachSpacing = xAxisData.eachSpacing;
  36583. var endY = opts.height - opts.area[2];
  36584. var calPoints = [];
  36585. context.save();
  36586. var leftSpace = 0;
  36587. var rightSpace = opts.width + eachSpacing;
  36588. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  36589. context.translate(opts._scrollDistance_, 0);
  36590. leftSpace = -opts._scrollDistance_ - eachSpacing * 2 + opts.area[3];
  36591. rightSpace = leftSpace + (opts.xAxis.itemCount + 4) * eachSpacing;
  36592. }
  36593. series.forEach(function (eachSeries, seriesIndex) {
  36594. var ranges, minRange, maxRange;
  36595. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  36596. minRange = ranges.pop();
  36597. maxRange = ranges.shift();
  36598. var data = eachSeries.data;
  36599. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  36600. calPoints.push(points);
  36601. var splitPointList = splitPoints(points, eachSeries);
  36602. for (var i = 0; i < splitPointList.length; i++) {
  36603. var _points2 = splitPointList[i];
  36604. // 绘制区域数
  36605. context.beginPath();
  36606. context.setStrokeStyle(hexToRgb(eachSeries.color, areaOption.opacity));
  36607. if (areaOption.gradient) {
  36608. var gradient = context.createLinearGradient(0, opts.area[0], 0, opts.height - opts.area[2]);
  36609. gradient.addColorStop('0', hexToRgb(eachSeries.color, areaOption.opacity));
  36610. gradient.addColorStop('1.0', hexToRgb("#FFFFFF", 0.1));
  36611. context.setFillStyle(gradient);
  36612. } else {
  36613. context.setFillStyle(hexToRgb(eachSeries.color, areaOption.opacity));
  36614. }
  36615. context.setLineWidth(areaOption.width * opts.pix);
  36616. if (_points2.length > 1) {
  36617. var firstPoint = _points2[0];
  36618. var lastPoint = _points2[_points2.length - 1];
  36619. context.moveTo(firstPoint.x, firstPoint.y);
  36620. var startPoint = 0;
  36621. if (areaOption.type === 'curve') {
  36622. for (var j = 0; j < _points2.length; j++) {
  36623. var item = _points2[j];
  36624. if (startPoint == 0 && item.x > leftSpace) {
  36625. context.moveTo(item.x, item.y);
  36626. startPoint = 1;
  36627. }
  36628. if (j > 0 && item.x > leftSpace && item.x < rightSpace) {
  36629. var ctrlPoint = createCurveControlPoints(_points2, j - 1);
  36630. context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y, item.x, item.y);
  36631. }
  36632. }
  36633. ;
  36634. }
  36635. if (areaOption.type === 'straight') {
  36636. for (var _j = 0; _j < _points2.length; _j++) {
  36637. var _item11 = _points2[_j];
  36638. if (startPoint == 0 && _item11.x > leftSpace) {
  36639. context.moveTo(_item11.x, _item11.y);
  36640. startPoint = 1;
  36641. }
  36642. if (_j > 0 && _item11.x > leftSpace && _item11.x < rightSpace) {
  36643. context.lineTo(_item11.x, _item11.y);
  36644. }
  36645. }
  36646. ;
  36647. }
  36648. if (areaOption.type === 'step') {
  36649. for (var _j2 = 0; _j2 < _points2.length; _j2++) {
  36650. var _item12 = _points2[_j2];
  36651. if (startPoint == 0 && _item12.x > leftSpace) {
  36652. context.moveTo(_item12.x, _item12.y);
  36653. startPoint = 1;
  36654. }
  36655. if (_j2 > 0 && _item12.x > leftSpace && _item12.x < rightSpace) {
  36656. context.lineTo(_item12.x, _points2[_j2 - 1].y);
  36657. context.lineTo(_item12.x, _item12.y);
  36658. }
  36659. }
  36660. ;
  36661. }
  36662. context.lineTo(lastPoint.x, endY);
  36663. context.lineTo(firstPoint.x, endY);
  36664. context.lineTo(firstPoint.x, firstPoint.y);
  36665. } else {
  36666. var _item13 = _points2[0];
  36667. context.moveTo(_item13.x - eachSpacing / 2, _item13.y);
  36668. context.lineTo(_item13.x + eachSpacing / 2, _item13.y);
  36669. context.lineTo(_item13.x + eachSpacing / 2, endY);
  36670. context.lineTo(_item13.x - eachSpacing / 2, endY);
  36671. context.moveTo(_item13.x - eachSpacing / 2, _item13.y);
  36672. }
  36673. context.closePath();
  36674. context.fill();
  36675. //画连线
  36676. if (areaOption.addLine) {
  36677. if (eachSeries.lineType == 'dash') {
  36678. var dashLength = eachSeries.dashLength ? eachSeries.dashLength : 8;
  36679. dashLength *= opts.pix;
  36680. context.setLineDash([dashLength, dashLength]);
  36681. }
  36682. context.beginPath();
  36683. context.setStrokeStyle(eachSeries.color);
  36684. context.setLineWidth(areaOption.width * opts.pix);
  36685. if (_points2.length === 1) {
  36686. context.moveTo(_points2[0].x, _points2[0].y);
  36687. context.arc(_points2[0].x, _points2[0].y, 1, 0, 2 * Math.PI);
  36688. } else {
  36689. context.moveTo(_points2[0].x, _points2[0].y);
  36690. var _startPoint = 0;
  36691. if (areaOption.type === 'curve') {
  36692. for (var _j3 = 0; _j3 < _points2.length; _j3++) {
  36693. var _item14 = _points2[_j3];
  36694. if (_startPoint == 0 && _item14.x > leftSpace) {
  36695. context.moveTo(_item14.x, _item14.y);
  36696. _startPoint = 1;
  36697. }
  36698. if (_j3 > 0 && _item14.x > leftSpace && _item14.x < rightSpace) {
  36699. var _ctrlPoint = createCurveControlPoints(_points2, _j3 - 1);
  36700. context.bezierCurveTo(_ctrlPoint.ctrA.x, _ctrlPoint.ctrA.y, _ctrlPoint.ctrB.x, _ctrlPoint.ctrB.y, _item14.x, _item14.y);
  36701. }
  36702. }
  36703. ;
  36704. }
  36705. if (areaOption.type === 'straight') {
  36706. for (var _j4 = 0; _j4 < _points2.length; _j4++) {
  36707. var _item15 = _points2[_j4];
  36708. if (_startPoint == 0 && _item15.x > leftSpace) {
  36709. context.moveTo(_item15.x, _item15.y);
  36710. _startPoint = 1;
  36711. }
  36712. if (_j4 > 0 && _item15.x > leftSpace && _item15.x < rightSpace) {
  36713. context.lineTo(_item15.x, _item15.y);
  36714. }
  36715. }
  36716. ;
  36717. }
  36718. if (areaOption.type === 'step') {
  36719. for (var _j5 = 0; _j5 < _points2.length; _j5++) {
  36720. var _item16 = _points2[_j5];
  36721. if (_startPoint == 0 && _item16.x > leftSpace) {
  36722. context.moveTo(_item16.x, _item16.y);
  36723. _startPoint = 1;
  36724. }
  36725. if (_j5 > 0 && _item16.x > leftSpace && _item16.x < rightSpace) {
  36726. context.lineTo(_item16.x, _points2[_j5 - 1].y);
  36727. context.lineTo(_item16.x, _item16.y);
  36728. }
  36729. }
  36730. ;
  36731. }
  36732. context.moveTo(_points2[0].x, _points2[0].y);
  36733. }
  36734. context.stroke();
  36735. context.setLineDash([]);
  36736. }
  36737. }
  36738. //画点
  36739. if (opts.dataPointShape !== false) {
  36740. drawPointShape(points, eachSeries.color, eachSeries.pointShape, context, opts);
  36741. }
  36742. });
  36743. if (opts.dataLabel !== false && process === 1) {
  36744. series.forEach(function (eachSeries, seriesIndex) {
  36745. var ranges, minRange, maxRange;
  36746. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  36747. minRange = ranges.pop();
  36748. maxRange = ranges.shift();
  36749. var data = eachSeries.data;
  36750. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  36751. drawPointText(points, eachSeries, config, context, opts);
  36752. });
  36753. }
  36754. context.restore();
  36755. return {
  36756. xAxisPoints: xAxisPoints,
  36757. calPoints: calPoints,
  36758. eachSpacing: eachSpacing
  36759. };
  36760. }
  36761. function drawScatterDataPoints(series, opts, config, context) {
  36762. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  36763. var scatterOption = assign({}, {
  36764. type: 'circle'
  36765. }, opts.extra.scatter);
  36766. var xAxisData = opts.chartData.xAxisData,
  36767. xAxisPoints = xAxisData.xAxisPoints,
  36768. eachSpacing = xAxisData.eachSpacing;
  36769. var calPoints = [];
  36770. context.save();
  36771. var leftSpace = 0;
  36772. var rightSpace = opts.width + eachSpacing;
  36773. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  36774. context.translate(opts._scrollDistance_, 0);
  36775. leftSpace = -opts._scrollDistance_ - eachSpacing * 2 + opts.area[3];
  36776. rightSpace = leftSpace + (opts.xAxis.itemCount + 4) * eachSpacing;
  36777. }
  36778. series.forEach(function (eachSeries, seriesIndex) {
  36779. var ranges, minRange, maxRange;
  36780. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  36781. minRange = ranges.pop();
  36782. maxRange = ranges.shift();
  36783. var data = eachSeries.data;
  36784. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  36785. context.beginPath();
  36786. context.setStrokeStyle(eachSeries.color);
  36787. context.setFillStyle(eachSeries.color);
  36788. context.setLineWidth(1 * opts.pix);
  36789. var shape = eachSeries.pointShape;
  36790. if (shape === 'diamond') {
  36791. points.forEach(function (item, index) {
  36792. if (item !== null) {
  36793. context.moveTo(item.x, item.y - 4.5);
  36794. context.lineTo(item.x - 4.5, item.y);
  36795. context.lineTo(item.x, item.y + 4.5);
  36796. context.lineTo(item.x + 4.5, item.y);
  36797. context.lineTo(item.x, item.y - 4.5);
  36798. }
  36799. });
  36800. } else if (shape === 'circle') {
  36801. points.forEach(function (item, index) {
  36802. if (item !== null) {
  36803. context.moveTo(item.x + 2.5 * opts.pix, item.y);
  36804. context.arc(item.x, item.y, 3 * opts.pix, 0, 2 * Math.PI, false);
  36805. }
  36806. });
  36807. } else if (shape === 'square') {
  36808. points.forEach(function (item, index) {
  36809. if (item !== null) {
  36810. context.moveTo(item.x - 3.5, item.y - 3.5);
  36811. context.rect(item.x - 3.5, item.y - 3.5, 7, 7);
  36812. }
  36813. });
  36814. } else if (shape === 'triangle') {
  36815. points.forEach(function (item, index) {
  36816. if (item !== null) {
  36817. context.moveTo(item.x, item.y - 4.5);
  36818. context.lineTo(item.x - 4.5, item.y + 4.5);
  36819. context.lineTo(item.x + 4.5, item.y + 4.5);
  36820. context.lineTo(item.x, item.y - 4.5);
  36821. }
  36822. });
  36823. } else if (shape === 'triangle') {
  36824. return;
  36825. }
  36826. context.closePath();
  36827. context.fill();
  36828. context.stroke();
  36829. });
  36830. if (opts.dataLabel !== false && process === 1) {
  36831. series.forEach(function (eachSeries, seriesIndex) {
  36832. var ranges, minRange, maxRange;
  36833. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  36834. minRange = ranges.pop();
  36835. maxRange = ranges.shift();
  36836. var data = eachSeries.data;
  36837. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  36838. drawPointText(points, eachSeries, config, context, opts);
  36839. });
  36840. }
  36841. context.restore();
  36842. return {
  36843. xAxisPoints: xAxisPoints,
  36844. calPoints: calPoints,
  36845. eachSpacing: eachSpacing
  36846. };
  36847. }
  36848. function drawBubbleDataPoints(series, opts, config, context) {
  36849. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  36850. var bubbleOption = assign({}, {
  36851. opacity: 1,
  36852. border: 2
  36853. }, opts.extra.bubble);
  36854. var xAxisData = opts.chartData.xAxisData,
  36855. xAxisPoints = xAxisData.xAxisPoints,
  36856. eachSpacing = xAxisData.eachSpacing;
  36857. var calPoints = [];
  36858. context.save();
  36859. var leftSpace = 0;
  36860. var rightSpace = opts.width + eachSpacing;
  36861. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  36862. context.translate(opts._scrollDistance_, 0);
  36863. leftSpace = -opts._scrollDistance_ - eachSpacing * 2 + opts.area[3];
  36864. rightSpace = leftSpace + (opts.xAxis.itemCount + 4) * eachSpacing;
  36865. }
  36866. series.forEach(function (eachSeries, seriesIndex) {
  36867. var ranges, minRange, maxRange;
  36868. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  36869. minRange = ranges.pop();
  36870. maxRange = ranges.shift();
  36871. var data = eachSeries.data;
  36872. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  36873. context.beginPath();
  36874. context.setStrokeStyle(eachSeries.color);
  36875. context.setLineWidth(bubbleOption.border * opts.pix);
  36876. context.setFillStyle(hexToRgb(eachSeries.color, bubbleOption.opacity));
  36877. points.forEach(function (item, index) {
  36878. context.moveTo(item.x + item.r, item.y);
  36879. context.arc(item.x, item.y, item.r * opts.pix, 0, 2 * Math.PI, false);
  36880. });
  36881. context.closePath();
  36882. context.fill();
  36883. context.stroke();
  36884. if (opts.dataLabel !== false && process === 1) {
  36885. points.forEach(function (item, index) {
  36886. context.beginPath();
  36887. var fontSize = series.textSize * opts.pix || config.fontSize;
  36888. context.setFontSize(fontSize);
  36889. context.setFillStyle(series.textColor || "#FFFFFF");
  36890. context.setTextAlign('center');
  36891. context.fillText(String(item.t), item.x, item.y + fontSize / 2);
  36892. context.closePath();
  36893. context.stroke();
  36894. context.setTextAlign('left');
  36895. });
  36896. }
  36897. });
  36898. context.restore();
  36899. return {
  36900. xAxisPoints: xAxisPoints,
  36901. calPoints: calPoints,
  36902. eachSpacing: eachSpacing
  36903. };
  36904. }
  36905. function drawLineDataPoints(series, opts, config, context) {
  36906. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  36907. var lineOption = assign({}, {
  36908. type: 'straight',
  36909. width: 2
  36910. }, opts.extra.line);
  36911. lineOption.width *= opts.pix;
  36912. var xAxisData = opts.chartData.xAxisData,
  36913. xAxisPoints = xAxisData.xAxisPoints,
  36914. eachSpacing = xAxisData.eachSpacing;
  36915. var calPoints = [];
  36916. context.save();
  36917. var leftSpace = 0;
  36918. var rightSpace = opts.width + eachSpacing;
  36919. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  36920. context.translate(opts._scrollDistance_, 0);
  36921. leftSpace = -opts._scrollDistance_ - eachSpacing * 2 + opts.area[3];
  36922. rightSpace = leftSpace + (opts.xAxis.itemCount + 4) * eachSpacing;
  36923. }
  36924. series.forEach(function (eachSeries, seriesIndex) {
  36925. var ranges, minRange, maxRange;
  36926. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  36927. minRange = ranges.pop();
  36928. maxRange = ranges.shift();
  36929. var data = eachSeries.data;
  36930. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  36931. calPoints.push(points);
  36932. var splitPointList = splitPoints(points, eachSeries);
  36933. if (eachSeries.lineType == 'dash') {
  36934. var dashLength = eachSeries.dashLength ? eachSeries.dashLength : 8;
  36935. dashLength *= opts.pix;
  36936. context.setLineDash([dashLength, dashLength]);
  36937. }
  36938. context.beginPath();
  36939. context.setStrokeStyle(eachSeries.color);
  36940. context.setLineWidth(lineOption.width);
  36941. splitPointList.forEach(function (points, index) {
  36942. if (points.length === 1) {
  36943. context.moveTo(points[0].x, points[0].y);
  36944. context.arc(points[0].x, points[0].y, 1, 0, 2 * Math.PI);
  36945. } else {
  36946. context.moveTo(points[0].x, points[0].y);
  36947. var startPoint = 0;
  36948. if (lineOption.type === 'curve') {
  36949. for (var j = 0; j < points.length; j++) {
  36950. var item = points[j];
  36951. if (startPoint == 0 && item.x > leftSpace) {
  36952. context.moveTo(item.x, item.y);
  36953. startPoint = 1;
  36954. }
  36955. if (j > 0 && item.x > leftSpace && item.x < rightSpace) {
  36956. var ctrlPoint = createCurveControlPoints(points, j - 1);
  36957. context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y, item.x, item.y);
  36958. }
  36959. }
  36960. ;
  36961. }
  36962. if (lineOption.type === 'straight') {
  36963. for (var _j6 = 0; _j6 < points.length; _j6++) {
  36964. var _item17 = points[_j6];
  36965. if (startPoint == 0 && _item17.x > leftSpace) {
  36966. context.moveTo(_item17.x, _item17.y);
  36967. startPoint = 1;
  36968. }
  36969. if (_j6 > 0 && _item17.x > leftSpace && _item17.x < rightSpace) {
  36970. context.lineTo(_item17.x, _item17.y);
  36971. }
  36972. }
  36973. ;
  36974. }
  36975. if (lineOption.type === 'step') {
  36976. for (var _j7 = 0; _j7 < points.length; _j7++) {
  36977. var _item18 = points[_j7];
  36978. if (startPoint == 0 && _item18.x > leftSpace) {
  36979. context.moveTo(_item18.x, _item18.y);
  36980. startPoint = 1;
  36981. }
  36982. if (_j7 > 0 && _item18.x > leftSpace && _item18.x < rightSpace) {
  36983. context.lineTo(_item18.x, points[_j7 - 1].y);
  36984. context.lineTo(_item18.x, _item18.y);
  36985. }
  36986. }
  36987. ;
  36988. }
  36989. context.moveTo(points[0].x, points[0].y);
  36990. }
  36991. });
  36992. context.stroke();
  36993. context.setLineDash([]);
  36994. if (opts.dataPointShape !== false) {
  36995. drawPointShape(points, eachSeries.color, eachSeries.pointShape, context, opts);
  36996. }
  36997. });
  36998. if (opts.dataLabel !== false && process === 1) {
  36999. series.forEach(function (eachSeries, seriesIndex) {
  37000. var ranges, minRange, maxRange;
  37001. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  37002. minRange = ranges.pop();
  37003. maxRange = ranges.shift();
  37004. var data = eachSeries.data;
  37005. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  37006. drawPointText(points, eachSeries, config, context, opts);
  37007. });
  37008. }
  37009. context.restore();
  37010. return {
  37011. xAxisPoints: xAxisPoints,
  37012. calPoints: calPoints,
  37013. eachSpacing: eachSpacing
  37014. };
  37015. }
  37016. function drawMixDataPoints(series, opts, config, context) {
  37017. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  37018. var columnOption = assign({}, {
  37019. width: eachSpacing / 2,
  37020. barBorderCircle: false,
  37021. barBorderRadius: [],
  37022. seriesGap: 2,
  37023. linearType: 'none',
  37024. linearOpacity: 1,
  37025. customColor: [],
  37026. colorStop: 0
  37027. }, opts.extra.mix.column);
  37028. var xAxisData = opts.chartData.xAxisData,
  37029. xAxisPoints = xAxisData.xAxisPoints,
  37030. eachSpacing = xAxisData.eachSpacing;
  37031. var endY = opts.height - opts.area[2];
  37032. var calPoints = [];
  37033. var columnIndex = 0;
  37034. var columnLength = 0;
  37035. series.forEach(function (eachSeries, seriesIndex) {
  37036. if (eachSeries.type == 'column') {
  37037. columnLength += 1;
  37038. }
  37039. });
  37040. context.save();
  37041. var leftNum = -2;
  37042. var rightNum = xAxisPoints.length + 2;
  37043. var leftSpace = 0;
  37044. var rightSpace = opts.width + eachSpacing;
  37045. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  37046. context.translate(opts._scrollDistance_, 0);
  37047. leftNum = Math.floor(-opts._scrollDistance_ / eachSpacing) - 2;
  37048. rightNum = leftNum + opts.xAxis.itemCount + 4;
  37049. leftSpace = -opts._scrollDistance_ - eachSpacing * 2 + opts.area[3];
  37050. rightSpace = leftSpace + (opts.xAxis.itemCount + 4) * eachSpacing;
  37051. }
  37052. columnOption.customColor = fillCustomColor(columnOption.linearType, columnOption.customColor, series, config);
  37053. series.forEach(function (eachSeries, seriesIndex) {
  37054. var ranges, minRange, maxRange;
  37055. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  37056. minRange = ranges.pop();
  37057. maxRange = ranges.shift();
  37058. var data = eachSeries.data;
  37059. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  37060. calPoints.push(points);
  37061. // 绘制柱状数据图
  37062. if (eachSeries.type == 'column') {
  37063. points = fixColumeData(points, eachSpacing, columnLength, columnIndex, config, opts);
  37064. for (var i = 0; i < points.length; i++) {
  37065. var item = points[i];
  37066. if (item !== null && i > leftNum && i < rightNum) {
  37067. var startX = item.x - item.width / 2;
  37068. var height = opts.height - item.y - opts.area[2];
  37069. context.beginPath();
  37070. var fillColor = item.color || eachSeries.color;
  37071. var strokeColor = item.color || eachSeries.color;
  37072. if (columnOption.linearType !== 'none') {
  37073. var grd = context.createLinearGradient(startX, item.y, startX, opts.height - opts.area[2]);
  37074. //透明渐变
  37075. if (columnOption.linearType == 'opacity') {
  37076. grd.addColorStop(0, hexToRgb(fillColor, columnOption.linearOpacity));
  37077. grd.addColorStop(1, hexToRgb(fillColor, 1));
  37078. } else {
  37079. grd.addColorStop(0, hexToRgb(columnOption.customColor[eachSeries.linearIndex], columnOption.linearOpacity));
  37080. grd.addColorStop(columnOption.colorStop, hexToRgb(columnOption.customColor[eachSeries.linearIndex], columnOption.linearOpacity));
  37081. grd.addColorStop(1, hexToRgb(fillColor, 1));
  37082. }
  37083. fillColor = grd;
  37084. }
  37085. // 圆角边框
  37086. if (columnOption.barBorderRadius && columnOption.barBorderRadius.length === 4 || columnOption.barBorderCircle) {
  37087. var left = startX;
  37088. var top = item.y;
  37089. var width = item.width;
  37090. var _height3 = opts.height - opts.area[2] - item.y;
  37091. if (columnOption.barBorderCircle) {
  37092. columnOption.barBorderRadius = [width / 2, width / 2, 0, 0];
  37093. }
  37094. var _columnOption$barBord3 = (0, _slicedToArray2.default)(columnOption.barBorderRadius, 4),
  37095. r0 = _columnOption$barBord3[0],
  37096. r1 = _columnOption$barBord3[1],
  37097. r2 = _columnOption$barBord3[2],
  37098. r3 = _columnOption$barBord3[3];
  37099. var minRadius = Math.min(width / 2, _height3 / 2);
  37100. r0 = r0 > minRadius ? minRadius : r0;
  37101. r1 = r1 > minRadius ? minRadius : r1;
  37102. r2 = r2 > minRadius ? minRadius : r2;
  37103. r3 = r3 > minRadius ? minRadius : r3;
  37104. r0 = r0 < 0 ? 0 : r0;
  37105. r1 = r1 < 0 ? 0 : r1;
  37106. r2 = r2 < 0 ? 0 : r2;
  37107. r3 = r3 < 0 ? 0 : r3;
  37108. context.arc(left + r0, top + r0, r0, -Math.PI, -Math.PI / 2);
  37109. context.arc(left + width - r1, top + r1, r1, -Math.PI / 2, 0);
  37110. context.arc(left + width - r2, top + _height3 - r2, r2, 0, Math.PI / 2);
  37111. context.arc(left + r3, top + _height3 - r3, r3, Math.PI / 2, Math.PI);
  37112. } else {
  37113. context.moveTo(startX, item.y);
  37114. context.lineTo(startX + item.width - 2, item.y);
  37115. context.lineTo(startX + item.width - 2, opts.height - opts.area[2]);
  37116. context.lineTo(startX, opts.height - opts.area[2]);
  37117. context.lineTo(startX, item.y);
  37118. context.setLineWidth(1);
  37119. context.setStrokeStyle(strokeColor);
  37120. }
  37121. context.setFillStyle(fillColor);
  37122. context.closePath();
  37123. context.fill();
  37124. }
  37125. }
  37126. columnIndex += 1;
  37127. }
  37128. //绘制区域图数据
  37129. if (eachSeries.type == 'area') {
  37130. var _splitPointList = splitPoints(points, eachSeries);
  37131. for (var _i20 = 0; _i20 < _splitPointList.length; _i20++) {
  37132. var _points3 = _splitPointList[_i20];
  37133. // 绘制区域数据
  37134. context.beginPath();
  37135. context.setStrokeStyle(eachSeries.color);
  37136. context.setFillStyle(hexToRgb(eachSeries.color, 0.2));
  37137. context.setLineWidth(2 * opts.pix);
  37138. if (_points3.length > 1) {
  37139. var firstPoint = _points3[0];
  37140. var lastPoint = _points3[_points3.length - 1];
  37141. context.moveTo(firstPoint.x, firstPoint.y);
  37142. var startPoint = 0;
  37143. if (eachSeries.style === 'curve') {
  37144. for (var j = 0; j < _points3.length; j++) {
  37145. var _item19 = _points3[j];
  37146. if (startPoint == 0 && _item19.x > leftSpace) {
  37147. context.moveTo(_item19.x, _item19.y);
  37148. startPoint = 1;
  37149. }
  37150. if (j > 0 && _item19.x > leftSpace && _item19.x < rightSpace) {
  37151. var ctrlPoint = createCurveControlPoints(_points3, j - 1);
  37152. context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y, _item19.x, _item19.y);
  37153. }
  37154. }
  37155. ;
  37156. } else {
  37157. for (var _j8 = 0; _j8 < _points3.length; _j8++) {
  37158. var _item20 = _points3[_j8];
  37159. if (startPoint == 0 && _item20.x > leftSpace) {
  37160. context.moveTo(_item20.x, _item20.y);
  37161. startPoint = 1;
  37162. }
  37163. if (_j8 > 0 && _item20.x > leftSpace && _item20.x < rightSpace) {
  37164. context.lineTo(_item20.x, _item20.y);
  37165. }
  37166. }
  37167. ;
  37168. }
  37169. context.lineTo(lastPoint.x, endY);
  37170. context.lineTo(firstPoint.x, endY);
  37171. context.lineTo(firstPoint.x, firstPoint.y);
  37172. } else {
  37173. var _item21 = _points3[0];
  37174. context.moveTo(_item21.x - eachSpacing / 2, _item21.y);
  37175. context.lineTo(_item21.x + eachSpacing / 2, _item21.y);
  37176. context.lineTo(_item21.x + eachSpacing / 2, endY);
  37177. context.lineTo(_item21.x - eachSpacing / 2, endY);
  37178. context.moveTo(_item21.x - eachSpacing / 2, _item21.y);
  37179. }
  37180. context.closePath();
  37181. context.fill();
  37182. }
  37183. }
  37184. // 绘制折线数据图
  37185. if (eachSeries.type == 'line') {
  37186. var splitPointList = splitPoints(points, eachSeries);
  37187. splitPointList.forEach(function (points, index) {
  37188. if (eachSeries.lineType == 'dash') {
  37189. var dashLength = eachSeries.dashLength ? eachSeries.dashLength : 8;
  37190. dashLength *= opts.pix;
  37191. context.setLineDash([dashLength, dashLength]);
  37192. }
  37193. context.beginPath();
  37194. context.setStrokeStyle(eachSeries.color);
  37195. context.setLineWidth(2 * opts.pix);
  37196. if (points.length === 1) {
  37197. context.moveTo(points[0].x, points[0].y);
  37198. context.arc(points[0].x, points[0].y, 1, 0, 2 * Math.PI);
  37199. } else {
  37200. context.moveTo(points[0].x, points[0].y);
  37201. var _startPoint2 = 0;
  37202. if (eachSeries.style == 'curve') {
  37203. for (var _j9 = 0; _j9 < points.length; _j9++) {
  37204. var _item22 = points[_j9];
  37205. if (_startPoint2 == 0 && _item22.x > leftSpace) {
  37206. context.moveTo(_item22.x, _item22.y);
  37207. _startPoint2 = 1;
  37208. }
  37209. if (_j9 > 0 && _item22.x > leftSpace && _item22.x < rightSpace) {
  37210. var ctrlPoint = createCurveControlPoints(points, _j9 - 1);
  37211. context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y, _item22.x, _item22.y);
  37212. }
  37213. }
  37214. } else {
  37215. for (var _j10 = 0; _j10 < points.length; _j10++) {
  37216. var _item23 = points[_j10];
  37217. if (_startPoint2 == 0 && _item23.x > leftSpace) {
  37218. context.moveTo(_item23.x, _item23.y);
  37219. _startPoint2 = 1;
  37220. }
  37221. if (_j10 > 0 && _item23.x > leftSpace && _item23.x < rightSpace) {
  37222. context.lineTo(_item23.x, _item23.y);
  37223. }
  37224. }
  37225. }
  37226. context.moveTo(points[0].x, points[0].y);
  37227. }
  37228. context.stroke();
  37229. context.setLineDash([]);
  37230. });
  37231. }
  37232. // 绘制点数据图
  37233. if (eachSeries.type == 'point') {
  37234. eachSeries.addPoint = true;
  37235. }
  37236. if (eachSeries.addPoint == true && eachSeries.type !== 'column') {
  37237. drawPointShape(points, eachSeries.color, eachSeries.pointShape, context, opts);
  37238. }
  37239. });
  37240. if (opts.dataLabel !== false && process === 1) {
  37241. var columnIndex = 0;
  37242. series.forEach(function (eachSeries, seriesIndex) {
  37243. var ranges, minRange, maxRange;
  37244. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  37245. minRange = ranges.pop();
  37246. maxRange = ranges.shift();
  37247. var data = eachSeries.data;
  37248. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  37249. if (eachSeries.type !== 'column') {
  37250. drawPointText(points, eachSeries, config, context, opts);
  37251. } else {
  37252. points = fixColumeData(points, eachSpacing, columnLength, columnIndex, config, opts);
  37253. drawPointText(points, eachSeries, config, context, opts);
  37254. columnIndex += 1;
  37255. }
  37256. });
  37257. }
  37258. context.restore();
  37259. return {
  37260. xAxisPoints: xAxisPoints,
  37261. calPoints: calPoints,
  37262. eachSpacing: eachSpacing
  37263. };
  37264. }
  37265. function drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints) {
  37266. var toolTipOption = opts.extra.tooltip || {};
  37267. if (toolTipOption.horizentalLine && opts.tooltip && process === 1 && (opts.type == 'line' || opts.type == 'area' || opts.type == 'column' || opts.type == 'candle' || opts.type == 'mix')) {
  37268. drawToolTipHorizentalLine(opts, config, context, eachSpacing, xAxisPoints);
  37269. }
  37270. context.save();
  37271. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  37272. context.translate(opts._scrollDistance_, 0);
  37273. }
  37274. if (opts.tooltip && opts.tooltip.textList && opts.tooltip.textList.length && process === 1) {
  37275. drawToolTip(opts.tooltip.textList, opts.tooltip.offset, opts, config, context, eachSpacing, xAxisPoints);
  37276. }
  37277. context.restore();
  37278. }
  37279. function drawXAxis(categories, opts, config, context) {
  37280. var xAxisData = opts.chartData.xAxisData,
  37281. xAxisPoints = xAxisData.xAxisPoints,
  37282. startX = xAxisData.startX,
  37283. endX = xAxisData.endX,
  37284. eachSpacing = xAxisData.eachSpacing;
  37285. var boundaryGap = 'center';
  37286. if (opts.type == 'bar' || opts.type == 'line' || opts.type == 'area' || opts.type == 'scatter' || opts.type == 'bubble') {
  37287. boundaryGap = opts.xAxis.boundaryGap;
  37288. }
  37289. var startY = opts.height - opts.area[2];
  37290. var endY = opts.area[0];
  37291. //绘制滚动条
  37292. if (opts.enableScroll && opts.xAxis.scrollShow) {
  37293. var scrollY = opts.height - opts.area[2] + config.xAxisHeight;
  37294. var scrollScreenWidth = endX - startX;
  37295. var scrollTotalWidth = eachSpacing * (xAxisPoints.length - 1);
  37296. var scrollWidth = scrollScreenWidth * scrollScreenWidth / scrollTotalWidth;
  37297. var scrollLeft = 0;
  37298. if (opts._scrollDistance_) {
  37299. scrollLeft = -opts._scrollDistance_ * scrollScreenWidth / scrollTotalWidth;
  37300. }
  37301. context.beginPath();
  37302. context.setLineCap('round');
  37303. context.setLineWidth(6 * opts.pix);
  37304. context.setStrokeStyle(opts.xAxis.scrollBackgroundColor || "#EFEBEF");
  37305. context.moveTo(startX, scrollY);
  37306. context.lineTo(endX, scrollY);
  37307. context.stroke();
  37308. context.closePath();
  37309. context.beginPath();
  37310. context.setLineCap('round');
  37311. context.setLineWidth(6 * opts.pix);
  37312. context.setStrokeStyle(opts.xAxis.scrollColor || "#A6A6A6");
  37313. context.moveTo(startX + scrollLeft, scrollY);
  37314. context.lineTo(startX + scrollLeft + scrollWidth, scrollY);
  37315. context.stroke();
  37316. context.closePath();
  37317. context.setLineCap('butt');
  37318. }
  37319. context.save();
  37320. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0) {
  37321. context.translate(opts._scrollDistance_, 0);
  37322. }
  37323. //绘制X轴刻度线
  37324. if (opts.xAxis.calibration === true) {
  37325. context.setStrokeStyle(opts.xAxis.gridColor || "#cccccc");
  37326. context.setLineCap('butt');
  37327. context.setLineWidth(1 * opts.pix);
  37328. xAxisPoints.forEach(function (item, index) {
  37329. if (index > 0) {
  37330. context.beginPath();
  37331. context.moveTo(item - eachSpacing / 2, startY);
  37332. context.lineTo(item - eachSpacing / 2, startY + 3 * opts.pix);
  37333. context.closePath();
  37334. context.stroke();
  37335. }
  37336. });
  37337. }
  37338. //绘制X轴网格
  37339. if (opts.xAxis.disableGrid !== true) {
  37340. context.setStrokeStyle(opts.xAxis.gridColor || "#cccccc");
  37341. context.setLineCap('butt');
  37342. context.setLineWidth(1 * opts.pix);
  37343. if (opts.xAxis.gridType == 'dash') {
  37344. context.setLineDash([opts.xAxis.dashLength * opts.pix, opts.xAxis.dashLength * opts.pix]);
  37345. }
  37346. opts.xAxis.gridEval = opts.xAxis.gridEval || 1;
  37347. xAxisPoints.forEach(function (item, index) {
  37348. if (index % opts.xAxis.gridEval == 0) {
  37349. context.beginPath();
  37350. context.moveTo(item, startY);
  37351. context.lineTo(item, endY);
  37352. context.stroke();
  37353. }
  37354. });
  37355. context.setLineDash([]);
  37356. }
  37357. //绘制X轴文案
  37358. if (opts.xAxis.disabled !== true) {
  37359. // 对X轴列表做抽稀处理
  37360. //默认全部显示X轴标签
  37361. var maxXAxisListLength = categories.length;
  37362. //如果设置了X轴单屏数量
  37363. if (opts.xAxis.labelCount) {
  37364. //如果设置X轴密度
  37365. if (opts.xAxis.itemCount) {
  37366. maxXAxisListLength = Math.ceil(categories.length / opts.xAxis.itemCount * opts.xAxis.labelCount);
  37367. } else {
  37368. maxXAxisListLength = opts.xAxis.labelCount;
  37369. }
  37370. maxXAxisListLength -= 1;
  37371. }
  37372. var ratio = Math.ceil(categories.length / maxXAxisListLength);
  37373. var newCategories = [];
  37374. var cgLength = categories.length;
  37375. for (var i = 0; i < cgLength; i++) {
  37376. if (i % ratio !== 0) {
  37377. newCategories.push("");
  37378. } else {
  37379. newCategories.push(categories[i]);
  37380. }
  37381. }
  37382. newCategories[cgLength - 1] = categories[cgLength - 1];
  37383. var xAxisFontSize = opts.xAxis.fontSize * opts.pix || config.fontSize;
  37384. if (config._xAxisTextAngle_ === 0) {
  37385. newCategories.forEach(function (item, index) {
  37386. var xitem = opts.xAxis.formatter ? opts.xAxis.formatter(item) : item;
  37387. var offset = -measureText(String(xitem), xAxisFontSize, context) / 2;
  37388. if (boundaryGap == 'center') {
  37389. offset += eachSpacing / 2;
  37390. }
  37391. var scrollHeight = 0;
  37392. if (opts.xAxis.scrollShow) {
  37393. scrollHeight = 6 * opts.pix;
  37394. }
  37395. context.beginPath();
  37396. context.setFontSize(xAxisFontSize);
  37397. context.setFillStyle(opts.xAxis.fontColor || opts.fontColor);
  37398. context.fillText(String(xitem), xAxisPoints[index] + offset, startY + xAxisFontSize + (config.xAxisHeight - scrollHeight - xAxisFontSize) / 2);
  37399. context.closePath();
  37400. context.stroke();
  37401. });
  37402. } else {
  37403. newCategories.forEach(function (item, index) {
  37404. var xitem = opts.xAxis.formatter ? opts.xAxis.formatter(item) : item;
  37405. context.save();
  37406. context.beginPath();
  37407. context.setFontSize(xAxisFontSize);
  37408. context.setFillStyle(opts.xAxis.fontColor || opts.fontColor);
  37409. var textWidth = measureText(String(xitem), xAxisFontSize, context);
  37410. var offset = -textWidth;
  37411. if (boundaryGap == 'center') {
  37412. offset += eachSpacing / 2;
  37413. }
  37414. var _calRotateTranslate = calRotateTranslate(xAxisPoints[index] + eachSpacing / 2, startY + xAxisFontSize / 2 + 5, opts.height),
  37415. transX = _calRotateTranslate.transX,
  37416. transY = _calRotateTranslate.transY;
  37417. context.rotate(-1 * config._xAxisTextAngle_);
  37418. context.translate(transX, transY);
  37419. context.fillText(String(xitem), xAxisPoints[index] + offset, startY + xAxisFontSize + 5);
  37420. context.closePath();
  37421. context.stroke();
  37422. context.restore();
  37423. });
  37424. }
  37425. }
  37426. context.restore();
  37427. //绘制X轴轴线
  37428. if (opts.xAxis.axisLine) {
  37429. context.beginPath();
  37430. context.setStrokeStyle(opts.xAxis.axisLineColor);
  37431. context.setLineWidth(1 * opts.pix);
  37432. context.moveTo(startX, opts.height - opts.area[2]);
  37433. context.lineTo(endX, opts.height - opts.area[2]);
  37434. context.stroke();
  37435. }
  37436. }
  37437. function drawYAxisGrid(categories, opts, config, context) {
  37438. if (opts.yAxis.disableGrid === true) {
  37439. return;
  37440. }
  37441. var spacingValid = opts.height - opts.area[0] - opts.area[2];
  37442. var eachSpacing = spacingValid / opts.yAxis.splitNumber;
  37443. var startX = opts.area[3];
  37444. var xAxisPoints = opts.chartData.xAxisData.xAxisPoints,
  37445. xAxiseachSpacing = opts.chartData.xAxisData.eachSpacing;
  37446. var TotalWidth = xAxiseachSpacing * (xAxisPoints.length - 1);
  37447. var endX = startX + TotalWidth;
  37448. var points = [];
  37449. var startY = 1;
  37450. if (opts.xAxis.axisLine === false) {
  37451. startY = 0;
  37452. }
  37453. for (var i = startY; i < opts.yAxis.splitNumber + 1; i++) {
  37454. points.push(opts.height - opts.area[2] - eachSpacing * i);
  37455. }
  37456. context.save();
  37457. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0) {
  37458. context.translate(opts._scrollDistance_, 0);
  37459. }
  37460. if (opts.yAxis.gridType == 'dash') {
  37461. context.setLineDash([opts.yAxis.dashLength * opts.pix, opts.yAxis.dashLength * opts.pix]);
  37462. }
  37463. context.setStrokeStyle(opts.yAxis.gridColor);
  37464. context.setLineWidth(1 * opts.pix);
  37465. points.forEach(function (item, index) {
  37466. context.beginPath();
  37467. context.moveTo(startX, item);
  37468. context.lineTo(endX, item);
  37469. context.stroke();
  37470. });
  37471. context.setLineDash([]);
  37472. context.restore();
  37473. }
  37474. function drawYAxis(series, opts, config, context) {
  37475. if (opts.yAxis.disabled === true) {
  37476. return;
  37477. }
  37478. var spacingValid = opts.height - opts.area[0] - opts.area[2];
  37479. var eachSpacing = spacingValid / opts.yAxis.splitNumber;
  37480. var startX = opts.area[3];
  37481. var endX = opts.width - opts.area[1];
  37482. var endY = opts.height - opts.area[2];
  37483. var fillEndY = endY + config.xAxisHeight;
  37484. if (opts.xAxis.scrollShow) {
  37485. fillEndY -= 3 * opts.pix;
  37486. }
  37487. if (opts.xAxis.rotateLabel) {
  37488. fillEndY = opts.height - opts.area[2] + opts.fontSize * opts.pix / 2;
  37489. }
  37490. // set YAxis background
  37491. context.beginPath();
  37492. context.setFillStyle(opts.background);
  37493. if (opts.enableScroll == true && opts.xAxis.scrollPosition && opts.xAxis.scrollPosition !== 'left') {
  37494. context.fillRect(0, 0, startX, fillEndY);
  37495. }
  37496. if (opts.enableScroll == true && opts.xAxis.scrollPosition && opts.xAxis.scrollPosition !== 'right') {
  37497. context.fillRect(endX, 0, opts.width, fillEndY);
  37498. }
  37499. context.closePath();
  37500. context.stroke();
  37501. var tStartLeft = opts.area[3];
  37502. var tStartRight = opts.width - opts.area[1];
  37503. var tStartCenter = opts.area[3] + (opts.width - opts.area[1] - opts.area[3]) / 2;
  37504. if (opts.yAxis.data) {
  37505. var _loop4 = function _loop4(i) {
  37506. var yData = opts.yAxis.data[i];
  37507. points = [];
  37508. if (yData.type === 'categories') {
  37509. for (var _i21 = 0; _i21 <= yData.categories.length; _i21++) {
  37510. points.push(opts.area[0] + spacingValid / yData.categories.length / 2 + spacingValid / yData.categories.length * _i21);
  37511. }
  37512. } else {
  37513. for (var _i22 = 0; _i22 <= opts.yAxis.splitNumber; _i22++) {
  37514. points.push(opts.area[0] + eachSpacing * _i22);
  37515. }
  37516. }
  37517. if (yData.disabled !== true) {
  37518. var rangesFormat = opts.chartData.yAxisData.rangesFormat[i];
  37519. var yAxisFontSize = yData.fontSize ? yData.fontSize * opts.pix : config.fontSize;
  37520. var yAxisWidth = opts.chartData.yAxisData.yAxisWidth[i];
  37521. var textAlign = yData.textAlign || "right";
  37522. //画Y轴刻度及文案
  37523. rangesFormat.forEach(function (item, index) {
  37524. var pos = points[index] ? points[index] : endY;
  37525. context.beginPath();
  37526. context.setFontSize(yAxisFontSize);
  37527. context.setLineWidth(1 * opts.pix);
  37528. context.setStrokeStyle(yData.axisLineColor || '#cccccc');
  37529. context.setFillStyle(yData.fontColor || opts.fontColor);
  37530. var tmpstrat = 0;
  37531. var gapwidth = 4 * opts.pix;
  37532. if (yAxisWidth.position == 'left') {
  37533. //画刻度线
  37534. if (yData.calibration == true) {
  37535. context.moveTo(tStartLeft, pos);
  37536. context.lineTo(tStartLeft - 3 * opts.pix, pos);
  37537. gapwidth += 3 * opts.pix;
  37538. }
  37539. //画文字
  37540. switch (textAlign) {
  37541. case "left":
  37542. context.setTextAlign('left');
  37543. tmpstrat = tStartLeft - yAxisWidth.width;
  37544. break;
  37545. case "right":
  37546. context.setTextAlign('right');
  37547. tmpstrat = tStartLeft - gapwidth;
  37548. break;
  37549. default:
  37550. context.setTextAlign('center');
  37551. tmpstrat = tStartLeft - yAxisWidth.width / 2;
  37552. }
  37553. context.fillText(String(item), tmpstrat, pos + yAxisFontSize / 2 - 3 * opts.pix);
  37554. } else if (yAxisWidth.position == 'right') {
  37555. //画刻度线
  37556. if (yData.calibration == true) {
  37557. context.moveTo(tStartRight, pos);
  37558. context.lineTo(tStartRight + 3 * opts.pix, pos);
  37559. gapwidth += 3 * opts.pix;
  37560. }
  37561. switch (textAlign) {
  37562. case "left":
  37563. context.setTextAlign('left');
  37564. tmpstrat = tStartRight + gapwidth;
  37565. break;
  37566. case "right":
  37567. context.setTextAlign('right');
  37568. tmpstrat = tStartRight + yAxisWidth.width;
  37569. break;
  37570. default:
  37571. context.setTextAlign('center');
  37572. tmpstrat = tStartRight + yAxisWidth.width / 2;
  37573. }
  37574. context.fillText(String(item), tmpstrat, pos + yAxisFontSize / 2 - 3 * opts.pix);
  37575. } else if (yAxisWidth.position == 'center') {
  37576. //画刻度线
  37577. if (yData.calibration == true) {
  37578. context.moveTo(tStartCenter, pos);
  37579. context.lineTo(tStartCenter - 3 * opts.pix, pos);
  37580. gapwidth += 3 * opts.pix;
  37581. }
  37582. //画文字
  37583. switch (textAlign) {
  37584. case "left":
  37585. context.setTextAlign('left');
  37586. tmpstrat = tStartCenter - yAxisWidth.width;
  37587. break;
  37588. case "right":
  37589. context.setTextAlign('right');
  37590. tmpstrat = tStartCenter - gapwidth;
  37591. break;
  37592. default:
  37593. context.setTextAlign('center');
  37594. tmpstrat = tStartCenter - yAxisWidth.width / 2;
  37595. }
  37596. context.fillText(String(item), tmpstrat, pos + yAxisFontSize / 2 - 3 * opts.pix);
  37597. }
  37598. context.closePath();
  37599. context.stroke();
  37600. context.setTextAlign('left');
  37601. });
  37602. //画Y轴轴线
  37603. if (yData.axisLine !== false) {
  37604. context.beginPath();
  37605. context.setStrokeStyle(yData.axisLineColor || '#cccccc');
  37606. context.setLineWidth(1 * opts.pix);
  37607. if (yAxisWidth.position == 'left') {
  37608. context.moveTo(tStartLeft, opts.height - opts.area[2]);
  37609. context.lineTo(tStartLeft, opts.area[0]);
  37610. } else if (yAxisWidth.position == 'right') {
  37611. context.moveTo(tStartRight, opts.height - opts.area[2]);
  37612. context.lineTo(tStartRight, opts.area[0]);
  37613. } else if (yAxisWidth.position == 'center') {
  37614. context.moveTo(tStartCenter, opts.height - opts.area[2]);
  37615. context.lineTo(tStartCenter, opts.area[0]);
  37616. }
  37617. context.stroke();
  37618. }
  37619. //画Y轴标题
  37620. if (opts.yAxis.showTitle) {
  37621. var titleFontSize = yData.titleFontSize * opts.pix || config.fontSize;
  37622. var title = yData.title;
  37623. context.beginPath();
  37624. context.setFontSize(titleFontSize);
  37625. context.setFillStyle(yData.titleFontColor || opts.fontColor);
  37626. if (yAxisWidth.position == 'left') {
  37627. context.fillText(title, tStartLeft - measureText(title, titleFontSize, context) / 2 + (yData.titleOffsetX || 0), opts.area[0] - (10 - (yData.titleOffsetY || 0)) * opts.pix);
  37628. } else if (yAxisWidth.position == 'right') {
  37629. context.fillText(title, tStartRight - measureText(title, titleFontSize, context) / 2 + (yData.titleOffsetX || 0), opts.area[0] - (10 - (yData.titleOffsetY || 0)) * opts.pix);
  37630. } else if (yAxisWidth.position == 'center') {
  37631. context.fillText(title, tStartCenter - measureText(title, titleFontSize, context) / 2 + (yData.titleOffsetX || 0), opts.area[0] - (10 - (yData.titleOffsetY || 0)) * opts.pix);
  37632. }
  37633. context.closePath();
  37634. context.stroke();
  37635. }
  37636. if (yAxisWidth.position == 'left') {
  37637. tStartLeft -= yAxisWidth.width + opts.yAxis.padding * opts.pix;
  37638. } else {
  37639. tStartRight += yAxisWidth.width + opts.yAxis.padding * opts.pix;
  37640. }
  37641. }
  37642. };
  37643. for (var i = 0; i < opts.yAxis.data.length; i++) {
  37644. var points;
  37645. _loop4(i);
  37646. }
  37647. }
  37648. }
  37649. function drawLegend(series, opts, config, context, chartData) {
  37650. if (opts.legend.show === false) {
  37651. return;
  37652. }
  37653. var legendData = chartData.legendData;
  37654. var legendList = legendData.points;
  37655. var legendArea = legendData.area;
  37656. var padding = opts.legend.padding * opts.pix;
  37657. var fontSize = opts.legend.fontSize * opts.pix;
  37658. var shapeWidth = 15 * opts.pix;
  37659. var shapeRight = 5 * opts.pix;
  37660. var itemGap = opts.legend.itemGap * opts.pix;
  37661. var lineHeight = Math.max(opts.legend.lineHeight * opts.pix, fontSize);
  37662. //画背景及边框
  37663. context.beginPath();
  37664. context.setLineWidth(opts.legend.borderWidth * opts.pix);
  37665. context.setStrokeStyle(opts.legend.borderColor);
  37666. context.setFillStyle(opts.legend.backgroundColor);
  37667. context.moveTo(legendArea.start.x, legendArea.start.y);
  37668. context.rect(legendArea.start.x, legendArea.start.y, legendArea.width, legendArea.height);
  37669. context.closePath();
  37670. context.fill();
  37671. context.stroke();
  37672. legendList.forEach(function (itemList, listIndex) {
  37673. var width = 0;
  37674. var height = 0;
  37675. width = legendData.widthArr[listIndex];
  37676. height = legendData.heightArr[listIndex];
  37677. var startX = 0;
  37678. var startY = 0;
  37679. if (opts.legend.position == 'top' || opts.legend.position == 'bottom') {
  37680. switch (opts.legend.float) {
  37681. case 'left':
  37682. startX = legendArea.start.x + padding;
  37683. break;
  37684. case 'right':
  37685. startX = legendArea.start.x + legendArea.width - width;
  37686. break;
  37687. default:
  37688. startX = legendArea.start.x + (legendArea.width - width) / 2;
  37689. }
  37690. startY = legendArea.start.y + padding + listIndex * lineHeight;
  37691. } else {
  37692. if (listIndex == 0) {
  37693. width = 0;
  37694. } else {
  37695. width = legendData.widthArr[listIndex - 1];
  37696. }
  37697. startX = legendArea.start.x + padding + width;
  37698. startY = legendArea.start.y + padding + (legendArea.height - height) / 2;
  37699. }
  37700. context.setFontSize(config.fontSize);
  37701. for (var i = 0; i < itemList.length; i++) {
  37702. var item = itemList[i];
  37703. item.area = [0, 0, 0, 0];
  37704. item.area[0] = startX;
  37705. item.area[1] = startY;
  37706. item.area[3] = startY + lineHeight;
  37707. context.beginPath();
  37708. context.setLineWidth(1 * opts.pix);
  37709. context.setStrokeStyle(item.show ? item.color : opts.legend.hiddenColor);
  37710. context.setFillStyle(item.show ? item.color : opts.legend.hiddenColor);
  37711. switch (item.legendShape) {
  37712. case 'line':
  37713. context.moveTo(startX, startY + 0.5 * lineHeight - 2 * opts.pix);
  37714. context.fillRect(startX, startY + 0.5 * lineHeight - 2 * opts.pix, 15 * opts.pix, 4 * opts.pix);
  37715. break;
  37716. case 'triangle':
  37717. context.moveTo(startX + 7.5 * opts.pix, startY + 0.5 * lineHeight - 5 * opts.pix);
  37718. context.lineTo(startX + 2.5 * opts.pix, startY + 0.5 * lineHeight + 5 * opts.pix);
  37719. context.lineTo(startX + 12.5 * opts.pix, startY + 0.5 * lineHeight + 5 * opts.pix);
  37720. context.lineTo(startX + 7.5 * opts.pix, startY + 0.5 * lineHeight - 5 * opts.pix);
  37721. break;
  37722. case 'diamond':
  37723. context.moveTo(startX + 7.5 * opts.pix, startY + 0.5 * lineHeight - 5 * opts.pix);
  37724. context.lineTo(startX + 2.5 * opts.pix, startY + 0.5 * lineHeight);
  37725. context.lineTo(startX + 7.5 * opts.pix, startY + 0.5 * lineHeight + 5 * opts.pix);
  37726. context.lineTo(startX + 12.5 * opts.pix, startY + 0.5 * lineHeight);
  37727. context.lineTo(startX + 7.5 * opts.pix, startY + 0.5 * lineHeight - 5 * opts.pix);
  37728. break;
  37729. case 'circle':
  37730. context.moveTo(startX + 7.5 * opts.pix, startY + 0.5 * lineHeight);
  37731. context.arc(startX + 7.5 * opts.pix, startY + 0.5 * lineHeight, 5 * opts.pix, 0, 2 * Math.PI);
  37732. break;
  37733. case 'rect':
  37734. context.moveTo(startX, startY + 0.5 * lineHeight - 5 * opts.pix);
  37735. context.fillRect(startX, startY + 0.5 * lineHeight - 5 * opts.pix, 15 * opts.pix, 10 * opts.pix);
  37736. break;
  37737. case 'square':
  37738. context.moveTo(startX + 5 * opts.pix, startY + 0.5 * lineHeight - 5 * opts.pix);
  37739. context.fillRect(startX + 5 * opts.pix, startY + 0.5 * lineHeight - 5 * opts.pix, 10 * opts.pix, 10 * opts.pix);
  37740. break;
  37741. case 'none':
  37742. break;
  37743. default:
  37744. context.moveTo(startX, startY + 0.5 * lineHeight - 5 * opts.pix);
  37745. context.fillRect(startX, startY + 0.5 * lineHeight - 5 * opts.pix, 15 * opts.pix, 10 * opts.pix);
  37746. }
  37747. context.closePath();
  37748. context.fill();
  37749. context.stroke();
  37750. startX += shapeWidth + shapeRight;
  37751. var fontTrans = 0.5 * lineHeight + 0.5 * fontSize - 2;
  37752. context.beginPath();
  37753. context.setFontSize(fontSize);
  37754. context.setFillStyle(item.show ? opts.legend.fontColor : opts.legend.hiddenColor);
  37755. context.fillText(item.name, startX, startY + fontTrans);
  37756. context.closePath();
  37757. context.stroke();
  37758. if (opts.legend.position == 'top' || opts.legend.position == 'bottom') {
  37759. startX += measureText(item.name, fontSize, context) + itemGap;
  37760. item.area[2] = startX;
  37761. } else {
  37762. item.area[2] = startX + measureText(item.name, fontSize, context) + itemGap;
  37763. ;
  37764. startX -= shapeWidth + shapeRight;
  37765. startY += lineHeight;
  37766. }
  37767. }
  37768. });
  37769. }
  37770. function drawPieDataPoints(series, opts, config, context) {
  37771. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  37772. var pieOption = assign({}, {
  37773. activeOpacity: 0.5,
  37774. activeRadius: 10,
  37775. offsetAngle: 0,
  37776. labelWidth: 15,
  37777. ringWidth: 30,
  37778. customRadius: 0,
  37779. border: false,
  37780. borderWidth: 2,
  37781. borderColor: '#FFFFFF',
  37782. centerColor: '#FFFFFF',
  37783. linearType: 'none',
  37784. customColor: []
  37785. }, opts.type == "pie" ? opts.extra.pie : opts.extra.ring);
  37786. var centerPosition = {
  37787. x: opts.area[3] + (opts.width - opts.area[1] - opts.area[3]) / 2,
  37788. y: opts.area[0] + (opts.height - opts.area[0] - opts.area[2]) / 2
  37789. };
  37790. if (config.pieChartLinePadding == 0) {
  37791. config.pieChartLinePadding = pieOption.activeRadius * opts.pix;
  37792. }
  37793. 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);
  37794. if (pieOption.customRadius > 0) {
  37795. radius = pieOption.customRadius * opts.pix;
  37796. }
  37797. series = getPieDataPoints(series, radius, process);
  37798. var activeRadius = pieOption.activeRadius * opts.pix;
  37799. pieOption.customColor = fillCustomColor(pieOption.linearType, pieOption.customColor, series, config);
  37800. series = series.map(function (eachSeries) {
  37801. eachSeries._start_ += pieOption.offsetAngle * Math.PI / 180;
  37802. return eachSeries;
  37803. });
  37804. series.forEach(function (eachSeries, seriesIndex) {
  37805. if (opts.tooltip) {
  37806. if (opts.tooltip.index == seriesIndex) {
  37807. context.beginPath();
  37808. context.setFillStyle(hexToRgb(eachSeries.color, pieOption.activeOpacity || 0.5));
  37809. context.moveTo(centerPosition.x, centerPosition.y);
  37810. context.arc(centerPosition.x, centerPosition.y, eachSeries._radius_ + activeRadius, eachSeries._start_, eachSeries._start_ + 2 * eachSeries._proportion_ * Math.PI);
  37811. context.closePath();
  37812. context.fill();
  37813. }
  37814. }
  37815. context.beginPath();
  37816. context.setLineWidth(pieOption.borderWidth * opts.pix);
  37817. context.lineJoin = "round";
  37818. context.setStrokeStyle(pieOption.borderColor);
  37819. var fillcolor = eachSeries.color;
  37820. if (pieOption.linearType == 'custom') {
  37821. var grd;
  37822. if (context.createCircularGradient) {
  37823. grd = context.createCircularGradient(centerPosition.x, centerPosition.y, eachSeries._radius_);
  37824. } else {
  37825. grd = context.createRadialGradient(centerPosition.x, centerPosition.y, 0, centerPosition.x, centerPosition.y, eachSeries._radius_);
  37826. }
  37827. grd.addColorStop(0, hexToRgb(pieOption.customColor[eachSeries.linearIndex], 1));
  37828. grd.addColorStop(1, hexToRgb(eachSeries.color, 1));
  37829. fillcolor = grd;
  37830. }
  37831. context.setFillStyle(fillcolor);
  37832. context.moveTo(centerPosition.x, centerPosition.y);
  37833. context.arc(centerPosition.x, centerPosition.y, eachSeries._radius_, eachSeries._start_, eachSeries._start_ + 2 * eachSeries._proportion_ * Math.PI);
  37834. context.closePath();
  37835. context.fill();
  37836. if (pieOption.border == true) {
  37837. context.stroke();
  37838. }
  37839. });
  37840. if (opts.type === 'ring') {
  37841. var innerPieWidth = radius * 0.6;
  37842. if (typeof pieOption.ringWidth === 'number' && pieOption.ringWidth > 0) {
  37843. innerPieWidth = Math.max(0, radius - pieOption.ringWidth * opts.pix);
  37844. }
  37845. context.beginPath();
  37846. context.setFillStyle(pieOption.centerColor);
  37847. context.moveTo(centerPosition.x, centerPosition.y);
  37848. context.arc(centerPosition.x, centerPosition.y, innerPieWidth, 0, 2 * Math.PI);
  37849. context.closePath();
  37850. context.fill();
  37851. }
  37852. if (opts.dataLabel !== false && process === 1) {
  37853. var valid = false;
  37854. for (var i = 0, len = series.length; i < len; i++) {
  37855. if (series[i].data > 0) {
  37856. valid = true;
  37857. break;
  37858. }
  37859. }
  37860. if (valid) {
  37861. drawPieText(series, opts, config, context, radius, centerPosition);
  37862. }
  37863. }
  37864. if (process === 1 && opts.type === 'ring') {
  37865. drawRingTitle(opts, config, context, centerPosition);
  37866. }
  37867. return {
  37868. center: centerPosition,
  37869. radius: radius,
  37870. series: series
  37871. };
  37872. }
  37873. function drawRoseDataPoints(series, opts, config, context) {
  37874. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  37875. var roseOption = assign({}, {
  37876. type: 'area',
  37877. activeOpacity: 0.5,
  37878. activeRadius: 10,
  37879. offsetAngle: 0,
  37880. labelWidth: 15,
  37881. border: false,
  37882. borderWidth: 2,
  37883. borderColor: '#FFFFFF',
  37884. linearType: 'none',
  37885. customColor: []
  37886. }, opts.extra.rose);
  37887. if (config.pieChartLinePadding == 0) {
  37888. config.pieChartLinePadding = roseOption.activeRadius * opts.pix;
  37889. }
  37890. var centerPosition = {
  37891. x: opts.area[3] + (opts.width - opts.area[1] - opts.area[3]) / 2,
  37892. y: opts.area[0] + (opts.height - opts.area[0] - opts.area[2]) / 2
  37893. };
  37894. 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);
  37895. var minRadius = roseOption.minRadius || radius * 0.5;
  37896. series = getRoseDataPoints(series, roseOption.type, minRadius, radius, process);
  37897. var activeRadius = roseOption.activeRadius * opts.pix;
  37898. roseOption.customColor = fillCustomColor(roseOption.linearType, roseOption.customColor, series, config);
  37899. series = series.map(function (eachSeries) {
  37900. eachSeries._start_ += (roseOption.offsetAngle || 0) * Math.PI / 180;
  37901. return eachSeries;
  37902. });
  37903. series.forEach(function (eachSeries, seriesIndex) {
  37904. if (opts.tooltip) {
  37905. if (opts.tooltip.index == seriesIndex) {
  37906. context.beginPath();
  37907. context.setFillStyle(hexToRgb(eachSeries.color, roseOption.activeOpacity || 0.5));
  37908. context.moveTo(centerPosition.x, centerPosition.y);
  37909. context.arc(centerPosition.x, centerPosition.y, activeRadius + eachSeries._radius_, eachSeries._start_, eachSeries._start_ + 2 * eachSeries._rose_proportion_ * Math.PI);
  37910. context.closePath();
  37911. context.fill();
  37912. }
  37913. }
  37914. context.beginPath();
  37915. context.setLineWidth(roseOption.borderWidth * opts.pix);
  37916. context.lineJoin = "round";
  37917. context.setStrokeStyle(roseOption.borderColor);
  37918. var fillcolor = eachSeries.color;
  37919. if (roseOption.linearType == 'custom') {
  37920. var grd;
  37921. if (context.createCircularGradient) {
  37922. grd = context.createCircularGradient(centerPosition.x, centerPosition.y, eachSeries._radius_);
  37923. } else {
  37924. grd = context.createRadialGradient(centerPosition.x, centerPosition.y, 0, centerPosition.x, centerPosition.y, eachSeries._radius_);
  37925. }
  37926. grd.addColorStop(0, hexToRgb(roseOption.customColor[eachSeries.linearIndex], 1));
  37927. grd.addColorStop(1, hexToRgb(eachSeries.color, 1));
  37928. fillcolor = grd;
  37929. }
  37930. context.setFillStyle(fillcolor);
  37931. context.moveTo(centerPosition.x, centerPosition.y);
  37932. context.arc(centerPosition.x, centerPosition.y, eachSeries._radius_, eachSeries._start_, eachSeries._start_ + 2 * eachSeries._rose_proportion_ * Math.PI);
  37933. context.closePath();
  37934. context.fill();
  37935. if (roseOption.border == true) {
  37936. context.stroke();
  37937. }
  37938. });
  37939. if (opts.dataLabel !== false && process === 1) {
  37940. var valid = false;
  37941. for (var i = 0, len = series.length; i < len; i++) {
  37942. if (series[i].data > 0) {
  37943. valid = true;
  37944. break;
  37945. }
  37946. }
  37947. if (valid) {
  37948. drawPieText(series, opts, config, context, radius, centerPosition);
  37949. }
  37950. }
  37951. return {
  37952. center: centerPosition,
  37953. radius: radius,
  37954. series: series
  37955. };
  37956. }
  37957. function drawArcbarDataPoints(series, opts, config, context) {
  37958. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  37959. var arcbarOption = assign({}, {
  37960. startAngle: 0.75,
  37961. endAngle: 0.25,
  37962. type: 'default',
  37963. width: 12,
  37964. gap: 2,
  37965. linearType: 'none',
  37966. customColor: []
  37967. }, opts.extra.arcbar);
  37968. series = getArcbarDataPoints(series, arcbarOption, process);
  37969. var centerPosition;
  37970. if (arcbarOption.centerX || arcbarOption.centerY) {
  37971. centerPosition = {
  37972. x: arcbarOption.centerX ? arcbarOption.centerX : opts.width / 2,
  37973. y: arcbarOption.centerY ? arcbarOption.centerY : opts.height / 2
  37974. };
  37975. } else {
  37976. centerPosition = {
  37977. x: opts.width / 2,
  37978. y: opts.height / 2
  37979. };
  37980. }
  37981. var radius;
  37982. if (arcbarOption.radius) {
  37983. radius = arcbarOption.radius;
  37984. } else {
  37985. radius = Math.min(centerPosition.x, centerPosition.y);
  37986. radius -= 5 * opts.pix;
  37987. radius -= arcbarOption.width / 2;
  37988. }
  37989. arcbarOption.customColor = fillCustomColor(arcbarOption.linearType, arcbarOption.customColor, series, config);
  37990. for (var i = 0; i < series.length; i++) {
  37991. var eachSeries = series[i];
  37992. //背景颜色
  37993. context.setLineWidth(arcbarOption.width * opts.pix);
  37994. context.setStrokeStyle(arcbarOption.backgroundColor || '#E9E9E9');
  37995. context.setLineCap('round');
  37996. context.beginPath();
  37997. if (arcbarOption.type == 'default') {
  37998. 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);
  37999. } else {
  38000. context.arc(centerPosition.x, centerPosition.y, radius - (arcbarOption.width * opts.pix + arcbarOption.gap * opts.pix) * i, 0, 2 * Math.PI, false);
  38001. }
  38002. context.stroke();
  38003. //进度条
  38004. var fillColor = eachSeries.color;
  38005. if (arcbarOption.linearType == 'custom') {
  38006. var grd = context.createLinearGradient(centerPosition.x - radius, centerPosition.y, centerPosition.x + radius, centerPosition.y);
  38007. grd.addColorStop(1, hexToRgb(arcbarOption.customColor[eachSeries.linearIndex], 1));
  38008. grd.addColorStop(0, hexToRgb(eachSeries.color, 1));
  38009. fillColor = grd;
  38010. }
  38011. context.setLineWidth(arcbarOption.width * opts.pix);
  38012. context.setStrokeStyle(fillColor);
  38013. context.setLineCap('round');
  38014. context.beginPath();
  38015. 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);
  38016. context.stroke();
  38017. }
  38018. drawRingTitle(opts, config, context, centerPosition);
  38019. return {
  38020. center: centerPosition,
  38021. radius: radius,
  38022. series: series
  38023. };
  38024. }
  38025. function drawGaugeDataPoints(categories, series, opts, config, context) {
  38026. var process = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 1;
  38027. var gaugeOption = assign({}, {
  38028. type: 'default',
  38029. startAngle: 0.75,
  38030. endAngle: 0.25,
  38031. width: 15,
  38032. labelOffset: 13,
  38033. splitLine: {
  38034. fixRadius: 0,
  38035. splitNumber: 10,
  38036. width: 15,
  38037. color: '#FFFFFF',
  38038. childNumber: 5,
  38039. childWidth: 5
  38040. },
  38041. pointer: {
  38042. width: 15,
  38043. color: 'auto'
  38044. }
  38045. }, opts.extra.gauge);
  38046. if (gaugeOption.oldAngle == undefined) {
  38047. gaugeOption.oldAngle = gaugeOption.startAngle;
  38048. }
  38049. if (gaugeOption.oldData == undefined) {
  38050. gaugeOption.oldData = 0;
  38051. }
  38052. categories = getGaugeAxisPoints(categories, gaugeOption.startAngle, gaugeOption.endAngle);
  38053. var centerPosition = {
  38054. x: opts.width / 2,
  38055. y: opts.height / 2
  38056. };
  38057. var radius = Math.min(centerPosition.x, centerPosition.y);
  38058. radius -= 5 * opts.pix;
  38059. radius -= gaugeOption.width / 2;
  38060. var innerRadius = radius - gaugeOption.width;
  38061. var totalAngle = 0;
  38062. //判断仪表盘的样式:default百度样式,progress新样式
  38063. if (gaugeOption.type == 'progress') {
  38064. //## 第一步画中心圆形背景和进度条背景
  38065. //中心圆形背景
  38066. var pieRadius = radius - gaugeOption.width * 3;
  38067. context.beginPath();
  38068. var gradient = context.createLinearGradient(centerPosition.x, centerPosition.y - pieRadius, centerPosition.x, centerPosition.y + pieRadius);
  38069. //配置渐变填充(起点:中心点向上减半径;结束点中心点向下加半径)
  38070. gradient.addColorStop('0', hexToRgb(series[0].color, 0.3));
  38071. gradient.addColorStop('1.0', hexToRgb("#FFFFFF", 0.1));
  38072. context.setFillStyle(gradient);
  38073. context.arc(centerPosition.x, centerPosition.y, pieRadius, 0, 2 * Math.PI, false);
  38074. context.fill();
  38075. //画进度条背景
  38076. context.setLineWidth(gaugeOption.width);
  38077. context.setStrokeStyle(hexToRgb(series[0].color, 0.3));
  38078. context.setLineCap('round');
  38079. context.beginPath();
  38080. context.arc(centerPosition.x, centerPosition.y, innerRadius, gaugeOption.startAngle * Math.PI, gaugeOption.endAngle * Math.PI, false);
  38081. context.stroke();
  38082. //## 第二步画刻度线
  38083. totalAngle = gaugeOption.startAngle - gaugeOption.endAngle + 1;
  38084. var splitAngle = totalAngle / gaugeOption.splitLine.splitNumber;
  38085. var childAngle = totalAngle / gaugeOption.splitLine.splitNumber / gaugeOption.splitLine.childNumber;
  38086. var startX = -radius - gaugeOption.width * 0.5 - gaugeOption.splitLine.fixRadius;
  38087. var endX = -radius - gaugeOption.width - gaugeOption.splitLine.fixRadius + gaugeOption.splitLine.width;
  38088. context.save();
  38089. context.translate(centerPosition.x, centerPosition.y);
  38090. context.rotate((gaugeOption.startAngle - 1) * Math.PI);
  38091. var len = gaugeOption.splitLine.splitNumber * gaugeOption.splitLine.childNumber + 1;
  38092. var proc = series[0].data * process;
  38093. for (var i = 0; i < len; i++) {
  38094. context.beginPath();
  38095. //刻度线随进度变色
  38096. if (proc > i / len) {
  38097. context.setStrokeStyle(hexToRgb(series[0].color, 1));
  38098. } else {
  38099. context.setStrokeStyle(hexToRgb(series[0].color, 0.3));
  38100. }
  38101. context.setLineWidth(3 * opts.pix);
  38102. context.moveTo(startX, 0);
  38103. context.lineTo(endX, 0);
  38104. context.stroke();
  38105. context.rotate(childAngle * Math.PI);
  38106. }
  38107. context.restore();
  38108. //## 第三步画进度条
  38109. series = getArcbarDataPoints(series, gaugeOption, process);
  38110. context.setLineWidth(gaugeOption.width);
  38111. context.setStrokeStyle(series[0].color);
  38112. context.setLineCap('round');
  38113. context.beginPath();
  38114. context.arc(centerPosition.x, centerPosition.y, innerRadius, gaugeOption.startAngle * Math.PI, series[0]._proportion_ * Math.PI, false);
  38115. context.stroke();
  38116. //## 第四步画指针
  38117. var pointerRadius = radius - gaugeOption.width * 2.5;
  38118. context.save();
  38119. context.translate(centerPosition.x, centerPosition.y);
  38120. context.rotate((series[0]._proportion_ - 1) * Math.PI);
  38121. context.beginPath();
  38122. context.setLineWidth(gaugeOption.width / 3);
  38123. var gradient3 = context.createLinearGradient(0, -pointerRadius * 0.6, 0, pointerRadius * 0.6);
  38124. gradient3.addColorStop('0', hexToRgb('#FFFFFF', 0));
  38125. gradient3.addColorStop('0.5', hexToRgb(series[0].color, 1));
  38126. gradient3.addColorStop('1.0', hexToRgb('#FFFFFF', 0));
  38127. context.setStrokeStyle(gradient3);
  38128. context.arc(0, 0, pointerRadius, 0.85 * Math.PI, 1.15 * Math.PI, false);
  38129. context.stroke();
  38130. context.beginPath();
  38131. context.setLineWidth(1);
  38132. context.setStrokeStyle(series[0].color);
  38133. context.setFillStyle(series[0].color);
  38134. context.moveTo(-pointerRadius - gaugeOption.width / 3 / 2, -4);
  38135. context.lineTo(-pointerRadius - gaugeOption.width / 3 / 2 - 4, 0);
  38136. context.lineTo(-pointerRadius - gaugeOption.width / 3 / 2, 4);
  38137. context.lineTo(-pointerRadius - gaugeOption.width / 3 / 2, -4);
  38138. context.stroke();
  38139. context.fill();
  38140. context.restore();
  38141. //default百度样式
  38142. } else {
  38143. //画背景
  38144. context.setLineWidth(gaugeOption.width);
  38145. context.setLineCap('butt');
  38146. for (var _i23 = 0; _i23 < categories.length; _i23++) {
  38147. var eachCategories = categories[_i23];
  38148. context.beginPath();
  38149. context.setStrokeStyle(eachCategories.color);
  38150. context.arc(centerPosition.x, centerPosition.y, radius, eachCategories._startAngle_ * Math.PI, eachCategories._endAngle_ * Math.PI, false);
  38151. context.stroke();
  38152. }
  38153. context.save();
  38154. //画刻度线
  38155. totalAngle = gaugeOption.startAngle - gaugeOption.endAngle + 1;
  38156. var _splitAngle = totalAngle / gaugeOption.splitLine.splitNumber;
  38157. var _childAngle = totalAngle / gaugeOption.splitLine.splitNumber / gaugeOption.splitLine.childNumber;
  38158. var _startX2 = -radius - gaugeOption.width * 0.5 - gaugeOption.splitLine.fixRadius;
  38159. var _endX = -radius - gaugeOption.width * 0.5 - gaugeOption.splitLine.fixRadius + gaugeOption.splitLine.width;
  38160. var childendX = -radius - gaugeOption.width * 0.5 - gaugeOption.splitLine.fixRadius + gaugeOption.splitLine.childWidth;
  38161. context.translate(centerPosition.x, centerPosition.y);
  38162. context.rotate((gaugeOption.startAngle - 1) * Math.PI);
  38163. for (var _i24 = 0; _i24 < gaugeOption.splitLine.splitNumber + 1; _i24++) {
  38164. context.beginPath();
  38165. context.setStrokeStyle(gaugeOption.splitLine.color);
  38166. context.setLineWidth(2 * opts.pix);
  38167. context.moveTo(_startX2, 0);
  38168. context.lineTo(_endX, 0);
  38169. context.stroke();
  38170. context.rotate(_splitAngle * Math.PI);
  38171. }
  38172. context.restore();
  38173. context.save();
  38174. context.translate(centerPosition.x, centerPosition.y);
  38175. context.rotate((gaugeOption.startAngle - 1) * Math.PI);
  38176. for (var _i25 = 0; _i25 < gaugeOption.splitLine.splitNumber * gaugeOption.splitLine.childNumber + 1; _i25++) {
  38177. context.beginPath();
  38178. context.setStrokeStyle(gaugeOption.splitLine.color);
  38179. context.setLineWidth(1 * opts.pix);
  38180. context.moveTo(_startX2, 0);
  38181. context.lineTo(childendX, 0);
  38182. context.stroke();
  38183. context.rotate(_childAngle * Math.PI);
  38184. }
  38185. context.restore();
  38186. //画指针
  38187. series = getGaugeDataPoints(series, categories, gaugeOption, process);
  38188. for (var _i26 = 0; _i26 < series.length; _i26++) {
  38189. var eachSeries = series[_i26];
  38190. context.save();
  38191. context.translate(centerPosition.x, centerPosition.y);
  38192. context.rotate((eachSeries._proportion_ - 1) * Math.PI);
  38193. context.beginPath();
  38194. context.setFillStyle(eachSeries.color);
  38195. context.moveTo(gaugeOption.pointer.width, 0);
  38196. context.lineTo(0, -gaugeOption.pointer.width / 2);
  38197. context.lineTo(-innerRadius, 0);
  38198. context.lineTo(0, gaugeOption.pointer.width / 2);
  38199. context.lineTo(gaugeOption.pointer.width, 0);
  38200. context.closePath();
  38201. context.fill();
  38202. context.beginPath();
  38203. context.setFillStyle('#FFFFFF');
  38204. context.arc(0, 0, gaugeOption.pointer.width / 6, 0, 2 * Math.PI, false);
  38205. context.fill();
  38206. context.restore();
  38207. }
  38208. if (opts.dataLabel !== false) {
  38209. drawGaugeLabel(gaugeOption, radius, centerPosition, opts, config, context);
  38210. }
  38211. }
  38212. //画仪表盘标题,副标题
  38213. drawRingTitle(opts, config, context, centerPosition);
  38214. if (process === 1 && opts.type === 'gauge') {
  38215. opts.extra.gauge.oldAngle = series[0]._proportion_;
  38216. opts.extra.gauge.oldData = series[0].data;
  38217. }
  38218. return {
  38219. center: centerPosition,
  38220. radius: radius,
  38221. innerRadius: innerRadius,
  38222. categories: categories,
  38223. totalAngle: totalAngle
  38224. };
  38225. }
  38226. function drawRadarDataPoints(series, opts, config, context) {
  38227. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  38228. var radarOption = assign({}, {
  38229. gridColor: '#cccccc',
  38230. gridType: 'radar',
  38231. opacity: 0.2,
  38232. gridCount: 3,
  38233. border: false,
  38234. borderWidth: 2
  38235. }, opts.extra.radar);
  38236. var coordinateAngle = getRadarCoordinateSeries(opts.categories.length);
  38237. var centerPosition = {
  38238. x: opts.area[3] + (opts.width - opts.area[1] - opts.area[3]) / 2,
  38239. y: opts.area[0] + (opts.height - opts.area[0] - opts.area[2]) / 2
  38240. };
  38241. var xr = (opts.width - opts.area[1] - opts.area[3]) / 2;
  38242. var yr = (opts.height - opts.area[0] - opts.area[2]) / 2;
  38243. var radius = Math.min(xr - (getMaxTextListLength(opts.categories, config.fontSize, context) + config.radarLabelTextMargin), yr - config.radarLabelTextMargin);
  38244. radius -= config.radarLabelTextMargin * opts.pix;
  38245. // 画分割线
  38246. context.beginPath();
  38247. context.setLineWidth(1 * opts.pix);
  38248. context.setStrokeStyle(radarOption.gridColor);
  38249. coordinateAngle.forEach(function (angle) {
  38250. var pos = convertCoordinateOrigin(radius * Math.cos(angle), radius * Math.sin(angle), centerPosition);
  38251. context.moveTo(centerPosition.x, centerPosition.y);
  38252. context.lineTo(pos.x, pos.y);
  38253. });
  38254. context.stroke();
  38255. context.closePath();
  38256. // 画背景网格
  38257. var _loop = function _loop(i) {
  38258. var startPos = {};
  38259. context.beginPath();
  38260. context.setLineWidth(1 * opts.pix);
  38261. context.setStrokeStyle(radarOption.gridColor);
  38262. if (radarOption.gridType == 'radar') {
  38263. coordinateAngle.forEach(function (angle, index) {
  38264. var pos = convertCoordinateOrigin(radius / radarOption.gridCount * i * Math.cos(angle), radius / radarOption.gridCount * i * Math.sin(angle), centerPosition);
  38265. if (index === 0) {
  38266. startPos = pos;
  38267. context.moveTo(pos.x, pos.y);
  38268. } else {
  38269. context.lineTo(pos.x, pos.y);
  38270. }
  38271. });
  38272. context.lineTo(startPos.x, startPos.y);
  38273. } else {
  38274. var pos = convertCoordinateOrigin(radius / radarOption.gridCount * i * Math.cos(1.5), radius / radarOption.gridCount * i * Math.sin(1.5), centerPosition);
  38275. context.arc(centerPosition.x, centerPosition.y, centerPosition.y - pos.y, 0, 2 * Math.PI, false);
  38276. }
  38277. context.stroke();
  38278. context.closePath();
  38279. };
  38280. for (var i = 1; i <= radarOption.gridCount; i++) {
  38281. _loop(i);
  38282. }
  38283. var radarDataPoints = getRadarDataPoints(coordinateAngle, centerPosition, radius, series, opts, process);
  38284. radarDataPoints.forEach(function (eachSeries, seriesIndex) {
  38285. // 绘制区域数据
  38286. context.beginPath();
  38287. context.setLineWidth(radarOption.borderWidth * opts.pix);
  38288. context.setStrokeStyle(eachSeries.color);
  38289. context.setFillStyle(hexToRgb(eachSeries.color, radarOption.opacity));
  38290. eachSeries.data.forEach(function (item, index) {
  38291. if (index === 0) {
  38292. context.moveTo(item.position.x, item.position.y);
  38293. } else {
  38294. context.lineTo(item.position.x, item.position.y);
  38295. }
  38296. });
  38297. context.closePath();
  38298. context.fill();
  38299. if (radarOption.border === true) {
  38300. context.stroke();
  38301. }
  38302. context.closePath();
  38303. if (opts.dataPointShape !== false) {
  38304. var points = eachSeries.data.map(function (item) {
  38305. return item.position;
  38306. });
  38307. drawPointShape(points, eachSeries.color, eachSeries.pointShape, context, opts);
  38308. }
  38309. });
  38310. // draw label text
  38311. drawRadarLabel(coordinateAngle, radius, centerPosition, opts, config, context);
  38312. // draw dataLabel
  38313. if (opts.dataLabel !== false && process === 1) {
  38314. radarDataPoints.forEach(function (eachSeries, seriesIndex) {
  38315. context.beginPath();
  38316. var fontSize = eachSeries.textSize * opts.pix || config.fontSize;
  38317. context.setFontSize(fontSize);
  38318. context.setFillStyle(eachSeries.textColor || opts.fontColor);
  38319. eachSeries.data.forEach(function (item, index) {
  38320. //如果是中心点垂直的上下点位
  38321. if (Math.abs(item.position.x - centerPosition.x) < 2) {
  38322. //如果在上面
  38323. if (item.position.y < centerPosition.y) {
  38324. context.setTextAlign('center');
  38325. context.fillText(item.value, item.position.x, item.position.y - 4);
  38326. } else {
  38327. context.setTextAlign('center');
  38328. context.fillText(item.value, item.position.x, item.position.y + fontSize + 2);
  38329. }
  38330. } else {
  38331. //如果在左侧
  38332. if (item.position.x < centerPosition.x) {
  38333. context.setTextAlign('right');
  38334. context.fillText(item.value, item.position.x - 4, item.position.y + fontSize / 2 - 2);
  38335. } else {
  38336. context.setTextAlign('left');
  38337. context.fillText(item.value, item.position.x + 4, item.position.y + fontSize / 2 - 2);
  38338. }
  38339. }
  38340. });
  38341. context.closePath();
  38342. context.stroke();
  38343. });
  38344. context.setTextAlign('left');
  38345. }
  38346. return {
  38347. center: centerPosition,
  38348. radius: radius,
  38349. angleList: coordinateAngle
  38350. };
  38351. }
  38352. function normalInt(min, max, iter) {
  38353. iter = iter == 0 ? 1 : iter;
  38354. var arr = [];
  38355. for (var i = 0; i < iter; i++) {
  38356. arr[i] = Math.random();
  38357. }
  38358. ;
  38359. return Math.floor(arr.reduce(function (i, j) {
  38360. return i + j;
  38361. }) / iter * (max - min)) + min;
  38362. }
  38363. ;
  38364. function collisionNew(area, points, width, height) {
  38365. var isIn = false;
  38366. for (var i = 0; i < points.length; i++) {
  38367. if (points[i].area) {
  38368. 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]) {
  38369. if (area[0] < 0 || area[1] < 0 || area[2] > width || area[3] > height) {
  38370. isIn = true;
  38371. break;
  38372. } else {
  38373. isIn = false;
  38374. }
  38375. } else {
  38376. isIn = true;
  38377. break;
  38378. }
  38379. }
  38380. }
  38381. return isIn;
  38382. }
  38383. ;
  38384. function getBoundingBox(data) {
  38385. var bounds = {},
  38386. coords;
  38387. bounds.xMin = 180;
  38388. bounds.xMax = 0;
  38389. bounds.yMin = 90;
  38390. bounds.yMax = 0;
  38391. for (var i = 0; i < data.length; i++) {
  38392. var coorda = data[i].geometry.coordinates;
  38393. for (var k = 0; k < coorda.length; k++) {
  38394. coords = coorda[k];
  38395. if (coords.length == 1) {
  38396. coords = coords[0];
  38397. }
  38398. for (var j = 0; j < coords.length; j++) {
  38399. var longitude = coords[j][0];
  38400. var latitude = coords[j][1];
  38401. var point = {
  38402. x: longitude,
  38403. y: latitude
  38404. };
  38405. bounds.xMin = bounds.xMin < point.x ? bounds.xMin : point.x;
  38406. bounds.xMax = bounds.xMax > point.x ? bounds.xMax : point.x;
  38407. bounds.yMin = bounds.yMin < point.y ? bounds.yMin : point.y;
  38408. bounds.yMax = bounds.yMax > point.y ? bounds.yMax : point.y;
  38409. }
  38410. }
  38411. }
  38412. return bounds;
  38413. }
  38414. function coordinateToPoint(latitude, longitude, bounds, scale, xoffset, yoffset) {
  38415. return {
  38416. x: (longitude - bounds.xMin) * scale + xoffset,
  38417. y: (bounds.yMax - latitude) * scale + yoffset
  38418. };
  38419. }
  38420. function pointToCoordinate(pointY, pointX, bounds, scale, xoffset, yoffset) {
  38421. return {
  38422. x: (pointX - xoffset) / scale + bounds.xMin,
  38423. y: bounds.yMax - (pointY - yoffset) / scale
  38424. };
  38425. }
  38426. function isRayIntersectsSegment(poi, s_poi, e_poi) {
  38427. if (s_poi[1] == e_poi[1]) {
  38428. return false;
  38429. }
  38430. if (s_poi[1] > poi[1] && e_poi[1] > poi[1]) {
  38431. return false;
  38432. }
  38433. if (s_poi[1] < poi[1] && e_poi[1] < poi[1]) {
  38434. return false;
  38435. }
  38436. if (s_poi[1] == poi[1] && e_poi[1] > poi[1]) {
  38437. return false;
  38438. }
  38439. if (e_poi[1] == poi[1] && s_poi[1] > poi[1]) {
  38440. return false;
  38441. }
  38442. if (s_poi[0] < poi[0] && e_poi[1] < poi[1]) {
  38443. return false;
  38444. }
  38445. var xseg = e_poi[0] - (e_poi[0] - s_poi[0]) * (e_poi[1] - poi[1]) / (e_poi[1] - s_poi[1]);
  38446. if (xseg < poi[0]) {
  38447. return false;
  38448. } else {
  38449. return true;
  38450. }
  38451. }
  38452. function isPoiWithinPoly(poi, poly, mercator) {
  38453. var sinsc = 0;
  38454. for (var i = 0; i < poly.length; i++) {
  38455. var epoly = poly[i][0];
  38456. if (poly.length == 1) {
  38457. epoly = poly[i][0];
  38458. }
  38459. for (var j = 0; j < epoly.length - 1; j++) {
  38460. var s_poi = epoly[j];
  38461. var e_poi = epoly[j + 1];
  38462. if (mercator) {
  38463. s_poi = lonlat2mercator(epoly[j][0], epoly[j][1]);
  38464. e_poi = lonlat2mercator(epoly[j + 1][0], epoly[j + 1][1]);
  38465. }
  38466. if (isRayIntersectsSegment(poi, s_poi, e_poi)) {
  38467. sinsc += 1;
  38468. }
  38469. }
  38470. }
  38471. if (sinsc % 2 == 1) {
  38472. return true;
  38473. } else {
  38474. return false;
  38475. }
  38476. }
  38477. function drawMapDataPoints(series, opts, config, context) {
  38478. var mapOption = assign({}, {
  38479. border: true,
  38480. mercator: false,
  38481. borderWidth: 1,
  38482. borderColor: '#666666',
  38483. fillOpacity: 0.6,
  38484. activeBorderColor: '#f04864',
  38485. activeFillColor: '#facc14',
  38486. activeFillOpacity: 1
  38487. }, opts.extra.map);
  38488. var coords, point;
  38489. var data = series;
  38490. var bounds = getBoundingBox(data);
  38491. if (mapOption.mercator) {
  38492. var max = lonlat2mercator(bounds.xMax, bounds.yMax);
  38493. var min = lonlat2mercator(bounds.xMin, bounds.yMin);
  38494. bounds.xMax = max[0];
  38495. bounds.yMax = max[1];
  38496. bounds.xMin = min[0];
  38497. bounds.yMin = min[1];
  38498. }
  38499. var xScale = opts.width / Math.abs(bounds.xMax - bounds.xMin);
  38500. var yScale = opts.height / Math.abs(bounds.yMax - bounds.yMin);
  38501. var scale = xScale < yScale ? xScale : yScale;
  38502. var xoffset = opts.width / 2 - Math.abs(bounds.xMax - bounds.xMin) / 2 * scale;
  38503. var yoffset = opts.height / 2 - Math.abs(bounds.yMax - bounds.yMin) / 2 * scale;
  38504. for (var i = 0; i < data.length; i++) {
  38505. context.beginPath();
  38506. context.setLineWidth(mapOption.borderWidth * opts.pix);
  38507. context.setStrokeStyle(mapOption.borderColor);
  38508. context.setFillStyle(hexToRgb(series[i].color, mapOption.fillOpacity));
  38509. if (opts.tooltip) {
  38510. if (opts.tooltip.index == i) {
  38511. context.setStrokeStyle(mapOption.activeBorderColor);
  38512. context.setFillStyle(hexToRgb(mapOption.activeFillColor, mapOption.activeFillOpacity));
  38513. }
  38514. }
  38515. var coorda = data[i].geometry.coordinates;
  38516. for (var k = 0; k < coorda.length; k++) {
  38517. coords = coorda[k];
  38518. if (coords.length == 1) {
  38519. coords = coords[0];
  38520. }
  38521. for (var j = 0; j < coords.length; j++) {
  38522. var gaosi = Array(2);
  38523. if (mapOption.mercator) {
  38524. gaosi = lonlat2mercator(coords[j][0], coords[j][1]);
  38525. } else {
  38526. gaosi = coords[j];
  38527. }
  38528. point = coordinateToPoint(gaosi[1], gaosi[0], bounds, scale, xoffset, yoffset);
  38529. if (j === 0) {
  38530. context.beginPath();
  38531. context.moveTo(point.x, point.y);
  38532. } else {
  38533. context.lineTo(point.x, point.y);
  38534. }
  38535. }
  38536. context.fill();
  38537. if (mapOption.border == true) {
  38538. context.stroke();
  38539. }
  38540. }
  38541. if (opts.dataLabel == true) {
  38542. var centerPoint = data[i].properties.centroid;
  38543. if (centerPoint) {
  38544. if (mapOption.mercator) {
  38545. centerPoint = lonlat2mercator(data[i].properties.centroid[0], data[i].properties.centroid[1]);
  38546. }
  38547. point = coordinateToPoint(centerPoint[1], centerPoint[0], bounds, scale, xoffset, yoffset);
  38548. var fontSize = data[i].textSize * opts.pix || config.fontSize;
  38549. var text = data[i].properties.name;
  38550. context.beginPath();
  38551. context.setFontSize(fontSize);
  38552. context.setFillStyle(data[i].textColor || opts.fontColor);
  38553. context.fillText(text, point.x - measureText(text, fontSize, context) / 2, point.y + fontSize / 2);
  38554. context.closePath();
  38555. context.stroke();
  38556. }
  38557. }
  38558. }
  38559. opts.chartData.mapData = {
  38560. bounds: bounds,
  38561. scale: scale,
  38562. xoffset: xoffset,
  38563. yoffset: yoffset,
  38564. mercator: mapOption.mercator
  38565. };
  38566. drawToolTipBridge(opts, config, context, 1);
  38567. context.draw();
  38568. }
  38569. function getWordCloudPoint(opts, type, context) {
  38570. var points = opts.series;
  38571. switch (type) {
  38572. case 'normal':
  38573. for (var i = 0; i < points.length; i++) {
  38574. var text = points[i].name;
  38575. var tHeight = points[i].textSize * opts.pix;
  38576. var tWidth = measureText(text, tHeight, context);
  38577. var x = void 0,
  38578. y = void 0;
  38579. var area = void 0;
  38580. var breaknum = 0;
  38581. while (true) {
  38582. breaknum++;
  38583. x = normalInt(-opts.width / 2, opts.width / 2, 5) - tWidth / 2;
  38584. y = normalInt(-opts.height / 2, opts.height / 2, 5) + tHeight / 2;
  38585. area = [x - 5 + opts.width / 2, y - 5 - tHeight + opts.height / 2, x + tWidth + 5 + opts.width / 2, y + 5 + opts.height / 2];
  38586. var isCollision = collisionNew(area, points, opts.width, opts.height);
  38587. if (!isCollision) break;
  38588. if (breaknum == 1000) {
  38589. area = [-100, -100, -100, -100];
  38590. break;
  38591. }
  38592. }
  38593. ;
  38594. points[i].area = area;
  38595. }
  38596. break;
  38597. case 'vertical':
  38598. var Spin = function Spin() {
  38599. //获取均匀随机值,是否旋转,旋转的概率为(1-0.5)
  38600. if (Math.random() > 0.7) {
  38601. return true;
  38602. } else {
  38603. return false;
  38604. }
  38605. ;
  38606. };
  38607. ;
  38608. for (var _i27 = 0; _i27 < points.length; _i27++) {
  38609. var _text = points[_i27].name;
  38610. var _tHeight = points[_i27].textSize * opts.pix;
  38611. var _tWidth = measureText(_text, _tHeight, context);
  38612. var isSpin = Spin();
  38613. var _x = void 0,
  38614. _y = void 0,
  38615. _area = void 0,
  38616. areav = void 0;
  38617. var _breaknum = 0;
  38618. while (true) {
  38619. _breaknum++;
  38620. var _isCollision = void 0;
  38621. if (isSpin) {
  38622. _x = normalInt(-opts.width / 2, opts.width / 2, 5) - _tWidth / 2;
  38623. _y = normalInt(-opts.height / 2, opts.height / 2, 5) + _tHeight / 2;
  38624. _area = [_y - 5 - _tWidth + opts.width / 2, -_x - 5 + opts.height / 2, _y + 5 + opts.width / 2, -_x + _tHeight + 5 + opts.height / 2];
  38625. 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];
  38626. _isCollision = collisionNew(areav, points, opts.height, opts.width);
  38627. } else {
  38628. _x = normalInt(-opts.width / 2, opts.width / 2, 5) - _tWidth / 2;
  38629. _y = normalInt(-opts.height / 2, opts.height / 2, 5) + _tHeight / 2;
  38630. _area = [_x - 5 + opts.width / 2, _y - 5 - _tHeight + opts.height / 2, _x + _tWidth + 5 + opts.width / 2, _y + 5 + opts.height / 2];
  38631. _isCollision = collisionNew(_area, points, opts.width, opts.height);
  38632. }
  38633. if (!_isCollision) break;
  38634. if (_breaknum == 1000) {
  38635. _area = [-1000, -1000, -1000, -1000];
  38636. break;
  38637. }
  38638. }
  38639. ;
  38640. if (isSpin) {
  38641. points[_i27].area = areav;
  38642. points[_i27].areav = _area;
  38643. } else {
  38644. points[_i27].area = _area;
  38645. }
  38646. points[_i27].rotate = isSpin;
  38647. }
  38648. ;
  38649. break;
  38650. }
  38651. return points;
  38652. }
  38653. function drawWordCloudDataPoints(series, opts, config, context) {
  38654. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  38655. var wordOption = assign({}, {
  38656. type: 'normal',
  38657. autoColors: true
  38658. }, opts.extra.word);
  38659. if (!opts.chartData.wordCloudData) {
  38660. opts.chartData.wordCloudData = getWordCloudPoint(opts, wordOption.type, context);
  38661. }
  38662. context.beginPath();
  38663. context.setFillStyle(opts.background);
  38664. context.rect(0, 0, opts.width, opts.height);
  38665. context.fill();
  38666. context.save();
  38667. var points = opts.chartData.wordCloudData;
  38668. context.translate(opts.width / 2, opts.height / 2);
  38669. for (var i = 0; i < points.length; i++) {
  38670. context.save();
  38671. if (points[i].rotate) {
  38672. context.rotate(90 * Math.PI / 180);
  38673. }
  38674. var text = points[i].name;
  38675. var tHeight = points[i].textSize * opts.pix;
  38676. var tWidth = measureText(text, tHeight, context);
  38677. context.beginPath();
  38678. context.setStrokeStyle(points[i].color);
  38679. context.setFillStyle(points[i].color);
  38680. context.setFontSize(tHeight);
  38681. if (points[i].rotate) {
  38682. if (points[i].areav[0] > 0) {
  38683. if (opts.tooltip) {
  38684. if (opts.tooltip.index == i) {
  38685. 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);
  38686. } else {
  38687. 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);
  38688. }
  38689. } else {
  38690. 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);
  38691. }
  38692. }
  38693. } else {
  38694. if (points[i].area[0] > 0) {
  38695. if (opts.tooltip) {
  38696. if (opts.tooltip.index == i) {
  38697. 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);
  38698. } else {
  38699. 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);
  38700. }
  38701. } else {
  38702. 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);
  38703. }
  38704. }
  38705. }
  38706. context.stroke();
  38707. context.restore();
  38708. }
  38709. context.restore();
  38710. }
  38711. function drawFunnelDataPoints(series, opts, config, context) {
  38712. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  38713. var funnelOption = assign({}, {
  38714. type: 'funnel',
  38715. activeWidth: 10,
  38716. activeOpacity: 0.3,
  38717. border: false,
  38718. borderWidth: 2,
  38719. borderColor: '#FFFFFF',
  38720. fillOpacity: 1,
  38721. labelAlign: 'right',
  38722. linearType: 'none',
  38723. customColor: []
  38724. }, opts.extra.funnel);
  38725. var eachSpacing = (opts.height - opts.area[0] - opts.area[2]) / series.length;
  38726. var centerPosition = {
  38727. x: opts.area[3] + (opts.width - opts.area[1] - opts.area[3]) / 2,
  38728. y: opts.height - opts.area[2]
  38729. };
  38730. var activeWidth = funnelOption.activeWidth * opts.pix;
  38731. var radius = Math.min((opts.width - opts.area[1] - opts.area[3]) / 2 - activeWidth, (opts.height - opts.area[0] - opts.area[2]) / 2 - activeWidth);
  38732. series = getFunnelDataPoints(series, radius, funnelOption.type, eachSpacing, process);
  38733. context.save();
  38734. context.translate(centerPosition.x, centerPosition.y);
  38735. funnelOption.customColor = fillCustomColor(funnelOption.linearType, funnelOption.customColor, series, config);
  38736. if (funnelOption.type == 'pyramid') {
  38737. for (var i = 0; i < series.length; i++) {
  38738. if (i == series.length - 1) {
  38739. if (opts.tooltip) {
  38740. if (opts.tooltip.index == i) {
  38741. context.beginPath();
  38742. context.setFillStyle(hexToRgb(series[i].color, funnelOption.activeOpacity));
  38743. context.moveTo(-activeWidth, -eachSpacing);
  38744. context.lineTo(-series[i].radius - activeWidth, 0);
  38745. context.lineTo(series[i].radius + activeWidth, 0);
  38746. context.lineTo(activeWidth, -eachSpacing);
  38747. context.lineTo(-activeWidth, -eachSpacing);
  38748. context.closePath();
  38749. context.fill();
  38750. }
  38751. }
  38752. series[i].funnelArea = [centerPosition.x - series[i].radius, centerPosition.y - eachSpacing * (i + 1), centerPosition.x + series[i].radius, centerPosition.y - eachSpacing * i];
  38753. context.beginPath();
  38754. context.setLineWidth(funnelOption.borderWidth * opts.pix);
  38755. context.setStrokeStyle(funnelOption.borderColor);
  38756. var fillColor = hexToRgb(series[i].color, funnelOption.fillOpacity);
  38757. if (funnelOption.linearType == 'custom') {
  38758. var grd = context.createLinearGradient(series[i].radius, -eachSpacing, -series[i].radius, -eachSpacing);
  38759. grd.addColorStop(0, hexToRgb(series[i].color, funnelOption.fillOpacity));
  38760. grd.addColorStop(0.5, hexToRgb(funnelOption.customColor[series[i].linearIndex], funnelOption.fillOpacity));
  38761. grd.addColorStop(1, hexToRgb(series[i].color, funnelOption.fillOpacity));
  38762. fillColor = grd;
  38763. }
  38764. context.setFillStyle(fillColor);
  38765. context.moveTo(0, -eachSpacing);
  38766. context.lineTo(-series[i].radius, 0);
  38767. context.lineTo(series[i].radius, 0);
  38768. context.lineTo(0, -eachSpacing);
  38769. context.closePath();
  38770. context.fill();
  38771. if (funnelOption.border == true) {
  38772. context.stroke();
  38773. }
  38774. } else {
  38775. if (opts.tooltip) {
  38776. if (opts.tooltip.index == i) {
  38777. context.beginPath();
  38778. context.setFillStyle(hexToRgb(series[i].color, funnelOption.activeOpacity));
  38779. context.moveTo(0, 0);
  38780. context.lineTo(-series[i].radius - activeWidth, 0);
  38781. context.lineTo(-series[i + 1].radius - activeWidth, -eachSpacing);
  38782. context.lineTo(series[i + 1].radius + activeWidth, -eachSpacing);
  38783. context.lineTo(series[i].radius + activeWidth, 0);
  38784. context.lineTo(0, 0);
  38785. context.closePath();
  38786. context.fill();
  38787. }
  38788. }
  38789. series[i].funnelArea = [centerPosition.x - series[i].radius, centerPosition.y - eachSpacing * (i + 1), centerPosition.x + series[i].radius, centerPosition.y - eachSpacing * i];
  38790. context.beginPath();
  38791. context.setLineWidth(funnelOption.borderWidth * opts.pix);
  38792. context.setStrokeStyle(funnelOption.borderColor);
  38793. var fillColor = hexToRgb(series[i].color, funnelOption.fillOpacity);
  38794. if (funnelOption.linearType == 'custom') {
  38795. var grd = context.createLinearGradient(series[i].radius, -eachSpacing, -series[i].radius, -eachSpacing);
  38796. grd.addColorStop(0, hexToRgb(series[i].color, funnelOption.fillOpacity));
  38797. grd.addColorStop(0.5, hexToRgb(funnelOption.customColor[series[i].linearIndex], funnelOption.fillOpacity));
  38798. grd.addColorStop(1, hexToRgb(series[i].color, funnelOption.fillOpacity));
  38799. fillColor = grd;
  38800. }
  38801. context.setFillStyle(fillColor);
  38802. context.moveTo(0, 0);
  38803. context.lineTo(-series[i].radius, 0);
  38804. context.lineTo(-series[i + 1].radius, -eachSpacing);
  38805. context.lineTo(series[i + 1].radius, -eachSpacing);
  38806. context.lineTo(series[i].radius, 0);
  38807. context.lineTo(0, 0);
  38808. context.closePath();
  38809. context.fill();
  38810. if (funnelOption.border == true) {
  38811. context.stroke();
  38812. }
  38813. }
  38814. context.translate(0, -eachSpacing);
  38815. }
  38816. } else {
  38817. for (var _i28 = 0; _i28 < series.length; _i28++) {
  38818. if (_i28 == 0) {
  38819. if (opts.tooltip) {
  38820. if (opts.tooltip.index == _i28) {
  38821. context.beginPath();
  38822. context.setFillStyle(hexToRgb(series[_i28].color, funnelOption.activeOpacity));
  38823. context.moveTo(-activeWidth, 0);
  38824. context.lineTo(-series[_i28].radius - activeWidth, -eachSpacing);
  38825. context.lineTo(series[_i28].radius + activeWidth, -eachSpacing);
  38826. context.lineTo(activeWidth, 0);
  38827. context.lineTo(-activeWidth, 0);
  38828. context.closePath();
  38829. context.fill();
  38830. }
  38831. }
  38832. series[_i28].funnelArea = [centerPosition.x - series[_i28].radius, centerPosition.y - eachSpacing, centerPosition.x + series[_i28].radius, centerPosition.y];
  38833. context.beginPath();
  38834. context.setLineWidth(funnelOption.borderWidth * opts.pix);
  38835. context.setStrokeStyle(funnelOption.borderColor);
  38836. var fillColor = hexToRgb(series[_i28].color, funnelOption.fillOpacity);
  38837. if (funnelOption.linearType == 'custom') {
  38838. var grd = context.createLinearGradient(series[_i28].radius, -eachSpacing, -series[_i28].radius, -eachSpacing);
  38839. grd.addColorStop(0, hexToRgb(series[_i28].color, funnelOption.fillOpacity));
  38840. grd.addColorStop(0.5, hexToRgb(funnelOption.customColor[series[_i28].linearIndex], funnelOption.fillOpacity));
  38841. grd.addColorStop(1, hexToRgb(series[_i28].color, funnelOption.fillOpacity));
  38842. fillColor = grd;
  38843. }
  38844. context.setFillStyle(fillColor);
  38845. context.moveTo(0, 0);
  38846. context.lineTo(-series[_i28].radius, -eachSpacing);
  38847. context.lineTo(series[_i28].radius, -eachSpacing);
  38848. context.lineTo(0, 0);
  38849. context.closePath();
  38850. context.fill();
  38851. if (funnelOption.border == true) {
  38852. context.stroke();
  38853. }
  38854. } else {
  38855. if (opts.tooltip) {
  38856. if (opts.tooltip.index == _i28) {
  38857. context.beginPath();
  38858. context.setFillStyle(hexToRgb(series[_i28].color, funnelOption.activeOpacity));
  38859. context.moveTo(0, 0);
  38860. context.lineTo(-series[_i28 - 1].radius - activeWidth, 0);
  38861. context.lineTo(-series[_i28].radius - activeWidth, -eachSpacing);
  38862. context.lineTo(series[_i28].radius + activeWidth, -eachSpacing);
  38863. context.lineTo(series[_i28 - 1].radius + activeWidth, 0);
  38864. context.lineTo(0, 0);
  38865. context.closePath();
  38866. context.fill();
  38867. }
  38868. }
  38869. series[_i28].funnelArea = [centerPosition.x - series[_i28].radius, centerPosition.y - eachSpacing * (_i28 + 1), centerPosition.x + series[_i28].radius, centerPosition.y - eachSpacing * _i28];
  38870. context.beginPath();
  38871. context.setLineWidth(funnelOption.borderWidth * opts.pix);
  38872. context.setStrokeStyle(funnelOption.borderColor);
  38873. var fillColor = hexToRgb(series[_i28].color, funnelOption.fillOpacity);
  38874. if (funnelOption.linearType == 'custom') {
  38875. var grd = context.createLinearGradient(series[_i28].radius, -eachSpacing, -series[_i28].radius, -eachSpacing);
  38876. grd.addColorStop(0, hexToRgb(series[_i28].color, funnelOption.fillOpacity));
  38877. grd.addColorStop(0.5, hexToRgb(funnelOption.customColor[series[_i28].linearIndex], funnelOption.fillOpacity));
  38878. grd.addColorStop(1, hexToRgb(series[_i28].color, funnelOption.fillOpacity));
  38879. fillColor = grd;
  38880. }
  38881. context.setFillStyle(fillColor);
  38882. context.moveTo(0, 0);
  38883. context.lineTo(-series[_i28 - 1].radius, 0);
  38884. context.lineTo(-series[_i28].radius, -eachSpacing);
  38885. context.lineTo(series[_i28].radius, -eachSpacing);
  38886. context.lineTo(series[_i28 - 1].radius, 0);
  38887. context.lineTo(0, 0);
  38888. context.closePath();
  38889. context.fill();
  38890. if (funnelOption.border == true) {
  38891. context.stroke();
  38892. }
  38893. }
  38894. context.translate(0, -eachSpacing);
  38895. }
  38896. }
  38897. context.restore();
  38898. if (opts.dataLabel !== false && process === 1) {
  38899. drawFunnelText(series, opts, context, eachSpacing, funnelOption.labelAlign, activeWidth, centerPosition);
  38900. }
  38901. return {
  38902. center: centerPosition,
  38903. radius: radius,
  38904. series: series
  38905. };
  38906. }
  38907. function drawFunnelText(series, opts, context, eachSpacing, labelAlign, activeWidth, centerPosition) {
  38908. for (var i = 0; i < series.length; i++) {
  38909. var item = series[i];
  38910. var startX = void 0,
  38911. endX = void 0,
  38912. startY = void 0,
  38913. fontSize = void 0;
  38914. var text = item.formatter ? item.formatter(item, i, series) : util.toFixed(item._proportion_ * 100) + '%';
  38915. if (labelAlign == 'right') {
  38916. if (opts.extra.funnel.type === 'pyramid') {
  38917. if (i == series.length - 1) {
  38918. startX = (item.funnelArea[2] + centerPosition.x) / 2;
  38919. } else {
  38920. startX = (item.funnelArea[2] + series[i + 1].funnelArea[2]) / 2;
  38921. }
  38922. } else {
  38923. if (i == 0) {
  38924. startX = (item.funnelArea[2] + centerPosition.x) / 2;
  38925. } else {
  38926. startX = (item.funnelArea[2] + series[i - 1].funnelArea[2]) / 2;
  38927. }
  38928. }
  38929. endX = startX + activeWidth * 2;
  38930. startY = item.funnelArea[1] + eachSpacing / 2;
  38931. fontSize = item.textSize * opts.pix || opts.fontSize * opts.pix;
  38932. context.setLineWidth(1 * opts.pix);
  38933. context.setStrokeStyle(item.color);
  38934. context.setFillStyle(item.color);
  38935. context.beginPath();
  38936. context.moveTo(startX, startY);
  38937. context.lineTo(endX, startY);
  38938. context.stroke();
  38939. context.closePath();
  38940. context.beginPath();
  38941. context.moveTo(endX, startY);
  38942. context.arc(endX, startY, 2, 0, 2 * Math.PI);
  38943. context.closePath();
  38944. context.fill();
  38945. context.beginPath();
  38946. context.setFontSize(fontSize);
  38947. context.setFillStyle(item.textColor || opts.fontColor);
  38948. context.fillText(text, endX + 5, startY + fontSize / 2 - 2);
  38949. context.closePath();
  38950. context.stroke();
  38951. context.closePath();
  38952. } else {
  38953. if (opts.extra.funnel.type === 'pyramid') {
  38954. if (i == series.length - 1) {
  38955. startX = (item.funnelArea[0] + centerPosition.x) / 2;
  38956. } else {
  38957. startX = (item.funnelArea[0] + series[i + 1].funnelArea[0]) / 2;
  38958. }
  38959. } else {
  38960. if (i == 0) {
  38961. startX = (item.funnelArea[0] + centerPosition.x) / 2;
  38962. } else {
  38963. startX = (item.funnelArea[0] + series[i - 1].funnelArea[0]) / 2;
  38964. }
  38965. }
  38966. endX = startX - activeWidth * 2;
  38967. startY = item.funnelArea[1] + eachSpacing / 2;
  38968. fontSize = item.textSize * opts.pix || opts.fontSize * opts.pix;
  38969. context.setLineWidth(1 * opts.pix);
  38970. context.setStrokeStyle(item.color);
  38971. context.setFillStyle(item.color);
  38972. context.beginPath();
  38973. context.moveTo(startX, startY);
  38974. context.lineTo(endX, startY);
  38975. context.stroke();
  38976. context.closePath();
  38977. context.beginPath();
  38978. context.moveTo(endX, startY);
  38979. context.arc(endX, startY, 2, 0, 2 * Math.PI);
  38980. context.closePath();
  38981. context.fill();
  38982. context.beginPath();
  38983. context.setFontSize(fontSize);
  38984. context.setFillStyle(item.textColor || opts.fontColor);
  38985. context.fillText(text, endX - 5 - measureText(text, fontSize, context), startY + fontSize / 2 - 2);
  38986. context.closePath();
  38987. context.stroke();
  38988. context.closePath();
  38989. }
  38990. }
  38991. }
  38992. function drawCanvas(opts, context) {
  38993. context.draw();
  38994. }
  38995. var Timing = {
  38996. easeIn: function easeIn(pos) {
  38997. return Math.pow(pos, 3);
  38998. },
  38999. easeOut: function easeOut(pos) {
  39000. return Math.pow(pos - 1, 3) + 1;
  39001. },
  39002. easeInOut: function easeInOut(pos) {
  39003. if ((pos /= 0.5) < 1) {
  39004. return 0.5 * Math.pow(pos, 3);
  39005. } else {
  39006. return 0.5 * (Math.pow(pos - 2, 3) + 2);
  39007. }
  39008. },
  39009. linear: function linear(pos) {
  39010. return pos;
  39011. }
  39012. };
  39013. function Animation(opts) {
  39014. this.isStop = false;
  39015. opts.duration = typeof opts.duration === 'undefined' ? 1000 : opts.duration;
  39016. opts.timing = opts.timing || 'easeInOut';
  39017. var delay = 17;
  39018. function createAnimationFrame() {
  39019. if (typeof setTimeout !== 'undefined') {
  39020. return function (step, delay) {
  39021. setTimeout(function () {
  39022. var timeStamp = +new Date();
  39023. step(timeStamp);
  39024. }, delay);
  39025. };
  39026. } else if (typeof requestAnimationFrame !== 'undefined') {
  39027. return requestAnimationFrame;
  39028. } else {
  39029. return function (step) {
  39030. step(null);
  39031. };
  39032. }
  39033. }
  39034. ;
  39035. var animationFrame = createAnimationFrame();
  39036. var startTimeStamp = null;
  39037. var _step = function step(timestamp) {
  39038. if (timestamp === null || this.isStop === true) {
  39039. opts.onProcess && opts.onProcess(1);
  39040. opts.onAnimationFinish && opts.onAnimationFinish();
  39041. return;
  39042. }
  39043. if (startTimeStamp === null) {
  39044. startTimeStamp = timestamp;
  39045. }
  39046. if (timestamp - startTimeStamp < opts.duration) {
  39047. var process = (timestamp - startTimeStamp) / opts.duration;
  39048. var timingFunction = Timing[opts.timing];
  39049. process = timingFunction(process);
  39050. opts.onProcess && opts.onProcess(process);
  39051. animationFrame(_step, delay);
  39052. } else {
  39053. opts.onProcess && opts.onProcess(1);
  39054. opts.onAnimationFinish && opts.onAnimationFinish();
  39055. }
  39056. };
  39057. _step = _step.bind(this);
  39058. animationFrame(_step, delay);
  39059. }
  39060. Animation.prototype.stop = function () {
  39061. this.isStop = true;
  39062. };
  39063. function drawCharts(type, opts, config, context) {
  39064. var _this = this;
  39065. var series = opts.series;
  39066. //兼容ECharts饼图类数据格式
  39067. if (type === 'pie' || type === 'ring' || type === 'rose' || type === 'funnel') {
  39068. series = fixPieSeries(series, opts, config);
  39069. }
  39070. var categories = opts.categories;
  39071. series = fillSeries(series, opts, config);
  39072. var duration = opts.animation ? opts.duration : 0;
  39073. _this.animationInstance && _this.animationInstance.stop();
  39074. var seriesMA = null;
  39075. if (type == 'candle') {
  39076. var average = assign({}, opts.extra.candle.average);
  39077. if (average.show) {
  39078. seriesMA = calCandleMA(average.day, average.name, average.color, series[0].data);
  39079. seriesMA = fillSeries(seriesMA, opts, config);
  39080. opts.seriesMA = seriesMA;
  39081. } else if (opts.seriesMA) {
  39082. seriesMA = opts.seriesMA = fillSeries(opts.seriesMA, opts, config);
  39083. } else {
  39084. seriesMA = series;
  39085. }
  39086. } else {
  39087. seriesMA = series;
  39088. }
  39089. /* 过滤掉show=false的series */
  39090. opts._series_ = series = filterSeries(series);
  39091. //重新计算图表区域
  39092. opts.area = new Array(4);
  39093. //复位绘图区域
  39094. for (var j = 0; j < 4; j++) {
  39095. opts.area[j] = opts.padding[j] * opts.pix;
  39096. }
  39097. //通过计算三大区域:图例、X轴、Y轴的大小,确定绘图区域
  39098. var _calLegendData = calLegendData(seriesMA, opts, config, opts.chartData, context),
  39099. legendHeight = _calLegendData.area.wholeHeight,
  39100. legendWidth = _calLegendData.area.wholeWidth;
  39101. switch (opts.legend.position) {
  39102. case 'top':
  39103. opts.area[0] += legendHeight;
  39104. break;
  39105. case 'bottom':
  39106. opts.area[2] += legendHeight;
  39107. break;
  39108. case 'left':
  39109. opts.area[3] += legendWidth;
  39110. break;
  39111. case 'right':
  39112. opts.area[1] += legendWidth;
  39113. break;
  39114. }
  39115. var _calYAxisData = {},
  39116. yAxisWidth = 0;
  39117. 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') {
  39118. _calYAxisData = calYAxisData(series, opts, config, context);
  39119. yAxisWidth = _calYAxisData.yAxisWidth;
  39120. //如果显示Y轴标题
  39121. if (opts.yAxis.showTitle) {
  39122. var maxTitleHeight = 0;
  39123. for (var i = 0; i < opts.yAxis.data.length; i++) {
  39124. maxTitleHeight = Math.max(maxTitleHeight, opts.yAxis.data[i].titleFontSize ? opts.yAxis.data[i].titleFontSize * opts.pix : config.fontSize);
  39125. }
  39126. opts.area[0] += maxTitleHeight;
  39127. }
  39128. var rightIndex = 0,
  39129. leftIndex = 0;
  39130. //计算主绘图区域左右位置
  39131. for (var _i29 = 0; _i29 < yAxisWidth.length; _i29++) {
  39132. if (yAxisWidth[_i29].position == 'left') {
  39133. if (leftIndex > 0) {
  39134. opts.area[3] += yAxisWidth[_i29].width + opts.yAxis.padding * opts.pix;
  39135. } else {
  39136. opts.area[3] += yAxisWidth[_i29].width;
  39137. }
  39138. leftIndex += 1;
  39139. } else if (yAxisWidth[_i29].position == 'right') {
  39140. if (rightIndex > 0) {
  39141. opts.area[1] += yAxisWidth[_i29].width + opts.yAxis.padding * opts.pix;
  39142. } else {
  39143. opts.area[1] += yAxisWidth[_i29].width;
  39144. }
  39145. rightIndex += 1;
  39146. }
  39147. }
  39148. } else {
  39149. config.yAxisWidth = yAxisWidth;
  39150. }
  39151. opts.chartData.yAxisData = _calYAxisData;
  39152. if (opts.categories && opts.categories.length && opts.type !== 'radar' && opts.type !== 'gauge' && opts.type !== 'bar') {
  39153. opts.chartData.xAxisData = getXAxisPoints(opts.categories, opts, config);
  39154. var _calCategoriesData = calCategoriesData(opts.categories, opts, config, opts.chartData.xAxisData.eachSpacing, context),
  39155. xAxisHeight = _calCategoriesData.xAxisHeight,
  39156. angle = _calCategoriesData.angle;
  39157. config.xAxisHeight = xAxisHeight;
  39158. config._xAxisTextAngle_ = angle;
  39159. opts.area[2] += xAxisHeight;
  39160. opts.chartData.categoriesData = _calCategoriesData;
  39161. } else {
  39162. if (opts.type === 'line' || opts.type === 'area' || opts.type === 'scatter' || opts.type === 'bubble' || opts.type === 'bar') {
  39163. opts.chartData.xAxisData = calXAxisData(series, opts, config, context);
  39164. categories = opts.chartData.xAxisData.rangesFormat;
  39165. var _calCategoriesData2 = calCategoriesData(categories, opts, config, opts.chartData.xAxisData.eachSpacing, context),
  39166. _xAxisHeight = _calCategoriesData2.xAxisHeight,
  39167. _angle = _calCategoriesData2.angle;
  39168. config.xAxisHeight = _xAxisHeight;
  39169. config._xAxisTextAngle_ = _angle;
  39170. opts.area[2] += _xAxisHeight;
  39171. opts.chartData.categoriesData = _calCategoriesData2;
  39172. } else {
  39173. opts.chartData.xAxisData = {
  39174. xAxisPoints: []
  39175. };
  39176. }
  39177. }
  39178. //计算右对齐偏移距离
  39179. if (opts.enableScroll && opts.xAxis.scrollAlign == 'right' && opts._scrollDistance_ === undefined) {
  39180. var offsetLeft = 0,
  39181. xAxisPoints = opts.chartData.xAxisData.xAxisPoints,
  39182. startX = opts.chartData.xAxisData.startX,
  39183. endX = opts.chartData.xAxisData.endX,
  39184. eachSpacing = opts.chartData.xAxisData.eachSpacing;
  39185. var totalWidth = eachSpacing * (xAxisPoints.length - 1);
  39186. var screenWidth = endX - startX;
  39187. offsetLeft = screenWidth - totalWidth;
  39188. _this.scrollOption = {
  39189. currentOffset: offsetLeft,
  39190. startTouchX: offsetLeft,
  39191. distance: 0,
  39192. lastMoveTime: 0
  39193. };
  39194. opts._scrollDistance_ = offsetLeft;
  39195. }
  39196. if (type === 'pie' || type === 'ring' || type === 'rose') {
  39197. config._pieTextMaxLength_ = opts.dataLabel === false ? 0 : getPieTextMaxLength(seriesMA, config, context, opts);
  39198. }
  39199. switch (type) {
  39200. case 'word':
  39201. this.animationInstance = new Animation({
  39202. timing: opts.timing,
  39203. duration: duration,
  39204. onProcess: function onProcess(process) {
  39205. context.clearRect(0, 0, opts.width, opts.height);
  39206. if (opts.rotate) {
  39207. contextRotate(context, opts);
  39208. }
  39209. drawWordCloudDataPoints(series, opts, config, context, process);
  39210. drawCanvas(opts, context);
  39211. },
  39212. onAnimationFinish: function onAnimationFinish() {
  39213. _this.uevent.trigger('renderComplete');
  39214. }
  39215. });
  39216. break;
  39217. case 'map':
  39218. context.clearRect(0, 0, opts.width, opts.height);
  39219. drawMapDataPoints(series, opts, config, context);
  39220. break;
  39221. case 'funnel':
  39222. this.animationInstance = new Animation({
  39223. timing: opts.timing,
  39224. duration: duration,
  39225. onProcess: function onProcess(process) {
  39226. context.clearRect(0, 0, opts.width, opts.height);
  39227. if (opts.rotate) {
  39228. contextRotate(context, opts);
  39229. }
  39230. opts.chartData.funnelData = drawFunnelDataPoints(series, opts, config, context, process);
  39231. drawLegend(opts.series, opts, config, context, opts.chartData);
  39232. drawToolTipBridge(opts, config, context, process);
  39233. drawCanvas(opts, context);
  39234. },
  39235. onAnimationFinish: function onAnimationFinish() {
  39236. _this.uevent.trigger('renderComplete');
  39237. }
  39238. });
  39239. break;
  39240. case 'line':
  39241. this.animationInstance = new Animation({
  39242. timing: opts.timing,
  39243. duration: duration,
  39244. onProcess: function onProcess(process) {
  39245. context.clearRect(0, 0, opts.width, opts.height);
  39246. if (opts.rotate) {
  39247. contextRotate(context, opts);
  39248. }
  39249. drawYAxisGrid(categories, opts, config, context);
  39250. drawXAxis(categories, opts, config, context);
  39251. var _drawLineDataPoints = drawLineDataPoints(series, opts, config, context, process),
  39252. xAxisPoints = _drawLineDataPoints.xAxisPoints,
  39253. calPoints = _drawLineDataPoints.calPoints,
  39254. eachSpacing = _drawLineDataPoints.eachSpacing;
  39255. opts.chartData.xAxisPoints = xAxisPoints;
  39256. opts.chartData.calPoints = calPoints;
  39257. opts.chartData.eachSpacing = eachSpacing;
  39258. drawYAxis(series, opts, config, context);
  39259. if (opts.enableMarkLine !== false && process === 1) {
  39260. drawMarkLine(opts, config, context);
  39261. }
  39262. drawLegend(opts.series, opts, config, context, opts.chartData);
  39263. drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
  39264. drawCanvas(opts, context);
  39265. },
  39266. onAnimationFinish: function onAnimationFinish() {
  39267. _this.uevent.trigger('renderComplete');
  39268. }
  39269. });
  39270. break;
  39271. case 'scatter':
  39272. this.animationInstance = new Animation({
  39273. timing: opts.timing,
  39274. duration: duration,
  39275. onProcess: function onProcess(process) {
  39276. context.clearRect(0, 0, opts.width, opts.height);
  39277. if (opts.rotate) {
  39278. contextRotate(context, opts);
  39279. }
  39280. drawYAxisGrid(categories, opts, config, context);
  39281. drawXAxis(categories, opts, config, context);
  39282. var _drawScatterDataPoints = drawScatterDataPoints(series, opts, config, context, process),
  39283. xAxisPoints = _drawScatterDataPoints.xAxisPoints,
  39284. calPoints = _drawScatterDataPoints.calPoints,
  39285. eachSpacing = _drawScatterDataPoints.eachSpacing;
  39286. opts.chartData.xAxisPoints = xAxisPoints;
  39287. opts.chartData.calPoints = calPoints;
  39288. opts.chartData.eachSpacing = eachSpacing;
  39289. drawYAxis(series, opts, config, context);
  39290. if (opts.enableMarkLine !== false && process === 1) {
  39291. drawMarkLine(opts, config, context);
  39292. }
  39293. drawLegend(opts.series, opts, config, context, opts.chartData);
  39294. drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
  39295. drawCanvas(opts, context);
  39296. },
  39297. onAnimationFinish: function onAnimationFinish() {
  39298. _this.uevent.trigger('renderComplete');
  39299. }
  39300. });
  39301. break;
  39302. case 'bubble':
  39303. this.animationInstance = new Animation({
  39304. timing: opts.timing,
  39305. duration: duration,
  39306. onProcess: function onProcess(process) {
  39307. context.clearRect(0, 0, opts.width, opts.height);
  39308. if (opts.rotate) {
  39309. contextRotate(context, opts);
  39310. }
  39311. drawYAxisGrid(categories, opts, config, context);
  39312. drawXAxis(categories, opts, config, context);
  39313. var _drawBubbleDataPoints = drawBubbleDataPoints(series, opts, config, context, process),
  39314. xAxisPoints = _drawBubbleDataPoints.xAxisPoints,
  39315. calPoints = _drawBubbleDataPoints.calPoints,
  39316. eachSpacing = _drawBubbleDataPoints.eachSpacing;
  39317. opts.chartData.xAxisPoints = xAxisPoints;
  39318. opts.chartData.calPoints = calPoints;
  39319. opts.chartData.eachSpacing = eachSpacing;
  39320. drawYAxis(series, opts, config, context);
  39321. if (opts.enableMarkLine !== false && process === 1) {
  39322. drawMarkLine(opts, config, context);
  39323. }
  39324. drawLegend(opts.series, opts, config, context, opts.chartData);
  39325. drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
  39326. drawCanvas(opts, context);
  39327. },
  39328. onAnimationFinish: function onAnimationFinish() {
  39329. _this.uevent.trigger('renderComplete');
  39330. }
  39331. });
  39332. break;
  39333. case 'mix':
  39334. this.animationInstance = new Animation({
  39335. timing: opts.timing,
  39336. duration: duration,
  39337. onProcess: function onProcess(process) {
  39338. context.clearRect(0, 0, opts.width, opts.height);
  39339. if (opts.rotate) {
  39340. contextRotate(context, opts);
  39341. }
  39342. drawYAxisGrid(categories, opts, config, context);
  39343. drawXAxis(categories, opts, config, context);
  39344. var _drawMixDataPoints = drawMixDataPoints(series, opts, config, context, process),
  39345. xAxisPoints = _drawMixDataPoints.xAxisPoints,
  39346. calPoints = _drawMixDataPoints.calPoints,
  39347. eachSpacing = _drawMixDataPoints.eachSpacing;
  39348. opts.chartData.xAxisPoints = xAxisPoints;
  39349. opts.chartData.calPoints = calPoints;
  39350. opts.chartData.eachSpacing = eachSpacing;
  39351. drawYAxis(series, opts, config, context);
  39352. if (opts.enableMarkLine !== false && process === 1) {
  39353. drawMarkLine(opts, config, context);
  39354. }
  39355. drawLegend(opts.series, opts, config, context, opts.chartData);
  39356. drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
  39357. drawCanvas(opts, context);
  39358. },
  39359. onAnimationFinish: function onAnimationFinish() {
  39360. _this.uevent.trigger('renderComplete');
  39361. }
  39362. });
  39363. break;
  39364. case 'column':
  39365. this.animationInstance = new Animation({
  39366. timing: opts.timing,
  39367. duration: duration,
  39368. onProcess: function onProcess(process) {
  39369. context.clearRect(0, 0, opts.width, opts.height);
  39370. if (opts.rotate) {
  39371. contextRotate(context, opts);
  39372. }
  39373. drawYAxisGrid(categories, opts, config, context);
  39374. drawXAxis(categories, opts, config, context);
  39375. var _drawColumnDataPoints = drawColumnDataPoints(series, opts, config, context, process),
  39376. xAxisPoints = _drawColumnDataPoints.xAxisPoints,
  39377. calPoints = _drawColumnDataPoints.calPoints,
  39378. eachSpacing = _drawColumnDataPoints.eachSpacing;
  39379. opts.chartData.xAxisPoints = xAxisPoints;
  39380. opts.chartData.calPoints = calPoints;
  39381. opts.chartData.eachSpacing = eachSpacing;
  39382. drawYAxis(series, opts, config, context);
  39383. if (opts.enableMarkLine !== false && process === 1) {
  39384. drawMarkLine(opts, config, context);
  39385. }
  39386. drawLegend(opts.series, opts, config, context, opts.chartData);
  39387. drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
  39388. drawCanvas(opts, context);
  39389. },
  39390. onAnimationFinish: function onAnimationFinish() {
  39391. _this.uevent.trigger('renderComplete');
  39392. }
  39393. });
  39394. break;
  39395. case 'bar':
  39396. this.animationInstance = new Animation({
  39397. timing: opts.timing,
  39398. duration: duration,
  39399. onProcess: function onProcess(process) {
  39400. context.clearRect(0, 0, opts.width, opts.height);
  39401. if (opts.rotate) {
  39402. contextRotate(context, opts);
  39403. }
  39404. drawXAxis(categories, opts, config, context);
  39405. var _drawBarDataPoints = drawBarDataPoints(series, opts, config, context, process),
  39406. yAxisPoints = _drawBarDataPoints.yAxisPoints,
  39407. calPoints = _drawBarDataPoints.calPoints,
  39408. eachSpacing = _drawBarDataPoints.eachSpacing;
  39409. opts.chartData.yAxisPoints = yAxisPoints;
  39410. opts.chartData.xAxisPoints = opts.chartData.xAxisData.xAxisPoints;
  39411. opts.chartData.calPoints = calPoints;
  39412. opts.chartData.eachSpacing = eachSpacing;
  39413. drawYAxis(series, opts, config, context);
  39414. if (opts.enableMarkLine !== false && process === 1) {
  39415. drawMarkLine(opts, config, context);
  39416. }
  39417. drawLegend(opts.series, opts, config, context, opts.chartData);
  39418. drawToolTipBridge(opts, config, context, process, eachSpacing, yAxisPoints);
  39419. drawCanvas(opts, context);
  39420. },
  39421. onAnimationFinish: function onAnimationFinish() {
  39422. _this.uevent.trigger('renderComplete');
  39423. }
  39424. });
  39425. break;
  39426. case 'area':
  39427. this.animationInstance = new Animation({
  39428. timing: opts.timing,
  39429. duration: duration,
  39430. onProcess: function onProcess(process) {
  39431. context.clearRect(0, 0, opts.width, opts.height);
  39432. if (opts.rotate) {
  39433. contextRotate(context, opts);
  39434. }
  39435. drawYAxisGrid(categories, opts, config, context);
  39436. drawXAxis(categories, opts, config, context);
  39437. var _drawAreaDataPoints = drawAreaDataPoints(series, opts, config, context, process),
  39438. xAxisPoints = _drawAreaDataPoints.xAxisPoints,
  39439. calPoints = _drawAreaDataPoints.calPoints,
  39440. eachSpacing = _drawAreaDataPoints.eachSpacing;
  39441. opts.chartData.xAxisPoints = xAxisPoints;
  39442. opts.chartData.calPoints = calPoints;
  39443. opts.chartData.eachSpacing = eachSpacing;
  39444. drawYAxis(series, opts, config, context);
  39445. if (opts.enableMarkLine !== false && process === 1) {
  39446. drawMarkLine(opts, config, context);
  39447. }
  39448. drawLegend(opts.series, opts, config, context, opts.chartData);
  39449. drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
  39450. drawCanvas(opts, context);
  39451. },
  39452. onAnimationFinish: function onAnimationFinish() {
  39453. _this.uevent.trigger('renderComplete');
  39454. }
  39455. });
  39456. break;
  39457. case 'ring':
  39458. case 'pie':
  39459. this.animationInstance = new Animation({
  39460. timing: opts.timing,
  39461. duration: duration,
  39462. onProcess: function onProcess(process) {
  39463. context.clearRect(0, 0, opts.width, opts.height);
  39464. if (opts.rotate) {
  39465. contextRotate(context, opts);
  39466. }
  39467. opts.chartData.pieData = drawPieDataPoints(series, opts, config, context, process);
  39468. drawLegend(opts.series, opts, config, context, opts.chartData);
  39469. drawToolTipBridge(opts, config, context, process);
  39470. drawCanvas(opts, context);
  39471. },
  39472. onAnimationFinish: function onAnimationFinish() {
  39473. _this.uevent.trigger('renderComplete');
  39474. }
  39475. });
  39476. break;
  39477. case 'rose':
  39478. this.animationInstance = new Animation({
  39479. timing: opts.timing,
  39480. duration: duration,
  39481. onProcess: function onProcess(process) {
  39482. context.clearRect(0, 0, opts.width, opts.height);
  39483. if (opts.rotate) {
  39484. contextRotate(context, opts);
  39485. }
  39486. opts.chartData.pieData = drawRoseDataPoints(series, opts, config, context, process);
  39487. drawLegend(opts.series, opts, config, context, opts.chartData);
  39488. drawToolTipBridge(opts, config, context, process);
  39489. drawCanvas(opts, context);
  39490. },
  39491. onAnimationFinish: function onAnimationFinish() {
  39492. _this.uevent.trigger('renderComplete');
  39493. }
  39494. });
  39495. break;
  39496. case 'radar':
  39497. this.animationInstance = new Animation({
  39498. timing: opts.timing,
  39499. duration: duration,
  39500. onProcess: function onProcess(process) {
  39501. context.clearRect(0, 0, opts.width, opts.height);
  39502. if (opts.rotate) {
  39503. contextRotate(context, opts);
  39504. }
  39505. opts.chartData.radarData = drawRadarDataPoints(series, opts, config, context, process);
  39506. drawLegend(opts.series, opts, config, context, opts.chartData);
  39507. drawToolTipBridge(opts, config, context, process);
  39508. drawCanvas(opts, context);
  39509. },
  39510. onAnimationFinish: function onAnimationFinish() {
  39511. _this.uevent.trigger('renderComplete');
  39512. }
  39513. });
  39514. break;
  39515. case 'arcbar':
  39516. this.animationInstance = new Animation({
  39517. timing: opts.timing,
  39518. duration: duration,
  39519. onProcess: function onProcess(process) {
  39520. context.clearRect(0, 0, opts.width, opts.height);
  39521. if (opts.rotate) {
  39522. contextRotate(context, opts);
  39523. }
  39524. opts.chartData.arcbarData = drawArcbarDataPoints(series, opts, config, context, process);
  39525. drawCanvas(opts, context);
  39526. },
  39527. onAnimationFinish: function onAnimationFinish() {
  39528. _this.uevent.trigger('renderComplete');
  39529. }
  39530. });
  39531. break;
  39532. case 'gauge':
  39533. this.animationInstance = new Animation({
  39534. timing: opts.timing,
  39535. duration: duration,
  39536. onProcess: function onProcess(process) {
  39537. context.clearRect(0, 0, opts.width, opts.height);
  39538. if (opts.rotate) {
  39539. contextRotate(context, opts);
  39540. }
  39541. opts.chartData.gaugeData = drawGaugeDataPoints(categories, series, opts, config, context, process);
  39542. drawCanvas(opts, context);
  39543. },
  39544. onAnimationFinish: function onAnimationFinish() {
  39545. _this.uevent.trigger('renderComplete');
  39546. }
  39547. });
  39548. break;
  39549. case 'candle':
  39550. this.animationInstance = new Animation({
  39551. timing: opts.timing,
  39552. duration: duration,
  39553. onProcess: function onProcess(process) {
  39554. context.clearRect(0, 0, opts.width, opts.height);
  39555. if (opts.rotate) {
  39556. contextRotate(context, opts);
  39557. }
  39558. drawYAxisGrid(categories, opts, config, context);
  39559. drawXAxis(categories, opts, config, context);
  39560. var _drawCandleDataPoints = drawCandleDataPoints(series, seriesMA, opts, config, context, process),
  39561. xAxisPoints = _drawCandleDataPoints.xAxisPoints,
  39562. calPoints = _drawCandleDataPoints.calPoints,
  39563. eachSpacing = _drawCandleDataPoints.eachSpacing;
  39564. opts.chartData.xAxisPoints = xAxisPoints;
  39565. opts.chartData.calPoints = calPoints;
  39566. opts.chartData.eachSpacing = eachSpacing;
  39567. drawYAxis(series, opts, config, context);
  39568. if (opts.enableMarkLine !== false && process === 1) {
  39569. drawMarkLine(opts, config, context);
  39570. }
  39571. if (seriesMA) {
  39572. drawLegend(seriesMA, opts, config, context, opts.chartData);
  39573. } else {
  39574. drawLegend(opts.series, opts, config, context, opts.chartData);
  39575. }
  39576. drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
  39577. drawCanvas(opts, context);
  39578. },
  39579. onAnimationFinish: function onAnimationFinish() {
  39580. _this.uevent.trigger('renderComplete');
  39581. }
  39582. });
  39583. break;
  39584. }
  39585. }
  39586. function uChartsEvent() {
  39587. this.events = {};
  39588. }
  39589. uChartsEvent.prototype.addEventListener = function (type, listener) {
  39590. this.events[type] = this.events[type] || [];
  39591. this.events[type].push(listener);
  39592. };
  39593. uChartsEvent.prototype.delEventListener = function (type) {
  39594. this.events[type] = [];
  39595. };
  39596. uChartsEvent.prototype.trigger = function () {
  39597. for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
  39598. args[_key] = arguments[_key];
  39599. }
  39600. var type = args[0];
  39601. var params = args.slice(1);
  39602. if (!!this.events[type]) {
  39603. this.events[type].forEach(function (listener) {
  39604. try {
  39605. listener.apply(null, params);
  39606. } catch (e) {
  39607. //console.log('[uCharts] '+e);
  39608. }
  39609. });
  39610. }
  39611. };
  39612. var uCharts = function uCharts(opts) {
  39613. opts.pix = opts.pixelRatio ? opts.pixelRatio : 1;
  39614. opts.fontSize = opts.fontSize ? opts.fontSize : 13;
  39615. opts.fontColor = opts.fontColor ? opts.fontColor : config.fontColor;
  39616. if (opts.background == "" || opts.background == "none") {
  39617. opts.background = "#FFFFFF";
  39618. }
  39619. opts.title = assign({}, opts.title);
  39620. opts.subtitle = assign({}, opts.subtitle);
  39621. opts.duration = opts.duration ? opts.duration : 1000;
  39622. opts.yAxis = assign({}, {
  39623. data: [],
  39624. showTitle: false,
  39625. disabled: false,
  39626. disableGrid: false,
  39627. splitNumber: 5,
  39628. gridType: 'solid',
  39629. dashLength: 4 * opts.pix,
  39630. gridColor: '#cccccc',
  39631. padding: 10,
  39632. fontColor: '#666666'
  39633. }, opts.yAxis);
  39634. opts.xAxis = assign({}, {
  39635. rotateLabel: false,
  39636. disabled: false,
  39637. disableGrid: false,
  39638. splitNumber: 5,
  39639. calibration: false,
  39640. gridType: 'solid',
  39641. dashLength: 4,
  39642. scrollAlign: 'left',
  39643. boundaryGap: 'center',
  39644. axisLine: true,
  39645. axisLineColor: '#cccccc'
  39646. }, opts.xAxis);
  39647. opts.xAxis.scrollPosition = opts.xAxis.scrollAlign;
  39648. opts.legend = assign({}, {
  39649. show: true,
  39650. position: 'bottom',
  39651. float: 'center',
  39652. backgroundColor: 'rgba(0,0,0,0)',
  39653. borderColor: 'rgba(0,0,0,0)',
  39654. borderWidth: 0,
  39655. padding: 5,
  39656. margin: 5,
  39657. itemGap: 10,
  39658. fontSize: opts.fontSize,
  39659. lineHeight: opts.fontSize,
  39660. fontColor: opts.fontColor,
  39661. formatter: {},
  39662. hiddenColor: '#CECECE'
  39663. }, opts.legend);
  39664. opts.extra = assign({}, opts.extra);
  39665. opts.rotate = opts.rotate ? true : false;
  39666. opts.animation = opts.animation ? true : false;
  39667. opts.rotate = opts.rotate ? true : false;
  39668. opts.canvas2d = opts.canvas2d ? true : false;
  39669. var config$$1 = JSON.parse(JSON.stringify(config));
  39670. config$$1.color = opts.color ? opts.color : config$$1.color;
  39671. config$$1.yAxisTitleWidth = opts.yAxis.disabled !== true && opts.yAxis.title ? config$$1.yAxisTitleWidth : 0;
  39672. if (opts.type == 'pie') {
  39673. config$$1.pieChartLinePadding = opts.dataLabel === false ? 0 : opts.extra.pie.labelWidth * opts.pix || config$$1.pieChartLinePadding * opts.pix;
  39674. }
  39675. if (opts.type == 'ring') {
  39676. config$$1.pieChartLinePadding = opts.dataLabel === false ? 0 : opts.extra.ring.labelWidth * opts.pix || config$$1.pieChartLinePadding * opts.pix;
  39677. }
  39678. if (opts.type == 'rose') {
  39679. config$$1.pieChartLinePadding = opts.dataLabel === false ? 0 : opts.extra.rose.labelWidth * opts.pix || config$$1.pieChartLinePadding * opts.pix;
  39680. }
  39681. config$$1.pieChartTextPadding = opts.dataLabel === false ? 0 : config$$1.pieChartTextPadding * opts.pix;
  39682. config$$1.yAxisSplit = opts.yAxis.splitNumber ? opts.yAxis.splitNumber : config.yAxisSplit;
  39683. //屏幕旋转
  39684. config$$1.rotate = opts.rotate;
  39685. if (opts.rotate) {
  39686. var tempWidth = opts.width;
  39687. var tempHeight = opts.height;
  39688. opts.width = tempHeight;
  39689. opts.height = tempWidth;
  39690. }
  39691. //适配高分屏
  39692. opts.padding = opts.padding ? opts.padding : config$$1.padding;
  39693. config$$1.yAxisWidth = config.yAxisWidth * opts.pix;
  39694. config$$1.xAxisHeight = config.xAxisHeight * opts.pix;
  39695. if (opts.enableScroll && opts.xAxis.scrollShow) {
  39696. config$$1.xAxisHeight += 6 * opts.pix;
  39697. }
  39698. config$$1.xAxisLineHeight = config.xAxisLineHeight * opts.pix;
  39699. config$$1.fontSize = opts.fontSize * opts.pix;
  39700. config$$1.titleFontSize = config.titleFontSize * opts.pix;
  39701. config$$1.subtitleFontSize = config.subtitleFontSize * opts.pix;
  39702. config$$1.toolTipPadding = config.toolTipPadding * opts.pix;
  39703. config$$1.toolTipLineHeight = config.toolTipLineHeight * opts.pix;
  39704. config$$1.columePadding = config.columePadding * opts.pix;
  39705. //this.context = opts.context ? opts.context : uni.createCanvasContext(opts.canvasId, opts.$this);
  39706. //v2.0版本后需要自行获取context并传入opts进行初始化,这么做是为了确保uCharts可以跨更多端使用,并保证了自定义组件this实例不被循环嵌套。如果您觉得不便请取消上面注释,采用v1.0版本的方式使用,对此给您带来的不便敬请谅解!
  39707. if (!opts.context) {
  39708. throw new Error('[uCharts] 未获取到context!注意:v2.0版本后,需要自行获取canvas的绘图上下文并传入opts.context!');
  39709. }
  39710. this.context = opts.context;
  39711. if (!this.context.setTextAlign) {
  39712. this.context.setStrokeStyle = function (e) {
  39713. return this.strokeStyle = e;
  39714. };
  39715. this.context.setLineWidth = function (e) {
  39716. return this.lineWidth = e;
  39717. };
  39718. this.context.setLineCap = function (e) {
  39719. return this.lineCap = e;
  39720. };
  39721. this.context.setFontSize = function (e) {
  39722. return this.font = e + "px sans-serif";
  39723. };
  39724. this.context.setFillStyle = function (e) {
  39725. return this.fillStyle = e;
  39726. };
  39727. this.context.setTextAlign = function (e) {
  39728. return this.textAlign = e;
  39729. };
  39730. this.context.draw = function () {};
  39731. }
  39732. //兼容NVUEsetLineDash
  39733. if (!this.context.setLineDash) {
  39734. this.context.setLineDash = function (e) {};
  39735. }
  39736. opts.chartData = {};
  39737. this.uevent = new uChartsEvent();
  39738. this.scrollOption = {
  39739. currentOffset: 0,
  39740. startTouchX: 0,
  39741. distance: 0,
  39742. lastMoveTime: 0
  39743. };
  39744. this.opts = opts;
  39745. this.config = config$$1;
  39746. drawCharts.call(this, opts.type, opts, config$$1, this.context);
  39747. };
  39748. uCharts.prototype.updateData = function () {
  39749. var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  39750. this.opts = assign({}, this.opts, data);
  39751. this.opts.updateData = true;
  39752. var scrollPosition = data.scrollPosition || 'current';
  39753. switch (scrollPosition) {
  39754. case 'current':
  39755. //this.opts._scrollDistance_ = this.scrollOption.currentOffset;
  39756. break;
  39757. case 'left':
  39758. this.opts._scrollDistance_ = 0;
  39759. this.scrollOption = {
  39760. currentOffset: 0,
  39761. startTouchX: 0,
  39762. distance: 0,
  39763. lastMoveTime: 0
  39764. };
  39765. break;
  39766. case 'right':
  39767. var _calYAxisData = calYAxisData(this.opts.series, this.opts, this.config, this.context),
  39768. yAxisWidth = _calYAxisData.yAxisWidth;
  39769. this.config.yAxisWidth = yAxisWidth;
  39770. var offsetLeft = 0;
  39771. var _getXAxisPoints0 = getXAxisPoints(this.opts.categories, this.opts, this.config),
  39772. xAxisPoints = _getXAxisPoints0.xAxisPoints,
  39773. startX = _getXAxisPoints0.startX,
  39774. endX = _getXAxisPoints0.endX,
  39775. eachSpacing = _getXAxisPoints0.eachSpacing;
  39776. var totalWidth = eachSpacing * (xAxisPoints.length - 1);
  39777. var screenWidth = endX - startX;
  39778. offsetLeft = screenWidth - totalWidth;
  39779. this.scrollOption = {
  39780. currentOffset: offsetLeft,
  39781. startTouchX: offsetLeft,
  39782. distance: 0,
  39783. lastMoveTime: 0
  39784. };
  39785. this.opts._scrollDistance_ = offsetLeft;
  39786. break;
  39787. }
  39788. drawCharts.call(this, this.opts.type, this.opts, this.config, this.context);
  39789. };
  39790. uCharts.prototype.zoom = function () {
  39791. var val = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.opts.xAxis.itemCount;
  39792. if (this.opts.enableScroll !== true) {
  39793. console.log('[uCharts] 请启用滚动条后使用');
  39794. return;
  39795. }
  39796. //当前屏幕中间点
  39797. var centerPoint = Math.round(Math.abs(this.scrollOption.currentOffset) / this.opts.chartData.eachSpacing) + Math.round(this.opts.xAxis.itemCount / 2);
  39798. this.opts.animation = false;
  39799. this.opts.xAxis.itemCount = val.itemCount;
  39800. //重新计算x轴偏移距离
  39801. var _calYAxisData = calYAxisData(this.opts.series, this.opts, this.config, this.context),
  39802. yAxisWidth = _calYAxisData.yAxisWidth;
  39803. this.config.yAxisWidth = yAxisWidth;
  39804. var offsetLeft = 0;
  39805. var _getXAxisPoints0 = getXAxisPoints(this.opts.categories, this.opts, this.config),
  39806. xAxisPoints = _getXAxisPoints0.xAxisPoints,
  39807. startX = _getXAxisPoints0.startX,
  39808. endX = _getXAxisPoints0.endX,
  39809. eachSpacing = _getXAxisPoints0.eachSpacing;
  39810. var centerLeft = eachSpacing * centerPoint;
  39811. var screenWidth = endX - startX;
  39812. var MaxLeft = screenWidth - eachSpacing * (xAxisPoints.length - 1);
  39813. offsetLeft = screenWidth / 2 - centerLeft;
  39814. if (offsetLeft > 0) {
  39815. offsetLeft = 0;
  39816. }
  39817. if (offsetLeft < MaxLeft) {
  39818. offsetLeft = MaxLeft;
  39819. }
  39820. this.scrollOption = {
  39821. currentOffset: offsetLeft,
  39822. startTouchX: offsetLeft,
  39823. distance: 0,
  39824. lastMoveTime: 0
  39825. };
  39826. this.opts._scrollDistance_ = offsetLeft;
  39827. drawCharts.call(this, this.opts.type, this.opts, this.config, this.context);
  39828. };
  39829. uCharts.prototype.stopAnimation = function () {
  39830. this.animationInstance && this.animationInstance.stop();
  39831. };
  39832. uCharts.prototype.addEventListener = function (type, listener) {
  39833. this.uevent.addEventListener(type, listener);
  39834. };
  39835. uCharts.prototype.delEventListener = function (type) {
  39836. this.uevent.delEventListener(type);
  39837. };
  39838. uCharts.prototype.getCurrentDataIndex = function (e) {
  39839. var touches = null;
  39840. if (e.changedTouches) {
  39841. touches = e.changedTouches[0];
  39842. } else {
  39843. touches = e.mp.changedTouches[0];
  39844. }
  39845. if (touches) {
  39846. var _touches$ = getTouches(touches, this.opts, e);
  39847. if (this.opts.type === 'pie' || this.opts.type === 'ring') {
  39848. return findPieChartCurrentIndex({
  39849. x: _touches$.x,
  39850. y: _touches$.y
  39851. }, this.opts.chartData.pieData, this.opts);
  39852. } else if (this.opts.type === 'rose') {
  39853. return findRoseChartCurrentIndex({
  39854. x: _touches$.x,
  39855. y: _touches$.y
  39856. }, this.opts.chartData.pieData, this.opts);
  39857. } else if (this.opts.type === 'radar') {
  39858. return findRadarChartCurrentIndex({
  39859. x: _touches$.x,
  39860. y: _touches$.y
  39861. }, this.opts.chartData.radarData, this.opts.categories.length);
  39862. } else if (this.opts.type === 'funnel') {
  39863. return findFunnelChartCurrentIndex({
  39864. x: _touches$.x,
  39865. y: _touches$.y
  39866. }, this.opts.chartData.funnelData);
  39867. } else if (this.opts.type === 'map') {
  39868. return findMapChartCurrentIndex({
  39869. x: _touches$.x,
  39870. y: _touches$.y
  39871. }, this.opts);
  39872. } else if (this.opts.type === 'word') {
  39873. return findWordChartCurrentIndex({
  39874. x: _touches$.x,
  39875. y: _touches$.y
  39876. }, this.opts.chartData.wordCloudData);
  39877. } else if (this.opts.type === 'bar') {
  39878. return findBarChartCurrentIndex({
  39879. x: _touches$.x,
  39880. y: _touches$.y
  39881. }, this.opts.chartData.calPoints, this.opts, this.config, Math.abs(this.scrollOption.currentOffset));
  39882. } else {
  39883. return findCurrentIndex({
  39884. x: _touches$.x,
  39885. y: _touches$.y
  39886. }, this.opts.chartData.calPoints, this.opts, this.config, Math.abs(this.scrollOption.currentOffset));
  39887. }
  39888. }
  39889. return -1;
  39890. };
  39891. uCharts.prototype.getLegendDataIndex = function (e) {
  39892. var touches = null;
  39893. if (e.changedTouches) {
  39894. touches = e.changedTouches[0];
  39895. } else {
  39896. touches = e.mp.changedTouches[0];
  39897. }
  39898. if (touches) {
  39899. var _touches$ = getTouches(touches, this.opts, e);
  39900. return findLegendIndex({
  39901. x: _touches$.x,
  39902. y: _touches$.y
  39903. }, this.opts.chartData.legendData);
  39904. }
  39905. return -1;
  39906. };
  39907. uCharts.prototype.touchLegend = function (e) {
  39908. var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  39909. var touches = null;
  39910. if (e.changedTouches) {
  39911. touches = e.changedTouches[0];
  39912. } else {
  39913. touches = e.mp.changedTouches[0];
  39914. }
  39915. if (touches) {
  39916. var _touches$ = getTouches(touches, this.opts, e);
  39917. var index = this.getLegendDataIndex(e);
  39918. if (index >= 0) {
  39919. if (this.opts.type == 'candle') {
  39920. this.opts.seriesMA[index].show = !this.opts.seriesMA[index].show;
  39921. } else {
  39922. this.opts.series[index].show = !this.opts.series[index].show;
  39923. }
  39924. this.opts.animation = option.animation ? true : false;
  39925. this.opts._scrollDistance_ = this.scrollOption.currentOffset;
  39926. drawCharts.call(this, this.opts.type, this.opts, this.config, this.context);
  39927. }
  39928. }
  39929. };
  39930. uCharts.prototype.showToolTip = function (e) {
  39931. var _this2 = this;
  39932. var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  39933. var touches = null;
  39934. if (e.changedTouches) {
  39935. touches = e.changedTouches[0];
  39936. } else {
  39937. touches = e.mp.changedTouches[0];
  39938. }
  39939. if (!touches) {
  39940. console.log("[uCharts] 未获取到event坐标信息");
  39941. }
  39942. var _touches$ = getTouches(touches, this.opts, e);
  39943. var currentOffset = this.scrollOption.currentOffset;
  39944. var opts = assign({}, this.opts, {
  39945. _scrollDistance_: currentOffset,
  39946. animation: false
  39947. });
  39948. if (this.opts.type === 'line' || this.opts.type === 'area' || this.opts.type === 'column' || this.opts.type === 'scatter' || this.opts.type === 'bubble') {
  39949. var current = this.getCurrentDataIndex(e);
  39950. var index = option.index == undefined ? current.index : option.index;
  39951. if (index > -1 || index.length > 0) {
  39952. var seriesData = getSeriesDataItem(this.opts.series, index, current.group);
  39953. if (seriesData.length !== 0) {
  39954. var _getToolTipData = getToolTipData(seriesData, this.opts, index, current.group, this.opts.categories, option),
  39955. textList = _getToolTipData.textList,
  39956. offset = _getToolTipData.offset;
  39957. offset.y = _touches$.y;
  39958. opts.tooltip = {
  39959. textList: option.textList !== undefined ? option.textList : textList,
  39960. offset: option.offset !== undefined ? option.offset : offset,
  39961. option: option,
  39962. index: index
  39963. };
  39964. }
  39965. }
  39966. drawCharts.call(this, opts.type, opts, this.config, this.context);
  39967. }
  39968. if (this.opts.type === 'bar') {
  39969. var current = this.getCurrentDataIndex(e);
  39970. var index = option.index == undefined ? current.index : option.index;
  39971. if (index > -1 || index.length > 0) {
  39972. var seriesData = getSeriesDataItem(this.opts.series, index, current.group);
  39973. if (seriesData.length !== 0) {
  39974. var _getToolTipData = getToolTipData(seriesData, this.opts, index, current.group, this.opts.categories, option),
  39975. textList = _getToolTipData.textList,
  39976. offset = _getToolTipData.offset;
  39977. offset.x = _touches$.x;
  39978. opts.tooltip = {
  39979. textList: option.textList !== undefined ? option.textList : textList,
  39980. offset: option.offset !== undefined ? option.offset : offset,
  39981. option: option,
  39982. index: index
  39983. };
  39984. }
  39985. }
  39986. drawCharts.call(this, opts.type, opts, this.config, this.context);
  39987. }
  39988. if (this.opts.type === 'mix') {
  39989. var current = this.getCurrentDataIndex(e);
  39990. var index = option.index == undefined ? current.index : option.index;
  39991. if (index > -1) {
  39992. var currentOffset = this.scrollOption.currentOffset;
  39993. var opts = assign({}, this.opts, {
  39994. _scrollDistance_: currentOffset,
  39995. animation: false
  39996. });
  39997. var seriesData = getSeriesDataItem(this.opts.series, index);
  39998. if (seriesData.length !== 0) {
  39999. var _getMixToolTipData = getMixToolTipData(seriesData, this.opts, index, this.opts.categories, option),
  40000. textList = _getMixToolTipData.textList,
  40001. offset = _getMixToolTipData.offset;
  40002. offset.y = _touches$.y;
  40003. opts.tooltip = {
  40004. textList: option.textList ? option.textList : textList,
  40005. offset: option.offset !== undefined ? option.offset : offset,
  40006. option: option,
  40007. index: index
  40008. };
  40009. }
  40010. }
  40011. drawCharts.call(this, opts.type, opts, this.config, this.context);
  40012. }
  40013. if (this.opts.type === 'candle') {
  40014. var current = this.getCurrentDataIndex(e);
  40015. var index = option.index == undefined ? current.index : option.index;
  40016. if (index > -1) {
  40017. var currentOffset = this.scrollOption.currentOffset;
  40018. var opts = assign({}, this.opts, {
  40019. _scrollDistance_: currentOffset,
  40020. animation: false
  40021. });
  40022. var seriesData = getSeriesDataItem(this.opts.series, index);
  40023. if (seriesData.length !== 0) {
  40024. var _getToolTipData = getCandleToolTipData(this.opts.series[0].data, seriesData, this.opts, index, this.opts.categories, this.opts.extra.candle, option),
  40025. textList = _getToolTipData.textList,
  40026. offset = _getToolTipData.offset;
  40027. offset.y = _touches$.y;
  40028. opts.tooltip = {
  40029. textList: option.textList ? option.textList : textList,
  40030. offset: option.offset !== undefined ? option.offset : offset,
  40031. option: option,
  40032. index: index
  40033. };
  40034. }
  40035. }
  40036. drawCharts.call(this, opts.type, opts, this.config, this.context);
  40037. }
  40038. if (this.opts.type === 'pie' || this.opts.type === 'ring' || this.opts.type === 'rose' || this.opts.type === 'funnel') {
  40039. var index = option.index == undefined ? this.getCurrentDataIndex(e) : option.index;
  40040. if (index > -1) {
  40041. var opts = assign({}, this.opts, {
  40042. animation: false
  40043. });
  40044. var seriesData = assign({}, opts._series_[index]);
  40045. var textList = [{
  40046. text: option.formatter ? option.formatter(seriesData, undefined, index, opts) : seriesData.name + ': ' + seriesData.data,
  40047. color: seriesData.color
  40048. }];
  40049. var offset = {
  40050. x: _touches$.x,
  40051. y: _touches$.y
  40052. };
  40053. opts.tooltip = {
  40054. textList: option.textList ? option.textList : textList,
  40055. offset: option.offset !== undefined ? option.offset : offset,
  40056. option: option,
  40057. index: index
  40058. };
  40059. }
  40060. drawCharts.call(this, opts.type, opts, this.config, this.context);
  40061. }
  40062. if (this.opts.type === 'map') {
  40063. var index = option.index == undefined ? this.getCurrentDataIndex(e) : option.index;
  40064. if (index > -1) {
  40065. var opts = assign({}, this.opts, {
  40066. animation: false
  40067. });
  40068. var seriesData = assign({}, this.opts.series[index]);
  40069. seriesData.name = seriesData.properties.name;
  40070. var textList = [{
  40071. text: option.formatter ? option.formatter(seriesData, undefined, index, this.opts) : seriesData.name,
  40072. color: seriesData.color
  40073. }];
  40074. var offset = {
  40075. x: _touches$.x,
  40076. y: _touches$.y
  40077. };
  40078. opts.tooltip = {
  40079. textList: option.textList ? option.textList : textList,
  40080. offset: option.offset !== undefined ? option.offset : offset,
  40081. option: option,
  40082. index: index
  40083. };
  40084. }
  40085. opts.updateData = false;
  40086. drawCharts.call(this, opts.type, opts, this.config, this.context);
  40087. }
  40088. if (this.opts.type === 'word') {
  40089. var index = option.index == undefined ? this.getCurrentDataIndex(e) : option.index;
  40090. if (index > -1) {
  40091. var opts = assign({}, this.opts, {
  40092. animation: false
  40093. });
  40094. var seriesData = assign({}, this.opts.series[index]);
  40095. var textList = [{
  40096. text: option.formatter ? option.formatter(seriesData, undefined, index, this.opts) : seriesData.name,
  40097. color: seriesData.color
  40098. }];
  40099. var offset = {
  40100. x: _touches$.x,
  40101. y: _touches$.y
  40102. };
  40103. opts.tooltip = {
  40104. textList: option.textList ? option.textList : textList,
  40105. offset: option.offset !== undefined ? option.offset : offset,
  40106. option: option,
  40107. index: index
  40108. };
  40109. }
  40110. opts.updateData = false;
  40111. drawCharts.call(this, opts.type, opts, this.config, this.context);
  40112. }
  40113. if (this.opts.type === 'radar') {
  40114. var index = option.index == undefined ? this.getCurrentDataIndex(e) : option.index;
  40115. if (index > -1) {
  40116. var opts = assign({}, this.opts, {
  40117. animation: false
  40118. });
  40119. var seriesData = getSeriesDataItem(this.opts.series, index);
  40120. if (seriesData.length !== 0) {
  40121. var textList = seriesData.map(function (item) {
  40122. return {
  40123. text: option.formatter ? option.formatter(item, _this2.opts.categories[index], index, _this2.opts) : item.name + ': ' + item.data,
  40124. color: item.color
  40125. };
  40126. });
  40127. var offset = {
  40128. x: _touches$.x,
  40129. y: _touches$.y
  40130. };
  40131. opts.tooltip = {
  40132. textList: option.textList ? option.textList : textList,
  40133. offset: option.offset !== undefined ? option.offset : offset,
  40134. option: option,
  40135. index: index
  40136. };
  40137. }
  40138. }
  40139. drawCharts.call(this, opts.type, opts, this.config, this.context);
  40140. }
  40141. };
  40142. uCharts.prototype.translate = function (distance) {
  40143. this.scrollOption = {
  40144. currentOffset: distance,
  40145. startTouchX: distance,
  40146. distance: 0,
  40147. lastMoveTime: 0
  40148. };
  40149. var opts = assign({}, this.opts, {
  40150. _scrollDistance_: distance,
  40151. animation: false
  40152. });
  40153. drawCharts.call(this, this.opts.type, opts, this.config, this.context);
  40154. };
  40155. uCharts.prototype.scrollStart = function (e) {
  40156. var touches = null;
  40157. if (e.changedTouches) {
  40158. touches = e.changedTouches[0];
  40159. } else {
  40160. touches = e.mp.changedTouches[0];
  40161. }
  40162. var _touches$ = getTouches(touches, this.opts, e);
  40163. if (touches && this.opts.enableScroll === true) {
  40164. this.scrollOption.startTouchX = _touches$.x;
  40165. }
  40166. };
  40167. uCharts.prototype.scroll = function (e) {
  40168. if (this.scrollOption.lastMoveTime === 0) {
  40169. this.scrollOption.lastMoveTime = Date.now();
  40170. }
  40171. var Limit = this.opts.touchMoveLimit || 60;
  40172. var currMoveTime = Date.now();
  40173. var duration = currMoveTime - this.scrollOption.lastMoveTime;
  40174. if (duration < Math.floor(1000 / Limit)) return;
  40175. this.scrollOption.lastMoveTime = currMoveTime;
  40176. var touches = null;
  40177. if (e.changedTouches) {
  40178. touches = e.changedTouches[0];
  40179. } else {
  40180. touches = e.mp.changedTouches[0];
  40181. }
  40182. if (touches && this.opts.enableScroll === true) {
  40183. var _touches$ = getTouches(touches, this.opts, e);
  40184. var _distance;
  40185. _distance = _touches$.x - this.scrollOption.startTouchX;
  40186. var currentOffset = this.scrollOption.currentOffset;
  40187. var validDistance = calValidDistance(this, currentOffset + _distance, this.opts.chartData, this.config, this.opts);
  40188. this.scrollOption.distance = _distance = validDistance - currentOffset;
  40189. var opts = assign({}, this.opts, {
  40190. _scrollDistance_: currentOffset + _distance,
  40191. animation: false
  40192. });
  40193. this.opts = opts;
  40194. drawCharts.call(this, opts.type, opts, this.config, this.context);
  40195. return currentOffset + _distance;
  40196. }
  40197. };
  40198. uCharts.prototype.scrollEnd = function (e) {
  40199. if (this.opts.enableScroll === true) {
  40200. var _scrollOption = this.scrollOption,
  40201. currentOffset = _scrollOption.currentOffset,
  40202. distance = _scrollOption.distance;
  40203. this.scrollOption.currentOffset = currentOffset + distance;
  40204. this.scrollOption.distance = 0;
  40205. }
  40206. };
  40207. if (( false ? undefined : (0, _typeof2.default)(module)) === "object" && (0, _typeof2.default)(module.exports) === "object") {
  40208. module.exports = uCharts;
  40209. }
  40210. var _default = uCharts;
  40211. exports.default = _default;
  40212. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../../HBuilderX.3.8.12.20230817/HBuilderX/plugins/uniapp-cli/node_modules/webpack/buildin/module.js */ 40)(module)))
  40213. /***/ }),
  40214. /***/ 494:
  40215. /*!********************************************************************************************************!*\
  40216. !*** D:/IdeaProjects/zdsz_WeChatApplet/uni_modules/qiun-data-charts/js_sdk/u-charts/config-ucharts.js ***!
  40217. \********************************************************************************************************/
  40218. /*! no static exports found */
  40219. /***/ (function(module, exports, __webpack_require__) {
  40220. "use strict";
  40221. Object.defineProperty(exports, "__esModule", {
  40222. value: true
  40223. });
  40224. exports.default = void 0;
  40225. /*
  40226. * uCharts®
  40227. * 高性能跨平台图表库,支持H5、APP、小程序(微信/支付宝/百度/头条/QQ/360)、Vue、Taro等支持canvas的框架平台
  40228. * Copyright (c) 2021 QIUN®秋云 https://www.ucharts.cn All rights reserved.
  40229. * Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
  40230. * 复制使用请保留本段注释,感谢支持开源!
  40231. *
  40232. * uCharts®官方网站
  40233. * https://www.uCharts.cn
  40234. *
  40235. * 开源地址:
  40236. * https://gitee.com/uCharts/uCharts
  40237. *
  40238. * uni-app插件市场地址:
  40239. * http://ext.dcloud.net.cn/plugin?id=271
  40240. *
  40241. */
  40242. // 主题颜色配置:如每个图表类型需要不同主题,请在对应图表类型上更改color属性
  40243. var color = ['#1890FF', '#91CB74', '#FAC858', '#EE6666', '#73C0DE', '#3CA272', '#FC8452', '#9A60B4', '#ea7ccc'];
  40244. //事件转换函数,主要用作格式化x轴为时间轴,根据需求自行修改
  40245. var formatDateTime = function formatDateTime(timeStamp, returnType) {
  40246. var date = new Date();
  40247. date.setTime(timeStamp * 1000);
  40248. var y = date.getFullYear();
  40249. var m = date.getMonth() + 1;
  40250. m = m < 10 ? '0' + m : m;
  40251. var d = date.getDate();
  40252. d = d < 10 ? '0' + d : d;
  40253. var h = date.getHours();
  40254. h = h < 10 ? '0' + h : h;
  40255. var minute = date.getMinutes();
  40256. var second = date.getSeconds();
  40257. minute = minute < 10 ? '0' + minute : minute;
  40258. second = second < 10 ? '0' + second : second;
  40259. if (returnType == 'full') {
  40260. return y + '-' + m + '-' + d + ' ' + h + ':' + minute + ':' + second;
  40261. }
  40262. if (returnType == 'y-m-d') {
  40263. return y + '-' + m + '-' + d;
  40264. }
  40265. if (returnType == 'h:m') {
  40266. return h + ':' + minute;
  40267. }
  40268. if (returnType == 'h:m:s') {
  40269. return h + ':' + minute + ':' + second;
  40270. }
  40271. return [y, m, d, h, minute, second];
  40272. };
  40273. var cfu = {
  40274. //demotype为自定义图表类型,一般不需要自定义图表类型,只需要改根节点上对应的类型即可
  40275. "type": ["pie", "ring", "rose", "word", "funnel", "map", "arcbar", "line", "column", "bar", "area", "radar", "gauge", "candle", "mix", "tline", "tarea", "scatter", "bubble", "demotype"],
  40276. "range": ["饼状图", "圆环图", "玫瑰图", "词云图", "漏斗图", "地图", "圆弧进度条", "折线图", "柱状图", "条状图", "区域图", "雷达图", "仪表盘", "K线图", "混合图", "时间轴折线", "时间轴区域", "散点图", "气泡图", "自定义类型"],
  40277. //增加自定义图表类型,如果需要categories,请在这里加入您的图表类型,例如最后的"demotype"
  40278. //自定义类型时需要注意"tline","tarea","scatter","bubble"等时间轴(矢量x轴)类图表,没有categories,不需要加入categories
  40279. "categories": ["line", "column", "bar", "area", "radar", "gauge", "candle", "mix", "demotype"],
  40280. //instance为实例变量承载属性,不要删除
  40281. "instance": {},
  40282. //option为opts及eopts承载属性,不要删除
  40283. "option": {},
  40284. //下面是自定义format配置,因除H5端外的其他端无法通过props传递函数,只能通过此属性对应下标的方式来替换
  40285. "formatter": {
  40286. "yAxisDemo1": function yAxisDemo1(val) {
  40287. return val + '元';
  40288. },
  40289. "yAxisDemo2": function yAxisDemo2(val) {
  40290. return val.toFixed(2);
  40291. },
  40292. "xAxisDemo1": function xAxisDemo1(val) {
  40293. return val + '年';
  40294. },
  40295. "xAxisDemo2": function xAxisDemo2(val) {
  40296. return formatDateTime(val, 'h:m');
  40297. },
  40298. "seriesDemo1": function seriesDemo1(val) {
  40299. return val + '元';
  40300. },
  40301. "tooltipDemo1": function tooltipDemo1(item, category, index, opts) {
  40302. if (index == 0) {
  40303. return '随便用' + item.data + '年';
  40304. } else {
  40305. return '其他我没改' + item.data + '天';
  40306. }
  40307. },
  40308. "pieDemo": function pieDemo(val, index, series) {
  40309. if (index !== undefined) {
  40310. return series[index].name + ':' + series[index].data + '元';
  40311. }
  40312. }
  40313. },
  40314. //这里演示了自定义您的图表类型的option,可以随意命名,之后在组件上 type="demotype" 后,组件会调用这个花括号里的option,如果组件上还存在opts参数,会将demotype与opts中option合并后渲染图表。
  40315. "demotype": {
  40316. //我这里把曲线图当做了自定义图表类型,您可以根据需要随意指定类型或配置
  40317. "type": "line",
  40318. "color": color,
  40319. "padding": [15, 10, 0, 15],
  40320. "xAxis": {
  40321. "disableGrid": true
  40322. },
  40323. "yAxis": {
  40324. "gridType": "dash",
  40325. "dashLength": 2
  40326. },
  40327. "legend": {},
  40328. "extra": {
  40329. "line": {
  40330. "type": "curve",
  40331. "width": 2
  40332. }
  40333. }
  40334. },
  40335. //下面是自定义配置,请添加项目所需的通用配置
  40336. "pie": {
  40337. "type": "pie",
  40338. "color": color,
  40339. "padding": [5, 5, 5, 5],
  40340. "extra": {
  40341. "pie": {
  40342. "activeOpacity": 0.5,
  40343. "activeRadius": 10,
  40344. "offsetAngle": 0,
  40345. "labelWidth": 15,
  40346. "border": true,
  40347. "borderWidth": 3,
  40348. "borderColor": "#FFFFFF"
  40349. }
  40350. }
  40351. },
  40352. "ring": {
  40353. "type": "ring",
  40354. "color": color,
  40355. "padding": [5, 5, 5, 5],
  40356. "rotate": false,
  40357. "dataLabel": true,
  40358. "legend": {
  40359. "show": true,
  40360. "position": "right",
  40361. "lineHeight": 25
  40362. },
  40363. "title": {
  40364. "name": "收益率",
  40365. "fontSize": 15,
  40366. "color": "#666666"
  40367. },
  40368. "subtitle": {
  40369. "name": "70%",
  40370. "fontSize": 25,
  40371. "color": "#7cb5ec"
  40372. },
  40373. "extra": {
  40374. "ring": {
  40375. "ringWidth": 30,
  40376. "activeOpacity": 0.5,
  40377. "activeRadius": 10,
  40378. "offsetAngle": 0,
  40379. "labelWidth": 15,
  40380. "border": true,
  40381. "borderWidth": 3,
  40382. "borderColor": "#FFFFFF"
  40383. }
  40384. }
  40385. },
  40386. "rose": {
  40387. "type": "rose",
  40388. "color": color,
  40389. "padding": [5, 5, 5, 5],
  40390. "legend": {
  40391. "show": true,
  40392. "position": "left",
  40393. "lineHeight": 25
  40394. },
  40395. "extra": {
  40396. "rose": {
  40397. "type": "area",
  40398. "minRadius": 50,
  40399. "activeOpacity": 0.5,
  40400. "activeRadius": 10,
  40401. "offsetAngle": 0,
  40402. "labelWidth": 15,
  40403. "border": false,
  40404. "borderWidth": 2,
  40405. "borderColor": "#FFFFFF"
  40406. }
  40407. }
  40408. },
  40409. "word": {
  40410. "type": "word",
  40411. "color": color,
  40412. "extra": {
  40413. "word": {
  40414. "type": "normal",
  40415. "autoColors": false
  40416. }
  40417. }
  40418. },
  40419. "funnel": {
  40420. "type": "funnel",
  40421. "color": color,
  40422. "padding": [15, 15, 0, 15],
  40423. "extra": {
  40424. "funnel": {
  40425. "activeOpacity": 0.3,
  40426. "activeWidth": 10,
  40427. "border": true,
  40428. "borderWidth": 2,
  40429. "borderColor": "#FFFFFF",
  40430. "fillOpacity": 1,
  40431. "labelAlign": "right"
  40432. }
  40433. }
  40434. },
  40435. "map": {
  40436. "type": "map",
  40437. "color": color,
  40438. "padding": [0, 0, 0, 0],
  40439. "dataLabel": true,
  40440. "extra": {
  40441. "map": {
  40442. "border": true,
  40443. "borderWidth": 1,
  40444. "borderColor": "#666666",
  40445. "fillOpacity": 0.6,
  40446. "activeBorderColor": "#F04864",
  40447. "activeFillColor": "#FACC14",
  40448. "activeFillOpacity": 1
  40449. }
  40450. }
  40451. },
  40452. "arcbar": {
  40453. "type": "arcbar",
  40454. "color": color,
  40455. "title": {
  40456. "name": "百分比",
  40457. "fontSize": 25,
  40458. "color": "#00FF00"
  40459. },
  40460. "subtitle": {
  40461. "name": "默认标题",
  40462. "fontSize": 15,
  40463. "color": "#666666"
  40464. },
  40465. "extra": {
  40466. "arcbar": {
  40467. "type": "default",
  40468. "width": 12,
  40469. "backgroundColor": "#E9E9E9",
  40470. "startAngle": 0.75,
  40471. "endAngle": 0.25,
  40472. "gap": 2
  40473. }
  40474. }
  40475. },
  40476. "line": {
  40477. "type": "line",
  40478. "color": color,
  40479. "padding": [15, 10, 0, 15],
  40480. "xAxis": {
  40481. "disableGrid": true
  40482. },
  40483. "yAxis": {
  40484. "gridType": "dash",
  40485. "dashLength": 2
  40486. },
  40487. "legend": {},
  40488. "extra": {
  40489. "line": {
  40490. "type": "straight",
  40491. "width": 2
  40492. }
  40493. }
  40494. },
  40495. "tline": {
  40496. "type": "line",
  40497. "color": color,
  40498. "padding": [15, 10, 0, 15],
  40499. "xAxis": {
  40500. "disableGrid": false,
  40501. "boundaryGap": "justify"
  40502. },
  40503. "yAxis": {
  40504. "gridType": "dash",
  40505. "dashLength": 2,
  40506. "data": [{
  40507. "min": 0,
  40508. "max": 80
  40509. }]
  40510. },
  40511. "legend": {},
  40512. "extra": {
  40513. "line": {
  40514. "type": "curve",
  40515. "width": 2
  40516. }
  40517. }
  40518. },
  40519. "tarea": {
  40520. "type": "area",
  40521. "color": color,
  40522. "padding": [15, 10, 0, 15],
  40523. "xAxis": {
  40524. "disableGrid": true,
  40525. "boundaryGap": "justify"
  40526. },
  40527. "yAxis": {
  40528. "gridType": "dash",
  40529. "dashLength": 2,
  40530. "data": [{
  40531. "min": 0,
  40532. "max": 80
  40533. }]
  40534. },
  40535. "legend": {},
  40536. "extra": {
  40537. "area": {
  40538. "type": "curve",
  40539. "opacity": 0.2,
  40540. "addLine": true,
  40541. "width": 2,
  40542. "gradient": true
  40543. }
  40544. }
  40545. },
  40546. "column": {
  40547. "type": "column",
  40548. "color": color,
  40549. "padding": [15, 15, 0, 5],
  40550. "xAxis": {
  40551. "disableGrid": true
  40552. },
  40553. "yAxis": {
  40554. "data": [{
  40555. "min": 0
  40556. }]
  40557. },
  40558. "legend": {},
  40559. "extra": {
  40560. "column": {
  40561. "type": "group",
  40562. "width": 30,
  40563. "meterBorde": 1,
  40564. "meterFillColor": "#FFFFFF",
  40565. "activeBgColor": "#000000",
  40566. "activeBgOpacity": 0.08
  40567. }
  40568. }
  40569. },
  40570. "bar": {
  40571. "type": "bar",
  40572. "color": color,
  40573. "padding": [15, 30, 0, 5],
  40574. "xAxis": {
  40575. "boundaryGap": "justify",
  40576. "disableGrid": false,
  40577. "min": 0,
  40578. "axisLine": false
  40579. },
  40580. "yAxis": {},
  40581. "legend": {},
  40582. "extra": {
  40583. "bar": {
  40584. "type": "group",
  40585. "width": 30,
  40586. "meterBorde": 1,
  40587. "meterFillColor": "#FFFFFF",
  40588. "activeBgColor": "#000000",
  40589. "activeBgOpacity": 0.08
  40590. }
  40591. }
  40592. },
  40593. "area": {
  40594. "type": "area",
  40595. "color": color,
  40596. "padding": [15, 15, 0, 15],
  40597. "xAxis": {
  40598. "disableGrid": true
  40599. },
  40600. "yAxis": {
  40601. "gridType": "dash",
  40602. "dashLength": 2
  40603. },
  40604. "legend": {},
  40605. "extra": {
  40606. "area": {
  40607. "type": "straight",
  40608. "opacity": 0.2,
  40609. "addLine": true,
  40610. "width": 2,
  40611. "gradient": false
  40612. }
  40613. }
  40614. },
  40615. "radar": {
  40616. "type": "radar",
  40617. "color": color,
  40618. "padding": [5, 5, 5, 5],
  40619. "dataLabel": false,
  40620. "legend": {
  40621. "show": true,
  40622. "position": "right",
  40623. "lineHeight": 25
  40624. },
  40625. "extra": {
  40626. "radar": {
  40627. "gridType": "radar",
  40628. "gridColor": "#CCCCCC",
  40629. "gridCount": 3,
  40630. "opacity": 0.2,
  40631. "max": 200
  40632. }
  40633. }
  40634. },
  40635. "gauge": {
  40636. "type": "gauge",
  40637. "color": color,
  40638. "title": {
  40639. "name": "66Km/H",
  40640. "fontSize": 25,
  40641. "color": "#2fc25b",
  40642. "offsetY": 50
  40643. },
  40644. "subtitle": {
  40645. "name": "实时速度",
  40646. "fontSize": 15,
  40647. "color": "#1890ff",
  40648. "offsetY": -50
  40649. },
  40650. "extra": {
  40651. "gauge": {
  40652. "type": "default",
  40653. "width": 30,
  40654. "labelColor": "#666666",
  40655. "startAngle": 0.75,
  40656. "endAngle": 0.25,
  40657. "startNumber": 0,
  40658. "endNumber": 100,
  40659. "labelFormat": "",
  40660. "splitLine": {
  40661. "fixRadius": 0,
  40662. "splitNumber": 10,
  40663. "width": 30,
  40664. "color": "#FFFFFF",
  40665. "childNumber": 5,
  40666. "childWidth": 12
  40667. },
  40668. "pointer": {
  40669. "width": 24,
  40670. "color": "auto"
  40671. }
  40672. }
  40673. }
  40674. },
  40675. "candle": {
  40676. "type": "candle",
  40677. "color": color,
  40678. "padding": [15, 15, 0, 15],
  40679. "enableScroll": true,
  40680. "enableMarkLine": true,
  40681. "dataLabel": false,
  40682. "xAxis": {
  40683. "labelCount": 4,
  40684. "itemCount": 40,
  40685. "disableGrid": true,
  40686. "gridColor": "#CCCCCC",
  40687. "gridType": "solid",
  40688. "dashLength": 4,
  40689. "scrollShow": true,
  40690. "scrollAlign": "left",
  40691. "scrollColor": "#A6A6A6",
  40692. "scrollBackgroundColor": "#EFEBEF"
  40693. },
  40694. "yAxis": {},
  40695. "legend": {},
  40696. "extra": {
  40697. "candle": {
  40698. "color": {
  40699. "upLine": "#f04864",
  40700. "upFill": "#f04864",
  40701. "downLine": "#2fc25b",
  40702. "downFill": "#2fc25b"
  40703. },
  40704. "average": {
  40705. "show": true,
  40706. "name": ["MA5", "MA10", "MA30"],
  40707. "day": [5, 10, 20],
  40708. "color": ["#1890ff", "#2fc25b", "#facc14"]
  40709. }
  40710. },
  40711. "markLine": {
  40712. "type": "dash",
  40713. "dashLength": 5,
  40714. "data": [{
  40715. "value": 2150,
  40716. "lineColor": "#f04864",
  40717. "showLabel": true
  40718. }, {
  40719. "value": 2350,
  40720. "lineColor": "#f04864",
  40721. "showLabel": true
  40722. }]
  40723. }
  40724. }
  40725. },
  40726. "mix": {
  40727. "type": "mix",
  40728. "color": color,
  40729. "padding": [15, 15, 0, 15],
  40730. "xAxis": {
  40731. "disableGrid": true
  40732. },
  40733. "yAxis": {
  40734. "disabled": false,
  40735. "disableGrid": false,
  40736. "splitNumber": 5,
  40737. "gridType": "dash",
  40738. "dashLength": 4,
  40739. "gridColor": "#CCCCCC",
  40740. "padding": 10,
  40741. "showTitle": true,
  40742. "data": []
  40743. },
  40744. "legend": {},
  40745. "extra": {
  40746. "mix": {
  40747. "column": {
  40748. "width": 20
  40749. }
  40750. }
  40751. }
  40752. },
  40753. "scatter": {
  40754. "type": "scatter",
  40755. "color": color,
  40756. "padding": [15, 15, 0, 15],
  40757. "dataLabel": false,
  40758. "xAxis": {
  40759. "disableGrid": false,
  40760. "gridType": "dash",
  40761. "splitNumber": 5,
  40762. "boundaryGap": "justify",
  40763. "min": 0
  40764. },
  40765. "yAxis": {
  40766. "disableGrid": false,
  40767. "gridType": "dash"
  40768. },
  40769. "legend": {},
  40770. "extra": {
  40771. "scatter": {}
  40772. }
  40773. },
  40774. "bubble": {
  40775. "type": "bubble",
  40776. "color": color,
  40777. "padding": [15, 15, 0, 15],
  40778. "xAxis": {
  40779. "disableGrid": false,
  40780. "gridType": "dash",
  40781. "splitNumber": 5,
  40782. "boundaryGap": "justify",
  40783. "min": 0,
  40784. "max": 250
  40785. },
  40786. "yAxis": {
  40787. "disableGrid": false,
  40788. "gridType": "dash",
  40789. "data": [{
  40790. "min": 0,
  40791. "max": 150
  40792. }]
  40793. },
  40794. "legend": {},
  40795. "extra": {
  40796. "bubble": {
  40797. "border": 2,
  40798. "opacity": 0.5
  40799. }
  40800. }
  40801. }
  40802. };
  40803. var _default = cfu;
  40804. exports.default = _default;
  40805. /***/ }),
  40806. /***/ 5:
  40807. /*!**************************************************************!*\
  40808. !*** ./node_modules/@babel/runtime/helpers/slicedToArray.js ***!
  40809. \**************************************************************/
  40810. /*! no static exports found */
  40811. /***/ (function(module, exports, __webpack_require__) {
  40812. var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ 6);
  40813. var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ 7);
  40814. var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ 8);
  40815. var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ 10);
  40816. function _slicedToArray(arr, i) {
  40817. return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();
  40818. }
  40819. module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  40820. /***/ }),
  40821. /***/ 50:
  40822. /*!************************************************************************************************!*\
  40823. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/@babel/runtime/regenerator/index.js ***!
  40824. \************************************************************************************************/
  40825. /*! no static exports found */
  40826. /***/ (function(module, exports, __webpack_require__) {
  40827. // TODO(Babel 8): Remove this file.
  40828. var runtime = __webpack_require__(/*! @babel/runtime/helpers/regeneratorRuntime */ 51)();
  40829. module.exports = runtime;
  40830. /***/ }),
  40831. /***/ 51:
  40832. /*!*******************************************************************!*\
  40833. !*** ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***!
  40834. \*******************************************************************/
  40835. /*! no static exports found */
  40836. /***/ (function(module, exports, __webpack_require__) {
  40837. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  40838. function _regeneratorRuntime() {
  40839. "use strict";
  40840. /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
  40841. module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
  40842. return exports;
  40843. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  40844. var exports = {},
  40845. Op = Object.prototype,
  40846. hasOwn = Op.hasOwnProperty,
  40847. defineProperty = Object.defineProperty || function (obj, key, desc) {
  40848. obj[key] = desc.value;
  40849. },
  40850. $Symbol = "function" == typeof Symbol ? Symbol : {},
  40851. iteratorSymbol = $Symbol.iterator || "@@iterator",
  40852. asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
  40853. toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
  40854. function define(obj, key, value) {
  40855. return Object.defineProperty(obj, key, {
  40856. value: value,
  40857. enumerable: !0,
  40858. configurable: !0,
  40859. writable: !0
  40860. }), obj[key];
  40861. }
  40862. try {
  40863. define({}, "");
  40864. } catch (err) {
  40865. define = function define(obj, key, value) {
  40866. return obj[key] = value;
  40867. };
  40868. }
  40869. function wrap(innerFn, outerFn, self, tryLocsList) {
  40870. var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
  40871. generator = Object.create(protoGenerator.prototype),
  40872. context = new Context(tryLocsList || []);
  40873. return defineProperty(generator, "_invoke", {
  40874. value: makeInvokeMethod(innerFn, self, context)
  40875. }), generator;
  40876. }
  40877. function tryCatch(fn, obj, arg) {
  40878. try {
  40879. return {
  40880. type: "normal",
  40881. arg: fn.call(obj, arg)
  40882. };
  40883. } catch (err) {
  40884. return {
  40885. type: "throw",
  40886. arg: err
  40887. };
  40888. }
  40889. }
  40890. exports.wrap = wrap;
  40891. var ContinueSentinel = {};
  40892. function Generator() {}
  40893. function GeneratorFunction() {}
  40894. function GeneratorFunctionPrototype() {}
  40895. var IteratorPrototype = {};
  40896. define(IteratorPrototype, iteratorSymbol, function () {
  40897. return this;
  40898. });
  40899. var getProto = Object.getPrototypeOf,
  40900. NativeIteratorPrototype = getProto && getProto(getProto(values([])));
  40901. NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
  40902. var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
  40903. function defineIteratorMethods(prototype) {
  40904. ["next", "throw", "return"].forEach(function (method) {
  40905. define(prototype, method, function (arg) {
  40906. return this._invoke(method, arg);
  40907. });
  40908. });
  40909. }
  40910. function AsyncIterator(generator, PromiseImpl) {
  40911. function invoke(method, arg, resolve, reject) {
  40912. var record = tryCatch(generator[method], generator, arg);
  40913. if ("throw" !== record.type) {
  40914. var result = record.arg,
  40915. value = result.value;
  40916. return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
  40917. invoke("next", value, resolve, reject);
  40918. }, function (err) {
  40919. invoke("throw", err, resolve, reject);
  40920. }) : PromiseImpl.resolve(value).then(function (unwrapped) {
  40921. result.value = unwrapped, resolve(result);
  40922. }, function (error) {
  40923. return invoke("throw", error, resolve, reject);
  40924. });
  40925. }
  40926. reject(record.arg);
  40927. }
  40928. var previousPromise;
  40929. defineProperty(this, "_invoke", {
  40930. value: function value(method, arg) {
  40931. function callInvokeWithMethodAndArg() {
  40932. return new PromiseImpl(function (resolve, reject) {
  40933. invoke(method, arg, resolve, reject);
  40934. });
  40935. }
  40936. return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
  40937. }
  40938. });
  40939. }
  40940. function makeInvokeMethod(innerFn, self, context) {
  40941. var state = "suspendedStart";
  40942. return function (method, arg) {
  40943. if ("executing" === state) throw new Error("Generator is already running");
  40944. if ("completed" === state) {
  40945. if ("throw" === method) throw arg;
  40946. return doneResult();
  40947. }
  40948. for (context.method = method, context.arg = arg;;) {
  40949. var delegate = context.delegate;
  40950. if (delegate) {
  40951. var delegateResult = maybeInvokeDelegate(delegate, context);
  40952. if (delegateResult) {
  40953. if (delegateResult === ContinueSentinel) continue;
  40954. return delegateResult;
  40955. }
  40956. }
  40957. if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
  40958. if ("suspendedStart" === state) throw state = "completed", context.arg;
  40959. context.dispatchException(context.arg);
  40960. } else "return" === context.method && context.abrupt("return", context.arg);
  40961. state = "executing";
  40962. var record = tryCatch(innerFn, self, context);
  40963. if ("normal" === record.type) {
  40964. if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
  40965. return {
  40966. value: record.arg,
  40967. done: context.done
  40968. };
  40969. }
  40970. "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
  40971. }
  40972. };
  40973. }
  40974. function maybeInvokeDelegate(delegate, context) {
  40975. var methodName = context.method,
  40976. method = delegate.iterator[methodName];
  40977. 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;
  40978. var record = tryCatch(method, delegate.iterator, context.arg);
  40979. if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
  40980. var info = record.arg;
  40981. 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);
  40982. }
  40983. function pushTryEntry(locs) {
  40984. var entry = {
  40985. tryLoc: locs[0]
  40986. };
  40987. 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
  40988. }
  40989. function resetTryEntry(entry) {
  40990. var record = entry.completion || {};
  40991. record.type = "normal", delete record.arg, entry.completion = record;
  40992. }
  40993. function Context(tryLocsList) {
  40994. this.tryEntries = [{
  40995. tryLoc: "root"
  40996. }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
  40997. }
  40998. function values(iterable) {
  40999. if (iterable) {
  41000. var iteratorMethod = iterable[iteratorSymbol];
  41001. if (iteratorMethod) return iteratorMethod.call(iterable);
  41002. if ("function" == typeof iterable.next) return iterable;
  41003. if (!isNaN(iterable.length)) {
  41004. var i = -1,
  41005. next = function next() {
  41006. for (; ++i < iterable.length;) {
  41007. if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
  41008. }
  41009. return next.value = undefined, next.done = !0, next;
  41010. };
  41011. return next.next = next;
  41012. }
  41013. }
  41014. return {
  41015. next: doneResult
  41016. };
  41017. }
  41018. function doneResult() {
  41019. return {
  41020. value: undefined,
  41021. done: !0
  41022. };
  41023. }
  41024. return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
  41025. value: GeneratorFunctionPrototype,
  41026. configurable: !0
  41027. }), defineProperty(GeneratorFunctionPrototype, "constructor", {
  41028. value: GeneratorFunction,
  41029. configurable: !0
  41030. }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
  41031. var ctor = "function" == typeof genFun && genFun.constructor;
  41032. return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
  41033. }, exports.mark = function (genFun) {
  41034. return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
  41035. }, exports.awrap = function (arg) {
  41036. return {
  41037. __await: arg
  41038. };
  41039. }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
  41040. return this;
  41041. }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
  41042. void 0 === PromiseImpl && (PromiseImpl = Promise);
  41043. var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
  41044. return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
  41045. return result.done ? result.value : iter.next();
  41046. });
  41047. }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
  41048. return this;
  41049. }), define(Gp, "toString", function () {
  41050. return "[object Generator]";
  41051. }), exports.keys = function (val) {
  41052. var object = Object(val),
  41053. keys = [];
  41054. for (var key in object) {
  41055. keys.push(key);
  41056. }
  41057. return keys.reverse(), function next() {
  41058. for (; keys.length;) {
  41059. var key = keys.pop();
  41060. if (key in object) return next.value = key, next.done = !1, next;
  41061. }
  41062. return next.done = !0, next;
  41063. };
  41064. }, exports.values = values, Context.prototype = {
  41065. constructor: Context,
  41066. reset: function reset(skipTempReset) {
  41067. 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) {
  41068. "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
  41069. }
  41070. },
  41071. stop: function stop() {
  41072. this.done = !0;
  41073. var rootRecord = this.tryEntries[0].completion;
  41074. if ("throw" === rootRecord.type) throw rootRecord.arg;
  41075. return this.rval;
  41076. },
  41077. dispatchException: function dispatchException(exception) {
  41078. if (this.done) throw exception;
  41079. var context = this;
  41080. function handle(loc, caught) {
  41081. return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
  41082. }
  41083. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  41084. var entry = this.tryEntries[i],
  41085. record = entry.completion;
  41086. if ("root" === entry.tryLoc) return handle("end");
  41087. if (entry.tryLoc <= this.prev) {
  41088. var hasCatch = hasOwn.call(entry, "catchLoc"),
  41089. hasFinally = hasOwn.call(entry, "finallyLoc");
  41090. if (hasCatch && hasFinally) {
  41091. if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
  41092. if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
  41093. } else if (hasCatch) {
  41094. if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
  41095. } else {
  41096. if (!hasFinally) throw new Error("try statement without catch or finally");
  41097. if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
  41098. }
  41099. }
  41100. }
  41101. },
  41102. abrupt: function abrupt(type, arg) {
  41103. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  41104. var entry = this.tryEntries[i];
  41105. if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
  41106. var finallyEntry = entry;
  41107. break;
  41108. }
  41109. }
  41110. finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
  41111. var record = finallyEntry ? finallyEntry.completion : {};
  41112. return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
  41113. },
  41114. complete: function complete(record, afterLoc) {
  41115. if ("throw" === record.type) throw record.arg;
  41116. 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;
  41117. },
  41118. finish: function finish(finallyLoc) {
  41119. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  41120. var entry = this.tryEntries[i];
  41121. if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
  41122. }
  41123. },
  41124. "catch": function _catch(tryLoc) {
  41125. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  41126. var entry = this.tryEntries[i];
  41127. if (entry.tryLoc === tryLoc) {
  41128. var record = entry.completion;
  41129. if ("throw" === record.type) {
  41130. var thrown = record.arg;
  41131. resetTryEntry(entry);
  41132. }
  41133. return thrown;
  41134. }
  41135. }
  41136. throw new Error("illegal catch attempt");
  41137. },
  41138. delegateYield: function delegateYield(iterable, resultName, nextLoc) {
  41139. return this.delegate = {
  41140. iterator: values(iterable),
  41141. resultName: resultName,
  41142. nextLoc: nextLoc
  41143. }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
  41144. }
  41145. }, exports;
  41146. }
  41147. module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
  41148. /***/ }),
  41149. /***/ 52:
  41150. /*!*****************************************************************!*\
  41151. !*** ./node_modules/@babel/runtime/helpers/asyncToGenerator.js ***!
  41152. \*****************************************************************/
  41153. /*! no static exports found */
  41154. /***/ (function(module, exports) {
  41155. function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
  41156. try {
  41157. var info = gen[key](arg);
  41158. var value = info.value;
  41159. } catch (error) {
  41160. reject(error);
  41161. return;
  41162. }
  41163. if (info.done) {
  41164. resolve(value);
  41165. } else {
  41166. Promise.resolve(value).then(_next, _throw);
  41167. }
  41168. }
  41169. function _asyncToGenerator(fn) {
  41170. return function () {
  41171. var self = this,
  41172. args = arguments;
  41173. return new Promise(function (resolve, reject) {
  41174. var gen = fn.apply(self, args);
  41175. function _next(value) {
  41176. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
  41177. }
  41178. function _throw(err) {
  41179. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
  41180. }
  41181. _next(undefined);
  41182. });
  41183. };
  41184. }
  41185. module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports;
  41186. /***/ }),
  41187. /***/ 53:
  41188. /*!******************************************************************************!*\
  41189. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/libs/function/timeFormat.js ***!
  41190. \******************************************************************************/
  41191. /*! no static exports found */
  41192. /***/ (function(module, exports, __webpack_require__) {
  41193. "use strict";
  41194. Object.defineProperty(exports, "__esModule", {
  41195. value: true
  41196. });
  41197. exports.default = void 0;
  41198. // padStart 的 polyfill,因为某些机型或情况,还无法支持es7的padStart,比如电脑版的微信小程序
  41199. // 所以这里做一个兼容polyfill的兼容处理
  41200. if (!String.prototype.padStart) {
  41201. // 为了方便表示这里 fillString 用了ES6 的默认参数,不影响理解
  41202. String.prototype.padStart = function (maxLength) {
  41203. var fillString = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ' ';
  41204. if (Object.prototype.toString.call(fillString) !== "[object String]") throw new TypeError('fillString must be String');
  41205. var str = this;
  41206. // 返回 String(str) 这里是为了使返回的值是字符串字面量,在控制台中更符合直觉
  41207. if (str.length >= maxLength) return String(str);
  41208. var fillLength = maxLength - str.length,
  41209. times = Math.ceil(fillLength / fillString.length);
  41210. while (times >>= 1) {
  41211. fillString += fillString;
  41212. if (times === 1) {
  41213. fillString += fillString;
  41214. }
  41215. }
  41216. return fillString.slice(0, fillLength) + str;
  41217. };
  41218. }
  41219. // 其他更多是格式化有如下:
  41220. // yyyy:mm:dd|yyyy:mm|yyyy年mm月dd日|yyyy年mm月dd日 hh时MM分等,可自定义组合
  41221. function timeFormat() {
  41222. var dateTime = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
  41223. var fmt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'yyyy-mm-dd';
  41224. // 如果为null,则格式化当前时间
  41225. if (!dateTime) dateTime = Number(new Date());
  41226. // 如果dateTime长度为10或者13,则为秒和毫秒的时间戳,如果超过13位,则为其他的时间格式
  41227. if (dateTime.toString().length == 10) dateTime *= 1000;
  41228. var date = new Date(dateTime);
  41229. var ret;
  41230. var opt = {
  41231. "y+": date.getFullYear().toString(),
  41232. // 年
  41233. "m+": (date.getMonth() + 1).toString(),
  41234. // 月
  41235. "d+": date.getDate().toString(),
  41236. // 日
  41237. "h+": date.getHours().toString(),
  41238. // 时
  41239. "M+": date.getMinutes().toString(),
  41240. // 分
  41241. "s+": date.getSeconds().toString() // 秒
  41242. // 有其他格式化字符需求可以继续添加,必须转化成字符串
  41243. };
  41244. for (var k in opt) {
  41245. ret = new RegExp("(" + k + ")").exec(fmt);
  41246. if (ret) {
  41247. fmt = fmt.replace(ret[1], ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, "0"));
  41248. }
  41249. ;
  41250. }
  41251. ;
  41252. return fmt;
  41253. }
  41254. var _default = timeFormat;
  41255. exports.default = _default;
  41256. /***/ }),
  41257. /***/ 54:
  41258. /*!****************************************************************************!*\
  41259. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/libs/function/timeFrom.js ***!
  41260. \****************************************************************************/
  41261. /*! no static exports found */
  41262. /***/ (function(module, exports, __webpack_require__) {
  41263. "use strict";
  41264. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  41265. Object.defineProperty(exports, "__esModule", {
  41266. value: true
  41267. });
  41268. exports.default = void 0;
  41269. var _timeFormat = _interopRequireDefault(__webpack_require__(/*! ../../libs/function/timeFormat.js */ 53));
  41270. /**
  41271. * 时间戳转为多久之前
  41272. * @param String timestamp 时间戳
  41273. * @param String | Boolean format 如果为时间格式字符串,超出一定时间范围,返回固定的时间格式;
  41274. * 如果为布尔值false,无论什么时间,都返回多久以前的格式
  41275. */
  41276. function timeFrom() {
  41277. var dateTime = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
  41278. var format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'yyyy-mm-dd';
  41279. // 如果为null,则格式化当前时间
  41280. if (!dateTime) dateTime = Number(new Date());
  41281. // 如果dateTime长度为10或者13,则为秒和毫秒的时间戳,如果超过13位,则为其他的时间格式
  41282. if (dateTime.toString().length == 10) dateTime *= 1000;
  41283. var timestamp = +new Date(Number(dateTime));
  41284. var timer = (Number(new Date()) - timestamp) / 1000;
  41285. // 如果小于5分钟,则返回"刚刚",其他以此类推
  41286. var tips = '';
  41287. switch (true) {
  41288. case timer < 300:
  41289. tips = '刚刚';
  41290. break;
  41291. case timer >= 300 && timer < 3600:
  41292. tips = parseInt(timer / 60) + '分钟前';
  41293. break;
  41294. case timer >= 3600 && timer < 86400:
  41295. tips = parseInt(timer / 3600) + '小时前';
  41296. break;
  41297. case timer >= 86400 && timer < 2592000:
  41298. tips = parseInt(timer / 86400) + '天前';
  41299. break;
  41300. default:
  41301. // 如果format为false,则无论什么时间戳,都显示xx之前
  41302. if (format === false) {
  41303. if (timer >= 2592000 && timer < 365 * 86400) {
  41304. tips = parseInt(timer / (86400 * 30)) + '个月前';
  41305. } else {
  41306. tips = parseInt(timer / (86400 * 365)) + '年前';
  41307. }
  41308. } else {
  41309. tips = (0, _timeFormat.default)(timestamp, format);
  41310. }
  41311. }
  41312. return tips;
  41313. }
  41314. var _default = timeFrom;
  41315. exports.default = _default;
  41316. /***/ }),
  41317. /***/ 55:
  41318. /*!*********************************************************************************!*\
  41319. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/libs/function/colorGradient.js ***!
  41320. \*********************************************************************************/
  41321. /*! no static exports found */
  41322. /***/ (function(module, exports, __webpack_require__) {
  41323. "use strict";
  41324. Object.defineProperty(exports, "__esModule", {
  41325. value: true
  41326. });
  41327. exports.default = void 0;
  41328. /**
  41329. * 求两个颜色之间的渐变值
  41330. * @param {string} startColor 开始的颜色
  41331. * @param {string} endColor 结束的颜色
  41332. * @param {number} step 颜色等分的份额
  41333. * */
  41334. function colorGradient() {
  41335. var startColor = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'rgb(0, 0, 0)';
  41336. var endColor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'rgb(255, 255, 255)';
  41337. var step = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 10;
  41338. var startRGB = hexToRgb(startColor, false); //转换为rgb数组模式
  41339. var startR = startRGB[0];
  41340. var startG = startRGB[1];
  41341. var startB = startRGB[2];
  41342. var endRGB = hexToRgb(endColor, false);
  41343. var endR = endRGB[0];
  41344. var endG = endRGB[1];
  41345. var endB = endRGB[2];
  41346. var sR = (endR - startR) / step; //总差值
  41347. var sG = (endG - startG) / step;
  41348. var sB = (endB - startB) / step;
  41349. var colorArr = [];
  41350. for (var i = 0; i < step; i++) {
  41351. //计算每一步的hex值
  41352. var hex = rgbToHex('rgb(' + Math.round(sR * i + startR) + ',' + Math.round(sG * i + startG) + ',' + Math.round(sB * i + startB) + ')');
  41353. colorArr.push(hex);
  41354. }
  41355. return colorArr;
  41356. }
  41357. // 将hex表示方式转换为rgb表示方式(这里返回rgb数组模式)
  41358. function hexToRgb(sColor) {
  41359. var str = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  41360. var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  41361. sColor = sColor.toLowerCase();
  41362. if (sColor && reg.test(sColor)) {
  41363. if (sColor.length === 4) {
  41364. var sColorNew = "#";
  41365. for (var i = 1; i < 4; i += 1) {
  41366. sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
  41367. }
  41368. sColor = sColorNew;
  41369. }
  41370. //处理六位的颜色值
  41371. var sColorChange = [];
  41372. for (var _i = 1; _i < 7; _i += 2) {
  41373. sColorChange.push(parseInt("0x" + sColor.slice(_i, _i + 2)));
  41374. }
  41375. if (!str) {
  41376. return sColorChange;
  41377. } else {
  41378. return "rgb(".concat(sColorChange[0], ",").concat(sColorChange[1], ",").concat(sColorChange[2], ")");
  41379. }
  41380. } else if (/^(rgb|RGB)/.test(sColor)) {
  41381. var arr = sColor.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
  41382. return arr.map(function (val) {
  41383. return Number(val);
  41384. });
  41385. } else {
  41386. return sColor;
  41387. }
  41388. }
  41389. ;
  41390. // 将rgb表示方式转换为hex表示方式
  41391. function rgbToHex(rgb) {
  41392. var _this = rgb;
  41393. var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  41394. if (/^(rgb|RGB)/.test(_this)) {
  41395. var aColor = _this.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
  41396. var strHex = "#";
  41397. for (var i = 0; i < aColor.length; i++) {
  41398. var hex = Number(aColor[i]).toString(16);
  41399. hex = String(hex).length == 1 ? 0 + '' + hex : hex; // 保证每个rgb的值为2位
  41400. if (hex === "0") {
  41401. hex += hex;
  41402. }
  41403. strHex += hex;
  41404. }
  41405. if (strHex.length !== 7) {
  41406. strHex = _this;
  41407. }
  41408. return strHex;
  41409. } else if (reg.test(_this)) {
  41410. var aNum = _this.replace(/#/, "").split("");
  41411. if (aNum.length === 6) {
  41412. return _this;
  41413. } else if (aNum.length === 3) {
  41414. var numHex = "#";
  41415. for (var _i2 = 0; _i2 < aNum.length; _i2 += 1) {
  41416. numHex += aNum[_i2] + aNum[_i2];
  41417. }
  41418. return numHex;
  41419. }
  41420. } else {
  41421. return _this;
  41422. }
  41423. }
  41424. /**
  41425. * JS颜色十六进制转换为rgb或rgba,返回的格式为 rgba(255,255,255,0.5)字符串
  41426. * sHex为传入的十六进制的色值
  41427. * alpha为rgba的透明度
  41428. */
  41429. function colorToRgba(color) {
  41430. var alpha = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.3;
  41431. color = rgbToHex(color);
  41432. // 十六进制颜色值的正则表达式
  41433. var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  41434. /* 16进制颜色转为RGB格式 */
  41435. var sColor = color.toLowerCase();
  41436. if (sColor && reg.test(sColor)) {
  41437. if (sColor.length === 4) {
  41438. var sColorNew = '#';
  41439. for (var i = 1; i < 4; i += 1) {
  41440. sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
  41441. }
  41442. sColor = sColorNew;
  41443. }
  41444. // 处理六位的颜色值
  41445. var sColorChange = [];
  41446. for (var _i3 = 1; _i3 < 7; _i3 += 2) {
  41447. sColorChange.push(parseInt('0x' + sColor.slice(_i3, _i3 + 2)));
  41448. }
  41449. // return sColorChange.join(',')
  41450. return 'rgba(' + sColorChange.join(',') + ',' + alpha + ')';
  41451. } else {
  41452. return sColor;
  41453. }
  41454. }
  41455. var _default = {
  41456. colorGradient: colorGradient,
  41457. hexToRgb: hexToRgb,
  41458. rgbToHex: rgbToHex,
  41459. colorToRgba: colorToRgba
  41460. };
  41461. exports.default = _default;
  41462. /***/ }),
  41463. /***/ 56:
  41464. /*!************************************************************************!*\
  41465. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/libs/function/guid.js ***!
  41466. \************************************************************************/
  41467. /*! no static exports found */
  41468. /***/ (function(module, exports, __webpack_require__) {
  41469. "use strict";
  41470. Object.defineProperty(exports, "__esModule", {
  41471. value: true
  41472. });
  41473. exports.default = void 0;
  41474. /**
  41475. * 本算法来源于简书开源代码,详见:https://www.jianshu.com/p/fdbf293d0a85
  41476. * 全局唯一标识符(uuid,Globally Unique Identifier),也称作 uuid(Universally Unique IDentifier)
  41477. * 一般用于多个组件之间,给它一个唯一的标识符,或者v-for循环的时候,如果使用数组的index可能会导致更新列表出现问题
  41478. * 最可能的情况是左滑删除item或者对某条信息流"不喜欢"并去掉它的时候,会导致组件内的数据可能出现错乱
  41479. * v-for的时候,推荐使用后端返回的id而不是循环的index
  41480. * @param {Number} len uuid的长度
  41481. * @param {Boolean} firstU 将返回的首字母置为"u"
  41482. * @param {Number} radix 生成uuid的基数(意味着返回的字符串都是这个基数),2-二进制,8-八进制,10-十进制,16-十六进制
  41483. */
  41484. function guid() {
  41485. var len = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 32;
  41486. var firstU = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  41487. var radix = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
  41488. var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split('');
  41489. var uuid = [];
  41490. radix = radix || chars.length;
  41491. if (len) {
  41492. // 如果指定uuid长度,只是取随机的字符,0|x为位运算,能去掉x的小数位,返回整数位
  41493. for (var i = 0; i < len; i++) {
  41494. uuid[i] = chars[0 | Math.random() * radix];
  41495. }
  41496. } else {
  41497. var r;
  41498. // rfc4122标准要求返回的uuid中,某些位为固定的字符
  41499. uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-';
  41500. uuid[14] = '4';
  41501. for (var _i = 0; _i < 36; _i++) {
  41502. if (!uuid[_i]) {
  41503. r = 0 | Math.random() * 16;
  41504. uuid[_i] = chars[_i == 19 ? r & 0x3 | 0x8 : r];
  41505. }
  41506. }
  41507. }
  41508. // 移除第一个字符,并用u替代,因为第一个字符为数值时,该guid不能用作id或者class
  41509. if (firstU) {
  41510. uuid.shift();
  41511. return 'u' + uuid.join('');
  41512. } else {
  41513. return uuid.join('');
  41514. }
  41515. }
  41516. var _default = guid;
  41517. exports.default = _default;
  41518. /***/ }),
  41519. /***/ 57:
  41520. /*!*************************************************************************!*\
  41521. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/libs/function/color.js ***!
  41522. \*************************************************************************/
  41523. /*! no static exports found */
  41524. /***/ (function(module, exports, __webpack_require__) {
  41525. "use strict";
  41526. Object.defineProperty(exports, "__esModule", {
  41527. value: true
  41528. });
  41529. exports.default = void 0;
  41530. // 为了让用户能够自定义主题,会逐步弃用此文件,各颜色通过css提供
  41531. // 为了给某些特殊场景使用和向后兼容,无需删除此文件(2020-06-20)
  41532. var color = {
  41533. primary: "#2979ff",
  41534. primaryDark: "#2b85e4",
  41535. primaryDisabled: "#a0cfff",
  41536. primaryLight: "#ecf5ff",
  41537. bgColor: "#f3f4f6",
  41538. info: "#909399",
  41539. infoDark: "#82848a",
  41540. infoDisabled: "#c8c9cc",
  41541. infoLight: "#f4f4f5",
  41542. warning: "#ff9900",
  41543. warningDark: "#f29100",
  41544. warningDisabled: "#fcbd71",
  41545. warningLight: "#fdf6ec",
  41546. error: "#fa3534",
  41547. errorDark: "#dd6161",
  41548. errorDisabled: "#fab6b6",
  41549. errorLight: "#fef0f0",
  41550. success: "#19be6b",
  41551. successDark: "#18b566",
  41552. successDisabled: "#71d5a1",
  41553. successLight: "#dbf1e1",
  41554. mainColor: "#303133",
  41555. contentColor: "#606266",
  41556. tipsColor: "#909399",
  41557. lightColor: "#c0c4cc",
  41558. borderColor: "#e4e7ed"
  41559. };
  41560. var _default = color;
  41561. exports.default = _default;
  41562. /***/ }),
  41563. /***/ 58:
  41564. /*!*****************************************************************************!*\
  41565. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/libs/function/type2icon.js ***!
  41566. \*****************************************************************************/
  41567. /*! no static exports found */
  41568. /***/ (function(module, exports, __webpack_require__) {
  41569. "use strict";
  41570. Object.defineProperty(exports, "__esModule", {
  41571. value: true
  41572. });
  41573. exports.default = void 0;
  41574. /**
  41575. * 根据主题type值,获取对应的图标
  41576. * @param String type 主题名称,primary|info|error|warning|success
  41577. * @param String fill 是否使用fill填充实体的图标
  41578. */
  41579. function type2icon() {
  41580. var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'success';
  41581. var fill = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  41582. // 如果非预置值,默认为success
  41583. if (['primary', 'info', 'error', 'warning', 'success'].indexOf(type) == -1) type = 'success';
  41584. var iconName = '';
  41585. // 目前(2019-12-12),info和primary使用同一个图标
  41586. switch (type) {
  41587. case 'primary':
  41588. iconName = 'info-circle';
  41589. break;
  41590. case 'info':
  41591. iconName = 'info-circle';
  41592. break;
  41593. case 'error':
  41594. iconName = 'close-circle';
  41595. break;
  41596. case 'warning':
  41597. iconName = 'error-circle';
  41598. break;
  41599. case 'success':
  41600. iconName = 'checkmark-circle';
  41601. break;
  41602. default:
  41603. iconName = 'checkmark-circle';
  41604. }
  41605. // 是否是实体类型,加上-fill,在icon组件库中,实体的类名是后面加-fill的
  41606. if (fill) iconName += '-fill';
  41607. return iconName;
  41608. }
  41609. var _default = type2icon;
  41610. exports.default = _default;
  41611. /***/ }),
  41612. /***/ 59:
  41613. /*!*******************************************************************************!*\
  41614. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/libs/function/randomArray.js ***!
  41615. \*******************************************************************************/
  41616. /*! no static exports found */
  41617. /***/ (function(module, exports, __webpack_require__) {
  41618. "use strict";
  41619. Object.defineProperty(exports, "__esModule", {
  41620. value: true
  41621. });
  41622. exports.default = void 0;
  41623. // 打乱数组
  41624. function randomArray() {
  41625. var array = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  41626. // 原理是sort排序,Math.random()产生0<= x < 1之间的数,会导致x-0.05大于或者小于0
  41627. return array.sort(function () {
  41628. return Math.random() - 0.5;
  41629. });
  41630. }
  41631. var _default = randomArray;
  41632. exports.default = _default;
  41633. /***/ }),
  41634. /***/ 6:
  41635. /*!***************************************************************!*\
  41636. !*** ./node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
  41637. \***************************************************************/
  41638. /*! no static exports found */
  41639. /***/ (function(module, exports) {
  41640. function _arrayWithHoles(arr) {
  41641. if (Array.isArray(arr)) return arr;
  41642. }
  41643. module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
  41644. /***/ }),
  41645. /***/ 60:
  41646. /*!***************************************************************************!*\
  41647. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/libs/function/addUnit.js ***!
  41648. \***************************************************************************/
  41649. /*! no static exports found */
  41650. /***/ (function(module, exports, __webpack_require__) {
  41651. "use strict";
  41652. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  41653. Object.defineProperty(exports, "__esModule", {
  41654. value: true
  41655. });
  41656. exports.default = addUnit;
  41657. var _test = _interopRequireDefault(__webpack_require__(/*! ./test.js */ 47));
  41658. // 添加单位,如果有rpx,%,px等单位结尾或者值为auto,直接返回,否则加上rpx单位结尾
  41659. function addUnit() {
  41660. var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'auto';
  41661. var unit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'rpx';
  41662. value = String(value);
  41663. // 用uView内置验证规则中的number判断是否为数值
  41664. return _test.default.number(value) ? "".concat(value).concat(unit) : value;
  41665. }
  41666. /***/ }),
  41667. /***/ 61:
  41668. /*!**************************************************************************!*\
  41669. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/libs/function/random.js ***!
  41670. \**************************************************************************/
  41671. /*! no static exports found */
  41672. /***/ (function(module, exports, __webpack_require__) {
  41673. "use strict";
  41674. Object.defineProperty(exports, "__esModule", {
  41675. value: true
  41676. });
  41677. exports.default = void 0;
  41678. function random(min, max) {
  41679. if (min >= 0 && max > 0 && max >= min) {
  41680. var gab = max - min + 1;
  41681. return Math.floor(Math.random() * gab + min);
  41682. } else {
  41683. return 0;
  41684. }
  41685. }
  41686. var _default = random;
  41687. exports.default = _default;
  41688. /***/ }),
  41689. /***/ 62:
  41690. /*!************************************************************************!*\
  41691. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/libs/function/trim.js ***!
  41692. \************************************************************************/
  41693. /*! no static exports found */
  41694. /***/ (function(module, exports, __webpack_require__) {
  41695. "use strict";
  41696. Object.defineProperty(exports, "__esModule", {
  41697. value: true
  41698. });
  41699. exports.default = void 0;
  41700. function trim(str) {
  41701. var pos = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'both';
  41702. if (pos == 'both') {
  41703. return str.replace(/^\s+|\s+$/g, "");
  41704. } else if (pos == "left") {
  41705. return str.replace(/^\s*/, '');
  41706. } else if (pos == 'right') {
  41707. return str.replace(/(\s*$)/g, "");
  41708. } else if (pos == 'all') {
  41709. return str.replace(/\s+/g, "");
  41710. } else {
  41711. return str;
  41712. }
  41713. }
  41714. var _default = trim;
  41715. exports.default = _default;
  41716. /***/ }),
  41717. /***/ 624:
  41718. /*!******************************************************************************************!*\
  41719. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/components/u-parse/libs/MpHtmlParser.js ***!
  41720. \******************************************************************************************/
  41721. /*! no static exports found */
  41722. /***/ (function(module, exports, __webpack_require__) {
  41723. /* WEBPACK VAR INJECTION */(function(uni) {/**
  41724. * html 解析器
  41725. * @tutorial https://github.com/jin-yufeng/Parser
  41726. * @version 20201029
  41727. * @author JinYufeng
  41728. * @listens MIT
  41729. */
  41730. var cfg = __webpack_require__(/*! ./config.js */ 625),
  41731. blankChar = cfg.blankChar,
  41732. CssHandler = __webpack_require__(/*! ./CssHandler.js */ 626),
  41733. windowWidth = uni.getSystemInfoSync().windowWidth;
  41734. var emoji;
  41735. function MpHtmlParser(data) {
  41736. var _this = this;
  41737. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  41738. this.attrs = {};
  41739. this.CssHandler = new CssHandler(options.tagStyle, windowWidth);
  41740. this.data = data;
  41741. this.domain = options.domain;
  41742. this.DOM = [];
  41743. this.i = this.start = this.audioNum = this.imgNum = this.videoNum = 0;
  41744. options.prot = (this.domain || '').includes('://') ? this.domain.split('://')[0] : 'http';
  41745. this.options = options;
  41746. this.state = this.Text;
  41747. this.STACK = [];
  41748. // 工具函数
  41749. this.bubble = function () {
  41750. for (var i = _this.STACK.length, item; item = _this.STACK[--i];) {
  41751. if (cfg.richOnlyTags[item.name]) return false;
  41752. item.c = 1;
  41753. }
  41754. return true;
  41755. };
  41756. this.decode = function (val, amp) {
  41757. var i = -1,
  41758. j,
  41759. en;
  41760. while (1) {
  41761. if ((i = val.indexOf('&', i + 1)) == -1) break;
  41762. if ((j = val.indexOf(';', i + 2)) == -1) break;
  41763. if (val[i + 1] == '#') {
  41764. en = parseInt((val[i + 2] == 'x' ? '0' : '') + val.substring(i + 2, j));
  41765. if (!isNaN(en)) val = val.substr(0, i) + String.fromCharCode(en) + val.substr(j + 1);
  41766. } else {
  41767. en = val.substring(i + 1, j);
  41768. if (cfg.entities[en] || en == amp) val = val.substr(0, i) + (cfg.entities[en] || '&') + val.substr(j + 1);
  41769. }
  41770. }
  41771. return val;
  41772. };
  41773. this.getUrl = function (url) {
  41774. if (url[0] == '/') {
  41775. if (url[1] == '/') url = _this.options.prot + ':' + url;else if (_this.domain) url = _this.domain + url;
  41776. } else if (_this.domain && url.indexOf('data:') != 0 && !url.includes('://')) url = _this.domain + '/' + url;
  41777. return url;
  41778. };
  41779. this.isClose = function () {
  41780. return _this.data[_this.i] == '>' || _this.data[_this.i] == '/' && _this.data[_this.i + 1] == '>';
  41781. };
  41782. this.section = function () {
  41783. return _this.data.substring(_this.start, _this.i);
  41784. };
  41785. this.parent = function () {
  41786. return _this.STACK[_this.STACK.length - 1];
  41787. };
  41788. this.siblings = function () {
  41789. return _this.STACK.length ? _this.parent().children : _this.DOM;
  41790. };
  41791. }
  41792. MpHtmlParser.prototype.parse = function () {
  41793. if (emoji) this.data = emoji.parseEmoji(this.data);
  41794. for (var c; c = this.data[this.i]; this.i++) {
  41795. this.state(c);
  41796. }
  41797. if (this.state == this.Text) this.setText();
  41798. while (this.STACK.length) {
  41799. this.popNode(this.STACK.pop());
  41800. }
  41801. return this.DOM;
  41802. };
  41803. // 设置属性
  41804. MpHtmlParser.prototype.setAttr = function () {
  41805. var name = this.attrName.toLowerCase(),
  41806. val = this.attrVal;
  41807. if (cfg.boolAttrs[name]) this.attrs[name] = 'T';else if (val) {
  41808. 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;
  41809. }
  41810. this.attrVal = '';
  41811. while (blankChar[this.data[this.i]]) {
  41812. this.i++;
  41813. }
  41814. if (this.isClose()) this.setNode();else {
  41815. this.start = this.i;
  41816. this.state = this.AttrName;
  41817. }
  41818. };
  41819. // 设置文本节点
  41820. MpHtmlParser.prototype.setText = function () {
  41821. var back,
  41822. text = this.section();
  41823. if (!text) return;
  41824. text = cfg.onText && cfg.onText(text, function () {
  41825. return back = true;
  41826. }) || text;
  41827. if (back) {
  41828. this.data = this.data.substr(0, this.start) + text + this.data.substr(this.i);
  41829. var j = this.start + text.length;
  41830. for (this.i = this.start; this.i < j; this.i++) {
  41831. this.state(this.data[this.i]);
  41832. }
  41833. return;
  41834. }
  41835. if (!this.pre) {
  41836. // 合并空白符
  41837. var flag,
  41838. tmp = [];
  41839. for (var i = text.length, c; c = text[--i];) {
  41840. if (!blankChar[c]) {
  41841. tmp.unshift(c);
  41842. if (!flag) flag = 1;
  41843. } else {
  41844. if (tmp[0] != ' ') tmp.unshift(' ');
  41845. if (c == '\n' && flag == void 0) flag = 0;
  41846. }
  41847. }
  41848. if (flag == 0) return;
  41849. text = tmp.join('');
  41850. }
  41851. this.siblings().push({
  41852. type: 'text',
  41853. text: this.decode(text)
  41854. });
  41855. };
  41856. // 设置元素节点
  41857. MpHtmlParser.prototype.setNode = function () {
  41858. var node = {
  41859. name: this.tagName.toLowerCase(),
  41860. attrs: this.attrs
  41861. },
  41862. close = cfg.selfClosingTags[node.name];
  41863. if (this.options.nodes.length) node.type = 'node';
  41864. this.attrs = {};
  41865. if (!cfg.ignoreTags[node.name]) {
  41866. // 处理属性
  41867. var attrs = node.attrs,
  41868. style = this.CssHandler.match(node.name, attrs, node) + (attrs.style || ''),
  41869. styleObj = {};
  41870. if (attrs.id) {
  41871. if (this.options.compress & 1) attrs.id = void 0;else if (this.options.useAnchor) this.bubble();
  41872. }
  41873. if (this.options.compress & 2 && attrs.class) attrs.class = void 0;
  41874. switch (node.name) {
  41875. case 'a':
  41876. case 'ad':
  41877. this.bubble();
  41878. break;
  41879. case 'font':
  41880. if (attrs.color) {
  41881. styleObj['color'] = attrs.color;
  41882. attrs.color = void 0;
  41883. }
  41884. if (attrs.face) {
  41885. styleObj['font-family'] = attrs.face;
  41886. attrs.face = void 0;
  41887. }
  41888. if (attrs.size) {
  41889. var size = parseInt(attrs.size);
  41890. if (size < 1) size = 1;else if (size > 7) size = 7;
  41891. var map = ['xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large'];
  41892. styleObj['font-size'] = map[size - 1];
  41893. attrs.size = void 0;
  41894. }
  41895. break;
  41896. case 'embed':
  41897. var src = node.attrs.src || '',
  41898. type = node.attrs.type || '';
  41899. 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;
  41900. if (node.attrs.autostart) node.attrs.autoplay = 'T';
  41901. node.attrs.controls = 'T';
  41902. case 'video':
  41903. case 'audio':
  41904. if (!attrs.id) attrs.id = node.name + ++this["".concat(node.name, "Num")];else this["".concat(node.name, "Num")]++;
  41905. if (node.name == 'video') {
  41906. if (this.videoNum > 3) node.lazyLoad = 1;
  41907. if (attrs.width) {
  41908. styleObj.width = parseFloat(attrs.width) + (attrs.width.includes('%') ? '%' : 'px');
  41909. attrs.width = void 0;
  41910. }
  41911. if (attrs.height) {
  41912. styleObj.height = parseFloat(attrs.height) + (attrs.height.includes('%') ? '%' : 'px');
  41913. attrs.height = void 0;
  41914. }
  41915. }
  41916. if (!attrs.controls && !attrs.autoplay) attrs.controls = 'T';
  41917. attrs.source = [];
  41918. if (attrs.src) {
  41919. attrs.source.push(attrs.src);
  41920. attrs.src = void 0;
  41921. }
  41922. this.bubble();
  41923. break;
  41924. case 'td':
  41925. case 'th':
  41926. if (attrs.colspan || attrs.rowspan) for (var k = this.STACK.length, item; item = this.STACK[--k];) {
  41927. if (item.name == 'table') {
  41928. item.flag = 1;
  41929. break;
  41930. }
  41931. }
  41932. }
  41933. if (attrs.align) {
  41934. if (node.name == 'table') {
  41935. if (attrs.align == 'center') styleObj['margin-inline-start'] = styleObj['margin-inline-end'] = 'auto';else styleObj['float'] = attrs.align;
  41936. } else styleObj['text-align'] = attrs.align;
  41937. attrs.align = void 0;
  41938. }
  41939. // 压缩 style
  41940. var styles = style.split(';');
  41941. style = '';
  41942. for (var i = 0, len = styles.length; i < len; i++) {
  41943. var info = styles[i].split(':');
  41944. if (info.length < 2) continue;
  41945. var _key = info[0].trim().toLowerCase(),
  41946. _value = info.slice(1).join(':').trim();
  41947. 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;
  41948. }
  41949. if (node.name == 'img') {
  41950. if (attrs.src && !attrs.ignore) {
  41951. if (this.bubble()) attrs.i = (this.imgNum++).toString();else attrs.ignore = 'T';
  41952. }
  41953. if (attrs.ignore) {
  41954. style += ';-webkit-touch-callout:none';
  41955. styleObj['max-width'] = '100%';
  41956. }
  41957. var width;
  41958. if (styleObj.width) width = styleObj.width;else if (attrs.width) width = attrs.width.includes('%') ? attrs.width : parseFloat(attrs.width) + 'px';
  41959. if (width) {
  41960. styleObj.width = width;
  41961. attrs.width = '100%';
  41962. if (parseInt(width) > windowWidth) {
  41963. styleObj.height = '';
  41964. if (attrs.height) attrs.height = void 0;
  41965. }
  41966. }
  41967. if (styleObj.height) {
  41968. attrs.height = styleObj.height;
  41969. styleObj.height = '';
  41970. } else if (attrs.height && !attrs.height.includes('%')) attrs.height = parseFloat(attrs.height) + 'px';
  41971. }
  41972. for (var key in styleObj) {
  41973. var value = styleObj[key];
  41974. if (!value) continue;
  41975. if (key.includes('flex') || key == 'order' || key == 'self-align') node.c = 1;
  41976. // 填充链接
  41977. if (value.includes('url')) {
  41978. var j = value.indexOf('(');
  41979. if (j++ != -1) {
  41980. while (value[j] == '"' || value[j] == "'" || blankChar[value[j]]) {
  41981. j++;
  41982. }
  41983. value = value.substr(0, j) + this.getUrl(value.substr(j));
  41984. }
  41985. }
  41986. // 转换 rpx
  41987. else if (value.includes('rpx')) value = value.replace(/[0-9.]+\s*rpx/g, function ($) {
  41988. return parseFloat($) * windowWidth / 750 + 'px';
  41989. });else if (key == 'white-space' && value.includes('pre') && !close) this.pre = node.pre = true;
  41990. style += ";".concat(key, ":").concat(value);
  41991. }
  41992. style = style.substr(1);
  41993. if (style) attrs.style = style;
  41994. if (!close) {
  41995. node.children = [];
  41996. if (node.name == 'pre' && cfg.highlight) {
  41997. this.remove(node);
  41998. this.pre = node.pre = true;
  41999. }
  42000. this.siblings().push(node);
  42001. this.STACK.push(node);
  42002. } else if (!cfg.filter || cfg.filter(node, this) != false) this.siblings().push(node);
  42003. } else {
  42004. if (!close) this.remove(node);else if (node.name == 'source') {
  42005. var parent = this.parent();
  42006. if (parent && (parent.name == 'video' || parent.name == 'audio') && node.attrs.src) parent.attrs.source.push(node.attrs.src);
  42007. } else if (node.name == 'base' && !this.domain) this.domain = node.attrs.href;
  42008. }
  42009. if (this.data[this.i] == '/') this.i++;
  42010. this.start = this.i + 1;
  42011. this.state = this.Text;
  42012. };
  42013. // 移除标签
  42014. MpHtmlParser.prototype.remove = function (node) {
  42015. var _this2 = this;
  42016. var name = node.name,
  42017. j = this.i;
  42018. // 处理 svg
  42019. var handleSvg = function handleSvg() {
  42020. var src = _this2.data.substring(j, _this2.i + 1);
  42021. node.attrs.xmlns = 'http://www.w3.org/2000/svg';
  42022. for (var key in node.attrs) {
  42023. if (key == 'viewbox') src = " viewBox=\"".concat(node.attrs.viewbox, "\"") + src;else if (key != 'style') src = " ".concat(key, "=\"").concat(node.attrs[key], "\"") + src;
  42024. }
  42025. src = '<svg' + src;
  42026. var parent = _this2.parent();
  42027. if (node.attrs.width == '100%' && parent && (parent.attrs.style || '').includes('inline')) parent.attrs.style = 'width:300px;max-width:100%;' + parent.attrs.style;
  42028. _this2.siblings().push({
  42029. name: 'img',
  42030. attrs: {
  42031. src: 'data:image/svg+xml;utf8,' + src.replace(/#/g, '%23'),
  42032. style: node.attrs.style,
  42033. ignore: 'T'
  42034. }
  42035. });
  42036. };
  42037. if (node.name == 'svg' && this.data[j] == '/') return handleSvg(this.i++);
  42038. while (1) {
  42039. if ((this.i = this.data.indexOf('</', this.i + 1)) == -1) {
  42040. if (name == 'pre' || name == 'svg') this.i = j;else this.i = this.data.length;
  42041. return;
  42042. }
  42043. this.start = this.i += 2;
  42044. while (!blankChar[this.data[this.i]] && !this.isClose()) {
  42045. this.i++;
  42046. }
  42047. if (this.section().toLowerCase() == name) {
  42048. // 代码块高亮
  42049. if (name == 'pre') {
  42050. 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);
  42051. return this.i = j;
  42052. } 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);
  42053. if ((this.i = this.data.indexOf('>', this.i)) == -1) this.i = this.data.length;
  42054. if (name == 'svg') handleSvg();
  42055. return;
  42056. }
  42057. }
  42058. };
  42059. // 节点出栈处理
  42060. MpHtmlParser.prototype.popNode = function (node) {
  42061. // 空白符处理
  42062. if (node.pre) {
  42063. node.pre = this.pre = void 0;
  42064. for (var i = this.STACK.length; i--;) {
  42065. if (this.STACK[i].pre) this.pre = true;
  42066. }
  42067. }
  42068. var siblings = this.siblings(),
  42069. len = siblings.length,
  42070. childs = node.children;
  42071. if (node.name == 'head' || cfg.filter && cfg.filter(node, this) == false) return siblings.pop();
  42072. var attrs = node.attrs;
  42073. // 替换一些标签名
  42074. if (cfg.blockTags[node.name]) node.name = 'div';else if (!cfg.trustTags[node.name]) node.name = 'span';
  42075. // 处理列表
  42076. if (node.c && (node.name == 'ul' || node.name == 'ol')) {
  42077. if ((node.attrs.style || '').includes('list-style:none')) {
  42078. for (var _i = 0, child; child = childs[_i++];) {
  42079. if (child.name == 'li') child.name = 'div';
  42080. }
  42081. } else if (node.name == 'ul') {
  42082. var floor = 1;
  42083. for (var _i2 = this.STACK.length; _i2--;) {
  42084. if (this.STACK[_i2].name == 'ul') floor++;
  42085. }
  42086. if (floor != 1) for (var _i3 = childs.length; _i3--;) {
  42087. childs[_i3].floor = floor;
  42088. }
  42089. } else {
  42090. for (var _i4 = 0, num = 1, _child; _child = childs[_i4++];) {
  42091. if (_child.name == 'li') {
  42092. _child.type = 'ol';
  42093. _child.num = function (num, type) {
  42094. if (type == 'a') return String.fromCharCode(97 + (num - 1) % 26);
  42095. if (type == 'A') return String.fromCharCode(65 + (num - 1) % 26);
  42096. if (type == 'i' || type == 'I') {
  42097. num = (num - 1) % 99 + 1;
  42098. var one = ['I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX'],
  42099. ten = ['X', 'XX', 'XXX', 'XL', 'L', 'LX', 'LXX', 'LXXX', 'XC'],
  42100. res = (ten[Math.floor(num / 10) - 1] || '') + (one[num % 10 - 1] || '');
  42101. if (type == 'i') return res.toLowerCase();
  42102. return res;
  42103. }
  42104. return num;
  42105. }(num++, attrs.type) + '.';
  42106. }
  42107. }
  42108. }
  42109. }
  42110. // 处理表格
  42111. if (node.name == 'table') {
  42112. var padding = parseFloat(attrs.cellpadding),
  42113. spacing = parseFloat(attrs.cellspacing),
  42114. border = parseFloat(attrs.border);
  42115. if (node.c) {
  42116. if (isNaN(padding)) padding = 2;
  42117. if (isNaN(spacing)) spacing = 2;
  42118. }
  42119. if (border) attrs.style = "border:".concat(border, "px solid gray;").concat(attrs.style || '');
  42120. if (node.flag && node.c) {
  42121. // 有 colspan 或 rowspan 且含有链接的表格转为 grid 布局实现
  42122. attrs.style = "".concat(attrs.style || '', ";").concat(spacing ? ";grid-gap:".concat(spacing, "px") : ';border-left:0;border-top:0');
  42123. var row = 1,
  42124. col = 1,
  42125. colNum,
  42126. trs = [],
  42127. children = [],
  42128. map = {};
  42129. (function f(ns) {
  42130. for (var i = 0; i < ns.length; i++) {
  42131. if (ns[i].name == 'tr') trs.push(ns[i]);else f(ns[i].children || []);
  42132. }
  42133. })(node.children);
  42134. for (var _i5 = 0; _i5 < trs.length; _i5++) {
  42135. for (var j = 0, td; td = trs[_i5].children[j]; j++) {
  42136. if (td.name == 'td' || td.name == 'th') {
  42137. while (map[row + '.' + col]) {
  42138. col++;
  42139. }
  42140. var cell = {
  42141. name: 'div',
  42142. c: 1,
  42143. attrs: {
  42144. style: (td.attrs.style || '') + (border ? ";border:".concat(border, "px solid gray") + (spacing ? '' : ';border-right:0;border-bottom:0') : '') + (padding ? ";padding:".concat(padding, "px") : '')
  42145. },
  42146. children: td.children
  42147. };
  42148. if (td.attrs.colspan) {
  42149. cell.attrs.style += ';grid-column-start:' + col + ';grid-column-end:' + (col + parseInt(td.attrs.colspan));
  42150. if (!td.attrs.rowspan) cell.attrs.style += ';grid-row-start:' + row + ';grid-row-end:' + (row + 1);
  42151. col += parseInt(td.attrs.colspan) - 1;
  42152. }
  42153. if (td.attrs.rowspan) {
  42154. cell.attrs.style += ';grid-row-start:' + row + ';grid-row-end:' + (row + parseInt(td.attrs.rowspan));
  42155. if (!td.attrs.colspan) cell.attrs.style += ';grid-column-start:' + col + ';grid-column-end:' + (col + 1);
  42156. for (var k = 1; k < td.attrs.rowspan; k++) {
  42157. map[row + k + '.' + col] = 1;
  42158. }
  42159. }
  42160. children.push(cell);
  42161. col++;
  42162. }
  42163. }
  42164. if (!colNum) {
  42165. colNum = col - 1;
  42166. attrs.style += ";grid-template-columns:repeat(".concat(colNum, ",auto)");
  42167. }
  42168. col = 1;
  42169. row++;
  42170. }
  42171. node.children = children;
  42172. } else {
  42173. attrs.style = "border-spacing:".concat(spacing, "px;").concat(attrs.style || '');
  42174. if (border || padding) (function f(ns) {
  42175. for (var i = 0, n; n = ns[i]; i++) {
  42176. if (n.name == 'th' || n.name == 'td') {
  42177. if (border) n.attrs.style = "border:".concat(border, "px solid gray;").concat(n.attrs.style || '');
  42178. if (padding) n.attrs.style = "padding:".concat(padding, "px;").concat(n.attrs.style || '');
  42179. } else f(n.children || []);
  42180. }
  42181. })(childs);
  42182. }
  42183. if (this.options.autoscroll) {
  42184. var table = Object.assign({}, node);
  42185. node.name = 'div';
  42186. node.attrs = {
  42187. style: 'overflow:scroll'
  42188. };
  42189. node.children = [table];
  42190. }
  42191. }
  42192. this.CssHandler.pop && this.CssHandler.pop(node);
  42193. // 自动压缩
  42194. if (node.name == 'div' && !Object.keys(attrs).length && childs.length == 1 && childs[0].name == 'div') siblings[len - 1] = childs[0];
  42195. };
  42196. // 状态机
  42197. MpHtmlParser.prototype.Text = function (c) {
  42198. if (c == '<') {
  42199. var next = this.data[this.i + 1],
  42200. isLetter = function isLetter(c) {
  42201. return c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z';
  42202. };
  42203. if (isLetter(next)) {
  42204. this.setText();
  42205. this.start = this.i + 1;
  42206. this.state = this.TagName;
  42207. } else if (next == '/') {
  42208. this.setText();
  42209. if (isLetter(this.data[++this.i + 1])) {
  42210. this.start = this.i + 1;
  42211. this.state = this.EndTag;
  42212. } else this.Comment();
  42213. } else if (next == '!' || next == '?') {
  42214. this.setText();
  42215. this.Comment();
  42216. }
  42217. }
  42218. };
  42219. MpHtmlParser.prototype.Comment = function () {
  42220. var key;
  42221. 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 = '>';
  42222. if ((this.i = this.data.indexOf(key, this.i + 2)) == -1) this.i = this.data.length;else this.i += key.length - 1;
  42223. this.start = this.i + 1;
  42224. this.state = this.Text;
  42225. };
  42226. MpHtmlParser.prototype.TagName = function (c) {
  42227. if (blankChar[c]) {
  42228. this.tagName = this.section();
  42229. while (blankChar[this.data[this.i]]) {
  42230. this.i++;
  42231. }
  42232. if (this.isClose()) this.setNode();else {
  42233. this.start = this.i;
  42234. this.state = this.AttrName;
  42235. }
  42236. } else if (this.isClose()) {
  42237. this.tagName = this.section();
  42238. this.setNode();
  42239. }
  42240. };
  42241. MpHtmlParser.prototype.AttrName = function (c) {
  42242. if (c == '=' || blankChar[c] || this.isClose()) {
  42243. this.attrName = this.section();
  42244. if (blankChar[c]) while (blankChar[this.data[++this.i]]) {
  42245. ;
  42246. }
  42247. if (this.data[this.i] == '=') {
  42248. while (blankChar[this.data[++this.i]]) {
  42249. ;
  42250. }
  42251. this.start = this.i--;
  42252. this.state = this.AttrValue;
  42253. } else this.setAttr();
  42254. }
  42255. };
  42256. MpHtmlParser.prototype.AttrValue = function (c) {
  42257. if (c == '"' || c == "'") {
  42258. this.start++;
  42259. if ((this.i = this.data.indexOf(c, this.i + 1)) == -1) return this.i = this.data.length;
  42260. this.attrVal = this.section();
  42261. this.i++;
  42262. } else {
  42263. for (; !blankChar[this.data[this.i]] && !this.isClose(); this.i++) {
  42264. ;
  42265. }
  42266. this.attrVal = this.section();
  42267. }
  42268. this.setAttr();
  42269. };
  42270. MpHtmlParser.prototype.EndTag = function (c) {
  42271. if (blankChar[c] || c == '>' || c == '/') {
  42272. var name = this.section().toLowerCase();
  42273. for (var i = this.STACK.length; i--;) {
  42274. if (this.STACK[i].name == name) break;
  42275. }
  42276. if (i != -1) {
  42277. var node;
  42278. while ((node = this.STACK.pop()).name != name) {
  42279. this.popNode(node);
  42280. }
  42281. this.popNode(node);
  42282. } else if (name == 'p' || name == 'br') this.siblings().push({
  42283. name: name,
  42284. attrs: {}
  42285. });
  42286. this.i = this.data.indexOf('>', this.i);
  42287. this.start = this.i + 1;
  42288. if (this.i == -1) this.i = this.data.length;else this.state = this.Text;
  42289. }
  42290. };
  42291. module.exports = MpHtmlParser;
  42292. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  42293. /***/ }),
  42294. /***/ 625:
  42295. /*!************************************************************************************!*\
  42296. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/components/u-parse/libs/config.js ***!
  42297. \************************************************************************************/
  42298. /*! no static exports found */
  42299. /***/ (function(module, exports, __webpack_require__) {
  42300. /* WEBPACK VAR INJECTION */(function(wx) {/* 配置文件 */
  42301. var cfg = {
  42302. // 出错占位图
  42303. errorImg: null,
  42304. // 过滤器函数
  42305. filter: null,
  42306. // 代码高亮函数
  42307. highlight: null,
  42308. // 文本处理函数
  42309. onText: null,
  42310. // 实体编码列表
  42311. entities: {
  42312. quot: '"',
  42313. apos: "'",
  42314. semi: ';',
  42315. nbsp: '\xA0',
  42316. ensp: "\u2002",
  42317. emsp: "\u2003",
  42318. ndash: '–',
  42319. mdash: '—',
  42320. middot: '·',
  42321. lsquo: '‘',
  42322. rsquo: '’',
  42323. ldquo: '“',
  42324. rdquo: '”',
  42325. bull: '•',
  42326. hellip: '…'
  42327. },
  42328. blankChar: makeMap(' ,\xA0,\t,\r,\n,\f'),
  42329. boolAttrs: makeMap('allowfullscreen,autoplay,autostart,controls,ignore,loop,muted'),
  42330. // 块级标签,将被转为 div
  42331. blockTags: makeMap('address,article,aside,body,caption,center,cite,footer,header,html,nav,pre,section'),
  42332. // 将被移除的标签
  42333. ignoreTags: makeMap('area,base,canvas,frame,iframe,input,link,map,meta,param,script,source,style,svg,textarea,title,track,wbr'),
  42334. // 只能被 rich-text 显示的标签
  42335. richOnlyTags: makeMap('a,colgroup,fieldset,legend'),
  42336. // 自闭合的标签
  42337. selfClosingTags: makeMap('area,base,br,col,circle,ellipse,embed,frame,hr,img,input,line,link,meta,param,path,polygon,rect,source,track,use,wbr'),
  42338. // 信任的标签
  42339. 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'),
  42340. // 默认的标签样式
  42341. userAgentStyles: {
  42342. address: 'font-style:italic',
  42343. big: 'display:inline;font-size:1.2em',
  42344. blockquote: 'background-color:#f6f6f6;border-left:3px solid #dbdbdb;color:#6c6c6c;padding:5px 0 5px 10px',
  42345. caption: 'display:table-caption;text-align:center',
  42346. center: 'text-align:center',
  42347. cite: 'font-style:italic',
  42348. dd: 'margin-left:40px',
  42349. mark: 'background-color:yellow',
  42350. pre: 'font-family:monospace;white-space:pre;overflow:scroll',
  42351. s: 'text-decoration:line-through',
  42352. small: 'display:inline;font-size:0.8em',
  42353. u: 'text-decoration:underline'
  42354. }
  42355. };
  42356. function makeMap(str) {
  42357. var map = Object.create(null),
  42358. list = str.split(',');
  42359. for (var i = list.length; i--;) {
  42360. map[list[i]] = true;
  42361. }
  42362. return map;
  42363. }
  42364. if (wx.canIUse('editor')) {
  42365. cfg.blockTags.pre = void 0;
  42366. cfg.ignoreTags.rp = true;
  42367. Object.assign(cfg.richOnlyTags, makeMap('bdi,bdo,caption,rt,ruby'));
  42368. Object.assign(cfg.trustTags, makeMap('bdi,bdo,caption,pre,rt,ruby'));
  42369. }
  42370. module.exports = cfg;
  42371. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js */ 1)["default"]))
  42372. /***/ }),
  42373. /***/ 626:
  42374. /*!****************************************************************************************!*\
  42375. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/components/u-parse/libs/CssHandler.js ***!
  42376. \****************************************************************************************/
  42377. /*! no static exports found */
  42378. /***/ (function(module, exports, __webpack_require__) {
  42379. var cfg = __webpack_require__(/*! ./config.js */ 625),
  42380. isLetter = function isLetter(c) {
  42381. return c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z';
  42382. };
  42383. function CssHandler(tagStyle) {
  42384. var styles = Object.assign(Object.create(null), cfg.userAgentStyles);
  42385. for (var item in tagStyle) {
  42386. styles[item] = (styles[item] ? styles[item] + ';' : '') + tagStyle[item];
  42387. }
  42388. this.styles = styles;
  42389. }
  42390. CssHandler.prototype.getStyle = function (data) {
  42391. this.styles = new parser(data, this.styles).parse();
  42392. };
  42393. CssHandler.prototype.match = function (name, attrs) {
  42394. var tmp,
  42395. matched = (tmp = this.styles[name]) ? tmp + ';' : '';
  42396. if (attrs.class) {
  42397. var items = attrs.class.split(' ');
  42398. for (var i = 0, item; item = items[i]; i++) {
  42399. if (tmp = this.styles['.' + item]) matched += tmp + ';';
  42400. }
  42401. }
  42402. if (tmp = this.styles['#' + attrs.id]) matched += tmp + ';';
  42403. return matched;
  42404. };
  42405. module.exports = CssHandler;
  42406. function parser(data, init) {
  42407. this.data = data;
  42408. this.floor = 0;
  42409. this.i = 0;
  42410. this.list = [];
  42411. this.res = init;
  42412. this.state = this.Space;
  42413. }
  42414. parser.prototype.parse = function () {
  42415. for (var c; c = this.data[this.i]; this.i++) {
  42416. this.state(c);
  42417. }
  42418. return this.res;
  42419. };
  42420. parser.prototype.section = function () {
  42421. return this.data.substring(this.start, this.i);
  42422. };
  42423. // 状态机
  42424. parser.prototype.Space = function (c) {
  42425. if (c == '.' || c == '#' || isLetter(c)) {
  42426. this.start = this.i;
  42427. this.state = this.Name;
  42428. } else if (c == '/' && this.data[this.i + 1] == '*') this.Comment();else if (!cfg.blankChar[c] && c != ';') this.state = this.Ignore;
  42429. };
  42430. parser.prototype.Comment = function () {
  42431. this.i = this.data.indexOf('*/', this.i) + 1;
  42432. if (!this.i) this.i = this.data.length;
  42433. this.state = this.Space;
  42434. };
  42435. parser.prototype.Ignore = function (c) {
  42436. if (c == '{') this.floor++;else if (c == '}' && ! --this.floor) {
  42437. this.list = [];
  42438. this.state = this.Space;
  42439. }
  42440. };
  42441. parser.prototype.Name = function (c) {
  42442. if (cfg.blankChar[c]) {
  42443. this.list.push(this.section());
  42444. this.state = this.NameSpace;
  42445. } else if (c == '{') {
  42446. this.list.push(this.section());
  42447. this.Content();
  42448. } else if (c == ',') {
  42449. this.list.push(this.section());
  42450. this.Comma();
  42451. } else if (!isLetter(c) && (c < '0' || c > '9') && c != '-' && c != '_') this.state = this.Ignore;
  42452. };
  42453. parser.prototype.NameSpace = function (c) {
  42454. if (c == '{') this.Content();else if (c == ',') this.Comma();else if (!cfg.blankChar[c]) this.state = this.Ignore;
  42455. };
  42456. parser.prototype.Comma = function () {
  42457. while (cfg.blankChar[this.data[++this.i]]) {
  42458. ;
  42459. }
  42460. if (this.data[this.i] == '{') this.Content();else {
  42461. this.start = this.i--;
  42462. this.state = this.Name;
  42463. }
  42464. };
  42465. parser.prototype.Content = function () {
  42466. this.start = ++this.i;
  42467. if ((this.i = this.data.indexOf('}', this.i)) == -1) this.i = this.data.length;
  42468. var content = this.section();
  42469. for (var i = 0, item; item = this.list[i++];) {
  42470. if (this.res[item]) this.res[item] += ';' + content;else this.res[item] = content;
  42471. }
  42472. this.list = [];
  42473. this.state = this.Space;
  42474. };
  42475. /***/ }),
  42476. /***/ 63:
  42477. /*!*************************************************************************!*\
  42478. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/libs/function/toast.js ***!
  42479. \*************************************************************************/
  42480. /*! no static exports found */
  42481. /***/ (function(module, exports, __webpack_require__) {
  42482. "use strict";
  42483. /* WEBPACK VAR INJECTION */(function(uni) {
  42484. Object.defineProperty(exports, "__esModule", {
  42485. value: true
  42486. });
  42487. exports.default = void 0;
  42488. function toast(title) {
  42489. var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1500;
  42490. uni.showToast({
  42491. title: title,
  42492. icon: 'none',
  42493. duration: duration
  42494. });
  42495. }
  42496. var _default = toast;
  42497. exports.default = _default;
  42498. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  42499. /***/ }),
  42500. /***/ 64:
  42501. /*!*****************************************************************************!*\
  42502. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/libs/function/getParent.js ***!
  42503. \*****************************************************************************/
  42504. /*! no static exports found */
  42505. /***/ (function(module, exports, __webpack_require__) {
  42506. "use strict";
  42507. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  42508. Object.defineProperty(exports, "__esModule", {
  42509. value: true
  42510. });
  42511. exports.default = getParent;
  42512. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  42513. // 获取父组件的参数,因为支付宝小程序不支持provide/inject的写法
  42514. // this.$parent在非H5中,可以准确获取到父组件,但是在H5中,需要多次this.$parent.$parent.xxx
  42515. function getParent(name, keys) {
  42516. var parent = this.$parent;
  42517. // 通过while历遍,这里主要是为了H5需要多层解析的问题
  42518. while (parent) {
  42519. // 父组件
  42520. if (parent.$options.name !== name) {
  42521. // 如果组件的name不相等,继续上一级寻找
  42522. parent = parent.$parent;
  42523. } else {
  42524. var _ret = function () {
  42525. var data = {};
  42526. // 判断keys是否数组,如果传过来的是一个数组,那么直接使用数组元素值当做键值去父组件寻找
  42527. if (Array.isArray(keys)) {
  42528. keys.map(function (val) {
  42529. data[val] = parent[val] ? parent[val] : '';
  42530. });
  42531. } else {
  42532. // 历遍传过来的对象参数
  42533. for (var i in keys) {
  42534. // 如果子组件有此值则用,无此值则用父组件的值
  42535. // 判断是否空数组,如果是,则用父组件的值,否则用子组件的值
  42536. if (Array.isArray(keys[i])) {
  42537. if (keys[i].length) {
  42538. data[i] = keys[i];
  42539. } else {
  42540. data[i] = parent[i];
  42541. }
  42542. } else if (keys[i].constructor === Object) {
  42543. // 判断是否对象,如果是对象,且有属性,那么使用子组件的值,否则使用父组件的值
  42544. if (Object.keys(keys[i]).length) {
  42545. data[i] = keys[i];
  42546. } else {
  42547. data[i] = parent[i];
  42548. }
  42549. } else {
  42550. // 只要子组件有传值,即使是false值,也是“传值”了,也需要覆盖父组件的同名参数
  42551. data[i] = keys[i] || keys[i] === false ? keys[i] : parent[i];
  42552. }
  42553. }
  42554. }
  42555. return {
  42556. v: data
  42557. };
  42558. }();
  42559. if ((0, _typeof2.default)(_ret) === "object") return _ret.v;
  42560. }
  42561. }
  42562. return {};
  42563. }
  42564. /***/ }),
  42565. /***/ 65:
  42566. /*!***************************************************************************!*\
  42567. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/libs/function/$parent.js ***!
  42568. \***************************************************************************/
  42569. /*! no static exports found */
  42570. /***/ (function(module, exports, __webpack_require__) {
  42571. "use strict";
  42572. Object.defineProperty(exports, "__esModule", {
  42573. value: true
  42574. });
  42575. exports.default = $parent;
  42576. // 获取父组件的参数,因为支付宝小程序不支持provide/inject的写法
  42577. // this.$parent在非H5中,可以准确获取到父组件,但是在H5中,需要多次this.$parent.$parent.xxx
  42578. // 这里默认值等于undefined有它的含义,因为最顶层元素(组件)的$parent就是undefined,意味着不传name
  42579. // 值(默认为undefined),就是查找最顶层的$parent
  42580. function $parent() {
  42581. var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;
  42582. var parent = this.$parent;
  42583. // 通过while历遍,这里主要是为了H5需要多层解析的问题
  42584. while (parent) {
  42585. // 父组件
  42586. if (parent.$options && parent.$options.name !== name) {
  42587. // 如果组件的name不相等,继续上一级寻找
  42588. parent = parent.$parent;
  42589. } else {
  42590. return parent;
  42591. }
  42592. }
  42593. return false;
  42594. }
  42595. /***/ }),
  42596. /***/ 66:
  42597. /*!***********************************************************************!*\
  42598. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/libs/function/sys.js ***!
  42599. \***********************************************************************/
  42600. /*! no static exports found */
  42601. /***/ (function(module, exports, __webpack_require__) {
  42602. "use strict";
  42603. /* WEBPACK VAR INJECTION */(function(uni) {
  42604. Object.defineProperty(exports, "__esModule", {
  42605. value: true
  42606. });
  42607. exports.os = os;
  42608. exports.sys = sys;
  42609. function os() {
  42610. return uni.getSystemInfoSync().platform;
  42611. }
  42612. ;
  42613. function sys() {
  42614. return uni.getSystemInfoSync();
  42615. }
  42616. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  42617. /***/ }),
  42618. /***/ 67:
  42619. /*!****************************************************************************!*\
  42620. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/libs/function/debounce.js ***!
  42621. \****************************************************************************/
  42622. /*! no static exports found */
  42623. /***/ (function(module, exports, __webpack_require__) {
  42624. "use strict";
  42625. Object.defineProperty(exports, "__esModule", {
  42626. value: true
  42627. });
  42628. exports.default = void 0;
  42629. var timeout = null;
  42630. /**
  42631. * 防抖原理:一定时间内,只有最后一次操作,再过wait毫秒后才执行函数
  42632. *
  42633. * @param {Function} func 要执行的回调函数
  42634. * @param {Number} wait 延时的时间
  42635. * @param {Boolean} immediate 是否立即执行
  42636. * @return null
  42637. */
  42638. function debounce(func) {
  42639. var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;
  42640. var immediate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  42641. // 清除定时器
  42642. if (timeout !== null) clearTimeout(timeout);
  42643. // 立即执行,此类情况一般用不到
  42644. if (immediate) {
  42645. var callNow = !timeout;
  42646. timeout = setTimeout(function () {
  42647. timeout = null;
  42648. }, wait);
  42649. if (callNow) typeof func === 'function' && func();
  42650. } else {
  42651. // 设置定时器,当最后一次操作后,timeout不会再被清除,所以在延时wait毫秒后执行func回调方法
  42652. timeout = setTimeout(function () {
  42653. typeof func === 'function' && func();
  42654. }, wait);
  42655. }
  42656. }
  42657. var _default = debounce;
  42658. exports.default = _default;
  42659. /***/ }),
  42660. /***/ 68:
  42661. /*!****************************************************************************!*\
  42662. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/libs/function/throttle.js ***!
  42663. \****************************************************************************/
  42664. /*! no static exports found */
  42665. /***/ (function(module, exports, __webpack_require__) {
  42666. "use strict";
  42667. Object.defineProperty(exports, "__esModule", {
  42668. value: true
  42669. });
  42670. exports.default = void 0;
  42671. var timer, flag;
  42672. /**
  42673. * 节流原理:在一定时间内,只能触发一次
  42674. *
  42675. * @param {Function} func 要执行的回调函数
  42676. * @param {Number} wait 延时的时间
  42677. * @param {Boolean} immediate 是否立即执行
  42678. * @return null
  42679. */
  42680. function throttle(func) {
  42681. var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;
  42682. var immediate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  42683. if (immediate) {
  42684. if (!flag) {
  42685. flag = true;
  42686. // 如果是立即执行,则在wait毫秒内开始时执行
  42687. typeof func === 'function' && func();
  42688. timer = setTimeout(function () {
  42689. flag = false;
  42690. }, wait);
  42691. }
  42692. } else {
  42693. if (!flag) {
  42694. flag = true;
  42695. // 如果是非立即执行,则在wait毫秒内的结束处执行
  42696. timer = setTimeout(function () {
  42697. flag = false;
  42698. typeof func === 'function' && func();
  42699. }, wait);
  42700. }
  42701. }
  42702. }
  42703. ;
  42704. var _default = throttle;
  42705. exports.default = _default;
  42706. /***/ }),
  42707. /***/ 69:
  42708. /*!************************************************************************!*\
  42709. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/libs/config/config.js ***!
  42710. \************************************************************************/
  42711. /*! no static exports found */
  42712. /***/ (function(module, exports, __webpack_require__) {
  42713. "use strict";
  42714. Object.defineProperty(exports, "__esModule", {
  42715. value: true
  42716. });
  42717. exports.default = void 0;
  42718. // 此版本发布于2022-04-19
  42719. var version = '1.8.6';
  42720. var _default = {
  42721. v: version,
  42722. version: version,
  42723. // 主题名称
  42724. type: ['primary', 'success', 'info', 'error', 'warning']
  42725. };
  42726. exports.default = _default;
  42727. /***/ }),
  42728. /***/ 7:
  42729. /*!*********************************************************************!*\
  42730. !*** ./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
  42731. \*********************************************************************/
  42732. /*! no static exports found */
  42733. /***/ (function(module, exports) {
  42734. function _iterableToArrayLimit(arr, i) {
  42735. var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
  42736. if (null != _i) {
  42737. var _s,
  42738. _e,
  42739. _x,
  42740. _r,
  42741. _arr = [],
  42742. _n = !0,
  42743. _d = !1;
  42744. try {
  42745. if (_x = (_i = _i.call(arr)).next, 0 === i) {
  42746. if (Object(_i) !== _i) return;
  42747. _n = !1;
  42748. } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) {
  42749. ;
  42750. }
  42751. } catch (err) {
  42752. _d = !0, _e = err;
  42753. } finally {
  42754. try {
  42755. if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
  42756. } finally {
  42757. if (_d) throw _e;
  42758. }
  42759. }
  42760. return _arr;
  42761. }
  42762. }
  42763. module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports;
  42764. /***/ }),
  42765. /***/ 70:
  42766. /*!************************************************************************!*\
  42767. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/libs/config/zIndex.js ***!
  42768. \************************************************************************/
  42769. /*! no static exports found */
  42770. /***/ (function(module, exports, __webpack_require__) {
  42771. "use strict";
  42772. Object.defineProperty(exports, "__esModule", {
  42773. value: true
  42774. });
  42775. exports.default = void 0;
  42776. // uniapp在H5中各API的z-index值如下:
  42777. /**
  42778. * actionsheet: 999
  42779. * modal: 999
  42780. * navigate: 998
  42781. * tabbar: 998
  42782. * toast: 999
  42783. */
  42784. var _default = {
  42785. toast: 10090,
  42786. noNetwork: 10080,
  42787. // popup包含popup,actionsheet,keyboard,picker的值
  42788. popup: 10075,
  42789. mask: 10070,
  42790. navbar: 980,
  42791. topTips: 975,
  42792. sticky: 970,
  42793. indexListSticky: 965
  42794. };
  42795. exports.default = _default;
  42796. /***/ }),
  42797. /***/ 8:
  42798. /*!***************************************************************************!*\
  42799. !*** ./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
  42800. \***************************************************************************/
  42801. /*! no static exports found */
  42802. /***/ (function(module, exports, __webpack_require__) {
  42803. var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ 9);
  42804. function _unsupportedIterableToArray(o, minLen) {
  42805. if (!o) return;
  42806. if (typeof o === "string") return arrayLikeToArray(o, minLen);
  42807. var n = Object.prototype.toString.call(o).slice(8, -1);
  42808. if (n === "Object" && o.constructor) n = o.constructor.name;
  42809. if (n === "Map" || n === "Set") return Array.from(o);
  42810. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
  42811. }
  42812. module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  42813. /***/ }),
  42814. /***/ 9:
  42815. /*!*****************************************************************!*\
  42816. !*** ./node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
  42817. \*****************************************************************/
  42818. /*! no static exports found */
  42819. /***/ (function(module, exports) {
  42820. function _arrayLikeToArray(arr, len) {
  42821. if (len == null || len > arr.length) len = arr.length;
  42822. for (var i = 0, arr2 = new Array(len); i < len; i++) {
  42823. arr2[i] = arr[i];
  42824. }
  42825. return arr2;
  42826. }
  42827. module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  42828. /***/ })
  42829. }]);
  42830. //# sourceMappingURL=../../.sourcemap/mp-weixin/common/vendor.js.map