12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774227752277622777227782277922780227812278222783227842278522786227872278822789227902279122792227932279422795227962279722798227992280022801228022280322804228052280622807228082280922810228112281222813228142281522816228172281822819228202282122822228232282422825228262282722828228292283022831228322283322834228352283622837228382283922840228412284222843228442284522846228472284822849228502285122852228532285422855228562285722858228592286022861228622286322864228652286622867228682286922870228712287222873228742287522876228772287822879228802288122882228832288422885228862288722888228892289022891228922289322894228952289622897228982289922900229012290222903229042290522906229072290822909229102291122912229132291422915229162291722918229192292022921229222292322924229252292622927229282292922930229312293222933229342293522936229372293822939229402294122942229432294422945229462294722948229492295022951229522295322954229552295622957229582295922960229612296222963229642296522966229672296822969229702297122972229732297422975229762297722978229792298022981229822298322984229852298622987229882298922990229912299222993229942299522996229972299822999230002300123002230032300423005230062300723008230092301023011230122301323014230152301623017230182301923020230212302223023230242302523026230272302823029230302303123032230332303423035230362303723038230392304023041230422304323044230452304623047230482304923050230512305223053230542305523056230572305823059230602306123062230632306423065230662306723068230692307023071230722307323074230752307623077230782307923080230812308223083230842308523086230872308823089230902309123092230932309423095230962309723098230992310023101231022310323104231052310623107231082310923110231112311223113231142311523116231172311823119231202312123122231232312423125231262312723128231292313023131231322313323134231352313623137231382313923140231412314223143231442314523146231472314823149231502315123152231532315423155231562315723158231592316023161231622316323164231652316623167231682316923170231712317223173231742317523176231772317823179231802318123182231832318423185231862318723188231892319023191231922319323194231952319623197231982319923200232012320223203232042320523206232072320823209232102321123212232132321423215232162321723218232192322023221232222322323224232252322623227232282322923230232312323223233232342323523236232372323823239232402324123242232432324423245232462324723248232492325023251232522325323254232552325623257232582325923260232612326223263232642326523266232672326823269232702327123272232732327423275232762327723278232792328023281232822328323284232852328623287232882328923290232912329223293232942329523296232972329823299233002330123302233032330423305233062330723308233092331023311233122331323314233152331623317233182331923320233212332223323233242332523326233272332823329233302333123332233332333423335233362333723338233392334023341233422334323344233452334623347233482334923350233512335223353233542335523356233572335823359233602336123362233632336423365233662336723368233692337023371233722337323374233752337623377233782337923380233812338223383233842338523386233872338823389233902339123392233932339423395233962339723398233992340023401234022340323404234052340623407234082340923410234112341223413234142341523416234172341823419234202342123422234232342423425234262342723428234292343023431234322343323434234352343623437234382343923440234412344223443234442344523446234472344823449234502345123452234532345423455234562345723458234592346023461234622346323464234652346623467234682346923470234712347223473234742347523476234772347823479234802348123482234832348423485234862348723488234892349023491234922349323494234952349623497234982349923500235012350223503235042350523506235072350823509235102351123512235132351423515235162351723518235192352023521235222352323524235252352623527235282352923530235312353223533235342353523536235372353823539235402354123542235432354423545235462354723548235492355023551235522355323554235552355623557235582355923560235612356223563235642356523566235672356823569235702357123572235732357423575235762357723578235792358023581235822358323584235852358623587235882358923590235912359223593235942359523596235972359823599236002360123602236032360423605236062360723608236092361023611236122361323614236152361623617236182361923620236212362223623236242362523626236272362823629236302363123632236332363423635236362363723638236392364023641236422364323644236452364623647236482364923650236512365223653236542365523656236572365823659236602366123662236632366423665236662366723668236692367023671236722367323674236752367623677236782367923680236812368223683236842368523686236872368823689236902369123692236932369423695236962369723698236992370023701237022370323704237052370623707237082370923710237112371223713237142371523716237172371823719237202372123722237232372423725237262372723728237292373023731237322373323734237352373623737237382373923740237412374223743237442374523746237472374823749237502375123752237532375423755237562375723758237592376023761237622376323764237652376623767237682376923770237712377223773237742377523776237772377823779237802378123782237832378423785237862378723788237892379023791237922379323794237952379623797237982379923800238012380223803238042380523806238072380823809238102381123812238132381423815238162381723818238192382023821238222382323824238252382623827238282382923830238312383223833238342383523836238372383823839238402384123842238432384423845238462384723848238492385023851238522385323854238552385623857238582385923860238612386223863238642386523866238672386823869238702387123872238732387423875238762387723878238792388023881238822388323884238852388623887238882388923890238912389223893238942389523896238972389823899239002390123902239032390423905239062390723908239092391023911239122391323914239152391623917239182391923920239212392223923239242392523926239272392823929239302393123932239332393423935239362393723938239392394023941239422394323944239452394623947239482394923950239512395223953239542395523956239572395823959239602396123962239632396423965239662396723968239692397023971239722397323974239752397623977239782397923980239812398223983239842398523986239872398823989239902399123992239932399423995239962399723998239992400024001240022400324004240052400624007240082400924010240112401224013240142401524016240172401824019240202402124022240232402424025240262402724028240292403024031240322403324034240352403624037240382403924040240412404224043240442404524046240472404824049240502405124052240532405424055240562405724058240592406024061240622406324064240652406624067240682406924070240712407224073240742407524076240772407824079240802408124082240832408424085240862408724088240892409024091240922409324094240952409624097240982409924100241012410224103241042410524106241072410824109241102411124112241132411424115241162411724118241192412024121241222412324124241252412624127241282412924130241312413224133241342413524136241372413824139241402414124142241432414424145241462414724148241492415024151241522415324154241552415624157241582415924160241612416224163241642416524166241672416824169241702417124172241732417424175241762417724178241792418024181241822418324184241852418624187241882418924190241912419224193241942419524196241972419824199242002420124202242032420424205242062420724208242092421024211242122421324214242152421624217242182421924220242212422224223242242422524226242272422824229242302423124232242332423424235242362423724238242392424024241242422424324244242452424624247242482424924250242512425224253242542425524256242572425824259242602426124262242632426424265242662426724268242692427024271242722427324274242752427624277242782427924280242812428224283242842428524286242872428824289242902429124292242932429424295242962429724298242992430024301243022430324304243052430624307243082430924310243112431224313243142431524316243172431824319243202432124322243232432424325243262432724328243292433024331243322433324334243352433624337243382433924340243412434224343243442434524346243472434824349243502435124352243532435424355243562435724358243592436024361243622436324364243652436624367243682436924370243712437224373243742437524376243772437824379243802438124382243832438424385243862438724388243892439024391243922439324394243952439624397243982439924400244012440224403244042440524406244072440824409244102441124412244132441424415244162441724418244192442024421244222442324424244252442624427244282442924430244312443224433244342443524436244372443824439244402444124442244432444424445244462444724448244492445024451244522445324454244552445624457244582445924460244612446224463244642446524466244672446824469244702447124472244732447424475244762447724478244792448024481244822448324484244852448624487244882448924490244912449224493244942449524496244972449824499245002450124502245032450424505245062450724508245092451024511245122451324514245152451624517245182451924520245212452224523245242452524526245272452824529245302453124532245332453424535245362453724538245392454024541245422454324544245452454624547245482454924550245512455224553245542455524556245572455824559245602456124562245632456424565245662456724568245692457024571245722457324574245752457624577245782457924580245812458224583245842458524586245872458824589245902459124592245932459424595245962459724598245992460024601246022460324604246052460624607246082460924610246112461224613246142461524616246172461824619246202462124622246232462424625246262462724628246292463024631246322463324634246352463624637246382463924640246412464224643246442464524646246472464824649246502465124652246532465424655246562465724658246592466024661246622466324664246652466624667246682466924670246712467224673246742467524676246772467824679246802468124682246832468424685246862468724688246892469024691246922469324694246952469624697246982469924700247012470224703247042470524706247072470824709247102471124712247132471424715247162471724718247192472024721247222472324724247252472624727247282472924730247312473224733247342473524736247372473824739247402474124742247432474424745247462474724748247492475024751247522475324754247552475624757247582475924760247612476224763247642476524766247672476824769247702477124772247732477424775247762477724778247792478024781247822478324784247852478624787247882478924790247912479224793247942479524796247972479824799248002480124802248032480424805248062480724808248092481024811248122481324814248152481624817248182481924820248212482224823248242482524826248272482824829248302483124832248332483424835248362483724838248392484024841248422484324844248452484624847248482484924850248512485224853248542485524856248572485824859248602486124862248632486424865248662486724868248692487024871248722487324874248752487624877248782487924880248812488224883248842488524886248872488824889248902489124892248932489424895248962489724898248992490024901249022490324904249052490624907249082490924910249112491224913249142491524916249172491824919249202492124922249232492424925249262492724928249292493024931249322493324934249352493624937249382493924940249412494224943249442494524946249472494824949249502495124952249532495424955249562495724958249592496024961249622496324964249652496624967249682496924970249712497224973249742497524976249772497824979249802498124982249832498424985249862498724988249892499024991249922499324994249952499624997249982499925000250012500225003250042500525006250072500825009250102501125012250132501425015250162501725018250192502025021250222502325024250252502625027250282502925030250312503225033250342503525036250372503825039250402504125042250432504425045250462504725048250492505025051250522505325054250552505625057250582505925060250612506225063250642506525066250672506825069250702507125072250732507425075250762507725078250792508025081250822508325084250852508625087250882508925090250912509225093250942509525096250972509825099251002510125102251032510425105251062510725108251092511025111251122511325114251152511625117251182511925120251212512225123251242512525126251272512825129251302513125132251332513425135251362513725138251392514025141251422514325144251452514625147251482514925150251512515225153251542515525156251572515825159251602516125162251632516425165251662516725168251692517025171251722517325174251752517625177251782517925180251812518225183251842518525186251872518825189251902519125192251932519425195251962519725198251992520025201252022520325204252052520625207252082520925210252112521225213252142521525216252172521825219252202522125222252232522425225252262522725228252292523025231252322523325234252352523625237252382523925240252412524225243252442524525246252472524825249252502525125252252532525425255252562525725258252592526025261252622526325264252652526625267252682526925270252712527225273252742527525276252772527825279252802528125282252832528425285252862528725288252892529025291252922529325294252952529625297252982529925300253012530225303253042530525306253072530825309253102531125312253132531425315253162531725318253192532025321253222532325324253252532625327253282532925330253312533225333253342533525336253372533825339253402534125342253432534425345253462534725348253492535025351253522535325354253552535625357253582535925360253612536225363253642536525366253672536825369253702537125372253732537425375253762537725378253792538025381253822538325384253852538625387253882538925390253912539225393253942539525396253972539825399254002540125402254032540425405254062540725408254092541025411254122541325414254152541625417254182541925420254212542225423254242542525426254272542825429254302543125432254332543425435254362543725438254392544025441254422544325444254452544625447254482544925450254512545225453254542545525456254572545825459254602546125462254632546425465254662546725468254692547025471254722547325474254752547625477254782547925480254812548225483254842548525486254872548825489254902549125492254932549425495254962549725498254992550025501255022550325504255052550625507255082550925510255112551225513255142551525516255172551825519255202552125522255232552425525255262552725528255292553025531255322553325534255352553625537255382553925540255412554225543255442554525546255472554825549255502555125552255532555425555255562555725558255592556025561255622556325564255652556625567255682556925570255712557225573255742557525576255772557825579255802558125582255832558425585255862558725588255892559025591255922559325594255952559625597255982559925600256012560225603256042560525606256072560825609256102561125612256132561425615256162561725618256192562025621256222562325624256252562625627256282562925630256312563225633256342563525636256372563825639256402564125642256432564425645256462564725648256492565025651256522565325654256552565625657256582565925660256612566225663256642566525666256672566825669256702567125672256732567425675256762567725678256792568025681256822568325684256852568625687256882568925690256912569225693256942569525696256972569825699257002570125702257032570425705257062570725708257092571025711257122571325714257152571625717257182571925720257212572225723257242572525726257272572825729257302573125732257332573425735257362573725738257392574025741257422574325744257452574625747257482574925750257512575225753257542575525756257572575825759257602576125762257632576425765257662576725768257692577025771257722577325774257752577625777257782577925780257812578225783257842578525786257872578825789257902579125792257932579425795257962579725798257992580025801258022580325804258052580625807258082580925810258112581225813258142581525816258172581825819258202582125822258232582425825258262582725828258292583025831258322583325834258352583625837258382583925840258412584225843258442584525846258472584825849258502585125852258532585425855258562585725858258592586025861258622586325864258652586625867258682586925870258712587225873258742587525876258772587825879258802588125882258832588425885258862588725888258892589025891258922589325894258952589625897258982589925900259012590225903259042590525906259072590825909259102591125912259132591425915259162591725918259192592025921259222592325924259252592625927259282592925930259312593225933259342593525936259372593825939259402594125942259432594425945259462594725948259492595025951259522595325954259552595625957259582595925960259612596225963259642596525966259672596825969259702597125972259732597425975259762597725978259792598025981259822598325984259852598625987259882598925990259912599225993259942599525996259972599825999260002600126002260032600426005260062600726008260092601026011260122601326014260152601626017260182601926020260212602226023260242602526026260272602826029260302603126032260332603426035260362603726038260392604026041260422604326044260452604626047260482604926050260512605226053260542605526056260572605826059260602606126062260632606426065260662606726068260692607026071260722607326074260752607626077260782607926080260812608226083260842608526086260872608826089260902609126092260932609426095260962609726098260992610026101261022610326104261052610626107261082610926110261112611226113261142611526116261172611826119261202612126122261232612426125261262612726128261292613026131261322613326134261352613626137261382613926140261412614226143261442614526146261472614826149261502615126152261532615426155261562615726158261592616026161261622616326164261652616626167261682616926170261712617226173261742617526176261772617826179261802618126182261832618426185261862618726188261892619026191261922619326194261952619626197261982619926200262012620226203262042620526206262072620826209262102621126212262132621426215262162621726218262192622026221262222622326224262252622626227262282622926230262312623226233262342623526236262372623826239262402624126242262432624426245262462624726248262492625026251262522625326254262552625626257262582625926260262612626226263262642626526266262672626826269262702627126272262732627426275262762627726278262792628026281262822628326284262852628626287262882628926290262912629226293262942629526296262972629826299263002630126302263032630426305263062630726308263092631026311263122631326314263152631626317263182631926320263212632226323263242632526326263272632826329263302633126332263332633426335263362633726338263392634026341263422634326344263452634626347263482634926350263512635226353263542635526356263572635826359263602636126362263632636426365263662636726368263692637026371263722637326374263752637626377263782637926380263812638226383263842638526386263872638826389263902639126392263932639426395263962639726398263992640026401264022640326404264052640626407264082640926410264112641226413264142641526416264172641826419264202642126422264232642426425264262642726428264292643026431264322643326434264352643626437264382643926440264412644226443264442644526446264472644826449264502645126452264532645426455264562645726458264592646026461264622646326464264652646626467264682646926470264712647226473264742647526476264772647826479264802648126482264832648426485264862648726488264892649026491264922649326494264952649626497264982649926500265012650226503265042650526506265072650826509265102651126512265132651426515265162651726518265192652026521265222652326524265252652626527265282652926530265312653226533265342653526536265372653826539265402654126542265432654426545265462654726548265492655026551265522655326554265552655626557265582655926560265612656226563265642656526566265672656826569265702657126572265732657426575265762657726578265792658026581265822658326584265852658626587265882658926590265912659226593265942659526596265972659826599266002660126602266032660426605266062660726608266092661026611266122661326614266152661626617266182661926620266212662226623266242662526626266272662826629266302663126632266332663426635266362663726638266392664026641266422664326644266452664626647266482664926650266512665226653266542665526656266572665826659266602666126662266632666426665266662666726668266692667026671266722667326674266752667626677266782667926680266812668226683266842668526686266872668826689266902669126692266932669426695266962669726698266992670026701267022670326704267052670626707267082670926710267112671226713267142671526716267172671826719267202672126722267232672426725267262672726728267292673026731267322673326734267352673626737267382673926740267412674226743267442674526746267472674826749267502675126752267532675426755267562675726758267592676026761267622676326764267652676626767267682676926770267712677226773267742677526776267772677826779267802678126782267832678426785267862678726788267892679026791267922679326794267952679626797267982679926800268012680226803268042680526806268072680826809268102681126812268132681426815268162681726818268192682026821268222682326824268252682626827268282682926830268312683226833268342683526836268372683826839268402684126842268432684426845268462684726848268492685026851268522685326854268552685626857268582685926860268612686226863268642686526866268672686826869268702687126872268732687426875268762687726878268792688026881268822688326884268852688626887268882688926890268912689226893268942689526896268972689826899269002690126902269032690426905269062690726908269092691026911269122691326914269152691626917269182691926920269212692226923269242692526926269272692826929269302693126932269332693426935269362693726938269392694026941269422694326944269452694626947269482694926950269512695226953269542695526956269572695826959269602696126962269632696426965269662696726968269692697026971269722697326974269752697626977269782697926980269812698226983269842698526986269872698826989269902699126992269932699426995269962699726998269992700027001270022700327004270052700627007270082700927010270112701227013270142701527016270172701827019270202702127022270232702427025270262702727028270292703027031270322703327034270352703627037270382703927040270412704227043270442704527046270472704827049270502705127052270532705427055270562705727058270592706027061270622706327064270652706627067270682706927070270712707227073270742707527076270772707827079270802708127082270832708427085270862708727088270892709027091270922709327094270952709627097270982709927100271012710227103271042710527106271072710827109271102711127112271132711427115271162711727118271192712027121271222712327124271252712627127271282712927130271312713227133271342713527136271372713827139271402714127142271432714427145271462714727148271492715027151271522715327154271552715627157271582715927160271612716227163271642716527166271672716827169271702717127172271732717427175271762717727178271792718027181271822718327184271852718627187271882718927190271912719227193271942719527196271972719827199272002720127202272032720427205272062720727208272092721027211272122721327214272152721627217272182721927220272212722227223272242722527226272272722827229272302723127232272332723427235272362723727238272392724027241272422724327244272452724627247272482724927250272512725227253272542725527256272572725827259272602726127262272632726427265272662726727268272692727027271272722727327274272752727627277272782727927280272812728227283272842728527286272872728827289272902729127292272932729427295272962729727298272992730027301273022730327304273052730627307273082730927310273112731227313273142731527316273172731827319273202732127322273232732427325273262732727328273292733027331273322733327334273352733627337273382733927340273412734227343273442734527346273472734827349273502735127352273532735427355273562735727358273592736027361273622736327364273652736627367273682736927370273712737227373273742737527376273772737827379273802738127382273832738427385273862738727388273892739027391273922739327394273952739627397273982739927400274012740227403274042740527406274072740827409274102741127412274132741427415274162741727418274192742027421274222742327424274252742627427274282742927430274312743227433274342743527436274372743827439274402744127442274432744427445274462744727448274492745027451274522745327454274552745627457274582745927460274612746227463274642746527466274672746827469274702747127472274732747427475274762747727478274792748027481274822748327484274852748627487274882748927490274912749227493274942749527496274972749827499275002750127502275032750427505275062750727508275092751027511275122751327514275152751627517275182751927520275212752227523275242752527526275272752827529275302753127532275332753427535275362753727538275392754027541275422754327544275452754627547275482754927550275512755227553275542755527556275572755827559275602756127562275632756427565275662756727568275692757027571275722757327574275752757627577275782757927580275812758227583275842758527586275872758827589275902759127592275932759427595275962759727598275992760027601276022760327604276052760627607276082760927610276112761227613276142761527616276172761827619276202762127622276232762427625276262762727628276292763027631276322763327634276352763627637276382763927640276412764227643276442764527646276472764827649276502765127652276532765427655276562765727658276592766027661276622766327664276652766627667276682766927670276712767227673276742767527676276772767827679276802768127682276832768427685276862768727688276892769027691276922769327694276952769627697276982769927700277012770227703277042770527706277072770827709277102771127712277132771427715277162771727718277192772027721277222772327724277252772627727277282772927730277312773227733277342773527736277372773827739277402774127742277432774427745277462774727748277492775027751277522775327754277552775627757277582775927760277612776227763277642776527766277672776827769277702777127772277732777427775277762777727778277792778027781277822778327784277852778627787277882778927790277912779227793277942779527796277972779827799278002780127802278032780427805278062780727808278092781027811278122781327814278152781627817278182781927820278212782227823278242782527826278272782827829278302783127832278332783427835278362783727838278392784027841278422784327844278452784627847278482784927850278512785227853278542785527856278572785827859278602786127862278632786427865278662786727868278692787027871278722787327874278752787627877278782787927880278812788227883278842788527886278872788827889278902789127892278932789427895278962789727898278992790027901279022790327904279052790627907279082790927910279112791227913279142791527916279172791827919279202792127922279232792427925279262792727928279292793027931279322793327934279352793627937279382793927940279412794227943279442794527946279472794827949279502795127952279532795427955279562795727958279592796027961279622796327964279652796627967279682796927970279712797227973279742797527976279772797827979279802798127982279832798427985279862798727988279892799027991279922799327994279952799627997279982799928000280012800228003280042800528006280072800828009280102801128012280132801428015280162801728018280192802028021280222802328024280252802628027280282802928030280312803228033280342803528036280372803828039280402804128042280432804428045280462804728048280492805028051280522805328054280552805628057280582805928060280612806228063280642806528066280672806828069280702807128072280732807428075280762807728078280792808028081280822808328084280852808628087280882808928090280912809228093280942809528096280972809828099281002810128102281032810428105281062810728108281092811028111281122811328114281152811628117281182811928120281212812228123281242812528126281272812828129281302813128132281332813428135281362813728138281392814028141281422814328144281452814628147281482814928150281512815228153281542815528156281572815828159281602816128162281632816428165281662816728168281692817028171281722817328174281752817628177281782817928180281812818228183281842818528186281872818828189281902819128192281932819428195281962819728198281992820028201282022820328204282052820628207282082820928210282112821228213282142821528216282172821828219282202822128222282232822428225282262822728228282292823028231282322823328234282352823628237282382823928240282412824228243282442824528246282472824828249282502825128252282532825428255282562825728258282592826028261282622826328264282652826628267282682826928270282712827228273282742827528276282772827828279282802828128282282832828428285282862828728288282892829028291282922829328294282952829628297282982829928300283012830228303283042830528306283072830828309283102831128312283132831428315283162831728318283192832028321283222832328324283252832628327283282832928330283312833228333283342833528336283372833828339283402834128342283432834428345283462834728348283492835028351283522835328354283552835628357283582835928360283612836228363283642836528366283672836828369283702837128372283732837428375283762837728378283792838028381283822838328384283852838628387283882838928390283912839228393283942839528396283972839828399284002840128402284032840428405284062840728408284092841028411284122841328414284152841628417284182841928420284212842228423284242842528426284272842828429284302843128432284332843428435284362843728438284392844028441284422844328444284452844628447284482844928450284512845228453284542845528456284572845828459284602846128462284632846428465284662846728468284692847028471284722847328474284752847628477284782847928480284812848228483284842848528486284872848828489284902849128492284932849428495284962849728498284992850028501285022850328504285052850628507285082850928510285112851228513285142851528516285172851828519285202852128522285232852428525285262852728528285292853028531285322853328534285352853628537285382853928540285412854228543285442854528546285472854828549285502855128552285532855428555285562855728558285592856028561285622856328564285652856628567285682856928570285712857228573285742857528576285772857828579285802858128582285832858428585285862858728588285892859028591285922859328594285952859628597285982859928600286012860228603286042860528606286072860828609286102861128612286132861428615286162861728618286192862028621286222862328624286252862628627286282862928630286312863228633286342863528636286372863828639286402864128642286432864428645286462864728648286492865028651286522865328654286552865628657286582865928660286612866228663286642866528666286672866828669286702867128672286732867428675286762867728678286792868028681286822868328684286852868628687286882868928690286912869228693286942869528696286972869828699287002870128702287032870428705287062870728708287092871028711287122871328714287152871628717287182871928720287212872228723287242872528726287272872828729287302873128732287332873428735287362873728738287392874028741287422874328744287452874628747287482874928750287512875228753287542875528756287572875828759287602876128762287632876428765287662876728768287692877028771287722877328774287752877628777287782877928780287812878228783287842878528786287872878828789287902879128792287932879428795287962879728798287992880028801288022880328804288052880628807288082880928810288112881228813288142881528816288172881828819288202882128822288232882428825288262882728828288292883028831288322883328834288352883628837288382883928840288412884228843288442884528846288472884828849288502885128852288532885428855288562885728858288592886028861288622886328864288652886628867288682886928870288712887228873288742887528876288772887828879288802888128882288832888428885288862888728888288892889028891288922889328894288952889628897288982889928900289012890228903289042890528906289072890828909289102891128912289132891428915289162891728918289192892028921289222892328924289252892628927289282892928930289312893228933289342893528936289372893828939289402894128942289432894428945289462894728948289492895028951289522895328954289552895628957289582895928960289612896228963289642896528966289672896828969289702897128972289732897428975289762897728978289792898028981289822898328984289852898628987289882898928990289912899228993289942899528996289972899828999290002900129002290032900429005290062900729008290092901029011290122901329014290152901629017290182901929020290212902229023290242902529026290272902829029290302903129032290332903429035290362903729038290392904029041290422904329044290452904629047290482904929050290512905229053290542905529056290572905829059290602906129062290632906429065290662906729068290692907029071290722907329074290752907629077290782907929080290812908229083290842908529086290872908829089290902909129092290932909429095290962909729098290992910029101291022910329104291052910629107291082910929110291112911229113291142911529116291172911829119291202912129122291232912429125291262912729128291292913029131291322913329134291352913629137291382913929140291412914229143291442914529146291472914829149291502915129152291532915429155291562915729158291592916029161291622916329164291652916629167291682916929170291712917229173291742917529176291772917829179291802918129182291832918429185291862918729188291892919029191291922919329194291952919629197291982919929200292012920229203292042920529206292072920829209292102921129212292132921429215292162921729218292192922029221292222922329224292252922629227292282922929230292312923229233292342923529236292372923829239292402924129242292432924429245292462924729248292492925029251292522925329254292552925629257292582925929260292612926229263292642926529266292672926829269292702927129272292732927429275292762927729278292792928029281292822928329284292852928629287292882928929290292912929229293292942929529296292972929829299293002930129302293032930429305293062930729308293092931029311293122931329314293152931629317293182931929320293212932229323293242932529326293272932829329293302933129332293332933429335293362933729338293392934029341293422934329344293452934629347293482934929350293512935229353293542935529356293572935829359293602936129362293632936429365293662936729368293692937029371293722937329374293752937629377293782937929380293812938229383293842938529386293872938829389293902939129392293932939429395293962939729398293992940029401294022940329404294052940629407294082940929410294112941229413294142941529416294172941829419294202942129422294232942429425294262942729428294292943029431294322943329434294352943629437294382943929440294412944229443294442944529446294472944829449294502945129452294532945429455294562945729458294592946029461294622946329464294652946629467294682946929470294712947229473294742947529476294772947829479294802948129482294832948429485294862948729488294892949029491294922949329494294952949629497294982949929500295012950229503295042950529506295072950829509295102951129512295132951429515295162951729518295192952029521295222952329524295252952629527295282952929530295312953229533295342953529536295372953829539295402954129542295432954429545295462954729548295492955029551295522955329554295552955629557295582955929560295612956229563295642956529566295672956829569295702957129572295732957429575295762957729578295792958029581295822958329584295852958629587295882958929590295912959229593295942959529596295972959829599296002960129602296032960429605296062960729608296092961029611296122961329614296152961629617296182961929620296212962229623296242962529626296272962829629296302963129632296332963429635296362963729638296392964029641296422964329644296452964629647296482964929650296512965229653296542965529656296572965829659296602966129662296632966429665296662966729668296692967029671296722967329674296752967629677296782967929680296812968229683296842968529686296872968829689296902969129692296932969429695296962969729698296992970029701297022970329704297052970629707297082970929710297112971229713297142971529716297172971829719297202972129722297232972429725297262972729728297292973029731297322973329734297352973629737297382973929740297412974229743297442974529746297472974829749297502975129752297532975429755297562975729758297592976029761297622976329764297652976629767297682976929770297712977229773297742977529776297772977829779297802978129782297832978429785297862978729788297892979029791297922979329794297952979629797297982979929800298012980229803298042980529806298072980829809298102981129812298132981429815298162981729818298192982029821298222982329824298252982629827298282982929830298312983229833298342983529836298372983829839298402984129842298432984429845298462984729848298492985029851298522985329854298552985629857298582985929860298612986229863298642986529866298672986829869298702987129872298732987429875298762987729878298792988029881298822988329884298852988629887298882988929890298912989229893298942989529896298972989829899299002990129902299032990429905299062990729908299092991029911299122991329914299152991629917299182991929920299212992229923299242992529926299272992829929299302993129932299332993429935299362993729938299392994029941299422994329944299452994629947299482994929950299512995229953299542995529956299572995829959299602996129962299632996429965299662996729968299692997029971299722997329974299752997629977299782997929980299812998229983299842998529986299872998829989299902999129992299932999429995299962999729998299993000030001300023000330004300053000630007300083000930010300113001230013300143001530016300173001830019300203002130022300233002430025300263002730028300293003030031300323003330034300353003630037300383003930040300413004230043300443004530046300473004830049300503005130052300533005430055300563005730058300593006030061300623006330064300653006630067300683006930070300713007230073300743007530076300773007830079300803008130082300833008430085300863008730088300893009030091300923009330094300953009630097300983009930100301013010230103301043010530106301073010830109301103011130112301133011430115301163011730118301193012030121301223012330124301253012630127301283012930130301313013230133301343013530136301373013830139301403014130142301433014430145301463014730148301493015030151301523015330154301553015630157301583015930160301613016230163301643016530166301673016830169301703017130172301733017430175301763017730178301793018030181301823018330184301853018630187301883018930190301913019230193301943019530196301973019830199302003020130202302033020430205302063020730208302093021030211302123021330214302153021630217302183021930220302213022230223302243022530226302273022830229302303023130232302333023430235302363023730238302393024030241302423024330244302453024630247302483024930250302513025230253302543025530256302573025830259302603026130262302633026430265302663026730268302693027030271302723027330274302753027630277302783027930280302813028230283302843028530286302873028830289302903029130292302933029430295302963029730298302993030030301303023030330304303053030630307303083030930310303113031230313303143031530316303173031830319303203032130322303233032430325303263032730328303293033030331303323033330334303353033630337303383033930340303413034230343303443034530346303473034830349303503035130352303533035430355303563035730358303593036030361303623036330364303653036630367303683036930370303713037230373303743037530376303773037830379303803038130382303833038430385303863038730388303893039030391303923039330394303953039630397303983039930400304013040230403304043040530406304073040830409304103041130412304133041430415304163041730418304193042030421304223042330424304253042630427304283042930430304313043230433304343043530436304373043830439304403044130442304433044430445304463044730448304493045030451304523045330454304553045630457304583045930460304613046230463304643046530466304673046830469304703047130472304733047430475304763047730478304793048030481304823048330484304853048630487304883048930490304913049230493304943049530496304973049830499305003050130502305033050430505305063050730508305093051030511305123051330514305153051630517305183051930520305213052230523305243052530526305273052830529305303053130532305333053430535305363053730538305393054030541305423054330544305453054630547305483054930550305513055230553305543055530556305573055830559305603056130562305633056430565305663056730568305693057030571305723057330574305753057630577305783057930580305813058230583305843058530586305873058830589305903059130592305933059430595305963059730598305993060030601306023060330604306053060630607306083060930610306113061230613306143061530616306173061830619306203062130622306233062430625306263062730628306293063030631306323063330634306353063630637306383063930640306413064230643306443064530646306473064830649306503065130652306533065430655306563065730658306593066030661306623066330664306653066630667306683066930670306713067230673306743067530676306773067830679306803068130682306833068430685306863068730688306893069030691306923069330694306953069630697306983069930700307013070230703307043070530706307073070830709307103071130712307133071430715307163071730718307193072030721307223072330724307253072630727307283072930730307313073230733307343073530736307373073830739307403074130742307433074430745307463074730748307493075030751307523075330754307553075630757307583075930760307613076230763307643076530766307673076830769307703077130772307733077430775307763077730778307793078030781307823078330784307853078630787307883078930790307913079230793307943079530796307973079830799308003080130802308033080430805308063080730808308093081030811308123081330814308153081630817308183081930820308213082230823308243082530826308273082830829308303083130832308333083430835308363083730838308393084030841308423084330844308453084630847308483084930850308513085230853308543085530856308573085830859308603086130862308633086430865308663086730868308693087030871308723087330874308753087630877308783087930880308813088230883308843088530886308873088830889308903089130892308933089430895308963089730898308993090030901309023090330904309053090630907309083090930910309113091230913309143091530916309173091830919309203092130922309233092430925309263092730928309293093030931309323093330934309353093630937309383093930940309413094230943309443094530946309473094830949309503095130952309533095430955309563095730958309593096030961309623096330964309653096630967309683096930970309713097230973309743097530976309773097830979309803098130982309833098430985309863098730988309893099030991309923099330994309953099630997309983099931000310013100231003310043100531006310073100831009310103101131012310133101431015310163101731018310193102031021310223102331024310253102631027310283102931030310313103231033310343103531036310373103831039310403104131042310433104431045310463104731048310493105031051310523105331054310553105631057310583105931060310613106231063310643106531066310673106831069310703107131072310733107431075310763107731078310793108031081310823108331084310853108631087310883108931090310913109231093310943109531096310973109831099311003110131102311033110431105311063110731108311093111031111311123111331114311153111631117311183111931120311213112231123311243112531126311273112831129311303113131132311333113431135311363113731138311393114031141311423114331144311453114631147311483114931150311513115231153311543115531156311573115831159311603116131162311633116431165311663116731168311693117031171311723117331174311753117631177311783117931180311813118231183311843118531186311873118831189311903119131192311933119431195311963119731198311993120031201312023120331204312053120631207312083120931210312113121231213312143121531216312173121831219312203122131222312233122431225312263122731228312293123031231312323123331234312353123631237312383123931240312413124231243312443124531246312473124831249312503125131252312533125431255312563125731258312593126031261312623126331264312653126631267312683126931270312713127231273312743127531276312773127831279312803128131282312833128431285312863128731288312893129031291312923129331294312953129631297312983129931300313013130231303313043130531306313073130831309313103131131312313133131431315313163131731318313193132031321313223132331324313253132631327313283132931330313313133231333313343133531336313373133831339313403134131342313433134431345313463134731348313493135031351313523135331354313553135631357313583135931360313613136231363313643136531366313673136831369313703137131372313733137431375313763137731378313793138031381313823138331384313853138631387313883138931390313913139231393313943139531396313973139831399314003140131402314033140431405314063140731408314093141031411314123141331414314153141631417314183141931420314213142231423314243142531426314273142831429314303143131432314333143431435314363143731438314393144031441314423144331444314453144631447314483144931450314513145231453314543145531456314573145831459314603146131462314633146431465314663146731468314693147031471314723147331474314753147631477314783147931480314813148231483314843148531486314873148831489314903149131492314933149431495314963149731498314993150031501315023150331504315053150631507315083150931510315113151231513315143151531516315173151831519315203152131522315233152431525315263152731528315293153031531315323153331534315353153631537315383153931540315413154231543315443154531546315473154831549315503155131552315533155431555315563155731558315593156031561315623156331564315653156631567315683156931570315713157231573315743157531576315773157831579315803158131582315833158431585315863158731588315893159031591315923159331594315953159631597315983159931600316013160231603316043160531606316073160831609316103161131612316133161431615316163161731618316193162031621316223162331624316253162631627316283162931630316313163231633316343163531636316373163831639316403164131642316433164431645316463164731648316493165031651316523165331654316553165631657316583165931660316613166231663316643166531666316673166831669316703167131672316733167431675316763167731678316793168031681316823168331684316853168631687316883168931690316913169231693316943169531696316973169831699317003170131702317033170431705317063170731708317093171031711317123171331714317153171631717317183171931720317213172231723317243172531726317273172831729317303173131732317333173431735317363173731738317393174031741317423174331744317453174631747317483174931750317513175231753317543175531756317573175831759317603176131762317633176431765317663176731768317693177031771317723177331774317753177631777317783177931780317813178231783317843178531786317873178831789317903179131792317933179431795317963179731798317993180031801318023180331804318053180631807318083180931810318113181231813318143181531816318173181831819318203182131822318233182431825318263182731828318293183031831318323183331834318353183631837318383183931840318413184231843318443184531846318473184831849318503185131852318533185431855318563185731858318593186031861318623186331864318653186631867318683186931870318713187231873318743187531876318773187831879318803188131882318833188431885318863188731888318893189031891318923189331894318953189631897318983189931900319013190231903319043190531906319073190831909319103191131912319133191431915319163191731918319193192031921319223192331924319253192631927319283192931930319313193231933319343193531936319373193831939319403194131942319433194431945319463194731948319493195031951319523195331954319553195631957319583195931960319613196231963319643196531966319673196831969319703197131972319733197431975319763197731978319793198031981319823198331984319853198631987319883198931990319913199231993319943199531996319973199831999320003200132002320033200432005320063200732008320093201032011320123201332014320153201632017320183201932020320213202232023320243202532026320273202832029320303203132032320333203432035320363203732038320393204032041320423204332044320453204632047320483204932050320513205232053320543205532056320573205832059320603206132062320633206432065320663206732068320693207032071320723207332074320753207632077320783207932080320813208232083320843208532086320873208832089320903209132092320933209432095320963209732098320993210032101321023210332104321053210632107321083210932110321113211232113321143211532116321173211832119321203212132122321233212432125321263212732128321293213032131321323213332134321353213632137321383213932140321413214232143321443214532146321473214832149321503215132152321533215432155321563215732158321593216032161321623216332164321653216632167321683216932170321713217232173321743217532176321773217832179321803218132182321833218432185321863218732188321893219032191321923219332194321953219632197321983219932200322013220232203322043220532206322073220832209322103221132212322133221432215322163221732218322193222032221322223222332224322253222632227322283222932230322313223232233322343223532236322373223832239322403224132242322433224432245322463224732248322493225032251322523225332254322553225632257322583225932260322613226232263322643226532266322673226832269322703227132272322733227432275322763227732278322793228032281322823228332284322853228632287322883228932290322913229232293322943229532296322973229832299323003230132302323033230432305323063230732308323093231032311323123231332314323153231632317323183231932320323213232232323323243232532326323273232832329323303233132332323333233432335323363233732338323393234032341323423234332344323453234632347323483234932350323513235232353323543235532356323573235832359323603236132362323633236432365323663236732368323693237032371323723237332374323753237632377323783237932380323813238232383323843238532386323873238832389323903239132392323933239432395323963239732398323993240032401324023240332404324053240632407324083240932410324113241232413324143241532416324173241832419324203242132422324233242432425324263242732428324293243032431324323243332434324353243632437324383243932440324413244232443324443244532446324473244832449324503245132452324533245432455324563245732458324593246032461324623246332464324653246632467324683246932470324713247232473324743247532476324773247832479324803248132482324833248432485324863248732488324893249032491324923249332494324953249632497324983249932500325013250232503325043250532506325073250832509325103251132512325133251432515325163251732518325193252032521325223252332524325253252632527325283252932530325313253232533325343253532536325373253832539325403254132542325433254432545325463254732548325493255032551325523255332554325553255632557325583255932560325613256232563325643256532566325673256832569325703257132572325733257432575325763257732578325793258032581325823258332584325853258632587325883258932590325913259232593325943259532596325973259832599326003260132602326033260432605326063260732608326093261032611326123261332614326153261632617326183261932620326213262232623326243262532626326273262832629326303263132632326333263432635326363263732638326393264032641326423264332644326453264632647326483264932650326513265232653326543265532656326573265832659326603266132662326633266432665326663266732668326693267032671326723267332674326753267632677326783267932680326813268232683326843268532686326873268832689326903269132692326933269432695326963269732698326993270032701327023270332704327053270632707327083270932710327113271232713327143271532716327173271832719327203272132722327233272432725327263272732728327293273032731327323273332734327353273632737327383273932740327413274232743327443274532746327473274832749327503275132752327533275432755327563275732758327593276032761327623276332764327653276632767327683276932770327713277232773327743277532776327773277832779327803278132782327833278432785327863278732788327893279032791327923279332794327953279632797327983279932800328013280232803328043280532806328073280832809328103281132812328133281432815328163281732818328193282032821328223282332824328253282632827328283282932830328313283232833328343283532836328373283832839328403284132842328433284432845328463284732848328493285032851328523285332854328553285632857328583285932860328613286232863328643286532866328673286832869328703287132872328733287432875328763287732878328793288032881328823288332884328853288632887328883288932890328913289232893328943289532896328973289832899329003290132902329033290432905329063290732908329093291032911329123291332914329153291632917329183291932920329213292232923329243292532926329273292832929329303293132932329333293432935329363293732938329393294032941329423294332944329453294632947329483294932950329513295232953329543295532956329573295832959329603296132962329633296432965329663296732968329693297032971329723297332974329753297632977329783297932980329813298232983329843298532986329873298832989329903299132992329933299432995329963299732998329993300033001330023300333004330053300633007330083300933010330113301233013330143301533016330173301833019330203302133022330233302433025330263302733028330293303033031330323303333034330353303633037330383303933040330413304233043330443304533046330473304833049330503305133052330533305433055330563305733058330593306033061330623306333064330653306633067330683306933070330713307233073330743307533076330773307833079330803308133082330833308433085330863308733088330893309033091330923309333094330953309633097330983309933100331013310233103331043310533106331073310833109331103311133112331133311433115331163311733118331193312033121331223312333124331253312633127331283312933130331313313233133331343313533136331373313833139331403314133142331433314433145331463314733148331493315033151331523315333154331553315633157331583315933160331613316233163331643316533166331673316833169331703317133172331733317433175331763317733178331793318033181331823318333184331853318633187331883318933190331913319233193331943319533196331973319833199332003320133202332033320433205332063320733208332093321033211332123321333214332153321633217332183321933220332213322233223332243322533226332273322833229332303323133232332333323433235332363323733238332393324033241332423324333244332453324633247332483324933250332513325233253332543325533256332573325833259332603326133262332633326433265332663326733268332693327033271332723327333274332753327633277332783327933280332813328233283332843328533286332873328833289332903329133292332933329433295332963329733298332993330033301333023330333304333053330633307333083330933310333113331233313333143331533316333173331833319333203332133322333233332433325333263332733328333293333033331333323333333334333353333633337333383333933340333413334233343333443334533346333473334833349333503335133352333533335433355333563335733358333593336033361333623336333364333653336633367333683336933370333713337233373333743337533376333773337833379333803338133382333833338433385333863338733388333893339033391333923339333394333953339633397333983339933400334013340233403334043340533406334073340833409334103341133412334133341433415334163341733418334193342033421334223342333424334253342633427334283342933430334313343233433334343343533436334373343833439334403344133442334433344433445334463344733448334493345033451334523345333454334553345633457334583345933460334613346233463334643346533466334673346833469334703347133472334733347433475334763347733478334793348033481334823348333484334853348633487334883348933490334913349233493334943349533496334973349833499335003350133502335033350433505335063350733508335093351033511335123351333514335153351633517335183351933520335213352233523335243352533526335273352833529335303353133532335333353433535335363353733538335393354033541335423354333544335453354633547335483354933550335513355233553335543355533556335573355833559335603356133562335633356433565335663356733568335693357033571335723357333574335753357633577335783357933580335813358233583335843358533586335873358833589335903359133592335933359433595335963359733598335993360033601336023360333604336053360633607336083360933610336113361233613336143361533616336173361833619336203362133622336233362433625336263362733628336293363033631336323363333634336353363633637336383363933640336413364233643336443364533646336473364833649336503365133652336533365433655336563365733658336593366033661336623366333664336653366633667336683366933670336713367233673336743367533676336773367833679336803368133682336833368433685336863368733688336893369033691336923369333694336953369633697336983369933700337013370233703337043370533706337073370833709337103371133712337133371433715337163371733718337193372033721337223372333724337253372633727337283372933730337313373233733337343373533736337373373833739337403374133742337433374433745337463374733748337493375033751337523375333754337553375633757337583375933760337613376233763337643376533766337673376833769337703377133772337733377433775337763377733778337793378033781337823378333784337853378633787337883378933790337913379233793337943379533796337973379833799338003380133802338033380433805338063380733808338093381033811338123381333814338153381633817338183381933820338213382233823338243382533826338273382833829338303383133832338333383433835338363383733838338393384033841338423384333844338453384633847338483384933850338513385233853338543385533856338573385833859338603386133862338633386433865338663386733868338693387033871338723387333874338753387633877338783387933880338813388233883338843388533886338873388833889338903389133892338933389433895338963389733898338993390033901339023390333904339053390633907339083390933910339113391233913339143391533916339173391833919339203392133922339233392433925339263392733928339293393033931339323393333934339353393633937339383393933940339413394233943339443394533946339473394833949339503395133952339533395433955339563395733958339593396033961339623396333964339653396633967339683396933970339713397233973339743397533976339773397833979339803398133982339833398433985339863398733988339893399033991339923399333994339953399633997339983399934000340013400234003340043400534006340073400834009340103401134012340133401434015340163401734018340193402034021340223402334024340253402634027340283402934030340313403234033340343403534036340373403834039340403404134042340433404434045340463404734048340493405034051340523405334054340553405634057340583405934060340613406234063340643406534066340673406834069340703407134072340733407434075340763407734078340793408034081340823408334084340853408634087340883408934090340913409234093340943409534096340973409834099341003410134102341033410434105341063410734108341093411034111341123411334114341153411634117341183411934120341213412234123341243412534126341273412834129341303413134132341333413434135341363413734138341393414034141341423414334144341453414634147341483414934150341513415234153341543415534156341573415834159341603416134162341633416434165341663416734168341693417034171341723417334174341753417634177341783417934180341813418234183341843418534186341873418834189341903419134192341933419434195341963419734198341993420034201342023420334204342053420634207342083420934210342113421234213342143421534216342173421834219342203422134222342233422434225342263422734228342293423034231342323423334234342353423634237342383423934240342413424234243342443424534246342473424834249342503425134252342533425434255342563425734258342593426034261342623426334264342653426634267342683426934270342713427234273342743427534276342773427834279342803428134282342833428434285342863428734288342893429034291342923429334294342953429634297342983429934300343013430234303343043430534306343073430834309343103431134312343133431434315343163431734318343193432034321343223432334324343253432634327343283432934330343313433234333343343433534336343373433834339343403434134342343433434434345343463434734348343493435034351343523435334354343553435634357343583435934360343613436234363343643436534366343673436834369343703437134372343733437434375343763437734378343793438034381343823438334384343853438634387343883438934390343913439234393343943439534396343973439834399344003440134402344033440434405344063440734408344093441034411344123441334414344153441634417344183441934420344213442234423344243442534426344273442834429344303443134432344333443434435344363443734438344393444034441344423444334444344453444634447344483444934450344513445234453344543445534456344573445834459344603446134462344633446434465344663446734468344693447034471344723447334474344753447634477344783447934480344813448234483344843448534486344873448834489344903449134492344933449434495344963449734498344993450034501345023450334504345053450634507345083450934510345113451234513345143451534516345173451834519345203452134522345233452434525345263452734528345293453034531345323453334534345353453634537345383453934540345413454234543345443454534546345473454834549345503455134552345533455434555345563455734558345593456034561345623456334564345653456634567345683456934570345713457234573345743457534576345773457834579345803458134582345833458434585345863458734588345893459034591345923459334594345953459634597345983459934600346013460234603346043460534606346073460834609346103461134612346133461434615346163461734618346193462034621346223462334624346253462634627346283462934630346313463234633346343463534636346373463834639346403464134642346433464434645346463464734648346493465034651346523465334654346553465634657346583465934660346613466234663346643466534666346673466834669346703467134672346733467434675346763467734678346793468034681346823468334684346853468634687346883468934690346913469234693346943469534696346973469834699347003470134702347033470434705347063470734708347093471034711347123471334714347153471634717347183471934720347213472234723347243472534726347273472834729347303473134732347333473434735347363473734738347393474034741347423474334744347453474634747347483474934750347513475234753347543475534756347573475834759347603476134762347633476434765347663476734768347693477034771347723477334774347753477634777347783477934780347813478234783347843478534786347873478834789347903479134792347933479434795347963479734798347993480034801348023480334804348053480634807348083480934810348113481234813348143481534816348173481834819348203482134822348233482434825348263482734828348293483034831348323483334834348353483634837348383483934840348413484234843348443484534846348473484834849348503485134852348533485434855348563485734858348593486034861348623486334864348653486634867348683486934870348713487234873348743487534876348773487834879348803488134882348833488434885348863488734888348893489034891348923489334894348953489634897348983489934900349013490234903349043490534906349073490834909349103491134912349133491434915349163491734918349193492034921349223492334924349253492634927349283492934930349313493234933349343493534936349373493834939349403494134942349433494434945349463494734948349493495034951349523495334954349553495634957349583495934960349613496234963349643496534966349673496834969349703497134972349733497434975349763497734978349793498034981349823498334984349853498634987349883498934990349913499234993349943499534996349973499834999350003500135002350033500435005350063500735008350093501035011350123501335014350153501635017350183501935020350213502235023350243502535026350273502835029350303503135032350333503435035350363503735038350393504035041350423504335044350453504635047350483504935050350513505235053350543505535056350573505835059350603506135062350633506435065350663506735068350693507035071350723507335074350753507635077350783507935080350813508235083350843508535086350873508835089350903509135092350933509435095350963509735098350993510035101351023510335104351053510635107351083510935110351113511235113351143511535116351173511835119351203512135122351233512435125351263512735128351293513035131351323513335134351353513635137351383513935140351413514235143351443514535146351473514835149351503515135152351533515435155351563515735158351593516035161351623516335164351653516635167351683516935170351713517235173351743517535176351773517835179351803518135182351833518435185351863518735188351893519035191351923519335194351953519635197351983519935200352013520235203352043520535206352073520835209352103521135212352133521435215352163521735218352193522035221352223522335224352253522635227352283522935230352313523235233352343523535236352373523835239352403524135242352433524435245352463524735248352493525035251352523525335254352553525635257352583525935260352613526235263352643526535266352673526835269352703527135272352733527435275352763527735278352793528035281352823528335284352853528635287352883528935290352913529235293352943529535296352973529835299353003530135302353033530435305353063530735308353093531035311353123531335314353153531635317353183531935320353213532235323353243532535326353273532835329353303533135332353333533435335353363533735338353393534035341353423534335344353453534635347353483534935350353513535235353353543535535356353573535835359353603536135362353633536435365353663536735368353693537035371353723537335374353753537635377353783537935380353813538235383353843538535386353873538835389353903539135392353933539435395353963539735398353993540035401354023540335404354053540635407354083540935410354113541235413354143541535416354173541835419354203542135422354233542435425354263542735428354293543035431354323543335434354353543635437354383543935440354413544235443354443544535446354473544835449354503545135452354533545435455354563545735458354593546035461354623546335464354653546635467354683546935470354713547235473354743547535476354773547835479354803548135482354833548435485354863548735488354893549035491354923549335494354953549635497354983549935500355013550235503355043550535506355073550835509355103551135512355133551435515355163551735518355193552035521355223552335524355253552635527355283552935530355313553235533355343553535536355373553835539355403554135542355433554435545355463554735548355493555035551355523555335554355553555635557355583555935560355613556235563355643556535566355673556835569355703557135572355733557435575355763557735578355793558035581355823558335584355853558635587355883558935590355913559235593355943559535596355973559835599356003560135602356033560435605356063560735608356093561035611356123561335614356153561635617356183561935620356213562235623356243562535626356273562835629356303563135632356333563435635356363563735638356393564035641356423564335644356453564635647356483564935650356513565235653356543565535656356573565835659356603566135662356633566435665356663566735668356693567035671356723567335674356753567635677356783567935680356813568235683356843568535686356873568835689356903569135692356933569435695356963569735698356993570035701357023570335704357053570635707357083570935710357113571235713357143571535716357173571835719357203572135722357233572435725357263572735728357293573035731357323573335734357353573635737357383573935740357413574235743357443574535746357473574835749357503575135752357533575435755357563575735758357593576035761357623576335764357653576635767357683576935770357713577235773357743577535776357773577835779357803578135782357833578435785357863578735788357893579035791357923579335794357953579635797357983579935800358013580235803358043580535806358073580835809358103581135812358133581435815358163581735818358193582035821358223582335824358253582635827358283582935830358313583235833358343583535836358373583835839358403584135842358433584435845358463584735848358493585035851358523585335854358553585635857358583585935860358613586235863358643586535866358673586835869358703587135872358733587435875358763587735878358793588035881358823588335884358853588635887358883588935890358913589235893358943589535896358973589835899359003590135902359033590435905359063590735908359093591035911359123591335914359153591635917359183591935920359213592235923359243592535926359273592835929359303593135932359333593435935359363593735938359393594035941359423594335944359453594635947359483594935950359513595235953359543595535956359573595835959359603596135962359633596435965359663596735968359693597035971359723597335974359753597635977359783597935980359813598235983359843598535986359873598835989359903599135992359933599435995359963599735998359993600036001360023600336004360053600636007360083600936010360113601236013360143601536016360173601836019360203602136022360233602436025360263602736028360293603036031360323603336034360353603636037360383603936040360413604236043360443604536046360473604836049360503605136052360533605436055360563605736058360593606036061360623606336064360653606636067360683606936070360713607236073360743607536076360773607836079360803608136082360833608436085360863608736088360893609036091360923609336094360953609636097360983609936100361013610236103361043610536106361073610836109361103611136112361133611436115361163611736118361193612036121361223612336124361253612636127361283612936130361313613236133361343613536136361373613836139361403614136142361433614436145361463614736148361493615036151361523615336154361553615636157361583615936160361613616236163361643616536166361673616836169361703617136172361733617436175361763617736178361793618036181361823618336184361853618636187361883618936190361913619236193361943619536196361973619836199362003620136202362033620436205362063620736208362093621036211362123621336214362153621636217362183621936220362213622236223362243622536226362273622836229362303623136232362333623436235362363623736238362393624036241362423624336244362453624636247362483624936250362513625236253362543625536256362573625836259362603626136262362633626436265362663626736268362693627036271362723627336274362753627636277362783627936280362813628236283362843628536286362873628836289362903629136292362933629436295362963629736298362993630036301363023630336304363053630636307363083630936310363113631236313363143631536316363173631836319363203632136322363233632436325363263632736328363293633036331363323633336334363353633636337363383633936340363413634236343363443634536346363473634836349363503635136352363533635436355363563635736358363593636036361363623636336364363653636636367363683636936370363713637236373363743637536376363773637836379363803638136382363833638436385363863638736388363893639036391363923639336394363953639636397363983639936400364013640236403364043640536406364073640836409364103641136412364133641436415364163641736418364193642036421364223642336424364253642636427364283642936430364313643236433364343643536436364373643836439364403644136442364433644436445364463644736448364493645036451364523645336454364553645636457364583645936460364613646236463364643646536466364673646836469364703647136472364733647436475364763647736478364793648036481364823648336484364853648636487364883648936490364913649236493364943649536496364973649836499365003650136502365033650436505365063650736508365093651036511365123651336514365153651636517365183651936520365213652236523365243652536526365273652836529365303653136532365333653436535365363653736538365393654036541365423654336544365453654636547365483654936550365513655236553365543655536556365573655836559365603656136562365633656436565365663656736568365693657036571365723657336574365753657636577365783657936580365813658236583365843658536586365873658836589365903659136592365933659436595365963659736598365993660036601366023660336604366053660636607366083660936610366113661236613366143661536616366173661836619366203662136622366233662436625366263662736628366293663036631366323663336634366353663636637366383663936640366413664236643366443664536646366473664836649366503665136652366533665436655366563665736658366593666036661366623666336664366653666636667366683666936670366713667236673366743667536676366773667836679366803668136682366833668436685366863668736688366893669036691366923669336694366953669636697366983669936700367013670236703367043670536706367073670836709367103671136712367133671436715367163671736718367193672036721367223672336724367253672636727367283672936730367313673236733367343673536736367373673836739367403674136742367433674436745367463674736748367493675036751367523675336754367553675636757367583675936760367613676236763367643676536766367673676836769367703677136772367733677436775367763677736778367793678036781367823678336784367853678636787367883678936790367913679236793367943679536796367973679836799368003680136802368033680436805368063680736808368093681036811368123681336814368153681636817368183681936820368213682236823368243682536826368273682836829368303683136832368333683436835368363683736838368393684036841368423684336844368453684636847368483684936850368513685236853368543685536856368573685836859368603686136862368633686436865368663686736868368693687036871368723687336874368753687636877368783687936880368813688236883368843688536886368873688836889368903689136892368933689436895368963689736898368993690036901369023690336904369053690636907369083690936910369113691236913369143691536916369173691836919369203692136922369233692436925369263692736928369293693036931369323693336934369353693636937369383693936940369413694236943369443694536946369473694836949369503695136952369533695436955369563695736958369593696036961369623696336964369653696636967369683696936970369713697236973369743697536976369773697836979369803698136982369833698436985369863698736988369893699036991369923699336994369953699636997369983699937000370013700237003370043700537006370073700837009370103701137012370133701437015370163701737018370193702037021370223702337024370253702637027370283702937030370313703237033370343703537036370373703837039370403704137042370433704437045370463704737048370493705037051370523705337054370553705637057370583705937060370613706237063370643706537066370673706837069370703707137072370733707437075370763707737078370793708037081370823708337084370853708637087370883708937090370913709237093370943709537096370973709837099371003710137102371033710437105371063710737108371093711037111371123711337114371153711637117371183711937120371213712237123371243712537126371273712837129371303713137132371333713437135371363713737138371393714037141371423714337144371453714637147371483714937150371513715237153371543715537156371573715837159371603716137162371633716437165371663716737168371693717037171371723717337174371753717637177371783717937180371813718237183371843718537186371873718837189371903719137192371933719437195371963719737198371993720037201372023720337204372053720637207372083720937210372113721237213372143721537216372173721837219372203722137222372233722437225372263722737228372293723037231372323723337234372353723637237372383723937240372413724237243372443724537246372473724837249372503725137252372533725437255372563725737258372593726037261372623726337264372653726637267372683726937270372713727237273372743727537276372773727837279372803728137282372833728437285372863728737288372893729037291372923729337294372953729637297372983729937300373013730237303373043730537306373073730837309373103731137312373133731437315373163731737318373193732037321373223732337324373253732637327373283732937330373313733237333373343733537336373373733837339373403734137342373433734437345373463734737348373493735037351373523735337354373553735637357373583735937360373613736237363373643736537366373673736837369373703737137372373733737437375373763737737378373793738037381373823738337384373853738637387373883738937390373913739237393373943739537396373973739837399374003740137402374033740437405374063740737408374093741037411374123741337414374153741637417374183741937420374213742237423374243742537426374273742837429374303743137432374333743437435374363743737438374393744037441374423744337444374453744637447374483744937450374513745237453374543745537456374573745837459374603746137462374633746437465374663746737468374693747037471374723747337474374753747637477374783747937480374813748237483374843748537486374873748837489374903749137492374933749437495374963749737498374993750037501375023750337504375053750637507375083750937510375113751237513375143751537516375173751837519375203752137522375233752437525375263752737528375293753037531375323753337534375353753637537375383753937540375413754237543375443754537546375473754837549375503755137552375533755437555375563755737558375593756037561375623756337564375653756637567375683756937570375713757237573375743757537576375773757837579375803758137582375833758437585375863758737588375893759037591375923759337594375953759637597375983759937600376013760237603376043760537606376073760837609376103761137612376133761437615376163761737618376193762037621376223762337624376253762637627376283762937630376313763237633376343763537636376373763837639376403764137642376433764437645376463764737648376493765037651376523765337654376553765637657376583765937660376613766237663376643766537666376673766837669376703767137672376733767437675376763767737678376793768037681376823768337684376853768637687376883768937690376913769237693376943769537696376973769837699377003770137702377033770437705377063770737708377093771037711377123771337714377153771637717377183771937720377213772237723377243772537726377273772837729377303773137732377333773437735377363773737738377393774037741377423774337744377453774637747377483774937750377513775237753377543775537756377573775837759377603776137762377633776437765377663776737768377693777037771377723777337774377753777637777377783777937780377813778237783377843778537786377873778837789377903779137792377933779437795377963779737798377993780037801378023780337804378053780637807378083780937810378113781237813378143781537816378173781837819378203782137822378233782437825378263782737828378293783037831378323783337834378353783637837378383783937840378413784237843378443784537846378473784837849378503785137852378533785437855378563785737858378593786037861378623786337864378653786637867378683786937870378713787237873378743787537876378773787837879378803788137882378833788437885378863788737888378893789037891378923789337894378953789637897378983789937900379013790237903379043790537906379073790837909379103791137912379133791437915379163791737918379193792037921379223792337924379253792637927379283792937930379313793237933379343793537936379373793837939379403794137942379433794437945379463794737948379493795037951379523795337954379553795637957379583795937960379613796237963379643796537966379673796837969379703797137972379733797437975379763797737978379793798037981379823798337984379853798637987379883798937990379913799237993379943799537996379973799837999380003800138002380033800438005380063800738008380093801038011380123801338014380153801638017380183801938020380213802238023380243802538026380273802838029380303803138032380333803438035380363803738038380393804038041380423804338044380453804638047380483804938050380513805238053380543805538056380573805838059380603806138062380633806438065380663806738068380693807038071380723807338074380753807638077380783807938080380813808238083380843808538086380873808838089380903809138092380933809438095380963809738098380993810038101381023810338104381053810638107381083810938110381113811238113381143811538116381173811838119381203812138122381233812438125381263812738128381293813038131381323813338134381353813638137381383813938140381413814238143381443814538146381473814838149381503815138152381533815438155381563815738158381593816038161381623816338164381653816638167381683816938170381713817238173381743817538176381773817838179381803818138182381833818438185381863818738188381893819038191381923819338194381953819638197381983819938200382013820238203382043820538206382073820838209382103821138212382133821438215382163821738218382193822038221382223822338224382253822638227382283822938230382313823238233382343823538236382373823838239382403824138242382433824438245382463824738248382493825038251382523825338254382553825638257382583825938260382613826238263382643826538266382673826838269382703827138272382733827438275382763827738278382793828038281382823828338284382853828638287382883828938290382913829238293382943829538296382973829838299383003830138302383033830438305383063830738308383093831038311383123831338314383153831638317383183831938320383213832238323383243832538326383273832838329383303833138332383333833438335383363833738338383393834038341383423834338344383453834638347383483834938350383513835238353383543835538356383573835838359383603836138362383633836438365383663836738368383693837038371383723837338374383753837638377383783837938380383813838238383383843838538386383873838838389383903839138392383933839438395383963839738398383993840038401384023840338404384053840638407384083840938410384113841238413384143841538416384173841838419384203842138422384233842438425384263842738428384293843038431384323843338434384353843638437384383843938440384413844238443384443844538446384473844838449384503845138452384533845438455384563845738458384593846038461384623846338464384653846638467384683846938470384713847238473384743847538476384773847838479384803848138482384833848438485384863848738488384893849038491384923849338494384953849638497384983849938500385013850238503385043850538506385073850838509385103851138512385133851438515385163851738518385193852038521385223852338524385253852638527385283852938530385313853238533385343853538536385373853838539385403854138542385433854438545385463854738548385493855038551385523855338554385553855638557385583855938560385613856238563385643856538566385673856838569385703857138572385733857438575385763857738578385793858038581385823858338584385853858638587385883858938590385913859238593385943859538596385973859838599386003860138602386033860438605386063860738608386093861038611386123861338614386153861638617386183861938620386213862238623386243862538626386273862838629386303863138632386333863438635386363863738638386393864038641386423864338644386453864638647386483864938650386513865238653386543865538656386573865838659386603866138662386633866438665386663866738668386693867038671386723867338674386753867638677386783867938680386813868238683386843868538686386873868838689386903869138692386933869438695386963869738698386993870038701387023870338704387053870638707387083870938710387113871238713387143871538716387173871838719387203872138722387233872438725387263872738728387293873038731387323873338734387353873638737387383873938740387413874238743387443874538746387473874838749387503875138752387533875438755387563875738758387593876038761387623876338764387653876638767387683876938770387713877238773387743877538776387773877838779387803878138782387833878438785387863878738788387893879038791387923879338794387953879638797387983879938800388013880238803388043880538806388073880838809388103881138812388133881438815388163881738818388193882038821388223882338824388253882638827388283882938830388313883238833388343883538836388373883838839388403884138842388433884438845388463884738848388493885038851388523885338854388553885638857388583885938860388613886238863388643886538866388673886838869388703887138872388733887438875388763887738878388793888038881388823888338884388853888638887388883888938890388913889238893388943889538896388973889838899389003890138902389033890438905389063890738908389093891038911389123891338914389153891638917389183891938920389213892238923389243892538926389273892838929389303893138932389333893438935389363893738938389393894038941389423894338944389453894638947389483894938950389513895238953389543895538956389573895838959389603896138962389633896438965389663896738968389693897038971389723897338974389753897638977389783897938980389813898238983389843898538986389873898838989389903899138992389933899438995389963899738998389993900039001390023900339004390053900639007390083900939010390113901239013390143901539016390173901839019390203902139022390233902439025390263902739028390293903039031390323903339034390353903639037390383903939040390413904239043390443904539046390473904839049390503905139052390533905439055390563905739058390593906039061390623906339064390653906639067390683906939070390713907239073390743907539076390773907839079390803908139082390833908439085390863908739088390893909039091390923909339094390953909639097390983909939100391013910239103391043910539106391073910839109391103911139112391133911439115391163911739118391193912039121391223912339124391253912639127391283912939130391313913239133391343913539136391373913839139391403914139142391433914439145391463914739148391493915039151391523915339154391553915639157391583915939160391613916239163391643916539166391673916839169391703917139172391733917439175391763917739178391793918039181391823918339184391853918639187391883918939190391913919239193391943919539196391973919839199392003920139202392033920439205392063920739208392093921039211392123921339214392153921639217392183921939220392213922239223392243922539226392273922839229392303923139232392333923439235392363923739238392393924039241392423924339244392453924639247392483924939250392513925239253392543925539256392573925839259392603926139262392633926439265392663926739268392693927039271392723927339274392753927639277392783927939280392813928239283392843928539286392873928839289392903929139292392933929439295392963929739298392993930039301393023930339304393053930639307393083930939310393113931239313393143931539316393173931839319393203932139322393233932439325393263932739328393293933039331393323933339334393353933639337393383933939340393413934239343393443934539346393473934839349393503935139352393533935439355393563935739358393593936039361393623936339364393653936639367393683936939370393713937239373393743937539376393773937839379393803938139382393833938439385393863938739388393893939039391393923939339394393953939639397393983939939400394013940239403394043940539406394073940839409394103941139412394133941439415394163941739418394193942039421394223942339424394253942639427394283942939430394313943239433394343943539436394373943839439394403944139442394433944439445394463944739448394493945039451394523945339454394553945639457394583945939460394613946239463394643946539466394673946839469394703947139472394733947439475394763947739478394793948039481394823948339484394853948639487394883948939490394913949239493394943949539496394973949839499395003950139502395033950439505395063950739508395093951039511395123951339514395153951639517395183951939520395213952239523395243952539526395273952839529395303953139532395333953439535395363953739538395393954039541395423954339544395453954639547395483954939550395513955239553395543955539556395573955839559395603956139562395633956439565395663956739568395693957039571395723957339574395753957639577395783957939580395813958239583395843958539586395873958839589395903959139592395933959439595395963959739598395993960039601396023960339604396053960639607396083960939610396113961239613396143961539616396173961839619396203962139622396233962439625396263962739628396293963039631396323963339634396353963639637396383963939640396413964239643396443964539646396473964839649396503965139652396533965439655396563965739658396593966039661396623966339664396653966639667396683966939670396713967239673396743967539676396773967839679396803968139682396833968439685396863968739688396893969039691396923969339694396953969639697396983969939700397013970239703397043970539706397073970839709397103971139712397133971439715397163971739718397193972039721397223972339724397253972639727397283972939730397313973239733397343973539736397373973839739397403974139742397433974439745397463974739748397493975039751397523975339754397553975639757397583975939760397613976239763397643976539766397673976839769397703977139772397733977439775397763977739778397793978039781397823978339784397853978639787397883978939790397913979239793397943979539796397973979839799398003980139802398033980439805398063980739808398093981039811398123981339814398153981639817398183981939820398213982239823398243982539826398273982839829398303983139832398333983439835398363983739838398393984039841398423984339844398453984639847398483984939850398513985239853398543985539856398573985839859398603986139862398633986439865398663986739868398693987039871398723987339874398753987639877398783987939880398813988239883398843988539886398873988839889398903989139892398933989439895398963989739898398993990039901399023990339904399053990639907399083990939910399113991239913399143991539916399173991839919399203992139922399233992439925399263992739928399293993039931399323993339934399353993639937399383993939940399413994239943399443994539946399473994839949399503995139952399533995439955399563995739958399593996039961399623996339964399653996639967399683996939970399713997239973399743997539976399773997839979399803998139982399833998439985399863998739988399893999039991399923999339994399953999639997399983999940000400014000240003400044000540006400074000840009400104001140012400134001440015400164001740018400194002040021400224002340024400254002640027400284002940030400314003240033400344003540036400374003840039400404004140042400434004440045400464004740048400494005040051400524005340054400554005640057400584005940060400614006240063400644006540066400674006840069400704007140072400734007440075400764007740078400794008040081400824008340084400854008640087400884008940090400914009240093400944009540096400974009840099401004010140102401034010440105401064010740108401094011040111401124011340114401154011640117401184011940120401214012240123401244012540126401274012840129401304013140132401334013440135401364013740138401394014040141401424014340144401454014640147401484014940150401514015240153401544015540156401574015840159401604016140162401634016440165401664016740168401694017040171401724017340174401754017640177401784017940180401814018240183401844018540186401874018840189401904019140192401934019440195401964019740198401994020040201402024020340204402054020640207402084020940210402114021240213402144021540216402174021840219402204022140222402234022440225402264022740228402294023040231402324023340234402354023640237402384023940240402414024240243402444024540246402474024840249402504025140252402534025440255402564025740258402594026040261402624026340264402654026640267402684026940270402714027240273402744027540276402774027840279402804028140282402834028440285402864028740288402894029040291402924029340294402954029640297402984029940300403014030240303403044030540306403074030840309403104031140312403134031440315403164031740318403194032040321403224032340324403254032640327403284032940330403314033240333403344033540336403374033840339403404034140342403434034440345403464034740348403494035040351403524035340354403554035640357403584035940360403614036240363403644036540366403674036840369403704037140372403734037440375403764037740378403794038040381403824038340384403854038640387403884038940390403914039240393403944039540396403974039840399404004040140402404034040440405404064040740408404094041040411404124041340414404154041640417404184041940420404214042240423404244042540426404274042840429404304043140432404334043440435404364043740438404394044040441404424044340444404454044640447404484044940450404514045240453404544045540456404574045840459404604046140462404634046440465404664046740468404694047040471404724047340474404754047640477404784047940480404814048240483404844048540486404874048840489404904049140492404934049440495404964049740498404994050040501405024050340504405054050640507405084050940510405114051240513405144051540516405174051840519405204052140522405234052440525405264052740528405294053040531405324053340534405354053640537405384053940540405414054240543405444054540546405474054840549405504055140552405534055440555405564055740558405594056040561405624056340564405654056640567405684056940570405714057240573405744057540576405774057840579405804058140582405834058440585405864058740588405894059040591405924059340594405954059640597405984059940600406014060240603406044060540606406074060840609406104061140612406134061440615406164061740618406194062040621406224062340624406254062640627406284062940630406314063240633406344063540636406374063840639406404064140642406434064440645406464064740648406494065040651406524065340654406554065640657406584065940660406614066240663406644066540666406674066840669406704067140672406734067440675406764067740678406794068040681406824068340684406854068640687406884068940690406914069240693406944069540696406974069840699407004070140702407034070440705407064070740708407094071040711407124071340714407154071640717407184071940720407214072240723407244072540726407274072840729407304073140732407334073440735407364073740738407394074040741407424074340744407454074640747407484074940750407514075240753407544075540756407574075840759407604076140762407634076440765407664076740768407694077040771407724077340774407754077640777407784077940780407814078240783407844078540786407874078840789407904079140792407934079440795407964079740798407994080040801408024080340804408054080640807408084080940810408114081240813408144081540816408174081840819408204082140822408234082440825408264082740828408294083040831408324083340834408354083640837408384083940840408414084240843408444084540846408474084840849408504085140852408534085440855408564085740858408594086040861408624086340864408654086640867408684086940870408714087240873408744087540876408774087840879408804088140882408834088440885408864088740888408894089040891408924089340894408954089640897408984089940900409014090240903409044090540906409074090840909409104091140912409134091440915409164091740918409194092040921409224092340924409254092640927409284092940930409314093240933409344093540936409374093840939409404094140942409434094440945409464094740948409494095040951409524095340954409554095640957409584095940960409614096240963409644096540966409674096840969409704097140972409734097440975409764097740978409794098040981409824098340984409854098640987409884098940990409914099240993409944099540996409974099840999410004100141002410034100441005410064100741008410094101041011410124101341014410154101641017410184101941020410214102241023410244102541026410274102841029410304103141032410334103441035410364103741038410394104041041410424104341044410454104641047410484104941050410514105241053410544105541056410574105841059410604106141062410634106441065410664106741068410694107041071410724107341074410754107641077410784107941080410814108241083410844108541086410874108841089410904109141092410934109441095410964109741098410994110041101411024110341104411054110641107411084110941110411114111241113411144111541116411174111841119411204112141122411234112441125411264112741128411294113041131411324113341134411354113641137411384113941140411414114241143411444114541146411474114841149411504115141152411534115441155411564115741158411594116041161411624116341164411654116641167411684116941170411714117241173411744117541176411774117841179411804118141182411834118441185411864118741188411894119041191411924119341194411954119641197411984119941200412014120241203412044120541206412074120841209412104121141212412134121441215412164121741218412194122041221412224122341224412254122641227412284122941230412314123241233412344123541236412374123841239412404124141242412434124441245412464124741248412494125041251412524125341254412554125641257412584125941260412614126241263412644126541266412674126841269412704127141272412734127441275412764127741278412794128041281412824128341284412854128641287412884128941290412914129241293412944129541296412974129841299413004130141302413034130441305413064130741308413094131041311413124131341314413154131641317413184131941320413214132241323413244132541326413274132841329413304133141332413334133441335413364133741338413394134041341413424134341344413454134641347413484134941350413514135241353413544135541356413574135841359413604136141362413634136441365413664136741368413694137041371413724137341374413754137641377413784137941380413814138241383413844138541386413874138841389413904139141392413934139441395413964139741398413994140041401414024140341404414054140641407414084140941410414114141241413414144141541416414174141841419414204142141422414234142441425414264142741428414294143041431414324143341434414354143641437414384143941440414414144241443414444144541446414474144841449414504145141452414534145441455414564145741458414594146041461414624146341464414654146641467414684146941470414714147241473414744147541476414774147841479414804148141482414834148441485414864148741488414894149041491414924149341494414954149641497414984149941500415014150241503415044150541506415074150841509415104151141512415134151441515415164151741518415194152041521415224152341524415254152641527415284152941530415314153241533415344153541536415374153841539415404154141542415434154441545415464154741548415494155041551415524155341554415554155641557415584155941560415614156241563415644156541566415674156841569415704157141572415734157441575415764157741578415794158041581415824158341584415854158641587415884158941590415914159241593415944159541596415974159841599416004160141602416034160441605416064160741608416094161041611416124161341614416154161641617416184161941620416214162241623416244162541626416274162841629416304163141632416334163441635416364163741638416394164041641416424164341644416454164641647416484164941650416514165241653416544165541656416574165841659416604166141662416634166441665416664166741668416694167041671416724167341674416754167641677416784167941680416814168241683416844168541686416874168841689416904169141692416934169441695416964169741698416994170041701417024170341704417054170641707417084170941710417114171241713417144171541716417174171841719417204172141722417234172441725417264172741728417294173041731417324173341734417354173641737417384173941740417414174241743417444174541746417474174841749417504175141752417534175441755417564175741758417594176041761417624176341764417654176641767417684176941770417714177241773417744177541776417774177841779417804178141782417834178441785417864178741788417894179041791417924179341794417954179641797417984179941800418014180241803418044180541806418074180841809418104181141812418134181441815418164181741818418194182041821418224182341824418254182641827418284182941830418314183241833418344183541836418374183841839418404184141842418434184441845418464184741848418494185041851418524185341854418554185641857418584185941860418614186241863418644186541866418674186841869418704187141872418734187441875418764187741878418794188041881418824188341884418854188641887418884188941890418914189241893418944189541896418974189841899419004190141902419034190441905419064190741908419094191041911419124191341914419154191641917419184191941920419214192241923419244192541926419274192841929419304193141932419334193441935419364193741938419394194041941419424194341944419454194641947419484194941950419514195241953419544195541956419574195841959419604196141962419634196441965419664196741968419694197041971419724197341974419754197641977419784197941980419814198241983419844198541986419874198841989419904199141992419934199441995419964199741998419994200042001420024200342004420054200642007420084200942010420114201242013420144201542016420174201842019420204202142022420234202442025420264202742028420294203042031420324203342034420354203642037420384203942040420414204242043420444204542046420474204842049420504205142052420534205442055420564205742058420594206042061420624206342064420654206642067420684206942070420714207242073420744207542076420774207842079420804208142082420834208442085420864208742088420894209042091420924209342094420954209642097420984209942100421014210242103421044210542106421074210842109421104211142112421134211442115421164211742118421194212042121421224212342124421254212642127421284212942130421314213242133421344213542136421374213842139421404214142142421434214442145421464214742148421494215042151421524215342154421554215642157421584215942160421614216242163421644216542166421674216842169421704217142172421734217442175421764217742178421794218042181421824218342184421854218642187421884218942190421914219242193421944219542196421974219842199422004220142202422034220442205422064220742208422094221042211422124221342214422154221642217422184221942220422214222242223422244222542226422274222842229422304223142232422334223442235422364223742238422394224042241422424224342244422454224642247422484224942250422514225242253422544225542256422574225842259422604226142262422634226442265422664226742268422694227042271422724227342274422754227642277422784227942280422814228242283422844228542286422874228842289422904229142292422934229442295422964229742298422994230042301423024230342304423054230642307423084230942310423114231242313423144231542316423174231842319423204232142322423234232442325423264232742328423294233042331423324233342334423354233642337423384233942340423414234242343423444234542346423474234842349423504235142352423534235442355423564235742358423594236042361423624236342364423654236642367423684236942370423714237242373423744237542376423774237842379423804238142382423834238442385423864238742388423894239042391423924239342394423954239642397423984239942400424014240242403424044240542406424074240842409424104241142412424134241442415424164241742418424194242042421424224242342424424254242642427424284242942430424314243242433424344243542436424374243842439424404244142442424434244442445424464244742448424494245042451424524245342454424554245642457424584245942460424614246242463424644246542466424674246842469424704247142472424734247442475424764247742478424794248042481424824248342484424854248642487424884248942490424914249242493424944249542496424974249842499425004250142502425034250442505425064250742508425094251042511425124251342514425154251642517425184251942520425214252242523425244252542526425274252842529425304253142532425334253442535425364253742538425394254042541425424254342544425454254642547425484254942550425514255242553425544255542556425574255842559425604256142562425634256442565425664256742568425694257042571425724257342574425754257642577425784257942580425814258242583425844258542586425874258842589425904259142592425934259442595425964259742598425994260042601426024260342604426054260642607426084260942610426114261242613426144261542616426174261842619426204262142622426234262442625426264262742628426294263042631426324263342634426354263642637426384263942640426414264242643426444264542646426474264842649426504265142652426534265442655426564265742658426594266042661426624266342664426654266642667426684266942670426714267242673426744267542676426774267842679426804268142682426834268442685426864268742688426894269042691426924269342694426954269642697426984269942700427014270242703427044270542706427074270842709427104271142712427134271442715427164271742718427194272042721427224272342724427254272642727427284272942730427314273242733427344273542736427374273842739427404274142742427434274442745427464274742748427494275042751427524275342754427554275642757427584275942760427614276242763427644276542766427674276842769427704277142772427734277442775427764277742778427794278042781427824278342784427854278642787427884278942790427914279242793427944279542796427974279842799428004280142802428034280442805428064280742808428094281042811428124281342814428154281642817428184281942820428214282242823428244282542826428274282842829428304283142832428334283442835428364283742838428394284042841428424284342844428454284642847428484284942850428514285242853428544285542856428574285842859428604286142862428634286442865428664286742868428694287042871428724287342874428754287642877428784287942880428814288242883428844288542886428874288842889428904289142892428934289442895428964289742898428994290042901429024290342904429054290642907429084290942910429114291242913429144291542916429174291842919429204292142922429234292442925429264292742928429294293042931429324293342934429354293642937429384293942940429414294242943429444294542946429474294842949429504295142952429534295442955429564295742958429594296042961429624296342964429654296642967429684296942970429714297242973429744297542976429774297842979429804298142982429834298442985429864298742988429894299042991429924299342994429954299642997429984299943000430014300243003430044300543006430074300843009430104301143012430134301443015430164301743018430194302043021430224302343024430254302643027430284302943030430314303243033430344303543036430374303843039430404304143042430434304443045430464304743048430494305043051430524305343054430554305643057430584305943060430614306243063430644306543066430674306843069430704307143072430734307443075430764307743078430794308043081430824308343084430854308643087430884308943090430914309243093430944309543096430974309843099431004310143102431034310443105431064310743108431094311043111431124311343114431154311643117431184311943120 |
- (global["webpackJsonp"] = global["webpackJsonp"] || []).push([["common/vendor"],[
- /* 0 */,
- /* 1 */
- /*!************************************************************!*\
- !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js ***!
- \************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /* WEBPACK VAR INJECTION */(function(global) {Object.defineProperty(exports, "__esModule", { value: true });exports.createApp = createApp;exports.createComponent = createComponent;exports.createPage = createPage;exports.createPlugin = createPlugin;exports.createSubpackageApp = createSubpackageApp;exports.default = void 0;var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 3));
- var _uniI18n = __webpack_require__(/*! @dcloudio/uni-i18n */ 4);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}function ownKeys(object, enumerableOnly) {var keys = Object.keys(object);if (Object.getOwnPropertySymbols) {var symbols = Object.getOwnPropertySymbols(object);if (enumerableOnly) symbols = symbols.filter(function (sym) {return Object.getOwnPropertyDescriptor(object, sym).enumerable;});keys.push.apply(keys, symbols);}return keys;}function _objectSpread(target) {for (var i = 1; i < arguments.length; i++) {var source = arguments[i] != null ? arguments[i] : {};if (i % 2) {ownKeys(Object(source), true).forEach(function (key) {_defineProperty(target, key, source[key]);});} else if (Object.getOwnPropertyDescriptors) {Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));} else {ownKeys(Object(source)).forEach(function (key) {Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));});}}return target;}function _slicedToArray(arr, i) {return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();}function _nonIterableRest() {throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _iterableToArrayLimit(arr, i) {if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;var _arr = [];var _n = true;var _d = false;var _e = undefined;try {for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {_arr.push(_s.value);if (i && _arr.length === i) break;}} catch (err) {_d = true;_e = err;} finally {try {if (!_n && _i["return"] != null) _i["return"]();} finally {if (_d) throw _e;}}return _arr;}function _arrayWithHoles(arr) {if (Array.isArray(arr)) return arr;}function _defineProperty(obj, key, value) {if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}function _toConsumableArray(arr) {return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();}function _nonIterableSpread() {throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}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);}function _iterableToArray(iter) {if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);}function _arrayWithoutHoles(arr) {if (Array.isArray(arr)) return _arrayLikeToArray(arr);}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;}
- var realAtob;
- var b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
- var b64re = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
- if (typeof atob !== 'function') {
- realAtob = function realAtob(str) {
- str = String(str).replace(/[\t\n\f\r ]+/g, '');
- if (!b64re.test(str)) {throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");}
- // Adding the padding if missing, for semplicity
- str += '=='.slice(2 - (str.length & 3));
- var bitmap;var result = '';var r1;var r2;var i = 0;
- for (; i < str.length;) {
- 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++)));
- 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);
- }
- return result;
- };
- } else {
- // 注意atob只能在全局对象上调用,例如:`const Base64 = {atob};Base64.atob('xxxx')`是错误的用法
- realAtob = atob;
- }
- function b64DecodeUnicode(str) {
- return decodeURIComponent(realAtob(str).split('').map(function (c) {
- return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
- }).join(''));
- }
- function getCurrentUserInfo() {
- var token = wx.getStorageSync('uni_id_token') || '';
- var tokenArr = token.split('.');
- if (!token || tokenArr.length !== 3) {
- return {
- uid: null,
- role: [],
- permission: [],
- tokenExpired: 0 };
- }
- var userInfo;
- try {
- userInfo = JSON.parse(b64DecodeUnicode(tokenArr[1]));
- } catch (error) {
- throw new Error('获取当前用户信息出错,详细错误信息为:' + error.message);
- }
- userInfo.tokenExpired = userInfo.exp * 1000;
- delete userInfo.exp;
- delete userInfo.iat;
- return userInfo;
- }
- function uniIdMixin(Vue) {
- Vue.prototype.uniIDHasRole = function (roleId) {var _getCurrentUserInfo =
- getCurrentUserInfo(),role = _getCurrentUserInfo.role;
- return role.indexOf(roleId) > -1;
- };
- Vue.prototype.uniIDHasPermission = function (permissionId) {var _getCurrentUserInfo2 =
- getCurrentUserInfo(),permission = _getCurrentUserInfo2.permission;
- return this.uniIDHasRole('admin') || permission.indexOf(permissionId) > -1;
- };
- Vue.prototype.uniIDTokenValid = function () {var _getCurrentUserInfo3 =
- getCurrentUserInfo(),tokenExpired = _getCurrentUserInfo3.tokenExpired;
- return tokenExpired > Date.now();
- };
- }
- var _toString = Object.prototype.toString;
- var hasOwnProperty = Object.prototype.hasOwnProperty;
- function isFn(fn) {
- return typeof fn === 'function';
- }
- function isStr(str) {
- return typeof str === 'string';
- }
- function isPlainObject(obj) {
- return _toString.call(obj) === '[object Object]';
- }
- function hasOwn(obj, key) {
- return hasOwnProperty.call(obj, key);
- }
- function noop() {}
- /**
- * Create a cached version of a pure function.
- */
- function cached(fn) {
- var cache = Object.create(null);
- return function cachedFn(str) {
- var hit = cache[str];
- return hit || (cache[str] = fn(str));
- };
- }
- /**
- * Camelize a hyphen-delimited string.
- */
- var camelizeRE = /-(\w)/g;
- var camelize = cached(function (str) {
- return str.replace(camelizeRE, function (_, c) {return c ? c.toUpperCase() : '';});
- });
- var HOOKS = [
- 'invoke',
- 'success',
- 'fail',
- 'complete',
- 'returnValue'];
- var globalInterceptors = {};
- var scopedInterceptors = {};
- function mergeHook(parentVal, childVal) {
- var res = childVal ?
- parentVal ?
- parentVal.concat(childVal) :
- Array.isArray(childVal) ?
- childVal : [childVal] :
- parentVal;
- return res ?
- dedupeHooks(res) :
- res;
- }
- function dedupeHooks(hooks) {
- var res = [];
- for (var i = 0; i < hooks.length; i++) {
- if (res.indexOf(hooks[i]) === -1) {
- res.push(hooks[i]);
- }
- }
- return res;
- }
- function removeHook(hooks, hook) {
- var index = hooks.indexOf(hook);
- if (index !== -1) {
- hooks.splice(index, 1);
- }
- }
- function mergeInterceptorHook(interceptor, option) {
- Object.keys(option).forEach(function (hook) {
- if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
- interceptor[hook] = mergeHook(interceptor[hook], option[hook]);
- }
- });
- }
- function removeInterceptorHook(interceptor, option) {
- if (!interceptor || !option) {
- return;
- }
- Object.keys(option).forEach(function (hook) {
- if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
- removeHook(interceptor[hook], option[hook]);
- }
- });
- }
- function addInterceptor(method, option) {
- if (typeof method === 'string' && isPlainObject(option)) {
- mergeInterceptorHook(scopedInterceptors[method] || (scopedInterceptors[method] = {}), option);
- } else if (isPlainObject(method)) {
- mergeInterceptorHook(globalInterceptors, method);
- }
- }
- function removeInterceptor(method, option) {
- if (typeof method === 'string') {
- if (isPlainObject(option)) {
- removeInterceptorHook(scopedInterceptors[method], option);
- } else {
- delete scopedInterceptors[method];
- }
- } else if (isPlainObject(method)) {
- removeInterceptorHook(globalInterceptors, method);
- }
- }
- function wrapperHook(hook) {
- return function (data) {
- return hook(data) || data;
- };
- }
- function isPromise(obj) {
- return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
- }
- function queue(hooks, data) {
- var promise = false;
- for (var i = 0; i < hooks.length; i++) {
- var hook = hooks[i];
- if (promise) {
- promise = Promise.resolve(wrapperHook(hook));
- } else {
- var res = hook(data);
- if (isPromise(res)) {
- promise = Promise.resolve(res);
- }
- if (res === false) {
- return {
- then: function then() {} };
- }
- }
- }
- return promise || {
- then: function then(callback) {
- return callback(data);
- } };
- }
- function wrapperOptions(interceptor) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
- ['success', 'fail', 'complete'].forEach(function (name) {
- if (Array.isArray(interceptor[name])) {
- var oldCallback = options[name];
- options[name] = function callbackInterceptor(res) {
- queue(interceptor[name], res).then(function (res) {
- /* eslint-disable no-mixed-operators */
- return isFn(oldCallback) && oldCallback(res) || res;
- });
- };
- }
- });
- return options;
- }
- function wrapperReturnValue(method, returnValue) {
- var returnValueHooks = [];
- if (Array.isArray(globalInterceptors.returnValue)) {
- returnValueHooks.push.apply(returnValueHooks, _toConsumableArray(globalInterceptors.returnValue));
- }
- var interceptor = scopedInterceptors[method];
- if (interceptor && Array.isArray(interceptor.returnValue)) {
- returnValueHooks.push.apply(returnValueHooks, _toConsumableArray(interceptor.returnValue));
- }
- returnValueHooks.forEach(function (hook) {
- returnValue = hook(returnValue) || returnValue;
- });
- return returnValue;
- }
- function getApiInterceptorHooks(method) {
- var interceptor = Object.create(null);
- Object.keys(globalInterceptors).forEach(function (hook) {
- if (hook !== 'returnValue') {
- interceptor[hook] = globalInterceptors[hook].slice();
- }
- });
- var scopedInterceptor = scopedInterceptors[method];
- if (scopedInterceptor) {
- Object.keys(scopedInterceptor).forEach(function (hook) {
- if (hook !== 'returnValue') {
- interceptor[hook] = (interceptor[hook] || []).concat(scopedInterceptor[hook]);
- }
- });
- }
- return interceptor;
- }
- function invokeApi(method, api, options) {for (var _len = arguments.length, params = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {params[_key - 3] = arguments[_key];}
- var interceptor = getApiInterceptorHooks(method);
- if (interceptor && Object.keys(interceptor).length) {
- if (Array.isArray(interceptor.invoke)) {
- var res = queue(interceptor.invoke, options);
- return res.then(function (options) {
- return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
- });
- } else {
- return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
- }
- }
- return api.apply(void 0, [options].concat(params));
- }
- var promiseInterceptor = {
- returnValue: function returnValue(res) {
- if (!isPromise(res)) {
- return res;
- }
- return new Promise(function (resolve, reject) {
- res.then(function (res) {
- if (res[0]) {
- reject(res[0]);
- } else {
- resolve(res[1]);
- }
- });
- });
- } };
- 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/;
- var CONTEXT_API_RE = /^create|Manager$/;
- // Context例外情况
- var CONTEXT_API_RE_EXC = ['createBLEConnection'];
- // 同步例外情况
- var ASYNC_API = ['createBLEConnection'];
- var CALLBACK_API_RE = /^on|^off/;
- function isContextApi(name) {
- return CONTEXT_API_RE.test(name) && CONTEXT_API_RE_EXC.indexOf(name) === -1;
- }
- function isSyncApi(name) {
- return SYNC_API_RE.test(name) && ASYNC_API.indexOf(name) === -1;
- }
- function isCallbackApi(name) {
- return CALLBACK_API_RE.test(name) && name !== 'onPush';
- }
- function handlePromise(promise) {
- return promise.then(function (data) {
- return [null, data];
- }).
- catch(function (err) {return [err];});
- }
- function shouldPromise(name) {
- if (
- isContextApi(name) ||
- isSyncApi(name) ||
- isCallbackApi(name))
- {
- return false;
- }
- return true;
- }
- /* eslint-disable no-extend-native */
- if (!Promise.prototype.finally) {
- Promise.prototype.finally = function (callback) {
- var promise = this.constructor;
- return this.then(
- function (value) {return promise.resolve(callback()).then(function () {return value;});},
- function (reason) {return promise.resolve(callback()).then(function () {
- throw reason;
- });});
- };
- }
- function promisify(name, api) {
- if (!shouldPromise(name)) {
- return api;
- }
- return function promiseApi() {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {params[_key2 - 1] = arguments[_key2];}
- if (isFn(options.success) || isFn(options.fail) || isFn(options.complete)) {
- return wrapperReturnValue(name, invokeApi.apply(void 0, [name, api, options].concat(params)));
- }
- return wrapperReturnValue(name, handlePromise(new Promise(function (resolve, reject) {
- invokeApi.apply(void 0, [name, api, Object.assign({}, options, {
- success: resolve,
- fail: reject })].concat(
- params));
- })));
- };
- }
- var EPS = 1e-4;
- var BASE_DEVICE_WIDTH = 750;
- var isIOS = false;
- var deviceWidth = 0;
- var deviceDPR = 0;
- function checkDeviceWidth() {var _wx$getSystemInfoSync =
- wx.getSystemInfoSync(),platform = _wx$getSystemInfoSync.platform,pixelRatio = _wx$getSystemInfoSync.pixelRatio,windowWidth = _wx$getSystemInfoSync.windowWidth; // uni=>wx runtime 编译目标是 uni 对象,内部不允许直接使用 uni
- deviceWidth = windowWidth;
- deviceDPR = pixelRatio;
- isIOS = platform === 'ios';
- }
- function upx2px(number, newDeviceWidth) {
- if (deviceWidth === 0) {
- checkDeviceWidth();
- }
- number = Number(number);
- if (number === 0) {
- return 0;
- }
- var result = number / BASE_DEVICE_WIDTH * (newDeviceWidth || deviceWidth);
- if (result < 0) {
- result = -result;
- }
- result = Math.floor(result + EPS);
- if (result === 0) {
- if (deviceDPR === 1 || !isIOS) {
- result = 1;
- } else {
- result = 0.5;
- }
- }
- return number < 0 ? -result : result;
- }
- function getLocale() {
- // 优先使用 $locale
- var app = getApp({
- allowDefault: true });
- if (app && app.$vm) {
- return app.$vm.$locale;
- }
- return wx.getSystemInfoSync().language || 'zh-Hans';
- }
- function setLocale(locale) {
- var app = getApp();
- if (!app) {
- return false;
- }
- var oldLocale = app.$vm.$locale;
- if (oldLocale !== locale) {
- app.$vm.$locale = locale;
- onLocaleChangeCallbacks.forEach(function (fn) {return fn({
- locale: locale });});
- return true;
- }
- return false;
- }
- var onLocaleChangeCallbacks = [];
- function onLocaleChange(fn) {
- if (onLocaleChangeCallbacks.indexOf(fn) === -1) {
- onLocaleChangeCallbacks.push(fn);
- }
- }
- if (typeof global !== 'undefined') {
- global.getLocale = getLocale;
- }
- var interceptors = {
- promiseInterceptor: promiseInterceptor };
- var baseApi = /*#__PURE__*/Object.freeze({
- __proto__: null,
- upx2px: upx2px,
- getLocale: getLocale,
- setLocale: setLocale,
- onLocaleChange: onLocaleChange,
- addInterceptor: addInterceptor,
- removeInterceptor: removeInterceptor,
- interceptors: interceptors });
- function findExistsPageIndex(url) {
- var pages = getCurrentPages();
- var len = pages.length;
- while (len--) {
- var page = pages[len];
- if (page.$page && page.$page.fullPath === url) {
- return len;
- }
- }
- return -1;
- }
- var redirectTo = {
- name: function name(fromArgs) {
- if (fromArgs.exists === 'back' && fromArgs.delta) {
- return 'navigateBack';
- }
- return 'redirectTo';
- },
- args: function args(fromArgs) {
- if (fromArgs.exists === 'back' && fromArgs.url) {
- var existsPageIndex = findExistsPageIndex(fromArgs.url);
- if (existsPageIndex !== -1) {
- var delta = getCurrentPages().length - 1 - existsPageIndex;
- if (delta > 0) {
- fromArgs.delta = delta;
- }
- }
- }
- } };
- var previewImage = {
- args: function args(fromArgs) {
- var currentIndex = parseInt(fromArgs.current);
- if (isNaN(currentIndex)) {
- return;
- }
- var urls = fromArgs.urls;
- if (!Array.isArray(urls)) {
- return;
- }
- var len = urls.length;
- if (!len) {
- return;
- }
- if (currentIndex < 0) {
- currentIndex = 0;
- } else if (currentIndex >= len) {
- currentIndex = len - 1;
- }
- if (currentIndex > 0) {
- fromArgs.current = urls[currentIndex];
- fromArgs.urls = urls.filter(
- function (item, index) {return index < currentIndex ? item !== urls[currentIndex] : true;});
- } else {
- fromArgs.current = urls[0];
- }
- return {
- indicator: false,
- loop: false };
- } };
- var UUID_KEY = '__DC_STAT_UUID';
- var deviceId;
- function addUuid(result) {
- deviceId = deviceId || wx.getStorageSync(UUID_KEY);
- if (!deviceId) {
- deviceId = Date.now() + '' + Math.floor(Math.random() * 1e7);
- wx.setStorage({
- key: UUID_KEY,
- data: deviceId });
- }
- result.deviceId = deviceId;
- }
- function addSafeAreaInsets(result) {
- if (result.safeArea) {
- var safeArea = result.safeArea;
- result.safeAreaInsets = {
- top: safeArea.top,
- left: safeArea.left,
- right: result.windowWidth - safeArea.right,
- bottom: result.windowHeight - safeArea.bottom };
- }
- }
- var getSystemInfo = {
- returnValue: function returnValue(result) {
- addUuid(result);
- addSafeAreaInsets(result);
- } };
- var showActionSheet = {
- args: function args(fromArgs) {
- if (typeof fromArgs === 'object') {
- fromArgs.alertText = fromArgs.title;
- }
- } };
- // import navigateTo from 'uni-helpers/navigate-to'
- var protocols = {
- redirectTo: redirectTo,
- // navigateTo, // 由于在微信开发者工具的页面参数,会显示__id__参数,因此暂时关闭mp-weixin对于navigateTo的AOP
- previewImage: previewImage,
- getSystemInfo: getSystemInfo,
- getSystemInfoSync: getSystemInfo,
- showActionSheet: showActionSheet };
- var todos = [
- 'vibrate',
- 'preloadPage',
- 'unPreloadPage',
- 'loadSubPackage'];
- var canIUses = [];
- var CALLBACKS = ['success', 'fail', 'cancel', 'complete'];
- function processCallback(methodName, method, returnValue) {
- return function (res) {
- return method(processReturnValue(methodName, res, returnValue));
- };
- }
- function processArgs(methodName, fromArgs) {var argsOption = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};var returnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};var keepFromArgs = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
- if (isPlainObject(fromArgs)) {// 一般 api 的参数解析
- var toArgs = keepFromArgs === true ? fromArgs : {}; // returnValue 为 false 时,说明是格式化返回值,直接在返回值对象上修改赋值
- if (isFn(argsOption)) {
- argsOption = argsOption(fromArgs, toArgs) || {};
- }
- for (var key in fromArgs) {
- if (hasOwn(argsOption, key)) {
- var keyOption = argsOption[key];
- if (isFn(keyOption)) {
- keyOption = keyOption(fromArgs[key], fromArgs, toArgs);
- }
- if (!keyOption) {// 不支持的参数
- console.warn("The '".concat(methodName, "' method of platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support option '").concat(key, "'"));
- } else if (isStr(keyOption)) {// 重写参数 key
- toArgs[keyOption] = fromArgs[key];
- } else if (isPlainObject(keyOption)) {// {name:newName,value:value}可重新指定参数 key:value
- toArgs[keyOption.name ? keyOption.name : key] = keyOption.value;
- }
- } else if (CALLBACKS.indexOf(key) !== -1) {
- if (isFn(fromArgs[key])) {
- toArgs[key] = processCallback(methodName, fromArgs[key], returnValue);
- }
- } else {
- if (!keepFromArgs) {
- toArgs[key] = fromArgs[key];
- }
- }
- }
- return toArgs;
- } else if (isFn(fromArgs)) {
- fromArgs = processCallback(methodName, fromArgs, returnValue);
- }
- return fromArgs;
- }
- function processReturnValue(methodName, res, returnValue) {var keepReturnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
- if (isFn(protocols.returnValue)) {// 处理通用 returnValue
- res = protocols.returnValue(methodName, res);
- }
- return processArgs(methodName, res, returnValue, {}, keepReturnValue);
- }
- function wrapper(methodName, method) {
- if (hasOwn(protocols, methodName)) {
- var protocol = protocols[methodName];
- if (!protocol) {// 暂不支持的 api
- return function () {
- console.error("Platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support '".concat(methodName, "'."));
- };
- }
- return function (arg1, arg2) {// 目前 api 最多两个参数
- var options = protocol;
- if (isFn(protocol)) {
- options = protocol(arg1);
- }
- arg1 = processArgs(methodName, arg1, options.args, options.returnValue);
- var args = [arg1];
- if (typeof arg2 !== 'undefined') {
- args.push(arg2);
- }
- if (isFn(options.name)) {
- methodName = options.name(arg1);
- } else if (isStr(options.name)) {
- methodName = options.name;
- }
- var returnValue = wx[methodName].apply(wx, args);
- if (isSyncApi(methodName)) {// 同步 api
- return processReturnValue(methodName, returnValue, options.returnValue, isContextApi(methodName));
- }
- return returnValue;
- };
- }
- return method;
- }
- var todoApis = Object.create(null);
- var TODOS = [
- 'onTabBarMidButtonTap',
- 'subscribePush',
- 'unsubscribePush',
- 'onPush',
- 'offPush',
- 'share'];
- function createTodoApi(name) {
- return function todoApi(_ref)
- {var fail = _ref.fail,complete = _ref.complete;
- var res = {
- errMsg: "".concat(name, ":fail method '").concat(name, "' not supported") };
- isFn(fail) && fail(res);
- isFn(complete) && complete(res);
- };
- }
- TODOS.forEach(function (name) {
- todoApis[name] = createTodoApi(name);
- });
- var providers = {
- oauth: ['weixin'],
- share: ['weixin'],
- payment: ['wxpay'],
- push: ['weixin'] };
- function getProvider(_ref2)
- {var service = _ref2.service,success = _ref2.success,fail = _ref2.fail,complete = _ref2.complete;
- var res = false;
- if (providers[service]) {
- res = {
- errMsg: 'getProvider:ok',
- service: service,
- provider: providers[service] };
- isFn(success) && success(res);
- } else {
- res = {
- errMsg: 'getProvider:fail service not found' };
- isFn(fail) && fail(res);
- }
- isFn(complete) && complete(res);
- }
- var extraApi = /*#__PURE__*/Object.freeze({
- __proto__: null,
- getProvider: getProvider });
- var getEmitter = function () {
- var Emitter;
- return function getUniEmitter() {
- if (!Emitter) {
- Emitter = new _vue.default();
- }
- return Emitter;
- };
- }();
- function apply(ctx, method, args) {
- return ctx[method].apply(ctx, args);
- }
- function $on() {
- return apply(getEmitter(), '$on', Array.prototype.slice.call(arguments));
- }
- function $off() {
- return apply(getEmitter(), '$off', Array.prototype.slice.call(arguments));
- }
- function $once() {
- return apply(getEmitter(), '$once', Array.prototype.slice.call(arguments));
- }
- function $emit() {
- return apply(getEmitter(), '$emit', Array.prototype.slice.call(arguments));
- }
- var eventApi = /*#__PURE__*/Object.freeze({
- __proto__: null,
- $on: $on,
- $off: $off,
- $once: $once,
- $emit: $emit });
- var api = /*#__PURE__*/Object.freeze({
- __proto__: null });
- var MPPage = Page;
- var MPComponent = Component;
- var customizeRE = /:/g;
- var customize = cached(function (str) {
- return camelize(str.replace(customizeRE, '-'));
- });
- function initTriggerEvent(mpInstance) {
- var oldTriggerEvent = mpInstance.triggerEvent;
- var newTriggerEvent = function newTriggerEvent(event) {for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {args[_key3 - 1] = arguments[_key3];}
- return oldTriggerEvent.apply(mpInstance, [customize(event)].concat(args));
- };
- try {
- // 京东小程序 triggerEvent 为只读
- mpInstance.triggerEvent = newTriggerEvent;
- } catch (error) {
- mpInstance._triggerEvent = newTriggerEvent;
- }
- }
- function initHook(name, options, isComponent) {
- var oldHook = options[name];
- if (!oldHook) {
- options[name] = function () {
- initTriggerEvent(this);
- };
- } else {
- options[name] = function () {
- initTriggerEvent(this);for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {args[_key4] = arguments[_key4];}
- return oldHook.apply(this, args);
- };
- }
- }
- if (!MPPage.__$wrappered) {
- MPPage.__$wrappered = true;
- Page = function Page() {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
- initHook('onLoad', options);
- return MPPage(options);
- };
- Page.after = MPPage.after;
- Component = function Component() {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
- initHook('created', options);
- return MPComponent(options);
- };
- }
- var PAGE_EVENT_HOOKS = [
- 'onPullDownRefresh',
- 'onReachBottom',
- 'onAddToFavorites',
- 'onShareTimeline',
- 'onShareAppMessage',
- 'onPageScroll',
- 'onResize',
- 'onTabItemTap'];
- function initMocks(vm, mocks) {
- var mpInstance = vm.$mp[vm.mpType];
- mocks.forEach(function (mock) {
- if (hasOwn(mpInstance, mock)) {
- vm[mock] = mpInstance[mock];
- }
- });
- }
- function hasHook(hook, vueOptions) {
- if (!vueOptions) {
- return true;
- }
- if (_vue.default.options && Array.isArray(_vue.default.options[hook])) {
- return true;
- }
- vueOptions = vueOptions.default || vueOptions;
- if (isFn(vueOptions)) {
- if (isFn(vueOptions.extendOptions[hook])) {
- return true;
- }
- if (vueOptions.super &&
- vueOptions.super.options &&
- Array.isArray(vueOptions.super.options[hook])) {
- return true;
- }
- return false;
- }
- if (isFn(vueOptions[hook])) {
- return true;
- }
- var mixins = vueOptions.mixins;
- if (Array.isArray(mixins)) {
- return !!mixins.find(function (mixin) {return hasHook(hook, mixin);});
- }
- }
- function initHooks(mpOptions, hooks, vueOptions) {
- hooks.forEach(function (hook) {
- if (hasHook(hook, vueOptions)) {
- mpOptions[hook] = function (args) {
- return this.$vm && this.$vm.__call_hook(hook, args);
- };
- }
- });
- }
- function initVueComponent(Vue, vueOptions) {
- vueOptions = vueOptions.default || vueOptions;
- var VueComponent;
- if (isFn(vueOptions)) {
- VueComponent = vueOptions;
- } else {
- VueComponent = Vue.extend(vueOptions);
- }
- vueOptions = VueComponent.options;
- return [VueComponent, vueOptions];
- }
- function initSlots(vm, vueSlots) {
- if (Array.isArray(vueSlots) && vueSlots.length) {
- var $slots = Object.create(null);
- vueSlots.forEach(function (slotName) {
- $slots[slotName] = true;
- });
- vm.$scopedSlots = vm.$slots = $slots;
- }
- }
- function initVueIds(vueIds, mpInstance) {
- vueIds = (vueIds || '').split(',');
- var len = vueIds.length;
- if (len === 1) {
- mpInstance._$vueId = vueIds[0];
- } else if (len === 2) {
- mpInstance._$vueId = vueIds[0];
- mpInstance._$vuePid = vueIds[1];
- }
- }
- function initData(vueOptions, context) {
- var data = vueOptions.data || {};
- var methods = vueOptions.methods || {};
- if (typeof data === 'function') {
- try {
- data = data.call(context); // 支持 Vue.prototype 上挂的数据
- } catch (e) {
- if (Object({"VUE_APP_NAME":"sugarpark-mini-program","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
- console.warn('根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。', data);
- }
- }
- } else {
- try {
- // 对 data 格式化
- data = JSON.parse(JSON.stringify(data));
- } catch (e) {}
- }
- if (!isPlainObject(data)) {
- data = {};
- }
- Object.keys(methods).forEach(function (methodName) {
- if (context.__lifecycle_hooks__.indexOf(methodName) === -1 && !hasOwn(data, methodName)) {
- data[methodName] = methods[methodName];
- }
- });
- return data;
- }
- var PROP_TYPES = [String, Number, Boolean, Object, Array, null];
- function createObserver(name) {
- return function observer(newVal, oldVal) {
- if (this.$vm) {
- this.$vm[name] = newVal; // 为了触发其他非 render watcher
- }
- };
- }
- function initBehaviors(vueOptions, initBehavior) {
- var vueBehaviors = vueOptions.behaviors;
- var vueExtends = vueOptions.extends;
- var vueMixins = vueOptions.mixins;
- var vueProps = vueOptions.props;
- if (!vueProps) {
- vueOptions.props = vueProps = [];
- }
- var behaviors = [];
- if (Array.isArray(vueBehaviors)) {
- vueBehaviors.forEach(function (behavior) {
- behaviors.push(behavior.replace('uni://', "wx".concat("://")));
- if (behavior === 'uni://form-field') {
- if (Array.isArray(vueProps)) {
- vueProps.push('name');
- vueProps.push('value');
- } else {
- vueProps.name = {
- type: String,
- default: '' };
- vueProps.value = {
- type: [String, Number, Boolean, Array, Object, Date],
- default: '' };
- }
- }
- });
- }
- if (isPlainObject(vueExtends) && vueExtends.props) {
- behaviors.push(
- initBehavior({
- properties: initProperties(vueExtends.props, true) }));
- }
- if (Array.isArray(vueMixins)) {
- vueMixins.forEach(function (vueMixin) {
- if (isPlainObject(vueMixin) && vueMixin.props) {
- behaviors.push(
- initBehavior({
- properties: initProperties(vueMixin.props, true) }));
- }
- });
- }
- return behaviors;
- }
- function parsePropType(key, type, defaultValue, file) {
- // [String]=>String
- if (Array.isArray(type) && type.length === 1) {
- return type[0];
- }
- return type;
- }
- function initProperties(props) {var isBehavior = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;var file = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
- var properties = {};
- if (!isBehavior) {
- properties.vueId = {
- type: String,
- value: '' };
- // 用于字节跳动小程序模拟抽象节点
- properties.generic = {
- type: Object,
- value: null };
- // scopedSlotsCompiler auto
- properties.scopedSlotsCompiler = {
- type: String,
- value: '' };
- properties.vueSlots = { // 小程序不能直接定义 $slots 的 props,所以通过 vueSlots 转换到 $slots
- type: null,
- value: [],
- observer: function observer(newVal, oldVal) {
- var $slots = Object.create(null);
- newVal.forEach(function (slotName) {
- $slots[slotName] = true;
- });
- this.setData({
- $slots: $slots });
- } };
- }
- if (Array.isArray(props)) {// ['title']
- props.forEach(function (key) {
- properties[key] = {
- type: null,
- observer: createObserver(key) };
- });
- } else if (isPlainObject(props)) {// {title:{type:String,default:''},content:String}
- Object.keys(props).forEach(function (key) {
- var opts = props[key];
- if (isPlainObject(opts)) {// title:{type:String,default:''}
- var value = opts.default;
- if (isFn(value)) {
- value = value();
- }
- opts.type = parsePropType(key, opts.type);
- properties[key] = {
- type: PROP_TYPES.indexOf(opts.type) !== -1 ? opts.type : null,
- value: value,
- observer: createObserver(key) };
- } else {// content:String
- var type = parsePropType(key, opts);
- properties[key] = {
- type: PROP_TYPES.indexOf(type) !== -1 ? type : null,
- observer: createObserver(key) };
- }
- });
- }
- return properties;
- }
- function wrapper$1(event) {
- // TODO 又得兼容 mpvue 的 mp 对象
- try {
- event.mp = JSON.parse(JSON.stringify(event));
- } catch (e) {}
- event.stopPropagation = noop;
- event.preventDefault = noop;
- event.target = event.target || {};
- if (!hasOwn(event, 'detail')) {
- event.detail = {};
- }
- if (hasOwn(event, 'markerId')) {
- event.detail = typeof event.detail === 'object' ? event.detail : {};
- event.detail.markerId = event.markerId;
- }
- if (isPlainObject(event.detail)) {
- event.target = Object.assign({}, event.target, event.detail);
- }
- return event;
- }
- function getExtraValue(vm, dataPathsArray) {
- var context = vm;
- dataPathsArray.forEach(function (dataPathArray) {
- var dataPath = dataPathArray[0];
- var value = dataPathArray[2];
- if (dataPath || typeof value !== 'undefined') {// ['','',index,'disable']
- var propPath = dataPathArray[1];
- var valuePath = dataPathArray[3];
- var vFor;
- if (Number.isInteger(dataPath)) {
- vFor = dataPath;
- } else if (!dataPath) {
- vFor = context;
- } else if (typeof dataPath === 'string' && dataPath) {
- if (dataPath.indexOf('#s#') === 0) {
- vFor = dataPath.substr(3);
- } else {
- vFor = vm.__get_value(dataPath, context);
- }
- }
- if (Number.isInteger(vFor)) {
- context = value;
- } else if (!propPath) {
- context = vFor[value];
- } else {
- if (Array.isArray(vFor)) {
- context = vFor.find(function (vForItem) {
- return vm.__get_value(propPath, vForItem) === value;
- });
- } else if (isPlainObject(vFor)) {
- context = Object.keys(vFor).find(function (vForKey) {
- return vm.__get_value(propPath, vFor[vForKey]) === value;
- });
- } else {
- console.error('v-for 暂不支持循环数据:', vFor);
- }
- }
- if (valuePath) {
- context = vm.__get_value(valuePath, context);
- }
- }
- });
- return context;
- }
- function processEventExtra(vm, extra, event) {
- var extraObj = {};
- if (Array.isArray(extra) && extra.length) {
- /**
- *[
- * ['data.items', 'data.id', item.data.id],
- * ['metas', 'id', meta.id]
- *],
- *[
- * ['data.items', 'data.id', item.data.id],
- * ['metas', 'id', meta.id]
- *],
- *'test'
- */
- extra.forEach(function (dataPath, index) {
- if (typeof dataPath === 'string') {
- if (!dataPath) {// model,prop.sync
- extraObj['$' + index] = vm;
- } else {
- if (dataPath === '$event') {// $event
- extraObj['$' + index] = event;
- } else if (dataPath === 'arguments') {
- if (event.detail && event.detail.__args__) {
- extraObj['$' + index] = event.detail.__args__;
- } else {
- extraObj['$' + index] = [event];
- }
- } else if (dataPath.indexOf('$event.') === 0) {// $event.target.value
- extraObj['$' + index] = vm.__get_value(dataPath.replace('$event.', ''), event);
- } else {
- extraObj['$' + index] = vm.__get_value(dataPath);
- }
- }
- } else {
- extraObj['$' + index] = getExtraValue(vm, dataPath);
- }
- });
- }
- return extraObj;
- }
- function getObjByArray(arr) {
- var obj = {};
- for (var i = 1; i < arr.length; i++) {
- var element = arr[i];
- obj[element[0]] = element[1];
- }
- return obj;
- }
- function processEventArgs(vm, event) {var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];var extra = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];var isCustom = arguments.length > 4 ? arguments[4] : undefined;var methodName = arguments.length > 5 ? arguments[5] : undefined;
- var isCustomMPEvent = false; // wxcomponent 组件,传递原始 event 对象
- if (isCustom) {// 自定义事件
- isCustomMPEvent = event.currentTarget &&
- event.currentTarget.dataset &&
- event.currentTarget.dataset.comType === 'wx';
- if (!args.length) {// 无参数,直接传入 event 或 detail 数组
- if (isCustomMPEvent) {
- return [event];
- }
- return event.detail.__args__ || event.detail;
- }
- }
- var extraObj = processEventExtra(vm, extra, event);
- var ret = [];
- args.forEach(function (arg) {
- if (arg === '$event') {
- if (methodName === '__set_model' && !isCustom) {// input v-model value
- ret.push(event.target.value);
- } else {
- if (isCustom && !isCustomMPEvent) {
- ret.push(event.detail.__args__[0]);
- } else {// wxcomponent 组件或内置组件
- ret.push(event);
- }
- }
- } else {
- if (Array.isArray(arg) && arg[0] === 'o') {
- ret.push(getObjByArray(arg));
- } else if (typeof arg === 'string' && hasOwn(extraObj, arg)) {
- ret.push(extraObj[arg]);
- } else {
- ret.push(arg);
- }
- }
- });
- return ret;
- }
- var ONCE = '~';
- var CUSTOM = '^';
- function isMatchEventType(eventType, optType) {
- return eventType === optType ||
- optType === 'regionchange' && (
- eventType === 'begin' ||
- eventType === 'end');
- }
- function getContextVm(vm) {
- var $parent = vm.$parent;
- // 父组件是 scoped slots 或者其他自定义组件时继续查找
- while ($parent && $parent.$parent && ($parent.$options.generic || $parent.$parent.$options.generic || $parent.$scope._$vuePid)) {
- $parent = $parent.$parent;
- }
- return $parent && $parent.$parent;
- }
- function handleEvent(event) {var _this = this;
- event = wrapper$1(event);
- // [['tap',[['handle',[1,2,a]],['handle1',[1,2,a]]]]]
- var dataset = (event.currentTarget || event.target).dataset;
- if (!dataset) {
- return console.warn('事件信息不存在');
- }
- var eventOpts = dataset.eventOpts || dataset['event-opts']; // 支付宝 web-view 组件 dataset 非驼峰
- if (!eventOpts) {
- return console.warn('事件信息不存在');
- }
- // [['handle',[1,2,a]],['handle1',[1,2,a]]]
- var eventType = event.type;
- var ret = [];
- eventOpts.forEach(function (eventOpt) {
- var type = eventOpt[0];
- var eventsArray = eventOpt[1];
- var isCustom = type.charAt(0) === CUSTOM;
- type = isCustom ? type.slice(1) : type;
- var isOnce = type.charAt(0) === ONCE;
- type = isOnce ? type.slice(1) : type;
- if (eventsArray && isMatchEventType(eventType, type)) {
- eventsArray.forEach(function (eventArray) {
- var methodName = eventArray[0];
- if (methodName) {
- var handlerCtx = _this.$vm;
- if (handlerCtx.$options.generic) {// mp-weixin,mp-toutiao 抽象节点模拟 scoped slots
- handlerCtx = getContextVm(handlerCtx) || handlerCtx;
- }
- if (methodName === '$emit') {
- handlerCtx.$emit.apply(handlerCtx,
- processEventArgs(
- _this.$vm,
- event,
- eventArray[1],
- eventArray[2],
- isCustom,
- methodName));
- return;
- }
- var handler = handlerCtx[methodName];
- if (!isFn(handler)) {
- throw new Error(" _vm.".concat(methodName, " is not a function"));
- }
- if (isOnce) {
- if (handler.once) {
- return;
- }
- handler.once = true;
- }
- var params = processEventArgs(
- _this.$vm,
- event,
- eventArray[1],
- eventArray[2],
- isCustom,
- methodName);
- params = Array.isArray(params) ? params : [];
- // 参数尾部增加原始事件对象用于复杂表达式内获取额外数据
- if (/=\s*\S+\.eventParams\s*\|\|\s*\S+\[['"]event-params['"]\]/.test(handler.toString())) {
- // eslint-disable-next-line no-sparse-arrays
- params = params.concat([,,,,,,,,,, event]);
- }
- ret.push(handler.apply(handlerCtx, params));
- }
- });
- }
- });
- if (
- eventType === 'input' &&
- ret.length === 1 &&
- typeof ret[0] !== 'undefined')
- {
- return ret[0];
- }
- }
- var messages = {};
- var locale;
- {
- locale = wx.getSystemInfoSync().language;
- }
- function initI18nMessages() {
- if (!isEnableLocale()) {
- return;
- }
- var localeKeys = Object.keys(__uniConfig.locales);
- if (localeKeys.length) {
- localeKeys.forEach(function (locale) {
- var curMessages = messages[locale];
- var userMessages = __uniConfig.locales[locale];
- if (curMessages) {
- Object.assign(curMessages, userMessages);
- } else {
- messages[locale] = userMessages;
- }
- });
- }
- }
- initI18nMessages();
- var i18n = (0, _uniI18n.initVueI18n)(
- locale,
- {});
- var t = i18n.t;
- var i18nMixin = i18n.mixin = {
- beforeCreate: function beforeCreate() {var _this2 = this;
- var unwatch = i18n.i18n.watchLocale(function () {
- _this2.$forceUpdate();
- });
- this.$once('hook:beforeDestroy', function () {
- unwatch();
- });
- },
- methods: {
- $$t: function $$t(key, values) {
- return t(key, values);
- } } };
- var setLocale$1 = i18n.setLocale;
- var getLocale$1 = i18n.getLocale;
- function initAppLocale(Vue, appVm, locale) {
- var state = Vue.observable({
- locale: locale || i18n.getLocale() });
- var localeWatchers = [];
- appVm.$watchLocale = function (fn) {
- localeWatchers.push(fn);
- };
- Object.defineProperty(appVm, '$locale', {
- get: function get() {
- return state.locale;
- },
- set: function set(v) {
- state.locale = v;
- localeWatchers.forEach(function (watch) {return watch(v);});
- } });
- }
- function isEnableLocale() {
- return typeof __uniConfig !== 'undefined' && __uniConfig.locales && !!Object.keys(__uniConfig.locales).length;
- }
- // export function initI18n() {
- // const localeKeys = Object.keys(__uniConfig.locales || {})
- // if (localeKeys.length) {
- // localeKeys.forEach((locale) =>
- // i18n.add(locale, __uniConfig.locales[locale])
- // )
- // }
- // }
- var eventChannels = {};
- var eventChannelStack = [];
- function getEventChannel(id) {
- if (id) {
- var eventChannel = eventChannels[id];
- delete eventChannels[id];
- return eventChannel;
- }
- return eventChannelStack.shift();
- }
- var hooks = [
- 'onShow',
- 'onHide',
- 'onError',
- 'onPageNotFound',
- 'onThemeChange',
- 'onUnhandledRejection'];
- function initEventChannel() {
- _vue.default.prototype.getOpenerEventChannel = function () {
- // 微信小程序使用自身getOpenerEventChannel
- {
- return this.$scope.getOpenerEventChannel();
- }
- };
- var callHook = _vue.default.prototype.__call_hook;
- _vue.default.prototype.__call_hook = function (hook, args) {
- if (hook === 'onLoad' && args && args.__id__) {
- this.__eventChannel__ = getEventChannel(args.__id__);
- delete args.__id__;
- }
- return callHook.call(this, hook, args);
- };
- }
- function initScopedSlotsParams() {
- var center = {};
- var parents = {};
- _vue.default.prototype.$hasScopedSlotsParams = function (vueId) {
- var has = center[vueId];
- if (!has) {
- parents[vueId] = this;
- this.$on('hook:destroyed', function () {
- delete parents[vueId];
- });
- }
- return has;
- };
- _vue.default.prototype.$getScopedSlotsParams = function (vueId, name, key) {
- var data = center[vueId];
- if (data) {
- var object = data[name] || {};
- return key ? object[key] : object;
- } else {
- parents[vueId] = this;
- this.$on('hook:destroyed', function () {
- delete parents[vueId];
- });
- }
- };
- _vue.default.prototype.$setScopedSlotsParams = function (name, value) {
- var vueIds = this.$options.propsData.vueId;
- if (vueIds) {
- var vueId = vueIds.split(',')[0];
- var object = center[vueId] = center[vueId] || {};
- object[name] = value;
- if (parents[vueId]) {
- parents[vueId].$forceUpdate();
- }
- }
- };
- _vue.default.mixin({
- destroyed: function destroyed() {
- var propsData = this.$options.propsData;
- var vueId = propsData && propsData.vueId;
- if (vueId) {
- delete center[vueId];
- delete parents[vueId];
- }
- } });
- }
- function parseBaseApp(vm, _ref3)
- {var mocks = _ref3.mocks,initRefs = _ref3.initRefs;
- initEventChannel();
- {
- initScopedSlotsParams();
- }
- if (vm.$options.store) {
- _vue.default.prototype.$store = vm.$options.store;
- }
- uniIdMixin(_vue.default);
- _vue.default.prototype.mpHost = "mp-weixin";
- _vue.default.mixin({
- beforeCreate: function beforeCreate() {
- if (!this.$options.mpType) {
- return;
- }
- this.mpType = this.$options.mpType;
- this.$mp = _defineProperty({
- data: {} },
- this.mpType, this.$options.mpInstance);
- this.$scope = this.$options.mpInstance;
- delete this.$options.mpType;
- delete this.$options.mpInstance;
- if (this.mpType === 'page' && typeof getApp === 'function') {// hack vue-i18n
- var app = getApp();
- if (app.$vm && app.$vm.$i18n) {
- this._i18n = app.$vm.$i18n;
- }
- }
- if (this.mpType !== 'app') {
- initRefs(this);
- initMocks(this, mocks);
- }
- } });
- var appOptions = {
- onLaunch: function onLaunch(args) {
- if (this.$vm) {// 已经初始化过了,主要是为了百度,百度 onShow 在 onLaunch 之前
- return;
- }
- {
- if (wx.canIUse && !wx.canIUse('nextTick')) {// 事实 上2.2.3 即可,简单使用 2.3.0 的 nextTick 判断
- console.error('当前微信基础库版本过低,请将 微信开发者工具-详情-项目设置-调试基础库版本 更换为`2.3.0`以上');
- }
- }
- this.$vm = vm;
- this.$vm.$mp = {
- app: this };
- this.$vm.$scope = this;
- // vm 上也挂载 globalData
- this.$vm.globalData = this.globalData;
- this.$vm._isMounted = true;
- this.$vm.__call_hook('mounted', args);
- this.$vm.__call_hook('onLaunch', args);
- } };
- // 兼容旧版本 globalData
- appOptions.globalData = vm.$options.globalData || {};
- // 将 methods 中的方法挂在 getApp() 中
- var methods = vm.$options.methods;
- if (methods) {
- Object.keys(methods).forEach(function (name) {
- appOptions[name] = methods[name];
- });
- }
- initAppLocale(_vue.default, vm, wx.getSystemInfoSync().language || 'zh-Hans');
- initHooks(appOptions, hooks);
- return appOptions;
- }
- var mocks = ['__route__', '__wxExparserNodeId__', '__wxWebviewId__'];
- function findVmByVueId(vm, vuePid) {
- var $children = vm.$children;
- // 优先查找直属(反向查找:https://github.com/dcloudio/uni-app/issues/1200)
- for (var i = $children.length - 1; i >= 0; i--) {
- var childVm = $children[i];
- if (childVm.$scope._$vueId === vuePid) {
- return childVm;
- }
- }
- // 反向递归查找
- var parentVm;
- for (var _i = $children.length - 1; _i >= 0; _i--) {
- parentVm = findVmByVueId($children[_i], vuePid);
- if (parentVm) {
- return parentVm;
- }
- }
- }
- function initBehavior(options) {
- return Behavior(options);
- }
- function isPage() {
- return !!this.route;
- }
- function initRelation(detail) {
- this.triggerEvent('__l', detail);
- }
- function selectAllComponents(mpInstance, selector, $refs) {
- var components = mpInstance.selectAllComponents(selector);
- components.forEach(function (component) {
- var ref = component.dataset.ref;
- $refs[ref] = component.$vm || component;
- {
- if (component.dataset.vueGeneric === 'scoped') {
- component.selectAllComponents('.scoped-ref').forEach(function (scopedComponent) {
- selectAllComponents(scopedComponent, selector, $refs);
- });
- }
- }
- });
- }
- function initRefs(vm) {
- var mpInstance = vm.$scope;
- Object.defineProperty(vm, '$refs', {
- get: function get() {
- var $refs = {};
- selectAllComponents(mpInstance, '.vue-ref', $refs);
- // TODO 暂不考虑 for 中的 scoped
- var forComponents = mpInstance.selectAllComponents('.vue-ref-in-for');
- forComponents.forEach(function (component) {
- var ref = component.dataset.ref;
- if (!$refs[ref]) {
- $refs[ref] = [];
- }
- $refs[ref].push(component.$vm || component);
- });
- return $refs;
- } });
- }
- function handleLink(event) {var _ref4 =
- event.detail || event.value,vuePid = _ref4.vuePid,vueOptions = _ref4.vueOptions; // detail 是微信,value 是百度(dipatch)
- var parentVm;
- if (vuePid) {
- parentVm = findVmByVueId(this.$vm, vuePid);
- }
- if (!parentVm) {
- parentVm = this.$vm;
- }
- vueOptions.parent = parentVm;
- }
- function parseApp(vm) {
- return parseBaseApp(vm, {
- mocks: mocks,
- initRefs: initRefs });
- }
- function createApp(vm) {
- App(parseApp(vm));
- return vm;
- }
- var encodeReserveRE = /[!'()*]/g;
- var encodeReserveReplacer = function encodeReserveReplacer(c) {return '%' + c.charCodeAt(0).toString(16);};
- var commaRE = /%2C/g;
- // fixed encodeURIComponent which is more conformant to RFC3986:
- // - escapes [!'()*]
- // - preserve commas
- var encode = function encode(str) {return encodeURIComponent(str).
- replace(encodeReserveRE, encodeReserveReplacer).
- replace(commaRE, ',');};
- function stringifyQuery(obj) {var encodeStr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : encode;
- var res = obj ? Object.keys(obj).map(function (key) {
- var val = obj[key];
- if (val === undefined) {
- return '';
- }
- if (val === null) {
- return encodeStr(key);
- }
- if (Array.isArray(val)) {
- var result = [];
- val.forEach(function (val2) {
- if (val2 === undefined) {
- return;
- }
- if (val2 === null) {
- result.push(encodeStr(key));
- } else {
- result.push(encodeStr(key) + '=' + encodeStr(val2));
- }
- });
- return result.join('&');
- }
- return encodeStr(key) + '=' + encodeStr(val);
- }).filter(function (x) {return x.length > 0;}).join('&') : null;
- return res ? "?".concat(res) : '';
- }
- function parseBaseComponent(vueComponentOptions)
- {var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},isPage = _ref5.isPage,initRelation = _ref5.initRelation;var _initVueComponent =
- initVueComponent(_vue.default, vueComponentOptions),_initVueComponent2 = _slicedToArray(_initVueComponent, 2),VueComponent = _initVueComponent2[0],vueOptions = _initVueComponent2[1];
- var options = _objectSpread({
- multipleSlots: true,
- addGlobalClass: true },
- vueOptions.options || {});
- {
- // 微信 multipleSlots 部分情况有 bug,导致内容顺序错乱 如 u-list,提供覆盖选项
- if (vueOptions['mp-weixin'] && vueOptions['mp-weixin'].options) {
- Object.assign(options, vueOptions['mp-weixin'].options);
- }
- }
- var componentOptions = {
- options: options,
- data: initData(vueOptions, _vue.default.prototype),
- behaviors: initBehaviors(vueOptions, initBehavior),
- properties: initProperties(vueOptions.props, false, vueOptions.__file),
- lifetimes: {
- attached: function attached() {
- var properties = this.properties;
- var options = {
- mpType: isPage.call(this) ? 'page' : 'component',
- mpInstance: this,
- propsData: properties };
- initVueIds(properties.vueId, this);
- // 处理父子关系
- initRelation.call(this, {
- vuePid: this._$vuePid,
- vueOptions: options });
- // 初始化 vue 实例
- this.$vm = new VueComponent(options);
- // 处理$slots,$scopedSlots(暂不支持动态变化$slots)
- initSlots(this.$vm, properties.vueSlots);
- // 触发首次 setData
- this.$vm.$mount();
- },
- ready: function ready() {
- // 当组件 props 默认值为 true,初始化时传入 false 会导致 created,ready 触发, 但 attached 不触发
- // https://developers.weixin.qq.com/community/develop/doc/00066ae2844cc0f8eb883e2a557800
- if (this.$vm) {
- this.$vm._isMounted = true;
- this.$vm.__call_hook('mounted');
- this.$vm.__call_hook('onReady');
- }
- },
- detached: function detached() {
- this.$vm && this.$vm.$destroy();
- } },
- pageLifetimes: {
- show: function show(args) {
- this.$vm && this.$vm.__call_hook('onPageShow', args);
- },
- hide: function hide() {
- this.$vm && this.$vm.__call_hook('onPageHide');
- },
- resize: function resize(size) {
- this.$vm && this.$vm.__call_hook('onPageResize', size);
- } },
- methods: {
- __l: handleLink,
- __e: handleEvent } };
- // externalClasses
- if (vueOptions.externalClasses) {
- componentOptions.externalClasses = vueOptions.externalClasses;
- }
- if (Array.isArray(vueOptions.wxsCallMethods)) {
- vueOptions.wxsCallMethods.forEach(function (callMethod) {
- componentOptions.methods[callMethod] = function (args) {
- return this.$vm[callMethod](args);
- };
- });
- }
- if (isPage) {
- return componentOptions;
- }
- return [componentOptions, VueComponent];
- }
- function parseComponent(vueComponentOptions) {
- return parseBaseComponent(vueComponentOptions, {
- isPage: isPage,
- initRelation: initRelation });
- }
- var hooks$1 = [
- 'onShow',
- 'onHide',
- 'onUnload'];
- hooks$1.push.apply(hooks$1, PAGE_EVENT_HOOKS);
- function parseBasePage(vuePageOptions, _ref6)
- {var isPage = _ref6.isPage,initRelation = _ref6.initRelation;
- var pageOptions = parseComponent(vuePageOptions);
- initHooks(pageOptions.methods, hooks$1, vuePageOptions);
- pageOptions.methods.onLoad = function (query) {
- this.options = query;
- var copyQuery = Object.assign({}, query);
- delete copyQuery.__id__;
- this.$page = {
- fullPath: '/' + (this.route || this.is) + stringifyQuery(copyQuery) };
- this.$vm.$mp.query = query; // 兼容 mpvue
- this.$vm.__call_hook('onLoad', query);
- };
- return pageOptions;
- }
- function parsePage(vuePageOptions) {
- return parseBasePage(vuePageOptions, {
- isPage: isPage,
- initRelation: initRelation });
- }
- function createPage(vuePageOptions) {
- {
- return Component(parsePage(vuePageOptions));
- }
- }
- function createComponent(vueOptions) {
- {
- return Component(parseComponent(vueOptions));
- }
- }
- function createSubpackageApp(vm) {
- var appOptions = parseApp(vm);
- var app = getApp({
- allowDefault: true });
- vm.$scope = app;
- var globalData = app.globalData;
- if (globalData) {
- Object.keys(appOptions.globalData).forEach(function (name) {
- if (!hasOwn(globalData, name)) {
- globalData[name] = appOptions.globalData[name];
- }
- });
- }
- Object.keys(appOptions).forEach(function (name) {
- if (!hasOwn(app, name)) {
- app[name] = appOptions[name];
- }
- });
- if (isFn(appOptions.onShow) && wx.onAppShow) {
- wx.onAppShow(function () {for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {args[_key5] = arguments[_key5];}
- vm.__call_hook('onShow', args);
- });
- }
- if (isFn(appOptions.onHide) && wx.onAppHide) {
- wx.onAppHide(function () {for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {args[_key6] = arguments[_key6];}
- vm.__call_hook('onHide', args);
- });
- }
- if (isFn(appOptions.onLaunch)) {
- var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
- vm.__call_hook('onLaunch', args);
- }
- return vm;
- }
- function createPlugin(vm) {
- var appOptions = parseApp(vm);
- if (isFn(appOptions.onShow) && wx.onAppShow) {
- wx.onAppShow(function () {for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {args[_key7] = arguments[_key7];}
- vm.__call_hook('onShow', args);
- });
- }
- if (isFn(appOptions.onHide) && wx.onAppHide) {
- wx.onAppHide(function () {for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {args[_key8] = arguments[_key8];}
- vm.__call_hook('onHide', args);
- });
- }
- if (isFn(appOptions.onLaunch)) {
- var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
- vm.__call_hook('onLaunch', args);
- }
- return vm;
- }
- todos.forEach(function (todoApi) {
- protocols[todoApi] = false;
- });
- canIUses.forEach(function (canIUseApi) {
- var apiName = protocols[canIUseApi] && protocols[canIUseApi].name ? protocols[canIUseApi].name :
- canIUseApi;
- if (!wx.canIUse(apiName)) {
- protocols[canIUseApi] = false;
- }
- });
- var uni = {};
- if (typeof Proxy !== 'undefined' && "mp-weixin" !== 'app-plus') {
- uni = new Proxy({}, {
- get: function get(target, name) {
- if (hasOwn(target, name)) {
- return target[name];
- }
- if (baseApi[name]) {
- return baseApi[name];
- }
- if (api[name]) {
- return promisify(name, api[name]);
- }
- {
- if (extraApi[name]) {
- return promisify(name, extraApi[name]);
- }
- if (todoApis[name]) {
- return promisify(name, todoApis[name]);
- }
- }
- if (eventApi[name]) {
- return eventApi[name];
- }
- if (!hasOwn(wx, name) && !hasOwn(protocols, name)) {
- return;
- }
- return promisify(name, wrapper(name, wx[name]));
- },
- set: function set(target, name, value) {
- target[name] = value;
- return true;
- } });
- } else {
- Object.keys(baseApi).forEach(function (name) {
- uni[name] = baseApi[name];
- });
- {
- Object.keys(todoApis).forEach(function (name) {
- uni[name] = promisify(name, todoApis[name]);
- });
- Object.keys(extraApi).forEach(function (name) {
- uni[name] = promisify(name, todoApis[name]);
- });
- }
- Object.keys(eventApi).forEach(function (name) {
- uni[name] = eventApi[name];
- });
- Object.keys(api).forEach(function (name) {
- uni[name] = promisify(name, api[name]);
- });
- Object.keys(wx).forEach(function (name) {
- if (hasOwn(wx, name) || hasOwn(protocols, name)) {
- uni[name] = promisify(name, wrapper(name, wx[name]));
- }
- });
- }
- wx.createApp = createApp;
- wx.createPage = createPage;
- wx.createComponent = createComponent;
- wx.createSubpackageApp = createSubpackageApp;
- wx.createPlugin = createPlugin;
- var uni$1 = uni;var _default =
- uni$1;exports.default = _default;
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../webpack/buildin/global.js */ 2)))
- /***/ }),
- /* 2 */
- /*!***********************************!*\
- !*** (webpack)/buildin/global.js ***!
- \***********************************/
- /*! no static exports found */
- /***/ (function(module, exports) {
- var g;
- // This works in non-strict mode
- g = (function() {
- return this;
- })();
- try {
- // This works if eval is allowed (see CSP)
- g = g || new Function("return this")();
- } catch (e) {
- // This works if the window reference is available
- if (typeof window === "object") g = window;
- }
- // g can still be undefined, but nothing to do about it...
- // We return undefined, instead of nothing here, so it's
- // easier to handle this case. if(!global) { ...}
- module.exports = g;
- /***/ }),
- /* 3 */
- /*!******************************************************************************************!*\
- !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/mp-vue/dist/mp.runtime.esm.js ***!
- \******************************************************************************************/
- /*! exports provided: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* WEBPACK VAR INJECTION */(function(global) {/*!
- * Vue.js v2.6.11
- * (c) 2014-2022 Evan You
- * Released under the MIT License.
- */
- /* */
- var emptyObject = Object.freeze({});
- // These helpers produce better VM code in JS engines due to their
- // explicitness and function inlining.
- function isUndef (v) {
- return v === undefined || v === null
- }
- function isDef (v) {
- return v !== undefined && v !== null
- }
- function isTrue (v) {
- return v === true
- }
- function isFalse (v) {
- return v === false
- }
- /**
- * Check if value is primitive.
- */
- function isPrimitive (value) {
- return (
- typeof value === 'string' ||
- typeof value === 'number' ||
- // $flow-disable-line
- typeof value === 'symbol' ||
- typeof value === 'boolean'
- )
- }
- /**
- * Quick object check - this is primarily used to tell
- * Objects from primitive values when we know the value
- * is a JSON-compliant type.
- */
- function isObject (obj) {
- return obj !== null && typeof obj === 'object'
- }
- /**
- * Get the raw type string of a value, e.g., [object Object].
- */
- var _toString = Object.prototype.toString;
- function toRawType (value) {
- return _toString.call(value).slice(8, -1)
- }
- /**
- * Strict object type check. Only returns true
- * for plain JavaScript objects.
- */
- function isPlainObject (obj) {
- return _toString.call(obj) === '[object Object]'
- }
- function isRegExp (v) {
- return _toString.call(v) === '[object RegExp]'
- }
- /**
- * Check if val is a valid array index.
- */
- function isValidArrayIndex (val) {
- var n = parseFloat(String(val));
- return n >= 0 && Math.floor(n) === n && isFinite(val)
- }
- function isPromise (val) {
- return (
- isDef(val) &&
- typeof val.then === 'function' &&
- typeof val.catch === 'function'
- )
- }
- /**
- * Convert a value to a string that is actually rendered.
- */
- function toString (val) {
- return val == null
- ? ''
- : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)
- ? JSON.stringify(val, null, 2)
- : String(val)
- }
- /**
- * Convert an input value to a number for persistence.
- * If the conversion fails, return original string.
- */
- function toNumber (val) {
- var n = parseFloat(val);
- return isNaN(n) ? val : n
- }
- /**
- * Make a map and return a function for checking if a key
- * is in that map.
- */
- function makeMap (
- str,
- expectsLowerCase
- ) {
- var map = Object.create(null);
- var list = str.split(',');
- for (var i = 0; i < list.length; i++) {
- map[list[i]] = true;
- }
- return expectsLowerCase
- ? function (val) { return map[val.toLowerCase()]; }
- : function (val) { return map[val]; }
- }
- /**
- * Check if a tag is a built-in tag.
- */
- var isBuiltInTag = makeMap('slot,component', true);
- /**
- * Check if an attribute is a reserved attribute.
- */
- var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
- /**
- * Remove an item from an array.
- */
- function remove (arr, item) {
- if (arr.length) {
- var index = arr.indexOf(item);
- if (index > -1) {
- return arr.splice(index, 1)
- }
- }
- }
- /**
- * Check whether an object has the property.
- */
- var hasOwnProperty = Object.prototype.hasOwnProperty;
- function hasOwn (obj, key) {
- return hasOwnProperty.call(obj, key)
- }
- /**
- * Create a cached version of a pure function.
- */
- function cached (fn) {
- var cache = Object.create(null);
- return (function cachedFn (str) {
- var hit = cache[str];
- return hit || (cache[str] = fn(str))
- })
- }
- /**
- * Camelize a hyphen-delimited string.
- */
- var camelizeRE = /-(\w)/g;
- var camelize = cached(function (str) {
- return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })
- });
- /**
- * Capitalize a string.
- */
- var capitalize = cached(function (str) {
- return str.charAt(0).toUpperCase() + str.slice(1)
- });
- /**
- * Hyphenate a camelCase string.
- */
- var hyphenateRE = /\B([A-Z])/g;
- var hyphenate = cached(function (str) {
- return str.replace(hyphenateRE, '-$1').toLowerCase()
- });
- /**
- * Simple bind polyfill for environments that do not support it,
- * e.g., PhantomJS 1.x. Technically, we don't need this anymore
- * since native bind is now performant enough in most browsers.
- * But removing it would mean breaking code that was able to run in
- * PhantomJS 1.x, so this must be kept for backward compatibility.
- */
- /* istanbul ignore next */
- function polyfillBind (fn, ctx) {
- function boundFn (a) {
- var l = arguments.length;
- return l
- ? l > 1
- ? fn.apply(ctx, arguments)
- : fn.call(ctx, a)
- : fn.call(ctx)
- }
- boundFn._length = fn.length;
- return boundFn
- }
- function nativeBind (fn, ctx) {
- return fn.bind(ctx)
- }
- var bind = Function.prototype.bind
- ? nativeBind
- : polyfillBind;
- /**
- * Convert an Array-like object to a real Array.
- */
- function toArray (list, start) {
- start = start || 0;
- var i = list.length - start;
- var ret = new Array(i);
- while (i--) {
- ret[i] = list[i + start];
- }
- return ret
- }
- /**
- * Mix properties into target object.
- */
- function extend (to, _from) {
- for (var key in _from) {
- to[key] = _from[key];
- }
- return to
- }
- /**
- * Merge an Array of Objects into a single Object.
- */
- function toObject (arr) {
- var res = {};
- for (var i = 0; i < arr.length; i++) {
- if (arr[i]) {
- extend(res, arr[i]);
- }
- }
- return res
- }
- /* eslint-disable no-unused-vars */
- /**
- * Perform no operation.
- * Stubbing args to make Flow happy without leaving useless transpiled code
- * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).
- */
- function noop (a, b, c) {}
- /**
- * Always return false.
- */
- var no = function (a, b, c) { return false; };
- /* eslint-enable no-unused-vars */
- /**
- * Return the same value.
- */
- var identity = function (_) { return _; };
- /**
- * Check if two values are loosely equal - that is,
- * if they are plain objects, do they have the same shape?
- */
- function looseEqual (a, b) {
- if (a === b) { return true }
- var isObjectA = isObject(a);
- var isObjectB = isObject(b);
- if (isObjectA && isObjectB) {
- try {
- var isArrayA = Array.isArray(a);
- var isArrayB = Array.isArray(b);
- if (isArrayA && isArrayB) {
- return a.length === b.length && a.every(function (e, i) {
- return looseEqual(e, b[i])
- })
- } else if (a instanceof Date && b instanceof Date) {
- return a.getTime() === b.getTime()
- } else if (!isArrayA && !isArrayB) {
- var keysA = Object.keys(a);
- var keysB = Object.keys(b);
- return keysA.length === keysB.length && keysA.every(function (key) {
- return looseEqual(a[key], b[key])
- })
- } else {
- /* istanbul ignore next */
- return false
- }
- } catch (e) {
- /* istanbul ignore next */
- return false
- }
- } else if (!isObjectA && !isObjectB) {
- return String(a) === String(b)
- } else {
- return false
- }
- }
- /**
- * Return the first index at which a loosely equal value can be
- * found in the array (if value is a plain object, the array must
- * contain an object of the same shape), or -1 if it is not present.
- */
- function looseIndexOf (arr, val) {
- for (var i = 0; i < arr.length; i++) {
- if (looseEqual(arr[i], val)) { return i }
- }
- return -1
- }
- /**
- * Ensure a function is called only once.
- */
- function once (fn) {
- var called = false;
- return function () {
- if (!called) {
- called = true;
- fn.apply(this, arguments);
- }
- }
- }
- var ASSET_TYPES = [
- 'component',
- 'directive',
- 'filter'
- ];
- var LIFECYCLE_HOOKS = [
- 'beforeCreate',
- 'created',
- 'beforeMount',
- 'mounted',
- 'beforeUpdate',
- 'updated',
- 'beforeDestroy',
- 'destroyed',
- 'activated',
- 'deactivated',
- 'errorCaptured',
- 'serverPrefetch'
- ];
- /* */
- var config = ({
- /**
- * Option merge strategies (used in core/util/options)
- */
- // $flow-disable-line
- optionMergeStrategies: Object.create(null),
- /**
- * Whether to suppress warnings.
- */
- silent: false,
- /**
- * Show production mode tip message on boot?
- */
- productionTip: "development" !== 'production',
- /**
- * Whether to enable devtools
- */
- devtools: "development" !== 'production',
- /**
- * Whether to record perf
- */
- performance: false,
- /**
- * Error handler for watcher errors
- */
- errorHandler: null,
- /**
- * Warn handler for watcher warns
- */
- warnHandler: null,
- /**
- * Ignore certain custom elements
- */
- ignoredElements: [],
- /**
- * Custom user key aliases for v-on
- */
- // $flow-disable-line
- keyCodes: Object.create(null),
- /**
- * Check if a tag is reserved so that it cannot be registered as a
- * component. This is platform-dependent and may be overwritten.
- */
- isReservedTag: no,
- /**
- * Check if an attribute is reserved so that it cannot be used as a component
- * prop. This is platform-dependent and may be overwritten.
- */
- isReservedAttr: no,
- /**
- * Check if a tag is an unknown element.
- * Platform-dependent.
- */
- isUnknownElement: no,
- /**
- * Get the namespace of an element
- */
- getTagNamespace: noop,
- /**
- * Parse the real tag name for the specific platform.
- */
- parsePlatformTagName: identity,
- /**
- * Check if an attribute must be bound using property, e.g. value
- * Platform-dependent.
- */
- mustUseProp: no,
- /**
- * Perform updates asynchronously. Intended to be used by Vue Test Utils
- * This will significantly reduce performance if set to false.
- */
- async: true,
- /**
- * Exposed for legacy reasons
- */
- _lifecycleHooks: LIFECYCLE_HOOKS
- });
- /* */
- /**
- * unicode letters used for parsing html tags, component names and property paths.
- * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname
- * skipping \u10000-\uEFFFF due to it freezing up PhantomJS
- */
- 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/;
- /**
- * Check if a string starts with $ or _
- */
- function isReserved (str) {
- var c = (str + '').charCodeAt(0);
- return c === 0x24 || c === 0x5F
- }
- /**
- * Define a property.
- */
- function def (obj, key, val, enumerable) {
- Object.defineProperty(obj, key, {
- value: val,
- enumerable: !!enumerable,
- writable: true,
- configurable: true
- });
- }
- /**
- * Parse simple path.
- */
- var bailRE = new RegExp(("[^" + (unicodeRegExp.source) + ".$_\\d]"));
- function parsePath (path) {
- if (bailRE.test(path)) {
- return
- }
- var segments = path.split('.');
- return function (obj) {
- for (var i = 0; i < segments.length; i++) {
- if (!obj) { return }
- obj = obj[segments[i]];
- }
- return obj
- }
- }
- /* */
- // can we use __proto__?
- var hasProto = '__proto__' in {};
- // Browser environment sniffing
- var inBrowser = typeof window !== 'undefined';
- var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;
- var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();
- var UA = inBrowser && window.navigator.userAgent.toLowerCase();
- var isIE = UA && /msie|trident/.test(UA);
- var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
- var isEdge = UA && UA.indexOf('edge/') > 0;
- var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');
- var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');
- var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
- var isPhantomJS = UA && /phantomjs/.test(UA);
- var isFF = UA && UA.match(/firefox\/(\d+)/);
- // Firefox has a "watch" function on Object.prototype...
- var nativeWatch = ({}).watch;
- if (inBrowser) {
- try {
- var opts = {};
- Object.defineProperty(opts, 'passive', ({
- get: function get () {
- }
- })); // https://github.com/facebook/flow/issues/285
- window.addEventListener('test-passive', null, opts);
- } catch (e) {}
- }
- // this needs to be lazy-evaled because vue may be required before
- // vue-server-renderer can set VUE_ENV
- var _isServer;
- var isServerRendering = function () {
- if (_isServer === undefined) {
- /* istanbul ignore if */
- if (!inBrowser && !inWeex && typeof global !== 'undefined') {
- // detect presence of vue-server-renderer and avoid
- // Webpack shimming the process
- _isServer = global['process'] && global['process'].env.VUE_ENV === 'server';
- } else {
- _isServer = false;
- }
- }
- return _isServer
- };
- // detect devtools
- var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
- /* istanbul ignore next */
- function isNative (Ctor) {
- return typeof Ctor === 'function' && /native code/.test(Ctor.toString())
- }
- var hasSymbol =
- typeof Symbol !== 'undefined' && isNative(Symbol) &&
- typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);
- var _Set;
- /* istanbul ignore if */ // $flow-disable-line
- if (typeof Set !== 'undefined' && isNative(Set)) {
- // use native Set when available.
- _Set = Set;
- } else {
- // a non-standard Set polyfill that only works with primitive keys.
- _Set = /*@__PURE__*/(function () {
- function Set () {
- this.set = Object.create(null);
- }
- Set.prototype.has = function has (key) {
- return this.set[key] === true
- };
- Set.prototype.add = function add (key) {
- this.set[key] = true;
- };
- Set.prototype.clear = function clear () {
- this.set = Object.create(null);
- };
- return Set;
- }());
- }
- /* */
- var warn = noop;
- var tip = noop;
- var generateComponentTrace = (noop); // work around flow check
- var formatComponentName = (noop);
- if (true) {
- var hasConsole = typeof console !== 'undefined';
- var classifyRE = /(?:^|[-_])(\w)/g;
- var classify = function (str) { return str
- .replace(classifyRE, function (c) { return c.toUpperCase(); })
- .replace(/[-_]/g, ''); };
- warn = function (msg, vm) {
- var trace = vm ? generateComponentTrace(vm) : '';
- if (config.warnHandler) {
- config.warnHandler.call(null, msg, vm, trace);
- } else if (hasConsole && (!config.silent)) {
- console.error(("[Vue warn]: " + msg + trace));
- }
- };
- tip = function (msg, vm) {
- if (hasConsole && (!config.silent)) {
- console.warn("[Vue tip]: " + msg + (
- vm ? generateComponentTrace(vm) : ''
- ));
- }
- };
- formatComponentName = function (vm, includeFile) {
- if (vm.$root === vm) {
- if (vm.$options && vm.$options.__file) { // fixed by xxxxxx
- return ('') + vm.$options.__file
- }
- return '<Root>'
- }
- var options = typeof vm === 'function' && vm.cid != null
- ? vm.options
- : vm._isVue
- ? vm.$options || vm.constructor.options
- : vm;
- var name = options.name || options._componentTag;
- var file = options.__file;
- if (!name && file) {
- var match = file.match(/([^/\\]+)\.vue$/);
- name = match && match[1];
- }
- return (
- (name ? ("<" + (classify(name)) + ">") : "<Anonymous>") +
- (file && includeFile !== false ? (" at " + file) : '')
- )
- };
- var repeat = function (str, n) {
- var res = '';
- while (n) {
- if (n % 2 === 1) { res += str; }
- if (n > 1) { str += str; }
- n >>= 1;
- }
- return res
- };
- generateComponentTrace = function (vm) {
- if (vm._isVue && vm.$parent) {
- var tree = [];
- var currentRecursiveSequence = 0;
- while (vm && vm.$options.name !== 'PageBody') {
- if (tree.length > 0) {
- var last = tree[tree.length - 1];
- if (last.constructor === vm.constructor) {
- currentRecursiveSequence++;
- vm = vm.$parent;
- continue
- } else if (currentRecursiveSequence > 0) {
- tree[tree.length - 1] = [last, currentRecursiveSequence];
- currentRecursiveSequence = 0;
- }
- }
- !vm.$options.isReserved && tree.push(vm);
- vm = vm.$parent;
- }
- return '\n\nfound in\n\n' + tree
- .map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)
- ? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)")
- : formatComponentName(vm))); })
- .join('\n')
- } else {
- return ("\n\n(found in " + (formatComponentName(vm)) + ")")
- }
- };
- }
- /* */
- var uid = 0;
- /**
- * A dep is an observable that can have multiple
- * directives subscribing to it.
- */
- var Dep = function Dep () {
- this.id = uid++;
- this.subs = [];
- };
- Dep.prototype.addSub = function addSub (sub) {
- this.subs.push(sub);
- };
- Dep.prototype.removeSub = function removeSub (sub) {
- remove(this.subs, sub);
- };
- Dep.prototype.depend = function depend () {
- if (Dep.SharedObject.target) {
- Dep.SharedObject.target.addDep(this);
- }
- };
- Dep.prototype.notify = function notify () {
- // stabilize the subscriber list first
- var subs = this.subs.slice();
- if ( true && !config.async) {
- // subs aren't sorted in scheduler if not running async
- // we need to sort them now to make sure they fire in correct
- // order
- subs.sort(function (a, b) { return a.id - b.id; });
- }
- for (var i = 0, l = subs.length; i < l; i++) {
- subs[i].update();
- }
- };
- // The current target watcher being evaluated.
- // This is globally unique because only one watcher
- // can be evaluated at a time.
- // fixed by xxxxxx (nvue shared vuex)
- /* eslint-disable no-undef */
- Dep.SharedObject = {};
- Dep.SharedObject.target = null;
- Dep.SharedObject.targetStack = [];
- function pushTarget (target) {
- Dep.SharedObject.targetStack.push(target);
- Dep.SharedObject.target = target;
- Dep.target = target;
- }
- function popTarget () {
- Dep.SharedObject.targetStack.pop();
- Dep.SharedObject.target = Dep.SharedObject.targetStack[Dep.SharedObject.targetStack.length - 1];
- Dep.target = Dep.SharedObject.target;
- }
- /* */
- var VNode = function VNode (
- tag,
- data,
- children,
- text,
- elm,
- context,
- componentOptions,
- asyncFactory
- ) {
- this.tag = tag;
- this.data = data;
- this.children = children;
- this.text = text;
- this.elm = elm;
- this.ns = undefined;
- this.context = context;
- this.fnContext = undefined;
- this.fnOptions = undefined;
- this.fnScopeId = undefined;
- this.key = data && data.key;
- this.componentOptions = componentOptions;
- this.componentInstance = undefined;
- this.parent = undefined;
- this.raw = false;
- this.isStatic = false;
- this.isRootInsert = true;
- this.isComment = false;
- this.isCloned = false;
- this.isOnce = false;
- this.asyncFactory = asyncFactory;
- this.asyncMeta = undefined;
- this.isAsyncPlaceholder = false;
- };
- var prototypeAccessors = { child: { configurable: true } };
- // DEPRECATED: alias for componentInstance for backwards compat.
- /* istanbul ignore next */
- prototypeAccessors.child.get = function () {
- return this.componentInstance
- };
- Object.defineProperties( VNode.prototype, prototypeAccessors );
- var createEmptyVNode = function (text) {
- if ( text === void 0 ) text = '';
- var node = new VNode();
- node.text = text;
- node.isComment = true;
- return node
- };
- function createTextVNode (val) {
- return new VNode(undefined, undefined, undefined, String(val))
- }
- // optimized shallow clone
- // used for static nodes and slot nodes because they may be reused across
- // multiple renders, cloning them avoids errors when DOM manipulations rely
- // on their elm reference.
- function cloneVNode (vnode) {
- var cloned = new VNode(
- vnode.tag,
- vnode.data,
- // #7975
- // clone children array to avoid mutating original in case of cloning
- // a child.
- vnode.children && vnode.children.slice(),
- vnode.text,
- vnode.elm,
- vnode.context,
- vnode.componentOptions,
- vnode.asyncFactory
- );
- cloned.ns = vnode.ns;
- cloned.isStatic = vnode.isStatic;
- cloned.key = vnode.key;
- cloned.isComment = vnode.isComment;
- cloned.fnContext = vnode.fnContext;
- cloned.fnOptions = vnode.fnOptions;
- cloned.fnScopeId = vnode.fnScopeId;
- cloned.asyncMeta = vnode.asyncMeta;
- cloned.isCloned = true;
- return cloned
- }
- /*
- * not type checking this file because flow doesn't play well with
- * dynamically accessing methods on Array prototype
- */
- var arrayProto = Array.prototype;
- var arrayMethods = Object.create(arrayProto);
- var methodsToPatch = [
- 'push',
- 'pop',
- 'shift',
- 'unshift',
- 'splice',
- 'sort',
- 'reverse'
- ];
- /**
- * Intercept mutating methods and emit events
- */
- methodsToPatch.forEach(function (method) {
- // cache original method
- var original = arrayProto[method];
- def(arrayMethods, method, function mutator () {
- var args = [], len = arguments.length;
- while ( len-- ) args[ len ] = arguments[ len ];
- var result = original.apply(this, args);
- var ob = this.__ob__;
- var inserted;
- switch (method) {
- case 'push':
- case 'unshift':
- inserted = args;
- break
- case 'splice':
- inserted = args.slice(2);
- break
- }
- if (inserted) { ob.observeArray(inserted); }
- // notify change
- ob.dep.notify();
- return result
- });
- });
- /* */
- var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
- /**
- * In some cases we may want to disable observation inside a component's
- * update computation.
- */
- var shouldObserve = true;
- function toggleObserving (value) {
- shouldObserve = value;
- }
- /**
- * Observer class that is attached to each observed
- * object. Once attached, the observer converts the target
- * object's property keys into getter/setters that
- * collect dependencies and dispatch updates.
- */
- var Observer = function Observer (value) {
- this.value = value;
- this.dep = new Dep();
- this.vmCount = 0;
- def(value, '__ob__', this);
- if (Array.isArray(value)) {
- if (hasProto) {
- {// fixed by xxxxxx 微信小程序使用 plugins 之后,数组方法被直接挂载到了数组对象上,需要执行 copyAugment 逻辑
- if(value.push !== value.__proto__.push){
- copyAugment(value, arrayMethods, arrayKeys);
- } else {
- protoAugment(value, arrayMethods);
- }
- }
- } else {
- copyAugment(value, arrayMethods, arrayKeys);
- }
- this.observeArray(value);
- } else {
- this.walk(value);
- }
- };
- /**
- * Walk through all properties and convert them into
- * getter/setters. This method should only be called when
- * value type is Object.
- */
- Observer.prototype.walk = function walk (obj) {
- var keys = Object.keys(obj);
- for (var i = 0; i < keys.length; i++) {
- defineReactive$$1(obj, keys[i]);
- }
- };
- /**
- * Observe a list of Array items.
- */
- Observer.prototype.observeArray = function observeArray (items) {
- for (var i = 0, l = items.length; i < l; i++) {
- observe(items[i]);
- }
- };
- // helpers
- /**
- * Augment a target Object or Array by intercepting
- * the prototype chain using __proto__
- */
- function protoAugment (target, src) {
- /* eslint-disable no-proto */
- target.__proto__ = src;
- /* eslint-enable no-proto */
- }
- /**
- * Augment a target Object or Array by defining
- * hidden properties.
- */
- /* istanbul ignore next */
- function copyAugment (target, src, keys) {
- for (var i = 0, l = keys.length; i < l; i++) {
- var key = keys[i];
- def(target, key, src[key]);
- }
- }
- /**
- * Attempt to create an observer instance for a value,
- * returns the new observer if successfully observed,
- * or the existing observer if the value already has one.
- */
- function observe (value, asRootData) {
- if (!isObject(value) || value instanceof VNode) {
- return
- }
- var ob;
- if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
- ob = value.__ob__;
- } else if (
- shouldObserve &&
- !isServerRendering() &&
- (Array.isArray(value) || isPlainObject(value)) &&
- Object.isExtensible(value) &&
- !value._isVue
- ) {
- ob = new Observer(value);
- }
- if (asRootData && ob) {
- ob.vmCount++;
- }
- return ob
- }
- /**
- * Define a reactive property on an Object.
- */
- function defineReactive$$1 (
- obj,
- key,
- val,
- customSetter,
- shallow
- ) {
- var dep = new Dep();
- var property = Object.getOwnPropertyDescriptor(obj, key);
- if (property && property.configurable === false) {
- return
- }
- // cater for pre-defined getter/setters
- var getter = property && property.get;
- var setter = property && property.set;
- if ((!getter || setter) && arguments.length === 2) {
- val = obj[key];
- }
- var childOb = !shallow && observe(val);
- Object.defineProperty(obj, key, {
- enumerable: true,
- configurable: true,
- get: function reactiveGetter () {
- var value = getter ? getter.call(obj) : val;
- if (Dep.SharedObject.target) { // fixed by xxxxxx
- dep.depend();
- if (childOb) {
- childOb.dep.depend();
- if (Array.isArray(value)) {
- dependArray(value);
- }
- }
- }
- return value
- },
- set: function reactiveSetter (newVal) {
- var value = getter ? getter.call(obj) : val;
- /* eslint-disable no-self-compare */
- if (newVal === value || (newVal !== newVal && value !== value)) {
- return
- }
- /* eslint-enable no-self-compare */
- if ( true && customSetter) {
- customSetter();
- }
- // #7981: for accessor properties without setter
- if (getter && !setter) { return }
- if (setter) {
- setter.call(obj, newVal);
- } else {
- val = newVal;
- }
- childOb = !shallow && observe(newVal);
- dep.notify();
- }
- });
- }
- /**
- * Set a property on an object. Adds the new property and
- * triggers change notification if the property doesn't
- * already exist.
- */
- function set (target, key, val) {
- if ( true &&
- (isUndef(target) || isPrimitive(target))
- ) {
- warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target))));
- }
- if (Array.isArray(target) && isValidArrayIndex(key)) {
- target.length = Math.max(target.length, key);
- target.splice(key, 1, val);
- return val
- }
- if (key in target && !(key in Object.prototype)) {
- target[key] = val;
- return val
- }
- var ob = (target).__ob__;
- if (target._isVue || (ob && ob.vmCount)) {
- true && warn(
- 'Avoid adding reactive properties to a Vue instance or its root $data ' +
- 'at runtime - declare it upfront in the data option.'
- );
- return val
- }
- if (!ob) {
- target[key] = val;
- return val
- }
- defineReactive$$1(ob.value, key, val);
- ob.dep.notify();
- return val
- }
- /**
- * Delete a property and trigger change if necessary.
- */
- function del (target, key) {
- if ( true &&
- (isUndef(target) || isPrimitive(target))
- ) {
- warn(("Cannot delete reactive property on undefined, null, or primitive value: " + ((target))));
- }
- if (Array.isArray(target) && isValidArrayIndex(key)) {
- target.splice(key, 1);
- return
- }
- var ob = (target).__ob__;
- if (target._isVue || (ob && ob.vmCount)) {
- true && warn(
- 'Avoid deleting properties on a Vue instance or its root $data ' +
- '- just set it to null.'
- );
- return
- }
- if (!hasOwn(target, key)) {
- return
- }
- delete target[key];
- if (!ob) {
- return
- }
- ob.dep.notify();
- }
- /**
- * Collect dependencies on array elements when the array is touched, since
- * we cannot intercept array element access like property getters.
- */
- function dependArray (value) {
- for (var e = (void 0), i = 0, l = value.length; i < l; i++) {
- e = value[i];
- e && e.__ob__ && e.__ob__.dep.depend();
- if (Array.isArray(e)) {
- dependArray(e);
- }
- }
- }
- /* */
- /**
- * Option overwriting strategies are functions that handle
- * how to merge a parent option value and a child option
- * value into the final value.
- */
- var strats = config.optionMergeStrategies;
- /**
- * Options with restrictions
- */
- if (true) {
- strats.el = strats.propsData = function (parent, child, vm, key) {
- if (!vm) {
- warn(
- "option \"" + key + "\" can only be used during instance " +
- 'creation with the `new` keyword.'
- );
- }
- return defaultStrat(parent, child)
- };
- }
- /**
- * Helper that recursively merges two data objects together.
- */
- function mergeData (to, from) {
- if (!from) { return to }
- var key, toVal, fromVal;
- var keys = hasSymbol
- ? Reflect.ownKeys(from)
- : Object.keys(from);
- for (var i = 0; i < keys.length; i++) {
- key = keys[i];
- // in case the object is already observed...
- if (key === '__ob__') { continue }
- toVal = to[key];
- fromVal = from[key];
- if (!hasOwn(to, key)) {
- set(to, key, fromVal);
- } else if (
- toVal !== fromVal &&
- isPlainObject(toVal) &&
- isPlainObject(fromVal)
- ) {
- mergeData(toVal, fromVal);
- }
- }
- return to
- }
- /**
- * Data
- */
- function mergeDataOrFn (
- parentVal,
- childVal,
- vm
- ) {
- if (!vm) {
- // in a Vue.extend merge, both should be functions
- if (!childVal) {
- return parentVal
- }
- if (!parentVal) {
- return childVal
- }
- // when parentVal & childVal are both present,
- // we need to return a function that returns the
- // merged result of both functions... no need to
- // check if parentVal is a function here because
- // it has to be a function to pass previous merges.
- return function mergedDataFn () {
- return mergeData(
- typeof childVal === 'function' ? childVal.call(this, this) : childVal,
- typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal
- )
- }
- } else {
- return function mergedInstanceDataFn () {
- // instance merge
- var instanceData = typeof childVal === 'function'
- ? childVal.call(vm, vm)
- : childVal;
- var defaultData = typeof parentVal === 'function'
- ? parentVal.call(vm, vm)
- : parentVal;
- if (instanceData) {
- return mergeData(instanceData, defaultData)
- } else {
- return defaultData
- }
- }
- }
- }
- strats.data = function (
- parentVal,
- childVal,
- vm
- ) {
- if (!vm) {
- if (childVal && typeof childVal !== 'function') {
- true && warn(
- 'The "data" option should be a function ' +
- 'that returns a per-instance value in component ' +
- 'definitions.',
- vm
- );
- return parentVal
- }
- return mergeDataOrFn(parentVal, childVal)
- }
- return mergeDataOrFn(parentVal, childVal, vm)
- };
- /**
- * Hooks and props are merged as arrays.
- */
- function mergeHook (
- parentVal,
- childVal
- ) {
- var res = childVal
- ? parentVal
- ? parentVal.concat(childVal)
- : Array.isArray(childVal)
- ? childVal
- : [childVal]
- : parentVal;
- return res
- ? dedupeHooks(res)
- : res
- }
- function dedupeHooks (hooks) {
- var res = [];
- for (var i = 0; i < hooks.length; i++) {
- if (res.indexOf(hooks[i]) === -1) {
- res.push(hooks[i]);
- }
- }
- return res
- }
- LIFECYCLE_HOOKS.forEach(function (hook) {
- strats[hook] = mergeHook;
- });
- /**
- * Assets
- *
- * When a vm is present (instance creation), we need to do
- * a three-way merge between constructor options, instance
- * options and parent options.
- */
- function mergeAssets (
- parentVal,
- childVal,
- vm,
- key
- ) {
- var res = Object.create(parentVal || null);
- if (childVal) {
- true && assertObjectType(key, childVal, vm);
- return extend(res, childVal)
- } else {
- return res
- }
- }
- ASSET_TYPES.forEach(function (type) {
- strats[type + 's'] = mergeAssets;
- });
- /**
- * Watchers.
- *
- * Watchers hashes should not overwrite one
- * another, so we merge them as arrays.
- */
- strats.watch = function (
- parentVal,
- childVal,
- vm,
- key
- ) {
- // work around Firefox's Object.prototype.watch...
- if (parentVal === nativeWatch) { parentVal = undefined; }
- if (childVal === nativeWatch) { childVal = undefined; }
- /* istanbul ignore if */
- if (!childVal) { return Object.create(parentVal || null) }
- if (true) {
- assertObjectType(key, childVal, vm);
- }
- if (!parentVal) { return childVal }
- var ret = {};
- extend(ret, parentVal);
- for (var key$1 in childVal) {
- var parent = ret[key$1];
- var child = childVal[key$1];
- if (parent && !Array.isArray(parent)) {
- parent = [parent];
- }
- ret[key$1] = parent
- ? parent.concat(child)
- : Array.isArray(child) ? child : [child];
- }
- return ret
- };
- /**
- * Other object hashes.
- */
- strats.props =
- strats.methods =
- strats.inject =
- strats.computed = function (
- parentVal,
- childVal,
- vm,
- key
- ) {
- if (childVal && "development" !== 'production') {
- assertObjectType(key, childVal, vm);
- }
- if (!parentVal) { return childVal }
- var ret = Object.create(null);
- extend(ret, parentVal);
- if (childVal) { extend(ret, childVal); }
- return ret
- };
- strats.provide = mergeDataOrFn;
- /**
- * Default strategy.
- */
- var defaultStrat = function (parentVal, childVal) {
- return childVal === undefined
- ? parentVal
- : childVal
- };
- /**
- * Validate component names
- */
- function checkComponents (options) {
- for (var key in options.components) {
- validateComponentName(key);
- }
- }
- function validateComponentName (name) {
- if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" + (unicodeRegExp.source) + "]*$")).test(name)) {
- warn(
- 'Invalid component name: "' + name + '". Component names ' +
- 'should conform to valid custom element name in html5 specification.'
- );
- }
- if (isBuiltInTag(name) || config.isReservedTag(name)) {
- warn(
- 'Do not use built-in or reserved HTML elements as component ' +
- 'id: ' + name
- );
- }
- }
- /**
- * Ensure all props option syntax are normalized into the
- * Object-based format.
- */
- function normalizeProps (options, vm) {
- var props = options.props;
- if (!props) { return }
- var res = {};
- var i, val, name;
- if (Array.isArray(props)) {
- i = props.length;
- while (i--) {
- val = props[i];
- if (typeof val === 'string') {
- name = camelize(val);
- res[name] = { type: null };
- } else if (true) {
- warn('props must be strings when using array syntax.');
- }
- }
- } else if (isPlainObject(props)) {
- for (var key in props) {
- val = props[key];
- name = camelize(key);
- res[name] = isPlainObject(val)
- ? val
- : { type: val };
- }
- } else if (true) {
- warn(
- "Invalid value for option \"props\": expected an Array or an Object, " +
- "but got " + (toRawType(props)) + ".",
- vm
- );
- }
- options.props = res;
- }
- /**
- * Normalize all injections into Object-based format
- */
- function normalizeInject (options, vm) {
- var inject = options.inject;
- if (!inject) { return }
- var normalized = options.inject = {};
- if (Array.isArray(inject)) {
- for (var i = 0; i < inject.length; i++) {
- normalized[inject[i]] = { from: inject[i] };
- }
- } else if (isPlainObject(inject)) {
- for (var key in inject) {
- var val = inject[key];
- normalized[key] = isPlainObject(val)
- ? extend({ from: key }, val)
- : { from: val };
- }
- } else if (true) {
- warn(
- "Invalid value for option \"inject\": expected an Array or an Object, " +
- "but got " + (toRawType(inject)) + ".",
- vm
- );
- }
- }
- /**
- * Normalize raw function directives into object format.
- */
- function normalizeDirectives (options) {
- var dirs = options.directives;
- if (dirs) {
- for (var key in dirs) {
- var def$$1 = dirs[key];
- if (typeof def$$1 === 'function') {
- dirs[key] = { bind: def$$1, update: def$$1 };
- }
- }
- }
- }
- function assertObjectType (name, value, vm) {
- if (!isPlainObject(value)) {
- warn(
- "Invalid value for option \"" + name + "\": expected an Object, " +
- "but got " + (toRawType(value)) + ".",
- vm
- );
- }
- }
- /**
- * Merge two option objects into a new one.
- * Core utility used in both instantiation and inheritance.
- */
- function mergeOptions (
- parent,
- child,
- vm
- ) {
- if (true) {
- checkComponents(child);
- }
- if (typeof child === 'function') {
- child = child.options;
- }
- normalizeProps(child, vm);
- normalizeInject(child, vm);
- normalizeDirectives(child);
- // Apply extends and mixins on the child options,
- // but only if it is a raw options object that isn't
- // the result of another mergeOptions call.
- // Only merged options has the _base property.
- if (!child._base) {
- if (child.extends) {
- parent = mergeOptions(parent, child.extends, vm);
- }
- if (child.mixins) {
- for (var i = 0, l = child.mixins.length; i < l; i++) {
- parent = mergeOptions(parent, child.mixins[i], vm);
- }
- }
- }
- var options = {};
- var key;
- for (key in parent) {
- mergeField(key);
- }
- for (key in child) {
- if (!hasOwn(parent, key)) {
- mergeField(key);
- }
- }
- function mergeField (key) {
- var strat = strats[key] || defaultStrat;
- options[key] = strat(parent[key], child[key], vm, key);
- }
- return options
- }
- /**
- * Resolve an asset.
- * This function is used because child instances need access
- * to assets defined in its ancestor chain.
- */
- function resolveAsset (
- options,
- type,
- id,
- warnMissing
- ) {
- /* istanbul ignore if */
- if (typeof id !== 'string') {
- return
- }
- var assets = options[type];
- // check local registration variations first
- if (hasOwn(assets, id)) { return assets[id] }
- var camelizedId = camelize(id);
- if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }
- var PascalCaseId = capitalize(camelizedId);
- if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }
- // fallback to prototype chain
- var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];
- if ( true && warnMissing && !res) {
- warn(
- 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,
- options
- );
- }
- return res
- }
- /* */
- function validateProp (
- key,
- propOptions,
- propsData,
- vm
- ) {
- var prop = propOptions[key];
- var absent = !hasOwn(propsData, key);
- var value = propsData[key];
- // boolean casting
- var booleanIndex = getTypeIndex(Boolean, prop.type);
- if (booleanIndex > -1) {
- if (absent && !hasOwn(prop, 'default')) {
- value = false;
- } else if (value === '' || value === hyphenate(key)) {
- // only cast empty string / same name to boolean if
- // boolean has higher priority
- var stringIndex = getTypeIndex(String, prop.type);
- if (stringIndex < 0 || booleanIndex < stringIndex) {
- value = true;
- }
- }
- }
- // check default value
- if (value === undefined) {
- value = getPropDefaultValue(vm, prop, key);
- // since the default value is a fresh copy,
- // make sure to observe it.
- var prevShouldObserve = shouldObserve;
- toggleObserving(true);
- observe(value);
- toggleObserving(prevShouldObserve);
- }
- if (
- true
- ) {
- assertProp(prop, key, value, vm, absent);
- }
- return value
- }
- /**
- * Get the default value of a prop.
- */
- function getPropDefaultValue (vm, prop, key) {
- // no default, return undefined
- if (!hasOwn(prop, 'default')) {
- return undefined
- }
- var def = prop.default;
- // warn against non-factory defaults for Object & Array
- if ( true && isObject(def)) {
- warn(
- 'Invalid default value for prop "' + key + '": ' +
- 'Props with type Object/Array must use a factory function ' +
- 'to return the default value.',
- vm
- );
- }
- // the raw prop value was also undefined from previous render,
- // return previous default value to avoid unnecessary watcher trigger
- if (vm && vm.$options.propsData &&
- vm.$options.propsData[key] === undefined &&
- vm._props[key] !== undefined
- ) {
- return vm._props[key]
- }
- // call factory function for non-Function types
- // a value is Function if its prototype is function even across different execution context
- return typeof def === 'function' && getType(prop.type) !== 'Function'
- ? def.call(vm)
- : def
- }
- /**
- * Assert whether a prop is valid.
- */
- function assertProp (
- prop,
- name,
- value,
- vm,
- absent
- ) {
- if (prop.required && absent) {
- warn(
- 'Missing required prop: "' + name + '"',
- vm
- );
- return
- }
- if (value == null && !prop.required) {
- return
- }
- var type = prop.type;
- var valid = !type || type === true;
- var expectedTypes = [];
- if (type) {
- if (!Array.isArray(type)) {
- type = [type];
- }
- for (var i = 0; i < type.length && !valid; i++) {
- var assertedType = assertType(value, type[i]);
- expectedTypes.push(assertedType.expectedType || '');
- valid = assertedType.valid;
- }
- }
- if (!valid) {
- warn(
- getInvalidTypeMessage(name, value, expectedTypes),
- vm
- );
- return
- }
- var validator = prop.validator;
- if (validator) {
- if (!validator(value)) {
- warn(
- 'Invalid prop: custom validator check failed for prop "' + name + '".',
- vm
- );
- }
- }
- }
- var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;
- function assertType (value, type) {
- var valid;
- var expectedType = getType(type);
- if (simpleCheckRE.test(expectedType)) {
- var t = typeof value;
- valid = t === expectedType.toLowerCase();
- // for primitive wrapper objects
- if (!valid && t === 'object') {
- valid = value instanceof type;
- }
- } else if (expectedType === 'Object') {
- valid = isPlainObject(value);
- } else if (expectedType === 'Array') {
- valid = Array.isArray(value);
- } else {
- valid = value instanceof type;
- }
- return {
- valid: valid,
- expectedType: expectedType
- }
- }
- /**
- * Use function string name to check built-in types,
- * because a simple equality check will fail when running
- * across different vms / iframes.
- */
- function getType (fn) {
- var match = fn && fn.toString().match(/^\s*function (\w+)/);
- return match ? match[1] : ''
- }
- function isSameType (a, b) {
- return getType(a) === getType(b)
- }
- function getTypeIndex (type, expectedTypes) {
- if (!Array.isArray(expectedTypes)) {
- return isSameType(expectedTypes, type) ? 0 : -1
- }
- for (var i = 0, len = expectedTypes.length; i < len; i++) {
- if (isSameType(expectedTypes[i], type)) {
- return i
- }
- }
- return -1
- }
- function getInvalidTypeMessage (name, value, expectedTypes) {
- var message = "Invalid prop: type check failed for prop \"" + name + "\"." +
- " Expected " + (expectedTypes.map(capitalize).join(', '));
- var expectedType = expectedTypes[0];
- var receivedType = toRawType(value);
- var expectedValue = styleValue(value, expectedType);
- var receivedValue = styleValue(value, receivedType);
- // check if we need to specify expected value
- if (expectedTypes.length === 1 &&
- isExplicable(expectedType) &&
- !isBoolean(expectedType, receivedType)) {
- message += " with value " + expectedValue;
- }
- message += ", got " + receivedType + " ";
- // check if we need to specify received value
- if (isExplicable(receivedType)) {
- message += "with value " + receivedValue + ".";
- }
- return message
- }
- function styleValue (value, type) {
- if (type === 'String') {
- return ("\"" + value + "\"")
- } else if (type === 'Number') {
- return ("" + (Number(value)))
- } else {
- return ("" + value)
- }
- }
- function isExplicable (value) {
- var explicitTypes = ['string', 'number', 'boolean'];
- return explicitTypes.some(function (elem) { return value.toLowerCase() === elem; })
- }
- function isBoolean () {
- var args = [], len = arguments.length;
- while ( len-- ) args[ len ] = arguments[ len ];
- return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; })
- }
- /* */
- function handleError (err, vm, info) {
- // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.
- // See: https://github.com/vuejs/vuex/issues/1505
- pushTarget();
- try {
- if (vm) {
- var cur = vm;
- while ((cur = cur.$parent)) {
- var hooks = cur.$options.errorCaptured;
- if (hooks) {
- for (var i = 0; i < hooks.length; i++) {
- try {
- var capture = hooks[i].call(cur, err, vm, info) === false;
- if (capture) { return }
- } catch (e) {
- globalHandleError(e, cur, 'errorCaptured hook');
- }
- }
- }
- }
- }
- globalHandleError(err, vm, info);
- } finally {
- popTarget();
- }
- }
- function invokeWithErrorHandling (
- handler,
- context,
- args,
- vm,
- info
- ) {
- var res;
- try {
- res = args ? handler.apply(context, args) : handler.call(context);
- if (res && !res._isVue && isPromise(res) && !res._handled) {
- res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); });
- // issue #9511
- // avoid catch triggering multiple times when nested calls
- res._handled = true;
- }
- } catch (e) {
- handleError(e, vm, info);
- }
- return res
- }
- function globalHandleError (err, vm, info) {
- if (config.errorHandler) {
- try {
- return config.errorHandler.call(null, err, vm, info)
- } catch (e) {
- // if the user intentionally throws the original error in the handler,
- // do not log it twice
- if (e !== err) {
- logError(e, null, 'config.errorHandler');
- }
- }
- }
- logError(err, vm, info);
- }
- function logError (err, vm, info) {
- if (true) {
- warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
- }
- /* istanbul ignore else */
- if ((inBrowser || inWeex) && typeof console !== 'undefined') {
- console.error(err);
- } else {
- throw err
- }
- }
- /* */
- var callbacks = [];
- var pending = false;
- function flushCallbacks () {
- pending = false;
- var copies = callbacks.slice(0);
- callbacks.length = 0;
- for (var i = 0; i < copies.length; i++) {
- copies[i]();
- }
- }
- // Here we have async deferring wrappers using microtasks.
- // In 2.5 we used (macro) tasks (in combination with microtasks).
- // However, it has subtle problems when state is changed right before repaint
- // (e.g. #6813, out-in transitions).
- // Also, using (macro) tasks in event handler would cause some weird behaviors
- // that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).
- // So we now use microtasks everywhere, again.
- // A major drawback of this tradeoff is that there are some scenarios
- // where microtasks have too high a priority and fire in between supposedly
- // sequential events (e.g. #4521, #6690, which have workarounds)
- // or even between bubbling of the same event (#6566).
- var timerFunc;
- // The nextTick behavior leverages the microtask queue, which can be accessed
- // via either native Promise.then or MutationObserver.
- // MutationObserver has wider support, however it is seriously bugged in
- // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It
- // completely stops working after triggering a few times... so, if native
- // Promise is available, we will use it:
- /* istanbul ignore next, $flow-disable-line */
- if (typeof Promise !== 'undefined' && isNative(Promise)) {
- var p = Promise.resolve();
- timerFunc = function () {
- p.then(flushCallbacks);
- // In problematic UIWebViews, Promise.then doesn't completely break, but
- // it can get stuck in a weird state where callbacks are pushed into the
- // microtask queue but the queue isn't being flushed, until the browser
- // needs to do some other work, e.g. handle a timer. Therefore we can
- // "force" the microtask queue to be flushed by adding an empty timer.
- if (isIOS) { setTimeout(noop); }
- };
- } else if (!isIE && typeof MutationObserver !== 'undefined' && (
- isNative(MutationObserver) ||
- // PhantomJS and iOS 7.x
- MutationObserver.toString() === '[object MutationObserverConstructor]'
- )) {
- // Use MutationObserver where native Promise is not available,
- // e.g. PhantomJS, iOS7, Android 4.4
- // (#6466 MutationObserver is unreliable in IE11)
- var counter = 1;
- var observer = new MutationObserver(flushCallbacks);
- var textNode = document.createTextNode(String(counter));
- observer.observe(textNode, {
- characterData: true
- });
- timerFunc = function () {
- counter = (counter + 1) % 2;
- textNode.data = String(counter);
- };
- } else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
- // Fallback to setImmediate.
- // Technically it leverages the (macro) task queue,
- // but it is still a better choice than setTimeout.
- timerFunc = function () {
- setImmediate(flushCallbacks);
- };
- } else {
- // Fallback to setTimeout.
- timerFunc = function () {
- setTimeout(flushCallbacks, 0);
- };
- }
- function nextTick (cb, ctx) {
- var _resolve;
- callbacks.push(function () {
- if (cb) {
- try {
- cb.call(ctx);
- } catch (e) {
- handleError(e, ctx, 'nextTick');
- }
- } else if (_resolve) {
- _resolve(ctx);
- }
- });
- if (!pending) {
- pending = true;
- timerFunc();
- }
- // $flow-disable-line
- if (!cb && typeof Promise !== 'undefined') {
- return new Promise(function (resolve) {
- _resolve = resolve;
- })
- }
- }
- /* */
- /* not type checking this file because flow doesn't play well with Proxy */
- var initProxy;
- if (true) {
- var allowedGlobals = makeMap(
- 'Infinity,undefined,NaN,isFinite,isNaN,' +
- 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
- 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +
- 'require' // for Webpack/Browserify
- );
- var warnNonPresent = function (target, key) {
- warn(
- "Property or method \"" + key + "\" is not defined on the instance but " +
- 'referenced during render. Make sure that this property is reactive, ' +
- 'either in the data option, or for class-based components, by ' +
- 'initializing the property. ' +
- 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',
- target
- );
- };
- var warnReservedPrefix = function (target, key) {
- warn(
- "Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " +
- 'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
- 'prevent conflicts with Vue internals. ' +
- 'See: https://vuejs.org/v2/api/#data',
- target
- );
- };
- var hasProxy =
- typeof Proxy !== 'undefined' && isNative(Proxy);
- if (hasProxy) {
- var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');
- config.keyCodes = new Proxy(config.keyCodes, {
- set: function set (target, key, value) {
- if (isBuiltInModifier(key)) {
- warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key));
- return false
- } else {
- target[key] = value;
- return true
- }
- }
- });
- }
- var hasHandler = {
- has: function has (target, key) {
- var has = key in target;
- var isAllowed = allowedGlobals(key) ||
- (typeof key === 'string' && key.charAt(0) === '_' && !(key in target.$data));
- if (!has && !isAllowed) {
- if (key in target.$data) { warnReservedPrefix(target, key); }
- else { warnNonPresent(target, key); }
- }
- return has || !isAllowed
- }
- };
- var getHandler = {
- get: function get (target, key) {
- if (typeof key === 'string' && !(key in target)) {
- if (key in target.$data) { warnReservedPrefix(target, key); }
- else { warnNonPresent(target, key); }
- }
- return target[key]
- }
- };
- initProxy = function initProxy (vm) {
- if (hasProxy) {
- // determine which proxy handler to use
- var options = vm.$options;
- var handlers = options.render && options.render._withStripped
- ? getHandler
- : hasHandler;
- vm._renderProxy = new Proxy(vm, handlers);
- } else {
- vm._renderProxy = vm;
- }
- };
- }
- /* */
- var seenObjects = new _Set();
- /**
- * Recursively traverse an object to evoke all converted
- * getters, so that every nested property inside the object
- * is collected as a "deep" dependency.
- */
- function traverse (val) {
- _traverse(val, seenObjects);
- seenObjects.clear();
- }
- function _traverse (val, seen) {
- var i, keys;
- var isA = Array.isArray(val);
- if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) {
- return
- }
- if (val.__ob__) {
- var depId = val.__ob__.dep.id;
- if (seen.has(depId)) {
- return
- }
- seen.add(depId);
- }
- if (isA) {
- i = val.length;
- while (i--) { _traverse(val[i], seen); }
- } else {
- keys = Object.keys(val);
- i = keys.length;
- while (i--) { _traverse(val[keys[i]], seen); }
- }
- }
- var mark;
- var measure;
- if (true) {
- var perf = inBrowser && window.performance;
- /* istanbul ignore if */
- if (
- perf &&
- perf.mark &&
- perf.measure &&
- perf.clearMarks &&
- perf.clearMeasures
- ) {
- mark = function (tag) { return perf.mark(tag); };
- measure = function (name, startTag, endTag) {
- perf.measure(name, startTag, endTag);
- perf.clearMarks(startTag);
- perf.clearMarks(endTag);
- // perf.clearMeasures(name)
- };
- }
- }
- /* */
- var normalizeEvent = cached(function (name) {
- var passive = name.charAt(0) === '&';
- name = passive ? name.slice(1) : name;
- var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first
- name = once$$1 ? name.slice(1) : name;
- var capture = name.charAt(0) === '!';
- name = capture ? name.slice(1) : name;
- return {
- name: name,
- once: once$$1,
- capture: capture,
- passive: passive
- }
- });
- function createFnInvoker (fns, vm) {
- function invoker () {
- var arguments$1 = arguments;
- var fns = invoker.fns;
- if (Array.isArray(fns)) {
- var cloned = fns.slice();
- for (var i = 0; i < cloned.length; i++) {
- invokeWithErrorHandling(cloned[i], null, arguments$1, vm, "v-on handler");
- }
- } else {
- // return handler return value for single handlers
- return invokeWithErrorHandling(fns, null, arguments, vm, "v-on handler")
- }
- }
- invoker.fns = fns;
- return invoker
- }
- function updateListeners (
- on,
- oldOn,
- add,
- remove$$1,
- createOnceHandler,
- vm
- ) {
- var name, def$$1, cur, old, event;
- for (name in on) {
- def$$1 = cur = on[name];
- old = oldOn[name];
- event = normalizeEvent(name);
- if (isUndef(cur)) {
- true && warn(
- "Invalid handler for event \"" + (event.name) + "\": got " + String(cur),
- vm
- );
- } else if (isUndef(old)) {
- if (isUndef(cur.fns)) {
- cur = on[name] = createFnInvoker(cur, vm);
- }
- if (isTrue(event.once)) {
- cur = on[name] = createOnceHandler(event.name, cur, event.capture);
- }
- add(event.name, cur, event.capture, event.passive, event.params);
- } else if (cur !== old) {
- old.fns = cur;
- on[name] = old;
- }
- }
- for (name in oldOn) {
- if (isUndef(on[name])) {
- event = normalizeEvent(name);
- remove$$1(event.name, oldOn[name], event.capture);
- }
- }
- }
- /* */
- /* */
- // fixed by xxxxxx (mp properties)
- function extractPropertiesFromVNodeData(data, Ctor, res, context) {
- var propOptions = Ctor.options.mpOptions && Ctor.options.mpOptions.properties;
- if (isUndef(propOptions)) {
- return res
- }
- var externalClasses = Ctor.options.mpOptions.externalClasses || [];
- var attrs = data.attrs;
- var props = data.props;
- if (isDef(attrs) || isDef(props)) {
- for (var key in propOptions) {
- var altKey = hyphenate(key);
- var result = checkProp(res, props, key, altKey, true) ||
- checkProp(res, attrs, key, altKey, false);
- // externalClass
- if (
- result &&
- res[key] &&
- externalClasses.indexOf(altKey) !== -1 &&
- context[camelize(res[key])]
- ) {
- // 赋值 externalClass 真正的值(模板里 externalClass 的值可能是字符串)
- res[key] = context[camelize(res[key])];
- }
- }
- }
- return res
- }
- function extractPropsFromVNodeData (
- data,
- Ctor,
- tag,
- context// fixed by xxxxxx
- ) {
- // we are only extracting raw values here.
- // validation and default values are handled in the child
- // component itself.
- var propOptions = Ctor.options.props;
- if (isUndef(propOptions)) {
- // fixed by xxxxxx
- return extractPropertiesFromVNodeData(data, Ctor, {}, context)
- }
- var res = {};
- var attrs = data.attrs;
- var props = data.props;
- if (isDef(attrs) || isDef(props)) {
- for (var key in propOptions) {
- var altKey = hyphenate(key);
- if (true) {
- var keyInLowerCase = key.toLowerCase();
- if (
- key !== keyInLowerCase &&
- attrs && hasOwn(attrs, keyInLowerCase)
- ) {
- tip(
- "Prop \"" + keyInLowerCase + "\" is passed to component " +
- (formatComponentName(tag || Ctor)) + ", but the declared prop name is" +
- " \"" + key + "\". " +
- "Note that HTML attributes are case-insensitive and camelCased " +
- "props need to use their kebab-case equivalents when using in-DOM " +
- "templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\"."
- );
- }
- }
- checkProp(res, props, key, altKey, true) ||
- checkProp(res, attrs, key, altKey, false);
- }
- }
- // fixed by xxxxxx
- return extractPropertiesFromVNodeData(data, Ctor, res, context)
- }
- function checkProp (
- res,
- hash,
- key,
- altKey,
- preserve
- ) {
- if (isDef(hash)) {
- if (hasOwn(hash, key)) {
- res[key] = hash[key];
- if (!preserve) {
- delete hash[key];
- }
- return true
- } else if (hasOwn(hash, altKey)) {
- res[key] = hash[altKey];
- if (!preserve) {
- delete hash[altKey];
- }
- return true
- }
- }
- return false
- }
- /* */
- // The template compiler attempts to minimize the need for normalization by
- // statically analyzing the template at compile time.
- //
- // For plain HTML markup, normalization can be completely skipped because the
- // generated render function is guaranteed to return Array<VNode>. There are
- // two cases where extra normalization is needed:
- // 1. When the children contains components - because a functional component
- // may return an Array instead of a single root. In this case, just a simple
- // normalization is needed - if any child is an Array, we flatten the whole
- // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
- // because functional components already normalize their own children.
- function simpleNormalizeChildren (children) {
- for (var i = 0; i < children.length; i++) {
- if (Array.isArray(children[i])) {
- return Array.prototype.concat.apply([], children)
- }
- }
- return children
- }
- // 2. When the children contains constructs that always generated nested Arrays,
- // e.g. <template>, <slot>, v-for, or when the children is provided by user
- // with hand-written render functions / JSX. In such cases a full normalization
- // is needed to cater to all possible types of children values.
- function normalizeChildren (children) {
- return isPrimitive(children)
- ? [createTextVNode(children)]
- : Array.isArray(children)
- ? normalizeArrayChildren(children)
- : undefined
- }
- function isTextNode (node) {
- return isDef(node) && isDef(node.text) && isFalse(node.isComment)
- }
- function normalizeArrayChildren (children, nestedIndex) {
- var res = [];
- var i, c, lastIndex, last;
- for (i = 0; i < children.length; i++) {
- c = children[i];
- if (isUndef(c) || typeof c === 'boolean') { continue }
- lastIndex = res.length - 1;
- last = res[lastIndex];
- // nested
- if (Array.isArray(c)) {
- if (c.length > 0) {
- c = normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i));
- // merge adjacent text nodes
- if (isTextNode(c[0]) && isTextNode(last)) {
- res[lastIndex] = createTextVNode(last.text + (c[0]).text);
- c.shift();
- }
- res.push.apply(res, c);
- }
- } else if (isPrimitive(c)) {
- if (isTextNode(last)) {
- // merge adjacent text nodes
- // this is necessary for SSR hydration because text nodes are
- // essentially merged when rendered to HTML strings
- res[lastIndex] = createTextVNode(last.text + c);
- } else if (c !== '') {
- // convert primitive to vnode
- res.push(createTextVNode(c));
- }
- } else {
- if (isTextNode(c) && isTextNode(last)) {
- // merge adjacent text nodes
- res[lastIndex] = createTextVNode(last.text + c.text);
- } else {
- // default key for nested array children (likely generated by v-for)
- if (isTrue(children._isVList) &&
- isDef(c.tag) &&
- isUndef(c.key) &&
- isDef(nestedIndex)) {
- c.key = "__vlist" + nestedIndex + "_" + i + "__";
- }
- res.push(c);
- }
- }
- }
- return res
- }
- /* */
- function initProvide (vm) {
- var provide = vm.$options.provide;
- if (provide) {
- vm._provided = typeof provide === 'function'
- ? provide.call(vm)
- : provide;
- }
- }
- function initInjections (vm) {
- var result = resolveInject(vm.$options.inject, vm);
- if (result) {
- toggleObserving(false);
- Object.keys(result).forEach(function (key) {
- /* istanbul ignore else */
- if (true) {
- defineReactive$$1(vm, key, result[key], function () {
- warn(
- "Avoid mutating an injected value directly since the changes will be " +
- "overwritten whenever the provided component re-renders. " +
- "injection being mutated: \"" + key + "\"",
- vm
- );
- });
- } else {}
- });
- toggleObserving(true);
- }
- }
- function resolveInject (inject, vm) {
- if (inject) {
- // inject is :any because flow is not smart enough to figure out cached
- var result = Object.create(null);
- var keys = hasSymbol
- ? Reflect.ownKeys(inject)
- : Object.keys(inject);
- for (var i = 0; i < keys.length; i++) {
- var key = keys[i];
- // #6574 in case the inject object is observed...
- if (key === '__ob__') { continue }
- var provideKey = inject[key].from;
- var source = vm;
- while (source) {
- if (source._provided && hasOwn(source._provided, provideKey)) {
- result[key] = source._provided[provideKey];
- break
- }
- source = source.$parent;
- }
- if (!source) {
- if ('default' in inject[key]) {
- var provideDefault = inject[key].default;
- result[key] = typeof provideDefault === 'function'
- ? provideDefault.call(vm)
- : provideDefault;
- } else if (true) {
- warn(("Injection \"" + key + "\" not found"), vm);
- }
- }
- }
- return result
- }
- }
- /* */
- /**
- * Runtime helper for resolving raw children VNodes into a slot object.
- */
- function resolveSlots (
- children,
- context
- ) {
- if (!children || !children.length) {
- return {}
- }
- var slots = {};
- for (var i = 0, l = children.length; i < l; i++) {
- var child = children[i];
- var data = child.data;
- // remove slot attribute if the node is resolved as a Vue slot node
- if (data && data.attrs && data.attrs.slot) {
- delete data.attrs.slot;
- }
- // named slots should only be respected if the vnode was rendered in the
- // same context.
- if ((child.context === context || child.fnContext === context) &&
- data && data.slot != null
- ) {
- var name = data.slot;
- var slot = (slots[name] || (slots[name] = []));
- if (child.tag === 'template') {
- slot.push.apply(slot, child.children || []);
- } else {
- slot.push(child);
- }
- } else {
- // fixed by xxxxxx 临时 hack 掉 uni-app 中的异步 name slot page
- if(child.asyncMeta && child.asyncMeta.data && child.asyncMeta.data.slot === 'page'){
- (slots['page'] || (slots['page'] = [])).push(child);
- }else{
- (slots.default || (slots.default = [])).push(child);
- }
- }
- }
- // ignore slots that contains only whitespace
- for (var name$1 in slots) {
- if (slots[name$1].every(isWhitespace)) {
- delete slots[name$1];
- }
- }
- return slots
- }
- function isWhitespace (node) {
- return (node.isComment && !node.asyncFactory) || node.text === ' '
- }
- /* */
- function normalizeScopedSlots (
- slots,
- normalSlots,
- prevSlots
- ) {
- var res;
- var hasNormalSlots = Object.keys(normalSlots).length > 0;
- var isStable = slots ? !!slots.$stable : !hasNormalSlots;
- var key = slots && slots.$key;
- if (!slots) {
- res = {};
- } else if (slots._normalized) {
- // fast path 1: child component re-render only, parent did not change
- return slots._normalized
- } else if (
- isStable &&
- prevSlots &&
- prevSlots !== emptyObject &&
- key === prevSlots.$key &&
- !hasNormalSlots &&
- !prevSlots.$hasNormal
- ) {
- // fast path 2: stable scoped slots w/ no normal slots to proxy,
- // only need to normalize once
- return prevSlots
- } else {
- res = {};
- for (var key$1 in slots) {
- if (slots[key$1] && key$1[0] !== '$') {
- res[key$1] = normalizeScopedSlot(normalSlots, key$1, slots[key$1]);
- }
- }
- }
- // expose normal slots on scopedSlots
- for (var key$2 in normalSlots) {
- if (!(key$2 in res)) {
- res[key$2] = proxyNormalSlot(normalSlots, key$2);
- }
- }
- // avoriaz seems to mock a non-extensible $scopedSlots object
- // and when that is passed down this would cause an error
- if (slots && Object.isExtensible(slots)) {
- (slots)._normalized = res;
- }
- def(res, '$stable', isStable);
- def(res, '$key', key);
- def(res, '$hasNormal', hasNormalSlots);
- return res
- }
- function normalizeScopedSlot(normalSlots, key, fn) {
- var normalized = function () {
- var res = arguments.length ? fn.apply(null, arguments) : fn({});
- res = res && typeof res === 'object' && !Array.isArray(res)
- ? [res] // single vnode
- : normalizeChildren(res);
- return res && (
- res.length === 0 ||
- (res.length === 1 && res[0].isComment) // #9658
- ) ? undefined
- : res
- };
- // this is a slot using the new v-slot syntax without scope. although it is
- // compiled as a scoped slot, render fn users would expect it to be present
- // on this.$slots because the usage is semantically a normal slot.
- if (fn.proxy) {
- Object.defineProperty(normalSlots, key, {
- get: normalized,
- enumerable: true,
- configurable: true
- });
- }
- return normalized
- }
- function proxyNormalSlot(slots, key) {
- return function () { return slots[key]; }
- }
- /* */
- /**
- * Runtime helper for rendering v-for lists.
- */
- function renderList (
- val,
- render
- ) {
- var ret, i, l, keys, key;
- if (Array.isArray(val) || typeof val === 'string') {
- ret = new Array(val.length);
- for (i = 0, l = val.length; i < l; i++) {
- ret[i] = render(val[i], i, i, i); // fixed by xxxxxx
- }
- } else if (typeof val === 'number') {
- ret = new Array(val);
- for (i = 0; i < val; i++) {
- ret[i] = render(i + 1, i, i, i); // fixed by xxxxxx
- }
- } else if (isObject(val)) {
- if (hasSymbol && val[Symbol.iterator]) {
- ret = [];
- var iterator = val[Symbol.iterator]();
- var result = iterator.next();
- while (!result.done) {
- ret.push(render(result.value, ret.length, i, i++)); // fixed by xxxxxx
- result = iterator.next();
- }
- } else {
- keys = Object.keys(val);
- ret = new Array(keys.length);
- for (i = 0, l = keys.length; i < l; i++) {
- key = keys[i];
- ret[i] = render(val[key], key, i, i); // fixed by xxxxxx
- }
- }
- }
- if (!isDef(ret)) {
- ret = [];
- }
- (ret)._isVList = true;
- return ret
- }
- /* */
- /**
- * Runtime helper for rendering <slot>
- */
- function renderSlot (
- name,
- fallback,
- props,
- bindObject
- ) {
- var scopedSlotFn = this.$scopedSlots[name];
- var nodes;
- if (scopedSlotFn) { // scoped slot
- props = props || {};
- if (bindObject) {
- if ( true && !isObject(bindObject)) {
- warn(
- 'slot v-bind without argument expects an Object',
- this
- );
- }
- props = extend(extend({}, bindObject), props);
- }
- // fixed by xxxxxx app-plus scopedSlot
- nodes = scopedSlotFn(props, this, props._i) || fallback;
- } else {
- nodes = this.$slots[name] || fallback;
- }
- var target = props && props.slot;
- if (target) {
- return this.$createElement('template', { slot: target }, nodes)
- } else {
- return nodes
- }
- }
- /* */
- /**
- * Runtime helper for resolving filters
- */
- function resolveFilter (id) {
- return resolveAsset(this.$options, 'filters', id, true) || identity
- }
- /* */
- function isKeyNotMatch (expect, actual) {
- if (Array.isArray(expect)) {
- return expect.indexOf(actual) === -1
- } else {
- return expect !== actual
- }
- }
- /**
- * Runtime helper for checking keyCodes from config.
- * exposed as Vue.prototype._k
- * passing in eventKeyName as last argument separately for backwards compat
- */
- function checkKeyCodes (
- eventKeyCode,
- key,
- builtInKeyCode,
- eventKeyName,
- builtInKeyName
- ) {
- var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;
- if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {
- return isKeyNotMatch(builtInKeyName, eventKeyName)
- } else if (mappedKeyCode) {
- return isKeyNotMatch(mappedKeyCode, eventKeyCode)
- } else if (eventKeyName) {
- return hyphenate(eventKeyName) !== key
- }
- }
- /* */
- /**
- * Runtime helper for merging v-bind="object" into a VNode's data.
- */
- function bindObjectProps (
- data,
- tag,
- value,
- asProp,
- isSync
- ) {
- if (value) {
- if (!isObject(value)) {
- true && warn(
- 'v-bind without argument expects an Object or Array value',
- this
- );
- } else {
- if (Array.isArray(value)) {
- value = toObject(value);
- }
- var hash;
- var loop = function ( key ) {
- if (
- key === 'class' ||
- key === 'style' ||
- isReservedAttribute(key)
- ) {
- hash = data;
- } else {
- var type = data.attrs && data.attrs.type;
- hash = asProp || config.mustUseProp(tag, type, key)
- ? data.domProps || (data.domProps = {})
- : data.attrs || (data.attrs = {});
- }
- var camelizedKey = camelize(key);
- var hyphenatedKey = hyphenate(key);
- if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
- hash[key] = value[key];
- if (isSync) {
- var on = data.on || (data.on = {});
- on[("update:" + key)] = function ($event) {
- value[key] = $event;
- };
- }
- }
- };
- for (var key in value) loop( key );
- }
- }
- return data
- }
- /* */
- /**
- * Runtime helper for rendering static trees.
- */
- function renderStatic (
- index,
- isInFor
- ) {
- var cached = this._staticTrees || (this._staticTrees = []);
- var tree = cached[index];
- // if has already-rendered static tree and not inside v-for,
- // we can reuse the same tree.
- if (tree && !isInFor) {
- return tree
- }
- // otherwise, render a fresh tree.
- tree = cached[index] = this.$options.staticRenderFns[index].call(
- this._renderProxy,
- null,
- this // for render fns generated for functional component templates
- );
- markStatic(tree, ("__static__" + index), false);
- return tree
- }
- /**
- * Runtime helper for v-once.
- * Effectively it means marking the node as static with a unique key.
- */
- function markOnce (
- tree,
- index,
- key
- ) {
- markStatic(tree, ("__once__" + index + (key ? ("_" + key) : "")), true);
- return tree
- }
- function markStatic (
- tree,
- key,
- isOnce
- ) {
- if (Array.isArray(tree)) {
- for (var i = 0; i < tree.length; i++) {
- if (tree[i] && typeof tree[i] !== 'string') {
- markStaticNode(tree[i], (key + "_" + i), isOnce);
- }
- }
- } else {
- markStaticNode(tree, key, isOnce);
- }
- }
- function markStaticNode (node, key, isOnce) {
- node.isStatic = true;
- node.key = key;
- node.isOnce = isOnce;
- }
- /* */
- function bindObjectListeners (data, value) {
- if (value) {
- if (!isPlainObject(value)) {
- true && warn(
- 'v-on without argument expects an Object value',
- this
- );
- } else {
- var on = data.on = data.on ? extend({}, data.on) : {};
- for (var key in value) {
- var existing = on[key];
- var ours = value[key];
- on[key] = existing ? [].concat(existing, ours) : ours;
- }
- }
- }
- return data
- }
- /* */
- function resolveScopedSlots (
- fns, // see flow/vnode
- res,
- // the following are added in 2.6
- hasDynamicKeys,
- contentHashKey
- ) {
- res = res || { $stable: !hasDynamicKeys };
- for (var i = 0; i < fns.length; i++) {
- var slot = fns[i];
- if (Array.isArray(slot)) {
- resolveScopedSlots(slot, res, hasDynamicKeys);
- } else if (slot) {
- // marker for reverse proxying v-slot without scope on this.$slots
- if (slot.proxy) {
- slot.fn.proxy = true;
- }
- res[slot.key] = slot.fn;
- }
- }
- if (contentHashKey) {
- (res).$key = contentHashKey;
- }
- return res
- }
- /* */
- function bindDynamicKeys (baseObj, values) {
- for (var i = 0; i < values.length; i += 2) {
- var key = values[i];
- if (typeof key === 'string' && key) {
- baseObj[values[i]] = values[i + 1];
- } else if ( true && key !== '' && key !== null) {
- // null is a special value for explicitly removing a binding
- warn(
- ("Invalid value for dynamic directive argument (expected string or null): " + key),
- this
- );
- }
- }
- return baseObj
- }
- // helper to dynamically append modifier runtime markers to event names.
- // ensure only append when value is already string, otherwise it will be cast
- // to string and cause the type check to miss.
- function prependModifier (value, symbol) {
- return typeof value === 'string' ? symbol + value : value
- }
- /* */
- function installRenderHelpers (target) {
- target._o = markOnce;
- target._n = toNumber;
- target._s = toString;
- target._l = renderList;
- target._t = renderSlot;
- target._q = looseEqual;
- target._i = looseIndexOf;
- target._m = renderStatic;
- target._f = resolveFilter;
- target._k = checkKeyCodes;
- target._b = bindObjectProps;
- target._v = createTextVNode;
- target._e = createEmptyVNode;
- target._u = resolveScopedSlots;
- target._g = bindObjectListeners;
- target._d = bindDynamicKeys;
- target._p = prependModifier;
- }
- /* */
- function FunctionalRenderContext (
- data,
- props,
- children,
- parent,
- Ctor
- ) {
- var this$1 = this;
- var options = Ctor.options;
- // ensure the createElement function in functional components
- // gets a unique context - this is necessary for correct named slot check
- var contextVm;
- if (hasOwn(parent, '_uid')) {
- contextVm = Object.create(parent);
- // $flow-disable-line
- contextVm._original = parent;
- } else {
- // the context vm passed in is a functional context as well.
- // in this case we want to make sure we are able to get a hold to the
- // real context instance.
- contextVm = parent;
- // $flow-disable-line
- parent = parent._original;
- }
- var isCompiled = isTrue(options._compiled);
- var needNormalization = !isCompiled;
- this.data = data;
- this.props = props;
- this.children = children;
- this.parent = parent;
- this.listeners = data.on || emptyObject;
- this.injections = resolveInject(options.inject, parent);
- this.slots = function () {
- if (!this$1.$slots) {
- normalizeScopedSlots(
- data.scopedSlots,
- this$1.$slots = resolveSlots(children, parent)
- );
- }
- return this$1.$slots
- };
- Object.defineProperty(this, 'scopedSlots', ({
- enumerable: true,
- get: function get () {
- return normalizeScopedSlots(data.scopedSlots, this.slots())
- }
- }));
- // support for compiled functional template
- if (isCompiled) {
- // exposing $options for renderStatic()
- this.$options = options;
- // pre-resolve slots for renderSlot()
- this.$slots = this.slots();
- this.$scopedSlots = normalizeScopedSlots(data.scopedSlots, this.$slots);
- }
- if (options._scopeId) {
- this._c = function (a, b, c, d) {
- var vnode = createElement(contextVm, a, b, c, d, needNormalization);
- if (vnode && !Array.isArray(vnode)) {
- vnode.fnScopeId = options._scopeId;
- vnode.fnContext = parent;
- }
- return vnode
- };
- } else {
- this._c = function (a, b, c, d) { return createElement(contextVm, a, b, c, d, needNormalization); };
- }
- }
- installRenderHelpers(FunctionalRenderContext.prototype);
- function createFunctionalComponent (
- Ctor,
- propsData,
- data,
- contextVm,
- children
- ) {
- var options = Ctor.options;
- var props = {};
- var propOptions = options.props;
- if (isDef(propOptions)) {
- for (var key in propOptions) {
- props[key] = validateProp(key, propOptions, propsData || emptyObject);
- }
- } else {
- if (isDef(data.attrs)) { mergeProps(props, data.attrs); }
- if (isDef(data.props)) { mergeProps(props, data.props); }
- }
- var renderContext = new FunctionalRenderContext(
- data,
- props,
- children,
- contextVm,
- Ctor
- );
- var vnode = options.render.call(null, renderContext._c, renderContext);
- if (vnode instanceof VNode) {
- return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext)
- } else if (Array.isArray(vnode)) {
- var vnodes = normalizeChildren(vnode) || [];
- var res = new Array(vnodes.length);
- for (var i = 0; i < vnodes.length; i++) {
- res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);
- }
- return res
- }
- }
- function cloneAndMarkFunctionalResult (vnode, data, contextVm, options, renderContext) {
- // #7817 clone node before setting fnContext, otherwise if the node is reused
- // (e.g. it was from a cached normal slot) the fnContext causes named slots
- // that should not be matched to match.
- var clone = cloneVNode(vnode);
- clone.fnContext = contextVm;
- clone.fnOptions = options;
- if (true) {
- (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext = renderContext;
- }
- if (data.slot) {
- (clone.data || (clone.data = {})).slot = data.slot;
- }
- return clone
- }
- function mergeProps (to, from) {
- for (var key in from) {
- to[camelize(key)] = from[key];
- }
- }
- /* */
- /* */
- /* */
- /* */
- // inline hooks to be invoked on component VNodes during patch
- var componentVNodeHooks = {
- init: function init (vnode, hydrating) {
- if (
- vnode.componentInstance &&
- !vnode.componentInstance._isDestroyed &&
- vnode.data.keepAlive
- ) {
- // kept-alive components, treat as a patch
- var mountedNode = vnode; // work around flow
- componentVNodeHooks.prepatch(mountedNode, mountedNode);
- } else {
- var child = vnode.componentInstance = createComponentInstanceForVnode(
- vnode,
- activeInstance
- );
- child.$mount(hydrating ? vnode.elm : undefined, hydrating);
- }
- },
- prepatch: function prepatch (oldVnode, vnode) {
- var options = vnode.componentOptions;
- var child = vnode.componentInstance = oldVnode.componentInstance;
- updateChildComponent(
- child,
- options.propsData, // updated props
- options.listeners, // updated listeners
- vnode, // new parent vnode
- options.children // new children
- );
- },
- insert: function insert (vnode) {
- var context = vnode.context;
- var componentInstance = vnode.componentInstance;
- if (!componentInstance._isMounted) {
- callHook(componentInstance, 'onServiceCreated');
- callHook(componentInstance, 'onServiceAttached');
- componentInstance._isMounted = true;
- callHook(componentInstance, 'mounted');
- }
- if (vnode.data.keepAlive) {
- if (context._isMounted) {
- // vue-router#1212
- // During updates, a kept-alive component's child components may
- // change, so directly walking the tree here may call activated hooks
- // on incorrect children. Instead we push them into a queue which will
- // be processed after the whole patch process ended.
- queueActivatedComponent(componentInstance);
- } else {
- activateChildComponent(componentInstance, true /* direct */);
- }
- }
- },
- destroy: function destroy (vnode) {
- var componentInstance = vnode.componentInstance;
- if (!componentInstance._isDestroyed) {
- if (!vnode.data.keepAlive) {
- componentInstance.$destroy();
- } else {
- deactivateChildComponent(componentInstance, true /* direct */);
- }
- }
- }
- };
- var hooksToMerge = Object.keys(componentVNodeHooks);
- function createComponent (
- Ctor,
- data,
- context,
- children,
- tag
- ) {
- if (isUndef(Ctor)) {
- return
- }
- var baseCtor = context.$options._base;
- // plain options object: turn it into a constructor
- if (isObject(Ctor)) {
- Ctor = baseCtor.extend(Ctor);
- }
- // if at this stage it's not a constructor or an async component factory,
- // reject.
- if (typeof Ctor !== 'function') {
- if (true) {
- warn(("Invalid Component definition: " + (String(Ctor))), context);
- }
- return
- }
- // async component
- var asyncFactory;
- if (isUndef(Ctor.cid)) {
- asyncFactory = Ctor;
- Ctor = resolveAsyncComponent(asyncFactory, baseCtor);
- if (Ctor === undefined) {
- // return a placeholder node for async component, which is rendered
- // as a comment node but preserves all the raw information for the node.
- // the information will be used for async server-rendering and hydration.
- return createAsyncPlaceholder(
- asyncFactory,
- data,
- context,
- children,
- tag
- )
- }
- }
- data = data || {};
- // resolve constructor options in case global mixins are applied after
- // component constructor creation
- resolveConstructorOptions(Ctor);
- // transform component v-model data into props & events
- if (isDef(data.model)) {
- transformModel(Ctor.options, data);
- }
- // extract props
- var propsData = extractPropsFromVNodeData(data, Ctor, tag, context); // fixed by xxxxxx
- // functional component
- if (isTrue(Ctor.options.functional)) {
- return createFunctionalComponent(Ctor, propsData, data, context, children)
- }
- // extract listeners, since these needs to be treated as
- // child component listeners instead of DOM listeners
- var listeners = data.on;
- // replace with listeners with .native modifier
- // so it gets processed during parent component patch.
- data.on = data.nativeOn;
- if (isTrue(Ctor.options.abstract)) {
- // abstract components do not keep anything
- // other than props & listeners & slot
- // work around flow
- var slot = data.slot;
- data = {};
- if (slot) {
- data.slot = slot;
- }
- }
- // install component management hooks onto the placeholder node
- installComponentHooks(data);
- // return a placeholder vnode
- var name = Ctor.options.name || tag;
- var vnode = new VNode(
- ("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')),
- data, undefined, undefined, undefined, context,
- { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children },
- asyncFactory
- );
- return vnode
- }
- function createComponentInstanceForVnode (
- vnode, // we know it's MountedComponentVNode but flow doesn't
- parent // activeInstance in lifecycle state
- ) {
- var options = {
- _isComponent: true,
- _parentVnode: vnode,
- parent: parent
- };
- // check inline-template render functions
- var inlineTemplate = vnode.data.inlineTemplate;
- if (isDef(inlineTemplate)) {
- options.render = inlineTemplate.render;
- options.staticRenderFns = inlineTemplate.staticRenderFns;
- }
- return new vnode.componentOptions.Ctor(options)
- }
- function installComponentHooks (data) {
- var hooks = data.hook || (data.hook = {});
- for (var i = 0; i < hooksToMerge.length; i++) {
- var key = hooksToMerge[i];
- var existing = hooks[key];
- var toMerge = componentVNodeHooks[key];
- if (existing !== toMerge && !(existing && existing._merged)) {
- hooks[key] = existing ? mergeHook$1(toMerge, existing) : toMerge;
- }
- }
- }
- function mergeHook$1 (f1, f2) {
- var merged = function (a, b) {
- // flow complains about extra args which is why we use any
- f1(a, b);
- f2(a, b);
- };
- merged._merged = true;
- return merged
- }
- // transform component v-model info (value and callback) into
- // prop and event handler respectively.
- function transformModel (options, data) {
- var prop = (options.model && options.model.prop) || 'value';
- var event = (options.model && options.model.event) || 'input'
- ;(data.attrs || (data.attrs = {}))[prop] = data.model.value;
- var on = data.on || (data.on = {});
- var existing = on[event];
- var callback = data.model.callback;
- if (isDef(existing)) {
- if (
- Array.isArray(existing)
- ? existing.indexOf(callback) === -1
- : existing !== callback
- ) {
- on[event] = [callback].concat(existing);
- }
- } else {
- on[event] = callback;
- }
- }
- /* */
- var SIMPLE_NORMALIZE = 1;
- var ALWAYS_NORMALIZE = 2;
- // wrapper function for providing a more flexible interface
- // without getting yelled at by flow
- function createElement (
- context,
- tag,
- data,
- children,
- normalizationType,
- alwaysNormalize
- ) {
- if (Array.isArray(data) || isPrimitive(data)) {
- normalizationType = children;
- children = data;
- data = undefined;
- }
- if (isTrue(alwaysNormalize)) {
- normalizationType = ALWAYS_NORMALIZE;
- }
- return _createElement(context, tag, data, children, normalizationType)
- }
- function _createElement (
- context,
- tag,
- data,
- children,
- normalizationType
- ) {
- if (isDef(data) && isDef((data).__ob__)) {
- true && warn(
- "Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" +
- 'Always create fresh vnode data objects in each render!',
- context
- );
- return createEmptyVNode()
- }
- // object syntax in v-bind
- if (isDef(data) && isDef(data.is)) {
- tag = data.is;
- }
- if (!tag) {
- // in case of component :is set to falsy value
- return createEmptyVNode()
- }
- // warn against non-primitive key
- if ( true &&
- isDef(data) && isDef(data.key) && !isPrimitive(data.key)
- ) {
- {
- warn(
- 'Avoid using non-primitive value as key, ' +
- 'use string/number value instead.',
- context
- );
- }
- }
- // support single function children as default scoped slot
- if (Array.isArray(children) &&
- typeof children[0] === 'function'
- ) {
- data = data || {};
- data.scopedSlots = { default: children[0] };
- children.length = 0;
- }
- if (normalizationType === ALWAYS_NORMALIZE) {
- children = normalizeChildren(children);
- } else if (normalizationType === SIMPLE_NORMALIZE) {
- children = simpleNormalizeChildren(children);
- }
- var vnode, ns;
- if (typeof tag === 'string') {
- var Ctor;
- ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
- if (config.isReservedTag(tag)) {
- // platform built-in elements
- if ( true && isDef(data) && isDef(data.nativeOn)) {
- warn(
- ("The .native modifier for v-on is only valid on components but it was used on <" + tag + ">."),
- context
- );
- }
- vnode = new VNode(
- config.parsePlatformTagName(tag), data, children,
- undefined, undefined, context
- );
- } else if ((!data || !data.pre) && isDef(Ctor = resolveAsset(context.$options, 'components', tag))) {
- // component
- vnode = createComponent(Ctor, data, context, children, tag);
- } else {
- // unknown or unlisted namespaced elements
- // check at runtime because it may get assigned a namespace when its
- // parent normalizes children
- vnode = new VNode(
- tag, data, children,
- undefined, undefined, context
- );
- }
- } else {
- // direct component options / constructor
- vnode = createComponent(tag, data, context, children);
- }
- if (Array.isArray(vnode)) {
- return vnode
- } else if (isDef(vnode)) {
- if (isDef(ns)) { applyNS(vnode, ns); }
- if (isDef(data)) { registerDeepBindings(data); }
- return vnode
- } else {
- return createEmptyVNode()
- }
- }
- function applyNS (vnode, ns, force) {
- vnode.ns = ns;
- if (vnode.tag === 'foreignObject') {
- // use default namespace inside foreignObject
- ns = undefined;
- force = true;
- }
- if (isDef(vnode.children)) {
- for (var i = 0, l = vnode.children.length; i < l; i++) {
- var child = vnode.children[i];
- if (isDef(child.tag) && (
- isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {
- applyNS(child, ns, force);
- }
- }
- }
- }
- // ref #5318
- // necessary to ensure parent re-render when deep bindings like :style and
- // :class are used on slot nodes
- function registerDeepBindings (data) {
- if (isObject(data.style)) {
- traverse(data.style);
- }
- if (isObject(data.class)) {
- traverse(data.class);
- }
- }
- /* */
- function initRender (vm) {
- vm._vnode = null; // the root of the child tree
- vm._staticTrees = null; // v-once cached trees
- var options = vm.$options;
- var parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree
- var renderContext = parentVnode && parentVnode.context;
- vm.$slots = resolveSlots(options._renderChildren, renderContext);
- vm.$scopedSlots = emptyObject;
- // bind the createElement fn to this instance
- // so that we get proper render context inside it.
- // args order: tag, data, children, normalizationType, alwaysNormalize
- // internal version is used by render functions compiled from templates
- vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };
- // normalization is always applied for the public version, used in
- // user-written render functions.
- vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };
- // $attrs & $listeners are exposed for easier HOC creation.
- // they need to be reactive so that HOCs using them are always updated
- var parentData = parentVnode && parentVnode.data;
- /* istanbul ignore else */
- if (true) {
- defineReactive$$1(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () {
- !isUpdatingChildComponent && warn("$attrs is readonly.", vm);
- }, true);
- defineReactive$$1(vm, '$listeners', options._parentListeners || emptyObject, function () {
- !isUpdatingChildComponent && warn("$listeners is readonly.", vm);
- }, true);
- } else {}
- }
- var currentRenderingInstance = null;
- function renderMixin (Vue) {
- // install runtime convenience helpers
- installRenderHelpers(Vue.prototype);
- Vue.prototype.$nextTick = function (fn) {
- return nextTick(fn, this)
- };
- Vue.prototype._render = function () {
- var vm = this;
- var ref = vm.$options;
- var render = ref.render;
- var _parentVnode = ref._parentVnode;
- if (_parentVnode) {
- vm.$scopedSlots = normalizeScopedSlots(
- _parentVnode.data.scopedSlots,
- vm.$slots,
- vm.$scopedSlots
- );
- }
- // set parent vnode. this allows render functions to have access
- // to the data on the placeholder node.
- vm.$vnode = _parentVnode;
- // render self
- var vnode;
- try {
- // There's no need to maintain a stack because all render fns are called
- // separately from one another. Nested component's render fns are called
- // when parent component is patched.
- currentRenderingInstance = vm;
- vnode = render.call(vm._renderProxy, vm.$createElement);
- } catch (e) {
- handleError(e, vm, "render");
- // return error render result,
- // or previous vnode to prevent render error causing blank component
- /* istanbul ignore else */
- if ( true && vm.$options.renderError) {
- try {
- vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);
- } catch (e) {
- handleError(e, vm, "renderError");
- vnode = vm._vnode;
- }
- } else {
- vnode = vm._vnode;
- }
- } finally {
- currentRenderingInstance = null;
- }
- // if the returned array contains only a single node, allow it
- if (Array.isArray(vnode) && vnode.length === 1) {
- vnode = vnode[0];
- }
- // return empty vnode in case the render function errored out
- if (!(vnode instanceof VNode)) {
- if ( true && Array.isArray(vnode)) {
- warn(
- 'Multiple root nodes returned from render function. Render function ' +
- 'should return a single root node.',
- vm
- );
- }
- vnode = createEmptyVNode();
- }
- // set parent
- vnode.parent = _parentVnode;
- return vnode
- };
- }
- /* */
- function ensureCtor (comp, base) {
- if (
- comp.__esModule ||
- (hasSymbol && comp[Symbol.toStringTag] === 'Module')
- ) {
- comp = comp.default;
- }
- return isObject(comp)
- ? base.extend(comp)
- : comp
- }
- function createAsyncPlaceholder (
- factory,
- data,
- context,
- children,
- tag
- ) {
- var node = createEmptyVNode();
- node.asyncFactory = factory;
- node.asyncMeta = { data: data, context: context, children: children, tag: tag };
- return node
- }
- function resolveAsyncComponent (
- factory,
- baseCtor
- ) {
- if (isTrue(factory.error) && isDef(factory.errorComp)) {
- return factory.errorComp
- }
- if (isDef(factory.resolved)) {
- return factory.resolved
- }
- var owner = currentRenderingInstance;
- if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
- // already pending
- factory.owners.push(owner);
- }
- if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
- return factory.loadingComp
- }
- if (owner && !isDef(factory.owners)) {
- var owners = factory.owners = [owner];
- var sync = true;
- var timerLoading = null;
- var timerTimeout = null
- ;(owner).$on('hook:destroyed', function () { return remove(owners, owner); });
- var forceRender = function (renderCompleted) {
- for (var i = 0, l = owners.length; i < l; i++) {
- (owners[i]).$forceUpdate();
- }
- if (renderCompleted) {
- owners.length = 0;
- if (timerLoading !== null) {
- clearTimeout(timerLoading);
- timerLoading = null;
- }
- if (timerTimeout !== null) {
- clearTimeout(timerTimeout);
- timerTimeout = null;
- }
- }
- };
- var resolve = once(function (res) {
- // cache resolved
- factory.resolved = ensureCtor(res, baseCtor);
- // invoke callbacks only if this is not a synchronous resolve
- // (async resolves are shimmed as synchronous during SSR)
- if (!sync) {
- forceRender(true);
- } else {
- owners.length = 0;
- }
- });
- var reject = once(function (reason) {
- true && warn(
- "Failed to resolve async component: " + (String(factory)) +
- (reason ? ("\nReason: " + reason) : '')
- );
- if (isDef(factory.errorComp)) {
- factory.error = true;
- forceRender(true);
- }
- });
- var res = factory(resolve, reject);
- if (isObject(res)) {
- if (isPromise(res)) {
- // () => Promise
- if (isUndef(factory.resolved)) {
- res.then(resolve, reject);
- }
- } else if (isPromise(res.component)) {
- res.component.then(resolve, reject);
- if (isDef(res.error)) {
- factory.errorComp = ensureCtor(res.error, baseCtor);
- }
- if (isDef(res.loading)) {
- factory.loadingComp = ensureCtor(res.loading, baseCtor);
- if (res.delay === 0) {
- factory.loading = true;
- } else {
- timerLoading = setTimeout(function () {
- timerLoading = null;
- if (isUndef(factory.resolved) && isUndef(factory.error)) {
- factory.loading = true;
- forceRender(false);
- }
- }, res.delay || 200);
- }
- }
- if (isDef(res.timeout)) {
- timerTimeout = setTimeout(function () {
- timerTimeout = null;
- if (isUndef(factory.resolved)) {
- reject(
- true
- ? ("timeout (" + (res.timeout) + "ms)")
- : undefined
- );
- }
- }, res.timeout);
- }
- }
- }
- sync = false;
- // return in case resolved synchronously
- return factory.loading
- ? factory.loadingComp
- : factory.resolved
- }
- }
- /* */
- function isAsyncPlaceholder (node) {
- return node.isComment && node.asyncFactory
- }
- /* */
- function getFirstComponentChild (children) {
- if (Array.isArray(children)) {
- for (var i = 0; i < children.length; i++) {
- var c = children[i];
- if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {
- return c
- }
- }
- }
- }
- /* */
- /* */
- function initEvents (vm) {
- vm._events = Object.create(null);
- vm._hasHookEvent = false;
- // init parent attached events
- var listeners = vm.$options._parentListeners;
- if (listeners) {
- updateComponentListeners(vm, listeners);
- }
- }
- var target;
- function add (event, fn) {
- target.$on(event, fn);
- }
- function remove$1 (event, fn) {
- target.$off(event, fn);
- }
- function createOnceHandler (event, fn) {
- var _target = target;
- return function onceHandler () {
- var res = fn.apply(null, arguments);
- if (res !== null) {
- _target.$off(event, onceHandler);
- }
- }
- }
- function updateComponentListeners (
- vm,
- listeners,
- oldListeners
- ) {
- target = vm;
- updateListeners(listeners, oldListeners || {}, add, remove$1, createOnceHandler, vm);
- target = undefined;
- }
- function eventsMixin (Vue) {
- var hookRE = /^hook:/;
- Vue.prototype.$on = function (event, fn) {
- var vm = this;
- if (Array.isArray(event)) {
- for (var i = 0, l = event.length; i < l; i++) {
- vm.$on(event[i], fn);
- }
- } else {
- (vm._events[event] || (vm._events[event] = [])).push(fn);
- // optimize hook:event cost by using a boolean flag marked at registration
- // instead of a hash lookup
- if (hookRE.test(event)) {
- vm._hasHookEvent = true;
- }
- }
- return vm
- };
- Vue.prototype.$once = function (event, fn) {
- var vm = this;
- function on () {
- vm.$off(event, on);
- fn.apply(vm, arguments);
- }
- on.fn = fn;
- vm.$on(event, on);
- return vm
- };
- Vue.prototype.$off = function (event, fn) {
- var vm = this;
- // all
- if (!arguments.length) {
- vm._events = Object.create(null);
- return vm
- }
- // array of events
- if (Array.isArray(event)) {
- for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {
- vm.$off(event[i$1], fn);
- }
- return vm
- }
- // specific event
- var cbs = vm._events[event];
- if (!cbs) {
- return vm
- }
- if (!fn) {
- vm._events[event] = null;
- return vm
- }
- // specific handler
- var cb;
- var i = cbs.length;
- while (i--) {
- cb = cbs[i];
- if (cb === fn || cb.fn === fn) {
- cbs.splice(i, 1);
- break
- }
- }
- return vm
- };
- Vue.prototype.$emit = function (event) {
- var vm = this;
- if (true) {
- var lowerCaseEvent = event.toLowerCase();
- if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {
- tip(
- "Event \"" + lowerCaseEvent + "\" is emitted in component " +
- (formatComponentName(vm)) + " but the handler is registered for \"" + event + "\". " +
- "Note that HTML attributes are case-insensitive and you cannot use " +
- "v-on to listen to camelCase events when using in-DOM templates. " +
- "You should probably use \"" + (hyphenate(event)) + "\" instead of \"" + event + "\"."
- );
- }
- }
- var cbs = vm._events[event];
- if (cbs) {
- cbs = cbs.length > 1 ? toArray(cbs) : cbs;
- var args = toArray(arguments, 1);
- var info = "event handler for \"" + event + "\"";
- for (var i = 0, l = cbs.length; i < l; i++) {
- invokeWithErrorHandling(cbs[i], vm, args, vm, info);
- }
- }
- return vm
- };
- }
- /* */
- var activeInstance = null;
- var isUpdatingChildComponent = false;
- function setActiveInstance(vm) {
- var prevActiveInstance = activeInstance;
- activeInstance = vm;
- return function () {
- activeInstance = prevActiveInstance;
- }
- }
- function initLifecycle (vm) {
- var options = vm.$options;
- // locate first non-abstract parent
- var parent = options.parent;
- if (parent && !options.abstract) {
- while (parent.$options.abstract && parent.$parent) {
- parent = parent.$parent;
- }
- parent.$children.push(vm);
- }
- vm.$parent = parent;
- vm.$root = parent ? parent.$root : vm;
- vm.$children = [];
- vm.$refs = {};
- vm._watcher = null;
- vm._inactive = null;
- vm._directInactive = false;
- vm._isMounted = false;
- vm._isDestroyed = false;
- vm._isBeingDestroyed = false;
- }
- function lifecycleMixin (Vue) {
- Vue.prototype._update = function (vnode, hydrating) {
- var vm = this;
- var prevEl = vm.$el;
- var prevVnode = vm._vnode;
- var restoreActiveInstance = setActiveInstance(vm);
- vm._vnode = vnode;
- // Vue.prototype.__patch__ is injected in entry points
- // based on the rendering backend used.
- if (!prevVnode) {
- // initial render
- vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */);
- } else {
- // updates
- vm.$el = vm.__patch__(prevVnode, vnode);
- }
- restoreActiveInstance();
- // update __vue__ reference
- if (prevEl) {
- prevEl.__vue__ = null;
- }
- if (vm.$el) {
- vm.$el.__vue__ = vm;
- }
- // if parent is an HOC, update its $el as well
- if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {
- vm.$parent.$el = vm.$el;
- }
- // updated hook is called by the scheduler to ensure that children are
- // updated in a parent's updated hook.
- };
- Vue.prototype.$forceUpdate = function () {
- var vm = this;
- if (vm._watcher) {
- vm._watcher.update();
- }
- };
- Vue.prototype.$destroy = function () {
- var vm = this;
- if (vm._isBeingDestroyed) {
- return
- }
- callHook(vm, 'beforeDestroy');
- vm._isBeingDestroyed = true;
- // remove self from parent
- var parent = vm.$parent;
- if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {
- remove(parent.$children, vm);
- }
- // teardown watchers
- if (vm._watcher) {
- vm._watcher.teardown();
- }
- var i = vm._watchers.length;
- while (i--) {
- vm._watchers[i].teardown();
- }
- // remove reference from data ob
- // frozen object may not have observer.
- if (vm._data.__ob__) {
- vm._data.__ob__.vmCount--;
- }
- // call the last hook...
- vm._isDestroyed = true;
- // invoke destroy hooks on current rendered tree
- vm.__patch__(vm._vnode, null);
- // fire destroyed hook
- callHook(vm, 'destroyed');
- // turn off all instance listeners.
- vm.$off();
- // remove __vue__ reference
- if (vm.$el) {
- vm.$el.__vue__ = null;
- }
- // release circular reference (#6759)
- if (vm.$vnode) {
- vm.$vnode.parent = null;
- }
- };
- }
- function updateChildComponent (
- vm,
- propsData,
- listeners,
- parentVnode,
- renderChildren
- ) {
- if (true) {
- isUpdatingChildComponent = true;
- }
- // determine whether component has slot children
- // we need to do this before overwriting $options._renderChildren.
- // check if there are dynamic scopedSlots (hand-written or compiled but with
- // dynamic slot names). Static scoped slots compiled from template has the
- // "$stable" marker.
- var newScopedSlots = parentVnode.data.scopedSlots;
- var oldScopedSlots = vm.$scopedSlots;
- var hasDynamicScopedSlot = !!(
- (newScopedSlots && !newScopedSlots.$stable) ||
- (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||
- (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key)
- );
- // Any static slot children from the parent may have changed during parent's
- // update. Dynamic scoped slots may also have changed. In such cases, a forced
- // update is necessary to ensure correctness.
- var needsForceUpdate = !!(
- renderChildren || // has new static slots
- vm.$options._renderChildren || // has old static slots
- hasDynamicScopedSlot
- );
- vm.$options._parentVnode = parentVnode;
- vm.$vnode = parentVnode; // update vm's placeholder node without re-render
- if (vm._vnode) { // update child tree's parent
- vm._vnode.parent = parentVnode;
- }
- vm.$options._renderChildren = renderChildren;
- // update $attrs and $listeners hash
- // these are also reactive so they may trigger child update if the child
- // used them during render
- vm.$attrs = parentVnode.data.attrs || emptyObject;
- vm.$listeners = listeners || emptyObject;
- // update props
- if (propsData && vm.$options.props) {
- toggleObserving(false);
- var props = vm._props;
- var propKeys = vm.$options._propKeys || [];
- for (var i = 0; i < propKeys.length; i++) {
- var key = propKeys[i];
- var propOptions = vm.$options.props; // wtf flow?
- props[key] = validateProp(key, propOptions, propsData, vm);
- }
- toggleObserving(true);
- // keep a copy of raw propsData
- vm.$options.propsData = propsData;
- }
-
- // fixed by xxxxxx update properties(mp runtime)
- vm._$updateProperties && vm._$updateProperties(vm);
-
- // update listeners
- listeners = listeners || emptyObject;
- var oldListeners = vm.$options._parentListeners;
- vm.$options._parentListeners = listeners;
- updateComponentListeners(vm, listeners, oldListeners);
- // resolve slots + force update if has children
- if (needsForceUpdate) {
- vm.$slots = resolveSlots(renderChildren, parentVnode.context);
- vm.$forceUpdate();
- }
- if (true) {
- isUpdatingChildComponent = false;
- }
- }
- function isInInactiveTree (vm) {
- while (vm && (vm = vm.$parent)) {
- if (vm._inactive) { return true }
- }
- return false
- }
- function activateChildComponent (vm, direct) {
- if (direct) {
- vm._directInactive = false;
- if (isInInactiveTree(vm)) {
- return
- }
- } else if (vm._directInactive) {
- return
- }
- if (vm._inactive || vm._inactive === null) {
- vm._inactive = false;
- for (var i = 0; i < vm.$children.length; i++) {
- activateChildComponent(vm.$children[i]);
- }
- callHook(vm, 'activated');
- }
- }
- function deactivateChildComponent (vm, direct) {
- if (direct) {
- vm._directInactive = true;
- if (isInInactiveTree(vm)) {
- return
- }
- }
- if (!vm._inactive) {
- vm._inactive = true;
- for (var i = 0; i < vm.$children.length; i++) {
- deactivateChildComponent(vm.$children[i]);
- }
- callHook(vm, 'deactivated');
- }
- }
- function callHook (vm, hook) {
- // #7573 disable dep collection when invoking lifecycle hooks
- pushTarget();
- var handlers = vm.$options[hook];
- var info = hook + " hook";
- if (handlers) {
- for (var i = 0, j = handlers.length; i < j; i++) {
- invokeWithErrorHandling(handlers[i], vm, null, vm, info);
- }
- }
- if (vm._hasHookEvent) {
- vm.$emit('hook:' + hook);
- }
- popTarget();
- }
- /* */
- var MAX_UPDATE_COUNT = 100;
- var queue = [];
- var activatedChildren = [];
- var has = {};
- var circular = {};
- var waiting = false;
- var flushing = false;
- var index = 0;
- /**
- * Reset the scheduler's state.
- */
- function resetSchedulerState () {
- index = queue.length = activatedChildren.length = 0;
- has = {};
- if (true) {
- circular = {};
- }
- waiting = flushing = false;
- }
- // Async edge case #6566 requires saving the timestamp when event listeners are
- // attached. However, calling performance.now() has a perf overhead especially
- // if the page has thousands of event listeners. Instead, we take a timestamp
- // every time the scheduler flushes and use that for all event listeners
- // attached during that flush.
- var currentFlushTimestamp = 0;
- // Async edge case fix requires storing an event listener's attach timestamp.
- var getNow = Date.now;
- // Determine what event timestamp the browser is using. Annoyingly, the
- // timestamp can either be hi-res (relative to page load) or low-res
- // (relative to UNIX epoch), so in order to compare time we have to use the
- // same timestamp type when saving the flush timestamp.
- // All IE versions use low-res event timestamps, and have problematic clock
- // implementations (#9632)
- if (inBrowser && !isIE) {
- var performance = window.performance;
- if (
- performance &&
- typeof performance.now === 'function' &&
- getNow() > document.createEvent('Event').timeStamp
- ) {
- // if the event timestamp, although evaluated AFTER the Date.now(), is
- // smaller than it, it means the event is using a hi-res timestamp,
- // and we need to use the hi-res version for event listener timestamps as
- // well.
- getNow = function () { return performance.now(); };
- }
- }
- /**
- * Flush both queues and run the watchers.
- */
- function flushSchedulerQueue () {
- currentFlushTimestamp = getNow();
- flushing = true;
- var watcher, id;
- // Sort queue before flush.
- // This ensures that:
- // 1. Components are updated from parent to child. (because parent is always
- // created before the child)
- // 2. A component's user watchers are run before its render watcher (because
- // user watchers are created before the render watcher)
- // 3. If a component is destroyed during a parent component's watcher run,
- // its watchers can be skipped.
- queue.sort(function (a, b) { return a.id - b.id; });
- // do not cache length because more watchers might be pushed
- // as we run existing watchers
- for (index = 0; index < queue.length; index++) {
- watcher = queue[index];
- if (watcher.before) {
- watcher.before();
- }
- id = watcher.id;
- has[id] = null;
- watcher.run();
- // in dev build, check and stop circular updates.
- if ( true && has[id] != null) {
- circular[id] = (circular[id] || 0) + 1;
- if (circular[id] > MAX_UPDATE_COUNT) {
- warn(
- 'You may have an infinite update loop ' + (
- watcher.user
- ? ("in watcher with expression \"" + (watcher.expression) + "\"")
- : "in a component render function."
- ),
- watcher.vm
- );
- break
- }
- }
- }
- // keep copies of post queues before resetting state
- var activatedQueue = activatedChildren.slice();
- var updatedQueue = queue.slice();
- resetSchedulerState();
- // call component updated and activated hooks
- callActivatedHooks(activatedQueue);
- callUpdatedHooks(updatedQueue);
- // devtool hook
- /* istanbul ignore if */
- if (devtools && config.devtools) {
- devtools.emit('flush');
- }
- }
- function callUpdatedHooks (queue) {
- var i = queue.length;
- while (i--) {
- var watcher = queue[i];
- var vm = watcher.vm;
- if (vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {
- callHook(vm, 'updated');
- }
- }
- }
- /**
- * Queue a kept-alive component that was activated during patch.
- * The queue will be processed after the entire tree has been patched.
- */
- function queueActivatedComponent (vm) {
- // setting _inactive to false here so that a render function can
- // rely on checking whether it's in an inactive tree (e.g. router-view)
- vm._inactive = false;
- activatedChildren.push(vm);
- }
- function callActivatedHooks (queue) {
- for (var i = 0; i < queue.length; i++) {
- queue[i]._inactive = true;
- activateChildComponent(queue[i], true /* true */);
- }
- }
- /**
- * Push a watcher into the watcher queue.
- * Jobs with duplicate IDs will be skipped unless it's
- * pushed when the queue is being flushed.
- */
- function queueWatcher (watcher) {
- var id = watcher.id;
- if (has[id] == null) {
- has[id] = true;
- if (!flushing) {
- queue.push(watcher);
- } else {
- // if already flushing, splice the watcher based on its id
- // if already past its id, it will be run next immediately.
- var i = queue.length - 1;
- while (i > index && queue[i].id > watcher.id) {
- i--;
- }
- queue.splice(i + 1, 0, watcher);
- }
- // queue the flush
- if (!waiting) {
- waiting = true;
- if ( true && !config.async) {
- flushSchedulerQueue();
- return
- }
- nextTick(flushSchedulerQueue);
- }
- }
- }
- /* */
- var uid$2 = 0;
- /**
- * A watcher parses an expression, collects dependencies,
- * and fires callback when the expression value changes.
- * This is used for both the $watch() api and directives.
- */
- var Watcher = function Watcher (
- vm,
- expOrFn,
- cb,
- options,
- isRenderWatcher
- ) {
- this.vm = vm;
- if (isRenderWatcher) {
- vm._watcher = this;
- }
- vm._watchers.push(this);
- // options
- if (options) {
- this.deep = !!options.deep;
- this.user = !!options.user;
- this.lazy = !!options.lazy;
- this.sync = !!options.sync;
- this.before = options.before;
- } else {
- this.deep = this.user = this.lazy = this.sync = false;
- }
- this.cb = cb;
- this.id = ++uid$2; // uid for batching
- this.active = true;
- this.dirty = this.lazy; // for lazy watchers
- this.deps = [];
- this.newDeps = [];
- this.depIds = new _Set();
- this.newDepIds = new _Set();
- this.expression = true
- ? expOrFn.toString()
- : undefined;
- // parse expression for getter
- if (typeof expOrFn === 'function') {
- this.getter = expOrFn;
- } else {
- this.getter = parsePath(expOrFn);
- if (!this.getter) {
- this.getter = noop;
- true && warn(
- "Failed watching path: \"" + expOrFn + "\" " +
- 'Watcher only accepts simple dot-delimited paths. ' +
- 'For full control, use a function instead.',
- vm
- );
- }
- }
- this.value = this.lazy
- ? undefined
- : this.get();
- };
- /**
- * Evaluate the getter, and re-collect dependencies.
- */
- Watcher.prototype.get = function get () {
- pushTarget(this);
- var value;
- var vm = this.vm;
- try {
- value = this.getter.call(vm, vm);
- } catch (e) {
- if (this.user) {
- handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\""));
- } else {
- throw e
- }
- } finally {
- // "touch" every property so they are all tracked as
- // dependencies for deep watching
- if (this.deep) {
- traverse(value);
- }
- popTarget();
- this.cleanupDeps();
- }
- return value
- };
- /**
- * Add a dependency to this directive.
- */
- Watcher.prototype.addDep = function addDep (dep) {
- var id = dep.id;
- if (!this.newDepIds.has(id)) {
- this.newDepIds.add(id);
- this.newDeps.push(dep);
- if (!this.depIds.has(id)) {
- dep.addSub(this);
- }
- }
- };
- /**
- * Clean up for dependency collection.
- */
- Watcher.prototype.cleanupDeps = function cleanupDeps () {
- var i = this.deps.length;
- while (i--) {
- var dep = this.deps[i];
- if (!this.newDepIds.has(dep.id)) {
- dep.removeSub(this);
- }
- }
- var tmp = this.depIds;
- this.depIds = this.newDepIds;
- this.newDepIds = tmp;
- this.newDepIds.clear();
- tmp = this.deps;
- this.deps = this.newDeps;
- this.newDeps = tmp;
- this.newDeps.length = 0;
- };
- /**
- * Subscriber interface.
- * Will be called when a dependency changes.
- */
- Watcher.prototype.update = function update () {
- /* istanbul ignore else */
- if (this.lazy) {
- this.dirty = true;
- } else if (this.sync) {
- this.run();
- } else {
- queueWatcher(this);
- }
- };
- /**
- * Scheduler job interface.
- * Will be called by the scheduler.
- */
- Watcher.prototype.run = function run () {
- if (this.active) {
- var value = this.get();
- if (
- value !== this.value ||
- // Deep watchers and watchers on Object/Arrays should fire even
- // when the value is the same, because the value may
- // have mutated.
- isObject(value) ||
- this.deep
- ) {
- // set new value
- var oldValue = this.value;
- this.value = value;
- if (this.user) {
- try {
- this.cb.call(this.vm, value, oldValue);
- } catch (e) {
- handleError(e, this.vm, ("callback for watcher \"" + (this.expression) + "\""));
- }
- } else {
- this.cb.call(this.vm, value, oldValue);
- }
- }
- }
- };
- /**
- * Evaluate the value of the watcher.
- * This only gets called for lazy watchers.
- */
- Watcher.prototype.evaluate = function evaluate () {
- this.value = this.get();
- this.dirty = false;
- };
- /**
- * Depend on all deps collected by this watcher.
- */
- Watcher.prototype.depend = function depend () {
- var i = this.deps.length;
- while (i--) {
- this.deps[i].depend();
- }
- };
- /**
- * Remove self from all dependencies' subscriber list.
- */
- Watcher.prototype.teardown = function teardown () {
- if (this.active) {
- // remove self from vm's watcher list
- // this is a somewhat expensive operation so we skip it
- // if the vm is being destroyed.
- if (!this.vm._isBeingDestroyed) {
- remove(this.vm._watchers, this);
- }
- var i = this.deps.length;
- while (i--) {
- this.deps[i].removeSub(this);
- }
- this.active = false;
- }
- };
- /* */
- var sharedPropertyDefinition = {
- enumerable: true,
- configurable: true,
- get: noop,
- set: noop
- };
- function proxy (target, sourceKey, key) {
- sharedPropertyDefinition.get = function proxyGetter () {
- return this[sourceKey][key]
- };
- sharedPropertyDefinition.set = function proxySetter (val) {
- this[sourceKey][key] = val;
- };
- Object.defineProperty(target, key, sharedPropertyDefinition);
- }
- function initState (vm) {
- vm._watchers = [];
- var opts = vm.$options;
- if (opts.props) { initProps(vm, opts.props); }
- if (opts.methods) { initMethods(vm, opts.methods); }
- if (opts.data) {
- initData(vm);
- } else {
- observe(vm._data = {}, true /* asRootData */);
- }
- if (opts.computed) { initComputed(vm, opts.computed); }
- if (opts.watch && opts.watch !== nativeWatch) {
- initWatch(vm, opts.watch);
- }
- }
- function initProps (vm, propsOptions) {
- var propsData = vm.$options.propsData || {};
- var props = vm._props = {};
- // cache prop keys so that future props updates can iterate using Array
- // instead of dynamic object key enumeration.
- var keys = vm.$options._propKeys = [];
- var isRoot = !vm.$parent;
- // root instance props should be converted
- if (!isRoot) {
- toggleObserving(false);
- }
- var loop = function ( key ) {
- keys.push(key);
- var value = validateProp(key, propsOptions, propsData, vm);
- /* istanbul ignore else */
- if (true) {
- var hyphenatedKey = hyphenate(key);
- if (isReservedAttribute(hyphenatedKey) ||
- config.isReservedAttr(hyphenatedKey)) {
- warn(
- ("\"" + hyphenatedKey + "\" is a reserved attribute and cannot be used as component prop."),
- vm
- );
- }
- defineReactive$$1(props, key, value, function () {
- if (!isRoot && !isUpdatingChildComponent) {
- {
- if(vm.mpHost === 'mp-baidu' || vm.mpHost === 'mp-kuaishou' || vm.mpHost === 'mp-xhs'){//百度、快手、小红书 observer 在 setData callback 之后触发,直接忽略该 warn
- return
- }
- //fixed by xxxxxx __next_tick_pending,uni://form-field 时不告警
- if(
- key === 'value' &&
- Array.isArray(vm.$options.behaviors) &&
- vm.$options.behaviors.indexOf('uni://form-field') !== -1
- ){
- return
- }
- if(vm._getFormData){
- return
- }
- var $parent = vm.$parent;
- while($parent){
- if($parent.__next_tick_pending){
- return
- }
- $parent = $parent.$parent;
- }
- }
- warn(
- "Avoid mutating a prop directly since the value will be " +
- "overwritten whenever the parent component re-renders. " +
- "Instead, use a data or computed property based on the prop's " +
- "value. Prop being mutated: \"" + key + "\"",
- vm
- );
- }
- });
- } else {}
- // static props are already proxied on the component's prototype
- // during Vue.extend(). We only need to proxy props defined at
- // instantiation here.
- if (!(key in vm)) {
- proxy(vm, "_props", key);
- }
- };
- for (var key in propsOptions) loop( key );
- toggleObserving(true);
- }
- function initData (vm) {
- var data = vm.$options.data;
- data = vm._data = typeof data === 'function'
- ? getData(data, vm)
- : data || {};
- if (!isPlainObject(data)) {
- data = {};
- true && warn(
- 'data functions should return an object:\n' +
- 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',
- vm
- );
- }
- // proxy data on instance
- var keys = Object.keys(data);
- var props = vm.$options.props;
- var methods = vm.$options.methods;
- var i = keys.length;
- while (i--) {
- var key = keys[i];
- if (true) {
- if (methods && hasOwn(methods, key)) {
- warn(
- ("Method \"" + key + "\" has already been defined as a data property."),
- vm
- );
- }
- }
- if (props && hasOwn(props, key)) {
- true && warn(
- "The data property \"" + key + "\" is already declared as a prop. " +
- "Use prop default value instead.",
- vm
- );
- } else if (!isReserved(key)) {
- proxy(vm, "_data", key);
- }
- }
- // observe data
- observe(data, true /* asRootData */);
- }
- function getData (data, vm) {
- // #7573 disable dep collection when invoking data getters
- pushTarget();
- try {
- return data.call(vm, vm)
- } catch (e) {
- handleError(e, vm, "data()");
- return {}
- } finally {
- popTarget();
- }
- }
- var computedWatcherOptions = { lazy: true };
- function initComputed (vm, computed) {
- // $flow-disable-line
- var watchers = vm._computedWatchers = Object.create(null);
- // computed properties are just getters during SSR
- var isSSR = isServerRendering();
- for (var key in computed) {
- var userDef = computed[key];
- var getter = typeof userDef === 'function' ? userDef : userDef.get;
- if ( true && getter == null) {
- warn(
- ("Getter is missing for computed property \"" + key + "\"."),
- vm
- );
- }
- if (!isSSR) {
- // create internal watcher for the computed property.
- watchers[key] = new Watcher(
- vm,
- getter || noop,
- noop,
- computedWatcherOptions
- );
- }
- // component-defined computed properties are already defined on the
- // component prototype. We only need to define computed properties defined
- // at instantiation here.
- if (!(key in vm)) {
- defineComputed(vm, key, userDef);
- } else if (true) {
- if (key in vm.$data) {
- warn(("The computed property \"" + key + "\" is already defined in data."), vm);
- } else if (vm.$options.props && key in vm.$options.props) {
- warn(("The computed property \"" + key + "\" is already defined as a prop."), vm);
- }
- }
- }
- }
- function defineComputed (
- target,
- key,
- userDef
- ) {
- var shouldCache = !isServerRendering();
- if (typeof userDef === 'function') {
- sharedPropertyDefinition.get = shouldCache
- ? createComputedGetter(key)
- : createGetterInvoker(userDef);
- sharedPropertyDefinition.set = noop;
- } else {
- sharedPropertyDefinition.get = userDef.get
- ? shouldCache && userDef.cache !== false
- ? createComputedGetter(key)
- : createGetterInvoker(userDef.get)
- : noop;
- sharedPropertyDefinition.set = userDef.set || noop;
- }
- if ( true &&
- sharedPropertyDefinition.set === noop) {
- sharedPropertyDefinition.set = function () {
- warn(
- ("Computed property \"" + key + "\" was assigned to but it has no setter."),
- this
- );
- };
- }
- Object.defineProperty(target, key, sharedPropertyDefinition);
- }
- function createComputedGetter (key) {
- return function computedGetter () {
- var watcher = this._computedWatchers && this._computedWatchers[key];
- if (watcher) {
- if (watcher.dirty) {
- watcher.evaluate();
- }
- if (Dep.SharedObject.target) {// fixed by xxxxxx
- watcher.depend();
- }
- return watcher.value
- }
- }
- }
- function createGetterInvoker(fn) {
- return function computedGetter () {
- return fn.call(this, this)
- }
- }
- function initMethods (vm, methods) {
- var props = vm.$options.props;
- for (var key in methods) {
- if (true) {
- if (typeof methods[key] !== 'function') {
- warn(
- "Method \"" + key + "\" has type \"" + (typeof methods[key]) + "\" in the component definition. " +
- "Did you reference the function correctly?",
- vm
- );
- }
- if (props && hasOwn(props, key)) {
- warn(
- ("Method \"" + key + "\" has already been defined as a prop."),
- vm
- );
- }
- if ((key in vm) && isReserved(key)) {
- warn(
- "Method \"" + key + "\" conflicts with an existing Vue instance method. " +
- "Avoid defining component methods that start with _ or $."
- );
- }
- }
- vm[key] = typeof methods[key] !== 'function' ? noop : bind(methods[key], vm);
- }
- }
- function initWatch (vm, watch) {
- for (var key in watch) {
- var handler = watch[key];
- if (Array.isArray(handler)) {
- for (var i = 0; i < handler.length; i++) {
- createWatcher(vm, key, handler[i]);
- }
- } else {
- createWatcher(vm, key, handler);
- }
- }
- }
- function createWatcher (
- vm,
- expOrFn,
- handler,
- options
- ) {
- if (isPlainObject(handler)) {
- options = handler;
- handler = handler.handler;
- }
- if (typeof handler === 'string') {
- handler = vm[handler];
- }
- return vm.$watch(expOrFn, handler, options)
- }
- function stateMixin (Vue) {
- // flow somehow has problems with directly declared definition object
- // when using Object.defineProperty, so we have to procedurally build up
- // the object here.
- var dataDef = {};
- dataDef.get = function () { return this._data };
- var propsDef = {};
- propsDef.get = function () { return this._props };
- if (true) {
- dataDef.set = function () {
- warn(
- 'Avoid replacing instance root $data. ' +
- 'Use nested data properties instead.',
- this
- );
- };
- propsDef.set = function () {
- warn("$props is readonly.", this);
- };
- }
- Object.defineProperty(Vue.prototype, '$data', dataDef);
- Object.defineProperty(Vue.prototype, '$props', propsDef);
- Vue.prototype.$set = set;
- Vue.prototype.$delete = del;
- Vue.prototype.$watch = function (
- expOrFn,
- cb,
- options
- ) {
- var vm = this;
- if (isPlainObject(cb)) {
- return createWatcher(vm, expOrFn, cb, options)
- }
- options = options || {};
- options.user = true;
- var watcher = new Watcher(vm, expOrFn, cb, options);
- if (options.immediate) {
- try {
- cb.call(vm, watcher.value);
- } catch (error) {
- handleError(error, vm, ("callback for immediate watcher \"" + (watcher.expression) + "\""));
- }
- }
- return function unwatchFn () {
- watcher.teardown();
- }
- };
- }
- /* */
- var uid$3 = 0;
- function initMixin (Vue) {
- Vue.prototype._init = function (options) {
- var vm = this;
- // a uid
- vm._uid = uid$3++;
- var startTag, endTag;
- /* istanbul ignore if */
- if ( true && config.performance && mark) {
- startTag = "vue-perf-start:" + (vm._uid);
- endTag = "vue-perf-end:" + (vm._uid);
- mark(startTag);
- }
- // a flag to avoid this being observed
- vm._isVue = true;
- // merge options
- if (options && options._isComponent) {
- // optimize internal component instantiation
- // since dynamic options merging is pretty slow, and none of the
- // internal component options needs special treatment.
- initInternalComponent(vm, options);
- } else {
- vm.$options = mergeOptions(
- resolveConstructorOptions(vm.constructor),
- options || {},
- vm
- );
- }
- /* istanbul ignore else */
- if (true) {
- initProxy(vm);
- } else {}
- // expose real self
- vm._self = vm;
- initLifecycle(vm);
- initEvents(vm);
- initRender(vm);
- callHook(vm, 'beforeCreate');
- !vm._$fallback && initInjections(vm); // resolve injections before data/props
- initState(vm);
- !vm._$fallback && initProvide(vm); // resolve provide after data/props
- !vm._$fallback && callHook(vm, 'created');
- /* istanbul ignore if */
- if ( true && config.performance && mark) {
- vm._name = formatComponentName(vm, false);
- mark(endTag);
- measure(("vue " + (vm._name) + " init"), startTag, endTag);
- }
- if (vm.$options.el) {
- vm.$mount(vm.$options.el);
- }
- };
- }
- function initInternalComponent (vm, options) {
- var opts = vm.$options = Object.create(vm.constructor.options);
- // doing this because it's faster than dynamic enumeration.
- var parentVnode = options._parentVnode;
- opts.parent = options.parent;
- opts._parentVnode = parentVnode;
- var vnodeComponentOptions = parentVnode.componentOptions;
- opts.propsData = vnodeComponentOptions.propsData;
- opts._parentListeners = vnodeComponentOptions.listeners;
- opts._renderChildren = vnodeComponentOptions.children;
- opts._componentTag = vnodeComponentOptions.tag;
- if (options.render) {
- opts.render = options.render;
- opts.staticRenderFns = options.staticRenderFns;
- }
- }
- function resolveConstructorOptions (Ctor) {
- var options = Ctor.options;
- if (Ctor.super) {
- var superOptions = resolveConstructorOptions(Ctor.super);
- var cachedSuperOptions = Ctor.superOptions;
- if (superOptions !== cachedSuperOptions) {
- // super option changed,
- // need to resolve new options.
- Ctor.superOptions = superOptions;
- // check if there are any late-modified/attached options (#4976)
- var modifiedOptions = resolveModifiedOptions(Ctor);
- // update base extend options
- if (modifiedOptions) {
- extend(Ctor.extendOptions, modifiedOptions);
- }
- options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);
- if (options.name) {
- options.components[options.name] = Ctor;
- }
- }
- }
- return options
- }
- function resolveModifiedOptions (Ctor) {
- var modified;
- var latest = Ctor.options;
- var sealed = Ctor.sealedOptions;
- for (var key in latest) {
- if (latest[key] !== sealed[key]) {
- if (!modified) { modified = {}; }
- modified[key] = latest[key];
- }
- }
- return modified
- }
- function Vue (options) {
- if ( true &&
- !(this instanceof Vue)
- ) {
- warn('Vue is a constructor and should be called with the `new` keyword');
- }
- this._init(options);
- }
- initMixin(Vue);
- stateMixin(Vue);
- eventsMixin(Vue);
- lifecycleMixin(Vue);
- renderMixin(Vue);
- /* */
- function initUse (Vue) {
- Vue.use = function (plugin) {
- var installedPlugins = (this._installedPlugins || (this._installedPlugins = []));
- if (installedPlugins.indexOf(plugin) > -1) {
- return this
- }
- // additional parameters
- var args = toArray(arguments, 1);
- args.unshift(this);
- if (typeof plugin.install === 'function') {
- plugin.install.apply(plugin, args);
- } else if (typeof plugin === 'function') {
- plugin.apply(null, args);
- }
- installedPlugins.push(plugin);
- return this
- };
- }
- /* */
- function initMixin$1 (Vue) {
- Vue.mixin = function (mixin) {
- this.options = mergeOptions(this.options, mixin);
- return this
- };
- }
- /* */
- function initExtend (Vue) {
- /**
- * Each instance constructor, including Vue, has a unique
- * cid. This enables us to create wrapped "child
- * constructors" for prototypal inheritance and cache them.
- */
- Vue.cid = 0;
- var cid = 1;
- /**
- * Class inheritance
- */
- Vue.extend = function (extendOptions) {
- extendOptions = extendOptions || {};
- var Super = this;
- var SuperId = Super.cid;
- var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});
- if (cachedCtors[SuperId]) {
- return cachedCtors[SuperId]
- }
- var name = extendOptions.name || Super.options.name;
- if ( true && name) {
- validateComponentName(name);
- }
- var Sub = function VueComponent (options) {
- this._init(options);
- };
- Sub.prototype = Object.create(Super.prototype);
- Sub.prototype.constructor = Sub;
- Sub.cid = cid++;
- Sub.options = mergeOptions(
- Super.options,
- extendOptions
- );
- Sub['super'] = Super;
- // For props and computed properties, we define the proxy getters on
- // the Vue instances at extension time, on the extended prototype. This
- // avoids Object.defineProperty calls for each instance created.
- if (Sub.options.props) {
- initProps$1(Sub);
- }
- if (Sub.options.computed) {
- initComputed$1(Sub);
- }
- // allow further extension/mixin/plugin usage
- Sub.extend = Super.extend;
- Sub.mixin = Super.mixin;
- Sub.use = Super.use;
- // create asset registers, so extended classes
- // can have their private assets too.
- ASSET_TYPES.forEach(function (type) {
- Sub[type] = Super[type];
- });
- // enable recursive self-lookup
- if (name) {
- Sub.options.components[name] = Sub;
- }
- // keep a reference to the super options at extension time.
- // later at instantiation we can check if Super's options have
- // been updated.
- Sub.superOptions = Super.options;
- Sub.extendOptions = extendOptions;
- Sub.sealedOptions = extend({}, Sub.options);
- // cache constructor
- cachedCtors[SuperId] = Sub;
- return Sub
- };
- }
- function initProps$1 (Comp) {
- var props = Comp.options.props;
- for (var key in props) {
- proxy(Comp.prototype, "_props", key);
- }
- }
- function initComputed$1 (Comp) {
- var computed = Comp.options.computed;
- for (var key in computed) {
- defineComputed(Comp.prototype, key, computed[key]);
- }
- }
- /* */
- function initAssetRegisters (Vue) {
- /**
- * Create asset registration methods.
- */
- ASSET_TYPES.forEach(function (type) {
- Vue[type] = function (
- id,
- definition
- ) {
- if (!definition) {
- return this.options[type + 's'][id]
- } else {
- /* istanbul ignore if */
- if ( true && type === 'component') {
- validateComponentName(id);
- }
- if (type === 'component' && isPlainObject(definition)) {
- definition.name = definition.name || id;
- definition = this.options._base.extend(definition);
- }
- if (type === 'directive' && typeof definition === 'function') {
- definition = { bind: definition, update: definition };
- }
- this.options[type + 's'][id] = definition;
- return definition
- }
- };
- });
- }
- /* */
- function getComponentName (opts) {
- return opts && (opts.Ctor.options.name || opts.tag)
- }
- function matches (pattern, name) {
- if (Array.isArray(pattern)) {
- return pattern.indexOf(name) > -1
- } else if (typeof pattern === 'string') {
- return pattern.split(',').indexOf(name) > -1
- } else if (isRegExp(pattern)) {
- return pattern.test(name)
- }
- /* istanbul ignore next */
- return false
- }
- function pruneCache (keepAliveInstance, filter) {
- var cache = keepAliveInstance.cache;
- var keys = keepAliveInstance.keys;
- var _vnode = keepAliveInstance._vnode;
- for (var key in cache) {
- var cachedNode = cache[key];
- if (cachedNode) {
- var name = getComponentName(cachedNode.componentOptions);
- if (name && !filter(name)) {
- pruneCacheEntry(cache, key, keys, _vnode);
- }
- }
- }
- }
- function pruneCacheEntry (
- cache,
- key,
- keys,
- current
- ) {
- var cached$$1 = cache[key];
- if (cached$$1 && (!current || cached$$1.tag !== current.tag)) {
- cached$$1.componentInstance.$destroy();
- }
- cache[key] = null;
- remove(keys, key);
- }
- var patternTypes = [String, RegExp, Array];
- var KeepAlive = {
- name: 'keep-alive',
- abstract: true,
- props: {
- include: patternTypes,
- exclude: patternTypes,
- max: [String, Number]
- },
- created: function created () {
- this.cache = Object.create(null);
- this.keys = [];
- },
- destroyed: function destroyed () {
- for (var key in this.cache) {
- pruneCacheEntry(this.cache, key, this.keys);
- }
- },
- mounted: function mounted () {
- var this$1 = this;
- this.$watch('include', function (val) {
- pruneCache(this$1, function (name) { return matches(val, name); });
- });
- this.$watch('exclude', function (val) {
- pruneCache(this$1, function (name) { return !matches(val, name); });
- });
- },
- render: function render () {
- var slot = this.$slots.default;
- var vnode = getFirstComponentChild(slot);
- var componentOptions = vnode && vnode.componentOptions;
- if (componentOptions) {
- // check pattern
- var name = getComponentName(componentOptions);
- var ref = this;
- var include = ref.include;
- var exclude = ref.exclude;
- if (
- // not included
- (include && (!name || !matches(include, name))) ||
- // excluded
- (exclude && name && matches(exclude, name))
- ) {
- return vnode
- }
- var ref$1 = this;
- var cache = ref$1.cache;
- var keys = ref$1.keys;
- var key = vnode.key == null
- // same constructor may get registered as different local components
- // so cid alone is not enough (#3269)
- ? componentOptions.Ctor.cid + (componentOptions.tag ? ("::" + (componentOptions.tag)) : '')
- : vnode.key;
- if (cache[key]) {
- vnode.componentInstance = cache[key].componentInstance;
- // make current key freshest
- remove(keys, key);
- keys.push(key);
- } else {
- cache[key] = vnode;
- keys.push(key);
- // prune oldest entry
- if (this.max && keys.length > parseInt(this.max)) {
- pruneCacheEntry(cache, keys[0], keys, this._vnode);
- }
- }
- vnode.data.keepAlive = true;
- }
- return vnode || (slot && slot[0])
- }
- };
- var builtInComponents = {
- KeepAlive: KeepAlive
- };
- /* */
- function initGlobalAPI (Vue) {
- // config
- var configDef = {};
- configDef.get = function () { return config; };
- if (true) {
- configDef.set = function () {
- warn(
- 'Do not replace the Vue.config object, set individual fields instead.'
- );
- };
- }
- Object.defineProperty(Vue, 'config', configDef);
- // exposed util methods.
- // NOTE: these are not considered part of the public API - avoid relying on
- // them unless you are aware of the risk.
- Vue.util = {
- warn: warn,
- extend: extend,
- mergeOptions: mergeOptions,
- defineReactive: defineReactive$$1
- };
- Vue.set = set;
- Vue.delete = del;
- Vue.nextTick = nextTick;
- // 2.6 explicit observable API
- Vue.observable = function (obj) {
- observe(obj);
- return obj
- };
- Vue.options = Object.create(null);
- ASSET_TYPES.forEach(function (type) {
- Vue.options[type + 's'] = Object.create(null);
- });
- // this is used to identify the "base" constructor to extend all plain-object
- // components with in Weex's multi-instance scenarios.
- Vue.options._base = Vue;
- extend(Vue.options.components, builtInComponents);
- initUse(Vue);
- initMixin$1(Vue);
- initExtend(Vue);
- initAssetRegisters(Vue);
- }
- initGlobalAPI(Vue);
- Object.defineProperty(Vue.prototype, '$isServer', {
- get: isServerRendering
- });
- Object.defineProperty(Vue.prototype, '$ssrContext', {
- get: function get () {
- /* istanbul ignore next */
- return this.$vnode && this.$vnode.ssrContext
- }
- });
- // expose FunctionalRenderContext for ssr runtime helper installation
- Object.defineProperty(Vue, 'FunctionalRenderContext', {
- value: FunctionalRenderContext
- });
- Vue.version = '2.6.11';
- /**
- * https://raw.githubusercontent.com/Tencent/westore/master/packages/westore/utils/diff.js
- */
- var ARRAYTYPE = '[object Array]';
- var OBJECTTYPE = '[object Object]';
- // const FUNCTIONTYPE = '[object Function]'
- function diff(current, pre) {
- var result = {};
- syncKeys(current, pre);
- _diff(current, pre, '', result);
- return result
- }
- function syncKeys(current, pre) {
- if (current === pre) { return }
- var rootCurrentType = type(current);
- var rootPreType = type(pre);
- if (rootCurrentType == OBJECTTYPE && rootPreType == OBJECTTYPE) {
- if(Object.keys(current).length >= Object.keys(pre).length){
- for (var key in pre) {
- var currentValue = current[key];
- if (currentValue === undefined) {
- current[key] = null;
- } else {
- syncKeys(currentValue, pre[key]);
- }
- }
- }
- } else if (rootCurrentType == ARRAYTYPE && rootPreType == ARRAYTYPE) {
- if (current.length >= pre.length) {
- pre.forEach(function (item, index) {
- syncKeys(current[index], item);
- });
- }
- }
- }
- function _diff(current, pre, path, result) {
- if (current === pre) { return }
- var rootCurrentType = type(current);
- var rootPreType = type(pre);
- if (rootCurrentType == OBJECTTYPE) {
- if (rootPreType != OBJECTTYPE || Object.keys(current).length < Object.keys(pre).length) {
- setResult(result, path, current);
- } else {
- var loop = function ( key ) {
- var currentValue = current[key];
- var preValue = pre[key];
- var currentType = type(currentValue);
- var preType = type(preValue);
- if (currentType != ARRAYTYPE && currentType != OBJECTTYPE) {
- if (currentValue !== pre[key]) {
- setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
- }
- } else if (currentType == ARRAYTYPE) {
- if (preType != ARRAYTYPE) {
- setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
- } else {
- if (currentValue.length < preValue.length) {
- setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
- } else {
- currentValue.forEach(function (item, index) {
- _diff(item, preValue[index], (path == '' ? '' : path + ".") + key + '[' + index + ']', result);
- });
- }
- }
- } else if (currentType == OBJECTTYPE) {
- if (preType != OBJECTTYPE || Object.keys(currentValue).length < Object.keys(preValue).length) {
- setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
- } else {
- for (var subKey in currentValue) {
- _diff(currentValue[subKey], preValue[subKey], (path == '' ? '' : path + ".") + key + '.' + subKey, result);
- }
- }
- }
- };
- for (var key in current) loop( key );
- }
- } else if (rootCurrentType == ARRAYTYPE) {
- if (rootPreType != ARRAYTYPE) {
- setResult(result, path, current);
- } else {
- if (current.length < pre.length) {
- setResult(result, path, current);
- } else {
- current.forEach(function (item, index) {
- _diff(item, pre[index], path + '[' + index + ']', result);
- });
- }
- }
- } else {
- setResult(result, path, current);
- }
- }
- function setResult(result, k, v) {
- // if (type(v) != FUNCTIONTYPE) {
- result[k] = v;
- // }
- }
- function type(obj) {
- return Object.prototype.toString.call(obj)
- }
- /* */
- function flushCallbacks$1(vm) {
- if (vm.__next_tick_callbacks && vm.__next_tick_callbacks.length) {
- if (Object({"VUE_APP_NAME":"sugarpark-mini-program","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
- var mpInstance = vm.$scope;
- console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
- ']:flushCallbacks[' + vm.__next_tick_callbacks.length + ']');
- }
- var copies = vm.__next_tick_callbacks.slice(0);
- vm.__next_tick_callbacks.length = 0;
- for (var i = 0; i < copies.length; i++) {
- copies[i]();
- }
- }
- }
- function hasRenderWatcher(vm) {
- return queue.find(function (watcher) { return vm._watcher === watcher; })
- }
- function nextTick$1(vm, cb) {
- //1.nextTick 之前 已 setData 且 setData 还未回调完成
- //2.nextTick 之前存在 render watcher
- if (!vm.__next_tick_pending && !hasRenderWatcher(vm)) {
- if(Object({"VUE_APP_NAME":"sugarpark-mini-program","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
- var mpInstance = vm.$scope;
- console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
- ']:nextVueTick');
- }
- return nextTick(cb, vm)
- }else{
- if(Object({"VUE_APP_NAME":"sugarpark-mini-program","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
- var mpInstance$1 = vm.$scope;
- console.log('[' + (+new Date) + '][' + (mpInstance$1.is || mpInstance$1.route) + '][' + vm._uid +
- ']:nextMPTick');
- }
- }
- var _resolve;
- if (!vm.__next_tick_callbacks) {
- vm.__next_tick_callbacks = [];
- }
- vm.__next_tick_callbacks.push(function () {
- if (cb) {
- try {
- cb.call(vm);
- } catch (e) {
- handleError(e, vm, 'nextTick');
- }
- } else if (_resolve) {
- _resolve(vm);
- }
- });
- // $flow-disable-line
- if (!cb && typeof Promise !== 'undefined') {
- return new Promise(function (resolve) {
- _resolve = resolve;
- })
- }
- }
- /* */
- function cloneWithData(vm) {
- // 确保当前 vm 所有数据被同步
- var ret = Object.create(null);
- var dataKeys = [].concat(
- Object.keys(vm._data || {}),
- Object.keys(vm._computedWatchers || {}));
- dataKeys.reduce(function(ret, key) {
- ret[key] = vm[key];
- return ret
- }, ret);
- // vue-composition-api
- var compositionApiState = vm.__composition_api_state__ || vm.__secret_vfa_state__;
- var rawBindings = compositionApiState && compositionApiState.rawBindings;
- if (rawBindings) {
- Object.keys(rawBindings).forEach(function (key) {
- ret[key] = vm[key];
- });
- }
- //TODO 需要把无用数据处理掉,比如 list=>l0 则 list 需要移除,否则多传输一份数据
- Object.assign(ret, vm.$mp.data || {});
- if (
- Array.isArray(vm.$options.behaviors) &&
- vm.$options.behaviors.indexOf('uni://form-field') !== -1
- ) { //form-field
- ret['name'] = vm.name;
- ret['value'] = vm.value;
- }
- return JSON.parse(JSON.stringify(ret))
- }
- var patch = function(oldVnode, vnode) {
- var this$1 = this;
- if (vnode === null) { //destroy
- return
- }
- if (this.mpType === 'page' || this.mpType === 'component') {
- var mpInstance = this.$scope;
- var data = Object.create(null);
- try {
- data = cloneWithData(this);
- } catch (err) {
- console.error(err);
- }
- data.__webviewId__ = mpInstance.data.__webviewId__;
- var mpData = Object.create(null);
- Object.keys(data).forEach(function (key) { //仅同步 data 中有的数据
- mpData[key] = mpInstance.data[key];
- });
- var diffData = this.$shouldDiffData === false ? data : diff(data, mpData);
- if (Object.keys(diffData).length) {
- if (Object({"VUE_APP_NAME":"sugarpark-mini-program","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
- console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + this._uid +
- ']差量更新',
- JSON.stringify(diffData));
- }
- this.__next_tick_pending = true;
- mpInstance.setData(diffData, function () {
- this$1.__next_tick_pending = false;
- flushCallbacks$1(this$1);
- });
- } else {
- flushCallbacks$1(this);
- }
- }
- };
- /* */
- function createEmptyRender() {
- }
- function mountComponent$1(
- vm,
- el,
- hydrating
- ) {
- if (!vm.mpType) {//main.js 中的 new Vue
- return vm
- }
- if (vm.mpType === 'app') {
- vm.$options.render = createEmptyRender;
- }
- if (!vm.$options.render) {
- vm.$options.render = createEmptyRender;
- if (true) {
- /* istanbul ignore if */
- if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||
- vm.$options.el || el) {
- warn(
- 'You are using the runtime-only build of Vue where the template ' +
- 'compiler is not available. Either pre-compile the templates into ' +
- 'render functions, or use the compiler-included build.',
- vm
- );
- } else {
- warn(
- 'Failed to mount component: template or render function not defined.',
- vm
- );
- }
- }
- }
-
- !vm._$fallback && callHook(vm, 'beforeMount');
- var updateComponent = function () {
- vm._update(vm._render(), hydrating);
- };
- // we set this to vm._watcher inside the watcher's constructor
- // since the watcher's initial patch may call $forceUpdate (e.g. inside child
- // component's mounted hook), which relies on vm._watcher being already defined
- new Watcher(vm, updateComponent, noop, {
- before: function before() {
- if (vm._isMounted && !vm._isDestroyed) {
- callHook(vm, 'beforeUpdate');
- }
- }
- }, true /* isRenderWatcher */);
- hydrating = false;
- return vm
- }
- /* */
- function renderClass (
- staticClass,
- dynamicClass
- ) {
- if (isDef(staticClass) || isDef(dynamicClass)) {
- return concat(staticClass, stringifyClass(dynamicClass))
- }
- /* istanbul ignore next */
- return ''
- }
- function concat (a, b) {
- return a ? b ? (a + ' ' + b) : a : (b || '')
- }
- function stringifyClass (value) {
- if (Array.isArray(value)) {
- return stringifyArray(value)
- }
- if (isObject(value)) {
- return stringifyObject(value)
- }
- if (typeof value === 'string') {
- return value
- }
- /* istanbul ignore next */
- return ''
- }
- function stringifyArray (value) {
- var res = '';
- var stringified;
- for (var i = 0, l = value.length; i < l; i++) {
- if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') {
- if (res) { res += ' '; }
- res += stringified;
- }
- }
- return res
- }
- function stringifyObject (value) {
- var res = '';
- for (var key in value) {
- if (value[key]) {
- if (res) { res += ' '; }
- res += key;
- }
- }
- return res
- }
- /* */
- var parseStyleText = cached(function (cssText) {
- var res = {};
- var listDelimiter = /;(?![^(]*\))/g;
- var propertyDelimiter = /:(.+)/;
- cssText.split(listDelimiter).forEach(function (item) {
- if (item) {
- var tmp = item.split(propertyDelimiter);
- tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
- }
- });
- return res
- });
- // normalize possible array / string values into Object
- function normalizeStyleBinding (bindingStyle) {
- if (Array.isArray(bindingStyle)) {
- return toObject(bindingStyle)
- }
- if (typeof bindingStyle === 'string') {
- return parseStyleText(bindingStyle)
- }
- return bindingStyle
- }
- /* */
- var MP_METHODS = ['createSelectorQuery', 'createIntersectionObserver', 'selectAllComponents', 'selectComponent'];
- function getTarget(obj, path) {
- var parts = path.split('.');
- var key = parts[0];
- if (key.indexOf('__$n') === 0) { //number index
- key = parseInt(key.replace('__$n', ''));
- }
- if (parts.length === 1) {
- return obj[key]
- }
- return getTarget(obj[key], parts.slice(1).join('.'))
- }
- function internalMixin(Vue) {
- Vue.config.errorHandler = function(err, vm, info) {
- Vue.util.warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
- console.error(err);
- /* eslint-disable no-undef */
- var app = typeof getApp === 'function' && getApp();
- if (app && app.onError) {
- app.onError(err);
- }
- };
- var oldEmit = Vue.prototype.$emit;
- Vue.prototype.$emit = function(event) {
- if (this.$scope && event) {
- (this.$scope['_triggerEvent'] || this.$scope['triggerEvent']).call(this.$scope, event, {
- __args__: toArray(arguments, 1)
- });
- }
- return oldEmit.apply(this, arguments)
- };
- Vue.prototype.$nextTick = function(fn) {
- return nextTick$1(this, fn)
- };
- MP_METHODS.forEach(function (method) {
- Vue.prototype[method] = function(args) {
- if (this.$scope && this.$scope[method]) {
- return this.$scope[method](args)
- }
- // mp-alipay
- if (typeof my === 'undefined') {
- return
- }
- if (method === 'createSelectorQuery') {
- /* eslint-disable no-undef */
- return my.createSelectorQuery(args)
- } else if (method === 'createIntersectionObserver') {
- /* eslint-disable no-undef */
- return my.createIntersectionObserver(args)
- }
- // TODO mp-alipay 暂不支持 selectAllComponents,selectComponent
- };
- });
- Vue.prototype.__init_provide = initProvide;
- Vue.prototype.__init_injections = initInjections;
- Vue.prototype.__call_hook = function(hook, args) {
- var vm = this;
- // #7573 disable dep collection when invoking lifecycle hooks
- pushTarget();
- var handlers = vm.$options[hook];
- var info = hook + " hook";
- var ret;
- if (handlers) {
- for (var i = 0, j = handlers.length; i < j; i++) {
- ret = invokeWithErrorHandling(handlers[i], vm, args ? [args] : null, vm, info);
- }
- }
- if (vm._hasHookEvent) {
- vm.$emit('hook:' + hook, args);
- }
- popTarget();
- return ret
- };
- Vue.prototype.__set_model = function(target, key, value, modifiers) {
- if (Array.isArray(modifiers)) {
- if (modifiers.indexOf('trim') !== -1) {
- value = value.trim();
- }
- if (modifiers.indexOf('number') !== -1) {
- value = this._n(value);
- }
- }
- if (!target) {
- target = this;
- }
- // 解决动态属性添加
- Vue.set(target, key, value);
- };
- Vue.prototype.__set_sync = function(target, key, value) {
- if (!target) {
- target = this;
- }
- // 解决动态属性添加
- Vue.set(target, key, value);
- };
- Vue.prototype.__get_orig = function(item) {
- if (isPlainObject(item)) {
- return item['$orig'] || item
- }
- return item
- };
- Vue.prototype.__get_value = function(dataPath, target) {
- return getTarget(target || this, dataPath)
- };
- Vue.prototype.__get_class = function(dynamicClass, staticClass) {
- return renderClass(staticClass, dynamicClass)
- };
- Vue.prototype.__get_style = function(dynamicStyle, staticStyle) {
- if (!dynamicStyle && !staticStyle) {
- return ''
- }
- var dynamicStyleObj = normalizeStyleBinding(dynamicStyle);
- var styleObj = staticStyle ? extend(staticStyle, dynamicStyleObj) : dynamicStyleObj;
- return Object.keys(styleObj).map(function (name) { return ((hyphenate(name)) + ":" + (styleObj[name])); }).join(';')
- };
- Vue.prototype.__map = function(val, iteratee) {
- //TODO 暂不考虑 string
- var ret, i, l, keys, key;
- if (Array.isArray(val)) {
- ret = new Array(val.length);
- for (i = 0, l = val.length; i < l; i++) {
- ret[i] = iteratee(val[i], i);
- }
- return ret
- } else if (isObject(val)) {
- keys = Object.keys(val);
- ret = Object.create(null);
- for (i = 0, l = keys.length; i < l; i++) {
- key = keys[i];
- ret[key] = iteratee(val[key], key, i);
- }
- return ret
- } else if (typeof val === 'number') {
- ret = new Array(val);
- for (i = 0, l = val; i < l; i++) {
- // 第一个参数暂时仍和小程序一致
- ret[i] = iteratee(i, i);
- }
- return ret
- }
- return []
- };
- }
- /* */
- var LIFECYCLE_HOOKS$1 = [
- //App
- 'onLaunch',
- 'onShow',
- 'onHide',
- 'onUniNViewMessage',
- 'onPageNotFound',
- 'onThemeChange',
- 'onError',
- 'onUnhandledRejection',
- //Page
- 'onInit',
- 'onLoad',
- // 'onShow',
- 'onReady',
- // 'onHide',
- 'onUnload',
- 'onPullDownRefresh',
- 'onReachBottom',
- 'onTabItemTap',
- 'onAddToFavorites',
- 'onShareTimeline',
- 'onShareAppMessage',
- 'onResize',
- 'onPageScroll',
- 'onNavigationBarButtonTap',
- 'onBackPress',
- 'onNavigationBarSearchInputChanged',
- 'onNavigationBarSearchInputConfirmed',
- 'onNavigationBarSearchInputClicked',
- //Component
- // 'onReady', // 兼容旧版本,应该移除该事件
- 'onPageShow',
- 'onPageHide',
- 'onPageResize'
- ];
- function lifecycleMixin$1(Vue) {
- //fixed vue-class-component
- var oldExtend = Vue.extend;
- Vue.extend = function(extendOptions) {
- extendOptions = extendOptions || {};
- var methods = extendOptions.methods;
- if (methods) {
- Object.keys(methods).forEach(function (methodName) {
- if (LIFECYCLE_HOOKS$1.indexOf(methodName)!==-1) {
- extendOptions[methodName] = methods[methodName];
- delete methods[methodName];
- }
- });
- }
- return oldExtend.call(this, extendOptions)
- };
- var strategies = Vue.config.optionMergeStrategies;
- var mergeHook = strategies.created;
- LIFECYCLE_HOOKS$1.forEach(function (hook) {
- strategies[hook] = mergeHook;
- });
- Vue.prototype.__lifecycle_hooks__ = LIFECYCLE_HOOKS$1;
- }
- /* */
- // install platform patch function
- Vue.prototype.__patch__ = patch;
- // public mount method
- Vue.prototype.$mount = function(
- el ,
- hydrating
- ) {
- return mountComponent$1(this, el, hydrating)
- };
- lifecycleMixin$1(Vue);
- internalMixin(Vue);
- /* */
- /* harmony default export */ __webpack_exports__["default"] = (Vue);
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 2)))
- /***/ }),
- /* 4 */
- /*!*************************************************************!*\
- !*** ./node_modules/@dcloudio/uni-i18n/dist/uni-i18n.es.js ***!
- \*************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /* WEBPACK VAR INJECTION */(function(uni, global) {Object.defineProperty(exports, "__esModule", { value: true });exports.compileI18nJsonStr = compileI18nJsonStr;exports.hasI18nJson = hasI18nJson;exports.initVueI18n = initVueI18n;exports.isI18nStr = isI18nStr;exports.normalizeLocale = normalizeLocale;exports.parseI18nJson = parseI18nJson;exports.resolveLocale = resolveLocale;exports.isString = exports.LOCALE_ZH_HANT = exports.LOCALE_ZH_HANS = exports.LOCALE_FR = exports.LOCALE_ES = exports.LOCALE_EN = exports.I18n = exports.Formatter = void 0;function _slicedToArray(arr, i) {return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();}function _nonIterableRest() {throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}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);}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;}function _iterableToArrayLimit(arr, i) {if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;var _arr = [];var _n = true;var _d = false;var _e = undefined;try {for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {_arr.push(_s.value);if (i && _arr.length === i) break;}} catch (err) {_d = true;_e = err;} finally {try {if (!_n && _i["return"] != null) _i["return"]();} finally {if (_d) throw _e;}}return _arr;}function _arrayWithHoles(arr) {if (Array.isArray(arr)) return arr;}function _classCallCheck(instance, Constructor) {if (!(instance instanceof Constructor)) {throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target, props) {for (var i = 0; i < props.length; i++) {var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ("value" in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor);}}function _createClass(Constructor, protoProps, staticProps) {if (protoProps) _defineProperties(Constructor.prototype, protoProps);if (staticProps) _defineProperties(Constructor, staticProps);return Constructor;}var isArray = Array.isArray;
- var isObject = function isObject(val) {return val !== null && typeof val === 'object';};
- var defaultDelimiters = ['{', '}'];var
- BaseFormatter = /*#__PURE__*/function () {
- function BaseFormatter() {_classCallCheck(this, BaseFormatter);
- this._caches = Object.create(null);
- }_createClass(BaseFormatter, [{ key: "interpolate", value: function interpolate(
- message, values) {var delimiters = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultDelimiters;
- if (!values) {
- return [message];
- }
- var tokens = this._caches[message];
- if (!tokens) {
- tokens = parse(message, delimiters);
- this._caches[message] = tokens;
- }
- return compile(tokens, values);
- } }]);return BaseFormatter;}();exports.Formatter = BaseFormatter;
- var RE_TOKEN_LIST_VALUE = /^(?:\d)+/;
- var RE_TOKEN_NAMED_VALUE = /^(?:\w)+/;
- function parse(format, _ref) {var _ref2 = _slicedToArray(_ref, 2),startDelimiter = _ref2[0],endDelimiter = _ref2[1];
- var tokens = [];
- var position = 0;
- var text = '';
- while (position < format.length) {
- var char = format[position++];
- if (char === startDelimiter) {
- if (text) {
- tokens.push({ type: 'text', value: text });
- }
- text = '';
- var sub = '';
- char = format[position++];
- while (char !== undefined && char !== endDelimiter) {
- sub += char;
- char = format[position++];
- }
- var isClosed = char === endDelimiter;
- var type = RE_TOKEN_LIST_VALUE.test(sub) ?
- 'list' :
- isClosed && RE_TOKEN_NAMED_VALUE.test(sub) ?
- 'named' :
- 'unknown';
- tokens.push({ value: sub, type: type });
- }
- // else if (char === '%') {
- // // when found rails i18n syntax, skip text capture
- // if (format[position] !== '{') {
- // text += char
- // }
- // }
- else {
- text += char;
- }
- }
- text && tokens.push({ type: 'text', value: text });
- return tokens;
- }
- function compile(tokens, values) {
- var compiled = [];
- var index = 0;
- var mode = isArray(values) ?
- 'list' :
- isObject(values) ?
- 'named' :
- 'unknown';
- if (mode === 'unknown') {
- return compiled;
- }
- while (index < tokens.length) {
- var token = tokens[index];
- switch (token.type) {
- case 'text':
- compiled.push(token.value);
- break;
- case 'list':
- compiled.push(values[parseInt(token.value, 10)]);
- break;
- case 'named':
- if (mode === 'named') {
- compiled.push(values[token.value]);
- } else
- {
- if (true) {
- console.warn("Type of token '".concat(token.type, "' and format of value '").concat(mode, "' don't match!"));
- }
- }
- break;
- case 'unknown':
- if (true) {
- console.warn("Detect 'unknown' type of token!");
- }
- break;}
- index++;
- }
- return compiled;
- }
- var LOCALE_ZH_HANS = 'zh-Hans';exports.LOCALE_ZH_HANS = LOCALE_ZH_HANS;
- var LOCALE_ZH_HANT = 'zh-Hant';exports.LOCALE_ZH_HANT = LOCALE_ZH_HANT;
- var LOCALE_EN = 'en';exports.LOCALE_EN = LOCALE_EN;
- var LOCALE_FR = 'fr';exports.LOCALE_FR = LOCALE_FR;
- var LOCALE_ES = 'es';exports.LOCALE_ES = LOCALE_ES;
- var hasOwnProperty = Object.prototype.hasOwnProperty;
- var hasOwn = function hasOwn(val, key) {return hasOwnProperty.call(val, key);};
- var defaultFormatter = new BaseFormatter();
- function include(str, parts) {
- return !!parts.find(function (part) {return str.indexOf(part) !== -1;});
- }
- function startsWith(str, parts) {
- return parts.find(function (part) {return str.indexOf(part) === 0;});
- }
- function normalizeLocale(locale, messages) {
- if (!locale) {
- return;
- }
- locale = locale.trim().replace(/_/g, '-');
- if (messages && messages[locale]) {
- return locale;
- }
- locale = locale.toLowerCase();
- if (locale.indexOf('zh') === 0) {
- if (locale.indexOf('-hans') > -1) {
- return LOCALE_ZH_HANS;
- }
- if (locale.indexOf('-hant') > -1) {
- return LOCALE_ZH_HANT;
- }
- if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {
- return LOCALE_ZH_HANT;
- }
- return LOCALE_ZH_HANS;
- }
- var lang = startsWith(locale, [LOCALE_EN, LOCALE_FR, LOCALE_ES]);
- if (lang) {
- return lang;
- }
- }var
- I18n = /*#__PURE__*/function () {
- function I18n(_ref3) {var locale = _ref3.locale,fallbackLocale = _ref3.fallbackLocale,messages = _ref3.messages,watcher = _ref3.watcher,formater = _ref3.formater;_classCallCheck(this, I18n);
- this.locale = LOCALE_EN;
- this.fallbackLocale = LOCALE_EN;
- this.message = {};
- this.messages = {};
- this.watchers = [];
- if (fallbackLocale) {
- this.fallbackLocale = fallbackLocale;
- }
- this.formater = formater || defaultFormatter;
- this.messages = messages || {};
- this.setLocale(locale || LOCALE_EN);
- if (watcher) {
- this.watchLocale(watcher);
- }
- }_createClass(I18n, [{ key: "setLocale", value: function setLocale(
- locale) {var _this = this;
- var oldLocale = this.locale;
- this.locale = normalizeLocale(locale, this.messages) || this.fallbackLocale;
- if (!this.messages[this.locale]) {
- // 可能初始化时不存在
- this.messages[this.locale] = {};
- }
- this.message = this.messages[this.locale];
- // 仅发生变化时,通知
- if (oldLocale !== this.locale) {
- this.watchers.forEach(function (watcher) {
- watcher(_this.locale, oldLocale);
- });
- }
- } }, { key: "getLocale", value: function getLocale()
- {
- return this.locale;
- } }, { key: "watchLocale", value: function watchLocale(
- fn) {var _this2 = this;
- var index = this.watchers.push(fn) - 1;
- return function () {
- _this2.watchers.splice(index, 1);
- };
- } }, { key: "add", value: function add(
- locale, message) {var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
- var curMessages = this.messages[locale];
- if (curMessages) {
- if (override) {
- Object.assign(curMessages, message);
- } else
- {
- Object.keys(message).forEach(function (key) {
- if (!hasOwn(curMessages, key)) {
- curMessages[key] = message[key];
- }
- });
- }
- } else
- {
- this.messages[locale] = message;
- }
- } }, { key: "f", value: function f(
- message, values, delimiters) {
- return this.formater.interpolate(message, values, delimiters).join('');
- } }, { key: "t", value: function t(
- key, locale, values) {
- var message = this.message;
- if (typeof locale === 'string') {
- locale = normalizeLocale(locale, this.messages);
- locale && (message = this.messages[locale]);
- } else
- {
- values = locale;
- }
- if (!hasOwn(message, key)) {
- console.warn("Cannot translate the value of keypath ".concat(key, ". Use the value of keypath as default."));
- return key;
- }
- return this.formater.interpolate(message[key], values).join('');
- } }]);return I18n;}();exports.I18n = I18n;
- function watchAppLocale(appVm, i18n) {
- // 需要保证 watch 的触发在组件渲染之前
- if (appVm.$watchLocale) {
- // vue2
- appVm.$watchLocale(function (newLocale) {
- i18n.setLocale(newLocale);
- });
- } else
- {
- appVm.$watch(function () {return appVm.$locale;}, function (newLocale) {
- i18n.setLocale(newLocale);
- });
- }
- }
- function getDefaultLocale() {
- if (typeof uni !== 'undefined' && uni.getLocale) {
- return uni.getLocale();
- }
- // 小程序平台,uni 和 uni-i18n 互相引用,导致访问不到 uni,故在 global 上挂了 getLocale
- if (typeof global !== 'undefined' && global.getLocale) {
- return global.getLocale();
- }
- return LOCALE_EN;
- }
- function initVueI18n(locale) {var messages = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};var fallbackLocale = arguments.length > 2 ? arguments[2] : undefined;var watcher = arguments.length > 3 ? arguments[3] : undefined;
- // 兼容旧版本入参
- if (typeof locale !== 'string') {var _ref4 =
- [
- messages,
- locale];locale = _ref4[0];messages = _ref4[1];
- }
- if (typeof locale !== 'string') {
- // 因为小程序平台,uni-i18n 和 uni 互相引用,导致此时访问 uni 时,为 undefined
- locale = getDefaultLocale();
- }
- if (typeof fallbackLocale !== 'string') {
- fallbackLocale =
- typeof __uniConfig !== 'undefined' && __uniConfig.fallbackLocale ||
- LOCALE_EN;
- }
- var i18n = new I18n({
- locale: locale,
- fallbackLocale: fallbackLocale,
- messages: messages,
- watcher: watcher });
- var _t = function t(key, values) {
- if (typeof getApp !== 'function') {
- // app view
- /* eslint-disable no-func-assign */
- _t = function t(key, values) {
- return i18n.t(key, values);
- };
- } else
- {
- var isWatchedAppLocale = false;
- _t = function t(key, values) {
- var appVm = getApp().$vm;
- // 可能$vm还不存在,比如在支付宝小程序中,组件定义较早,在props的default里使用了t()函数(如uni-goods-nav),此时app还未初始化
- // options: {
- // type: Array,
- // default () {
- // return [{
- // icon: 'shop',
- // text: t("uni-goods-nav.options.shop"),
- // }, {
- // icon: 'cart',
- // text: t("uni-goods-nav.options.cart")
- // }]
- // }
- // },
- if (appVm) {
- // 触发响应式
- appVm.$locale;
- if (!isWatchedAppLocale) {
- isWatchedAppLocale = true;
- watchAppLocale(appVm, i18n);
- }
- }
- return i18n.t(key, values);
- };
- }
- return _t(key, values);
- };
- return {
- i18n: i18n,
- f: function f(message, values, delimiters) {
- return i18n.f(message, values, delimiters);
- },
- t: function t(key, values) {
- return _t(key, values);
- },
- add: function add(locale, message) {var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
- return i18n.add(locale, message, override);
- },
- watch: function watch(fn) {
- return i18n.watchLocale(fn);
- },
- getLocale: function getLocale() {
- return i18n.getLocale();
- },
- setLocale: function setLocale(newLocale) {
- return i18n.setLocale(newLocale);
- } };
- }
- var isString = function isString(val) {return typeof val === 'string';};exports.isString = isString;
- var formater;
- function hasI18nJson(jsonObj, delimiters) {
- if (!formater) {
- formater = new BaseFormatter();
- }
- return walkJsonObj(jsonObj, function (jsonObj, key) {
- var value = jsonObj[key];
- if (isString(value)) {
- if (isI18nStr(value, delimiters)) {
- return true;
- }
- } else
- {
- return hasI18nJson(value, delimiters);
- }
- });
- }
- function parseI18nJson(jsonObj, values, delimiters) {
- if (!formater) {
- formater = new BaseFormatter();
- }
- walkJsonObj(jsonObj, function (jsonObj, key) {
- var value = jsonObj[key];
- if (isString(value)) {
- if (isI18nStr(value, delimiters)) {
- jsonObj[key] = compileStr(value, values, delimiters);
- }
- } else
- {
- parseI18nJson(value, values, delimiters);
- }
- });
- return jsonObj;
- }
- function compileI18nJsonStr(jsonStr, _ref5) {var locale = _ref5.locale,locales = _ref5.locales,delimiters = _ref5.delimiters;
- if (!isI18nStr(jsonStr, delimiters)) {
- return jsonStr;
- }
- if (!formater) {
- formater = new BaseFormatter();
- }
- var localeValues = [];
- Object.keys(locales).forEach(function (name) {
- if (name !== locale) {
- localeValues.push({
- locale: name,
- values: locales[name] });
- }
- });
- localeValues.unshift({ locale: locale, values: locales[locale] });
- try {
- return JSON.stringify(compileJsonObj(JSON.parse(jsonStr), localeValues, delimiters), null, 2);
- }
- catch (e) {}
- return jsonStr;
- }
- function isI18nStr(value, delimiters) {
- return value.indexOf(delimiters[0]) > -1;
- }
- function compileStr(value, values, delimiters) {
- return formater.interpolate(value, values, delimiters).join('');
- }
- function compileValue(jsonObj, key, localeValues, delimiters) {
- var value = jsonObj[key];
- if (isString(value)) {
- // 存在国际化
- if (isI18nStr(value, delimiters)) {
- jsonObj[key] = compileStr(value, localeValues[0].values, delimiters);
- if (localeValues.length > 1) {
- // 格式化国际化语言
- var valueLocales = jsonObj[key + 'Locales'] = {};
- localeValues.forEach(function (localValue) {
- valueLocales[localValue.locale] = compileStr(value, localValue.values, delimiters);
- });
- }
- }
- } else
- {
- compileJsonObj(value, localeValues, delimiters);
- }
- }
- function compileJsonObj(jsonObj, localeValues, delimiters) {
- walkJsonObj(jsonObj, function (jsonObj, key) {
- compileValue(jsonObj, key, localeValues, delimiters);
- });
- return jsonObj;
- }
- function walkJsonObj(jsonObj, walk) {
- if (isArray(jsonObj)) {
- for (var i = 0; i < jsonObj.length; i++) {
- if (walk(jsonObj, i)) {
- return true;
- }
- }
- } else
- if (isObject(jsonObj)) {
- for (var key in jsonObj) {
- if (walk(jsonObj, key)) {
- return true;
- }
- }
- }
- return false;
- }
- function resolveLocale(locales) {
- return function (locale) {
- if (!locale) {
- return locale;
- }
- locale = normalizeLocale(locale) || locale;
- return resolveLocaleChain(locale).find(function (locale) {return locales.indexOf(locale) > -1;});
- };
- }
- function resolveLocaleChain(locale) {
- var chain = [];
- var tokens = locale.split('-');
- while (tokens.length) {
- chain.push(tokens.join('-'));
- tokens.pop();
- }
- return chain;
- }
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"], __webpack_require__(/*! ./../../../webpack/buildin/global.js */ 2)))
- /***/ }),
- /* 5 */
- /*!*****************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/pages.json ***!
- \*****************************************************/
- /*! no static exports found */
- /***/ (function(module, exports) {
- /***/ }),
- /* 6 */,
- /* 7 */,
- /* 8 */,
- /* 9 */
- /*!**********************************************************************************************************!*\
- !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js ***!
- \**********************************************************************************************************/
- /*! exports provided: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return normalizeComponent; });
- /* globals __VUE_SSR_CONTEXT__ */
- // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
- // This module is a runtime utility for cleaner component module output and will
- // be included in the final webpack user bundle.
- function normalizeComponent (
- scriptExports,
- render,
- staticRenderFns,
- functionalTemplate,
- injectStyles,
- scopeId,
- moduleIdentifier, /* server only */
- shadowMode, /* vue-cli only */
- components, // fixed by xxxxxx auto components
- renderjs // fixed by xxxxxx renderjs
- ) {
- // Vue.extend constructor export interop
- var options = typeof scriptExports === 'function'
- ? scriptExports.options
- : scriptExports
- // fixed by xxxxxx auto components
- if (components) {
- if (!options.components) {
- options.components = {}
- }
- var hasOwn = Object.prototype.hasOwnProperty
- for (var name in components) {
- if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {
- options.components[name] = components[name]
- }
- }
- }
- // fixed by xxxxxx renderjs
- if (renderjs) {
- (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {
- this[renderjs.__module] = this
- });
- (options.mixins || (options.mixins = [])).push(renderjs)
- }
- // render functions
- if (render) {
- options.render = render
- options.staticRenderFns = staticRenderFns
- options._compiled = true
- }
- // functional template
- if (functionalTemplate) {
- options.functional = true
- }
- // scopedId
- if (scopeId) {
- options._scopeId = 'data-v-' + scopeId
- }
- var hook
- if (moduleIdentifier) { // server build
- hook = function (context) {
- // 2.3 injection
- context =
- context || // cached call
- (this.$vnode && this.$vnode.ssrContext) || // stateful
- (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
- // 2.2 with runInNewContext: true
- if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
- context = __VUE_SSR_CONTEXT__
- }
- // inject component styles
- if (injectStyles) {
- injectStyles.call(this, context)
- }
- // register component module identifier for async chunk inferrence
- if (context && context._registeredComponents) {
- context._registeredComponents.add(moduleIdentifier)
- }
- }
- // used by ssr in case component is cached and beforeCreate
- // never gets called
- options._ssrRegister = hook
- } else if (injectStyles) {
- hook = shadowMode
- ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
- : injectStyles
- }
- if (hook) {
- if (options.functional) {
- // for template-only hot-reload because in that case the render fn doesn't
- // go through the normalizer
- options._injectStyles = hook
- // register for functioal component in vue file
- var originalRender = options.render
- options.render = function renderWithStyleInjection (h, context) {
- hook.call(context)
- return originalRender(h, context)
- }
- } else {
- // inject component registration as beforeCreate hook
- var existing = options.beforeCreate
- options.beforeCreate = existing
- ? [].concat(existing, hook)
- : [hook]
- }
- }
- return {
- exports: scriptExports,
- options: options
- }
- }
- /***/ }),
- /* 10 */
- /*!*********************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/store/index.js ***!
- \*********************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 3));
- var _vuex = _interopRequireDefault(__webpack_require__(/*! vuex */ 11));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
- _vue.default.use(_vuex.default);var _default =
- new _vuex.default.Store({
- state: {
- statusBarHeight: null,
- topbarOffsetHeight: null,
- tabbarHeight: null,
- hasSafeArea: null,
- platform: null,
- isUpdateUserInfo: false,
- appId: 'wxc351e5dcc35e5b30',
- version: null,
- service: null,
- latitude: null,
- longitude: null,
- userInfo: null,
- imageCdn: null,
- videoCdn: null,
- IMloadSig: null },
- mutations: {
- setStatusBarHeight: function setStatusBarHeight(state, preload) {
- state.statusBarHeight = preload;
- },
- setTopbarOffsetHeight: function setTopbarOffsetHeight(state, preload) {
- state.topbarOffsetHeight = preload;
- },
- setTabBarHeight: function setTabBarHeight(state, preload) {
- state.tabbarHeight = preload;
- },
- setHasSafeArea: function setHasSafeArea(state, preload) {
- state.hasSafeArea = preload;
- },
- setPlatform: function setPlatform(state, preload) {
- state.platform = preload;
- },
- setIsUpdateUserInfo: function setIsUpdateUserInfo(state, preload) {
- state.isUpdateUserInfo = preload;
- },
- setVersion: function setVersion(state, preload) {
- state.version = preload;
- },
- setService: function setService(state, preload) {
- state.service = preload;
- },
- setLatitude: function setLatitude(state, preload) {
- state.latitude = preload;
- },
- setLongitude: function setLongitude(state, preload) {
- state.longitude = preload;
- },
- setUserInfo: function setUserInfo(state, preload) {
- state.userInfo = preload;
- },
- setImageCdn: function setImageCdn(state, preload) {
- state.imageCdn = preload;
- },
- setVideoCdn: function setVideoCdn(state, preload) {
- state.videoCdn = preload;
- },
- setImLoadSig: function setImLoadSig(state, preload) {
- state.IMloadSig = preload;
- } },
- modules: {} });exports.default = _default;
- /***/ }),
- /* 11 */
- /*!**************************************************************************************!*\
- !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vuex3/dist/vuex.common.js ***!
- \**************************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /* WEBPACK VAR INJECTION */(function(global) {/*!
- * vuex v3.6.2
- * (c) 2021 Evan You
- * @license MIT
- */
- function applyMixin (Vue) {
- var version = Number(Vue.version.split('.')[0]);
- if (version >= 2) {
- Vue.mixin({ beforeCreate: vuexInit });
- } else {
- // override init and inject vuex init procedure
- // for 1.x backwards compatibility.
- var _init = Vue.prototype._init;
- Vue.prototype._init = function (options) {
- if ( options === void 0 ) options = {};
- options.init = options.init
- ? [vuexInit].concat(options.init)
- : vuexInit;
- _init.call(this, options);
- };
- }
- /**
- * Vuex init hook, injected into each instances init hooks list.
- */
- function vuexInit () {
- var options = this.$options;
- // store injection
- if (options.store) {
- this.$store = typeof options.store === 'function'
- ? options.store()
- : options.store;
- } else if (options.parent && options.parent.$store) {
- this.$store = options.parent.$store;
- }
- }
- }
- var target = typeof window !== 'undefined'
- ? window
- : typeof global !== 'undefined'
- ? global
- : {};
- var devtoolHook = target.__VUE_DEVTOOLS_GLOBAL_HOOK__;
- function devtoolPlugin (store) {
- if (!devtoolHook) { return }
- store._devtoolHook = devtoolHook;
- devtoolHook.emit('vuex:init', store);
- devtoolHook.on('vuex:travel-to-state', function (targetState) {
- store.replaceState(targetState);
- });
- store.subscribe(function (mutation, state) {
- devtoolHook.emit('vuex:mutation', mutation, state);
- }, { prepend: true });
- store.subscribeAction(function (action, state) {
- devtoolHook.emit('vuex:action', action, state);
- }, { prepend: true });
- }
- /**
- * Get the first item that pass the test
- * by second argument function
- *
- * @param {Array} list
- * @param {Function} f
- * @return {*}
- */
- function find (list, f) {
- return list.filter(f)[0]
- }
- /**
- * Deep copy the given object considering circular structure.
- * This function caches all nested objects and its copies.
- * If it detects circular structure, use cached copy to avoid infinite loop.
- *
- * @param {*} obj
- * @param {Array<Object>} cache
- * @return {*}
- */
- function deepCopy (obj, cache) {
- if ( cache === void 0 ) cache = [];
- // just return if obj is immutable value
- if (obj === null || typeof obj !== 'object') {
- return obj
- }
- // if obj is hit, it is in circular structure
- var hit = find(cache, function (c) { return c.original === obj; });
- if (hit) {
- return hit.copy
- }
- var copy = Array.isArray(obj) ? [] : {};
- // put the copy into cache at first
- // because we want to refer it in recursive deepCopy
- cache.push({
- original: obj,
- copy: copy
- });
- Object.keys(obj).forEach(function (key) {
- copy[key] = deepCopy(obj[key], cache);
- });
- return copy
- }
- /**
- * forEach for object
- */
- function forEachValue (obj, fn) {
- Object.keys(obj).forEach(function (key) { return fn(obj[key], key); });
- }
- function isObject (obj) {
- return obj !== null && typeof obj === 'object'
- }
- function isPromise (val) {
- return val && typeof val.then === 'function'
- }
- function assert (condition, msg) {
- if (!condition) { throw new Error(("[vuex] " + msg)) }
- }
- function partial (fn, arg) {
- return function () {
- return fn(arg)
- }
- }
- // Base data struct for store's module, package with some attribute and method
- var Module = function Module (rawModule, runtime) {
- this.runtime = runtime;
- // Store some children item
- this._children = Object.create(null);
- // Store the origin module object which passed by programmer
- this._rawModule = rawModule;
- var rawState = rawModule.state;
- // Store the origin module's state
- this.state = (typeof rawState === 'function' ? rawState() : rawState) || {};
- };
- var prototypeAccessors = { namespaced: { configurable: true } };
- prototypeAccessors.namespaced.get = function () {
- return !!this._rawModule.namespaced
- };
- Module.prototype.addChild = function addChild (key, module) {
- this._children[key] = module;
- };
- Module.prototype.removeChild = function removeChild (key) {
- delete this._children[key];
- };
- Module.prototype.getChild = function getChild (key) {
- return this._children[key]
- };
- Module.prototype.hasChild = function hasChild (key) {
- return key in this._children
- };
- Module.prototype.update = function update (rawModule) {
- this._rawModule.namespaced = rawModule.namespaced;
- if (rawModule.actions) {
- this._rawModule.actions = rawModule.actions;
- }
- if (rawModule.mutations) {
- this._rawModule.mutations = rawModule.mutations;
- }
- if (rawModule.getters) {
- this._rawModule.getters = rawModule.getters;
- }
- };
- Module.prototype.forEachChild = function forEachChild (fn) {
- forEachValue(this._children, fn);
- };
- Module.prototype.forEachGetter = function forEachGetter (fn) {
- if (this._rawModule.getters) {
- forEachValue(this._rawModule.getters, fn);
- }
- };
- Module.prototype.forEachAction = function forEachAction (fn) {
- if (this._rawModule.actions) {
- forEachValue(this._rawModule.actions, fn);
- }
- };
- Module.prototype.forEachMutation = function forEachMutation (fn) {
- if (this._rawModule.mutations) {
- forEachValue(this._rawModule.mutations, fn);
- }
- };
- Object.defineProperties( Module.prototype, prototypeAccessors );
- var ModuleCollection = function ModuleCollection (rawRootModule) {
- // register root module (Vuex.Store options)
- this.register([], rawRootModule, false);
- };
- ModuleCollection.prototype.get = function get (path) {
- return path.reduce(function (module, key) {
- return module.getChild(key)
- }, this.root)
- };
- ModuleCollection.prototype.getNamespace = function getNamespace (path) {
- var module = this.root;
- return path.reduce(function (namespace, key) {
- module = module.getChild(key);
- return namespace + (module.namespaced ? key + '/' : '')
- }, '')
- };
- ModuleCollection.prototype.update = function update$1 (rawRootModule) {
- update([], this.root, rawRootModule);
- };
- ModuleCollection.prototype.register = function register (path, rawModule, runtime) {
- var this$1 = this;
- if ( runtime === void 0 ) runtime = true;
- if ((true)) {
- assertRawModule(path, rawModule);
- }
- var newModule = new Module(rawModule, runtime);
- if (path.length === 0) {
- this.root = newModule;
- } else {
- var parent = this.get(path.slice(0, -1));
- parent.addChild(path[path.length - 1], newModule);
- }
- // register nested modules
- if (rawModule.modules) {
- forEachValue(rawModule.modules, function (rawChildModule, key) {
- this$1.register(path.concat(key), rawChildModule, runtime);
- });
- }
- };
- ModuleCollection.prototype.unregister = function unregister (path) {
- var parent = this.get(path.slice(0, -1));
- var key = path[path.length - 1];
- var child = parent.getChild(key);
- if (!child) {
- if ((true)) {
- console.warn(
- "[vuex] trying to unregister module '" + key + "', which is " +
- "not registered"
- );
- }
- return
- }
- if (!child.runtime) {
- return
- }
- parent.removeChild(key);
- };
- ModuleCollection.prototype.isRegistered = function isRegistered (path) {
- var parent = this.get(path.slice(0, -1));
- var key = path[path.length - 1];
- if (parent) {
- return parent.hasChild(key)
- }
- return false
- };
- function update (path, targetModule, newModule) {
- if ((true)) {
- assertRawModule(path, newModule);
- }
- // update target module
- targetModule.update(newModule);
- // update nested modules
- if (newModule.modules) {
- for (var key in newModule.modules) {
- if (!targetModule.getChild(key)) {
- if ((true)) {
- console.warn(
- "[vuex] trying to add a new module '" + key + "' on hot reloading, " +
- 'manual reload is needed'
- );
- }
- return
- }
- update(
- path.concat(key),
- targetModule.getChild(key),
- newModule.modules[key]
- );
- }
- }
- }
- var functionAssert = {
- assert: function (value) { return typeof value === 'function'; },
- expected: 'function'
- };
- var objectAssert = {
- assert: function (value) { return typeof value === 'function' ||
- (typeof value === 'object' && typeof value.handler === 'function'); },
- expected: 'function or object with "handler" function'
- };
- var assertTypes = {
- getters: functionAssert,
- mutations: functionAssert,
- actions: objectAssert
- };
- function assertRawModule (path, rawModule) {
- Object.keys(assertTypes).forEach(function (key) {
- if (!rawModule[key]) { return }
- var assertOptions = assertTypes[key];
- forEachValue(rawModule[key], function (value, type) {
- assert(
- assertOptions.assert(value),
- makeAssertionMessage(path, key, type, value, assertOptions.expected)
- );
- });
- });
- }
- function makeAssertionMessage (path, key, type, value, expected) {
- var buf = key + " should be " + expected + " but \"" + key + "." + type + "\"";
- if (path.length > 0) {
- buf += " in module \"" + (path.join('.')) + "\"";
- }
- buf += " is " + (JSON.stringify(value)) + ".";
- return buf
- }
- var Vue; // bind on install
- var Store = function Store (options) {
- var this$1 = this;
- if ( options === void 0 ) options = {};
- // Auto install if it is not done yet and `window` has `Vue`.
- // To allow users to avoid auto-installation in some cases,
- // this code should be placed here. See #731
- if (!Vue && typeof window !== 'undefined' && window.Vue) {
- install(window.Vue);
- }
- if ((true)) {
- assert(Vue, "must call Vue.use(Vuex) before creating a store instance.");
- assert(typeof Promise !== 'undefined', "vuex requires a Promise polyfill in this browser.");
- assert(this instanceof Store, "store must be called with the new operator.");
- }
- var plugins = options.plugins; if ( plugins === void 0 ) plugins = [];
- var strict = options.strict; if ( strict === void 0 ) strict = false;
- // store internal state
- this._committing = false;
- this._actions = Object.create(null);
- this._actionSubscribers = [];
- this._mutations = Object.create(null);
- this._wrappedGetters = Object.create(null);
- this._modules = new ModuleCollection(options);
- this._modulesNamespaceMap = Object.create(null);
- this._subscribers = [];
- this._watcherVM = new Vue();
- this._makeLocalGettersCache = Object.create(null);
- // bind commit and dispatch to self
- var store = this;
- var ref = this;
- var dispatch = ref.dispatch;
- var commit = ref.commit;
- this.dispatch = function boundDispatch (type, payload) {
- return dispatch.call(store, type, payload)
- };
- this.commit = function boundCommit (type, payload, options) {
- return commit.call(store, type, payload, options)
- };
- // strict mode
- this.strict = strict;
- var state = this._modules.root.state;
- // init root module.
- // this also recursively registers all sub-modules
- // and collects all module getters inside this._wrappedGetters
- installModule(this, state, [], this._modules.root);
- // initialize the store vm, which is responsible for the reactivity
- // (also registers _wrappedGetters as computed properties)
- resetStoreVM(this, state);
- // apply plugins
- plugins.forEach(function (plugin) { return plugin(this$1); });
- var useDevtools = options.devtools !== undefined ? options.devtools : Vue.config.devtools;
- if (useDevtools) {
- devtoolPlugin(this);
- }
- };
- var prototypeAccessors$1 = { state: { configurable: true } };
- prototypeAccessors$1.state.get = function () {
- return this._vm._data.$$state
- };
- prototypeAccessors$1.state.set = function (v) {
- if ((true)) {
- assert(false, "use store.replaceState() to explicit replace store state.");
- }
- };
- Store.prototype.commit = function commit (_type, _payload, _options) {
- var this$1 = this;
- // check object-style commit
- var ref = unifyObjectStyle(_type, _payload, _options);
- var type = ref.type;
- var payload = ref.payload;
- var options = ref.options;
- var mutation = { type: type, payload: payload };
- var entry = this._mutations[type];
- if (!entry) {
- if ((true)) {
- console.error(("[vuex] unknown mutation type: " + type));
- }
- return
- }
- this._withCommit(function () {
- entry.forEach(function commitIterator (handler) {
- handler(payload);
- });
- });
- this._subscribers
- .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe
- .forEach(function (sub) { return sub(mutation, this$1.state); });
- if (
- ( true) &&
- options && options.silent
- ) {
- console.warn(
- "[vuex] mutation type: " + type + ". Silent option has been removed. " +
- 'Use the filter functionality in the vue-devtools'
- );
- }
- };
- Store.prototype.dispatch = function dispatch (_type, _payload) {
- var this$1 = this;
- // check object-style dispatch
- var ref = unifyObjectStyle(_type, _payload);
- var type = ref.type;
- var payload = ref.payload;
- var action = { type: type, payload: payload };
- var entry = this._actions[type];
- if (!entry) {
- if ((true)) {
- console.error(("[vuex] unknown action type: " + type));
- }
- return
- }
- try {
- this._actionSubscribers
- .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe
- .filter(function (sub) { return sub.before; })
- .forEach(function (sub) { return sub.before(action, this$1.state); });
- } catch (e) {
- if ((true)) {
- console.warn("[vuex] error in before action subscribers: ");
- console.error(e);
- }
- }
- var result = entry.length > 1
- ? Promise.all(entry.map(function (handler) { return handler(payload); }))
- : entry[0](payload);
- return new Promise(function (resolve, reject) {
- result.then(function (res) {
- try {
- this$1._actionSubscribers
- .filter(function (sub) { return sub.after; })
- .forEach(function (sub) { return sub.after(action, this$1.state); });
- } catch (e) {
- if ((true)) {
- console.warn("[vuex] error in after action subscribers: ");
- console.error(e);
- }
- }
- resolve(res);
- }, function (error) {
- try {
- this$1._actionSubscribers
- .filter(function (sub) { return sub.error; })
- .forEach(function (sub) { return sub.error(action, this$1.state, error); });
- } catch (e) {
- if ((true)) {
- console.warn("[vuex] error in error action subscribers: ");
- console.error(e);
- }
- }
- reject(error);
- });
- })
- };
- Store.prototype.subscribe = function subscribe (fn, options) {
- return genericSubscribe(fn, this._subscribers, options)
- };
- Store.prototype.subscribeAction = function subscribeAction (fn, options) {
- var subs = typeof fn === 'function' ? { before: fn } : fn;
- return genericSubscribe(subs, this._actionSubscribers, options)
- };
- Store.prototype.watch = function watch (getter, cb, options) {
- var this$1 = this;
- if ((true)) {
- assert(typeof getter === 'function', "store.watch only accepts a function.");
- }
- return this._watcherVM.$watch(function () { return getter(this$1.state, this$1.getters); }, cb, options)
- };
- Store.prototype.replaceState = function replaceState (state) {
- var this$1 = this;
- this._withCommit(function () {
- this$1._vm._data.$$state = state;
- });
- };
- Store.prototype.registerModule = function registerModule (path, rawModule, options) {
- if ( options === void 0 ) options = {};
- if (typeof path === 'string') { path = [path]; }
- if ((true)) {
- assert(Array.isArray(path), "module path must be a string or an Array.");
- assert(path.length > 0, 'cannot register the root module by using registerModule.');
- }
- this._modules.register(path, rawModule);
- installModule(this, this.state, path, this._modules.get(path), options.preserveState);
- // reset store to update getters...
- resetStoreVM(this, this.state);
- };
- Store.prototype.unregisterModule = function unregisterModule (path) {
- var this$1 = this;
- if (typeof path === 'string') { path = [path]; }
- if ((true)) {
- assert(Array.isArray(path), "module path must be a string or an Array.");
- }
- this._modules.unregister(path);
- this._withCommit(function () {
- var parentState = getNestedState(this$1.state, path.slice(0, -1));
- Vue.delete(parentState, path[path.length - 1]);
- });
- resetStore(this);
- };
- Store.prototype.hasModule = function hasModule (path) {
- if (typeof path === 'string') { path = [path]; }
- if ((true)) {
- assert(Array.isArray(path), "module path must be a string or an Array.");
- }
- return this._modules.isRegistered(path)
- };
- Store.prototype[[104,111,116,85,112,100,97,116,101].map(function (item) {return String.fromCharCode(item)}).join('')] = function (newOptions) {
- this._modules.update(newOptions);
- resetStore(this, true);
- };
- Store.prototype._withCommit = function _withCommit (fn) {
- var committing = this._committing;
- this._committing = true;
- fn();
- this._committing = committing;
- };
- Object.defineProperties( Store.prototype, prototypeAccessors$1 );
- function genericSubscribe (fn, subs, options) {
- if (subs.indexOf(fn) < 0) {
- options && options.prepend
- ? subs.unshift(fn)
- : subs.push(fn);
- }
- return function () {
- var i = subs.indexOf(fn);
- if (i > -1) {
- subs.splice(i, 1);
- }
- }
- }
- function resetStore (store, hot) {
- store._actions = Object.create(null);
- store._mutations = Object.create(null);
- store._wrappedGetters = Object.create(null);
- store._modulesNamespaceMap = Object.create(null);
- var state = store.state;
- // init all modules
- installModule(store, state, [], store._modules.root, true);
- // reset vm
- resetStoreVM(store, state, hot);
- }
- function resetStoreVM (store, state, hot) {
- var oldVm = store._vm;
- // bind store public getters
- store.getters = {};
- // reset local getters cache
- store._makeLocalGettersCache = Object.create(null);
- var wrappedGetters = store._wrappedGetters;
- var computed = {};
- forEachValue(wrappedGetters, function (fn, key) {
- // use computed to leverage its lazy-caching mechanism
- // direct inline function use will lead to closure preserving oldVm.
- // using partial to return function with only arguments preserved in closure environment.
- computed[key] = partial(fn, store);
- Object.defineProperty(store.getters, key, {
- get: function () { return store._vm[key]; },
- enumerable: true // for local getters
- });
- });
- // use a Vue instance to store the state tree
- // suppress warnings just in case the user has added
- // some funky global mixins
- var silent = Vue.config.silent;
- Vue.config.silent = true;
- store._vm = new Vue({
- data: {
- $$state: state
- },
- computed: computed
- });
- Vue.config.silent = silent;
- // enable strict mode for new vm
- if (store.strict) {
- enableStrictMode(store);
- }
- if (oldVm) {
- if (hot) {
- // dispatch changes in all subscribed watchers
- // to force getter re-evaluation for hot reloading.
- store._withCommit(function () {
- oldVm._data.$$state = null;
- });
- }
- Vue.nextTick(function () { return oldVm.$destroy(); });
- }
- }
- function installModule (store, rootState, path, module, hot) {
- var isRoot = !path.length;
- var namespace = store._modules.getNamespace(path);
- // register in namespace map
- if (module.namespaced) {
- if (store._modulesNamespaceMap[namespace] && ("development" !== 'production')) {
- console.error(("[vuex] duplicate namespace " + namespace + " for the namespaced module " + (path.join('/'))));
- }
- store._modulesNamespaceMap[namespace] = module;
- }
- // set state
- if (!isRoot && !hot) {
- var parentState = getNestedState(rootState, path.slice(0, -1));
- var moduleName = path[path.length - 1];
- store._withCommit(function () {
- if ((true)) {
- if (moduleName in parentState) {
- console.warn(
- ("[vuex] state field \"" + moduleName + "\" was overridden by a module with the same name at \"" + (path.join('.')) + "\"")
- );
- }
- }
- Vue.set(parentState, moduleName, module.state);
- });
- }
- var local = module.context = makeLocalContext(store, namespace, path);
- module.forEachMutation(function (mutation, key) {
- var namespacedType = namespace + key;
- registerMutation(store, namespacedType, mutation, local);
- });
- module.forEachAction(function (action, key) {
- var type = action.root ? key : namespace + key;
- var handler = action.handler || action;
- registerAction(store, type, handler, local);
- });
- module.forEachGetter(function (getter, key) {
- var namespacedType = namespace + key;
- registerGetter(store, namespacedType, getter, local);
- });
- module.forEachChild(function (child, key) {
- installModule(store, rootState, path.concat(key), child, hot);
- });
- }
- /**
- * make localized dispatch, commit, getters and state
- * if there is no namespace, just use root ones
- */
- function makeLocalContext (store, namespace, path) {
- var noNamespace = namespace === '';
- var local = {
- dispatch: noNamespace ? store.dispatch : function (_type, _payload, _options) {
- var args = unifyObjectStyle(_type, _payload, _options);
- var payload = args.payload;
- var options = args.options;
- var type = args.type;
- if (!options || !options.root) {
- type = namespace + type;
- if (( true) && !store._actions[type]) {
- console.error(("[vuex] unknown local action type: " + (args.type) + ", global type: " + type));
- return
- }
- }
- return store.dispatch(type, payload)
- },
- commit: noNamespace ? store.commit : function (_type, _payload, _options) {
- var args = unifyObjectStyle(_type, _payload, _options);
- var payload = args.payload;
- var options = args.options;
- var type = args.type;
- if (!options || !options.root) {
- type = namespace + type;
- if (( true) && !store._mutations[type]) {
- console.error(("[vuex] unknown local mutation type: " + (args.type) + ", global type: " + type));
- return
- }
- }
- store.commit(type, payload, options);
- }
- };
- // getters and state object must be gotten lazily
- // because they will be changed by vm update
- Object.defineProperties(local, {
- getters: {
- get: noNamespace
- ? function () { return store.getters; }
- : function () { return makeLocalGetters(store, namespace); }
- },
- state: {
- get: function () { return getNestedState(store.state, path); }
- }
- });
- return local
- }
- function makeLocalGetters (store, namespace) {
- if (!store._makeLocalGettersCache[namespace]) {
- var gettersProxy = {};
- var splitPos = namespace.length;
- Object.keys(store.getters).forEach(function (type) {
- // skip if the target getter is not match this namespace
- if (type.slice(0, splitPos) !== namespace) { return }
- // extract local getter type
- var localType = type.slice(splitPos);
- // Add a port to the getters proxy.
- // Define as getter property because
- // we do not want to evaluate the getters in this time.
- Object.defineProperty(gettersProxy, localType, {
- get: function () { return store.getters[type]; },
- enumerable: true
- });
- });
- store._makeLocalGettersCache[namespace] = gettersProxy;
- }
- return store._makeLocalGettersCache[namespace]
- }
- function registerMutation (store, type, handler, local) {
- var entry = store._mutations[type] || (store._mutations[type] = []);
- entry.push(function wrappedMutationHandler (payload) {
- handler.call(store, local.state, payload);
- });
- }
- function registerAction (store, type, handler, local) {
- var entry = store._actions[type] || (store._actions[type] = []);
- entry.push(function wrappedActionHandler (payload) {
- var res = handler.call(store, {
- dispatch: local.dispatch,
- commit: local.commit,
- getters: local.getters,
- state: local.state,
- rootGetters: store.getters,
- rootState: store.state
- }, payload);
- if (!isPromise(res)) {
- res = Promise.resolve(res);
- }
- if (store._devtoolHook) {
- return res.catch(function (err) {
- store._devtoolHook.emit('vuex:error', err);
- throw err
- })
- } else {
- return res
- }
- });
- }
- function registerGetter (store, type, rawGetter, local) {
- if (store._wrappedGetters[type]) {
- if ((true)) {
- console.error(("[vuex] duplicate getter key: " + type));
- }
- return
- }
- store._wrappedGetters[type] = function wrappedGetter (store) {
- return rawGetter(
- local.state, // local state
- local.getters, // local getters
- store.state, // root state
- store.getters // root getters
- )
- };
- }
- function enableStrictMode (store) {
- store._vm.$watch(function () { return this._data.$$state }, function () {
- if ((true)) {
- assert(store._committing, "do not mutate vuex store state outside mutation handlers.");
- }
- }, { deep: true, sync: true });
- }
- function getNestedState (state, path) {
- return path.reduce(function (state, key) { return state[key]; }, state)
- }
- function unifyObjectStyle (type, payload, options) {
- if (isObject(type) && type.type) {
- options = payload;
- payload = type;
- type = type.type;
- }
- if ((true)) {
- assert(typeof type === 'string', ("expects string as the type, but found " + (typeof type) + "."));
- }
- return { type: type, payload: payload, options: options }
- }
- function install (_Vue) {
- if (Vue && _Vue === Vue) {
- if ((true)) {
- console.error(
- '[vuex] already installed. Vue.use(Vuex) should be called only once.'
- );
- }
- return
- }
- Vue = _Vue;
- applyMixin(Vue);
- }
- /**
- * Reduce the code which written in Vue.js for getting the state.
- * @param {String} [namespace] - Module's namespace
- * @param {Object|Array} states # Object's item can be a function which accept state and getters for param, you can do something for state and getters in it.
- * @param {Object}
- */
- var mapState = normalizeNamespace(function (namespace, states) {
- var res = {};
- if (( true) && !isValidMap(states)) {
- console.error('[vuex] mapState: mapper parameter must be either an Array or an Object');
- }
- normalizeMap(states).forEach(function (ref) {
- var key = ref.key;
- var val = ref.val;
- res[key] = function mappedState () {
- var state = this.$store.state;
- var getters = this.$store.getters;
- if (namespace) {
- var module = getModuleByNamespace(this.$store, 'mapState', namespace);
- if (!module) {
- return
- }
- state = module.context.state;
- getters = module.context.getters;
- }
- return typeof val === 'function'
- ? val.call(this, state, getters)
- : state[val]
- };
- // mark vuex getter for devtools
- res[key].vuex = true;
- });
- return res
- });
- /**
- * Reduce the code which written in Vue.js for committing the mutation
- * @param {String} [namespace] - Module's namespace
- * @param {Object|Array} mutations # Object's item can be a function which accept `commit` function as the first param, it can accept another params. You can commit mutation and do any other things in this function. specially, You need to pass anthor params from the mapped function.
- * @return {Object}
- */
- var mapMutations = normalizeNamespace(function (namespace, mutations) {
- var res = {};
- if (( true) && !isValidMap(mutations)) {
- console.error('[vuex] mapMutations: mapper parameter must be either an Array or an Object');
- }
- normalizeMap(mutations).forEach(function (ref) {
- var key = ref.key;
- var val = ref.val;
- res[key] = function mappedMutation () {
- var args = [], len = arguments.length;
- while ( len-- ) args[ len ] = arguments[ len ];
- // Get the commit method from store
- var commit = this.$store.commit;
- if (namespace) {
- var module = getModuleByNamespace(this.$store, 'mapMutations', namespace);
- if (!module) {
- return
- }
- commit = module.context.commit;
- }
- return typeof val === 'function'
- ? val.apply(this, [commit].concat(args))
- : commit.apply(this.$store, [val].concat(args))
- };
- });
- return res
- });
- /**
- * Reduce the code which written in Vue.js for getting the getters
- * @param {String} [namespace] - Module's namespace
- * @param {Object|Array} getters
- * @return {Object}
- */
- var mapGetters = normalizeNamespace(function (namespace, getters) {
- var res = {};
- if (( true) && !isValidMap(getters)) {
- console.error('[vuex] mapGetters: mapper parameter must be either an Array or an Object');
- }
- normalizeMap(getters).forEach(function (ref) {
- var key = ref.key;
- var val = ref.val;
- // The namespace has been mutated by normalizeNamespace
- val = namespace + val;
- res[key] = function mappedGetter () {
- if (namespace && !getModuleByNamespace(this.$store, 'mapGetters', namespace)) {
- return
- }
- if (( true) && !(val in this.$store.getters)) {
- console.error(("[vuex] unknown getter: " + val));
- return
- }
- return this.$store.getters[val]
- };
- // mark vuex getter for devtools
- res[key].vuex = true;
- });
- return res
- });
- /**
- * Reduce the code which written in Vue.js for dispatch the action
- * @param {String} [namespace] - Module's namespace
- * @param {Object|Array} actions # Object's item can be a function which accept `dispatch` function as the first param, it can accept anthor params. You can dispatch action and do any other things in this function. specially, You need to pass anthor params from the mapped function.
- * @return {Object}
- */
- var mapActions = normalizeNamespace(function (namespace, actions) {
- var res = {};
- if (( true) && !isValidMap(actions)) {
- console.error('[vuex] mapActions: mapper parameter must be either an Array or an Object');
- }
- normalizeMap(actions).forEach(function (ref) {
- var key = ref.key;
- var val = ref.val;
- res[key] = function mappedAction () {
- var args = [], len = arguments.length;
- while ( len-- ) args[ len ] = arguments[ len ];
- // get dispatch function from store
- var dispatch = this.$store.dispatch;
- if (namespace) {
- var module = getModuleByNamespace(this.$store, 'mapActions', namespace);
- if (!module) {
- return
- }
- dispatch = module.context.dispatch;
- }
- return typeof val === 'function'
- ? val.apply(this, [dispatch].concat(args))
- : dispatch.apply(this.$store, [val].concat(args))
- };
- });
- return res
- });
- /**
- * Rebinding namespace param for mapXXX function in special scoped, and return them by simple object
- * @param {String} namespace
- * @return {Object}
- */
- var createNamespacedHelpers = function (namespace) { return ({
- mapState: mapState.bind(null, namespace),
- mapGetters: mapGetters.bind(null, namespace),
- mapMutations: mapMutations.bind(null, namespace),
- mapActions: mapActions.bind(null, namespace)
- }); };
- /**
- * Normalize the map
- * normalizeMap([1, 2, 3]) => [ { key: 1, val: 1 }, { key: 2, val: 2 }, { key: 3, val: 3 } ]
- * normalizeMap({a: 1, b: 2, c: 3}) => [ { key: 'a', val: 1 }, { key: 'b', val: 2 }, { key: 'c', val: 3 } ]
- * @param {Array|Object} map
- * @return {Object}
- */
- function normalizeMap (map) {
- if (!isValidMap(map)) {
- return []
- }
- return Array.isArray(map)
- ? map.map(function (key) { return ({ key: key, val: key }); })
- : Object.keys(map).map(function (key) { return ({ key: key, val: map[key] }); })
- }
- /**
- * Validate whether given map is valid or not
- * @param {*} map
- * @return {Boolean}
- */
- function isValidMap (map) {
- return Array.isArray(map) || isObject(map)
- }
- /**
- * Return a function expect two param contains namespace and map. it will normalize the namespace and then the param's function will handle the new namespace and the map.
- * @param {Function} fn
- * @return {Function}
- */
- function normalizeNamespace (fn) {
- return function (namespace, map) {
- if (typeof namespace !== 'string') {
- map = namespace;
- namespace = '';
- } else if (namespace.charAt(namespace.length - 1) !== '/') {
- namespace += '/';
- }
- return fn(namespace, map)
- }
- }
- /**
- * Search a special module from store by namespace. if module not exist, print error message.
- * @param {Object} store
- * @param {String} helper
- * @param {String} namespace
- * @return {Object}
- */
- function getModuleByNamespace (store, helper, namespace) {
- var module = store._modulesNamespaceMap[namespace];
- if (( true) && !module) {
- console.error(("[vuex] module namespace not found in " + helper + "(): " + namespace));
- }
- return module
- }
- // Credits: borrowed code from fcomb/redux-logger
- function createLogger (ref) {
- if ( ref === void 0 ) ref = {};
- var collapsed = ref.collapsed; if ( collapsed === void 0 ) collapsed = true;
- var filter = ref.filter; if ( filter === void 0 ) filter = function (mutation, stateBefore, stateAfter) { return true; };
- var transformer = ref.transformer; if ( transformer === void 0 ) transformer = function (state) { return state; };
- var mutationTransformer = ref.mutationTransformer; if ( mutationTransformer === void 0 ) mutationTransformer = function (mut) { return mut; };
- var actionFilter = ref.actionFilter; if ( actionFilter === void 0 ) actionFilter = function (action, state) { return true; };
- var actionTransformer = ref.actionTransformer; if ( actionTransformer === void 0 ) actionTransformer = function (act) { return act; };
- var logMutations = ref.logMutations; if ( logMutations === void 0 ) logMutations = true;
- var logActions = ref.logActions; if ( logActions === void 0 ) logActions = true;
- var logger = ref.logger; if ( logger === void 0 ) logger = console;
- return function (store) {
- var prevState = deepCopy(store.state);
- if (typeof logger === 'undefined') {
- return
- }
- if (logMutations) {
- store.subscribe(function (mutation, state) {
- var nextState = deepCopy(state);
- if (filter(mutation, prevState, nextState)) {
- var formattedTime = getFormattedTime();
- var formattedMutation = mutationTransformer(mutation);
- var message = "mutation " + (mutation.type) + formattedTime;
- startMessage(logger, message, collapsed);
- logger.log('%c prev state', 'color: #9E9E9E; font-weight: bold', transformer(prevState));
- logger.log('%c mutation', 'color: #03A9F4; font-weight: bold', formattedMutation);
- logger.log('%c next state', 'color: #4CAF50; font-weight: bold', transformer(nextState));
- endMessage(logger);
- }
- prevState = nextState;
- });
- }
- if (logActions) {
- store.subscribeAction(function (action, state) {
- if (actionFilter(action, state)) {
- var formattedTime = getFormattedTime();
- var formattedAction = actionTransformer(action);
- var message = "action " + (action.type) + formattedTime;
- startMessage(logger, message, collapsed);
- logger.log('%c action', 'color: #03A9F4; font-weight: bold', formattedAction);
- endMessage(logger);
- }
- });
- }
- }
- }
- function startMessage (logger, message, collapsed) {
- var startMessage = collapsed
- ? logger.groupCollapsed
- : logger.group;
- // render
- try {
- startMessage.call(logger, message);
- } catch (e) {
- logger.log(message);
- }
- }
- function endMessage (logger) {
- try {
- logger.groupEnd();
- } catch (e) {
- logger.log('—— log end ——');
- }
- }
- function getFormattedTime () {
- var time = new Date();
- return (" @ " + (pad(time.getHours(), 2)) + ":" + (pad(time.getMinutes(), 2)) + ":" + (pad(time.getSeconds(), 2)) + "." + (pad(time.getMilliseconds(), 3)))
- }
- function repeat (str, times) {
- return (new Array(times + 1)).join(str)
- }
- function pad (num, maxLength) {
- return repeat('0', maxLength - num.toString().length) + num
- }
- var index_cjs = {
- Store: Store,
- install: install,
- version: '3.6.2',
- mapState: mapState,
- mapMutations: mapMutations,
- mapGetters: mapGetters,
- mapActions: mapActions,
- createNamespacedHelpers: createNamespacedHelpers,
- createLogger: createLogger
- };
- module.exports = index_cjs;
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 2)))
- /***/ }),
- /* 12 */
- /*!********************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/util/index.js ***!
- \********************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /* WEBPACK VAR INJECTION */(function(uni) {var _moment = _interopRequireDefault(__webpack_require__(/*! moment */ 13));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
- var assetsUrl = "https://zhenyanapp-gen.oss-cn-qingdao.aliyuncs.com/wechat-mini-pro/";
- var IMSDKCode = 1400293452;
- //const IMSDKCode=1400456480;
- //const apiHost = 'http://192.168.1.253:8080' //本地;
- var apiHost = 'https://mini.sugarpark.cn';
- //const apiHost = 'http://jliao-api2-svc-test.internal.jiebide.xin'
- var protocal = {
- behaviorStandar: 'https://h5.sugarpark.cn/agreement/behavior-standard.html',
- userAgreement: 'https://h5.sugarpark.cn/agreement/user-agreement.html',
- privacy: 'https://h5.sugarpark.cn/agreement/privacy.html',
- addedService: 'https://h5.sugarpark.cn/agreement/added-service.html' };
- var getApiHost = function getApiHost() {
- return apiHost;
- };
- var showMsg = function showMsg(msg) {
- uni.showToast({
- title: msg,
- icon: 'none',
- mask: true });
- };
- var hasSafeArea = function hasSafeArea() {
- var result = uni.getSystemInfoSync();
- var sWidth = result.screenWidth * result.pixelRatio,
- sHeight = result.screenHeight * result.pixelRatio;
- if (result.model.indexOf('iPhone') == -1) {
- return false;
- } else if (sWidth == 1125 && sHeight == 2436) {
- return true;
- } else if (sWidth == 828 && sHeight == 1792) {
- return true;
- } else if (sWidth == 1170 && sHeight == 2532) {
- return true;
- } else if (sWidth == 1242 && sHeight == 2688) {
- return true;
- } else if (sWidth == 1284 && sHeight == 2778) {
- return true;
- }
- return false;
- };
- var timeFn = function timeFn(dateBeginTime, dateEndTime) {
- var timeFn;
- var dateDiff = dateEndTime - dateBeginTime; //时间差的毫秒数
- var dayDiff = Math.floor(dateDiff / (24 * 3600 * 1000)); //计算出相差天数
- var leave1 = dateDiff % (24 * 3600 * 1000); //计算天数后剩余的毫秒数
- var hours = Math.floor(leave1 / (3600 * 1000)); //计算出小时数
- //计算相差分钟数
- var leave2 = leave1 % (3600 * 1000); //计算小时数后剩余的毫秒数
- var minutes = Math.floor(leave2 / (60 * 1000)); //计算相差分钟数
- //计算相差秒数
- var leave3 = leave2 % (60 * 1000); //计算分钟数后剩余的毫秒数
- var seconds = Math.round(leave3 / 1000);
- var timeFn = dayDiff + "天" + hours + "小时" + minutes + "分钟" + seconds + "秒";
- return timeFn;
- };
- var checkPhone = function checkPhone(phone) {//手机号码
- var reg = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/;
- if (phone.substr(0, 3) === '120' && phone.length === 11) {
- return true;
- }
- if (reg.test(phone)) {
- return true;
- } else {
- return false;
- }
- };
- var checkTel = function checkTel(tel) {//座机号码不支持分机
- return /0\d{2,3}-\d{7,8}/.test(tel);
- };
- var checkIdNo = function checkIdNo(idNo) {
- return /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/.test(idNo);
- };
- var checkChinese = function checkChinese(str) {
- return /^[\u4e00-\u9fa5]+$/.test(str);
- };
- var compare = function compare(property) {
- return function (a, b) {
- var value1 = a[property];
- var value2 = b[property];
- return value1 - value2;
- };
- };
- var request = function request(url, method, data) {
- return new Promise(function (resolve, reject) {
- if (method === undefined) {
- method = 'GET';
- }
- var appConfig = uni.getAccountInfoSync();
- var deviceConfig = uni.getSystemInfoSync();
- var LL_Ukn = uni.getStorageSync('LL_Ukn') || "szxe/TwE/wNJxcF+51069Dw3KHJQmbEuE2tEVHG4ETQ1TEnZ6loF7MQdmCFePTWTS9NE8zhDBrvPplTUYNnlPa10jJ1GycLQjpe2CkO+UvflA8adpe/uD5z2C8Bp1Pg9cThzHmqxeAe1Oq9G1eo3PKfGGYLALGx+dgFPYMn06M/Y+lVio4WpXbNW8KMNkWyxnFZnpZEXzzyDUCT13TMF9tevVJ9/Sb3yBgLiLYnydplax+zjkFqwGSiDrQWR/E8s";
- var LL_Csi = uni.getStorageSync('LL_Csi') || {
- av: "2.6.0",
- brand: "Apple",
- currTime: 1654149186191,
- deviceCode: deviceConfig.deviceId,
- iOS: { "idfa": "00000000-0000-0000-0000-000000000000" },
- lang: "zh", "model": "iPhone12,5", "ov": "15.3.1",
- pkgCate: "JyPark",
- platform: "WechatMP",
- resolution: { "h": 2688, "s": 3, "w": 1242 },
- appId: 15,
- android: { market: 'Unknown' } };
- var token = uni.getStorageSync('token') || "88b99b11d3fc4cc3a71959b824678ce8";
- uni.request({
- url: "".concat(apiHost).concat(url),
- method: method,
- data: data,
- header: {
- 'Content-Type': 'application/json',
- // 'token': url === ('/cufd') ? '' : token,
- // 'LL_Ukn': url === ('/cufd') ? '' : LL_Ukn,
- // 'LL_Csi':url === ('/cufd') ? '' : JSON.stringify(LL_Csi),
- 'token': url === 'userLogin/login' ? '' : token,
- 'LL_Ukn': LL_Ukn,
- 'LL_Csi': JSON.stringify(LL_Csi) },
- success: function success(res) {
- if (res.data.status === 'Unauthorized') {
- uni.setStorageSync('token', '');
- } else
- if (res.data.status === 'FrozenUser') {
- // 用户异常
- uni.showToast({
- icon: 'none',
- title: "用户已被冻结" });
- setTimeout(function () {
- uni.reLaunch({
- url: '/pages/login/login' });
- }, 2000);
- } else
- if (res.data.status === 'Fail') {
- // 用户异常
- uni.showToast({
- icon: 'none',
- title: res.data.msg });
- setTimeout(function () {
- uni.reLaunch({
- url: '/pages/login/login' });
- }, 2000);
- } else
- if (res.data.status === 'Exception') {
- // 自动登录异常
- uni.showToast({
- icon: 'none',
- title: res.data.msg });
- } else
- if (res.data.status === 'Succ' || res.data.code === 0) {
- resolve(res.data);
- } else
- {
- reject(res.data);
- }
- },
- fail: function fail(res) {return reject(res.data);},
- complete: function complete(res) {} });
- });
- };
- var get = function get(url) {
- return new Promise(function (resolve, reject) {
- uni.request({
- url: url,
- method: 'GET',
- header: { 'Access-Control-Allow-Origin': '*' },
- success: function success(res) {
- return res.data;
- } });
- });
- };
- // const upload = (url, path) => {
- // return new Promise((resolve, reject) => {
- // let LL_Ukn =uni.getStorageSync('LL_Ukn')||"szxe/TwE/wNJxcF+51069Dw3KHJQmbEuE2tEVHG4ETQ1TEnZ6loF7MQdmCFePTWTS9NE8zhDBrvPplTUYNnlPa10jJ1GycLQjpe2CkO+UvflA8adpe/uD5z2C8Bp1Pg9cThzHmqxeAe1Oq9G1eo3PKfGGYLALGx+dgFPYMn06M/Y+lVio4WpXbNW8KMNkWyxnFZnpZEXzzyDUCT13TMF9tevVJ9/Sb3yBgLiLYnydplax+zjkFqwGSiDrQWR/E8s";
- // let LL_Csi=uni.getStorageSync('LL_Csi')||{
- // av:"2.6.0",
- // brand:"Apple",
- // currTime:1654149186191,
- // deviceCode:"8b4eef5c5614033bfd3bcbdf4577c339",
- // iOS:{"idfa":"00000000-0000-0000-0000-000000000000"},
- // lang:"zh","model":"iPhone12,5","ov":"15.3.1",
- // pkgCate:"Main",
- // platform:"iOS",
- // resolution:{"h":2688,"s":3,"w":1242},
- // };
- // let token= uni.getStorageSync('token')||"88b99b11d3fc4cc3a71959b824678ce8";
- // uni.uploadFile({
- // url: `${apiHost}${url}`,
- // filePath: path,
- // name: 'file',
- // timeout: 10000,
- // header: {
- // 'token': token,
- // 'LL_Ukn': LL_Ukn,
- // 'LL_Csi': JSON.stringify(LL_Csi),
- // },
- // success: (res) => {
- // let result = JSON.parse(res.data);
- // if (result.status === 'Unauthorized') {
- // uni.reLaunch({
- // url:'/pages/login/login'
- // })
- // uni.showToast({
- // icon:'none',
- // title:'登录已失效'
- // })
- // }
- // else if(res.data.status === 'FrozenUser'){
- // // 用户异常
- // uni.reLaunch({
- // url:'/pages/login/login'
- // })
- // uni.showToast({
- // icon:'none',
- // title:"用户已被冻结"
- // })
- // }
- // else if(res.data.status=== 'Fail'){
- // // 用户异常
- // uni.reLaunch({
- // url:'/pages/login/login'
- // })
- // uni.showToast({
- // icon:'none',
- // title:res.data.msg
- // })
- // }
- // else if (result.status === 'Succ') {
- // resolve(result.data);
- // } else {
- // uni.showToast({
- // icon:'none',
- // title:result.msg
- // })
- // reject(result.data);
- // }
- // },
- // fail: (err) => {
- // reject(err.data);
- // }
- // })
- // })
- // }
- module.exports = {
- assetsUrl: assetsUrl,
- request: request,
- get: get,
- showMsg: showMsg,
- hasSafeArea: hasSafeArea,
- checkPhone: checkPhone,
- checkIdNo: checkIdNo,
- checkChinese: checkChinese,
- compare: compare,
- timeFn: timeFn,
- protocal: protocal,
- IMSDKCode: IMSDKCode };
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
- /***/ }),
- /* 13 */
- /*!************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/moment.js ***!
- \************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- /* WEBPACK VAR INJECTION */(function(module) {var require;//! moment.js
- //! version : 2.29.4
- //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
- //! license : MIT
- //! momentjs.com
- ;(function (global, factory) {
- true ? module.exports = factory() :
- undefined;
- })(this, function () {'use strict';
- var hookCallback;
- function hooks() {
- return hookCallback.apply(null, arguments);
- }
- // This is done to register the method called with moment()
- // without creating circular dependencies.
- function setHookCallback(callback) {
- hookCallback = callback;
- }
- function isArray(input) {
- return (
- input instanceof Array ||
- Object.prototype.toString.call(input) === '[object Array]');
- }
- function isObject(input) {
- // IE8 will treat undefined and null as object if it wasn't for
- // input != null
- return (
- input != null &&
- Object.prototype.toString.call(input) === '[object Object]');
- }
- function hasOwnProp(a, b) {
- return Object.prototype.hasOwnProperty.call(a, b);
- }
- function isObjectEmpty(obj) {
- if (Object.getOwnPropertyNames) {
- return Object.getOwnPropertyNames(obj).length === 0;
- } else {
- var k;
- for (k in obj) {
- if (hasOwnProp(obj, k)) {
- return false;
- }
- }
- return true;
- }
- }
- function isUndefined(input) {
- return input === void 0;
- }
- function isNumber(input) {
- return (
- typeof input === 'number' ||
- Object.prototype.toString.call(input) === '[object Number]');
- }
- function isDate(input) {
- return (
- input instanceof Date ||
- Object.prototype.toString.call(input) === '[object Date]');
- }
- function map(arr, fn) {
- var res = [],
- i,
- arrLen = arr.length;
- for (i = 0; i < arrLen; ++i) {
- res.push(fn(arr[i], i));
- }
- return res;
- }
- function extend(a, b) {
- for (var i in b) {
- if (hasOwnProp(b, i)) {
- a[i] = b[i];
- }
- }
- if (hasOwnProp(b, 'toString')) {
- a.toString = b.toString;
- }
- if (hasOwnProp(b, 'valueOf')) {
- a.valueOf = b.valueOf;
- }
- return a;
- }
- function createUTC(input, format, locale, strict) {
- return createLocalOrUTC(input, format, locale, strict, true).utc();
- }
- function defaultParsingFlags() {
- // We need to deep clone this object.
- return {
- empty: false,
- unusedTokens: [],
- unusedInput: [],
- overflow: -2,
- charsLeftOver: 0,
- nullInput: false,
- invalidEra: null,
- invalidMonth: null,
- invalidFormat: false,
- userInvalidated: false,
- iso: false,
- parsedDateParts: [],
- era: null,
- meridiem: null,
- rfc2822: false,
- weekdayMismatch: false };
- }
- function getParsingFlags(m) {
- if (m._pf == null) {
- m._pf = defaultParsingFlags();
- }
- return m._pf;
- }
- var some;
- if (Array.prototype.some) {
- some = Array.prototype.some;
- } else {
- some = function some(fun) {
- var t = Object(this),
- len = t.length >>> 0,
- i;
- for (i = 0; i < len; i++) {
- if (i in t && fun.call(this, t[i], i, t)) {
- return true;
- }
- }
- return false;
- };
- }
- function isValid(m) {
- if (m._isValid == null) {
- var flags = getParsingFlags(m),
- parsedParts = some.call(flags.parsedDateParts, function (i) {
- return i != null;
- }),
- isNowValid =
- !isNaN(m._d.getTime()) &&
- flags.overflow < 0 &&
- !flags.empty &&
- !flags.invalidEra &&
- !flags.invalidMonth &&
- !flags.invalidWeekday &&
- !flags.weekdayMismatch &&
- !flags.nullInput &&
- !flags.invalidFormat &&
- !flags.userInvalidated && (
- !flags.meridiem || flags.meridiem && parsedParts);
- if (m._strict) {
- isNowValid =
- isNowValid &&
- flags.charsLeftOver === 0 &&
- flags.unusedTokens.length === 0 &&
- flags.bigHour === undefined;
- }
- if (Object.isFrozen == null || !Object.isFrozen(m)) {
- m._isValid = isNowValid;
- } else {
- return isNowValid;
- }
- }
- return m._isValid;
- }
- function createInvalid(flags) {
- var m = createUTC(NaN);
- if (flags != null) {
- extend(getParsingFlags(m), flags);
- } else {
- getParsingFlags(m).userInvalidated = true;
- }
- return m;
- }
- // Plugins that add properties should also add the key here (null value),
- // so we can properly clone ourselves.
- var momentProperties = hooks.momentProperties = [],
- updateInProgress = false;
- function copyConfig(to, from) {
- var i,
- prop,
- val,
- momentPropertiesLen = momentProperties.length;
- if (!isUndefined(from._isAMomentObject)) {
- to._isAMomentObject = from._isAMomentObject;
- }
- if (!isUndefined(from._i)) {
- to._i = from._i;
- }
- if (!isUndefined(from._f)) {
- to._f = from._f;
- }
- if (!isUndefined(from._l)) {
- to._l = from._l;
- }
- if (!isUndefined(from._strict)) {
- to._strict = from._strict;
- }
- if (!isUndefined(from._tzm)) {
- to._tzm = from._tzm;
- }
- if (!isUndefined(from._isUTC)) {
- to._isUTC = from._isUTC;
- }
- if (!isUndefined(from._offset)) {
- to._offset = from._offset;
- }
- if (!isUndefined(from._pf)) {
- to._pf = getParsingFlags(from);
- }
- if (!isUndefined(from._locale)) {
- to._locale = from._locale;
- }
- if (momentPropertiesLen > 0) {
- for (i = 0; i < momentPropertiesLen; i++) {
- prop = momentProperties[i];
- val = from[prop];
- if (!isUndefined(val)) {
- to[prop] = val;
- }
- }
- }
- return to;
- }
- // Moment prototype object
- function Moment(config) {
- copyConfig(this, config);
- this._d = new Date(config._d != null ? config._d.getTime() : NaN);
- if (!this.isValid()) {
- this._d = new Date(NaN);
- }
- // Prevent infinite loop in case updateOffset creates new moment
- // objects.
- if (updateInProgress === false) {
- updateInProgress = true;
- hooks.updateOffset(this);
- updateInProgress = false;
- }
- }
- function isMoment(obj) {
- return (
- obj instanceof Moment || obj != null && obj._isAMomentObject != null);
- }
- function warn(msg) {
- if (
- hooks.suppressDeprecationWarnings === false &&
- typeof console !== 'undefined' &&
- console.warn)
- {
- console.warn('Deprecation warning: ' + msg);
- }
- }
- function deprecate(msg, fn) {
- var firstTime = true;
- return extend(function () {
- if (hooks.deprecationHandler != null) {
- hooks.deprecationHandler(null, msg);
- }
- if (firstTime) {
- var args = [],
- arg,
- i,
- key,
- argLen = arguments.length;
- for (i = 0; i < argLen; i++) {
- arg = '';
- if (typeof arguments[i] === 'object') {
- arg += '\n[' + i + '] ';
- for (key in arguments[0]) {
- if (hasOwnProp(arguments[0], key)) {
- arg += key + ': ' + arguments[0][key] + ', ';
- }
- }
- arg = arg.slice(0, -2); // Remove trailing comma and space
- } else {
- arg = arguments[i];
- }
- args.push(arg);
- }
- warn(
- msg +
- '\nArguments: ' +
- Array.prototype.slice.call(args).join('') +
- '\n' +
- new Error().stack);
- firstTime = false;
- }
- return fn.apply(this, arguments);
- }, fn);
- }
- var deprecations = {};
- function deprecateSimple(name, msg) {
- if (hooks.deprecationHandler != null) {
- hooks.deprecationHandler(name, msg);
- }
- if (!deprecations[name]) {
- warn(msg);
- deprecations[name] = true;
- }
- }
- hooks.suppressDeprecationWarnings = false;
- hooks.deprecationHandler = null;
- function isFunction(input) {
- return (
- typeof Function !== 'undefined' && input instanceof Function ||
- Object.prototype.toString.call(input) === '[object Function]');
- }
- function set(config) {
- var prop, i;
- for (i in config) {
- if (hasOwnProp(config, i)) {
- prop = config[i];
- if (isFunction(prop)) {
- this[i] = prop;
- } else {
- this['_' + i] = prop;
- }
- }
- }
- this._config = config;
- // Lenient ordinal parsing accepts just a number in addition to
- // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.
- // TODO: Remove "ordinalParse" fallback in next major release.
- this._dayOfMonthOrdinalParseLenient = new RegExp(
- (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +
- '|' +
- /\d{1,2}/.source);
- }
- function mergeConfigs(parentConfig, childConfig) {
- var res = extend({}, parentConfig),
- prop;
- for (prop in childConfig) {
- if (hasOwnProp(childConfig, prop)) {
- if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {
- res[prop] = {};
- extend(res[prop], parentConfig[prop]);
- extend(res[prop], childConfig[prop]);
- } else if (childConfig[prop] != null) {
- res[prop] = childConfig[prop];
- } else {
- delete res[prop];
- }
- }
- }
- for (prop in parentConfig) {
- if (
- hasOwnProp(parentConfig, prop) &&
- !hasOwnProp(childConfig, prop) &&
- isObject(parentConfig[prop]))
- {
- // make sure changes to properties don't modify parent config
- res[prop] = extend({}, res[prop]);
- }
- }
- return res;
- }
- function Locale(config) {
- if (config != null) {
- this.set(config);
- }
- }
- var keys;
- if (Object.keys) {
- keys = Object.keys;
- } else {
- keys = function keys(obj) {
- var i,
- res = [];
- for (i in obj) {
- if (hasOwnProp(obj, i)) {
- res.push(i);
- }
- }
- return res;
- };
- }
- var defaultCalendar = {
- sameDay: '[Today at] LT',
- nextDay: '[Tomorrow at] LT',
- nextWeek: 'dddd [at] LT',
- lastDay: '[Yesterday at] LT',
- lastWeek: '[Last] dddd [at] LT',
- sameElse: 'L' };
- function calendar(key, mom, now) {
- var output = this._calendar[key] || this._calendar['sameElse'];
- return isFunction(output) ? output.call(mom, now) : output;
- }
- function zeroFill(number, targetLength, forceSign) {
- var absNumber = '' + Math.abs(number),
- zerosToFill = targetLength - absNumber.length,
- sign = number >= 0;
- return (
- (sign ? forceSign ? '+' : '' : '-') +
- Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +
- absNumber);
- }
- var formattingTokens =
- /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,
- localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,
- formatFunctions = {},
- formatTokenFunctions = {};
- // token: 'M'
- // padded: ['MM', 2]
- // ordinal: 'Mo'
- // callback: function () { this.month() + 1 }
- function addFormatToken(token, padded, ordinal, callback) {
- var func = callback;
- if (typeof callback === 'string') {
- func = function func() {
- return this[callback]();
- };
- }
- if (token) {
- formatTokenFunctions[token] = func;
- }
- if (padded) {
- formatTokenFunctions[padded[0]] = function () {
- return zeroFill(func.apply(this, arguments), padded[1], padded[2]);
- };
- }
- if (ordinal) {
- formatTokenFunctions[ordinal] = function () {
- return this.localeData().ordinal(
- func.apply(this, arguments),
- token);
- };
- }
- }
- function removeFormattingTokens(input) {
- if (input.match(/\[[\s\S]/)) {
- return input.replace(/^\[|\]$/g, '');
- }
- return input.replace(/\\/g, '');
- }
- function makeFormatFunction(format) {
- var array = format.match(formattingTokens),
- i,
- length;
- for (i = 0, length = array.length; i < length; i++) {
- if (formatTokenFunctions[array[i]]) {
- array[i] = formatTokenFunctions[array[i]];
- } else {
- array[i] = removeFormattingTokens(array[i]);
- }
- }
- return function (mom) {
- var output = '',
- i;
- for (i = 0; i < length; i++) {
- output += isFunction(array[i]) ?
- array[i].call(mom, format) :
- array[i];
- }
- return output;
- };
- }
- // format date using native date object
- function formatMoment(m, format) {
- if (!m.isValid()) {
- return m.localeData().invalidDate();
- }
- format = expandFormat(format, m.localeData());
- formatFunctions[format] =
- formatFunctions[format] || makeFormatFunction(format);
- return formatFunctions[format](m);
- }
- function expandFormat(format, locale) {
- var i = 5;
- function replaceLongDateFormatTokens(input) {
- return locale.longDateFormat(input) || input;
- }
- localFormattingTokens.lastIndex = 0;
- while (i >= 0 && localFormattingTokens.test(format)) {
- format = format.replace(
- localFormattingTokens,
- replaceLongDateFormatTokens);
- localFormattingTokens.lastIndex = 0;
- i -= 1;
- }
- return format;
- }
- var defaultLongDateFormat = {
- LTS: 'h:mm:ss A',
- LT: 'h:mm A',
- L: 'MM/DD/YYYY',
- LL: 'MMMM D, YYYY',
- LLL: 'MMMM D, YYYY h:mm A',
- LLLL: 'dddd, MMMM D, YYYY h:mm A' };
- function longDateFormat(key) {
- var format = this._longDateFormat[key],
- formatUpper = this._longDateFormat[key.toUpperCase()];
- if (format || !formatUpper) {
- return format;
- }
- this._longDateFormat[key] = formatUpper.
- match(formattingTokens).
- map(function (tok) {
- if (
- tok === 'MMMM' ||
- tok === 'MM' ||
- tok === 'DD' ||
- tok === 'dddd')
- {
- return tok.slice(1);
- }
- return tok;
- }).
- join('');
- return this._longDateFormat[key];
- }
- var defaultInvalidDate = 'Invalid date';
- function invalidDate() {
- return this._invalidDate;
- }
- var defaultOrdinal = '%d',
- defaultDayOfMonthOrdinalParse = /\d{1,2}/;
- function ordinal(number) {
- return this._ordinal.replace('%d', number);
- }
- var defaultRelativeTime = {
- future: 'in %s',
- past: '%s ago',
- s: 'a few seconds',
- ss: '%d seconds',
- m: 'a minute',
- mm: '%d minutes',
- h: 'an hour',
- hh: '%d hours',
- d: 'a day',
- dd: '%d days',
- w: 'a week',
- ww: '%d weeks',
- M: 'a month',
- MM: '%d months',
- y: 'a year',
- yy: '%d years' };
- function relativeTime(number, withoutSuffix, string, isFuture) {
- var output = this._relativeTime[string];
- return isFunction(output) ?
- output(number, withoutSuffix, string, isFuture) :
- output.replace(/%d/i, number);
- }
- function pastFuture(diff, output) {
- var format = this._relativeTime[diff > 0 ? 'future' : 'past'];
- return isFunction(format) ? format(output) : format.replace(/%s/i, output);
- }
- var aliases = {};
- function addUnitAlias(unit, shorthand) {
- var lowerCase = unit.toLowerCase();
- aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;
- }
- function normalizeUnits(units) {
- return typeof units === 'string' ?
- aliases[units] || aliases[units.toLowerCase()] :
- undefined;
- }
- function normalizeObjectUnits(inputObject) {
- var normalizedInput = {},
- normalizedProp,
- prop;
- for (prop in inputObject) {
- if (hasOwnProp(inputObject, prop)) {
- normalizedProp = normalizeUnits(prop);
- if (normalizedProp) {
- normalizedInput[normalizedProp] = inputObject[prop];
- }
- }
- }
- return normalizedInput;
- }
- var priorities = {};
- function addUnitPriority(unit, priority) {
- priorities[unit] = priority;
- }
- function getPrioritizedUnits(unitsObj) {
- var units = [],
- u;
- for (u in unitsObj) {
- if (hasOwnProp(unitsObj, u)) {
- units.push({ unit: u, priority: priorities[u] });
- }
- }
- units.sort(function (a, b) {
- return a.priority - b.priority;
- });
- return units;
- }
- function isLeapYear(year) {
- return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0;
- }
- function absFloor(number) {
- if (number < 0) {
- // -0 -> 0
- return Math.ceil(number) || 0;
- } else {
- return Math.floor(number);
- }
- }
- function toInt(argumentForCoercion) {
- var coercedNumber = +argumentForCoercion,
- value = 0;
- if (coercedNumber !== 0 && isFinite(coercedNumber)) {
- value = absFloor(coercedNumber);
- }
- return value;
- }
- function makeGetSet(unit, keepTime) {
- return function (value) {
- if (value != null) {
- set$1(this, unit, value);
- hooks.updateOffset(this, keepTime);
- return this;
- } else {
- return get(this, unit);
- }
- };
- }
- function get(mom, unit) {
- return mom.isValid() ?
- mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() :
- NaN;
- }
- function set$1(mom, unit, value) {
- if (mom.isValid() && !isNaN(value)) {
- if (
- unit === 'FullYear' &&
- isLeapYear(mom.year()) &&
- mom.month() === 1 &&
- mom.date() === 29)
- {
- value = toInt(value);
- mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](
- value,
- mom.month(),
- daysInMonth(value, mom.month()));
- } else {
- mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);
- }
- }
- }
- // MOMENTS
- function stringGet(units) {
- units = normalizeUnits(units);
- if (isFunction(this[units])) {
- return this[units]();
- }
- return this;
- }
- function stringSet(units, value) {
- if (typeof units === 'object') {
- units = normalizeObjectUnits(units);
- var prioritized = getPrioritizedUnits(units),
- i,
- prioritizedLen = prioritized.length;
- for (i = 0; i < prioritizedLen; i++) {
- this[prioritized[i].unit](units[prioritized[i].unit]);
- }
- } else {
- units = normalizeUnits(units);
- if (isFunction(this[units])) {
- return this[units](value);
- }
- }
- return this;
- }
- var match1 = /\d/, // 0 - 9
- match2 = /\d\d/, // 00 - 99
- match3 = /\d{3}/, // 000 - 999
- match4 = /\d{4}/, // 0000 - 9999
- match6 = /[+-]?\d{6}/, // -999999 - 999999
- match1to2 = /\d\d?/, // 0 - 99
- match3to4 = /\d\d\d\d?/, // 999 - 9999
- match5to6 = /\d\d\d\d\d\d?/, // 99999 - 999999
- match1to3 = /\d{1,3}/, // 0 - 999
- match1to4 = /\d{1,4}/, // 0 - 9999
- match1to6 = /[+-]?\d{1,6}/, // -999999 - 999999
- matchUnsigned = /\d+/, // 0 - inf
- matchSigned = /[+-]?\d+/, // -inf - inf
- matchOffset = /Z|[+-]\d\d:?\d\d/gi, // +00:00 -00:00 +0000 -0000 or Z
- matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z
- matchTimestamp = /[+-]?\d+(\.\d{1,3})?/, // 123456789 123456789.123
- // any word (or two) characters or numbers including two/three word month in arabic.
- // includes scottish gaelic two word and hyphenated months
- matchWord =
- /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,
- regexes;
- regexes = {};
- function addRegexToken(token, regex, strictRegex) {
- regexes[token] = isFunction(regex) ?
- regex :
- function (isStrict, localeData) {
- return isStrict && strictRegex ? strictRegex : regex;
- };
- }
- function getParseRegexForToken(token, config) {
- if (!hasOwnProp(regexes, token)) {
- return new RegExp(unescapeFormat(token));
- }
- return regexes[token](config._strict, config._locale);
- }
- // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
- function unescapeFormat(s) {
- return regexEscape(
- s.
- replace('\\', '').
- replace(
- /\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,
- function (matched, p1, p2, p3, p4) {
- return p1 || p2 || p3 || p4;
- }));
- }
- function regexEscape(s) {
- return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
- }
- var tokens = {};
- function addParseToken(token, callback) {
- var i,
- func = callback,
- tokenLen;
- if (typeof token === 'string') {
- token = [token];
- }
- if (isNumber(callback)) {
- func = function func(input, array) {
- array[callback] = toInt(input);
- };
- }
- tokenLen = token.length;
- for (i = 0; i < tokenLen; i++) {
- tokens[token[i]] = func;
- }
- }
- function addWeekParseToken(token, callback) {
- addParseToken(token, function (input, array, config, token) {
- config._w = config._w || {};
- callback(input, config._w, config, token);
- });
- }
- function addTimeToArrayFromToken(token, input, config) {
- if (input != null && hasOwnProp(tokens, token)) {
- tokens[token](input, config._a, config, token);
- }
- }
- var YEAR = 0,
- MONTH = 1,
- DATE = 2,
- HOUR = 3,
- MINUTE = 4,
- SECOND = 5,
- MILLISECOND = 6,
- WEEK = 7,
- WEEKDAY = 8;
- function mod(n, x) {
- return (n % x + x) % x;
- }
- var indexOf;
- if (Array.prototype.indexOf) {
- indexOf = Array.prototype.indexOf;
- } else {
- indexOf = function indexOf(o) {
- // I know
- var i;
- for (i = 0; i < this.length; ++i) {
- if (this[i] === o) {
- return i;
- }
- }
- return -1;
- };
- }
- function daysInMonth(year, month) {
- if (isNaN(year) || isNaN(month)) {
- return NaN;
- }
- var modMonth = mod(month, 12);
- year += (month - modMonth) / 12;
- return modMonth === 1 ?
- isLeapYear(year) ?
- 29 :
- 28 :
- 31 - modMonth % 7 % 2;
- }
- // FORMATTING
- addFormatToken('M', ['MM', 2], 'Mo', function () {
- return this.month() + 1;
- });
- addFormatToken('MMM', 0, 0, function (format) {
- return this.localeData().monthsShort(this, format);
- });
- addFormatToken('MMMM', 0, 0, function (format) {
- return this.localeData().months(this, format);
- });
- // ALIASES
- addUnitAlias('month', 'M');
- // PRIORITY
- addUnitPriority('month', 8);
- // PARSING
- addRegexToken('M', match1to2);
- addRegexToken('MM', match1to2, match2);
- addRegexToken('MMM', function (isStrict, locale) {
- return locale.monthsShortRegex(isStrict);
- });
- addRegexToken('MMMM', function (isStrict, locale) {
- return locale.monthsRegex(isStrict);
- });
- addParseToken(['M', 'MM'], function (input, array) {
- array[MONTH] = toInt(input) - 1;
- });
- addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {
- var month = config._locale.monthsParse(input, token, config._strict);
- // if we didn't find a month name, mark the date as invalid.
- if (month != null) {
- array[MONTH] = month;
- } else {
- getParsingFlags(config).invalidMonth = input;
- }
- });
- // LOCALES
- var defaultLocaleMonths =
- 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
- '_'),
- defaultLocaleMonthsShort =
- 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
- MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,
- defaultMonthsShortRegex = matchWord,
- defaultMonthsRegex = matchWord;
- function localeMonths(m, format) {
- if (!m) {
- return isArray(this._months) ?
- this._months :
- this._months['standalone'];
- }
- return isArray(this._months) ?
- this._months[m.month()] :
- this._months[
- (this._months.isFormat || MONTHS_IN_FORMAT).test(format) ?
- 'format' :
- 'standalone'][
- m.month()];
- }
- function localeMonthsShort(m, format) {
- if (!m) {
- return isArray(this._monthsShort) ?
- this._monthsShort :
- this._monthsShort['standalone'];
- }
- return isArray(this._monthsShort) ?
- this._monthsShort[m.month()] :
- this._monthsShort[
- MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][
- m.month()];
- }
- function handleStrictParse(monthName, format, strict) {
- var i,
- ii,
- mom,
- llc = monthName.toLocaleLowerCase();
- if (!this._monthsParse) {
- // this is not used
- this._monthsParse = [];
- this._longMonthsParse = [];
- this._shortMonthsParse = [];
- for (i = 0; i < 12; ++i) {
- mom = createUTC([2000, i]);
- this._shortMonthsParse[i] = this.monthsShort(
- mom,
- '').
- toLocaleLowerCase();
- this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();
- }
- }
- if (strict) {
- if (format === 'MMM') {
- ii = indexOf.call(this._shortMonthsParse, llc);
- return ii !== -1 ? ii : null;
- } else {
- ii = indexOf.call(this._longMonthsParse, llc);
- return ii !== -1 ? ii : null;
- }
- } else {
- if (format === 'MMM') {
- ii = indexOf.call(this._shortMonthsParse, llc);
- if (ii !== -1) {
- return ii;
- }
- ii = indexOf.call(this._longMonthsParse, llc);
- return ii !== -1 ? ii : null;
- } else {
- ii = indexOf.call(this._longMonthsParse, llc);
- if (ii !== -1) {
- return ii;
- }
- ii = indexOf.call(this._shortMonthsParse, llc);
- return ii !== -1 ? ii : null;
- }
- }
- }
- function localeMonthsParse(monthName, format, strict) {
- var i, mom, regex;
- if (this._monthsParseExact) {
- return handleStrictParse.call(this, monthName, format, strict);
- }
- if (!this._monthsParse) {
- this._monthsParse = [];
- this._longMonthsParse = [];
- this._shortMonthsParse = [];
- }
- // TODO: add sorting
- // Sorting makes sure if one month (or abbr) is a prefix of another
- // see sorting in computeMonthsParse
- for (i = 0; i < 12; i++) {
- // make the regex if we don't have it already
- mom = createUTC([2000, i]);
- if (strict && !this._longMonthsParse[i]) {
- this._longMonthsParse[i] = new RegExp(
- '^' + this.months(mom, '').replace('.', '') + '$',
- 'i');
- this._shortMonthsParse[i] = new RegExp(
- '^' + this.monthsShort(mom, '').replace('.', '') + '$',
- 'i');
- }
- if (!strict && !this._monthsParse[i]) {
- regex =
- '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');
- this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');
- }
- // test the regex
- if (
- strict &&
- format === 'MMMM' &&
- this._longMonthsParse[i].test(monthName))
- {
- return i;
- } else if (
- strict &&
- format === 'MMM' &&
- this._shortMonthsParse[i].test(monthName))
- {
- return i;
- } else if (!strict && this._monthsParse[i].test(monthName)) {
- return i;
- }
- }
- }
- // MOMENTS
- function setMonth(mom, value) {
- var dayOfMonth;
- if (!mom.isValid()) {
- // No op
- return mom;
- }
- if (typeof value === 'string') {
- if (/^\d+$/.test(value)) {
- value = toInt(value);
- } else {
- value = mom.localeData().monthsParse(value);
- // TODO: Another silent failure?
- if (!isNumber(value)) {
- return mom;
- }
- }
- }
- dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));
- mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);
- return mom;
- }
- function getSetMonth(value) {
- if (value != null) {
- setMonth(this, value);
- hooks.updateOffset(this, true);
- return this;
- } else {
- return get(this, 'Month');
- }
- }
- function getDaysInMonth() {
- return daysInMonth(this.year(), this.month());
- }
- function monthsShortRegex(isStrict) {
- if (this._monthsParseExact) {
- if (!hasOwnProp(this, '_monthsRegex')) {
- computeMonthsParse.call(this);
- }
- if (isStrict) {
- return this._monthsShortStrictRegex;
- } else {
- return this._monthsShortRegex;
- }
- } else {
- if (!hasOwnProp(this, '_monthsShortRegex')) {
- this._monthsShortRegex = defaultMonthsShortRegex;
- }
- return this._monthsShortStrictRegex && isStrict ?
- this._monthsShortStrictRegex :
- this._monthsShortRegex;
- }
- }
- function monthsRegex(isStrict) {
- if (this._monthsParseExact) {
- if (!hasOwnProp(this, '_monthsRegex')) {
- computeMonthsParse.call(this);
- }
- if (isStrict) {
- return this._monthsStrictRegex;
- } else {
- return this._monthsRegex;
- }
- } else {
- if (!hasOwnProp(this, '_monthsRegex')) {
- this._monthsRegex = defaultMonthsRegex;
- }
- return this._monthsStrictRegex && isStrict ?
- this._monthsStrictRegex :
- this._monthsRegex;
- }
- }
- function computeMonthsParse() {
- function cmpLenRev(a, b) {
- return b.length - a.length;
- }
- var shortPieces = [],
- longPieces = [],
- mixedPieces = [],
- i,
- mom;
- for (i = 0; i < 12; i++) {
- // make the regex if we don't have it already
- mom = createUTC([2000, i]);
- shortPieces.push(this.monthsShort(mom, ''));
- longPieces.push(this.months(mom, ''));
- mixedPieces.push(this.months(mom, ''));
- mixedPieces.push(this.monthsShort(mom, ''));
- }
- // Sorting makes sure if one month (or abbr) is a prefix of another it
- // will match the longer piece.
- shortPieces.sort(cmpLenRev);
- longPieces.sort(cmpLenRev);
- mixedPieces.sort(cmpLenRev);
- for (i = 0; i < 12; i++) {
- shortPieces[i] = regexEscape(shortPieces[i]);
- longPieces[i] = regexEscape(longPieces[i]);
- }
- for (i = 0; i < 24; i++) {
- mixedPieces[i] = regexEscape(mixedPieces[i]);
- }
- this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
- this._monthsShortRegex = this._monthsRegex;
- this._monthsStrictRegex = new RegExp(
- '^(' + longPieces.join('|') + ')',
- 'i');
- this._monthsShortStrictRegex = new RegExp(
- '^(' + shortPieces.join('|') + ')',
- 'i');
- }
- // FORMATTING
- addFormatToken('Y', 0, 0, function () {
- var y = this.year();
- return y <= 9999 ? zeroFill(y, 4) : '+' + y;
- });
- addFormatToken(0, ['YY', 2], 0, function () {
- return this.year() % 100;
- });
- addFormatToken(0, ['YYYY', 4], 0, 'year');
- addFormatToken(0, ['YYYYY', 5], 0, 'year');
- addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');
- // ALIASES
- addUnitAlias('year', 'y');
- // PRIORITIES
- addUnitPriority('year', 1);
- // PARSING
- addRegexToken('Y', matchSigned);
- addRegexToken('YY', match1to2, match2);
- addRegexToken('YYYY', match1to4, match4);
- addRegexToken('YYYYY', match1to6, match6);
- addRegexToken('YYYYYY', match1to6, match6);
- addParseToken(['YYYYY', 'YYYYYY'], YEAR);
- addParseToken('YYYY', function (input, array) {
- array[YEAR] =
- input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);
- });
- addParseToken('YY', function (input, array) {
- array[YEAR] = hooks.parseTwoDigitYear(input);
- });
- addParseToken('Y', function (input, array) {
- array[YEAR] = parseInt(input, 10);
- });
- // HELPERS
- function daysInYear(year) {
- return isLeapYear(year) ? 366 : 365;
- }
- // HOOKS
- hooks.parseTwoDigitYear = function (input) {
- return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);
- };
- // MOMENTS
- var getSetYear = makeGetSet('FullYear', true);
- function getIsLeapYear() {
- return isLeapYear(this.year());
- }
- function createDate(y, m, d, h, M, s, ms) {
- // can't just apply() to create a date:
- // https://stackoverflow.com/q/181348
- var date;
- // the date constructor remaps years 0-99 to 1900-1999
- if (y < 100 && y >= 0) {
- // preserve leap years using a full 400 year cycle, then reset
- date = new Date(y + 400, m, d, h, M, s, ms);
- if (isFinite(date.getFullYear())) {
- date.setFullYear(y);
- }
- } else {
- date = new Date(y, m, d, h, M, s, ms);
- }
- return date;
- }
- function createUTCDate(y) {
- var date, args;
- // the Date.UTC function remaps years 0-99 to 1900-1999
- if (y < 100 && y >= 0) {
- args = Array.prototype.slice.call(arguments);
- // preserve leap years using a full 400 year cycle, then reset
- args[0] = y + 400;
- date = new Date(Date.UTC.apply(null, args));
- if (isFinite(date.getUTCFullYear())) {
- date.setUTCFullYear(y);
- }
- } else {
- date = new Date(Date.UTC.apply(null, arguments));
- }
- return date;
- }
- // start-of-first-week - start-of-year
- function firstWeekOffset(year, dow, doy) {
- var // first-week day -- which january is always in the first week (4 for iso, 1 for other)
- fwd = 7 + dow - doy,
- // first-week day local weekday -- which local weekday is fwd
- fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;
- return -fwdlw + fwd - 1;
- }
- // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday
- function dayOfYearFromWeeks(year, week, weekday, dow, doy) {
- var localWeekday = (7 + weekday - dow) % 7,
- weekOffset = firstWeekOffset(year, dow, doy),
- dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,
- resYear,
- resDayOfYear;
- if (dayOfYear <= 0) {
- resYear = year - 1;
- resDayOfYear = daysInYear(resYear) + dayOfYear;
- } else if (dayOfYear > daysInYear(year)) {
- resYear = year + 1;
- resDayOfYear = dayOfYear - daysInYear(year);
- } else {
- resYear = year;
- resDayOfYear = dayOfYear;
- }
- return {
- year: resYear,
- dayOfYear: resDayOfYear };
- }
- function weekOfYear(mom, dow, doy) {
- var weekOffset = firstWeekOffset(mom.year(), dow, doy),
- week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,
- resWeek,
- resYear;
- if (week < 1) {
- resYear = mom.year() - 1;
- resWeek = week + weeksInYear(resYear, dow, doy);
- } else if (week > weeksInYear(mom.year(), dow, doy)) {
- resWeek = week - weeksInYear(mom.year(), dow, doy);
- resYear = mom.year() + 1;
- } else {
- resYear = mom.year();
- resWeek = week;
- }
- return {
- week: resWeek,
- year: resYear };
- }
- function weeksInYear(year, dow, doy) {
- var weekOffset = firstWeekOffset(year, dow, doy),
- weekOffsetNext = firstWeekOffset(year + 1, dow, doy);
- return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;
- }
- // FORMATTING
- addFormatToken('w', ['ww', 2], 'wo', 'week');
- addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');
- // ALIASES
- addUnitAlias('week', 'w');
- addUnitAlias('isoWeek', 'W');
- // PRIORITIES
- addUnitPriority('week', 5);
- addUnitPriority('isoWeek', 5);
- // PARSING
- addRegexToken('w', match1to2);
- addRegexToken('ww', match1to2, match2);
- addRegexToken('W', match1to2);
- addRegexToken('WW', match1to2, match2);
- addWeekParseToken(
- ['w', 'ww', 'W', 'WW'],
- function (input, week, config, token) {
- week[token.substr(0, 1)] = toInt(input);
- });
- // HELPERS
- // LOCALES
- function localeWeek(mom) {
- return weekOfYear(mom, this._week.dow, this._week.doy).week;
- }
- var defaultLocaleWeek = {
- dow: 0, // Sunday is the first day of the week.
- doy: 6 // The week that contains Jan 6th is the first week of the year.
- };
- function localeFirstDayOfWeek() {
- return this._week.dow;
- }
- function localeFirstDayOfYear() {
- return this._week.doy;
- }
- // MOMENTS
- function getSetWeek(input) {
- var week = this.localeData().week(this);
- return input == null ? week : this.add((input - week) * 7, 'd');
- }
- function getSetISOWeek(input) {
- var week = weekOfYear(this, 1, 4).week;
- return input == null ? week : this.add((input - week) * 7, 'd');
- }
- // FORMATTING
- addFormatToken('d', 0, 'do', 'day');
- addFormatToken('dd', 0, 0, function (format) {
- return this.localeData().weekdaysMin(this, format);
- });
- addFormatToken('ddd', 0, 0, function (format) {
- return this.localeData().weekdaysShort(this, format);
- });
- addFormatToken('dddd', 0, 0, function (format) {
- return this.localeData().weekdays(this, format);
- });
- addFormatToken('e', 0, 0, 'weekday');
- addFormatToken('E', 0, 0, 'isoWeekday');
- // ALIASES
- addUnitAlias('day', 'd');
- addUnitAlias('weekday', 'e');
- addUnitAlias('isoWeekday', 'E');
- // PRIORITY
- addUnitPriority('day', 11);
- addUnitPriority('weekday', 11);
- addUnitPriority('isoWeekday', 11);
- // PARSING
- addRegexToken('d', match1to2);
- addRegexToken('e', match1to2);
- addRegexToken('E', match1to2);
- addRegexToken('dd', function (isStrict, locale) {
- return locale.weekdaysMinRegex(isStrict);
- });
- addRegexToken('ddd', function (isStrict, locale) {
- return locale.weekdaysShortRegex(isStrict);
- });
- addRegexToken('dddd', function (isStrict, locale) {
- return locale.weekdaysRegex(isStrict);
- });
- addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {
- var weekday = config._locale.weekdaysParse(input, token, config._strict);
- // if we didn't get a weekday name, mark the date as invalid
- if (weekday != null) {
- week.d = weekday;
- } else {
- getParsingFlags(config).invalidWeekday = input;
- }
- });
- addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {
- week[token] = toInt(input);
- });
- // HELPERS
- function parseWeekday(input, locale) {
- if (typeof input !== 'string') {
- return input;
- }
- if (!isNaN(input)) {
- return parseInt(input, 10);
- }
- input = locale.weekdaysParse(input);
- if (typeof input === 'number') {
- return input;
- }
- return null;
- }
- function parseIsoWeekday(input, locale) {
- if (typeof input === 'string') {
- return locale.weekdaysParse(input) % 7 || 7;
- }
- return isNaN(input) ? null : input;
- }
- // LOCALES
- function shiftWeekdays(ws, n) {
- return ws.slice(n, 7).concat(ws.slice(0, n));
- }
- var defaultLocaleWeekdays =
- 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
- defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
- defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
- defaultWeekdaysRegex = matchWord,
- defaultWeekdaysShortRegex = matchWord,
- defaultWeekdaysMinRegex = matchWord;
- function localeWeekdays(m, format) {
- var weekdays = isArray(this._weekdays) ?
- this._weekdays :
- this._weekdays[
- m && m !== true && this._weekdays.isFormat.test(format) ?
- 'format' :
- 'standalone'];
- return m === true ?
- shiftWeekdays(weekdays, this._week.dow) :
- m ?
- weekdays[m.day()] :
- weekdays;
- }
- function localeWeekdaysShort(m) {
- return m === true ?
- shiftWeekdays(this._weekdaysShort, this._week.dow) :
- m ?
- this._weekdaysShort[m.day()] :
- this._weekdaysShort;
- }
- function localeWeekdaysMin(m) {
- return m === true ?
- shiftWeekdays(this._weekdaysMin, this._week.dow) :
- m ?
- this._weekdaysMin[m.day()] :
- this._weekdaysMin;
- }
- function handleStrictParse$1(weekdayName, format, strict) {
- var i,
- ii,
- mom,
- llc = weekdayName.toLocaleLowerCase();
- if (!this._weekdaysParse) {
- this._weekdaysParse = [];
- this._shortWeekdaysParse = [];
- this._minWeekdaysParse = [];
- for (i = 0; i < 7; ++i) {
- mom = createUTC([2000, 1]).day(i);
- this._minWeekdaysParse[i] = this.weekdaysMin(
- mom,
- '').
- toLocaleLowerCase();
- this._shortWeekdaysParse[i] = this.weekdaysShort(
- mom,
- '').
- toLocaleLowerCase();
- this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();
- }
- }
- if (strict) {
- if (format === 'dddd') {
- ii = indexOf.call(this._weekdaysParse, llc);
- return ii !== -1 ? ii : null;
- } else if (format === 'ddd') {
- ii = indexOf.call(this._shortWeekdaysParse, llc);
- return ii !== -1 ? ii : null;
- } else {
- ii = indexOf.call(this._minWeekdaysParse, llc);
- return ii !== -1 ? ii : null;
- }
- } else {
- if (format === 'dddd') {
- ii = indexOf.call(this._weekdaysParse, llc);
- if (ii !== -1) {
- return ii;
- }
- ii = indexOf.call(this._shortWeekdaysParse, llc);
- if (ii !== -1) {
- return ii;
- }
- ii = indexOf.call(this._minWeekdaysParse, llc);
- return ii !== -1 ? ii : null;
- } else if (format === 'ddd') {
- ii = indexOf.call(this._shortWeekdaysParse, llc);
- if (ii !== -1) {
- return ii;
- }
- ii = indexOf.call(this._weekdaysParse, llc);
- if (ii !== -1) {
- return ii;
- }
- ii = indexOf.call(this._minWeekdaysParse, llc);
- return ii !== -1 ? ii : null;
- } else {
- ii = indexOf.call(this._minWeekdaysParse, llc);
- if (ii !== -1) {
- return ii;
- }
- ii = indexOf.call(this._weekdaysParse, llc);
- if (ii !== -1) {
- return ii;
- }
- ii = indexOf.call(this._shortWeekdaysParse, llc);
- return ii !== -1 ? ii : null;
- }
- }
- }
- function localeWeekdaysParse(weekdayName, format, strict) {
- var i, mom, regex;
- if (this._weekdaysParseExact) {
- return handleStrictParse$1.call(this, weekdayName, format, strict);
- }
- if (!this._weekdaysParse) {
- this._weekdaysParse = [];
- this._minWeekdaysParse = [];
- this._shortWeekdaysParse = [];
- this._fullWeekdaysParse = [];
- }
- for (i = 0; i < 7; i++) {
- // make the regex if we don't have it already
- mom = createUTC([2000, 1]).day(i);
- if (strict && !this._fullWeekdaysParse[i]) {
- this._fullWeekdaysParse[i] = new RegExp(
- '^' + this.weekdays(mom, '').replace('.', '\\.?') + '$',
- 'i');
- this._shortWeekdaysParse[i] = new RegExp(
- '^' + this.weekdaysShort(mom, '').replace('.', '\\.?') + '$',
- 'i');
- this._minWeekdaysParse[i] = new RegExp(
- '^' + this.weekdaysMin(mom, '').replace('.', '\\.?') + '$',
- 'i');
- }
- if (!this._weekdaysParse[i]) {
- regex =
- '^' +
- this.weekdays(mom, '') +
- '|^' +
- this.weekdaysShort(mom, '') +
- '|^' +
- this.weekdaysMin(mom, '');
- this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');
- }
- // test the regex
- if (
- strict &&
- format === 'dddd' &&
- this._fullWeekdaysParse[i].test(weekdayName))
- {
- return i;
- } else if (
- strict &&
- format === 'ddd' &&
- this._shortWeekdaysParse[i].test(weekdayName))
- {
- return i;
- } else if (
- strict &&
- format === 'dd' &&
- this._minWeekdaysParse[i].test(weekdayName))
- {
- return i;
- } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {
- return i;
- }
- }
- }
- // MOMENTS
- function getSetDayOfWeek(input) {
- if (!this.isValid()) {
- return input != null ? this : NaN;
- }
- var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();
- if (input != null) {
- input = parseWeekday(input, this.localeData());
- return this.add(input - day, 'd');
- } else {
- return day;
- }
- }
- function getSetLocaleDayOfWeek(input) {
- if (!this.isValid()) {
- return input != null ? this : NaN;
- }
- var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;
- return input == null ? weekday : this.add(input - weekday, 'd');
- }
- function getSetISODayOfWeek(input) {
- if (!this.isValid()) {
- return input != null ? this : NaN;
- }
- // behaves the same as moment#day except
- // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)
- // as a setter, sunday should belong to the previous week.
- if (input != null) {
- var weekday = parseIsoWeekday(input, this.localeData());
- return this.day(this.day() % 7 ? weekday : weekday - 7);
- } else {
- return this.day() || 7;
- }
- }
- function weekdaysRegex(isStrict) {
- if (this._weekdaysParseExact) {
- if (!hasOwnProp(this, '_weekdaysRegex')) {
- computeWeekdaysParse.call(this);
- }
- if (isStrict) {
- return this._weekdaysStrictRegex;
- } else {
- return this._weekdaysRegex;
- }
- } else {
- if (!hasOwnProp(this, '_weekdaysRegex')) {
- this._weekdaysRegex = defaultWeekdaysRegex;
- }
- return this._weekdaysStrictRegex && isStrict ?
- this._weekdaysStrictRegex :
- this._weekdaysRegex;
- }
- }
- function weekdaysShortRegex(isStrict) {
- if (this._weekdaysParseExact) {
- if (!hasOwnProp(this, '_weekdaysRegex')) {
- computeWeekdaysParse.call(this);
- }
- if (isStrict) {
- return this._weekdaysShortStrictRegex;
- } else {
- return this._weekdaysShortRegex;
- }
- } else {
- if (!hasOwnProp(this, '_weekdaysShortRegex')) {
- this._weekdaysShortRegex = defaultWeekdaysShortRegex;
- }
- return this._weekdaysShortStrictRegex && isStrict ?
- this._weekdaysShortStrictRegex :
- this._weekdaysShortRegex;
- }
- }
- function weekdaysMinRegex(isStrict) {
- if (this._weekdaysParseExact) {
- if (!hasOwnProp(this, '_weekdaysRegex')) {
- computeWeekdaysParse.call(this);
- }
- if (isStrict) {
- return this._weekdaysMinStrictRegex;
- } else {
- return this._weekdaysMinRegex;
- }
- } else {
- if (!hasOwnProp(this, '_weekdaysMinRegex')) {
- this._weekdaysMinRegex = defaultWeekdaysMinRegex;
- }
- return this._weekdaysMinStrictRegex && isStrict ?
- this._weekdaysMinStrictRegex :
- this._weekdaysMinRegex;
- }
- }
- function computeWeekdaysParse() {
- function cmpLenRev(a, b) {
- return b.length - a.length;
- }
- var minPieces = [],
- shortPieces = [],
- longPieces = [],
- mixedPieces = [],
- i,
- mom,
- minp,
- shortp,
- longp;
- for (i = 0; i < 7; i++) {
- // make the regex if we don't have it already
- mom = createUTC([2000, 1]).day(i);
- minp = regexEscape(this.weekdaysMin(mom, ''));
- shortp = regexEscape(this.weekdaysShort(mom, ''));
- longp = regexEscape(this.weekdays(mom, ''));
- minPieces.push(minp);
- shortPieces.push(shortp);
- longPieces.push(longp);
- mixedPieces.push(minp);
- mixedPieces.push(shortp);
- mixedPieces.push(longp);
- }
- // Sorting makes sure if one weekday (or abbr) is a prefix of another it
- // will match the longer piece.
- minPieces.sort(cmpLenRev);
- shortPieces.sort(cmpLenRev);
- longPieces.sort(cmpLenRev);
- mixedPieces.sort(cmpLenRev);
- this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
- this._weekdaysShortRegex = this._weekdaysRegex;
- this._weekdaysMinRegex = this._weekdaysRegex;
- this._weekdaysStrictRegex = new RegExp(
- '^(' + longPieces.join('|') + ')',
- 'i');
- this._weekdaysShortStrictRegex = new RegExp(
- '^(' + shortPieces.join('|') + ')',
- 'i');
- this._weekdaysMinStrictRegex = new RegExp(
- '^(' + minPieces.join('|') + ')',
- 'i');
- }
- // FORMATTING
- function hFormat() {
- return this.hours() % 12 || 12;
- }
- function kFormat() {
- return this.hours() || 24;
- }
- addFormatToken('H', ['HH', 2], 0, 'hour');
- addFormatToken('h', ['hh', 2], 0, hFormat);
- addFormatToken('k', ['kk', 2], 0, kFormat);
- addFormatToken('hmm', 0, 0, function () {
- return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);
- });
- addFormatToken('hmmss', 0, 0, function () {
- return (
- '' +
- hFormat.apply(this) +
- zeroFill(this.minutes(), 2) +
- zeroFill(this.seconds(), 2));
- });
- addFormatToken('Hmm', 0, 0, function () {
- return '' + this.hours() + zeroFill(this.minutes(), 2);
- });
- addFormatToken('Hmmss', 0, 0, function () {
- return (
- '' +
- this.hours() +
- zeroFill(this.minutes(), 2) +
- zeroFill(this.seconds(), 2));
- });
- function meridiem(token, lowercase) {
- addFormatToken(token, 0, 0, function () {
- return this.localeData().meridiem(
- this.hours(),
- this.minutes(),
- lowercase);
- });
- }
- meridiem('a', true);
- meridiem('A', false);
- // ALIASES
- addUnitAlias('hour', 'h');
- // PRIORITY
- addUnitPriority('hour', 13);
- // PARSING
- function matchMeridiem(isStrict, locale) {
- return locale._meridiemParse;
- }
- addRegexToken('a', matchMeridiem);
- addRegexToken('A', matchMeridiem);
- addRegexToken('H', match1to2);
- addRegexToken('h', match1to2);
- addRegexToken('k', match1to2);
- addRegexToken('HH', match1to2, match2);
- addRegexToken('hh', match1to2, match2);
- addRegexToken('kk', match1to2, match2);
- addRegexToken('hmm', match3to4);
- addRegexToken('hmmss', match5to6);
- addRegexToken('Hmm', match3to4);
- addRegexToken('Hmmss', match5to6);
- addParseToken(['H', 'HH'], HOUR);
- addParseToken(['k', 'kk'], function (input, array, config) {
- var kInput = toInt(input);
- array[HOUR] = kInput === 24 ? 0 : kInput;
- });
- addParseToken(['a', 'A'], function (input, array, config) {
- config._isPm = config._locale.isPM(input);
- config._meridiem = input;
- });
- addParseToken(['h', 'hh'], function (input, array, config) {
- array[HOUR] = toInt(input);
- getParsingFlags(config).bigHour = true;
- });
- addParseToken('hmm', function (input, array, config) {
- var pos = input.length - 2;
- array[HOUR] = toInt(input.substr(0, pos));
- array[MINUTE] = toInt(input.substr(pos));
- getParsingFlags(config).bigHour = true;
- });
- addParseToken('hmmss', function (input, array, config) {
- var pos1 = input.length - 4,
- pos2 = input.length - 2;
- array[HOUR] = toInt(input.substr(0, pos1));
- array[MINUTE] = toInt(input.substr(pos1, 2));
- array[SECOND] = toInt(input.substr(pos2));
- getParsingFlags(config).bigHour = true;
- });
- addParseToken('Hmm', function (input, array, config) {
- var pos = input.length - 2;
- array[HOUR] = toInt(input.substr(0, pos));
- array[MINUTE] = toInt(input.substr(pos));
- });
- addParseToken('Hmmss', function (input, array, config) {
- var pos1 = input.length - 4,
- pos2 = input.length - 2;
- array[HOUR] = toInt(input.substr(0, pos1));
- array[MINUTE] = toInt(input.substr(pos1, 2));
- array[SECOND] = toInt(input.substr(pos2));
- });
- // LOCALES
- function localeIsPM(input) {
- // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays
- // Using charAt should be more compatible.
- return (input + '').toLowerCase().charAt(0) === 'p';
- }
- var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i,
- // Setting the hour should keep the time, because the user explicitly
- // specified which hour they want. So trying to maintain the same hour (in
- // a new timezone) makes sense. Adding/subtracting hours does not follow
- // this rule.
- getSetHour = makeGetSet('Hours', true);
- function localeMeridiem(hours, minutes, isLower) {
- if (hours > 11) {
- return isLower ? 'pm' : 'PM';
- } else {
- return isLower ? 'am' : 'AM';
- }
- }
- var baseConfig = {
- calendar: defaultCalendar,
- longDateFormat: defaultLongDateFormat,
- invalidDate: defaultInvalidDate,
- ordinal: defaultOrdinal,
- dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,
- relativeTime: defaultRelativeTime,
- months: defaultLocaleMonths,
- monthsShort: defaultLocaleMonthsShort,
- week: defaultLocaleWeek,
- weekdays: defaultLocaleWeekdays,
- weekdaysMin: defaultLocaleWeekdaysMin,
- weekdaysShort: defaultLocaleWeekdaysShort,
- meridiemParse: defaultLocaleMeridiemParse };
- // internal storage for locale config files
- var locales = {},
- localeFamilies = {},
- globalLocale;
- function commonPrefix(arr1, arr2) {
- var i,
- minl = Math.min(arr1.length, arr2.length);
- for (i = 0; i < minl; i += 1) {
- if (arr1[i] !== arr2[i]) {
- return i;
- }
- }
- return minl;
- }
- function normalizeLocale(key) {
- return key ? key.toLowerCase().replace('_', '-') : key;
- }
- // pick the locale from the array
- // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each
- // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root
- function chooseLocale(names) {
- var i = 0,
- j,
- next,
- locale,
- split;
- while (i < names.length) {
- split = normalizeLocale(names[i]).split('-');
- j = split.length;
- next = normalizeLocale(names[i + 1]);
- next = next ? next.split('-') : null;
- while (j > 0) {
- locale = loadLocale(split.slice(0, j).join('-'));
- if (locale) {
- return locale;
- }
- if (
- next &&
- next.length >= j &&
- commonPrefix(split, next) >= j - 1)
- {
- //the next array item is better than a shallower substring of this one
- break;
- }
- j--;
- }
- i++;
- }
- return globalLocale;
- }
- function isLocaleNameSane(name) {
- // Prevent names that look like filesystem paths, i.e contain '/' or '\'
- return name.match('^[^/\\\\]*$') != null;
- }
- function loadLocale(name) {
- var oldLocale = null,
- aliasedRequire;
- // TODO: Find a better way to register and load all the locales in Node
- if (
- locales[name] === undefined &&
- typeof module !== 'undefined' &&
- module &&
- module.exports &&
- isLocaleNameSane(name))
- {
- try {
- oldLocale = globalLocale._abbr;
- aliasedRequire = require;
- __webpack_require__(15)("./" + name);
- getSetGlobalLocale(oldLocale);
- } catch (e) {
- // mark as not found to avoid repeating expensive file require call causing high CPU
- // when trying to find en-US, en_US, en-us for every format call
- locales[name] = null; // null means not found
- }
- }
- return locales[name];
- }
- // This function will load locale and then set the global locale. If
- // no arguments are passed in, it will simply return the current global
- // locale key.
- function getSetGlobalLocale(key, values) {
- var data;
- if (key) {
- if (isUndefined(values)) {
- data = getLocale(key);
- } else {
- data = defineLocale(key, values);
- }
- if (data) {
- // moment.duration._locale = moment._locale = data;
- globalLocale = data;
- } else {
- if (typeof console !== 'undefined' && console.warn) {
- //warn user if arguments are passed but the locale could not be set
- console.warn(
- 'Locale ' + key + ' not found. Did you forget to load it?');
- }
- }
- }
- return globalLocale._abbr;
- }
- function defineLocale(name, config) {
- if (config !== null) {
- var locale,
- parentConfig = baseConfig;
- config.abbr = name;
- if (locales[name] != null) {
- deprecateSimple(
- 'defineLocaleOverride',
- 'use moment.updateLocale(localeName, config) to change ' +
- 'an existing locale. moment.defineLocale(localeName, ' +
- 'config) should only be used for creating a new locale ' +
- 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.');
- parentConfig = locales[name]._config;
- } else if (config.parentLocale != null) {
- if (locales[config.parentLocale] != null) {
- parentConfig = locales[config.parentLocale]._config;
- } else {
- locale = loadLocale(config.parentLocale);
- if (locale != null) {
- parentConfig = locale._config;
- } else {
- if (!localeFamilies[config.parentLocale]) {
- localeFamilies[config.parentLocale] = [];
- }
- localeFamilies[config.parentLocale].push({
- name: name,
- config: config });
- return null;
- }
- }
- }
- locales[name] = new Locale(mergeConfigs(parentConfig, config));
- if (localeFamilies[name]) {
- localeFamilies[name].forEach(function (x) {
- defineLocale(x.name, x.config);
- });
- }
- // backwards compat for now: also set the locale
- // make sure we set the locale AFTER all child locales have been
- // created, so we won't end up with the child locale set.
- getSetGlobalLocale(name);
- return locales[name];
- } else {
- // useful for testing
- delete locales[name];
- return null;
- }
- }
- function updateLocale(name, config) {
- if (config != null) {
- var locale,
- tmpLocale,
- parentConfig = baseConfig;
- if (locales[name] != null && locales[name].parentLocale != null) {
- // Update existing child locale in-place to avoid memory-leaks
- locales[name].set(mergeConfigs(locales[name]._config, config));
- } else {
- // MERGE
- tmpLocale = loadLocale(name);
- if (tmpLocale != null) {
- parentConfig = tmpLocale._config;
- }
- config = mergeConfigs(parentConfig, config);
- if (tmpLocale == null) {
- // updateLocale is called for creating a new locale
- // Set abbr so it will have a name (getters return
- // undefined otherwise).
- config.abbr = name;
- }
- locale = new Locale(config);
- locale.parentLocale = locales[name];
- locales[name] = locale;
- }
- // backwards compat for now: also set the locale
- getSetGlobalLocale(name);
- } else {
- // pass null for config to unupdate, useful for tests
- if (locales[name] != null) {
- if (locales[name].parentLocale != null) {
- locales[name] = locales[name].parentLocale;
- if (name === getSetGlobalLocale()) {
- getSetGlobalLocale(name);
- }
- } else if (locales[name] != null) {
- delete locales[name];
- }
- }
- }
- return locales[name];
- }
- // returns locale data
- function getLocale(key) {
- var locale;
- if (key && key._locale && key._locale._abbr) {
- key = key._locale._abbr;
- }
- if (!key) {
- return globalLocale;
- }
- if (!isArray(key)) {
- //short-circuit everything else
- locale = loadLocale(key);
- if (locale) {
- return locale;
- }
- key = [key];
- }
- return chooseLocale(key);
- }
- function listLocales() {
- return keys(locales);
- }
- function checkOverflow(m) {
- var overflow,
- a = m._a;
- if (a && getParsingFlags(m).overflow === -2) {
- overflow =
- a[MONTH] < 0 || a[MONTH] > 11 ?
- MONTH :
- a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ?
- DATE :
- a[HOUR] < 0 ||
- a[HOUR] > 24 ||
- a[HOUR] === 24 && (
- a[MINUTE] !== 0 ||
- a[SECOND] !== 0 ||
- a[MILLISECOND] !== 0) ?
- HOUR :
- a[MINUTE] < 0 || a[MINUTE] > 59 ?
- MINUTE :
- a[SECOND] < 0 || a[SECOND] > 59 ?
- SECOND :
- a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ?
- MILLISECOND :
- -1;
- if (
- getParsingFlags(m)._overflowDayOfYear && (
- overflow < YEAR || overflow > DATE))
- {
- overflow = DATE;
- }
- if (getParsingFlags(m)._overflowWeeks && overflow === -1) {
- overflow = WEEK;
- }
- if (getParsingFlags(m)._overflowWeekday && overflow === -1) {
- overflow = WEEKDAY;
- }
- getParsingFlags(m).overflow = overflow;
- }
- return m;
- }
- // iso 8601 regex
- // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)
- var extendedIsoRegex =
- /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,
- basicIsoRegex =
- /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,
- tzRegex = /Z|[+-]\d\d(?::?\d\d)?/,
- isoDates = [
- ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/],
- ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/],
- ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/],
- ['GGGG-[W]WW', /\d{4}-W\d\d/, false],
- ['YYYY-DDD', /\d{4}-\d{3}/],
- ['YYYY-MM', /\d{4}-\d\d/, false],
- ['YYYYYYMMDD', /[+-]\d{10}/],
- ['YYYYMMDD', /\d{8}/],
- ['GGGG[W]WWE', /\d{4}W\d{3}/],
- ['GGGG[W]WW', /\d{4}W\d{2}/, false],
- ['YYYYDDD', /\d{7}/],
- ['YYYYMM', /\d{6}/, false],
- ['YYYY', /\d{4}/, false]],
- // iso time formats and regexes
- isoTimes = [
- ['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/],
- ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/],
- ['HH:mm:ss', /\d\d:\d\d:\d\d/],
- ['HH:mm', /\d\d:\d\d/],
- ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/],
- ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/],
- ['HHmmss', /\d\d\d\d\d\d/],
- ['HHmm', /\d\d\d\d/],
- ['HH', /\d\d/]],
- aspNetJsonRegex = /^\/?Date\((-?\d+)/i,
- // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3
- rfc2822 =
- /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,
- obsOffsets = {
- UT: 0,
- GMT: 0,
- EDT: -4 * 60,
- EST: -5 * 60,
- CDT: -5 * 60,
- CST: -6 * 60,
- MDT: -6 * 60,
- MST: -7 * 60,
- PDT: -7 * 60,
- PST: -8 * 60 };
- // date from iso format
- function configFromISO(config) {
- var i,
- l,
- string = config._i,
- match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),
- allowTime,
- dateFormat,
- timeFormat,
- tzFormat,
- isoDatesLen = isoDates.length,
- isoTimesLen = isoTimes.length;
- if (match) {
- getParsingFlags(config).iso = true;
- for (i = 0, l = isoDatesLen; i < l; i++) {
- if (isoDates[i][1].exec(match[1])) {
- dateFormat = isoDates[i][0];
- allowTime = isoDates[i][2] !== false;
- break;
- }
- }
- if (dateFormat == null) {
- config._isValid = false;
- return;
- }
- if (match[3]) {
- for (i = 0, l = isoTimesLen; i < l; i++) {
- if (isoTimes[i][1].exec(match[3])) {
- // match[2] should be 'T' or space
- timeFormat = (match[2] || ' ') + isoTimes[i][0];
- break;
- }
- }
- if (timeFormat == null) {
- config._isValid = false;
- return;
- }
- }
- if (!allowTime && timeFormat != null) {
- config._isValid = false;
- return;
- }
- if (match[4]) {
- if (tzRegex.exec(match[4])) {
- tzFormat = 'Z';
- } else {
- config._isValid = false;
- return;
- }
- }
- config._f = dateFormat + (timeFormat || '') + (tzFormat || '');
- configFromStringAndFormat(config);
- } else {
- config._isValid = false;
- }
- }
- function extractFromRFC2822Strings(
- yearStr,
- monthStr,
- dayStr,
- hourStr,
- minuteStr,
- secondStr)
- {
- var result = [
- untruncateYear(yearStr),
- defaultLocaleMonthsShort.indexOf(monthStr),
- parseInt(dayStr, 10),
- parseInt(hourStr, 10),
- parseInt(minuteStr, 10)];
- if (secondStr) {
- result.push(parseInt(secondStr, 10));
- }
- return result;
- }
- function untruncateYear(yearStr) {
- var year = parseInt(yearStr, 10);
- if (year <= 49) {
- return 2000 + year;
- } else if (year <= 999) {
- return 1900 + year;
- }
- return year;
- }
- function preprocessRFC2822(s) {
- // Remove comments and folding whitespace and replace multiple-spaces with a single space
- return s.
- replace(/\([^()]*\)|[\n\t]/g, ' ').
- replace(/(\s\s+)/g, ' ').
- replace(/^\s\s*/, '').
- replace(/\s\s*$/, '');
- }
- function checkWeekday(weekdayStr, parsedInput, config) {
- if (weekdayStr) {
- // TODO: Replace the vanilla JS Date object with an independent day-of-week check.
- var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),
- weekdayActual = new Date(
- parsedInput[0],
- parsedInput[1],
- parsedInput[2]).
- getDay();
- if (weekdayProvided !== weekdayActual) {
- getParsingFlags(config).weekdayMismatch = true;
- config._isValid = false;
- return false;
- }
- }
- return true;
- }
- function calculateOffset(obsOffset, militaryOffset, numOffset) {
- if (obsOffset) {
- return obsOffsets[obsOffset];
- } else if (militaryOffset) {
- // the only allowed military tz is Z
- return 0;
- } else {
- var hm = parseInt(numOffset, 10),
- m = hm % 100,
- h = (hm - m) / 100;
- return h * 60 + m;
- }
- }
- // date and time from ref 2822 format
- function configFromRFC2822(config) {
- var match = rfc2822.exec(preprocessRFC2822(config._i)),
- parsedArray;
- if (match) {
- parsedArray = extractFromRFC2822Strings(
- match[4],
- match[3],
- match[2],
- match[5],
- match[6],
- match[7]);
- if (!checkWeekday(match[1], parsedArray, config)) {
- return;
- }
- config._a = parsedArray;
- config._tzm = calculateOffset(match[8], match[9], match[10]);
- config._d = createUTCDate.apply(null, config._a);
- config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
- getParsingFlags(config).rfc2822 = true;
- } else {
- config._isValid = false;
- }
- }
- // date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict
- function configFromString(config) {
- var matched = aspNetJsonRegex.exec(config._i);
- if (matched !== null) {
- config._d = new Date(+matched[1]);
- return;
- }
- configFromISO(config);
- if (config._isValid === false) {
- delete config._isValid;
- } else {
- return;
- }
- configFromRFC2822(config);
- if (config._isValid === false) {
- delete config._isValid;
- } else {
- return;
- }
- if (config._strict) {
- config._isValid = false;
- } else {
- // Final attempt, use Input Fallback
- hooks.createFromInputFallback(config);
- }
- }
- hooks.createFromInputFallback = deprecate(
- 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +
- 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +
- 'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',
- function (config) {
- config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));
- });
- // Pick the first defined of two or three arguments.
- function defaults(a, b, c) {
- if (a != null) {
- return a;
- }
- if (b != null) {
- return b;
- }
- return c;
- }
- function currentDateArray(config) {
- // hooks is actually the exported moment object
- var nowValue = new Date(hooks.now());
- if (config._useUTC) {
- return [
- nowValue.getUTCFullYear(),
- nowValue.getUTCMonth(),
- nowValue.getUTCDate()];
- }
- return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];
- }
- // convert an array to a date.
- // the array should mirror the parameters below
- // note: all values past the year are optional and will default to the lowest possible value.
- // [year, month, day , hour, minute, second, millisecond]
- function configFromArray(config) {
- var i,
- date,
- input = [],
- currentDate,
- expectedWeekday,
- yearToUse;
- if (config._d) {
- return;
- }
- currentDate = currentDateArray(config);
- //compute day of the year from weeks and weekdays
- if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {
- dayOfYearFromWeekInfo(config);
- }
- //if the day of the year is set, figure out what it is
- if (config._dayOfYear != null) {
- yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);
- if (
- config._dayOfYear > daysInYear(yearToUse) ||
- config._dayOfYear === 0)
- {
- getParsingFlags(config)._overflowDayOfYear = true;
- }
- date = createUTCDate(yearToUse, 0, config._dayOfYear);
- config._a[MONTH] = date.getUTCMonth();
- config._a[DATE] = date.getUTCDate();
- }
- // Default to current date.
- // * if no year, month, day of month are given, default to today
- // * if day of month is given, default month and year
- // * if month is given, default only year
- // * if year is given, don't default anything
- for (i = 0; i < 3 && config._a[i] == null; ++i) {
- config._a[i] = input[i] = currentDate[i];
- }
- // Zero out whatever was not defaulted, including time
- for (; i < 7; i++) {
- config._a[i] = input[i] =
- config._a[i] == null ? i === 2 ? 1 : 0 : config._a[i];
- }
- // Check for 24:00:00.000
- if (
- config._a[HOUR] === 24 &&
- config._a[MINUTE] === 0 &&
- config._a[SECOND] === 0 &&
- config._a[MILLISECOND] === 0)
- {
- config._nextDay = true;
- config._a[HOUR] = 0;
- }
- config._d = (config._useUTC ? createUTCDate : createDate).apply(
- null,
- input);
- expectedWeekday = config._useUTC ?
- config._d.getUTCDay() :
- config._d.getDay();
- // Apply timezone offset from input. The actual utcOffset can be changed
- // with parseZone.
- if (config._tzm != null) {
- config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
- }
- if (config._nextDay) {
- config._a[HOUR] = 24;
- }
- // check for mismatching day of week
- if (
- config._w &&
- typeof config._w.d !== 'undefined' &&
- config._w.d !== expectedWeekday)
- {
- getParsingFlags(config).weekdayMismatch = true;
- }
- }
- function dayOfYearFromWeekInfo(config) {
- var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;
- w = config._w;
- if (w.GG != null || w.W != null || w.E != null) {
- dow = 1;
- doy = 4;
- // TODO: We need to take the current isoWeekYear, but that depends on
- // how we interpret now (local, utc, fixed offset). So create
- // a now version of current config (take local/utc/offset flags, and
- // create now).
- weekYear = defaults(
- w.GG,
- config._a[YEAR],
- weekOfYear(createLocal(), 1, 4).year);
- week = defaults(w.W, 1);
- weekday = defaults(w.E, 1);
- if (weekday < 1 || weekday > 7) {
- weekdayOverflow = true;
- }
- } else {
- dow = config._locale._week.dow;
- doy = config._locale._week.doy;
- curWeek = weekOfYear(createLocal(), dow, doy);
- weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);
- // Default to current week.
- week = defaults(w.w, curWeek.week);
- if (w.d != null) {
- // weekday -- low day numbers are considered next week
- weekday = w.d;
- if (weekday < 0 || weekday > 6) {
- weekdayOverflow = true;
- }
- } else if (w.e != null) {
- // local weekday -- counting starts from beginning of week
- weekday = w.e + dow;
- if (w.e < 0 || w.e > 6) {
- weekdayOverflow = true;
- }
- } else {
- // default to beginning of week
- weekday = dow;
- }
- }
- if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {
- getParsingFlags(config)._overflowWeeks = true;
- } else if (weekdayOverflow != null) {
- getParsingFlags(config)._overflowWeekday = true;
- } else {
- temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);
- config._a[YEAR] = temp.year;
- config._dayOfYear = temp.dayOfYear;
- }
- }
- // constant that refers to the ISO standard
- hooks.ISO_8601 = function () {};
- // constant that refers to the RFC 2822 form
- hooks.RFC_2822 = function () {};
- // date from string and format string
- function configFromStringAndFormat(config) {
- // TODO: Move this to another part of the creation flow to prevent circular deps
- if (config._f === hooks.ISO_8601) {
- configFromISO(config);
- return;
- }
- if (config._f === hooks.RFC_2822) {
- configFromRFC2822(config);
- return;
- }
- config._a = [];
- getParsingFlags(config).empty = true;
- // This array is used to make a Date, either with `new Date` or `Date.UTC`
- var string = '' + config._i,
- i,
- parsedInput,
- tokens,
- token,
- skipped,
- stringLength = string.length,
- totalParsedInputLength = 0,
- era,
- tokenLen;
- tokens =
- expandFormat(config._f, config._locale).match(formattingTokens) || [];
- tokenLen = tokens.length;
- for (i = 0; i < tokenLen; i++) {
- token = tokens[i];
- parsedInput = (string.match(getParseRegexForToken(token, config)) ||
- [])[0];
- if (parsedInput) {
- skipped = string.substr(0, string.indexOf(parsedInput));
- if (skipped.length > 0) {
- getParsingFlags(config).unusedInput.push(skipped);
- }
- string = string.slice(
- string.indexOf(parsedInput) + parsedInput.length);
- totalParsedInputLength += parsedInput.length;
- }
- // don't parse if it's not a known token
- if (formatTokenFunctions[token]) {
- if (parsedInput) {
- getParsingFlags(config).empty = false;
- } else {
- getParsingFlags(config).unusedTokens.push(token);
- }
- addTimeToArrayFromToken(token, parsedInput, config);
- } else if (config._strict && !parsedInput) {
- getParsingFlags(config).unusedTokens.push(token);
- }
- }
- // add remaining unparsed input length to the string
- getParsingFlags(config).charsLeftOver =
- stringLength - totalParsedInputLength;
- if (string.length > 0) {
- getParsingFlags(config).unusedInput.push(string);
- }
- // clear _12h flag if hour is <= 12
- if (
- config._a[HOUR] <= 12 &&
- getParsingFlags(config).bigHour === true &&
- config._a[HOUR] > 0)
- {
- getParsingFlags(config).bigHour = undefined;
- }
- getParsingFlags(config).parsedDateParts = config._a.slice(0);
- getParsingFlags(config).meridiem = config._meridiem;
- // handle meridiem
- config._a[HOUR] = meridiemFixWrap(
- config._locale,
- config._a[HOUR],
- config._meridiem);
- // handle era
- era = getParsingFlags(config).era;
- if (era !== null) {
- config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);
- }
- configFromArray(config);
- checkOverflow(config);
- }
- function meridiemFixWrap(locale, hour, meridiem) {
- var isPm;
- if (meridiem == null) {
- // nothing to do
- return hour;
- }
- if (locale.meridiemHour != null) {
- return locale.meridiemHour(hour, meridiem);
- } else if (locale.isPM != null) {
- // Fallback
- isPm = locale.isPM(meridiem);
- if (isPm && hour < 12) {
- hour += 12;
- }
- if (!isPm && hour === 12) {
- hour = 0;
- }
- return hour;
- } else {
- // this is not supposed to happen
- return hour;
- }
- }
- // date from string and array of format strings
- function configFromStringAndArray(config) {
- var tempConfig,
- bestMoment,
- scoreToBeat,
- i,
- currentScore,
- validFormatFound,
- bestFormatIsValid = false,
- configfLen = config._f.length;
- if (configfLen === 0) {
- getParsingFlags(config).invalidFormat = true;
- config._d = new Date(NaN);
- return;
- }
- for (i = 0; i < configfLen; i++) {
- currentScore = 0;
- validFormatFound = false;
- tempConfig = copyConfig({}, config);
- if (config._useUTC != null) {
- tempConfig._useUTC = config._useUTC;
- }
- tempConfig._f = config._f[i];
- configFromStringAndFormat(tempConfig);
- if (isValid(tempConfig)) {
- validFormatFound = true;
- }
- // if there is any input that was not parsed add a penalty for that format
- currentScore += getParsingFlags(tempConfig).charsLeftOver;
- //or tokens
- currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;
- getParsingFlags(tempConfig).score = currentScore;
- if (!bestFormatIsValid) {
- if (
- scoreToBeat == null ||
- currentScore < scoreToBeat ||
- validFormatFound)
- {
- scoreToBeat = currentScore;
- bestMoment = tempConfig;
- if (validFormatFound) {
- bestFormatIsValid = true;
- }
- }
- } else {
- if (currentScore < scoreToBeat) {
- scoreToBeat = currentScore;
- bestMoment = tempConfig;
- }
- }
- }
- extend(config, bestMoment || tempConfig);
- }
- function configFromObject(config) {
- if (config._d) {
- return;
- }
- var i = normalizeObjectUnits(config._i),
- dayOrDate = i.day === undefined ? i.date : i.day;
- config._a = map(
- [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],
- function (obj) {
- return obj && parseInt(obj, 10);
- });
- configFromArray(config);
- }
- function createFromConfig(config) {
- var res = new Moment(checkOverflow(prepareConfig(config)));
- if (res._nextDay) {
- // Adding is smart enough around DST
- res.add(1, 'd');
- res._nextDay = undefined;
- }
- return res;
- }
- function prepareConfig(config) {
- var input = config._i,
- format = config._f;
- config._locale = config._locale || getLocale(config._l);
- if (input === null || format === undefined && input === '') {
- return createInvalid({ nullInput: true });
- }
- if (typeof input === 'string') {
- config._i = input = config._locale.preparse(input);
- }
- if (isMoment(input)) {
- return new Moment(checkOverflow(input));
- } else if (isDate(input)) {
- config._d = input;
- } else if (isArray(format)) {
- configFromStringAndArray(config);
- } else if (format) {
- configFromStringAndFormat(config);
- } else {
- configFromInput(config);
- }
- if (!isValid(config)) {
- config._d = null;
- }
- return config;
- }
- function configFromInput(config) {
- var input = config._i;
- if (isUndefined(input)) {
- config._d = new Date(hooks.now());
- } else if (isDate(input)) {
- config._d = new Date(input.valueOf());
- } else if (typeof input === 'string') {
- configFromString(config);
- } else if (isArray(input)) {
- config._a = map(input.slice(0), function (obj) {
- return parseInt(obj, 10);
- });
- configFromArray(config);
- } else if (isObject(input)) {
- configFromObject(config);
- } else if (isNumber(input)) {
- // from milliseconds
- config._d = new Date(input);
- } else {
- hooks.createFromInputFallback(config);
- }
- }
- function createLocalOrUTC(input, format, locale, strict, isUTC) {
- var c = {};
- if (format === true || format === false) {
- strict = format;
- format = undefined;
- }
- if (locale === true || locale === false) {
- strict = locale;
- locale = undefined;
- }
- if (
- isObject(input) && isObjectEmpty(input) ||
- isArray(input) && input.length === 0)
- {
- input = undefined;
- }
- // object construction must be done this way.
- // https://github.com/moment/moment/issues/1423
- c._isAMomentObject = true;
- c._useUTC = c._isUTC = isUTC;
- c._l = locale;
- c._i = input;
- c._f = format;
- c._strict = strict;
- return createFromConfig(c);
- }
- function createLocal(input, format, locale, strict) {
- return createLocalOrUTC(input, format, locale, strict, false);
- }
- var prototypeMin = deprecate(
- 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',
- function () {
- var other = createLocal.apply(null, arguments);
- if (this.isValid() && other.isValid()) {
- return other < this ? this : other;
- } else {
- return createInvalid();
- }
- }),
- prototypeMax = deprecate(
- 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',
- function () {
- var other = createLocal.apply(null, arguments);
- if (this.isValid() && other.isValid()) {
- return other > this ? this : other;
- } else {
- return createInvalid();
- }
- });
- // Pick a moment m from moments so that m[fn](other) is true for all
- // other. This relies on the function fn to be transitive.
- //
- // moments should either be an array of moment objects or an array, whose
- // first element is an array of moment objects.
- function pickBy(fn, moments) {
- var res, i;
- if (moments.length === 1 && isArray(moments[0])) {
- moments = moments[0];
- }
- if (!moments.length) {
- return createLocal();
- }
- res = moments[0];
- for (i = 1; i < moments.length; ++i) {
- if (!moments[i].isValid() || moments[i][fn](res)) {
- res = moments[i];
- }
- }
- return res;
- }
- // TODO: Use [].sort instead?
- function min() {
- var args = [].slice.call(arguments, 0);
- return pickBy('isBefore', args);
- }
- function max() {
- var args = [].slice.call(arguments, 0);
- return pickBy('isAfter', args);
- }
- var now = function now() {
- return Date.now ? Date.now() : +new Date();
- };
- var ordering = [
- 'year',
- 'quarter',
- 'month',
- 'week',
- 'day',
- 'hour',
- 'minute',
- 'second',
- 'millisecond'];
- function isDurationValid(m) {
- var key,
- unitHasDecimal = false,
- i,
- orderLen = ordering.length;
- for (key in m) {
- if (
- hasOwnProp(m, key) &&
- !(
- indexOf.call(ordering, key) !== -1 && (
- m[key] == null || !isNaN(m[key]))))
- {
- return false;
- }
- }
- for (i = 0; i < orderLen; ++i) {
- if (m[ordering[i]]) {
- if (unitHasDecimal) {
- return false; // only allow non-integers for smallest unit
- }
- if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {
- unitHasDecimal = true;
- }
- }
- }
- return true;
- }
- function isValid$1() {
- return this._isValid;
- }
- function createInvalid$1() {
- return createDuration(NaN);
- }
- function Duration(duration) {
- var normalizedInput = normalizeObjectUnits(duration),
- years = normalizedInput.year || 0,
- quarters = normalizedInput.quarter || 0,
- months = normalizedInput.month || 0,
- weeks = normalizedInput.week || normalizedInput.isoWeek || 0,
- days = normalizedInput.day || 0,
- hours = normalizedInput.hour || 0,
- minutes = normalizedInput.minute || 0,
- seconds = normalizedInput.second || 0,
- milliseconds = normalizedInput.millisecond || 0;
- this._isValid = isDurationValid(normalizedInput);
- // representation for dateAddRemove
- this._milliseconds =
- +milliseconds +
- seconds * 1e3 + // 1000
- minutes * 6e4 + // 1000 * 60
- hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978
- // Because of dateAddRemove treats 24 hours as different from a
- // day when working around DST, we need to store them separately
- this._days = +days + weeks * 7;
- // It is impossible to translate months into days without knowing
- // which months you are are talking about, so we have to store
- // it separately.
- this._months = +months + quarters * 3 + years * 12;
- this._data = {};
- this._locale = getLocale();
- this._bubble();
- }
- function isDuration(obj) {
- return obj instanceof Duration;
- }
- function absRound(number) {
- if (number < 0) {
- return Math.round(-1 * number) * -1;
- } else {
- return Math.round(number);
- }
- }
- // compare two arrays, return the number of differences
- function compareArrays(array1, array2, dontConvert) {
- var len = Math.min(array1.length, array2.length),
- lengthDiff = Math.abs(array1.length - array2.length),
- diffs = 0,
- i;
- for (i = 0; i < len; i++) {
- if (
- dontConvert && array1[i] !== array2[i] ||
- !dontConvert && toInt(array1[i]) !== toInt(array2[i]))
- {
- diffs++;
- }
- }
- return diffs + lengthDiff;
- }
- // FORMATTING
- function offset(token, separator) {
- addFormatToken(token, 0, 0, function () {
- var offset = this.utcOffset(),
- sign = '+';
- if (offset < 0) {
- offset = -offset;
- sign = '-';
- }
- return (
- sign +
- zeroFill(~~(offset / 60), 2) +
- separator +
- zeroFill(~~offset % 60, 2));
- });
- }
- offset('Z', ':');
- offset('ZZ', '');
- // PARSING
- addRegexToken('Z', matchShortOffset);
- addRegexToken('ZZ', matchShortOffset);
- addParseToken(['Z', 'ZZ'], function (input, array, config) {
- config._useUTC = true;
- config._tzm = offsetFromString(matchShortOffset, input);
- });
- // HELPERS
- // timezone chunker
- // '+10:00' > ['10', '00']
- // '-1530' > ['-15', '30']
- var chunkOffset = /([\+\-]|\d\d)/gi;
- function offsetFromString(matcher, string) {
- var matches = (string || '').match(matcher),
- chunk,
- parts,
- minutes;
- if (matches === null) {
- return null;
- }
- chunk = matches[matches.length - 1] || [];
- parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];
- minutes = +(parts[1] * 60) + toInt(parts[2]);
- return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;
- }
- // Return a moment from input, that is local/utc/zone equivalent to model.
- function cloneWithOffset(input, model) {
- var res, diff;
- if (model._isUTC) {
- res = model.clone();
- diff =
- (isMoment(input) || isDate(input) ?
- input.valueOf() :
- createLocal(input).valueOf()) - res.valueOf();
- // Use low-level api, because this fn is low-level api.
- res._d.setTime(res._d.valueOf() + diff);
- hooks.updateOffset(res, false);
- return res;
- } else {
- return createLocal(input).local();
- }
- }
- function getDateOffset(m) {
- // On Firefox.24 Date#getTimezoneOffset returns a floating point.
- // https://github.com/moment/moment/pull/1871
- return -Math.round(m._d.getTimezoneOffset());
- }
- // HOOKS
- // This function will be called whenever a moment is mutated.
- // It is intended to keep the offset in sync with the timezone.
- hooks.updateOffset = function () {};
- // MOMENTS
- // keepLocalTime = true means only change the timezone, without
- // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->
- // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset
- // +0200, so we adjust the time as needed, to be valid.
- //
- // Keeping the time actually adds/subtracts (one hour)
- // from the actual represented time. That is why we call updateOffset
- // a second time. In case it wants us to change the offset again
- // _changeInProgress == true case, then we have to adjust, because
- // there is no such time in the given timezone.
- function getSetOffset(input, keepLocalTime, keepMinutes) {
- var offset = this._offset || 0,
- localAdjust;
- if (!this.isValid()) {
- return input != null ? this : NaN;
- }
- if (input != null) {
- if (typeof input === 'string') {
- input = offsetFromString(matchShortOffset, input);
- if (input === null) {
- return this;
- }
- } else if (Math.abs(input) < 16 && !keepMinutes) {
- input = input * 60;
- }
- if (!this._isUTC && keepLocalTime) {
- localAdjust = getDateOffset(this);
- }
- this._offset = input;
- this._isUTC = true;
- if (localAdjust != null) {
- this.add(localAdjust, 'm');
- }
- if (offset !== input) {
- if (!keepLocalTime || this._changeInProgress) {
- addSubtract(
- this,
- createDuration(input - offset, 'm'),
- 1,
- false);
- } else if (!this._changeInProgress) {
- this._changeInProgress = true;
- hooks.updateOffset(this, true);
- this._changeInProgress = null;
- }
- }
- return this;
- } else {
- return this._isUTC ? offset : getDateOffset(this);
- }
- }
- function getSetZone(input, keepLocalTime) {
- if (input != null) {
- if (typeof input !== 'string') {
- input = -input;
- }
- this.utcOffset(input, keepLocalTime);
- return this;
- } else {
- return -this.utcOffset();
- }
- }
- function setOffsetToUTC(keepLocalTime) {
- return this.utcOffset(0, keepLocalTime);
- }
- function setOffsetToLocal(keepLocalTime) {
- if (this._isUTC) {
- this.utcOffset(0, keepLocalTime);
- this._isUTC = false;
- if (keepLocalTime) {
- this.subtract(getDateOffset(this), 'm');
- }
- }
- return this;
- }
- function setOffsetToParsedOffset() {
- if (this._tzm != null) {
- this.utcOffset(this._tzm, false, true);
- } else if (typeof this._i === 'string') {
- var tZone = offsetFromString(matchOffset, this._i);
- if (tZone != null) {
- this.utcOffset(tZone);
- } else {
- this.utcOffset(0, true);
- }
- }
- return this;
- }
- function hasAlignedHourOffset(input) {
- if (!this.isValid()) {
- return false;
- }
- input = input ? createLocal(input).utcOffset() : 0;
- return (this.utcOffset() - input) % 60 === 0;
- }
- function isDaylightSavingTime() {
- return (
- this.utcOffset() > this.clone().month(0).utcOffset() ||
- this.utcOffset() > this.clone().month(5).utcOffset());
- }
- function isDaylightSavingTimeShifted() {
- if (!isUndefined(this._isDSTShifted)) {
- return this._isDSTShifted;
- }
- var c = {},
- other;
- copyConfig(c, this);
- c = prepareConfig(c);
- if (c._a) {
- other = c._isUTC ? createUTC(c._a) : createLocal(c._a);
- this._isDSTShifted =
- this.isValid() && compareArrays(c._a, other.toArray()) > 0;
- } else {
- this._isDSTShifted = false;
- }
- return this._isDSTShifted;
- }
- function isLocal() {
- return this.isValid() ? !this._isUTC : false;
- }
- function isUtcOffset() {
- return this.isValid() ? this._isUTC : false;
- }
- function isUtc() {
- return this.isValid() ? this._isUTC && this._offset === 0 : false;
- }
- // ASP.NET json date format regex
- var aspNetRegex = /^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,
- // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html
- // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere
- // and further modified to allow for strings containing both week and day
- isoRegex =
- /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;
- function createDuration(input, key) {
- var duration = input,
- // matching against regexp is expensive, do it on demand
- match = null,
- sign,
- ret,
- diffRes;
- if (isDuration(input)) {
- duration = {
- ms: input._milliseconds,
- d: input._days,
- M: input._months };
- } else if (isNumber(input) || !isNaN(+input)) {
- duration = {};
- if (key) {
- duration[key] = +input;
- } else {
- duration.milliseconds = +input;
- }
- } else if (match = aspNetRegex.exec(input)) {
- sign = match[1] === '-' ? -1 : 1;
- duration = {
- y: 0,
- d: toInt(match[DATE]) * sign,
- h: toInt(match[HOUR]) * sign,
- m: toInt(match[MINUTE]) * sign,
- s: toInt(match[SECOND]) * sign,
- ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign // the millisecond decimal point is included in the match
- };
- } else if (match = isoRegex.exec(input)) {
- sign = match[1] === '-' ? -1 : 1;
- duration = {
- y: parseIso(match[2], sign),
- M: parseIso(match[3], sign),
- w: parseIso(match[4], sign),
- d: parseIso(match[5], sign),
- h: parseIso(match[6], sign),
- m: parseIso(match[7], sign),
- s: parseIso(match[8], sign) };
- } else if (duration == null) {
- // checks for null or undefined
- duration = {};
- } else if (
- typeof duration === 'object' && (
- 'from' in duration || 'to' in duration))
- {
- diffRes = momentsDifference(
- createLocal(duration.from),
- createLocal(duration.to));
- duration = {};
- duration.ms = diffRes.milliseconds;
- duration.M = diffRes.months;
- }
- ret = new Duration(duration);
- if (isDuration(input) && hasOwnProp(input, '_locale')) {
- ret._locale = input._locale;
- }
- if (isDuration(input) && hasOwnProp(input, '_isValid')) {
- ret._isValid = input._isValid;
- }
- return ret;
- }
- createDuration.fn = Duration.prototype;
- createDuration.invalid = createInvalid$1;
- function parseIso(inp, sign) {
- // We'd normally use ~~inp for this, but unfortunately it also
- // converts floats to ints.
- // inp may be undefined, so careful calling replace on it.
- var res = inp && parseFloat(inp.replace(',', '.'));
- // apply sign while we're at it
- return (isNaN(res) ? 0 : res) * sign;
- }
- function positiveMomentsDifference(base, other) {
- var res = {};
- res.months =
- other.month() - base.month() + (other.year() - base.year()) * 12;
- if (base.clone().add(res.months, 'M').isAfter(other)) {
- --res.months;
- }
- res.milliseconds = +other - +base.clone().add(res.months, 'M');
- return res;
- }
- function momentsDifference(base, other) {
- var res;
- if (!(base.isValid() && other.isValid())) {
- return { milliseconds: 0, months: 0 };
- }
- other = cloneWithOffset(other, base);
- if (base.isBefore(other)) {
- res = positiveMomentsDifference(base, other);
- } else {
- res = positiveMomentsDifference(other, base);
- res.milliseconds = -res.milliseconds;
- res.months = -res.months;
- }
- return res;
- }
- // TODO: remove 'name' arg after deprecation is removed
- function createAdder(direction, name) {
- return function (val, period) {
- var dur, tmp;
- //invert the arguments, but complain about it
- if (period !== null && !isNaN(+period)) {
- deprecateSimple(
- name,
- 'moment().' +
- name +
- '(period, number) is deprecated. Please use moment().' +
- name +
- '(number, period). ' +
- 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');
- tmp = val;
- val = period;
- period = tmp;
- }
- dur = createDuration(val, period);
- addSubtract(this, dur, direction);
- return this;
- };
- }
- function addSubtract(mom, duration, isAdding, updateOffset) {
- var milliseconds = duration._milliseconds,
- days = absRound(duration._days),
- months = absRound(duration._months);
- if (!mom.isValid()) {
- // No op
- return;
- }
- updateOffset = updateOffset == null ? true : updateOffset;
- if (months) {
- setMonth(mom, get(mom, 'Month') + months * isAdding);
- }
- if (days) {
- set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);
- }
- if (milliseconds) {
- mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);
- }
- if (updateOffset) {
- hooks.updateOffset(mom, days || months);
- }
- }
- var add = createAdder(1, 'add'),
- subtract = createAdder(-1, 'subtract');
- function isString(input) {
- return typeof input === 'string' || input instanceof String;
- }
- // type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined
- function isMomentInput(input) {
- return (
- isMoment(input) ||
- isDate(input) ||
- isString(input) ||
- isNumber(input) ||
- isNumberOrStringArray(input) ||
- isMomentInputObject(input) ||
- input === null ||
- input === undefined);
- }
- function isMomentInputObject(input) {
- var objectTest = isObject(input) && !isObjectEmpty(input),
- propertyTest = false,
- properties = [
- 'years',
- 'year',
- 'y',
- 'months',
- 'month',
- 'M',
- 'days',
- 'day',
- 'd',
- 'dates',
- 'date',
- 'D',
- 'hours',
- 'hour',
- 'h',
- 'minutes',
- 'minute',
- 'm',
- 'seconds',
- 'second',
- 's',
- 'milliseconds',
- 'millisecond',
- 'ms'],
- i,
- property,
- propertyLen = properties.length;
- for (i = 0; i < propertyLen; i += 1) {
- property = properties[i];
- propertyTest = propertyTest || hasOwnProp(input, property);
- }
- return objectTest && propertyTest;
- }
- function isNumberOrStringArray(input) {
- var arrayTest = isArray(input),
- dataTypeTest = false;
- if (arrayTest) {
- dataTypeTest =
- input.filter(function (item) {
- return !isNumber(item) && isString(input);
- }).length === 0;
- }
- return arrayTest && dataTypeTest;
- }
- function isCalendarSpec(input) {
- var objectTest = isObject(input) && !isObjectEmpty(input),
- propertyTest = false,
- properties = [
- 'sameDay',
- 'nextDay',
- 'lastDay',
- 'nextWeek',
- 'lastWeek',
- 'sameElse'],
- i,
- property;
- for (i = 0; i < properties.length; i += 1) {
- property = properties[i];
- propertyTest = propertyTest || hasOwnProp(input, property);
- }
- return objectTest && propertyTest;
- }
- function getCalendarFormat(myMoment, now) {
- var diff = myMoment.diff(now, 'days', true);
- return diff < -6 ?
- 'sameElse' :
- diff < -1 ?
- 'lastWeek' :
- diff < 0 ?
- 'lastDay' :
- diff < 1 ?
- 'sameDay' :
- diff < 2 ?
- 'nextDay' :
- diff < 7 ?
- 'nextWeek' :
- 'sameElse';
- }
- function calendar$1(time, formats) {
- // Support for single parameter, formats only overload to the calendar function
- if (arguments.length === 1) {
- if (!arguments[0]) {
- time = undefined;
- formats = undefined;
- } else if (isMomentInput(arguments[0])) {
- time = arguments[0];
- formats = undefined;
- } else if (isCalendarSpec(arguments[0])) {
- formats = arguments[0];
- time = undefined;
- }
- }
- // We want to compare the start of today, vs this.
- // Getting start-of-today depends on whether we're local/utc/offset or not.
- var now = time || createLocal(),
- sod = cloneWithOffset(now, this).startOf('day'),
- format = hooks.calendarFormat(this, sod) || 'sameElse',
- output =
- formats && (
- isFunction(formats[format]) ?
- formats[format].call(this, now) :
- formats[format]);
- return this.format(
- output || this.localeData().calendar(format, this, createLocal(now)));
- }
- function clone() {
- return new Moment(this);
- }
- function isAfter(input, units) {
- var localInput = isMoment(input) ? input : createLocal(input);
- if (!(this.isValid() && localInput.isValid())) {
- return false;
- }
- units = normalizeUnits(units) || 'millisecond';
- if (units === 'millisecond') {
- return this.valueOf() > localInput.valueOf();
- } else {
- return localInput.valueOf() < this.clone().startOf(units).valueOf();
- }
- }
- function isBefore(input, units) {
- var localInput = isMoment(input) ? input : createLocal(input);
- if (!(this.isValid() && localInput.isValid())) {
- return false;
- }
- units = normalizeUnits(units) || 'millisecond';
- if (units === 'millisecond') {
- return this.valueOf() < localInput.valueOf();
- } else {
- return this.clone().endOf(units).valueOf() < localInput.valueOf();
- }
- }
- function isBetween(from, to, units, inclusivity) {
- var localFrom = isMoment(from) ? from : createLocal(from),
- localTo = isMoment(to) ? to : createLocal(to);
- if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {
- return false;
- }
- inclusivity = inclusivity || '()';
- return (
- (inclusivity[0] === '(' ?
- this.isAfter(localFrom, units) :
- !this.isBefore(localFrom, units)) && (
- inclusivity[1] === ')' ?
- this.isBefore(localTo, units) :
- !this.isAfter(localTo, units)));
- }
- function isSame(input, units) {
- var localInput = isMoment(input) ? input : createLocal(input),
- inputMs;
- if (!(this.isValid() && localInput.isValid())) {
- return false;
- }
- units = normalizeUnits(units) || 'millisecond';
- if (units === 'millisecond') {
- return this.valueOf() === localInput.valueOf();
- } else {
- inputMs = localInput.valueOf();
- return (
- this.clone().startOf(units).valueOf() <= inputMs &&
- inputMs <= this.clone().endOf(units).valueOf());
- }
- }
- function isSameOrAfter(input, units) {
- return this.isSame(input, units) || this.isAfter(input, units);
- }
- function isSameOrBefore(input, units) {
- return this.isSame(input, units) || this.isBefore(input, units);
- }
- function diff(input, units, asFloat) {
- var that, zoneDelta, output;
- if (!this.isValid()) {
- return NaN;
- }
- that = cloneWithOffset(input, this);
- if (!that.isValid()) {
- return NaN;
- }
- zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;
- units = normalizeUnits(units);
- switch (units) {
- case 'year':
- output = monthDiff(this, that) / 12;
- break;
- case 'month':
- output = monthDiff(this, that);
- break;
- case 'quarter':
- output = monthDiff(this, that) / 3;
- break;
- case 'second':
- output = (this - that) / 1e3;
- break; // 1000
- case 'minute':
- output = (this - that) / 6e4;
- break; // 1000 * 60
- case 'hour':
- output = (this - that) / 36e5;
- break; // 1000 * 60 * 60
- case 'day':
- output = (this - that - zoneDelta) / 864e5;
- break; // 1000 * 60 * 60 * 24, negate dst
- case 'week':
- output = (this - that - zoneDelta) / 6048e5;
- break; // 1000 * 60 * 60 * 24 * 7, negate dst
- default:
- output = this - that;}
- return asFloat ? output : absFloor(output);
- }
- function monthDiff(a, b) {
- if (a.date() < b.date()) {
- // end-of-month calculations work correct when the start month has more
- // days than the end month.
- return -monthDiff(b, a);
- }
- // difference in months
- var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),
- // b is in (anchor - 1 month, anchor + 1 month)
- anchor = a.clone().add(wholeMonthDiff, 'months'),
- anchor2,
- adjust;
- if (b - anchor < 0) {
- anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');
- // linear across the month
- adjust = (b - anchor) / (anchor - anchor2);
- } else {
- anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');
- // linear across the month
- adjust = (b - anchor) / (anchor2 - anchor);
- }
- //check for negative zero, return zero if negative zero
- return -(wholeMonthDiff + adjust) || 0;
- }
- hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';
- hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';
- function toString() {
- return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');
- }
- function toISOString(keepOffset) {
- if (!this.isValid()) {
- return null;
- }
- var utc = keepOffset !== true,
- m = utc ? this.clone().utc() : this;
- if (m.year() < 0 || m.year() > 9999) {
- return formatMoment(
- m,
- utc ?
- 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]' :
- 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ');
- }
- if (isFunction(Date.prototype.toISOString)) {
- // native implementation is ~50x faster, use it when we can
- if (utc) {
- return this.toDate().toISOString();
- } else {
- return new Date(this.valueOf() + this.utcOffset() * 60 * 1000).
- toISOString().
- replace('Z', formatMoment(m, 'Z'));
- }
- }
- return formatMoment(
- m,
- utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ');
- }
- /**
- * Return a human readable representation of a moment that can
- * also be evaluated to get a new moment which is the same
- *
- * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects
- */
- function inspect() {
- if (!this.isValid()) {
- return 'moment.invalid(/* ' + this._i + ' */)';
- }
- var func = 'moment',
- zone = '',
- prefix,
- year,
- datetime,
- suffix;
- if (!this.isLocal()) {
- func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';
- zone = 'Z';
- }
- prefix = '[' + func + '("]';
- year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';
- datetime = '-MM-DD[T]HH:mm:ss.SSS';
- suffix = zone + '[")]';
- return this.format(prefix + year + datetime + suffix);
- }
- function format(inputString) {
- if (!inputString) {
- inputString = this.isUtc() ?
- hooks.defaultFormatUtc :
- hooks.defaultFormat;
- }
- var output = formatMoment(this, inputString);
- return this.localeData().postformat(output);
- }
- function from(time, withoutSuffix) {
- if (
- this.isValid() && (
- isMoment(time) && time.isValid() || createLocal(time).isValid()))
- {
- return createDuration({ to: this, from: time }).
- locale(this.locale()).
- humanize(!withoutSuffix);
- } else {
- return this.localeData().invalidDate();
- }
- }
- function fromNow(withoutSuffix) {
- return this.from(createLocal(), withoutSuffix);
- }
- function to(time, withoutSuffix) {
- if (
- this.isValid() && (
- isMoment(time) && time.isValid() || createLocal(time).isValid()))
- {
- return createDuration({ from: this, to: time }).
- locale(this.locale()).
- humanize(!withoutSuffix);
- } else {
- return this.localeData().invalidDate();
- }
- }
- function toNow(withoutSuffix) {
- return this.to(createLocal(), withoutSuffix);
- }
- // If passed a locale key, it will set the locale for this
- // instance. Otherwise, it will return the locale configuration
- // variables for this instance.
- function locale(key) {
- var newLocaleData;
- if (key === undefined) {
- return this._locale._abbr;
- } else {
- newLocaleData = getLocale(key);
- if (newLocaleData != null) {
- this._locale = newLocaleData;
- }
- return this;
- }
- }
- var lang = deprecate(
- 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',
- function (key) {
- if (key === undefined) {
- return this.localeData();
- } else {
- return this.locale(key);
- }
- });
- function localeData() {
- return this._locale;
- }
- var MS_PER_SECOND = 1000,
- MS_PER_MINUTE = 60 * MS_PER_SECOND,
- MS_PER_HOUR = 60 * MS_PER_MINUTE,
- MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;
- // actual modulo - handles negative numbers (for dates before 1970):
- function mod$1(dividend, divisor) {
- return (dividend % divisor + divisor) % divisor;
- }
- function localStartOfDate(y, m, d) {
- // the date constructor remaps years 0-99 to 1900-1999
- if (y < 100 && y >= 0) {
- // preserve leap years using a full 400 year cycle, then reset
- return new Date(y + 400, m, d) - MS_PER_400_YEARS;
- } else {
- return new Date(y, m, d).valueOf();
- }
- }
- function utcStartOfDate(y, m, d) {
- // Date.UTC remaps years 0-99 to 1900-1999
- if (y < 100 && y >= 0) {
- // preserve leap years using a full 400 year cycle, then reset
- return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;
- } else {
- return Date.UTC(y, m, d);
- }
- }
- function startOf(units) {
- var time, startOfDate;
- units = normalizeUnits(units);
- if (units === undefined || units === 'millisecond' || !this.isValid()) {
- return this;
- }
- startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;
- switch (units) {
- case 'year':
- time = startOfDate(this.year(), 0, 1);
- break;
- case 'quarter':
- time = startOfDate(
- this.year(),
- this.month() - this.month() % 3,
- 1);
- break;
- case 'month':
- time = startOfDate(this.year(), this.month(), 1);
- break;
- case 'week':
- time = startOfDate(
- this.year(),
- this.month(),
- this.date() - this.weekday());
- break;
- case 'isoWeek':
- time = startOfDate(
- this.year(),
- this.month(),
- this.date() - (this.isoWeekday() - 1));
- break;
- case 'day':
- case 'date':
- time = startOfDate(this.year(), this.month(), this.date());
- break;
- case 'hour':
- time = this._d.valueOf();
- time -= mod$1(
- time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),
- MS_PER_HOUR);
- break;
- case 'minute':
- time = this._d.valueOf();
- time -= mod$1(time, MS_PER_MINUTE);
- break;
- case 'second':
- time = this._d.valueOf();
- time -= mod$1(time, MS_PER_SECOND);
- break;}
- this._d.setTime(time);
- hooks.updateOffset(this, true);
- return this;
- }
- function endOf(units) {
- var time, startOfDate;
- units = normalizeUnits(units);
- if (units === undefined || units === 'millisecond' || !this.isValid()) {
- return this;
- }
- startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;
- switch (units) {
- case 'year':
- time = startOfDate(this.year() + 1, 0, 1) - 1;
- break;
- case 'quarter':
- time =
- startOfDate(
- this.year(),
- this.month() - this.month() % 3 + 3,
- 1) -
- 1;
- break;
- case 'month':
- time = startOfDate(this.year(), this.month() + 1, 1) - 1;
- break;
- case 'week':
- time =
- startOfDate(
- this.year(),
- this.month(),
- this.date() - this.weekday() + 7) -
- 1;
- break;
- case 'isoWeek':
- time =
- startOfDate(
- this.year(),
- this.month(),
- this.date() - (this.isoWeekday() - 1) + 7) -
- 1;
- break;
- case 'day':
- case 'date':
- time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;
- break;
- case 'hour':
- time = this._d.valueOf();
- time +=
- MS_PER_HOUR -
- mod$1(
- time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),
- MS_PER_HOUR) -
- 1;
- break;
- case 'minute':
- time = this._d.valueOf();
- time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;
- break;
- case 'second':
- time = this._d.valueOf();
- time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;
- break;}
- this._d.setTime(time);
- hooks.updateOffset(this, true);
- return this;
- }
- function valueOf() {
- return this._d.valueOf() - (this._offset || 0) * 60000;
- }
- function unix() {
- return Math.floor(this.valueOf() / 1000);
- }
- function toDate() {
- return new Date(this.valueOf());
- }
- function toArray() {
- var m = this;
- return [
- m.year(),
- m.month(),
- m.date(),
- m.hour(),
- m.minute(),
- m.second(),
- m.millisecond()];
- }
- function toObject() {
- var m = this;
- return {
- years: m.year(),
- months: m.month(),
- date: m.date(),
- hours: m.hours(),
- minutes: m.minutes(),
- seconds: m.seconds(),
- milliseconds: m.milliseconds() };
- }
- function toJSON() {
- // new Date(NaN).toJSON() === null
- return this.isValid() ? this.toISOString() : null;
- }
- function isValid$2() {
- return isValid(this);
- }
- function parsingFlags() {
- return extend({}, getParsingFlags(this));
- }
- function invalidAt() {
- return getParsingFlags(this).overflow;
- }
- function creationData() {
- return {
- input: this._i,
- format: this._f,
- locale: this._locale,
- isUTC: this._isUTC,
- strict: this._strict };
- }
- addFormatToken('N', 0, 0, 'eraAbbr');
- addFormatToken('NN', 0, 0, 'eraAbbr');
- addFormatToken('NNN', 0, 0, 'eraAbbr');
- addFormatToken('NNNN', 0, 0, 'eraName');
- addFormatToken('NNNNN', 0, 0, 'eraNarrow');
- addFormatToken('y', ['y', 1], 'yo', 'eraYear');
- addFormatToken('y', ['yy', 2], 0, 'eraYear');
- addFormatToken('y', ['yyy', 3], 0, 'eraYear');
- addFormatToken('y', ['yyyy', 4], 0, 'eraYear');
- addRegexToken('N', matchEraAbbr);
- addRegexToken('NN', matchEraAbbr);
- addRegexToken('NNN', matchEraAbbr);
- addRegexToken('NNNN', matchEraName);
- addRegexToken('NNNNN', matchEraNarrow);
- addParseToken(
- ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],
- function (input, array, config, token) {
- var era = config._locale.erasParse(input, token, config._strict);
- if (era) {
- getParsingFlags(config).era = era;
- } else {
- getParsingFlags(config).invalidEra = input;
- }
- });
- addRegexToken('y', matchUnsigned);
- addRegexToken('yy', matchUnsigned);
- addRegexToken('yyy', matchUnsigned);
- addRegexToken('yyyy', matchUnsigned);
- addRegexToken('yo', matchEraYearOrdinal);
- addParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);
- addParseToken(['yo'], function (input, array, config, token) {
- var match;
- if (config._locale._eraYearOrdinalRegex) {
- match = input.match(config._locale._eraYearOrdinalRegex);
- }
- if (config._locale.eraYearOrdinalParse) {
- array[YEAR] = config._locale.eraYearOrdinalParse(input, match);
- } else {
- array[YEAR] = parseInt(input, 10);
- }
- });
- function localeEras(m, format) {
- var i,
- l,
- date,
- eras = this._eras || getLocale('en')._eras;
- for (i = 0, l = eras.length; i < l; ++i) {
- switch (typeof eras[i].since) {
- case 'string':
- // truncate time
- date = hooks(eras[i].since).startOf('day');
- eras[i].since = date.valueOf();
- break;}
- switch (typeof eras[i].until) {
- case 'undefined':
- eras[i].until = +Infinity;
- break;
- case 'string':
- // truncate time
- date = hooks(eras[i].until).startOf('day').valueOf();
- eras[i].until = date.valueOf();
- break;}
- }
- return eras;
- }
- function localeErasParse(eraName, format, strict) {
- var i,
- l,
- eras = this.eras(),
- name,
- abbr,
- narrow;
- eraName = eraName.toUpperCase();
- for (i = 0, l = eras.length; i < l; ++i) {
- name = eras[i].name.toUpperCase();
- abbr = eras[i].abbr.toUpperCase();
- narrow = eras[i].narrow.toUpperCase();
- if (strict) {
- switch (format) {
- case 'N':
- case 'NN':
- case 'NNN':
- if (abbr === eraName) {
- return eras[i];
- }
- break;
- case 'NNNN':
- if (name === eraName) {
- return eras[i];
- }
- break;
- case 'NNNNN':
- if (narrow === eraName) {
- return eras[i];
- }
- break;}
- } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {
- return eras[i];
- }
- }
- }
- function localeErasConvertYear(era, year) {
- var dir = era.since <= era.until ? +1 : -1;
- if (year === undefined) {
- return hooks(era.since).year();
- } else {
- return hooks(era.since).year() + (year - era.offset) * dir;
- }
- }
- function getEraName() {
- var i,
- l,
- val,
- eras = this.localeData().eras();
- for (i = 0, l = eras.length; i < l; ++i) {
- // truncate time
- val = this.clone().startOf('day').valueOf();
- if (eras[i].since <= val && val <= eras[i].until) {
- return eras[i].name;
- }
- if (eras[i].until <= val && val <= eras[i].since) {
- return eras[i].name;
- }
- }
- return '';
- }
- function getEraNarrow() {
- var i,
- l,
- val,
- eras = this.localeData().eras();
- for (i = 0, l = eras.length; i < l; ++i) {
- // truncate time
- val = this.clone().startOf('day').valueOf();
- if (eras[i].since <= val && val <= eras[i].until) {
- return eras[i].narrow;
- }
- if (eras[i].until <= val && val <= eras[i].since) {
- return eras[i].narrow;
- }
- }
- return '';
- }
- function getEraAbbr() {
- var i,
- l,
- val,
- eras = this.localeData().eras();
- for (i = 0, l = eras.length; i < l; ++i) {
- // truncate time
- val = this.clone().startOf('day').valueOf();
- if (eras[i].since <= val && val <= eras[i].until) {
- return eras[i].abbr;
- }
- if (eras[i].until <= val && val <= eras[i].since) {
- return eras[i].abbr;
- }
- }
- return '';
- }
- function getEraYear() {
- var i,
- l,
- dir,
- val,
- eras = this.localeData().eras();
- for (i = 0, l = eras.length; i < l; ++i) {
- dir = eras[i].since <= eras[i].until ? +1 : -1;
- // truncate time
- val = this.clone().startOf('day').valueOf();
- if (
- eras[i].since <= val && val <= eras[i].until ||
- eras[i].until <= val && val <= eras[i].since)
- {
- return (
- (this.year() - hooks(eras[i].since).year()) * dir +
- eras[i].offset);
- }
- }
- return this.year();
- }
- function erasNameRegex(isStrict) {
- if (!hasOwnProp(this, '_erasNameRegex')) {
- computeErasParse.call(this);
- }
- return isStrict ? this._erasNameRegex : this._erasRegex;
- }
- function erasAbbrRegex(isStrict) {
- if (!hasOwnProp(this, '_erasAbbrRegex')) {
- computeErasParse.call(this);
- }
- return isStrict ? this._erasAbbrRegex : this._erasRegex;
- }
- function erasNarrowRegex(isStrict) {
- if (!hasOwnProp(this, '_erasNarrowRegex')) {
- computeErasParse.call(this);
- }
- return isStrict ? this._erasNarrowRegex : this._erasRegex;
- }
- function matchEraAbbr(isStrict, locale) {
- return locale.erasAbbrRegex(isStrict);
- }
- function matchEraName(isStrict, locale) {
- return locale.erasNameRegex(isStrict);
- }
- function matchEraNarrow(isStrict, locale) {
- return locale.erasNarrowRegex(isStrict);
- }
- function matchEraYearOrdinal(isStrict, locale) {
- return locale._eraYearOrdinalRegex || matchUnsigned;
- }
- function computeErasParse() {
- var abbrPieces = [],
- namePieces = [],
- narrowPieces = [],
- mixedPieces = [],
- i,
- l,
- eras = this.eras();
- for (i = 0, l = eras.length; i < l; ++i) {
- namePieces.push(regexEscape(eras[i].name));
- abbrPieces.push(regexEscape(eras[i].abbr));
- narrowPieces.push(regexEscape(eras[i].narrow));
- mixedPieces.push(regexEscape(eras[i].name));
- mixedPieces.push(regexEscape(eras[i].abbr));
- mixedPieces.push(regexEscape(eras[i].narrow));
- }
- this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
- this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');
- this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');
- this._erasNarrowRegex = new RegExp(
- '^(' + narrowPieces.join('|') + ')',
- 'i');
- }
- // FORMATTING
- addFormatToken(0, ['gg', 2], 0, function () {
- return this.weekYear() % 100;
- });
- addFormatToken(0, ['GG', 2], 0, function () {
- return this.isoWeekYear() % 100;
- });
- function addWeekYearFormatToken(token, getter) {
- addFormatToken(0, [token, token.length], 0, getter);
- }
- addWeekYearFormatToken('gggg', 'weekYear');
- addWeekYearFormatToken('ggggg', 'weekYear');
- addWeekYearFormatToken('GGGG', 'isoWeekYear');
- addWeekYearFormatToken('GGGGG', 'isoWeekYear');
- // ALIASES
- addUnitAlias('weekYear', 'gg');
- addUnitAlias('isoWeekYear', 'GG');
- // PRIORITY
- addUnitPriority('weekYear', 1);
- addUnitPriority('isoWeekYear', 1);
- // PARSING
- addRegexToken('G', matchSigned);
- addRegexToken('g', matchSigned);
- addRegexToken('GG', match1to2, match2);
- addRegexToken('gg', match1to2, match2);
- addRegexToken('GGGG', match1to4, match4);
- addRegexToken('gggg', match1to4, match4);
- addRegexToken('GGGGG', match1to6, match6);
- addRegexToken('ggggg', match1to6, match6);
- addWeekParseToken(
- ['gggg', 'ggggg', 'GGGG', 'GGGGG'],
- function (input, week, config, token) {
- week[token.substr(0, 2)] = toInt(input);
- });
- addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {
- week[token] = hooks.parseTwoDigitYear(input);
- });
- // MOMENTS
- function getSetWeekYear(input) {
- return getSetWeekYearHelper.call(
- this,
- input,
- this.week(),
- this.weekday(),
- this.localeData()._week.dow,
- this.localeData()._week.doy);
- }
- function getSetISOWeekYear(input) {
- return getSetWeekYearHelper.call(
- this,
- input,
- this.isoWeek(),
- this.isoWeekday(),
- 1,
- 4);
- }
- function getISOWeeksInYear() {
- return weeksInYear(this.year(), 1, 4);
- }
- function getISOWeeksInISOWeekYear() {
- return weeksInYear(this.isoWeekYear(), 1, 4);
- }
- function getWeeksInYear() {
- var weekInfo = this.localeData()._week;
- return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);
- }
- function getWeeksInWeekYear() {
- var weekInfo = this.localeData()._week;
- return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);
- }
- function getSetWeekYearHelper(input, week, weekday, dow, doy) {
- var weeksTarget;
- if (input == null) {
- return weekOfYear(this, dow, doy).year;
- } else {
- weeksTarget = weeksInYear(input, dow, doy);
- if (week > weeksTarget) {
- week = weeksTarget;
- }
- return setWeekAll.call(this, input, week, weekday, dow, doy);
- }
- }
- function setWeekAll(weekYear, week, weekday, dow, doy) {
- var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),
- date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);
- this.year(date.getUTCFullYear());
- this.month(date.getUTCMonth());
- this.date(date.getUTCDate());
- return this;
- }
- // FORMATTING
- addFormatToken('Q', 0, 'Qo', 'quarter');
- // ALIASES
- addUnitAlias('quarter', 'Q');
- // PRIORITY
- addUnitPriority('quarter', 7);
- // PARSING
- addRegexToken('Q', match1);
- addParseToken('Q', function (input, array) {
- array[MONTH] = (toInt(input) - 1) * 3;
- });
- // MOMENTS
- function getSetQuarter(input) {
- return input == null ?
- Math.ceil((this.month() + 1) / 3) :
- this.month((input - 1) * 3 + this.month() % 3);
- }
- // FORMATTING
- addFormatToken('D', ['DD', 2], 'Do', 'date');
- // ALIASES
- addUnitAlias('date', 'D');
- // PRIORITY
- addUnitPriority('date', 9);
- // PARSING
- addRegexToken('D', match1to2);
- addRegexToken('DD', match1to2, match2);
- addRegexToken('Do', function (isStrict, locale) {
- // TODO: Remove "ordinalParse" fallback in next major release.
- return isStrict ?
- locale._dayOfMonthOrdinalParse || locale._ordinalParse :
- locale._dayOfMonthOrdinalParseLenient;
- });
- addParseToken(['D', 'DD'], DATE);
- addParseToken('Do', function (input, array) {
- array[DATE] = toInt(input.match(match1to2)[0]);
- });
- // MOMENTS
- var getSetDayOfMonth = makeGetSet('Date', true);
- // FORMATTING
- addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');
- // ALIASES
- addUnitAlias('dayOfYear', 'DDD');
- // PRIORITY
- addUnitPriority('dayOfYear', 4);
- // PARSING
- addRegexToken('DDD', match1to3);
- addRegexToken('DDDD', match3);
- addParseToken(['DDD', 'DDDD'], function (input, array, config) {
- config._dayOfYear = toInt(input);
- });
- // HELPERS
- // MOMENTS
- function getSetDayOfYear(input) {
- var dayOfYear =
- Math.round(
- (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) +
- 1;
- return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');
- }
- // FORMATTING
- addFormatToken('m', ['mm', 2], 0, 'minute');
- // ALIASES
- addUnitAlias('minute', 'm');
- // PRIORITY
- addUnitPriority('minute', 14);
- // PARSING
- addRegexToken('m', match1to2);
- addRegexToken('mm', match1to2, match2);
- addParseToken(['m', 'mm'], MINUTE);
- // MOMENTS
- var getSetMinute = makeGetSet('Minutes', false);
- // FORMATTING
- addFormatToken('s', ['ss', 2], 0, 'second');
- // ALIASES
- addUnitAlias('second', 's');
- // PRIORITY
- addUnitPriority('second', 15);
- // PARSING
- addRegexToken('s', match1to2);
- addRegexToken('ss', match1to2, match2);
- addParseToken(['s', 'ss'], SECOND);
- // MOMENTS
- var getSetSecond = makeGetSet('Seconds', false);
- // FORMATTING
- addFormatToken('S', 0, 0, function () {
- return ~~(this.millisecond() / 100);
- });
- addFormatToken(0, ['SS', 2], 0, function () {
- return ~~(this.millisecond() / 10);
- });
- addFormatToken(0, ['SSS', 3], 0, 'millisecond');
- addFormatToken(0, ['SSSS', 4], 0, function () {
- return this.millisecond() * 10;
- });
- addFormatToken(0, ['SSSSS', 5], 0, function () {
- return this.millisecond() * 100;
- });
- addFormatToken(0, ['SSSSSS', 6], 0, function () {
- return this.millisecond() * 1000;
- });
- addFormatToken(0, ['SSSSSSS', 7], 0, function () {
- return this.millisecond() * 10000;
- });
- addFormatToken(0, ['SSSSSSSS', 8], 0, function () {
- return this.millisecond() * 100000;
- });
- addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {
- return this.millisecond() * 1000000;
- });
- // ALIASES
- addUnitAlias('millisecond', 'ms');
- // PRIORITY
- addUnitPriority('millisecond', 16);
- // PARSING
- addRegexToken('S', match1to3, match1);
- addRegexToken('SS', match1to3, match2);
- addRegexToken('SSS', match1to3, match3);
- var token, getSetMillisecond;
- for (token = 'SSSS'; token.length <= 9; token += 'S') {
- addRegexToken(token, matchUnsigned);
- }
- function parseMs(input, array) {
- array[MILLISECOND] = toInt(('0.' + input) * 1000);
- }
- for (token = 'S'; token.length <= 9; token += 'S') {
- addParseToken(token, parseMs);
- }
- getSetMillisecond = makeGetSet('Milliseconds', false);
- // FORMATTING
- addFormatToken('z', 0, 0, 'zoneAbbr');
- addFormatToken('zz', 0, 0, 'zoneName');
- // MOMENTS
- function getZoneAbbr() {
- return this._isUTC ? 'UTC' : '';
- }
- function getZoneName() {
- return this._isUTC ? 'Coordinated Universal Time' : '';
- }
- var proto = Moment.prototype;
- proto.add = add;
- proto.calendar = calendar$1;
- proto.clone = clone;
- proto.diff = diff;
- proto.endOf = endOf;
- proto.format = format;
- proto.from = from;
- proto.fromNow = fromNow;
- proto.to = to;
- proto.toNow = toNow;
- proto.get = stringGet;
- proto.invalidAt = invalidAt;
- proto.isAfter = isAfter;
- proto.isBefore = isBefore;
- proto.isBetween = isBetween;
- proto.isSame = isSame;
- proto.isSameOrAfter = isSameOrAfter;
- proto.isSameOrBefore = isSameOrBefore;
- proto.isValid = isValid$2;
- proto.lang = lang;
- proto.locale = locale;
- proto.localeData = localeData;
- proto.max = prototypeMax;
- proto.min = prototypeMin;
- proto.parsingFlags = parsingFlags;
- proto.set = stringSet;
- proto.startOf = startOf;
- proto.subtract = subtract;
- proto.toArray = toArray;
- proto.toObject = toObject;
- proto.toDate = toDate;
- proto.toISOString = toISOString;
- proto.inspect = inspect;
- if (typeof Symbol !== 'undefined' && Symbol.for != null) {
- proto[Symbol.for('nodejs.util.inspect.custom')] = function () {
- return 'Moment<' + this.format() + '>';
- };
- }
- proto.toJSON = toJSON;
- proto.toString = toString;
- proto.unix = unix;
- proto.valueOf = valueOf;
- proto.creationData = creationData;
- proto.eraName = getEraName;
- proto.eraNarrow = getEraNarrow;
- proto.eraAbbr = getEraAbbr;
- proto.eraYear = getEraYear;
- proto.year = getSetYear;
- proto.isLeapYear = getIsLeapYear;
- proto.weekYear = getSetWeekYear;
- proto.isoWeekYear = getSetISOWeekYear;
- proto.quarter = proto.quarters = getSetQuarter;
- proto.month = getSetMonth;
- proto.daysInMonth = getDaysInMonth;
- proto.week = proto.weeks = getSetWeek;
- proto.isoWeek = proto.isoWeeks = getSetISOWeek;
- proto.weeksInYear = getWeeksInYear;
- proto.weeksInWeekYear = getWeeksInWeekYear;
- proto.isoWeeksInYear = getISOWeeksInYear;
- proto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;
- proto.date = getSetDayOfMonth;
- proto.day = proto.days = getSetDayOfWeek;
- proto.weekday = getSetLocaleDayOfWeek;
- proto.isoWeekday = getSetISODayOfWeek;
- proto.dayOfYear = getSetDayOfYear;
- proto.hour = proto.hours = getSetHour;
- proto.minute = proto.minutes = getSetMinute;
- proto.second = proto.seconds = getSetSecond;
- proto.millisecond = proto.milliseconds = getSetMillisecond;
- proto.utcOffset = getSetOffset;
- proto.utc = setOffsetToUTC;
- proto.local = setOffsetToLocal;
- proto.parseZone = setOffsetToParsedOffset;
- proto.hasAlignedHourOffset = hasAlignedHourOffset;
- proto.isDST = isDaylightSavingTime;
- proto.isLocal = isLocal;
- proto.isUtcOffset = isUtcOffset;
- proto.isUtc = isUtc;
- proto.isUTC = isUtc;
- proto.zoneAbbr = getZoneAbbr;
- proto.zoneName = getZoneName;
- proto.dates = deprecate(
- 'dates accessor is deprecated. Use date instead.',
- getSetDayOfMonth);
- proto.months = deprecate(
- 'months accessor is deprecated. Use month instead',
- getSetMonth);
- proto.years = deprecate(
- 'years accessor is deprecated. Use year instead',
- getSetYear);
- proto.zone = deprecate(
- 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',
- getSetZone);
- proto.isDSTShifted = deprecate(
- 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',
- isDaylightSavingTimeShifted);
- function createUnix(input) {
- return createLocal(input * 1000);
- }
- function createInZone() {
- return createLocal.apply(null, arguments).parseZone();
- }
- function preParsePostFormat(string) {
- return string;
- }
- var proto$1 = Locale.prototype;
- proto$1.calendar = calendar;
- proto$1.longDateFormat = longDateFormat;
- proto$1.invalidDate = invalidDate;
- proto$1.ordinal = ordinal;
- proto$1.preparse = preParsePostFormat;
- proto$1.postformat = preParsePostFormat;
- proto$1.relativeTime = relativeTime;
- proto$1.pastFuture = pastFuture;
- proto$1.set = set;
- proto$1.eras = localeEras;
- proto$1.erasParse = localeErasParse;
- proto$1.erasConvertYear = localeErasConvertYear;
- proto$1.erasAbbrRegex = erasAbbrRegex;
- proto$1.erasNameRegex = erasNameRegex;
- proto$1.erasNarrowRegex = erasNarrowRegex;
- proto$1.months = localeMonths;
- proto$1.monthsShort = localeMonthsShort;
- proto$1.monthsParse = localeMonthsParse;
- proto$1.monthsRegex = monthsRegex;
- proto$1.monthsShortRegex = monthsShortRegex;
- proto$1.week = localeWeek;
- proto$1.firstDayOfYear = localeFirstDayOfYear;
- proto$1.firstDayOfWeek = localeFirstDayOfWeek;
- proto$1.weekdays = localeWeekdays;
- proto$1.weekdaysMin = localeWeekdaysMin;
- proto$1.weekdaysShort = localeWeekdaysShort;
- proto$1.weekdaysParse = localeWeekdaysParse;
- proto$1.weekdaysRegex = weekdaysRegex;
- proto$1.weekdaysShortRegex = weekdaysShortRegex;
- proto$1.weekdaysMinRegex = weekdaysMinRegex;
- proto$1.isPM = localeIsPM;
- proto$1.meridiem = localeMeridiem;
- function get$1(format, index, field, setter) {
- var locale = getLocale(),
- utc = createUTC().set(setter, index);
- return locale[field](utc, format);
- }
- function listMonthsImpl(format, index, field) {
- if (isNumber(format)) {
- index = format;
- format = undefined;
- }
- format = format || '';
- if (index != null) {
- return get$1(format, index, field, 'month');
- }
- var i,
- out = [];
- for (i = 0; i < 12; i++) {
- out[i] = get$1(format, i, field, 'month');
- }
- return out;
- }
- // ()
- // (5)
- // (fmt, 5)
- // (fmt)
- // (true)
- // (true, 5)
- // (true, fmt, 5)
- // (true, fmt)
- function listWeekdaysImpl(localeSorted, format, index, field) {
- if (typeof localeSorted === 'boolean') {
- if (isNumber(format)) {
- index = format;
- format = undefined;
- }
- format = format || '';
- } else {
- format = localeSorted;
- index = format;
- localeSorted = false;
- if (isNumber(format)) {
- index = format;
- format = undefined;
- }
- format = format || '';
- }
- var locale = getLocale(),
- shift = localeSorted ? locale._week.dow : 0,
- i,
- out = [];
- if (index != null) {
- return get$1(format, (index + shift) % 7, field, 'day');
- }
- for (i = 0; i < 7; i++) {
- out[i] = get$1(format, (i + shift) % 7, field, 'day');
- }
- return out;
- }
- function listMonths(format, index) {
- return listMonthsImpl(format, index, 'months');
- }
- function listMonthsShort(format, index) {
- return listMonthsImpl(format, index, 'monthsShort');
- }
- function listWeekdays(localeSorted, format, index) {
- return listWeekdaysImpl(localeSorted, format, index, 'weekdays');
- }
- function listWeekdaysShort(localeSorted, format, index) {
- return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');
- }
- function listWeekdaysMin(localeSorted, format, index) {
- return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');
- }
- getSetGlobalLocale('en', {
- eras: [
- {
- since: '0001-01-01',
- until: +Infinity,
- offset: 1,
- name: 'Anno Domini',
- narrow: 'AD',
- abbr: 'AD' },
- {
- since: '0000-12-31',
- until: -Infinity,
- offset: 1,
- name: 'Before Christ',
- narrow: 'BC',
- abbr: 'BC' }],
- dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
- ordinal: function ordinal(number) {
- var b = number % 10,
- output =
- toInt(number % 100 / 10) === 1 ?
- 'th' :
- b === 1 ?
- 'st' :
- b === 2 ?
- 'nd' :
- b === 3 ?
- 'rd' :
- 'th';
- return number + output;
- } });
- // Side effect imports
- hooks.lang = deprecate(
- 'moment.lang is deprecated. Use moment.locale instead.',
- getSetGlobalLocale);
- hooks.langData = deprecate(
- 'moment.langData is deprecated. Use moment.localeData instead.',
- getLocale);
- var mathAbs = Math.abs;
- function abs() {
- var data = this._data;
- this._milliseconds = mathAbs(this._milliseconds);
- this._days = mathAbs(this._days);
- this._months = mathAbs(this._months);
- data.milliseconds = mathAbs(data.milliseconds);
- data.seconds = mathAbs(data.seconds);
- data.minutes = mathAbs(data.minutes);
- data.hours = mathAbs(data.hours);
- data.months = mathAbs(data.months);
- data.years = mathAbs(data.years);
- return this;
- }
- function addSubtract$1(duration, input, value, direction) {
- var other = createDuration(input, value);
- duration._milliseconds += direction * other._milliseconds;
- duration._days += direction * other._days;
- duration._months += direction * other._months;
- return duration._bubble();
- }
- // supports only 2.0-style add(1, 's') or add(duration)
- function add$1(input, value) {
- return addSubtract$1(this, input, value, 1);
- }
- // supports only 2.0-style subtract(1, 's') or subtract(duration)
- function subtract$1(input, value) {
- return addSubtract$1(this, input, value, -1);
- }
- function absCeil(number) {
- if (number < 0) {
- return Math.floor(number);
- } else {
- return Math.ceil(number);
- }
- }
- function bubble() {
- var milliseconds = this._milliseconds,
- days = this._days,
- months = this._months,
- data = this._data,
- seconds,
- minutes,
- hours,
- years,
- monthsFromDays;
- // if we have a mix of positive and negative values, bubble down first
- // check: https://github.com/moment/moment/issues/2166
- if (
- !(
- milliseconds >= 0 && days >= 0 && months >= 0 ||
- milliseconds <= 0 && days <= 0 && months <= 0))
- {
- milliseconds += absCeil(monthsToDays(months) + days) * 864e5;
- days = 0;
- months = 0;
- }
- // The following code bubbles up values, see the tests for
- // examples of what that means.
- data.milliseconds = milliseconds % 1000;
- seconds = absFloor(milliseconds / 1000);
- data.seconds = seconds % 60;
- minutes = absFloor(seconds / 60);
- data.minutes = minutes % 60;
- hours = absFloor(minutes / 60);
- data.hours = hours % 24;
- days += absFloor(hours / 24);
- // convert days to months
- monthsFromDays = absFloor(daysToMonths(days));
- months += monthsFromDays;
- days -= absCeil(monthsToDays(monthsFromDays));
- // 12 months -> 1 year
- years = absFloor(months / 12);
- months %= 12;
- data.days = days;
- data.months = months;
- data.years = years;
- return this;
- }
- function daysToMonths(days) {
- // 400 years have 146097 days (taking into account leap year rules)
- // 400 years have 12 months === 4800
- return days * 4800 / 146097;
- }
- function monthsToDays(months) {
- // the reverse of daysToMonths
- return months * 146097 / 4800;
- }
- function as(units) {
- if (!this.isValid()) {
- return NaN;
- }
- var days,
- months,
- milliseconds = this._milliseconds;
- units = normalizeUnits(units);
- if (units === 'month' || units === 'quarter' || units === 'year') {
- days = this._days + milliseconds / 864e5;
- months = this._months + daysToMonths(days);
- switch (units) {
- case 'month':
- return months;
- case 'quarter':
- return months / 3;
- case 'year':
- return months / 12;}
- } else {
- // handle milliseconds separately because of floating point math errors (issue #1867)
- days = this._days + Math.round(monthsToDays(this._months));
- switch (units) {
- case 'week':
- return days / 7 + milliseconds / 6048e5;
- case 'day':
- return days + milliseconds / 864e5;
- case 'hour':
- return days * 24 + milliseconds / 36e5;
- case 'minute':
- return days * 1440 + milliseconds / 6e4;
- case 'second':
- return days * 86400 + milliseconds / 1000;
- // Math.floor prevents floating point math errors here
- case 'millisecond':
- return Math.floor(days * 864e5) + milliseconds;
- default:
- throw new Error('Unknown unit ' + units);}
- }
- }
- // TODO: Use this.as('ms')?
- function valueOf$1() {
- if (!this.isValid()) {
- return NaN;
- }
- return (
- this._milliseconds +
- this._days * 864e5 +
- this._months % 12 * 2592e6 +
- toInt(this._months / 12) * 31536e6);
- }
- function makeAs(alias) {
- return function () {
- return this.as(alias);
- };
- }
- var asMilliseconds = makeAs('ms'),
- asSeconds = makeAs('s'),
- asMinutes = makeAs('m'),
- asHours = makeAs('h'),
- asDays = makeAs('d'),
- asWeeks = makeAs('w'),
- asMonths = makeAs('M'),
- asQuarters = makeAs('Q'),
- asYears = makeAs('y');
- function clone$1() {
- return createDuration(this);
- }
- function get$2(units) {
- units = normalizeUnits(units);
- return this.isValid() ? this[units + 's']() : NaN;
- }
- function makeGetter(name) {
- return function () {
- return this.isValid() ? this._data[name] : NaN;
- };
- }
- var milliseconds = makeGetter('milliseconds'),
- seconds = makeGetter('seconds'),
- minutes = makeGetter('minutes'),
- hours = makeGetter('hours'),
- days = makeGetter('days'),
- months = makeGetter('months'),
- years = makeGetter('years');
- function weeks() {
- return absFloor(this.days() / 7);
- }
- var round = Math.round,
- thresholds = {
- ss: 44, // a few seconds to seconds
- s: 45, // seconds to minute
- m: 45, // minutes to hour
- h: 22, // hours to day
- d: 26, // days to month/week
- w: null, // weeks to month
- M: 11 // months to year
- };
- // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize
- function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {
- return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);
- }
- function relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {
- var duration = createDuration(posNegDuration).abs(),
- seconds = round(duration.as('s')),
- minutes = round(duration.as('m')),
- hours = round(duration.as('h')),
- days = round(duration.as('d')),
- months = round(duration.as('M')),
- weeks = round(duration.as('w')),
- years = round(duration.as('y')),
- a =
- seconds <= thresholds.ss && ['s', seconds] ||
- seconds < thresholds.s && ['ss', seconds] ||
- minutes <= 1 && ['m'] ||
- minutes < thresholds.m && ['mm', minutes] ||
- hours <= 1 && ['h'] ||
- hours < thresholds.h && ['hh', hours] ||
- days <= 1 && ['d'] ||
- days < thresholds.d && ['dd', days];
- if (thresholds.w != null) {
- a =
- a ||
- weeks <= 1 && ['w'] ||
- weeks < thresholds.w && ['ww', weeks];
- }
- a = a ||
- months <= 1 && ['M'] ||
- months < thresholds.M && ['MM', months] ||
- years <= 1 && ['y'] || ['yy', years];
- a[2] = withoutSuffix;
- a[3] = +posNegDuration > 0;
- a[4] = locale;
- return substituteTimeAgo.apply(null, a);
- }
- // This function allows you to set the rounding function for relative time strings
- function getSetRelativeTimeRounding(roundingFunction) {
- if (roundingFunction === undefined) {
- return round;
- }
- if (typeof roundingFunction === 'function') {
- round = roundingFunction;
- return true;
- }
- return false;
- }
- // This function allows you to set a threshold for relative time strings
- function getSetRelativeTimeThreshold(threshold, limit) {
- if (thresholds[threshold] === undefined) {
- return false;
- }
- if (limit === undefined) {
- return thresholds[threshold];
- }
- thresholds[threshold] = limit;
- if (threshold === 's') {
- thresholds.ss = limit - 1;
- }
- return true;
- }
- function humanize(argWithSuffix, argThresholds) {
- if (!this.isValid()) {
- return this.localeData().invalidDate();
- }
- var withSuffix = false,
- th = thresholds,
- locale,
- output;
- if (typeof argWithSuffix === 'object') {
- argThresholds = argWithSuffix;
- argWithSuffix = false;
- }
- if (typeof argWithSuffix === 'boolean') {
- withSuffix = argWithSuffix;
- }
- if (typeof argThresholds === 'object') {
- th = Object.assign({}, thresholds, argThresholds);
- if (argThresholds.s != null && argThresholds.ss == null) {
- th.ss = argThresholds.s - 1;
- }
- }
- locale = this.localeData();
- output = relativeTime$1(this, !withSuffix, th, locale);
- if (withSuffix) {
- output = locale.pastFuture(+this, output);
- }
- return locale.postformat(output);
- }
- var abs$1 = Math.abs;
- function sign(x) {
- return (x > 0) - (x < 0) || +x;
- }
- function toISOString$1() {
- // for ISO strings we do not use the normal bubbling rules:
- // * milliseconds bubble up until they become hours
- // * days do not bubble at all
- // * months bubble up until they become years
- // This is because there is no context-free conversion between hours and days
- // (think of clock changes)
- // and also not between days and months (28-31 days per month)
- if (!this.isValid()) {
- return this.localeData().invalidDate();
- }
- var seconds = abs$1(this._milliseconds) / 1000,
- days = abs$1(this._days),
- months = abs$1(this._months),
- minutes,
- hours,
- years,
- s,
- total = this.asSeconds(),
- totalSign,
- ymSign,
- daysSign,
- hmsSign;
- if (!total) {
- // this is the same as C#'s (Noda) and python (isodate)...
- // but not other JS (goog.date)
- return 'P0D';
- }
- // 3600 seconds -> 60 minutes -> 1 hour
- minutes = absFloor(seconds / 60);
- hours = absFloor(minutes / 60);
- seconds %= 60;
- minutes %= 60;
- // 12 months -> 1 year
- years = absFloor(months / 12);
- months %= 12;
- // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js
- s = seconds ? seconds.toFixed(3).replace(/\.?0+$/, '') : '';
- totalSign = total < 0 ? '-' : '';
- ymSign = sign(this._months) !== sign(total) ? '-' : '';
- daysSign = sign(this._days) !== sign(total) ? '-' : '';
- hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';
- return (
- totalSign +
- 'P' + (
- years ? ymSign + years + 'Y' : '') + (
- months ? ymSign + months + 'M' : '') + (
- days ? daysSign + days + 'D' : '') + (
- hours || minutes || seconds ? 'T' : '') + (
- hours ? hmsSign + hours + 'H' : '') + (
- minutes ? hmsSign + minutes + 'M' : '') + (
- seconds ? hmsSign + s + 'S' : ''));
- }
- var proto$2 = Duration.prototype;
- proto$2.isValid = isValid$1;
- proto$2.abs = abs;
- proto$2.add = add$1;
- proto$2.subtract = subtract$1;
- proto$2.as = as;
- proto$2.asMilliseconds = asMilliseconds;
- proto$2.asSeconds = asSeconds;
- proto$2.asMinutes = asMinutes;
- proto$2.asHours = asHours;
- proto$2.asDays = asDays;
- proto$2.asWeeks = asWeeks;
- proto$2.asMonths = asMonths;
- proto$2.asQuarters = asQuarters;
- proto$2.asYears = asYears;
- proto$2.valueOf = valueOf$1;
- proto$2._bubble = bubble;
- proto$2.clone = clone$1;
- proto$2.get = get$2;
- proto$2.milliseconds = milliseconds;
- proto$2.seconds = seconds;
- proto$2.minutes = minutes;
- proto$2.hours = hours;
- proto$2.days = days;
- proto$2.weeks = weeks;
- proto$2.months = months;
- proto$2.years = years;
- proto$2.humanize = humanize;
- proto$2.toISOString = toISOString$1;
- proto$2.toString = toISOString$1;
- proto$2.toJSON = toISOString$1;
- proto$2.locale = locale;
- proto$2.localeData = localeData;
- proto$2.toIsoString = deprecate(
- 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',
- toISOString$1);
- proto$2.lang = lang;
- // FORMATTING
- addFormatToken('X', 0, 0, 'unix');
- addFormatToken('x', 0, 0, 'valueOf');
- // PARSING
- addRegexToken('x', matchSigned);
- addRegexToken('X', matchTimestamp);
- addParseToken('X', function (input, array, config) {
- config._d = new Date(parseFloat(input) * 1000);
- });
- addParseToken('x', function (input, array, config) {
- config._d = new Date(toInt(input));
- });
- //! moment.js
- hooks.version = '2.29.4';
- setHookCallback(createLocal);
- hooks.fn = proto;
- hooks.min = min;
- hooks.max = max;
- hooks.now = now;
- hooks.utc = createUTC;
- hooks.unix = createUnix;
- hooks.months = listMonths;
- hooks.isDate = isDate;
- hooks.locale = getSetGlobalLocale;
- hooks.invalid = createInvalid;
- hooks.duration = createDuration;
- hooks.isMoment = isMoment;
- hooks.weekdays = listWeekdays;
- hooks.parseZone = createInZone;
- hooks.localeData = getLocale;
- hooks.isDuration = isDuration;
- hooks.monthsShort = listMonthsShort;
- hooks.weekdaysMin = listWeekdaysMin;
- hooks.defineLocale = defineLocale;
- hooks.updateLocale = updateLocale;
- hooks.locales = listLocales;
- hooks.weekdaysShort = listWeekdaysShort;
- hooks.normalizeUnits = normalizeUnits;
- hooks.relativeTimeRounding = getSetRelativeTimeRounding;
- hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;
- hooks.calendarFormat = getCalendarFormat;
- hooks.prototype = proto;
- // currently HTML5 input type only supports 24-hour formats
- hooks.HTML5_FMT = {
- DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // <input type="datetime-local" />
- DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // <input type="datetime-local" step="1" />
- DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // <input type="datetime-local" step="0.001" />
- DATE: 'YYYY-MM-DD', // <input type="date" />
- TIME: 'HH:mm', // <input type="time" />
- TIME_SECONDS: 'HH:mm:ss', // <input type="time" step="1" />
- TIME_MS: 'HH:mm:ss.SSS', // <input type="time" step="0.001" />
- WEEK: 'GGGG-[W]WW', // <input type="week" />
- MONTH: 'YYYY-MM' // <input type="month" />
- };
- return hooks;
- });
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../HBuilderX/plugins/uniapp-cli/node_modules/webpack/buildin/module.js */ 14)(module)))
- /***/ }),
- /* 14 */
- /*!***********************************!*\
- !*** (webpack)/buildin/module.js ***!
- \***********************************/
- /*! no static exports found */
- /***/ (function(module, exports) {
- module.exports = function(module) {
- if (!module.webpackPolyfill) {
- module.deprecate = function() {};
- module.paths = [];
- // module.parent = undefined by default
- if (!module.children) module.children = [];
- Object.defineProperty(module, "loaded", {
- enumerable: true,
- get: function() {
- return module.l;
- }
- });
- Object.defineProperty(module, "id", {
- enumerable: true,
- get: function() {
- return module.i;
- }
- });
- module.webpackPolyfill = 1;
- }
- return module;
- };
- /***/ }),
- /* 15 */
- /*!***********************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale sync ^\.\/.*$ ***!
- \***********************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- var map = {
- "./af": 16,
- "./af.js": 16,
- "./ar": 17,
- "./ar-dz": 18,
- "./ar-dz.js": 18,
- "./ar-kw": 19,
- "./ar-kw.js": 19,
- "./ar-ly": 20,
- "./ar-ly.js": 20,
- "./ar-ma": 21,
- "./ar-ma.js": 21,
- "./ar-sa": 22,
- "./ar-sa.js": 22,
- "./ar-tn": 23,
- "./ar-tn.js": 23,
- "./ar.js": 17,
- "./az": 24,
- "./az.js": 24,
- "./be": 25,
- "./be.js": 25,
- "./bg": 26,
- "./bg.js": 26,
- "./bm": 27,
- "./bm.js": 27,
- "./bn": 28,
- "./bn-bd": 29,
- "./bn-bd.js": 29,
- "./bn.js": 28,
- "./bo": 30,
- "./bo.js": 30,
- "./br": 31,
- "./br.js": 31,
- "./bs": 32,
- "./bs.js": 32,
- "./ca": 33,
- "./ca.js": 33,
- "./cs": 34,
- "./cs.js": 34,
- "./cv": 35,
- "./cv.js": 35,
- "./cy": 36,
- "./cy.js": 36,
- "./da": 37,
- "./da.js": 37,
- "./de": 38,
- "./de-at": 39,
- "./de-at.js": 39,
- "./de-ch": 40,
- "./de-ch.js": 40,
- "./de.js": 38,
- "./dv": 41,
- "./dv.js": 41,
- "./el": 42,
- "./el.js": 42,
- "./en-au": 43,
- "./en-au.js": 43,
- "./en-ca": 44,
- "./en-ca.js": 44,
- "./en-gb": 45,
- "./en-gb.js": 45,
- "./en-ie": 46,
- "./en-ie.js": 46,
- "./en-il": 47,
- "./en-il.js": 47,
- "./en-in": 48,
- "./en-in.js": 48,
- "./en-nz": 49,
- "./en-nz.js": 49,
- "./en-sg": 50,
- "./en-sg.js": 50,
- "./eo": 51,
- "./eo.js": 51,
- "./es": 52,
- "./es-do": 53,
- "./es-do.js": 53,
- "./es-mx": 54,
- "./es-mx.js": 54,
- "./es-us": 55,
- "./es-us.js": 55,
- "./es.js": 52,
- "./et": 56,
- "./et.js": 56,
- "./eu": 57,
- "./eu.js": 57,
- "./fa": 58,
- "./fa.js": 58,
- "./fi": 59,
- "./fi.js": 59,
- "./fil": 60,
- "./fil.js": 60,
- "./fo": 61,
- "./fo.js": 61,
- "./fr": 62,
- "./fr-ca": 63,
- "./fr-ca.js": 63,
- "./fr-ch": 64,
- "./fr-ch.js": 64,
- "./fr.js": 62,
- "./fy": 65,
- "./fy.js": 65,
- "./ga": 66,
- "./ga.js": 66,
- "./gd": 67,
- "./gd.js": 67,
- "./gl": 68,
- "./gl.js": 68,
- "./gom-deva": 69,
- "./gom-deva.js": 69,
- "./gom-latn": 70,
- "./gom-latn.js": 70,
- "./gu": 71,
- "./gu.js": 71,
- "./he": 72,
- "./he.js": 72,
- "./hi": 73,
- "./hi.js": 73,
- "./hr": 74,
- "./hr.js": 74,
- "./hu": 75,
- "./hu.js": 75,
- "./hy-am": 76,
- "./hy-am.js": 76,
- "./id": 77,
- "./id.js": 77,
- "./is": 78,
- "./is.js": 78,
- "./it": 79,
- "./it-ch": 80,
- "./it-ch.js": 80,
- "./it.js": 79,
- "./ja": 81,
- "./ja.js": 81,
- "./jv": 82,
- "./jv.js": 82,
- "./ka": 83,
- "./ka.js": 83,
- "./kk": 84,
- "./kk.js": 84,
- "./km": 85,
- "./km.js": 85,
- "./kn": 86,
- "./kn.js": 86,
- "./ko": 87,
- "./ko.js": 87,
- "./ku": 88,
- "./ku.js": 88,
- "./ky": 89,
- "./ky.js": 89,
- "./lb": 90,
- "./lb.js": 90,
- "./lo": 91,
- "./lo.js": 91,
- "./lt": 92,
- "./lt.js": 92,
- "./lv": 93,
- "./lv.js": 93,
- "./me": 94,
- "./me.js": 94,
- "./mi": 95,
- "./mi.js": 95,
- "./mk": 96,
- "./mk.js": 96,
- "./ml": 97,
- "./ml.js": 97,
- "./mn": 98,
- "./mn.js": 98,
- "./mr": 99,
- "./mr.js": 99,
- "./ms": 100,
- "./ms-my": 101,
- "./ms-my.js": 101,
- "./ms.js": 100,
- "./mt": 102,
- "./mt.js": 102,
- "./my": 103,
- "./my.js": 103,
- "./nb": 104,
- "./nb.js": 104,
- "./ne": 105,
- "./ne.js": 105,
- "./nl": 106,
- "./nl-be": 107,
- "./nl-be.js": 107,
- "./nl.js": 106,
- "./nn": 108,
- "./nn.js": 108,
- "./oc-lnc": 109,
- "./oc-lnc.js": 109,
- "./pa-in": 110,
- "./pa-in.js": 110,
- "./pl": 111,
- "./pl.js": 111,
- "./pt": 112,
- "./pt-br": 113,
- "./pt-br.js": 113,
- "./pt.js": 112,
- "./ro": 114,
- "./ro.js": 114,
- "./ru": 115,
- "./ru.js": 115,
- "./sd": 116,
- "./sd.js": 116,
- "./se": 117,
- "./se.js": 117,
- "./si": 118,
- "./si.js": 118,
- "./sk": 119,
- "./sk.js": 119,
- "./sl": 120,
- "./sl.js": 120,
- "./sq": 121,
- "./sq.js": 121,
- "./sr": 122,
- "./sr-cyrl": 123,
- "./sr-cyrl.js": 123,
- "./sr.js": 122,
- "./ss": 124,
- "./ss.js": 124,
- "./sv": 125,
- "./sv.js": 125,
- "./sw": 126,
- "./sw.js": 126,
- "./ta": 127,
- "./ta.js": 127,
- "./te": 128,
- "./te.js": 128,
- "./tet": 129,
- "./tet.js": 129,
- "./tg": 130,
- "./tg.js": 130,
- "./th": 131,
- "./th.js": 131,
- "./tk": 132,
- "./tk.js": 132,
- "./tl-ph": 133,
- "./tl-ph.js": 133,
- "./tlh": 134,
- "./tlh.js": 134,
- "./tr": 135,
- "./tr.js": 135,
- "./tzl": 136,
- "./tzl.js": 136,
- "./tzm": 137,
- "./tzm-latn": 138,
- "./tzm-latn.js": 138,
- "./tzm.js": 137,
- "./ug-cn": 139,
- "./ug-cn.js": 139,
- "./uk": 140,
- "./uk.js": 140,
- "./ur": 141,
- "./ur.js": 141,
- "./uz": 142,
- "./uz-latn": 143,
- "./uz-latn.js": 143,
- "./uz.js": 142,
- "./vi": 144,
- "./vi.js": 144,
- "./x-pseudo": 145,
- "./x-pseudo.js": 145,
- "./yo": 146,
- "./yo.js": 146,
- "./zh-cn": 147,
- "./zh-cn.js": 147,
- "./zh-hk": 148,
- "./zh-hk.js": 148,
- "./zh-mo": 149,
- "./zh-mo.js": 149,
- "./zh-tw": 150,
- "./zh-tw.js": 150
- };
- function webpackContext(req) {
- var id = webpackContextResolve(req);
- return __webpack_require__(id);
- }
- function webpackContextResolve(req) {
- if(!__webpack_require__.o(map, req)) {
- var e = new Error("Cannot find module '" + req + "'");
- e.code = 'MODULE_NOT_FOUND';
- throw e;
- }
- return map[req];
- }
- webpackContext.keys = function webpackContextKeys() {
- return Object.keys(map);
- };
- webpackContext.resolve = webpackContextResolve;
- module.exports = webpackContext;
- webpackContext.id = 15;
- /***/ }),
- /* 16 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/af.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Afrikaans [af]
- //! author : Werner Mollentze : https://github.com/wernerm
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var af = moment.defineLocale('af', {
- months: 'Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember'.split(
- '_'),
- monthsShort: 'Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des'.split('_'),
- weekdays: 'Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag'.split(
- '_'),
- weekdaysShort: 'Son_Maa_Din_Woe_Don_Vry_Sat'.split('_'),
- weekdaysMin: 'So_Ma_Di_Wo_Do_Vr_Sa'.split('_'),
- meridiemParse: /vm|nm/i,
- isPM: function isPM(input) {
- return /^nm$/i.test(input);
- },
- meridiem: function meridiem(hours, minutes, isLower) {
- if (hours < 12) {
- return isLower ? 'vm' : 'VM';
- } else {
- return isLower ? 'nm' : 'NM';
- }
- },
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd, D MMMM YYYY HH:mm' },
- calendar: {
- sameDay: '[Vandag om] LT',
- nextDay: '[Môre om] LT',
- nextWeek: 'dddd [om] LT',
- lastDay: '[Gister om] LT',
- lastWeek: '[Laas] dddd [om] LT',
- sameElse: 'L' },
- relativeTime: {
- future: 'oor %s',
- past: '%s gelede',
- s: "'n paar sekondes",
- ss: '%d sekondes',
- m: "'n minuut",
- mm: '%d minute',
- h: "'n uur",
- hh: '%d ure',
- d: "'n dag",
- dd: '%d dae',
- M: "'n maand",
- MM: '%d maande',
- y: "'n jaar",
- yy: '%d jaar' },
- dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
- ordinal: function ordinal(number) {
- return (
- number + (
- number === 1 || number === 8 || number >= 20 ? 'ste' : 'de'));
- // Thanks to Joris Röling : https://github.com/jjupiter
- },
- week: {
- dow: 1, // Maandag is die eerste dag van die week.
- doy: 4 // Die week wat die 4de Januarie bevat is die eerste week van die jaar.
- } });
- return af;
- });
- /***/ }),
- /* 17 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/ar.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Arabic [ar]
- //! author : Abdel Said: https://github.com/abdelsaid
- //! author : Ahmed Elkhatib
- //! author : forabi https://github.com/forabi
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var symbolMap = {
- 1: '١',
- 2: '٢',
- 3: '٣',
- 4: '٤',
- 5: '٥',
- 6: '٦',
- 7: '٧',
- 8: '٨',
- 9: '٩',
- 0: '٠' },
- numberMap = {
- '١': '1',
- '٢': '2',
- '٣': '3',
- '٤': '4',
- '٥': '5',
- '٦': '6',
- '٧': '7',
- '٨': '8',
- '٩': '9',
- '٠': '0' },
- pluralForm = function pluralForm(n) {
- return n === 0 ?
- 0 :
- n === 1 ?
- 1 :
- n === 2 ?
- 2 :
- n % 100 >= 3 && n % 100 <= 10 ?
- 3 :
- n % 100 >= 11 ?
- 4 :
- 5;
- },
- plurals = {
- s: [
- 'أقل من ثانية',
- 'ثانية واحدة',
- ['ثانيتان', 'ثانيتين'],
- '%d ثوان',
- '%d ثانية',
- '%d ثانية'],
- m: [
- 'أقل من دقيقة',
- 'دقيقة واحدة',
- ['دقيقتان', 'دقيقتين'],
- '%d دقائق',
- '%d دقيقة',
- '%d دقيقة'],
- h: [
- 'أقل من ساعة',
- 'ساعة واحدة',
- ['ساعتان', 'ساعتين'],
- '%d ساعات',
- '%d ساعة',
- '%d ساعة'],
- d: [
- 'أقل من يوم',
- 'يوم واحد',
- ['يومان', 'يومين'],
- '%d أيام',
- '%d يومًا',
- '%d يوم'],
- M: [
- 'أقل من شهر',
- 'شهر واحد',
- ['شهران', 'شهرين'],
- '%d أشهر',
- '%d شهرا',
- '%d شهر'],
- y: [
- 'أقل من عام',
- 'عام واحد',
- ['عامان', 'عامين'],
- '%d أعوام',
- '%d عامًا',
- '%d عام'] },
- pluralize = function pluralize(u) {
- return function (number, withoutSuffix, string, isFuture) {
- var f = pluralForm(number),
- str = plurals[u][pluralForm(number)];
- if (f === 2) {
- str = str[withoutSuffix ? 0 : 1];
- }
- return str.replace(/%d/i, number);
- };
- },
- months = [
- 'يناير',
- 'فبراير',
- 'مارس',
- 'أبريل',
- 'مايو',
- 'يونيو',
- 'يوليو',
- 'أغسطس',
- 'سبتمبر',
- 'أكتوبر',
- 'نوفمبر',
- 'ديسمبر'];
- var ar = moment.defineLocale('ar', {
- months: months,
- monthsShort: months,
- weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
- weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
- weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: "D/\u200FM/\u200FYYYY",
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd D MMMM YYYY HH:mm' },
- meridiemParse: /ص|م/,
- isPM: function isPM(input) {
- return 'م' === input;
- },
- meridiem: function meridiem(hour, minute, isLower) {
- if (hour < 12) {
- return 'ص';
- } else {
- return 'م';
- }
- },
- calendar: {
- sameDay: '[اليوم عند الساعة] LT',
- nextDay: '[غدًا عند الساعة] LT',
- nextWeek: 'dddd [عند الساعة] LT',
- lastDay: '[أمس عند الساعة] LT',
- lastWeek: 'dddd [عند الساعة] LT',
- sameElse: 'L' },
- relativeTime: {
- future: 'بعد %s',
- past: 'منذ %s',
- s: pluralize('s'),
- ss: pluralize('s'),
- m: pluralize('m'),
- mm: pluralize('m'),
- h: pluralize('h'),
- hh: pluralize('h'),
- d: pluralize('d'),
- dd: pluralize('d'),
- M: pluralize('M'),
- MM: pluralize('M'),
- y: pluralize('y'),
- yy: pluralize('y') },
- preparse: function preparse(string) {
- return string.
- replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {
- return numberMap[match];
- }).
- replace(/،/g, ',');
- },
- postformat: function postformat(string) {
- return string.
- replace(/\d/g, function (match) {
- return symbolMap[match];
- }).
- replace(/,/g, '،');
- },
- week: {
- dow: 6, // Saturday is the first day of the week.
- doy: 12 // The week that contains Jan 12th is the first week of the year.
- } });
- return ar;
- });
- /***/ }),
- /* 18 */
- /*!******************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/ar-dz.js ***!
- \******************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Arabic (Algeria) [ar-dz]
- //! author : Amine Roukh: https://github.com/Amine27
- //! author : Abdel Said: https://github.com/abdelsaid
- //! author : Ahmed Elkhatib
- //! author : forabi https://github.com/forabi
- //! author : Noureddine LOUAHEDJ : https://github.com/noureddinem
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var pluralForm = function pluralForm(n) {
- return n === 0 ?
- 0 :
- n === 1 ?
- 1 :
- n === 2 ?
- 2 :
- n % 100 >= 3 && n % 100 <= 10 ?
- 3 :
- n % 100 >= 11 ?
- 4 :
- 5;
- },
- plurals = {
- s: [
- 'أقل من ثانية',
- 'ثانية واحدة',
- ['ثانيتان', 'ثانيتين'],
- '%d ثوان',
- '%d ثانية',
- '%d ثانية'],
- m: [
- 'أقل من دقيقة',
- 'دقيقة واحدة',
- ['دقيقتان', 'دقيقتين'],
- '%d دقائق',
- '%d دقيقة',
- '%d دقيقة'],
- h: [
- 'أقل من ساعة',
- 'ساعة واحدة',
- ['ساعتان', 'ساعتين'],
- '%d ساعات',
- '%d ساعة',
- '%d ساعة'],
- d: [
- 'أقل من يوم',
- 'يوم واحد',
- ['يومان', 'يومين'],
- '%d أيام',
- '%d يومًا',
- '%d يوم'],
- M: [
- 'أقل من شهر',
- 'شهر واحد',
- ['شهران', 'شهرين'],
- '%d أشهر',
- '%d شهرا',
- '%d شهر'],
- y: [
- 'أقل من عام',
- 'عام واحد',
- ['عامان', 'عامين'],
- '%d أعوام',
- '%d عامًا',
- '%d عام'] },
- pluralize = function pluralize(u) {
- return function (number, withoutSuffix, string, isFuture) {
- var f = pluralForm(number),
- str = plurals[u][pluralForm(number)];
- if (f === 2) {
- str = str[withoutSuffix ? 0 : 1];
- }
- return str.replace(/%d/i, number);
- };
- },
- months = [
- 'جانفي',
- 'فيفري',
- 'مارس',
- 'أفريل',
- 'ماي',
- 'جوان',
- 'جويلية',
- 'أوت',
- 'سبتمبر',
- 'أكتوبر',
- 'نوفمبر',
- 'ديسمبر'];
- var arDz = moment.defineLocale('ar-dz', {
- months: months,
- monthsShort: months,
- weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
- weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
- weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: "D/\u200FM/\u200FYYYY",
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd D MMMM YYYY HH:mm' },
- meridiemParse: /ص|م/,
- isPM: function isPM(input) {
- return 'م' === input;
- },
- meridiem: function meridiem(hour, minute, isLower) {
- if (hour < 12) {
- return 'ص';
- } else {
- return 'م';
- }
- },
- calendar: {
- sameDay: '[اليوم عند الساعة] LT',
- nextDay: '[غدًا عند الساعة] LT',
- nextWeek: 'dddd [عند الساعة] LT',
- lastDay: '[أمس عند الساعة] LT',
- lastWeek: 'dddd [عند الساعة] LT',
- sameElse: 'L' },
- relativeTime: {
- future: 'بعد %s',
- past: 'منذ %s',
- s: pluralize('s'),
- ss: pluralize('s'),
- m: pluralize('m'),
- mm: pluralize('m'),
- h: pluralize('h'),
- hh: pluralize('h'),
- d: pluralize('d'),
- dd: pluralize('d'),
- M: pluralize('M'),
- MM: pluralize('M'),
- y: pluralize('y'),
- yy: pluralize('y') },
- postformat: function postformat(string) {
- return string.replace(/,/g, '،');
- },
- week: {
- dow: 0, // Sunday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- } });
- return arDz;
- });
- /***/ }),
- /* 19 */
- /*!******************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/ar-kw.js ***!
- \******************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Arabic (Kuwait) [ar-kw]
- //! author : Nusret Parlak: https://github.com/nusretparlak
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var arKw = moment.defineLocale('ar-kw', {
- months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(
- '_'),
- monthsShort:
- 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(
- '_'),
- weekdays: 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
- weekdaysShort: 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),
- weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd D MMMM YYYY HH:mm' },
- calendar: {
- sameDay: '[اليوم على الساعة] LT',
- nextDay: '[غدا على الساعة] LT',
- nextWeek: 'dddd [على الساعة] LT',
- lastDay: '[أمس على الساعة] LT',
- lastWeek: 'dddd [على الساعة] LT',
- sameElse: 'L' },
- relativeTime: {
- future: 'في %s',
- past: 'منذ %s',
- s: 'ثوان',
- ss: '%d ثانية',
- m: 'دقيقة',
- mm: '%d دقائق',
- h: 'ساعة',
- hh: '%d ساعات',
- d: 'يوم',
- dd: '%d أيام',
- M: 'شهر',
- MM: '%d أشهر',
- y: 'سنة',
- yy: '%d سنوات' },
- week: {
- dow: 0, // Sunday is the first day of the week.
- doy: 12 // The week that contains Jan 12th is the first week of the year.
- } });
- return arKw;
- });
- /***/ }),
- /* 20 */
- /*!******************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/ar-ly.js ***!
- \******************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Arabic (Libya) [ar-ly]
- //! author : Ali Hmer: https://github.com/kikoanis
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var symbolMap = {
- 1: '1',
- 2: '2',
- 3: '3',
- 4: '4',
- 5: '5',
- 6: '6',
- 7: '7',
- 8: '8',
- 9: '9',
- 0: '0' },
- pluralForm = function pluralForm(n) {
- return n === 0 ?
- 0 :
- n === 1 ?
- 1 :
- n === 2 ?
- 2 :
- n % 100 >= 3 && n % 100 <= 10 ?
- 3 :
- n % 100 >= 11 ?
- 4 :
- 5;
- },
- plurals = {
- s: [
- 'أقل من ثانية',
- 'ثانية واحدة',
- ['ثانيتان', 'ثانيتين'],
- '%d ثوان',
- '%d ثانية',
- '%d ثانية'],
- m: [
- 'أقل من دقيقة',
- 'دقيقة واحدة',
- ['دقيقتان', 'دقيقتين'],
- '%d دقائق',
- '%d دقيقة',
- '%d دقيقة'],
- h: [
- 'أقل من ساعة',
- 'ساعة واحدة',
- ['ساعتان', 'ساعتين'],
- '%d ساعات',
- '%d ساعة',
- '%d ساعة'],
- d: [
- 'أقل من يوم',
- 'يوم واحد',
- ['يومان', 'يومين'],
- '%d أيام',
- '%d يومًا',
- '%d يوم'],
- M: [
- 'أقل من شهر',
- 'شهر واحد',
- ['شهران', 'شهرين'],
- '%d أشهر',
- '%d شهرا',
- '%d شهر'],
- y: [
- 'أقل من عام',
- 'عام واحد',
- ['عامان', 'عامين'],
- '%d أعوام',
- '%d عامًا',
- '%d عام'] },
- pluralize = function pluralize(u) {
- return function (number, withoutSuffix, string, isFuture) {
- var f = pluralForm(number),
- str = plurals[u][pluralForm(number)];
- if (f === 2) {
- str = str[withoutSuffix ? 0 : 1];
- }
- return str.replace(/%d/i, number);
- };
- },
- months = [
- 'يناير',
- 'فبراير',
- 'مارس',
- 'أبريل',
- 'مايو',
- 'يونيو',
- 'يوليو',
- 'أغسطس',
- 'سبتمبر',
- 'أكتوبر',
- 'نوفمبر',
- 'ديسمبر'];
- var arLy = moment.defineLocale('ar-ly', {
- months: months,
- monthsShort: months,
- weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
- weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
- weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: "D/\u200FM/\u200FYYYY",
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd D MMMM YYYY HH:mm' },
- meridiemParse: /ص|م/,
- isPM: function isPM(input) {
- return 'م' === input;
- },
- meridiem: function meridiem(hour, minute, isLower) {
- if (hour < 12) {
- return 'ص';
- } else {
- return 'م';
- }
- },
- calendar: {
- sameDay: '[اليوم عند الساعة] LT',
- nextDay: '[غدًا عند الساعة] LT',
- nextWeek: 'dddd [عند الساعة] LT',
- lastDay: '[أمس عند الساعة] LT',
- lastWeek: 'dddd [عند الساعة] LT',
- sameElse: 'L' },
- relativeTime: {
- future: 'بعد %s',
- past: 'منذ %s',
- s: pluralize('s'),
- ss: pluralize('s'),
- m: pluralize('m'),
- mm: pluralize('m'),
- h: pluralize('h'),
- hh: pluralize('h'),
- d: pluralize('d'),
- dd: pluralize('d'),
- M: pluralize('M'),
- MM: pluralize('M'),
- y: pluralize('y'),
- yy: pluralize('y') },
- preparse: function preparse(string) {
- return string.replace(/،/g, ',');
- },
- postformat: function postformat(string) {
- return string.
- replace(/\d/g, function (match) {
- return symbolMap[match];
- }).
- replace(/,/g, '،');
- },
- week: {
- dow: 6, // Saturday is the first day of the week.
- doy: 12 // The week that contains Jan 12th is the first week of the year.
- } });
- return arLy;
- });
- /***/ }),
- /* 21 */
- /*!******************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/ar-ma.js ***!
- \******************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Arabic (Morocco) [ar-ma]
- //! author : ElFadili Yassine : https://github.com/ElFadiliY
- //! author : Abdel Said : https://github.com/abdelsaid
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var arMa = moment.defineLocale('ar-ma', {
- months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(
- '_'),
- monthsShort:
- 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(
- '_'),
- weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
- weekdaysShort: 'احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),
- weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd D MMMM YYYY HH:mm' },
- calendar: {
- sameDay: '[اليوم على الساعة] LT',
- nextDay: '[غدا على الساعة] LT',
- nextWeek: 'dddd [على الساعة] LT',
- lastDay: '[أمس على الساعة] LT',
- lastWeek: 'dddd [على الساعة] LT',
- sameElse: 'L' },
- relativeTime: {
- future: 'في %s',
- past: 'منذ %s',
- s: 'ثوان',
- ss: '%d ثانية',
- m: 'دقيقة',
- mm: '%d دقائق',
- h: 'ساعة',
- hh: '%d ساعات',
- d: 'يوم',
- dd: '%d أيام',
- M: 'شهر',
- MM: '%d أشهر',
- y: 'سنة',
- yy: '%d سنوات' },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- } });
- return arMa;
- });
- /***/ }),
- /* 22 */
- /*!******************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/ar-sa.js ***!
- \******************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Arabic (Saudi Arabia) [ar-sa]
- //! author : Suhail Alkowaileet : https://github.com/xsoh
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var symbolMap = {
- 1: '١',
- 2: '٢',
- 3: '٣',
- 4: '٤',
- 5: '٥',
- 6: '٦',
- 7: '٧',
- 8: '٨',
- 9: '٩',
- 0: '٠' },
- numberMap = {
- '١': '1',
- '٢': '2',
- '٣': '3',
- '٤': '4',
- '٥': '5',
- '٦': '6',
- '٧': '7',
- '٨': '8',
- '٩': '9',
- '٠': '0' };
- var arSa = moment.defineLocale('ar-sa', {
- months: 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
- '_'),
- monthsShort:
- 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
- '_'),
- weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
- weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
- weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd D MMMM YYYY HH:mm' },
- meridiemParse: /ص|م/,
- isPM: function isPM(input) {
- return 'م' === input;
- },
- meridiem: function meridiem(hour, minute, isLower) {
- if (hour < 12) {
- return 'ص';
- } else {
- return 'م';
- }
- },
- calendar: {
- sameDay: '[اليوم على الساعة] LT',
- nextDay: '[غدا على الساعة] LT',
- nextWeek: 'dddd [على الساعة] LT',
- lastDay: '[أمس على الساعة] LT',
- lastWeek: 'dddd [على الساعة] LT',
- sameElse: 'L' },
- relativeTime: {
- future: 'في %s',
- past: 'منذ %s',
- s: 'ثوان',
- ss: '%d ثانية',
- m: 'دقيقة',
- mm: '%d دقائق',
- h: 'ساعة',
- hh: '%d ساعات',
- d: 'يوم',
- dd: '%d أيام',
- M: 'شهر',
- MM: '%d أشهر',
- y: 'سنة',
- yy: '%d سنوات' },
- preparse: function preparse(string) {
- return string.
- replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {
- return numberMap[match];
- }).
- replace(/،/g, ',');
- },
- postformat: function postformat(string) {
- return string.
- replace(/\d/g, function (match) {
- return symbolMap[match];
- }).
- replace(/,/g, '،');
- },
- week: {
- dow: 0, // Sunday is the first day of the week.
- doy: 6 // The week that contains Jan 6th is the first week of the year.
- } });
- return arSa;
- });
- /***/ }),
- /* 23 */
- /*!******************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/ar-tn.js ***!
- \******************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Arabic (Tunisia) [ar-tn]
- //! author : Nader Toukabri : https://github.com/naderio
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var arTn = moment.defineLocale('ar-tn', {
- months: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
- '_'),
- monthsShort:
- 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
- '_'),
- weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
- weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
- weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd D MMMM YYYY HH:mm' },
- calendar: {
- sameDay: '[اليوم على الساعة] LT',
- nextDay: '[غدا على الساعة] LT',
- nextWeek: 'dddd [على الساعة] LT',
- lastDay: '[أمس على الساعة] LT',
- lastWeek: 'dddd [على الساعة] LT',
- sameElse: 'L' },
- relativeTime: {
- future: 'في %s',
- past: 'منذ %s',
- s: 'ثوان',
- ss: '%d ثانية',
- m: 'دقيقة',
- mm: '%d دقائق',
- h: 'ساعة',
- hh: '%d ساعات',
- d: 'يوم',
- dd: '%d أيام',
- M: 'شهر',
- MM: '%d أشهر',
- y: 'سنة',
- yy: '%d سنوات' },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- } });
- return arTn;
- });
- /***/ }),
- /* 24 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/az.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Azerbaijani [az]
- //! author : topchiyev : https://github.com/topchiyev
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var suffixes = {
- 1: '-inci',
- 5: '-inci',
- 8: '-inci',
- 70: '-inci',
- 80: '-inci',
- 2: '-nci',
- 7: '-nci',
- 20: '-nci',
- 50: '-nci',
- 3: '-üncü',
- 4: '-üncü',
- 100: '-üncü',
- 6: '-ncı',
- 9: '-uncu',
- 10: '-uncu',
- 30: '-uncu',
- 60: '-ıncı',
- 90: '-ıncı' };
- var az = moment.defineLocale('az', {
- months: 'yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr'.split(
- '_'),
- monthsShort: 'yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek'.split('_'),
- weekdays:
- 'Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə'.split(
- '_'),
- weekdaysShort: 'Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən'.split('_'),
- weekdaysMin: 'Bz_BE_ÇA_Çə_CA_Cü_Şə'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd, D MMMM YYYY HH:mm' },
- calendar: {
- sameDay: '[bugün saat] LT',
- nextDay: '[sabah saat] LT',
- nextWeek: '[gələn həftə] dddd [saat] LT',
- lastDay: '[dünən] LT',
- lastWeek: '[keçən həftə] dddd [saat] LT',
- sameElse: 'L' },
- relativeTime: {
- future: '%s sonra',
- past: '%s əvvəl',
- s: 'bir neçə saniyə',
- ss: '%d saniyə',
- m: 'bir dəqiqə',
- mm: '%d dəqiqə',
- h: 'bir saat',
- hh: '%d saat',
- d: 'bir gün',
- dd: '%d gün',
- M: 'bir ay',
- MM: '%d ay',
- y: 'bir il',
- yy: '%d il' },
- meridiemParse: /gecə|səhər|gündüz|axşam/,
- isPM: function isPM(input) {
- return /^(gündüz|axşam)$/.test(input);
- },
- meridiem: function meridiem(hour, minute, isLower) {
- if (hour < 4) {
- return 'gecə';
- } else if (hour < 12) {
- return 'səhər';
- } else if (hour < 17) {
- return 'gündüz';
- } else {
- return 'axşam';
- }
- },
- dayOfMonthOrdinalParse: /\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,
- ordinal: function ordinal(number) {
- if (number === 0) {
- // special case for zero
- return number + '-ıncı';
- }
- var a = number % 10,
- b = number % 100 - a,
- c = number >= 100 ? 100 : null;
- return number + (suffixes[a] || suffixes[b] || suffixes[c]);
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 7 // The week that contains Jan 7th is the first week of the year.
- } });
- return az;
- });
- /***/ }),
- /* 25 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/be.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Belarusian [be]
- //! author : Dmitry Demidov : https://github.com/demidov91
- //! author: Praleska: http://praleska.pro/
- //! Author : Menelion Elensúle : https://github.com/Oire
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- function plural(word, num) {
- var forms = word.split('_');
- return num % 10 === 1 && num % 100 !== 11 ?
- forms[0] :
- num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ?
- forms[1] :
- forms[2];
- }
- function relativeTimeWithPlural(number, withoutSuffix, key) {
- var format = {
- ss: withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд',
- mm: withoutSuffix ? 'хвіліна_хвіліны_хвілін' : 'хвіліну_хвіліны_хвілін',
- hh: withoutSuffix ? 'гадзіна_гадзіны_гадзін' : 'гадзіну_гадзіны_гадзін',
- dd: 'дзень_дні_дзён',
- MM: 'месяц_месяцы_месяцаў',
- yy: 'год_гады_гадоў' };
- if (key === 'm') {
- return withoutSuffix ? 'хвіліна' : 'хвіліну';
- } else if (key === 'h') {
- return withoutSuffix ? 'гадзіна' : 'гадзіну';
- } else {
- return number + ' ' + plural(format[key], +number);
- }
- }
- var be = moment.defineLocale('be', {
- months: {
- format: 'студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня'.split(
- '_'),
- standalone:
- 'студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань'.split(
- '_') },
- monthsShort:
- 'студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж'.split('_'),
- weekdays: {
- format: 'нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу'.split(
- '_'),
- standalone:
- 'нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота'.split(
- '_'),
- isFormat: /\[ ?[Ууў] ?(?:мінулую|наступную)? ?\] ?dddd/ },
- weekdaysShort: 'нд_пн_ат_ср_чц_пт_сб'.split('_'),
- weekdaysMin: 'нд_пн_ат_ср_чц_пт_сб'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D MMMM YYYY г.',
- LLL: 'D MMMM YYYY г., HH:mm',
- LLLL: 'dddd, D MMMM YYYY г., HH:mm' },
- calendar: {
- sameDay: '[Сёння ў] LT',
- nextDay: '[Заўтра ў] LT',
- lastDay: '[Учора ў] LT',
- nextWeek: function nextWeek() {
- return '[У] dddd [ў] LT';
- },
- lastWeek: function lastWeek() {
- switch (this.day()) {
- case 0:
- case 3:
- case 5:
- case 6:
- return '[У мінулую] dddd [ў] LT';
- case 1:
- case 2:
- case 4:
- return '[У мінулы] dddd [ў] LT';}
- },
- sameElse: 'L' },
- relativeTime: {
- future: 'праз %s',
- past: '%s таму',
- s: 'некалькі секунд',
- m: relativeTimeWithPlural,
- mm: relativeTimeWithPlural,
- h: relativeTimeWithPlural,
- hh: relativeTimeWithPlural,
- d: 'дзень',
- dd: relativeTimeWithPlural,
- M: 'месяц',
- MM: relativeTimeWithPlural,
- y: 'год',
- yy: relativeTimeWithPlural },
- meridiemParse: /ночы|раніцы|дня|вечара/,
- isPM: function isPM(input) {
- return /^(дня|вечара)$/.test(input);
- },
- meridiem: function meridiem(hour, minute, isLower) {
- if (hour < 4) {
- return 'ночы';
- } else if (hour < 12) {
- return 'раніцы';
- } else if (hour < 17) {
- return 'дня';
- } else {
- return 'вечара';
- }
- },
- dayOfMonthOrdinalParse: /\d{1,2}-(і|ы|га)/,
- ordinal: function ordinal(number, period) {
- switch (period) {
- case 'M':
- case 'd':
- case 'DDD':
- case 'w':
- case 'W':
- return (number % 10 === 2 || number % 10 === 3) &&
- number % 100 !== 12 &&
- number % 100 !== 13 ?
- number + '-і' :
- number + '-ы';
- case 'D':
- return number + '-га';
- default:
- return number;}
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 7 // The week that contains Jan 7th is the first week of the year.
- } });
- return be;
- });
- /***/ }),
- /* 26 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/bg.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Bulgarian [bg]
- //! author : Krasen Borisov : https://github.com/kraz
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var bg = moment.defineLocale('bg', {
- months: 'януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември'.split(
- '_'),
- monthsShort: 'яну_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек'.split('_'),
- weekdays: 'неделя_понеделник_вторник_сряда_четвъртък_петък_събота'.split(
- '_'),
- weekdaysShort: 'нед_пон_вто_сря_чет_пет_съб'.split('_'),
- weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
- longDateFormat: {
- LT: 'H:mm',
- LTS: 'H:mm:ss',
- L: 'D.MM.YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY H:mm',
- LLLL: 'dddd, D MMMM YYYY H:mm' },
- calendar: {
- sameDay: '[Днес в] LT',
- nextDay: '[Утре в] LT',
- nextWeek: 'dddd [в] LT',
- lastDay: '[Вчера в] LT',
- lastWeek: function lastWeek() {
- switch (this.day()) {
- case 0:
- case 3:
- case 6:
- return '[Миналата] dddd [в] LT';
- case 1:
- case 2:
- case 4:
- case 5:
- return '[Миналия] dddd [в] LT';}
- },
- sameElse: 'L' },
- relativeTime: {
- future: 'след %s',
- past: 'преди %s',
- s: 'няколко секунди',
- ss: '%d секунди',
- m: 'минута',
- mm: '%d минути',
- h: 'час',
- hh: '%d часа',
- d: 'ден',
- dd: '%d дена',
- w: 'седмица',
- ww: '%d седмици',
- M: 'месец',
- MM: '%d месеца',
- y: 'година',
- yy: '%d години' },
- dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/,
- ordinal: function ordinal(number) {
- var lastDigit = number % 10,
- last2Digits = number % 100;
- if (number === 0) {
- return number + '-ев';
- } else if (last2Digits === 0) {
- return number + '-ен';
- } else if (last2Digits > 10 && last2Digits < 20) {
- return number + '-ти';
- } else if (lastDigit === 1) {
- return number + '-ви';
- } else if (lastDigit === 2) {
- return number + '-ри';
- } else if (lastDigit === 7 || lastDigit === 8) {
- return number + '-ми';
- } else {
- return number + '-ти';
- }
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 7 // The week that contains Jan 7th is the first week of the year.
- } });
- return bg;
- });
- /***/ }),
- /* 27 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/bm.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Bambara [bm]
- //! author : Estelle Comment : https://github.com/estellecomment
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var bm = moment.defineLocale('bm', {
- months: 'Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_Mɛkalo_Zuwɛnkalo_Zuluyekalo_Utikalo_Sɛtanburukalo_ɔkutɔburukalo_Nowanburukalo_Desanburukalo'.split(
- '_'),
- monthsShort: 'Zan_Few_Mar_Awi_Mɛ_Zuw_Zul_Uti_Sɛt_ɔku_Now_Des'.split('_'),
- weekdays: 'Kari_Ntɛnɛn_Tarata_Araba_Alamisa_Juma_Sibiri'.split('_'),
- weekdaysShort: 'Kar_Ntɛ_Tar_Ara_Ala_Jum_Sib'.split('_'),
- weekdaysMin: 'Ka_Nt_Ta_Ar_Al_Ju_Si'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'MMMM [tile] D [san] YYYY',
- LLL: 'MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm',
- LLLL: 'dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm' },
- calendar: {
- sameDay: '[Bi lɛrɛ] LT',
- nextDay: '[Sini lɛrɛ] LT',
- nextWeek: 'dddd [don lɛrɛ] LT',
- lastDay: '[Kunu lɛrɛ] LT',
- lastWeek: 'dddd [tɛmɛnen lɛrɛ] LT',
- sameElse: 'L' },
- relativeTime: {
- future: '%s kɔnɔ',
- past: 'a bɛ %s bɔ',
- s: 'sanga dama dama',
- ss: 'sekondi %d',
- m: 'miniti kelen',
- mm: 'miniti %d',
- h: 'lɛrɛ kelen',
- hh: 'lɛrɛ %d',
- d: 'tile kelen',
- dd: 'tile %d',
- M: 'kalo kelen',
- MM: 'kalo %d',
- y: 'san kelen',
- yy: 'san %d' },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- } });
- return bm;
- });
- /***/ }),
- /* 28 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/bn.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Bengali [bn]
- //! author : Kaushik Gandhi : https://github.com/kaushikgandhi
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var symbolMap = {
- 1: '১',
- 2: '২',
- 3: '৩',
- 4: '৪',
- 5: '৫',
- 6: '৬',
- 7: '৭',
- 8: '৮',
- 9: '৯',
- 0: '০' },
- numberMap = {
- '১': '1',
- '২': '2',
- '৩': '3',
- '৪': '4',
- '৫': '5',
- '৬': '6',
- '৭': '7',
- '৮': '8',
- '৯': '9',
- '০': '0' };
- var bn = moment.defineLocale('bn', {
- months: 'জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split(
- '_'),
- monthsShort:
- 'জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে'.split(
- '_'),
- weekdays: 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split(
- '_'),
- weekdaysShort: 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'),
- weekdaysMin: 'রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি'.split('_'),
- longDateFormat: {
- LT: 'A h:mm সময়',
- LTS: 'A h:mm:ss সময়',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY, A h:mm সময়',
- LLLL: 'dddd, D MMMM YYYY, A h:mm সময়' },
- calendar: {
- sameDay: '[আজ] LT',
- nextDay: '[আগামীকাল] LT',
- nextWeek: 'dddd, LT',
- lastDay: '[গতকাল] LT',
- lastWeek: '[গত] dddd, LT',
- sameElse: 'L' },
- relativeTime: {
- future: '%s পরে',
- past: '%s আগে',
- s: 'কয়েক সেকেন্ড',
- ss: '%d সেকেন্ড',
- m: 'এক মিনিট',
- mm: '%d মিনিট',
- h: 'এক ঘন্টা',
- hh: '%d ঘন্টা',
- d: 'এক দিন',
- dd: '%d দিন',
- M: 'এক মাস',
- MM: '%d মাস',
- y: 'এক বছর',
- yy: '%d বছর' },
- preparse: function preparse(string) {
- return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) {
- return numberMap[match];
- });
- },
- postformat: function postformat(string) {
- return string.replace(/\d/g, function (match) {
- return symbolMap[match];
- });
- },
- meridiemParse: /রাত|সকাল|দুপুর|বিকাল|রাত/,
- meridiemHour: function meridiemHour(hour, meridiem) {
- if (hour === 12) {
- hour = 0;
- }
- if (
- meridiem === 'রাত' && hour >= 4 ||
- meridiem === 'দুপুর' && hour < 5 ||
- meridiem === 'বিকাল')
- {
- return hour + 12;
- } else {
- return hour;
- }
- },
- meridiem: function meridiem(hour, minute, isLower) {
- if (hour < 4) {
- return 'রাত';
- } else if (hour < 10) {
- return 'সকাল';
- } else if (hour < 17) {
- return 'দুপুর';
- } else if (hour < 20) {
- return 'বিকাল';
- } else {
- return 'রাত';
- }
- },
- week: {
- dow: 0, // Sunday is the first day of the week.
- doy: 6 // The week that contains Jan 6th is the first week of the year.
- } });
- return bn;
- });
- /***/ }),
- /* 29 */
- /*!******************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/bn-bd.js ***!
- \******************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Bengali (Bangladesh) [bn-bd]
- //! author : Asraf Hossain Patoary : https://github.com/ashwoolford
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var symbolMap = {
- 1: '১',
- 2: '২',
- 3: '৩',
- 4: '৪',
- 5: '৫',
- 6: '৬',
- 7: '৭',
- 8: '৮',
- 9: '৯',
- 0: '০' },
- numberMap = {
- '১': '1',
- '২': '2',
- '৩': '3',
- '৪': '4',
- '৫': '5',
- '৬': '6',
- '৭': '7',
- '৮': '8',
- '৯': '9',
- '০': '0' };
- var bnBd = moment.defineLocale('bn-bd', {
- months: 'জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split(
- '_'),
- monthsShort:
- 'জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে'.split(
- '_'),
- weekdays: 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split(
- '_'),
- weekdaysShort: 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'),
- weekdaysMin: 'রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি'.split('_'),
- longDateFormat: {
- LT: 'A h:mm সময়',
- LTS: 'A h:mm:ss সময়',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY, A h:mm সময়',
- LLLL: 'dddd, D MMMM YYYY, A h:mm সময়' },
- calendar: {
- sameDay: '[আজ] LT',
- nextDay: '[আগামীকাল] LT',
- nextWeek: 'dddd, LT',
- lastDay: '[গতকাল] LT',
- lastWeek: '[গত] dddd, LT',
- sameElse: 'L' },
- relativeTime: {
- future: '%s পরে',
- past: '%s আগে',
- s: 'কয়েক সেকেন্ড',
- ss: '%d সেকেন্ড',
- m: 'এক মিনিট',
- mm: '%d মিনিট',
- h: 'এক ঘন্টা',
- hh: '%d ঘন্টা',
- d: 'এক দিন',
- dd: '%d দিন',
- M: 'এক মাস',
- MM: '%d মাস',
- y: 'এক বছর',
- yy: '%d বছর' },
- preparse: function preparse(string) {
- return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) {
- return numberMap[match];
- });
- },
- postformat: function postformat(string) {
- return string.replace(/\d/g, function (match) {
- return symbolMap[match];
- });
- },
- meridiemParse: /রাত|ভোর|সকাল|দুপুর|বিকাল|সন্ধ্যা|রাত/,
- meridiemHour: function meridiemHour(hour, meridiem) {
- if (hour === 12) {
- hour = 0;
- }
- if (meridiem === 'রাত') {
- return hour < 4 ? hour : hour + 12;
- } else if (meridiem === 'ভোর') {
- return hour;
- } else if (meridiem === 'সকাল') {
- return hour;
- } else if (meridiem === 'দুপুর') {
- return hour >= 3 ? hour : hour + 12;
- } else if (meridiem === 'বিকাল') {
- return hour + 12;
- } else if (meridiem === 'সন্ধ্যা') {
- return hour + 12;
- }
- },
- meridiem: function meridiem(hour, minute, isLower) {
- if (hour < 4) {
- return 'রাত';
- } else if (hour < 6) {
- return 'ভোর';
- } else if (hour < 12) {
- return 'সকাল';
- } else if (hour < 15) {
- return 'দুপুর';
- } else if (hour < 18) {
- return 'বিকাল';
- } else if (hour < 20) {
- return 'সন্ধ্যা';
- } else {
- return 'রাত';
- }
- },
- week: {
- dow: 0, // Sunday is the first day of the week.
- doy: 6 // The week that contains Jan 6th is the first week of the year.
- } });
- return bnBd;
- });
- /***/ }),
- /* 30 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/bo.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Tibetan [bo]
- //! author : Thupten N. Chakrishar : https://github.com/vajradog
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var symbolMap = {
- 1: '༡',
- 2: '༢',
- 3: '༣',
- 4: '༤',
- 5: '༥',
- 6: '༦',
- 7: '༧',
- 8: '༨',
- 9: '༩',
- 0: '༠' },
- numberMap = {
- '༡': '1',
- '༢': '2',
- '༣': '3',
- '༤': '4',
- '༥': '5',
- '༦': '6',
- '༧': '7',
- '༨': '8',
- '༩': '9',
- '༠': '0' };
- var bo = moment.defineLocale('bo', {
- months: 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split(
- '_'),
- monthsShort:
- 'ཟླ་1_ཟླ་2_ཟླ་3_ཟླ་4_ཟླ་5_ཟླ་6_ཟླ་7_ཟླ་8_ཟླ་9_ཟླ་10_ཟླ་11_ཟླ་12'.split(
- '_'),
- monthsShortRegex: /^(ཟླ་\d{1,2})/,
- monthsParseExact: true,
- weekdays:
- 'གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་'.split(
- '_'),
- weekdaysShort: 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split(
- '_'),
- weekdaysMin: 'ཉི_ཟླ_མིག_ལྷག_ཕུར_སངས_སྤེན'.split('_'),
- longDateFormat: {
- LT: 'A h:mm',
- LTS: 'A h:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY, A h:mm',
- LLLL: 'dddd, D MMMM YYYY, A h:mm' },
- calendar: {
- sameDay: '[དི་རིང] LT',
- nextDay: '[སང་ཉིན] LT',
- nextWeek: '[བདུན་ཕྲག་རྗེས་མ], LT',
- lastDay: '[ཁ་སང] LT',
- lastWeek: '[བདུན་ཕྲག་མཐའ་མ] dddd, LT',
- sameElse: 'L' },
- relativeTime: {
- future: '%s ལ་',
- past: '%s སྔན་ལ',
- s: 'ལམ་སང',
- ss: '%d སྐར་ཆ།',
- m: 'སྐར་མ་གཅིག',
- mm: '%d སྐར་མ',
- h: 'ཆུ་ཚོད་གཅིག',
- hh: '%d ཆུ་ཚོད',
- d: 'ཉིན་གཅིག',
- dd: '%d ཉིན་',
- M: 'ཟླ་བ་གཅིག',
- MM: '%d ཟླ་བ',
- y: 'ལོ་གཅིག',
- yy: '%d ལོ' },
- preparse: function preparse(string) {
- return string.replace(/[༡༢༣༤༥༦༧༨༩༠]/g, function (match) {
- return numberMap[match];
- });
- },
- postformat: function postformat(string) {
- return string.replace(/\d/g, function (match) {
- return symbolMap[match];
- });
- },
- meridiemParse: /མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,
- meridiemHour: function meridiemHour(hour, meridiem) {
- if (hour === 12) {
- hour = 0;
- }
- if (
- meridiem === 'མཚན་མོ' && hour >= 4 ||
- meridiem === 'ཉིན་གུང' && hour < 5 ||
- meridiem === 'དགོང་དག')
- {
- return hour + 12;
- } else {
- return hour;
- }
- },
- meridiem: function meridiem(hour, minute, isLower) {
- if (hour < 4) {
- return 'མཚན་མོ';
- } else if (hour < 10) {
- return 'ཞོགས་ཀས';
- } else if (hour < 17) {
- return 'ཉིན་གུང';
- } else if (hour < 20) {
- return 'དགོང་དག';
- } else {
- return 'མཚན་མོ';
- }
- },
- week: {
- dow: 0, // Sunday is the first day of the week.
- doy: 6 // The week that contains Jan 6th is the first week of the year.
- } });
- return bo;
- });
- /***/ }),
- /* 31 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/br.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Breton [br]
- //! author : Jean-Baptiste Le Duigou : https://github.com/jbleduigou
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- function relativeTimeWithMutation(number, withoutSuffix, key) {
- var format = {
- mm: 'munutenn',
- MM: 'miz',
- dd: 'devezh' };
- return number + ' ' + mutation(format[key], number);
- }
- function specialMutationForYears(number) {
- switch (lastNumber(number)) {
- case 1:
- case 3:
- case 4:
- case 5:
- case 9:
- return number + ' bloaz';
- default:
- return number + ' vloaz';}
- }
- function lastNumber(number) {
- if (number > 9) {
- return lastNumber(number % 10);
- }
- return number;
- }
- function mutation(text, number) {
- if (number === 2) {
- return softMutation(text);
- }
- return text;
- }
- function softMutation(text) {
- var mutationTable = {
- m: 'v',
- b: 'v',
- d: 'z' };
- if (mutationTable[text.charAt(0)] === undefined) {
- return text;
- }
- return mutationTable[text.charAt(0)] + text.substring(1);
- }
- var monthsParse = [
- /^gen/i,
- /^c[ʼ\']hwe/i,
- /^meu/i,
- /^ebr/i,
- /^mae/i,
- /^(mez|eve)/i,
- /^gou/i,
- /^eos/i,
- /^gwe/i,
- /^her/i,
- /^du/i,
- /^ker/i],
- monthsRegex =
- /^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu|gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,
- monthsStrictRegex =
- /^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu)/i,
- monthsShortStrictRegex =
- /^(gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,
- fullWeekdaysParse = [
- /^sul/i,
- /^lun/i,
- /^meurzh/i,
- /^merc[ʼ\']her/i,
- /^yaou/i,
- /^gwener/i,
- /^sadorn/i],
- shortWeekdaysParse = [
- /^Sul/i,
- /^Lun/i,
- /^Meu/i,
- /^Mer/i,
- /^Yao/i,
- /^Gwe/i,
- /^Sad/i],
- minWeekdaysParse = [
- /^Su/i,
- /^Lu/i,
- /^Me([^r]|$)/i,
- /^Mer/i,
- /^Ya/i,
- /^Gw/i,
- /^Sa/i];
- var br = moment.defineLocale('br', {
- months: 'Genver_Cʼhwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu'.split(
- '_'),
- monthsShort: 'Gen_Cʼhwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker'.split('_'),
- weekdays: 'Sul_Lun_Meurzh_Mercʼher_Yaou_Gwener_Sadorn'.split('_'),
- weekdaysShort: 'Sul_Lun_Meu_Mer_Yao_Gwe_Sad'.split('_'),
- weekdaysMin: 'Su_Lu_Me_Mer_Ya_Gw_Sa'.split('_'),
- weekdaysParse: minWeekdaysParse,
- fullWeekdaysParse: fullWeekdaysParse,
- shortWeekdaysParse: shortWeekdaysParse,
- minWeekdaysParse: minWeekdaysParse,
- monthsRegex: monthsRegex,
- monthsShortRegex: monthsRegex,
- monthsStrictRegex: monthsStrictRegex,
- monthsShortStrictRegex: monthsShortStrictRegex,
- monthsParse: monthsParse,
- longMonthsParse: monthsParse,
- shortMonthsParse: monthsParse,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D [a viz] MMMM YYYY',
- LLL: 'D [a viz] MMMM YYYY HH:mm',
- LLLL: 'dddd, D [a viz] MMMM YYYY HH:mm' },
- calendar: {
- sameDay: '[Hiziv da] LT',
- nextDay: '[Warcʼhoazh da] LT',
- nextWeek: 'dddd [da] LT',
- lastDay: '[Decʼh da] LT',
- lastWeek: 'dddd [paset da] LT',
- sameElse: 'L' },
- relativeTime: {
- future: 'a-benn %s',
- past: '%s ʼzo',
- s: 'un nebeud segondennoù',
- ss: '%d eilenn',
- m: 'ur vunutenn',
- mm: relativeTimeWithMutation,
- h: 'un eur',
- hh: '%d eur',
- d: 'un devezh',
- dd: relativeTimeWithMutation,
- M: 'ur miz',
- MM: relativeTimeWithMutation,
- y: 'ur bloaz',
- yy: specialMutationForYears },
- dayOfMonthOrdinalParse: /\d{1,2}(añ|vet)/,
- ordinal: function ordinal(number) {
- var output = number === 1 ? 'añ' : 'vet';
- return number + output;
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- },
- meridiemParse: /a.m.|g.m./, // goude merenn | a-raok merenn
- isPM: function isPM(token) {
- return token === 'g.m.';
- },
- meridiem: function meridiem(hour, minute, isLower) {
- return hour < 12 ? 'a.m.' : 'g.m.';
- } });
- return br;
- });
- /***/ }),
- /* 32 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/bs.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Bosnian [bs]
- //! author : Nedim Cholich : https://github.com/frontyard
- //! based on (hr) translation by Bojan Marković
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- function translate(number, withoutSuffix, key) {
- var result = number + ' ';
- switch (key) {
- case 'ss':
- if (number === 1) {
- result += 'sekunda';
- } else if (number === 2 || number === 3 || number === 4) {
- result += 'sekunde';
- } else {
- result += 'sekundi';
- }
- return result;
- case 'm':
- return withoutSuffix ? 'jedna minuta' : 'jedne minute';
- case 'mm':
- if (number === 1) {
- result += 'minuta';
- } else if (number === 2 || number === 3 || number === 4) {
- result += 'minute';
- } else {
- result += 'minuta';
- }
- return result;
- case 'h':
- return withoutSuffix ? 'jedan sat' : 'jednog sata';
- case 'hh':
- if (number === 1) {
- result += 'sat';
- } else if (number === 2 || number === 3 || number === 4) {
- result += 'sata';
- } else {
- result += 'sati';
- }
- return result;
- case 'dd':
- if (number === 1) {
- result += 'dan';
- } else {
- result += 'dana';
- }
- return result;
- case 'MM':
- if (number === 1) {
- result += 'mjesec';
- } else if (number === 2 || number === 3 || number === 4) {
- result += 'mjeseca';
- } else {
- result += 'mjeseci';
- }
- return result;
- case 'yy':
- if (number === 1) {
- result += 'godina';
- } else if (number === 2 || number === 3 || number === 4) {
- result += 'godine';
- } else {
- result += 'godina';
- }
- return result;}
- }
- var bs = moment.defineLocale('bs', {
- months: 'januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar'.split(
- '_'),
- monthsShort:
- 'jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.'.split(
- '_'),
- monthsParseExact: true,
- weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(
- '_'),
- weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),
- weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'H:mm',
- LTS: 'H:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D. MMMM YYYY',
- LLL: 'D. MMMM YYYY H:mm',
- LLLL: 'dddd, D. MMMM YYYY H:mm' },
- calendar: {
- sameDay: '[danas u] LT',
- nextDay: '[sutra u] LT',
- nextWeek: function nextWeek() {
- switch (this.day()) {
- case 0:
- return '[u] [nedjelju] [u] LT';
- case 3:
- return '[u] [srijedu] [u] LT';
- case 6:
- return '[u] [subotu] [u] LT';
- case 1:
- case 2:
- case 4:
- case 5:
- return '[u] dddd [u] LT';}
- },
- lastDay: '[jučer u] LT',
- lastWeek: function lastWeek() {
- switch (this.day()) {
- case 0:
- case 3:
- return '[prošlu] dddd [u] LT';
- case 6:
- return '[prošle] [subote] [u] LT';
- case 1:
- case 2:
- case 4:
- case 5:
- return '[prošli] dddd [u] LT';}
- },
- sameElse: 'L' },
- relativeTime: {
- future: 'za %s',
- past: 'prije %s',
- s: 'par sekundi',
- ss: translate,
- m: translate,
- mm: translate,
- h: translate,
- hh: translate,
- d: 'dan',
- dd: translate,
- M: 'mjesec',
- MM: translate,
- y: 'godinu',
- yy: translate },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 7 // The week that contains Jan 7th is the first week of the year.
- } });
- return bs;
- });
- /***/ }),
- /* 33 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/ca.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Catalan [ca]
- //! author : Juan G. Hurtado : https://github.com/juanghurtado
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var ca = moment.defineLocale('ca', {
- months: {
- standalone:
- 'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split(
- '_'),
- format: "de gener_de febrer_de març_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre".split(
- '_'),
- isFormat: /D[oD]?(\s)+MMMM/ },
- monthsShort:
- 'gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.'.split(
- '_'),
- monthsParseExact: true,
- weekdays:
- 'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split(
- '_'),
- weekdaysShort: 'dg._dl._dt._dc._dj._dv._ds.'.split('_'),
- weekdaysMin: 'dg_dl_dt_dc_dj_dv_ds'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'H:mm',
- LTS: 'H:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM [de] YYYY',
- ll: 'D MMM YYYY',
- LLL: 'D MMMM [de] YYYY [a les] H:mm',
- lll: 'D MMM YYYY, H:mm',
- LLLL: 'dddd D MMMM [de] YYYY [a les] H:mm',
- llll: 'ddd D MMM YYYY, H:mm' },
- calendar: {
- sameDay: function sameDay() {
- return '[avui a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';
- },
- nextDay: function nextDay() {
- return '[demà a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';
- },
- nextWeek: function nextWeek() {
- return 'dddd [a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';
- },
- lastDay: function lastDay() {
- return '[ahir a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';
- },
- lastWeek: function lastWeek() {
- return (
- '[el] dddd [passat a ' + (
- this.hours() !== 1 ? 'les' : 'la') +
- '] LT');
- },
- sameElse: 'L' },
- relativeTime: {
- future: "d'aquí %s",
- past: 'fa %s',
- s: 'uns segons',
- ss: '%d segons',
- m: 'un minut',
- mm: '%d minuts',
- h: 'una hora',
- hh: '%d hores',
- d: 'un dia',
- dd: '%d dies',
- M: 'un mes',
- MM: '%d mesos',
- y: 'un any',
- yy: '%d anys' },
- dayOfMonthOrdinalParse: /\d{1,2}(r|n|t|è|a)/,
- ordinal: function ordinal(number, period) {
- var output =
- number === 1 ?
- 'r' :
- number === 2 ?
- 'n' :
- number === 3 ?
- 'r' :
- number === 4 ?
- 't' :
- 'è';
- if (period === 'w' || period === 'W') {
- output = 'a';
- }
- return number + output;
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- } });
- return ca;
- });
- /***/ }),
- /* 34 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/cs.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Czech [cs]
- //! author : petrbela : https://github.com/petrbela
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var months = {
- format: 'leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec'.split(
- '_'),
- standalone:
- 'ledna_února_března_dubna_května_června_července_srpna_září_října_listopadu_prosince'.split(
- '_') },
- monthsShort = 'led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro'.split('_'),
- monthsParse = [
- /^led/i,
- /^úno/i,
- /^bře/i,
- /^dub/i,
- /^kvě/i,
- /^(čvn|červen$|června)/i,
- /^(čvc|červenec|července)/i,
- /^srp/i,
- /^zář/i,
- /^říj/i,
- /^lis/i,
- /^pro/i],
- // NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched.
- // Otherwise parser matches '1. červenec' as '1. červen' + 'ec'.
- monthsRegex =
- /^(leden|únor|březen|duben|květen|červenec|července|červen|června|srpen|září|říjen|listopad|prosinec|led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i;
- function plural(n) {
- return n > 1 && n < 5 && ~~(n / 10) !== 1;
- }
- function translate(number, withoutSuffix, key, isFuture) {
- var result = number + ' ';
- switch (key) {
- case 's': // a few seconds / in a few seconds / a few seconds ago
- return withoutSuffix || isFuture ? 'pár sekund' : 'pár sekundami';
- case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago
- if (withoutSuffix || isFuture) {
- return result + (plural(number) ? 'sekundy' : 'sekund');
- } else {
- return result + 'sekundami';
- }
- case 'm': // a minute / in a minute / a minute ago
- return withoutSuffix ? 'minuta' : isFuture ? 'minutu' : 'minutou';
- case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago
- if (withoutSuffix || isFuture) {
- return result + (plural(number) ? 'minuty' : 'minut');
- } else {
- return result + 'minutami';
- }
- case 'h': // an hour / in an hour / an hour ago
- return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou';
- case 'hh': // 9 hours / in 9 hours / 9 hours ago
- if (withoutSuffix || isFuture) {
- return result + (plural(number) ? 'hodiny' : 'hodin');
- } else {
- return result + 'hodinami';
- }
- case 'd': // a day / in a day / a day ago
- return withoutSuffix || isFuture ? 'den' : 'dnem';
- case 'dd': // 9 days / in 9 days / 9 days ago
- if (withoutSuffix || isFuture) {
- return result + (plural(number) ? 'dny' : 'dní');
- } else {
- return result + 'dny';
- }
- case 'M': // a month / in a month / a month ago
- return withoutSuffix || isFuture ? 'měsíc' : 'měsícem';
- case 'MM': // 9 months / in 9 months / 9 months ago
- if (withoutSuffix || isFuture) {
- return result + (plural(number) ? 'měsíce' : 'měsíců');
- } else {
- return result + 'měsíci';
- }
- case 'y': // a year / in a year / a year ago
- return withoutSuffix || isFuture ? 'rok' : 'rokem';
- case 'yy': // 9 years / in 9 years / 9 years ago
- if (withoutSuffix || isFuture) {
- return result + (plural(number) ? 'roky' : 'let');
- } else {
- return result + 'lety';
- }}
- }
- var cs = moment.defineLocale('cs', {
- months: months,
- monthsShort: monthsShort,
- monthsRegex: monthsRegex,
- monthsShortRegex: monthsRegex,
- // NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched.
- // Otherwise parser matches '1. červenec' as '1. červen' + 'ec'.
- monthsStrictRegex:
- /^(leden|ledna|února|únor|březen|března|duben|dubna|květen|května|červenec|července|červen|června|srpen|srpna|září|říjen|října|listopadu|listopad|prosinec|prosince)/i,
- monthsShortStrictRegex:
- /^(led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i,
- monthsParse: monthsParse,
- longMonthsParse: monthsParse,
- shortMonthsParse: monthsParse,
- weekdays: 'neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota'.split('_'),
- weekdaysShort: 'ne_po_út_st_čt_pá_so'.split('_'),
- weekdaysMin: 'ne_po_út_st_čt_pá_so'.split('_'),
- longDateFormat: {
- LT: 'H:mm',
- LTS: 'H:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D. MMMM YYYY',
- LLL: 'D. MMMM YYYY H:mm',
- LLLL: 'dddd D. MMMM YYYY H:mm',
- l: 'D. M. YYYY' },
- calendar: {
- sameDay: '[dnes v] LT',
- nextDay: '[zítra v] LT',
- nextWeek: function nextWeek() {
- switch (this.day()) {
- case 0:
- return '[v neděli v] LT';
- case 1:
- case 2:
- return '[v] dddd [v] LT';
- case 3:
- return '[ve středu v] LT';
- case 4:
- return '[ve čtvrtek v] LT';
- case 5:
- return '[v pátek v] LT';
- case 6:
- return '[v sobotu v] LT';}
- },
- lastDay: '[včera v] LT',
- lastWeek: function lastWeek() {
- switch (this.day()) {
- case 0:
- return '[minulou neděli v] LT';
- case 1:
- case 2:
- return '[minulé] dddd [v] LT';
- case 3:
- return '[minulou středu v] LT';
- case 4:
- case 5:
- return '[minulý] dddd [v] LT';
- case 6:
- return '[minulou sobotu v] LT';}
- },
- sameElse: 'L' },
- relativeTime: {
- future: 'za %s',
- past: 'před %s',
- s: translate,
- ss: translate,
- m: translate,
- mm: translate,
- h: translate,
- hh: translate,
- d: translate,
- dd: translate,
- M: translate,
- MM: translate,
- y: translate,
- yy: translate },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- } });
- return cs;
- });
- /***/ }),
- /* 35 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/cv.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Chuvash [cv]
- //! author : Anatoly Mironov : https://github.com/mirontoli
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var cv = moment.defineLocale('cv', {
- months: 'кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав'.split(
- '_'),
- monthsShort: 'кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш'.split('_'),
- weekdays:
- 'вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун'.split(
- '_'),
- weekdaysShort: 'выр_тун_ытл_юн_кӗҫ_эрн_шӑм'.split('_'),
- weekdaysMin: 'вр_тн_ыт_юн_кҫ_эр_шм'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD-MM-YYYY',
- LL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]',
- LLL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm',
- LLLL: 'dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm' },
- calendar: {
- sameDay: '[Паян] LT [сехетре]',
- nextDay: '[Ыран] LT [сехетре]',
- lastDay: '[Ӗнер] LT [сехетре]',
- nextWeek: '[Ҫитес] dddd LT [сехетре]',
- lastWeek: '[Иртнӗ] dddd LT [сехетре]',
- sameElse: 'L' },
- relativeTime: {
- future: function future(output) {
- var affix = /сехет$/i.exec(output) ?
- 'рен' :
- /ҫул$/i.exec(output) ?
- 'тан' :
- 'ран';
- return output + affix;
- },
- past: '%s каялла',
- s: 'пӗр-ик ҫеккунт',
- ss: '%d ҫеккунт',
- m: 'пӗр минут',
- mm: '%d минут',
- h: 'пӗр сехет',
- hh: '%d сехет',
- d: 'пӗр кун',
- dd: '%d кун',
- M: 'пӗр уйӑх',
- MM: '%d уйӑх',
- y: 'пӗр ҫул',
- yy: '%d ҫул' },
- dayOfMonthOrdinalParse: /\d{1,2}-мӗш/,
- ordinal: '%d-мӗш',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 7 // The week that contains Jan 7th is the first week of the year.
- } });
- return cv;
- });
- /***/ }),
- /* 36 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/cy.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Welsh [cy]
- //! author : Robert Allen : https://github.com/robgallen
- //! author : https://github.com/ryangreaves
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var cy = moment.defineLocale('cy', {
- months: 'Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr'.split(
- '_'),
- monthsShort: 'Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag'.split(
- '_'),
- weekdays:
- 'Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn'.split(
- '_'),
- weekdaysShort: 'Sul_Llun_Maw_Mer_Iau_Gwe_Sad'.split('_'),
- weekdaysMin: 'Su_Ll_Ma_Me_Ia_Gw_Sa'.split('_'),
- weekdaysParseExact: true,
- // time formats are the same as en-gb
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd, D MMMM YYYY HH:mm' },
- calendar: {
- sameDay: '[Heddiw am] LT',
- nextDay: '[Yfory am] LT',
- nextWeek: 'dddd [am] LT',
- lastDay: '[Ddoe am] LT',
- lastWeek: 'dddd [diwethaf am] LT',
- sameElse: 'L' },
- relativeTime: {
- future: 'mewn %s',
- past: '%s yn ôl',
- s: 'ychydig eiliadau',
- ss: '%d eiliad',
- m: 'munud',
- mm: '%d munud',
- h: 'awr',
- hh: '%d awr',
- d: 'diwrnod',
- dd: '%d diwrnod',
- M: 'mis',
- MM: '%d mis',
- y: 'blwyddyn',
- yy: '%d flynedd' },
- dayOfMonthOrdinalParse: /\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,
- // traditional ordinal numbers above 31 are not commonly used in colloquial Welsh
- ordinal: function ordinal(number) {
- var b = number,
- output = '',
- lookup = [
- '',
- 'af',
- 'il',
- 'ydd',
- 'ydd',
- 'ed',
- 'ed',
- 'ed',
- 'fed',
- 'fed',
- 'fed', // 1af to 10fed
- 'eg',
- 'fed',
- 'eg',
- 'eg',
- 'fed',
- 'eg',
- 'eg',
- 'fed',
- 'eg',
- 'fed' // 11eg to 20fed
- ];
- if (b > 20) {
- if (b === 40 || b === 50 || b === 60 || b === 80 || b === 100) {
- output = 'fed'; // not 30ain, 70ain or 90ain
- } else {
- output = 'ain';
- }
- } else if (b > 0) {
- output = lookup[b];
- }
- return number + output;
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- } });
- return cy;
- });
- /***/ }),
- /* 37 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/da.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Danish [da]
- //! author : Ulrik Nielsen : https://github.com/mrbase
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var da = moment.defineLocale('da', {
- months: 'januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december'.split(
- '_'),
- monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),
- weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),
- weekdaysShort: 'søn_man_tir_ons_tor_fre_lør'.split('_'),
- weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D. MMMM YYYY',
- LLL: 'D. MMMM YYYY HH:mm',
- LLLL: 'dddd [d.] D. MMMM YYYY [kl.] HH:mm' },
- calendar: {
- sameDay: '[i dag kl.] LT',
- nextDay: '[i morgen kl.] LT',
- nextWeek: 'på dddd [kl.] LT',
- lastDay: '[i går kl.] LT',
- lastWeek: '[i] dddd[s kl.] LT',
- sameElse: 'L' },
- relativeTime: {
- future: 'om %s',
- past: '%s siden',
- s: 'få sekunder',
- ss: '%d sekunder',
- m: 'et minut',
- mm: '%d minutter',
- h: 'en time',
- hh: '%d timer',
- d: 'en dag',
- dd: '%d dage',
- M: 'en måned',
- MM: '%d måneder',
- y: 'et år',
- yy: '%d år' },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- } });
- return da;
- });
- /***/ }),
- /* 38 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/de.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : German [de]
- //! author : lluchs : https://github.com/lluchs
- //! author: Menelion Elensúle: https://github.com/Oire
- //! author : Mikolaj Dadela : https://github.com/mik01aj
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- function processRelativeTime(number, withoutSuffix, key, isFuture) {
- var format = {
- m: ['eine Minute', 'einer Minute'],
- h: ['eine Stunde', 'einer Stunde'],
- d: ['ein Tag', 'einem Tag'],
- dd: [number + ' Tage', number + ' Tagen'],
- w: ['eine Woche', 'einer Woche'],
- M: ['ein Monat', 'einem Monat'],
- MM: [number + ' Monate', number + ' Monaten'],
- y: ['ein Jahr', 'einem Jahr'],
- yy: [number + ' Jahre', number + ' Jahren'] };
- return withoutSuffix ? format[key][0] : format[key][1];
- }
- var de = moment.defineLocale('de', {
- months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(
- '_'),
- monthsShort:
- 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),
- monthsParseExact: true,
- weekdays:
- 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(
- '_'),
- weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),
- weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D. MMMM YYYY',
- LLL: 'D. MMMM YYYY HH:mm',
- LLLL: 'dddd, D. MMMM YYYY HH:mm' },
- calendar: {
- sameDay: '[heute um] LT [Uhr]',
- sameElse: 'L',
- nextDay: '[morgen um] LT [Uhr]',
- nextWeek: 'dddd [um] LT [Uhr]',
- lastDay: '[gestern um] LT [Uhr]',
- lastWeek: '[letzten] dddd [um] LT [Uhr]' },
- relativeTime: {
- future: 'in %s',
- past: 'vor %s',
- s: 'ein paar Sekunden',
- ss: '%d Sekunden',
- m: processRelativeTime,
- mm: '%d Minuten',
- h: processRelativeTime,
- hh: '%d Stunden',
- d: processRelativeTime,
- dd: processRelativeTime,
- w: processRelativeTime,
- ww: '%d Wochen',
- M: processRelativeTime,
- MM: processRelativeTime,
- y: processRelativeTime,
- yy: processRelativeTime },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- } });
- return de;
- });
- /***/ }),
- /* 39 */
- /*!******************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/de-at.js ***!
- \******************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : German (Austria) [de-at]
- //! author : lluchs : https://github.com/lluchs
- //! author: Menelion Elensúle: https://github.com/Oire
- //! author : Martin Groller : https://github.com/MadMG
- //! author : Mikolaj Dadela : https://github.com/mik01aj
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- function processRelativeTime(number, withoutSuffix, key, isFuture) {
- var format = {
- m: ['eine Minute', 'einer Minute'],
- h: ['eine Stunde', 'einer Stunde'],
- d: ['ein Tag', 'einem Tag'],
- dd: [number + ' Tage', number + ' Tagen'],
- w: ['eine Woche', 'einer Woche'],
- M: ['ein Monat', 'einem Monat'],
- MM: [number + ' Monate', number + ' Monaten'],
- y: ['ein Jahr', 'einem Jahr'],
- yy: [number + ' Jahre', number + ' Jahren'] };
- return withoutSuffix ? format[key][0] : format[key][1];
- }
- var deAt = moment.defineLocale('de-at', {
- months: 'Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(
- '_'),
- monthsShort:
- 'Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),
- monthsParseExact: true,
- weekdays:
- 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(
- '_'),
- weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),
- weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D. MMMM YYYY',
- LLL: 'D. MMMM YYYY HH:mm',
- LLLL: 'dddd, D. MMMM YYYY HH:mm' },
- calendar: {
- sameDay: '[heute um] LT [Uhr]',
- sameElse: 'L',
- nextDay: '[morgen um] LT [Uhr]',
- nextWeek: 'dddd [um] LT [Uhr]',
- lastDay: '[gestern um] LT [Uhr]',
- lastWeek: '[letzten] dddd [um] LT [Uhr]' },
- relativeTime: {
- future: 'in %s',
- past: 'vor %s',
- s: 'ein paar Sekunden',
- ss: '%d Sekunden',
- m: processRelativeTime,
- mm: '%d Minuten',
- h: processRelativeTime,
- hh: '%d Stunden',
- d: processRelativeTime,
- dd: processRelativeTime,
- w: processRelativeTime,
- ww: '%d Wochen',
- M: processRelativeTime,
- MM: processRelativeTime,
- y: processRelativeTime,
- yy: processRelativeTime },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- } });
- return deAt;
- });
- /***/ }),
- /* 40 */
- /*!******************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/de-ch.js ***!
- \******************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : German (Switzerland) [de-ch]
- //! author : sschueller : https://github.com/sschueller
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- function processRelativeTime(number, withoutSuffix, key, isFuture) {
- var format = {
- m: ['eine Minute', 'einer Minute'],
- h: ['eine Stunde', 'einer Stunde'],
- d: ['ein Tag', 'einem Tag'],
- dd: [number + ' Tage', number + ' Tagen'],
- w: ['eine Woche', 'einer Woche'],
- M: ['ein Monat', 'einem Monat'],
- MM: [number + ' Monate', number + ' Monaten'],
- y: ['ein Jahr', 'einem Jahr'],
- yy: [number + ' Jahre', number + ' Jahren'] };
- return withoutSuffix ? format[key][0] : format[key][1];
- }
- var deCh = moment.defineLocale('de-ch', {
- months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(
- '_'),
- monthsShort:
- 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),
- monthsParseExact: true,
- weekdays:
- 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(
- '_'),
- weekdaysShort: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
- weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D. MMMM YYYY',
- LLL: 'D. MMMM YYYY HH:mm',
- LLLL: 'dddd, D. MMMM YYYY HH:mm' },
- calendar: {
- sameDay: '[heute um] LT [Uhr]',
- sameElse: 'L',
- nextDay: '[morgen um] LT [Uhr]',
- nextWeek: 'dddd [um] LT [Uhr]',
- lastDay: '[gestern um] LT [Uhr]',
- lastWeek: '[letzten] dddd [um] LT [Uhr]' },
- relativeTime: {
- future: 'in %s',
- past: 'vor %s',
- s: 'ein paar Sekunden',
- ss: '%d Sekunden',
- m: processRelativeTime,
- mm: '%d Minuten',
- h: processRelativeTime,
- hh: '%d Stunden',
- d: processRelativeTime,
- dd: processRelativeTime,
- w: processRelativeTime,
- ww: '%d Wochen',
- M: processRelativeTime,
- MM: processRelativeTime,
- y: processRelativeTime,
- yy: processRelativeTime },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- } });
- return deCh;
- });
- /***/ }),
- /* 41 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/dv.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Maldivian [dv]
- //! author : Jawish Hameed : https://github.com/jawish
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var months = [
- 'ޖެނުއަރީ',
- 'ފެބްރުއަރީ',
- 'މާރިޗު',
- 'އޭޕްރީލު',
- 'މޭ',
- 'ޖޫން',
- 'ޖުލައި',
- 'އޯގަސްޓު',
- 'ސެޕްޓެމްބަރު',
- 'އޮކްޓޯބަރު',
- 'ނޮވެމްބަރު',
- 'ޑިސެމްބަރު'],
- weekdays = [
- 'އާދިއްތަ',
- 'ހޯމަ',
- 'އަންގާރަ',
- 'ބުދަ',
- 'ބުރާސްފަތި',
- 'ހުކުރު',
- 'ހޮނިހިރު'];
- var dv = moment.defineLocale('dv', {
- months: months,
- monthsShort: months,
- weekdays: weekdays,
- weekdaysShort: weekdays,
- weekdaysMin: 'އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'D/M/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd D MMMM YYYY HH:mm' },
- meridiemParse: /މކ|މފ/,
- isPM: function isPM(input) {
- return 'މފ' === input;
- },
- meridiem: function meridiem(hour, minute, isLower) {
- if (hour < 12) {
- return 'މކ';
- } else {
- return 'މފ';
- }
- },
- calendar: {
- sameDay: '[މިއަދު] LT',
- nextDay: '[މާދަމާ] LT',
- nextWeek: 'dddd LT',
- lastDay: '[އިއްޔެ] LT',
- lastWeek: '[ފާއިތުވި] dddd LT',
- sameElse: 'L' },
- relativeTime: {
- future: 'ތެރޭގައި %s',
- past: 'ކުރިން %s',
- s: 'ސިކުންތުކޮޅެއް',
- ss: 'd% ސިކުންތު',
- m: 'މިނިޓެއް',
- mm: 'މިނިޓު %d',
- h: 'ގަޑިއިރެއް',
- hh: 'ގަޑިއިރު %d',
- d: 'ދުވަހެއް',
- dd: 'ދުވަސް %d',
- M: 'މަހެއް',
- MM: 'މަސް %d',
- y: 'އަހަރެއް',
- yy: 'އަހަރު %d' },
- preparse: function preparse(string) {
- return string.replace(/،/g, ',');
- },
- postformat: function postformat(string) {
- return string.replace(/,/g, '،');
- },
- week: {
- dow: 7, // Sunday is the first day of the week.
- doy: 12 // The week that contains Jan 12th is the first week of the year.
- } });
- return dv;
- });
- /***/ }),
- /* 42 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/el.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Greek [el]
- //! author : Aggelos Karalias : https://github.com/mehiel
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- function isFunction(input) {
- return (
- typeof Function !== 'undefined' && input instanceof Function ||
- Object.prototype.toString.call(input) === '[object Function]');
- }
- var el = moment.defineLocale('el', {
- monthsNominativeEl:
- 'Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος'.split(
- '_'),
- monthsGenitiveEl:
- 'Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου'.split(
- '_'),
- months: function months(momentToFormat, format) {
- if (!momentToFormat) {
- return this._monthsNominativeEl;
- } else if (
- typeof format === 'string' &&
- /D/.test(format.substring(0, format.indexOf('MMMM'))))
- {
- // if there is a day number before 'MMMM'
- return this._monthsGenitiveEl[momentToFormat.month()];
- } else {
- return this._monthsNominativeEl[momentToFormat.month()];
- }
- },
- monthsShort: 'Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ'.split('_'),
- weekdays: 'Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο'.split(
- '_'),
- weekdaysShort: 'Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ'.split('_'),
- weekdaysMin: 'Κυ_Δε_Τρ_Τε_Πε_Πα_Σα'.split('_'),
- meridiem: function meridiem(hours, minutes, isLower) {
- if (hours > 11) {
- return isLower ? 'μμ' : 'ΜΜ';
- } else {
- return isLower ? 'πμ' : 'ΠΜ';
- }
- },
- isPM: function isPM(input) {
- return (input + '').toLowerCase()[0] === 'μ';
- },
- meridiemParse: /[ΠΜ]\.?Μ?\.?/i,
- longDateFormat: {
- LT: 'h:mm A',
- LTS: 'h:mm:ss A',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY h:mm A',
- LLLL: 'dddd, D MMMM YYYY h:mm A' },
- calendarEl: {
- sameDay: '[Σήμερα {}] LT',
- nextDay: '[Αύριο {}] LT',
- nextWeek: 'dddd [{}] LT',
- lastDay: '[Χθες {}] LT',
- lastWeek: function lastWeek() {
- switch (this.day()) {
- case 6:
- return '[το προηγούμενο] dddd [{}] LT';
- default:
- return '[την προηγούμενη] dddd [{}] LT';}
- },
- sameElse: 'L' },
- calendar: function calendar(key, mom) {
- var output = this._calendarEl[key],
- hours = mom && mom.hours();
- if (isFunction(output)) {
- output = output.apply(mom);
- }
- return output.replace('{}', hours % 12 === 1 ? 'στη' : 'στις');
- },
- relativeTime: {
- future: 'σε %s',
- past: '%s πριν',
- s: 'λίγα δευτερόλεπτα',
- ss: '%d δευτερόλεπτα',
- m: 'ένα λεπτό',
- mm: '%d λεπτά',
- h: 'μία ώρα',
- hh: '%d ώρες',
- d: 'μία μέρα',
- dd: '%d μέρες',
- M: 'ένας μήνας',
- MM: '%d μήνες',
- y: 'ένας χρόνος',
- yy: '%d χρόνια' },
- dayOfMonthOrdinalParse: /\d{1,2}η/,
- ordinal: '%dη',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4st is the first week of the year.
- } });
- return el;
- });
- /***/ }),
- /* 43 */
- /*!******************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/en-au.js ***!
- \******************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : English (Australia) [en-au]
- //! author : Jared Morse : https://github.com/jarcoal
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var enAu = moment.defineLocale('en-au', {
- months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
- '_'),
- monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
- weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
- '_'),
- weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
- weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
- longDateFormat: {
- LT: 'h:mm A',
- LTS: 'h:mm:ss A',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY h:mm A',
- LLLL: 'dddd, D MMMM YYYY h:mm A' },
- calendar: {
- sameDay: '[Today at] LT',
- nextDay: '[Tomorrow at] LT',
- nextWeek: 'dddd [at] LT',
- lastDay: '[Yesterday at] LT',
- lastWeek: '[Last] dddd [at] LT',
- sameElse: 'L' },
- relativeTime: {
- future: 'in %s',
- past: '%s ago',
- s: 'a few seconds',
- ss: '%d seconds',
- m: 'a minute',
- mm: '%d minutes',
- h: 'an hour',
- hh: '%d hours',
- d: 'a day',
- dd: '%d days',
- M: 'a month',
- MM: '%d months',
- y: 'a year',
- yy: '%d years' },
- dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
- ordinal: function ordinal(number) {
- var b = number % 10,
- output =
- ~~(number % 100 / 10) === 1 ?
- 'th' :
- b === 1 ?
- 'st' :
- b === 2 ?
- 'nd' :
- b === 3 ?
- 'rd' :
- 'th';
- return number + output;
- },
- week: {
- dow: 0, // Sunday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- } });
- return enAu;
- });
- /***/ }),
- /* 44 */
- /*!******************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/en-ca.js ***!
- \******************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : English (Canada) [en-ca]
- //! author : Jonathan Abourbih : https://github.com/jonbca
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var enCa = moment.defineLocale('en-ca', {
- months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
- '_'),
- monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
- weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
- '_'),
- weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
- weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
- longDateFormat: {
- LT: 'h:mm A',
- LTS: 'h:mm:ss A',
- L: 'YYYY-MM-DD',
- LL: 'MMMM D, YYYY',
- LLL: 'MMMM D, YYYY h:mm A',
- LLLL: 'dddd, MMMM D, YYYY h:mm A' },
- calendar: {
- sameDay: '[Today at] LT',
- nextDay: '[Tomorrow at] LT',
- nextWeek: 'dddd [at] LT',
- lastDay: '[Yesterday at] LT',
- lastWeek: '[Last] dddd [at] LT',
- sameElse: 'L' },
- relativeTime: {
- future: 'in %s',
- past: '%s ago',
- s: 'a few seconds',
- ss: '%d seconds',
- m: 'a minute',
- mm: '%d minutes',
- h: 'an hour',
- hh: '%d hours',
- d: 'a day',
- dd: '%d days',
- M: 'a month',
- MM: '%d months',
- y: 'a year',
- yy: '%d years' },
- dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
- ordinal: function ordinal(number) {
- var b = number % 10,
- output =
- ~~(number % 100 / 10) === 1 ?
- 'th' :
- b === 1 ?
- 'st' :
- b === 2 ?
- 'nd' :
- b === 3 ?
- 'rd' :
- 'th';
- return number + output;
- } });
- return enCa;
- });
- /***/ }),
- /* 45 */
- /*!******************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/en-gb.js ***!
- \******************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : English (United Kingdom) [en-gb]
- //! author : Chris Gedrim : https://github.com/chrisgedrim
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var enGb = moment.defineLocale('en-gb', {
- months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
- '_'),
- monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
- weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
- '_'),
- weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
- weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd, D MMMM YYYY HH:mm' },
- calendar: {
- sameDay: '[Today at] LT',
- nextDay: '[Tomorrow at] LT',
- nextWeek: 'dddd [at] LT',
- lastDay: '[Yesterday at] LT',
- lastWeek: '[Last] dddd [at] LT',
- sameElse: 'L' },
- relativeTime: {
- future: 'in %s',
- past: '%s ago',
- s: 'a few seconds',
- ss: '%d seconds',
- m: 'a minute',
- mm: '%d minutes',
- h: 'an hour',
- hh: '%d hours',
- d: 'a day',
- dd: '%d days',
- M: 'a month',
- MM: '%d months',
- y: 'a year',
- yy: '%d years' },
- dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
- ordinal: function ordinal(number) {
- var b = number % 10,
- output =
- ~~(number % 100 / 10) === 1 ?
- 'th' :
- b === 1 ?
- 'st' :
- b === 2 ?
- 'nd' :
- b === 3 ?
- 'rd' :
- 'th';
- return number + output;
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- } });
- return enGb;
- });
- /***/ }),
- /* 46 */
- /*!******************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/en-ie.js ***!
- \******************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : English (Ireland) [en-ie]
- //! author : Chris Cartlidge : https://github.com/chriscartlidge
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var enIe = moment.defineLocale('en-ie', {
- months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
- '_'),
- monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
- weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
- '_'),
- weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
- weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd D MMMM YYYY HH:mm' },
- calendar: {
- sameDay: '[Today at] LT',
- nextDay: '[Tomorrow at] LT',
- nextWeek: 'dddd [at] LT',
- lastDay: '[Yesterday at] LT',
- lastWeek: '[Last] dddd [at] LT',
- sameElse: 'L' },
- relativeTime: {
- future: 'in %s',
- past: '%s ago',
- s: 'a few seconds',
- ss: '%d seconds',
- m: 'a minute',
- mm: '%d minutes',
- h: 'an hour',
- hh: '%d hours',
- d: 'a day',
- dd: '%d days',
- M: 'a month',
- MM: '%d months',
- y: 'a year',
- yy: '%d years' },
- dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
- ordinal: function ordinal(number) {
- var b = number % 10,
- output =
- ~~(number % 100 / 10) === 1 ?
- 'th' :
- b === 1 ?
- 'st' :
- b === 2 ?
- 'nd' :
- b === 3 ?
- 'rd' :
- 'th';
- return number + output;
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- } });
- return enIe;
- });
- /***/ }),
- /* 47 */
- /*!******************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/en-il.js ***!
- \******************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : English (Israel) [en-il]
- //! author : Chris Gedrim : https://github.com/chrisgedrim
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var enIl = moment.defineLocale('en-il', {
- months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
- '_'),
- monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
- weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
- '_'),
- weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
- weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd, D MMMM YYYY HH:mm' },
- calendar: {
- sameDay: '[Today at] LT',
- nextDay: '[Tomorrow at] LT',
- nextWeek: 'dddd [at] LT',
- lastDay: '[Yesterday at] LT',
- lastWeek: '[Last] dddd [at] LT',
- sameElse: 'L' },
- relativeTime: {
- future: 'in %s',
- past: '%s ago',
- s: 'a few seconds',
- ss: '%d seconds',
- m: 'a minute',
- mm: '%d minutes',
- h: 'an hour',
- hh: '%d hours',
- d: 'a day',
- dd: '%d days',
- M: 'a month',
- MM: '%d months',
- y: 'a year',
- yy: '%d years' },
- dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
- ordinal: function ordinal(number) {
- var b = number % 10,
- output =
- ~~(number % 100 / 10) === 1 ?
- 'th' :
- b === 1 ?
- 'st' :
- b === 2 ?
- 'nd' :
- b === 3 ?
- 'rd' :
- 'th';
- return number + output;
- } });
- return enIl;
- });
- /***/ }),
- /* 48 */
- /*!******************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/en-in.js ***!
- \******************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : English (India) [en-in]
- //! author : Jatin Agrawal : https://github.com/jatinag22
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var enIn = moment.defineLocale('en-in', {
- months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
- '_'),
- monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
- weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
- '_'),
- weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
- weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
- longDateFormat: {
- LT: 'h:mm A',
- LTS: 'h:mm:ss A',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY h:mm A',
- LLLL: 'dddd, D MMMM YYYY h:mm A' },
- calendar: {
- sameDay: '[Today at] LT',
- nextDay: '[Tomorrow at] LT',
- nextWeek: 'dddd [at] LT',
- lastDay: '[Yesterday at] LT',
- lastWeek: '[Last] dddd [at] LT',
- sameElse: 'L' },
- relativeTime: {
- future: 'in %s',
- past: '%s ago',
- s: 'a few seconds',
- ss: '%d seconds',
- m: 'a minute',
- mm: '%d minutes',
- h: 'an hour',
- hh: '%d hours',
- d: 'a day',
- dd: '%d days',
- M: 'a month',
- MM: '%d months',
- y: 'a year',
- yy: '%d years' },
- dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
- ordinal: function ordinal(number) {
- var b = number % 10,
- output =
- ~~(number % 100 / 10) === 1 ?
- 'th' :
- b === 1 ?
- 'st' :
- b === 2 ?
- 'nd' :
- b === 3 ?
- 'rd' :
- 'th';
- return number + output;
- },
- week: {
- dow: 0, // Sunday is the first day of the week.
- doy: 6 // The week that contains Jan 1st is the first week of the year.
- } });
- return enIn;
- });
- /***/ }),
- /* 49 */
- /*!******************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/en-nz.js ***!
- \******************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : English (New Zealand) [en-nz]
- //! author : Luke McGregor : https://github.com/lukemcgregor
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var enNz = moment.defineLocale('en-nz', {
- months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
- '_'),
- monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
- weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
- '_'),
- weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
- weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
- longDateFormat: {
- LT: 'h:mm A',
- LTS: 'h:mm:ss A',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY h:mm A',
- LLLL: 'dddd, D MMMM YYYY h:mm A' },
- calendar: {
- sameDay: '[Today at] LT',
- nextDay: '[Tomorrow at] LT',
- nextWeek: 'dddd [at] LT',
- lastDay: '[Yesterday at] LT',
- lastWeek: '[Last] dddd [at] LT',
- sameElse: 'L' },
- relativeTime: {
- future: 'in %s',
- past: '%s ago',
- s: 'a few seconds',
- ss: '%d seconds',
- m: 'a minute',
- mm: '%d minutes',
- h: 'an hour',
- hh: '%d hours',
- d: 'a day',
- dd: '%d days',
- M: 'a month',
- MM: '%d months',
- y: 'a year',
- yy: '%d years' },
- dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
- ordinal: function ordinal(number) {
- var b = number % 10,
- output =
- ~~(number % 100 / 10) === 1 ?
- 'th' :
- b === 1 ?
- 'st' :
- b === 2 ?
- 'nd' :
- b === 3 ?
- 'rd' :
- 'th';
- return number + output;
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- } });
- return enNz;
- });
- /***/ }),
- /* 50 */
- /*!******************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/en-sg.js ***!
- \******************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : English (Singapore) [en-sg]
- //! author : Matthew Castrillon-Madrigal : https://github.com/techdimension
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var enSg = moment.defineLocale('en-sg', {
- months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
- '_'),
- monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
- weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
- '_'),
- weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
- weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd, D MMMM YYYY HH:mm' },
- calendar: {
- sameDay: '[Today at] LT',
- nextDay: '[Tomorrow at] LT',
- nextWeek: 'dddd [at] LT',
- lastDay: '[Yesterday at] LT',
- lastWeek: '[Last] dddd [at] LT',
- sameElse: 'L' },
- relativeTime: {
- future: 'in %s',
- past: '%s ago',
- s: 'a few seconds',
- ss: '%d seconds',
- m: 'a minute',
- mm: '%d minutes',
- h: 'an hour',
- hh: '%d hours',
- d: 'a day',
- dd: '%d days',
- M: 'a month',
- MM: '%d months',
- y: 'a year',
- yy: '%d years' },
- dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
- ordinal: function ordinal(number) {
- var b = number % 10,
- output =
- ~~(number % 100 / 10) === 1 ?
- 'th' :
- b === 1 ?
- 'st' :
- b === 2 ?
- 'nd' :
- b === 3 ?
- 'rd' :
- 'th';
- return number + output;
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- } });
- return enSg;
- });
- /***/ }),
- /* 51 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/eo.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Esperanto [eo]
- //! author : Colin Dean : https://github.com/colindean
- //! author : Mia Nordentoft Imperatori : https://github.com/miestasmia
- //! comment : miestasmia corrected the translation by colindean
- //! comment : Vivakvo corrected the translation by colindean and miestasmia
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var eo = moment.defineLocale('eo', {
- months: 'januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro'.split(
- '_'),
- monthsShort: 'jan_feb_mart_apr_maj_jun_jul_aŭg_sept_okt_nov_dec'.split('_'),
- weekdays: 'dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato'.split('_'),
- weekdaysShort: 'dim_lun_mard_merk_ĵaŭ_ven_sab'.split('_'),
- weekdaysMin: 'di_lu_ma_me_ĵa_ve_sa'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'YYYY-MM-DD',
- LL: '[la] D[-an de] MMMM, YYYY',
- LLL: '[la] D[-an de] MMMM, YYYY HH:mm',
- LLLL: 'dddd[n], [la] D[-an de] MMMM, YYYY HH:mm',
- llll: 'ddd, [la] D[-an de] MMM, YYYY HH:mm' },
- meridiemParse: /[ap]\.t\.m/i,
- isPM: function isPM(input) {
- return input.charAt(0).toLowerCase() === 'p';
- },
- meridiem: function meridiem(hours, minutes, isLower) {
- if (hours > 11) {
- return isLower ? 'p.t.m.' : 'P.T.M.';
- } else {
- return isLower ? 'a.t.m.' : 'A.T.M.';
- }
- },
- calendar: {
- sameDay: '[Hodiaŭ je] LT',
- nextDay: '[Morgaŭ je] LT',
- nextWeek: 'dddd[n je] LT',
- lastDay: '[Hieraŭ je] LT',
- lastWeek: '[pasintan] dddd[n je] LT',
- sameElse: 'L' },
- relativeTime: {
- future: 'post %s',
- past: 'antaŭ %s',
- s: 'kelkaj sekundoj',
- ss: '%d sekundoj',
- m: 'unu minuto',
- mm: '%d minutoj',
- h: 'unu horo',
- hh: '%d horoj',
- d: 'unu tago', //ne 'diurno', ĉar estas uzita por proksimumo
- dd: '%d tagoj',
- M: 'unu monato',
- MM: '%d monatoj',
- y: 'unu jaro',
- yy: '%d jaroj' },
- dayOfMonthOrdinalParse: /\d{1,2}a/,
- ordinal: '%da',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 7 // The week that contains Jan 7th is the first week of the year.
- } });
- return eo;
- });
- /***/ }),
- /* 52 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/es.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Spanish [es]
- //! author : Julio Napurí : https://github.com/julionc
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var monthsShortDot =
- 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(
- '_'),
- _monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),
- monthsParse = [
- /^ene/i,
- /^feb/i,
- /^mar/i,
- /^abr/i,
- /^may/i,
- /^jun/i,
- /^jul/i,
- /^ago/i,
- /^sep/i,
- /^oct/i,
- /^nov/i,
- /^dic/i],
- monthsRegex =
- /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;
- var es = moment.defineLocale('es', {
- months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(
- '_'),
- monthsShort: function monthsShort(m, format) {
- if (!m) {
- return monthsShortDot;
- } else if (/-MMM-/.test(format)) {
- return _monthsShort[m.month()];
- } else {
- return monthsShortDot[m.month()];
- }
- },
- monthsRegex: monthsRegex,
- monthsShortRegex: monthsRegex,
- monthsStrictRegex:
- /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
- monthsShortStrictRegex:
- /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
- monthsParse: monthsParse,
- longMonthsParse: monthsParse,
- shortMonthsParse: monthsParse,
- weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
- weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
- weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'H:mm',
- LTS: 'H:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D [de] MMMM [de] YYYY',
- LLL: 'D [de] MMMM [de] YYYY H:mm',
- LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm' },
- calendar: {
- sameDay: function sameDay() {
- return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
- },
- nextDay: function nextDay() {
- return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
- },
- nextWeek: function nextWeek() {
- return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
- },
- lastDay: function lastDay() {
- return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
- },
- lastWeek: function lastWeek() {
- return (
- '[el] dddd [pasado a la' + (
- this.hours() !== 1 ? 's' : '') +
- '] LT');
- },
- sameElse: 'L' },
- relativeTime: {
- future: 'en %s',
- past: 'hace %s',
- s: 'unos segundos',
- ss: '%d segundos',
- m: 'un minuto',
- mm: '%d minutos',
- h: 'una hora',
- hh: '%d horas',
- d: 'un día',
- dd: '%d días',
- w: 'una semana',
- ww: '%d semanas',
- M: 'un mes',
- MM: '%d meses',
- y: 'un año',
- yy: '%d años' },
- dayOfMonthOrdinalParse: /\d{1,2}º/,
- ordinal: '%dº',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- },
- invalidDate: 'Fecha inválida' });
- return es;
- });
- /***/ }),
- /* 53 */
- /*!******************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/es-do.js ***!
- \******************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Spanish (Dominican Republic) [es-do]
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var monthsShortDot =
- 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(
- '_'),
- _monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),
- monthsParse = [
- /^ene/i,
- /^feb/i,
- /^mar/i,
- /^abr/i,
- /^may/i,
- /^jun/i,
- /^jul/i,
- /^ago/i,
- /^sep/i,
- /^oct/i,
- /^nov/i,
- /^dic/i],
- monthsRegex =
- /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;
- var esDo = moment.defineLocale('es-do', {
- months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(
- '_'),
- monthsShort: function monthsShort(m, format) {
- if (!m) {
- return monthsShortDot;
- } else if (/-MMM-/.test(format)) {
- return _monthsShort[m.month()];
- } else {
- return monthsShortDot[m.month()];
- }
- },
- monthsRegex: monthsRegex,
- monthsShortRegex: monthsRegex,
- monthsStrictRegex:
- /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
- monthsShortStrictRegex:
- /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
- monthsParse: monthsParse,
- longMonthsParse: monthsParse,
- shortMonthsParse: monthsParse,
- weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
- weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
- weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'h:mm A',
- LTS: 'h:mm:ss A',
- L: 'DD/MM/YYYY',
- LL: 'D [de] MMMM [de] YYYY',
- LLL: 'D [de] MMMM [de] YYYY h:mm A',
- LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A' },
- calendar: {
- sameDay: function sameDay() {
- return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
- },
- nextDay: function nextDay() {
- return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
- },
- nextWeek: function nextWeek() {
- return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
- },
- lastDay: function lastDay() {
- return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
- },
- lastWeek: function lastWeek() {
- return (
- '[el] dddd [pasado a la' + (
- this.hours() !== 1 ? 's' : '') +
- '] LT');
- },
- sameElse: 'L' },
- relativeTime: {
- future: 'en %s',
- past: 'hace %s',
- s: 'unos segundos',
- ss: '%d segundos',
- m: 'un minuto',
- mm: '%d minutos',
- h: 'una hora',
- hh: '%d horas',
- d: 'un día',
- dd: '%d días',
- w: 'una semana',
- ww: '%d semanas',
- M: 'un mes',
- MM: '%d meses',
- y: 'un año',
- yy: '%d años' },
- dayOfMonthOrdinalParse: /\d{1,2}º/,
- ordinal: '%dº',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- } });
- return esDo;
- });
- /***/ }),
- /* 54 */
- /*!******************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/es-mx.js ***!
- \******************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Spanish (Mexico) [es-mx]
- //! author : JC Franco : https://github.com/jcfranco
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var monthsShortDot =
- 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(
- '_'),
- _monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),
- monthsParse = [
- /^ene/i,
- /^feb/i,
- /^mar/i,
- /^abr/i,
- /^may/i,
- /^jun/i,
- /^jul/i,
- /^ago/i,
- /^sep/i,
- /^oct/i,
- /^nov/i,
- /^dic/i],
- monthsRegex =
- /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;
- var esMx = moment.defineLocale('es-mx', {
- months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(
- '_'),
- monthsShort: function monthsShort(m, format) {
- if (!m) {
- return monthsShortDot;
- } else if (/-MMM-/.test(format)) {
- return _monthsShort[m.month()];
- } else {
- return monthsShortDot[m.month()];
- }
- },
- monthsRegex: monthsRegex,
- monthsShortRegex: monthsRegex,
- monthsStrictRegex:
- /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
- monthsShortStrictRegex:
- /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
- monthsParse: monthsParse,
- longMonthsParse: monthsParse,
- shortMonthsParse: monthsParse,
- weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
- weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
- weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'H:mm',
- LTS: 'H:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D [de] MMMM [de] YYYY',
- LLL: 'D [de] MMMM [de] YYYY H:mm',
- LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm' },
- calendar: {
- sameDay: function sameDay() {
- return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
- },
- nextDay: function nextDay() {
- return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
- },
- nextWeek: function nextWeek() {
- return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
- },
- lastDay: function lastDay() {
- return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
- },
- lastWeek: function lastWeek() {
- return (
- '[el] dddd [pasado a la' + (
- this.hours() !== 1 ? 's' : '') +
- '] LT');
- },
- sameElse: 'L' },
- relativeTime: {
- future: 'en %s',
- past: 'hace %s',
- s: 'unos segundos',
- ss: '%d segundos',
- m: 'un minuto',
- mm: '%d minutos',
- h: 'una hora',
- hh: '%d horas',
- d: 'un día',
- dd: '%d días',
- w: 'una semana',
- ww: '%d semanas',
- M: 'un mes',
- MM: '%d meses',
- y: 'un año',
- yy: '%d años' },
- dayOfMonthOrdinalParse: /\d{1,2}º/,
- ordinal: '%dº',
- week: {
- dow: 0, // Sunday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- },
- invalidDate: 'Fecha inválida' });
- return esMx;
- });
- /***/ }),
- /* 55 */
- /*!******************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/es-us.js ***!
- \******************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Spanish (United States) [es-us]
- //! author : bustta : https://github.com/bustta
- //! author : chrisrodz : https://github.com/chrisrodz
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var monthsShortDot =
- 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(
- '_'),
- _monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),
- monthsParse = [
- /^ene/i,
- /^feb/i,
- /^mar/i,
- /^abr/i,
- /^may/i,
- /^jun/i,
- /^jul/i,
- /^ago/i,
- /^sep/i,
- /^oct/i,
- /^nov/i,
- /^dic/i],
- monthsRegex =
- /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;
- var esUs = moment.defineLocale('es-us', {
- months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(
- '_'),
- monthsShort: function monthsShort(m, format) {
- if (!m) {
- return monthsShortDot;
- } else if (/-MMM-/.test(format)) {
- return _monthsShort[m.month()];
- } else {
- return monthsShortDot[m.month()];
- }
- },
- monthsRegex: monthsRegex,
- monthsShortRegex: monthsRegex,
- monthsStrictRegex:
- /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
- monthsShortStrictRegex:
- /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
- monthsParse: monthsParse,
- longMonthsParse: monthsParse,
- shortMonthsParse: monthsParse,
- weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
- weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
- weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'h:mm A',
- LTS: 'h:mm:ss A',
- L: 'MM/DD/YYYY',
- LL: 'D [de] MMMM [de] YYYY',
- LLL: 'D [de] MMMM [de] YYYY h:mm A',
- LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A' },
- calendar: {
- sameDay: function sameDay() {
- return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
- },
- nextDay: function nextDay() {
- return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
- },
- nextWeek: function nextWeek() {
- return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
- },
- lastDay: function lastDay() {
- return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
- },
- lastWeek: function lastWeek() {
- return (
- '[el] dddd [pasado a la' + (
- this.hours() !== 1 ? 's' : '') +
- '] LT');
- },
- sameElse: 'L' },
- relativeTime: {
- future: 'en %s',
- past: 'hace %s',
- s: 'unos segundos',
- ss: '%d segundos',
- m: 'un minuto',
- mm: '%d minutos',
- h: 'una hora',
- hh: '%d horas',
- d: 'un día',
- dd: '%d días',
- w: 'una semana',
- ww: '%d semanas',
- M: 'un mes',
- MM: '%d meses',
- y: 'un año',
- yy: '%d años' },
- dayOfMonthOrdinalParse: /\d{1,2}º/,
- ordinal: '%dº',
- week: {
- dow: 0, // Sunday is the first day of the week.
- doy: 6 // The week that contains Jan 6th is the first week of the year.
- } });
- return esUs;
- });
- /***/ }),
- /* 56 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/et.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Estonian [et]
- //! author : Henry Kehlmann : https://github.com/madhenry
- //! improvements : Illimar Tambek : https://github.com/ragulka
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- function processRelativeTime(number, withoutSuffix, key, isFuture) {
- var format = {
- s: ['mõne sekundi', 'mõni sekund', 'paar sekundit'],
- ss: [number + 'sekundi', number + 'sekundit'],
- m: ['ühe minuti', 'üks minut'],
- mm: [number + ' minuti', number + ' minutit'],
- h: ['ühe tunni', 'tund aega', 'üks tund'],
- hh: [number + ' tunni', number + ' tundi'],
- d: ['ühe päeva', 'üks päev'],
- M: ['kuu aja', 'kuu aega', 'üks kuu'],
- MM: [number + ' kuu', number + ' kuud'],
- y: ['ühe aasta', 'aasta', 'üks aasta'],
- yy: [number + ' aasta', number + ' aastat'] };
- if (withoutSuffix) {
- return format[key][2] ? format[key][2] : format[key][1];
- }
- return isFuture ? format[key][0] : format[key][1];
- }
- var et = moment.defineLocale('et', {
- months: 'jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember'.split(
- '_'),
- monthsShort:
- 'jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets'.split('_'),
- weekdays:
- 'pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev'.split(
- '_'),
- weekdaysShort: 'P_E_T_K_N_R_L'.split('_'),
- weekdaysMin: 'P_E_T_K_N_R_L'.split('_'),
- longDateFormat: {
- LT: 'H:mm',
- LTS: 'H:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D. MMMM YYYY',
- LLL: 'D. MMMM YYYY H:mm',
- LLLL: 'dddd, D. MMMM YYYY H:mm' },
- calendar: {
- sameDay: '[Täna,] LT',
- nextDay: '[Homme,] LT',
- nextWeek: '[Järgmine] dddd LT',
- lastDay: '[Eile,] LT',
- lastWeek: '[Eelmine] dddd LT',
- sameElse: 'L' },
- relativeTime: {
- future: '%s pärast',
- past: '%s tagasi',
- s: processRelativeTime,
- ss: processRelativeTime,
- m: processRelativeTime,
- mm: processRelativeTime,
- h: processRelativeTime,
- hh: processRelativeTime,
- d: processRelativeTime,
- dd: '%d päeva',
- M: processRelativeTime,
- MM: processRelativeTime,
- y: processRelativeTime,
- yy: processRelativeTime },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- } });
- return et;
- });
- /***/ }),
- /* 57 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/eu.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Basque [eu]
- //! author : Eneko Illarramendi : https://github.com/eillarra
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var eu = moment.defineLocale('eu', {
- months: 'urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua'.split(
- '_'),
- monthsShort:
- 'urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.'.split(
- '_'),
- monthsParseExact: true,
- weekdays:
- 'igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata'.split(
- '_'),
- weekdaysShort: 'ig._al._ar._az._og._ol._lr.'.split('_'),
- weekdaysMin: 'ig_al_ar_az_og_ol_lr'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'YYYY-MM-DD',
- LL: 'YYYY[ko] MMMM[ren] D[a]',
- LLL: 'YYYY[ko] MMMM[ren] D[a] HH:mm',
- LLLL: 'dddd, YYYY[ko] MMMM[ren] D[a] HH:mm',
- l: 'YYYY-M-D',
- ll: 'YYYY[ko] MMM D[a]',
- lll: 'YYYY[ko] MMM D[a] HH:mm',
- llll: 'ddd, YYYY[ko] MMM D[a] HH:mm' },
- calendar: {
- sameDay: '[gaur] LT[etan]',
- nextDay: '[bihar] LT[etan]',
- nextWeek: 'dddd LT[etan]',
- lastDay: '[atzo] LT[etan]',
- lastWeek: '[aurreko] dddd LT[etan]',
- sameElse: 'L' },
- relativeTime: {
- future: '%s barru',
- past: 'duela %s',
- s: 'segundo batzuk',
- ss: '%d segundo',
- m: 'minutu bat',
- mm: '%d minutu',
- h: 'ordu bat',
- hh: '%d ordu',
- d: 'egun bat',
- dd: '%d egun',
- M: 'hilabete bat',
- MM: '%d hilabete',
- y: 'urte bat',
- yy: '%d urte' },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 7 // The week that contains Jan 7th is the first week of the year.
- } });
- return eu;
- });
- /***/ }),
- /* 58 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/fa.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Persian [fa]
- //! author : Ebrahim Byagowi : https://github.com/ebraminio
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var symbolMap = {
- 1: '۱',
- 2: '۲',
- 3: '۳',
- 4: '۴',
- 5: '۵',
- 6: '۶',
- 7: '۷',
- 8: '۸',
- 9: '۹',
- 0: '۰' },
- numberMap = {
- '۱': '1',
- '۲': '2',
- '۳': '3',
- '۴': '4',
- '۵': '5',
- '۶': '6',
- '۷': '7',
- '۸': '8',
- '۹': '9',
- '۰': '0' };
- var fa = moment.defineLocale('fa', {
- months: 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split(
- '_'),
- monthsShort:
- 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split(
- '_'),
- weekdays:
- "\u06CC\u06A9\u200C\u0634\u0646\u0628\u0647_\u062F\u0648\u0634\u0646\u0628\u0647_\u0633\u0647\u200C\u0634\u0646\u0628\u0647_\u0686\u0647\u0627\u0631\u0634\u0646\u0628\u0647_\u067E\u0646\u062C\u200C\u0634\u0646\u0628\u0647_\u062C\u0645\u0639\u0647_\u0634\u0646\u0628\u0647".split(
- '_'),
- weekdaysShort:
- "\u06CC\u06A9\u200C\u0634\u0646\u0628\u0647_\u062F\u0648\u0634\u0646\u0628\u0647_\u0633\u0647\u200C\u0634\u0646\u0628\u0647_\u0686\u0647\u0627\u0631\u0634\u0646\u0628\u0647_\u067E\u0646\u062C\u200C\u0634\u0646\u0628\u0647_\u062C\u0645\u0639\u0647_\u0634\u0646\u0628\u0647".split(
- '_'),
- weekdaysMin: 'ی_د_س_چ_پ_ج_ش'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd, D MMMM YYYY HH:mm' },
- meridiemParse: /قبل از ظهر|بعد از ظهر/,
- isPM: function isPM(input) {
- return /بعد از ظهر/.test(input);
- },
- meridiem: function meridiem(hour, minute, isLower) {
- if (hour < 12) {
- return 'قبل از ظهر';
- } else {
- return 'بعد از ظهر';
- }
- },
- calendar: {
- sameDay: '[امروز ساعت] LT',
- nextDay: '[فردا ساعت] LT',
- nextWeek: 'dddd [ساعت] LT',
- lastDay: '[دیروز ساعت] LT',
- lastWeek: 'dddd [پیش] [ساعت] LT',
- sameElse: 'L' },
- relativeTime: {
- future: 'در %s',
- past: '%s پیش',
- s: 'چند ثانیه',
- ss: '%d ثانیه',
- m: 'یک دقیقه',
- mm: '%d دقیقه',
- h: 'یک ساعت',
- hh: '%d ساعت',
- d: 'یک روز',
- dd: '%d روز',
- M: 'یک ماه',
- MM: '%d ماه',
- y: 'یک سال',
- yy: '%d سال' },
- preparse: function preparse(string) {
- return string.
- replace(/[۰-۹]/g, function (match) {
- return numberMap[match];
- }).
- replace(/،/g, ',');
- },
- postformat: function postformat(string) {
- return string.
- replace(/\d/g, function (match) {
- return symbolMap[match];
- }).
- replace(/,/g, '،');
- },
- dayOfMonthOrdinalParse: /\d{1,2}م/,
- ordinal: '%dم',
- week: {
- dow: 6, // Saturday is the first day of the week.
- doy: 12 // The week that contains Jan 12th is the first week of the year.
- } });
- return fa;
- });
- /***/ }),
- /* 59 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/fi.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Finnish [fi]
- //! author : Tarmo Aidantausta : https://github.com/bleadof
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var numbersPast =
- 'nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän'.split(
- ' '),
- numbersFuture = [
- 'nolla',
- 'yhden',
- 'kahden',
- 'kolmen',
- 'neljän',
- 'viiden',
- 'kuuden',
- numbersPast[7],
- numbersPast[8],
- numbersPast[9]];
- function translate(number, withoutSuffix, key, isFuture) {
- var result = '';
- switch (key) {
- case 's':
- return isFuture ? 'muutaman sekunnin' : 'muutama sekunti';
- case 'ss':
- result = isFuture ? 'sekunnin' : 'sekuntia';
- break;
- case 'm':
- return isFuture ? 'minuutin' : 'minuutti';
- case 'mm':
- result = isFuture ? 'minuutin' : 'minuuttia';
- break;
- case 'h':
- return isFuture ? 'tunnin' : 'tunti';
- case 'hh':
- result = isFuture ? 'tunnin' : 'tuntia';
- break;
- case 'd':
- return isFuture ? 'päivän' : 'päivä';
- case 'dd':
- result = isFuture ? 'päivän' : 'päivää';
- break;
- case 'M':
- return isFuture ? 'kuukauden' : 'kuukausi';
- case 'MM':
- result = isFuture ? 'kuukauden' : 'kuukautta';
- break;
- case 'y':
- return isFuture ? 'vuoden' : 'vuosi';
- case 'yy':
- result = isFuture ? 'vuoden' : 'vuotta';
- break;}
- result = verbalNumber(number, isFuture) + ' ' + result;
- return result;
- }
- function verbalNumber(number, isFuture) {
- return number < 10 ?
- isFuture ?
- numbersFuture[number] :
- numbersPast[number] :
- number;
- }
- var fi = moment.defineLocale('fi', {
- months: 'tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu'.split(
- '_'),
- monthsShort:
- 'tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu'.split(
- '_'),
- weekdays:
- 'sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai'.split(
- '_'),
- weekdaysShort: 'su_ma_ti_ke_to_pe_la'.split('_'),
- weekdaysMin: 'su_ma_ti_ke_to_pe_la'.split('_'),
- longDateFormat: {
- LT: 'HH.mm',
- LTS: 'HH.mm.ss',
- L: 'DD.MM.YYYY',
- LL: 'Do MMMM[ta] YYYY',
- LLL: 'Do MMMM[ta] YYYY, [klo] HH.mm',
- LLLL: 'dddd, Do MMMM[ta] YYYY, [klo] HH.mm',
- l: 'D.M.YYYY',
- ll: 'Do MMM YYYY',
- lll: 'Do MMM YYYY, [klo] HH.mm',
- llll: 'ddd, Do MMM YYYY, [klo] HH.mm' },
- calendar: {
- sameDay: '[tänään] [klo] LT',
- nextDay: '[huomenna] [klo] LT',
- nextWeek: 'dddd [klo] LT',
- lastDay: '[eilen] [klo] LT',
- lastWeek: '[viime] dddd[na] [klo] LT',
- sameElse: 'L' },
- relativeTime: {
- future: '%s päästä',
- past: '%s sitten',
- s: translate,
- ss: translate,
- m: translate,
- mm: translate,
- h: translate,
- hh: translate,
- d: translate,
- dd: translate,
- M: translate,
- MM: translate,
- y: translate,
- yy: translate },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- } });
- return fi;
- });
- /***/ }),
- /* 60 */
- /*!****************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/fil.js ***!
- \****************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Filipino [fil]
- //! author : Dan Hagman : https://github.com/hagmandan
- //! author : Matthew Co : https://github.com/matthewdeeco
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var fil = moment.defineLocale('fil', {
- months: 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split(
- '_'),
- monthsShort: 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'),
- weekdays: 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split(
- '_'),
- weekdaysShort: 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'),
- weekdaysMin: 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'MM/D/YYYY',
- LL: 'MMMM D, YYYY',
- LLL: 'MMMM D, YYYY HH:mm',
- LLLL: 'dddd, MMMM DD, YYYY HH:mm' },
- calendar: {
- sameDay: 'LT [ngayong araw]',
- nextDay: '[Bukas ng] LT',
- nextWeek: 'LT [sa susunod na] dddd',
- lastDay: 'LT [kahapon]',
- lastWeek: 'LT [noong nakaraang] dddd',
- sameElse: 'L' },
- relativeTime: {
- future: 'sa loob ng %s',
- past: '%s ang nakalipas',
- s: 'ilang segundo',
- ss: '%d segundo',
- m: 'isang minuto',
- mm: '%d minuto',
- h: 'isang oras',
- hh: '%d oras',
- d: 'isang araw',
- dd: '%d araw',
- M: 'isang buwan',
- MM: '%d buwan',
- y: 'isang taon',
- yy: '%d taon' },
- dayOfMonthOrdinalParse: /\d{1,2}/,
- ordinal: function ordinal(number) {
- return number;
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- } });
- return fil;
- });
- /***/ }),
- /* 61 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/fo.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Faroese [fo]
- //! author : Ragnar Johannesen : https://github.com/ragnar123
- //! author : Kristian Sakarisson : https://github.com/sakarisson
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var fo = moment.defineLocale('fo', {
- months: 'januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember'.split(
- '_'),
- monthsShort: 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'),
- weekdays:
- 'sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur'.split(
- '_'),
- weekdaysShort: 'sun_mán_týs_mik_hós_frí_ley'.split('_'),
- weekdaysMin: 'su_má_tý_mi_hó_fr_le'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd D. MMMM, YYYY HH:mm' },
- calendar: {
- sameDay: '[Í dag kl.] LT',
- nextDay: '[Í morgin kl.] LT',
- nextWeek: 'dddd [kl.] LT',
- lastDay: '[Í gjár kl.] LT',
- lastWeek: '[síðstu] dddd [kl] LT',
- sameElse: 'L' },
- relativeTime: {
- future: 'um %s',
- past: '%s síðani',
- s: 'fá sekund',
- ss: '%d sekundir',
- m: 'ein minuttur',
- mm: '%d minuttir',
- h: 'ein tími',
- hh: '%d tímar',
- d: 'ein dagur',
- dd: '%d dagar',
- M: 'ein mánaður',
- MM: '%d mánaðir',
- y: 'eitt ár',
- yy: '%d ár' },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- } });
- return fo;
- });
- /***/ }),
- /* 62 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/fr.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : French [fr]
- //! author : John Fischer : https://github.com/jfroffice
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var monthsStrictRegex =
- /^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,
- monthsShortStrictRegex =
- /(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?)/i,
- monthsRegex =
- /(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?|janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,
- monthsParse = [
- /^janv/i,
- /^févr/i,
- /^mars/i,
- /^avr/i,
- /^mai/i,
- /^juin/i,
- /^juil/i,
- /^août/i,
- /^sept/i,
- /^oct/i,
- /^nov/i,
- /^déc/i];
- var fr = moment.defineLocale('fr', {
- months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(
- '_'),
- monthsShort:
- 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(
- '_'),
- monthsRegex: monthsRegex,
- monthsShortRegex: monthsRegex,
- monthsStrictRegex: monthsStrictRegex,
- monthsShortStrictRegex: monthsShortStrictRegex,
- monthsParse: monthsParse,
- longMonthsParse: monthsParse,
- shortMonthsParse: monthsParse,
- weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),
- weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),
- weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd D MMMM YYYY HH:mm' },
- calendar: {
- sameDay: '[Aujourd’hui à] LT',
- nextDay: '[Demain à] LT',
- nextWeek: 'dddd [à] LT',
- lastDay: '[Hier à] LT',
- lastWeek: 'dddd [dernier à] LT',
- sameElse: 'L' },
- relativeTime: {
- future: 'dans %s',
- past: 'il y a %s',
- s: 'quelques secondes',
- ss: '%d secondes',
- m: 'une minute',
- mm: '%d minutes',
- h: 'une heure',
- hh: '%d heures',
- d: 'un jour',
- dd: '%d jours',
- w: 'une semaine',
- ww: '%d semaines',
- M: 'un mois',
- MM: '%d mois',
- y: 'un an',
- yy: '%d ans' },
- dayOfMonthOrdinalParse: /\d{1,2}(er|)/,
- ordinal: function ordinal(number, period) {
- switch (period) {
- // TODO: Return 'e' when day of month > 1. Move this case inside
- // block for masculine words below.
- // See https://github.com/moment/moment/issues/3375
- case 'D':
- return number + (number === 1 ? 'er' : '');
- // Words with masculine grammatical gender: mois, trimestre, jour
- default:
- case 'M':
- case 'Q':
- case 'DDD':
- case 'd':
- return number + (number === 1 ? 'er' : 'e');
- // Words with feminine grammatical gender: semaine
- case 'w':
- case 'W':
- return number + (number === 1 ? 're' : 'e');}
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- } });
- return fr;
- });
- /***/ }),
- /* 63 */
- /*!******************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/fr-ca.js ***!
- \******************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : French (Canada) [fr-ca]
- //! author : Jonathan Abourbih : https://github.com/jonbca
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var frCa = moment.defineLocale('fr-ca', {
- months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(
- '_'),
- monthsShort:
- 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(
- '_'),
- monthsParseExact: true,
- weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),
- weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),
- weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'YYYY-MM-DD',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd D MMMM YYYY HH:mm' },
- calendar: {
- sameDay: '[Aujourd’hui à] LT',
- nextDay: '[Demain à] LT',
- nextWeek: 'dddd [à] LT',
- lastDay: '[Hier à] LT',
- lastWeek: 'dddd [dernier à] LT',
- sameElse: 'L' },
- relativeTime: {
- future: 'dans %s',
- past: 'il y a %s',
- s: 'quelques secondes',
- ss: '%d secondes',
- m: 'une minute',
- mm: '%d minutes',
- h: 'une heure',
- hh: '%d heures',
- d: 'un jour',
- dd: '%d jours',
- M: 'un mois',
- MM: '%d mois',
- y: 'un an',
- yy: '%d ans' },
- dayOfMonthOrdinalParse: /\d{1,2}(er|e)/,
- ordinal: function ordinal(number, period) {
- switch (period) {
- // Words with masculine grammatical gender: mois, trimestre, jour
- default:
- case 'M':
- case 'Q':
- case 'D':
- case 'DDD':
- case 'd':
- return number + (number === 1 ? 'er' : 'e');
- // Words with feminine grammatical gender: semaine
- case 'w':
- case 'W':
- return number + (number === 1 ? 're' : 'e');}
- } });
- return frCa;
- });
- /***/ }),
- /* 64 */
- /*!******************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/fr-ch.js ***!
- \******************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : French (Switzerland) [fr-ch]
- //! author : Gaspard Bucher : https://github.com/gaspard
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var frCh = moment.defineLocale('fr-ch', {
- months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(
- '_'),
- monthsShort:
- 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(
- '_'),
- monthsParseExact: true,
- weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),
- weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),
- weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd D MMMM YYYY HH:mm' },
- calendar: {
- sameDay: '[Aujourd’hui à] LT',
- nextDay: '[Demain à] LT',
- nextWeek: 'dddd [à] LT',
- lastDay: '[Hier à] LT',
- lastWeek: 'dddd [dernier à] LT',
- sameElse: 'L' },
- relativeTime: {
- future: 'dans %s',
- past: 'il y a %s',
- s: 'quelques secondes',
- ss: '%d secondes',
- m: 'une minute',
- mm: '%d minutes',
- h: 'une heure',
- hh: '%d heures',
- d: 'un jour',
- dd: '%d jours',
- M: 'un mois',
- MM: '%d mois',
- y: 'un an',
- yy: '%d ans' },
- dayOfMonthOrdinalParse: /\d{1,2}(er|e)/,
- ordinal: function ordinal(number, period) {
- switch (period) {
- // Words with masculine grammatical gender: mois, trimestre, jour
- default:
- case 'M':
- case 'Q':
- case 'D':
- case 'DDD':
- case 'd':
- return number + (number === 1 ? 'er' : 'e');
- // Words with feminine grammatical gender: semaine
- case 'w':
- case 'W':
- return number + (number === 1 ? 're' : 'e');}
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- } });
- return frCh;
- });
- /***/ }),
- /* 65 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/fy.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Frisian [fy]
- //! author : Robin van der Vliet : https://github.com/robin0van0der0v
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var monthsShortWithDots =
- 'jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.'.split('_'),
- monthsShortWithoutDots =
- 'jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_');
- var fy = moment.defineLocale('fy', {
- months: 'jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber'.split(
- '_'),
- monthsShort: function monthsShort(m, format) {
- if (!m) {
- return monthsShortWithDots;
- } else if (/-MMM-/.test(format)) {
- return monthsShortWithoutDots[m.month()];
- } else {
- return monthsShortWithDots[m.month()];
- }
- },
- monthsParseExact: true,
- weekdays: 'snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon'.split(
- '_'),
- weekdaysShort: 'si._mo._ti._wo._to._fr._so.'.split('_'),
- weekdaysMin: 'Si_Mo_Ti_Wo_To_Fr_So'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD-MM-YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd D MMMM YYYY HH:mm' },
- calendar: {
- sameDay: '[hjoed om] LT',
- nextDay: '[moarn om] LT',
- nextWeek: 'dddd [om] LT',
- lastDay: '[juster om] LT',
- lastWeek: '[ôfrûne] dddd [om] LT',
- sameElse: 'L' },
- relativeTime: {
- future: 'oer %s',
- past: '%s lyn',
- s: 'in pear sekonden',
- ss: '%d sekonden',
- m: 'ien minút',
- mm: '%d minuten',
- h: 'ien oere',
- hh: '%d oeren',
- d: 'ien dei',
- dd: '%d dagen',
- M: 'ien moanne',
- MM: '%d moannen',
- y: 'ien jier',
- yy: '%d jierren' },
- dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
- ordinal: function ordinal(number) {
- return (
- number + (
- number === 1 || number === 8 || number >= 20 ? 'ste' : 'de'));
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- } });
- return fy;
- });
- /***/ }),
- /* 66 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/ga.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Irish or Irish Gaelic [ga]
- //! author : André Silva : https://github.com/askpt
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var months = [
- 'Eanáir',
- 'Feabhra',
- 'Márta',
- 'Aibreán',
- 'Bealtaine',
- 'Meitheamh',
- 'Iúil',
- 'Lúnasa',
- 'Meán Fómhair',
- 'Deireadh Fómhair',
- 'Samhain',
- 'Nollaig'],
- monthsShort = [
- 'Ean',
- 'Feabh',
- 'Márt',
- 'Aib',
- 'Beal',
- 'Meith',
- 'Iúil',
- 'Lún',
- 'M.F.',
- 'D.F.',
- 'Samh',
- 'Noll'],
- weekdays = [
- 'Dé Domhnaigh',
- 'Dé Luain',
- 'Dé Máirt',
- 'Dé Céadaoin',
- 'Déardaoin',
- 'Dé hAoine',
- 'Dé Sathairn'],
- weekdaysShort = ['Domh', 'Luan', 'Máirt', 'Céad', 'Déar', 'Aoine', 'Sath'],
- weekdaysMin = ['Do', 'Lu', 'Má', 'Cé', 'Dé', 'A', 'Sa'];
- var ga = moment.defineLocale('ga', {
- months: months,
- monthsShort: monthsShort,
- monthsParseExact: true,
- weekdays: weekdays,
- weekdaysShort: weekdaysShort,
- weekdaysMin: weekdaysMin,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd, D MMMM YYYY HH:mm' },
- calendar: {
- sameDay: '[Inniu ag] LT',
- nextDay: '[Amárach ag] LT',
- nextWeek: 'dddd [ag] LT',
- lastDay: '[Inné ag] LT',
- lastWeek: 'dddd [seo caite] [ag] LT',
- sameElse: 'L' },
- relativeTime: {
- future: 'i %s',
- past: '%s ó shin',
- s: 'cúpla soicind',
- ss: '%d soicind',
- m: 'nóiméad',
- mm: '%d nóiméad',
- h: 'uair an chloig',
- hh: '%d uair an chloig',
- d: 'lá',
- dd: '%d lá',
- M: 'mí',
- MM: '%d míonna',
- y: 'bliain',
- yy: '%d bliain' },
- dayOfMonthOrdinalParse: /\d{1,2}(d|na|mh)/,
- ordinal: function ordinal(number) {
- var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh';
- return number + output;
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- } });
- return ga;
- });
- /***/ }),
- /* 67 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/gd.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Scottish Gaelic [gd]
- //! author : Jon Ashdown : https://github.com/jonashdown
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var months = [
- 'Am Faoilleach',
- 'An Gearran',
- 'Am Màrt',
- 'An Giblean',
- 'An Cèitean',
- 'An t-Ògmhios',
- 'An t-Iuchar',
- 'An Lùnastal',
- 'An t-Sultain',
- 'An Dàmhair',
- 'An t-Samhain',
- 'An Dùbhlachd'],
- monthsShort = [
- 'Faoi',
- 'Gear',
- 'Màrt',
- 'Gibl',
- 'Cèit',
- 'Ògmh',
- 'Iuch',
- 'Lùn',
- 'Sult',
- 'Dàmh',
- 'Samh',
- 'Dùbh'],
- weekdays = [
- 'Didòmhnaich',
- 'Diluain',
- 'Dimàirt',
- 'Diciadain',
- 'Diardaoin',
- 'Dihaoine',
- 'Disathairne'],
- weekdaysShort = ['Did', 'Dil', 'Dim', 'Dic', 'Dia', 'Dih', 'Dis'],
- weekdaysMin = ['Dò', 'Lu', 'Mà', 'Ci', 'Ar', 'Ha', 'Sa'];
- var gd = moment.defineLocale('gd', {
- months: months,
- monthsShort: monthsShort,
- monthsParseExact: true,
- weekdays: weekdays,
- weekdaysShort: weekdaysShort,
- weekdaysMin: weekdaysMin,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd, D MMMM YYYY HH:mm' },
- calendar: {
- sameDay: '[An-diugh aig] LT',
- nextDay: '[A-màireach aig] LT',
- nextWeek: 'dddd [aig] LT',
- lastDay: '[An-dè aig] LT',
- lastWeek: 'dddd [seo chaidh] [aig] LT',
- sameElse: 'L' },
- relativeTime: {
- future: 'ann an %s',
- past: 'bho chionn %s',
- s: 'beagan diogan',
- ss: '%d diogan',
- m: 'mionaid',
- mm: '%d mionaidean',
- h: 'uair',
- hh: '%d uairean',
- d: 'latha',
- dd: '%d latha',
- M: 'mìos',
- MM: '%d mìosan',
- y: 'bliadhna',
- yy: '%d bliadhna' },
- dayOfMonthOrdinalParse: /\d{1,2}(d|na|mh)/,
- ordinal: function ordinal(number) {
- var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh';
- return number + output;
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- } });
- return gd;
- });
- /***/ }),
- /* 68 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/gl.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Galician [gl]
- //! author : Juan G. Hurtado : https://github.com/juanghurtado
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var gl = moment.defineLocale('gl', {
- months: 'xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro'.split(
- '_'),
- monthsShort:
- 'xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.'.split(
- '_'),
- monthsParseExact: true,
- weekdays: 'domingo_luns_martes_mércores_xoves_venres_sábado'.split('_'),
- weekdaysShort: 'dom._lun._mar._mér._xov._ven._sáb.'.split('_'),
- weekdaysMin: 'do_lu_ma_mé_xo_ve_sá'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'H:mm',
- LTS: 'H:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D [de] MMMM [de] YYYY',
- LLL: 'D [de] MMMM [de] YYYY H:mm',
- LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm' },
- calendar: {
- sameDay: function sameDay() {
- return '[hoxe ' + (this.hours() !== 1 ? 'ás' : 'á') + '] LT';
- },
- nextDay: function nextDay() {
- return '[mañá ' + (this.hours() !== 1 ? 'ás' : 'á') + '] LT';
- },
- nextWeek: function nextWeek() {
- return 'dddd [' + (this.hours() !== 1 ? 'ás' : 'a') + '] LT';
- },
- lastDay: function lastDay() {
- return '[onte ' + (this.hours() !== 1 ? 'á' : 'a') + '] LT';
- },
- lastWeek: function lastWeek() {
- return (
- '[o] dddd [pasado ' + (this.hours() !== 1 ? 'ás' : 'a') + '] LT');
- },
- sameElse: 'L' },
- relativeTime: {
- future: function future(str) {
- if (str.indexOf('un') === 0) {
- return 'n' + str;
- }
- return 'en ' + str;
- },
- past: 'hai %s',
- s: 'uns segundos',
- ss: '%d segundos',
- m: 'un minuto',
- mm: '%d minutos',
- h: 'unha hora',
- hh: '%d horas',
- d: 'un día',
- dd: '%d días',
- M: 'un mes',
- MM: '%d meses',
- y: 'un ano',
- yy: '%d anos' },
- dayOfMonthOrdinalParse: /\d{1,2}º/,
- ordinal: '%dº',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- } });
- return gl;
- });
- /***/ }),
- /* 69 */
- /*!*********************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/gom-deva.js ***!
- \*********************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Konkani Devanagari script [gom-deva]
- //! author : The Discoverer : https://github.com/WikiDiscoverer
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- function processRelativeTime(number, withoutSuffix, key, isFuture) {
- var format = {
- s: ['थोडया सॅकंडांनी', 'थोडे सॅकंड'],
- ss: [number + ' सॅकंडांनी', number + ' सॅकंड'],
- m: ['एका मिणटान', 'एक मिनूट'],
- mm: [number + ' मिणटांनी', number + ' मिणटां'],
- h: ['एका वरान', 'एक वर'],
- hh: [number + ' वरांनी', number + ' वरां'],
- d: ['एका दिसान', 'एक दीस'],
- dd: [number + ' दिसांनी', number + ' दीस'],
- M: ['एका म्हयन्यान', 'एक म्हयनो'],
- MM: [number + ' म्हयन्यानी', number + ' म्हयने'],
- y: ['एका वर्सान', 'एक वर्स'],
- yy: [number + ' वर्सांनी', number + ' वर्सां'] };
- return isFuture ? format[key][0] : format[key][1];
- }
- var gomDeva = moment.defineLocale('gom-deva', {
- months: {
- standalone:
- 'जानेवारी_फेब्रुवारी_मार्च_एप्रील_मे_जून_जुलय_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split(
- '_'),
- format: 'जानेवारीच्या_फेब्रुवारीच्या_मार्चाच्या_एप्रीलाच्या_मेयाच्या_जूनाच्या_जुलयाच्या_ऑगस्टाच्या_सप्टेंबराच्या_ऑक्टोबराच्या_नोव्हेंबराच्या_डिसेंबराच्या'.split(
- '_'),
- isFormat: /MMMM(\s)+D[oD]?/ },
- monthsShort:
- 'जाने._फेब्रु._मार्च_एप्री._मे_जून_जुल._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split(
- '_'),
- monthsParseExact: true,
- weekdays: 'आयतार_सोमार_मंगळार_बुधवार_बिरेस्तार_सुक्रार_शेनवार'.split('_'),
- weekdaysShort: 'आयत._सोम._मंगळ._बुध._ब्रेस्त._सुक्र._शेन.'.split('_'),
- weekdaysMin: 'आ_सो_मं_बु_ब्रे_सु_शे'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'A h:mm [वाजतां]',
- LTS: 'A h:mm:ss [वाजतां]',
- L: 'DD-MM-YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY A h:mm [वाजतां]',
- LLLL: 'dddd, MMMM Do, YYYY, A h:mm [वाजतां]',
- llll: 'ddd, D MMM YYYY, A h:mm [वाजतां]' },
- calendar: {
- sameDay: '[आयज] LT',
- nextDay: '[फाल्यां] LT',
- nextWeek: '[फुडलो] dddd[,] LT',
- lastDay: '[काल] LT',
- lastWeek: '[फाटलो] dddd[,] LT',
- sameElse: 'L' },
- relativeTime: {
- future: '%s',
- past: '%s आदीं',
- s: processRelativeTime,
- ss: processRelativeTime,
- m: processRelativeTime,
- mm: processRelativeTime,
- h: processRelativeTime,
- hh: processRelativeTime,
- d: processRelativeTime,
- dd: processRelativeTime,
- M: processRelativeTime,
- MM: processRelativeTime,
- y: processRelativeTime,
- yy: processRelativeTime },
- dayOfMonthOrdinalParse: /\d{1,2}(वेर)/,
- ordinal: function ordinal(number, period) {
- switch (period) {
- // the ordinal 'वेर' only applies to day of the month
- case 'D':
- return number + 'वेर';
- default:
- case 'M':
- case 'Q':
- case 'DDD':
- case 'd':
- case 'w':
- case 'W':
- return number;}
- },
- week: {
- dow: 0, // Sunday is the first day of the week
- doy: 3 // The week that contains Jan 4th is the first week of the year (7 + 0 - 4)
- },
- meridiemParse: /राती|सकाळीं|दनपारां|सांजे/,
- meridiemHour: function meridiemHour(hour, meridiem) {
- if (hour === 12) {
- hour = 0;
- }
- if (meridiem === 'राती') {
- return hour < 4 ? hour : hour + 12;
- } else if (meridiem === 'सकाळीं') {
- return hour;
- } else if (meridiem === 'दनपारां') {
- return hour > 12 ? hour : hour + 12;
- } else if (meridiem === 'सांजे') {
- return hour + 12;
- }
- },
- meridiem: function meridiem(hour, minute, isLower) {
- if (hour < 4) {
- return 'राती';
- } else if (hour < 12) {
- return 'सकाळीं';
- } else if (hour < 16) {
- return 'दनपारां';
- } else if (hour < 20) {
- return 'सांजे';
- } else {
- return 'राती';
- }
- } });
- return gomDeva;
- });
- /***/ }),
- /* 70 */
- /*!*********************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/gom-latn.js ***!
- \*********************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Konkani Latin script [gom-latn]
- //! author : The Discoverer : https://github.com/WikiDiscoverer
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- function processRelativeTime(number, withoutSuffix, key, isFuture) {
- var format = {
- s: ['thoddea sekondamni', 'thodde sekond'],
- ss: [number + ' sekondamni', number + ' sekond'],
- m: ['eka mintan', 'ek minut'],
- mm: [number + ' mintamni', number + ' mintam'],
- h: ['eka voran', 'ek vor'],
- hh: [number + ' voramni', number + ' voram'],
- d: ['eka disan', 'ek dis'],
- dd: [number + ' disamni', number + ' dis'],
- M: ['eka mhoinean', 'ek mhoino'],
- MM: [number + ' mhoineamni', number + ' mhoine'],
- y: ['eka vorsan', 'ek voros'],
- yy: [number + ' vorsamni', number + ' vorsam'] };
- return isFuture ? format[key][0] : format[key][1];
- }
- var gomLatn = moment.defineLocale('gom-latn', {
- months: {
- standalone:
- 'Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr'.split(
- '_'),
- format: 'Janerachea_Febrerachea_Marsachea_Abrilachea_Maiachea_Junachea_Julaiachea_Agostachea_Setembrachea_Otubrachea_Novembrachea_Dezembrachea'.split(
- '_'),
- isFormat: /MMMM(\s)+D[oD]?/ },
- monthsShort:
- 'Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.'.split('_'),
- monthsParseExact: true,
- weekdays: "Aitar_Somar_Mongllar_Budhvar_Birestar_Sukrar_Son'var".split('_'),
- weekdaysShort: 'Ait._Som._Mon._Bud._Bre._Suk._Son.'.split('_'),
- weekdaysMin: 'Ai_Sm_Mo_Bu_Br_Su_Sn'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'A h:mm [vazta]',
- LTS: 'A h:mm:ss [vazta]',
- L: 'DD-MM-YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY A h:mm [vazta]',
- LLLL: 'dddd, MMMM Do, YYYY, A h:mm [vazta]',
- llll: 'ddd, D MMM YYYY, A h:mm [vazta]' },
- calendar: {
- sameDay: '[Aiz] LT',
- nextDay: '[Faleam] LT',
- nextWeek: '[Fuddlo] dddd[,] LT',
- lastDay: '[Kal] LT',
- lastWeek: '[Fattlo] dddd[,] LT',
- sameElse: 'L' },
- relativeTime: {
- future: '%s',
- past: '%s adim',
- s: processRelativeTime,
- ss: processRelativeTime,
- m: processRelativeTime,
- mm: processRelativeTime,
- h: processRelativeTime,
- hh: processRelativeTime,
- d: processRelativeTime,
- dd: processRelativeTime,
- M: processRelativeTime,
- MM: processRelativeTime,
- y: processRelativeTime,
- yy: processRelativeTime },
- dayOfMonthOrdinalParse: /\d{1,2}(er)/,
- ordinal: function ordinal(number, period) {
- switch (period) {
- // the ordinal 'er' only applies to day of the month
- case 'D':
- return number + 'er';
- default:
- case 'M':
- case 'Q':
- case 'DDD':
- case 'd':
- case 'w':
- case 'W':
- return number;}
- },
- week: {
- dow: 0, // Sunday is the first day of the week
- doy: 3 // The week that contains Jan 4th is the first week of the year (7 + 0 - 4)
- },
- meridiemParse: /rati|sokallim|donparam|sanje/,
- meridiemHour: function meridiemHour(hour, meridiem) {
- if (hour === 12) {
- hour = 0;
- }
- if (meridiem === 'rati') {
- return hour < 4 ? hour : hour + 12;
- } else if (meridiem === 'sokallim') {
- return hour;
- } else if (meridiem === 'donparam') {
- return hour > 12 ? hour : hour + 12;
- } else if (meridiem === 'sanje') {
- return hour + 12;
- }
- },
- meridiem: function meridiem(hour, minute, isLower) {
- if (hour < 4) {
- return 'rati';
- } else if (hour < 12) {
- return 'sokallim';
- } else if (hour < 16) {
- return 'donparam';
- } else if (hour < 20) {
- return 'sanje';
- } else {
- return 'rati';
- }
- } });
- return gomLatn;
- });
- /***/ }),
- /* 71 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/gu.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Gujarati [gu]
- //! author : Kaushik Thanki : https://github.com/Kaushik1987
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var symbolMap = {
- 1: '૧',
- 2: '૨',
- 3: '૩',
- 4: '૪',
- 5: '૫',
- 6: '૬',
- 7: '૭',
- 8: '૮',
- 9: '૯',
- 0: '૦' },
- numberMap = {
- '૧': '1',
- '૨': '2',
- '૩': '3',
- '૪': '4',
- '૫': '5',
- '૬': '6',
- '૭': '7',
- '૮': '8',
- '૯': '9',
- '૦': '0' };
- var gu = moment.defineLocale('gu', {
- months: 'જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર'.split(
- '_'),
- monthsShort:
- 'જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.'.split(
- '_'),
- monthsParseExact: true,
- weekdays: 'રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર'.split(
- '_'),
- weekdaysShort: 'રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ'.split('_'),
- weekdaysMin: 'ર_સો_મં_બુ_ગુ_શુ_શ'.split('_'),
- longDateFormat: {
- LT: 'A h:mm વાગ્યે',
- LTS: 'A h:mm:ss વાગ્યે',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY, A h:mm વાગ્યે',
- LLLL: 'dddd, D MMMM YYYY, A h:mm વાગ્યે' },
- calendar: {
- sameDay: '[આજ] LT',
- nextDay: '[કાલે] LT',
- nextWeek: 'dddd, LT',
- lastDay: '[ગઇકાલે] LT',
- lastWeek: '[પાછલા] dddd, LT',
- sameElse: 'L' },
- relativeTime: {
- future: '%s મા',
- past: '%s પહેલા',
- s: 'અમુક પળો',
- ss: '%d સેકંડ',
- m: 'એક મિનિટ',
- mm: '%d મિનિટ',
- h: 'એક કલાક',
- hh: '%d કલાક',
- d: 'એક દિવસ',
- dd: '%d દિવસ',
- M: 'એક મહિનો',
- MM: '%d મહિનો',
- y: 'એક વર્ષ',
- yy: '%d વર્ષ' },
- preparse: function preparse(string) {
- return string.replace(/[૧૨૩૪૫૬૭૮૯૦]/g, function (match) {
- return numberMap[match];
- });
- },
- postformat: function postformat(string) {
- return string.replace(/\d/g, function (match) {
- return symbolMap[match];
- });
- },
- // Gujarati notation for meridiems are quite fuzzy in practice. While there exists
- // a rigid notion of a 'Pahar' it is not used as rigidly in modern Gujarati.
- meridiemParse: /રાત|બપોર|સવાર|સાંજ/,
- meridiemHour: function meridiemHour(hour, meridiem) {
- if (hour === 12) {
- hour = 0;
- }
- if (meridiem === 'રાત') {
- return hour < 4 ? hour : hour + 12;
- } else if (meridiem === 'સવાર') {
- return hour;
- } else if (meridiem === 'બપોર') {
- return hour >= 10 ? hour : hour + 12;
- } else if (meridiem === 'સાંજ') {
- return hour + 12;
- }
- },
- meridiem: function meridiem(hour, minute, isLower) {
- if (hour < 4) {
- return 'રાત';
- } else if (hour < 10) {
- return 'સવાર';
- } else if (hour < 17) {
- return 'બપોર';
- } else if (hour < 20) {
- return 'સાંજ';
- } else {
- return 'રાત';
- }
- },
- week: {
- dow: 0, // Sunday is the first day of the week.
- doy: 6 // The week that contains Jan 6th is the first week of the year.
- } });
- return gu;
- });
- /***/ }),
- /* 72 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/he.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Hebrew [he]
- //! author : Tomer Cohen : https://github.com/tomer
- //! author : Moshe Simantov : https://github.com/DevelopmentIL
- //! author : Tal Ater : https://github.com/TalAter
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var he = moment.defineLocale('he', {
- months: 'ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר'.split(
- '_'),
- monthsShort:
- 'ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳'.split('_'),
- weekdays: 'ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת'.split('_'),
- weekdaysShort: 'א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳'.split('_'),
- weekdaysMin: 'א_ב_ג_ד_ה_ו_ש'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D [ב]MMMM YYYY',
- LLL: 'D [ב]MMMM YYYY HH:mm',
- LLLL: 'dddd, D [ב]MMMM YYYY HH:mm',
- l: 'D/M/YYYY',
- ll: 'D MMM YYYY',
- lll: 'D MMM YYYY HH:mm',
- llll: 'ddd, D MMM YYYY HH:mm' },
- calendar: {
- sameDay: '[היום ב־]LT',
- nextDay: '[מחר ב־]LT',
- nextWeek: 'dddd [בשעה] LT',
- lastDay: '[אתמול ב־]LT',
- lastWeek: '[ביום] dddd [האחרון בשעה] LT',
- sameElse: 'L' },
- relativeTime: {
- future: 'בעוד %s',
- past: 'לפני %s',
- s: 'מספר שניות',
- ss: '%d שניות',
- m: 'דקה',
- mm: '%d דקות',
- h: 'שעה',
- hh: function hh(number) {
- if (number === 2) {
- return 'שעתיים';
- }
- return number + ' שעות';
- },
- d: 'יום',
- dd: function dd(number) {
- if (number === 2) {
- return 'יומיים';
- }
- return number + ' ימים';
- },
- M: 'חודש',
- MM: function MM(number) {
- if (number === 2) {
- return 'חודשיים';
- }
- return number + ' חודשים';
- },
- y: 'שנה',
- yy: function yy(number) {
- if (number === 2) {
- return 'שנתיים';
- } else if (number % 10 === 0 && number !== 10) {
- return number + ' שנה';
- }
- return number + ' שנים';
- } },
- meridiemParse:
- /אחה"צ|לפנה"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,
- isPM: function isPM(input) {
- return /^(אחה"צ|אחרי הצהריים|בערב)$/.test(input);
- },
- meridiem: function meridiem(hour, minute, isLower) {
- if (hour < 5) {
- return 'לפנות בוקר';
- } else if (hour < 10) {
- return 'בבוקר';
- } else if (hour < 12) {
- return isLower ? 'לפנה"צ' : 'לפני הצהריים';
- } else if (hour < 18) {
- return isLower ? 'אחה"צ' : 'אחרי הצהריים';
- } else {
- return 'בערב';
- }
- } });
- return he;
- });
- /***/ }),
- /* 73 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/hi.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Hindi [hi]
- //! author : Mayank Singhal : https://github.com/mayanksinghal
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var symbolMap = {
- 1: '१',
- 2: '२',
- 3: '३',
- 4: '४',
- 5: '५',
- 6: '६',
- 7: '७',
- 8: '८',
- 9: '९',
- 0: '०' },
- numberMap = {
- '१': '1',
- '२': '2',
- '३': '3',
- '४': '4',
- '५': '5',
- '६': '6',
- '७': '7',
- '८': '8',
- '९': '9',
- '०': '0' },
- monthsParse = [
- /^जन/i,
- /^फ़र|फर/i,
- /^मार्च/i,
- /^अप्रै/i,
- /^मई/i,
- /^जून/i,
- /^जुल/i,
- /^अग/i,
- /^सितं|सित/i,
- /^अक्टू/i,
- /^नव|नवं/i,
- /^दिसं|दिस/i],
- shortMonthsParse = [
- /^जन/i,
- /^फ़र/i,
- /^मार्च/i,
- /^अप्रै/i,
- /^मई/i,
- /^जून/i,
- /^जुल/i,
- /^अग/i,
- /^सित/i,
- /^अक्टू/i,
- /^नव/i,
- /^दिस/i];
- var hi = moment.defineLocale('hi', {
- months: {
- format: 'जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर'.split(
- '_'),
- standalone:
- 'जनवरी_फरवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितंबर_अक्टूबर_नवंबर_दिसंबर'.split(
- '_') },
- monthsShort:
- 'जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.'.split('_'),
- weekdays: 'रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),
- weekdaysShort: 'रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि'.split('_'),
- weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'),
- longDateFormat: {
- LT: 'A h:mm बजे',
- LTS: 'A h:mm:ss बजे',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY, A h:mm बजे',
- LLLL: 'dddd, D MMMM YYYY, A h:mm बजे' },
- monthsParse: monthsParse,
- longMonthsParse: monthsParse,
- shortMonthsParse: shortMonthsParse,
- monthsRegex:
- /^(जनवरी|जन\.?|फ़रवरी|फरवरी|फ़र\.?|मार्च?|अप्रैल|अप्रै\.?|मई?|जून?|जुलाई|जुल\.?|अगस्त|अग\.?|सितम्बर|सितंबर|सित\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर|नव\.?|दिसम्बर|दिसंबर|दिस\.?)/i,
- monthsShortRegex:
- /^(जनवरी|जन\.?|फ़रवरी|फरवरी|फ़र\.?|मार्च?|अप्रैल|अप्रै\.?|मई?|जून?|जुलाई|जुल\.?|अगस्त|अग\.?|सितम्बर|सितंबर|सित\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर|नव\.?|दिसम्बर|दिसंबर|दिस\.?)/i,
- monthsStrictRegex:
- /^(जनवरी?|फ़रवरी|फरवरी?|मार्च?|अप्रैल?|मई?|जून?|जुलाई?|अगस्त?|सितम्बर|सितंबर|सित?\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर?|दिसम्बर|दिसंबर?)/i,
- monthsShortStrictRegex:
- /^(जन\.?|फ़र\.?|मार्च?|अप्रै\.?|मई?|जून?|जुल\.?|अग\.?|सित\.?|अक्टू\.?|नव\.?|दिस\.?)/i,
- calendar: {
- sameDay: '[आज] LT',
- nextDay: '[कल] LT',
- nextWeek: 'dddd, LT',
- lastDay: '[कल] LT',
- lastWeek: '[पिछले] dddd, LT',
- sameElse: 'L' },
- relativeTime: {
- future: '%s में',
- past: '%s पहले',
- s: 'कुछ ही क्षण',
- ss: '%d सेकंड',
- m: 'एक मिनट',
- mm: '%d मिनट',
- h: 'एक घंटा',
- hh: '%d घंटे',
- d: 'एक दिन',
- dd: '%d दिन',
- M: 'एक महीने',
- MM: '%d महीने',
- y: 'एक वर्ष',
- yy: '%d वर्ष' },
- preparse: function preparse(string) {
- return string.replace(/[१२३४५६७८९०]/g, function (match) {
- return numberMap[match];
- });
- },
- postformat: function postformat(string) {
- return string.replace(/\d/g, function (match) {
- return symbolMap[match];
- });
- },
- // Hindi notation for meridiems are quite fuzzy in practice. While there exists
- // a rigid notion of a 'Pahar' it is not used as rigidly in modern Hindi.
- meridiemParse: /रात|सुबह|दोपहर|शाम/,
- meridiemHour: function meridiemHour(hour, meridiem) {
- if (hour === 12) {
- hour = 0;
- }
- if (meridiem === 'रात') {
- return hour < 4 ? hour : hour + 12;
- } else if (meridiem === 'सुबह') {
- return hour;
- } else if (meridiem === 'दोपहर') {
- return hour >= 10 ? hour : hour + 12;
- } else if (meridiem === 'शाम') {
- return hour + 12;
- }
- },
- meridiem: function meridiem(hour, minute, isLower) {
- if (hour < 4) {
- return 'रात';
- } else if (hour < 10) {
- return 'सुबह';
- } else if (hour < 17) {
- return 'दोपहर';
- } else if (hour < 20) {
- return 'शाम';
- } else {
- return 'रात';
- }
- },
- week: {
- dow: 0, // Sunday is the first day of the week.
- doy: 6 // The week that contains Jan 6th is the first week of the year.
- } });
- return hi;
- });
- /***/ }),
- /* 74 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/hr.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Croatian [hr]
- //! author : Bojan Marković : https://github.com/bmarkovic
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- function translate(number, withoutSuffix, key) {
- var result = number + ' ';
- switch (key) {
- case 'ss':
- if (number === 1) {
- result += 'sekunda';
- } else if (number === 2 || number === 3 || number === 4) {
- result += 'sekunde';
- } else {
- result += 'sekundi';
- }
- return result;
- case 'm':
- return withoutSuffix ? 'jedna minuta' : 'jedne minute';
- case 'mm':
- if (number === 1) {
- result += 'minuta';
- } else if (number === 2 || number === 3 || number === 4) {
- result += 'minute';
- } else {
- result += 'minuta';
- }
- return result;
- case 'h':
- return withoutSuffix ? 'jedan sat' : 'jednog sata';
- case 'hh':
- if (number === 1) {
- result += 'sat';
- } else if (number === 2 || number === 3 || number === 4) {
- result += 'sata';
- } else {
- result += 'sati';
- }
- return result;
- case 'dd':
- if (number === 1) {
- result += 'dan';
- } else {
- result += 'dana';
- }
- return result;
- case 'MM':
- if (number === 1) {
- result += 'mjesec';
- } else if (number === 2 || number === 3 || number === 4) {
- result += 'mjeseca';
- } else {
- result += 'mjeseci';
- }
- return result;
- case 'yy':
- if (number === 1) {
- result += 'godina';
- } else if (number === 2 || number === 3 || number === 4) {
- result += 'godine';
- } else {
- result += 'godina';
- }
- return result;}
- }
- var hr = moment.defineLocale('hr', {
- months: {
- format: 'siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca'.split(
- '_'),
- standalone:
- 'siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac'.split(
- '_') },
- monthsShort:
- 'sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.'.split(
- '_'),
- monthsParseExact: true,
- weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(
- '_'),
- weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),
- weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'H:mm',
- LTS: 'H:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'Do MMMM YYYY',
- LLL: 'Do MMMM YYYY H:mm',
- LLLL: 'dddd, Do MMMM YYYY H:mm' },
- calendar: {
- sameDay: '[danas u] LT',
- nextDay: '[sutra u] LT',
- nextWeek: function nextWeek() {
- switch (this.day()) {
- case 0:
- return '[u] [nedjelju] [u] LT';
- case 3:
- return '[u] [srijedu] [u] LT';
- case 6:
- return '[u] [subotu] [u] LT';
- case 1:
- case 2:
- case 4:
- case 5:
- return '[u] dddd [u] LT';}
- },
- lastDay: '[jučer u] LT',
- lastWeek: function lastWeek() {
- switch (this.day()) {
- case 0:
- return '[prošlu] [nedjelju] [u] LT';
- case 3:
- return '[prošlu] [srijedu] [u] LT';
- case 6:
- return '[prošle] [subote] [u] LT';
- case 1:
- case 2:
- case 4:
- case 5:
- return '[prošli] dddd [u] LT';}
- },
- sameElse: 'L' },
- relativeTime: {
- future: 'za %s',
- past: 'prije %s',
- s: 'par sekundi',
- ss: translate,
- m: translate,
- mm: translate,
- h: translate,
- hh: translate,
- d: 'dan',
- dd: translate,
- M: 'mjesec',
- MM: translate,
- y: 'godinu',
- yy: translate },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 7 // The week that contains Jan 7th is the first week of the year.
- } });
- return hr;
- });
- /***/ }),
- /* 75 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/hu.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Hungarian [hu]
- //! author : Adam Brunner : https://github.com/adambrunner
- //! author : Peter Viszt : https://github.com/passatgt
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var weekEndings =
- 'vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton'.split(' ');
- function translate(number, withoutSuffix, key, isFuture) {
- var num = number;
- switch (key) {
- case 's':
- return isFuture || withoutSuffix ?
- 'néhány másodperc' :
- 'néhány másodperce';
- case 'ss':
- return num + (isFuture || withoutSuffix) ?
- ' másodperc' :
- ' másodperce';
- case 'm':
- return 'egy' + (isFuture || withoutSuffix ? ' perc' : ' perce');
- case 'mm':
- return num + (isFuture || withoutSuffix ? ' perc' : ' perce');
- case 'h':
- return 'egy' + (isFuture || withoutSuffix ? ' óra' : ' órája');
- case 'hh':
- return num + (isFuture || withoutSuffix ? ' óra' : ' órája');
- case 'd':
- return 'egy' + (isFuture || withoutSuffix ? ' nap' : ' napja');
- case 'dd':
- return num + (isFuture || withoutSuffix ? ' nap' : ' napja');
- case 'M':
- return 'egy' + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');
- case 'MM':
- return num + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');
- case 'y':
- return 'egy' + (isFuture || withoutSuffix ? ' év' : ' éve');
- case 'yy':
- return num + (isFuture || withoutSuffix ? ' év' : ' éve');}
- return '';
- }
- function week(isFuture) {
- return (
- (isFuture ? '' : '[múlt] ') +
- '[' +
- weekEndings[this.day()] +
- '] LT[-kor]');
- }
- var hu = moment.defineLocale('hu', {
- months: 'január_február_március_április_május_június_július_augusztus_szeptember_október_november_december'.split(
- '_'),
- monthsShort:
- 'jan._feb._márc._ápr._máj._jún._júl._aug._szept._okt._nov._dec.'.split(
- '_'),
- monthsParseExact: true,
- weekdays: 'vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat'.split('_'),
- weekdaysShort: 'vas_hét_kedd_sze_csüt_pén_szo'.split('_'),
- weekdaysMin: 'v_h_k_sze_cs_p_szo'.split('_'),
- longDateFormat: {
- LT: 'H:mm',
- LTS: 'H:mm:ss',
- L: 'YYYY.MM.DD.',
- LL: 'YYYY. MMMM D.',
- LLL: 'YYYY. MMMM D. H:mm',
- LLLL: 'YYYY. MMMM D., dddd H:mm' },
- meridiemParse: /de|du/i,
- isPM: function isPM(input) {
- return input.charAt(1).toLowerCase() === 'u';
- },
- meridiem: function meridiem(hours, minutes, isLower) {
- if (hours < 12) {
- return isLower === true ? 'de' : 'DE';
- } else {
- return isLower === true ? 'du' : 'DU';
- }
- },
- calendar: {
- sameDay: '[ma] LT[-kor]',
- nextDay: '[holnap] LT[-kor]',
- nextWeek: function nextWeek() {
- return week.call(this, true);
- },
- lastDay: '[tegnap] LT[-kor]',
- lastWeek: function lastWeek() {
- return week.call(this, false);
- },
- sameElse: 'L' },
- relativeTime: {
- future: '%s múlva',
- past: '%s',
- s: translate,
- ss: translate,
- m: translate,
- mm: translate,
- h: translate,
- hh: translate,
- d: translate,
- dd: translate,
- M: translate,
- MM: translate,
- y: translate,
- yy: translate },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- } });
- return hu;
- });
- /***/ }),
- /* 76 */
- /*!******************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/hy-am.js ***!
- \******************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Armenian [hy-am]
- //! author : Armendarabyan : https://github.com/armendarabyan
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var hyAm = moment.defineLocale('hy-am', {
- months: {
- format: 'հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի'.split(
- '_'),
- standalone:
- 'հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր'.split(
- '_') },
- monthsShort: 'հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ'.split('_'),
- weekdays:
- 'կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ'.split(
- '_'),
- weekdaysShort: 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),
- weekdaysMin: 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D MMMM YYYY թ.',
- LLL: 'D MMMM YYYY թ., HH:mm',
- LLLL: 'dddd, D MMMM YYYY թ., HH:mm' },
- calendar: {
- sameDay: '[այսօր] LT',
- nextDay: '[վաղը] LT',
- lastDay: '[երեկ] LT',
- nextWeek: function nextWeek() {
- return 'dddd [օրը ժամը] LT';
- },
- lastWeek: function lastWeek() {
- return '[անցած] dddd [օրը ժամը] LT';
- },
- sameElse: 'L' },
- relativeTime: {
- future: '%s հետո',
- past: '%s առաջ',
- s: 'մի քանի վայրկյան',
- ss: '%d վայրկյան',
- m: 'րոպե',
- mm: '%d րոպե',
- h: 'ժամ',
- hh: '%d ժամ',
- d: 'օր',
- dd: '%d օր',
- M: 'ամիս',
- MM: '%d ամիս',
- y: 'տարի',
- yy: '%d տարի' },
- meridiemParse: /գիշերվա|առավոտվա|ցերեկվա|երեկոյան/,
- isPM: function isPM(input) {
- return /^(ցերեկվա|երեկոյան)$/.test(input);
- },
- meridiem: function meridiem(hour) {
- if (hour < 4) {
- return 'գիշերվա';
- } else if (hour < 12) {
- return 'առավոտվա';
- } else if (hour < 17) {
- return 'ցերեկվա';
- } else {
- return 'երեկոյան';
- }
- },
- dayOfMonthOrdinalParse: /\d{1,2}|\d{1,2}-(ին|րդ)/,
- ordinal: function ordinal(number, period) {
- switch (period) {
- case 'DDD':
- case 'w':
- case 'W':
- case 'DDDo':
- if (number === 1) {
- return number + '-ին';
- }
- return number + '-րդ';
- default:
- return number;}
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 7 // The week that contains Jan 7th is the first week of the year.
- } });
- return hyAm;
- });
- /***/ }),
- /* 77 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/id.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Indonesian [id]
- //! author : Mohammad Satrio Utomo : https://github.com/tyok
- //! reference: http://id.wikisource.org/wiki/Pedoman_Umum_Ejaan_Bahasa_Indonesia_yang_Disempurnakan
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var id = moment.defineLocale('id', {
- months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember'.split(
- '_'),
- monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des'.split('_'),
- weekdays: 'Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu'.split('_'),
- weekdaysShort: 'Min_Sen_Sel_Rab_Kam_Jum_Sab'.split('_'),
- weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sb'.split('_'),
- longDateFormat: {
- LT: 'HH.mm',
- LTS: 'HH.mm.ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY [pukul] HH.mm',
- LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm' },
- meridiemParse: /pagi|siang|sore|malam/,
- meridiemHour: function meridiemHour(hour, meridiem) {
- if (hour === 12) {
- hour = 0;
- }
- if (meridiem === 'pagi') {
- return hour;
- } else if (meridiem === 'siang') {
- return hour >= 11 ? hour : hour + 12;
- } else if (meridiem === 'sore' || meridiem === 'malam') {
- return hour + 12;
- }
- },
- meridiem: function meridiem(hours, minutes, isLower) {
- if (hours < 11) {
- return 'pagi';
- } else if (hours < 15) {
- return 'siang';
- } else if (hours < 19) {
- return 'sore';
- } else {
- return 'malam';
- }
- },
- calendar: {
- sameDay: '[Hari ini pukul] LT',
- nextDay: '[Besok pukul] LT',
- nextWeek: 'dddd [pukul] LT',
- lastDay: '[Kemarin pukul] LT',
- lastWeek: 'dddd [lalu pukul] LT',
- sameElse: 'L' },
- relativeTime: {
- future: 'dalam %s',
- past: '%s yang lalu',
- s: 'beberapa detik',
- ss: '%d detik',
- m: 'semenit',
- mm: '%d menit',
- h: 'sejam',
- hh: '%d jam',
- d: 'sehari',
- dd: '%d hari',
- M: 'sebulan',
- MM: '%d bulan',
- y: 'setahun',
- yy: '%d tahun' },
- week: {
- dow: 0, // Sunday is the first day of the week.
- doy: 6 // The week that contains Jan 6th is the first week of the year.
- } });
- return id;
- });
- /***/ }),
- /* 78 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/is.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Icelandic [is]
- //! author : Hinrik Örn Sigurðsson : https://github.com/hinrik
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- function plural(n) {
- if (n % 100 === 11) {
- return true;
- } else if (n % 10 === 1) {
- return false;
- }
- return true;
- }
- function translate(number, withoutSuffix, key, isFuture) {
- var result = number + ' ';
- switch (key) {
- case 's':
- return withoutSuffix || isFuture ?
- 'nokkrar sekúndur' :
- 'nokkrum sekúndum';
- case 'ss':
- if (plural(number)) {
- return (
- result + (
- withoutSuffix || isFuture ? 'sekúndur' : 'sekúndum'));
- }
- return result + 'sekúnda';
- case 'm':
- return withoutSuffix ? 'mínúta' : 'mínútu';
- case 'mm':
- if (plural(number)) {
- return (
- result + (withoutSuffix || isFuture ? 'mínútur' : 'mínútum'));
- } else if (withoutSuffix) {
- return result + 'mínúta';
- }
- return result + 'mínútu';
- case 'hh':
- if (plural(number)) {
- return (
- result + (
- withoutSuffix || isFuture ?
- 'klukkustundir' :
- 'klukkustundum'));
- }
- return result + 'klukkustund';
- case 'd':
- if (withoutSuffix) {
- return 'dagur';
- }
- return isFuture ? 'dag' : 'degi';
- case 'dd':
- if (plural(number)) {
- if (withoutSuffix) {
- return result + 'dagar';
- }
- return result + (isFuture ? 'daga' : 'dögum');
- } else if (withoutSuffix) {
- return result + 'dagur';
- }
- return result + (isFuture ? 'dag' : 'degi');
- case 'M':
- if (withoutSuffix) {
- return 'mánuður';
- }
- return isFuture ? 'mánuð' : 'mánuði';
- case 'MM':
- if (plural(number)) {
- if (withoutSuffix) {
- return result + 'mánuðir';
- }
- return result + (isFuture ? 'mánuði' : 'mánuðum');
- } else if (withoutSuffix) {
- return result + 'mánuður';
- }
- return result + (isFuture ? 'mánuð' : 'mánuði');
- case 'y':
- return withoutSuffix || isFuture ? 'ár' : 'ári';
- case 'yy':
- if (plural(number)) {
- return result + (withoutSuffix || isFuture ? 'ár' : 'árum');
- }
- return result + (withoutSuffix || isFuture ? 'ár' : 'ári');}
- }
- var is = moment.defineLocale('is', {
- months: 'janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember'.split(
- '_'),
- monthsShort: 'jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des'.split('_'),
- weekdays:
- 'sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur'.split(
- '_'),
- weekdaysShort: 'sun_mán_þri_mið_fim_fös_lau'.split('_'),
- weekdaysMin: 'Su_Má_Þr_Mi_Fi_Fö_La'.split('_'),
- longDateFormat: {
- LT: 'H:mm',
- LTS: 'H:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D. MMMM YYYY',
- LLL: 'D. MMMM YYYY [kl.] H:mm',
- LLLL: 'dddd, D. MMMM YYYY [kl.] H:mm' },
- calendar: {
- sameDay: '[í dag kl.] LT',
- nextDay: '[á morgun kl.] LT',
- nextWeek: 'dddd [kl.] LT',
- lastDay: '[í gær kl.] LT',
- lastWeek: '[síðasta] dddd [kl.] LT',
- sameElse: 'L' },
- relativeTime: {
- future: 'eftir %s',
- past: 'fyrir %s síðan',
- s: translate,
- ss: translate,
- m: translate,
- mm: translate,
- h: 'klukkustund',
- hh: translate,
- d: translate,
- dd: translate,
- M: translate,
- MM: translate,
- y: translate,
- yy: translate },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- } });
- return is;
- });
- /***/ }),
- /* 79 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/it.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Italian [it]
- //! author : Lorenzo : https://github.com/aliem
- //! author: Mattia Larentis: https://github.com/nostalgiaz
- //! author: Marco : https://github.com/Manfre98
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var it = moment.defineLocale('it', {
- months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split(
- '_'),
- monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),
- weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split(
- '_'),
- weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'),
- weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd D MMMM YYYY HH:mm' },
- calendar: {
- sameDay: function sameDay() {
- return (
- '[Oggi a' + (
- this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") +
- ']LT');
- },
- nextDay: function nextDay() {
- return (
- '[Domani a' + (
- this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") +
- ']LT');
- },
- nextWeek: function nextWeek() {
- return (
- 'dddd [a' + (
- this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") +
- ']LT');
- },
- lastDay: function lastDay() {
- return (
- '[Ieri a' + (
- this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") +
- ']LT');
- },
- lastWeek: function lastWeek() {
- switch (this.day()) {
- case 0:
- return (
- '[La scorsa] dddd [a' + (
- this.hours() > 1 ?
- 'lle ' :
- this.hours() === 0 ?
- ' ' :
- "ll'") +
- ']LT');
- default:
- return (
- '[Lo scorso] dddd [a' + (
- this.hours() > 1 ?
- 'lle ' :
- this.hours() === 0 ?
- ' ' :
- "ll'") +
- ']LT');}
- },
- sameElse: 'L' },
- relativeTime: {
- future: 'tra %s',
- past: '%s fa',
- s: 'alcuni secondi',
- ss: '%d secondi',
- m: 'un minuto',
- mm: '%d minuti',
- h: "un'ora",
- hh: '%d ore',
- d: 'un giorno',
- dd: '%d giorni',
- w: 'una settimana',
- ww: '%d settimane',
- M: 'un mese',
- MM: '%d mesi',
- y: 'un anno',
- yy: '%d anni' },
- dayOfMonthOrdinalParse: /\d{1,2}º/,
- ordinal: '%dº',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- } });
- return it;
- });
- /***/ }),
- /* 80 */
- /*!******************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/it-ch.js ***!
- \******************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Italian (Switzerland) [it-ch]
- //! author : xfh : https://github.com/xfh
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var itCh = moment.defineLocale('it-ch', {
- months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split(
- '_'),
- monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),
- weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split(
- '_'),
- weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'),
- weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd D MMMM YYYY HH:mm' },
- calendar: {
- sameDay: '[Oggi alle] LT',
- nextDay: '[Domani alle] LT',
- nextWeek: 'dddd [alle] LT',
- lastDay: '[Ieri alle] LT',
- lastWeek: function lastWeek() {
- switch (this.day()) {
- case 0:
- return '[la scorsa] dddd [alle] LT';
- default:
- return '[lo scorso] dddd [alle] LT';}
- },
- sameElse: 'L' },
- relativeTime: {
- future: function future(s) {
- return (/^[0-9].+$/.test(s) ? 'tra' : 'in') + ' ' + s;
- },
- past: '%s fa',
- s: 'alcuni secondi',
- ss: '%d secondi',
- m: 'un minuto',
- mm: '%d minuti',
- h: "un'ora",
- hh: '%d ore',
- d: 'un giorno',
- dd: '%d giorni',
- M: 'un mese',
- MM: '%d mesi',
- y: 'un anno',
- yy: '%d anni' },
- dayOfMonthOrdinalParse: /\d{1,2}º/,
- ordinal: '%dº',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- } });
- return itCh;
- });
- /***/ }),
- /* 81 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/ja.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Japanese [ja]
- //! author : LI Long : https://github.com/baryon
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var ja = moment.defineLocale('ja', {
- eras: [
- {
- since: '2019-05-01',
- offset: 1,
- name: '令和',
- narrow: '㋿',
- abbr: 'R' },
- {
- since: '1989-01-08',
- until: '2019-04-30',
- offset: 1,
- name: '平成',
- narrow: '㍻',
- abbr: 'H' },
- {
- since: '1926-12-25',
- until: '1989-01-07',
- offset: 1,
- name: '昭和',
- narrow: '㍼',
- abbr: 'S' },
- {
- since: '1912-07-30',
- until: '1926-12-24',
- offset: 1,
- name: '大正',
- narrow: '㍽',
- abbr: 'T' },
- {
- since: '1873-01-01',
- until: '1912-07-29',
- offset: 6,
- name: '明治',
- narrow: '㍾',
- abbr: 'M' },
- {
- since: '0001-01-01',
- until: '1873-12-31',
- offset: 1,
- name: '西暦',
- narrow: 'AD',
- abbr: 'AD' },
- {
- since: '0000-12-31',
- until: -Infinity,
- offset: 1,
- name: '紀元前',
- narrow: 'BC',
- abbr: 'BC' }],
- eraYearOrdinalRegex: /(元|\d+)年/,
- eraYearOrdinalParse: function eraYearOrdinalParse(input, match) {
- return match[1] === '元' ? 1 : parseInt(match[1] || input, 10);
- },
- months: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
- monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
- '_'),
- weekdays: '日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日'.split('_'),
- weekdaysShort: '日_月_火_水_木_金_土'.split('_'),
- weekdaysMin: '日_月_火_水_木_金_土'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'YYYY/MM/DD',
- LL: 'YYYY年M月D日',
- LLL: 'YYYY年M月D日 HH:mm',
- LLLL: 'YYYY年M月D日 dddd HH:mm',
- l: 'YYYY/MM/DD',
- ll: 'YYYY年M月D日',
- lll: 'YYYY年M月D日 HH:mm',
- llll: 'YYYY年M月D日(ddd) HH:mm' },
- meridiemParse: /午前|午後/i,
- isPM: function isPM(input) {
- return input === '午後';
- },
- meridiem: function meridiem(hour, minute, isLower) {
- if (hour < 12) {
- return '午前';
- } else {
- return '午後';
- }
- },
- calendar: {
- sameDay: '[今日] LT',
- nextDay: '[明日] LT',
- nextWeek: function nextWeek(now) {
- if (now.week() !== this.week()) {
- return '[来週]dddd LT';
- } else {
- return 'dddd LT';
- }
- },
- lastDay: '[昨日] LT',
- lastWeek: function lastWeek(now) {
- if (this.week() !== now.week()) {
- return '[先週]dddd LT';
- } else {
- return 'dddd LT';
- }
- },
- sameElse: 'L' },
- dayOfMonthOrdinalParse: /\d{1,2}日/,
- ordinal: function ordinal(number, period) {
- switch (period) {
- case 'y':
- return number === 1 ? '元年' : number + '年';
- case 'd':
- case 'D':
- case 'DDD':
- return number + '日';
- default:
- return number;}
- },
- relativeTime: {
- future: '%s後',
- past: '%s前',
- s: '数秒',
- ss: '%d秒',
- m: '1分',
- mm: '%d分',
- h: '1時間',
- hh: '%d時間',
- d: '1日',
- dd: '%d日',
- M: '1ヶ月',
- MM: '%dヶ月',
- y: '1年',
- yy: '%d年' } });
- return ja;
- });
- /***/ }),
- /* 82 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/jv.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Javanese [jv]
- //! author : Rony Lantip : https://github.com/lantip
- //! reference: http://jv.wikipedia.org/wiki/Basa_Jawa
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var jv = moment.defineLocale('jv', {
- months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember'.split(
- '_'),
- monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des'.split('_'),
- weekdays: 'Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu'.split('_'),
- weekdaysShort: 'Min_Sen_Sel_Reb_Kem_Jem_Sep'.split('_'),
- weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sp'.split('_'),
- longDateFormat: {
- LT: 'HH.mm',
- LTS: 'HH.mm.ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY [pukul] HH.mm',
- LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm' },
- meridiemParse: /enjing|siyang|sonten|ndalu/,
- meridiemHour: function meridiemHour(hour, meridiem) {
- if (hour === 12) {
- hour = 0;
- }
- if (meridiem === 'enjing') {
- return hour;
- } else if (meridiem === 'siyang') {
- return hour >= 11 ? hour : hour + 12;
- } else if (meridiem === 'sonten' || meridiem === 'ndalu') {
- return hour + 12;
- }
- },
- meridiem: function meridiem(hours, minutes, isLower) {
- if (hours < 11) {
- return 'enjing';
- } else if (hours < 15) {
- return 'siyang';
- } else if (hours < 19) {
- return 'sonten';
- } else {
- return 'ndalu';
- }
- },
- calendar: {
- sameDay: '[Dinten puniko pukul] LT',
- nextDay: '[Mbenjang pukul] LT',
- nextWeek: 'dddd [pukul] LT',
- lastDay: '[Kala wingi pukul] LT',
- lastWeek: 'dddd [kepengker pukul] LT',
- sameElse: 'L' },
- relativeTime: {
- future: 'wonten ing %s',
- past: '%s ingkang kepengker',
- s: 'sawetawis detik',
- ss: '%d detik',
- m: 'setunggal menit',
- mm: '%d menit',
- h: 'setunggal jam',
- hh: '%d jam',
- d: 'sedinten',
- dd: '%d dinten',
- M: 'sewulan',
- MM: '%d wulan',
- y: 'setaun',
- yy: '%d taun' },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 7 // The week that contains Jan 7th is the first week of the year.
- } });
- return jv;
- });
- /***/ }),
- /* 83 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/ka.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Georgian [ka]
- //! author : Irakli Janiashvili : https://github.com/IrakliJani
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var ka = moment.defineLocale('ka', {
- months: 'იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი'.split(
- '_'),
- monthsShort: 'იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ'.split('_'),
- weekdays: {
- standalone:
- 'კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი'.split(
- '_'),
- format: 'კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს'.split(
- '_'),
- isFormat: /(წინა|შემდეგ)/ },
- weekdaysShort: 'კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ'.split('_'),
- weekdaysMin: 'კვ_ორ_სა_ოთ_ხუ_პა_შა'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd, D MMMM YYYY HH:mm' },
- calendar: {
- sameDay: '[დღეს] LT[-ზე]',
- nextDay: '[ხვალ] LT[-ზე]',
- lastDay: '[გუშინ] LT[-ზე]',
- nextWeek: '[შემდეგ] dddd LT[-ზე]',
- lastWeek: '[წინა] dddd LT-ზე',
- sameElse: 'L' },
- relativeTime: {
- future: function future(s) {
- return s.replace(
- /(წამ|წუთ|საათ|წელ|დღ|თვ)(ი|ე)/,
- function ($0, $1, $2) {
- return $2 === 'ი' ? $1 + 'ში' : $1 + $2 + 'ში';
- });
- },
- past: function past(s) {
- if (/(წამი|წუთი|საათი|დღე|თვე)/.test(s)) {
- return s.replace(/(ი|ე)$/, 'ის წინ');
- }
- if (/წელი/.test(s)) {
- return s.replace(/წელი$/, 'წლის წინ');
- }
- return s;
- },
- s: 'რამდენიმე წამი',
- ss: '%d წამი',
- m: 'წუთი',
- mm: '%d წუთი',
- h: 'საათი',
- hh: '%d საათი',
- d: 'დღე',
- dd: '%d დღე',
- M: 'თვე',
- MM: '%d თვე',
- y: 'წელი',
- yy: '%d წელი' },
- dayOfMonthOrdinalParse: /0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/,
- ordinal: function ordinal(number) {
- if (number === 0) {
- return number;
- }
- if (number === 1) {
- return number + '-ლი';
- }
- if (
- number < 20 ||
- number <= 100 && number % 20 === 0 ||
- number % 100 === 0)
- {
- return 'მე-' + number;
- }
- return number + '-ე';
- },
- week: {
- dow: 1,
- doy: 7 } });
- return ka;
- });
- /***/ }),
- /* 84 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/kk.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Kazakh [kk]
- //! authors : Nurlan Rakhimzhanov : https://github.com/nurlan
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var suffixes = {
- 0: '-ші',
- 1: '-ші',
- 2: '-ші',
- 3: '-ші',
- 4: '-ші',
- 5: '-ші',
- 6: '-шы',
- 7: '-ші',
- 8: '-ші',
- 9: '-шы',
- 10: '-шы',
- 20: '-шы',
- 30: '-шы',
- 40: '-шы',
- 50: '-ші',
- 60: '-шы',
- 70: '-ші',
- 80: '-ші',
- 90: '-шы',
- 100: '-ші' };
- var kk = moment.defineLocale('kk', {
- months: 'қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан'.split(
- '_'),
- monthsShort: 'қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел'.split('_'),
- weekdays: 'жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі'.split(
- '_'),
- weekdaysShort: 'жек_дүй_сей_сәр_бей_жұм_сен'.split('_'),
- weekdaysMin: 'жк_дй_сй_ср_бй_жм_сн'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd, D MMMM YYYY HH:mm' },
- calendar: {
- sameDay: '[Бүгін сағат] LT',
- nextDay: '[Ертең сағат] LT',
- nextWeek: 'dddd [сағат] LT',
- lastDay: '[Кеше сағат] LT',
- lastWeek: '[Өткен аптаның] dddd [сағат] LT',
- sameElse: 'L' },
- relativeTime: {
- future: '%s ішінде',
- past: '%s бұрын',
- s: 'бірнеше секунд',
- ss: '%d секунд',
- m: 'бір минут',
- mm: '%d минут',
- h: 'бір сағат',
- hh: '%d сағат',
- d: 'бір күн',
- dd: '%d күн',
- M: 'бір ай',
- MM: '%d ай',
- y: 'бір жыл',
- yy: '%d жыл' },
- dayOfMonthOrdinalParse: /\d{1,2}-(ші|шы)/,
- ordinal: function ordinal(number) {
- var a = number % 10,
- b = number >= 100 ? 100 : null;
- return number + (suffixes[number] || suffixes[a] || suffixes[b]);
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 7 // The week that contains Jan 7th is the first week of the year.
- } });
- return kk;
- });
- /***/ }),
- /* 85 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/km.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Cambodian [km]
- //! author : Kruy Vanna : https://github.com/kruyvanna
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var symbolMap = {
- 1: '១',
- 2: '២',
- 3: '៣',
- 4: '៤',
- 5: '៥',
- 6: '៦',
- 7: '៧',
- 8: '៨',
- 9: '៩',
- 0: '០' },
- numberMap = {
- '១': '1',
- '២': '2',
- '៣': '3',
- '៤': '4',
- '៥': '5',
- '៦': '6',
- '៧': '7',
- '៨': '8',
- '៩': '9',
- '០': '0' };
- var km = moment.defineLocale('km', {
- months: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split(
- '_'),
- monthsShort:
- 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split(
- '_'),
- weekdays: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'),
- weekdaysShort: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'),
- weekdaysMin: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd, D MMMM YYYY HH:mm' },
- meridiemParse: /ព្រឹក|ល្ងាច/,
- isPM: function isPM(input) {
- return input === 'ល្ងាច';
- },
- meridiem: function meridiem(hour, minute, isLower) {
- if (hour < 12) {
- return 'ព្រឹក';
- } else {
- return 'ល្ងាច';
- }
- },
- calendar: {
- sameDay: '[ថ្ងៃនេះ ម៉ោង] LT',
- nextDay: '[ស្អែក ម៉ោង] LT',
- nextWeek: 'dddd [ម៉ោង] LT',
- lastDay: '[ម្សិលមិញ ម៉ោង] LT',
- lastWeek: 'dddd [សប្តាហ៍មុន] [ម៉ោង] LT',
- sameElse: 'L' },
- relativeTime: {
- future: '%sទៀត',
- past: '%sមុន',
- s: 'ប៉ុន្មានវិនាទី',
- ss: '%d វិនាទី',
- m: 'មួយនាទី',
- mm: '%d នាទី',
- h: 'មួយម៉ោង',
- hh: '%d ម៉ោង',
- d: 'មួយថ្ងៃ',
- dd: '%d ថ្ងៃ',
- M: 'មួយខែ',
- MM: '%d ខែ',
- y: 'មួយឆ្នាំ',
- yy: '%d ឆ្នាំ' },
- dayOfMonthOrdinalParse: /ទី\d{1,2}/,
- ordinal: 'ទី%d',
- preparse: function preparse(string) {
- return string.replace(/[១២៣៤៥៦៧៨៩០]/g, function (match) {
- return numberMap[match];
- });
- },
- postformat: function postformat(string) {
- return string.replace(/\d/g, function (match) {
- return symbolMap[match];
- });
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- } });
- return km;
- });
- /***/ }),
- /* 86 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/kn.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Kannada [kn]
- //! author : Rajeev Naik : https://github.com/rajeevnaikte
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var symbolMap = {
- 1: '೧',
- 2: '೨',
- 3: '೩',
- 4: '೪',
- 5: '೫',
- 6: '೬',
- 7: '೭',
- 8: '೮',
- 9: '೯',
- 0: '೦' },
- numberMap = {
- '೧': '1',
- '೨': '2',
- '೩': '3',
- '೪': '4',
- '೫': '5',
- '೬': '6',
- '೭': '7',
- '೮': '8',
- '೯': '9',
- '೦': '0' };
- var kn = moment.defineLocale('kn', {
- months: 'ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್'.split(
- '_'),
- monthsShort:
- 'ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂ_ಅಕ್ಟೋ_ನವೆಂ_ಡಿಸೆಂ'.split(
- '_'),
- monthsParseExact: true,
- weekdays: 'ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ'.split(
- '_'),
- weekdaysShort: 'ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ'.split('_'),
- weekdaysMin: 'ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ'.split('_'),
- longDateFormat: {
- LT: 'A h:mm',
- LTS: 'A h:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY, A h:mm',
- LLLL: 'dddd, D MMMM YYYY, A h:mm' },
- calendar: {
- sameDay: '[ಇಂದು] LT',
- nextDay: '[ನಾಳೆ] LT',
- nextWeek: 'dddd, LT',
- lastDay: '[ನಿನ್ನೆ] LT',
- lastWeek: '[ಕೊನೆಯ] dddd, LT',
- sameElse: 'L' },
- relativeTime: {
- future: '%s ನಂತರ',
- past: '%s ಹಿಂದೆ',
- s: 'ಕೆಲವು ಕ್ಷಣಗಳು',
- ss: '%d ಸೆಕೆಂಡುಗಳು',
- m: 'ಒಂದು ನಿಮಿಷ',
- mm: '%d ನಿಮಿಷ',
- h: 'ಒಂದು ಗಂಟೆ',
- hh: '%d ಗಂಟೆ',
- d: 'ಒಂದು ದಿನ',
- dd: '%d ದಿನ',
- M: 'ಒಂದು ತಿಂಗಳು',
- MM: '%d ತಿಂಗಳು',
- y: 'ಒಂದು ವರ್ಷ',
- yy: '%d ವರ್ಷ' },
- preparse: function preparse(string) {
- return string.replace(/[೧೨೩೪೫೬೭೮೯೦]/g, function (match) {
- return numberMap[match];
- });
- },
- postformat: function postformat(string) {
- return string.replace(/\d/g, function (match) {
- return symbolMap[match];
- });
- },
- meridiemParse: /ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/,
- meridiemHour: function meridiemHour(hour, meridiem) {
- if (hour === 12) {
- hour = 0;
- }
- if (meridiem === 'ರಾತ್ರಿ') {
- return hour < 4 ? hour : hour + 12;
- } else if (meridiem === 'ಬೆಳಿಗ್ಗೆ') {
- return hour;
- } else if (meridiem === 'ಮಧ್ಯಾಹ್ನ') {
- return hour >= 10 ? hour : hour + 12;
- } else if (meridiem === 'ಸಂಜೆ') {
- return hour + 12;
- }
- },
- meridiem: function meridiem(hour, minute, isLower) {
- if (hour < 4) {
- return 'ರಾತ್ರಿ';
- } else if (hour < 10) {
- return 'ಬೆಳಿಗ್ಗೆ';
- } else if (hour < 17) {
- return 'ಮಧ್ಯಾಹ್ನ';
- } else if (hour < 20) {
- return 'ಸಂಜೆ';
- } else {
- return 'ರಾತ್ರಿ';
- }
- },
- dayOfMonthOrdinalParse: /\d{1,2}(ನೇ)/,
- ordinal: function ordinal(number) {
- return number + 'ನೇ';
- },
- week: {
- dow: 0, // Sunday is the first day of the week.
- doy: 6 // The week that contains Jan 6th is the first week of the year.
- } });
- return kn;
- });
- /***/ }),
- /* 87 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/ko.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Korean [ko]
- //! author : Kyungwook, Park : https://github.com/kyungw00k
- //! author : Jeeeyul Lee <jeeeyul@gmail.com>
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var ko = moment.defineLocale('ko', {
- months: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'),
- monthsShort: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split(
- '_'),
- weekdays: '일요일_월요일_화요일_수요일_목요일_금요일_토요일'.split('_'),
- weekdaysShort: '일_월_화_수_목_금_토'.split('_'),
- weekdaysMin: '일_월_화_수_목_금_토'.split('_'),
- longDateFormat: {
- LT: 'A h:mm',
- LTS: 'A h:mm:ss',
- L: 'YYYY.MM.DD.',
- LL: 'YYYY년 MMMM D일',
- LLL: 'YYYY년 MMMM D일 A h:mm',
- LLLL: 'YYYY년 MMMM D일 dddd A h:mm',
- l: 'YYYY.MM.DD.',
- ll: 'YYYY년 MMMM D일',
- lll: 'YYYY년 MMMM D일 A h:mm',
- llll: 'YYYY년 MMMM D일 dddd A h:mm' },
- calendar: {
- sameDay: '오늘 LT',
- nextDay: '내일 LT',
- nextWeek: 'dddd LT',
- lastDay: '어제 LT',
- lastWeek: '지난주 dddd LT',
- sameElse: 'L' },
- relativeTime: {
- future: '%s 후',
- past: '%s 전',
- s: '몇 초',
- ss: '%d초',
- m: '1분',
- mm: '%d분',
- h: '한 시간',
- hh: '%d시간',
- d: '하루',
- dd: '%d일',
- M: '한 달',
- MM: '%d달',
- y: '일 년',
- yy: '%d년' },
- dayOfMonthOrdinalParse: /\d{1,2}(일|월|주)/,
- ordinal: function ordinal(number, period) {
- switch (period) {
- case 'd':
- case 'D':
- case 'DDD':
- return number + '일';
- case 'M':
- return number + '월';
- case 'w':
- case 'W':
- return number + '주';
- default:
- return number;}
- },
- meridiemParse: /오전|오후/,
- isPM: function isPM(token) {
- return token === '오후';
- },
- meridiem: function meridiem(hour, minute, isUpper) {
- return hour < 12 ? '오전' : '오후';
- } });
- return ko;
- });
- /***/ }),
- /* 88 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/ku.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Kurdish [ku]
- //! author : Shahram Mebashar : https://github.com/ShahramMebashar
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var symbolMap = {
- 1: '١',
- 2: '٢',
- 3: '٣',
- 4: '٤',
- 5: '٥',
- 6: '٦',
- 7: '٧',
- 8: '٨',
- 9: '٩',
- 0: '٠' },
- numberMap = {
- '١': '1',
- '٢': '2',
- '٣': '3',
- '٤': '4',
- '٥': '5',
- '٦': '6',
- '٧': '7',
- '٨': '8',
- '٩': '9',
- '٠': '0' },
- months = [
- 'کانونی دووەم',
- 'شوبات',
- 'ئازار',
- 'نیسان',
- 'ئایار',
- 'حوزەیران',
- 'تەمموز',
- 'ئاب',
- 'ئەیلوول',
- 'تشرینی یەكەم',
- 'تشرینی دووەم',
- 'كانونی یەکەم'];
- var ku = moment.defineLocale('ku', {
- months: months,
- monthsShort: months,
- weekdays:
- 'یهكشهممه_دووشهممه_سێشهممه_چوارشهممه_پێنجشهممه_ههینی_شهممه'.split(
- '_'),
- weekdaysShort:
- 'یهكشهم_دووشهم_سێشهم_چوارشهم_پێنجشهم_ههینی_شهممه'.split('_'),
- weekdaysMin: 'ی_د_س_چ_پ_ه_ش'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd, D MMMM YYYY HH:mm' },
- meridiemParse: /ئێواره|بهیانی/,
- isPM: function isPM(input) {
- return /ئێواره/.test(input);
- },
- meridiem: function meridiem(hour, minute, isLower) {
- if (hour < 12) {
- return 'بهیانی';
- } else {
- return 'ئێواره';
- }
- },
- calendar: {
- sameDay: '[ئهمرۆ كاتژمێر] LT',
- nextDay: '[بهیانی كاتژمێر] LT',
- nextWeek: 'dddd [كاتژمێر] LT',
- lastDay: '[دوێنێ كاتژمێر] LT',
- lastWeek: 'dddd [كاتژمێر] LT',
- sameElse: 'L' },
- relativeTime: {
- future: 'له %s',
- past: '%s',
- s: 'چهند چركهیهك',
- ss: 'چركه %d',
- m: 'یهك خولهك',
- mm: '%d خولهك',
- h: 'یهك كاتژمێر',
- hh: '%d كاتژمێر',
- d: 'یهك ڕۆژ',
- dd: '%d ڕۆژ',
- M: 'یهك مانگ',
- MM: '%d مانگ',
- y: 'یهك ساڵ',
- yy: '%d ساڵ' },
- preparse: function preparse(string) {
- return string.
- replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {
- return numberMap[match];
- }).
- replace(/،/g, ',');
- },
- postformat: function postformat(string) {
- return string.
- replace(/\d/g, function (match) {
- return symbolMap[match];
- }).
- replace(/,/g, '،');
- },
- week: {
- dow: 6, // Saturday is the first day of the week.
- doy: 12 // The week that contains Jan 12th is the first week of the year.
- } });
- return ku;
- });
- /***/ }),
- /* 89 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/ky.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Kyrgyz [ky]
- //! author : Chyngyz Arystan uulu : https://github.com/chyngyz
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var suffixes = {
- 0: '-чү',
- 1: '-чи',
- 2: '-чи',
- 3: '-чү',
- 4: '-чү',
- 5: '-чи',
- 6: '-чы',
- 7: '-чи',
- 8: '-чи',
- 9: '-чу',
- 10: '-чу',
- 20: '-чы',
- 30: '-чу',
- 40: '-чы',
- 50: '-чү',
- 60: '-чы',
- 70: '-чи',
- 80: '-чи',
- 90: '-чу',
- 100: '-чү' };
- var ky = moment.defineLocale('ky', {
- months: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split(
- '_'),
- monthsShort: 'янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек'.split(
- '_'),
- weekdays: 'Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби'.split(
- '_'),
- weekdaysShort: 'Жек_Дүй_Шей_Шар_Бей_Жум_Ише'.split('_'),
- weekdaysMin: 'Жк_Дй_Шй_Шр_Бй_Жм_Иш'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd, D MMMM YYYY HH:mm' },
- calendar: {
- sameDay: '[Бүгүн саат] LT',
- nextDay: '[Эртең саат] LT',
- nextWeek: 'dddd [саат] LT',
- lastDay: '[Кечээ саат] LT',
- lastWeek: '[Өткөн аптанын] dddd [күнү] [саат] LT',
- sameElse: 'L' },
- relativeTime: {
- future: '%s ичинде',
- past: '%s мурун',
- s: 'бирнече секунд',
- ss: '%d секунд',
- m: 'бир мүнөт',
- mm: '%d мүнөт',
- h: 'бир саат',
- hh: '%d саат',
- d: 'бир күн',
- dd: '%d күн',
- M: 'бир ай',
- MM: '%d ай',
- y: 'бир жыл',
- yy: '%d жыл' },
- dayOfMonthOrdinalParse: /\d{1,2}-(чи|чы|чү|чу)/,
- ordinal: function ordinal(number) {
- var a = number % 10,
- b = number >= 100 ? 100 : null;
- return number + (suffixes[number] || suffixes[a] || suffixes[b]);
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 7 // The week that contains Jan 7th is the first week of the year.
- } });
- return ky;
- });
- /***/ }),
- /* 90 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/lb.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Luxembourgish [lb]
- //! author : mweimerskirch : https://github.com/mweimerskirch
- //! author : David Raison : https://github.com/kwisatz
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- function processRelativeTime(number, withoutSuffix, key, isFuture) {
- var format = {
- m: ['eng Minutt', 'enger Minutt'],
- h: ['eng Stonn', 'enger Stonn'],
- d: ['een Dag', 'engem Dag'],
- M: ['ee Mount', 'engem Mount'],
- y: ['ee Joer', 'engem Joer'] };
- return withoutSuffix ? format[key][0] : format[key][1];
- }
- function processFutureTime(string) {
- var number = string.substr(0, string.indexOf(' '));
- if (eifelerRegelAppliesToNumber(number)) {
- return 'a ' + string;
- }
- return 'an ' + string;
- }
- function processPastTime(string) {
- var number = string.substr(0, string.indexOf(' '));
- if (eifelerRegelAppliesToNumber(number)) {
- return 'viru ' + string;
- }
- return 'virun ' + string;
- }
- /**
- * Returns true if the word before the given number loses the '-n' ending.
- * e.g. 'an 10 Deeg' but 'a 5 Deeg'
- *
- * @param number {integer}
- * @returns {boolean}
- */
- function eifelerRegelAppliesToNumber(number) {
- number = parseInt(number, 10);
- if (isNaN(number)) {
- return false;
- }
- if (number < 0) {
- // Negative Number --> always true
- return true;
- } else if (number < 10) {
- // Only 1 digit
- if (4 <= number && number <= 7) {
- return true;
- }
- return false;
- } else if (number < 100) {
- // 2 digits
- var lastDigit = number % 10,
- firstDigit = number / 10;
- if (lastDigit === 0) {
- return eifelerRegelAppliesToNumber(firstDigit);
- }
- return eifelerRegelAppliesToNumber(lastDigit);
- } else if (number < 10000) {
- // 3 or 4 digits --> recursively check first digit
- while (number >= 10) {
- number = number / 10;
- }
- return eifelerRegelAppliesToNumber(number);
- } else {
- // Anything larger than 4 digits: recursively check first n-3 digits
- number = number / 1000;
- return eifelerRegelAppliesToNumber(number);
- }
- }
- var lb = moment.defineLocale('lb', {
- months: 'Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember'.split(
- '_'),
- monthsShort:
- 'Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split(
- '_'),
- monthsParseExact: true,
- weekdays:
- 'Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg'.split(
- '_'),
- weekdaysShort: 'So._Mé._Dë._Më._Do._Fr._Sa.'.split('_'),
- weekdaysMin: 'So_Mé_Dë_Më_Do_Fr_Sa'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'H:mm [Auer]',
- LTS: 'H:mm:ss [Auer]',
- L: 'DD.MM.YYYY',
- LL: 'D. MMMM YYYY',
- LLL: 'D. MMMM YYYY H:mm [Auer]',
- LLLL: 'dddd, D. MMMM YYYY H:mm [Auer]' },
- calendar: {
- sameDay: '[Haut um] LT',
- sameElse: 'L',
- nextDay: '[Muer um] LT',
- nextWeek: 'dddd [um] LT',
- lastDay: '[Gëschter um] LT',
- lastWeek: function lastWeek() {
- // Different date string for 'Dënschdeg' (Tuesday) and 'Donneschdeg' (Thursday) due to phonological rule
- switch (this.day()) {
- case 2:
- case 4:
- return '[Leschten] dddd [um] LT';
- default:
- return '[Leschte] dddd [um] LT';}
- } },
- relativeTime: {
- future: processFutureTime,
- past: processPastTime,
- s: 'e puer Sekonnen',
- ss: '%d Sekonnen',
- m: processRelativeTime,
- mm: '%d Minutten',
- h: processRelativeTime,
- hh: '%d Stonnen',
- d: processRelativeTime,
- dd: '%d Deeg',
- M: processRelativeTime,
- MM: '%d Méint',
- y: processRelativeTime,
- yy: '%d Joer' },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- } });
- return lb;
- });
- /***/ }),
- /* 91 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/lo.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Lao [lo]
- //! author : Ryan Hart : https://github.com/ryanhart2
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var lo = moment.defineLocale('lo', {
- months: 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split(
- '_'),
- monthsShort:
- 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split(
- '_'),
- weekdays: 'ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),
- weekdaysShort: 'ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),
- weekdaysMin: 'ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'ວັນdddd D MMMM YYYY HH:mm' },
- meridiemParse: /ຕອນເຊົ້າ|ຕອນແລງ/,
- isPM: function isPM(input) {
- return input === 'ຕອນແລງ';
- },
- meridiem: function meridiem(hour, minute, isLower) {
- if (hour < 12) {
- return 'ຕອນເຊົ້າ';
- } else {
- return 'ຕອນແລງ';
- }
- },
- calendar: {
- sameDay: '[ມື້ນີ້ເວລາ] LT',
- nextDay: '[ມື້ອື່ນເວລາ] LT',
- nextWeek: '[ວັນ]dddd[ໜ້າເວລາ] LT',
- lastDay: '[ມື້ວານນີ້ເວລາ] LT',
- lastWeek: '[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT',
- sameElse: 'L' },
- relativeTime: {
- future: 'ອີກ %s',
- past: '%sຜ່ານມາ',
- s: 'ບໍ່ເທົ່າໃດວິນາທີ',
- ss: '%d ວິນາທີ',
- m: '1 ນາທີ',
- mm: '%d ນາທີ',
- h: '1 ຊົ່ວໂມງ',
- hh: '%d ຊົ່ວໂມງ',
- d: '1 ມື້',
- dd: '%d ມື້',
- M: '1 ເດືອນ',
- MM: '%d ເດືອນ',
- y: '1 ປີ',
- yy: '%d ປີ' },
- dayOfMonthOrdinalParse: /(ທີ່)\d{1,2}/,
- ordinal: function ordinal(number) {
- return 'ທີ່' + number;
- } });
- return lo;
- });
- /***/ }),
- /* 92 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/lt.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Lithuanian [lt]
- //! author : Mindaugas Mozūras : https://github.com/mmozuras
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var units = {
- ss: 'sekundė_sekundžių_sekundes',
- m: 'minutė_minutės_minutę',
- mm: 'minutės_minučių_minutes',
- h: 'valanda_valandos_valandą',
- hh: 'valandos_valandų_valandas',
- d: 'diena_dienos_dieną',
- dd: 'dienos_dienų_dienas',
- M: 'mėnuo_mėnesio_mėnesį',
- MM: 'mėnesiai_mėnesių_mėnesius',
- y: 'metai_metų_metus',
- yy: 'metai_metų_metus' };
- function translateSeconds(number, withoutSuffix, key, isFuture) {
- if (withoutSuffix) {
- return 'kelios sekundės';
- } else {
- return isFuture ? 'kelių sekundžių' : 'kelias sekundes';
- }
- }
- function translateSingular(number, withoutSuffix, key, isFuture) {
- return withoutSuffix ?
- forms(key)[0] :
- isFuture ?
- forms(key)[1] :
- forms(key)[2];
- }
- function special(number) {
- return number % 10 === 0 || number > 10 && number < 20;
- }
- function forms(key) {
- return units[key].split('_');
- }
- function translate(number, withoutSuffix, key, isFuture) {
- var result = number + ' ';
- if (number === 1) {
- return (
- result + translateSingular(number, withoutSuffix, key[0], isFuture));
- } else if (withoutSuffix) {
- return result + (special(number) ? forms(key)[1] : forms(key)[0]);
- } else {
- if (isFuture) {
- return result + forms(key)[1];
- } else {
- return result + (special(number) ? forms(key)[1] : forms(key)[2]);
- }
- }
- }
- var lt = moment.defineLocale('lt', {
- months: {
- format: 'sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio'.split(
- '_'),
- standalone:
- 'sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis'.split(
- '_'),
- isFormat: /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/ },
- monthsShort: 'sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd'.split('_'),
- weekdays: {
- format: 'sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį'.split(
- '_'),
- standalone:
- 'sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis'.split(
- '_'),
- isFormat: /dddd HH:mm/ },
- weekdaysShort: 'Sek_Pir_Ant_Tre_Ket_Pen_Šeš'.split('_'),
- weekdaysMin: 'S_P_A_T_K_Pn_Š'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'YYYY-MM-DD',
- LL: 'YYYY [m.] MMMM D [d.]',
- LLL: 'YYYY [m.] MMMM D [d.], HH:mm [val.]',
- LLLL: 'YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]',
- l: 'YYYY-MM-DD',
- ll: 'YYYY [m.] MMMM D [d.]',
- lll: 'YYYY [m.] MMMM D [d.], HH:mm [val.]',
- llll: 'YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]' },
- calendar: {
- sameDay: '[Šiandien] LT',
- nextDay: '[Rytoj] LT',
- nextWeek: 'dddd LT',
- lastDay: '[Vakar] LT',
- lastWeek: '[Praėjusį] dddd LT',
- sameElse: 'L' },
- relativeTime: {
- future: 'po %s',
- past: 'prieš %s',
- s: translateSeconds,
- ss: translate,
- m: translateSingular,
- mm: translate,
- h: translateSingular,
- hh: translate,
- d: translateSingular,
- dd: translate,
- M: translateSingular,
- MM: translate,
- y: translateSingular,
- yy: translate },
- dayOfMonthOrdinalParse: /\d{1,2}-oji/,
- ordinal: function ordinal(number) {
- return number + '-oji';
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- } });
- return lt;
- });
- /***/ }),
- /* 93 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/lv.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Latvian [lv]
- //! author : Kristaps Karlsons : https://github.com/skakri
- //! author : Jānis Elmeris : https://github.com/JanisE
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var units = {
- ss: 'sekundes_sekundēm_sekunde_sekundes'.split('_'),
- m: 'minūtes_minūtēm_minūte_minūtes'.split('_'),
- mm: 'minūtes_minūtēm_minūte_minūtes'.split('_'),
- h: 'stundas_stundām_stunda_stundas'.split('_'),
- hh: 'stundas_stundām_stunda_stundas'.split('_'),
- d: 'dienas_dienām_diena_dienas'.split('_'),
- dd: 'dienas_dienām_diena_dienas'.split('_'),
- M: 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),
- MM: 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),
- y: 'gada_gadiem_gads_gadi'.split('_'),
- yy: 'gada_gadiem_gads_gadi'.split('_') };
- /**
- * @param withoutSuffix boolean true = a length of time; false = before/after a period of time.
- */
- function format(forms, number, withoutSuffix) {
- if (withoutSuffix) {
- // E.g. "21 minūte", "3 minūtes".
- return number % 10 === 1 && number % 100 !== 11 ? forms[2] : forms[3];
- } else {
- // E.g. "21 minūtes" as in "pēc 21 minūtes".
- // E.g. "3 minūtēm" as in "pēc 3 minūtēm".
- return number % 10 === 1 && number % 100 !== 11 ? forms[0] : forms[1];
- }
- }
- function relativeTimeWithPlural(number, withoutSuffix, key) {
- return number + ' ' + format(units[key], number, withoutSuffix);
- }
- function relativeTimeWithSingular(number, withoutSuffix, key) {
- return format(units[key], number, withoutSuffix);
- }
- function relativeSeconds(number, withoutSuffix) {
- return withoutSuffix ? 'dažas sekundes' : 'dažām sekundēm';
- }
- var lv = moment.defineLocale('lv', {
- months: 'janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris'.split(
- '_'),
- monthsShort: 'jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec'.split('_'),
- weekdays:
- 'svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena'.split(
- '_'),
- weekdaysShort: 'Sv_P_O_T_C_Pk_S'.split('_'),
- weekdaysMin: 'Sv_P_O_T_C_Pk_S'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD.MM.YYYY.',
- LL: 'YYYY. [gada] D. MMMM',
- LLL: 'YYYY. [gada] D. MMMM, HH:mm',
- LLLL: 'YYYY. [gada] D. MMMM, dddd, HH:mm' },
- calendar: {
- sameDay: '[Šodien pulksten] LT',
- nextDay: '[Rīt pulksten] LT',
- nextWeek: 'dddd [pulksten] LT',
- lastDay: '[Vakar pulksten] LT',
- lastWeek: '[Pagājušā] dddd [pulksten] LT',
- sameElse: 'L' },
- relativeTime: {
- future: 'pēc %s',
- past: 'pirms %s',
- s: relativeSeconds,
- ss: relativeTimeWithPlural,
- m: relativeTimeWithSingular,
- mm: relativeTimeWithPlural,
- h: relativeTimeWithSingular,
- hh: relativeTimeWithPlural,
- d: relativeTimeWithSingular,
- dd: relativeTimeWithPlural,
- M: relativeTimeWithSingular,
- MM: relativeTimeWithPlural,
- y: relativeTimeWithSingular,
- yy: relativeTimeWithPlural },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- } });
- return lv;
- });
- /***/ }),
- /* 94 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/me.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Montenegrin [me]
- //! author : Miodrag Nikač <miodrag@restartit.me> : https://github.com/miodragnikac
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var translator = {
- words: {
- //Different grammatical cases
- ss: ['sekund', 'sekunda', 'sekundi'],
- m: ['jedan minut', 'jednog minuta'],
- mm: ['minut', 'minuta', 'minuta'],
- h: ['jedan sat', 'jednog sata'],
- hh: ['sat', 'sata', 'sati'],
- dd: ['dan', 'dana', 'dana'],
- MM: ['mjesec', 'mjeseca', 'mjeseci'],
- yy: ['godina', 'godine', 'godina'] },
- correctGrammaticalCase: function correctGrammaticalCase(number, wordKey) {
- return number === 1 ?
- wordKey[0] :
- number >= 2 && number <= 4 ?
- wordKey[1] :
- wordKey[2];
- },
- translate: function translate(number, withoutSuffix, key) {
- var wordKey = translator.words[key];
- if (key.length === 1) {
- return withoutSuffix ? wordKey[0] : wordKey[1];
- } else {
- return (
- number +
- ' ' +
- translator.correctGrammaticalCase(number, wordKey));
- }
- } };
- var me = moment.defineLocale('me', {
- months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split(
- '_'),
- monthsShort:
- 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'),
- monthsParseExact: true,
- weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(
- '_'),
- weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),
- weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'H:mm',
- LTS: 'H:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D. MMMM YYYY',
- LLL: 'D. MMMM YYYY H:mm',
- LLLL: 'dddd, D. MMMM YYYY H:mm' },
- calendar: {
- sameDay: '[danas u] LT',
- nextDay: '[sjutra u] LT',
- nextWeek: function nextWeek() {
- switch (this.day()) {
- case 0:
- return '[u] [nedjelju] [u] LT';
- case 3:
- return '[u] [srijedu] [u] LT';
- case 6:
- return '[u] [subotu] [u] LT';
- case 1:
- case 2:
- case 4:
- case 5:
- return '[u] dddd [u] LT';}
- },
- lastDay: '[juče u] LT',
- lastWeek: function lastWeek() {
- var lastWeekDays = [
- '[prošle] [nedjelje] [u] LT',
- '[prošlog] [ponedjeljka] [u] LT',
- '[prošlog] [utorka] [u] LT',
- '[prošle] [srijede] [u] LT',
- '[prošlog] [četvrtka] [u] LT',
- '[prošlog] [petka] [u] LT',
- '[prošle] [subote] [u] LT'];
- return lastWeekDays[this.day()];
- },
- sameElse: 'L' },
- relativeTime: {
- future: 'za %s',
- past: 'prije %s',
- s: 'nekoliko sekundi',
- ss: translator.translate,
- m: translator.translate,
- mm: translator.translate,
- h: translator.translate,
- hh: translator.translate,
- d: 'dan',
- dd: translator.translate,
- M: 'mjesec',
- MM: translator.translate,
- y: 'godinu',
- yy: translator.translate },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 7 // The week that contains Jan 7th is the first week of the year.
- } });
- return me;
- });
- /***/ }),
- /* 95 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/mi.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Maori [mi]
- //! author : John Corrigan <robbiecloset@gmail.com> : https://github.com/johnideal
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var mi = moment.defineLocale('mi', {
- months: 'Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea'.split(
- '_'),
- monthsShort:
- 'Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki'.split(
- '_'),
- monthsRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,
- monthsStrictRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,
- monthsShortRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,
- monthsShortStrictRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,2}/i,
- weekdays: 'Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei'.split('_'),
- weekdaysShort: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'),
- weekdaysMin: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY [i] HH:mm',
- LLLL: 'dddd, D MMMM YYYY [i] HH:mm' },
- calendar: {
- sameDay: '[i teie mahana, i] LT',
- nextDay: '[apopo i] LT',
- nextWeek: 'dddd [i] LT',
- lastDay: '[inanahi i] LT',
- lastWeek: 'dddd [whakamutunga i] LT',
- sameElse: 'L' },
- relativeTime: {
- future: 'i roto i %s',
- past: '%s i mua',
- s: 'te hēkona ruarua',
- ss: '%d hēkona',
- m: 'he meneti',
- mm: '%d meneti',
- h: 'te haora',
- hh: '%d haora',
- d: 'he ra',
- dd: '%d ra',
- M: 'he marama',
- MM: '%d marama',
- y: 'he tau',
- yy: '%d tau' },
- dayOfMonthOrdinalParse: /\d{1,2}º/,
- ordinal: '%dº',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- } });
- return mi;
- });
- /***/ }),
- /* 96 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/mk.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Macedonian [mk]
- //! author : Borislav Mickov : https://github.com/B0k0
- //! author : Sashko Todorov : https://github.com/bkyceh
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var mk = moment.defineLocale('mk', {
- months: 'јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември'.split(
- '_'),
- monthsShort: 'јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек'.split('_'),
- weekdays: 'недела_понеделник_вторник_среда_четврток_петок_сабота'.split(
- '_'),
- weekdaysShort: 'нед_пон_вто_сре_чет_пет_саб'.split('_'),
- weekdaysMin: 'нe_пo_вт_ср_че_пе_сa'.split('_'),
- longDateFormat: {
- LT: 'H:mm',
- LTS: 'H:mm:ss',
- L: 'D.MM.YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY H:mm',
- LLLL: 'dddd, D MMMM YYYY H:mm' },
- calendar: {
- sameDay: '[Денес во] LT',
- nextDay: '[Утре во] LT',
- nextWeek: '[Во] dddd [во] LT',
- lastDay: '[Вчера во] LT',
- lastWeek: function lastWeek() {
- switch (this.day()) {
- case 0:
- case 3:
- case 6:
- return '[Изминатата] dddd [во] LT';
- case 1:
- case 2:
- case 4:
- case 5:
- return '[Изминатиот] dddd [во] LT';}
- },
- sameElse: 'L' },
- relativeTime: {
- future: 'за %s',
- past: 'пред %s',
- s: 'неколку секунди',
- ss: '%d секунди',
- m: 'една минута',
- mm: '%d минути',
- h: 'еден час',
- hh: '%d часа',
- d: 'еден ден',
- dd: '%d дена',
- M: 'еден месец',
- MM: '%d месеци',
- y: 'една година',
- yy: '%d години' },
- dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/,
- ordinal: function ordinal(number) {
- var lastDigit = number % 10,
- last2Digits = number % 100;
- if (number === 0) {
- return number + '-ев';
- } else if (last2Digits === 0) {
- return number + '-ен';
- } else if (last2Digits > 10 && last2Digits < 20) {
- return number + '-ти';
- } else if (lastDigit === 1) {
- return number + '-ви';
- } else if (lastDigit === 2) {
- return number + '-ри';
- } else if (lastDigit === 7 || lastDigit === 8) {
- return number + '-ми';
- } else {
- return number + '-ти';
- }
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 7 // The week that contains Jan 7th is the first week of the year.
- } });
- return mk;
- });
- /***/ }),
- /* 97 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/ml.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Malayalam [ml]
- //! author : Floyd Pink : https://github.com/floydpink
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var ml = moment.defineLocale('ml', {
- months: 'ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ'.split(
- '_'),
- monthsShort:
- 'ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.'.split(
- '_'),
- monthsParseExact: true,
- weekdays:
- 'ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച'.split(
- '_'),
- weekdaysShort: 'ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി'.split('_'),
- weekdaysMin: 'ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ'.split('_'),
- longDateFormat: {
- LT: 'A h:mm -നു',
- LTS: 'A h:mm:ss -നു',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY, A h:mm -നു',
- LLLL: 'dddd, D MMMM YYYY, A h:mm -നു' },
- calendar: {
- sameDay: '[ഇന്ന്] LT',
- nextDay: '[നാളെ] LT',
- nextWeek: 'dddd, LT',
- lastDay: '[ഇന്നലെ] LT',
- lastWeek: '[കഴിഞ്ഞ] dddd, LT',
- sameElse: 'L' },
- relativeTime: {
- future: '%s കഴിഞ്ഞ്',
- past: '%s മുൻപ്',
- s: 'അൽപ നിമിഷങ്ങൾ',
- ss: '%d സെക്കൻഡ്',
- m: 'ഒരു മിനിറ്റ്',
- mm: '%d മിനിറ്റ്',
- h: 'ഒരു മണിക്കൂർ',
- hh: '%d മണിക്കൂർ',
- d: 'ഒരു ദിവസം',
- dd: '%d ദിവസം',
- M: 'ഒരു മാസം',
- MM: '%d മാസം',
- y: 'ഒരു വർഷം',
- yy: '%d വർഷം' },
- meridiemParse: /രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,
- meridiemHour: function meridiemHour(hour, meridiem) {
- if (hour === 12) {
- hour = 0;
- }
- if (
- meridiem === 'രാത്രി' && hour >= 4 ||
- meridiem === 'ഉച്ച കഴിഞ്ഞ്' ||
- meridiem === 'വൈകുന്നേരം')
- {
- return hour + 12;
- } else {
- return hour;
- }
- },
- meridiem: function meridiem(hour, minute, isLower) {
- if (hour < 4) {
- return 'രാത്രി';
- } else if (hour < 12) {
- return 'രാവിലെ';
- } else if (hour < 17) {
- return 'ഉച്ച കഴിഞ്ഞ്';
- } else if (hour < 20) {
- return 'വൈകുന്നേരം';
- } else {
- return 'രാത്രി';
- }
- } });
- return ml;
- });
- /***/ }),
- /* 98 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/mn.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Mongolian [mn]
- //! author : Javkhlantugs Nyamdorj : https://github.com/javkhaanj7
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- function translate(number, withoutSuffix, key, isFuture) {
- switch (key) {
- case 's':
- return withoutSuffix ? 'хэдхэн секунд' : 'хэдхэн секундын';
- case 'ss':
- return number + (withoutSuffix ? ' секунд' : ' секундын');
- case 'm':
- case 'mm':
- return number + (withoutSuffix ? ' минут' : ' минутын');
- case 'h':
- case 'hh':
- return number + (withoutSuffix ? ' цаг' : ' цагийн');
- case 'd':
- case 'dd':
- return number + (withoutSuffix ? ' өдөр' : ' өдрийн');
- case 'M':
- case 'MM':
- return number + (withoutSuffix ? ' сар' : ' сарын');
- case 'y':
- case 'yy':
- return number + (withoutSuffix ? ' жил' : ' жилийн');
- default:
- return number;}
- }
- var mn = moment.defineLocale('mn', {
- months: 'Нэгдүгээр сар_Хоёрдугаар сар_Гуравдугаар сар_Дөрөвдүгээр сар_Тавдугаар сар_Зургадугаар сар_Долдугаар сар_Наймдугаар сар_Есдүгээр сар_Аравдугаар сар_Арван нэгдүгээр сар_Арван хоёрдугаар сар'.split(
- '_'),
- monthsShort:
- '1 сар_2 сар_3 сар_4 сар_5 сар_6 сар_7 сар_8 сар_9 сар_10 сар_11 сар_12 сар'.split(
- '_'),
- monthsParseExact: true,
- weekdays: 'Ням_Даваа_Мягмар_Лхагва_Пүрэв_Баасан_Бямба'.split('_'),
- weekdaysShort: 'Ням_Дав_Мяг_Лха_Пүр_Баа_Бям'.split('_'),
- weekdaysMin: 'Ня_Да_Мя_Лх_Пү_Ба_Бя'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'YYYY-MM-DD',
- LL: 'YYYY оны MMMMын D',
- LLL: 'YYYY оны MMMMын D HH:mm',
- LLLL: 'dddd, YYYY оны MMMMын D HH:mm' },
- meridiemParse: /ҮӨ|ҮХ/i,
- isPM: function isPM(input) {
- return input === 'ҮХ';
- },
- meridiem: function meridiem(hour, minute, isLower) {
- if (hour < 12) {
- return 'ҮӨ';
- } else {
- return 'ҮХ';
- }
- },
- calendar: {
- sameDay: '[Өнөөдөр] LT',
- nextDay: '[Маргааш] LT',
- nextWeek: '[Ирэх] dddd LT',
- lastDay: '[Өчигдөр] LT',
- lastWeek: '[Өнгөрсөн] dddd LT',
- sameElse: 'L' },
- relativeTime: {
- future: '%s дараа',
- past: '%s өмнө',
- s: translate,
- ss: translate,
- m: translate,
- mm: translate,
- h: translate,
- hh: translate,
- d: translate,
- dd: translate,
- M: translate,
- MM: translate,
- y: translate,
- yy: translate },
- dayOfMonthOrdinalParse: /\d{1,2} өдөр/,
- ordinal: function ordinal(number, period) {
- switch (period) {
- case 'd':
- case 'D':
- case 'DDD':
- return number + ' өдөр';
- default:
- return number;}
- } });
- return mn;
- });
- /***/ }),
- /* 99 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/mr.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Marathi [mr]
- //! author : Harshad Kale : https://github.com/kalehv
- //! author : Vivek Athalye : https://github.com/vnathalye
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var symbolMap = {
- 1: '१',
- 2: '२',
- 3: '३',
- 4: '४',
- 5: '५',
- 6: '६',
- 7: '७',
- 8: '८',
- 9: '९',
- 0: '०' },
- numberMap = {
- '१': '1',
- '२': '2',
- '३': '3',
- '४': '4',
- '५': '5',
- '६': '6',
- '७': '7',
- '८': '8',
- '९': '9',
- '०': '0' };
- function relativeTimeMr(number, withoutSuffix, string, isFuture) {
- var output = '';
- if (withoutSuffix) {
- switch (string) {
- case 's':
- output = 'काही सेकंद';
- break;
- case 'ss':
- output = '%d सेकंद';
- break;
- case 'm':
- output = 'एक मिनिट';
- break;
- case 'mm':
- output = '%d मिनिटे';
- break;
- case 'h':
- output = 'एक तास';
- break;
- case 'hh':
- output = '%d तास';
- break;
- case 'd':
- output = 'एक दिवस';
- break;
- case 'dd':
- output = '%d दिवस';
- break;
- case 'M':
- output = 'एक महिना';
- break;
- case 'MM':
- output = '%d महिने';
- break;
- case 'y':
- output = 'एक वर्ष';
- break;
- case 'yy':
- output = '%d वर्षे';
- break;}
- } else {
- switch (string) {
- case 's':
- output = 'काही सेकंदां';
- break;
- case 'ss':
- output = '%d सेकंदां';
- break;
- case 'm':
- output = 'एका मिनिटा';
- break;
- case 'mm':
- output = '%d मिनिटां';
- break;
- case 'h':
- output = 'एका तासा';
- break;
- case 'hh':
- output = '%d तासां';
- break;
- case 'd':
- output = 'एका दिवसा';
- break;
- case 'dd':
- output = '%d दिवसां';
- break;
- case 'M':
- output = 'एका महिन्या';
- break;
- case 'MM':
- output = '%d महिन्यां';
- break;
- case 'y':
- output = 'एका वर्षा';
- break;
- case 'yy':
- output = '%d वर्षां';
- break;}
- }
- return output.replace(/%d/i, number);
- }
- var mr = moment.defineLocale('mr', {
- months: 'जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split(
- '_'),
- monthsShort:
- 'जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split(
- '_'),
- monthsParseExact: true,
- weekdays: 'रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),
- weekdaysShort: 'रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि'.split('_'),
- weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'),
- longDateFormat: {
- LT: 'A h:mm वाजता',
- LTS: 'A h:mm:ss वाजता',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY, A h:mm वाजता',
- LLLL: 'dddd, D MMMM YYYY, A h:mm वाजता' },
- calendar: {
- sameDay: '[आज] LT',
- nextDay: '[उद्या] LT',
- nextWeek: 'dddd, LT',
- lastDay: '[काल] LT',
- lastWeek: '[मागील] dddd, LT',
- sameElse: 'L' },
- relativeTime: {
- future: '%sमध्ये',
- past: '%sपूर्वी',
- s: relativeTimeMr,
- ss: relativeTimeMr,
- m: relativeTimeMr,
- mm: relativeTimeMr,
- h: relativeTimeMr,
- hh: relativeTimeMr,
- d: relativeTimeMr,
- dd: relativeTimeMr,
- M: relativeTimeMr,
- MM: relativeTimeMr,
- y: relativeTimeMr,
- yy: relativeTimeMr },
- preparse: function preparse(string) {
- return string.replace(/[१२३४५६७८९०]/g, function (match) {
- return numberMap[match];
- });
- },
- postformat: function postformat(string) {
- return string.replace(/\d/g, function (match) {
- return symbolMap[match];
- });
- },
- meridiemParse: /पहाटे|सकाळी|दुपारी|सायंकाळी|रात्री/,
- meridiemHour: function meridiemHour(hour, meridiem) {
- if (hour === 12) {
- hour = 0;
- }
- if (meridiem === 'पहाटे' || meridiem === 'सकाळी') {
- return hour;
- } else if (
- meridiem === 'दुपारी' ||
- meridiem === 'सायंकाळी' ||
- meridiem === 'रात्री')
- {
- return hour >= 12 ? hour : hour + 12;
- }
- },
- meridiem: function meridiem(hour, minute, isLower) {
- if (hour >= 0 && hour < 6) {
- return 'पहाटे';
- } else if (hour < 12) {
- return 'सकाळी';
- } else if (hour < 17) {
- return 'दुपारी';
- } else if (hour < 20) {
- return 'सायंकाळी';
- } else {
- return 'रात्री';
- }
- },
- week: {
- dow: 0, // Sunday is the first day of the week.
- doy: 6 // The week that contains Jan 6th is the first week of the year.
- } });
- return mr;
- });
- /***/ }),
- /* 100 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/ms.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Malay [ms]
- //! author : Weldan Jamili : https://github.com/weldan
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var ms = moment.defineLocale('ms', {
- months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split(
- '_'),
- monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),
- weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),
- weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),
- weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),
- longDateFormat: {
- LT: 'HH.mm',
- LTS: 'HH.mm.ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY [pukul] HH.mm',
- LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm' },
- meridiemParse: /pagi|tengahari|petang|malam/,
- meridiemHour: function meridiemHour(hour, meridiem) {
- if (hour === 12) {
- hour = 0;
- }
- if (meridiem === 'pagi') {
- return hour;
- } else if (meridiem === 'tengahari') {
- return hour >= 11 ? hour : hour + 12;
- } else if (meridiem === 'petang' || meridiem === 'malam') {
- return hour + 12;
- }
- },
- meridiem: function meridiem(hours, minutes, isLower) {
- if (hours < 11) {
- return 'pagi';
- } else if (hours < 15) {
- return 'tengahari';
- } else if (hours < 19) {
- return 'petang';
- } else {
- return 'malam';
- }
- },
- calendar: {
- sameDay: '[Hari ini pukul] LT',
- nextDay: '[Esok pukul] LT',
- nextWeek: 'dddd [pukul] LT',
- lastDay: '[Kelmarin pukul] LT',
- lastWeek: 'dddd [lepas pukul] LT',
- sameElse: 'L' },
- relativeTime: {
- future: 'dalam %s',
- past: '%s yang lepas',
- s: 'beberapa saat',
- ss: '%d saat',
- m: 'seminit',
- mm: '%d minit',
- h: 'sejam',
- hh: '%d jam',
- d: 'sehari',
- dd: '%d hari',
- M: 'sebulan',
- MM: '%d bulan',
- y: 'setahun',
- yy: '%d tahun' },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 7 // The week that contains Jan 7th is the first week of the year.
- } });
- return ms;
- });
- /***/ }),
- /* 101 */
- /*!******************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/ms-my.js ***!
- \******************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Malay [ms-my]
- //! note : DEPRECATED, the correct one is [ms]
- //! author : Weldan Jamili : https://github.com/weldan
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var msMy = moment.defineLocale('ms-my', {
- months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split(
- '_'),
- monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),
- weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),
- weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),
- weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),
- longDateFormat: {
- LT: 'HH.mm',
- LTS: 'HH.mm.ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY [pukul] HH.mm',
- LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm' },
- meridiemParse: /pagi|tengahari|petang|malam/,
- meridiemHour: function meridiemHour(hour, meridiem) {
- if (hour === 12) {
- hour = 0;
- }
- if (meridiem === 'pagi') {
- return hour;
- } else if (meridiem === 'tengahari') {
- return hour >= 11 ? hour : hour + 12;
- } else if (meridiem === 'petang' || meridiem === 'malam') {
- return hour + 12;
- }
- },
- meridiem: function meridiem(hours, minutes, isLower) {
- if (hours < 11) {
- return 'pagi';
- } else if (hours < 15) {
- return 'tengahari';
- } else if (hours < 19) {
- return 'petang';
- } else {
- return 'malam';
- }
- },
- calendar: {
- sameDay: '[Hari ini pukul] LT',
- nextDay: '[Esok pukul] LT',
- nextWeek: 'dddd [pukul] LT',
- lastDay: '[Kelmarin pukul] LT',
- lastWeek: 'dddd [lepas pukul] LT',
- sameElse: 'L' },
- relativeTime: {
- future: 'dalam %s',
- past: '%s yang lepas',
- s: 'beberapa saat',
- ss: '%d saat',
- m: 'seminit',
- mm: '%d minit',
- h: 'sejam',
- hh: '%d jam',
- d: 'sehari',
- dd: '%d hari',
- M: 'sebulan',
- MM: '%d bulan',
- y: 'setahun',
- yy: '%d tahun' },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 7 // The week that contains Jan 7th is the first week of the year.
- } });
- return msMy;
- });
- /***/ }),
- /* 102 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/mt.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Maltese (Malta) [mt]
- //! author : Alessandro Maruccia : https://github.com/alesma
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var mt = moment.defineLocale('mt', {
- months: 'Jannar_Frar_Marzu_April_Mejju_Ġunju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Diċembru'.split(
- '_'),
- monthsShort: 'Jan_Fra_Mar_Apr_Mej_Ġun_Lul_Aww_Set_Ott_Nov_Diċ'.split('_'),
- weekdays:
- 'Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ġimgħa_Is-Sibt'.split(
- '_'),
- weekdaysShort: 'Ħad_Tne_Tli_Erb_Ħam_Ġim_Sib'.split('_'),
- weekdaysMin: 'Ħa_Tn_Tl_Er_Ħa_Ġi_Si'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd, D MMMM YYYY HH:mm' },
- calendar: {
- sameDay: '[Illum fil-]LT',
- nextDay: '[Għada fil-]LT',
- nextWeek: 'dddd [fil-]LT',
- lastDay: '[Il-bieraħ fil-]LT',
- lastWeek: 'dddd [li għadda] [fil-]LT',
- sameElse: 'L' },
- relativeTime: {
- future: 'f’ %s',
- past: '%s ilu',
- s: 'ftit sekondi',
- ss: '%d sekondi',
- m: 'minuta',
- mm: '%d minuti',
- h: 'siegħa',
- hh: '%d siegħat',
- d: 'ġurnata',
- dd: '%d ġranet',
- M: 'xahar',
- MM: '%d xhur',
- y: 'sena',
- yy: '%d sni' },
- dayOfMonthOrdinalParse: /\d{1,2}º/,
- ordinal: '%dº',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- } });
- return mt;
- });
- /***/ }),
- /* 103 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/my.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Burmese [my]
- //! author : Squar team, mysquar.com
- //! author : David Rossellat : https://github.com/gholadr
- //! author : Tin Aung Lin : https://github.com/thanyawzinmin
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var symbolMap = {
- 1: '၁',
- 2: '၂',
- 3: '၃',
- 4: '၄',
- 5: '၅',
- 6: '၆',
- 7: '၇',
- 8: '၈',
- 9: '၉',
- 0: '၀' },
- numberMap = {
- '၁': '1',
- '၂': '2',
- '၃': '3',
- '၄': '4',
- '၅': '5',
- '၆': '6',
- '၇': '7',
- '၈': '8',
- '၉': '9',
- '၀': '0' };
- var my = moment.defineLocale('my', {
- months: 'ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ'.split(
- '_'),
- monthsShort: 'ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ'.split('_'),
- weekdays: 'တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ'.split(
- '_'),
- weekdaysShort: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),
- weekdaysMin: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd D MMMM YYYY HH:mm' },
- calendar: {
- sameDay: '[ယနေ.] LT [မှာ]',
- nextDay: '[မနက်ဖြန်] LT [မှာ]',
- nextWeek: 'dddd LT [မှာ]',
- lastDay: '[မနေ.က] LT [မှာ]',
- lastWeek: '[ပြီးခဲ့သော] dddd LT [မှာ]',
- sameElse: 'L' },
- relativeTime: {
- future: 'လာမည့် %s မှာ',
- past: 'လွန်ခဲ့သော %s က',
- s: 'စက္ကန်.အနည်းငယ်',
- ss: '%d စက္ကန့်',
- m: 'တစ်မိနစ်',
- mm: '%d မိနစ်',
- h: 'တစ်နာရီ',
- hh: '%d နာရီ',
- d: 'တစ်ရက်',
- dd: '%d ရက်',
- M: 'တစ်လ',
- MM: '%d လ',
- y: 'တစ်နှစ်',
- yy: '%d နှစ်' },
- preparse: function preparse(string) {
- return string.replace(/[၁၂၃၄၅၆၇၈၉၀]/g, function (match) {
- return numberMap[match];
- });
- },
- postformat: function postformat(string) {
- return string.replace(/\d/g, function (match) {
- return symbolMap[match];
- });
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- } });
- return my;
- });
- /***/ }),
- /* 104 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/nb.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Norwegian Bokmål [nb]
- //! authors : Espen Hovlandsdal : https://github.com/rexxars
- //! Sigurd Gartmann : https://github.com/sigurdga
- //! Stephen Ramthun : https://github.com/stephenramthun
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var nb = moment.defineLocale('nb', {
- months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split(
- '_'),
- monthsShort:
- 'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split('_'),
- monthsParseExact: true,
- weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),
- weekdaysShort: 'sø._ma._ti._on._to._fr._lø.'.split('_'),
- weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D. MMMM YYYY',
- LLL: 'D. MMMM YYYY [kl.] HH:mm',
- LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm' },
- calendar: {
- sameDay: '[i dag kl.] LT',
- nextDay: '[i morgen kl.] LT',
- nextWeek: 'dddd [kl.] LT',
- lastDay: '[i går kl.] LT',
- lastWeek: '[forrige] dddd [kl.] LT',
- sameElse: 'L' },
- relativeTime: {
- future: 'om %s',
- past: '%s siden',
- s: 'noen sekunder',
- ss: '%d sekunder',
- m: 'ett minutt',
- mm: '%d minutter',
- h: 'en time',
- hh: '%d timer',
- d: 'en dag',
- dd: '%d dager',
- w: 'en uke',
- ww: '%d uker',
- M: 'en måned',
- MM: '%d måneder',
- y: 'ett år',
- yy: '%d år' },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- } });
- return nb;
- });
- /***/ }),
- /* 105 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/ne.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Nepalese [ne]
- //! author : suvash : https://github.com/suvash
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var symbolMap = {
- 1: '१',
- 2: '२',
- 3: '३',
- 4: '४',
- 5: '५',
- 6: '६',
- 7: '७',
- 8: '८',
- 9: '९',
- 0: '०' },
- numberMap = {
- '१': '1',
- '२': '2',
- '३': '3',
- '४': '4',
- '५': '5',
- '६': '6',
- '७': '7',
- '८': '8',
- '९': '9',
- '०': '0' };
- var ne = moment.defineLocale('ne', {
- months: 'जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर'.split(
- '_'),
- monthsShort:
- 'जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.'.split(
- '_'),
- monthsParseExact: true,
- weekdays: 'आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार'.split(
- '_'),
- weekdaysShort: 'आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.'.split('_'),
- weekdaysMin: 'आ._सो._मं._बु._बि._शु._श.'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'Aको h:mm बजे',
- LTS: 'Aको h:mm:ss बजे',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY, Aको h:mm बजे',
- LLLL: 'dddd, D MMMM YYYY, Aको h:mm बजे' },
- preparse: function preparse(string) {
- return string.replace(/[१२३४५६७८९०]/g, function (match) {
- return numberMap[match];
- });
- },
- postformat: function postformat(string) {
- return string.replace(/\d/g, function (match) {
- return symbolMap[match];
- });
- },
- meridiemParse: /राति|बिहान|दिउँसो|साँझ/,
- meridiemHour: function meridiemHour(hour, meridiem) {
- if (hour === 12) {
- hour = 0;
- }
- if (meridiem === 'राति') {
- return hour < 4 ? hour : hour + 12;
- } else if (meridiem === 'बिहान') {
- return hour;
- } else if (meridiem === 'दिउँसो') {
- return hour >= 10 ? hour : hour + 12;
- } else if (meridiem === 'साँझ') {
- return hour + 12;
- }
- },
- meridiem: function meridiem(hour, minute, isLower) {
- if (hour < 3) {
- return 'राति';
- } else if (hour < 12) {
- return 'बिहान';
- } else if (hour < 16) {
- return 'दिउँसो';
- } else if (hour < 20) {
- return 'साँझ';
- } else {
- return 'राति';
- }
- },
- calendar: {
- sameDay: '[आज] LT',
- nextDay: '[भोलि] LT',
- nextWeek: '[आउँदो] dddd[,] LT',
- lastDay: '[हिजो] LT',
- lastWeek: '[गएको] dddd[,] LT',
- sameElse: 'L' },
- relativeTime: {
- future: '%sमा',
- past: '%s अगाडि',
- s: 'केही क्षण',
- ss: '%d सेकेण्ड',
- m: 'एक मिनेट',
- mm: '%d मिनेट',
- h: 'एक घण्टा',
- hh: '%d घण्टा',
- d: 'एक दिन',
- dd: '%d दिन',
- M: 'एक महिना',
- MM: '%d महिना',
- y: 'एक बर्ष',
- yy: '%d बर्ष' },
- week: {
- dow: 0, // Sunday is the first day of the week.
- doy: 6 // The week that contains Jan 6th is the first week of the year.
- } });
- return ne;
- });
- /***/ }),
- /* 106 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/nl.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Dutch [nl]
- //! author : Joris Röling : https://github.com/jorisroling
- //! author : Jacob Middag : https://github.com/middagj
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var monthsShortWithDots =
- 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_'),
- monthsShortWithoutDots =
- 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_'),
- monthsParse = [
- /^jan/i,
- /^feb/i,
- /^maart|mrt.?$/i,
- /^apr/i,
- /^mei$/i,
- /^jun[i.]?$/i,
- /^jul[i.]?$/i,
- /^aug/i,
- /^sep/i,
- /^okt/i,
- /^nov/i,
- /^dec/i],
- monthsRegex =
- /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;
- var nl = moment.defineLocale('nl', {
- months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split(
- '_'),
- monthsShort: function monthsShort(m, format) {
- if (!m) {
- return monthsShortWithDots;
- } else if (/-MMM-/.test(format)) {
- return monthsShortWithoutDots[m.month()];
- } else {
- return monthsShortWithDots[m.month()];
- }
- },
- monthsRegex: monthsRegex,
- monthsShortRegex: monthsRegex,
- monthsStrictRegex:
- /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,
- monthsShortStrictRegex:
- /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,
- monthsParse: monthsParse,
- longMonthsParse: monthsParse,
- shortMonthsParse: monthsParse,
- weekdays:
- 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),
- weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'),
- weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD-MM-YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd D MMMM YYYY HH:mm' },
- calendar: {
- sameDay: '[vandaag om] LT',
- nextDay: '[morgen om] LT',
- nextWeek: 'dddd [om] LT',
- lastDay: '[gisteren om] LT',
- lastWeek: '[afgelopen] dddd [om] LT',
- sameElse: 'L' },
- relativeTime: {
- future: 'over %s',
- past: '%s geleden',
- s: 'een paar seconden',
- ss: '%d seconden',
- m: 'één minuut',
- mm: '%d minuten',
- h: 'één uur',
- hh: '%d uur',
- d: 'één dag',
- dd: '%d dagen',
- w: 'één week',
- ww: '%d weken',
- M: 'één maand',
- MM: '%d maanden',
- y: 'één jaar',
- yy: '%d jaar' },
- dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
- ordinal: function ordinal(number) {
- return (
- number + (
- number === 1 || number === 8 || number >= 20 ? 'ste' : 'de'));
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- } });
- return nl;
- });
- /***/ }),
- /* 107 */
- /*!******************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/nl-be.js ***!
- \******************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Dutch (Belgium) [nl-be]
- //! author : Joris Röling : https://github.com/jorisroling
- //! author : Jacob Middag : https://github.com/middagj
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var monthsShortWithDots =
- 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_'),
- monthsShortWithoutDots =
- 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_'),
- monthsParse = [
- /^jan/i,
- /^feb/i,
- /^maart|mrt.?$/i,
- /^apr/i,
- /^mei$/i,
- /^jun[i.]?$/i,
- /^jul[i.]?$/i,
- /^aug/i,
- /^sep/i,
- /^okt/i,
- /^nov/i,
- /^dec/i],
- monthsRegex =
- /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;
- var nlBe = moment.defineLocale('nl-be', {
- months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split(
- '_'),
- monthsShort: function monthsShort(m, format) {
- if (!m) {
- return monthsShortWithDots;
- } else if (/-MMM-/.test(format)) {
- return monthsShortWithoutDots[m.month()];
- } else {
- return monthsShortWithDots[m.month()];
- }
- },
- monthsRegex: monthsRegex,
- monthsShortRegex: monthsRegex,
- monthsStrictRegex:
- /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,
- monthsShortStrictRegex:
- /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,
- monthsParse: monthsParse,
- longMonthsParse: monthsParse,
- shortMonthsParse: monthsParse,
- weekdays:
- 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),
- weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'),
- weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd D MMMM YYYY HH:mm' },
- calendar: {
- sameDay: '[vandaag om] LT',
- nextDay: '[morgen om] LT',
- nextWeek: 'dddd [om] LT',
- lastDay: '[gisteren om] LT',
- lastWeek: '[afgelopen] dddd [om] LT',
- sameElse: 'L' },
- relativeTime: {
- future: 'over %s',
- past: '%s geleden',
- s: 'een paar seconden',
- ss: '%d seconden',
- m: 'één minuut',
- mm: '%d minuten',
- h: 'één uur',
- hh: '%d uur',
- d: 'één dag',
- dd: '%d dagen',
- M: 'één maand',
- MM: '%d maanden',
- y: 'één jaar',
- yy: '%d jaar' },
- dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
- ordinal: function ordinal(number) {
- return (
- number + (
- number === 1 || number === 8 || number >= 20 ? 'ste' : 'de'));
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- } });
- return nlBe;
- });
- /***/ }),
- /* 108 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/nn.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Nynorsk [nn]
- //! authors : https://github.com/mechuwind
- //! Stephen Ramthun : https://github.com/stephenramthun
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var nn = moment.defineLocale('nn', {
- months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split(
- '_'),
- monthsShort:
- 'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split('_'),
- monthsParseExact: true,
- weekdays: 'sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag'.split('_'),
- weekdaysShort: 'su._må._ty._on._to._fr._lau.'.split('_'),
- weekdaysMin: 'su_må_ty_on_to_fr_la'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D. MMMM YYYY',
- LLL: 'D. MMMM YYYY [kl.] H:mm',
- LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm' },
- calendar: {
- sameDay: '[I dag klokka] LT',
- nextDay: '[I morgon klokka] LT',
- nextWeek: 'dddd [klokka] LT',
- lastDay: '[I går klokka] LT',
- lastWeek: '[Føregåande] dddd [klokka] LT',
- sameElse: 'L' },
- relativeTime: {
- future: 'om %s',
- past: '%s sidan',
- s: 'nokre sekund',
- ss: '%d sekund',
- m: 'eit minutt',
- mm: '%d minutt',
- h: 'ein time',
- hh: '%d timar',
- d: 'ein dag',
- dd: '%d dagar',
- w: 'ei veke',
- ww: '%d veker',
- M: 'ein månad',
- MM: '%d månader',
- y: 'eit år',
- yy: '%d år' },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- } });
- return nn;
- });
- /***/ }),
- /* 109 */
- /*!*******************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/oc-lnc.js ***!
- \*******************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Occitan, lengadocian dialecte [oc-lnc]
- //! author : Quentin PAGÈS : https://github.com/Quenty31
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var ocLnc = moment.defineLocale('oc-lnc', {
- months: {
- standalone:
- 'genièr_febrièr_març_abril_mai_junh_julhet_agost_setembre_octòbre_novembre_decembre'.split(
- '_'),
- format: "de genièr_de febrièr_de març_d'abril_de mai_de junh_de julhet_d'agost_de setembre_d'octòbre_de novembre_de decembre".split(
- '_'),
- isFormat: /D[oD]?(\s)+MMMM/ },
- monthsShort:
- 'gen._febr._març_abr._mai_junh_julh._ago._set._oct._nov._dec.'.split(
- '_'),
- monthsParseExact: true,
- weekdays: 'dimenge_diluns_dimars_dimècres_dijòus_divendres_dissabte'.split(
- '_'),
- weekdaysShort: 'dg._dl._dm._dc._dj._dv._ds.'.split('_'),
- weekdaysMin: 'dg_dl_dm_dc_dj_dv_ds'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'H:mm',
- LTS: 'H:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM [de] YYYY',
- ll: 'D MMM YYYY',
- LLL: 'D MMMM [de] YYYY [a] H:mm',
- lll: 'D MMM YYYY, H:mm',
- LLLL: 'dddd D MMMM [de] YYYY [a] H:mm',
- llll: 'ddd D MMM YYYY, H:mm' },
- calendar: {
- sameDay: '[uèi a] LT',
- nextDay: '[deman a] LT',
- nextWeek: 'dddd [a] LT',
- lastDay: '[ièr a] LT',
- lastWeek: 'dddd [passat a] LT',
- sameElse: 'L' },
- relativeTime: {
- future: "d'aquí %s",
- past: 'fa %s',
- s: 'unas segondas',
- ss: '%d segondas',
- m: 'una minuta',
- mm: '%d minutas',
- h: 'una ora',
- hh: '%d oras',
- d: 'un jorn',
- dd: '%d jorns',
- M: 'un mes',
- MM: '%d meses',
- y: 'un an',
- yy: '%d ans' },
- dayOfMonthOrdinalParse: /\d{1,2}(r|n|t|è|a)/,
- ordinal: function ordinal(number, period) {
- var output =
- number === 1 ?
- 'r' :
- number === 2 ?
- 'n' :
- number === 3 ?
- 'r' :
- number === 4 ?
- 't' :
- 'è';
- if (period === 'w' || period === 'W') {
- output = 'a';
- }
- return number + output;
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4 } });
- return ocLnc;
- });
- /***/ }),
- /* 110 */
- /*!******************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/pa-in.js ***!
- \******************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Punjabi (India) [pa-in]
- //! author : Harpreet Singh : https://github.com/harpreetkhalsagtbit
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var symbolMap = {
- 1: '੧',
- 2: '੨',
- 3: '੩',
- 4: '੪',
- 5: '੫',
- 6: '੬',
- 7: '੭',
- 8: '੮',
- 9: '੯',
- 0: '੦' },
- numberMap = {
- '੧': '1',
- '੨': '2',
- '੩': '3',
- '੪': '4',
- '੫': '5',
- '੬': '6',
- '੭': '7',
- '੮': '8',
- '੯': '9',
- '੦': '0' };
- var paIn = moment.defineLocale('pa-in', {
- // There are months name as per Nanakshahi Calendar but they are not used as rigidly in modern Punjabi.
- months: 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split(
- '_'),
- monthsShort:
- 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split(
- '_'),
- weekdays: 'ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ'.split(
- '_'),
- weekdaysShort: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),
- weekdaysMin: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),
- longDateFormat: {
- LT: 'A h:mm ਵਜੇ',
- LTS: 'A h:mm:ss ਵਜੇ',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY, A h:mm ਵਜੇ',
- LLLL: 'dddd, D MMMM YYYY, A h:mm ਵਜੇ' },
- calendar: {
- sameDay: '[ਅਜ] LT',
- nextDay: '[ਕਲ] LT',
- nextWeek: '[ਅਗਲਾ] dddd, LT',
- lastDay: '[ਕਲ] LT',
- lastWeek: '[ਪਿਛਲੇ] dddd, LT',
- sameElse: 'L' },
- relativeTime: {
- future: '%s ਵਿੱਚ',
- past: '%s ਪਿਛਲੇ',
- s: 'ਕੁਝ ਸਕਿੰਟ',
- ss: '%d ਸਕਿੰਟ',
- m: 'ਇਕ ਮਿੰਟ',
- mm: '%d ਮਿੰਟ',
- h: 'ਇੱਕ ਘੰਟਾ',
- hh: '%d ਘੰਟੇ',
- d: 'ਇੱਕ ਦਿਨ',
- dd: '%d ਦਿਨ',
- M: 'ਇੱਕ ਮਹੀਨਾ',
- MM: '%d ਮਹੀਨੇ',
- y: 'ਇੱਕ ਸਾਲ',
- yy: '%d ਸਾਲ' },
- preparse: function preparse(string) {
- return string.replace(/[੧੨੩੪੫੬੭੮੯੦]/g, function (match) {
- return numberMap[match];
- });
- },
- postformat: function postformat(string) {
- return string.replace(/\d/g, function (match) {
- return symbolMap[match];
- });
- },
- // Punjabi notation for meridiems are quite fuzzy in practice. While there exists
- // a rigid notion of a 'Pahar' it is not used as rigidly in modern Punjabi.
- meridiemParse: /ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/,
- meridiemHour: function meridiemHour(hour, meridiem) {
- if (hour === 12) {
- hour = 0;
- }
- if (meridiem === 'ਰਾਤ') {
- return hour < 4 ? hour : hour + 12;
- } else if (meridiem === 'ਸਵੇਰ') {
- return hour;
- } else if (meridiem === 'ਦੁਪਹਿਰ') {
- return hour >= 10 ? hour : hour + 12;
- } else if (meridiem === 'ਸ਼ਾਮ') {
- return hour + 12;
- }
- },
- meridiem: function meridiem(hour, minute, isLower) {
- if (hour < 4) {
- return 'ਰਾਤ';
- } else if (hour < 10) {
- return 'ਸਵੇਰ';
- } else if (hour < 17) {
- return 'ਦੁਪਹਿਰ';
- } else if (hour < 20) {
- return 'ਸ਼ਾਮ';
- } else {
- return 'ਰਾਤ';
- }
- },
- week: {
- dow: 0, // Sunday is the first day of the week.
- doy: 6 // The week that contains Jan 6th is the first week of the year.
- } });
- return paIn;
- });
- /***/ }),
- /* 111 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/pl.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Polish [pl]
- //! author : Rafal Hirsz : https://github.com/evoL
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var monthsNominative =
- 'styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień'.split(
- '_'),
- monthsSubjective =
- 'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia'.split(
- '_'),
- monthsParse = [
- /^sty/i,
- /^lut/i,
- /^mar/i,
- /^kwi/i,
- /^maj/i,
- /^cze/i,
- /^lip/i,
- /^sie/i,
- /^wrz/i,
- /^paź/i,
- /^lis/i,
- /^gru/i];
- function plural(n) {
- return n % 10 < 5 && n % 10 > 1 && ~~(n / 10) % 10 !== 1;
- }
- function translate(number, withoutSuffix, key) {
- var result = number + ' ';
- switch (key) {
- case 'ss':
- return result + (plural(number) ? 'sekundy' : 'sekund');
- case 'm':
- return withoutSuffix ? 'minuta' : 'minutę';
- case 'mm':
- return result + (plural(number) ? 'minuty' : 'minut');
- case 'h':
- return withoutSuffix ? 'godzina' : 'godzinę';
- case 'hh':
- return result + (plural(number) ? 'godziny' : 'godzin');
- case 'ww':
- return result + (plural(number) ? 'tygodnie' : 'tygodni');
- case 'MM':
- return result + (plural(number) ? 'miesiące' : 'miesięcy');
- case 'yy':
- return result + (plural(number) ? 'lata' : 'lat');}
- }
- var pl = moment.defineLocale('pl', {
- months: function months(momentToFormat, format) {
- if (!momentToFormat) {
- return monthsNominative;
- } else if (/D MMMM/.test(format)) {
- return monthsSubjective[momentToFormat.month()];
- } else {
- return monthsNominative[momentToFormat.month()];
- }
- },
- monthsShort: 'sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru'.split('_'),
- monthsParse: monthsParse,
- longMonthsParse: monthsParse,
- shortMonthsParse: monthsParse,
- weekdays:
- 'niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota'.split('_'),
- weekdaysShort: 'ndz_pon_wt_śr_czw_pt_sob'.split('_'),
- weekdaysMin: 'Nd_Pn_Wt_Śr_Cz_Pt_So'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd, D MMMM YYYY HH:mm' },
- calendar: {
- sameDay: '[Dziś o] LT',
- nextDay: '[Jutro o] LT',
- nextWeek: function nextWeek() {
- switch (this.day()) {
- case 0:
- return '[W niedzielę o] LT';
- case 2:
- return '[We wtorek o] LT';
- case 3:
- return '[W środę o] LT';
- case 6:
- return '[W sobotę o] LT';
- default:
- return '[W] dddd [o] LT';}
- },
- lastDay: '[Wczoraj o] LT',
- lastWeek: function lastWeek() {
- switch (this.day()) {
- case 0:
- return '[W zeszłą niedzielę o] LT';
- case 3:
- return '[W zeszłą środę o] LT';
- case 6:
- return '[W zeszłą sobotę o] LT';
- default:
- return '[W zeszły] dddd [o] LT';}
- },
- sameElse: 'L' },
- relativeTime: {
- future: 'za %s',
- past: '%s temu',
- s: 'kilka sekund',
- ss: translate,
- m: translate,
- mm: translate,
- h: translate,
- hh: translate,
- d: '1 dzień',
- dd: '%d dni',
- w: 'tydzień',
- ww: translate,
- M: 'miesiąc',
- MM: translate,
- y: 'rok',
- yy: translate },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- } });
- return pl;
- });
- /***/ }),
- /* 112 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/pt.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Portuguese [pt]
- //! author : Jefferson : https://github.com/jalex79
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var pt = moment.defineLocale('pt', {
- months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split(
- '_'),
- monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'),
- weekdays:
- 'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split(
- '_'),
- weekdaysShort: 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'),
- weekdaysMin: 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D [de] MMMM [de] YYYY',
- LLL: 'D [de] MMMM [de] YYYY HH:mm',
- LLLL: 'dddd, D [de] MMMM [de] YYYY HH:mm' },
- calendar: {
- sameDay: '[Hoje às] LT',
- nextDay: '[Amanhã às] LT',
- nextWeek: 'dddd [às] LT',
- lastDay: '[Ontem às] LT',
- lastWeek: function lastWeek() {
- return this.day() === 0 || this.day() === 6 ?
- '[Último] dddd [às] LT' // Saturday + Sunday
- : '[Última] dddd [às] LT'; // Monday - Friday
- },
- sameElse: 'L' },
- relativeTime: {
- future: 'em %s',
- past: 'há %s',
- s: 'segundos',
- ss: '%d segundos',
- m: 'um minuto',
- mm: '%d minutos',
- h: 'uma hora',
- hh: '%d horas',
- d: 'um dia',
- dd: '%d dias',
- w: 'uma semana',
- ww: '%d semanas',
- M: 'um mês',
- MM: '%d meses',
- y: 'um ano',
- yy: '%d anos' },
- dayOfMonthOrdinalParse: /\d{1,2}º/,
- ordinal: '%dº',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- } });
- return pt;
- });
- /***/ }),
- /* 113 */
- /*!******************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/pt-br.js ***!
- \******************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Portuguese (Brazil) [pt-br]
- //! author : Caio Ribeiro Pereira : https://github.com/caio-ribeiro-pereira
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var ptBr = moment.defineLocale('pt-br', {
- months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split(
- '_'),
- monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'),
- weekdays:
- 'domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado'.split(
- '_'),
- weekdaysShort: 'dom_seg_ter_qua_qui_sex_sáb'.split('_'),
- weekdaysMin: 'do_2ª_3ª_4ª_5ª_6ª_sá'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D [de] MMMM [de] YYYY',
- LLL: 'D [de] MMMM [de] YYYY [às] HH:mm',
- LLLL: 'dddd, D [de] MMMM [de] YYYY [às] HH:mm' },
- calendar: {
- sameDay: '[Hoje às] LT',
- nextDay: '[Amanhã às] LT',
- nextWeek: 'dddd [às] LT',
- lastDay: '[Ontem às] LT',
- lastWeek: function lastWeek() {
- return this.day() === 0 || this.day() === 6 ?
- '[Último] dddd [às] LT' // Saturday + Sunday
- : '[Última] dddd [às] LT'; // Monday - Friday
- },
- sameElse: 'L' },
- relativeTime: {
- future: 'em %s',
- past: 'há %s',
- s: 'poucos segundos',
- ss: '%d segundos',
- m: 'um minuto',
- mm: '%d minutos',
- h: 'uma hora',
- hh: '%d horas',
- d: 'um dia',
- dd: '%d dias',
- M: 'um mês',
- MM: '%d meses',
- y: 'um ano',
- yy: '%d anos' },
- dayOfMonthOrdinalParse: /\d{1,2}º/,
- ordinal: '%dº',
- invalidDate: 'Data inválida' });
- return ptBr;
- });
- /***/ }),
- /* 114 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/ro.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Romanian [ro]
- //! author : Vlad Gurdiga : https://github.com/gurdiga
- //! author : Valentin Agachi : https://github.com/avaly
- //! author : Emanuel Cepoi : https://github.com/cepem
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- function relativeTimeWithPlural(number, withoutSuffix, key) {
- var format = {
- ss: 'secunde',
- mm: 'minute',
- hh: 'ore',
- dd: 'zile',
- ww: 'săptămâni',
- MM: 'luni',
- yy: 'ani' },
- separator = ' ';
- if (number % 100 >= 20 || number >= 100 && number % 100 === 0) {
- separator = ' de ';
- }
- return number + separator + format[key];
- }
- var ro = moment.defineLocale('ro', {
- months: 'ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie'.split(
- '_'),
- monthsShort:
- 'ian._feb._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.'.split(
- '_'),
- monthsParseExact: true,
- weekdays: 'duminică_luni_marți_miercuri_joi_vineri_sâmbătă'.split('_'),
- weekdaysShort: 'Dum_Lun_Mar_Mie_Joi_Vin_Sâm'.split('_'),
- weekdaysMin: 'Du_Lu_Ma_Mi_Jo_Vi_Sâ'.split('_'),
- longDateFormat: {
- LT: 'H:mm',
- LTS: 'H:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY H:mm',
- LLLL: 'dddd, D MMMM YYYY H:mm' },
- calendar: {
- sameDay: '[azi la] LT',
- nextDay: '[mâine la] LT',
- nextWeek: 'dddd [la] LT',
- lastDay: '[ieri la] LT',
- lastWeek: '[fosta] dddd [la] LT',
- sameElse: 'L' },
- relativeTime: {
- future: 'peste %s',
- past: '%s în urmă',
- s: 'câteva secunde',
- ss: relativeTimeWithPlural,
- m: 'un minut',
- mm: relativeTimeWithPlural,
- h: 'o oră',
- hh: relativeTimeWithPlural,
- d: 'o zi',
- dd: relativeTimeWithPlural,
- w: 'o săptămână',
- ww: relativeTimeWithPlural,
- M: 'o lună',
- MM: relativeTimeWithPlural,
- y: 'un an',
- yy: relativeTimeWithPlural },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 7 // The week that contains Jan 7th is the first week of the year.
- } });
- return ro;
- });
- /***/ }),
- /* 115 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/ru.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Russian [ru]
- //! author : Viktorminator : https://github.com/Viktorminator
- //! author : Menelion Elensúle : https://github.com/Oire
- //! author : Коренберг Марк : https://github.com/socketpair
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- function plural(word, num) {
- var forms = word.split('_');
- return num % 10 === 1 && num % 100 !== 11 ?
- forms[0] :
- num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ?
- forms[1] :
- forms[2];
- }
- function relativeTimeWithPlural(number, withoutSuffix, key) {
- var format = {
- ss: withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд',
- mm: withoutSuffix ? 'минута_минуты_минут' : 'минуту_минуты_минут',
- hh: 'час_часа_часов',
- dd: 'день_дня_дней',
- ww: 'неделя_недели_недель',
- MM: 'месяц_месяца_месяцев',
- yy: 'год_года_лет' };
- if (key === 'm') {
- return withoutSuffix ? 'минута' : 'минуту';
- } else {
- return number + ' ' + plural(format[key], +number);
- }
- }
- var monthsParse = [
- /^янв/i,
- /^фев/i,
- /^мар/i,
- /^апр/i,
- /^ма[йя]/i,
- /^июн/i,
- /^июл/i,
- /^авг/i,
- /^сен/i,
- /^окт/i,
- /^ноя/i,
- /^дек/i];
- // http://new.gramota.ru/spravka/rules/139-prop : § 103
- // Сокращения месяцев: http://new.gramota.ru/spravka/buro/search-answer?s=242637
- // CLDR data: http://www.unicode.org/cldr/charts/28/summary/ru.html#1753
- var ru = moment.defineLocale('ru', {
- months: {
- format: 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split(
- '_'),
- standalone:
- 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split(
- '_') },
- monthsShort: {
- // по CLDR именно "июл." и "июн.", но какой смысл менять букву на точку?
- format: 'янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.'.split(
- '_'),
- standalone:
- 'янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.'.split(
- '_') },
- weekdays: {
- standalone:
- 'воскресенье_понедельник_вторник_среда_четверг_пятница_суббота'.split(
- '_'),
- format: 'воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу'.split(
- '_'),
- isFormat: /\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?] ?dddd/ },
- weekdaysShort: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),
- weekdaysMin: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),
- monthsParse: monthsParse,
- longMonthsParse: monthsParse,
- shortMonthsParse: monthsParse,
- // полные названия с падежами, по три буквы, для некоторых, по 4 буквы, сокращения с точкой и без точки
- monthsRegex:
- /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,
- // копия предыдущего
- monthsShortRegex:
- /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,
- // полные названия с падежами
- monthsStrictRegex:
- /^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,
- // Выражение, которое соответствует только сокращённым формам
- monthsShortStrictRegex:
- /^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i,
- longDateFormat: {
- LT: 'H:mm',
- LTS: 'H:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D MMMM YYYY г.',
- LLL: 'D MMMM YYYY г., H:mm',
- LLLL: 'dddd, D MMMM YYYY г., H:mm' },
- calendar: {
- sameDay: '[Сегодня, в] LT',
- nextDay: '[Завтра, в] LT',
- lastDay: '[Вчера, в] LT',
- nextWeek: function nextWeek(now) {
- if (now.week() !== this.week()) {
- switch (this.day()) {
- case 0:
- return '[В следующее] dddd, [в] LT';
- case 1:
- case 2:
- case 4:
- return '[В следующий] dddd, [в] LT';
- case 3:
- case 5:
- case 6:
- return '[В следующую] dddd, [в] LT';}
- } else {
- if (this.day() === 2) {
- return '[Во] dddd, [в] LT';
- } else {
- return '[В] dddd, [в] LT';
- }
- }
- },
- lastWeek: function lastWeek(now) {
- if (now.week() !== this.week()) {
- switch (this.day()) {
- case 0:
- return '[В прошлое] dddd, [в] LT';
- case 1:
- case 2:
- case 4:
- return '[В прошлый] dddd, [в] LT';
- case 3:
- case 5:
- case 6:
- return '[В прошлую] dddd, [в] LT';}
- } else {
- if (this.day() === 2) {
- return '[Во] dddd, [в] LT';
- } else {
- return '[В] dddd, [в] LT';
- }
- }
- },
- sameElse: 'L' },
- relativeTime: {
- future: 'через %s',
- past: '%s назад',
- s: 'несколько секунд',
- ss: relativeTimeWithPlural,
- m: relativeTimeWithPlural,
- mm: relativeTimeWithPlural,
- h: 'час',
- hh: relativeTimeWithPlural,
- d: 'день',
- dd: relativeTimeWithPlural,
- w: 'неделя',
- ww: relativeTimeWithPlural,
- M: 'месяц',
- MM: relativeTimeWithPlural,
- y: 'год',
- yy: relativeTimeWithPlural },
- meridiemParse: /ночи|утра|дня|вечера/i,
- isPM: function isPM(input) {
- return /^(дня|вечера)$/.test(input);
- },
- meridiem: function meridiem(hour, minute, isLower) {
- if (hour < 4) {
- return 'ночи';
- } else if (hour < 12) {
- return 'утра';
- } else if (hour < 17) {
- return 'дня';
- } else {
- return 'вечера';
- }
- },
- dayOfMonthOrdinalParse: /\d{1,2}-(й|го|я)/,
- ordinal: function ordinal(number, period) {
- switch (period) {
- case 'M':
- case 'd':
- case 'DDD':
- return number + '-й';
- case 'D':
- return number + '-го';
- case 'w':
- case 'W':
- return number + '-я';
- default:
- return number;}
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- } });
- return ru;
- });
- /***/ }),
- /* 116 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/sd.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Sindhi [sd]
- //! author : Narain Sagar : https://github.com/narainsagar
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var months = [
- 'جنوري',
- 'فيبروري',
- 'مارچ',
- 'اپريل',
- 'مئي',
- 'جون',
- 'جولاءِ',
- 'آگسٽ',
- 'سيپٽمبر',
- 'آڪٽوبر',
- 'نومبر',
- 'ڊسمبر'],
- days = ['آچر', 'سومر', 'اڱارو', 'اربع', 'خميس', 'جمع', 'ڇنڇر'];
- var sd = moment.defineLocale('sd', {
- months: months,
- monthsShort: months,
- weekdays: days,
- weekdaysShort: days,
- weekdaysMin: days,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd، D MMMM YYYY HH:mm' },
- meridiemParse: /صبح|شام/,
- isPM: function isPM(input) {
- return 'شام' === input;
- },
- meridiem: function meridiem(hour, minute, isLower) {
- if (hour < 12) {
- return 'صبح';
- }
- return 'شام';
- },
- calendar: {
- sameDay: '[اڄ] LT',
- nextDay: '[سڀاڻي] LT',
- nextWeek: 'dddd [اڳين هفتي تي] LT',
- lastDay: '[ڪالهه] LT',
- lastWeek: '[گزريل هفتي] dddd [تي] LT',
- sameElse: 'L' },
- relativeTime: {
- future: '%s پوء',
- past: '%s اڳ',
- s: 'چند سيڪنڊ',
- ss: '%d سيڪنڊ',
- m: 'هڪ منٽ',
- mm: '%d منٽ',
- h: 'هڪ ڪلاڪ',
- hh: '%d ڪلاڪ',
- d: 'هڪ ڏينهن',
- dd: '%d ڏينهن',
- M: 'هڪ مهينو',
- MM: '%d مهينا',
- y: 'هڪ سال',
- yy: '%d سال' },
- preparse: function preparse(string) {
- return string.replace(/،/g, ',');
- },
- postformat: function postformat(string) {
- return string.replace(/,/g, '،');
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- } });
- return sd;
- });
- /***/ }),
- /* 117 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/se.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Northern Sami [se]
- //! authors : Bård Rolstad Henriksen : https://github.com/karamell
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var se = moment.defineLocale('se', {
- months: 'ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu'.split(
- '_'),
- monthsShort:
- 'ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov'.split('_'),
- weekdays:
- 'sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat'.split(
- '_'),
- weekdaysShort: 'sotn_vuos_maŋ_gask_duor_bear_láv'.split('_'),
- weekdaysMin: 's_v_m_g_d_b_L'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'MMMM D. [b.] YYYY',
- LLL: 'MMMM D. [b.] YYYY [ti.] HH:mm',
- LLLL: 'dddd, MMMM D. [b.] YYYY [ti.] HH:mm' },
- calendar: {
- sameDay: '[otne ti] LT',
- nextDay: '[ihttin ti] LT',
- nextWeek: 'dddd [ti] LT',
- lastDay: '[ikte ti] LT',
- lastWeek: '[ovddit] dddd [ti] LT',
- sameElse: 'L' },
- relativeTime: {
- future: '%s geažes',
- past: 'maŋit %s',
- s: 'moadde sekunddat',
- ss: '%d sekunddat',
- m: 'okta minuhta',
- mm: '%d minuhtat',
- h: 'okta diimmu',
- hh: '%d diimmut',
- d: 'okta beaivi',
- dd: '%d beaivvit',
- M: 'okta mánnu',
- MM: '%d mánut',
- y: 'okta jahki',
- yy: '%d jagit' },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- } });
- return se;
- });
- /***/ }),
- /* 118 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/si.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Sinhalese [si]
- //! author : Sampath Sitinamaluwa : https://github.com/sampathsris
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- /*jshint -W100*/
- var si = moment.defineLocale('si', {
- months: 'ජනවාරි_පෙබරවාරි_මාර්තු_අප්රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්'.split(
- '_'),
- monthsShort: 'ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ'.split(
- '_'),
- weekdays:
- 'ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා'.split(
- '_'),
- weekdaysShort: 'ඉරි_සඳු_අඟ_බදා_බ්රහ_සිකු_සෙන'.split('_'),
- weekdaysMin: 'ඉ_ස_අ_බ_බ්ර_සි_සෙ'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'a h:mm',
- LTS: 'a h:mm:ss',
- L: 'YYYY/MM/DD',
- LL: 'YYYY MMMM D',
- LLL: 'YYYY MMMM D, a h:mm',
- LLLL: 'YYYY MMMM D [වැනි] dddd, a h:mm:ss' },
- calendar: {
- sameDay: '[අද] LT[ට]',
- nextDay: '[හෙට] LT[ට]',
- nextWeek: 'dddd LT[ට]',
- lastDay: '[ඊයේ] LT[ට]',
- lastWeek: '[පසුගිය] dddd LT[ට]',
- sameElse: 'L' },
- relativeTime: {
- future: '%sකින්',
- past: '%sකට පෙර',
- s: 'තත්පර කිහිපය',
- ss: 'තත්පර %d',
- m: 'මිනිත්තුව',
- mm: 'මිනිත්තු %d',
- h: 'පැය',
- hh: 'පැය %d',
- d: 'දිනය',
- dd: 'දින %d',
- M: 'මාසය',
- MM: 'මාස %d',
- y: 'වසර',
- yy: 'වසර %d' },
- dayOfMonthOrdinalParse: /\d{1,2} වැනි/,
- ordinal: function ordinal(number) {
- return number + ' වැනි';
- },
- meridiemParse: /පෙර වරු|පස් වරු|පෙ.ව|ප.ව./,
- isPM: function isPM(input) {
- return input === 'ප.ව.' || input === 'පස් වරු';
- },
- meridiem: function meridiem(hours, minutes, isLower) {
- if (hours > 11) {
- return isLower ? 'ප.ව.' : 'පස් වරු';
- } else {
- return isLower ? 'පෙ.ව.' : 'පෙර වරු';
- }
- } });
- return si;
- });
- /***/ }),
- /* 119 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/sk.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Slovak [sk]
- //! author : Martin Minka : https://github.com/k2s
- //! based on work of petrbela : https://github.com/petrbela
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var months =
- 'január_február_marec_apríl_máj_jún_júl_august_september_október_november_december'.split(
- '_'),
- monthsShort = 'jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec'.split('_');
- function plural(n) {
- return n > 1 && n < 5;
- }
- function translate(number, withoutSuffix, key, isFuture) {
- var result = number + ' ';
- switch (key) {
- case 's': // a few seconds / in a few seconds / a few seconds ago
- return withoutSuffix || isFuture ? 'pár sekúnd' : 'pár sekundami';
- case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago
- if (withoutSuffix || isFuture) {
- return result + (plural(number) ? 'sekundy' : 'sekúnd');
- } else {
- return result + 'sekundami';
- }
- case 'm': // a minute / in a minute / a minute ago
- return withoutSuffix ? 'minúta' : isFuture ? 'minútu' : 'minútou';
- case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago
- if (withoutSuffix || isFuture) {
- return result + (plural(number) ? 'minúty' : 'minút');
- } else {
- return result + 'minútami';
- }
- case 'h': // an hour / in an hour / an hour ago
- return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou';
- case 'hh': // 9 hours / in 9 hours / 9 hours ago
- if (withoutSuffix || isFuture) {
- return result + (plural(number) ? 'hodiny' : 'hodín');
- } else {
- return result + 'hodinami';
- }
- case 'd': // a day / in a day / a day ago
- return withoutSuffix || isFuture ? 'deň' : 'dňom';
- case 'dd': // 9 days / in 9 days / 9 days ago
- if (withoutSuffix || isFuture) {
- return result + (plural(number) ? 'dni' : 'dní');
- } else {
- return result + 'dňami';
- }
- case 'M': // a month / in a month / a month ago
- return withoutSuffix || isFuture ? 'mesiac' : 'mesiacom';
- case 'MM': // 9 months / in 9 months / 9 months ago
- if (withoutSuffix || isFuture) {
- return result + (plural(number) ? 'mesiace' : 'mesiacov');
- } else {
- return result + 'mesiacmi';
- }
- case 'y': // a year / in a year / a year ago
- return withoutSuffix || isFuture ? 'rok' : 'rokom';
- case 'yy': // 9 years / in 9 years / 9 years ago
- if (withoutSuffix || isFuture) {
- return result + (plural(number) ? 'roky' : 'rokov');
- } else {
- return result + 'rokmi';
- }}
- }
- var sk = moment.defineLocale('sk', {
- months: months,
- monthsShort: monthsShort,
- weekdays: 'nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota'.split('_'),
- weekdaysShort: 'ne_po_ut_st_št_pi_so'.split('_'),
- weekdaysMin: 'ne_po_ut_st_št_pi_so'.split('_'),
- longDateFormat: {
- LT: 'H:mm',
- LTS: 'H:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D. MMMM YYYY',
- LLL: 'D. MMMM YYYY H:mm',
- LLLL: 'dddd D. MMMM YYYY H:mm' },
- calendar: {
- sameDay: '[dnes o] LT',
- nextDay: '[zajtra o] LT',
- nextWeek: function nextWeek() {
- switch (this.day()) {
- case 0:
- return '[v nedeľu o] LT';
- case 1:
- case 2:
- return '[v] dddd [o] LT';
- case 3:
- return '[v stredu o] LT';
- case 4:
- return '[vo štvrtok o] LT';
- case 5:
- return '[v piatok o] LT';
- case 6:
- return '[v sobotu o] LT';}
- },
- lastDay: '[včera o] LT',
- lastWeek: function lastWeek() {
- switch (this.day()) {
- case 0:
- return '[minulú nedeľu o] LT';
- case 1:
- case 2:
- return '[minulý] dddd [o] LT';
- case 3:
- return '[minulú stredu o] LT';
- case 4:
- case 5:
- return '[minulý] dddd [o] LT';
- case 6:
- return '[minulú sobotu o] LT';}
- },
- sameElse: 'L' },
- relativeTime: {
- future: 'za %s',
- past: 'pred %s',
- s: translate,
- ss: translate,
- m: translate,
- mm: translate,
- h: translate,
- hh: translate,
- d: translate,
- dd: translate,
- M: translate,
- MM: translate,
- y: translate,
- yy: translate },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- } });
- return sk;
- });
- /***/ }),
- /* 120 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/sl.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Slovenian [sl]
- //! author : Robert Sedovšek : https://github.com/sedovsek
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- function processRelativeTime(number, withoutSuffix, key, isFuture) {
- var result = number + ' ';
- switch (key) {
- case 's':
- return withoutSuffix || isFuture ?
- 'nekaj sekund' :
- 'nekaj sekundami';
- case 'ss':
- if (number === 1) {
- result += withoutSuffix ? 'sekundo' : 'sekundi';
- } else if (number === 2) {
- result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';
- } else if (number < 5) {
- result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';
- } else {
- result += 'sekund';
- }
- return result;
- case 'm':
- return withoutSuffix ? 'ena minuta' : 'eno minuto';
- case 'mm':
- if (number === 1) {
- result += withoutSuffix ? 'minuta' : 'minuto';
- } else if (number === 2) {
- result += withoutSuffix || isFuture ? 'minuti' : 'minutama';
- } else if (number < 5) {
- result += withoutSuffix || isFuture ? 'minute' : 'minutami';
- } else {
- result += withoutSuffix || isFuture ? 'minut' : 'minutami';
- }
- return result;
- case 'h':
- return withoutSuffix ? 'ena ura' : 'eno uro';
- case 'hh':
- if (number === 1) {
- result += withoutSuffix ? 'ura' : 'uro';
- } else if (number === 2) {
- result += withoutSuffix || isFuture ? 'uri' : 'urama';
- } else if (number < 5) {
- result += withoutSuffix || isFuture ? 'ure' : 'urami';
- } else {
- result += withoutSuffix || isFuture ? 'ur' : 'urami';
- }
- return result;
- case 'd':
- return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';
- case 'dd':
- if (number === 1) {
- result += withoutSuffix || isFuture ? 'dan' : 'dnem';
- } else if (number === 2) {
- result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';
- } else {
- result += withoutSuffix || isFuture ? 'dni' : 'dnevi';
- }
- return result;
- case 'M':
- return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';
- case 'MM':
- if (number === 1) {
- result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';
- } else if (number === 2) {
- result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';
- } else if (number < 5) {
- result += withoutSuffix || isFuture ? 'mesece' : 'meseci';
- } else {
- result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';
- }
- return result;
- case 'y':
- return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';
- case 'yy':
- if (number === 1) {
- result += withoutSuffix || isFuture ? 'leto' : 'letom';
- } else if (number === 2) {
- result += withoutSuffix || isFuture ? 'leti' : 'letoma';
- } else if (number < 5) {
- result += withoutSuffix || isFuture ? 'leta' : 'leti';
- } else {
- result += withoutSuffix || isFuture ? 'let' : 'leti';
- }
- return result;}
- }
- var sl = moment.defineLocale('sl', {
- months: 'januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december'.split(
- '_'),
- monthsShort:
- 'jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.'.split(
- '_'),
- monthsParseExact: true,
- weekdays: 'nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota'.split('_'),
- weekdaysShort: 'ned._pon._tor._sre._čet._pet._sob.'.split('_'),
- weekdaysMin: 'ne_po_to_sr_če_pe_so'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'H:mm',
- LTS: 'H:mm:ss',
- L: 'DD. MM. YYYY',
- LL: 'D. MMMM YYYY',
- LLL: 'D. MMMM YYYY H:mm',
- LLLL: 'dddd, D. MMMM YYYY H:mm' },
- calendar: {
- sameDay: '[danes ob] LT',
- nextDay: '[jutri ob] LT',
- nextWeek: function nextWeek() {
- switch (this.day()) {
- case 0:
- return '[v] [nedeljo] [ob] LT';
- case 3:
- return '[v] [sredo] [ob] LT';
- case 6:
- return '[v] [soboto] [ob] LT';
- case 1:
- case 2:
- case 4:
- case 5:
- return '[v] dddd [ob] LT';}
- },
- lastDay: '[včeraj ob] LT',
- lastWeek: function lastWeek() {
- switch (this.day()) {
- case 0:
- return '[prejšnjo] [nedeljo] [ob] LT';
- case 3:
- return '[prejšnjo] [sredo] [ob] LT';
- case 6:
- return '[prejšnjo] [soboto] [ob] LT';
- case 1:
- case 2:
- case 4:
- case 5:
- return '[prejšnji] dddd [ob] LT';}
- },
- sameElse: 'L' },
- relativeTime: {
- future: 'čez %s',
- past: 'pred %s',
- s: processRelativeTime,
- ss: processRelativeTime,
- m: processRelativeTime,
- mm: processRelativeTime,
- h: processRelativeTime,
- hh: processRelativeTime,
- d: processRelativeTime,
- dd: processRelativeTime,
- M: processRelativeTime,
- MM: processRelativeTime,
- y: processRelativeTime,
- yy: processRelativeTime },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 7 // The week that contains Jan 7th is the first week of the year.
- } });
- return sl;
- });
- /***/ }),
- /* 121 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/sq.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Albanian [sq]
- //! author : Flakërim Ismani : https://github.com/flakerimi
- //! author : Menelion Elensúle : https://github.com/Oire
- //! author : Oerd Cukalla : https://github.com/oerd
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var sq = moment.defineLocale('sq', {
- months: 'Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor'.split(
- '_'),
- monthsShort: 'Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj'.split('_'),
- weekdays: 'E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë'.split(
- '_'),
- weekdaysShort: 'Die_Hën_Mar_Mër_Enj_Pre_Sht'.split('_'),
- weekdaysMin: 'D_H_Ma_Më_E_P_Sh'.split('_'),
- weekdaysParseExact: true,
- meridiemParse: /PD|MD/,
- isPM: function isPM(input) {
- return input.charAt(0) === 'M';
- },
- meridiem: function meridiem(hours, minutes, isLower) {
- return hours < 12 ? 'PD' : 'MD';
- },
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd, D MMMM YYYY HH:mm' },
- calendar: {
- sameDay: '[Sot në] LT',
- nextDay: '[Nesër në] LT',
- nextWeek: 'dddd [në] LT',
- lastDay: '[Dje në] LT',
- lastWeek: 'dddd [e kaluar në] LT',
- sameElse: 'L' },
- relativeTime: {
- future: 'në %s',
- past: '%s më parë',
- s: 'disa sekonda',
- ss: '%d sekonda',
- m: 'një minutë',
- mm: '%d minuta',
- h: 'një orë',
- hh: '%d orë',
- d: 'një ditë',
- dd: '%d ditë',
- M: 'një muaj',
- MM: '%d muaj',
- y: 'një vit',
- yy: '%d vite' },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- } });
- return sq;
- });
- /***/ }),
- /* 122 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/sr.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Serbian [sr]
- //! author : Milan Janačković<milanjanackovic@gmail.com> : https://github.com/milan-j
- //! author : Stefan Crnjaković <stefan@hotmail.rs> : https://github.com/crnjakovic
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var translator = {
- words: {
- //Different grammatical cases
- ss: ['sekunda', 'sekunde', 'sekundi'],
- m: ['jedan minut', 'jednog minuta'],
- mm: ['minut', 'minuta', 'minuta'],
- h: ['jedan sat', 'jednog sata'],
- hh: ['sat', 'sata', 'sati'],
- d: ['jedan dan', 'jednog dana'],
- dd: ['dan', 'dana', 'dana'],
- M: ['jedan mesec', 'jednog meseca'],
- MM: ['mesec', 'meseca', 'meseci'],
- y: ['jednu godinu', 'jedne godine'],
- yy: ['godinu', 'godine', 'godina'] },
- correctGrammaticalCase: function correctGrammaticalCase(number, wordKey) {
- if (
- number % 10 >= 1 &&
- number % 10 <= 4 && (
- number % 100 < 10 || number % 100 >= 20))
- {
- return number % 10 === 1 ? wordKey[0] : wordKey[1];
- }
- return wordKey[2];
- },
- translate: function translate(number, withoutSuffix, key, isFuture) {
- var wordKey = translator.words[key],
- word;
- if (key.length === 1) {
- // Nominativ
- if (key === 'y' && withoutSuffix) return 'jedna godina';
- return isFuture || withoutSuffix ? wordKey[0] : wordKey[1];
- }
- word = translator.correctGrammaticalCase(number, wordKey);
- // Nominativ
- if (key === 'yy' && withoutSuffix && word === 'godinu') {
- return number + ' godina';
- }
- return number + ' ' + word;
- } };
- var sr = moment.defineLocale('sr', {
- months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split(
- '_'),
- monthsShort:
- 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'),
- monthsParseExact: true,
- weekdays: 'nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota'.split(
- '_'),
- weekdaysShort: 'ned._pon._uto._sre._čet._pet._sub.'.split('_'),
- weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'H:mm',
- LTS: 'H:mm:ss',
- L: 'D. M. YYYY.',
- LL: 'D. MMMM YYYY.',
- LLL: 'D. MMMM YYYY. H:mm',
- LLLL: 'dddd, D. MMMM YYYY. H:mm' },
- calendar: {
- sameDay: '[danas u] LT',
- nextDay: '[sutra u] LT',
- nextWeek: function nextWeek() {
- switch (this.day()) {
- case 0:
- return '[u] [nedelju] [u] LT';
- case 3:
- return '[u] [sredu] [u] LT';
- case 6:
- return '[u] [subotu] [u] LT';
- case 1:
- case 2:
- case 4:
- case 5:
- return '[u] dddd [u] LT';}
- },
- lastDay: '[juče u] LT',
- lastWeek: function lastWeek() {
- var lastWeekDays = [
- '[prošle] [nedelje] [u] LT',
- '[prošlog] [ponedeljka] [u] LT',
- '[prošlog] [utorka] [u] LT',
- '[prošle] [srede] [u] LT',
- '[prošlog] [četvrtka] [u] LT',
- '[prošlog] [petka] [u] LT',
- '[prošle] [subote] [u] LT'];
- return lastWeekDays[this.day()];
- },
- sameElse: 'L' },
- relativeTime: {
- future: 'za %s',
- past: 'pre %s',
- s: 'nekoliko sekundi',
- ss: translator.translate,
- m: translator.translate,
- mm: translator.translate,
- h: translator.translate,
- hh: translator.translate,
- d: translator.translate,
- dd: translator.translate,
- M: translator.translate,
- MM: translator.translate,
- y: translator.translate,
- yy: translator.translate },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 7 // The week that contains Jan 7th is the first week of the year.
- } });
- return sr;
- });
- /***/ }),
- /* 123 */
- /*!********************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/sr-cyrl.js ***!
- \********************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Serbian Cyrillic [sr-cyrl]
- //! author : Milan Janačković<milanjanackovic@gmail.com> : https://github.com/milan-j
- //! author : Stefan Crnjaković <stefan@hotmail.rs> : https://github.com/crnjakovic
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var translator = {
- words: {
- //Different grammatical cases
- ss: ['секунда', 'секунде', 'секунди'],
- m: ['један минут', 'једног минута'],
- mm: ['минут', 'минута', 'минута'],
- h: ['један сат', 'једног сата'],
- hh: ['сат', 'сата', 'сати'],
- d: ['један дан', 'једног дана'],
- dd: ['дан', 'дана', 'дана'],
- M: ['један месец', 'једног месеца'],
- MM: ['месец', 'месеца', 'месеци'],
- y: ['једну годину', 'једне године'],
- yy: ['годину', 'године', 'година'] },
- correctGrammaticalCase: function correctGrammaticalCase(number, wordKey) {
- if (
- number % 10 >= 1 &&
- number % 10 <= 4 && (
- number % 100 < 10 || number % 100 >= 20))
- {
- return number % 10 === 1 ? wordKey[0] : wordKey[1];
- }
- return wordKey[2];
- },
- translate: function translate(number, withoutSuffix, key, isFuture) {
- var wordKey = translator.words[key],
- word;
- if (key.length === 1) {
- // Nominativ
- if (key === 'y' && withoutSuffix) return 'једна година';
- return isFuture || withoutSuffix ? wordKey[0] : wordKey[1];
- }
- word = translator.correctGrammaticalCase(number, wordKey);
- // Nominativ
- if (key === 'yy' && withoutSuffix && word === 'годину') {
- return number + ' година';
- }
- return number + ' ' + word;
- } };
- var srCyrl = moment.defineLocale('sr-cyrl', {
- months: 'јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар'.split(
- '_'),
- monthsShort:
- 'јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.'.split('_'),
- monthsParseExact: true,
- weekdays: 'недеља_понедељак_уторак_среда_четвртак_петак_субота'.split('_'),
- weekdaysShort: 'нед._пон._уто._сре._чет._пет._суб.'.split('_'),
- weekdaysMin: 'не_по_ут_ср_че_пе_су'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'H:mm',
- LTS: 'H:mm:ss',
- L: 'D. M. YYYY.',
- LL: 'D. MMMM YYYY.',
- LLL: 'D. MMMM YYYY. H:mm',
- LLLL: 'dddd, D. MMMM YYYY. H:mm' },
- calendar: {
- sameDay: '[данас у] LT',
- nextDay: '[сутра у] LT',
- nextWeek: function nextWeek() {
- switch (this.day()) {
- case 0:
- return '[у] [недељу] [у] LT';
- case 3:
- return '[у] [среду] [у] LT';
- case 6:
- return '[у] [суботу] [у] LT';
- case 1:
- case 2:
- case 4:
- case 5:
- return '[у] dddd [у] LT';}
- },
- lastDay: '[јуче у] LT',
- lastWeek: function lastWeek() {
- var lastWeekDays = [
- '[прошле] [недеље] [у] LT',
- '[прошлог] [понедељка] [у] LT',
- '[прошлог] [уторка] [у] LT',
- '[прошле] [среде] [у] LT',
- '[прошлог] [четвртка] [у] LT',
- '[прошлог] [петка] [у] LT',
- '[прошле] [суботе] [у] LT'];
- return lastWeekDays[this.day()];
- },
- sameElse: 'L' },
- relativeTime: {
- future: 'за %s',
- past: 'пре %s',
- s: 'неколико секунди',
- ss: translator.translate,
- m: translator.translate,
- mm: translator.translate,
- h: translator.translate,
- hh: translator.translate,
- d: translator.translate,
- dd: translator.translate,
- M: translator.translate,
- MM: translator.translate,
- y: translator.translate,
- yy: translator.translate },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 7 // The week that contains Jan 1st is the first week of the year.
- } });
- return srCyrl;
- });
- /***/ }),
- /* 124 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/ss.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : siSwati [ss]
- //! author : Nicolai Davies<mail@nicolai.io> : https://github.com/nicolaidavies
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var ss = moment.defineLocale('ss', {
- months: "Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split(
- '_'),
- monthsShort: 'Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo'.split('_'),
- weekdays:
- 'Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo'.split(
- '_'),
- weekdaysShort: 'Lis_Umb_Lsb_Les_Lsi_Lsh_Umg'.split('_'),
- weekdaysMin: 'Li_Us_Lb_Lt_Ls_Lh_Ug'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'h:mm A',
- LTS: 'h:mm:ss A',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY h:mm A',
- LLLL: 'dddd, D MMMM YYYY h:mm A' },
- calendar: {
- sameDay: '[Namuhla nga] LT',
- nextDay: '[Kusasa nga] LT',
- nextWeek: 'dddd [nga] LT',
- lastDay: '[Itolo nga] LT',
- lastWeek: 'dddd [leliphelile] [nga] LT',
- sameElse: 'L' },
- relativeTime: {
- future: 'nga %s',
- past: 'wenteka nga %s',
- s: 'emizuzwana lomcane',
- ss: '%d mzuzwana',
- m: 'umzuzu',
- mm: '%d emizuzu',
- h: 'lihora',
- hh: '%d emahora',
- d: 'lilanga',
- dd: '%d emalanga',
- M: 'inyanga',
- MM: '%d tinyanga',
- y: 'umnyaka',
- yy: '%d iminyaka' },
- meridiemParse: /ekuseni|emini|entsambama|ebusuku/,
- meridiem: function meridiem(hours, minutes, isLower) {
- if (hours < 11) {
- return 'ekuseni';
- } else if (hours < 15) {
- return 'emini';
- } else if (hours < 19) {
- return 'entsambama';
- } else {
- return 'ebusuku';
- }
- },
- meridiemHour: function meridiemHour(hour, meridiem) {
- if (hour === 12) {
- hour = 0;
- }
- if (meridiem === 'ekuseni') {
- return hour;
- } else if (meridiem === 'emini') {
- return hour >= 11 ? hour : hour + 12;
- } else if (meridiem === 'entsambama' || meridiem === 'ebusuku') {
- if (hour === 0) {
- return 0;
- }
- return hour + 12;
- }
- },
- dayOfMonthOrdinalParse: /\d{1,2}/,
- ordinal: '%d',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- } });
- return ss;
- });
- /***/ }),
- /* 125 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/sv.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Swedish [sv]
- //! author : Jens Alm : https://github.com/ulmus
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var sv = moment.defineLocale('sv', {
- months: 'januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december'.split(
- '_'),
- monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),
- weekdays: 'söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag'.split('_'),
- weekdaysShort: 'sön_mån_tis_ons_tor_fre_lör'.split('_'),
- weekdaysMin: 'sö_må_ti_on_to_fr_lö'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'YYYY-MM-DD',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY [kl.] HH:mm',
- LLLL: 'dddd D MMMM YYYY [kl.] HH:mm',
- lll: 'D MMM YYYY HH:mm',
- llll: 'ddd D MMM YYYY HH:mm' },
- calendar: {
- sameDay: '[Idag] LT',
- nextDay: '[Imorgon] LT',
- lastDay: '[Igår] LT',
- nextWeek: '[På] dddd LT',
- lastWeek: '[I] dddd[s] LT',
- sameElse: 'L' },
- relativeTime: {
- future: 'om %s',
- past: 'för %s sedan',
- s: 'några sekunder',
- ss: '%d sekunder',
- m: 'en minut',
- mm: '%d minuter',
- h: 'en timme',
- hh: '%d timmar',
- d: 'en dag',
- dd: '%d dagar',
- M: 'en månad',
- MM: '%d månader',
- y: 'ett år',
- yy: '%d år' },
- dayOfMonthOrdinalParse: /\d{1,2}(\:e|\:a)/,
- ordinal: function ordinal(number) {
- var b = number % 10,
- output =
- ~~(number % 100 / 10) === 1 ?
- ':e' :
- b === 1 ?
- ':a' :
- b === 2 ?
- ':a' :
- b === 3 ?
- ':e' :
- ':e';
- return number + output;
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- } });
- return sv;
- });
- /***/ }),
- /* 126 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/sw.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Swahili [sw]
- //! author : Fahad Kassim : https://github.com/fadsel
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var sw = moment.defineLocale('sw', {
- months: 'Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba'.split(
- '_'),
- monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des'.split('_'),
- weekdays:
- 'Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi'.split(
- '_'),
- weekdaysShort: 'Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos'.split('_'),
- weekdaysMin: 'J2_J3_J4_J5_Al_Ij_J1'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'hh:mm A',
- LTS: 'HH:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd, D MMMM YYYY HH:mm' },
- calendar: {
- sameDay: '[leo saa] LT',
- nextDay: '[kesho saa] LT',
- nextWeek: '[wiki ijayo] dddd [saat] LT',
- lastDay: '[jana] LT',
- lastWeek: '[wiki iliyopita] dddd [saat] LT',
- sameElse: 'L' },
- relativeTime: {
- future: '%s baadaye',
- past: 'tokea %s',
- s: 'hivi punde',
- ss: 'sekunde %d',
- m: 'dakika moja',
- mm: 'dakika %d',
- h: 'saa limoja',
- hh: 'masaa %d',
- d: 'siku moja',
- dd: 'siku %d',
- M: 'mwezi mmoja',
- MM: 'miezi %d',
- y: 'mwaka mmoja',
- yy: 'miaka %d' },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 7 // The week that contains Jan 7th is the first week of the year.
- } });
- return sw;
- });
- /***/ }),
- /* 127 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/ta.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Tamil [ta]
- //! author : Arjunkumar Krishnamoorthy : https://github.com/tk120404
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var symbolMap = {
- 1: '௧',
- 2: '௨',
- 3: '௩',
- 4: '௪',
- 5: '௫',
- 6: '௬',
- 7: '௭',
- 8: '௮',
- 9: '௯',
- 0: '௦' },
- numberMap = {
- '௧': '1',
- '௨': '2',
- '௩': '3',
- '௪': '4',
- '௫': '5',
- '௬': '6',
- '௭': '7',
- '௮': '8',
- '௯': '9',
- '௦': '0' };
- var ta = moment.defineLocale('ta', {
- months: 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split(
- '_'),
- monthsShort:
- 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split(
- '_'),
- weekdays:
- 'ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை'.split(
- '_'),
- weekdaysShort: 'ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி'.split(
- '_'),
- weekdaysMin: 'ஞா_தி_செ_பு_வி_வெ_ச'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY, HH:mm',
- LLLL: 'dddd, D MMMM YYYY, HH:mm' },
- calendar: {
- sameDay: '[இன்று] LT',
- nextDay: '[நாளை] LT',
- nextWeek: 'dddd, LT',
- lastDay: '[நேற்று] LT',
- lastWeek: '[கடந்த வாரம்] dddd, LT',
- sameElse: 'L' },
- relativeTime: {
- future: '%s இல்',
- past: '%s முன்',
- s: 'ஒரு சில விநாடிகள்',
- ss: '%d விநாடிகள்',
- m: 'ஒரு நிமிடம்',
- mm: '%d நிமிடங்கள்',
- h: 'ஒரு மணி நேரம்',
- hh: '%d மணி நேரம்',
- d: 'ஒரு நாள்',
- dd: '%d நாட்கள்',
- M: 'ஒரு மாதம்',
- MM: '%d மாதங்கள்',
- y: 'ஒரு வருடம்',
- yy: '%d ஆண்டுகள்' },
- dayOfMonthOrdinalParse: /\d{1,2}வது/,
- ordinal: function ordinal(number) {
- return number + 'வது';
- },
- preparse: function preparse(string) {
- return string.replace(/[௧௨௩௪௫௬௭௮௯௦]/g, function (match) {
- return numberMap[match];
- });
- },
- postformat: function postformat(string) {
- return string.replace(/\d/g, function (match) {
- return symbolMap[match];
- });
- },
- // refer http://ta.wikipedia.org/s/1er1
- meridiemParse: /யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,
- meridiem: function meridiem(hour, minute, isLower) {
- if (hour < 2) {
- return ' யாமம்';
- } else if (hour < 6) {
- return ' வைகறை'; // வைகறை
- } else if (hour < 10) {
- return ' காலை'; // காலை
- } else if (hour < 14) {
- return ' நண்பகல்'; // நண்பகல்
- } else if (hour < 18) {
- return ' எற்பாடு'; // எற்பாடு
- } else if (hour < 22) {
- return ' மாலை'; // மாலை
- } else {
- return ' யாமம்';
- }
- },
- meridiemHour: function meridiemHour(hour, meridiem) {
- if (hour === 12) {
- hour = 0;
- }
- if (meridiem === 'யாமம்') {
- return hour < 2 ? hour : hour + 12;
- } else if (meridiem === 'வைகறை' || meridiem === 'காலை') {
- return hour;
- } else if (meridiem === 'நண்பகல்') {
- return hour >= 10 ? hour : hour + 12;
- } else {
- return hour + 12;
- }
- },
- week: {
- dow: 0, // Sunday is the first day of the week.
- doy: 6 // The week that contains Jan 6th is the first week of the year.
- } });
- return ta;
- });
- /***/ }),
- /* 128 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/te.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Telugu [te]
- //! author : Krishna Chaitanya Thota : https://github.com/kcthota
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var te = moment.defineLocale('te', {
- months: 'జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జులై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్'.split(
- '_'),
- monthsShort:
- 'జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జులై_ఆగ._సెప్._అక్టో._నవ._డిసె.'.split(
- '_'),
- monthsParseExact: true,
- weekdays:
- 'ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం'.split(
- '_'),
- weekdaysShort: 'ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని'.split('_'),
- weekdaysMin: 'ఆ_సో_మం_బు_గు_శు_శ'.split('_'),
- longDateFormat: {
- LT: 'A h:mm',
- LTS: 'A h:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY, A h:mm',
- LLLL: 'dddd, D MMMM YYYY, A h:mm' },
- calendar: {
- sameDay: '[నేడు] LT',
- nextDay: '[రేపు] LT',
- nextWeek: 'dddd, LT',
- lastDay: '[నిన్న] LT',
- lastWeek: '[గత] dddd, LT',
- sameElse: 'L' },
- relativeTime: {
- future: '%s లో',
- past: '%s క్రితం',
- s: 'కొన్ని క్షణాలు',
- ss: '%d సెకన్లు',
- m: 'ఒక నిమిషం',
- mm: '%d నిమిషాలు',
- h: 'ఒక గంట',
- hh: '%d గంటలు',
- d: 'ఒక రోజు',
- dd: '%d రోజులు',
- M: 'ఒక నెల',
- MM: '%d నెలలు',
- y: 'ఒక సంవత్సరం',
- yy: '%d సంవత్సరాలు' },
- dayOfMonthOrdinalParse: /\d{1,2}వ/,
- ordinal: '%dవ',
- meridiemParse: /రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,
- meridiemHour: function meridiemHour(hour, meridiem) {
- if (hour === 12) {
- hour = 0;
- }
- if (meridiem === 'రాత్రి') {
- return hour < 4 ? hour : hour + 12;
- } else if (meridiem === 'ఉదయం') {
- return hour;
- } else if (meridiem === 'మధ్యాహ్నం') {
- return hour >= 10 ? hour : hour + 12;
- } else if (meridiem === 'సాయంత్రం') {
- return hour + 12;
- }
- },
- meridiem: function meridiem(hour, minute, isLower) {
- if (hour < 4) {
- return 'రాత్రి';
- } else if (hour < 10) {
- return 'ఉదయం';
- } else if (hour < 17) {
- return 'మధ్యాహ్నం';
- } else if (hour < 20) {
- return 'సాయంత్రం';
- } else {
- return 'రాత్రి';
- }
- },
- week: {
- dow: 0, // Sunday is the first day of the week.
- doy: 6 // The week that contains Jan 6th is the first week of the year.
- } });
- return te;
- });
- /***/ }),
- /* 129 */
- /*!****************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/tet.js ***!
- \****************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Tetun Dili (East Timor) [tet]
- //! author : Joshua Brooks : https://github.com/joshbrooks
- //! author : Onorio De J. Afonso : https://github.com/marobo
- //! author : Sonia Simoes : https://github.com/soniasimoes
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var tet = moment.defineLocale('tet', {
- months: 'Janeiru_Fevereiru_Marsu_Abril_Maiu_Juñu_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru'.split(
- '_'),
- monthsShort: 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'),
- weekdays: 'Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu'.split('_'),
- weekdaysShort: 'Dom_Seg_Ters_Kua_Kint_Sest_Sab'.split('_'),
- weekdaysMin: 'Do_Seg_Te_Ku_Ki_Ses_Sa'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd, D MMMM YYYY HH:mm' },
- calendar: {
- sameDay: '[Ohin iha] LT',
- nextDay: '[Aban iha] LT',
- nextWeek: 'dddd [iha] LT',
- lastDay: '[Horiseik iha] LT',
- lastWeek: 'dddd [semana kotuk] [iha] LT',
- sameElse: 'L' },
- relativeTime: {
- future: 'iha %s',
- past: '%s liuba',
- s: 'segundu balun',
- ss: 'segundu %d',
- m: 'minutu ida',
- mm: 'minutu %d',
- h: 'oras ida',
- hh: 'oras %d',
- d: 'loron ida',
- dd: 'loron %d',
- M: 'fulan ida',
- MM: 'fulan %d',
- y: 'tinan ida',
- yy: 'tinan %d' },
- dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
- ordinal: function ordinal(number) {
- var b = number % 10,
- output =
- ~~(number % 100 / 10) === 1 ?
- 'th' :
- b === 1 ?
- 'st' :
- b === 2 ?
- 'nd' :
- b === 3 ?
- 'rd' :
- 'th';
- return number + output;
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- } });
- return tet;
- });
- /***/ }),
- /* 130 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/tg.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Tajik [tg]
- //! author : Orif N. Jr. : https://github.com/orif-jr
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var suffixes = {
- 0: '-ум',
- 1: '-ум',
- 2: '-юм',
- 3: '-юм',
- 4: '-ум',
- 5: '-ум',
- 6: '-ум',
- 7: '-ум',
- 8: '-ум',
- 9: '-ум',
- 10: '-ум',
- 12: '-ум',
- 13: '-ум',
- 20: '-ум',
- 30: '-юм',
- 40: '-ум',
- 50: '-ум',
- 60: '-ум',
- 70: '-ум',
- 80: '-ум',
- 90: '-ум',
- 100: '-ум' };
- var tg = moment.defineLocale('tg', {
- months: {
- format: 'январи_феврали_марти_апрели_майи_июни_июли_августи_сентябри_октябри_ноябри_декабри'.split(
- '_'),
- standalone:
- 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split(
- '_') },
- monthsShort: 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'),
- weekdays: 'якшанбе_душанбе_сешанбе_чоршанбе_панҷшанбе_ҷумъа_шанбе'.split(
- '_'),
- weekdaysShort: 'яшб_дшб_сшб_чшб_пшб_ҷум_шнб'.split('_'),
- weekdaysMin: 'яш_дш_сш_чш_пш_ҷм_шб'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd, D MMMM YYYY HH:mm' },
- calendar: {
- sameDay: '[Имрӯз соати] LT',
- nextDay: '[Фардо соати] LT',
- lastDay: '[Дирӯз соати] LT',
- nextWeek: 'dddd[и] [ҳафтаи оянда соати] LT',
- lastWeek: 'dddd[и] [ҳафтаи гузашта соати] LT',
- sameElse: 'L' },
- relativeTime: {
- future: 'баъди %s',
- past: '%s пеш',
- s: 'якчанд сония',
- m: 'як дақиқа',
- mm: '%d дақиқа',
- h: 'як соат',
- hh: '%d соат',
- d: 'як рӯз',
- dd: '%d рӯз',
- M: 'як моҳ',
- MM: '%d моҳ',
- y: 'як сол',
- yy: '%d сол' },
- meridiemParse: /шаб|субҳ|рӯз|бегоҳ/,
- meridiemHour: function meridiemHour(hour, meridiem) {
- if (hour === 12) {
- hour = 0;
- }
- if (meridiem === 'шаб') {
- return hour < 4 ? hour : hour + 12;
- } else if (meridiem === 'субҳ') {
- return hour;
- } else if (meridiem === 'рӯз') {
- return hour >= 11 ? hour : hour + 12;
- } else if (meridiem === 'бегоҳ') {
- return hour + 12;
- }
- },
- meridiem: function meridiem(hour, minute, isLower) {
- if (hour < 4) {
- return 'шаб';
- } else if (hour < 11) {
- return 'субҳ';
- } else if (hour < 16) {
- return 'рӯз';
- } else if (hour < 19) {
- return 'бегоҳ';
- } else {
- return 'шаб';
- }
- },
- dayOfMonthOrdinalParse: /\d{1,2}-(ум|юм)/,
- ordinal: function ordinal(number) {
- var a = number % 10,
- b = number >= 100 ? 100 : null;
- return number + (suffixes[number] || suffixes[a] || suffixes[b]);
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 7 // The week that contains Jan 1th is the first week of the year.
- } });
- return tg;
- });
- /***/ }),
- /* 131 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/th.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Thai [th]
- //! author : Kridsada Thanabulpong : https://github.com/sirn
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var th = moment.defineLocale('th', {
- months: 'มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม'.split(
- '_'),
- monthsShort:
- 'ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.'.split(
- '_'),
- monthsParseExact: true,
- weekdays: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์'.split('_'),
- weekdaysShort: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์'.split('_'), // yes, three characters difference
- weekdaysMin: 'อา._จ._อ._พ._พฤ._ศ._ส.'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'H:mm',
- LTS: 'H:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY เวลา H:mm',
- LLLL: 'วันddddที่ D MMMM YYYY เวลา H:mm' },
- meridiemParse: /ก่อนเที่ยง|หลังเที่ยง/,
- isPM: function isPM(input) {
- return input === 'หลังเที่ยง';
- },
- meridiem: function meridiem(hour, minute, isLower) {
- if (hour < 12) {
- return 'ก่อนเที่ยง';
- } else {
- return 'หลังเที่ยง';
- }
- },
- calendar: {
- sameDay: '[วันนี้ เวลา] LT',
- nextDay: '[พรุ่งนี้ เวลา] LT',
- nextWeek: 'dddd[หน้า เวลา] LT',
- lastDay: '[เมื่อวานนี้ เวลา] LT',
- lastWeek: '[วัน]dddd[ที่แล้ว เวลา] LT',
- sameElse: 'L' },
- relativeTime: {
- future: 'อีก %s',
- past: '%sที่แล้ว',
- s: 'ไม่กี่วินาที',
- ss: '%d วินาที',
- m: '1 นาที',
- mm: '%d นาที',
- h: '1 ชั่วโมง',
- hh: '%d ชั่วโมง',
- d: '1 วัน',
- dd: '%d วัน',
- w: '1 สัปดาห์',
- ww: '%d สัปดาห์',
- M: '1 เดือน',
- MM: '%d เดือน',
- y: '1 ปี',
- yy: '%d ปี' } });
- return th;
- });
- /***/ }),
- /* 132 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/tk.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Turkmen [tk]
- //! author : Atamyrat Abdyrahmanov : https://github.com/atamyratabdy
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var suffixes = {
- 1: "'inji",
- 5: "'inji",
- 8: "'inji",
- 70: "'inji",
- 80: "'inji",
- 2: "'nji",
- 7: "'nji",
- 20: "'nji",
- 50: "'nji",
- 3: "'ünji",
- 4: "'ünji",
- 100: "'ünji",
- 6: "'njy",
- 9: "'unjy",
- 10: "'unjy",
- 30: "'unjy",
- 60: "'ynjy",
- 90: "'ynjy" };
- var tk = moment.defineLocale('tk', {
- months: 'Ýanwar_Fewral_Mart_Aprel_Maý_Iýun_Iýul_Awgust_Sentýabr_Oktýabr_Noýabr_Dekabr'.split(
- '_'),
- monthsShort: 'Ýan_Few_Mar_Apr_Maý_Iýn_Iýl_Awg_Sen_Okt_Noý_Dek'.split('_'),
- weekdays: 'Ýekşenbe_Duşenbe_Sişenbe_Çarşenbe_Penşenbe_Anna_Şenbe'.split(
- '_'),
- weekdaysShort: 'Ýek_Duş_Siş_Çar_Pen_Ann_Şen'.split('_'),
- weekdaysMin: 'Ýk_Dş_Sş_Çr_Pn_An_Şn'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd, D MMMM YYYY HH:mm' },
- calendar: {
- sameDay: '[bugün sagat] LT',
- nextDay: '[ertir sagat] LT',
- nextWeek: '[indiki] dddd [sagat] LT',
- lastDay: '[düýn] LT',
- lastWeek: '[geçen] dddd [sagat] LT',
- sameElse: 'L' },
- relativeTime: {
- future: '%s soň',
- past: '%s öň',
- s: 'birnäçe sekunt',
- m: 'bir minut',
- mm: '%d minut',
- h: 'bir sagat',
- hh: '%d sagat',
- d: 'bir gün',
- dd: '%d gün',
- M: 'bir aý',
- MM: '%d aý',
- y: 'bir ýyl',
- yy: '%d ýyl' },
- ordinal: function ordinal(number, period) {
- switch (period) {
- case 'd':
- case 'D':
- case 'Do':
- case 'DD':
- return number;
- default:
- if (number === 0) {
- // special case for zero
- return number + "'unjy";
- }
- var a = number % 10,
- b = number % 100 - a,
- c = number >= 100 ? 100 : null;
- return number + (suffixes[a] || suffixes[b] || suffixes[c]);}
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 7 // The week that contains Jan 7th is the first week of the year.
- } });
- return tk;
- });
- /***/ }),
- /* 133 */
- /*!******************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/tl-ph.js ***!
- \******************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Tagalog (Philippines) [tl-ph]
- //! author : Dan Hagman : https://github.com/hagmandan
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var tlPh = moment.defineLocale('tl-ph', {
- months: 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split(
- '_'),
- monthsShort: 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'),
- weekdays: 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split(
- '_'),
- weekdaysShort: 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'),
- weekdaysMin: 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'MM/D/YYYY',
- LL: 'MMMM D, YYYY',
- LLL: 'MMMM D, YYYY HH:mm',
- LLLL: 'dddd, MMMM DD, YYYY HH:mm' },
- calendar: {
- sameDay: 'LT [ngayong araw]',
- nextDay: '[Bukas ng] LT',
- nextWeek: 'LT [sa susunod na] dddd',
- lastDay: 'LT [kahapon]',
- lastWeek: 'LT [noong nakaraang] dddd',
- sameElse: 'L' },
- relativeTime: {
- future: 'sa loob ng %s',
- past: '%s ang nakalipas',
- s: 'ilang segundo',
- ss: '%d segundo',
- m: 'isang minuto',
- mm: '%d minuto',
- h: 'isang oras',
- hh: '%d oras',
- d: 'isang araw',
- dd: '%d araw',
- M: 'isang buwan',
- MM: '%d buwan',
- y: 'isang taon',
- yy: '%d taon' },
- dayOfMonthOrdinalParse: /\d{1,2}/,
- ordinal: function ordinal(number) {
- return number;
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- } });
- return tlPh;
- });
- /***/ }),
- /* 134 */
- /*!****************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/tlh.js ***!
- \****************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Klingon [tlh]
- //! author : Dominika Kruk : https://github.com/amaranthrose
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var numbersNouns = 'pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut'.split('_');
- function translateFuture(output) {
- var time = output;
- time =
- output.indexOf('jaj') !== -1 ?
- time.slice(0, -3) + 'leS' :
- output.indexOf('jar') !== -1 ?
- time.slice(0, -3) + 'waQ' :
- output.indexOf('DIS') !== -1 ?
- time.slice(0, -3) + 'nem' :
- time + ' pIq';
- return time;
- }
- function translatePast(output) {
- var time = output;
- time =
- output.indexOf('jaj') !== -1 ?
- time.slice(0, -3) + 'Hu’' :
- output.indexOf('jar') !== -1 ?
- time.slice(0, -3) + 'wen' :
- output.indexOf('DIS') !== -1 ?
- time.slice(0, -3) + 'ben' :
- time + ' ret';
- return time;
- }
- function translate(number, withoutSuffix, string, isFuture) {
- var numberNoun = numberAsNoun(number);
- switch (string) {
- case 'ss':
- return numberNoun + ' lup';
- case 'mm':
- return numberNoun + ' tup';
- case 'hh':
- return numberNoun + ' rep';
- case 'dd':
- return numberNoun + ' jaj';
- case 'MM':
- return numberNoun + ' jar';
- case 'yy':
- return numberNoun + ' DIS';}
- }
- function numberAsNoun(number) {
- var hundred = Math.floor(number % 1000 / 100),
- ten = Math.floor(number % 100 / 10),
- one = number % 10,
- word = '';
- if (hundred > 0) {
- word += numbersNouns[hundred] + 'vatlh';
- }
- if (ten > 0) {
- word += (word !== '' ? ' ' : '') + numbersNouns[ten] + 'maH';
- }
- if (one > 0) {
- word += (word !== '' ? ' ' : '') + numbersNouns[one];
- }
- return word === '' ? 'pagh' : word;
- }
- var tlh = moment.defineLocale('tlh', {
- months: 'tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’'.split(
- '_'),
- monthsShort:
- 'jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’'.split(
- '_'),
- monthsParseExact: true,
- weekdays: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split(
- '_'),
- weekdaysShort:
- 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),
- weekdaysMin:
- 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd, D MMMM YYYY HH:mm' },
- calendar: {
- sameDay: '[DaHjaj] LT',
- nextDay: '[wa’leS] LT',
- nextWeek: 'LLL',
- lastDay: '[wa’Hu’] LT',
- lastWeek: 'LLL',
- sameElse: 'L' },
- relativeTime: {
- future: translateFuture,
- past: translatePast,
- s: 'puS lup',
- ss: translate,
- m: 'wa’ tup',
- mm: translate,
- h: 'wa’ rep',
- hh: translate,
- d: 'wa’ jaj',
- dd: translate,
- M: 'wa’ jar',
- MM: translate,
- y: 'wa’ DIS',
- yy: translate },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- } });
- return tlh;
- });
- /***/ }),
- /* 135 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/tr.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Turkish [tr]
- //! authors : Erhan Gundogan : https://github.com/erhangundogan,
- //! Burak Yiğit Kaya: https://github.com/BYK
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var suffixes = {
- 1: "'inci",
- 5: "'inci",
- 8: "'inci",
- 70: "'inci",
- 80: "'inci",
- 2: "'nci",
- 7: "'nci",
- 20: "'nci",
- 50: "'nci",
- 3: "'üncü",
- 4: "'üncü",
- 100: "'üncü",
- 6: "'ncı",
- 9: "'uncu",
- 10: "'uncu",
- 30: "'uncu",
- 60: "'ıncı",
- 90: "'ıncı" };
- var tr = moment.defineLocale('tr', {
- months: 'Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık'.split(
- '_'),
- monthsShort: 'Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara'.split('_'),
- weekdays: 'Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi'.split(
- '_'),
- weekdaysShort: 'Paz_Pzt_Sal_Çar_Per_Cum_Cmt'.split('_'),
- weekdaysMin: 'Pz_Pt_Sa_Ça_Pe_Cu_Ct'.split('_'),
- meridiem: function meridiem(hours, minutes, isLower) {
- if (hours < 12) {
- return isLower ? 'öö' : 'ÖÖ';
- } else {
- return isLower ? 'ös' : 'ÖS';
- }
- },
- meridiemParse: /öö|ÖÖ|ös|ÖS/,
- isPM: function isPM(input) {
- return input === 'ös' || input === 'ÖS';
- },
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd, D MMMM YYYY HH:mm' },
- calendar: {
- sameDay: '[bugün saat] LT',
- nextDay: '[yarın saat] LT',
- nextWeek: '[gelecek] dddd [saat] LT',
- lastDay: '[dün] LT',
- lastWeek: '[geçen] dddd [saat] LT',
- sameElse: 'L' },
- relativeTime: {
- future: '%s sonra',
- past: '%s önce',
- s: 'birkaç saniye',
- ss: '%d saniye',
- m: 'bir dakika',
- mm: '%d dakika',
- h: 'bir saat',
- hh: '%d saat',
- d: 'bir gün',
- dd: '%d gün',
- w: 'bir hafta',
- ww: '%d hafta',
- M: 'bir ay',
- MM: '%d ay',
- y: 'bir yıl',
- yy: '%d yıl' },
- ordinal: function ordinal(number, period) {
- switch (period) {
- case 'd':
- case 'D':
- case 'Do':
- case 'DD':
- return number;
- default:
- if (number === 0) {
- // special case for zero
- return number + "'ıncı";
- }
- var a = number % 10,
- b = number % 100 - a,
- c = number >= 100 ? 100 : null;
- return number + (suffixes[a] || suffixes[b] || suffixes[c]);}
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 7 // The week that contains Jan 7th is the first week of the year.
- } });
- return tr;
- });
- /***/ }),
- /* 136 */
- /*!****************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/tzl.js ***!
- \****************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Talossan [tzl]
- //! author : Robin van der Vliet : https://github.com/robin0van0der0v
- //! author : Iustì Canun
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- // After the year there should be a slash and the amount of years since December 26, 1979 in Roman numerals.
- // This is currently too difficult (maybe even impossible) to add.
- var tzl = moment.defineLocale('tzl', {
- months: 'Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar'.split(
- '_'),
- monthsShort: 'Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec'.split('_'),
- weekdays: 'Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi'.split('_'),
- weekdaysShort: 'Súl_Lún_Mai_Már_Xhú_Vié_Sát'.split('_'),
- weekdaysMin: 'Sú_Lú_Ma_Má_Xh_Vi_Sá'.split('_'),
- longDateFormat: {
- LT: 'HH.mm',
- LTS: 'HH.mm.ss',
- L: 'DD.MM.YYYY',
- LL: 'D. MMMM [dallas] YYYY',
- LLL: 'D. MMMM [dallas] YYYY HH.mm',
- LLLL: 'dddd, [li] D. MMMM [dallas] YYYY HH.mm' },
- meridiemParse: /d\'o|d\'a/i,
- isPM: function isPM(input) {
- return "d'o" === input.toLowerCase();
- },
- meridiem: function meridiem(hours, minutes, isLower) {
- if (hours > 11) {
- return isLower ? "d'o" : "D'O";
- } else {
- return isLower ? "d'a" : "D'A";
- }
- },
- calendar: {
- sameDay: '[oxhi à] LT',
- nextDay: '[demà à] LT',
- nextWeek: 'dddd [à] LT',
- lastDay: '[ieiri à] LT',
- lastWeek: '[sür el] dddd [lasteu à] LT',
- sameElse: 'L' },
- relativeTime: {
- future: 'osprei %s',
- past: 'ja%s',
- s: processRelativeTime,
- ss: processRelativeTime,
- m: processRelativeTime,
- mm: processRelativeTime,
- h: processRelativeTime,
- hh: processRelativeTime,
- d: processRelativeTime,
- dd: processRelativeTime,
- M: processRelativeTime,
- MM: processRelativeTime,
- y: processRelativeTime,
- yy: processRelativeTime },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- } });
- function processRelativeTime(number, withoutSuffix, key, isFuture) {
- var format = {
- s: ['viensas secunds', "'iensas secunds"],
- ss: [number + ' secunds', '' + number + ' secunds'],
- m: ["'n míut", "'iens míut"],
- mm: [number + ' míuts', '' + number + ' míuts'],
- h: ["'n þora", "'iensa þora"],
- hh: [number + ' þoras', '' + number + ' þoras'],
- d: ["'n ziua", "'iensa ziua"],
- dd: [number + ' ziuas', '' + number + ' ziuas'],
- M: ["'n mes", "'iens mes"],
- MM: [number + ' mesen', '' + number + ' mesen'],
- y: ["'n ar", "'iens ar"],
- yy: [number + ' ars', '' + number + ' ars'] };
- return isFuture ?
- format[key][0] :
- withoutSuffix ?
- format[key][0] :
- format[key][1];
- }
- return tzl;
- });
- /***/ }),
- /* 137 */
- /*!****************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/tzm.js ***!
- \****************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Central Atlas Tamazight [tzm]
- //! author : Abdel Said : https://github.com/abdelsaid
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var tzm = moment.defineLocale('tzm', {
- months: 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split(
- '_'),
- monthsShort:
- 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split(
- '_'),
- weekdays: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),
- weekdaysShort: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),
- weekdaysMin: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd D MMMM YYYY HH:mm' },
- calendar: {
- sameDay: '[ⴰⵙⴷⵅ ⴴ] LT',
- nextDay: '[ⴰⵙⴽⴰ ⴴ] LT',
- nextWeek: 'dddd [ⴴ] LT',
- lastDay: '[ⴰⵚⴰⵏⵜ ⴴ] LT',
- lastWeek: 'dddd [ⴴ] LT',
- sameElse: 'L' },
- relativeTime: {
- future: 'ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s',
- past: 'ⵢⴰⵏ %s',
- s: 'ⵉⵎⵉⴽ',
- ss: '%d ⵉⵎⵉⴽ',
- m: 'ⵎⵉⵏⵓⴺ',
- mm: '%d ⵎⵉⵏⵓⴺ',
- h: 'ⵙⴰⵄⴰ',
- hh: '%d ⵜⴰⵙⵙⴰⵄⵉⵏ',
- d: 'ⴰⵙⵙ',
- dd: '%d oⵙⵙⴰⵏ',
- M: 'ⴰⵢoⵓⵔ',
- MM: '%d ⵉⵢⵢⵉⵔⵏ',
- y: 'ⴰⵙⴳⴰⵙ',
- yy: '%d ⵉⵙⴳⴰⵙⵏ' },
- week: {
- dow: 6, // Saturday is the first day of the week.
- doy: 12 // The week that contains Jan 12th is the first week of the year.
- } });
- return tzm;
- });
- /***/ }),
- /* 138 */
- /*!*********************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/tzm-latn.js ***!
- \*********************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Central Atlas Tamazight Latin [tzm-latn]
- //! author : Abdel Said : https://github.com/abdelsaid
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var tzmLatn = moment.defineLocale('tzm-latn', {
- months: 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split(
- '_'),
- monthsShort:
- 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split(
- '_'),
- weekdays: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
- weekdaysShort: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
- weekdaysMin: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd D MMMM YYYY HH:mm' },
- calendar: {
- sameDay: '[asdkh g] LT',
- nextDay: '[aska g] LT',
- nextWeek: 'dddd [g] LT',
- lastDay: '[assant g] LT',
- lastWeek: 'dddd [g] LT',
- sameElse: 'L' },
- relativeTime: {
- future: 'dadkh s yan %s',
- past: 'yan %s',
- s: 'imik',
- ss: '%d imik',
- m: 'minuḍ',
- mm: '%d minuḍ',
- h: 'saɛa',
- hh: '%d tassaɛin',
- d: 'ass',
- dd: '%d ossan',
- M: 'ayowr',
- MM: '%d iyyirn',
- y: 'asgas',
- yy: '%d isgasn' },
- week: {
- dow: 6, // Saturday is the first day of the week.
- doy: 12 // The week that contains Jan 12th is the first week of the year.
- } });
- return tzmLatn;
- });
- /***/ }),
- /* 139 */
- /*!******************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/ug-cn.js ***!
- \******************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Uyghur (China) [ug-cn]
- //! author: boyaq : https://github.com/boyaq
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var ugCn = moment.defineLocale('ug-cn', {
- months: 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split(
- '_'),
- monthsShort:
- 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split(
- '_'),
- weekdays: 'يەكشەنبە_دۈشەنبە_سەيشەنبە_چارشەنبە_پەيشەنبە_جۈمە_شەنبە'.split(
- '_'),
- weekdaysShort: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'),
- weekdaysMin: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'YYYY-MM-DD',
- LL: 'YYYY-يىلىM-ئاينىڭD-كۈنى',
- LLL: 'YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm',
- LLLL: 'dddd، YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm' },
- meridiemParse: /يېرىم كېچە|سەھەر|چۈشتىن بۇرۇن|چۈش|چۈشتىن كېيىن|كەچ/,
- meridiemHour: function meridiemHour(hour, meridiem) {
- if (hour === 12) {
- hour = 0;
- }
- if (
- meridiem === 'يېرىم كېچە' ||
- meridiem === 'سەھەر' ||
- meridiem === 'چۈشتىن بۇرۇن')
- {
- return hour;
- } else if (meridiem === 'چۈشتىن كېيىن' || meridiem === 'كەچ') {
- return hour + 12;
- } else {
- return hour >= 11 ? hour : hour + 12;
- }
- },
- meridiem: function meridiem(hour, minute, isLower) {
- var hm = hour * 100 + minute;
- if (hm < 600) {
- return 'يېرىم كېچە';
- } else if (hm < 900) {
- return 'سەھەر';
- } else if (hm < 1130) {
- return 'چۈشتىن بۇرۇن';
- } else if (hm < 1230) {
- return 'چۈش';
- } else if (hm < 1800) {
- return 'چۈشتىن كېيىن';
- } else {
- return 'كەچ';
- }
- },
- calendar: {
- sameDay: '[بۈگۈن سائەت] LT',
- nextDay: '[ئەتە سائەت] LT',
- nextWeek: '[كېلەركى] dddd [سائەت] LT',
- lastDay: '[تۆنۈگۈن] LT',
- lastWeek: '[ئالدىنقى] dddd [سائەت] LT',
- sameElse: 'L' },
- relativeTime: {
- future: '%s كېيىن',
- past: '%s بۇرۇن',
- s: 'نەچچە سېكونت',
- ss: '%d سېكونت',
- m: 'بىر مىنۇت',
- mm: '%d مىنۇت',
- h: 'بىر سائەت',
- hh: '%d سائەت',
- d: 'بىر كۈن',
- dd: '%d كۈن',
- M: 'بىر ئاي',
- MM: '%d ئاي',
- y: 'بىر يىل',
- yy: '%d يىل' },
- dayOfMonthOrdinalParse: /\d{1,2}(-كۈنى|-ئاي|-ھەپتە)/,
- ordinal: function ordinal(number, period) {
- switch (period) {
- case 'd':
- case 'D':
- case 'DDD':
- return number + '-كۈنى';
- case 'w':
- case 'W':
- return number + '-ھەپتە';
- default:
- return number;}
- },
- preparse: function preparse(string) {
- return string.replace(/،/g, ',');
- },
- postformat: function postformat(string) {
- return string.replace(/,/g, '،');
- },
- week: {
- // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效
- dow: 1, // Monday is the first day of the week.
- doy: 7 // The week that contains Jan 1st is the first week of the year.
- } });
- return ugCn;
- });
- /***/ }),
- /* 140 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/uk.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Ukrainian [uk]
- //! author : zemlanin : https://github.com/zemlanin
- //! Author : Menelion Elensúle : https://github.com/Oire
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- function plural(word, num) {
- var forms = word.split('_');
- return num % 10 === 1 && num % 100 !== 11 ?
- forms[0] :
- num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ?
- forms[1] :
- forms[2];
- }
- function relativeTimeWithPlural(number, withoutSuffix, key) {
- var format = {
- ss: withoutSuffix ? 'секунда_секунди_секунд' : 'секунду_секунди_секунд',
- mm: withoutSuffix ? 'хвилина_хвилини_хвилин' : 'хвилину_хвилини_хвилин',
- hh: withoutSuffix ? 'година_години_годин' : 'годину_години_годин',
- dd: 'день_дні_днів',
- MM: 'місяць_місяці_місяців',
- yy: 'рік_роки_років' };
- if (key === 'm') {
- return withoutSuffix ? 'хвилина' : 'хвилину';
- } else if (key === 'h') {
- return withoutSuffix ? 'година' : 'годину';
- } else {
- return number + ' ' + plural(format[key], +number);
- }
- }
- function weekdaysCaseReplace(m, format) {
- var weekdays = {
- nominative:
- 'неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота'.split(
- '_'),
- accusative:
- 'неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу'.split(
- '_'),
- genitive:
- 'неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи'.split(
- '_') },
- nounCase;
- if (m === true) {
- return weekdays['nominative'].
- slice(1, 7).
- concat(weekdays['nominative'].slice(0, 1));
- }
- if (!m) {
- return weekdays['nominative'];
- }
- nounCase = /(\[[ВвУу]\]) ?dddd/.test(format) ?
- 'accusative' :
- /\[?(?:минулої|наступної)? ?\] ?dddd/.test(format) ?
- 'genitive' :
- 'nominative';
- return weekdays[nounCase][m.day()];
- }
- function processHoursFunction(str) {
- return function () {
- return str + 'о' + (this.hours() === 11 ? 'б' : '') + '] LT';
- };
- }
- var uk = moment.defineLocale('uk', {
- months: {
- format: 'січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня'.split(
- '_'),
- standalone:
- 'січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень'.split(
- '_') },
- monthsShort: 'січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд'.split(
- '_'),
- weekdays: weekdaysCaseReplace,
- weekdaysShort: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
- weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D MMMM YYYY р.',
- LLL: 'D MMMM YYYY р., HH:mm',
- LLLL: 'dddd, D MMMM YYYY р., HH:mm' },
- calendar: {
- sameDay: processHoursFunction('[Сьогодні '),
- nextDay: processHoursFunction('[Завтра '),
- lastDay: processHoursFunction('[Вчора '),
- nextWeek: processHoursFunction('[У] dddd ['),
- lastWeek: function lastWeek() {
- switch (this.day()) {
- case 0:
- case 3:
- case 5:
- case 6:
- return processHoursFunction('[Минулої] dddd [').call(this);
- case 1:
- case 2:
- case 4:
- return processHoursFunction('[Минулого] dddd [').call(this);}
- },
- sameElse: 'L' },
- relativeTime: {
- future: 'за %s',
- past: '%s тому',
- s: 'декілька секунд',
- ss: relativeTimeWithPlural,
- m: relativeTimeWithPlural,
- mm: relativeTimeWithPlural,
- h: 'годину',
- hh: relativeTimeWithPlural,
- d: 'день',
- dd: relativeTimeWithPlural,
- M: 'місяць',
- MM: relativeTimeWithPlural,
- y: 'рік',
- yy: relativeTimeWithPlural },
- // M. E.: those two are virtually unused but a user might want to implement them for his/her website for some reason
- meridiemParse: /ночі|ранку|дня|вечора/,
- isPM: function isPM(input) {
- return /^(дня|вечора)$/.test(input);
- },
- meridiem: function meridiem(hour, minute, isLower) {
- if (hour < 4) {
- return 'ночі';
- } else if (hour < 12) {
- return 'ранку';
- } else if (hour < 17) {
- return 'дня';
- } else {
- return 'вечора';
- }
- },
- dayOfMonthOrdinalParse: /\d{1,2}-(й|го)/,
- ordinal: function ordinal(number, period) {
- switch (period) {
- case 'M':
- case 'd':
- case 'DDD':
- case 'w':
- case 'W':
- return number + '-й';
- case 'D':
- return number + '-го';
- default:
- return number;}
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 7 // The week that contains Jan 7th is the first week of the year.
- } });
- return uk;
- });
- /***/ }),
- /* 141 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/ur.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Urdu [ur]
- //! author : Sawood Alam : https://github.com/ibnesayeed
- //! author : Zack : https://github.com/ZackVision
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var months = [
- 'جنوری',
- 'فروری',
- 'مارچ',
- 'اپریل',
- 'مئی',
- 'جون',
- 'جولائی',
- 'اگست',
- 'ستمبر',
- 'اکتوبر',
- 'نومبر',
- 'دسمبر'],
- days = ['اتوار', 'پیر', 'منگل', 'بدھ', 'جمعرات', 'جمعہ', 'ہفتہ'];
- var ur = moment.defineLocale('ur', {
- months: months,
- monthsShort: months,
- weekdays: days,
- weekdaysShort: days,
- weekdaysMin: days,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd، D MMMM YYYY HH:mm' },
- meridiemParse: /صبح|شام/,
- isPM: function isPM(input) {
- return 'شام' === input;
- },
- meridiem: function meridiem(hour, minute, isLower) {
- if (hour < 12) {
- return 'صبح';
- }
- return 'شام';
- },
- calendar: {
- sameDay: '[آج بوقت] LT',
- nextDay: '[کل بوقت] LT',
- nextWeek: 'dddd [بوقت] LT',
- lastDay: '[گذشتہ روز بوقت] LT',
- lastWeek: '[گذشتہ] dddd [بوقت] LT',
- sameElse: 'L' },
- relativeTime: {
- future: '%s بعد',
- past: '%s قبل',
- s: 'چند سیکنڈ',
- ss: '%d سیکنڈ',
- m: 'ایک منٹ',
- mm: '%d منٹ',
- h: 'ایک گھنٹہ',
- hh: '%d گھنٹے',
- d: 'ایک دن',
- dd: '%d دن',
- M: 'ایک ماہ',
- MM: '%d ماہ',
- y: 'ایک سال',
- yy: '%d سال' },
- preparse: function preparse(string) {
- return string.replace(/،/g, ',');
- },
- postformat: function postformat(string) {
- return string.replace(/,/g, '،');
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- } });
- return ur;
- });
- /***/ }),
- /* 142 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/uz.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Uzbek [uz]
- //! author : Sardor Muminov : https://github.com/muminoff
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var uz = moment.defineLocale('uz', {
- months: 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split(
- '_'),
- monthsShort: 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'),
- weekdays: 'Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба'.split('_'),
- weekdaysShort: 'Якш_Душ_Сеш_Чор_Пай_Жум_Шан'.split('_'),
- weekdaysMin: 'Як_Ду_Се_Чо_Па_Жу_Ша'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'D MMMM YYYY, dddd HH:mm' },
- calendar: {
- sameDay: '[Бугун соат] LT [да]',
- nextDay: '[Эртага] LT [да]',
- nextWeek: 'dddd [куни соат] LT [да]',
- lastDay: '[Кеча соат] LT [да]',
- lastWeek: '[Утган] dddd [куни соат] LT [да]',
- sameElse: 'L' },
- relativeTime: {
- future: 'Якин %s ичида',
- past: 'Бир неча %s олдин',
- s: 'фурсат',
- ss: '%d фурсат',
- m: 'бир дакика',
- mm: '%d дакика',
- h: 'бир соат',
- hh: '%d соат',
- d: 'бир кун',
- dd: '%d кун',
- M: 'бир ой',
- MM: '%d ой',
- y: 'бир йил',
- yy: '%d йил' },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 7 // The week that contains Jan 4th is the first week of the year.
- } });
- return uz;
- });
- /***/ }),
- /* 143 */
- /*!********************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/uz-latn.js ***!
- \********************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Uzbek Latin [uz-latn]
- //! author : Rasulbek Mirzayev : github.com/Rasulbeeek
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var uzLatn = moment.defineLocale('uz-latn', {
- months: 'Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr'.split(
- '_'),
- monthsShort: 'Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek'.split('_'),
- weekdays:
- 'Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba'.split(
- '_'),
- weekdaysShort: 'Yak_Dush_Sesh_Chor_Pay_Jum_Shan'.split('_'),
- weekdaysMin: 'Ya_Du_Se_Cho_Pa_Ju_Sha'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'D MMMM YYYY, dddd HH:mm' },
- calendar: {
- sameDay: '[Bugun soat] LT [da]',
- nextDay: '[Ertaga] LT [da]',
- nextWeek: 'dddd [kuni soat] LT [da]',
- lastDay: '[Kecha soat] LT [da]',
- lastWeek: "[O'tgan] dddd [kuni soat] LT [da]",
- sameElse: 'L' },
- relativeTime: {
- future: 'Yaqin %s ichida',
- past: 'Bir necha %s oldin',
- s: 'soniya',
- ss: '%d soniya',
- m: 'bir daqiqa',
- mm: '%d daqiqa',
- h: 'bir soat',
- hh: '%d soat',
- d: 'bir kun',
- dd: '%d kun',
- M: 'bir oy',
- MM: '%d oy',
- y: 'bir yil',
- yy: '%d yil' },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 7 // The week that contains Jan 7th is the first week of the year.
- } });
- return uzLatn;
- });
- /***/ }),
- /* 144 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/vi.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Vietnamese [vi]
- //! author : Bang Nguyen : https://github.com/bangnk
- //! author : Chien Kira : https://github.com/chienkira
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var vi = moment.defineLocale('vi', {
- months: 'tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12'.split(
- '_'),
- monthsShort:
- 'Thg 01_Thg 02_Thg 03_Thg 04_Thg 05_Thg 06_Thg 07_Thg 08_Thg 09_Thg 10_Thg 11_Thg 12'.split(
- '_'),
- monthsParseExact: true,
- weekdays: 'chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy'.split(
- '_'),
- weekdaysShort: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),
- weekdaysMin: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),
- weekdaysParseExact: true,
- meridiemParse: /sa|ch/i,
- isPM: function isPM(input) {
- return /^ch$/i.test(input);
- },
- meridiem: function meridiem(hours, minutes, isLower) {
- if (hours < 12) {
- return isLower ? 'sa' : 'SA';
- } else {
- return isLower ? 'ch' : 'CH';
- }
- },
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM [năm] YYYY',
- LLL: 'D MMMM [năm] YYYY HH:mm',
- LLLL: 'dddd, D MMMM [năm] YYYY HH:mm',
- l: 'DD/M/YYYY',
- ll: 'D MMM YYYY',
- lll: 'D MMM YYYY HH:mm',
- llll: 'ddd, D MMM YYYY HH:mm' },
- calendar: {
- sameDay: '[Hôm nay lúc] LT',
- nextDay: '[Ngày mai lúc] LT',
- nextWeek: 'dddd [tuần tới lúc] LT',
- lastDay: '[Hôm qua lúc] LT',
- lastWeek: 'dddd [tuần trước lúc] LT',
- sameElse: 'L' },
- relativeTime: {
- future: '%s tới',
- past: '%s trước',
- s: 'vài giây',
- ss: '%d giây',
- m: 'một phút',
- mm: '%d phút',
- h: 'một giờ',
- hh: '%d giờ',
- d: 'một ngày',
- dd: '%d ngày',
- w: 'một tuần',
- ww: '%d tuần',
- M: 'một tháng',
- MM: '%d tháng',
- y: 'một năm',
- yy: '%d năm' },
- dayOfMonthOrdinalParse: /\d{1,2}/,
- ordinal: function ordinal(number) {
- return number;
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- } });
- return vi;
- });
- /***/ }),
- /* 145 */
- /*!*********************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/x-pseudo.js ***!
- \*********************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Pseudo [x-pseudo]
- //! author : Andrew Hood : https://github.com/andrewhood125
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var xPseudo = moment.defineLocale('x-pseudo', {
- months: 'J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér'.split(
- '_'),
- monthsShort:
- 'J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc'.split(
- '_'),
- monthsParseExact: true,
- weekdays:
- 'S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý'.split(
- '_'),
- weekdaysShort: 'S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát'.split('_'),
- weekdaysMin: 'S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd, D MMMM YYYY HH:mm' },
- calendar: {
- sameDay: '[T~ódá~ý át] LT',
- nextDay: '[T~ómó~rró~w át] LT',
- nextWeek: 'dddd [át] LT',
- lastDay: '[Ý~ést~érdá~ý át] LT',
- lastWeek: '[L~ást] dddd [át] LT',
- sameElse: 'L' },
- relativeTime: {
- future: 'í~ñ %s',
- past: '%s á~gó',
- s: 'á ~féw ~sécó~ñds',
- ss: '%d s~écóñ~ds',
- m: 'á ~míñ~úté',
- mm: '%d m~íñú~tés',
- h: 'á~ñ hó~úr',
- hh: '%d h~óúrs',
- d: 'á ~dáý',
- dd: '%d d~áýs',
- M: 'á ~móñ~th',
- MM: '%d m~óñt~hs',
- y: 'á ~ýéár',
- yy: '%d ý~éárs' },
- dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
- ordinal: function ordinal(number) {
- var b = number % 10,
- output =
- ~~(number % 100 / 10) === 1 ?
- 'th' :
- b === 1 ?
- 'st' :
- b === 2 ?
- 'nd' :
- b === 3 ?
- 'rd' :
- 'th';
- return number + output;
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- } });
- return xPseudo;
- });
- /***/ }),
- /* 146 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/yo.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Yoruba Nigeria [yo]
- //! author : Atolagbe Abisoye : https://github.com/andela-batolagbe
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var yo = moment.defineLocale('yo', {
- months: 'Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀'.split(
- '_'),
- monthsShort: 'Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀'.split('_'),
- weekdays: 'Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta'.split('_'),
- weekdaysShort: 'Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá'.split('_'),
- weekdaysMin: 'Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb'.split('_'),
- longDateFormat: {
- LT: 'h:mm A',
- LTS: 'h:mm:ss A',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY h:mm A',
- LLLL: 'dddd, D MMMM YYYY h:mm A' },
- calendar: {
- sameDay: '[Ònì ni] LT',
- nextDay: '[Ọ̀la ni] LT',
- nextWeek: "dddd [Ọsẹ̀ tón'bọ] [ni] LT",
- lastDay: '[Àna ni] LT',
- lastWeek: 'dddd [Ọsẹ̀ tólọ́] [ni] LT',
- sameElse: 'L' },
- relativeTime: {
- future: 'ní %s',
- past: '%s kọjá',
- s: 'ìsẹjú aayá die',
- ss: 'aayá %d',
- m: 'ìsẹjú kan',
- mm: 'ìsẹjú %d',
- h: 'wákati kan',
- hh: 'wákati %d',
- d: 'ọjọ́ kan',
- dd: 'ọjọ́ %d',
- M: 'osù kan',
- MM: 'osù %d',
- y: 'ọdún kan',
- yy: 'ọdún %d' },
- dayOfMonthOrdinalParse: /ọjọ́\s\d{1,2}/,
- ordinal: 'ọjọ́ %d',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- } });
- return yo;
- });
- /***/ }),
- /* 147 */
- /*!******************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/zh-cn.js ***!
- \******************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Chinese (China) [zh-cn]
- //! author : suupic : https://github.com/suupic
- //! author : Zeno Zeng : https://github.com/zenozeng
- //! author : uu109 : https://github.com/uu109
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var zhCn = moment.defineLocale('zh-cn', {
- months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(
- '_'),
- monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
- '_'),
- weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
- weekdaysShort: '周日_周一_周二_周三_周四_周五_周六'.split('_'),
- weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'YYYY/MM/DD',
- LL: 'YYYY年M月D日',
- LLL: 'YYYY年M月D日Ah点mm分',
- LLLL: 'YYYY年M月D日ddddAh点mm分',
- l: 'YYYY/M/D',
- ll: 'YYYY年M月D日',
- lll: 'YYYY年M月D日 HH:mm',
- llll: 'YYYY年M月D日dddd HH:mm' },
- meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
- meridiemHour: function meridiemHour(hour, meridiem) {
- if (hour === 12) {
- hour = 0;
- }
- if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {
- return hour;
- } else if (meridiem === '下午' || meridiem === '晚上') {
- return hour + 12;
- } else {
- // '中午'
- return hour >= 11 ? hour : hour + 12;
- }
- },
- meridiem: function meridiem(hour, minute, isLower) {
- var hm = hour * 100 + minute;
- if (hm < 600) {
- return '凌晨';
- } else if (hm < 900) {
- return '早上';
- } else if (hm < 1130) {
- return '上午';
- } else if (hm < 1230) {
- return '中午';
- } else if (hm < 1800) {
- return '下午';
- } else {
- return '晚上';
- }
- },
- calendar: {
- sameDay: '[今天]LT',
- nextDay: '[明天]LT',
- nextWeek: function nextWeek(now) {
- if (now.week() !== this.week()) {
- return '[下]dddLT';
- } else {
- return '[本]dddLT';
- }
- },
- lastDay: '[昨天]LT',
- lastWeek: function lastWeek(now) {
- if (this.week() !== now.week()) {
- return '[上]dddLT';
- } else {
- return '[本]dddLT';
- }
- },
- sameElse: 'L' },
- dayOfMonthOrdinalParse: /\d{1,2}(日|月|周)/,
- ordinal: function ordinal(number, period) {
- switch (period) {
- case 'd':
- case 'D':
- case 'DDD':
- return number + '日';
- case 'M':
- return number + '月';
- case 'w':
- case 'W':
- return number + '周';
- default:
- return number;}
- },
- relativeTime: {
- future: '%s后',
- past: '%s前',
- s: '几秒',
- ss: '%d 秒',
- m: '1 分钟',
- mm: '%d 分钟',
- h: '1 小时',
- hh: '%d 小时',
- d: '1 天',
- dd: '%d 天',
- w: '1 周',
- ww: '%d 周',
- M: '1 个月',
- MM: '%d 个月',
- y: '1 年',
- yy: '%d 年' },
- week: {
- // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效
- dow: 1, // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- } });
- return zhCn;
- });
- /***/ }),
- /* 148 */
- /*!******************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/zh-hk.js ***!
- \******************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Chinese (Hong Kong) [zh-hk]
- //! author : Ben : https://github.com/ben-lin
- //! author : Chris Lam : https://github.com/hehachris
- //! author : Konstantin : https://github.com/skfd
- //! author : Anthony : https://github.com/anthonylau
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var zhHk = moment.defineLocale('zh-hk', {
- months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(
- '_'),
- monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
- '_'),
- weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
- weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),
- weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'YYYY/MM/DD',
- LL: 'YYYY年M月D日',
- LLL: 'YYYY年M月D日 HH:mm',
- LLLL: 'YYYY年M月D日dddd HH:mm',
- l: 'YYYY/M/D',
- ll: 'YYYY年M月D日',
- lll: 'YYYY年M月D日 HH:mm',
- llll: 'YYYY年M月D日dddd HH:mm' },
- meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
- meridiemHour: function meridiemHour(hour, meridiem) {
- if (hour === 12) {
- hour = 0;
- }
- if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {
- return hour;
- } else if (meridiem === '中午') {
- return hour >= 11 ? hour : hour + 12;
- } else if (meridiem === '下午' || meridiem === '晚上') {
- return hour + 12;
- }
- },
- meridiem: function meridiem(hour, minute, isLower) {
- var hm = hour * 100 + minute;
- if (hm < 600) {
- return '凌晨';
- } else if (hm < 900) {
- return '早上';
- } else if (hm < 1200) {
- return '上午';
- } else if (hm === 1200) {
- return '中午';
- } else if (hm < 1800) {
- return '下午';
- } else {
- return '晚上';
- }
- },
- calendar: {
- sameDay: '[今天]LT',
- nextDay: '[明天]LT',
- nextWeek: '[下]ddddLT',
- lastDay: '[昨天]LT',
- lastWeek: '[上]ddddLT',
- sameElse: 'L' },
- dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/,
- ordinal: function ordinal(number, period) {
- switch (period) {
- case 'd':
- case 'D':
- case 'DDD':
- return number + '日';
- case 'M':
- return number + '月';
- case 'w':
- case 'W':
- return number + '週';
- default:
- return number;}
- },
- relativeTime: {
- future: '%s後',
- past: '%s前',
- s: '幾秒',
- ss: '%d 秒',
- m: '1 分鐘',
- mm: '%d 分鐘',
- h: '1 小時',
- hh: '%d 小時',
- d: '1 天',
- dd: '%d 天',
- M: '1 個月',
- MM: '%d 個月',
- y: '1 年',
- yy: '%d 年' } });
- return zhHk;
- });
- /***/ }),
- /* 149 */
- /*!******************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/zh-mo.js ***!
- \******************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Chinese (Macau) [zh-mo]
- //! author : Ben : https://github.com/ben-lin
- //! author : Chris Lam : https://github.com/hehachris
- //! author : Tan Yuanhong : https://github.com/le0tan
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var zhMo = moment.defineLocale('zh-mo', {
- months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(
- '_'),
- monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
- '_'),
- weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
- weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),
- weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'YYYY年M月D日',
- LLL: 'YYYY年M月D日 HH:mm',
- LLLL: 'YYYY年M月D日dddd HH:mm',
- l: 'D/M/YYYY',
- ll: 'YYYY年M月D日',
- lll: 'YYYY年M月D日 HH:mm',
- llll: 'YYYY年M月D日dddd HH:mm' },
- meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
- meridiemHour: function meridiemHour(hour, meridiem) {
- if (hour === 12) {
- hour = 0;
- }
- if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {
- return hour;
- } else if (meridiem === '中午') {
- return hour >= 11 ? hour : hour + 12;
- } else if (meridiem === '下午' || meridiem === '晚上') {
- return hour + 12;
- }
- },
- meridiem: function meridiem(hour, minute, isLower) {
- var hm = hour * 100 + minute;
- if (hm < 600) {
- return '凌晨';
- } else if (hm < 900) {
- return '早上';
- } else if (hm < 1130) {
- return '上午';
- } else if (hm < 1230) {
- return '中午';
- } else if (hm < 1800) {
- return '下午';
- } else {
- return '晚上';
- }
- },
- calendar: {
- sameDay: '[今天] LT',
- nextDay: '[明天] LT',
- nextWeek: '[下]dddd LT',
- lastDay: '[昨天] LT',
- lastWeek: '[上]dddd LT',
- sameElse: 'L' },
- dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/,
- ordinal: function ordinal(number, period) {
- switch (period) {
- case 'd':
- case 'D':
- case 'DDD':
- return number + '日';
- case 'M':
- return number + '月';
- case 'w':
- case 'W':
- return number + '週';
- default:
- return number;}
- },
- relativeTime: {
- future: '%s內',
- past: '%s前',
- s: '幾秒',
- ss: '%d 秒',
- m: '1 分鐘',
- mm: '%d 分鐘',
- h: '1 小時',
- hh: '%d 小時',
- d: '1 天',
- dd: '%d 天',
- M: '1 個月',
- MM: '%d 個月',
- y: '1 年',
- yy: '%d 年' } });
- return zhMo;
- });
- /***/ }),
- /* 150 */
- /*!******************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/moment/locale/zh-tw.js ***!
- \******************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- //! moment.js locale configuration
- //! locale : Chinese (Taiwan) [zh-tw]
- //! author : Ben : https://github.com/ben-lin
- //! author : Chris Lam : https://github.com/hehachris
- ;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ 13)) :
- undefined;
- })(this, function (moment) {'use strict';
- //! moment.js locale configuration
- var zhTw = moment.defineLocale('zh-tw', {
- months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(
- '_'),
- monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
- '_'),
- weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
- weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),
- weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'YYYY/MM/DD',
- LL: 'YYYY年M月D日',
- LLL: 'YYYY年M月D日 HH:mm',
- LLLL: 'YYYY年M月D日dddd HH:mm',
- l: 'YYYY/M/D',
- ll: 'YYYY年M月D日',
- lll: 'YYYY年M月D日 HH:mm',
- llll: 'YYYY年M月D日dddd HH:mm' },
- meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
- meridiemHour: function meridiemHour(hour, meridiem) {
- if (hour === 12) {
- hour = 0;
- }
- if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {
- return hour;
- } else if (meridiem === '中午') {
- return hour >= 11 ? hour : hour + 12;
- } else if (meridiem === '下午' || meridiem === '晚上') {
- return hour + 12;
- }
- },
- meridiem: function meridiem(hour, minute, isLower) {
- var hm = hour * 100 + minute;
- if (hm < 600) {
- return '凌晨';
- } else if (hm < 900) {
- return '早上';
- } else if (hm < 1130) {
- return '上午';
- } else if (hm < 1230) {
- return '中午';
- } else if (hm < 1800) {
- return '下午';
- } else {
- return '晚上';
- }
- },
- calendar: {
- sameDay: '[今天] LT',
- nextDay: '[明天] LT',
- nextWeek: '[下]dddd LT',
- lastDay: '[昨天] LT',
- lastWeek: '[上]dddd LT',
- sameElse: 'L' },
- dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/,
- ordinal: function ordinal(number, period) {
- switch (period) {
- case 'd':
- case 'D':
- case 'DDD':
- return number + '日';
- case 'M':
- return number + '月';
- case 'w':
- case 'W':
- return number + '週';
- default:
- return number;}
- },
- relativeTime: {
- future: '%s後',
- past: '%s前',
- s: '幾秒',
- ss: '%d 秒',
- m: '1 分鐘',
- mm: '%d 分鐘',
- h: '1 小時',
- hh: '%d 小時',
- d: '1 天',
- dd: '%d 天',
- M: '1 個月',
- MM: '%d 個月',
- y: '1 年',
- yy: '%d 年' } });
- return zhTw;
- });
- /***/ }),
- /* 151 */
- /*!******************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/util/api.js ***!
- \******************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _index = __webpack_require__(/*! @/util/index.js */ 12);var _bag;function _defineProperty(obj, key, value) {if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}
- var req = {
- /**
- * 登录
- */
- login: {
- call4VeriCode: function call4VeriCode(params) {return (0, _index.request)("/unified/call4VeriCode", 'POST', params);}, // 获取验证码
- login: function login(params) {return (0, _index.request)("/unified/login", 'POST', params);}, // 登录
- wxLogin: function wxLogin(params) {return (0, _index.request)("/unified/login", 'POST', params);}, // 微信手机号登录
- saveSex: function saveSex(params) {return (0, _index.request)("/saveData1", 'POST', params);}, // 保存性别
- saveFigure: function saveFigure(params) {return (0, _index.request)("/saveData2", 'POST', params);}, // 保存社交形象
- saveDatum: function saveDatum(params) {return (0, _index.request)("/saveData3", 'POST', params);}, // 保存社交资料
- saveCity: function saveCity(params) {return (0, _index.request)("/saveData4", 'POST', params);}, // 保存城市
- saveWechat: function saveWechat(params) {return (0, _index.request)("/saveData5", 'POST', params);}, // 保存微信
- popularCities: function popularCities(params) {return (0, _index.request)("/popularCities", 'POST', params);}, // 热门城市
- upload: function upload(params) {return (0, _index.request)("/faceImage/upload", 'POST', params);}, //图片上传
- randNick: function randNick(params) {return (0, _index.request)("/rdk", 'POST', params);}, //随机昵称
- editPersonal: function editPersonal(params) {return (0, _index.request)("/editPersonal", 'POST', params);}, //个人资料编辑
- labelsConfig: function labelsConfig(params) {return (0, _index.request)("/txmqgetUserWantedLabels", 'POST', params);}, //个人标签配置
- editHead: function editHead(params) {return (0, _index.request)("/editHeadIcon", 'POST', params);} //更新头像
- },
- /**
- * 通用
- */
- public: {
- aliossToken: function aliossToken(params) {return (0, _index.request)("/alioss/token", 'POST', params);}, //阿里云直传token获取
- aliossCdn: function aliossCdn(params) {return (0, _index.request)("/cdnConfig", 'POST', params);}, //获取阿里云上传cdn
- videoProcess: function videoProcess(params) {return (0, _index.request)("/txmqpersonalPageHomeVideoProcessing", 'POST', params);}, //获取阿里云上传cdn
- config: function config(params) {return (0, _index.request)("/lcds", 'POST', params);}, //通用字典查询字典-dicts,可用值:Careers,Hobbys,Hopes
- ranking: function ranking(params) {return (0, _index.request)("/txmqhotRanking", 'POST', params);}, //排行榜
- friends: function friends(params) {return (0, _index.request)("/loadFriendsListByIndex", 'POST', params);}, //排行榜
- mine: function mine(params) {return (0, _index.request)("/lmtf", 'POST', params);}, //我的-个人资料
- album: function album(params) {return (0, _index.request)("/auls", 'POST', params);}, //我的-个人相册
- albumSort: function albumSort(params) {return (0, _index.request)("/resetMediaSeqs", 'POST', params);}, //相册排序
- albumDelete: function albumDelete(params) {return (0, _index.request)("/rmvMedia", 'POST', params);}, //相册删除
- albumAdd: function albumAdd(params) {return (0, _index.request)("/addMediaBatch", 'POST', params);}, //相册添加
- cover: function cover(params) {return (0, _index.request)("/tpvp", 'POST', params);}, //我的-个人封面
- mineDetail: function mineDetail(params) {return (0, _index.request)("/loadUserDetailSelf", 'POST', params);}, //自己用户详情
- userDetail: function userDetail(params) {return (0, _index.request)("/loadUserDetailOther", 'POST', params);}, //他人用户详情
- isLike: function isLike(params) {return (0, _index.request)("/juur", 'POST', params);}, //喜欢和拉黑
- userData: function userData(params) {return (0, _index.request)("/txmqloadUsersByType", 'POST', params);}, //获取用户相关列表数字(个人中心[我喜欢,黑名单,喜欢我,我浏览,访客])(糖果公园专用接口)
- guestor: function guestor(params) {return (0, _index.request)("/loadUsersByType", 'POST', params);}, //异性访客
- priceBySceneConfigs: function priceBySceneConfigs(params) {return (0, _index.request)("/loadPriceBySceneConfigs", 'POST', params);}, //糖果、会员套餐基本配置
- vipPromotions: function vipPromotions(params) {return (0, _index.request)("/listPromotionsPay", 'POST', params);}, //vip跑马灯
- heartBeat: function heartBeat(params) {return (0, _index.request)("/heartbeat", 'POST', params);}, //心跳汇报
- seeMaleDetail: function seeMaleDetail(params) {return (0, _index.request)("/vfdmo", 'POST', params);}, //女性看男性主页
- seeFamaleDetail: function seeFamaleDetail(params) {return (0, _index.request)("/vmdfo", 'POST', params);}, //男性看女性主页
- notifyActive: function notifyActive(params) {return (0, _index.request)("/activeNotifyOverview", 'POST', params);}, //互动通知最后一条消息以及总未读数
- loadSystemMsgs: function loadSystemMsgs(params) {return (0, _index.request)("/loadSystemMsgs", 'POST', params);}, //系统消息列表
- search: function search(params) {return (0, _index.request)("/loadUsersByIndex", 'POST', params);}, //搜索
- friendsNoAuth: function friendsNoAuth(params) {return (0, _index.request)("/loadUsersByIndexFirstNoAuth", 'POST', params);} //无登录体验数据
- },
- pay: {
- creatWxOrder: function creatWxOrder(params) {return (0, _index.request)("/createWxpayOrderByMiniProgram", 'POST', params);} //创建微信订单
- },
- IM: {
- loadSig: function loadSig(params) {return (0, _index.request)("/loadSig", 'POST', params);} //创建微信订单
- },
- /**
- * 提现
- */
- bag: (_bag = {
- loadMyWithdrawalInfo: function loadMyWithdrawalInfo(params) {return (0, _index.request)("/bag/loadMyWithdrawalInfo", 'POST', params);}, // 提现相关信息
- my: function my(params) {return (0, _index.request)("/bag/my", 'POST', params);}, // 我的提现详情
- incomeList: function incomeList(params) {return (0, _index.request)("/bag/incomeList", params);}, // 收益明细
- loadMyWithdrawRecords: function loadMyWithdrawRecords(params) {return (0, _index.request)("/bag/loadMyWithdrawRecords", 'POST', 'POST', params);}, // 提现记录
- coinList: function coinList(params) {return (0, _index.request)("/bag/coinList", 'POST', params);}, // 颜豆明细
- editAlipay: function editAlipay(params) {return (0, _index.request)("/bag/editAlipay", 'POST', params);}, // 绑定支付宝账号
- createWithdrawalOrder: function createWithdrawalOrder(params) {return (0, _index.request)("/bag/createWithdrawalOrder", 'POST', params);}, // 创建提现订单
- isEffectiveWithdrawalOrder: function isEffectiveWithdrawalOrder(params) {return (0, _index.request)("/bag/isEffectiveWithdrawalOrder", 'POST', params);}, // 检查提现订单是否有效
- submitWithdrawalOrder: function submitWithdrawalOrder(params) {return (0, _index.request)("/bag/submitWithdrawalOrder", 'POST', params);}, // 提交提现订单
- createIncomeOrder: function createIncomeOrder(params) {return (0, _index.request)("/bag/createIncomeOrder", 'POST', params);}, //创建收益兑换颜豆订单
- submitIncomeOrder: function submitIncomeOrder(params) {return (0, _index.request)("/bag/submitIncomeOrder", 'POST', params);} }, _defineProperty(_bag, "editAlipay",
- function editAlipay(params) {return (0, _index.request)("/bag/editAlipay", 'POST', params);}), _defineProperty(_bag, "loadMyWithdrawDetail",
- function loadMyWithdrawDetail(params) {return (0, _index.request)("/bag/loadMyWithdrawDetail", 'POST', params);}), _bag) };var _default =
- req;exports.default = _default;
- /***/ }),
- /* 152 */,
- /* 153 */,
- /* 154 */,
- /* 155 */,
- /* 156 */,
- /* 157 */,
- /* 158 */
- /*!*****************************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/static/qqmap-wx-jssdk1.2/qqmap-wx-jssdk.min.js ***!
- \*****************************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports) {
- function _classCallCheck(instance, Constructor) {if (!(instance instanceof Constructor)) {throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target, props) {for (var i = 0; i < props.length; i++) {var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ("value" in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor);}}function _createClass(Constructor, protoProps, staticProps) {if (protoProps) _defineProperties(Constructor.prototype, protoProps);if (staticProps) _defineProperties(Constructor, staticProps);return Constructor;}var ERROR_CONF = { KEY_ERR: 311, KEY_ERR_MSG: 'key格式错误', PARAM_ERR: 310, PARAM_ERR_MSG: '请求参数信息有误', SYSTEM_ERR: 600, SYSTEM_ERR_MSG: '系统错误', WX_ERR_CODE: 1000, WX_OK_CODE: 200 };var BASE_URL = 'https://apis.map.qq.com/ws/';var URL_SEARCH = BASE_URL + 'place/v1/search';var URL_SUGGESTION = BASE_URL + 'place/v1/suggestion';var URL_GET_GEOCODER = BASE_URL + 'geocoder/v1/';var URL_CITY_LIST = BASE_URL + 'district/v1/list';var URL_AREA_LIST = BASE_URL + 'district/v1/getchildren';var URL_DISTANCE = BASE_URL + 'distance/v1/';var URL_DIRECTION = BASE_URL + 'direction/v1/';var MODE = { driving: 'driving', transit: 'transit' };var EARTH_RADIUS = 6378136.49;var Utils = { safeAdd: function safeAdd(x, y) {var lsw = (x & 0xffff) + (y & 0xffff);var msw = (x >> 16) + (y >> 16) + (lsw >> 16);return msw << 16 | lsw & 0xffff;}, bitRotateLeft: function bitRotateLeft(num, cnt) {return num << cnt | num >>> 32 - cnt;}, md5cmn: function md5cmn(q, a, b, x, s, t) {return this.safeAdd(this.bitRotateLeft(this.safeAdd(this.safeAdd(a, q), this.safeAdd(x, t)), s), b);}, md5ff: function md5ff(a, b, c, d, x, s, t) {return this.md5cmn(b & c | ~b & d, a, b, x, s, t);}, md5gg: function md5gg(a, b, c, d, x, s, t) {return this.md5cmn(b & d | c & ~d, a, b, x, s, t);}, md5hh: function md5hh(a, b, c, d, x, s, t) {return this.md5cmn(b ^ c ^ d, a, b, x, s, t);}, md5ii: function md5ii(a, b, c, d, x, s, t) {return this.md5cmn(c ^ (b | ~d), a, b, x, s, t);}, binlMD5: function binlMD5(x, len) {x[len >> 5] |= 0x80 << len % 32;x[(len + 64 >>> 9 << 4) + 14] = len;var i;var olda;var oldb;var oldc;var oldd;var a = 1732584193;var b = -271733879;var c = -1732584194;var d = 271733878;for (i = 0; i < x.length; i += 16) {olda = a;oldb = b;oldc = c;oldd = d;a = this.md5ff(a, b, c, d, x[i], 7, -680876936);d = this.md5ff(d, a, b, c, x[i + 1], 12, -389564586);c = this.md5ff(c, d, a, b, x[i + 2], 17, 606105819);b = this.md5ff(b, c, d, a, x[i + 3], 22, -1044525330);a = this.md5ff(a, b, c, d, x[i + 4], 7, -176418897);d = this.md5ff(d, a, b, c, x[i + 5], 12, 1200080426);c = this.md5ff(c, d, a, b, x[i + 6], 17, -1473231341);b = this.md5ff(b, c, d, a, x[i + 7], 22, -45705983);a = this.md5ff(a, b, c, d, x[i + 8], 7, 1770035416);d = this.md5ff(d, a, b, c, x[i + 9], 12, -1958414417);c = this.md5ff(c, d, a, b, x[i + 10], 17, -42063);b = this.md5ff(b, c, d, a, x[i + 11], 22, -1990404162);a = this.md5ff(a, b, c, d, x[i + 12], 7, 1804603682);d = this.md5ff(d, a, b, c, x[i + 13], 12, -40341101);c = this.md5ff(c, d, a, b, x[i + 14], 17, -1502002290);b = this.md5ff(b, c, d, a, x[i + 15], 22, 1236535329);a = this.md5gg(a, b, c, d, x[i + 1], 5, -165796510);d = this.md5gg(d, a, b, c, x[i + 6], 9, -1069501632);c = this.md5gg(c, d, a, b, x[i + 11], 14, 643717713);b = this.md5gg(b, c, d, a, x[i], 20, -373897302);a = this.md5gg(a, b, c, d, x[i + 5], 5, -701558691);d = this.md5gg(d, a, b, c, x[i + 10], 9, 38016083);c = this.md5gg(c, d, a, b, x[i + 15], 14, -660478335);b = this.md5gg(b, c, d, a, x[i + 4], 20, -405537848);a = this.md5gg(a, b, c, d, x[i + 9], 5, 568446438);d = this.md5gg(d, a, b, c, x[i + 14], 9, -1019803690);c = this.md5gg(c, d, a, b, x[i + 3], 14, -187363961);b = this.md5gg(b, c, d, a, x[i + 8], 20, 1163531501);a = this.md5gg(a, b, c, d, x[i + 13], 5, -1444681467);d = this.md5gg(d, a, b, c, x[i + 2], 9, -51403784);c = this.md5gg(c, d, a, b, x[i + 7], 14, 1735328473);b = this.md5gg(b, c, d, a, x[i + 12], 20, -1926607734);a = this.md5hh(a, b, c, d, x[i + 5], 4, -378558);d = this.md5hh(d, a, b, c, x[i + 8], 11, -2022574463);c = this.md5hh(c, d, a, b, x[i + 11], 16, 1839030562);b = this.md5hh(b, c, d, a, x[i + 14], 23, -35309556);a = this.md5hh(a, b, c, d, x[i + 1], 4, -1530992060);d = this.md5hh(d, a, b, c, x[i + 4], 11, 1272893353);c = this.md5hh(c, d, a, b, x[i + 7], 16, -155497632);b = this.md5hh(b, c, d, a, x[i + 10], 23, -1094730640);a = this.md5hh(a, b, c, d, x[i + 13], 4, 681279174);d = this.md5hh(d, a, b, c, x[i], 11, -358537222);c = this.md5hh(c, d, a, b, x[i + 3], 16, -722521979);b = this.md5hh(b, c, d, a, x[i + 6], 23, 76029189);a = this.md5hh(a, b, c, d, x[i + 9], 4, -640364487);d = this.md5hh(d, a, b, c, x[i + 12], 11, -421815835);c = this.md5hh(c, d, a, b, x[i + 15], 16, 530742520);b = this.md5hh(b, c, d, a, x[i + 2], 23, -995338651);a = this.md5ii(a, b, c, d, x[i], 6, -198630844);d = this.md5ii(d, a, b, c, x[i + 7], 10, 1126891415);c = this.md5ii(c, d, a, b, x[i + 14], 15, -1416354905);b = this.md5ii(b, c, d, a, x[i + 5], 21, -57434055);a = this.md5ii(a, b, c, d, x[i + 12], 6, 1700485571);d = this.md5ii(d, a, b, c, x[i + 3], 10, -1894986606);c = this.md5ii(c, d, a, b, x[i + 10], 15, -1051523);b = this.md5ii(b, c, d, a, x[i + 1], 21, -2054922799);a = this.md5ii(a, b, c, d, x[i + 8], 6, 1873313359);d = this.md5ii(d, a, b, c, x[i + 15], 10, -30611744);c = this.md5ii(c, d, a, b, x[i + 6], 15, -1560198380);b = this.md5ii(b, c, d, a, x[i + 13], 21, 1309151649);a = this.md5ii(a, b, c, d, x[i + 4], 6, -145523070);d = this.md5ii(d, a, b, c, x[i + 11], 10, -1120210379);c = this.md5ii(c, d, a, b, x[i + 2], 15, 718787259);b = this.md5ii(b, c, d, a, x[i + 9], 21, -343485551);a = this.safeAdd(a, olda);b = this.safeAdd(b, oldb);c = this.safeAdd(c, oldc);d = this.safeAdd(d, oldd);}return [a, b, c, d];}, binl2rstr: function binl2rstr(input) {var i;var output = '';var length32 = input.length * 32;for (i = 0; i < length32; i += 8) {output += String.fromCharCode(input[i >> 5] >>> i % 32 & 0xff);}return output;}, rstr2binl: function rstr2binl(input) {var i;var output = [];output[(input.length >> 2) - 1] = undefined;for (i = 0; i < output.length; i += 1) {output[i] = 0;}var length8 = input.length * 8;for (i = 0; i < length8; i += 8) {output[i >> 5] |= (input.charCodeAt(i / 8) & 0xff) << i % 32;}return output;}, rstrMD5: function rstrMD5(s) {return this.binl2rstr(this.binlMD5(this.rstr2binl(s), s.length * 8));}, rstrHMACMD5: function rstrHMACMD5(key, data) {var i;var bkey = this.rstr2binl(key);var ipad = [];var opad = [];var hash;ipad[15] = opad[15] = undefined;if (bkey.length > 16) {bkey = this.binlMD5(bkey, key.length * 8);}for (i = 0; i < 16; i += 1) {ipad[i] = bkey[i] ^ 0x36363636;opad[i] = bkey[i] ^ 0x5c5c5c5c;}hash = this.binlMD5(ipad.concat(this.rstr2binl(data)), 512 + data.length * 8);return this.binl2rstr(this.binlMD5(opad.concat(hash), 512 + 128));}, rstr2hex: function rstr2hex(input) {var hexTab = '0123456789abcdef';var output = '';var x;var i;for (i = 0; i < input.length; i += 1) {x = input.charCodeAt(i);output += hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f);}return output;}, str2rstrUTF8: function str2rstrUTF8(input) {return unescape(encodeURIComponent(input));}, rawMD5: function rawMD5(s) {return this.rstrMD5(this.str2rstrUTF8(s));}, hexMD5: function hexMD5(s) {return this.rstr2hex(this.rawMD5(s));}, rawHMACMD5: function rawHMACMD5(k, d) {return this.rstrHMACMD5(this.str2rstrUTF8(k), str2rstrUTF8(d));}, hexHMACMD5: function hexHMACMD5(k, d) {return this.rstr2hex(this.rawHMACMD5(k, d));}, md5: function md5(string, key, raw) {if (!key) {if (!raw) {return this.hexMD5(string);}return this.rawMD5(string);}if (!raw) {return this.hexHMACMD5(key, string);}return this.rawHMACMD5(key, string);}, getSig: function getSig(requestParam, sk, feature, mode) {var sig = null;var requestArr = [];Object.keys(requestParam).sort().forEach(function (key) {requestArr.push(key + '=' + requestParam[key]);});if (feature == 'search') {sig = '/ws/place/v1/search?' + requestArr.join('&') + sk;}if (feature == 'suggest') {sig = '/ws/place/v1/suggestion?' + requestArr.join('&') + sk;}if (feature == 'reverseGeocoder') {sig = '/ws/geocoder/v1/?' + requestArr.join('&') + sk;}if (feature == 'geocoder') {sig = '/ws/geocoder/v1/?' + requestArr.join('&') + sk;}if (feature == 'getCityList') {sig = '/ws/district/v1/list?' + requestArr.join('&') + sk;}if (feature == 'getDistrictByCityId') {sig = '/ws/district/v1/getchildren?' + requestArr.join('&') + sk;}if (feature == 'calculateDistance') {sig = '/ws/distance/v1/?' + requestArr.join('&') + sk;}if (feature == 'direction') {sig = '/ws/direction/v1/' + mode + '?' + requestArr.join('&') + sk;}sig = this.md5(sig);return sig;}, location2query: function location2query(data) {if (typeof data == 'string') {return data;}var query = '';for (var i = 0; i < data.length; i++) {var d = data[i];if (!!query) {query += ';';}if (d.location) {query = query + d.location.lat + ',' + d.location.lng;}if (d.latitude && d.longitude) {query = query + d.latitude + ',' + d.longitude;}}return query;}, rad: function rad(d) {return d * Math.PI / 180.0;}, getEndLocation: function getEndLocation(location) {var to = location.split(';');var endLocation = [];for (var i = 0; i < to.length; i++) {endLocation.push({ lat: parseFloat(to[i].split(',')[0]), lng: parseFloat(to[i].split(',')[1]) });}return endLocation;}, getDistance: function getDistance(latFrom, lngFrom, latTo, lngTo) {var radLatFrom = this.rad(latFrom);var radLatTo = this.rad(latTo);var a = radLatFrom - radLatTo;var b = this.rad(lngFrom) - this.rad(lngTo);var distance = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) + Math.cos(radLatFrom) * Math.cos(radLatTo) * Math.pow(Math.sin(b / 2), 2)));distance = distance * EARTH_RADIUS;distance = Math.round(distance * 10000) / 10000;return parseFloat(distance.toFixed(0));}, getWXLocation: function getWXLocation(success, fail, complete) {wx.getFuzzyLocation({ type: 'gcj02', success: success, fail: fail, complete: complete });}, getLocationParam: function getLocationParam(location) {if (typeof location == 'string') {var locationArr = location.split(',');if (locationArr.length === 2) {location = { latitude: location.split(',')[0], longitude: location.split(',')[1] };} else {location = {};}}return location;}, polyfillParam: function polyfillParam(param) {param.success = param.success || function () {};param.fail = param.fail || function () {};param.complete = param.complete || function () {};}, checkParamKeyEmpty: function checkParamKeyEmpty(param, key) {if (!param[key]) {var errconf = this.buildErrorConfig(ERROR_CONF.PARAM_ERR, ERROR_CONF.PARAM_ERR_MSG + key + '参数格式有误');param.fail(errconf);param.complete(errconf);return true;}return false;}, checkKeyword: function checkKeyword(param) {return !this.checkParamKeyEmpty(param, 'keyword');}, checkLocation: function checkLocation(param) {var location = this.getLocationParam(param.location);if (!location || !location.latitude || !location.longitude) {var errconf = this.buildErrorConfig(ERROR_CONF.PARAM_ERR, ERROR_CONF.PARAM_ERR_MSG + ' location参数格式有误');param.fail(errconf);param.complete(errconf);return false;}return true;}, buildErrorConfig: function buildErrorConfig(errCode, errMsg) {return { status: errCode, message: errMsg };}, handleData: function handleData(param, data, feature) {if (feature == 'search') {var searchResult = data.data;var searchSimplify = [];for (var i = 0; i < searchResult.length; i++) {searchSimplify.push({ id: searchResult[i].id || null, title: searchResult[i].title || null, latitude: searchResult[i].location && searchResult[i].location.lat || null, longitude: searchResult[i].location && searchResult[i].location.lng || null, address: searchResult[i].address || null, category: searchResult[i].category || null, tel: searchResult[i].tel || null, adcode: searchResult[i].ad_info && searchResult[i].ad_info.adcode || null, city: searchResult[i].ad_info && searchResult[i].ad_info.city || null, district: searchResult[i].ad_info && searchResult[i].ad_info.district || null, province: searchResult[i].ad_info && searchResult[i].ad_info.province || null });}param.success(data, { searchResult: searchResult, searchSimplify: searchSimplify });} else if (feature == 'suggest') {var suggestResult = data.data;var suggestSimplify = [];for (var i = 0; i < suggestResult.length; i++) {suggestSimplify.push({ adcode: suggestResult[i].adcode || null, address: suggestResult[i].address || null, category: suggestResult[i].category || null, city: suggestResult[i].city || null, district: suggestResult[i].district || null, id: suggestResult[i].id || null, latitude: suggestResult[i].location && suggestResult[i].location.lat || null, longitude: suggestResult[i].location && suggestResult[i].location.lng || null, province: suggestResult[i].province || null, title: suggestResult[i].title || null, type: suggestResult[i].type || null });}param.success(data, { suggestResult: suggestResult, suggestSimplify: suggestSimplify });} else if (feature == 'reverseGeocoder') {var reverseGeocoderResult = data.result;var reverseGeocoderSimplify = { address: reverseGeocoderResult.address || null, latitude: reverseGeocoderResult.location && reverseGeocoderResult.location.lat || null, longitude: reverseGeocoderResult.location && reverseGeocoderResult.location.lng || null, adcode: reverseGeocoderResult.ad_info && reverseGeocoderResult.ad_info.adcode || null, city: reverseGeocoderResult.address_component && reverseGeocoderResult.address_component.city || null, district: reverseGeocoderResult.address_component && reverseGeocoderResult.address_component.district || null, nation: reverseGeocoderResult.address_component && reverseGeocoderResult.address_component.nation || null, province: reverseGeocoderResult.address_component && reverseGeocoderResult.address_component.province || null, street: reverseGeocoderResult.address_component && reverseGeocoderResult.address_component.street || null, street_number: reverseGeocoderResult.address_component && reverseGeocoderResult.address_component.street_number || null, recommend: reverseGeocoderResult.formatted_addresses && reverseGeocoderResult.formatted_addresses.recommend || null, rough: reverseGeocoderResult.formatted_addresses && reverseGeocoderResult.formatted_addresses.rough || null };if (reverseGeocoderResult.pois) {var pois = reverseGeocoderResult.pois;var poisSimplify = [];for (var i = 0; i < pois.length; i++) {poisSimplify.push({ id: pois[i].id || null, title: pois[i].title || null, latitude: pois[i].location && pois[i].location.lat || null, longitude: pois[i].location && pois[i].location.lng || null, address: pois[i].address || null, category: pois[i].category || null, adcode: pois[i].ad_info && pois[i].ad_info.adcode || null, city: pois[i].ad_info && pois[i].ad_info.city || null, district: pois[i].ad_info && pois[i].ad_info.district || null, province: pois[i].ad_info && pois[i].ad_info.province || null });}param.success(data, { reverseGeocoderResult: reverseGeocoderResult, reverseGeocoderSimplify: reverseGeocoderSimplify, pois: pois, poisSimplify: poisSimplify });} else {param.success(data, { reverseGeocoderResult: reverseGeocoderResult, reverseGeocoderSimplify: reverseGeocoderSimplify });}} else if (feature == 'geocoder') {var geocoderResult = data.result;var geocoderSimplify = { title: geocoderResult.title || null, latitude: geocoderResult.location && geocoderResult.location.lat || null, longitude: geocoderResult.location && geocoderResult.location.lng || null, adcode: geocoderResult.ad_info && geocoderResult.ad_info.adcode || null, province: geocoderResult.address_components && geocoderResult.address_components.province || null, city: geocoderResult.address_components && geocoderResult.address_components.city || null, district: geocoderResult.address_components && geocoderResult.address_components.district || null, street: geocoderResult.address_components && geocoderResult.address_components.street || null, street_number: geocoderResult.address_components && geocoderResult.address_components.street_number || null, level: geocoderResult.level || null };param.success(data, { geocoderResult: geocoderResult, geocoderSimplify: geocoderSimplify });} else if (feature == 'getCityList') {var provinceResult = data.result[0];var cityResult = data.result[1];var districtResult = data.result[2];param.success(data, { provinceResult: provinceResult, cityResult: cityResult, districtResult: districtResult });} else if (feature == 'getDistrictByCityId') {var districtByCity = data.result[0];param.success(data, districtByCity);} else if (feature == 'calculateDistance') {var calculateDistanceResult = data.result.elements;var distance = [];for (var i = 0; i < calculateDistanceResult.length; i++) {distance.push(calculateDistanceResult[i].distance);}param.success(data, { calculateDistanceResult: calculateDistanceResult, distance: distance });} else if (feature == 'direction') {var direction = data.result.routes;param.success(data, direction);} else {param.success(data);}}, buildWxRequestConfig: function buildWxRequestConfig(param, options, feature) {var that = this;options.header = { "content-type": "application/json" };options.method = 'GET';options.success = function (res) {var data = res.data;if (data.status === 0) {that.handleData(param, data, feature);} else {param.fail(data);}};options.fail = function (res) {res.statusCode = ERROR_CONF.WX_ERR_CODE;param.fail(that.buildErrorConfig(ERROR_CONF.WX_ERR_CODE, res.errMsg));};options.complete = function (res) {var statusCode = +res.statusCode;switch (statusCode) {case ERROR_CONF.WX_ERR_CODE:{param.complete(that.buildErrorConfig(ERROR_CONF.WX_ERR_CODE, res.errMsg));break;}case ERROR_CONF.WX_OK_CODE:{var data = res.data;if (data.status === 0) {param.complete(data);} else {param.complete(that.buildErrorConfig(data.status, data.message));}break;}default:{param.complete(that.buildErrorConfig(ERROR_CONF.SYSTEM_ERR, ERROR_CONF.SYSTEM_ERR_MSG));}}};return options;}, locationProcess: function locationProcess(param, locationsuccess, locationfail, locationcomplete) {var that = this;locationfail = locationfail || function (res) {res.statusCode = ERROR_CONF.WX_ERR_CODE;param.fail(that.buildErrorConfig(ERROR_CONF.WX_ERR_CODE, res.errMsg));};locationcomplete = locationcomplete || function (res) {if (res.statusCode == ERROR_CONF.WX_ERR_CODE) {param.complete(that.buildErrorConfig(ERROR_CONF.WX_ERR_CODE, res.errMsg));}};if (!param.location) {that.getWXLocation(locationsuccess, locationfail, locationcomplete);} else if (that.checkLocation(param)) {var location = Utils.getLocationParam(param.location);locationsuccess(location);}} };var QQMapWX = /*#__PURE__*/function () {"use strict";function QQMapWX(options) {_classCallCheck(this, QQMapWX);if (!options.key) {throw Error('key值不能为空');}this.key = options.key;}_createClass(QQMapWX, [{ key: "search", value: function search(options) {var that = this;options = options || {};Utils.polyfillParam(options);if (!Utils.checkKeyword(options)) {return;}var requestParam = { keyword: options.keyword, orderby: options.orderby || '_distance', page_size: options.page_size || 10, page_index: options.page_index || 1, output: 'json', key: that.key };if (options.address_format) {requestParam.address_format = options.address_format;}if (options.filter) {requestParam.filter = options.filter;}var distance = options.distance || "1000";var auto_extend = options.auto_extend || 1;var region = null;var rectangle = null;if (options.region) {region = options.region;}if (options.rectangle) {rectangle = options.rectangle;}var locationsuccess = function locationsuccess(result) {if (region && !rectangle) {requestParam.boundary = "region(" + region + "," + auto_extend + "," + result.latitude + "," + result.longitude + ")";if (options.sig) {requestParam.sig = Utils.getSig(requestParam, options.sig, 'search');}} else if (rectangle && !region) {requestParam.boundary = "rectangle(" + rectangle + ")";if (options.sig) {requestParam.sig = Utils.getSig(requestParam, options.sig, 'search');}} else {requestParam.boundary = "nearby(" + result.latitude + "," + result.longitude + "," + distance + "," + auto_extend + ")";if (options.sig) {requestParam.sig = Utils.getSig(requestParam, options.sig, 'search');}}wx.request(Utils.buildWxRequestConfig(options, { url: URL_SEARCH, data: requestParam }, 'search'));};Utils.locationProcess(options, locationsuccess);} }, { key: "getSuggestion", value: function getSuggestion(options) {var that = this;options = options || {};Utils.polyfillParam(options);if (!Utils.checkKeyword(options)) {return;}var requestParam = { keyword: options.keyword, region: options.region || '全国', region_fix: options.region_fix || 0, policy: options.policy || 0, page_size: options.page_size || 10, page_index: options.page_index || 1, get_subpois: options.get_subpois || 0, output: 'json', key: that.key };if (options.address_format) {requestParam.address_format = options.address_format;}if (options.filter) {requestParam.filter = options.filter;}if (options.location) {var locationsuccess = function locationsuccess(result) {requestParam.location = result.latitude + ',' + result.longitude;if (options.sig) {requestParam.sig = Utils.getSig(requestParam, options.sig, 'suggest');}wx.request(Utils.buildWxRequestConfig(options, { url: URL_SUGGESTION, data: requestParam }, "suggest"));};Utils.locationProcess(options, locationsuccess);} else {if (options.sig) {requestParam.sig = Utils.getSig(requestParam, options.sig, 'suggest');}wx.request(Utils.buildWxRequestConfig(options, { url: URL_SUGGESTION, data: requestParam }, "suggest"));}} }, { key: "reverseGeocoder", value: function reverseGeocoder(options) {var that = this;options = options || {};Utils.polyfillParam(options);var requestParam = { coord_type: options.coord_type || 5, get_poi: options.get_poi || 0, output: 'json', key: that.key };if (options.poi_options) {requestParam.poi_options = options.poi_options;}var locationsuccess = function locationsuccess(result) {requestParam.location = result.latitude + ',' + result.longitude;if (options.sig) {requestParam.sig = Utils.getSig(requestParam, options.sig, 'reverseGeocoder');}wx.request(Utils.buildWxRequestConfig(options, { url: URL_GET_GEOCODER, data: requestParam }, 'reverseGeocoder'));};Utils.locationProcess(options, locationsuccess);} }, { key: "geocoder", value: function geocoder(options) {var that = this;options = options || {};Utils.polyfillParam(options);if (Utils.checkParamKeyEmpty(options, 'address')) {return;}var requestParam = { address: options.address, output: 'json', key: that.key };if (options.region) {requestParam.region = options.region;}if (options.sig) {requestParam.sig = Utils.getSig(requestParam, options.sig, 'geocoder');}wx.request(Utils.buildWxRequestConfig(options, { url: URL_GET_GEOCODER, data: requestParam }, 'geocoder'));} }, { key: "getCityList", value: function getCityList(options) {var that = this;options = options || {};Utils.polyfillParam(options);var requestParam = { output: 'json', key: that.key };if (options.sig) {requestParam.sig = Utils.getSig(requestParam, options.sig, 'getCityList');}wx.request(Utils.buildWxRequestConfig(options, { url: URL_CITY_LIST, data: requestParam }, 'getCityList'));} }, { key: "getDistrictByCityId", value: function getDistrictByCityId(options) {var that = this;options = options || {};Utils.polyfillParam(options);if (Utils.checkParamKeyEmpty(options, 'id')) {return;}var requestParam = { id: options.id || '', output: 'json', key: that.key };if (options.sig) {requestParam.sig = Utils.getSig(requestParam, options.sig, 'getDistrictByCityId');}wx.request(Utils.buildWxRequestConfig(options, { url: URL_AREA_LIST, data: requestParam }, 'getDistrictByCityId'));} }, { key: "calculateDistance", value: function calculateDistance(options) {var that = this;options = options || {};Utils.polyfillParam(options);if (Utils.checkParamKeyEmpty(options, 'to')) {return;}var requestParam = { mode: options.mode || 'walking', to: Utils.location2query(options.to), output: 'json', key: that.key };if (options.from) {options.location = options.from;}if (requestParam.mode == 'straight') {var locationsuccess = function locationsuccess(result) {var locationTo = Utils.getEndLocation(requestParam.to);var data = { message: "query ok", result: { elements: [] }, status: 0 };for (var i = 0; i < locationTo.length; i++) {data.result.elements.push({ distance: Utils.getDistance(result.latitude, result.longitude, locationTo[i].lat, locationTo[i].lng), duration: 0, from: { lat: result.latitude, lng: result.longitude }, to: { lat: locationTo[i].lat, lng: locationTo[i].lng } });}var calculateResult = data.result.elements;var distanceResult = [];for (var i = 0; i < calculateResult.length; i++) {distanceResult.push(calculateResult[i].distance);}return options.success(data, { calculateResult: calculateResult, distanceResult: distanceResult });};Utils.locationProcess(options, locationsuccess);} else {var locationsuccess = function locationsuccess(result) {requestParam.from = result.latitude + ',' + result.longitude;if (options.sig) {requestParam.sig = Utils.getSig(requestParam, options.sig, 'calculateDistance');}wx.request(Utils.buildWxRequestConfig(options, { url: URL_DISTANCE, data: requestParam }, 'calculateDistance'));};Utils.locationProcess(options, locationsuccess);}} }, { key: "direction", value: function direction(options) {var that = this;options = options || {};Utils.polyfillParam(options);if (Utils.checkParamKeyEmpty(options, 'to')) {return;}var requestParam = { output: 'json', key: that.key };if (typeof options.to == 'string') {requestParam.to = options.to;} else {requestParam.to = options.to.latitude + ',' + options.to.longitude;}var SET_URL_DIRECTION = null;options.mode = options.mode || MODE.driving;SET_URL_DIRECTION = URL_DIRECTION + options.mode;if (options.from) {options.location = options.from;}if (options.mode == MODE.driving) {if (options.from_poi) {requestParam.from_poi = options.from_poi;}if (options.heading) {requestParam.heading = options.heading;}if (options.speed) {requestParam.speed = options.speed;}if (options.accuracy) {requestParam.accuracy = options.accuracy;}if (options.road_type) {requestParam.road_type = options.road_type;}if (options.to_poi) {requestParam.to_poi = options.to_poi;}if (options.from_track) {requestParam.from_track = options.from_track;}if (options.waypoints) {requestParam.waypoints = options.waypoints;}if (options.policy) {requestParam.policy = options.policy;}if (options.plate_number) {requestParam.plate_number = options.plate_number;}}if (options.mode == MODE.transit) {if (options.departure_time) {requestParam.departure_time = options.departure_time;}if (options.policy) {requestParam.policy = options.policy;}}var locationsuccess = function locationsuccess(result) {requestParam.from = result.latitude + ',' + result.longitude;if (options.sig) {requestParam.sig = Utils.getSig(requestParam, options.sig, 'direction', options.mode);}wx.request(Utils.buildWxRequestConfig(options, { url: SET_URL_DIRECTION, data: requestParam }, 'direction'));};Utils.locationProcess(options, locationsuccess);} }]);return QQMapWX;}();;module.exports = QQMapWX;
- /***/ }),
- /* 159 */
- /*!****************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/tim-wx-sdk/tim-wx.js ***!
- \****************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /* WEBPACK VAR INJECTION */(function(global, uni) {!function(e,t){ true?module.exports=t():undefined;}(this,function(){function e(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable;})),o.push.apply(o,n);}return o;}function t(t){for(var o=1;o<arguments.length;o++){var n=null!=arguments[o]?arguments[o]:{};o%2?e(Object(n),!0).forEach(function(e){r(t,e,n[e]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):e(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e));});}return t;}function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e;}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e;})(e);}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}function a(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n);}}function s(e,t,o){return t&&a(e.prototype,t),o&&a(e,o),Object.defineProperty(e,"prototype",{writable:!1}),e;}function r(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e;}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t);}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e);})(e);}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e;})(e,t);}function l(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0;}catch(e){return!1;}}function d(e,t,o){return(d=l()?Reflect.construct:function(e,t,o){var n=[null];n.push.apply(n,t);var a=new(Function.bind.apply(e,n))();return o&&u(a,o.prototype),a;}).apply(null,arguments);}function p(e){var t="function"==typeof Map?new Map():void 0;return(p=function p(e){if(null===e||(o=e,-1===Function.toString.call(o).indexOf("[native code]")))return e;var o;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n);}function n(){return d(e,arguments,c(this).constructor);}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),u(n,e);})(e);}function _(e,t){if(null==e)return{};var o,n,a=function(e,t){if(null==e)return{};var o,n,a={},s=Object.keys(e);for(n=0;n<s.length;n++){o=s[n],t.indexOf(o)>=0||(a[o]=e[o]);}return a;}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++){o=s[n],t.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(a[o]=e[o]);}}return a;}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function h(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return g(e);}function f(e){var t=l();return function(){var o,n=c(e);if(t){var a=c(this).constructor;o=Reflect.construct(n,arguments,a);}else o=n.apply(this,arguments);return h(this,o);};}function m(e,t){return v(e)||function(e,t){var o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==o)return;var n,a,s=[],r=!0,i=!1;try{for(o=o.call(e);!(r=(n=o.next()).done)&&(s.push(n.value),!t||s.length!==t);r=!0){;}}catch(c){i=!0,a=c;}finally{try{r||null==o.return||o.return();}finally{if(i)throw a;}}return s;}(e,t)||y(e,t)||E();}function M(e){return function(e){if(Array.isArray(e))return T(e);}(e)||I(e)||y(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}();}function v(e){if(Array.isArray(e))return e;}function I(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e);}function y(e,t){if(e){if("string"==typeof e)return T(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?T(e,t):void 0;}}function T(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++){n[o]=e[o];}return n;}function E(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function C(e,t){var o="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!o){if(Array.isArray(e)||(o=y(e))||t&&e&&"number"==typeof e.length){o&&(e=o);var _n2=0,a=function a(){};return{s:a,n:function n(){return _n2>=e.length?{done:!0}:{done:!1,value:e[_n2++]};},e:function e(_e2){throw _e2;},f:a};}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 s,r=!0,i=!1;return{s:function s(){o=o.call(e);},n:function n(){var e=o.next();return r=e.done,e;},e:function e(_e3){i=!0,s=_e3;},f:function f(){try{r||null==o.return||o.return();}finally{if(i)throw s;}}};}var S={SDK_READY:"sdkStateReady",SDK_NOT_READY:"sdkStateNotReady",SDK_DESTROY:"sdkDestroy",MESSAGE_RECEIVED:"onMessageReceived",MESSAGE_MODIFIED:"onMessageModified",MESSAGE_REVOKED:"onMessageRevoked",MESSAGE_READ_BY_PEER:"onMessageReadByPeer",MESSAGE_READ_RECEIPT_RECEIVED:"onMessageReadReceiptReceived",CONVERSATION_LIST_UPDATED:"onConversationListUpdated",CONVERSATION_GROUP_LIST_UPDATED:"onConversationGroupListUpdated",CONVERSATION_IN_GROUP_UPDATED:"onConversationInGroupUpdated",GROUP_LIST_UPDATED:"onGroupListUpdated",GROUP_SYSTEM_NOTICE_RECEIVED:"receiveGroupSystemNotice",GROUP_ATTRIBUTES_UPDATED:"groupAttributesUpdated",TOPIC_CREATED:"onTopicCreated",TOPIC_DELETED:"onTopicDeleted",TOPIC_UPDATED:"onTopicUpdated",PROFILE_UPDATED:"onProfileUpdated",USER_STATUS_UPDATED:"onUserStatusUpdated",BLACKLIST_UPDATED:"blacklistUpdated",FRIEND_LIST_UPDATED:"onFriendListUpdated",FRIEND_GROUP_LIST_UPDATED:"onFriendGroupListUpdated",FRIEND_APPLICATION_LIST_UPDATED:"onFriendApplicationListUpdated",KICKED_OUT:"kickedOut",ERROR:"error",NET_STATE_CHANGE:"netStateChange",SDK_RELOAD:"sdkReload"},D={MSG_TEXT:"TIMTextElem",MSG_IMAGE:"TIMImageElem",MSG_SOUND:"TIMSoundElem",MSG_AUDIO:"TIMSoundElem",MSG_FILE:"TIMFileElem",MSG_FACE:"TIMFaceElem",MSG_VIDEO:"TIMVideoFileElem",MSG_GEO:"TIMLocationElem",MSG_LOCATION:"TIMLocationElem",MSG_GRP_TIP:"TIMGroupTipElem",MSG_GRP_SYS_NOTICE:"TIMGroupSystemNoticeElem",MSG_CUSTOM:"TIMCustomElem",MSG_MERGER:"TIMRelayElem",MSG_PRIORITY_HIGH:"High",MSG_PRIORITY_NORMAL:"Normal",MSG_PRIORITY_LOW:"Low",MSG_PRIORITY_LOWEST:"Lowest",CONV_C2C:"C2C",CONV_GROUP:"GROUP",CONV_TOPIC:"TOPIC",CONV_SYSTEM:"@TIM#SYSTEM",CONV_AT_ME:1,CONV_AT_ALL:2,CONV_AT_ALL_AT_ME:3,CONV_MARK_TYPE_STAR:1,CONV_MARK_TYPE_UNREAD:2,CONV_MARK_TYPE_FOLD:4,CONV_MARK_TYPE_HIDE:8,GRP_PRIVATE:"Private",GRP_WORK:"Private",GRP_PUBLIC:"Public",GRP_CHATROOM:"ChatRoom",GRP_MEETING:"ChatRoom",GRP_AVCHATROOM:"AVChatRoom",GRP_COMMUNITY:"Community",GRP_MBR_ROLE_OWNER:"Owner",GRP_MBR_ROLE_ADMIN:"Admin",GRP_MBR_ROLE_MEMBER:"Member",GRP_MBR_ROLE_CUSTOM:"Custom",GRP_TIP_MBR_JOIN:1,GRP_TIP_MBR_QUIT:2,GRP_TIP_MBR_KICKED_OUT:3,GRP_TIP_MBR_SET_ADMIN:4,GRP_TIP_MBR_CANCELED_ADMIN:5,GRP_TIP_GRP_PROFILE_UPDATED:6,GRP_TIP_MBR_PROFILE_UPDATED:7,GRP_TIP_BAN_AVCHATROOM_MEMBER:10,GRP_TIP_UNBAN_AVCHATROOM_MEMBER:11,MSG_REMIND_ACPT_AND_NOTE:"AcceptAndNotify",MSG_REMIND_ACPT_NOT_NOTE:"AcceptNotNotify",MSG_REMIND_DISCARD:"Discard",GENDER_UNKNOWN:"Gender_Type_Unknown",GENDER_FEMALE:"Gender_Type_Female",GENDER_MALE:"Gender_Type_Male",KICKED_OUT_MULT_ACCOUNT:"multipleAccount",KICKED_OUT_MULT_DEVICE:"multipleDevice",KICKED_OUT_USERSIG_EXPIRED:"userSigExpired",KICKED_OUT_REST_API:"REST_API_Kick",ALLOW_TYPE_ALLOW_ANY:"AllowType_Type_AllowAny",ALLOW_TYPE_NEED_CONFIRM:"AllowType_Type_NeedConfirm",ALLOW_TYPE_DENY_ANY:"AllowType_Type_DenyAny",FORBID_TYPE_NONE:"AdminForbid_Type_None",FORBID_TYPE_SEND_OUT:"AdminForbid_Type_SendOut",JOIN_OPTIONS_FREE_ACCESS:"FreeAccess",JOIN_OPTIONS_NEED_PERMISSION:"NeedPermission",JOIN_OPTIONS_DISABLE_APPLY:"DisableApply",JOIN_STATUS_SUCCESS:"JoinedSuccess",JOIN_STATUS_ALREADY_IN_GROUP:"AlreadyInGroup",JOIN_STATUS_WAIT_APPROVAL:"WaitAdminApproval",GRP_PROFILE_OWNER_ID:"ownerID",GRP_PROFILE_CREATE_TIME:"createTime",GRP_PROFILE_LAST_INFO_TIME:"lastInfoTime",GRP_PROFILE_MEMBER_NUM:"memberNum",GRP_PROFILE_MAX_MEMBER_NUM:"maxMemberNum",GRP_PROFILE_JOIN_OPTION:"joinOption",GRP_PROFILE_INTRODUCTION:"introduction",GRP_PROFILE_NOTIFICATION:"notification",GRP_PROFILE_MUTE_ALL_MBRS:"muteAllMembers",SNS_ADD_TYPE_SINGLE:"Add_Type_Single",SNS_ADD_TYPE_BOTH:"Add_Type_Both",SNS_DELETE_TYPE_SINGLE:"Delete_Type_Single",SNS_DELETE_TYPE_BOTH:"Delete_Type_Both",SNS_APPLICATION_TYPE_BOTH:"Pendency_Type_Both",SNS_APPLICATION_SENT_TO_ME:"Pendency_Type_ComeIn",SNS_APPLICATION_SENT_BY_ME:"Pendency_Type_SendOut",SNS_APPLICATION_AGREE:"Response_Action_Agree",SNS_APPLICATION_AGREE_AND_ADD:"Response_Action_AgreeAndAdd",SNS_CHECK_TYPE_BOTH:"CheckResult_Type_Both",SNS_CHECK_TYPE_SINGLE:"CheckResult_Type_Single",SNS_TYPE_NO_RELATION:"CheckResult_Type_NoRelation",SNS_TYPE_A_WITH_B:"CheckResult_Type_AWithB",SNS_TYPE_B_WITH_A:"CheckResult_Type_BWithA",SNS_TYPE_BOTH_WAY:"CheckResult_Type_BothWay",NET_STATE_CONNECTED:"connected",NET_STATE_CONNECTING:"connecting",NET_STATE_DISCONNECTED:"disconnected",MSG_AT_ALL:"__kImSDK_MesssageAtALL__",READ_ALL_C2C_MSG:"readAllC2CMessage",READ_ALL_GROUP_MSG:"readAllGroupMessage",READ_ALL_MSG:"readAllMessage",USER_STATUS_UNKNOWN:0,USER_STATUS_ONLINE:1,USER_STATUS_OFFLINE:2,USER_STATUS_UNLOGINED:3},N=function(){function e(){n(this,e),this.cache=[],this.options=null;}return s(e,[{key:"use",value:function value(e){if("function"!=typeof e)throw"middleware must be a function";return this.cache.push(e),this;}},{key:"next",value:function value(e){if(this.middlewares&&this.middlewares.length>0)return this.middlewares.shift().call(this,this.options,this.next.bind(this));}},{key:"run",value:function value(e){return this.middlewares=this.cache.map(function(e){return e;}),this.options=e,this.next();}}]),e;}(),A="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function O(e,t){return e(t={exports:{}},t.exports),t.exports;}var R=O(function(e,t){var o,n,a,s,r,i,c,u,l,d,p,_,g,h,f,m,M,v;e.exports=(o="function"==typeof Promise,n="object"==typeof self?self:A,a="undefined"!=typeof Symbol,s="undefined"!=typeof Map,r="undefined"!=typeof Set,i="undefined"!=typeof WeakMap,c="undefined"!=typeof WeakSet,u="undefined"!=typeof DataView,l=a&&void 0!==Symbol.iterator,d=a&&void 0!==Symbol.toStringTag,p=r&&"function"==typeof Set.prototype.entries,_=s&&"function"==typeof Map.prototype.entries,g=p&&Object.getPrototypeOf(new Set().entries()),h=_&&Object.getPrototypeOf(new Map().entries()),f=l&&"function"==typeof Array.prototype[Symbol.iterator],m=f&&Object.getPrototypeOf([][Symbol.iterator]()),M=l&&"function"==typeof String.prototype[Symbol.iterator],v=M&&Object.getPrototypeOf(""[Symbol.iterator]()),function(e){var t=typeof e;if("object"!==t)return t;if(null===e)return"null";if(e===n)return"global";if(Array.isArray(e)&&(!1===d||!(Symbol.toStringTag in e)))return"Array";if("object"==typeof window&&null!==window){if("object"==typeof window.location&&e===window.location)return"Location";if("object"==typeof window.document&&e===window.document)return"Document";if("object"==typeof window.navigator){if("object"==typeof window.navigator.mimeTypes&&e===window.navigator.mimeTypes)return"MimeTypeArray";if("object"==typeof window.navigator.plugins&&e===window.navigator.plugins)return"PluginArray";}if(("function"==typeof window.HTMLElement||"object"==typeof window.HTMLElement)&&e instanceof window.HTMLElement){if("BLOCKQUOTE"===e.tagName)return"HTMLQuoteElement";if("TD"===e.tagName)return"HTMLTableDataCellElement";if("TH"===e.tagName)return"HTMLTableHeaderCellElement";}}var a=d&&e[Symbol.toStringTag];if("string"==typeof a)return a;var l=Object.getPrototypeOf(e);return l===RegExp.prototype?"RegExp":l===Date.prototype?"Date":o&&l===Promise.prototype?"Promise":r&&l===Set.prototype?"Set":s&&l===Map.prototype?"Map":c&&l===WeakSet.prototype?"WeakSet":i&&l===WeakMap.prototype?"WeakMap":u&&l===DataView.prototype?"DataView":s&&l===h?"Map Iterator":r&&l===g?"Set Iterator":f&&l===m?"Array Iterator":M&&l===v?"String Iterator":null===l?"Object":Object.prototype.toString.call(e).slice(8,-1);});}),L=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;n(this,e),this.high=t,this.low=o;}return s(e,[{key:"equal",value:function value(e){return null!==e&&this.low===e.low&&this.high===e.high;}},{key:"toString",value:function value(){var e=Number(this.high).toString(16),t=Number(this.low).toString(16);if(t.length<8)for(var o=8-t.length;o;){t="0"+t,o--;}return e+t;}}]),e;}(),k={TEST:{CHINA:{DEFAULT:"wss://wss-dev.tim.qq.com"},OVERSEA:{DEFAULT:"wss://wss-dev.tim.qq.com"},SINGAPORE:{DEFAULT:"wss://wsssgp-dev.im.qcloud.com"},KOREA:{DEFAULT:"wss://wsskr-dev.im.qcloud.com"},GERMANY:{DEFAULT:"wss://wssger-dev.im.qcloud.com"},IND:{DEFAULT:"wss://wssind-dev.im.qcloud.com"}},PRODUCTION:{CHINA:{DEFAULT:"wss://wss.im.qcloud.com",BACKUP:"wss://wss.tim.qq.com",STAT:"https://api.im.qcloud.com"},OVERSEA:{DEFAULT:"wss://wss.im.qcloud.com",BACKUP:"wss://wss.my-imcloud.com",STAT:"https://api.my-imcloud.com"},SINGAPORE:{DEFAULT:"wss://wsssgp.im.qcloud.com",BACKUP:"wss://wsssgp.my-imcloud.com",STAT:"https://apisgp.my-imcloud.com"},KOREA:{DEFAULT:"wss://wsskr.im.qcloud.com",BACKUP:"wss://wsskr.my-imcloud.com",STAT:"https://apikr.my-imcloud.com"},GERMANY:{DEFAULT:"wss://wssger.im.qcloud.com",BACKUP:"wss://wssger.my-imcloud.com",STAT:"https://apiger.my-imcloud.com"},IND:{DEFAULT:"wss://wssind.im.qcloud.com",BACKUP:"wss://wssind.my-imcloud.com",STAT:"https://apiind.my-imcloud.com"}}},G={ANDROID:2,IOS:3,MAC:4,WEB:7,WX_MP:8,QQ_MP:9,TT_MP:10,BAIDU_MP:11,ALI_MP:12,IPAD:13,UNI_NATIVE_APP:15},P="1.7.3",U=537048168,b="CHINA",w="OVERSEA",F="SINGAPORE",q="KOREA",V="GERMANY",B="IND",K={HOST:{CURRENT:{DEFAULT:"wss://wss.im.qcloud.com",STAT:"https://api.im.qcloud.com"},setCurrent:function setCurrent(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:b;this.CURRENT=k.PRODUCTION[e];}},NAME:{OPEN_IM:"openim",GROUP:"group_open_http_svc",GROUP_AVCHATROOM:"group_open_avchatroom_http_svc",GROUP_COMMUNITY:"million_group_open_http_svc",GROUP_ATTR:"group_open_attr_http_svc",FRIEND:"sns",PROFILE:"profile",RECENT_CONTACT:"recentcontact",PIC:"openpic",BIG_GROUP_NO_AUTH:"group_open_http_noauth_svc",BIG_GROUP_LONG_POLLING:"group_open_long_polling_http_svc",BIG_GROUP_LONG_POLLING_NO_AUTH:"group_open_long_polling_http_noauth_svc",IM_OPEN_STAT:"imopenstat",WEB_IM:"webim",IM_COS_SIGN:"im_cos_sign_svr",CUSTOM_UPLOAD:"im_cos_msg",HEARTBEAT:"heartbeat",IM_OPEN_PUSH:"im_open_push",IM_OPEN_STATUS:"im_open_status",IM_LONG_MESSAGE:"im_long_msg",IM_CONFIG_MANAGER:"im_sdk_config_mgr",STAT_SERVICE:"StatSvc",OVERLOAD_PUSH:"OverLoadPush"},CMD:{LOGIN:"wslogin",LOGOUT_LONG_POLL:"longpollinglogout",LOGOUT:"wslogout",HELLO:"wshello",STAT_BACKGROUND:"ws_stat_background",STAT_FOREGROUND:"ws_stat_foreground",SET_TOKEN:"ws_stat_settoken",PORTRAIT_GET:"portrait_get_all",PORTRAIT_SET:"portrait_set",GET_LONG_POLL_ID:"getlongpollingid",LONG_POLL:"longpolling",AVCHATROOM_LONG_POLL:"get_msg",ADD_FRIEND:"friend_add",UPDATE_FRIEND:"friend_update",GET_FRIEND_LIST:"friend_get",GET_FRIEND_PROFILE:"friend_get_list",DELETE_FRIEND:"friend_delete",CHECK_FRIEND:"friend_check",GET_FRIEND_GROUP_LIST:"group_get",RESPOND_FRIEND_APPLICATION:"friend_response",GET_FRIEND_APPLICATION_LIST:"pendency_get",DELETE_FRIEND_APPLICATION:"pendency_delete",REPORT_FRIEND_APPLICATION:"pendency_report",GET_GROUP_APPLICATION:"get_pendency",CREATE_FRIEND_GROUP:"group_add",DELETE_FRIEND_GROUP:"group_delete",UPDATE_FRIEND_GROUP:"group_update",GET_BLACKLIST:"black_list_get",ADD_BLACKLIST:"black_list_add",DELETE_BLACKLIST:"black_list_delete",CREATE_GROUP:"create_group",GET_JOINED_GROUPS:"get_joined_group_list",SET_GROUP_ATTRIBUTES:"set_group_attr",MODIFY_GROUP_ATTRIBUTES:"modify_group_attr",DELETE_GROUP_ATTRIBUTES:"delete_group_attr",CLEAR_GROUP_ATTRIBUTES:"clear_group_attr",GET_GROUP_ATTRIBUTES:"get_group_attr",SEND_MESSAGE:"sendmsg",REVOKE_C2C_MESSAGE:"msgwithdraw",DELETE_C2C_MESSAGE:"delete_c2c_msg_ramble",MODIFY_C2C_MESSAGE:"modify_c2c_msg",SEND_GROUP_MESSAGE:"send_group_msg",REVOKE_GROUP_MESSAGE:"group_msg_recall",DELETE_GROUP_MESSAGE:"delete_group_ramble_msg_by_seq",MODIFY_GROUP_MESSAGE:"modify_group_msg",GET_GROUP_INFO:"get_group_self_member_info",GET_GROUP_MEMBER_INFO:"get_specified_group_member_info",GET_GROUP_MEMBER_LIST:"get_group_member_info",GET_AVCHATROOM_MEMBER_LIST:"get_members",QUIT_GROUP:"quit_group",CHANGE_GROUP_OWNER:"change_group_owner",DESTROY_GROUP:"destroy_group",ADD_GROUP_MEMBER:"add_group_member",DELETE_GROUP_MEMBER:"delete_group_member",BAN_AVCHATROOM_MEMBER:"ban_group_member",SEARCH_GROUP_BY_ID:"get_group_public_info",APPLY_JOIN_GROUP:"apply_join_group",HANDLE_APPLY_JOIN_GROUP:"handle_apply_join_group",HANDLE_GROUP_INVITATION:"handle_invite_join_group",MODIFY_GROUP_INFO:"modify_group_base_info",MODIFY_GROUP_MEMBER_INFO:"modify_group_member_info",DELETE_GROUP_SYSTEM_MESSAGE:"deletemsg",DELETE_GROUP_AT_TIPS:"deletemsg",GET_CONVERSATION_LIST:"get",PAGING_GET_CONVERSATION_LIST:"page_get",DELETE_CONVERSATION:"delete",PIN_CONVERSATION:"top",SET_CONVERSATION_CUSTOM_DATA:"mark_contact",MARK_CONVERSATION:"mark_contact",CREATE_CONVERSATION_GROUP:"create_contact_group",DELETE_CONVERSATION_GROUP:"del_contact_group",UPDATE_CONVERSATION_GROUP:"update_contact_group",GET_CONVERSATION_GROUP_LIST:"get_contact_group",GET_MESSAGES:"getmsg",GET_C2C_ROAM_MESSAGES:"getroammsg",SET_C2C_PEER_MUTE_NOTIFICATIONS:"set_c2c_peer_mute_notifications",GET_C2C_PEER_MUTE_NOTIFICATIONS:"get_c2c_peer_mute_notifications",GET_GROUP_ROAM_MESSAGES:"group_msg_get",GET_READ_RECEIPT:"get_group_msg_receipt",GET_READ_RECEIPT_DETAIL:"get_group_msg_receipt_detail",SEND_READ_RECEIPT:"group_msg_receipt",SEND_C2C_READ_RECEIPT:"c2c_msg_read_receipt",SET_C2C_MESSAGE_READ:"msgreaded",GET_PEER_READ_TIME:"get_peer_read_time",SET_GROUP_MESSAGE_READ:"msg_read_report",FILE_READ_AND_WRITE_AUTHKEY:"authkey",FILE_UPLOAD:"pic_up",COS_SIGN:"cos",COS_PRE_SIG:"pre_sig",VIDEO_COVER:"video_cover",TIM_WEB_REPORT_V2:"tim_web_report_v2",BIG_DATA_HALLWAY_AUTH_KEY:"authkey",GET_ONLINE_MEMBER_NUM:"get_online_member_num",ALIVE:"alive",MESSAGE_PUSH:"msg_push",MULTI_MESSAGE_PUSH:"multi_msg_push_ws",MESSAGE_PUSH_ACK:"ws_msg_push_ack",STATUS_FORCE_OFFLINE:"stat_forceoffline",DOWNLOAD_MERGER_MESSAGE:"get_relay_json_msg",UPLOAD_MERGER_MESSAGE:"save_relay_json_msg",FETCH_CLOUD_CONTROL_CONFIG:"fetch_config",PUSHED_CLOUD_CONTROL_CONFIG:"push_configv2",FETCH_COMMERCIAL_CONFIG:"fetch_imsdk_purchase_bitsv2",PUSHED_COMMERCIAL_CONFIG:"push_imsdk_purchase_bitsv2",KICK_OTHER:"KickOther",OVERLOAD_NOTIFY:"notify2",SET_ALL_MESSAGE_READ:"read_all_unread_msg",CREATE_TOPIC:"create_topic",DELETE_TOPIC:"destroy_topic",UPDATE_TOPIC_PROFILE:"modify_topic",GET_TOPIC_LIST:"get_topic",SET_SELF_STATUS:"ws_set_custom_status",GET_USER_STATUS:"ws_get_user_status",SUBSCRIBE_USER_STATUS:"ws_status_subscribe",UNSUBSCRIBE_USER_STATUS:"ws_status_unsubscribe"},CHANNEL:{SOCKET:1,XHR:2,AUTO:0},NAME_VERSION:{openim:"v4",group_open_http_svc:"v4",sns:"v4",profile:"v4",recentcontact:"v4",openpic:"v4",group_open_http_noauth_svc:"v4",group_open_long_polling_http_svc:"v4",group_open_long_polling_http_noauth_svc:"v4",imopenstat:"v4",im_cos_sign_svr:"v4",im_cos_msg:"v4",webim:"v4",im_open_push:"v4",im_open_status:"v4"}},H={SEARCH_MSG:new L(0,Math.pow(2,0)).toString(),SEARCH_GRP_SNS:new L(0,Math.pow(2,1)).toString(),AVCHATROOM_HISTORY_MSG:new L(0,Math.pow(2,2)).toString(),GRP_COMMUNITY:new L(0,Math.pow(2,3)).toString(),MSG_TO_SPECIFIED_GRP_MBR:new L(0,Math.pow(2,4)).toString(),AVCHATROOM_MBR_LIST:new L(0,Math.pow(2,6)).toString(),USER_STATUS:new L(0,Math.pow(2,7)).toString(),CONV_MARK:new L(0,Math.pow(2,9)).toString(),CONV_GROUP:new L(0,Math.pow(2,10)).toString(),AVCHATROOM_BAN_MBR:new L(0,Math.pow(2,11)).toString()};K.HOST.setCurrent(b);var x,W,Y,j,$="undefined"!=typeof wx&&"function"==typeof wx.getSystemInfoSync&&Boolean(wx.getSystemInfoSync().fontSizeSetting),z="undefined"!=typeof qq&&"function"==typeof qq.getSystemInfoSync&&Boolean(qq.getSystemInfoSync().fontSizeSetting),J="undefined"!=typeof tt&&"function"==typeof tt.getSystemInfoSync&&Boolean(tt.getSystemInfoSync().fontSizeSetting),X="undefined"!=typeof swan&&"function"==typeof swan.getSystemInfoSync&&Boolean(swan.getSystemInfoSync().fontSizeSetting),Q="undefined"!=typeof my&&"function"==typeof my.getSystemInfoSync&&Boolean(my.getSystemInfoSync().fontSizeSetting),Z="undefined"!=typeof uni&&"undefined"==typeof window,ee="undefined"!=typeof uni,te=$||z||J||X||Q||Z,oe=("undefined"!=typeof uni||"undefined"!=typeof window)&&!te,ne=z?qq:J?tt:X?swan:Q?my:$?wx:Z?uni:{},ae=(x="WEB",ve?x="WEB":z?x="QQ_MP":J?x="TT_MP":X?x="BAIDU_MP":Q?x="ALI_MP":$?x="WX_MP":Z&&(x="UNI_NATIVE_APP"),G[x]),se=oe&&window&&window.navigator&&window.navigator.userAgent||"",re=/AppleWebKit\/([\d.]+)/i.exec(se),ie=(re&&parseFloat(re.pop()),/iPad/i.test(se)),ce=/iPhone/i.test(se)&&!ie,ue=/iPod/i.test(se),le=ce||ie||ue,de=(W=se.match(/OS (\d+)_/i))&&W[1]?W[1]:null,pe=/Android/i.test(se),_e=function(){var e=se.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!e)return null;var t=e[1]&&parseFloat(e[1]),o=e[2]&&parseFloat(e[2]);return t&&o?parseFloat(e[1]+"."+e[2]):t||null;}(),ge=(pe&&/webkit/i.test(se),/Firefox/i.test(se),/Edge/i.test(se)),he=!ge&&/Chrome/i.test(se),fe=(function(){var e=se.match(/Chrome\/(\d+)/);e&&e[1]&&parseFloat(e[1]);}(),/MSIE/.test(se)||se.indexOf("Trident")>-1&&se.indexOf("rv:11.0")>-1),me=(/MSIE\s8\.0/.test(se),function(){var e=/MSIE\s(\d+)\.\d/.exec(se),t=e&&parseFloat(e[1]);return!t&&/Trident\/7.0/i.test(se)&&/rv:11.0/.test(se)&&(t=11),t;}()),Me=(/Safari/i.test(se),/TBS\/\d+/i.test(se)),ve=(function(){var e=se.match(/TBS\/(\d+)/i);if(e&&e[1])e[1];}(),!Me&&/MQQBrowser\/\d+/i.test(se),!Me&&/ QQBrowser\/\d+/i.test(se),/(micromessenger|webbrowser)/i.test(se)),Ie=/Windows/i.test(se),ye=/MAC OS X/i.test(se),Te=(/MicroMessenger/i.test(se),oe&&"undefined"!=typeof Worker&&!fe),Ee=pe||le,Ce="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};Y="undefined"!=typeof console?console:void 0!==Ce&&Ce.console?Ce.console:"undefined"!=typeof window&&window.console?window.console:{};for(var Se=function Se(){},De=["assert","clear","count","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","profile","profileEnd","table","time","timeEnd","timeStamp","trace","warn"],Ne=De.length;Ne--;){j=De[Ne],console[j]||(Y[j]=Se);}var Ae=Y,Oe=0,Re=function Re(){return new Date().getTime()+Oe;},Le=function Le(){Oe=0;},ke=function ke(){return Math.floor(Re()/1e3);},Ge=0,Pe=new Map();function Ue(){var e,t=((e=new Date()).setTime(Re()),e);return"TIM "+t.toLocaleTimeString("en-US",{hour12:!1})+"."+function(e){var t;switch(e.toString().length){case 1:t="00"+e;break;case 2:t="0"+e;break;default:t=e;}return t;}(t.getMilliseconds())+":";}var be={arguments2String:function arguments2String(e){var t;if(1===e.length)t=Ue()+e[0];else{t=Ue();for(var o=0,n=e.length;o<n;o++){et(e[o])?nt(e[o])?t+=ut(e[o]):t+=JSON.stringify(e[o]):t+=e[o],t+=" ";}}return t;},debug:function debug(){if(Ge<=-1){var e=this.arguments2String(arguments);Ae.debug(e);}},log:function log(){if(Ge<=0){var e=this.arguments2String(arguments);Ae.log(e);}},info:function info(){if(Ge<=1){var e=this.arguments2String(arguments);Ae.info(e);}},warn:function warn(){if(Ge<=2){var e=this.arguments2String(arguments);Ae.warn(e);}},error:function error(){if(Ge<=3){var e=this.arguments2String(arguments);Ae.error(e);}},time:function time(e){Pe.set(e,it.now());},timeEnd:function timeEnd(e){if(Pe.has(e)){var t=it.now()-Pe.get(e);return Pe.delete(e),t;}return Ae.warn("未找到对应label: ".concat(e,", 请在调用 logger.timeEnd 前,调用 logger.time")),0;},setLevel:function setLevel(e){e<4&&Ae.log(Ue()+"set level from "+Ge+" to "+e),Ge=e;},getLevel:function getLevel(){return Ge;}},we={JPG:1,JPEG:1,GIF:2,PNG:3,BMP:4,UNKNOWN:255},Fe={NICK:"Tag_Profile_IM_Nick",GENDER:"Tag_Profile_IM_Gender",BIRTHDAY:"Tag_Profile_IM_BirthDay",LOCATION:"Tag_Profile_IM_Location",SELFSIGNATURE:"Tag_Profile_IM_SelfSignature",ALLOWTYPE:"Tag_Profile_IM_AllowType",LANGUAGE:"Tag_Profile_IM_Language",AVATAR:"Tag_Profile_IM_Image",MESSAGESETTINGS:"Tag_Profile_IM_MsgSettings",ADMINFORBIDTYPE:"Tag_Profile_IM_AdminForbidType",LEVEL:"Tag_Profile_IM_Level",ROLE:"Tag_Profile_IM_Role"},qe={UNKNOWN:"Gender_Type_Unknown",FEMALE:"Gender_Type_Female",MALE:"Gender_Type_Male"},Ve={NONE:"AdminForbid_Type_None",SEND_OUT:"AdminForbid_Type_SendOut"},Be={NEED_CONFIRM:"AllowType_Type_NeedConfirm",ALLOW_ANY:"AllowType_Type_AllowAny",DENY_ANY:"AllowType_Type_DenyAny"},Ke="JoinedSuccess",He="WaitAdminApproval",xe="@TGS#_",We="@TOPIC#_",Ye=["url"],je=function je(e){return"file"===at(e);},$e=function $e(e){return null!==e&&("number"==typeof e&&!isNaN(e-0)||"object"===o(e)&&e.constructor===Number);},ze=function ze(e){return"string"==typeof e;},Je=function Je(e){return null!==e&&"object"===o(e);},Xe=function Xe(e){if("object"!==o(e)||null===e)return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;for(var n=t;null!==Object.getPrototypeOf(n);){n=Object.getPrototypeOf(n);}return t===n;},Qe=function Qe(e){return"function"==typeof Array.isArray?Array.isArray(e):"array"===at(e);},Ze=function Ze(e){return void 0===e;},et=function et(e){return Qe(e)||Je(e);},ot=function ot(e){return"function"==typeof e;},nt=function nt(e){return e instanceof Error;},at=function at(e){return Object.prototype.toString.call(e).match(/^\[object (.*)\]$/)[1].toLowerCase();},st=function st(e){if("string"!=typeof e)return!1;var t=e[0];return!/[^a-zA-Z0-9]/.test(t);},rt=0;Date.now||(Date.now=function(){return new Date().getTime();});var it={now:function now(){0===rt&&(rt=Date.now()-1);var e=Date.now()-rt;return e>4294967295?(rt+=4294967295,Date.now()-rt):e;},utc:function utc(){return Math.round(Date.now()/1e3);}},ct=function e(t,o,n,a){if(!et(t)||!et(o))return 0;for(var s,r=0,i=Object.keys(o),c=0,u=i.length;c<u;c++){if(s=i[c],!(Ze(o[s])||n&&n.includes(s)))if(et(t[s])&&et(o[s]))r+=e(t[s],o[s],n,a);else{if(a&&a.includes(o[s]))continue;t[s]!==o[s]&&(t[s]=o[s],r+=1);}}return r;},ut=function ut(e){return JSON.stringify(e,["message","code"]);},lt=function lt(e){if(0===e.length)return 0;for(var t=0,o=0,n="undefined"!=typeof document&&void 0!==document.characterSet?document.characterSet:"UTF-8";void 0!==e[t];){o+=e[t++].charCodeAt[t]<=255?1:!1===n?3:2;}return o;},dt=function dt(e){var t=e||99999999;return Math.round(Math.random()*t);},pt="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",_t=pt.length,gt=function gt(e,t){for(var o in e){if(e[o]===t)return!0;}return!1;},ht={},ft=function ft(e){return-1===e.indexOf("http://")||-1===e.indexOf("https://")?"https://"+e:e.replace(/https|http/,"https");},mt=function e(t){if(0===Object.getOwnPropertyNames(t).length)return Object.create(null);var n=Array.isArray(t)?[]:Object.create(null),a="";for(var s in t){null!==t[s]?void 0!==t[s]?(a=o(t[s]),["string","number","function","boolean"].indexOf(a)>=0?n[s]=t[s]:n[s]=e(t[s])):n[s]=void 0:n[s]=null;}return n;};function Mt(e,t){Qe(e)&&Qe(t)?t.forEach(function(t){var o=t.key,n=t.value,a=e.find(function(e){return e.key===o;});a?a.value=n:e.push({key:o,value:n});}):be.warn("updateCustomField target 或 source 不是数组,忽略此次更新。");}var vt=function vt(e){return e===D.GRP_PUBLIC;},It=function It(e){return e===D.GRP_AVCHATROOM;},yt=function yt(e){var t=e.type,o=e.groupID;return t===D.GRP_COMMUNITY||"".concat(o).startsWith(xe)&&!"".concat(o).includes(We);},Tt=function Tt(e){return"".concat(e).startsWith(xe)&&"".concat(e).includes(We);},Et=function Et(e){return ze(e)&&e.slice(0,3)===D.CONV_C2C;},Ct=function Ct(e){return ze(e)&&e.slice(0,5)===D.CONV_GROUP;},St=function St(e){return ze(e)&&e===D.CONV_SYSTEM;};function Dt(e,t){var o={};return Object.keys(e).forEach(function(n){o[n]=t(e[n],n);}),o;}function Nt(e){return te?new Promise(function(t,o){ne.getImageInfo({src:e,success:function success(e){t({width:e.width,height:e.height});},fail:function fail(){t({width:0,height:0});}});}):fe&&9===me?Promise.resolve({width:0,height:0}):new Promise(function(t,o){var n=new Image();n.onload=function(){t({width:this.width,height:this.height}),n=null;},n.onerror=function(){t({width:0,height:0}),n=null;},n.src=e;});}function At(){function e(){return(65536*(1+Math.random())|0).toString(16).substring(1);}return"".concat(e()+e()).concat(e()).concat(e()).concat(e()).concat(e()).concat(e()).concat(e());}function Ot(){var e="unknown";if(ye&&(e="mac"),Ie&&(e="windows"),le&&(e="ios"),pe&&(e="android"),te)try{var t=ne.getSystemInfoSync().platform;void 0!==t&&(e=t);}catch(o){}return e;}function Rt(e,t){e=e.split("."),t=t.split(".");for(var o=Math.max(e.length,t.length);e.length<o;){e.push("0");}for(;t.length<o;){t.push("0");}for(var n=0;n<o;n++){var a=parseInt(e[n]),s=parseInt(t[n]);if(a>s)return 1;if(a<s)return-1;}return 0;}function Lt(e){var t=e.originUrl,o=void 0===t?void 0:t,n=e.originWidth,a=e.originHeight,s=e.min,r=void 0===s?198:s,i=parseInt(n),c=parseInt(a),u={url:void 0,width:0,height:0};if((i<=c?i:c)<=r)u.url=o,u.width=i,u.height=c;else{c<=i?(u.width=Math.ceil(i*r/c),u.height=r):(u.width=r,u.height=Math.ceil(c*r/i));var l=o&&o.indexOf("?")>-1?"".concat(o,"&"):"".concat(o,"?");u.url="".concat(l,198===r?"imageView2/3/w/198/h/198":"imageView2/3/w/720/h/720");}return Ze(o)?_(u,Ye):u;}function kt(e){var t=e[2];e[2]=e[1],e[1]=t;for(var o=0;o<e.length;o++){e[o].setType(o);}}function Gt(e){var t=e.servcmd;return t.slice(t.indexOf(".")+1);}function Pt(e,t){return Math.round(Number(e)*Math.pow(10,t))/Math.pow(10,t);}function Ut(e,t){return e.includes(t);}function bt(e,t){return e.includes(t);}function wt(e){return e.split(We)[0];}var Ft=function Ft(e,t){if(Ze(t))return"";switch(e){case D.MSG_TEXT:return t.text;case D.MSG_IMAGE:return"[图片]";case D.MSG_LOCATION:return"[位置]";case D.MSG_AUDIO:return"[语音]";case D.MSG_VIDEO:return"[视频]";case D.MSG_FILE:return"[文件]";case D.MSG_CUSTOM:return"[自定义消息]";case D.MSG_GRP_TIP:return"[群提示消息]";case D.MSG_GRP_SYS_NOTICE:return"[群系统通知]";case D.MSG_FACE:return"[动画表情]";case D.MSG_MERGER:return"[聊天记录]";default:return"";}};function qt(e){return e===D.MSG_TEXT||e===D.MSG_CUSTOM||e===D.MSG_LOCATION||e===D.MSG_FACE;}function Vt(e){var t=[];if(!ze(e))return t;var o=e.length;if(0===o)return t;for(var n=o-1;n>=0;n--){"1"===e[n]&&t.push(Math.pow(2,o-n-1));}return t;}var Bt=Object.prototype.hasOwnProperty;function Kt(e){if(null==e)return!0;if("boolean"==typeof e)return!1;if("number"==typeof e)return 0===e;if("string"==typeof e)return 0===e.length;if("function"==typeof e)return 0===e.length;if(Array.isArray(e))return 0===e.length;if(e instanceof Error)return""===e.message;if(Xe(e)){for(var t in e){if(Bt.call(e,t))return!1;}return!0;}return!("map"!==at(e)&&!function(e){return"set"===at(e);}(e)&&!je(e))&&0===e.size;}function Ht(e,t,o){if(void 0===t)return!0;var n=!0;if("object"===R(t).toLowerCase())Object.keys(t).forEach(function(a){var s=1===e.length?e[0][a]:void 0;n=!!xt(s,t[a],o,a)&&n;});else if("array"===R(t).toLowerCase())for(var a=0;a<t.length;a++){n=!!xt(e[a],t[a],o,t[a].name)&&n;}if(n)return n;throw new Error("Params validate failed.");}function xt(e,t,o,n){if(void 0===t)return!0;var a=!0;return t.required&&Kt(e)&&(Ae.error("TIM [".concat(o,'] Missing required params: "').concat(n,'".')),a=!1),Kt(e)||R(e).toLowerCase()===t.type.toLowerCase()||(Ae.error("TIM [".concat(o,'] Invalid params: type check failed for "').concat(n,'".Expected ').concat(t.type,".")),a=!1),t.validator&&!t.validator(e)&&(Ae.error("TIM [".concat(o,"] Invalid params: custom validator check failed for params.")),a=!1),a;}var Wt,Yt={UNSEND:"unSend",SUCCESS:"success",FAIL:"fail"},jt={NOT_START:"notStart",PENDING:"pengding",RESOLVED:"resolved",REJECTED:"rejected"},$t=function $t(e){return!!e&&(!!(Et(e)||Ct(e)||St(e))||(console.warn("非法的会话 ID:".concat(e,"。会话 ID 组成方式:C2C + userID(单聊)GROUP + groupID(群聊)@TIM#SYSTEM(系统通知会话)")),!1));},zt="请参考 https://web.sdk.qcloud.com/im/doc/zh-cn/SDK.html#",Jt=function Jt(e){return e.param?"".concat(e.api," ").concat(e.param," ").concat(e.desc,"。").concat(zt).concat(e.api):"".concat(e.api," ").concat(e.desc,"。").concat(zt).concat(e.api);},Xt={type:"String",required:!0},Qt={type:"Array",required:!0},Zt={type:"Object",required:!0},eo={type:"Boolean",required:!0},to={login:{userID:Xt,userSig:Xt},addToBlacklist:{userIDList:Qt},on:[{name:"eventName",type:"String",validator:function validator(e){return"string"==typeof e&&0!==e.length||(console.warn(Jt({api:"on",param:"eventName",desc:"类型必须为 String,且不能为空"})),!1);}},{name:"handler",type:"Function",validator:function validator(e){return"function"!=typeof e?(console.warn(Jt({api:"on",param:"handler",desc:"参数必须为 Function"})),!1):(""===e.name&&console.warn("on 接口的 handler 参数推荐使用具名函数。具名函数可以使用 off 接口取消订阅,匿名函数无法取消订阅。"),!0);}}],once:[{name:"eventName",type:"String",validator:function validator(e){return"string"==typeof e&&0!==e.length||(console.warn(Jt({api:"once",param:"eventName",desc:"类型必须为 String,且不能为空"})),!1);}},{name:"handler",type:"Function",validator:function validator(e){return"function"!=typeof e?(console.warn(Jt({api:"once",param:"handler",desc:"参数必须为 Function"})),!1):(""===e.name&&console.warn("once 接口的 handler 参数推荐使用具名函数。"),!0);}}],off:[{name:"eventName",type:"String",validator:function validator(e){return"string"==typeof e&&0!==e.length||(console.warn(Jt({api:"off",param:"eventName",desc:"类型必须为 String,且不能为空"})),!1);}},{name:"handler",type:"Function",validator:function validator(e){return"function"!=typeof e?(console.warn(Jt({api:"off",param:"handler",desc:"参数必须为 Function"})),!1):(""===e.name&&console.warn("off 接口无法为匿名函数取消监听事件。"),!0);}}],sendMessage:[t({name:"message"},Zt)],getMessageList:{conversationID:t(t({},Xt),{},{validator:function validator(e){return $t(e);}}),nextReqMessageID:{type:"String"},count:{type:"Number",validator:function validator(e){return!(!Ze(e)&&!/^[1-9][0-9]*$/.test(e))||(console.warn(Jt({api:"getMessageList",param:"count",desc:"必须为正整数"})),!1);}}},getMessageListHopping:{conversationID:t(t({},Xt),{},{validator:function validator(e){return $t(e);}}),sequence:{type:"Number"},time:{type:"Number"},direction:{type:"Number",validator:function validator(e){return!(!Ze(e)&&0!==e&&1!==e)||(console.warn(Jt({api:"getMessageListHopping",param:"direction",desc:"必须传 0 或 1"})),!1);}},count:{type:"Number",validator:function validator(e){return!(!Ze(e)&&!/^[1-9][0-9]*$/.test(e))||(console.warn(Jt({api:"getMessageListHopping",param:"count",desc:"必须为正整数"})),!1);}}},setMessageRead:{conversationID:t(t({},Xt),{},{validator:function validator(e){return $t(e);}})},setAllMessageRead:{scope:{type:"String",required:!1,validator:function validator(e){return!e||-1!==[D.READ_ALL_C2C_MSG,D.READ_ALL_GROUP_MSG,D.READ_ALL_MSG].indexOf(e)||(console.warn(Jt({api:"setAllMessageRead",param:"scope",desc:"取值必须为 TIM.TYPES.READ_ALL_C2C_MSG, TIM.TYPES.READ_ALL_GROUP_MSG 或 TIM.TYPES.READ_ALL_MSG"})),!1);}}},getConversationProfile:[t(t({name:"conversationID"},Xt),{},{validator:function validator(e){return $t(e);}})],deleteConversation:[t(t({name:"conversationID"},Xt),{},{validator:function validator(e){return $t(e);}})],pinConversation:{conversationID:t(t({},Xt),{},{validator:function validator(e){return $t(e);}}),isPinned:t({},eo)},setConversationCustomData:{conversationIDList:t({},Qt),customData:{type:"String",validator:function validator(e){return ze(e)?!(e.length>256)||(console.warn(Jt({api:"setConversationCustomData",param:"customData",desc:"长度不得超过256字节"})),!1):(console.warn(Jt({api:"setConversationCustomData",param:"customData",desc:"类型必须为 String"})),!1);}}},markConversation:{conversationIDList:t({},Qt),markType:{type:"number",validator:function validator(e){return $e(e)?e<=0?(console.warn(Jt({api:"markConversation",param:"markType",desc:"不能小于等于0"})),!1):!(e>=Math.pow(2,64))||(console.warn(Jt({api:"markConversation",param:"markType",desc:"必须小于 Math.pow(2,64)"})),!1):(console.warn(Jt({api:"markConversation",param:"markType",desc:"类型必须为 Number"})),!1);}},enableMark:t({},eo)},createConversationGroup:{conversationIDList:t({},Qt),groupName:t(t({},Xt),{},{validator:function validator(e){return!!e&&(!(e.length>32)||(console.warn(Jt({api:"createConversationGroup",param:"groupName",desc:"长度不得超过32字节"})),!1));}})},deleteConversationGroup:[t({name:"groupName"},Xt)],renameConversationGroup:{oldName:t({},Xt),newName:t(t({},Xt),{},{validator:function validator(e){return!!e&&(!(e.length>32)||(console.warn(Jt({api:"renameConversationGroup",param:"newName",desc:"长度不得超过32字节"})),!1));}})},addConversationsToGroup:{conversationIDList:t({},Qt),groupName:t({},Xt)},deleteConversationsFromGroup:{conversationIDList:t({},Qt),groupName:t({},Xt)},getGroupList:{groupProfileFilter:{type:"Array"}},getGroupProfile:{groupID:Xt,groupCustomFieldFilter:{type:"Array"},memberCustomFieldFilter:{type:"Array"}},getGroupProfileAdvance:{groupIDList:Qt},createGroup:{name:Xt},joinGroup:{groupID:Xt,type:{type:"String"},applyMessage:{type:"String"}},quitGroup:[t({name:"groupID"},Xt)],handleApplication:{message:Zt,handleAction:Xt,handleMessage:{type:"String"}},changeGroupOwner:{groupID:Xt,newOwnerID:Xt},updateGroupProfile:{groupID:Xt,muteAllMembers:{type:"Boolean"}},dismissGroup:[t({name:"groupID"},Xt)],searchGroupByID:[t({name:"groupID"},Xt)],initGroupAttributes:{groupID:Xt,groupAttributes:t(t({},Zt),{},{validator:function validator(e){var t=!0;return Object.keys(e).forEach(function(o){if(!ze(e[o]))return console.warn(Jt({api:"initGroupAttributes",desc:"群属性 value 必须是字符串"})),t=!1;}),t;}})},setGroupAttributes:{groupID:Xt,groupAttributes:t(t({},Zt),{},{validator:function validator(e){var t=!0;return Object.keys(e).forEach(function(o){if(!ze(e[o]))return console.warn(Jt({api:"setGroupAttributes",desc:"群属性 value 必须是字符串"})),t=!1;}),t;}})},deleteGroupAttributes:{groupID:Xt,keyList:{type:"Array",validator:function validator(e){if(Ze(e))return console.warn(Jt({api:"deleteGroupAttributes",desc:"缺少必填参数:keyList"})),!1;if(!Qe(e))return!1;if(!Kt(e)){var t=!0;return e.forEach(function(e){if(!ze(e))return console.warn(Jt({api:"deleteGroupAttributes",desc:"群属性 key 必须是字符串"})),t=!1;}),t;}return!0;}}},getGroupAttributes:{groupID:Xt,keyList:{type:"Array",validator:function validator(e){if(Ze(e))return console.warn(Jt({api:"getGroupAttributes",desc:"缺少必填参数:keyList"})),!1;if(!Qe(e))return!1;if(!Kt(e)){var t=!0;return e.forEach(function(e){if(!ze(e))return console.warn(Jt({api:"getGroupAttributes",desc:"群属性 key 必须是字符串"})),t=!1;}),t;}return!0;}}},getGroupMemberList:{groupID:Xt,count:{type:"Number"}},getGroupMemberProfile:{groupID:Xt,userIDList:Qt,memberCustomFieldFilter:{type:"Array"}},addGroupMember:{groupID:Xt,userIDList:Qt},setGroupMemberRole:{groupID:Xt,userID:Xt,role:Xt},setGroupMemberMuteTime:{groupID:Xt,userID:Xt,muteTime:{type:"Number",validator:function validator(e){return e>=0;}}},setGroupMemberNameCard:{groupID:Xt,userID:{type:"String"},nameCard:{type:"String",validator:function validator(e){return ze(e)?(e.length,!0):(console.warn(Jt({api:"setGroupMemberNameCard",param:"nameCard",desc:"类型必须为 String"})),!1);}}},setGroupMemberCustomField:{groupID:Xt,userID:{type:"String"},memberCustomField:Qt},deleteGroupMember:{groupID:Xt},createTextMessage:{to:Xt,conversationType:Xt,payload:t(t({},Zt),{},{validator:function validator(e){return Xe(e)?ze(e.text)?0!==e.text.length||(console.warn(Jt({api:"createTextMessage",desc:"消息内容不能为空"})),!1):(console.warn(Jt({api:"createTextMessage",param:"payload.text",desc:"类型必须为 String"})),!1):(console.warn(Jt({api:"createTextMessage",param:"payload",desc:"类型必须为 plain object"})),!1);}})},createTextAtMessage:{to:Xt,conversationType:Xt,payload:t(t({},Zt),{},{validator:function validator(e){return Xe(e)?ze(e.text)?0===e.text.length?(console.warn(Jt({api:"createTextAtMessage",desc:"消息内容不能为空"})),!1):!(e.atUserList&&!Qe(e.atUserList))||(console.warn(Jt({api:"createTextAtMessage",desc:"payload.atUserList 类型必须为数组"})),!1):(console.warn(Jt({api:"createTextAtMessage",param:"payload.text",desc:"类型必须为 String"})),!1):(console.warn(Jt({api:"createTextAtMessage",param:"payload",desc:"类型必须为 plain object"})),!1);}})},createCustomMessage:{to:Xt,conversationType:Xt,payload:t(t({},Zt),{},{validator:function validator(e){return Xe(e)?e.data&&!ze(e.data)?(console.warn(Jt({api:"createCustomMessage",param:"payload.data",desc:"类型必须为 String"})),!1):e.description&&!ze(e.description)?(console.warn(Jt({api:"createCustomMessage",param:"payload.description",desc:"类型必须为 String"})),!1):!(e.extension&&!ze(e.extension))||(console.warn(Jt({api:"createCustomMessage",param:"payload.extension",desc:"类型必须为 String"})),!1):(console.warn(Jt({api:"createCustomMessage",param:"payload",desc:"类型必须为 plain object"})),!1);}})},createImageMessage:{to:Xt,conversationType:Xt,payload:t(t({},Zt),{},{validator:function validator(e){if(!Xe(e))return console.warn(Jt({api:"createImageMessage",param:"payload",desc:"类型必须为 plain object"})),!1;if(Ze(e.file))return console.warn(Jt({api:"createImageMessage",param:"payload.file",desc:"不能为 undefined"})),!1;if(oe){if(!(e.file instanceof HTMLInputElement||je(e.file)))return Xe(e.file)&&"undefined"!=typeof uni?0!==e.file.tempFilePaths.length&&0!==e.file.tempFiles.length||(console.warn(Jt({api:"createImageMessage",param:"payload.file",desc:"您没有选择文件,无法发送"})),!1):(console.warn(Jt({api:"createImageMessage",param:"payload.file",desc:"类型必须是 HTMLInputElement 或 File"})),!1);if(e.file instanceof HTMLInputElement&&0===e.file.files.length)return console.warn(Jt({api:"createImageMessage",param:"payload.file",desc:"您没有选择文件,无法发送"})),!1;}return!0;},onProgress:{type:"Function",required:!1,validator:function validator(e){return Ze(e)&&console.warn(Jt({api:"createImageMessage",desc:"没有 onProgress 回调,您将无法获取上传进度"})),!0;}}})},createAudioMessage:{to:Xt,conversationType:Xt,payload:t(t({},Zt),{},{validator:function validator(e){return!!Xe(e)||(console.warn(Jt({api:"createAudioMessage",param:"payload",desc:"类型必须为 plain object"})),!1);}}),onProgress:{type:"Function",required:!1,validator:function validator(e){return Ze(e)&&console.warn(Jt({api:"createAudioMessage",desc:"没有 onProgress 回调,您将无法获取上传进度"})),!0;}}},createVideoMessage:{to:Xt,conversationType:Xt,payload:t(t({},Zt),{},{validator:function validator(e){if(!Xe(e))return console.warn(Jt({api:"createVideoMessage",param:"payload",desc:"类型必须为 plain object"})),!1;if(Ze(e.file))return console.warn(Jt({api:"createVideoMessage",param:"payload.file",desc:"不能为 undefined"})),!1;if(oe){if(!(e.file instanceof HTMLInputElement||je(e.file)))return Xe(e.file)&&"undefined"!=typeof uni?!!je(e.file.tempFile)||(console.warn(Jt({api:"createVideoMessage",param:"payload.file",desc:"您没有选择文件,无法发送"})),!1):(console.warn(Jt({api:"createVideoMessage",param:"payload.file",desc:"类型必须是 HTMLInputElement 或 File"})),!1);if(e.file instanceof HTMLInputElement&&0===e.file.files.length)return console.warn(Jt({api:"createVideoMessage",param:"payload.file",desc:"您没有选择文件,无法发送"})),!1;}return!0;}}),onProgress:{type:"Function",required:!1,validator:function validator(e){return Ze(e)&&console.warn(Jt({api:"createVideoMessage",desc:"没有 onProgress 回调,您将无法获取上传进度"})),!0;}}},createFaceMessage:{to:Xt,conversationType:Xt,payload:t(t({},Zt),{},{validator:function validator(e){return Xe(e)?$e(e.index)?!!ze(e.data)||(console.warn(Jt({api:"createFaceMessage",param:"payload.data",desc:"类型必须为 String"})),!1):(console.warn(Jt({api:"createFaceMessage",param:"payload.index",desc:"类型必须为 Number"})),!1):(console.warn(Jt({api:"createFaceMessage",param:"payload",desc:"类型必须为 plain object"})),!1);}})},createFileMessage:{to:Xt,conversationType:Xt,payload:t(t({},Zt),{},{validator:function validator(e){if(!Xe(e))return console.warn(Jt({api:"createFileMessage",param:"payload",desc:"类型必须为 plain object"})),!1;if(Ze(e.file))return console.warn(Jt({api:"createFileMessage",param:"payload.file",desc:"不能为 undefined"})),!1;if(oe){if(!(e.file instanceof HTMLInputElement||je(e.file)))return Xe(e.file)&&"undefined"!=typeof uni?0!==e.file.tempFilePaths.length&&0!==e.file.tempFiles.length||(console.warn(Jt({api:"createFileMessage",param:"payload.file",desc:"您没有选择文件,无法发送"})),!1):(console.warn(Jt({api:"createFileMessage",param:"payload.file",desc:"类型必须是 HTMLInputElement 或 File"})),!1);if(e.file instanceof HTMLInputElement&&0===e.file.files.length)return console.warn(Jt({api:"createFileMessage",desc:"您没有选择文件,无法发送"})),!1;}return!0;}}),onProgress:{type:"Function",required:!1,validator:function validator(e){return Ze(e)&&console.warn(Jt({api:"createFileMessage",desc:"没有 onProgress 回调,您将无法获取上传进度"})),!0;}}},createLocationMessage:{to:Xt,conversationType:Xt,payload:t(t({},Zt),{},{validator:function validator(e){return Xe(e)?ze(e.description)?$e(e.longitude)?!!$e(e.latitude)||(console.warn(Jt({api:"createLocationMessage",param:"payload.latitude",desc:"类型必须为 Number"})),!1):(console.warn(Jt({api:"createLocationMessage",param:"payload.longitude",desc:"类型必须为 Number"})),!1):(console.warn(Jt({api:"createLocationMessage",param:"payload.description",desc:"类型必须为 String"})),!1):(console.warn(Jt({api:"createLocationMessage",param:"payload",desc:"类型必须为 plain object"})),!1);}})},createMergerMessage:{to:Xt,conversationType:Xt,payload:t(t({},Zt),{},{validator:function validator(e){if(Kt(e.messageList))return console.warn(Jt({api:"createMergerMessage",desc:"不能为空数组"})),!1;if(Kt(e.compatibleText))return console.warn(Jt({api:"createMergerMessage",desc:"类型必须为 String,且不能为空"})),!1;var t=!1;return e.messageList.forEach(function(e){e.status===Yt.FAIL&&(t=!0);}),!t||(console.warn(Jt({api:"createMergerMessage",desc:"不支持合并已发送失败的消息"})),!1);}})},revokeMessage:[t(t({name:"message"},Zt),{},{validator:function validator(e){return Kt(e)?(console.warn(Jt({api:"revokeMessage",desc:"请传入消息(Message)实例"})),!1):e.conversationType===D.CONV_SYSTEM?(console.warn(Jt({api:"revokeMessage",desc:"不能撤回系统会话消息,只能撤回单聊消息或群消息"})),!1):!0!==e.isRevoked||(console.warn(Jt({api:"revokeMessage",desc:"消息已经被撤回,请勿重复操作"})),!1);}})],deleteMessage:[t(t({name:"messageList"},Qt),{},{validator:function validator(e){return!Kt(e)||(console.warn(Jt({api:"deleteMessage",param:"messageList",desc:"不能为空数组"})),!1);}})],modifyMessage:[t(t({name:"message"},Zt),{},{validator:function validator(e){return Kt(e)?(console.warn(Jt({api:"modifyMessage",desc:"请传入消息(Message)实例"})),!1):e.conversationType===D.CONV_SYSTEM?(console.warn(Jt({api:"modifyMessage",desc:"不支持修改系统会话消息,只能修改单聊消息或群消息"})),!1):!0!==e._onlineOnlyFlag||(console.warn(Jt({api:"modifyMessage",desc:"不支持修改在线消息"})),!1);}})],getUserProfile:{userIDList:{type:"Array",validator:function validator(e){return Qe(e)?(0===e.length&&console.warn(Jt({api:"getUserProfile",param:"userIDList",desc:"不能为空数组"})),!0):(console.warn(Jt({api:"getUserProfile",param:"userIDList",desc:"必须为数组"})),!1);}}},updateMyProfile:{profileCustomField:{type:"Array",validator:function validator(e){return!!Ze(e)||!!Qe(e)||(console.warn(Jt({api:"updateMyProfile",param:"profileCustomField",desc:"必须为数组"})),!1);}}},setSelfStatus:{customStatus:{type:"String",validator:function validator(e){return!!ze(e)||(console.warn(Jt({api:"setSelfStatus",param:"customStatus",desc:Xt})),!1);}}},getUserStatus:{userIDList:{type:"Array",validator:function validator(e){return Qe(e)?0!==e.length||(console.warn(Jt({api:"getUserStatus",param:"userIDList",desc:"不能为空数组"})),!1):(console.warn(Jt({api:"getUserStatus",param:"userIDList",desc:"必须为数组"})),!1);}}},subscribeUserStatus:{userIDList:{type:"Array",validator:function validator(e){return Qe(e)?0!==e.length||(console.warn(Jt({api:"subscribeUserStatus",param:"userIDList",desc:"不能为空数组"})),!1):(console.warn(Jt({api:"subscribeUserStatus",param:"userIDList",desc:"必须为数组"})),!1);}}},unsubscribeUserStatus:{userIDList:{type:"Array",validator:function validator(e){return!e||!!Qe(e)||(console.warn(Jt({api:"subscribeUserStatus",param:"userIDList",desc:"必须为数组"})),!1);}}},addFriend:{to:Xt,source:{type:"String",required:!0,validator:function validator(e){return!!e&&(e.startsWith("AddSource_Type_")?!(e.replace("AddSource_Type_","").length>8)||(console.warn(Jt({api:"addFriend",desc:"加好友来源字段的关键字长度不得超过8字节"})),!1):(console.warn(Jt({api:"addFriend",desc:"加好友来源字段的前缀必须是:AddSource_Type_"})),!1));}},remark:{type:"String",required:!1,validator:function validator(e){return!(ze(e)&&e.length>96)||(console.warn(Jt({api:"updateFriend",desc:" 备注长度最长不得超过 96 个字节"})),!1);}}},deleteFriend:{userIDList:Qt},checkFriend:{userIDList:Qt},getFriendProfile:{userIDList:Qt},updateFriend:{userID:Xt,remark:{type:"String",required:!1,validator:function validator(e){return!(ze(e)&&e.length>96)||(console.warn(Jt({api:"updateFriend",desc:" 备注长度最长不得超过 96 个字节"})),!1);}},friendCustomField:{type:"Array",required:!1,validator:function validator(e){if(e){if(!Qe(e))return console.warn(Jt({api:"updateFriend",param:"friendCustomField",desc:"必须为数组"})),!1;var t=!0;return e.forEach(function(e){return ze(e.key)&&-1!==e.key.indexOf("Tag_SNS_Custom")?ze(e.value)?e.value.length>8?(console.warn(Jt({api:"updateFriend",desc:"好友自定义字段的关键字长度不得超过8字节"})),t=!1):void 0:(console.warn(Jt({api:"updateFriend",desc:"类型必须为 String"})),t=!1):(console.warn(Jt({api:"updateFriend",desc:"好友自定义字段的前缀必须是 Tag_SNS_Custom"})),t=!1);}),t;}return!0;}}},acceptFriendApplication:{userID:Xt},refuseFriendApplication:{userID:Xt},deleteFriendApplication:{userID:Xt},createFriendGroup:{name:Xt},deleteFriendGroup:{name:Xt},addToFriendGroup:{name:Xt,userIDList:Qt},removeFromFriendGroup:{name:Xt,userIDList:Qt},renameFriendGroup:{oldName:Xt,newName:Xt},sendMessageReadReceipt:[{name:"messageList",type:"Array",validator:function validator(e){return Qe(e)?0!==e.length||(console.warn(Jt({api:"sendMessageReadReceipt",param:"messageList",desc:"不能为空数组"})),!1):(console.warn(Jt({api:"sendMessageReadReceipt",param:"messageList",desc:"必须为数组"})),!1);}}],getMessageReadReceiptList:[{name:"messageList",type:"Array",validator:function validator(e){return Qe(e)?0!==e.length||(console.warn(Jt({api:"getMessageReadReceiptList",param:"messageList",desc:"不能为空数组"})),!1):(console.warn(Jt({api:"getMessageReadReceiptList",param:"messageList",desc:"必须为数组"})),!1);}}],createTopicInCommunity:{groupID:Xt,topicName:Xt},deleteTopicFromCommunity:{groupID:Xt,topicIDList:{type:"Array",validator:function validator(e){return!e||!!Qe(e)||(console.warn(Jt({api:"deleteTopicFromCommunity",param:"topicIDList",desc:"必须为数组"})),!1);}}},updateTopicProfile:{groupID:Xt,topicID:Xt},getTopicList:{groupID:Xt,topicIDList:{type:"Array",validator:function validator(e){return!e||!!Qe(e)||(console.warn(Jt({api:"getTopicList",param:"topicIDList",desc:"必须为数组"})),!1);}}}},oo={login:"login",logout:"logout",on:"on",once:"once",off:"off",setLogLevel:"setLogLevel",registerPlugin:"registerPlugin",destroy:"destroy",createTextMessage:"createTextMessage",createTextAtMessage:"createTextAtMessage",createImageMessage:"createImageMessage",createAudioMessage:"createAudioMessage",createVideoMessage:"createVideoMessage",createCustomMessage:"createCustomMessage",createFaceMessage:"createFaceMessage",createFileMessage:"createFileMessage",createLocationMessage:"createLocationMessage",createMergerMessage:"createMergerMessage",downloadMergerMessage:"downloadMergerMessage",createForwardMessage:"createForwardMessage",sendMessage:"sendMessage",resendMessage:"resendMessage",revokeMessage:"revokeMessage",deleteMessage:"deleteMessage",modifyMessage:"modifyMessage",sendMessageReadReceipt:"sendMessageReadReceipt",getGroupMessageReadMemberList:"getGroupMessageReadMemberList",getMessageReadReceiptList:"getMessageReadReceiptList",getMessageList:"getMessageList",findMessage:"findMessage",getMessageListHopping:"getMessageListHopping",setMessageRead:"setMessageRead",setAllMessageRead:"setAllMessageRead",getConversationList:"getConversationList",getConversationProfile:"getConversationProfile",deleteConversation:"deleteConversation",pinConversation:"pinConversation",setConversationCustomData:"setConversationCustomData",markConversation:"markConversation",createConversationGroup:"createConversationGroup",getConversationGroupList:"getConversationGroupList",deleteConversationGroup:"deleteConversationGroup",renameConversationGroup:"renameConversationGroup",addConversationsToGroup:"addConversationsToGroup",deleteConversationsFromGroup:"deleteConversationsFromGroup",getGroupList:"getGroupList",getGroupProfile:"getGroupProfile",createGroup:"createGroup",joinGroup:"joinGroup",updateGroupProfile:"updateGroupProfile",quitGroup:"quitGroup",dismissGroup:"dismissGroup",changeGroupOwner:"changeGroupOwner",searchGroupByID:"searchGroupByID",setMessageRemindType:"setMessageRemindType",handleGroupApplication:"handleGroupApplication",initGroupAttributes:"initGroupAttributes",setGroupAttributes:"setGroupAttributes",deleteGroupAttributes:"deleteGroupAttributes",getGroupAttributes:"getGroupAttributes",getJoinedCommunityList:"getJoinedCommunityList",createTopicInCommunity:"createTopicInCommunity",deleteTopicFromCommunity:"deleteTopicFromCommunity",updateTopicProfile:"updateTopicProfile",getTopicList:"getTopicList",getGroupMemberProfile:"getGroupMemberProfile",getGroupMemberList:"getGroupMemberList",addGroupMember:"addGroupMember",deleteGroupMember:"deleteGroupMember",setGroupMemberNameCard:"setGroupMemberNameCard",setGroupMemberMuteTime:"setGroupMemberMuteTime",setGroupMemberRole:"setGroupMemberRole",setGroupMemberCustomField:"setGroupMemberCustomField",getGroupOnlineMemberCount:"getGroupOnlineMemberCount",getMyProfile:"getMyProfile",getUserProfile:"getUserProfile",updateMyProfile:"updateMyProfile",setSelfStatus:"setSelfStatus",getUserStatus:"getUserStatus",subscribeUserStatus:"subscribeUserStatus",unsubscribeUserStatus:"unsubscribeUserStatus",getBlacklist:"getBlacklist",addToBlacklist:"addToBlacklist",removeFromBlacklist:"removeFromBlacklist",getFriendList:"getFriendList",addFriend:"addFriend",deleteFriend:"deleteFriend",checkFriend:"checkFriend",updateFriend:"updateFriend",getFriendProfile:"getFriendProfile",getFriendApplicationList:"getFriendApplicationList",refuseFriendApplication:"refuseFriendApplication",deleteFriendApplication:"deleteFriendApplication",acceptFriendApplication:"acceptFriendApplication",setFriendApplicationRead:"setFriendApplicationRead",getFriendGroupList:"getFriendGroupList",createFriendGroup:"createFriendGroup",renameFriendGroup:"renameFriendGroup",deleteFriendGroup:"deleteFriendGroup",addToFriendGroup:"addToFriendGroup",removeFromFriendGroup:"removeFromFriendGroup",callExperimentalAPI:"callExperimentalAPI"},no="sign",ao="message",so="user",ro="c2c",io="group",co="sns",uo="groupMember",lo="Topic",po="conversation",_o="context",go="storage",ho="eventStat",fo="netMonitor",mo="bigDataChannel",Mo="upload",vo="plugin",Io="syncUnreadMessage",yo="session",To="channel",Eo="message_loss_detection",Co="cloudControl",So="workerTimer",Do="pullGroupMessage",No="qualityStat",Ao="commercialConfig",Oo="offlinePush",Ro=function(){function e(t){n(this,e),this._moduleManager=t,this._className="";}return s(e,[{key:"isLoggedIn",value:function value(){return this._moduleManager.getModule(_o).isLoggedIn();}},{key:"isOversea",value:function value(){return this._moduleManager.getModule(_o).isOversea();}},{key:"isPrivateNetWork",value:function value(){return this._moduleManager.getModule(_o).isPrivateNetWork();}},{key:"getMyUserID",value:function value(){return this._moduleManager.getModule(_o).getUserID();}},{key:"getMyTinyID",value:function value(){return this._moduleManager.getModule(_o).getTinyID();}},{key:"getModule",value:function value(e){return this._moduleManager.getModule(e);}},{key:"getPlatform",value:function value(){return ae;}},{key:"getNetworkType",value:function value(){return this._moduleManager.getModule(fo).getNetworkType();}},{key:"probeNetwork",value:function value(e){return this._moduleManager.getModule(fo).probe(e);}},{key:"getCloudConfig",value:function value(e){return this._moduleManager.getModule(Co).getCloudConfig(e);}},{key:"emitOuterEvent",value:function value(e,t){this._moduleManager.getOuterEmitterInstance().emit(e,t);}},{key:"emitInnerEvent",value:function value(e,t){this._moduleManager.getInnerEmitterInstance().emit(e,t);}},{key:"getInnerEmitterInstance",value:function value(){return this._moduleManager.getInnerEmitterInstance();}},{key:"generateTjgID",value:function value(e){return this._moduleManager.getModule(_o).getTinyID()+"-"+e.random;}},{key:"filterModifiedMessage",value:function value(e){if(!Kt(e)){var t=e.filter(function(e){return!0===e.isModified;});t.length>0&&this.emitOuterEvent(S.MESSAGE_MODIFIED,t);}}},{key:"filterUnmodifiedMessage",value:function value(e){return Kt(e)?[]:e.filter(function(e){return!1===e.isModified;});}},{key:"request",value:function value(e){return this._moduleManager.getModule(yo).request(e);}},{key:"canIUse",value:function value(e){return this._moduleManager.getModule(Ao).canIUse(e);}}]),e;}(),Lo="wslogin",ko="wslogout",Go="wshello",Po="KickOther",Uo="getmsg",bo="authkey",wo="sendmsg",Fo="send_group_msg",qo="portrait_get_all",Vo="portrait_set",Bo="black_list_get",Ko="black_list_add",Ho="black_list_delete",xo="msgwithdraw",Wo="msgreaded",Yo="set_c2c_peer_mute_notifications",jo="get_c2c_peer_mute_notifications",$o="getroammsg",zo="get_peer_read_time",Jo="delete_c2c_msg_ramble",Xo="modify_c2c_msg",Qo="page_get",Zo="get",en="delete",tn="top",on="deletemsg",nn="set_conv_custom_data",an="mark_contact",sn="create_contact_group",rn="del_contact_group",cn="update_contact_group",un="add_conv_to_group",ln="del_conv_from_group",dn="get_contact_group",pn="get_joined_group_list",_n="get_group_self_member_info",gn="create_group",hn="destroy_group",fn="modify_group_base_info",mn="apply_join_group",Mn="apply_join_group_noauth",vn="quit_group",In="get_group_public_info",yn="change_group_owner",Tn="handle_apply_join_group",En="handle_invite_join_group",Cn="group_msg_recall",Sn="msg_read_report",Dn="read_all_unread_msg",Nn="group_msg_get",An="get_group_msg_receipt",On="group_msg_receipt",Rn="c2c_msg_read_receipt",Ln="get_group_msg_receipt_detail",kn="get_pendency",Gn="deletemsg",Pn="get_msg",Un="get_msg_noauth",bn="get_online_member_num",wn="delete_group_ramble_msg_by_seq",Fn="modify_group_msg",qn="set_group_attr",Vn="modify_group_attr",Bn="delete_group_attr",Kn="clear_group_attr",Hn="get_group_attr",xn="get_group_member_info",Wn="get_members",Yn="get_specified_group_member_info",jn="add_group_member",$n="delete_group_member",zn="ban_group_member",Jn="modify_group_member_info",Xn="cos",Qn="pre_sig",Zn="video_cover",ea="tim_web_report_v2",ta="alive",oa="msg_push",na="multi_msg_push_ws",aa="ws_msg_push_ack",sa="stat_forceoffline",ra="save_relay_json_msg",ia="get_relay_json_msg",ca="fetch_config",ua="push_configv2",la="fetch_imsdk_purchase_bitsv2",da="push_imsdk_purchase_bitsv2",pa="notify2",_a="create_topic",ga="destroy_topic",ha="modify_topic",fa="get_topic",ma="ws_set_custom_status",Ma="ws_get_user_status",va="ws_status_subscribe",Ia="ws_status_unsubscribe",ya="ws_stat_background",Ta="ws_stat_foreground",Ea="ws_stat_settoken",Ca={NO_SDKAPPID:2e3,NO_ACCOUNT_TYPE:2001,NO_IDENTIFIER:2002,NO_USERSIG:2003,NO_TINYID:2022,NO_A2KEY:2023,USER_NOT_LOGGED_IN:2024,REPEAT_LOGIN:2025,COS_UNDETECTED:2040,COS_GET_SIG_FAIL:2041,MESSAGE_SEND_FAIL:2100,MESSAGE_LIST_CONSTRUCTOR_NEED_OPTIONS:2103,MESSAGE_SEND_NEED_MESSAGE_INSTANCE:2105,MESSAGE_SEND_INVALID_CONVERSATION_TYPE:2106,MESSAGE_FILE_IS_EMPTY:2108,MESSAGE_ONPROGRESS_FUNCTION_ERROR:2109,MESSAGE_REVOKE_FAIL:2110,MESSAGE_DELETE_FAIL:2111,MESSAGE_UNREAD_ALL_FAIL:2112,MESSAGE_CONTROL_INFO_FAIL:2113,READ_RECEIPT_MESSAGE_LIST_EMPTY:2114,MESSAGE_SEND_GROUP_WITH_TOPIC_FAIL:2115,CANNOT_DELETE_GROUP_SYSTEM_NOTICE:2116,MESSAGE_IMAGE_SELECT_FILE_FIRST:2251,MESSAGE_IMAGE_TYPES_LIMIT:2252,MESSAGE_IMAGE_SIZE_LIMIT:2253,MESSAGE_AUDIO_UPLOAD_FAIL:2300,MESSAGE_AUDIO_SIZE_LIMIT:2301,MESSAGE_VIDEO_UPLOAD_FAIL:2350,MESSAGE_VIDEO_SIZE_LIMIT:2351,MESSAGE_VIDEO_TYPES_LIMIT:2352,MESSAGE_FILE_UPLOAD_FAIL:2400,MESSAGE_FILE_SELECT_FILE_FIRST:2401,MESSAGE_FILE_SIZE_LIMIT:2402,MESSAGE_FILE_URL_IS_EMPTY:2403,MESSAGE_MERGER_TYPE_INVALID:2450,MESSAGE_MERGER_KEY_INVALID:2451,MESSAGE_MERGER_DOWNLOAD_FAIL:2452,MESSAGE_FORWARD_TYPE_INVALID:2453,MESSAGE_MODIFY_CONFLICT:2480,MESSAGE_MODIFY_DISABLED_IN_AVCHATROOM:2481,CONVERSATION_NOT_FOUND:2500,USER_OR_GROUP_NOT_FOUND:2501,CONVERSATION_UN_RECORDED_TYPE:2502,INVALID_CONVERSATION_ID:2503,ILLEGAL_GROUP_TYPE:2600,CANNOT_JOIN_WORK:2601,ILLEGAL_GROUP_ID:2602,CANNOT_FIND_GROUP:2603,CANNOT_CHANGE_OWNER_IN_AVCHATROOM:2620,CANNOT_CHANGE_OWNER_TO_SELF:2621,CANNOT_DISMISS_Work:2622,MEMBER_NOT_IN_GROUP:2623,CANNOT_USE_GRP_ATTR_NOT_AVCHATROOM:2641,CANNOT_USE_GRP_ATTR_AVCHATROOM_UNJOIN:2642,JOIN_GROUP_FAIL:2660,CANNOT_ADD_MEMBER_IN_AVCHATROOM:2661,CANNOT_JOIN_NON_AVCHATROOM_WITHOUT_LOGIN:2662,CANNOT_KICK_MEMBER_IN_AVCHATROOM:2680,NOT_OWNER:2681,CANNOT_SET_MEMBER_ROLE_IN_WORK_AND_AVCHATROOM:2682,INVALID_MEMBER_ROLE:2683,CANNOT_SET_SELF_MEMBER_ROLE:2684,CANNOT_MUTE_SELF:2685,BAN_DURATION_INVALID:2686,NOT_MY_FRIEND:2700,ALREADY_MY_FRIEND:2701,FRIEND_GROUP_EXISTED:2710,FRIEND_GROUP_NOT_EXIST:2711,FRIEND_APPLICATION_NOT_EXIST:2716,UPDATE_PROFILE_INVALID_PARAM:2721,UPDATE_PROFILE_NO_KEY:2722,ADD_BLACKLIST_INVALID_PARAM:2740,DEL_BLACKLIST_INVALID_PARAM:2741,CANNOT_ADD_SELF_TO_BLACKLIST:2742,ADD_FRIEND_INVALID_PARAM:2760,NETWORK_ERROR:2800,NETWORK_TIMEOUT:2801,NETWORK_BASE_OPTIONS_NO_URL:2802,NETWORK_UNDEFINED_SERVER_NAME:2803,NETWORK_PACKAGE_UNDEFINED:2804,NO_NETWORK:2805,CONVERTOR_IRREGULAR_PARAMS:2900,NOTICE_RUNLOOP_UNEXPECTED_CONDITION:2901,NOTICE_RUNLOOP_OFFSET_LOST:2902,UNCAUGHT_ERROR:2903,GET_LONGPOLL_ID_FAILED:2904,INVALID_OPERATION:2905,OVER_FREQUENCY_LIMIT:2996,CANNOT_FIND_PROTOCOL:2997,CANNOT_FIND_MODULE:2998,SDK_IS_NOT_READY:2999,LOGGING_IN:3e3,LOGIN_FAILED:3001,KICKED_OUT_MULT_DEVICE:3002,KICKED_OUT_MULT_ACCOUNT:3003,KICKED_OUT_USERSIG_EXPIRED:3004,LOGGED_OUT:3005,KICKED_OUT_REST_API:3006,ILLEGAL_TOPIC_ID:3021,CANNOT_USE_COMMERCIAL_ABILITY:3122,LONG_POLL_KICK_OUT:91101,MESSAGE_A2KEY_EXPIRED:20002,ACCOUNT_A2KEY_EXPIRED:70001,LONG_POLL_API_PARAM_ERROR:90001,HELLO_ANSWER_KICKED_OUT:1002,OPEN_SERVICE_OVERLOAD_ERROR:60022},Sa={NO_SDKAPPID:"无 SDKAppID",NO_ACCOUNT_TYPE:"无 accountType",NO_IDENTIFIER:"无 userID",NO_USERSIG:"无 userSig",NO_TINYID:"无 tinyID",NO_A2KEY:"无 a2key",USER_NOT_LOGGED_IN:"用户未登录",REPEAT_LOGIN:"重复登录",COS_UNDETECTED:"未检测到 COS 上传插件",COS_GET_SIG_FAIL:"获取 COS 预签名 URL 失败",MESSAGE_SEND_FAIL:"消息发送失败",MESSAGE_LIST_CONSTRUCTOR_NEED_OPTIONS:"MessageController.constructor() 需要参数 options",MESSAGE_SEND_NEED_MESSAGE_INSTANCE:"需要 Message 的实例",MESSAGE_SEND_INVALID_CONVERSATION_TYPE:'Message.conversationType 只能为 "C2C" 或 "GROUP"',MESSAGE_FILE_IS_EMPTY:"无法发送空文件",MESSAGE_ONPROGRESS_FUNCTION_ERROR:"回调函数运行时遇到错误,请检查接入侧代码",MESSAGE_REVOKE_FAIL:"消息撤回失败",MESSAGE_DELETE_FAIL:"消息删除失败",MESSAGE_UNREAD_ALL_FAIL:"设置所有未读消息为已读处理失败",MESSAGE_CONTROL_INFO_FAIL:"社群不支持消息发送控制选项",READ_RECEIPT_MESSAGE_LIST_EMPTY:"消息列表中没有需要发送已读回执的消息",MESSAGE_SEND_GROUP_WITH_TOPIC_FAIL:"不能在支持话题的群组中发消息,请检查群组 isSupportTopic 属性",CANNOT_DELETE_GROUP_SYSTEM_NOTICE:"不支持删除群系统通知",MESSAGE_IMAGE_SELECT_FILE_FIRST:"请先选择一个图片",MESSAGE_IMAGE_TYPES_LIMIT:"只允许上传 jpg png jpeg gif bmp image webp 格式的图片",MESSAGE_IMAGE_SIZE_LIMIT:"图片大小超过20M,无法发送",MESSAGE_AUDIO_UPLOAD_FAIL:"语音上传失败",MESSAGE_AUDIO_SIZE_LIMIT:"语音大小大于20M,无法发送",MESSAGE_VIDEO_UPLOAD_FAIL:"视频上传失败",MESSAGE_VIDEO_SIZE_LIMIT:"视频大小超过100M,无法发送",MESSAGE_VIDEO_TYPES_LIMIT:"只允许上传 mp4 格式的视频",MESSAGE_FILE_UPLOAD_FAIL:"文件上传失败",MESSAGE_FILE_SELECT_FILE_FIRST:"请先选择一个文件",MESSAGE_FILE_SIZE_LIMIT:"文件大小超过100M,无法发送 ",MESSAGE_FILE_URL_IS_EMPTY:"缺少必要的参数文件 URL",MESSAGE_MERGER_TYPE_INVALID:"非合并消息",MESSAGE_MERGER_KEY_INVALID:"合并消息的 messageKey 无效",MESSAGE_MERGER_DOWNLOAD_FAIL:"下载合并消息失败",MESSAGE_FORWARD_TYPE_INVALID:"选择的消息类型(如群提示消息)不可以转发",MESSAGE_MODIFY_CONFLICT:"修改消息时发生冲突",MESSAGE_MODIFY_DISABLED_IN_AVCHATROOM:"直播群不支持修改消息",CONVERSATION_NOT_FOUND:"没有找到相应的会话,请检查传入参数",USER_OR_GROUP_NOT_FOUND:"没有找到相应的用户或群组,请检查传入参数",CONVERSATION_UN_RECORDED_TYPE:"未记录的会话类型",INVALID_CONVERSATION_ID:"无效的会话 ID",ILLEGAL_GROUP_TYPE:"非法的群类型,请检查传入参数",CANNOT_JOIN_WORK:"不能加入 Work 类型的群组",ILLEGAL_GROUP_ID:"群组 ID 非法,非 Community 类型群组不能以 @TGS#_ 为前缀,Community 类型群组必须以 @TGS#_ 为前缀且不能包含 @TOPIC#_ 字符串",CANNOT_FIND_GROUP:"找不到指定 ID 的群组",CANNOT_CHANGE_OWNER_IN_AVCHATROOM:"AVChatRoom 类型的群组不能转让群主",CANNOT_CHANGE_OWNER_TO_SELF:"不能把群主转让给自己",CANNOT_DISMISS_WORK:"不能解散 Work 类型的群组",MEMBER_NOT_IN_GROUP:"用户不在该群组内",JOIN_GROUP_FAIL:"加群失败,请检查传入参数或重试",CANNOT_ADD_MEMBER_IN_AVCHATROOM:"AVChatRoom 类型的群不支持邀请群成员",CANNOT_JOIN_NON_AVCHATROOM_WITHOUT_LOGIN:"非 AVChatRoom 类型的群组不允许匿名加群,请先登录后再加群",CANNOT_KICK_MEMBER_IN_AVCHATROOM:"不能在 AVChatRoom 类型的群组踢人",NOT_OWNER:"你不是群主,只有群主才有权限操作",CANNOT_SET_MEMBER_ROLE_IN_WORK_AND_AVCHATROOM:"不能在 Work / AVChatRoom 类型的群中设置群成员身份",INVALID_MEMBER_ROLE:"不合法的群成员身份,请检查传入参数",CANNOT_SET_SELF_MEMBER_ROLE:"不能设置自己的群成员身份,请检查传入参数",CANNOT_MUTE_SELF:"不能将自己禁言,请检查传入参数",BAN_DURATION_INVALID:"封禁时长无效,必须传入 duration 参数且要大于 0",NOT_MY_FRIEND:"非好友关系",ALREADY_MY_FRIEND:"已经是好友关系",FRIEND_GROUP_EXISTED:"好友分组已存在",FRIEND_GROUP_NOT_EXIST:"好友分组不存在",FRIEND_APPLICATION_NOT_EXIST:"好友申请不存在",UPDATE_PROFILE_INVALID_PARAM:"传入 updateMyProfile 接口的参数无效",UPDATE_PROFILE_NO_KEY:"updateMyProfile 无标配资料字段或自定义资料字段",ADD_BLACKLIST_INVALID_PARAM:"传入 addToBlacklist 接口的参数无效",DEL_BLACKLIST_INVALID_PARAM:"传入 removeFromBlacklist 接口的参数无效",CANNOT_ADD_SELF_TO_BLACKLIST:"不能拉黑自己",ADD_FRIEND_INVALID_PARAM:"传入 addFriend 接口的参数无效",NETWORK_ERROR:"网络错误",NETWORK_TIMEOUT:"请求超时",NETWORK_BASE_OPTIONS_NO_URL:"网络层初始化错误,缺少 URL 参数",NETWORK_UNDEFINED_SERVER_NAME:"打包错误,未定义的 serverName",NETWORK_PACKAGE_UNDEFINED:"未定义的 packageConfig",NO_NETWORK:"未连接到网络",CONVERTOR_IRREGULAR_PARAMS:"不规范的参数名称",NOTICE_RUNLOOP_UNEXPECTED_CONDITION:"意料外的通知条件",NOTICE_RUNLOOP_OFFSET_LOST:"_syncOffset 丢失",GET_LONGPOLL_ID_FAILED:"获取 longpolling id 失败",UNCAUGHT_ERROR:"未经明确定义的错误",INVALID_OPERATION:"无效操作,如调用了未定义或者未实现的方法等",CANNOT_FIND_PROTOCOL:"无法找到协议",CANNOT_FIND_MODULE:"无法找到模块,请参考:https://web.sdk.qcloud.com/im/doc/zh-cn/tutorial-03-sns.html",SDK_IS_NOT_READY:"接口需要 SDK 处于 ready 状态后才能调用",LOGGING_IN:"用户正在登录中",LOGIN_FAILED:"用户登录失败",KICKED_OUT_MULT_DEVICE:"用户多终端登录被踢出",KICKED_OUT_MULT_ACCOUNT:"用户多实例登录被踢出",KICKED_OUT_USERSIG_EXPIRED:"用户 userSig 过期被踢出",LOGGED_OUT:"用户已登出",KICKED_OUT_REST_API:"用户被 REST API - kick 接口: https://cloud.tencent.com/document/product/269/3853 踢出",OVER_FREQUENCY_LIMIT:"超出 SDK 频率控制",LONG_POLL_KICK_OUT:"检测到多个 web 实例登录,消息通道下线",OPEN_SERVICE_OVERLOAD_ERROR:"后台服务正忙,请稍后再试",MESSAGE_A2KEY_EXPIRED:"消息错误码:UserSig 或 A2 失效。",ACCOUNT_A2KEY_EXPIRED:"帐号错误码:UserSig 已过期,请重新生成。建议 UserSig 有效期设置不小于24小时。",LONG_POLL_API_PARAM_ERROR:"longPoll API parameters error",ILLEGAL_TOPIC_ID:"topicID 非法",CANNOT_USE_COMMERCIAL_ABILITY:"套餐包不支持该接口的使用,请升级到旗舰版套餐"},Da="networkRTT",Na="messageE2EDelay",Aa="sendMessageC2C",Oa="sendMessageGroup",Ra="sendMessageGroupAV",La="sendMessageRichMedia",ka="cosUpload",Ga="messageReceivedGroup",Pa="messageReceivedGroupAVPush",Ua="messageReceivedGroupAVPull",ba=(r(Wt={},Da,2),r(Wt,Na,3),r(Wt,Aa,4),r(Wt,Oa,5),r(Wt,Ra,6),r(Wt,La,7),r(Wt,Ga,8),r(Wt,Pa,9),r(Wt,Ua,10),r(Wt,ka,11),Wt),wa={info:4,warning:5,error:6},Fa={wifi:1,"2g":2,"3g":3,"4g":4,"5g":5,unknown:6,none:7,online:8},qa={login:4},Va=function(){function e(t){n(this,e),this.eventType=qa[t]||0,this.timestamp=0,this.networkType=8,this.code=0,this.message="",this.moreMessage="",this.extension=t,this.costTime=0,this.duplicate=!1,this.level=4,this.uiPlatform=void 0,this._sentFlag=!1,this._startts=Re();}return s(e,[{key:"updateTimeStamp",value:function value(){this.timestamp=Re();}},{key:"start",value:function value(e){return this._startts=e,this;}},{key:"end",value:function value(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this._sentFlag){var o=Re();0===this.costTime&&(this.costTime=o-this._startts),this.setMoreMessage("startts:".concat(this._startts," endts:").concat(o)),t?(this._sentFlag=!0,this._eventStatModule&&this._eventStatModule.pushIn(this)):setTimeout(function(){e._sentFlag=!0,e._eventStatModule&&e._eventStatModule.pushIn(e);},0);}}},{key:"setError",value:function value(e,t,o){return e instanceof Error?(this._sentFlag||(this.setNetworkType(o),t?(e.code&&this.setCode(e.code),e.message&&this.setMoreMessage(e.message)):(this.setCode(Ca.NO_NETWORK),this.setMoreMessage(Sa.NO_NETWORK)),this.setLevel("error")),this):(be.warn("SSOLogData.setError value not instanceof Error, please check!"),this);}},{key:"setCode",value:function value(e){return Ze(e)||this._sentFlag||("ECONNABORTED"===e&&(this.code=103),$e(e)?this.code=e:be.warn("SSOLogData.setCode value not a number, please check!",e,o(e))),this;}},{key:"setMessage",value:function value(e){return Ze(e)||this._sentFlag||($e(e)&&(this.message=e.toString()),ze(e)&&(this.message=e)),this;}},{key:"setCostTime",value:function value(e){return this.costTime=e,this;}},{key:"setLevel",value:function value(e){return Ze(e)||this._sentFlag||(this.level=wa[e]),this;}},{key:"setMoreMessage",value:function value(e){return Kt(this.moreMessage)?this.moreMessage="".concat(e):this.moreMessage+=" ".concat(e),this;}},{key:"setNetworkType",value:function value(e){if(Ze(e))be.warn("SSOLogData.setNetworkType value is undefined, please check!");else{var t=Fa[e.toLowerCase()];Ze(t)||(this.networkType=t);}return this;}},{key:"getStartTs",value:function value(){return this._startts;}},{key:"setUIPlatform",value:function value(e){this.uiPlatform=e;}}],[{key:"bindEventStatModule",value:function value(t){e.prototype._eventStatModule=t;}}]),e;}(),Ba={SDK_CONSTRUCT:"sdkConstruct",SDK_READY:"sdkReady",LOGIN:"login",LOGOUT:"logout",KICKED_OUT:"kickedOut",REGISTER_PLUGIN:"registerPlugin",KICK_OTHER:"kickOther",WS_CONNECT:"wsConnect",WS_ON_OPEN:"wsOnOpen",WS_ON_CLOSE:"wsOnClose",WS_ON_ERROR:"wsOnError",NETWORK_CHANGE:"networkChange",GET_COS_AUTH_KEY:"getCosAuthKey",GET_COS_PRE_SIG_URL:"getCosPreSigUrl",GET_SNAPSHOT_INFO:"getSnapshotInfo",UPLOAD:"upload",SEND_MESSAGE:"sendMessage",SEND_MESSAGE_WITH_RECEIPT:"sendMessageWithReceipt",SEND_COMBO_MESSAGE:"sendComboMessage",GET_C2C_ROAMING_MESSAGES:"getC2CRoamingMessages",GET_GROUP_ROAMING_MESSAGES:"getGroupRoamingMessages",GET_C2C_ROAMING_MESSAGES_HOPPING:"getC2CRoamingMessagesHopping",GET_GROUP_ROAMING_MESSAGES_HOPPING:"getGroupRoamingMessagesHopping",GET_READ_RECEIPT:"getReadReceipt",GET_READ_RECEIPT_DETAIL:"getReadReceiptDetail",SEND_READ_RECEIPT:"sendReadReceipt",SEND_C2C_READ_RECEIPT:"sendC2CReadReceipt",REVOKE_MESSAGE:"revokeMessage",DELETE_MESSAGE:"deleteMessage",EDIT_MESSAGE:"modifyMessage",SET_C2C_MESSAGE_READ:"setC2CMessageRead",SET_GROUP_MESSAGE_READ:"setGroupMessageRead",EMPTY_MESSAGE_BODY:"emptyMessageBody",GET_PEER_READ_TIME:"getPeerReadTime",UPLOAD_MERGER_MESSAGE:"uploadMergerMessage",DOWNLOAD_MERGER_MESSAGE:"downloadMergerMessage",JSON_PARSE_ERROR:"jsonParseError",MESSAGE_E2E_DELAY_EXCEPTION:"messageE2EDelayException",GET_CONVERSATION_LIST:"getConversationList",GET_CONVERSATION_PROFILE:"getConversationProfile",DELETE_CONVERSATION:"deleteConversation",PIN_CONVERSATION:"pinConversation",GET_CONVERSATION_LIST_IN_STORAGE:"getConversationListInStorage",SYNC_CONVERSATION_LIST:"syncConversationList",SET_ALL_MESSAGE_READ:"setAllMessageRead",SET_CONV_CUSTOM_DATA:"setConvCustomData",MARK_CONVERSATION:"markConversation",GET_REMOTE_CONV_GROUP_LIST:"getRemoteConvGroupList",CREATE_CONV_GROUP:"createConvGroup",DELETE_CONV_GROUP:"deleteConvGroup",RENAME_CONV_GROUP:"renameConvGroup",ADD_CONVS_TO_GROUP:"addConvsToGroup",DELETE_CONVS_FROM_GROUP:"deleteConvsFromGroup",CREATE_GROUP:"createGroup",APPLY_JOIN_GROUP:"applyJoinGroup",QUIT_GROUP:"quitGroup",SEARCH_GROUP_BY_ID:"searchGroupByID",CHANGE_GROUP_OWNER:"changeGroupOwner",HANDLE_GROUP_APPLICATION:"handleGroupApplication",HANDLE_GROUP_INVITATION:"handleGroupInvitation",SET_MESSAGE_REMIND_TYPE:"setMessageRemindType",DISMISS_GROUP:"dismissGroup",UPDATE_GROUP_PROFILE:"updateGroupProfile",GET_GROUP_LIST:"getGroupList",GET_GROUP_PROFILE:"getGroupProfile",GET_GROUP_LIST_IN_STORAGE:"getGroupListInStorage",GET_GROUP_LAST_SEQUENCE:"getGroupLastSequence",GET_GROUP_MISSING_MESSAGE:"getGroupMissingMessage",PAGING_GET_GROUP_LIST:"pagingGetGroupList",PAGING_GET_GROUP_LIST_WITH_TOPIC:"pagingGetGroupListWithTopic",GET_GROUP_SIMPLIFIED_INFO:"getGroupSimplifiedInfo",JOIN_WITHOUT_AUTH:"joinWithoutAuth",INIT_GROUP_ATTRIBUTES:"initGroupAttributes",SET_GROUP_ATTRIBUTES:"setGroupAttributes",DELETE_GROUP_ATTRIBUTES:"deleteGroupAttributes",GET_GROUP_ATTRIBUTES:"getGroupAttributes",GET_GROUP_MEMBER_LIST:"getGroupMemberList",GET_AVCHATROOM_MEMBER_LIST:"getAVChatRoomMemberList",GET_GROUP_MEMBER_PROFILE:"getGroupMemberProfile",ADD_GROUP_MEMBER:"addGroupMember",DELETE_GROUP_MEMBER:"deleteGroupMember",BAN_AVCHATROOM_MEMBER:"banAVChatRoomMember",SET_GROUP_MEMBER_MUTE_TIME:"setGroupMemberMuteTime",SET_GROUP_MEMBER_NAME_CARD:"setGroupMemberNameCard",SET_GROUP_MEMBER_ROLE:"setGroupMemberRole",SET_GROUP_MEMBER_CUSTOM_FIELD:"setGroupMemberCustomField",GET_GROUP_ONLINE_MEMBER_COUNT:"getGroupOnlineMemberCount",SYNC_MESSAGE:"syncMessage",LONG_POLLING_AV_ERROR:"longPollingAVError",MESSAGE_LOSS:"messageLoss",MESSAGE_STACKED:"messageStacked",GET_USER_PROFILE:"getUserProfile",UPDATE_MY_PROFILE:"updateMyProfile",GET_BLACKLIST:"getBlacklist",ADD_TO_BLACKLIST:"addToBlacklist",REMOVE_FROM_BLACKLIST:"removeFromBlacklist",SET_SELF_STATUS:"ws_set_custom_status",GET_USER_STATUS:"ws_get_user_status",SUBSCRIBE_USER_STATUS:"ws_status_subscribe",UNSUBSCRIBE_USER_STATUS:"ws_status_unsubscribe",ADD_FRIEND:"addFriend",CHECK_FRIEND:"checkFriend",DELETE_FRIEND:"removeFromFriendList",GET_FRIEND_PROFILE:"getFriendProfile",GET_FRIEND_LIST:"getFriendList",UPDATE_FRIEND:"updateFriend",GET_FRIEND_APPLICATION_LIST:"getFriendApplicationList",DELETE_FRIEND_APPLICATION:"deleteFriendApplication",ACCEPT_FRIEND_APPLICATION:"acceptFriendApplication",REFUSE_FRIEND_APPLICATION:"refuseFriendApplication",SET_FRIEND_APPLICATION_READ:"setFriendApplicationRead",CREATE_FRIEND_GROUP:"createFriendGroup",DELETE_FRIEND_GROUP:"deleteFriendGroup",RENAME_FRIEND_GROUP:"renameFriendGroup",ADD_TO_FRIEND_GROUP:"addToFriendGroup",REMOVE_FROM_FRIEND_GROUP:"removeFromFriendGroup",GET_FRIEND_GROUP_LIST:"getFriendGroupList",CREATE_TOPIC:"createTopic",DELETE_TOPIC:"deleteTopic",UPDATE_TOPIC_PROFILE:"updateTopicProfile",GET_TOPIC_LIST:"getTopicList",RELAY_GET_TOPIC_LIST:"relayGetTopicList",GET_TOPIC_LAST_SEQUENCE:"getTopicLastSequence",GET_DEVICE_TOKEN:"getDeviceToken",OFFLINE_PUSH_SET_TOKEN:"offlinePushSetToken",MP_HIDE_TO_SHOW:"mpHideToShow",CALLBACK_FUNCTION_ERROR:"callbackFunctionError",FETCH_CLOUD_CONTROL_CONFIG:"fetchCloudControlConfig",PUSHED_CLOUD_CONTROL_CONFIG:"pushedCloudControlConfig",FETCH_COMMERCIAL_CONFIG:"fetchCommercialConfig",PUSHED_COMMERCIAL_CONFIG:"pushedCommercialConfig",ERROR:"error",LAST_MESSAGE_NOT_EXIST:"lastMessageNotExist"},Ka=function(){function e(t){n(this,e),this.type=D.MSG_TEXT,this.content={text:t.text||""};}return s(e,[{key:"setText",value:function value(e){this.content.text=e;}},{key:"sendable",value:function value(){return 0!==this.content.text.length;}}]),e;}(),Ha=function(){function e(t){n(this,e),this._imageMemoryURL="",te?this.createImageDataASURLInWXMiniApp(t.file):this.createImageDataASURLInWeb(t.file),this._initImageInfoModel(),this.type=D.MSG_IMAGE,this._percent=0,this.content={imageFormat:t.imageFormat||we.UNKNOWN,uuid:t.uuid,imageInfoArray:[]},this.initImageInfoArray(t.imageInfoArray),this._defaultImage="http://imgcache.qq.com/open/qcloud/video/act/webim-images/default.jpg",this._autoFixUrl();}return s(e,[{key:"_initImageInfoModel",value:function value(){var e=this;this._ImageInfoModel=function(t){this.instanceID=dt(9999999),this.sizeType=t.type||0,this.type=0,this.size=t.size||0,this.width=t.width||0,this.height=t.height||0,this.imageUrl=t.url||"",this.url=t.url||e._imageMemoryURL||e._defaultImage;},this._ImageInfoModel.prototype={setSizeType:function setSizeType(e){this.sizeType=e;},setType:function setType(e){this.type=e;},setImageUrl:function setImageUrl(e){e&&(this.imageUrl=e);},getImageUrl:function getImageUrl(){return this.imageUrl;}};}},{key:"initImageInfoArray",value:function value(e){for(var t=0,o=null,n=null;t<=2;){n=Ze(e)||Ze(e[t])?{type:0,size:0,width:0,height:0,url:""}:e[t],(o=new this._ImageInfoModel(n)).setSizeType(t+1),o.setType(t),this.addImageInfo(o),t++;}this.updateAccessSideImageInfoArray();}},{key:"updateImageInfoArray",value:function value(e){for(var t,o=this.content.imageInfoArray.length,n=0;n<o;n++){t=this.content.imageInfoArray[n],e[n].size&&(t.size=e[n].size),e[n].url&&t.setImageUrl(e[n].url),e[n].width&&(t.width=e[n].width),e[n].height&&(t.height=e[n].height);}}},{key:"_autoFixUrl",value:function value(){for(var e=this.content.imageInfoArray.length,t="",o="",n=["http","https"],a=null,s=0;s<e;s++){this.content.imageInfoArray[s].url&&""!==(a=this.content.imageInfoArray[s]).imageUrl&&(o=a.imageUrl.slice(0,a.imageUrl.indexOf("://")+1),t=a.imageUrl.slice(a.imageUrl.indexOf("://")+1),n.indexOf(o)<0&&(o="https:"),this.content.imageInfoArray[s].setImageUrl([o,t].join("")));}}},{key:"updatePercent",value:function value(e){this._percent=e,this._percent>1&&(this._percent=1);}},{key:"updateImageFormat",value:function value(e){this.content.imageFormat=we[e.toUpperCase()]||we.UNKNOWN;}},{key:"createImageDataASURLInWeb",value:function value(e){void 0!==e&&e.files.length>0&&(this._imageMemoryURL=window.URL.createObjectURL(e.files[0]));}},{key:"createImageDataASURLInWXMiniApp",value:function value(e){e&&e.url&&(this._imageMemoryURL=e.url);}},{key:"replaceImageInfo",value:function value(e,t){this.content.imageInfoArray[t]instanceof this._ImageInfoModel||(this.content.imageInfoArray[t]=e);}},{key:"addImageInfo",value:function value(e){this.content.imageInfoArray.length>=3||this.content.imageInfoArray.push(e);}},{key:"updateAccessSideImageInfoArray",value:function value(){var e=this.content.imageInfoArray,t=e[0],o=t.width,n=void 0===o?0:o,a=t.height,s=void 0===a?0:a;0!==n&&0!==s&&(kt(e),Object.assign(e[2],Lt({originWidth:n,originHeight:s,min:720})));}},{key:"sendable",value:function value(){return 0!==this.content.imageInfoArray.length&&""!==this.content.imageInfoArray[0].imageUrl&&0!==this.content.imageInfoArray[0].size;}}]),e;}(),xa=function(){function e(t){n(this,e),this.type=D.MSG_FACE,this.content=t||null;}return s(e,[{key:"sendable",value:function value(){return null!==this.content;}}]),e;}(),Wa=function(){function e(t){n(this,e),this.type=D.MSG_AUDIO,this._percent=0,this.content={downloadFlag:2,second:t.second,size:t.size,url:t.url,remoteAudioUrl:t.url||"",uuid:t.uuid};}return s(e,[{key:"updatePercent",value:function value(e){this._percent=e,this._percent>1&&(this._percent=1);}},{key:"updateAudioUrl",value:function value(e){this.content.remoteAudioUrl=e;}},{key:"sendable",value:function value(){return""!==this.content.remoteAudioUrl;}}]),e;}(),Ya={from:!0,groupID:!0,groupName:!0,to:!0},ja=function(){function e(t){n(this,e),this.type=D.MSG_GRP_TIP,this.content={},this._initContent(t);}return s(e,[{key:"_initContent",value:function value(e){var t=this;Object.keys(e).forEach(function(o){switch(o){case"remarkInfo":break;case"groupProfile":t.content.groupProfile={},t._initGroupProfile(e[o]);break;case"operatorInfo":break;case"memberInfoList":case"msgMemberInfo":t._updateMemberList(e[o]);break;case"memberExtraInfo":case"onlineMemberInfo":break;case"memberNum":t.content[o]=e[o],t.content.memberCount=e[o];break;case"newGroupProfile":t.content.newGroupProfile={},t._initNewGroupProfile(e[o]);break;default:t.content[o]=e[o];}}),this.content.userIDList||(this.content.userIDList=[this.content.operatorID]);}},{key:"_initGroupProfile",value:function value(e){for(var t=Object.keys(e),o=0;o<t.length;o++){var n=t[o];Ya[n]&&(this.content.groupProfile[n]=e[n]);}}},{key:"_updateMemberList",value:function value(e){Kt(this.content.memberList)?this.content.memberList=e:this.content.memberList.forEach(function(t){e.forEach(function(e){t.userID===e.userID&&Object.assign(t,e);});});}},{key:"_initNewGroupProfile",value:function value(e){for(var t=Object.keys(e),o=0;o<t.length;o++){var n=t[o];"muteAllMembers"!==n?this.content.newGroupProfile[n]=e[n]:this.content.newGroupProfile[n]=1===e[n];}}}]),e;}(),$a={from:!0,groupID:!0,groupName:!0,to:!0},za=function(){function e(t){n(this,e),this.type=D.MSG_GRP_SYS_NOTICE,this.content={},this._initContent(t);}return s(e,[{key:"_initContent",value:function value(e){var t=this;Object.keys(e).forEach(function(o){switch(o){case"memberInfoList":break;case"remarkInfo":t.content.handleMessage=e[o];break;case"groupProfile":t.content.groupProfile={},t._initGroupProfile(e[o]);break;default:t.content[o]=e[o];}});}},{key:"_initGroupProfile",value:function value(e){for(var t=Object.keys(e),o=0;o<t.length;o++){var n=t[o];$a[n]&&("groupName"===n?this.content.groupProfile.name=e[n]:this.content.groupProfile[n]=e[n]);}}}]),e;}(),Ja=function(){function e(t){n(this,e),this.type=D.MSG_FILE,this._percent=0;var o=this._getFileInfo(t);this.content={downloadFlag:2,fileUrl:t.url||"",uuid:t.uuid,fileName:o.name||"",fileSize:o.size||0};}return s(e,[{key:"_getFileInfo",value:function value(e){if(!Ze(e.fileName)&&!Ze(e.fileSize))return{size:e.fileSize,name:e.fileName};var t=e.file.files[0];if(Z){if(t.path&&-1!==t.path.indexOf(".")){var o=t.path.slice(t.path.lastIndexOf(".")+1).toLowerCase();t.type=o,t.name||(t.name="".concat(dt(999999),".").concat(o));}t.name||(t.type="",t.name=t.path.slice(t.path.lastIndexOf("/")+1).toLowerCase()),t.suffix&&(t.type=t.suffix),t.url||(t.url=t.path);}return{size:t.size,name:t.name};}},{key:"updatePercent",value:function value(e){this._percent=e,this._percent>1&&(this._percent=1);}},{key:"updateFileUrl",value:function value(e){this.content.fileUrl=e;}},{key:"sendable",value:function value(){return""!==this.content.fileUrl&&""!==this.content.fileName&&0!==this.content.fileSize;}}]),e;}(),Xa=function(){function e(t){n(this,e),this.type=D.MSG_CUSTOM,this.content={data:t.data||"",description:t.description||"",extension:t.extension||""};}return s(e,[{key:"setData",value:function value(e){return this.content.data=e,this;}},{key:"setDescription",value:function value(e){return this.content.description=e,this;}},{key:"setExtension",value:function value(e){return this.content.extension=e,this;}},{key:"sendable",value:function value(){return 0!==this.content.data.length||0!==this.content.description.length||0!==this.content.extension.length;}}]),e;}(),Qa=function(){function e(t){n(this,e),this.type=D.MSG_VIDEO,this._percent=0,this.content={remoteVideoUrl:t.remoteVideoUrl||t.videoUrl||"",videoFormat:t.videoFormat,videoSecond:parseInt(t.videoSecond,10),videoSize:t.videoSize,videoUrl:t.videoUrl,videoDownloadFlag:2,videoUUID:t.videoUUID,thumbUUID:t.thumbUUID,thumbFormat:t.thumbFormat,thumbWidth:t.thumbWidth,snapshotWidth:t.thumbWidth,thumbHeight:t.thumbHeight,snapshotHeight:t.thumbHeight,thumbSize:t.thumbSize,snapshotSize:t.thumbSize,thumbDownloadFlag:2,thumbUrl:t.thumbUrl,snapshotUrl:t.thumbUrl};}return s(e,[{key:"updatePercent",value:function value(e){this._percent=e,this._percent>1&&(this._percent=1);}},{key:"updateVideoUrl",value:function value(e){e&&(this.content.remoteVideoUrl=e);}},{key:"updateSnapshotInfo",value:function value(e){var t=e.snapshotUrl,o=e.snapshotWidth,n=e.snapshotHeight;Kt(t)||(this.content.thumbUrl=this.content.snapshotUrl=t),Kt(o)||(this.content.thumbWidth=this.content.snapshotWidth=Number(o)),Kt(n)||(this.content.thumbHeight=this.content.snapshotHeight=Number(n));}},{key:"sendable",value:function value(){return""!==this.content.remoteVideoUrl;}}]),e;}(),Za=function(){function e(t){n(this,e),this.type=D.MSG_LOCATION;var o=t.description,a=t.longitude,s=t.latitude;this.content={description:o,longitude:a,latitude:s};}return s(e,[{key:"sendable",value:function value(){return!0;}}]),e;}(),es=function(){function e(t){if(n(this,e),this.from=t.from,this.messageSender=t.from,this.time=t.time,this.messageSequence=t.sequence,this.clientSequence=t.clientSequence||t.sequence,this.messageRandom=t.random,this.cloudCustomData=t.cloudCustomData||"",this.clientTime=t.clientTime||void 0,t.ID)this.ID=t.ID||"",this.nick=t.nick||"",this.avatar=t.avatar||"",this.messageBody=[{type:t.type,payload:t.payload}],t.conversationType.startsWith(D.CONV_C2C)?this.receiverUserID=t.to:t.conversationType.startsWith(D.CONV_GROUP)&&(this.receiverGroupID=t.to),this.messageReceiver=t.to;else{this.nick=t.nick||"",this.avatar=t.avatar||"",this.messageBody=[];var o=t.elements[0].type,a=t.elements[0].content;this._patchRichMediaPayload(o,a),o===D.MSG_MERGER?this.messageBody.push({type:o,payload:new ts(a).content}):this.messageBody.push({type:o,payload:a}),t.groupID&&(this.receiverGroupID=t.groupID,this.messageReceiver=t.groupID),t.to&&(this.receiverUserID=t.to,this.messageReceiver=t.to),this.ID="".concat(t.tinyID,"-").concat(t.clientTime,"-").concat(t.random);}}return s(e,[{key:"_patchRichMediaPayload",value:function value(e,t){e===D.MSG_IMAGE?t.imageInfoArray.forEach(function(e){!e.imageUrl&&e.url&&(e.imageUrl=e.url,e.sizeType=e.type,1===e.type?e.type=0:3===e.type&&(e.type=1));}):e===D.MSG_VIDEO?!t.remoteVideoUrl&&t.videoUrl&&(t.remoteVideoUrl=t.videoUrl):e===D.MSG_AUDIO?!t.remoteAudioUrl&&t.url&&(t.remoteAudioUrl=t.url):e===D.MSG_FILE&&!t.fileUrl&&t.url&&(t.fileUrl=t.url,t.url=void 0);}}]),e;}(),ts=function(){function e(t){if(n(this,e),this.type=D.MSG_MERGER,this.content={downloadKey:"",pbDownloadKey:"",messageList:[],title:"",abstractList:[],compatibleText:"",version:0,layersOverLimit:!1},t.downloadKey){var o=t.downloadKey,a=t.pbDownloadKey,s=t.title,r=t.abstractList,i=t.compatibleText,c=t.version;this.content.downloadKey=o,this.content.pbDownloadKey=a,this.content.title=s,this.content.abstractList=r,this.content.compatibleText=i,this.content.version=c||0;}else if(Kt(t.messageList))1===t.layersOverLimit&&(this.content.layersOverLimit=!0);else{var u=t.messageList,l=t.title,d=t.abstractList,p=t.compatibleText,_=t.version,g=[];u.forEach(function(e){if(!Kt(e)){var t=new es(e);g.push(t);}}),this.content.messageList=g,this.content.title=l,this.content.abstractList=d,this.content.compatibleText=p,this.content.version=_||0;}be.debug("MergerElement.content:",this.content);}return s(e,[{key:"sendable",value:function value(){return!Kt(this.content.messageList)||!Kt(this.content.downloadKey);}}]),e;}(),os={1:D.MSG_PRIORITY_HIGH,2:D.MSG_PRIORITY_NORMAL,3:D.MSG_PRIORITY_LOW,4:D.MSG_PRIORITY_LOWEST},ns=function(){function e(t){n(this,e),this.ID="",this.conversationID=t.conversationID||null,this.conversationType=t.conversationType||D.CONV_C2C,this.conversationSubType=t.conversationSubType,this.time=t.time||Math.ceil(Date.now()/1e3),this.sequence=t.sequence||0,this.clientSequence=t.clientSequence||t.sequence||0,this.random=t.random||0===t.random?t.random:dt(),this.priority=this._computePriority(t.priority),this.nick=t.nick||"",this.avatar=t.avatar||"",this.isPeerRead=1===t.isPeerRead||!1,this.nameCard="",this._elements=[],this.isPlaceMessage=t.isPlaceMessage||0,this.isRevoked=2===t.isPlaceMessage||8===t.msgFlagBits,this.from=t.from||null,this.to=t.to||null,this.flow="",this.isSystemMessage=t.isSystemMessage||!1,this.protocol=t.protocol||"JSON",this.isResend=!1,this.isRead=!1,this.status=t.status||Yt.SUCCESS,this._onlineOnlyFlag=!1,this._groupAtInfoList=[],this._relayFlag=!1,this.atUserList=[],this.cloudCustomData=t.cloudCustomData||"",this.isDeleted=!1,this.isModified=!1,this._isExcludedFromUnreadCount=!(!t.messageControlInfo||1!==t.messageControlInfo.excludedFromUnreadCount),this._isExcludedFromLastMessage=!(!t.messageControlInfo||1!==t.messageControlInfo.excludedFromLastMessage),this.clientTime=t.clientTime||ke()||0,this.senderTinyID=t.senderTinyID||t.tinyID||"",this.readReceiptInfo=t.readReceiptInfo||{readCount:void 0,unreadCount:void 0},this.needReadReceipt=!0===t.needReadReceipt||1===t.needReadReceipt,this.version=t.messageVersion||0,this.isBroadcastMessage=t.isBroadcastMessage||!1,this.reInitialize(t.currentUser),this.extractGroupInfo(t.groupProfile||null),this.handleGroupAtInfo(t);}return s(e,[{key:"elements",get:function get(){return be.warn("!!!Message 实例的 elements 属性即将废弃,请尽快修改。使用 type 和 payload 属性处理单条消息,兼容组合消息使用 _elements 属性!!!"),this._elements;}},{key:"getElements",value:function value(){return this._elements;}},{key:"extractGroupInfo",value:function value(e){if(null!==e){ze(e.nick)&&(this.nick=e.nick),ze(e.avatar)&&(this.avatar=e.avatar);var t=e.messageFromAccountExtraInformation;Xe(t)&&ze(t.nameCard)&&(this.nameCard=t.nameCard);}}},{key:"handleGroupAtInfo",value:function value(e){var t=this;e.payload&&e.payload.atUserList&&e.payload.atUserList.forEach(function(e){e!==D.MSG_AT_ALL?(t._groupAtInfoList.push({groupAtAllFlag:0,groupAtUserID:e}),t.atUserList.push(e)):(t._groupAtInfoList.push({groupAtAllFlag:1}),t.atUserList.push(D.MSG_AT_ALL));}),Qe(e.groupAtInfo)&&e.groupAtInfo.forEach(function(e){0===e.groupAtAllFlag?t.atUserList.push(e.groupAtUserID):1===e.groupAtAllFlag&&t.atUserList.push(D.MSG_AT_ALL);});}},{key:"getGroupAtInfoList",value:function value(){return this._groupAtInfoList;}},{key:"_initProxy",value:function value(){this._elements[0]&&(this.payload=this._elements[0].content,this.type=this._elements[0].type);}},{key:"reInitialize",value:function value(e){e&&(this.status=this.from?Yt.SUCCESS:Yt.UNSEND,!this.from&&(this.from=e)),this._initFlow(e),this._initSequence(e),this._concatConversationID(e),this.generateMessageID();}},{key:"isSendable",value:function value(){return 0!==this._elements.length&&("function"!=typeof this._elements[0].sendable?(be.warn("".concat(this._elements[0].type,' need "boolean : sendable()" method')),!1):this._elements[0].sendable());}},{key:"_initTo",value:function value(e){this.conversationType===D.CONV_GROUP&&(this.to=e.groupID);}},{key:"_initSequence",value:function value(e){0===this.clientSequence&&e&&(this.clientSequence=function(e){if(!e)return be.error("autoIncrementIndex(string: key) need key parameter"),!1;if(void 0===ht[e]){var t=new Date(),o="3".concat(t.getHours()).slice(-2),n="0".concat(t.getMinutes()).slice(-2),a="0".concat(t.getSeconds()).slice(-2);ht[e]=parseInt([o,n,a,"0001"].join("")),o=null,n=null,a=null,be.log("autoIncrementIndex start index:".concat(ht[e]));}return ht[e]++;}(e)),0===this.sequence&&this.conversationType===D.CONV_C2C&&(this.sequence=this.clientSequence);}},{key:"generateMessageID",value:function value(){this.from===D.CONV_SYSTEM&&(this.senderTinyID="144115198244471703"),this.ID="".concat(this.senderTinyID,"-").concat(this.clientTime,"-").concat(this.random);}},{key:"_initFlow",value:function value(e){""!==e&&(e===this.from?(this.flow="out",this.isRead=!0):this.flow="in");}},{key:"_concatConversationID",value:function value(e){var t=this.to,o="",n=this.conversationType;n!==D.CONV_SYSTEM?(o=n===D.CONV_C2C?e===this.from?t:this.from:this.to,this.conversationID="".concat(n).concat(o)):this.conversationID=D.CONV_SYSTEM;}},{key:"isElement",value:function value(e){return e instanceof Ka||e instanceof Ha||e instanceof xa||e instanceof Wa||e instanceof Ja||e instanceof Qa||e instanceof ja||e instanceof za||e instanceof Xa||e instanceof Za||e instanceof ts;}},{key:"setElement",value:function value(e){var t=this;if(this.isElement(e))return this._elements=[e],void this._initProxy();var o=function o(e){if(e.type&&e.content)switch(e.type){case D.MSG_TEXT:t.setTextElement(e.content);break;case D.MSG_IMAGE:t.setImageElement(e.content);break;case D.MSG_AUDIO:t.setAudioElement(e.content);break;case D.MSG_FILE:t.setFileElement(e.content);break;case D.MSG_VIDEO:t.setVideoElement(e.content);break;case D.MSG_CUSTOM:t.setCustomElement(e.content);break;case D.MSG_LOCATION:t.setLocationElement(e.content);break;case D.MSG_GRP_TIP:t.setGroupTipElement(e.content);break;case D.MSG_GRP_SYS_NOTICE:t.setGroupSystemNoticeElement(e.content);break;case D.MSG_FACE:t.setFaceElement(e.content);break;case D.MSG_MERGER:t.setMergerElement(e.content);break;default:be.warn(e.type,e.content,"no operation......");}};if(Qe(e))for(var n=0;n<e.length;n++){o(e[n]);}else o(e);this._initProxy();}},{key:"clearElement",value:function value(){this._elements.length=0;}},{key:"setTextElement",value:function value(e){var t="string"==typeof e?e:e.text,o=new Ka({text:t});this._elements.push(o);}},{key:"setImageElement",value:function value(e){var t=new Ha(e);this._elements.push(t);}},{key:"setAudioElement",value:function value(e){var t=new Wa(e);this._elements.push(t);}},{key:"setFileElement",value:function value(e){var t=new Ja(e);this._elements.push(t);}},{key:"setVideoElement",value:function value(e){var t=new Qa(e);this._elements.push(t);}},{key:"setLocationElement",value:function value(e){var t=new Za(e);this._elements.push(t);}},{key:"setCustomElement",value:function value(e){var t=new Xa(e);this._elements.push(t);}},{key:"setGroupTipElement",value:function value(e){var t={},o=e.operationType;if(Kt(e.memberInfoList)?e.operatorInfo&&(t=e.operatorInfo):o!==D.GRP_TIP_MBR_JOIN&&o!==D.GRP_TIP_MBR_KICKED_OUT&&o!==D.GRP_TIP_MBR_SET_ADMIN&&o!==D.GRP_TIP_MBR_CANCELED_ADMIN||(t=e.memberInfoList[0]),!Kt(e.memberExtraInfo)){var n=e.memberExtraInfo.reason;e.msgMemberInfo.forEach(function(e){e.reason=n;});}var a=t,s=a.nick,r=a.avatar;ze(s)&&(this.nick=s),ze(r)&&(this.avatar=r);var i=new ja(e);this._elements.push(i);}},{key:"setGroupSystemNoticeElement",value:function value(e){var t=new za(e);this._elements.push(t);}},{key:"setFaceElement",value:function value(e){var t=new xa(e);this._elements.push(t);}},{key:"setMergerElement",value:function value(e){var t=new ts(e);this._elements.push(t);}},{key:"setIsRead",value:function value(e){this.isRead=e;}},{key:"setRelayFlag",value:function value(e){this._relayFlag=e;}},{key:"getRelayFlag",value:function value(){return this._relayFlag;}},{key:"_computePriority",value:function value(e){if(Ze(e))return D.MSG_PRIORITY_NORMAL;if(ze(e)&&-1!==Object.values(os).indexOf(e))return e;if($e(e)){var t=""+e;if(-1!==Object.keys(os).indexOf(t))return os[t];}return D.MSG_PRIORITY_NORMAL;}},{key:"setNickAndAvatar",value:function value(e){var t=e.nick,o=e.avatar;ze(t)&&(this.nick=t),ze(o)&&(this.avatar=o);}},{key:"setNameCard",value:function value(e){ze(e)&&(this.nameCard=e);}}]),e;}(),as=function as(e){return{code:0,data:e||{}};},ss="https://cloud.tencent.com/document/product/",rs="您可以在即时通信 IM 控制台的【开发辅助工具(https://console.cloud.tencent.com/im-detail/tool-usersig)】 页面校验 UserSig。",is="UserSig 非法,请使用官网提供的 API 重新生成 UserSig(".concat(ss,"269/32688)。"),cs="#.E6.B6.88.E6.81.AF.E5.85.83.E7.B4.A0-timmsgelement",us={70001:"UserSig 已过期,请重新生成。建议 UserSig 有效期设置不小于24小时。",70002:"UserSig 长度为0,请检查传入的 UserSig 是否正确。",70003:is,70005:is,70009:"UserSig 验证失败,可能因为生成 UserSig 时混用了其他 SDKAppID 的私钥或密钥导致,请使用对应 SDKAppID 下的私钥或密钥重新生成 UserSig(".concat(ss,"269/32688)。"),70013:"请求中的 UserID 与生成 UserSig 时使用的 UserID 不匹配。".concat(rs),70014:"请求中的 SDKAppID 与生成 UserSig 时使用的 SDKAppID 不匹配。".concat(rs),70016:"密钥不存在,UserSig 验证失败,请在即时通信 IM 控制台获取密钥(".concat(ss,"269/32578#.E8.8E.B7.E5.8F.96.E5.AF.86.E9.92.A5)。"),70020:"SDKAppID 未找到,请在即时通信 IM 控制台确认应用信息。",70050:"UserSig 验证次数过于频繁。请检查 UserSig 是否正确,并于1分钟后重新验证。".concat(rs),70051:"帐号被拉入黑名单。",70052:"UserSig 已经失效,请重新生成,再次尝试。",70107:"因安全原因被限制登录,请不要频繁登录。",70169:"请求的用户帐号不存在。",70114:"".concat("服务端内部超时,请稍后重试。"),70202:"".concat("服务端内部超时,请稍后重试。"),70206:"请求中批量数量不合法。",70402:"参数非法,请检查必填字段是否填充,或者字段的填充是否满足协议要求。",70403:"请求失败,需要 App 管理员权限。",70398:"帐号数超限。如需创建多于100个帐号,请将应用升级为专业版,具体操作指引请参见购买指引(".concat(ss,"269/32458)。"),70500:"".concat("服务端内部错误,请重试。"),71e3:"删除帐号失败。仅支持删除体验版帐号,您当前应用为专业版,暂不支持帐号删除。",20001:"请求包非法。",20002:"UserSig 或 A2 失效。",20003:"消息发送方或接收方 UserID 无效或不存在,请检查 UserID 是否已导入即时通信 IM。",20004:"网络异常,请重试。",20005:"".concat("服务端内部错误,请重试。"),20006:"触发发送".concat("单聊消息","之前回调,App 后台返回禁止下发该消息。"),20007:"发送".concat("单聊消息",",被对方拉黑,禁止发送。消息发送状态默认展示为失败,您可以登录控制台修改该场景下的消息发送状态展示结果,具体操作请参见消息保留设置(").concat(ss,"269/38656)。"),20009:"消息发送双方互相不是好友,禁止发送(配置".concat("单聊消息","校验好友关系才会出现)。"),20010:"发送".concat("单聊消息",",自己不是对方的好友(单向关系),禁止发送。"),20011:"发送".concat("单聊消息",",对方不是自己的好友(单向关系),禁止发送。"),20012:"发送方被禁言,该条消息被禁止发送。",20016:"消息撤回超过了时间限制(默认2分钟)。",20018:"删除漫游内部错误。",90001:"JSON 格式解析失败,请检查请求包是否符合 JSON 规范。",90002:"".concat("JSON 格式请求包体","中 MsgBody 不符合消息格式描述,或者 MsgBody 不是 Array 类型,请参考 TIMMsgElement 对象的定义(").concat(ss,"269/2720").concat(cs,")。"),90003:"".concat("JSON 格式请求包体","中缺少 To_Account 字段或者 To_Account 帐号不存在。"),90005:"".concat("JSON 格式请求包体","中缺少 MsgRandom 字段或者 MsgRandom 字段不是 Integer 类型。"),90006:"".concat("JSON 格式请求包体","中缺少 MsgTimeStamp 字段或者 MsgTimeStamp 字段不是 Integer 类型。"),90007:"".concat("JSON 格式请求包体","中 MsgBody 类型不是 Array 类型,请将其修改为 Array 类型。"),90008:"".concat("JSON 格式请求包体","中缺少 From_Account 字段或者 From_Account 帐号不存在。"),90009:"请求需要 App 管理员权限。",90010:"".concat("JSON 格式请求包体","不符合消息格式描述,请参考 TIMMsgElement 对象的定义(").concat(ss,"269/2720").concat(cs,")。"),90011:"批量发消息目标帐号超过500,请减少 To_Account 中目标帐号数量。",90012:"To_Account 没有注册或不存在,请确认 To_Account 是否导入即时通信 IM 或者是否拼写错误。",90026:"消息离线存储时间错误(最多不能超过7天)。",90031:"".concat("JSON 格式请求包体","中 SyncOtherMachine 字段不是 Integer 类型。"),90044:"".concat("JSON 格式请求包体","中 MsgLifeTime 字段不是 Integer 类型。"),90048:"请求的用户帐号不存在。",90054:"撤回请求中的 MsgKey 不合法。",90994:"".concat("服务端内部错误,请重试。"),90995:"".concat("服务端内部错误,请重试。"),91e3:"".concat("服务端内部错误,请重试。"),90992:"".concat("服务端内部错误,请重试。","如果所有请求都返回该错误码,且 App 配置了第三方回调,请检查 App 服务端是否正常向即时通信 IM 后台服务端返回回调结果。"),93e3:"JSON 数据包超长,消息包体请不要超过8k。",91101:"Web 端长轮询被踢(Web 端同时在线实例个数超出限制)。",10002:"".concat("服务端内部错误,请重试。"),10003:"请求中的接口名称错误,请核对接口名称并重试。",10004:"参数非法,请根据错误描述检查请求是否正确。",10005:"请求包体中携带的帐号数量过多。",10006:"操作频率限制,请尝试降低调用的频率。",10007:"操作权限不足,例如 Work ".concat("群组","中普通成员尝试执行踢人操作,但只有 App 管理员才有权限。"),10008:"请求非法,可能是请求中携带的签名信息验证不正确,请再次尝试。",10009:"该群不允许群主主动退出。",10010:"".concat("群组","不存在,或者曾经存在过,但是目前已经被解散。"),10011:"解析 JSON 包体失败,请检查包体的格式是否符合 JSON 格式。",10012:"发起操作的 UserID 非法,请检查发起操作的用户 UserID 是否填写正确。",10013:"被邀请加入的用户已经是群成员。",10014:"群已满员,无法将请求中的用户加入".concat("群组",",如果是批量加人,可以尝试减少加入用户的数量。"),10015:"找不到指定 ID 的".concat("群组","。"),10016:"App 后台通过第三方回调拒绝本次操作。",10017:"因被禁言而不能发送消息,请检查发送者是否被设置禁言。",10018:"应答包长度超过最大包长(1MB),请求的内容过多,请尝试减少单次请求的数据量。",10019:"请求的用户帐号不存在。",10021:"".concat("群组"," ID 已被使用,请选择其他的").concat("群组"," ID。"),10023:"发消息的频率超限,请延长两次发消息时间的间隔。",10024:"此邀请或者申请请求已经被处理。",10025:"".concat("群组"," ID 已被使用,并且操作者为群主,可以直接使用。"),10026:"该 SDKAppID 请求的命令字已被禁用。",10030:"请求撤回的消息不存在。",10031:"消息撤回超过了时间限制(默认2分钟)。",10032:"请求撤回的消息不支持撤回操作。",10033:"".concat("群组","类型不支持消息撤回操作。"),10034:"该消息类型不支持删除操作。",10035:"直播群和在线成员广播大群不支持删除消息。",10036:"直播群创建数量超过了限制,请参考价格说明(".concat(ss,"269/11673)购买预付费套餐“IM直播群”。"),10037:"单个用户可创建和加入的".concat("群组","数量超过了限制,请参考价格说明(").concat(ss,"269/11673)购买或升级预付费套餐“单人可创建与加入").concat("群组","数”。"),10038:"群成员数量超过限制,请参考价格说明(".concat(ss,"269/11673)购买或升级预付费套餐“扩展群人数上限”。"),10041:"该应用(SDKAppID)已配置不支持群消息撤回。",10050:"群属性 key 不存在",10056:"请在写入群属性前先使用 getGroupAttributes 接口更新本地群属性,避免冲突。",10059:"非旗舰版",10060:"群人数超过已读回执人数上限",10061:"在线消息不支持已读回执",10062:"找不到群消息的已读回执信息",20026:"消息不存在",20029:"该群类型不支持修改消息。",30001:"请求参数错误,请根据错误描述检查请求参数",30002:"SDKAppID 不匹配",30003:"请求的用户帐号不存在",30004:"请求需要 App 管理员权限",30005:"关系链字段中包含敏感词",30006:"".concat("服务端内部错误,请重试。"),30007:"".concat("网络超时,请稍后重试. "),30008:"并发写导致写冲突,建议使用批量方式",30009:"后台禁止该用户发起加好友请求",30010:"自己的好友数已达系统上限",30011:"分组已达系统上限",30012:"未决数已达系统上限",30014:"对方的好友数已达系统上限",30515:"请求添加好友时,对方在自己的黑名单中,不允许加好友",30516:"请求添加好友时,对方的加好友验证方式是不允许任何人添加自己为好友",30525:"请求添加好友时,自己在对方的黑名单中,不允许加好友",30539:"等待对方同意",30540:"添加好友请求被安全策略打击,请勿频繁发起添加好友请求",31704:"与请求删除的帐号之间不存在好友关系",31707:"删除好友请求被安全策略打击,请勿频繁发起删除好友请求",50001:"解包失败",50002:"请求参数错误,请根据错误描述检查请求是否正确",50004:"会话分组不存在",51006:"会话标记每次调整的会话数为空或者超过了100个上限",51007:"GroupID 换 GroupCode 失败,内部错误或 Group 已经解散",51008:"会话分组的总的会话数超过了1000",51009:"删除会话分组时分组不存在",51010:"会话分组数超过了上限(默认20个)",51011:"分组名超过了32个字节"},ls=function(e){i(o,e);var t=f(o);function o(e){var a;return n(this,o),(a=t.call(this)).code=e.code,a.message=us[e.code]||e.message,a.data=e.data||{},a;}return s(o);}(p(Error)),ds=null,ps=function ps(e){ds=e;},_s=function _s(e){return Promise.resolve(as(e));},gs=function gs(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e instanceof ls)return t&&null!==ds&&ds.emit(S.ERROR,e),Promise.reject(e);if(e instanceof Error){var o=new ls({code:Ca.UNCAUGHT_ERROR,message:e.message});return t&&null!==ds&&ds.emit(S.ERROR,o),Promise.reject(o);}if(Ze(e)||Ze(e.code)||Ze(e.message))be.error("IMPromise.reject 必须指定code(错误码)和message(错误信息)!!!");else{if($e(e.code)&&ze(e.message)){var n=new ls(e);return t&&null!==ds&&ds.emit(S.ERROR,n),Promise.reject(n);}be.error("IMPromise.reject code(错误码)必须为数字,message(错误信息)必须为字符串!!!");}},hs=function(e){i(a,e);var o=f(a);function a(e){var t;return n(this,a),(t=o.call(this,e))._className="C2CModule",t._messageFromUnreadDBMap=new Map(),t;}return s(a,[{key:"onNewC2CMessage",value:function value(e){var t=e.dataList,o=e.isInstantMessage,n=e.C2CRemainingUnreadList,a=e.C2CPairUnreadList;be.debug("".concat(this._className,".onNewC2CMessage count:").concat(t.length," isInstantMessage:").concat(o));var s=this._newC2CMessageStoredAndSummary({dataList:t,C2CRemainingUnreadList:n,C2CPairUnreadList:a,isInstantMessage:o}),r=s.conversationOptionsList,i=s.messageList,c=s.isUnreadC2CMessage;(this.filterModifiedMessage(i),r.length>0)&&this.getModule(po).onNewMessage({conversationOptionsList:r,isInstantMessage:o,isUnreadC2CMessage:c});var u=this.filterUnmodifiedMessage(i);o&&u.length>0&&this.emitOuterEvent(S.MESSAGE_RECEIVED,u),i.length=0;}},{key:"_newC2CMessageStoredAndSummary",value:function value(e){for(var t=e.dataList,o=e.C2CRemainingUnreadList,n=e.C2CPairUnreadList,a=e.isInstantMessage,s=null,r=[],i=[],c={},u=this.getModule(mo),l=this.getModule(No),d=!1,p=this.getModule(po),_=0,g=t.length;_<g;_++){var h=t[_];h.currentUser=this.getMyUserID(),h.conversationType=D.CONV_C2C,h.isSystemMessage=!!h.isSystemMessage,(Ze(h.nick)||Ze(h.avatar))&&(d=!0,be.debug("".concat(this._className,"._newC2CMessageStoredAndSummary nick or avatar missing!"))),s=new ns(h),h.elements=u.parseElements(h.elements,h.from),s.setElement(h.elements),s.setNickAndAvatar({nick:h.nick,avatar:h.avatar});var f=s.conversationID;if(a){if(1===this._messageFromUnreadDBMap.get(s.ID))continue;var m=!1;if(s.from!==this.getMyUserID()){var M=p.getLatestMessageSentByPeer(f);if(M){var v=M.nick,I=M.avatar;d?s.setNickAndAvatar({nick:v,avatar:I}):v===s.nick&&I===s.avatar||(m=!0);}}else{var y=p.getLatestMessageSentByMe(f);if(y){var T=y.nick,E=y.avatar;T===s.nick&&E===s.avatar||p.modifyMessageSentByMe({conversationID:f,latestNick:s.nick,latestAvatar:s.avatar});}}var C=1===t[_].isModified;if(p.isMessageSentByCurrentInstance(s)?s.isModified=C:C=!1,0===h.msgLifeTime)s._onlineOnlyFlag=!0,p.isMessageSentByCurrentInstance(s)||i.push(s);else{if(!p.pushIntoMessageList(i,s,C))continue;m&&(p.modifyMessageSentByPeer({conversationID:f,latestNick:s.nick,latestAvatar:s.avatar}),p.updateUserProfileSpecifiedKey({conversationID:f,nick:s.nick,avatar:s.avatar}));}a&&s.clientTime>0&&l.addMessageDelay(s.clientTime);}else this._messageFromUnreadDBMap.set(s.ID,1);if(0!==h.msgLifeTime){if(!1===s._onlineOnlyFlag){var S=p.getLastMessageTime(f);if($e(S)&&s.time<S)continue;if(Ze(c[f])){var N=0;"in"===s.flow&&(s._isExcludedFromUnreadCount||(N=1)),c[f]=r.push({conversationID:f,unreadCount:N,type:s.conversationType,subType:s.conversationSubType,lastMessage:s._isExcludedFromLastMessage?"":s})-1;}else{var A=c[f];r[A].type=s.conversationType,r[A].subType=s.conversationSubType,r[A].lastMessage=s._isExcludedFromLastMessage?"":s,"in"===s.flow&&(s._isExcludedFromUnreadCount||r[A].unreadCount++);}}}else s._onlineOnlyFlag=!0;}var O=!1;if(Qe(n))for(var R=function R(e,t){if(n[e].unreadCount>0){O=!0;var o=r.find(function(t){return t.conversationID==="C2C".concat(n[e].from);});o?o.unreadCount=n[e].unreadCount:r.push({conversationID:"C2C".concat(n[e].from),unreadCount:n[e].unreadCount,type:D.CONV_C2C});}},L=0,k=n.length;L<k;L++){R(L);}if(Qe(o))for(var G=function G(e,t){r.find(function(t){return t.conversationID==="C2C".concat(o[e].from);})||r.push({conversationID:"C2C".concat(o[e].from),type:D.CONV_C2C,lastMsgTime:o[e].lastMsgTime});},P=0,U=o.length;P<U;P++){G(P);}return{conversationOptionsList:r,messageList:i,isUnreadC2CMessage:O};}},{key:"onC2CMessageRevoked",value:function value(e){var t=this;be.debug("".concat(this._className,".onC2CMessageRevoked count:").concat(e.dataList.length));var o=this.getModule(po),n=[],a=null;e.dataList.forEach(function(e){if(e.c2cMessageRevokedNotify){var s=e.c2cMessageRevokedNotify.revokedInfos;Ze(s)||s.forEach(function(e){var s=t.getMyUserID()===e.from?"".concat(D.CONV_C2C).concat(e.to):"".concat(D.CONV_C2C).concat(e.from);(a=o.revoke(s,e.sequence,e.random))&&n.push(a);});}}),0!==n.length&&(o.onMessageRevoked(n),this.emitOuterEvent(S.MESSAGE_REVOKED,n));}},{key:"onC2CMessageReadReceipt",value:function value(e){var t=this;e.dataList.forEach(function(e){if(!Kt(e.c2cMessageReadReceipt)){var o=e.c2cMessageReadReceipt.to;e.c2cMessageReadReceipt.uinPairReadArray.forEach(function(e){var n=e.peerReadTime;be.debug("".concat(t._className,"._onC2CMessageReadReceipt to:").concat(o," peerReadTime:").concat(n));var a="".concat(D.CONV_C2C).concat(o),s=t.getModule(po);s.recordPeerReadTime(a,n),s.updateMessageIsPeerReadProperty(a,n);});}});}},{key:"onC2CMessageReadNotice",value:function value(e){var t=this;e.dataList.forEach(function(e){if(!Kt(e.c2cMessageReadNotice)){var o=t.getModule(po);e.c2cMessageReadNotice.uinPairReadArray.forEach(function(e){var n=e.from,a=e.peerReadTime;be.debug("".concat(t._className,".onC2CMessageReadNotice from:").concat(n," lastReadTime:").concat(a));var s="".concat(D.CONV_C2C).concat(n);o.updateIsReadAfterReadReport({conversationID:s,lastMessageTime:a}),o.updateUnreadCount(s);});}});}},{key:"onC2CMessageModified",value:function value(e){be.debug("".concat(this._className,".onC2CMessageModified options:"),JSON.stringify(e));var o=this.getModule(po);e.dataList.forEach(function(e){o.onMessageModified(t(t({},e),{},{conversationType:D.CONV_C2C}));});}},{key:"onReadReceiptList",value:function value(e){be.debug("".concat(this._className,".onReadReceiptList options:"),JSON.stringify(e));var t=e.dataList,o=t.userID,n=t.readReceiptList;this.getModule(po).updateReadReceiptInfo({userID:o,readReceiptList:n});}},{key:"sendMessage",value:function value(e,t){var o=this._createC2CMessagePack(e,t);return this.request(o);}},{key:"_createC2CMessagePack",value:function value(e,t){var o=null;t&&(t.offlinePushInfo&&(o=t.offlinePushInfo),!0===t.onlineUserOnly&&(o?o.disablePush=!0:o={disablePush:!0}));var n="";ze(e.cloudCustomData)&&e.cloudCustomData.length>0&&(n=e.cloudCustomData);var a=[];if(Xe(t)&&Xe(t.messageControlInfo)){var s=t.messageControlInfo,r=s.excludedFromUnreadCount,i=s.excludedFromLastMessage;!0===r&&a.push("NoUnread"),!0===i&&a.push("NoLastMsg");}return{protocolName:wo,tjgID:this.generateTjgID(e),requestData:{fromAccount:this.getMyUserID(),toAccount:e.to,msgBody:e.getElements(),cloudCustomData:n,msgSeq:e.sequence,msgRandom:e.random,msgLifeTime:this.isOnlineMessage(e,t)?0:void 0,nick:e.nick,avatar:e.avatar,offlinePushInfo:o?{pushFlag:!0===o.disablePush?1:0,title:o.title||"",desc:o.description||"",ext:o.extension||"",apnsInfo:{badgeMode:!0===o.ignoreIOSBadge?1:0},androidInfo:{OPPOChannelID:o.androidOPPOChannelID||""}}:void 0,messageControlInfo:a,clientTime:e.clientTime,needReadReceipt:!0===e.needReadReceipt?1:0}};}},{key:"isOnlineMessage",value:function value(e,t){return!(!t||!0!==t.onlineUserOnly);}},{key:"revokeMessage",value:function value(e){return this.request({protocolName:xo,requestData:{msgInfo:{fromAccount:e.from,toAccount:e.to,msgSeq:e.sequence,msgRandom:e.random,msgTimeStamp:e.time}}});}},{key:"deleteMessage",value:function value(e){var t=e.to,o=e.keyList;return be.log("".concat(this._className,".deleteMessage toAccount:").concat(t," count:").concat(o.length)),this.request({protocolName:Jo,requestData:{fromAccount:this.getMyUserID(),to:t,keyList:o}});}},{key:"modifyRemoteMessage",value:function value(e){var t=e.from,o=e.to,n=e.version,a=void 0===n?0:n,s=e.sequence,r=e.random,i=e.time,c=e.payload,u=e.type,l=e.cloudCustomData,d=void 0;return qt(u)&&(d=[]).push({type:u,content:c}),this.request({protocolName:Xo,requestData:{from:t,to:o,version:a,sequence:s,random:r,time:i,elements:d,cloudCustomData:l}});}},{key:"setMessageRead",value:function value(e){var t=this,o=e.conversationID,n=e.lastMessageTime,a="".concat(this._className,".setMessageRead");be.log("".concat(a," conversationID:").concat(o," lastMessageTime:").concat(n)),$e(n)||be.warn("".concat(a," 请勿修改 Conversation.lastMessage.lastTime,否则可能会导致已读上报结果不准确"));var s=new Va(Ba.SET_C2C_MESSAGE_READ);return s.setMessage("conversationID:".concat(o," lastMessageTime:").concat(n)),this.request({protocolName:Wo,requestData:{C2CMsgReaded:{cookie:"",C2CMsgReadedItem:[{toAccount:o.replace("C2C",""),lastMessageTime:n,receipt:1}]}}}).then(function(){s.setNetworkType(t.getNetworkType()).end(),be.log("".concat(a," ok"));var e=t.getModule(po);return e.updateIsReadAfterReadReport({conversationID:o,lastMessageTime:n}),e.updateUnreadCount(o),as();}).catch(function(e){return t.probeNetwork().then(function(t){var o=m(t,2),n=o[0],a=o[1];s.setError(e,n,a).end();}),be.log("".concat(a," failed. error:"),e),gs(e);});}},{key:"getRoamingMessage",value:function value(e){var t=this,o="".concat(this._className,".getRoamingMessage"),n=e.peerAccount,a=e.conversationID,s=e.count,r=e.lastMessageTime,i=e.messageKey,c="peerAccount:".concat(n," count:").concat(s||15," lastMessageTime:").concat(r||0," messageKey:").concat(i);be.log("".concat(o," ").concat(c));var u=new Va(Ba.GET_C2C_ROAMING_MESSAGES);return this.request({protocolName:$o,requestData:{peerAccount:n,count:s||15,lastMessageTime:r||0,messageKey:i}}).then(function(e){var n=e.data,s=n.complete,r=n.messageList,i=n.messageKey,l=n.lastMessageTime;Ze(r)?be.log("".concat(o," ok. complete:").concat(s," but messageList is undefined!")):be.log("".concat(o," ok. complete:").concat(s," count:").concat(r.length)),u.setNetworkType(t.getNetworkType()).setMessage("".concat(c," complete:").concat(s," length:").concat(r.length)).end();var d=t.getModule(po);1===s&&d.setCompleted(a);var p=d.onRoamingMessage(r,a);d.modifyMessageList(a),d.updateIsRead(a),d.updateRoamingMessageKeyAndTime(a,i,l);var _=d.getPeerReadTime(a);if(be.log("".concat(o," update isPeerRead property. conversationID:").concat(a," peerReadTime:").concat(_)),_)d.updateMessageIsPeerReadProperty(a,_);else{var g=a.replace(D.CONV_C2C,"");t.getRemotePeerReadTime([g]).then(function(){d.updateMessageIsPeerReadProperty(a,d.getPeerReadTime(a));});}var h="";if(p.length>0)h=p[0].ID;else{var f=d.getLocalOldestMessage(a);f&&(h=f.ID);}return be.log("".concat(o," nextReqID:").concat(h," stored message count:").concat(p.length)),{nextReqID:h,storedMessageList:p};}).catch(function(e){return t.probeNetwork().then(function(t){var o=m(t,2),n=o[0],a=o[1];u.setMessage(c).setError(e,n,a).end();}),be.warn("".concat(o," failed. error:"),e),gs(e);});}},{key:"getRoamingMessagesHopping",value:function value(e){var t=this,o="".concat(this._className,".getRoamingMessagesHopping"),n=e.peerAccount,a=e.time,s=void 0===a?0:a,r=e.count,i=e.direction,c="".concat(D.CONV_C2C).concat(n),u="peerAccount:".concat(n," count:").concat(r," time:").concat(s," direction:").concat(i);be.log("".concat(o," ").concat(u));var l=new Va(Ba.GET_C2C_ROAMING_MESSAGES_HOPPING);return this.request({protocolName:$o,requestData:{peerAccount:n,count:r+1,lastMessageTime:s,direction:i}}).then(function(e){var n=e.data,a=n.complete,s=n.messageList,r=void 0===s?[]:s,d=n.lastMessageTime;be.log("".concat(o," ok. complete:").concat(a," count:").concat(r.length)),l.setNetworkType(t.getNetworkType()).setMessage("".concat(u," complete:").concat(a," length:").concat(r.length)).end(),1!==a&&(1===i?r.pop():r.shift());var p=t.getModule(po).onRoamingMessage(r,c,!1);t._modifyMessageList(c,p);var _=t._computeResult({complete:a,lastMessageTime:d,resultList:p});return as(_);}).catch(function(e){return t.probeNetwork().then(function(t){var o=m(t,2),n=o[0],a=o[1];l.setMessage(u).setError(e,n,a).end();}),be.warn("".concat(o," failed. error:"),e),gs(e);});}},{key:"_computeResult",value:function value(e){var t=e.complete,o=void 0===t?0:t,n=e.lastMessageTime,a=e.resultList,s={messageList:M(void 0===a?[]:a),isCompleted:!1,nextMessageTime:""};return 1===o?(s.isCompleted=!0,s):(s.nextMessageTime=n,s);}},{key:"_modifyMessageList",value:function value(e,t){var o=this.getModule(po).getLocalConversation(e);if(o)for(var n=o.userProfile.nick,a=o.userProfile.avatar,s=this.getModule(so).getNickAndAvatarByUserID(this.getMyUserID()),r=s.nick,i=s.avatar,c=t.length-1;c>=0;c--){var u=t[c];"in"===u.flow&&(u.nick!==n&&u.setNickAndAvatar({nick:n}),u.avatar!==a&&u.setNickAndAvatar({avatar:a})),"out"===u.flow&&(u.nick!==r&&u.setNickAndAvatar({nick:r}),u.avatar!==i&&u.setNickAndAvatar({avatar:i}));}}},{key:"getRemotePeerReadTime",value:function value(e){var t=this,o="".concat(this._className,".getRemotePeerReadTime");if(Kt(e))return be.warn("".concat(o," userIDList is empty!")),Promise.resolve();var n=new Va(Ba.GET_PEER_READ_TIME);return be.log("".concat(o," userIDList:").concat(e)),this.request({protocolName:zo,requestData:{userIDList:e}}).then(function(a){var s=a.data.peerReadTimeList;be.log("".concat(o," ok. peerReadTimeList:").concat(s));for(var r="",i=t.getModule(po),c=0;c<e.length;c++){r+="".concat(e[c],"-").concat(s[c]," "),s[c]>0&&i.recordPeerReadTime("C2C".concat(e[c]),s[c]);}n.setNetworkType(t.getNetworkType()).setMessage(r).end();}).catch(function(e){t.probeNetwork().then(function(t){var o=m(t,2),a=o[0],s=o[1];n.setError(e,a,s).end();}),be.warn("".concat(o," failed. error:"),e);});}},{key:"sendReadReceipt",value:function value(e){var t=this,o=e[0].conversationID.replace(D.CONV_C2C,""),n=new Va(Ba.SEND_C2C_READ_RECEIPT);n.setMessage("peerAccount:".concat(o));var a=this.getMyUserID(),s=e.filter(function(e){return e.from!==a&&!0===e.needReadReceipt;}).map(function(e){return{fromAccount:e.from,toAccount:e.to,sequence:e.sequence,random:e.random,time:e.time,clientTime:e.clientTime};});if(0===s.length)return gs({code:Ca.READ_RECEIPT_MESSAGE_LIST_EMPTY,message:Sa.READ_RECEIPT_MESSAGE_LIST_EMPTY});var r="".concat(this._className,".sendReadReceipt");return be.log("".concat(r,". peerAccount:").concat(o," messageInfoList length:").concat(s.length)),this.request({protocolName:Rn,requestData:{peerAccount:o,messageInfoList:s}}).then(function(e){return n.end(),be.log("".concat(r," ok")),as();}).catch(function(e){return t.probeNetwork().then(function(t){var o=m(t,2),a=o[0],s=o[1];n.setError(e,a,s).end();}),be.warn("".concat(r," failed. error:"),e),gs(e);});}},{key:"getReadReceiptList",value:function value(e){var t="".concat(this._className,".getReadReceiptList"),o=this.getMyUserID(),n=e.filter(function(e){return e.from===o&&!0===e.needReadReceipt;});return be.log("".concat(t," userID:").concat(o," messageList length:").concat(n.length)),_s({messageList:n});}},{key:"reset",value:function value(){be.log("".concat(this._className,".reset")),this._messageFromUnreadDBMap.clear();}}]),a;}(Ro),fs=function(){function e(){n(this,e),this.list=new Map(),this._className="MessageListHandler",this._latestMessageSentByPeerMap=new Map(),this._latestMessageSentByMeMap=new Map(),this._groupLocalLastMessageSequenceMap=new Map();}return s(e,[{key:"getLocalOldestMessageByConversationID",value:function value(e){if(!e)return null;if(!this.list.has(e))return null;var t=this.list.get(e).values();return t?t.next().value:null;}},{key:"pushIn",value:function value(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=e.conversationID,n=!0;this.list.has(o)||this.list.set(o,new Map());var a=this._getUniqueIDOfMessage(e),s=this.list.get(o).has(a);if(s){var r=this.list.get(o).get(a);if(!t||!0===r.isModified)return n=!1;}return this.list.get(o).set(a,e),this._setLatestMessageSentByPeer(o,e),this._setLatestMessageSentByMe(o,e),this._setGroupLocalLastMessageSequence(o,e),n;}},{key:"unshift",value:function value(e,t){var o;if(Qe(e)){if(e.length>0){o=e[0].conversationID;var n=e.length;this._unshiftMultipleMessages(e,t),this._setGroupLocalLastMessageSequence(o,e[n-1]);}}else o=e.conversationID,this._unshiftSingleMessage(e,t),this._setGroupLocalLastMessageSequence(o,e);if(o&&o.startsWith(D.CONV_C2C)){var a=Array.from(this.list.get(o).values()),s=a.length;if(0===s)return;for(var r=s-1;r>=0;r--){if("out"===a[r].flow){this._setLatestMessageSentByMe(o,a[r]);break;}}for(var i=s-1;i>=0;i--){if("in"===a[i].flow){this._setLatestMessageSentByPeer(o,a[i]);break;}}}}},{key:"_unshiftSingleMessage",value:function value(e,t){var o=e.conversationID,n=this._getUniqueIDOfMessage(e);if(!this.list.has(o))return this.list.set(o,new Map()),this.list.get(o).set(n,e),void t.push(e);var a=this.list.get(o),s=Array.from(a);a.has(n)||(s.unshift([n,e]),this.list.set(o,new Map(s)),t.push(e));}},{key:"_unshiftMultipleMessages",value:function value(e,t){for(var o=e.length,n=[],a=e[0].conversationID,s=this.list.get(a),r=this.list.has(a)?Array.from(s):[],i=0;i<o;i++){var c=this._getUniqueIDOfMessage(e[i]);s&&s.has(c)||(n.push([c,e[i]]),t.push(e[i]));}this.list.set(a,new Map(n.concat(r)));}},{key:"remove",value:function value(e){var t=e.conversationID,o=this._getUniqueIDOfMessage(e);this.list.has(t)&&this.list.get(t).delete(o);}},{key:"revoke",value:function value(e,t,o){if(be.debug("revoke message",e,t,o),this.list.has(e)){var n,a=C(this.list.get(e));try{for(a.s();!(n=a.n()).done;){var s=m(n.value,2)[1];if(s.sequence===t&&!s.isRevoked&&(Ze(o)||s.random===o))return s.isRevoked=!0,s;}}catch(r){a.e(r);}finally{a.f();}}return null;}},{key:"removeByConversationID",value:function value(e){this.list.has(e)&&(this.list.delete(e),this._latestMessageSentByPeerMap.delete(e),this._latestMessageSentByMeMap.delete(e));}},{key:"findMessage",value:function value(e){var t,o=null,n=C(this.list);try{for(n.s();!(t=n.n()).done;){for(var a=M(m(t.value,2)[1].values()),s=a.length,r=0;r<s;r++){if(a[r].ID===e){o=a[r];break;}}}}catch(i){n.e(i);}finally{n.f();}return o;}},{key:"updateMessageIsPeerReadProperty",value:function value(e,t){var o=[];if(this.list.has(e)){var n,a=C(this.list.get(e));try{for(a.s();!(n=a.n()).done;){var s=m(n.value,2)[1];s.time<=t&&!s.isPeerRead&&"out"===s.flow&&(s.isPeerRead=!0,o.push(s));}}catch(r){a.e(r);}finally{a.f();}be.log("".concat(this._className,".updateMessageIsPeerReadProperty conversationID:").concat(e," peerReadTime:").concat(t," count:").concat(o.length));}return o;}},{key:"updateMessageIsModifiedProperty",value:function value(e){var t=e.conversationID;if(this.list.has(t)){var o=this._getUniqueIDOfMessage(e),n=this.list.get(t).get(o);n&&(n.isModified=!0);}}},{key:"hasLocalMessageList",value:function value(e){return this.list.has(e);}},{key:"getLocalMessageList",value:function value(e){return this.hasLocalMessageList(e)?M(this.list.get(e).values()):[];}},{key:"hasLocalMessage",value:function value(e,t){for(var o=!1,n=this.getLocalMessageList(e),a=n.length,s=0;s<a;s++){n[s].ID===t&&(o=!0);}return o;}},{key:"getLocalMessage",value:function value(e,t){for(var o=null,n=this.getLocalMessageList(e),a=n.length,s=0;s<a;s++){if(n[s].ID===t){o=n[s];break;}}return o;}},{key:"getLocalLastMessage",value:function value(e){var t=this.getLocalMessageList(e);return t[t.length-1];}},{key:"getLocalOldestMessage",value:function value(e){return this.getLocalMessageList(e)[0];}},{key:"_setLatestMessageSentByPeer",value:function value(e,t){e.startsWith(D.CONV_C2C)&&"in"===t.flow&&this._latestMessageSentByPeerMap.set(e,t);}},{key:"_setLatestMessageSentByMe",value:function value(e,t){e.startsWith(D.CONV_C2C)&&"out"===t.flow&&this._latestMessageSentByMeMap.set(e,t);}},{key:"_setGroupLocalLastMessageSequence",value:function value(e,t){e.startsWith(D.CONV_GROUP)&&this._groupLocalLastMessageSequenceMap.set(e,t.sequence);}},{key:"getLatestMessageSentByPeer",value:function value(e){return this._latestMessageSentByPeerMap.get(e);}},{key:"getLatestMessageSentByMe",value:function value(e){return this._latestMessageSentByMeMap.get(e);}},{key:"getGroupLocalLastMessageSequence",value:function value(e){return this._groupLocalLastMessageSequenceMap.get(e)||0;}},{key:"modifyMessageSentByPeer",value:function value(e){var t=e.conversationID,o=e.latestNick,n=e.latestAvatar,a=this.list.get(t);if(!Kt(a)){var s=Array.from(a.values()),r=s.length;if(0!==r){for(var i=null,c=0,u=!1,l=r-1;l>=0;l--){"in"===s[l].flow&&((i=s[l]).nick!==o&&(i.setNickAndAvatar({nick:o}),u=!0),i.avatar!==n&&(i.setNickAndAvatar({avatar:n}),u=!0),u&&(c+=1));}be.log("".concat(this._className,".modifyMessageSentByPeer conversationID:").concat(t," count:").concat(c));}}}},{key:"modifyMessageSentByMe",value:function value(e){var t=e.conversationID,o=e.latestNick,n=e.latestAvatar,a=this.list.get(t);if(!Kt(a)){var s=Array.from(a.values()),r=s.length;if(0!==r){for(var i=null,c=0,u=!1,l=r-1;l>=0;l--){"out"===s[l].flow&&((i=s[l]).nick!==o&&(i.setNickAndAvatar({nick:o}),u=!0),i.avatar!==n&&(i.setNickAndAvatar({avatar:n}),u=!0),u&&(c+=1));}be.log("".concat(this._className,".modifyMessageSentByMe conversationID:").concat(t," count:").concat(c));}}}},{key:"getTopicConversationIDList",value:function value(e){return M(this.list.keys()).filter(function(t){return t.startsWith("".concat(D.CONV_GROUP).concat(e));});}},{key:"traversal",value:function value(){if(0!==this.list.size&&-1===be.getLevel()){console.group("conversationID-messageCount");var e,t=C(this.list);try{for(t.s();!(e=t.n()).done;){var o=m(e.value,2),n=o[0],a=o[1];console.log("".concat(n,"-").concat(a.size));}}catch(s){t.e(s);}finally{t.f();}console.groupEnd();}}},{key:"onMessageModified",value:function value(e,t){if(!this.list.has(e))return{isUpdated:!1,message:null};var o=this._getUniqueIDOfMessage(t),n=this.list.get(e).has(o);if(be.debug("".concat(this._className,".onMessageModified conversationID:").concat(e," uniqueID:").concat(o," has:").concat(n)),n){var a=this.list.get(e).get(o),s=t.messageVersion,r=t.elements,i=t.cloudCustomData;return a.version<s?(a.version=s,a._elements=JSON.parse(JSON.stringify(r)),a.payload=JSON.parse(JSON.stringify(r[0].content)),a.type=r[0].type,a.cloudCustomData=i,a.isModified=!0,{isUpdated:!0,message:a}):{isUpdated:!1,message:a};}return{isUpdated:!1,message:null};}},{key:"_getUniqueIDOfMessage",value:function value(e){var t=e.from,o=e.to,n=e.random,a=e.sequence,s=e.time;return"".concat(t,"-").concat(o,"-").concat(n,"-").concat(a,"-").concat(s);}},{key:"reset",value:function value(){this.list.clear(),this._latestMessageSentByPeerMap.clear(),this._latestMessageSentByMeMap.clear(),this._groupLocalLastMessageSequenceMap.clear();}}]),e;}(),ms="_a2KeyAndTinyIDUpdated",Ms="_cloudConfigUpdated",vs="_profileUpdated";function Is(e){this.mixin(e);}Is.mixin=function(e){var t=e.prototype||e;t._isReady=!1,t.ready=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e)return this._isReady?void(t?e.call(this):setTimeout(e,1)):(this._readyQueue=this._readyQueue||[],void this._readyQueue.push(e));},t.triggerReady=function(){var e=this;this._isReady=!0,setTimeout(function(){var t=e._readyQueue;e._readyQueue=[],t&&t.length>0&&t.forEach(function(e){e.call(this);},e);},1);},t.resetReady=function(){this._isReady=!1,this._readyQueue=[];},t.isReady=function(){return this._isReady;};};var ys=["jpg","jpeg","gif","png","bmp","image","webp"],Ts=["mp4"],Es=1,Cs=2,Ss=3,Ds=255,Ns=function(){function e(t){var o=this;n(this,e),Kt(t)||(this.userID=t.userID||"",this.nick=t.nick||"",this.gender=t.gender||"",this.birthday=t.birthday||0,this.location=t.location||"",this.selfSignature=t.selfSignature||"",this.allowType=t.allowType||D.ALLOW_TYPE_ALLOW_ANY,this.language=t.language||0,this.avatar=t.avatar||"",this.messageSettings=t.messageSettings||0,this.adminForbidType=t.adminForbidType||D.FORBID_TYPE_NONE,this.level=t.level||0,this.role=t.role||0,this.lastUpdatedTime=0,this.profileCustomField=[],Kt(t.profileCustomField)||t.profileCustomField.forEach(function(e){o.profileCustomField.push({key:e.key,value:e.value});}));}return s(e,[{key:"validate",value:function value(e){var t=!0,o="";if(Kt(e))return{valid:!1,tips:"empty options"};if(e.profileCustomField)for(var n=e.profileCustomField.length,a=null,s=0;s<n;s++){if(a=e.profileCustomField[s],!ze(a.key)||-1===a.key.indexOf("Tag_Profile_Custom"))return{valid:!1,tips:"自定义资料字段的前缀必须是 Tag_Profile_Custom"};if(!ze(a.value))return{valid:!1,tips:"自定义资料字段的 value 必须是字符串"};}for(var r in e){if(Object.prototype.hasOwnProperty.call(e,r)){if("profileCustomField"===r)continue;if(Kt(e[r])&&!ze(e[r])&&!$e(e[r])){o="key:"+r+", invalid value:"+e[r],t=!1;continue;}switch(r){case"nick":ze(e[r])||(o="nick should be a string",t=!1),lt(e[r])>500&&(o="nick name limited: must less than or equal to ".concat(500," bytes, current size: ").concat(lt(e[r])," bytes"),t=!1);break;case"gender":gt(qe,e.gender)||(o="key:gender, invalid value:"+e.gender,t=!1);break;case"birthday":$e(e.birthday)||(o="birthday should be a number",t=!1);break;case"location":ze(e.location)||(o="location should be a string",t=!1);break;case"selfSignature":ze(e.selfSignature)||(o="selfSignature should be a string",t=!1);break;case"allowType":gt(Be,e.allowType)||(o="key:allowType, invalid value:"+e.allowType,t=!1);break;case"language":$e(e.language)||(o="language should be a number",t=!1);break;case"avatar":ze(e.avatar)||(o="avatar should be a string",t=!1);break;case"messageSettings":0!==e.messageSettings&&1!==e.messageSettings&&(o="messageSettings should be 0 or 1",t=!1);break;case"adminForbidType":gt(Ve,e.adminForbidType)||(o="key:adminForbidType, invalid value:"+e.adminForbidType,t=!1);break;case"level":$e(e.level)||(o="level should be a number",t=!1);break;case"role":$e(e.role)||(o="role should be a number",t=!1);break;default:o="unknown key:"+r+" "+e[r],t=!1;}}}return{valid:t,tips:o};}}]),e;}(),As=s(function e(t){n(this,e),this.value=t,this.next=null;}),Os=function(){function e(t){n(this,e),this.MAX_LENGTH=t,this.pTail=null,this.pNodeToDel=null,this.map=new Map(),be.debug("SinglyLinkedList init MAX_LENGTH:".concat(this.MAX_LENGTH));}return s(e,[{key:"set",value:function value(e){var t=new As(e);if(this.map.size<this.MAX_LENGTH)null===this.pTail?(this.pTail=t,this.pNodeToDel=t):(this.pTail.next=t,this.pTail=t),this.map.set(e,1);else{var o=this.pNodeToDel;this.pNodeToDel=this.pNodeToDel.next,this.map.delete(o.value),o.next=null,o=null,this.pTail.next=t,this.pTail=t,this.map.set(e,1);}}},{key:"has",value:function value(e){return this.map.has(e);}},{key:"delete",value:function value(e){this.has(e)&&this.map.delete(e);}},{key:"tail",value:function value(){return this.pTail;}},{key:"size",value:function value(){return this.map.size;}},{key:"data",value:function value(){return Array.from(this.map.keys());}},{key:"reset",value:function value(){for(var e;null!==this.pNodeToDel;){e=this.pNodeToDel,this.pNodeToDel=this.pNodeToDel.next,e.next=null,e=null;}this.pTail=null,this.map.clear();}}]),e;}(),Rs=["groupID","name","avatar","type","introduction","notification","ownerID","selfInfo","createTime","infoSequence","lastInfoTime","lastMessage","nextMessageSeq","memberNum","maxMemberNum","memberList","joinOption","groupCustomField","muteAllMembers","isSupportTopic"],Ls=function(){function e(t){n(this,e),this.groupID="",this.name="",this.avatar="",this.type="",this.introduction="",this.notification="",this.ownerID="",this.createTime="",this.infoSequence="",this.lastInfoTime="",this.selfInfo={messageRemindType:"",joinTime:"",nameCard:"",role:"",userID:"",memberCustomField:void 0,readedSequence:0,excludedUnreadSequenceList:void 0},this.lastMessage={lastTime:"",lastSequence:"",fromAccount:"",messageForShow:""},this.nextMessageSeq="",this.memberNum="",this.memberCount="",this.maxMemberNum="",this.maxMemberCount="",this.joinOption="",this.groupCustomField=[],this.muteAllMembers=!1,this.isSupportTopic=!1,this._initGroup(t);}return s(e,[{key:"memberNum",get:function get(){return be.warn("!!!v2.8.0起弃用memberNum,请使用 memberCount"),this.memberCount;},set:function set(e){}},{key:"maxMemberNum",get:function get(){return be.warn("!!!v2.8.0起弃用maxMemberNum,请使用 maxMemberCount"),this.maxMemberCount;},set:function set(e){}},{key:"_initGroup",value:function value(e){for(var t in e){Rs.indexOf(t)<0||("selfInfo"!==t?("memberNum"===t&&(this.memberCount=e[t]),"maxMemberNum"===t&&(this.maxMemberCount=e[t]),"isSupportTopic"!==t?this[t]=e[t]:this.isSupportTopic=1===e[t]):this.updateSelfInfo(e[t]));}}},{key:"updateGroup",value:function value(e){var t=this,o=JSON.parse(JSON.stringify(e));o.lastMsgTime&&(this.lastMessage.lastTime=o.lastMsgTime),Ze(o.muteAllMembers)||("On"===o.muteAllMembers?o.muteAllMembers=!0:o.muteAllMembers=!1),o.groupCustomField&&Mt(this.groupCustomField,o.groupCustomField),Ze(o.memberNum)||(this.memberCount=o.memberNum),Ze(o.maxMemberNum)||(this.maxMemberCount=o.maxMemberNum),Ze(o.isSupportTopic)||(this.isSupportTopic=$e(o.isSupportTopic)?1===o.isSupportTopic:o.isSupportTopic),ct(this,o,["members","errorCode","lastMsgTime","groupCustomField","memberNum","maxMemberNum","isSupportTopic"]),Qe(o.members)&&o.members.length>0&&o.members.forEach(function(e){e.userID===t.selfInfo.userID&&ct(t.selfInfo,e,["sequence"]);});}},{key:"updateSelfInfo",value:function value(e){var o={nameCard:e.nameCard,joinTime:e.joinTime,role:e.role,messageRemindType:e.messageRemindType,readedSequence:e.readedSequence,excludedUnreadSequenceList:e.excludedUnreadSequenceList};ct(this.selfInfo,t({},o),[],["",null,void 0,0,NaN]);}},{key:"setSelfNameCard",value:function value(e){this.selfInfo.nameCard=e;}}]),e;}(),ks=function ks(e){return Ze(e)?{lastTime:0,lastSequence:0,fromAccount:0,messageForShow:"",payload:null,type:"",isRevoked:!1,cloudCustomData:"",onlineOnlyFlag:!1,nick:"",nameCard:"",version:0,isPeerRead:!1}:e instanceof ns?{lastTime:e.time||0,lastSequence:e.sequence||0,fromAccount:e.from||"",messageForShow:Ft(e.type,e.payload),payload:e.payload||null,type:e.type||null,isRevoked:e.isRevoked||!1,cloudCustomData:e.cloudCustomData||"",onlineOnlyFlag:e._onlineOnlyFlag||!1,nick:e.nick||"",nameCard:e.nameCard||"",version:e.version||0,isPeerRead:e.isPeerRead||!1}:t(t({},e),{},{messageForShow:Ft(e.type,e.payload)});},Gs=function(){function e(t){n(this,e),this.conversationID=t.conversationID||"",this.unreadCount=t.unreadCount||0,this.type=t.type||"",this.lastMessage=ks(t.lastMessage),t.lastMsgTime&&(this.lastMessage.lastTime=t.lastMsgTime),this._isInfoCompleted=!1,this.peerReadTime=t.peerReadTime||0,this.groupAtInfoList=[],this.remark="",this.isPinned=t.isPinned||!1,this.messageRemindType="",this.markList=[],this.customData="",this.conversationGroupList=t.conversationGroupList||[],this._initProfile(t);}return s(e,[{key:"toAccount",get:function get(){return this.conversationID.startsWith(D.CONV_C2C)?this.conversationID.replace(D.CONV_C2C,""):this.conversationID.startsWith(D.CONV_GROUP)?this.conversationID.replace(D.CONV_GROUP,""):"";}},{key:"subType",get:function get(){return this.groupProfile?this.groupProfile.type:"";}},{key:"_initProfile",value:function value(e){var t=this;Object.keys(e).forEach(function(o){switch(o){case"userProfile":t.userProfile=e.userProfile;break;case"groupProfile":t.groupProfile=e.groupProfile;}}),Ze(this.userProfile)&&this.type===D.CONV_C2C?this.userProfile=new Ns({userID:e.conversationID.replace("C2C","")}):Ze(this.groupProfile)&&this.type===D.CONV_GROUP&&(this.groupProfile=new Ls({groupID:e.conversationID.replace("GROUP","")}));}},{key:"updateUnreadCount",value:function value(e){var t=e.nextUnreadCount,o=e.isFromGetConversations,n=e.isUnreadC2CMessage;Ze(t)||(It(this.subType)?this.unreadCount=0:o&&this.type===D.CONV_GROUP||o&&this.type===D.CONV_TOPIC||n&&this.type===D.CONV_C2C?this.unreadCount=t:this.unreadCount=this.unreadCount+t);}},{key:"updateLastMessage",value:function value(e){this.lastMessage=ks(e);}},{key:"updateGroupAtInfoList",value:function value(e){if(!this._isNeedMergeGroupAtInfo(e)){var t,o=(v(t=e.groupAtType)||I(t)||y(t)||E()).slice(0);-1!==o.indexOf(D.CONV_AT_ME)&&-1!==o.indexOf(D.CONV_AT_ALL)&&(o=[D.CONV_AT_ALL_AT_ME]);var n={from:e.from,groupID:e.groupID,topicID:e.topicID,messageSequence:e.sequence,atTypeArray:o,__random:e.__random,__sequence:e.__sequence};this.groupAtInfoList.push(n),be.debug("Conversation.updateGroupAtInfoList conversationID:".concat(this.conversationID),this.groupAtInfoList);}}},{key:"_isNeedMergeGroupAtInfo",value:function value(e){var t=e.groupID,o=e.sequence;if(!yt({groupID:t}))return!1;var n=!1;return this.groupAtInfoList.forEach(function(t){t.messageSequence===o&&(t.atTypeArray.indexOf(D.CONV_AT_ME)>-1&&e.groupAtType.indexOf(D.CONV_AT_ALL)>-1&&(t.atTypeArray=[D.CONV_AT_ALL_AT_ME]),t.atTypeArray.indexOf(D.CONV_AT_ALL)>-1&&e.groupAtType.indexOf(D.CONV_AT_ME)>-1&&(t.atTypeArray=[D.CONV_AT_ALL_AT_ME],t.__random=e.__random,t.__sequence=e.__sequence),n=!0);}),n;}},{key:"clearGroupAtInfoList",value:function value(){this.groupAtInfoList.length=0;}},{key:"reduceUnreadCount",value:function value(){return this.unreadCount>=1&&(this.unreadCount-=1,!0);}},{key:"isLastMessageRevoked",value:function value(e){var t=e.sequence,o=e.time;return this.type===D.CONV_C2C&&t===this.lastMessage.lastSequence&&o===this.lastMessage.lastTime||this.type===D.CONV_GROUP&&t===this.lastMessage.lastSequence;}},{key:"setLastMessageRevoked",value:function value(e){this.lastMessage.isRevoked=e;}}]),e;}(),Ps=function(){function e(t){n(this,e),this._conversationModule=t,this._className="MessageRemindHandler",this._updateSequence=0;}return s(e,[{key:"getC2CMessageRemindType",value:function value(){var e=this,t="".concat(this._className,".getC2CMessageRemindType");return this._conversationModule.request({protocolName:jo,updateSequence:this._updateSequence}).then(function(o){be.log("".concat(t," ok"));var n=o.data,a=n.updateSequence,s=n.muteFlagList;e._updateSequence=a,e._patchC2CMessageRemindType(s);}).catch(function(e){be.error("".concat(t," failed. error:"),e);});}},{key:"_patchC2CMessageRemindType",value:function value(e){var t=this,o=0,n="";Qe(e)&&e.length>0&&e.forEach(function(e){var a=e.userID,s=e.muteFlag;0===s?n=D.MSG_REMIND_ACPT_AND_NOTE:1===s?n=D.MSG_REMIND_DISCARD:2===s&&(n=D.MSG_REMIND_ACPT_NOT_NOTE),!0===t._conversationModule.patchMessageRemindType({ID:a,isC2CConversation:!0,messageRemindType:n})&&(o+=1);}),be.log("".concat(this._className,"._patchC2CMessageRemindType count:").concat(o));}},{key:"set",value:function value(e){return e.groupID?this._setGroupMessageRemindType(e):Qe(e.userIDList)?this._setC2CMessageRemindType(e):void 0;}},{key:"_setGroupMessageRemindType",value:function value(e){var t=this,o="".concat(this._className,"._setGroupMessageRemindType"),n=e.groupID,a=e.messageRemindType,s="groupID:".concat(n," messageRemindType:").concat(a),r=new Va(Ba.SET_MESSAGE_REMIND_TYPE);return r.setMessage(s),this._getModule(uo).modifyGroupMemberInfo({groupID:n,messageRemindType:a,userID:this._conversationModule.getMyUserID()}).then(function(){r.setNetworkType(t._conversationModule.getNetworkType()).end(),be.log("".concat(o," ok. ").concat(s));var n=t.onGroupMessageRemindTypeUpdated(e);return as(n);}).catch(function(e){return t._conversationModule.probeNetwork().then(function(t){var o=m(t,2),n=o[0],a=o[1];r.setError(e,n,a).end();}),be.error("".concat(o," failed. error:"),e),gs(e);});}},{key:"onGroupMessageRemindTypeUpdated",value:function value(e){var t=e.groupID,o=e.messageRemindType,n=this._getModule(io).getLocalGroupProfile(t);if(n&&(n.selfInfo.messageRemindType=o),Tt(t)){var a=t,s=wt(a),r=this._getModule(lo).getLocalTopic(s,a);return r&&(r.updateSelfInfo({messageRemindType:o}),this._conversationModule.emitOuterEvent(S.TOPIC_UPDATED,{groupID:s,topic:r})),{topic:r};}return this._conversationModule.patchMessageRemindType({ID:t,isC2CConversation:!1,messageRemindType:o})&&this._emitConversationUpdate(),{group:n};}},{key:"_setC2CMessageRemindType",value:function value(e){var t=this,o="".concat(this._className,"._setC2CMessageRemindType"),n=e.userIDList,a=e.messageRemindType,s=n.slice(0,30),r=0;a===D.MSG_REMIND_DISCARD?r=1:a===D.MSG_REMIND_ACPT_NOT_NOTE&&(r=2);var i="userIDList:".concat(s," messageRemindType:").concat(a),c=new Va(Ba.SET_MESSAGE_REMIND_TYPE);return c.setMessage(i),this._conversationModule.request({protocolName:Yo,requestData:{userIDList:s,muteFlag:r}}).then(function(e){c.setNetworkType(t._conversationModule.getNetworkType()).end();var n=e.data,r=n.updateSequence,i=n.errorList;t._updateSequence=r;var u=[],l=[];Qe(i)&&i.forEach(function(e){u.push(e.userID),l.push({userID:e.userID,code:e.errorCode});});var d=s.filter(function(e){return-1===u.indexOf(e);});be.log("".concat(o," ok. successUserIDList:").concat(d," failureUserIDList:").concat(JSON.stringify(l)));var p=0;return d.forEach(function(e){t._conversationModule.patchMessageRemindType({ID:e,isC2CConversation:!0,messageRemindType:a})&&(p+=1);}),p>=1&&t._emitConversationUpdate(),s.length=u.length=0,_s({successUserIDList:d.map(function(e){return{userID:e};}),failureUserIDList:l});}).catch(function(e){return t._conversationModule.probeNetwork().then(function(t){var o=m(t,2),n=o[0],a=o[1];c.setError(e,n,a).end();}),be.error("".concat(o," failed. error:"),e),gs(e);});}},{key:"_getModule",value:function value(e){return this._conversationModule.getModule(e);}},{key:"_emitConversationUpdate",value:function value(){this._conversationModule.emitConversationUpdate(!0,!1);}},{key:"setUpdateSequence",value:function value(e){this._updateSequence=e;}},{key:"reset",value:function value(){be.log("".concat(this._className,".reset")),this._updateSequence=0;}}]),e;}(),Us=function(){function e(t){n(this,e),this._conversationModule=t,this._className="ConvGroupHandler",this._convGroupMap=new Map(),this._startIndex=0,this._pagingStatus=jt.NOT_START;}return s(e,[{key:"setConvCustomData",value:function value(e){var t=this,o="".concat(this._className,".setConvCustomData"),n=e.conversationIDList,a=e.customData;be.log("".concat(o," options:"),e);var s=new Va(Ba.SET_CONV_CUSTOM_DATA);s.setMessage(JSON.stringify(e));var r={fromAccount:this._getMyUserID(),itemList:[]},i=[],c=[];return n.forEach(function(e){if(!t._hasLocalConversation(e))return t._onConversationNotFound(c,e),!0;if(!Et(e)&&!Ct(e))return t._onConversationIDInvalid(c,e),!0;var o={operationType:2,contactItem:void 0,customMark:a};Et(e)?o.contactItem={type:1,toAccount:e.replace(D.CONV_C2C,"")}:Ct(e)&&(o.contactItem={type:2,groupID:e.replace(D.CONV_GROUP,"")}),r.itemList.push(o);}),c.length===n.length?_s({successConversationIDList:i,failureConversationIDList:c}):this._conversationModule.request({protocolName:nn,requestData:r}).then(function(e){s.setNetworkType(t._conversationModule.getNetworkType()).end(),be.log("".concat(o," ok"));var n=e.data.resultItem;if(Qe(n)){var r,u,l=!1;n.forEach(function(e){r=t._concatConversationID(e.contactItem),0===e.resultCode?(i.push(r),(u=t._getLocalConversation(r))&&u.customData!==a&&(u.customData=a,l=!0)):c.push({conversationID:r,code:e.resultCode,message:e.resultInfo});}),!0===l&&t._emitConversationUpdate();}return as({successConversationIDList:i,failureConversationIDList:c});}).catch(function(e){return t._conversationModule.probeNetwork().then(function(t){var o=m(t,2),n=o[0],a=o[1];s.setError(e,n,a).end();}),be.error("".concat(o," failed. error:"),e),gs(e);});}},{key:"markConversation",value:function value(e){var t=this;if(!this._conversationModule.canIUse(H.CONV_MARK))return gs({code:Ca.CANNOT_USE_COMMERCIAL_ABILITY,message:Sa.CANNOT_USE_COMMERCIAL_ABILITY});var o="".concat(this._className,".markConversation"),n=e.conversationIDList,a=e.markType,s=e.enableMark;be.log("".concat(o," options:"),e);var r=new Va(Ba.MARK_CONVERSATION);r.setMessage(JSON.stringify(e));var i=void 0,c=void 0,u=this._getFlagBit(a);!0===s?c=[u]:i=[u];var l={fromAccount:this._getMyUserID(),itemList:[]},d=[],p=[];return n.forEach(function(e){if(!t._hasLocalConversation(e))return t._onConversationNotFound(p,e),!0;if(!Et(e)&&!Ct(e))return t._onConversationIDInvalid(p,e),!0;var o={operationType:1,contactItem:void 0,clearMark:i,setMark:c};Et(e)?o.contactItem={type:1,toAccount:e.replace(D.CONV_C2C,"")}:Ct(e)&&(o.contactItem={type:2,groupID:e.replace(D.CONV_GROUP,"")}),l.itemList.push(o);}),p.length===n.length?_s({successConversationIDList:d,failureConversationIDList:p}):this._conversationModule.request({protocolName:an,requestData:l}).then(function(e){r.setNetworkType(t._conversationModule.getNetworkType()).end(),be.log("".concat(o," ok"));var n=e.data.resultItem;if(Qe(n)){var i,c,u=!1;n.forEach(function(e){if(i=t._concatConversationID(e.contactItem),0===e.resultCode){if(d.push(i),c=t._getLocalConversation(i)){var o=c.markList.indexOf(a);!0===s?-1===o&&(c.markList.push(a),u=!0):-1!==o&&(c.markList.splice(o,1),u=!0);}}else p.push({conversationID:i,code:e.resultCode,message:e.resultInfo});}),!0===u&&t._emitConversationUpdate();}return as({successConversationIDList:d,failureConversationIDList:p});}).catch(function(e){return t._conversationModule.probeNetwork().then(function(t){var o=m(t,2),n=o[0],a=o[1];r.setError(e,n,a).end();}),be.error("".concat(o," failed. error:"),e),gs(e);});}},{key:"getLocalConvGroupList",value:function value(){var e=this;return be.log("".concat(this._className,".getLocalConvGroupList pagingStatus:").concat(this._pagingStatus)),this._pagingStatus===jt.REJECTED?this.getRemoteConvGroupList().then(function(){return as(M(e._convGroupMap.values()));}):_s(M(this._convGroupMap.values()));}},{key:"getRemoteConvGroupList",value:function value(){var e=this,t="".concat(this._className,".getRemoteConvGroupList");return this._pagingStatus=jt.PENDING,this._conversationModule.request({protocolName:dn,requestData:{fromAccount:this._getMyUserID(),startIndex:this._startIndex}}).then(function(o){var n,a,s=o.data,r=s.completeFlag,i=s.contactItem,c=s.nextStartIndex,u=void 0===c?0:c,l=s.groupItem;(e._startIndex=u,be.log("".concat(t," completeFlag:").concat(r," nextStartIndex:").concat(u)),Qe(l)&&l.forEach(function(t){var o=t.convGroupID,n=t.groupName;e._convGroupMap.set(o,n);}),Qe(i))&&i.forEach(function(t){var o=t.standardMark,s=t.customData,r=t.convGroupIDList;if(n=e._concatConversationID(t),(a=e._getLocalConversation(n))&&(a.markList=Vt(o),a.customData=s||"",Qe(r))){var i=[];r.forEach(function(t){e._convGroupMap.has(t)&&i.push(e._convGroupMap.get(t));}),a.conversationGroupList=[].concat(i),i.length=0;}});if(0===r)return e.getRemoteConvGroupList();1===r&&(e._pagingStatus=jt.RESOLVED,e._emitConversationUpdate(),e._emitConvGroupListUpdate());}).catch(function(o){e._pagingStatus=jt.REJECTED,be.warn("".concat(t," failed. error:"),o);});}},{key:"createConvGroup",value:function value(e){var t=this;if(!this._conversationModule.canIUse(H.CONV_GROUP))return gs({code:Ca.CANNOT_USE_COMMERCIAL_ABILITY,message:Sa.CANNOT_USE_COMMERCIAL_ABILITY});var o=new Va(Ba.CREATE_CONV_GROUP);o.setMessage(JSON.stringify(e));var n="".concat(this._className,".createConvGroup");be.log("".concat(n," options:"),e);var a=e.groupName,s=e.conversationIDList,r={fromAccount:this._getMyUserID(),itemList:[{groupName:a,contactItem:[]}]},i=[],c=[];return s.forEach(function(e){return t._hasLocalConversation(e)?Et(e)||Ct(e)?void(Et(e)?r.itemList[0].contactItem.push({type:1,toAccount:e.replace(D.CONV_C2C,"")}):Ct(e)&&r.itemList[0].contactItem.push({type:2,groupID:e.replace(D.CONV_GROUP,"")})):(t._onConversationIDInvalid(c,e),!0):(t._onConversationNotFound(c,e),!0);}),c.length===s.length?_s({successConversationIDList:i,failureConversationIDList:c}):this._conversationModule.request({protocolName:sn,requestData:r}).then(function(e){o.setNetworkType(t._conversationModule.getNetworkType()).end(),be.log("".concat(n," ok"));var s=e.data.groupResultItem[0],r=s.groupItem,u=s.resultItem;if(Xe(r)&&(t._convGroupMap.set(r.convGroupID,r.groupName),t._emitConvGroupListUpdate()),Qe(u)){var l,d,p=!1;u.forEach(function(e){l=t._concatConversationID(e.contactItem),0===e.resultCode?(i.push(l),(d=t._getLocalConversation(l))&&-1===d.conversationGroupList.indexOf(a)&&(d.conversationGroupList.push(a),p=!0)):c.push({conversationID:l,code:e.resultCode,message:e.resultInfo});}),!0===p&&(t._emitConversationUpdate(),t._emitConvGroupListUpdate());}return as({successConversationIDList:i,failureConversationIDList:c});}).catch(function(e){return t._conversationModule.probeNetwork().then(function(t){var n=m(t,2),a=n[0],s=n[1];o.setError(e,a,s).end();}),be.error("".concat(n," failed. error:"),e),gs(e);});}},{key:"deleteConvGroup",value:function value(e){var t=this;if(!this._conversationModule.canIUse(H.CONV_GROUP))return gs({code:Ca.CANNOT_USE_COMMERCIAL_ABILITY,message:Sa.CANNOT_USE_COMMERCIAL_ABILITY});var o=new Va(Ba.DELETE_CONV_GROUP);o.setMessage(e);var n="".concat(this._className,".deleteConvGroup");return be.log("".concat(n," groupName:").concat(e)),this._conversationModule.request({protocolName:rn,requestData:{fromAccount:this._getMyUserID(),groupName:[e]}}).then(function(a){o.setNetworkType(t._conversationModule.getNetworkType()).end(),be.log("".concat(n," ok"));var s=a.data.groupItem;if(Qe(s)){var r=!1;s.forEach(function(e){t._convGroupMap.has(e.convGroupID)&&(t._convGroupMap.delete(e.convGroupID),r=!0);}),!0===r&&t._emitConvGroupListUpdate();}t._eraseFromConversationGroupList([e]);}).catch(function(e){return t._conversationModule.probeNetwork().then(function(t){var n=m(t,2),a=n[0],s=n[1];o.setError(e,a,s).end();}),be.error("".concat(n," failed. error:"),e),gs(e);});}},{key:"renameConvGroup",value:function value(e){var t=this;if(!this._conversationModule.canIUse(H.CONV_GROUP))return gs({code:Ca.CANNOT_USE_COMMERCIAL_ABILITY,message:Sa.CANNOT_USE_COMMERCIAL_ABILITY});var o=new Va(Ba.RENAME_CONV_GROUP);o.setMessage(JSON.stringify(e));var n="".concat(this._className,".renameConvGroup");be.log("".concat(n," options:"),e);var a=e.oldName,s=e.newName;return this._conversationModule.request({protocolName:cn,requestData:{fromAccount:this._getMyUserID(),updateType:1,updateGroup:{updateGroupType:1,oldName:a,newName:s}}}).then(function(e){o.setNetworkType(t._conversationModule.getNetworkType()).end(),be.log("".concat(n," ok"));var r=e.data.updateGroupResult.convGroupID;t._convGroupMap.set(r,s),t._emitConvGroupListUpdate();var i,c,u=t._conversationModule.getLocalConversationList(),l=!1;u.forEach(function(e){i=e.conversationGroupList,-1!==(c=i.indexOf(a))&&(i.splice(c,1,s),l=!0);}),!0===l&&t._emitConversationUpdate();}).catch(function(e){return t._conversationModule.probeNetwork().then(function(t){var n=m(t,2),a=n[0],s=n[1];o.setError(e,a,s).end();}),be.error("".concat(n," failed. error:"),e),gs(e);});}},{key:"addConvsToGroup",value:function value(e){var t=this;if(!this._conversationModule.canIUse(H.CONV_GROUP))return gs({code:Ca.CANNOT_USE_COMMERCIAL_ABILITY,message:Sa.CANNOT_USE_COMMERCIAL_ABILITY});var o=new Va(Ba.ADD_CONVS_TO_GROUP);o.setMessage(JSON.stringify(e));var n="".concat(this._className,".addConvsToGroup");be.log("".concat(n," options:"),e);var a=e.conversationIDList,s=e.groupName,r={fromAccount:this._getMyUserID(),updateType:1,updateGroup:{updateGroupType:2,groupName:s,updateItem:[]}},i=[],c=[];return a.forEach(function(e){return t._hasLocalConversation(e)?Et(e)||Ct(e)?void(Et(e)?r.updateGroup.updateItem.push({operationType:1,contactItem:{type:1,toAccount:e.replace(D.CONV_C2C,"")}}):Ct(e)&&r.updateGroup.updateItem.push({operationType:1,contactItem:{type:2,groupID:e.replace(D.CONV_GROUP,"")}})):(t._onConversationIDInvalid(c,e),!0):(t._onConversationNotFound(c,e),!0);}),c.length===a.length?_s({successConversationIDList:i,failureConversationIDList:c}):this._conversationModule.request({protocolName:un,requestData:r}).then(function(e){o.setNetworkType(t._conversationModule.getNetworkType()).end(),be.log("".concat(n," ok"));var a=e.data.updateGroupResult.contactResultItem;if(Qe(a)){var r,u,l=!1;a.forEach(function(e){0===e.resultCode&&(r=t._concatConversationID(e.contactItem),(u=t._getLocalConversation(r))?-1===u.conversationGroupList.indexOf(s)&&(u.conversationGroupList.push(s),i.push(r),l=!0):c.push({conversationID:r,code:e.resultCode,message:e.resultInfo}));}),!0===l&&(t._emitConversationUpdate(),t._emitConvInGroupUpdate(s));}return as({successConversationIDList:i,failureConversationIDList:c});}).catch(function(e){return t._conversationModule.probeNetwork().then(function(t){var n=m(t,2),a=n[0],s=n[1];o.setError(e,a,s).end();}),be.error("".concat(n," failed. error:"),e),gs(e);});}},{key:"deleteConvsFromGroup",value:function value(e){var t=this;if(!this._conversationModule.canIUse(H.CONV_GROUP))return gs({code:Ca.CANNOT_USE_COMMERCIAL_ABILITY,message:Sa.CANNOT_USE_COMMERCIAL_ABILITY});var o=new Va(Ba.DELETE_CONVS_FROM_GROUP);o.setMessage(JSON.stringify(e));var n="".concat(this._className,".deleteConvsFromGroup");be.log("".concat(n," options:"),e);var a=e.conversationIDList,s=e.groupName,r={fromAccount:this._getMyUserID(),updateType:1,updateGroup:{updateGroupType:2,groupName:s,updateItem:[]}},i=[],c=[];return a.forEach(function(e){return t._hasLocalConversation(e)?Et(e)||Ct(e)?void(Et(e)?r.updateGroup.updateItem.push({operationType:2,contactItem:{type:1,toAccount:e.replace(D.CONV_C2C,"")}}):Ct(e)&&r.updateGroup.updateItem.push({operationType:2,contactItem:{type:2,groupID:e.replace(D.CONV_GROUP,"")}})):(t._onConversationIDInvalid(c,e),!0):(t._onConversationNotFound(c,e),!0);}),c.length===a.length?_s({successConversationIDList:i,failureConversationIDList:c}):this._conversationModule.request({protocolName:ln,requestData:r}).then(function(e){o.setNetworkType(t._conversationModule.getNetworkType()).end(),be.log("".concat(n," ok"));var a=e.data.updateGroupResult.contactResultItem;if(Qe(a)){var r,u,l=!1;a.forEach(function(e){if(0===e.resultCode)if(r=t._concatConversationID(e.contactItem),u=t._getLocalConversation(r)){var o=u.conversationGroupList.indexOf(s);-1!==o&&(u.conversationGroupList.splice(o,1),i.push(r),l=!0);}else c.push({conversationID:r,code:e.resultCode,message:e.resultInfo});}),!0===l&&(t._emitConversationUpdate(),t._emitConvInGroupUpdate());}return as({successConversationIDList:i,failureConversationIDList:c});}).catch(function(e){return t._conversationModule.probeNetwork().then(function(t){var n=m(t,2),a=n[0],s=n[1];o.setError(e,a,s).end();}),be.error("".concat(n," failed. error:"),e),gs(e);});}},{key:"onConvMarkUpdated",value:function value(e){var t=this;if(!Kt(e)){var o,n,a=!1;e.forEach(function(e){if(o=t._concatConversationID(e.recentContactItem),n=t._getLocalConversation(o))if(1===e.optType){var s=Vt(e.standardMark);!0!==function(e,t){if(e===t)return!0;if(!e||!t)return!1;if(e.length!==t.length)return!1;for(var o=0,n=e.length;o<n;o++){if(e[o]!==t[o])return!1;}return!0;}(n.markList,s)&&(n.markList=s,a=!0);}else 2===e.optType&&n.customData!==e.customMark&&void 0!==e.customMark&&(n.customData=e.customMark,a=!0);}),!0===a&&this._emitConversationUpdate();}}},{key:"onConvGroupCreated",value:function value(e){var t=this,o=!1,n=!1;Qe(e)&&(e.forEach(function(e){var a=e.msgGroupItem,s=a.groupID,r=a.groupName;t._convGroupMap.get(s)!==r&&(t._convGroupMap.set(s,r),n=!0);var i,c,u=e.msgRecentContactItem;Qe(u)&&u.forEach(function(e){i=t._concatConversationID(e),(c=t._getLocalConversation(i))&&-1===c.conversationGroupList.indexOf(r)&&(c.conversationGroupList.push(r),o=!0);});}),!0===o&&this._emitConversationUpdate(),!0===n&&this._emitConvGroupListUpdate());}},{key:"onConvGroupDeleted",value:function value(e){var t=this,o=[];if(Qe(e)){var n=!1;e.forEach(function(e){var a=e.groupID,s=e.groupName;t._convGroupMap.has(a)&&(t._convGroupMap.delete(a),n=!0,o.push(s));}),!0===n&&this._emitConvGroupListUpdate();}this._eraseFromConversationGroupList(o);}},{key:"_eraseFromConversationGroupList",value:function value(e){Kt(e)||(this._conversationModule.getLocalConversationList().forEach(function(t){t.conversationGroupList=t.conversationGroupList.filter(function(t){return!e.includes(t);});}),this._emitConversationUpdate());}},{key:"onConvGroupNameUpdated",value:function value(e){var t=e.groupID,o=e.groupName,n=e.oldGroupName;if(this._convGroupMap.get(t)!==o){this._convGroupMap.set(t,o),this._emitConvGroupListUpdate();var a,s,r=this._conversationModule.getLocalConversationList(),i=!1;r.forEach(function(e){a=e.conversationGroupList,-1!==(s=a.indexOf(n))&&(a.splice(s,1,o),i=!0);}),!0===i&&this._emitConversationUpdate();}}},{key:"onConvInGroupUpdated",value:function value(e){var t=this,o=e.oldGroupName,n=e.recentContactUpdateGroupItem;if(Qe(n)){var a,s,r=!1;n.forEach(function(e){var n=e.contactOptType;if(a=t._concatConversationID(e.recentContactItem),s=t._getLocalConversation(a))if(1===n)-1===s.conversationGroupList.indexOf(o)&&(s.conversationGroupList.push(o),r=!0);else if(2===n){var i=s.conversationGroupList.indexOf(o);-1!==i&&(s.conversationGroupList.splice(i,1),r=!0);}}),!0===r&&(this._emitConversationUpdate(),this._emitConvInGroupUpdate(o));}}},{key:"onConvGroupListSynced",value:function value(e){var t=this;Qe(e)&&0!==e.length&&(be.log("".concat(this._className,".onConvGroupListSynced count:").concat(e.length)),e.forEach(function(e){t._convGroupMap.set(e.convGroupID,e.groupName);}));}},{key:"getConvGroupListByID",value:function value(e){var t=this;if(!Kt(e)){var o=[];return e.forEach(function(e){t._convGroupMap.has(e)&&o.push(t._convGroupMap.get(e));}),o;}}},{key:"_onConversationNotFound",value:function value(e,t){e.push({conversationID:t,code:Ca.CONVERSATION_NOT_FOUND,message:Sa.CONVERSATION_NOT_FOUND});}},{key:"_onConversationIDInvalid",value:function value(e,t){e.push({conversationID:t,code:Ca.INVALID_CONVERSATION_ID,message:Sa.INVALID_CONVERSATION_ID});}},{key:"_getFlagBit",value:function value(e){for(var t=e.toString(2),o=t.length,n=o-1;n>=0;n--){if("1"===t[n])return o-n-1;}}},{key:"_concatConversationID",value:function value(e){var t,o=e.type,n=e.to,a=e.groupID,s=e.userID;return 1===o?Ze(s)?Ze(n)||(t="".concat(D.CONV_C2C).concat(n)):t="".concat(D.CONV_C2C).concat(s):2===o&&(t="".concat(D.CONV_GROUP).concat(a)),t;}},{key:"_getMyUserID",value:function value(){return this._conversationModule.getMyUserID();}},{key:"_insertConversationGroup",value:function value(e,t){var o=this._getLocalConversation(e);if(o){var n=o.conversationGroupList;-1===n.indexOf(t)&&n.push(t);}}},{key:"_getLocalConversation",value:function value(e){return this._conversationModule.getLocalConversation(e);}},{key:"_hasLocalConversation",value:function value(e){return this._conversationModule.hasLocalConversation(e);}},{key:"_emitConversationUpdate",value:function value(){this._conversationModule.emitConversationUpdate(!0,!1);}},{key:"_emitConvGroupListUpdate",value:function value(){this._conversationModule.emitOuterEvent(S.CONVERSATION_GROUP_LIST_UPDATED,M(this._convGroupMap.values()));}},{key:"_emitConvInGroupUpdate",value:function value(e){var t={groupName:e,conversationList:[]},o=this._conversationModule.getLocalConversationList();t.conversationList=o.filter(function(t){return t.conversationGroupList.includes(e);}),this._conversationModule.emitOuterEvent(S.CONVERSATION_IN_GROUP_UPDATED,t);}},{key:"reset",value:function value(){be.log("".concat(this._className,".reset")),this._convGroupMap.clear(),this._startIndex=0,this._pagingStatus=jt.NOT_START;}}]),e;}(),bs=function(e){i(a,e);var o=f(a);function a(e){var t;return n(this,a),(t=o.call(this,e))._className="ConversationModule",Is.mixin(g(t)),t._messageListHandler=new fs(),t._messageRemindHandler=new Ps(g(t)),t._convGroupHandler=new Us(g(t)),t.singlyLinkedList=new Os(100),t._pagingStatus=jt.NOT_START,t._pagingTimeStamp=0,t._pagingStartIndex=0,t._pagingPinnedTimeStamp=0,t._pagingPinnedStartIndex=0,t._conversationMap=new Map(),t._tmpGroupList=[],t._tmpGroupAtTipsList=[],t._peerReadTimeMap=new Map(),t._completedMap=new Map(),t._roamingMessageKeyAndTimeMap=new Map(),t._roamingMessageSequenceMap=new Map(),t._remoteGroupReadSequenceMap=new Map(),t._initListeners(),t;}return s(a,[{key:"_initListeners",value:function value(){var e=this.getInnerEmitterInstance();e.on(ms,this._initLocalConversationList,this),e.on(vs,this._onProfileUpdated,this);}},{key:"onCheckTimer",value:function value(e){e%60==0&&this._messageListHandler.traversal();}},{key:"_initLocalConversationList",value:function value(){var e=this,t=new Va(Ba.GET_CONVERSATION_LIST_IN_STORAGE);be.log("".concat(this._className,"._initLocalConversationList."));var o="",n=this._getStorageConversationList();if(n){for(var a=n.length,s=0;s<a;s++){var r=n[s];if(r){if(r.conversationID==="".concat(D.CONV_C2C,"@TLS#ERROR")||r.conversationID==="".concat(D.CONV_C2C,"@TLS#NOT_FOUND"))continue;if(r.groupProfile){var i=r.groupProfile.type;if(It(i))continue;}}this._conversationMap.set(n[s].conversationID,new Gs(n[s]));}this.emitConversationUpdate(!0,!1),o="count:".concat(a);}else o="count:0";t.setNetworkType(this.getNetworkType()).setMessage(o).end(),this.getModule(ro)||this.triggerReady(),this.ready(function(){e._tmpGroupList.length>0&&(e.updateConversationGroupProfile(e._tmpGroupList),e._tmpGroupList.length=0);}),this.syncConversationList();}},{key:"onMessageSent",value:function value(e){this._onSendOrReceiveMessage({conversationOptionsList:e.conversationOptionsList,isInstantMessage:!0});}},{key:"onNewMessage",value:function value(e){this._onSendOrReceiveMessage(e);}},{key:"_onSendOrReceiveMessage",value:function value(e){var t=this,o=e.conversationOptionsList,n=e.isInstantMessage,a=void 0===n||n,s=e.isUnreadC2CMessage,r=void 0!==s&&s;this._isReady?0!==o.length&&(this._getC2CPeerReadTime(o),this._updateLocalConversationList({conversationOptionsList:o,isInstantMessage:a,isUnreadC2CMessage:r,isFromGetConversations:!1}),this._setStorageConversationList(),o.filter(function(e){return e.type===D.CONV_TOPIC;}).length>0||this.emitConversationUpdate()):this.ready(function(){t._onSendOrReceiveMessage(e);});}},{key:"updateConversationGroupProfile",value:function value(e){var t=this;if(!Qe(e)||0!==e.length)if(0!==this._conversationMap.size){var o=!1;e.forEach(function(e){var n="GROUP".concat(e.groupID);if(t._conversationMap.has(n)){o=!0;var a=t._conversationMap.get(n);a.groupProfile=JSON.parse(JSON.stringify(e)),a.lastMessage.lastSequence<e.nextMessageSeq&&(a.lastMessage.lastSequence=e.nextMessageSeq-1),a.subType||(a.subType=e.type);}}),o&&this.emitConversationUpdate(!0,!1);}else this._tmpGroupList=e;}},{key:"_updateConversationUserProfile",value:function value(e){var t=this;e.data.forEach(function(e){var o="C2C".concat(e.userID);t._conversationMap.has(o)&&(t._conversationMap.get(o).userProfile=e);}),this.emitConversationUpdate(!0,!1);}},{key:"onMessageRevoked",value:function value(e){var t=this;if(0!==e.length){var o=null,n=!1,a=[];e.forEach(function(e){(o=t._conversationMap.get(e.conversationID))&&(o.type===D.CONV_TOPIC?a.push(e):(o.reduceUnreadCount()&&(n=!0),o.isLastMessageRevoked(e)&&(o.setLastMessageRevoked(!0),n=!0)));}),this.getModule(lo).onMessageRevoked(a),n&&this.emitConversationUpdate(!0,!1);}}},{key:"onMessageDeleted",value:function value(e){var t=this;if(0!==e.length){var o=null;e.forEach(function(e){(o=t._messageListHandler.getLocalMessage(e.conversationID,e.ID))&&(o.isDeleted=!0),e!==o&&(e.isDeleted=!0);});for(var n=e[0].conversationID,a=this._messageListHandler.getLocalMessageList(n),s={},r=a.length-1;r>=0;r--){if(!a[r].isDeleted){s=a[r];break;}}var i=this._conversationMap.get(n);if(i){var c=!1;i.lastMessage.lastSequence===s.sequence&&i.lastMessage.lastTime===s.time||(Kt(s)&&(s=void 0),i.updateLastMessage(s),i.type!==D.CONV_TOPIC&&(c=!0),be.log("".concat(this._className,".onMessageDeleted. update conversationID:").concat(n," with lastMessage:"),i.lastMessage)),n.startsWith(D.CONV_C2C)&&this.updateUnreadCount(n),c&&this.emitConversationUpdate(!0,!1);}}}},{key:"onMessageModified",value:function value(e){var t=e.conversationType,o=e.from,n=e.to,a=e.time,s=e.sequence,r=e.elements,i=e.cloudCustomData,c=e.messageVersion,u=this.getMyUserID(),l="".concat(t).concat(n);n===u&&t===D.CONV_C2C&&(l="".concat(t).concat(o));var d=this._messageListHandler.onMessageModified(l,e),p=d.isUpdated,_=d.message;!0===p&&this.emitOuterEvent(S.MESSAGE_MODIFIED,[_]);var g=this._isTopicConversation(l);if(be.log("".concat(this._className,".onMessageModified isUpdated:").concat(p," isTopicMessage:").concat(g," from:").concat(o," to:").concat(n)),g){this.getModule(lo).onMessageModified(e);}else{var h=this._conversationMap.get(l);if(h){var f=h.lastMessage;be.debug("".concat(this._className.onMessageModified," lastMessage:"),JSON.stringify(f),"options:",JSON.stringify(e)),f&&f.lastTime===a&&f.lastSequence===s&&f.version!==c&&(f.type=r[0].type,f.payload=r[0].content,f.messageForShow=Ft(f.type,f.payload),f.cloudCustomData=i,f.version=c,this.emitConversationUpdate(!0,!1));}}return _;}},{key:"onNewGroupAtTips",value:function value(e){var o=this,n=e.dataList,a=null;n.forEach(function(e){e.groupAtTips?a=e.groupAtTips:e.elements?a=t(t({},e.elements),{},{sync:!0}):e.groupAtType&&(a=t(t({},e),{},{sync:!0})),a.__random=e.random,a.__sequence=e.clientSequence,o._tmpGroupAtTipsList.push(a);}),be.debug("".concat(this._className,".onNewGroupAtTips isReady:").concat(this._isReady),this._tmpGroupAtTipsList),this._isReady&&this._handleGroupAtTipsList();}},{key:"_handleGroupAtTipsList",value:function value(){var e=this;if(0!==this._tmpGroupAtTipsList.length){var t=!1;this._tmpGroupAtTipsList.forEach(function(o){var n=o.groupID,a=o.from,s=o.topicID,r=void 0===s?void 0:s,i=o.sync,c=void 0!==i&&i;if(a!==e.getMyUserID())if(Ze(r)){var u=e._conversationMap.get("".concat(D.CONV_GROUP).concat(n));u&&(u.updateGroupAtInfoList(o),t=!0);}else{var l=e._conversationMap.get("".concat(D.CONV_GROUP).concat(r));if(l){l.updateGroupAtInfoList(o);var d=e.getModule(lo),p=l.groupAtInfoList;d.onConversationProxy({topicID:r,groupAtInfoList:p});}if(Kt(l)&&c)e.updateTopicConversation([{conversationID:"".concat(D.CONV_GROUP).concat(r),type:D.CONV_TOPIC}]),e._conversationMap.get("".concat(D.CONV_GROUP).concat(r)).updateGroupAtInfoList(o);}}),t&&this.emitConversationUpdate(!0,!1),this._tmpGroupAtTipsList.length=0;}}},{key:"_getC2CPeerReadTime",value:function value(e){var t=this,o=[];if(e.forEach(function(e){t._conversationMap.has(e.conversationID)||e.type!==D.CONV_C2C||o.push(e.conversationID.replace(D.CONV_C2C,""));}),o.length>0){be.debug("".concat(this._className,"._getC2CPeerReadTime userIDList:").concat(o));var n=this.getModule(ro);n&&n.getRemotePeerReadTime(o);}}},{key:"_getStorageConversationList",value:function value(){return this.getModule(go).getItem("conversationMap");}},{key:"_setStorageConversationList",value:function value(){var e=this.getLocalConversationList().slice(0,20).map(function(e){return{conversationID:e.conversationID,type:e.type,subType:e.subType,lastMessage:e.lastMessage,groupProfile:e.groupProfile,userProfile:e.userProfile};});this.getModule(go).setItem("conversationMap",e);}},{key:"emitConversationUpdate",value:function value(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=this.getLocalConversationList();if(t){var n=this.getModule(io);n&&n.updateGroupLastMessage(o);}e&&this.emitOuterEvent(S.CONVERSATION_LIST_UPDATED);}},{key:"getLocalConversationList",value:function value(){return M(this._conversationMap.values()).filter(function(e){return e.type!==D.CONV_TOPIC;});}},{key:"getLocalConversation",value:function value(e){return this._conversationMap.get(e);}},{key:"hasLocalConversation",value:function value(e){return this._conversationMap.has(e);}},{key:"getLocalOldestMessage",value:function value(e){return this._messageListHandler.getLocalOldestMessage(e);}},{key:"syncConversationList",value:function value(){var e=this,t=new Va(Ba.SYNC_CONVERSATION_LIST);return this._pagingStatus===jt.NOT_START&&this._conversationMap.clear(),this._pagingGetConversationList().then(function(o){return e._pagingStatus=jt.RESOLVED,e._setStorageConversationList(),e._handleC2CPeerReadTime(),e._patchConversationProperties(),t.setMessage(e._conversationMap.size).setNetworkType(e.getNetworkType()).end(),o;}).catch(function(o){return e._pagingStatus=jt.REJECTED,t.setMessage(e._pagingTimeStamp),e.probeNetwork().then(function(e){var n=m(e,2),a=n[0],s=n[1];t.setError(o,a,s).end();}),gs(o);});}},{key:"_patchConversationProperties",value:function value(){var e=this,t=Date.now(),o=this.checkAndPatchRemark(),n=this._messageRemindHandler.getC2CMessageRemindType(),a=this.getModule(io).getGroupList();Promise.all([o,n,a]).then(function(){var o=Date.now()-t;be.log("".concat(e._className,"._patchConversationProperties ok. cost ").concat(o," ms")),e.emitConversationUpdate(!0,!1);});}},{key:"_pagingGetConversationList",value:function value(){var e=this,t="".concat(this._className,"._pagingGetConversationList");return be.log("".concat(t," timeStamp:").concat(this._pagingTimeStamp," startIndex:").concat(this._pagingStartIndex)+" pinnedTimeStamp:".concat(this._pagingPinnedTimeStamp," pinnedStartIndex:").concat(this._pagingPinnedStartIndex)),this._pagingStatus=jt.PENDING,this.request({protocolName:Qo,requestData:{fromAccount:this.getMyUserID(),timeStamp:this._pagingTimeStamp,startIndex:this._pagingStartIndex,pinnedTimeStamp:this._pagingPinnedTimeStamp,pinnedStartIndex:this._pagingStartIndex,orderType:1}}).then(function(o){var n=o.data,a=n.completeFlag,s=n.conversations,r=void 0===s?[]:s,i=n.timeStamp,c=n.startIndex,u=n.pinnedTimeStamp,l=n.pinnedStartIndex,d=n.groupItem;if(be.log("".concat(t," ok. completeFlag:").concat(a," count:").concat(r.length," isReady:").concat(e._isReady)),e._convGroupHandler.onConvGroupListSynced(d),r.length>0){var p=e._getConversationOptions(r);e._updateLocalConversationList({conversationOptionsList:p,isFromGetConversations:!0}),e.isLoggedIn()&&e.emitConversationUpdate();}if(!e._isReady){if(!e.isLoggedIn())return _s();e.triggerReady();}return e._pagingTimeStamp=i,e._pagingStartIndex=c,e._pagingPinnedTimeStamp=u,e._pagingPinnedStartIndex=l,1!==a?e._pagingGetConversationList():(e._handleGroupAtTipsList(),e._convGroupHandler.getRemoteConvGroupList(),_s());}).catch(function(o){throw e.isLoggedIn()&&(e._isReady||(be.warn("".concat(t," failed. error:"),o),e.triggerReady())),o;});}},{key:"_updateLocalConversationList",value:function value(e){var t,o=e.isFromGetConversations,n=Date.now();t=this._getTmpConversationListMapping(e),this._conversationMap=new Map(this._sortConversationList([].concat(M(t.toBeUpdatedConversationList),M(this._conversationMap)))),o||this._updateUserOrGroupProfile(t.newConversationList),be.debug("".concat(this._className,"._updateLocalConversationList cost ").concat(Date.now()-n," ms"));}},{key:"_getTmpConversationListMapping",value:function value(e){for(var t=e.conversationOptionsList,o=e.isFromGetConversations,n=e.isInstantMessage,a=e.isUnreadC2CMessage,s=void 0!==a&&a,r=[],i=[],c=this.getModule(io),u=this.getModule(co),l=0,d=t.length;l<d;l++){var p=new Gs(t[l]),_=p.conversationID;if(_!=="".concat(D.CONV_C2C,"@TLS#ERROR")&&_!=="".concat(D.CONV_C2C,"@TLS#NOT_FOUND"))if(this._conversationMap.has(_)){var g=this._conversationMap.get(_),h=["unreadCount","allowType","adminForbidType","payload","isPinned"];!1===n&&h.push("lastMessage");var f=t[l].lastMessage,m=!Ze(f);m||t[l].type===D.CONV_TOPIC||this._onLastMessageNotExist(t[l]),Ze(n)&&m&&null===g.lastMessage.payload&&(g.lastMessage.payload=f.payload),ct(g,p,h,[null,void 0,"",0,NaN]),g.updateUnreadCount({nextUnreadCount:p.unreadCount,isFromGetConversations:o,isUnreadC2CMessage:s}),n&&m&&(f.payload&&(g.lastMessage.payload=f.payload),g.type===D.CONV_GROUP&&(g.lastMessage.nameCard=f.nameCard,g.lastMessage.nick=f.nick)),m&&g.lastMessage.cloudCustomData!==f.cloudCustomData&&(g.lastMessage.cloudCustomData=f.cloudCustomData||""),this._conversationMap.delete(_),r.push([_,g]);}else{if(p.type===D.CONV_GROUP&&c){var M=p.groupProfile.groupID,v=c.getLocalGroupProfile(M);v&&(p.groupProfile=v,p.updateUnreadCount({nextUnreadCount:0}));}else if(p.type===D.CONV_C2C){var I=_.replace(D.CONV_C2C,"");u&&u.isMyFriend(I)&&(p.remark=u.getFriendRemark(I));}i.push(p),r.push([_,p]);}}var y=this.getModule(lo);return r.forEach(function(e){if(e[1].type===D.CONV_TOPIC){var t=e[1],o=t.conversationID,n=t.unreadCount,a=t.groupAtInfoList;y.onConversationProxy({topicID:o.replace(D.CONV_GROUP,""),unreadCount:n,groupAtInfoList:Kt(a)?void 0:a});}}),{toBeUpdatedConversationList:r,newConversationList:i};}},{key:"_onLastMessageNotExist",value:function value(e){new Va(Ba.LAST_MESSAGE_NOT_EXIST).setMessage("".concat(JSON.stringify(e))).setNetworkType(this.getNetworkType()).end();}},{key:"_sortConversationList",value:function value(e){var t=[],o=[];return e.forEach(function(e){!0===e[1].isPinned?t.push(e):o.push(e);}),t.sort(function(e,t){return t[1].lastMessage.lastTime-e[1].lastMessage.lastTime;}).concat(o.sort(function(e,t){return t[1].lastMessage.lastTime-e[1].lastMessage.lastTime;}));}},{key:"_sortConversationListAndEmitEvent",value:function value(){this._conversationMap=new Map(this._sortConversationList(M(this._conversationMap))),this.emitConversationUpdate(!0,!1);}},{key:"_updateUserOrGroupProfile",value:function value(e){var t=this;if(0!==e.length){var o=[],n=[],a=this.getModule(so),s=this.getModule(io);e.forEach(function(e){if(e.type===D.CONV_C2C)o.push(e.toAccount);else if(e.type===D.CONV_GROUP){var t=e.toAccount;s.hasLocalGroup(t)?e.groupProfile=s.getLocalGroupProfile(t):n.push(t);}}),be.log("".concat(this._className,"._updateUserOrGroupProfile c2cUserIDList:").concat(o," groupIDList:").concat(n)),o.length>0&&a.getUserProfile({userIDList:o}).then(function(e){var o=e.data;Qe(o)?o.forEach(function(e){t._conversationMap.get("C2C".concat(e.userID)).userProfile=e;}):t._conversationMap.get("C2C".concat(o.userID)).userProfile=o;}),n.length>0&&s.getGroupProfileAdvance({groupIDList:n,responseFilter:{groupBaseInfoFilter:["Type","Name","FaceUrl"]}}).then(function(e){e.data.successGroupList.forEach(function(e){var o="GROUP".concat(e.groupID);if(t._conversationMap.has(o)){var n=t._conversationMap.get(o);ct(n.groupProfile,e,[],[null,void 0,"",0,NaN]),!n.subType&&e.type&&(n.subType=e.type);}});});}}},{key:"_getConversationOptions",value:function value(e){var o=this,n=[],a=e.filter(function(e){var t=e.lastMsg;return Xe(t);}).filter(function(e){var t=e.type,o=e.userID;return 1===t&&"@TLS#NOT_FOUND"!==o&&"@TLS#ERROR"!==o||2===t;}),s=this.getMyUserID(),r=a.map(function(e){if(1===e.type){var a={userID:e.userID,nick:e.peerNick,avatar:e.peerAvatar};return n.push(a),{conversationID:"C2C".concat(e.userID),type:"C2C",lastMessage:{lastTime:e.time,lastSequence:e.sequence,fromAccount:e.lastC2CMsgFromAccount,messageForShow:e.messageShow,type:e.lastMsg.elements[0]?e.lastMsg.elements[0].type:null,payload:e.lastMsg.elements[0]?e.lastMsg.elements[0].content:null,cloudCustomData:e.lastMsg.cloudCustomData||"",isRevoked:8===e.lastMessageFlag,onlineOnlyFlag:!1,nick:"",nameCard:"",version:0,isPeerRead:e.lastC2CMsgFromAccount===s&&e.time<=e.c2cPeerReadTime},userProfile:new Ns(a),peerReadTime:e.c2cPeerReadTime,isPinned:1===e.isPinned,messageRemindType:"",customData:e.customMark||"",markList:Vt(e.standardMark),conversationGroupList:o._convGroupHandler.getConvGroupListByID(e.contactGroupId)};}return{conversationID:"GROUP".concat(e.groupID),type:"GROUP",lastMessage:t(t({lastTime:e.time,lastSequence:e.messageReadSeq+e.unreadCount,fromAccount:e.msgGroupFromAccount,messageForShow:e.messageShow},o._patchTypeAndPayload(e)),{},{cloudCustomData:e.lastMsg.cloudCustomData||"",isRevoked:2===e.lastMessageFlag,onlineOnlyFlag:!1,nick:e.senderNick||"",nameCard:e.senderNameCard||""}),groupProfile:new Ls({groupID:e.groupID,name:e.groupNick,avatar:e.groupImage}),unreadCount:e.unreadCount,peerReadTime:0,isPinned:1===e.isPinned,messageRemindType:"",version:0,customData:e.customMark||"",markList:Vt(e.standardMark),conversationGroupList:o._convGroupHandler.getConvGroupListByID(e.contactGroupId)};});n.length>0&&this.getModule(so).onConversationsProfileUpdated(n);return r;}},{key:"_patchTypeAndPayload",value:function value(e){var o=e.lastMsg,n=o.event,a=void 0===n?void 0:n,s=o.elements,r=void 0===s?[]:s,i=o.groupTips,c=void 0===i?{}:i;if(!Ze(a)&&!Kt(c)){var u=new ns(c);u.setElement({type:D.MSG_GRP_TIP,content:t(t({},c.elements),{},{groupProfile:c.groupProfile})});var l=JSON.parse(JSON.stringify(u.payload));return u=null,{type:D.MSG_GRP_TIP,payload:l};}return{type:r[0]?r[0].type:null,payload:r[0]?r[0].content:null};}},{key:"getLocalMessageList",value:function value(e){return this._messageListHandler.getLocalMessageList(e);}},{key:"deleteLocalMessage",value:function value(e){e instanceof ns&&this._messageListHandler.remove(e);}},{key:"onConversationDeleted",value:function value(e){var t=this;be.log("".concat(this._className,".onConversationDeleted")),Qe(e)&&e.forEach(function(e){var o=e.type,n=e.userID,a=e.groupID,s="";1===o?s="".concat(D.CONV_C2C).concat(n):2===o&&(s="".concat(D.CONV_GROUP).concat(a)),t.deleteLocalConversation(s);});}},{key:"onConversationPinned",value:function value(e){var t=this;if(Qe(e)){var o=!1;e.forEach(function(e){var n,a=e.type,s=e.userID,r=e.groupID;1===a?n=t.getLocalConversation("".concat(D.CONV_C2C).concat(s)):2===a&&(n=t.getLocalConversation("".concat(D.CONV_GROUP).concat(r))),n&&(be.log("".concat(t._className,".onConversationPinned conversationID:").concat(n.conversationID," isPinned:").concat(n.isPinned)),n.isPinned||(n.isPinned=!0,o=!0));}),o&&this._sortConversationListAndEmitEvent();}}},{key:"onConversationUnpinned",value:function value(e){var t=this;if(Qe(e)){var o=!1;e.forEach(function(e){var n,a=e.type,s=e.userID,r=e.groupID;1===a?n=t.getLocalConversation("".concat(D.CONV_C2C).concat(s)):2===a&&(n=t.getLocalConversation("".concat(D.CONV_GROUP).concat(r))),n&&(be.log("".concat(t._className,".onConversationUnpinned conversationID:").concat(n.conversationID," isPinned:").concat(n.isPinned)),n.isPinned&&(n.isPinned=!1,o=!0));}),o&&this._sortConversationListAndEmitEvent();}}},{key:"getMessageList",value:function value(e){var t=this,o=e.conversationID,n=e.nextReqMessageID,a=e.count,s="".concat(this._className,".getMessageList"),r=this.getLocalConversation(o),i="";if(r&&r.groupProfile&&(i=r.groupProfile.type),It(i))return be.log("".concat(s," not available in avchatroom. conversationID:").concat(o)),_s({messageList:[],nextReqMessageID:"",isCompleted:!0});(Ze(a)||a>15)&&(a=15),!n&&this._isNotInCommunity(o)&&(this._messageListHandler.removeByConversationID(o),this._completedMap.delete(o),this._roamingMessageSequenceMap.delete(o));var c=this._computeRemainingCount({conversationID:o,nextReqMessageID:n}),u=this._completedMap.has(o);if(be.log("".concat(s," conversationID:").concat(o," nextReqMessageID:").concat(n)+" remainingCount:".concat(c," count:").concat(a," isCompleted:").concat(u)),this._needGetHistory({conversationID:o,remainingCount:c,count:a}))return this.getHistoryMessages({conversationID:o,nextReqMessageID:n,count:20}).then(function(e){var n=e.nextReqID,a=e.storedMessageList,r=t._completedMap.has(o),i=a;c>0&&(i=t._messageListHandler.getLocalMessageList(o).slice(0,a.length+c));var u={nextReqMessageID:r?"":n,messageList:i,isCompleted:r};return be.log("".concat(s," ret.nextReqMessageID:").concat(u.nextReqMessageID," ret.isCompleted:").concat(u.isCompleted," ret.length:").concat(i.length)),as(u);});this.modifyMessageList(o);var l=this._getMessageListFromMemory({conversationID:o,nextReqMessageID:n,count:a});return _s(l);}},{key:"_getMessageListFromMemory",value:function value(e){var t=e.conversationID,o=e.nextReqMessageID,n=e.count,a="".concat(this._className,"._getMessageListFromMemory"),s=this._messageListHandler.getLocalMessageList(t),r=s.length,i=0,c={isCompleted:!1,nextReqMessageID:"",messageList:[]};return o?(i=s.findIndex(function(e){return e.ID===o;}))>n?(c.messageList=s.slice(i-n,i),c.nextReqMessageID=s[i-n].ID):(c.messageList=s.slice(0,i),c.isCompleted=!0):r>n?(i=r-n,c.messageList=s.slice(i,r),c.nextReqMessageID=s[i].ID):(c.messageList=s.slice(0,r),c.isCompleted=!0),be.log("".concat(a," conversationID:").concat(t)+" ret.nextReqMessageID:".concat(c.nextReqMessageID," ret.isCompleted:").concat(c.isCompleted," ret.length:").concat(c.messageList.length)),c;}},{key:"getMessageListHopping",value:function value(e){var t=e.conversationID,o=e.sequence,n=e.time,a=e.count,s=e.direction,r=void 0===s?0:s;if((Ze(a)||a>15)&&(a=15),t.startsWith(D.CONV_C2C)){var i=this.getModule(ro),c=t.replace(D.CONV_C2C,"");return i.getRoamingMessagesHopping({peerAccount:c,time:n,count:a,direction:r});}if(t.startsWith(D.CONV_GROUP)){var u=this.getModule(io),l=t.replace(D.CONV_GROUP,"");return u.getRoamingMessagesHopping({groupID:l,sequence:o,count:a,direction:r});}}},{key:"_computeRemainingCount",value:function value(e){var t=e.conversationID,o=e.nextReqMessageID,n=this._messageListHandler.getLocalMessageList(t),a=n.length;if(!o)return a;var s=0;return Et(t)?s=n.findIndex(function(e){return e.ID===o;}):Ct(t)&&(s=-1!==o.indexOf("-")?n.findIndex(function(e){return e.ID===o;}):n.findIndex(function(e){return e.sequence===o;})),-1===s&&(s=0),s;}},{key:"_getMessageListSize",value:function value(e){return this._messageListHandler.getLocalMessageList(e).length;}},{key:"_needGetHistory",value:function value(e){var t=e.conversationID,o=e.remainingCount,n=e.count,a=this.getLocalConversation(t),s="";return a&&a.groupProfile&&(s=a.groupProfile.type),!St(t)&&!It(s)&&!(Ct(t)&&this._isPagingGetGroupListCompleted()&&!this._hasLocalGroup(t)&&!this._isTopicConversation(t))&&o<=n&&!this._completedMap.has(t);}},{key:"_isTopicConversation",value:function value(e){var t=e.replace(D.CONV_GROUP,"");return Tt(t);}},{key:"getHistoryMessages",value:function value(e){var t=e.conversationID,o=e.count;if(t===D.CONV_SYSTEM)return _s();var n=15;o>20&&(n=20);var a=null;if(Et(t)){var s=this._roamingMessageKeyAndTimeMap.has(t);return(a=this.getModule(ro))?a.getRoamingMessage({conversationID:t,peerAccount:t.replace(D.CONV_C2C,""),count:n,lastMessageTime:s?this._roamingMessageKeyAndTimeMap.get(t).lastMessageTime:0,messageKey:s?this._roamingMessageKeyAndTimeMap.get(t).messageKey:""}):gs({code:Ca.CANNOT_FIND_MODULE,message:Sa.CANNOT_FIND_MODULE});}if(Ct(t)){if(!(a=this.getModule(io)))return gs({code:Ca.CANNOT_FIND_MODULE,message:Sa.CANNOT_FIND_MODULE});var r=null;this._conversationMap.has(t)&&(r=this._conversationMap.get(t).lastMessage);var i=0;r&&(i=r.lastSequence);var c=this._roamingMessageSequenceMap.get(t);return a.getRoamingMessage({conversationID:t,groupID:t.replace(D.CONV_GROUP,""),count:n,sequence:c||i});}return _s();}},{key:"patchConversationLastMessage",value:function value(e){var t=this.getLocalConversation(e);if(t){var o=t.lastMessage,n=o.messageForShow,a=o.payload;if(Kt(n)||Kt(a)){var s=this._messageListHandler.getLocalMessageList(e);if(0===s.length)return;var r=s[s.length-1];be.log("".concat(this._className,".patchConversationLastMessage conversationID:").concat(e," payload:"),r.payload),t.updateLastMessage(r);}}}},{key:"onRoamingMessage",value:function value(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=arguments.length>1?arguments[1]:void 0,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=o.startsWith(D.CONV_C2C)?D.CONV_C2C:D.CONV_GROUP,s=null,r=[],i=[],c=0,u=e.length,l=null,d=a===D.CONV_GROUP,p=this.getModule(mo),_=function _(){c=d?e.length-1:0,u=d?0:e.length;},g=function g(){d?--c:++c;},h=function h(){return d?c>=u:c<u;};for(_();h();g()){if(d&&1===e[c].sequence&&n&&this.setCompleted(o),1!==e[c].isPlaceMessage)if((s=new ns(e[c])).to=e[c].to,a!==D.CONV_GROUP||Ze(e[c].topicID)||(s.to=e[c].topicID),s.isSystemMessage=!!e[c].isSystemMessage,s.conversationType=a,4===e[c].event?l={type:D.MSG_GRP_TIP,content:t(t({},e[c].elements),{},{groupProfile:e[c].groupProfile})}:(e[c].elements=p.parseElements(e[c].elements,e[c].from),l=e[c].elements),d||s.setNickAndAvatar({nick:e[c].nick,avatar:e[c].avatar}),Kt(l)){var f=new Va(Ba.EMPTY_MESSAGE_BODY);f.setMessage("from:".concat(s.from," to:").concat(s.to," sequence:").concat(s.sequence," event:").concat(e[c].event)),f.setNetworkType(this.getNetworkType()).setLevel("warning").end();}else s.setElement(l),s.reInitialize(this.getMyUserID()),r.push(s);}return _=g=h=null,n?(this._messageListHandler.unshift(r,i),r=null,i):(i=null,r);}},{key:"findMessage",value:function value(e){return this._messageListHandler.findMessage(e);}},{key:"_isNotInCommunity",value:function value(e){var t=!1;if(e.startsWith(D.CONV_GROUP)&&this._isTopicConversation(e)){var o=wt(e.replace(D.CONV_GROUP,""));this.getModule(io).hasLocalGroup(o)||(t=!0);}return t;}},{key:"deleteTopicRoamingMessageInfo",value:function value(e){var t=this;yt({groupID:e})&&this._messageListHandler.getTopicConversationIDList(e).forEach(function(e){t._messageListHandler.removeByConversationID(e),t._completedMap.delete(e),t._roamingMessageSequenceMap.delete(e);});}},{key:"deleteGroupRomaingMessageInfo",value:function value(e){var t="".concat(D.CONV_GROUP).concat(e);this._messageListHandler.removeByConversationID(t),this._completedMap.delete(t),this._roamingMessageSequenceMap.delete(t);}},{key:"setMessageRead",value:function value(e){var t=e.conversationID,o=this.getLocalConversation(t);if(be.log("".concat(this._className,".setMessageRead conversationID:").concat(t," unreadCount:").concat(o?o.unreadCount:0)),!o)return _s();if(o.type!==D.CONV_GROUP&&o.type!==D.CONV_TOPIC||Kt(o.groupAtInfoList)||this.deleteGroupAtTips(t),0===o.unreadCount)return _s();if(o.type===D.CONV_GROUP&&!this._hasLocalGroup(t))return 0!==o.unreadCount&&(o.unreadCount=0,this.emitConversationUpdate(!0,!1)),_s();var n=this._messageListHandler.getLocalLastMessage(t),a=o.lastMessage.lastTime;n&&a<n.time&&(a=n.time);var s=o.lastMessage.lastSequence;if(n&&s<n.sequence&&(s=n.sequence),o.type===D.CONV_TOPIC&&Ze(n)){var r=this.getModule(lo),i=t.replace(D.CONV_GROUP,""),c=wt(i),u=r.getLocalTopic(c,i);u&&(s=u.nextMessageSeq-1);}var l=null;switch(o.type){case D.CONV_C2C:return(l=this.getModule(ro))?l.setMessageRead({conversationID:t,lastMessageTime:a}):gs({code:Ca.CANNOT_FIND_MODULE,message:Sa.CANNOT_FIND_MODULE});case D.CONV_GROUP:case D.CONV_TOPIC:return(l=this.getModule(io))?l.setMessageRead({conversationID:t,lastMessageSeq:s}):gs({code:Ca.CANNOT_FIND_MODULE,message:Sa.CANNOT_FIND_MODULE});case D.CONV_SYSTEM:return o.unreadCount=0,this.emitConversationUpdate(!0,!1),_s();default:return _s();}}},{key:"setAllMessageRead",value:function value(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o="".concat(this._className,".setAllMessageRead");t.scope||(t.scope=D.READ_ALL_MSG),be.log("".concat(o," options:"),t);var n=this._createSetAllMessageReadPack(t);if(0===n.readAllC2CMessage&&0===n.groupMessageReadInfoList.length)return _s();var a=new Va(Ba.SET_ALL_MESSAGE_READ);return this.request({protocolName:Dn,requestData:n}).then(function(o){var n=o.data,s=e._handleAllMessageRead(n);return a.setMessage("scope:".concat(t.scope," failureGroups:").concat(JSON.stringify(s))).setNetworkType(e.getNetworkType()).end(),_s();}).catch(function(t){return e.probeNetwork().then(function(e){var o=m(e,2),n=o[0],s=o[1];a.setError(t,n,s).end();}),be.warn("".concat(o," failed. error:"),t),gs({code:t&&t.code?t.code:Ca.MESSAGE_UNREAD_ALL_FAIL,message:t&&t.message?t.message:Sa.MESSAGE_UNREAD_ALL_FAIL});});}},{key:"setConversationCustomData",value:function value(e){return this._convGroupHandler.setConvCustomData(e);}},{key:"markConversation",value:function value(e){return this._convGroupHandler.markConversation(e);}},{key:"getConversationGroupList",value:function value(){return this._convGroupHandler.getLocalConvGroupList();}},{key:"createConversationGroup",value:function value(e){return this._convGroupHandler.createConvGroup(e);}},{key:"deleteConversationGroup",value:function value(e){return this._convGroupHandler.deleteConvGroup(e);}},{key:"renameConversationGroup",value:function value(e){return this._convGroupHandler.renameConvGroup(e);}},{key:"addConversationsToGroup",value:function value(e){return this._convGroupHandler.addConvsToGroup(e);}},{key:"deleteConversationsFromGroup",value:function value(e){return this._convGroupHandler.deleteConvsFromGroup(e);}},{key:"onConversationMarkUpdated",value:function value(e){this._convGroupHandler.onConvMarkUpdated(e);}},{key:"onConversationGroupCreated",value:function value(e){this._convGroupHandler.onConvGroupCreated(e);}},{key:"onConversationGroupDeleted",value:function value(e){this._convGroupHandler.onConvGroupDeleted(e);}},{key:"onConversationGroupNameUpdated",value:function value(e){this._convGroupHandler.onConvGroupNameUpdated(e);}},{key:"onConversationInGroupUpdated",value:function value(e){this._convGroupHandler.onConvInGroupUpdated(e);}},{key:"_getConversationLastMessageSequence",value:function value(e){var t=this._messageListHandler.getLocalLastMessage(e.conversationID),o=e.lastMessage.lastSequence;return t&&o<t.sequence&&(o=t.sequence),o;}},{key:"_getConversationLastMessageTime",value:function value(e){var t=this._messageListHandler.getLocalLastMessage(e.conversationID),o=e.lastMessage.lastTime;return t&&o<t.time&&(o=t.time),o;}},{key:"_createSetAllMessageReadPack",value:function value(e){var t,o={readAllC2CMessage:0,groupMessageReadInfoList:[]},n=e.scope,a=C(this._conversationMap);try{for(a.s();!(t=a.n()).done;){var s=m(t.value,2)[1];if(s.unreadCount>0)if(s.type===D.CONV_C2C&&0===o.readAllC2CMessage){if(n===D.READ_ALL_MSG)o.readAllC2CMessage=1;else if(n===D.READ_ALL_C2C_MSG){o.readAllC2CMessage=1;break;}}else if(s.type===D.CONV_GROUP&&(n===D.READ_ALL_GROUP_MSG||n===D.READ_ALL_MSG)){var r=this._getConversationLastMessageSequence(s);o.groupMessageReadInfoList.push({groupID:s.groupProfile.groupID,messageSequence:r});}}}catch(i){a.e(i);}finally{a.f();}return o;}},{key:"onPushedAllMessageRead",value:function value(e){this._handleAllMessageRead(e);}},{key:"_handleAllMessageRead",value:function value(e){var t=e.groupMessageReadInfoList,o=e.readAllC2CMessage,n=this._parseGroupReadInfo(t);return this._updateAllConversationUnreadCount({readAllC2CMessage:o})>=1&&this.emitConversationUpdate(!0,!1),n;}},{key:"_parseGroupReadInfo",value:function value(e){var t=[];if(e&&e.length)for(var o=0,n=e.length;o<n;o++){var a=e[o],s=a.groupID,r=a.sequence,i=a.retCode,c=a.lastMessageSeq;Ze(i)?this._remoteGroupReadSequenceMap.set(s,c):(this._remoteGroupReadSequenceMap.set(s,r),0!==i&&t.push("".concat(s,"-").concat(r,"-").concat(i)));}return t;}},{key:"_updateAllConversationUnreadCount",value:function value(e){var t,o=e.readAllC2CMessage,n=0,a=C(this._conversationMap);try{for(a.s();!(t=a.n()).done;){var s=m(t.value,2),r=s[0],i=s[1];if(i.unreadCount>=1){if(1===o&&i.type===D.CONV_C2C){var c=this._getConversationLastMessageTime(i);this.updateIsReadAfterReadReport({conversationID:r,lastMessageTime:c});}else if(i.type===D.CONV_GROUP){var u=r.replace(D.CONV_GROUP,"");if(this._remoteGroupReadSequenceMap.has(u)){var l=this._remoteGroupReadSequenceMap.get(u),d=this._getConversationLastMessageSequence(i);this.updateIsReadAfterReadReport({conversationID:r,remoteReadSequence:l}),d>=l&&this._remoteGroupReadSequenceMap.delete(u);}}this.updateUnreadCount(r,!1)&&(n+=1);}}}catch(p){a.e(p);}finally{a.f();}return n;}},{key:"isRemoteRead",value:function value(e){var t=e.conversationID,o=e.sequence,n=t.replace(D.CONV_GROUP,""),a=!1;if(this._remoteGroupReadSequenceMap.has(n)){var s=this._remoteGroupReadSequenceMap.get(n);o<=s&&(a=!0,be.log("".concat(this._className,".isRemoteRead conversationID:").concat(t," messageSequence:").concat(o," remoteReadSequence:").concat(s))),o>=s+10&&this._remoteGroupReadSequenceMap.delete(n);}return a;}},{key:"updateIsReadAfterReadReport",value:function value(e){var t=e.conversationID,o=e.lastMessageSeq,n=e.lastMessageTime,a=this._messageListHandler.getLocalMessageList(t);if(0!==a.length)for(var s,r=a.length-1;r>=0;r--){if(s=a[r],!(n&&s.time>n||o&&s.sequence>o)){if("in"===s.flow&&s.isRead)break;s.setIsRead(!0);}}}},{key:"updateUnreadCount",value:function value(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=!1,n=this.getLocalConversation(e),a=this._messageListHandler.getLocalMessageList(e);if(n){var s=n.unreadCount,r=a.filter(function(e){return!e.isRead&&!e._onlineOnlyFlag&&!e.isDeleted;}).length;if(s!==r&&(n.unreadCount=r,o=!0,be.log("".concat(this._className,".updateUnreadCount from ").concat(s," to ").concat(r,", conversationID:").concat(e)),!0===t&&this.emitConversationUpdate(!0,!1)),o&&n.type===D.CONV_TOPIC){var i=n.unreadCount,c=this.getModule(lo),u=e.replace(D.CONV_GROUP,"");c.onConversationProxy({topicID:u,unreadCount:i});}return o;}}},{key:"clearGroupAtInfoList",value:function value(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=this.getLocalConversation(e);if(o&&o.groupAtInfoList.length>0){if(o.clearGroupAtInfoList(),be.log("".concat(this._className,".clearGroupAtInfoList conversationID:").concat(e)),o.type===D.CONV_TOPIC){var n=o.groupAtInfoList,a=this.getModule(lo),s=e.replace(D.CONV_GROUP,"");a.onConversationProxy({topicID:s,groupAtInfoList:n});}!0===t&&this.emitConversationUpdate(!0,!1);}}},{key:"updateReadReceiptInfo",value:function value(e){var t=this,o=e.userID,n=void 0===o?void 0:o,a=e.groupID,s=void 0===a?void 0:a,r=e.readReceiptList;if(!Kt(r)){var i=[];if(Ze(n)){if(!Ze(s)){var c="".concat(D.CONV_GROUP).concat(s);r.forEach(function(e){var o=e.tinyID,n=e.clientTime,a=e.random,r=e.readCount,u=e.unreadCount,l="".concat(o,"-").concat(n,"-").concat(a),d=t._messageListHandler.getLocalMessage(c,l),p={groupID:s,messageID:l,readCount:0,unreadCount:0};d&&($e(r)&&(d.readReceiptInfo.readCount=r,p.readCount=r),$e(u)&&(d.readReceiptInfo.unreadCount=u,p.unreadCount=u),i.push(p));});}}else{var u="".concat(D.CONV_C2C).concat(n);r.forEach(function(e){var o=e.tinyID,a=e.clientTime,s=e.random,r="".concat(o,"-").concat(a,"-").concat(s),c=t._messageListHandler.getLocalMessage(u,r);if(c&&!c.isPeerRead){c.isPeerRead=!0;var l={userID:n,messageID:r,isPeerRead:!0};i.push(l);}});}i.length>0&&this.emitOuterEvent(S.MESSAGE_READ_RECEIPT_RECEIVED,i);}}},{key:"recomputeGroupUnreadCount",value:function value(e){var t=e.conversationID,o=e.count,n=this.getLocalConversation(t);if(n){var a=n.unreadCount,s=a-o;s<0&&(s=0),n.unreadCount=s,be.log("".concat(this._className,".recomputeGroupUnreadCount from ").concat(a," to ").concat(s,", conversationID:").concat(t));}}},{key:"updateIsRead",value:function value(e){var t=this.getLocalConversation(e),o=this.getLocalMessageList(e);if(t&&0!==o.length&&!St(t.type)){for(var n=[],a=0,s=o.length;a<s;a++){"in"!==o[a].flow?"out"!==o[a].flow||o[a].isRead||o[a].setIsRead(!0):n.push(o[a]);}var r=0;if(t.type===D.CONV_C2C){var i=n.slice(-t.unreadCount).filter(function(e){return e.isRevoked;}).length;r=n.length-t.unreadCount-i;}else r=n.length-t.unreadCount;for(var c=0;c<r&&!n[c].isRead;c++){n[c].setIsRead(!0);}}}},{key:"deleteGroupAtTips",value:function value(e){var t=this,o="".concat(this._className,".deleteGroupAtTips");be.log("".concat(o));var n=this._conversationMap.get(e);if(!n)return Promise.resolve();var a=n.groupAtInfoList;if(0===a.length)return Promise.resolve();var s=void 0;e.startsWith(D.CONV_GROUP)&&(s=e.replace(D.CONV_GROUP,""));var r=M(a);if((yt({groupID:s})||Tt(s))&&0===(r=a.filter(function(e){return!e.atTypeArray.includes(D.CONV_AT_ALL);})).length)return this.clearGroupAtInfoList(e,!1),Promise.resolve();var i=this.getMyUserID();return this.request({protocolName:on,requestData:{messageListToDelete:r.map(function(e){return{from:e.from,to:i,messageSeq:e.__sequence,messageRandom:e.__random,groupID:Ze(e.topicID)?e.groupID:e.topicID};})}}).then(function(){return be.log("".concat(o," ok. count:").concat(a.length)),t.clearGroupAtInfoList(e,!1),Promise.resolve();}).catch(function(e){return be.error("".concat(o," failed. error:"),e),gs(e);});}},{key:"appendToMessageList",value:function value(e){this._messageListHandler.pushIn(e);}},{key:"setMessageRandom",value:function value(e){this.singlyLinkedList.set(e.random);}},{key:"deleteMessageRandom",value:function value(e){this.singlyLinkedList.delete(e.random);}},{key:"pushIntoMessageList",value:function value(e,t,o){return!(!this._messageListHandler.pushIn(t,o)||this._isMessageFromCurrentInstance(t)&&!o)&&(e.push(t),!0);}},{key:"_isMessageFromCurrentInstance",value:function value(e){return this.singlyLinkedList.has(e.random);}},{key:"revoke",value:function value(e,t,o){return this._messageListHandler.revoke(e,t,o);}},{key:"getPeerReadTime",value:function value(e){return this._peerReadTimeMap.get(e);}},{key:"recordPeerReadTime",value:function value(e,t){this._peerReadTimeMap.has(e)?this._peerReadTimeMap.get(e)<t&&this._peerReadTimeMap.set(e,t):this._peerReadTimeMap.set(e,t);}},{key:"updateMessageIsPeerReadProperty",value:function value(e,t){if(e.startsWith(D.CONV_C2C)&&t>0){var o=this._messageListHandler.updateMessageIsPeerReadProperty(e,t);if(o.length>0&&this.emitOuterEvent(S.MESSAGE_READ_BY_PEER,o),this._conversationMap.has(e)){var n=this._conversationMap.get(e).lastMessage;Kt(n)||n.fromAccount===this.getMyUserID()&&n.lastTime<=t&&!n.isPeerRead&&(n.isPeerRead=!0,this.emitConversationUpdate(!0,!1));}}}},{key:"updateMessageIsModifiedProperty",value:function value(e){this._messageListHandler.updateMessageIsModifiedProperty(e);}},{key:"setCompleted",value:function value(e){be.log("".concat(this._className,".setCompleted. conversationID:").concat(e)),this._completedMap.set(e,!0);}},{key:"updateRoamingMessageKeyAndTime",value:function value(e,t,o){this._roamingMessageKeyAndTimeMap.set(e,{messageKey:t,lastMessageTime:o});}},{key:"updateRoamingMessageSequence",value:function value(e,t){this._roamingMessageSequenceMap.set(e,t);}},{key:"getConversationList",value:function value(e){var t=this,o="".concat(this._className,".getConversationList"),n="pagingStatus:".concat(this._pagingStatus,", local conversation count:").concat(this._conversationMap.size,", options:").concat(e);if(be.log("".concat(o,". ").concat(n)),this._pagingStatus===jt.REJECTED){var a=new Va(Ba.GET_CONVERSATION_LIST);return a.setMessage(n),this.syncConversationList().then(function(){a.setNetworkType(t.getNetworkType()).end();var o=t._getConversationList(e);return as({conversationList:o});}).catch(function(e){return t.probeNetwork().then(function(t){var o=m(t,2),n=o[0],s=o[1];a.setError(e,n,s).end();}),be.error("".concat(o," failed. error:"),e),gs(e);});}if(0===this._conversationMap.size){var s=new Va(Ba.GET_CONVERSATION_LIST);return s.setMessage(n),this.syncConversationList().then(function(){s.setNetworkType(t.getNetworkType()).end();var o=t._getConversationList(e);return as({conversationList:o});}).catch(function(e){return t.probeNetwork().then(function(t){var o=m(t,2),n=o[0],a=o[1];s.setError(e,n,a).end();}),be.error("".concat(o," failed. error:"),e),gs(e);});}var r=this._getConversationList(e);return be.log("".concat(o,". returned conversation count:").concat(r.length)),_s({conversationList:r});}},{key:"_getConversationList",value:function value(e){if(Ze(e))return this.getLocalConversationList();if(Qe(e))return 0===e.length?[]:this.getLocalConversationList().filter(function(t){return e.includes(t.conversationID);});if(Xe(e)){var t=e.type,o=e.markType,n=e.groupName;return this.getLocalConversationList().filter(function(e){return(t!==D.CONV_C2C&&t!==D.CONV_GROUP||e.type===t)&&(!ze(n)||e.conversationGroupList.includes(n))&&(!$e(o)||e.markList.includes(o));});}return[];}},{key:"_handleC2CPeerReadTime",value:function value(){var e,t=C(this._conversationMap);try{for(t.s();!(e=t.n()).done;){var o=m(e.value,2),n=o[0],a=o[1];a.type===D.CONV_C2C&&(be.debug("".concat(this._className,"._handleC2CPeerReadTime conversationID:").concat(n," peerReadTime:").concat(a.peerReadTime)),this.recordPeerReadTime(n,a.peerReadTime));}}catch(s){t.e(s);}finally{t.f();}}},{key:"_isPagingGetGroupListCompleted",value:function value(){return this.getModule(io).isPagingGetCompleted();}},{key:"_hasLocalGroup",value:function value(e){return this.getModule(io).hasLocalGroup(e.replace(D.CONV_GROUP,""));}},{key:"getConversationProfile",value:function value(e){var t,o=this;if((t=this._conversationMap.has(e)?this._conversationMap.get(e):new Gs({conversationID:e,type:e.slice(0,3)===D.CONV_C2C?D.CONV_C2C:D.CONV_GROUP}))._isInfoCompleted||t.type===D.CONV_SYSTEM)return _s({conversation:t});if(Ct(e)&&!this._hasLocalGroup(e))return _s({conversation:t});var n=new Va(Ba.GET_CONVERSATION_PROFILE),a="".concat(this._className,".getConversationProfile");return be.log("".concat(a,". conversationID:").concat(e," remark:").concat(t.remark," lastMessage:"),t.lastMessage),this._updateUserOrGroupProfileCompletely(t).then(function(s){n.setNetworkType(o.getNetworkType()).setMessage("conversationID:".concat(e," unreadCount:").concat(s.data.conversation.unreadCount)).end();var r=o.getModule(co);if(r&&t.type===D.CONV_C2C){var i=e.replace(D.CONV_C2C,"");if(r.isMyFriend(i)){var c=r.getFriendRemark(i);t.remark!==c&&(t.remark=c,be.log("".concat(a,". conversationID:").concat(e," patch remark:").concat(t.remark)));}}return be.log("".concat(a," ok. conversationID:").concat(e)),s;}).catch(function(t){return o.probeNetwork().then(function(o){var a=m(o,2),s=a[0],r=a[1];n.setError(t,s,r).setMessage("conversationID:".concat(e)).end();}),be.error("".concat(a," failed. error:"),t),gs(t);});}},{key:"_updateUserOrGroupProfileCompletely",value:function value(e){var t=this;return e.type===D.CONV_C2C?this.getModule(so).getUserProfile({userIDList:[e.toAccount]}).then(function(o){var n=o.data;return 0===n.length?gs(new ls({code:Ca.USER_OR_GROUP_NOT_FOUND,message:Sa.USER_OR_GROUP_NOT_FOUND})):(e.userProfile=n[0],e._isInfoCompleted=!0,t._unshiftConversation(e),_s({conversation:e}));}):this.getModule(io).getGroupProfile({groupID:e.toAccount}).then(function(o){return e.groupProfile=o.data.group,e._isInfoCompleted=!0,t._unshiftConversation(e),_s({conversation:e});});}},{key:"_unshiftConversation",value:function value(e){e instanceof Gs&&!this._conversationMap.has(e.conversationID)&&(this._conversationMap=new Map([[e.conversationID,e]].concat(M(this._conversationMap))),this._setStorageConversationList(),this.emitConversationUpdate(!0,!1));}},{key:"_onProfileUpdated",value:function value(e){var t=this;e.data.forEach(function(e){var o=e.userID;if(o===t.getMyUserID())t._onMyProfileModified({latestNick:e.nick,latestAvatar:e.avatar});else{var n=t._conversationMap.get("".concat(D.CONV_C2C).concat(o));n&&(n.userProfile=e);}});}},{key:"deleteConversation",value:function value(e){var t=this,o={fromAccount:this.getMyUserID(),toAccount:void 0,type:void 0,toGroupID:void 0};if(!this._conversationMap.has(e)){var n=new ls({code:Ca.CONVERSATION_NOT_FOUND,message:Sa.CONVERSATION_NOT_FOUND});return gs(n);}var a=this._conversationMap.get(e).type;if(a===D.CONV_C2C)o.type=1,o.toAccount=e.replace(D.CONV_C2C,"");else{if(a!==D.CONV_GROUP){if(a===D.CONV_SYSTEM)return this.getModule(io).deleteGroupSystemNotice({messageList:this._messageListHandler.getLocalMessageList(e)}),this.deleteLocalConversation(e),_s({conversationID:e});var s=new ls({code:Ca.CONVERSATION_UN_RECORDED_TYPE,message:Sa.CONVERSATION_UN_RECORDED_TYPE});return gs(s);}if(!this._hasLocalGroup(e))return this.deleteLocalConversation(e),_s({conversationID:e});o.type=2,o.toGroupID=e.replace(D.CONV_GROUP,"");}var r=new Va(Ba.DELETE_CONVERSATION);r.setMessage("conversationID:".concat(e));var i="".concat(this._className,".deleteConversation");return be.log("".concat(i,". conversationID:").concat(e)),this.setMessageRead({conversationID:e}).then(function(){return t.request({protocolName:en,requestData:o});}).then(function(){return r.setNetworkType(t.getNetworkType()).end(),be.log("".concat(i," ok")),t.deleteLocalConversation(e),_s({conversationID:e});}).catch(function(e){return t.probeNetwork().then(function(t){var o=m(t,2),n=o[0],a=o[1];r.setError(e,n,a).end();}),be.error("".concat(i," failed. error:"),e),gs(e);});}},{key:"pinConversation",value:function value(e){var t=this,o=e.conversationID,n=e.isPinned;if(!this._conversationMap.has(o))return gs({code:Ca.CONVERSATION_NOT_FOUND,message:Sa.CONVERSATION_NOT_FOUND});var a=this.getLocalConversation(o);if(a.isPinned===n)return _s({conversationID:o});var s=new Va(Ba.PIN_CONVERSATION);s.setMessage("conversationID:".concat(o," isPinned:").concat(n));var r="".concat(this._className,".pinConversation");be.log("".concat(r,". conversationID:").concat(o," isPinned:").concat(n));var i=null;return Et(o)?i={type:1,toAccount:o.replace(D.CONV_C2C,"")}:Ct(o)&&(i={type:2,groupID:o.replace(D.CONV_GROUP,"")}),this.request({protocolName:tn,requestData:{fromAccount:this.getMyUserID(),operationType:!0===n?1:2,itemList:[i]}}).then(function(){return s.setNetworkType(t.getNetworkType()).end(),be.log("".concat(r," ok")),a.isPinned!==n&&(a.isPinned=n,t._sortConversationListAndEmitEvent()),as({conversationID:o});}).catch(function(e){return t.probeNetwork().then(function(t){var o=m(t,2),n=o[0],a=o[1];s.setError(e,n,a).end();}),be.error("".concat(r," failed. error:"),e),gs(e);});}},{key:"setMessageRemindType",value:function value(e){return this._messageRemindHandler.set(e);}},{key:"patchMessageRemindType",value:function value(e){var t=e.ID,o=e.isC2CConversation,n=e.messageRemindType,a=!1,s=this.getLocalConversation(o?"".concat(D.CONV_C2C).concat(t):"".concat(D.CONV_GROUP).concat(t));return s&&s.messageRemindType!==n&&(s.messageRemindType=n,a=!0),be.debug("".concat(this._className,".patchMessageRemindType options:"),e,"ret:".concat(a)),a;}},{key:"onC2CMessageRemindTypeSynced",value:function value(e){var t=this;be.debug("".concat(this._className,".onC2CMessageRemindTypeSynced options:"),e),e.dataList.forEach(function(e){if(!Kt(e.muteNotificationsSync)){var o,n=e.muteNotificationsSync,a=n.to,s=n.updateSequence,r=n.muteFlag;t._messageRemindHandler.setUpdateSequence(s),0===r?o=D.MSG_REMIND_ACPT_AND_NOTE:1===r?o=D.MSG_REMIND_DISCARD:2===r&&(o=D.MSG_REMIND_ACPT_NOT_NOTE);var i=0;t.patchMessageRemindType({ID:a,isC2CConversation:!0,messageRemindType:o})&&(i+=1),be.log("".concat(t._className,".onC2CMessageRemindTypeSynced updateCount:").concat(i)),i>=1&&t.emitConversationUpdate(!0,!1);}});}},{key:"onGroupMessageRemindTypeSynced",value:function value(e){be.debug("".concat(this._className,".onGroupMessageRemindTypeSynced options:"),e),this._messageRemindHandler.onGroupMessageRemindTypeUpdated(e);}},{key:"deleteLocalConversation",value:function value(e){var t=this._conversationMap.has(e);if(be.log("".concat(this._className,".deleteLocalConversation conversationID:").concat(e," has:").concat(t)),t){this._conversationMap.delete(e),this._roamingMessageKeyAndTimeMap.has(e)&&this._roamingMessageKeyAndTimeMap.delete(e),this._roamingMessageSequenceMap.has(e)&&this._roamingMessageSequenceMap.delete(e),this._setStorageConversationList(),this._messageListHandler.removeByConversationID(e),this._completedMap.delete(e);var o=!this._isTopicConversation(e);this.emitConversationUpdate(o,!1);}}},{key:"isMessageSentByCurrentInstance",value:function value(e){return!(!this._messageListHandler.hasLocalMessage(e.conversationID,e.ID)&&!this.singlyLinkedList.has(e.random));}},{key:"modifyMessageList",value:function value(e){if(e.startsWith(D.CONV_C2C)&&this._conversationMap.has(e)){var t=this._conversationMap.get(e),o=Date.now();this._messageListHandler.modifyMessageSentByPeer({conversationID:e,latestNick:t.userProfile.nick,latestAvatar:t.userProfile.avatar});var n=this.getModule(so).getNickAndAvatarByUserID(this.getMyUserID());this._messageListHandler.modifyMessageSentByMe({conversationID:e,latestNick:n.nick,latestAvatar:n.avatar}),be.log("".concat(this._className,".modifyMessageList conversationID:").concat(e," cost ").concat(Date.now()-o," ms"));}}},{key:"updateUserProfileSpecifiedKey",value:function value(e){be.log("".concat(this._className,".updateUserProfileSpecifiedKey options:"),e);var t=e.conversationID,o=e.nick,n=e.avatar;if(this._conversationMap.has(t)){var a=this._conversationMap.get(t).userProfile;ze(o)&&a.nick!==o&&(a.nick=o),ze(n)&&a.avatar!==n&&(a.avatar=n),this.emitConversationUpdate(!0,!1);}}},{key:"_onMyProfileModified",value:function value(e){var o=this,n=this.getLocalConversationList(),a=Date.now();n.forEach(function(n){o.modifyMessageSentByMe(t({conversationID:n.conversationID},e));}),be.log("".concat(this._className,"._onMyProfileModified. modify all messages sent by me, cost ").concat(Date.now()-a," ms"));}},{key:"modifyMessageSentByMe",value:function value(e){this._messageListHandler.modifyMessageSentByMe(e);}},{key:"getLatestMessageSentByMe",value:function value(e){return this._messageListHandler.getLatestMessageSentByMe(e);}},{key:"modifyMessageSentByPeer",value:function value(e){this._messageListHandler.modifyMessageSentByPeer(e);}},{key:"getLatestMessageSentByPeer",value:function value(e){return this._messageListHandler.getLatestMessageSentByPeer(e);}},{key:"pushIntoNoticeResult",value:function value(e,t){return!(!this._messageListHandler.pushIn(t)||this.singlyLinkedList.has(t.random))&&(e.push(t),!0);}},{key:"getGroupLocalLastMessageSequence",value:function value(e){return this._messageListHandler.getGroupLocalLastMessageSequence(e);}},{key:"checkAndPatchRemark",value:function value(){var e=Promise.resolve();if(0===this._conversationMap.size)return e;var t=this.getModule(co);if(!t)return e;var o=M(this._conversationMap.values()).filter(function(e){return e.type===D.CONV_C2C;});if(0===o.length)return e;var n=0;return o.forEach(function(e){var o=e.conversationID.replace(D.CONV_C2C,"");if(t.isMyFriend(o)){var a=t.getFriendRemark(o);e.remark!==a&&(e.remark=a,n+=1);}}),be.log("".concat(this._className,".checkAndPatchRemark. c2c conversation count:").concat(o.length,", patched count:").concat(n)),e;}},{key:"updateTopicConversation",value:function value(e){this._updateLocalConversationList({conversationOptionsList:e,isFromGetConversations:!0});}},{key:"sendReadReceipt",value:function value(e){var t=e[0],o=null;return t.conversationType===D.CONV_C2C?o=this._moduleManager.getModule(ro):t.conversationType===D.CONV_GROUP&&(o=this._moduleManager.getModule(io)),o?o.sendReadReceipt(e):gs({code:Ca.CANNOT_FIND_MODULE,message:Sa.CANNOT_FIND_MODULE});}},{key:"getReadReceiptList",value:function value(e){var t=e[0],o=null;return t.conversationType===D.CONV_C2C?o=this._moduleManager.getModule(ro):t.conversationType===D.CONV_GROUP&&(o=this._moduleManager.getModule(io)),o?o.getReadReceiptList(e):gs({code:Ca.CANNOT_FIND_MODULE,message:Sa.CANNOT_FIND_MODULE});}},{key:"getLastMessageTime",value:function value(e){var t=this.getLocalConversation(e);return t?t.lastMessage.lastTime:0;}},{key:"reset",value:function value(){be.log("".concat(this._className,".reset")),this._pagingStatus=jt.NOT_START,this._messageListHandler.reset(),this._messageRemindHandler.reset(),this._roamingMessageKeyAndTimeMap.clear(),this._roamingMessageSequenceMap.clear(),this.singlyLinkedList.reset(),this._peerReadTimeMap.clear(),this._completedMap.clear(),this._conversationMap.clear(),this._pagingTimeStamp=0,this._pagingStartIndex=0,this._pagingPinnedTimeStamp=0,this._pagingPinnedStartIndex=0,this._remoteGroupReadSequenceMap.clear(),this.resetReady();}}]),a;}(Ro),ws=function(){function e(t){n(this,e),this._groupModule=t,this._className="GroupTipsHandler",this._cachedGroupTipsMap=new Map(),this._checkCountMap=new Map(),this.MAX_CHECK_COUNT=4,this._getTopicPendingMap=new Map();}return s(e,[{key:"onCheckTimer",value:function value(e){e%1==0&&this._cachedGroupTipsMap.size>0&&this._checkCachedGroupTips();}},{key:"_checkCachedGroupTips",value:function value(){var e=this;this._cachedGroupTipsMap.forEach(function(t,o){var n=e._checkCountMap.get(o),a=e._groupModule.hasLocalGroup(o);be.log("".concat(e._className,"._checkCachedGroupTips groupID:").concat(o," hasLocalGroup:").concat(a," checkCount:").concat(n)),a?(e._notifyCachedGroupTips(o),e._checkCountMap.delete(o),e._groupModule.deleteUnjoinedAVChatRoom(o)):n>=e.MAX_CHECK_COUNT?(e._deleteCachedGroupTips(o),e._checkCountMap.delete(o)):(n++,e._checkCountMap.set(o,n));});}},{key:"onNewGroupTips",value:function value(e){be.debug("".concat(this._className,".onReceiveGroupTips count:").concat(e.dataList.length));var t=this.newGroupTipsStoredAndSummary(e),o=t.eventDataList,n=t.result,a=t.AVChatRoomMessageList;(a.length>0&&this._groupModule.onAVChatRoomMessage(a),o.length>0)&&(this._groupModule.updateNextMessageSeq(o),this._groupModule.getModule(po).onNewMessage({conversationOptionsList:o,isInstantMessage:!0}));n.length>0&&(this._groupModule.emitOuterEvent(S.MESSAGE_RECEIVED,n),this.handleMessageList(n));}},{key:"newGroupTipsStoredAndSummary",value:function value(e){for(var o=this,n=e.event,a=e.dataList,s=null,r=[],i=[],c={},u=[],l=function l(e,_l){var d=mt(a[e]),p=d.groupProfile,_=p.groupID,g=p.communityType,h=void 0===g?0:g,f=p.topicID,m=void 0===f?void 0:f,M=void 0,v=2===h&&!Kt(m);if(v){M=D.CONV_TOPIC,d.to=m;var I=o._groupModule.getModule(lo);I.hasLocalTopic(_,m)||o._getTopicPendingMap.has(m)||(o._getTopicPendingMap.set(m,1),I.getTopicList({groupID:_,topicIDList:[m]}).finally(function(){o._getTopicPendingMap.delete(m);}));}if(2===h&&Kt(m))return"continue";var y=o._groupModule.hasLocalGroup(_);if(!y&&o._groupModule.isUnjoinedAVChatRoom(_))return"continue";if(!y&&!v)return o._cacheGroupTipsAndProbe({groupID:_,event:n,item:d}),"continue";if(o._groupModule.isMessageFromOrToAVChatroom(_))return d.event=n,u.push(d),"continue";d.currentUser=o._groupModule.getMyUserID(),d.conversationType=D.CONV_GROUP,(s=new ns(d)).setElement({type:D.MSG_GRP_TIP,content:t(t({},d.elements),{},{groupProfile:d.groupProfile})}),s.isSystemMessage=!1;var T=o._groupModule.getModule(po),E=s,C=E.conversationID,S=E.sequence;if(6===n)s._onlineOnlyFlag=!0,i.push(s);else if(!T.pushIntoNoticeResult(i,s))return"continue";if(6===n&&T.getLocalConversation(C))return"continue";6!==n&&o._groupModule.getModule(No).addMessageSequence({key:Ga,message:s});var N=T.isRemoteRead({conversationID:C,sequence:S});if(Ze(c[C])){var A=0;"in"===s.flow&&(s._isExcludedFromUnreadCount||s._onlineOnlyFlag||N||(A=1)),c[C]=r.push({conversationID:C,unreadCount:A,type:Ze(M)?s.conversationType:M,subType:s.conversationSubType,lastMessage:s._isExcludedFromLastMessage?"":s})-1;}else{var O=c[C];r[O].type=s.conversationType,r[O].subType=s.conversationSubType,r[O].lastMessage=s._isExcludedFromLastMessage?"":s,"in"===s.flow&&(s._isExcludedFromUnreadCount||s._onlineOnlyFlag||N||r[O].unreadCount++);}},d=0,p=a.length;d<p;d++){l(d);}return{eventDataList:r,result:i,AVChatRoomMessageList:u};}},{key:"handleMessageList",value:function value(e){var t=this;e.forEach(function(e){switch(e.payload.operationType){case 1:t._onNewMemberComeIn(e);break;case 2:t._onMemberQuit(e);break;case 3:t._onMemberKickedOut(e);break;case 4:t._onMemberSetAdmin(e);break;case 5:t._onMemberCancelledAdmin(e);break;case 6:t._onGroupProfileModified(e);break;case 7:t._onMemberInfoModified(e);break;case 8:t._onTopicProfileUpdated(e);break;default:be.warn("".concat(t._className,".handleMessageList unknown operationType:").concat(e.payload.operationType));}});}},{key:"_onNewMemberComeIn",value:function value(e){var t=e.payload,o=t.memberNum,n=t.groupProfile.groupID,a=this._groupModule.getLocalGroupProfile(n);a&&$e(o)&&a.memberCount!==o&&(a.memberCount=o,this._updateConversationGroupProfile(a));}},{key:"_onMemberQuit",value:function value(e){var t=e.payload,o=t.memberNum,n=t.groupProfile.groupID,a=this._groupModule.getLocalGroupProfile(n);a&&$e(o)&&a.memberCount!==o&&(a.memberCount=o,this._updateConversationGroupProfile(a)),this._groupModule.getModule(uo).deleteLocalGroupMembers(n,e.payload.userIDList);}},{key:"_onMemberKickedOut",value:function value(e){var t=e.payload,o=t.memberNum,n=t.groupProfile.groupID,a=this._groupModule.getLocalGroupProfile(n);a&&$e(o)&&a.memberCount!==o&&(a.memberCount=o,this._updateConversationGroupProfile(a)),this._groupModule.getModule(uo).deleteLocalGroupMembers(n,e.payload.userIDList);}},{key:"_updateConversationGroupProfile",value:function value(e){this._groupModule.getModule(po).updateConversationGroupProfile([e]);}},{key:"_onMemberSetAdmin",value:function value(e){var t=e.payload.groupProfile.groupID,o=e.payload.userIDList,n=this._groupModule.getModule(uo);o.forEach(function(e){var o=n.getLocalGroupMemberInfo(t,e);o&&o.updateRole(D.GRP_MBR_ROLE_ADMIN);});}},{key:"_onMemberCancelledAdmin",value:function value(e){var t=e.payload.groupProfile.groupID,o=e.payload.userIDList,n=this._groupModule.getModule(uo);o.forEach(function(e){var o=n.getLocalGroupMemberInfo(t,e);o&&o.updateRole(D.GRP_MBR_ROLE_MEMBER);});}},{key:"_onGroupProfileModified",value:function value(e){var t=this,o=e.payload,n=o.newGroupProfile,a=o.groupProfile.groupID,s=this._groupModule.getLocalGroupProfile(a);Object.keys(n).forEach(function(e){switch(e){case"ownerID":t._ownerChanged(s,n);break;case"muteAllMembers":s.muteAllMembers=n.muteAllMembers;break;case"joinOption":s.joinOption=n.joinOption;break;default:s[e]=n[e];}});var r=!s.isSupportTopic;this._groupModule.emitGroupListUpdate(!0,r);}},{key:"_ownerChanged",value:function value(e,t){var o=e.groupID,n=this._groupModule.getLocalGroupProfile(o),a=this._groupModule.getMyUserID();if(a===t.ownerID){n.updateGroup({selfInfo:{role:D.GRP_MBR_ROLE_OWNER}});var s=this._groupModule.getModule(uo),r=s.getLocalGroupMemberInfo(o,a),i=this._groupModule.getLocalGroupProfile(o).ownerID,c=s.getLocalGroupMemberInfo(o,i);r&&r.updateRole(D.GRP_MBR_ROLE_OWNER),c&&c.updateRole(D.GRP_MBR_ROLE_MEMBER);}}},{key:"_onMemberInfoModified",value:function value(e){var t=e.to,o=e.payload,n=o.groupProfile,a=o.memberList,s=n.groupID;Tt(t)&&this._updateTopicMuteTime(e);var r=this._groupModule.getModule(uo);a.forEach(function(e){var t=r.getLocalGroupMemberInfo(s,e.userID);t&&$e(e.muteTime)&&t.updateMuteUntil(e.muteTime);});}},{key:"_updateTopicMuteTime",value:function value(e){var t=e.to,o=e.payload,n=o.groupProfile,a=o.memberList,s=void 0===a?[]:a,r=this._groupModule.getModule(lo),i=n.groupID,c=r.getLocalTopic(i,t);if(c){for(var u=!1,l=0;l<s.length;l++){var d=s[l];if(d.userID===this._groupModule.getMyUserID()&&d.muteTime>=0){c.updateSelfInfo({muteTime:d.muteTime}),u=!0;break;}}u&&this._groupModule.emitOuterEvent(S.TOPIC_UPDATED,{groupID:i,topic:c});}}},{key:"_onTopicProfileUpdated",value:function value(e){var o=e.payload,n=o.groupProfile.groupID,a=o.newTopicInfo;this._groupModule.getModule(lo).onTopicProfileUpdated(t({groupID:n,topicID:e.to},a));}},{key:"_cacheGroupTips",value:function value(e,t){this._cachedGroupTipsMap.has(e)||this._cachedGroupTipsMap.set(e,[]),this._cachedGroupTipsMap.get(e).push(t);}},{key:"_deleteCachedGroupTips",value:function value(e){this._cachedGroupTipsMap.has(e)&&this._cachedGroupTipsMap.delete(e);}},{key:"_notifyCachedGroupTips",value:function value(e){var t=this,o=this._cachedGroupTipsMap.get(e)||[];o.forEach(function(e){t.onNewGroupTips(e);}),this._deleteCachedGroupTips(e),be.log("".concat(this._className,"._notifyCachedGroupTips groupID:").concat(e," count:").concat(o.length));}},{key:"_cacheGroupTipsAndProbe",value:function value(e){var t=this,o=e.groupID,n=e.event,a=e.item;this._cacheGroupTips(o,{event:n,dataList:[a]}),this._groupModule.getGroupSimplifiedInfo(o).then(function(e){e.type===D.GRP_AVCHATROOM?t._groupModule.hasLocalGroup(o)?t._notifyCachedGroupTips(o):t._groupModule.setUnjoinedAVChatRoom(o):(t._groupModule.updateGroupMap([e]),t._notifyCachedGroupTips(o));}),this._checkCountMap.has(o)||this._checkCountMap.set(o,0),be.log("".concat(this._className,"._cacheGroupTipsAndProbe groupID:").concat(o));}},{key:"reset",value:function value(){this._cachedGroupTipsMap.clear(),this._checkCountMap.clear(),this._getTopicPendingMap.clear();}}]),e;}(),Fs=function(){function e(t){n(this,e),this._groupModule=t,this._className="CommonGroupHandler",this.tempConversationList=null,this._cachedGroupMessageMap=new Map(),this._checkCountMap=new Map(),this.MAX_CHECK_COUNT=4,this._getTopicPendingMap=new Map(),this._isPagingGetCompleted=!1,t.getInnerEmitterInstance().once(ms,this._initGroupList,this);}return s(e,[{key:"onCheckTimer",value:function value(e){e%1==0&&this._cachedGroupMessageMap.size>0&&this._checkCachedGroupMessage();}},{key:"_checkCachedGroupMessage",value:function value(){var e=this;this._cachedGroupMessageMap.forEach(function(t,o){var n=e._checkCountMap.get(o),a=e._groupModule.hasLocalGroup(o);be.log("".concat(e._className,"._checkCachedGroupMessage groupID:").concat(o," hasLocalGroup:").concat(a," checkCount:").concat(n)),a?(e._notifyCachedGroupMessage(o),e._checkCountMap.delete(o),e._groupModule.deleteUnjoinedAVChatRoom(o)):n>=e.MAX_CHECK_COUNT?(e._deleteCachedGroupMessage(o),e._checkCountMap.delete(o)):(n++,e._checkCountMap.set(o,n));});}},{key:"_initGroupList",value:function value(){var e=this;be.log("".concat(this._className,"._initGroupList"));var t=new Va(Ba.GET_GROUP_LIST_IN_STORAGE),o=this._groupModule.getStorageGroupList();if(Qe(o)&&o.length>0){o.forEach(function(t){e._groupModule.initGroupMap(t);}),this._groupModule.emitGroupListUpdate(!0,!1);var n=this._groupModule.getLocalGroupList().length;t.setNetworkType(this._groupModule.getNetworkType()).setMessage("group count:".concat(n)).end();}else t.setNetworkType(this._groupModule.getNetworkType()).setMessage("group count:0").end();be.log("".concat(this._className,"._initGroupList ok"));}},{key:"handleUpdateGroupLastMessage",value:function value(e){var t="".concat(this._className,".handleUpdateGroupLastMessage");if(be.debug("".concat(t," conversation count:").concat(e.length,", local group count:").concat(this._groupModule.getLocalGroupList().length)),0!==this._groupModule.getGroupMap().size){for(var o,n,a,s=!1,r=0,i=e.length;r<i;r++){(o=e[r]).type===D.CONV_GROUP&&(n=o.conversationID.split(/^GROUP/)[1],(a=this._groupModule.getLocalGroupProfile(n))&&(a.lastMessage=o.lastMessage,s=!0));}s&&(this._groupModule.sortLocalGroupList(),this._groupModule.emitGroupListUpdate(!0,!1));}else this.tempConversationList=e;}},{key:"onNewGroupMessage",value:function value(e){be.debug("".concat(this._className,".onNewGroupMessage count:").concat(e.dataList.length));var t=this._newGroupMessageStoredAndSummary(e),o=t.conversationOptionsList,n=t.messageList,a=t.AVChatRoomMessageList;(a.length>0&&this._groupModule.onAVChatRoomMessage(a),this._groupModule.filterModifiedMessage(n),o.length>0)&&(this._groupModule.updateNextMessageSeq(o),this._groupModule.getModule(po).onNewMessage({conversationOptionsList:o,isInstantMessage:!0}));var s=this._groupModule.filterUnmodifiedMessage(n);s.length>0&&this._groupModule.emitOuterEvent(S.MESSAGE_RECEIVED,s),n.length=0;}},{key:"_newGroupMessageStoredAndSummary",value:function value(e){var t=this,o=e.dataList,n=e.event,a=e.isInstantMessage,s=null,r=[],i=[],c=[],u={},l=this._groupModule.getModule(mo),d=this._groupModule.getModule(No),p=o.length;p>1&&o.sort(function(e,t){return e.sequence-t.sequence;});for(var _=function _(e){var p=mt(o[e]),_=p.groupProfile,g=_.groupID,h=_.communityType,f=void 0===h?0:h,m=_.topicID,M=void 0===m?void 0:m,v=void 0,I=2===f&&!Kt(M);if(I){v=D.CONV_TOPIC,p.to=M;var y=t._groupModule.getModule(lo);y.hasLocalTopic(g,M)||t._getTopicPendingMap.has(M)||(t._getTopicPendingMap.set(M,1),y.getTopicList({groupID:g,topicIDList:[M]}).finally(function(){t._getTopicPendingMap.delete(M);}));}if(2===f&&Kt(M))return"continue";var T=t._groupModule.hasLocalGroup(g);if(!T&&t._groupModule.isUnjoinedAVChatRoom(g))return"continue";if(!T&&!I)return t._cacheGroupMessageAndProbe({groupID:g,event:n,item:p}),"continue";if(t._groupModule.isMessageFromOrToAVChatroom(g))return p.event=n,c.push(p),"continue";p.currentUser=t._groupModule.getMyUserID(),p.conversationType=D.CONV_GROUP,p.isSystemMessage=!!p.isSystemMessage,s=new ns(p),p.elements=l.parseElements(p.elements,p.from),s.setElement(p.elements);var E=1===o[e].isModified,C=t._groupModule.getModule(po);if(C.isMessageSentByCurrentInstance(s)?s.isModified=E:E=!1,1===p.onlineOnlyFlag)s._onlineOnlyFlag=!0,C.isMessageSentByCurrentInstance(s)||i.push(s);else{if(!C.pushIntoMessageList(i,s,E))return"continue";d.addMessageSequence({key:Ga,message:s}),a&&s.clientTime>0&&d.addMessageDelay(s.clientTime);var S=s,N=S.conversationID,A=S.sequence,O=C.isRemoteRead({conversationID:N,sequence:A});if(Ze(u[N])){var R=0;"in"===s.flow&&(s._isExcludedFromUnreadCount||O||(R=1)),u[N]=r.push({conversationID:N,unreadCount:R,type:Ze(v)?s.conversationType:v,subType:s.conversationSubType,lastMessage:s._isExcludedFromLastMessage?"":s})-1;}else{var L=u[N];r[L].type=Ze(v)?s.conversationType:v,r[L].subType=s.conversationSubType,r[L].lastMessage=s._isExcludedFromLastMessage?"":s,"in"===s.flow&&(s._isExcludedFromUnreadCount||O||r[L].unreadCount++);}}},g=0;g<p;g++){_(g);}return{conversationOptionsList:r,messageList:i,AVChatRoomMessageList:c};}},{key:"onGroupMessageRevoked",value:function value(e){be.debug("".concat(this._className,".onGroupMessageRevoked nums:").concat(e.dataList.length));var t=this._groupModule.getModule(po),o=[],n=null;e.dataList.forEach(function(e){var a=e.elements.revokedInfos;Ze(a)||a.forEach(function(e){var a=Ze(e.topicID)?"GROUP".concat(e.groupID):"GROUP".concat(e.topicID);(n=t.revoke(a,e.sequence,e.random))&&o.push(n);});}),0!==o.length&&(t.onMessageRevoked(o),this._groupModule.emitOuterEvent(S.MESSAGE_REVOKED,o));}},{key:"_groupListTreeShaking",value:function value(e){for(var t=new Map(M(this._groupModule.getGroupMap())),o=0,n=e.length;o<n;o++){t.delete(e[o].groupID);}this._groupModule.hasJoinedAVChatRoom()&&this._groupModule.getJoinedAVChatRoom().forEach(function(e){t.delete(e);});this._groupModule.getGroupMap().forEach(function(e,o){e.isSupportTopic&&t.delete(o);});for(var a=M(t.keys()),s=0,r=a.length;s<r;s++){this._groupModule.deleteGroup(a[s]);}}},{key:"getGroupList",value:function value(e){var t=this,o="".concat(this._className,".getGroupList"),n=new Va(Ba.GET_GROUP_LIST);be.log("".concat(o));var a={introduction:"Introduction",notification:"Notification",createTime:"CreateTime",ownerID:"Owner_Account",lastInfoTime:"LastInfoTime",memberNum:"MemberNum",maxMemberNum:"MaxMemberNum",joinOption:"ApplyJoinOption",muteAllMembers:"ShutUpAllMember"},s=["Type","Name","FaceUrl","NextMsgSeq","LastMsgTime","AtInfoList"],r=[];e&&e.groupProfileFilter&&e.groupProfileFilter.forEach(function(e){a[e]&&s.push(a[e]);});var i=(e||{}).isGroupWithTopicOnly,c=void 0!==i&&i;return this._pagingGetGroupList({limit:50,offset:0,groupBaseInfoFilter:s,groupList:r,isGroupWithTopicOnly:c}).then(function(){be.log("".concat(o," ok. count:").concat(r.length," isGroupWithTopicOnly:").concat(c)),c||t._groupListTreeShaking(r),t._groupModule.updateGroupMap(r);var e=t._groupModule.getLocalGroupList().length;n.setNetworkType(t._groupModule.getNetworkType()).setMessage("remote count:".concat(r.length,", after tree shaking, local count:").concat(e,", isGroupWithTopicOnly:").concat(c)).end(),t.tempConversationList&&(be.log("".concat(o," update last message with tempConversationList, count:").concat(t.tempConversationList.length)),t.handleUpdateGroupLastMessage({data:t.tempConversationList}),t.tempConversationList=null),t._groupModule.patchGroupMessageRemindType(),t._groupModule.recomputeUnreadCount(),t._groupModule.emitGroupListUpdate(!0,!c);var a=t._groupModule.getLocalGroupList();if(c){var s=a.filter(function(e){return!0===e.isSupportTopic;});return as({groupList:s});}return t._isPagingGetCompleted=!0,as({groupList:a});}).catch(function(e){return t._groupModule.probeNetwork().then(function(t){var o=m(t,2),a=o[0],s=o[1];n.setError(e,a,s).end();}),be.error("".concat(o," failed. error:"),e),gs(e);});}},{key:"isPagingGetCompleted",value:function value(){return this._isPagingGetCompleted;}},{key:"_pagingGetGroupList",value:function value(e){var t=this,o="".concat(this._className,"._pagingGetGroupList"),n=e.isCommunityRelay,a=void 0!==n&&n,s=e.isGroupWithTopicOnly,r=void 0!==s&&s,i=e.limit,c=e.offset,u=e.groupBaseInfoFilter,l=e.groupList;if(r)return this._pagingGetGroupListWithTopic({limit:i,offset:c,groupBaseInfoFilter:u,groupList:l});var d=new Va(Ba.PAGING_GET_GROUP_LIST);return this._groupModule.request({protocolName:pn,requestData:{type:a?D.GRP_COMMUNITY:void 0,memberAccount:this._groupModule.getMyUserID(),limit:i,offset:c,responseFilter:{groupBaseInfoFilter:u,selfInfoFilter:["Role","JoinTime","MsgFlag","MsgSeq"]}}}).then(function(e){var n=e.data,s=n.groups,r=void 0===s?[]:s,p=n.totalCount;l.push.apply(l,M(r)),t._handleGroupAtInfoWithoutTopic(a,r);var _=c+i,g=!(p>_),h="offset:".concat(c," totalCount:").concat(p," isCompleted:").concat(g," ")+"currentCount:".concat(l.length," isCommunityRelay:").concat(a);return d.setNetworkType(t._groupModule.getNetworkType()).setMessage("".concat(h)).end(),a||g?!a&&g?(be.log("".concat(o," start to get community list")),c=0,t._pagingGetGroupList({limit:i,offset:c,groupBaseInfoFilter:u,groupList:l,isCommunityRelay:!0})):a&&!g?(c=_,t._pagingGetGroupList({limit:i,offset:c,groupBaseInfoFilter:u,groupList:l,isCommunityRelay:!0})):(be.log("".concat(o," ok. totalCount:").concat(l.length)),as({groupList:l})):(c=_,t._pagingGetGroupList({limit:i,offset:c,groupBaseInfoFilter:u,groupList:l}));}).catch(function(e){return 11e3!==e.code&&t._groupModule.probeNetwork().then(function(t){var o=m(t,2),n=o[0],s=o[1];d.setMessage("isCommunityRelay:".concat(a)).setError(e,n,s).end();}),a?(11e3===e.code&&(d=null,be.log("".concat(o," ok. community unavailable"))),_s({groupList:l})):gs(e);});}},{key:"_pagingGetGroupListWithTopic",value:function value(e){var t=this,o="".concat(this._className,"._pagingGetGroupListWithTopic"),n=e.limit,a=e.offset,s=e.groupBaseInfoFilter,r=e.groupList,i=new Va(Ba.PAGING_GET_GROUP_LIST_WITH_TOPIC);return this._groupModule.request({protocolName:pn,requestData:{type:D.GRP_COMMUNITY,memberAccount:this._groupModule.getMyUserID(),limit:n,offset:a,responseFilter:{groupBaseInfoFilter:s,selfInfoFilter:["Role","JoinTime","MsgFlag","MsgSeq"]},isSupportTopic:1}}).then(function(e){var c=e.data,u=c.groups,l=void 0===u?[]:u,d=c.totalCount;r.push.apply(r,M(l));var p=a+n,_=!(d>p),g="offset:".concat(a," totalCount:").concat(d," isCompleted:").concat(_," ")+"currentCount:".concat(r.length);return i.setNetworkType(t._groupModule.getNetworkType()).setMessage("".concat(g)).end(),_?(be.log("".concat(o," ok. totalCount:").concat(r.length)),as({groupList:r})):(a=p,t._pagingGetGroupListWithTopic({limit:n,offset:a,groupBaseInfoFilter:s,groupList:r}));}).catch(function(e){return t._groupModule.probeNetwork().then(function(t){var o=m(t,2),n=o[0],a=o[1];i.setError(e,n,a).end();}),gs(e);});}},{key:"_cacheGroupMessage",value:function value(e,t){this._cachedGroupMessageMap.has(e)||this._cachedGroupMessageMap.set(e,[]),this._cachedGroupMessageMap.get(e).push(t);}},{key:"_deleteCachedGroupMessage",value:function value(e){this._cachedGroupMessageMap.has(e)&&this._cachedGroupMessageMap.delete(e);}},{key:"_notifyCachedGroupMessage",value:function value(e){var t=this,o=this._cachedGroupMessageMap.get(e)||[];o.forEach(function(e){t.onNewGroupMessage(e);}),this._deleteCachedGroupMessage(e),be.log("".concat(this._className,"._notifyCachedGroupMessage groupID:").concat(e," count:").concat(o.length));}},{key:"_cacheGroupMessageAndProbe",value:function value(e){var t=this,o=e.groupID,n=e.event,a=e.item;this._cacheGroupMessage(o,{event:n,dataList:[a]}),this._groupModule.getGroupSimplifiedInfo(o).then(function(e){e.type===D.GRP_AVCHATROOM?t._groupModule.hasLocalGroup(o)?t._notifyCachedGroupMessage(o):t._groupModule.setUnjoinedAVChatRoom(o):(t._groupModule.updateGroupMap([e]),t._notifyCachedGroupMessage(o));}),this._checkCountMap.has(o)||this._checkCountMap.set(o,0),be.log("".concat(this._className,"._cacheGroupMessageAndProbe groupID:").concat(o));}},{key:"_handleGroupAtInfoWithoutTopic",value:function value(e,o){var n=this;e&&0!==o.length&&o.forEach(function(e){var o=e.groupID,a=e.groupAtInfoList,s=[];Ze(a)||(a.forEach(function(e){s.push(t(t({},e),{},{groupID:o}));}),n._groupModule.getModule(po).onNewGroupAtTips({dataList:s}));});}},{key:"reset",value:function value(){this._cachedGroupMessageMap.clear(),this._checkCountMap.clear(),this._getTopicPendingMap.clear(),this._isPagingGetCompleted=!1,this._groupModule.getInnerEmitterInstance().once(ms,this._initGroupList,this);}}]),e;}(),qs={1:"init",2:"modify",3:"clear",4:"delete"},Vs=function(){function e(t){n(this,e),this._groupModule=t,this._className="GroupAttributesHandler",this._groupAttributesMap=new Map(),this.CACHE_EXPIRE_TIME=3e4,this._groupModule.getInnerEmitterInstance().on(Ms,this._onCloudConfigUpdated,this);}return s(e,[{key:"_onCloudConfigUpdated",value:function value(){var e=this._groupModule.getCloudConfig("grp_attr_cache_time");Ze(e)||(this.CACHE_EXPIRE_TIME=Number(e));}},{key:"updateLocalMainSequenceOnReconnected",value:function value(){this._groupAttributesMap.forEach(function(e){e.localMainSequence=0;});}},{key:"onGroupAttributesUpdated",value:function value(e){var t=this,o=e.groupID,n=e.groupAttributeOption,a=n.mainSequence,s=n.hasChangedAttributeInfo,r=n.groupAttributeList,i=void 0===r?[]:r,c=n.operationType;if(be.log("".concat(this._className,".onGroupAttributesUpdated. groupID:").concat(o," hasChangedAttributeInfo:").concat(s," operationType:").concat(c)),!Ze(c)){if(1===s){if(4===c){var u=[];i.forEach(function(e){u.push(e.key);}),i=M(u),u=null;}return this._refreshCachedGroupAttributes({groupID:o,remoteMainSequence:a,groupAttributeList:i,operationType:qs[c]}),void this._emitGroupAttributesUpdated(o);}if(this._groupAttributesMap.has(o)){var l=this._groupAttributesMap.get(o).avChatRoomKey;this._getGroupAttributes({groupID:o,avChatRoomKey:l}).then(function(){t._emitGroupAttributesUpdated(o);});}}}},{key:"initGroupAttributesCache",value:function value(e){var t=e.groupID,o=e.avChatRoomKey;this._groupAttributesMap.set(t,{lastUpdateTime:0,localMainSequence:0,remoteMainSequence:0,attributes:new Map(),avChatRoomKey:o}),be.log("".concat(this._className,".initGroupAttributesCache groupID:").concat(t," avChatRoomKey:").concat(o));}},{key:"initGroupAttributes",value:function value(e){var t=this,o=e.groupID,n=e.groupAttributes,a=this._checkCachedGroupAttributes({groupID:o,funcName:"initGroupAttributes"});if(!0!==a)return gs(a);var s=this._groupAttributesMap.get(o),r=s.remoteMainSequence,i=s.avChatRoomKey,c=new Va(Ba.INIT_GROUP_ATTRIBUTES);return c.setMessage("groupID:".concat(o," mainSequence:").concat(r," groupAttributes:").concat(JSON.stringify(n))),this._groupModule.request({protocolName:qn,requestData:{groupID:o,avChatRoomKey:i,mainSequence:r,groupAttributeList:this._transformGroupAttributes(n)}}).then(function(e){var a=e.data,s=a.mainSequence,r=M(a.groupAttributeList);return r.forEach(function(e){e.value=n[e.key];}),t._refreshCachedGroupAttributes({groupID:o,remoteMainSequence:s,groupAttributeList:r,operationType:"init"}),c.setNetworkType(t._groupModule.getNetworkType()).end(),be.log("".concat(t._className,".initGroupAttributes ok. groupID:").concat(o)),as({groupAttributes:n});}).catch(function(e){return t._groupModule.probeNetwork().then(function(t){var o=m(t,2),n=o[0],a=o[1];c.setError(e,n,a).end();}),gs(e);});}},{key:"setGroupAttributes",value:function value(e){var t=this,o=e.groupID,n=e.groupAttributes,a=this._checkCachedGroupAttributes({groupID:o,funcName:"setGroupAttributes"});if(!0!==a)return gs(a);var s=this._groupAttributesMap.get(o),r=s.remoteMainSequence,i=s.avChatRoomKey,c=s.attributes,u=this._transformGroupAttributes(n);u.forEach(function(e){var t=e.key;e.sequence=0,c.has(t)&&(e.sequence=c.get(t).sequence);});var l=new Va(Ba.SET_GROUP_ATTRIBUTES);return l.setMessage("groupID:".concat(o," mainSequence:").concat(r," groupAttributes:").concat(JSON.stringify(n))),this._groupModule.request({protocolName:Vn,requestData:{groupID:o,avChatRoomKey:i,mainSequence:r,groupAttributeList:u}}).then(function(e){var a=e.data,s=a.mainSequence,r=M(a.groupAttributeList);return r.forEach(function(e){e.value=n[e.key];}),t._refreshCachedGroupAttributes({groupID:o,remoteMainSequence:s,groupAttributeList:r,operationType:"modify"}),l.setNetworkType(t._groupModule.getNetworkType()).end(),be.log("".concat(t._className,".setGroupAttributes ok. groupID:").concat(o)),as({groupAttributes:n});}).catch(function(e){return t._groupModule.probeNetwork().then(function(t){var o=m(t,2),n=o[0],a=o[1];l.setError(e,n,a).end();}),gs(e);});}},{key:"deleteGroupAttributes",value:function value(e){var t=this,o=e.groupID,n=e.keyList,a=void 0===n?[]:n,s=this._checkCachedGroupAttributes({groupID:o,funcName:"deleteGroupAttributes"});if(!0!==s)return gs(s);var r=this._groupAttributesMap.get(o),i=r.remoteMainSequence,c=r.avChatRoomKey,u=r.attributes,l=M(u.keys()),d=Kn,p="clear",_={groupID:o,avChatRoomKey:c,mainSequence:i};if(a.length>0){var g=[];l=[],d=Bn,p="delete",a.forEach(function(e){var t=0;u.has(e)&&(t=u.get(e).sequence,l.push(e)),g.push({key:e,sequence:t});}),_.groupAttributeList=g;}var h=new Va(Ba.DELETE_GROUP_ATTRIBUTES);return h.setMessage("groupID:".concat(o," mainSequence:").concat(i," keyList:").concat(a," protocolName:").concat(d)),this._groupModule.request({protocolName:d,requestData:_}).then(function(e){var n=e.data.mainSequence;return t._refreshCachedGroupAttributes({groupID:o,remoteMainSequence:n,groupAttributeList:a,operationType:p}),h.setNetworkType(t._groupModule.getNetworkType()).end(),be.log("".concat(t._className,".deleteGroupAttributes ok. groupID:").concat(o)),as({keyList:l});}).catch(function(e){return t._groupModule.probeNetwork().then(function(t){var o=m(t,2),n=o[0],a=o[1];h.setError(e,n,a).end();}),gs(e);});}},{key:"getGroupAttributes",value:function value(e){var t=this,o=e.groupID,n=this._checkCachedGroupAttributes({groupID:o,funcName:"getGroupAttributes"});if(!0!==n)return gs(n);var a=this._groupAttributesMap.get(o),s=a.avChatRoomKey,r=a.lastUpdateTime,i=a.localMainSequence,c=a.remoteMainSequence,u=new Va(Ba.GET_GROUP_ATTRIBUTES);if(u.setMessage("groupID:".concat(o," localMainSequence:").concat(i," remoteMainSequence:").concat(c," keyList:").concat(e.keyList)),Date.now()-r>=this.CACHE_EXPIRE_TIME||i<c)return this._getGroupAttributes({groupID:o,avChatRoomKey:s}).then(function(n){u.setMoreMessage("get attributes from remote. count:".concat(n.length)).setNetworkType(t._groupModule.getNetworkType()).end(),be.log("".concat(t._className,".getGroupAttributes from remote. groupID:").concat(o));var a=t._getLocalGroupAttributes(e);return as({groupAttributes:a});}).catch(function(e){return t._groupModule.probeNetwork().then(function(t){var o=m(t,2),n=o[0],a=o[1];u.setError(e,n,a).end();}),gs(e);});u.setMoreMessage("get attributes from cache").setNetworkType(this._groupModule.getNetworkType()).end(),be.log("".concat(this._className,".getGroupAttributes from cache. groupID:").concat(o));var l=this._getLocalGroupAttributes(e);return _s({groupAttributes:l});}},{key:"_getGroupAttributes",value:function value(e){var o=this;return this._groupModule.request({protocolName:Hn,requestData:t({},e)}).then(function(t){var n=t.data,a=n.mainSequence,s=n.groupAttributeList,r=M(s);return Ze(a)||o._refreshCachedGroupAttributes({groupID:e.groupID,remoteMainSequence:a,groupAttributeList:r,operationType:"get"}),be.log("".concat(o._className,"._getGroupAttributes ok. groupID:").concat(e.groupID)),s;}).catch(function(e){return gs(e);});}},{key:"_getLocalGroupAttributes",value:function value(e){var t=e.groupID,o=e.keyList,n=void 0===o?[]:o,a={};if(!this._groupAttributesMap.has(t))return a;var s=this._groupAttributesMap.get(t).attributes;if(n.length>0)n.forEach(function(e){s.has(e)&&(a[e]=s.get(e).value);});else{var r,i=C(s.keys());try{for(i.s();!(r=i.n()).done;){var c=r.value;a[c]=s.get(c).value;}}catch(u){i.e(u);}finally{i.f();}}return a;}},{key:"_refreshCachedGroupAttributes",value:function value(e){var t=e.groupID,o=e.remoteMainSequence,n=e.groupAttributeList,a=e.operationType;if(this._groupAttributesMap.has(t)){var s=this._groupAttributesMap.get(t),r=s.localMainSequence;if("get"===a||o-r==1)s.remoteMainSequence=o,s.localMainSequence=o,s.lastUpdateTime=Date.now(),this._updateCachedAttributes({groupAttributes:s,groupAttributeList:n,operationType:a});else{if(r===o)return;s.remoteMainSequence=o;}this._groupAttributesMap.set(t,s);var i="operationType:".concat(a," localMainSequence:").concat(r," remoteMainSequence:").concat(o);be.log("".concat(this._className,"._refreshCachedGroupAttributes. ").concat(i));}}},{key:"_updateCachedAttributes",value:function value(e){var t=e.groupAttributes,o=e.groupAttributeList,n=e.operationType;"clear"!==n?"delete"!==n?("init"===n&&t.attributes.clear(),o.forEach(function(e){var o=e.key,n=e.value,a=e.sequence;t.attributes.set(o,{value:n,sequence:a});})):o.forEach(function(e){t.attributes.delete(e);}):t.attributes.clear();}},{key:"_checkCachedGroupAttributes",value:function value(e){var t=e.groupID,o=e.funcName;if(this._groupModule.hasLocalGroup(t)&&this._groupModule.getLocalGroupProfile(t).type!==D.GRP_AVCHATROOM){return be.warn("".concat(this._className,"._checkCachedGroupAttributes. ").concat("非直播群不能使用群属性 API")),new ls({code:Ca.CANNOT_USE_GRP_ATTR_NOT_AVCHATROOM,message:"非直播群不能使用群属性 API"});}var n=this._groupAttributesMap.get(t);if(Ze(n)){var a="如果 groupID:".concat(t," 是直播群,使用 ").concat(o," 前先使用 joinGroup 接口申请加入群组,详细请参考 https://web.sdk.qcloud.com/im/doc/zh-cn/SDK.html#joinGroup");return be.warn("".concat(this._className,"._checkCachedGroupAttributes. ").concat(a)),new ls({code:Ca.CANNOT_USE_GRP_ATTR_AVCHATROOM_UNJOIN,message:a});}return!0;}},{key:"_transformGroupAttributes",value:function value(e){var t=[];return Object.keys(e).forEach(function(o){t.push({key:o,value:e[o]});}),t;}},{key:"_emitGroupAttributesUpdated",value:function value(e){var t=this._getLocalGroupAttributes({groupID:e});this._groupModule.emitOuterEvent(S.GROUP_ATTRIBUTES_UPDATED,{groupID:e,groupAttributes:t});}},{key:"reset",value:function value(){this._groupAttributesMap.clear(),this.CACHE_EXPIRE_TIME=3e4;}}]),e;}(),Bs=function(){function e(t){n(this,e);var o=t.manager,a=t.groupID,s=t.onInit,r=t.onSuccess,i=t.onFail;this._className="Polling",this._manager=o,this._groupModule=o._groupModule,this._onInit=s,this._onSuccess=r,this._onFail=i,this._groupID=a,this._timeoutID=-1,this._isRunning=!1,this._protocolName=Pn;}return s(e,[{key:"start",value:function value(){var e=this._groupModule.isLoggedIn();e||(this._protocolName=Un),be.log("".concat(this._className,".start pollingInterval:").concat(this._manager.getPollingInterval()," isLoggedIn:").concat(e)),this._isRunning=!0,this._request();}},{key:"isRunning",value:function value(){return this._isRunning;}},{key:"_request",value:function value(){var e=this,t=this._onInit(this._groupID);this._groupModule.request({protocolName:this._protocolName,requestData:t}).then(function(t){e._onSuccess(e._groupID,t),e.isRunning()&&(clearTimeout(e._timeoutID),e._timeoutID=setTimeout(e._request.bind(e),e._manager.getPollingInterval()));}).catch(function(t){e._onFail(e._groupID,t),e.isRunning()&&(clearTimeout(e._timeoutID),e._timeoutID=setTimeout(e._request.bind(e),e._manager.MAX_POLLING_INTERVAL));});}},{key:"stop",value:function value(){be.log("".concat(this._className,".stop")),this._timeoutID>0&&(clearTimeout(this._timeoutID),this._timeoutID=-1),this._isRunning=!1;}}]),e;}(),Ks={3:!0,4:!0,5:!0,6:!0,17:!0},Hs=function(){function e(t){n(this,e),this._groupModule=t,this._className="AVChatRoomHandler",this._joinedGroupMap=new Map(),this._pollingRequestInfoMap=new Map(),this._pollingInstanceMap=new Map(),this.sequencesLinkedList=new Os(200),this.messageIDLinkedList=new Os(100),this.receivedMessageCount=0,this._reportMessageStackedCount=0,this._onlineMemberCountMap=new Map(),this.DEFAULT_EXPIRE_TIME=60,this.DEFAULT_POLLING_INTERVAL=300,this.MAX_POLLING_INTERVAL=2e3,this._pollingInterval=this.DEFAULT_POLLING_INTERVAL,this.DEFAULT_POLLING_NO_MESSAGE_COUNT=20,this.DEFAULT_POLLING_INTERVAL_PLUS=2e3,this._pollingNoMessageCount=0,this._startBroadcastSeq=1,this._broadcastMessageIDMap=new Map();}return s(e,[{key:"hasJoinedAVChatRoom",value:function value(){return this._joinedGroupMap.size>0;}},{key:"checkJoinedAVChatRoomByID",value:function value(e){return this._joinedGroupMap.has(e);}},{key:"getJoinedAVChatRoom",value:function value(){return this._joinedGroupMap.size>0?M(this._joinedGroupMap.keys()):null;}},{key:"_updateRequestData",value:function value(e){var o=this._pollingRequestInfoMap.get(e);return e===M(this._pollingInstanceMap.keys())[0]?t(t({},o),{},{startBroadcastSeq:this._startBroadcastSeq}):t({},o);}},{key:"_handleSuccess",value:function value(e,t){var o=t.data,n=o.key,a=o.nextSeq,s=o.rspMsgList,r=o.errorCode,i=o.nextBroadcastSeq,c=o.broadcastMessageList;if(0!==r){var u=this._pollingRequestInfoMap.get(e),l=new Va(Ba.LONG_POLLING_AV_ERROR),d=u?"".concat(u.key,"-").concat(u.startSeq):"requestInfo is undefined";l.setMessage("".concat(e,"-").concat(d,"-").concat(t.errorInfo)).setCode(t.errorCode).setNetworkType(this._groupModule.getNetworkType()).end(!0);}else{if(!this.checkJoinedAVChatRoomByID(e))return;ze(n)&&$e(a)&&this._pollingRequestInfoMap.set(e,{key:n,startSeq:a}),$e(i)&&i>this._startBroadcastSeq&&(this._startBroadcastSeq=i),Qe(s)&&s.length>0?(s.forEach(function(e){e.to=e.groupID;}),this.onMessage(s)):(this._pollingNoMessageCount+=1,this._pollingNoMessageCount===this.DEFAULT_POLLING_NO_MESSAGE_COUNT&&(this._pollingInterval=this.DEFAULT_POLLING_INTERVAL+this.DEFAULT_POLLING_INTERVAL_PLUS)),this._onBroadcastMessage(c);}}},{key:"_handleFailure",value:function value(e,t){}},{key:"onMessage",value:function value(e){if(Qe(e)&&0!==e.length){0!==this._pollingNoMessageCount&&(this._pollingNoMessageCount=0,this._pollingInterval=this.DEFAULT_POLLING_INTERVAL);var t=null,o=[],n=this._getModule(po),a=this._getModule(No),s=e.length;s>1&&e.sort(function(e,t){return e.sequence-t.sequence;});for(var r=this._getModule(_o),i=0;i<s;i++){if(Ks[e[i].event]){this.receivedMessageCount+=1,t=this.packMessage(e[i],e[i].event);var c=1===e[i].isModified,u=1===e[i].isHistoryMessage;if((r.isUnlimitedAVChatRoom()||!this.sequencesLinkedList.has(t.sequence))&&!this.messageIDLinkedList.has(t.ID)){var l=t.conversationID;if(this.receivedMessageCount%50==0?this._getModule(Eo).detectFirstRound(l,this.sequencesLinkedList.data()):this.receivedMessageCount%80==0&&this._getModule(Eo).detectSecondRound(l,this.sequencesLinkedList.data()),null!==this.sequencesLinkedList.tail()){var d=this.sequencesLinkedList.tail().value,p=t.sequence-d;p>1&&p<=20?this._getModule(Eo).onMessageMaybeLost(l,d+1,p-1):p<-1&&p>=-20&&this._getModule(Eo).onMessageMaybeLost(l,t.sequence+1,Math.abs(p)-1);}this.sequencesLinkedList.set(t.sequence),this.messageIDLinkedList.set(t.ID);var _=!1;if(this._isMessageSentByCurrentInstance(t)?c&&(_=!0,t.isModified=c,n.updateMessageIsModifiedProperty(t)):_=!0,_){if(t.conversationType===D.CONV_SYSTEM&&5===t.payload.operationType&&this._onGroupDismissed(t.payload.groupProfile.groupID),!u&&t.conversationType!==D.CONV_SYSTEM){var g=t.conversationID.replace(D.CONV_GROUP,"");this._pollingInstanceMap.has(g)?a.addMessageSequence({key:Ua,message:t}):(t.type!==D.MSG_GRP_TIP&&t.clientTime>0&&a.addMessageDelay(t.clientTime),a.addMessageSequence({key:Pa,message:t}));}o.push(t);}}}else be.warn("".concat(this._className,".onMessage 未处理的 event 类型: ").concat(e[i].event));}if(0!==o.length){this._groupModule.filterModifiedMessage(o);var h=this.packConversationOption(o);if(h.length>0)this._getModule(po).onNewMessage({conversationOptionsList:h,isInstantMessage:!0});be.debug("".concat(this._className,".onMessage count:").concat(o.length)),this._checkMessageStacked(o);var f=this._groupModule.filterUnmodifiedMessage(o);f.length>0&&this._groupModule.emitOuterEvent(S.MESSAGE_RECEIVED,f),o.length=0;}}}},{key:"_onGroupDismissed",value:function value(e){be.log("".concat(this._className,"._onGroupDismissed groupID:").concat(e)),this._groupModule.deleteLocalGroupAndConversation(e),this.reset(e);}},{key:"_checkMessageStacked",value:function value(e){var t=e.length;t>=100&&(be.warn("".concat(this._className,"._checkMessageStacked 直播群消息堆积数:").concat(e.length,'!可能会导致微信小程序渲染时遇到 "Dom limit exceeded" 的错误,建议接入侧此时只渲染最近的10条消息')),this._reportMessageStackedCount<5&&(new Va(Ba.MESSAGE_STACKED).setNetworkType(this._groupModule.getNetworkType()).setMessage("count:".concat(t," groupID:").concat(M(this._joinedGroupMap.keys()))).setLevel("warning").end(),this._reportMessageStackedCount+=1));}},{key:"_isMessageSentByCurrentInstance",value:function value(e){return!!this._getModule(po).isMessageSentByCurrentInstance(e);}},{key:"packMessage",value:function value(e,t){e.currentUser=this._groupModule.getMyUserID(),e.conversationType=5===t?D.CONV_SYSTEM:D.CONV_GROUP,e.isSystemMessage=!!e.isSystemMessage;var o=new ns(e),n=this.packElements(e,t);return o.setElement(n),o;}},{key:"packElements",value:function value(e,o){return 4===o||6===o?(this._updateMemberCountByGroupTips(e),this._onGroupAttributesUpdated(e),{type:D.MSG_GRP_TIP,content:t(t({},e.elements),{},{groupProfile:e.groupProfile})}):5===o?{type:D.MSG_GRP_SYS_NOTICE,content:t(t({},e.elements),{},{groupProfile:t(t({},e.groupProfile),{},{groupID:e.groupID})})}:this._getModule(mo).parseElements(e.elements,e.from);}},{key:"packConversationOption",value:function value(e){for(var t=new Map(),o=0;o<e.length;o++){var n=e[o],a=n.conversationID;if(t.has(a)){var s=t.get(a);s.lastMessage=n,"in"===n.flow&&s.unreadCount++;}else t.set(a,{conversationID:n.conversationID,unreadCount:"out"===n.flow?0:1,type:n.conversationType,subType:n.conversationSubType,lastMessage:n});}return M(t.values());}},{key:"_updateMemberCountByGroupTips",value:function value(e){var t=e.groupProfile.groupID,o=e.elements.onlineMemberInfo,n=void 0===o?void 0:o;if(!Kt(n)){var a=n.onlineMemberNum,s=void 0===a?0:a,r=n.expireTime,i=void 0===r?this.DEFAULT_EXPIRE_TIME:r,c=this._onlineMemberCountMap.get(t)||{},u=Date.now();Kt(c)?Object.assign(c,{lastReqTime:0,lastSyncTime:0,latestUpdateTime:u,memberCount:s,expireTime:i}):(c.latestUpdateTime=u,c.memberCount=s),be.debug("".concat(this._className,"._updateMemberCountByGroupTips info:"),c),this._onlineMemberCountMap.set(t,c);}}},{key:"_onBroadcastMessage",value:function value(e){if(!Kt(e)){for(var t=[],o=e.length,n=null,a=0;a<o;a++){Ks[e[a].event]?((n=this.packMessage(e[a],e[a].event)).isBroadcastMessage=!0,this._broadcastMessageIDMap.has(n.ID)||(t.push(n),this._broadcastMessageIDMap.set(n.ID,1))):be.warn("".concat(this._className,"._onBroadcastMessage 未处理的 event 类型: ").concat(e[a].event));}t.length>0&&this._groupModule.emitOuterEvent(S.MESSAGE_RECEIVED,t);}}},{key:"start",value:function value(e){if(this._pollingInstanceMap.has(e)){var t=this._pollingInstanceMap.get(e);t.isRunning()||t.start();}else{var o=new Bs({manager:this,groupID:e,onInit:this._updateRequestData.bind(this),onSuccess:this._handleSuccess.bind(this),onFail:this._handleFailure.bind(this)});o.start(),this._pollingInstanceMap.set(e,o),be.log("".concat(this._className,".start groupID:").concat(e));}}},{key:"handleJoinResult",value:function value(e){var t=this;return this._preCheck().then(function(){var o=e.longPollingKey,n=e.group,a=n.groupID;return t._joinedGroupMap.set(a,n),t._groupModule.updateGroupMap([n]),t._groupModule.deleteUnjoinedAVChatRoom(a),t._groupModule.emitGroupListUpdate(!0,!1),Ze(o)?_s({status:Ke,group:n}):Promise.resolve();});}},{key:"startRunLoop",value:function value(e){var t=this;return this.handleJoinResult(e).then(function(){var o=e.longPollingKey,n=e.group,a=e.startSeq,s=void 0===a?0:a,r=n.groupID;return t._pollingRequestInfoMap.set(r,{key:o,startSeq:s}),t.start(r),t._groupModule.isLoggedIn()?_s({status:Ke,group:n}):_s({status:Ke});});}},{key:"_preCheck",value:function value(){if(this._getModule(_o).isUnlimitedAVChatRoom())return Promise.resolve();if(!this.hasJoinedAVChatRoom())return Promise.resolve();var e=m(this._joinedGroupMap.entries().next().value,2),t=e[0],o=e[1];if(this._groupModule.isLoggedIn()){if(!(o.selfInfo.role===D.GRP_MBR_ROLE_OWNER||o.ownerID===this._groupModule.getMyUserID()))return this._groupModule.quitGroup(t);this._groupModule.deleteLocalGroupAndConversation(t);}else this._groupModule.deleteLocalGroupAndConversation(t);return this.reset(t),Promise.resolve();}},{key:"joinWithoutAuth",value:function value(e){var t=this,o=e.groupID,n="".concat(this._className,".joinWithoutAuth"),a=new Va(Ba.JOIN_WITHOUT_AUTH);return this._groupModule.request({protocolName:Mn,requestData:e}).then(function(e){var s=e.data.longPollingKey;if(t._groupModule.probeNetwork().then(function(e){var t=m(e,2),n=(t[0],t[1]);a.setNetworkType(n).setMessage("groupID:".concat(o," longPollingKey:").concat(s)).end(!0);}),Ze(s))return gs(new ls({code:Ca.CANNOT_JOIN_NON_AVCHATROOM_WITHOUT_LOGIN,message:Sa.CANNOT_JOIN_NON_AVCHATROOM_WITHOUT_LOGIN}));be.log("".concat(n," ok. groupID:").concat(o)),t._getModule(po).setCompleted("".concat(D.CONV_GROUP).concat(o));var r=new Ls({groupID:o});return t.startRunLoop({group:r,longPollingKey:s}),as({status:Ke});}).catch(function(e){return be.error("".concat(n," failed. groupID:").concat(o," error:"),e),t._groupModule.probeNetwork().then(function(t){var n=m(t,2),s=n[0],r=n[1];a.setError(e,s,r).setMessage("groupID:".concat(o)).end(!0);}),gs(e);}).finally(function(){t._groupModule.getModule(ho).reportAtOnce();});}},{key:"getGroupOnlineMemberCount",value:function value(e){var t=this._onlineMemberCountMap.get(e)||{},o=Date.now();return Kt(t)||o-t.lastSyncTime>1e3*t.expireTime&&o-t.latestUpdateTime>1e4&&o-t.lastReqTime>3e3?(t.lastReqTime=o,this._onlineMemberCountMap.set(e,t),this._getGroupOnlineMemberCount(e).then(function(e){return as({memberCount:e.memberCount});}).catch(function(e){return gs(e);})):_s({memberCount:t.memberCount});}},{key:"_getGroupOnlineMemberCount",value:function value(e){var t=this,o="".concat(this._className,"._getGroupOnlineMemberCount");return this._groupModule.request({protocolName:bn,requestData:{groupID:e}}).then(function(n){var a=t._onlineMemberCountMap.get(e)||{},s=n.data,r=s.onlineMemberNum,i=void 0===r?0:r,c=s.expireTime,u=void 0===c?t.DEFAULT_EXPIRE_TIME:c;be.log("".concat(o," ok. groupID:").concat(e," memberCount:").concat(i," expireTime:").concat(u));var l=Date.now();return Kt(a)&&(a.lastReqTime=l),t._onlineMemberCountMap.set(e,Object.assign(a,{lastSyncTime:l,latestUpdateTime:l,memberCount:i,expireTime:u})),{memberCount:i};}).catch(function(n){return be.warn("".concat(o," failed. error:"),n),new Va(Ba.GET_GROUP_ONLINE_MEMBER_COUNT).setCode(n.code).setMessage("groupID:".concat(e," error:").concat(JSON.stringify(n))).setNetworkType(t._groupModule.getNetworkType()).end(),Promise.reject(n);});}},{key:"_onGroupAttributesUpdated",value:function value(e){var t=e.groupID,o=e.elements,n=o.operationType,a=o.newGroupProfile;if(6===n){var s=(void 0===a?void 0:a).groupAttributeOption;Kt(s)||this._groupModule.onGroupAttributesUpdated({groupID:t,groupAttributeOption:s});}}},{key:"_getModule",value:function value(e){return this._groupModule.getModule(e);}},{key:"setPollingInterval",value:function value(e){Ze(e)||($e(e)?this._pollingInterval=this.DEFAULT_POLLING_INTERVAL=e:this._pollingInterval=this.DEFAULT_POLLING_INTERVAL=parseInt(e,10));}},{key:"setPollingIntervalPlus",value:function value(e){Ze(e)||($e(e)?this.DEFAULT_POLLING_INTERVAL_PLUS=e:this.DEFAULT_POLLING_INTERVAL_PLUS=parseInt(e,10));}},{key:"setPollingNoMessageCount",value:function value(e){Ze(e)||($e(e)?this.DEFAULT_POLLING_NO_MESSAGE_COUNT=e:this.DEFAULT_POLLING_NO_MESSAGE_COUNT=parseInt(e,10));}},{key:"getPollingInterval",value:function value(){return this._pollingInterval;}},{key:"onAVChatRoomMemberBanned",value:function value(e){var t=e.payload.groupProfile.groupID;be.log("".concat(this._className,".onAVChatRoomMemberBanned groupID:").concat(t)),this._groupModule.deleteLocalGroupAndConversation(t),this.reset(t);}},{key:"reset",value:function value(e){if(e){be.log("".concat(this._className,".reset groupID:").concat(e));var t=this._pollingInstanceMap.get(e);t&&t.stop(),this._pollingInstanceMap.delete(e),this._joinedGroupMap.delete(e),this._pollingRequestInfoMap.delete(e),this._onlineMemberCountMap.delete(e);}else{be.log("".concat(this._className,".reset all"));var o,n=C(this._pollingInstanceMap.values());try{for(n.s();!(o=n.n()).done;){o.value.stop();}}catch(a){n.e(a);}finally{n.f();}this._pollingInstanceMap.clear(),this._joinedGroupMap.clear(),this._pollingRequestInfoMap.clear(),this._onlineMemberCountMap.clear(),this._broadcastMessageIDMap.clear();}this.sequencesLinkedList.reset(),this.messageIDLinkedList.reset(),this.receivedMessageCount=0,this._reportMessageStackedCount=0,this._pollingInterval=this.DEFAULT_POLLING_INTERVAL=300,this.DEFAULT_POLLING_NO_MESSAGE_COUNT=20,this.DEFAULT_POLLING_INTERVAL_PLUS=2e3,this._pollingNoMessageCount=0;}}]),e;}(),xs=1,Ws=15,Ys=function(){function e(t){n(this,e),this._groupModule=t,this._className="GroupSystemNoticeHandler",this.pendencyMap=new Map();}return s(e,[{key:"onNewGroupSystemNotice",value:function value(e){var t=e.dataList,o=e.isSyncingEnded,n=e.isInstantMessage;be.debug("".concat(this._className,".onReceiveSystemNotice count:").concat(t.length));var a=this.newSystemNoticeStoredAndSummary({notifiesList:t,isInstantMessage:n}),s=a.eventDataList,r=a.result;s.length>0&&(this._groupModule.getModule(po).onNewMessage({conversationOptionsList:s,isInstantMessage:n}),this._onReceivedGroupSystemNotice({result:r,isInstantMessage:n}));n?r.length>0&&this._groupModule.emitOuterEvent(S.MESSAGE_RECEIVED,r):!0===o&&this._clearGroupSystemNotice();}},{key:"newSystemNoticeStoredAndSummary",value:function value(e){var o=e.notifiesList,n=e.isInstantMessage,a=null,s=o.length,r=0,i=[],c={conversationID:D.CONV_SYSTEM,unreadCount:0,type:D.CONV_SYSTEM,subType:null,lastMessage:null};for(r=0;r<s;r++){var u=o[r],l=u.groupProfile,d=l.communityType,p=void 0===d?0:d,_=l.topicID,g=void 0===_?void 0:_,h=u.elements,f=h.topicIDList,m=void 0===f?void 0:f,M=h.operationType;if(!(2!==p||Kt(g)&&Kt(m))){if([17,18,20].includes(M)){this._handleTopicSystemNotice(u);continue;}Kt(g)||(u.to=g);}if(u.elements.operationType!==Ws)u.currentUser=this._groupModule.getMyUserID(),u.conversationType=D.CONV_SYSTEM,u.conversationID=D.CONV_SYSTEM,(a=new ns(u)).setElement({type:D.MSG_GRP_SYS_NOTICE,content:t(t({},u.elements),{},{groupProfile:t({},u.groupProfile)})}),a.isSystemMessage=!0,(1===a.sequence&&1===a.random||2===a.sequence&&2===a.random)&&(a.sequence=dt(),a.random=dt(),a.generateMessageID(),be.log("".concat(this._className,".newSystemNoticeStoredAndSummary sequence and random maybe duplicated, regenerate. ID:").concat(a.ID))),this._groupModule.getModule(po).pushIntoNoticeResult(i,a)&&(n?c.unreadCount++:a.setIsRead(!0),c.subType=a.conversationSubType);}return c.lastMessage=i[i.length-1],{eventDataList:i.length>0?[c]:[],result:i};}},{key:"_clearGroupSystemNotice",value:function value(){var e=this;this.getPendencyList().then(function(t){t.forEach(function(t){e.pendencyMap.set("".concat(t.from,"_").concat(t.groupID,"_").concat(t.to),t);});var o=e._groupModule.getModule(po).getLocalMessageList(D.CONV_SYSTEM),n=[];o.forEach(function(t){var o=t.payload,a=o.operatorID,s=o.operationType,r=o.groupProfile;if(s===xs){var i="".concat(a,"_").concat(r.groupID,"_").concat(r.to),c=e.pendencyMap.get(i);c&&$e(c.handled)&&0!==c.handled&&n.push(t);}}),e.deleteGroupSystemNotice({messageList:n});});}},{key:"deleteGroupSystemNotice",value:function value(e){var t=this,o="".concat(this._className,".deleteGroupSystemNotice");return Qe(e.messageList)&&0!==e.messageList.length?(be.log("".concat(o," ")+e.messageList.map(function(e){return e.ID;})),this._groupModule.request({protocolName:Gn,requestData:{messageListToDelete:e.messageList.map(function(e){return{from:D.CONV_SYSTEM,messageSeq:e.clientSequence,messageRandom:e.random};})}}).then(function(){be.log("".concat(o," ok"));var n=t._groupModule.getModule(po);return e.messageList.forEach(function(e){n.deleteLocalMessage(e);}),as();}).catch(function(e){return be.error("".concat(o," error:"),e),gs(e);})):_s();}},{key:"getPendencyList",value:function value(e){var t=this;return this._groupModule.request({protocolName:kn,requestData:{startTime:e&&e.startTime?e.startTime:0,limit:e&&e.limit?e.limit:10,handleAccount:this._groupModule.getMyUserID()}}).then(function(e){var o=e.data.pendencyList;return 0!==e.data.nextStartTime?t.getPendencyList({startTime:e.data.nextStartTime}).then(function(e){return[].concat(M(o),M(e));}):o;});}},{key:"_onReceivedGroupSystemNotice",value:function value(e){var t=this,o=e.result;e.isInstantMessage&&o.forEach(function(e){switch(e.payload.operationType){case 1:break;case 2:t._onApplyGroupRequestAgreed(e);break;case 3:break;case 4:t._onMemberKicked(e);break;case 5:t._onGroupDismissed(e);break;case 6:break;case 7:t._onInviteGroup(e);break;case 8:t._onQuitGroup(e);break;case 9:t._onSetManager(e);break;case 10:t._onDeleteManager(e);break;case 11:case 12:case 15:break;case 20:t._onMessageRemindTypeSynced(e);break;case 21:t._groupModule.onAVChatRoomMemberBanned(e);}});}},{key:"_onApplyGroupRequestAgreed",value:function value(e){var t=this,o=e.payload.groupProfile.groupID;this._groupModule.hasLocalGroup(o)||this._groupModule.getGroupProfile({groupID:o}).then(function(e){var o=e.data.group;if(o){t._groupModule.updateGroupMap([o]);var n=!o.isSupportTopic;t._groupModule.emitGroupListUpdate(!0,n);}});}},{key:"_onMemberKicked",value:function value(e){var t=e.payload.groupProfile.groupID;this._groupModule.hasLocalGroup(t)&&this._groupModule.deleteLocalGroupAndConversation(t);}},{key:"_onGroupDismissed",value:function value(e){var t=e.payload.groupProfile.groupID;this._groupModule.hasLocalGroup(t)&&this._groupModule.deleteLocalGroupAndConversation(t);var o=this._groupModule._AVChatRoomHandler;o&&o.checkJoinedAVChatRoomByID(t)&&o.reset(t);}},{key:"_onInviteGroup",value:function value(e){var t=this,o=e.payload.groupProfile.groupID;this._groupModule.hasLocalGroup(o)||this._groupModule.getGroupProfile({groupID:o}).then(function(e){var o=e.data.group;o&&(t._groupModule.updateGroupMap([o]),t._groupModule.emitGroupListUpdate());});}},{key:"_onQuitGroup",value:function value(e){var t=e.payload.groupProfile.groupID;this._groupModule.hasLocalGroup(t)&&this._groupModule.deleteLocalGroupAndConversation(t);}},{key:"_onSetManager",value:function value(e){var t=e.payload.groupProfile,o=t.to,n=t.groupID,a=this._groupModule.getModule(uo).getLocalGroupMemberInfo(n,o);a&&a.updateRole(D.GRP_MBR_ROLE_ADMIN);}},{key:"_onDeleteManager",value:function value(e){var t=e.payload.groupProfile,o=t.to,n=t.groupID,a=this._groupModule.getModule(uo).getLocalGroupMemberInfo(n,o);a&&a.updateRole(D.GRP_MBR_ROLE_MEMBER);}},{key:"_onMessageRemindTypeSynced",value:function value(e){var t=e.payload.groupProfile.groupID,o=e.payload.messageRemindType;this._groupModule.getModule(po).onGroupMessageRemindTypeSynced({groupID:t,messageRemindType:o});}},{key:"_handleTopicSystemNotice",value:function value(e){var t=e.groupProfile,o=t.groupID,n=t.topicID,a=e.elements,s=a.operationType,r=a.topicIDList,i=a.messageRemindType,c=this._groupModule.getModule(lo);17===s?c.onTopicCreated({groupID:o,topicID:n}):18===s?c.onTopicDeleted({groupID:o,topicIDList:r}):20===s&&c.onTopicMessageRemindTypeUpdated({groupID:o,topicID:n,messageRemindType:i});}},{key:"reset",value:function value(){this.pendencyMap.clear();}}]),e;}(),js=["relayFlag"],$s=function(e){i(a,e);var o=f(a);function a(e){var t;return n(this,a),(t=o.call(this,e))._className="GroupModule",t._commonGroupHandler=null,t._AVChatRoomHandler=null,t._groupSystemNoticeHandler=null,t._commonGroupHandler=new Fs(g(t)),t._groupAttributesHandler=new Vs(g(t)),t._AVChatRoomHandler=new Hs(g(t)),t._groupTipsHandler=new ws(g(t)),t._groupSystemNoticeHandler=new Ys(g(t)),t.groupMap=new Map(),t._unjoinedAVChatRoomList=new Map(),t._receiptDetailCompleteMap=new Map(),t.getInnerEmitterInstance().on(Ms,t._onCloudConfigUpdated,g(t)),t;}return s(a,[{key:"_onCloudConfigUpdated",value:function value(){var e=this.getCloudConfig("polling_interval"),t=this.getCloudConfig("polling_interval_plus"),o=this.getCloudConfig("polling_no_msg_count");this._AVChatRoomHandler&&(be.log("".concat(this._className,"._onCloudConfigUpdated pollingInterval:").concat(e)+" pollingIntervalPlus:".concat(t," pollingNoMessageCount:").concat(o)),this._AVChatRoomHandler.setPollingInterval(e),this._AVChatRoomHandler.setPollingIntervalPlus(t),this._AVChatRoomHandler.setPollingNoMessageCount(o));}},{key:"onCheckTimer",value:function value(e){this.isLoggedIn()&&(this._commonGroupHandler.onCheckTimer(e),this._groupTipsHandler.onCheckTimer(e));}},{key:"guardForAVChatRoom",value:function value(e){var t=this;if(e.conversationType===D.CONV_GROUP){var o=Tt(e.to)?wt(e.to):e.to;return this.hasLocalGroup(o)?_s():this.getGroupProfile({groupID:o}).then(function(n){var a=n.data.group.type;if(be.log("".concat(t._className,".guardForAVChatRoom. groupID:").concat(o," type:").concat(a)),a===D.GRP_AVCHATROOM){var s="userId:".concat(e.from," 未加入群 groupID:").concat(o,"。发消息前先使用 joinGroup 接口申请加群,详细请参考 https://web.sdk.qcloud.com/im/doc/zh-cn/SDK.html#joinGroup");return be.warn("".concat(t._className,".guardForAVChatRoom sendMessage not allowed. ").concat(s)),gs(new ls({code:Ca.MESSAGE_SEND_FAIL,message:s,data:{message:e}}));}return _s();});}return _s();}},{key:"checkJoinedAVChatRoomByID",value:function value(e){return!!this._AVChatRoomHandler&&this._AVChatRoomHandler.checkJoinedAVChatRoomByID(e);}},{key:"onNewGroupMessage",value:function value(e){this._commonGroupHandler&&this._commonGroupHandler.onNewGroupMessage(e);}},{key:"updateNextMessageSeq",value:function value(e){var t=this;if(Qe(e)){var o=this.getModule(lo);e.forEach(function(e){var n=e.conversationID.replace(D.CONV_GROUP,"");if(Tt(n)){var a=n,s=e.lastMessage.sequence+1;n=wt(a);var r=o.getLocalTopic(n,a);r&&(r.updateNextMessageSeq(s),r.updateLastMessage(e.lastMessage));}t.groupMap.has(n)&&(t.groupMap.get(n).nextMessageSeq=e.lastMessage.sequence+1);});}}},{key:"onNewGroupTips",value:function value(e){this._groupTipsHandler&&this._groupTipsHandler.onNewGroupTips(e);}},{key:"onGroupMessageRevoked",value:function value(e){this._commonGroupHandler&&this._commonGroupHandler.onGroupMessageRevoked(e);}},{key:"onNewGroupSystemNotice",value:function value(e){this._groupSystemNoticeHandler&&this._groupSystemNoticeHandler.onNewGroupSystemNotice(e);}},{key:"onGroupMessageReadNotice",value:function value(e){var t=this;e.dataList.forEach(function(e){var o=e.elements.groupMessageReadNotice;if(!Ze(o)){var n=t.getModule(po);o.forEach(function(e){var o=e.groupID,a=e.topicID,s=void 0===a?void 0:a,r=e.lastMessageSeq;be.debug("".concat(t._className,".onGroupMessageReadNotice groupID:").concat(o," lastMessageSeq:").concat(r));var i="".concat(D.CONV_GROUP).concat(o),c=!0;Kt(s)||(i="".concat(D.CONV_GROUP).concat(s),c=!1),n.updateIsReadAfterReadReport({conversationID:i,lastMessageSeq:r}),n.updateUnreadCount(i,c),n.clearGroupAtInfoList(i,c);});}});}},{key:"onReadReceiptList",value:function value(e){var t=this;be.debug("".concat(this._className,".onReadReceiptList options:"),JSON.stringify(e)),e.dataList.forEach(function(e){var o=e.groupProfile,n=e.elements,a=o.groupID,s=t.getModule(po),r=n.readReceiptList;s.updateReadReceiptInfo({groupID:a,readReceiptList:r});});}},{key:"onGroupMessageModified",value:function value(e){be.debug("".concat(this._className,".onGroupMessageModified options:"),JSON.stringify(e));var o=this.getModule(po);e.dataList.forEach(function(e){o.onMessageModified(t(t({},e),{},{conversationType:D.CONV_GROUP,to:e.topicID?e.topicID:e.groupID}));});}},{key:"deleteGroupSystemNotice",value:function value(e){this._groupSystemNoticeHandler&&this._groupSystemNoticeHandler.deleteGroupSystemNotice(e);}},{key:"initGroupMap",value:function value(e){this.groupMap.set(e.groupID,new Ls(e));}},{key:"deleteGroup",value:function value(e){this.groupMap.delete(e);}},{key:"updateGroupMap",value:function value(e){var t,o=this,n=this.getModule(po);e.forEach(function(e){t=e.groupID,o.groupMap.has(t)?o.groupMap.get(t).updateGroup(e):(o.groupMap.set(t,new Ls(e)),n.deleteGroupRomaingMessageInfo(t));});var a,s=this.getMyUserID(),r=C(this.groupMap);try{for(r.s();!(a=r.n()).done;){m(a.value,2)[1].selfInfo.userID=s;}}catch(i){r.e(i);}finally{r.f();}this._setStorageGroupList();}},{key:"getStorageGroupList",value:function value(){return this.getModule(go).getItem("groupMap");}},{key:"_setStorageGroupList",value:function value(){var e=this.getLocalGroupList().filter(function(e){var t=e.type;return!It(t);}).filter(function(e){return!e.isSupportTopic;}).slice(0,20).map(function(e){return{groupID:e.groupID,name:e.name,avatar:e.avatar,type:e.type};});this.getModule(go).setItem("groupMap",e);}},{key:"getGroupMap",value:function value(){return this.groupMap;}},{key:"getLocalGroupList",value:function value(){return M(this.groupMap.values());}},{key:"getLocalGroupProfile",value:function value(e){return this.groupMap.get(e);}},{key:"sortLocalGroupList",value:function value(){var e=M(this.groupMap).filter(function(e){var t=m(e,2);t[0];return!Kt(t[1].lastMessage);});e.sort(function(e,t){return t[1].lastMessage.lastTime-e[1].lastMessage.lastTime;}),this.groupMap=new Map(M(e));}},{key:"updateGroupLastMessage",value:function value(e){this._commonGroupHandler&&this._commonGroupHandler.handleUpdateGroupLastMessage(e);}},{key:"emitGroupListUpdate",value:function value(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=this.getLocalGroupList();if(e&&this.emitOuterEvent(S.GROUP_LIST_UPDATED),t){var n=JSON.parse(JSON.stringify(o)),a=this.getModule(po);a.updateConversationGroupProfile(n);}}},{key:"patchGroupMessageRemindType",value:function value(){var e=this.getLocalGroupList(),t=this.getModule(po),o=0;e.forEach(function(e){!0===t.patchMessageRemindType({ID:e.groupID,isC2CConversation:!1,messageRemindType:e.selfInfo.messageRemindType})&&(o+=1);}),be.log("".concat(this._className,".patchGroupMessageRemindType count:").concat(o));}},{key:"recomputeUnreadCount",value:function value(){var e=this.getLocalGroupList(),t=this.getModule(po);e.forEach(function(e){var o=e.groupID,n=e.selfInfo,a=n.excludedUnreadSequenceList,s=n.readedSequence;if(Qe(a)){var r=0;a.forEach(function(t){t>=s&&t<=e.nextMessageSeq-1&&(r+=1);}),r>=1&&t.recomputeGroupUnreadCount({conversationID:"".concat(D.CONV_GROUP).concat(o),count:r});}});}},{key:"getMyNameCardByGroupID",value:function value(e){var t=this.getLocalGroupProfile(e);return t?t.selfInfo.nameCard:"";}},{key:"isPagingGetCompleted",value:function value(){return!!this._commonGroupHandler&&this._commonGroupHandler.isPagingGetCompleted();}},{key:"getGroupList",value:function value(e){return this._commonGroupHandler?this._commonGroupHandler.getGroupList(e):_s();}},{key:"getGroupProfile",value:function value(e){var t=this,o=new Va(Ba.GET_GROUP_PROFILE),n="".concat(this._className,".getGroupProfile"),a=e.groupID,s=e.groupCustomFieldFilter;be.log("".concat(n," groupID:").concat(a));var r={groupIDList:[a],responseFilter:{groupBaseInfoFilter:["Type","Name","Introduction","Notification","FaceUrl","Owner_Account","CreateTime","InfoSeq","LastInfoTime","LastMsgTime","MemberNum","MaxMemberNum","ApplyJoinOption","NextMsgSeq","ShutUpAllMember"],groupCustomFieldFilter:s,memberInfoFilter:["Role","JoinTime","MsgSeq","MsgFlag","NameCard"]}};return this.getGroupProfileAdvance(r).then(function(e){var s,r=e.data,i=r.successGroupList,c=r.failureGroupList;if(be.log("".concat(n," ok")),c.length>0)return gs(c[0]);(It(i[0].type)&&!t.hasLocalGroup(a)?s=new Ls(i[0]):(t.updateGroupMap(i),s=t.getLocalGroupProfile(a)),s.isSupportTopic)||t.getModule(po).updateConversationGroupProfile([s]);return o.setNetworkType(t.getNetworkType()).setMessage("groupID:".concat(a," type:").concat(s.type," muteAllMembers:").concat(s.muteAllMembers," ownerID:").concat(s.ownerID)).end(),as({group:s});}).catch(function(a){return t.probeNetwork().then(function(t){var n=m(t,2),s=n[0],r=n[1];o.setError(a,s,r).setMessage("groupID:".concat(e.groupID)).end();}),be.error("".concat(n," failed. error:"),a),gs(a);});}},{key:"getGroupProfileAdvance",value:function value(e){var o=this,n="".concat(this._className,".getGroupProfileAdvance"),a=e.groupIDList;Qe(a)&&a.length>50&&(be.warn("".concat(n," 获取群资料的数量不能超过50个")),a.length=50);var s=[],r=[];a.forEach(function(e){yt({groupID:e})?r.push(e):s.push(e);});var i=[];if(s.length>0){var c=this._getGroupProfileAdvance(t(t({},e),{},{groupIDList:s}));i.push(c);}if(r.length>0){var u=this._getGroupProfileAdvance(t(t({},e),{},{groupIDList:r,relayFlag:s.length>0}));i.push(u);}return Promise.all(i).then(function(e){var t=[],o=[];return e.forEach(function(e){t.push.apply(t,M(e.successGroupList)),o.push.apply(o,M(e.failureGroupList));}),as({successGroupList:t,failureGroupList:o});}).catch(function(e){return be.error("".concat(o._className,"._getGroupProfileAdvance failed. error:"),e),gs(e);});}},{key:"_getGroupProfileAdvance",value:function value(e){var t=this,o=e.relayFlag,n=void 0!==o&&o,a=_(e,js);return this.request({protocolName:_n,requestData:a}).then(function(e){be.log("".concat(t._className,"._getGroupProfileAdvance ok."));var o=e.data.groups;return{successGroupList:o.filter(function(e){return Ze(e.errorCode)||0===e.errorCode;}),failureGroupList:o.filter(function(e){return e.errorCode&&0!==e.errorCode;}).map(function(e){return new ls({code:e.errorCode,message:e.errorInfo,data:{groupID:e.groupID}});})};}).catch(function(t){return n&&yt({groupID:e.groupIDList[0]})?{successGroupList:[],failureGroupList:[]}:gs(t);});}},{key:"createGroup",value:function value(e){var o=this,n="".concat(this._className,".createGroup"),a=e.type,s=e.groupID;if(!["Public","Private","ChatRoom","AVChatRoom","Community"].includes(a))return gs({code:Ca.ILLEGAL_GROUP_TYPE,message:Sa.ILLEGAL_GROUP_TYPE});if(!yt({type:a})){if(!Kt(s)&&yt({groupID:s}))return gs({code:Ca.ILLEGAL_GROUP_ID,message:Sa.ILLEGAL_GROUP_ID});e.isSupportTopic=void 0;}if(It(a)&&!Ze(e.memberList)&&e.memberList.length>0&&(be.warn("".concat(n," 创建 AVChatRoom 时不能添加群成员,自动忽略该字段")),e.memberList=void 0),vt(a)||Ze(e.joinOption)||(be.warn("".concat(n," 创建 Work/Meeting/AVChatRoom/Community 群时不能设置字段 joinOption,自动忽略该字段")),e.joinOption=void 0),yt({type:a})){if(!Kt(s)&&!yt({groupID:s}))return gs({code:Ca.ILLEGAL_GROUP_ID,message:Sa.ILLEGAL_GROUP_ID});e.isSupportTopic=!0===e.isSupportTopic?1:0;}var r=new Va(Ba.CREATE_GROUP);be.log("".concat(n," options:"),e);var i=[];return this.request({protocolName:gn,requestData:t(t({},e),{},{ownerID:this.getMyUserID(),webPushFlag:1})}).then(function(a){var s=a.data,c=s.groupID,u=s.overLimitUserIDList,l=void 0===u?[]:u;if(i=l,r.setNetworkType(o.getNetworkType()).setMessage("groupType:".concat(e.type," groupID:").concat(c," overLimitUserIDList=").concat(l)).end(),be.log("".concat(n," ok groupID:").concat(c," overLimitUserIDList:"),l),e.type===D.GRP_AVCHATROOM)return o.getGroupProfile({groupID:c});if(e.type===D.GRP_COMMUNITY&&1===e.isSupportTopic)return o.getGroupProfile({groupID:c});Kt(e.memberList)||Kt(l)||(e.memberList=e.memberList.filter(function(e){return-1===l.indexOf(e.userID);})),o.updateGroupMap([t(t({},e),{},{groupID:c})]);var d=o.getModule(ao),p=d.createCustomMessage({to:c,conversationType:D.CONV_GROUP,payload:{data:"group_create",extension:"".concat(o.getMyUserID(),"创建群组")}});return d.sendMessageInstance(p),o.emitGroupListUpdate(),o.getGroupProfile({groupID:c});}).then(function(e){var t=e.data.group,o=t.selfInfo,n=o.nameCard,a=o.joinTime;return t.updateSelfInfo({nameCard:n,joinTime:a,messageRemindType:D.MSG_REMIND_ACPT_AND_NOTE,role:D.GRP_MBR_ROLE_OWNER}),as({group:t,overLimitUserIDList:i});}).catch(function(t){return r.setMessage("groupType:".concat(e.type)),o.probeNetwork().then(function(e){var o=m(e,2),n=o[0],a=o[1];r.setError(t,n,a).end();}),be.error("".concat(n," failed. error:"),t),gs(t);});}},{key:"dismissGroup",value:function value(e){var t=this,o="".concat(this._className,".dismissGroup");if(this.hasLocalGroup(e)&&this.getLocalGroupProfile(e).type===D.GRP_WORK)return gs(new ls({code:Ca.CANNOT_DISMISS_WORK,message:Sa.CANNOT_DISMISS_WORK}));var n=new Va(Ba.DISMISS_GROUP);return n.setMessage("groupID:".concat(e)),be.log("".concat(o," groupID:").concat(e)),this.request({protocolName:hn,requestData:{groupID:e}}).then(function(){return n.setNetworkType(t.getNetworkType()).end(),be.log("".concat(o," ok")),t.deleteLocalGroupAndConversation(e),t.checkJoinedAVChatRoomByID(e)&&t._AVChatRoomHandler.reset(e),as({groupID:e});}).catch(function(e){return t.probeNetwork().then(function(t){var o=m(t,2),a=o[0],s=o[1];n.setError(e,a,s).end();}),be.error("".concat(o," failed. error:"),e),gs(e);});}},{key:"updateGroupProfile",value:function value(e){var t=this,o="".concat(this._className,".updateGroupProfile");!this.hasLocalGroup(e.groupID)||vt(this.getLocalGroupProfile(e.groupID).type)||Ze(e.joinOption)||(be.warn("".concat(o," Work/Meeting/AVChatRoom/Community 群不能设置字段 joinOption,自动忽略该字段")),e.joinOption=void 0),Ze(e.muteAllMembers)||(e.muteAllMembers?e.muteAllMembers="On":e.muteAllMembers="Off");var n=new Va(Ba.UPDATE_GROUP_PROFILE);return n.setMessage(JSON.stringify(e)),be.log("".concat(o," groupID:").concat(e.groupID)),this.request({protocolName:fn,requestData:e}).then(function(){(n.setNetworkType(t.getNetworkType()).end(),be.log("".concat(o," ok")),t.hasLocalGroup(e.groupID))&&(t.groupMap.get(e.groupID).updateGroup(e),t._setStorageGroupList());return as({group:t.groupMap.get(e.groupID)});}).catch(function(e){return t.probeNetwork().then(function(t){var o=m(t,2),a=o[0],s=o[1];n.setError(e,a,s).end();}),be.log("".concat(o," failed. error:"),e),gs(e);});}},{key:"joinGroup",value:function value(e){var t=this,o=e.groupID,n=e.type,a="".concat(this._className,".joinGroup");if(n===D.GRP_WORK){var s=new ls({code:Ca.CANNOT_JOIN_WORK,message:Sa.CANNOT_JOIN_WORK});return gs(s);}if(this.deleteUnjoinedAVChatRoom(o),this.hasLocalGroup(o)){if(!this.isLoggedIn())return _s({status:D.JOIN_STATUS_ALREADY_IN_GROUP});var r=new Va(Ba.APPLY_JOIN_GROUP);return this.getGroupProfile({groupID:o}).then(function(){return r.setNetworkType(t.getNetworkType()).setMessage("groupID:".concat(o," joinedStatus:").concat(D.JOIN_STATUS_ALREADY_IN_GROUP)).end(),_s({status:D.JOIN_STATUS_ALREADY_IN_GROUP});}).catch(function(n){return r.setNetworkType(t.getNetworkType()).setMessage("groupID:".concat(o," unjoined")).end(),be.warn("".concat(a," ").concat(o," was unjoined, now join!")),t.groupMap.delete(o),t.applyJoinGroup(e);});}return be.log("".concat(a," groupID:").concat(o)),this.isLoggedIn()?this.applyJoinGroup(e):this._AVChatRoomHandler.joinWithoutAuth(e);}},{key:"applyJoinGroup",value:function value(e){var o=this,n="".concat(this._className,".applyJoinGroup"),a=e.groupID,s=new Va(Ba.APPLY_JOIN_GROUP),r=t({},e),i=this.canIUse(H.AVCHATROOM_HISTORY_MSG);return i&&(r.historyMessageFlag=1),this.getModule(po).deleteTopicRoamingMessageInfo(a),this.request({protocolName:mn,requestData:r}).then(function(e){var t=e.data,r=t.joinedStatus,c=t.longPollingKey,u=t.startSeq,l=t.avChatRoomFlag,d=t.avChatRoomKey,p=t.messageList,_="groupID:".concat(a," joinedStatus:").concat(r," longPollingKey:").concat(c," startSeq:").concat(u)+" avChatRoomFlag:".concat(l," canGetAVChatRoomHistoryMessage:").concat(i,",")+" history message count:".concat(Kt(p)?0:p.length);switch(s.setNetworkType(o.getNetworkType()).setMessage("".concat(_)).end(),be.log("".concat(n," ok. ").concat(_)),r){case He:return as({status:He});case Ke:return o.getGroupProfile({groupID:a}).then(function(e){var t,n=e.data.group,s={status:Ke,group:n};return 1===l?(o.getModule(po).setCompleted("".concat(D.CONV_GROUP).concat(a)),o._groupAttributesHandler.initGroupAttributesCache({groupID:a,avChatRoomKey:d}),(t=Ze(c)?o._AVChatRoomHandler.handleJoinResult({group:n}):o._AVChatRoomHandler.startRunLoop({longPollingKey:c,group:n,startSeq:u})).then(function(){o._onAVChatRoomHistoryMessage(p);}),t):(o.emitGroupListUpdate(!0,!1),as(s));});default:var g=new ls({code:Ca.JOIN_GROUP_FAIL,message:Sa.JOIN_GROUP_FAIL});return be.error("".concat(n," error:"),g),gs(g);}}).catch(function(t){return s.setMessage("groupID:".concat(e.groupID)),o.probeNetwork().then(function(e){var o=m(e,2),n=o[0],a=o[1];s.setError(t,n,a).end();}),be.error("".concat(n," error:"),t),gs(t);});}},{key:"quitGroup",value:function value(e){var t=this,o="".concat(this._className,".quitGroup");be.log("".concat(o," groupID:").concat(e));var n=this.checkJoinedAVChatRoomByID(e);if(!n&&!this.hasLocalGroup(e)){var a=new ls({code:Ca.MEMBER_NOT_IN_GROUP,message:Sa.MEMBER_NOT_IN_GROUP});return gs(a);}if(n&&!this.isLoggedIn())return be.log("".concat(o," anonymously ok. groupID:").concat(e)),this.deleteLocalGroupAndConversation(e),this._AVChatRoomHandler.reset(e),_s({groupID:e});var s=new Va(Ba.QUIT_GROUP);return s.setMessage("groupID:".concat(e)),this.request({protocolName:vn,requestData:{groupID:e}}).then(function(){return s.setNetworkType(t.getNetworkType()).end(),be.log("".concat(o," ok")),t.deleteLocalGroupAndConversation(e),n&&t._AVChatRoomHandler.reset(e),as({groupID:e});}).catch(function(e){return t.probeNetwork().then(function(t){var o=m(t,2),n=o[0],a=o[1];s.setError(e,n,a).end();}),be.error("".concat(o," failed. error:"),e),gs(e);});}},{key:"searchGroupByID",value:function value(e){var t=this,o="".concat(this._className,".searchGroupByID"),n={groupIDList:[e]},a=new Va(Ba.SEARCH_GROUP_BY_ID);return a.setMessage("groupID:".concat(e)),be.log("".concat(o," groupID:").concat(e)),this.request({protocolName:In,requestData:n}).then(function(e){var n=e.data.groupProfile;if(0!==n[0].errorCode)throw new ls({code:n[0].errorCode,message:n[0].errorInfo});return a.setNetworkType(t.getNetworkType()).end(),be.log("".concat(o," ok")),as({group:new Ls(n[0])});}).catch(function(e){return t.probeNetwork().then(function(t){var o=m(t,2),n=o[0],s=o[1];a.setError(e,n,s).end();}),be.warn("".concat(o," failed. error:"),e),gs(e);});}},{key:"changeGroupOwner",value:function value(e){var t=this,o="".concat(this._className,".changeGroupOwner");if(this.hasLocalGroup(e.groupID)&&this.getLocalGroupProfile(e.groupID).type===D.GRP_AVCHATROOM)return gs(new ls({code:Ca.CANNOT_CHANGE_OWNER_IN_AVCHATROOM,message:Sa.CANNOT_CHANGE_OWNER_IN_AVCHATROOM}));if(e.newOwnerID===this.getMyUserID())return gs(new ls({code:Ca.CANNOT_CHANGE_OWNER_TO_SELF,message:Sa.CANNOT_CHANGE_OWNER_TO_SELF}));var n=new Va(Ba.CHANGE_GROUP_OWNER);return n.setMessage("groupID:".concat(e.groupID," newOwnerID:").concat(e.newOwnerID)),be.log("".concat(o," groupID:").concat(e.groupID)),this.request({protocolName:yn,requestData:e}).then(function(){n.setNetworkType(t.getNetworkType()).end(),be.log("".concat(o," ok"));var a=e.groupID,s=e.newOwnerID;t.groupMap.get(a).ownerID=s;var r=t.getModule(uo).getLocalGroupMemberList(a);if(r instanceof Map){var i=r.get(t.getMyUserID());Ze(i)||(i.updateRole("Member"),t.groupMap.get(a).selfInfo.role="Member");var c=r.get(s);Ze(c)||c.updateRole("Owner");}return t.emitGroupListUpdate(!0,!1),as({group:t.groupMap.get(a)});}).catch(function(e){return t.probeNetwork().then(function(t){var o=m(t,2),a=o[0],s=o[1];n.setError(e,a,s).end();}),be.error("".concat(o," failed. error:"),e),gs(e);});}},{key:"handleGroupApplication",value:function value(e){var o=this,n="".concat(this._className,".handleGroupApplication"),a=e.message.payload,s=a.groupProfile.groupID,r=a.authentication,i=a.messageKey,c=a.operatorID,u=new Va(Ba.HANDLE_GROUP_APPLICATION);return u.setMessage("groupID:".concat(s)),be.log("".concat(n," groupID:").concat(s)),this.request({protocolName:Tn,requestData:t(t({},e),{},{applicant:c,groupID:s,authentication:r,messageKey:i})}).then(function(){return u.setNetworkType(o.getNetworkType()).end(),be.log("".concat(n," ok")),o._groupSystemNoticeHandler.deleteGroupSystemNotice({messageList:[e.message]}),as({group:o.getLocalGroupProfile(s)});}).catch(function(e){return o.probeNetwork().then(function(t){var o=m(t,2),n=o[0],a=o[1];u.setError(e,n,a).end();}),be.error("".concat(n," failed. error"),e),gs(e);});}},{key:"handleGroupInvitation",value:function value(e){var o=this,n="".concat(this._className,".handleGroupInvitation"),a=e.message.payload,s=a.groupProfile.groupID,r=a.authentication,i=a.messageKey,c=a.operatorID,u=e.handleAction,l=new Va(Ba.HANDLE_GROUP_INVITATION);return l.setMessage("groupID:".concat(s," inviter:").concat(c," handleAction:").concat(u)),be.log("".concat(n," groupID:").concat(s," inviter:").concat(c," handleAction:").concat(u)),this.request({protocolName:En,requestData:t(t({},e),{},{inviter:c,groupID:s,authentication:r,messageKey:i})}).then(function(){return l.setNetworkType(o.getNetworkType()).end(),be.log("".concat(n," ok")),o._groupSystemNoticeHandler.deleteGroupSystemNotice({messageList:[e.message]}),as({group:o.getLocalGroupProfile(s)});}).catch(function(e){return o.probeNetwork().then(function(t){var o=m(t,2),n=o[0],a=o[1];l.setError(e,n,a).end();}),be.error("".concat(n," failed. error"),e),gs(e);});}},{key:"getGroupOnlineMemberCount",value:function value(e){return this._AVChatRoomHandler?this._AVChatRoomHandler.checkJoinedAVChatRoomByID(e)?this._AVChatRoomHandler.getGroupOnlineMemberCount(e):_s({memberCount:0}):gs({code:Ca.CANNOT_FIND_MODULE,message:Sa.CANNOT_FIND_MODULE});}},{key:"hasLocalGroup",value:function value(e){return this.groupMap.has(e);}},{key:"deleteLocalGroupAndConversation",value:function value(e){var t=this.checkJoinedAVChatRoomByID(e);(be.log("".concat(this._className,".deleteLocalGroupAndConversation isJoinedAVChatRoom:").concat(t)),t)&&this.getModule(po).deleteLocalConversation("".concat(D.CONV_GROUP).concat(e));if(yt({groupID:e})){var o=this.getLocalGroupProfile(e);if(o&&!0===o.isSupportTopic)this.getModule(lo).deleteTopicListInCommunity(e);}this._deleteLocalGroup(e),this.emitGroupListUpdate(!0,!1);}},{key:"_deleteLocalGroup",value:function value(e){this.groupMap.delete(e),this.getModule(uo).deleteGroupMemberList(e),this._setStorageGroupList();}},{key:"sendMessage",value:function value(e,t){var o=this.createGroupMessagePack(e,t);return this.request(o);}},{key:"createGroupMessagePack",value:function value(e,t){var o=null;t&&t.offlinePushInfo&&(o=t.offlinePushInfo);var n="";ze(e.cloudCustomData)&&e.cloudCustomData.length>0&&(n=e.cloudCustomData);var a=[];if(Xe(t)&&Xe(t.messageControlInfo)){var s=t.messageControlInfo,r=s.excludedFromUnreadCount,i=s.excludedFromLastMessage;!0===r&&a.push("NoUnread"),!0===i&&a.push("NoLastMsg");}var c=e.getGroupAtInfoList(),u={fromAccount:this.getMyUserID(),groupID:e.to,msgBody:e.getElements(),cloudCustomData:n,random:e.random,priority:e.priority,clientSequence:e.clientSequence,groupAtInfo:e.type!==D.MSG_TEXT||Kt(c)?void 0:c,onlineOnlyFlag:this.isOnlineMessage(e,t)?1:0,clientTime:e.clientTime,offlinePushInfo:o?{pushFlag:!0===o.disablePush?1:0,title:o.title||"",desc:o.description||"",ext:o.extension||"",apnsInfo:{badgeMode:!0===o.ignoreIOSBadge?1:0},androidInfo:{OPPOChannelID:o.androidOPPOChannelID||""}}:void 0,messageControlInfo:a,needReadReceipt:!0!==e.needReadReceipt||this.isMessageFromOrToAVChatroom(e.to)?0:1};return Tt(e.to)&&(u.groupID=wt(e.to),u.topicID=e.to),{protocolName:Fo,tjgID:this.generateTjgID(e),requestData:u};}},{key:"revokeMessage",value:function value(e){var t={groupID:e.to,msgSeqList:[{msgSeq:e.sequence}]};return Tt(e.to)&&(t.groupID=wt(e.to),t.topicID=e.to),this.request({protocolName:Cn,requestData:t});}},{key:"deleteMessage",value:function value(e){var t=e.to,o=e.keyList;be.log("".concat(this._className,".deleteMessage groupID:").concat(t," count:").concat(o.length));var n={groupID:t,deleter:this.getMyUserID(),keyList:o};return Tt(t)&&(n.groupID=wt(t),n.topicID=t),this.request({protocolName:wn,requestData:n});}},{key:"modifyRemoteMessage",value:function value(e){var t=e.to,o=e.sequence,n=e.payload,a=e.type,s=e.version,r=void 0===s?0:s,i=e.cloudCustomData,c=t,u=void 0;Tt(t)&&(c=wt(t),u=t);var l=void 0;return qt(a)&&(l=[]).push({type:a,content:n}),this.request({protocolName:Fn,requestData:{groupID:c,topicID:u,sequence:o,version:r,elements:l,cloudCustomData:i}});}},{key:"getRoamingMessage",value:function value(e){var t=this,o="".concat(this._className,".getRoamingMessage"),n=e.conversationID,a=e.groupID,s=e.sequence,r=new Va(Ba.GET_GROUP_ROAMING_MESSAGES),i=0,c=void 0;return Tt(a)&&(a=wt(c=a)),this._computeLastSequence({groupID:a,topicID:c,sequence:s}).then(function(e){return i=e,be.log("".concat(o," groupID:").concat(a," startSequence:").concat(i)),t.request({protocolName:Nn,requestData:{groupID:a,count:21,sequence:i,topicID:c}});}).then(function(e){var s=e.data,u=s.messageList,l=s.complete;Ze(u)?be.log("".concat(o," ok. complete:").concat(l," but messageList is undefined!")):be.log("".concat(o," ok. complete:").concat(l," count:").concat(u.length)),r.setNetworkType(t.getNetworkType()).setMessage("groupID:".concat(a," topicID:").concat(c," startSequence:").concat(i," complete:").concat(l," count:").concat(u?u.length:"undefined")).end();var d=t.getModule(po);if(2===l||Kt(u))return d.setCompleted(n),{nextReqID:"",storedMessageList:[]};var p=u[u.length-1].sequence-1;d.updateRoamingMessageSequence(n,p);var _=d.onRoamingMessage(u,n);return d.updateIsRead(n),d.patchConversationLastMessage(n),be.log("".concat(o," nextReqID:").concat(p," stored message count:").concat(_.length)),{nextReqID:p+"",storedMessageList:_};}).catch(function(e){return t.probeNetwork().then(function(t){var o=m(t,2),n=o[0],s=o[1];r.setError(e,n,s).setMessage("groupID:".concat(a," topicID:").concat(c," startSequence:").concat(i)).end();}),be.warn("".concat(o," failed. error:"),e),gs(e);});}},{key:"_getGroupIDOfMessage",value:function value(e){return e.conversationID.replace(D.CONV_GROUP,"");}},{key:"getReadReceiptList",value:function value(e){var t=this,o="".concat(this._className,".getReadReceiptList"),n=this._getGroupIDOfMessage(e[0]),a=this.getMyUserID(),s=e.filter(function(e){return e.from===a&&!0===e.needReadReceipt;}).map(function(e){return{sequence:e.sequence};});if(be.log("".concat(o," groupID:").concat(n," sequenceList:").concat(JSON.stringify(s))),0===s.length)return _s({messageList:e});var r=new Va(Ba.GET_READ_RECEIPT);return r.setMessage("groupID:".concat(n)),this.request({protocolName:An,requestData:{groupID:n,sequenceList:s}}).then(function(t){r.end(),be.log("".concat(o," ok"));var n=t.data.readReceiptList;return Qe(n)&&n.forEach(function(t){e.forEach(function(e){0===t.code&&t.sequence===e.sequence&&(e.readReceiptInfo.readCount=t.readCount,e.readReceiptInfo.unreadCount=t.unreadCount);});}),as({messageList:e});}).catch(function(e){return t.probeNetwork().then(function(t){var o=m(t,2),n=o[0],a=o[1];r.setError(e,n,a).end();}),be.warn("".concat(o," failed. error:"),e),gs(e);});}},{key:"sendReadReceipt",value:function value(e){var t=this,o=this._getGroupIDOfMessage(e[0]),n=new Va(Ba.SEND_READ_RECEIPT);n.setMessage("groupID:".concat(o));var a=this.getMyUserID(),s=e.filter(function(e){return e.from!==a&&!0===e.needReadReceipt;}).map(function(e){return{sequence:e.sequence};});if(0===s.length)return gs({code:Ca.READ_RECEIPT_MESSAGE_LIST_EMPTY,message:Sa.READ_RECEIPT_MESSAGE_LIST_EMPTY});var r="".concat(this._className,".sendReadReceipt");return be.log("".concat(r,". sequenceList:").concat(JSON.stringify(s))),this.request({protocolName:On,requestData:{groupID:o,sequenceList:s}}).then(function(e){return n.end(),be.log("".concat(r," ok")),as();}).catch(function(e){return t.probeNetwork().then(function(t){var o=m(t,2),a=o[0],s=o[1];n.setError(e,a,s).end();}),be.warn("".concat(r," failed. error:"),e),gs(e);});}},{key:"getReadReceiptDetail",value:function value(e){var t=this,o=e.message,n=e.filter,a=e.cursor,s=e.count,r=this._getGroupIDOfMessage(o),i=o.ID,c=o.sequence,u="".concat(this._className,".getReadReceiptDetail"),l=this._receiptDetailCompleteMap.get(i)||!1,d=0!==n&&1!==n?0:n,p=ze(a)?a:"",_=!$e(s)||s<=0||s>=100?100:s,g="groupID:".concat(r," sequence:").concat(c," cursor:").concat(p," filter:").concat(d," completeFlag:").concat(l);be.log("".concat(u," ").concat(g));var h={cursor:"",isCompleted:!1,messageID:i,unreadUserIDList:[],readUserIDList:[]},f=new Va(Ba.GET_READ_RECEIPT_DETAIL);return f.setMessage(g),this.request({protocolName:Ln,requestData:{groupID:r,sequence:c,flag:d,cursor:p,count:_}}).then(function(e){f.end();var o=e.data,n=o.cursor,a=o.isCompleted,s=o.unreadUserIDList,r=o.readUserIDList;return h.cursor=n,1===a&&(h.isCompleted=!0,t._receiptDetailCompleteMap.set(i,!0)),0===d?h.readUserIDList=r.map(function(e){return e.userID;}):1===d&&(h.unreadUserIDList=s.map(function(e){return e.userID;})),be.log("".concat(u," ok")),as(h);}).catch(function(e){return t.probeNetwork().then(function(t){var o=m(t,2),n=o[0],a=o[1];f.setError(e,n,a).end();}),be.warn("".concat(u," failed. error:"),e),gs(e);});}},{key:"getRoamingMessagesHopping",value:function value(e){var t=this,o="".concat(this._className,".getRoamingMessagesHopping"),n=new Va(Ba.GET_GROUP_ROAMING_MESSAGES_HOPPING),a=e.groupID,s=e.count,r=e.sequence,i=e.direction,c=r;1===i&&(c=r+s-1);var u=void 0;Tt(a)&&(a=wt(u=a));var l="".concat(u?"topicID:".concat(u):"groupID:".concat(a)," sequence:").concat(r," direction:").concat(i);return be.log("".concat(o," ").concat(l)),this.request({protocolName:Nn,requestData:{groupID:a,topicID:u,count:s,sequence:c}}).then(function(a){var s=a.data,c=s.messageList,d=s.complete;if(be.log("".concat(o," ok. complete:").concat(d," count:").concat(c?c.length:0)),n.setNetworkType(t.getNetworkType()).setMessage("".concat(l," complete:").concat(d," count:").concat(c?c.length:0)).end(),2===d||Kt(c)){var p=t._computeResult();return as(p);}var _="".concat(D.CONV_GROUP).concat(e.groupID),g=t.getModule(po).onRoamingMessage(c,_,!1),h=t._computeResult({direction:i,sequence:r,topicID:u,messageList:c,resultList:g});return as(h);}).catch(function(e){return t.probeNetwork().then(function(t){var o=m(t,2),i=o[0],c=o[1];n.setError(e,i,c).setMessage("groupID:".concat(a," sequence:").concat(r," count:").concat(s)).end();}),be.warn("".concat(o," failed. error:"),e),gs(e);});}},{key:"_computeResult",value:function value(e){var t={messageList:[],isCompleted:!1,nextMessageSeq:""};if(Ze(e))return t.isCompleted=!0,t;var o=e.direction,n=e.sequence,a=e.topicID,s=e.messageList,r=void 0===s?[]:s,i=e.resultList,c=void 0===i?[]:i,u=r.length;if(1===o){if(t.nextMessageSeq=r[0].sequence+1,!Ze(a)){var l=c.findIndex(function(e){return e.sequence===n;});if(-1===l){var d=c.length;return 0===d?r[0].sequence<n&&(t.isCompleted=!0,t.nextMessageSeq=""):c[d-1].sequence<n?(t.isCompleted=!0,t.nextMessageSeq=""):t.messageList=M(c),t;}return t.messageList=c.slice(l),t;}return t.messageList=M(c),t;}return t.nextMessageSeq=r[u-1].sequence-1,t.messageList=M(c),0===t.nextMessageSeq&&(t.isCompleted=!0,t.nextMessageSeq=""),t;}},{key:"setMessageRead",value:function value(e){var t=this,o=e.conversationID,n=e.lastMessageSeq,a="".concat(this._className,".setMessageRead");be.log("".concat(a," conversationID:").concat(o," lastMessageSeq:").concat(n)),$e(n)||be.warn("".concat(a," 请勿修改 Conversation.lastMessage.lastSequence,否则可能会导致已读上报结果不准确"));var s=new Va(Ba.SET_GROUP_MESSAGE_READ);s.setMessage("".concat(o,"-").concat(n));var r=o.replace(D.CONV_GROUP,""),i=void 0;return Tt(r)&&(r=wt(i=r)),this.request({protocolName:Sn,requestData:{groupID:r,topicID:i,messageReadSeq:n}}).then(function(){s.setNetworkType(t.getNetworkType()).end(),be.log("".concat(a," ok."));var e=t.getModule(po);e.updateIsReadAfterReadReport({conversationID:o,lastMessageSeq:n});var c=!0;if(!Ze(i)){c=!1;var u=t.getModule(lo).getLocalTopic(r,i);u&&u.updateSelfInfo({readedSequence:n});}return e.updateUnreadCount(o,c),as();}).catch(function(e){return t.probeNetwork().then(function(t){var o=m(t,2),n=o[0],a=o[1];s.setError(e,n,a).end();}),be.log("".concat(a," failed. error:"),e),gs(e);});}},{key:"_computeLastSequence",value:function value(e){var t=e.groupID,o=e.topicID,n=void 0===o?void 0:o,a=e.sequence;return a>0?Promise.resolve(a):Ze(n)||this.hasLocalGroup(t)?Ze(n)?this.getGroupLastSequence(t):this.getTopicLastSequence({groupID:t,topicID:n}):Promise.resolve(0);}},{key:"getGroupLastSequence",value:function value(e){var t=this,o="".concat(this._className,".getGroupLastSequence"),n=new Va(Ba.GET_GROUP_LAST_SEQUENCE),a=0,s="";if(this.hasLocalGroup(e)){var r=this.getLocalGroupProfile(e),i=r.lastMessage;if(i.lastSequence>0&&!1===i.onlineOnlyFlag)return a=i.lastSequence,s="got lastSequence:".concat(a," from local group profile[lastMessage.lastSequence]. groupID:").concat(e),be.log("".concat(o," ").concat(s)),n.setNetworkType(this.getNetworkType()).setMessage("".concat(s)).end(),Promise.resolve(a);if(r.nextMessageSeq>1)return a=r.nextMessageSeq-1,s="got lastSequence:".concat(a," from local group profile[nextMessageSeq]. groupID:").concat(e),be.log("".concat(o," ").concat(s)),n.setNetworkType(this.getNetworkType()).setMessage("".concat(s)).end(),Promise.resolve(a);}var c="GROUP".concat(e),u=this.getModule(po).getLocalConversation(c);if(u&&u.lastMessage.lastSequence&&!1===u.lastMessage.onlineOnlyFlag)return a=u.lastMessage.lastSequence,s="got lastSequence:".concat(a," from local conversation profile[lastMessage.lastSequence]. groupID:").concat(e),be.log("".concat(o," ").concat(s)),n.setNetworkType(this.getNetworkType()).setMessage("".concat(s)).end(),Promise.resolve(a);var l={groupIDList:[e],responseFilter:{groupBaseInfoFilter:["NextMsgSeq"]}};return this.getGroupProfileAdvance(l).then(function(r){var i=r.data.successGroupList;return Kt(i)?be.log("".concat(o," successGroupList is empty. groupID:").concat(e)):(a=i[0].nextMessageSeq-1,s="got lastSequence:".concat(a," from getGroupProfileAdvance. groupID:").concat(e),be.log("".concat(o," ").concat(s))),n.setNetworkType(t.getNetworkType()).setMessage("".concat(s)).end(),a;}).catch(function(a){return t.probeNetwork().then(function(t){var o=m(t,2),s=o[0],r=o[1];n.setError(a,s,r).setMessage("get lastSequence failed from getGroupProfileAdvance. groupID:".concat(e)).end();}),be.warn("".concat(o," failed. error:"),a),gs(a);});}},{key:"getTopicLastSequence",value:function value(e){var t=this,o=e.groupID,n=e.topicID,a="".concat(this._className,".getTopicLastSequence"),s=new Va(Ba.GET_TOPIC_LAST_SEQUENCE),r=0,i="",c=this.getModule(lo);return c.hasLocalTopic(o,n)?(r=c.getLocalTopic(o,n).nextMessageSeq-1,i="get lastSequence:".concat(r," from local topic info[nextMessageSeq]. topicID:").concat(n),be.log("".concat(a," ").concat(i)),s.setNetworkType(this.getNetworkType()).setMessage("".concat(i)).end(),Promise.resolve(r)):c.getTopicList({groupID:o,topicIDList:[n]}).then(function(e){var o=e.data.successTopicList;return Kt(o)?be.log("".concat(a," successTopicList is empty. topicID:").concat(n)):(r=o[0].nextMessageSeq-1,i="get lastSequence:".concat(r," from getTopicList. topicID:").concat(n),be.log("".concat(a," ").concat(i))),s.setNetworkType(t.getNetworkType()).setMessage("".concat(i)).end(),r;}).catch(function(e){return t.probeNetwork().then(function(t){var o=m(t,2),a=o[0],r=o[1];s.setError(e,a,r).setMessage("get lastSequence failed from getTopicList. topicID:".concat(n)).end();}),be.warn("".concat(a," failed. error:"),e),gs(e);});}},{key:"isMessageFromOrToAVChatroom",value:function value(e){return!!this._AVChatRoomHandler&&this._AVChatRoomHandler.checkJoinedAVChatRoomByID(e);}},{key:"hasJoinedAVChatRoom",value:function value(){return this._AVChatRoomHandler?this._AVChatRoomHandler.hasJoinedAVChatRoom():0;}},{key:"getJoinedAVChatRoom",value:function value(){return this._AVChatRoomHandler?this._AVChatRoomHandler.getJoinedAVChatRoom():[];}},{key:"isOnlineMessage",value:function value(e,t){return!(!this._canIUseOnlineOnlyFlag(e)||!t||!0!==t.onlineUserOnly);}},{key:"_canIUseOnlineOnlyFlag",value:function value(e){var t=this.getJoinedAVChatRoom();return!t||!t.includes(e.to)||e.conversationType!==D.CONV_GROUP;}},{key:"_onAVChatRoomHistoryMessage",value:function value(e){if(!Kt(e)){be.log("".concat(this._className,"._onAVChatRoomHistoryMessage count:").concat(e.length));var o=[];e.forEach(function(e){o.push(t(t({},e),{},{isHistoryMessage:1}));}),this.onAVChatRoomMessage(o);}}},{key:"onAVChatRoomMessage",value:function value(e){this._AVChatRoomHandler&&this._AVChatRoomHandler.onMessage(e);}},{key:"onAVChatRoomMemberBanned",value:function value(e){this._AVChatRoomHandler&&this._AVChatRoomHandler.onAVChatRoomMemberBanned(e);}},{key:"getGroupSimplifiedInfo",value:function value(e){var t=this,o=new Va(Ba.GET_GROUP_SIMPLIFIED_INFO),n={groupIDList:[e],responseFilter:{groupBaseInfoFilter:["Type","Name"]}};return this.getGroupProfileAdvance(n).then(function(n){var a=n.data.successGroupList;return o.setNetworkType(t.getNetworkType()).setMessage("groupID:".concat(e," type:").concat(a[0].type)).end(),a[0];}).catch(function(n){t.probeNetwork().then(function(t){var a=m(t,2),s=a[0],r=a[1];o.setError(n,s,r).setMessage("groupID:".concat(e)).end();});});}},{key:"setUnjoinedAVChatRoom",value:function value(e){this._unjoinedAVChatRoomList.set(e,1);}},{key:"deleteUnjoinedAVChatRoom",value:function value(e){this._unjoinedAVChatRoomList.has(e)&&this._unjoinedAVChatRoomList.delete(e);}},{key:"isUnjoinedAVChatRoom",value:function value(e){return this._unjoinedAVChatRoomList.has(e);}},{key:"onGroupAttributesUpdated",value:function value(e){this._groupAttributesHandler&&this._groupAttributesHandler.onGroupAttributesUpdated(e);}},{key:"updateLocalMainSequenceOnReconnected",value:function value(){this._groupAttributesHandler&&this._groupAttributesHandler.updateLocalMainSequenceOnReconnected();}},{key:"initGroupAttributes",value:function value(e){return this._groupAttributesHandler.initGroupAttributes(e);}},{key:"setGroupAttributes",value:function value(e){return this._groupAttributesHandler.setGroupAttributes(e);}},{key:"deleteGroupAttributes",value:function value(e){return this._groupAttributesHandler.deleteGroupAttributes(e);}},{key:"getGroupAttributes",value:function value(e){return this._groupAttributesHandler.getGroupAttributes(e);}},{key:"reset",value:function value(){this.groupMap.clear(),this._unjoinedAVChatRoomList.clear(),this._receiptDetailCompleteMap.clear(),this._commonGroupHandler.reset(),this._groupSystemNoticeHandler.reset(),this._groupTipsHandler.reset(),this._AVChatRoomHandler&&this._AVChatRoomHandler.reset();}}]),a;}(Ro),zs=function(){function e(t){n(this,e),this.userID="",this.avatar="",this.nick="",this.role="",this.joinTime="",this.lastSendMsgTime="",this.nameCard="",this.muteUntil=0,this.memberCustomField=[],this._initMember(t);}return s(e,[{key:"_initMember",value:function value(e){this.updateMember(e);}},{key:"updateMember",value:function value(e){var t=[null,void 0,"",0,NaN];e.memberCustomField&&Mt(this.memberCustomField,e.memberCustomField),ct(this,e,["memberCustomField"],t);}},{key:"updateRole",value:function value(e){["Owner","Admin","Member"].indexOf(e)<0||(this.role=e);}},{key:"updateMuteUntil",value:function value(e){Ze(e)||(this.muteUntil=Math.floor((Date.now()+1e3*e)/1e3));}},{key:"updateNameCard",value:function value(e){Ze(e)||(this.nameCard=e);}},{key:"updateMemberCustomField",value:function value(e){e&&Mt(this.memberCustomField,e);}}]),e;}(),Js=function(e){i(a,e);var o=f(a);function a(e){var t;return n(this,a),(t=o.call(this,e))._className="GroupMemberModule",t.groupMemberListMap=new Map(),t.getInnerEmitterInstance().on(vs,t._onProfileUpdated,g(t)),t;}return s(a,[{key:"_onProfileUpdated",value:function value(e){for(var t=this,o=e.data,n=function n(e){var n=o[e];t.groupMemberListMap.forEach(function(e){e.has(n.userID)&&e.get(n.userID).updateMember({nick:n.nick,avatar:n.avatar});});},a=0;a<o.length;a++){n(a);}}},{key:"deleteGroupMemberList",value:function value(e){this.groupMemberListMap.delete(e);}},{key:"getGroupMemberList",value:function value(e){var t=this,o=e.groupID,n=e.offset,a=void 0===n?0:n,s=e.count,r=void 0===s?15:s,i="".concat(this._className,".getGroupMemberList"),c=this.getModule(io),u=c.hasLocalGroup(o);if(be.log("".concat(i," groupID:").concat(o," offset:").concat(a," count:").concat(r," hasLocalGroup:").concat(u)),!u)return _s({memberList:[],offset:0});if(c.getLocalGroupProfile(o).type===D.GRP_AVCHATROOM){if(this.canIUse(H.AVCHATROOM_MBR_LIST))return this._getAVChatRoomMemberList({groupID:o,offset:a});be.warn("".concat(i," 从 v2.22.0 起,支持获取直播群在线成员列表,请升级旗舰版套餐且前往 [控制台](https://console.cloud.tencent.com/im) 开启开关。"));}var l=new Va(Ba.GET_GROUP_MEMBER_LIST),d=0,p={groupID:o,limit:r>100?100:r};yt({groupID:o})?p.next="".concat(a):(p.offset=a,d=a+r);var _=[];return this.request({protocolName:xn,requestData:p}).then(function(e){var n=e.data,a=n.members,s=n.memberNum,r=n.next,i=void 0===r?void 0:r;if(Ze(i)||(d=Kt(i)?0:i),!Qe(a)||0===a.length)return d=0,Promise.resolve([]);var c=t.getModule(io);return c.hasLocalGroup(o)&&(c.getLocalGroupProfile(o).memberNum=s),_=t._updateLocalGroupMemberMap(o,a),t.getModule(so).getUserProfile({userIDList:a.map(function(e){return e.userID;}),tagList:[Fe.NICK,Fe.AVATAR]});}).then(function(e){var n=e.data;if(!Qe(n)||0===n.length)return _s({memberList:[],offset:d});var s=n.map(function(e){return{userID:e.userID,nick:e.nick,avatar:e.avatar};});return t._updateLocalGroupMemberMap(o,s),_.length<r&&(d=0),l.setNetworkType(t.getNetworkType()).setMessage("groupID:".concat(o," offset:").concat(a," count:").concat(r)).end(),be.log("".concat(i," ok.")),as({memberList:_,offset:d});}).catch(function(e){return t.probeNetwork().then(function(t){var o=m(t,2),n=o[0],a=o[1];l.setError(e,n,a).end();}),be.error("".concat(i," failed. error:"),e),gs(e);});}},{key:"_getAVChatRoomMemberList",value:function value(e){var t=this,o=e.groupID,n=e.offset,a="".concat(this._className,"._getVChatRoomMemberList"),s=new Va(Ba.GET_AVCHATROOM_MEMBER_LIST);return s.setMessage("groupID:".concat(o," offset:").concat(n)),this.request({protocolName:Wn,requestData:{groupID:o,offset:n}}).then(function(e){var n=e.data,r=n.memberList,i=void 0===r?[]:r,c=n.offset,u=void 0===c?0:c;s.setNetworkType(t.getNetworkType()).end(),be.log("".concat(a," ok, member count:").concat(i.length,", next request timestamp:").concat(u,"."));var l=t._updateLocalGroupMemberMap(o,i);return as({memberList:l,offset:u});}).catch(function(e){return t.probeNetwork().then(function(t){var o=m(t,2),n=o[0],a=o[1];s.setError(e,n,a).end();}),be.error("".concat(a," failed. error:"),e),gs(e);});}},{key:"getGroupMemberProfile",value:function value(e){var o=this,n="".concat(this._className,".getGroupMemberProfile"),a=new Va(Ba.GET_GROUP_MEMBER_PROFILE);a.setMessage(e.userIDList.length>5?"userIDList.length:".concat(e.userIDList.length):"userIDList:".concat(e.userIDList)),be.log("".concat(n," groupID:").concat(e.groupID," userIDList:").concat(e.userIDList.join(","))),e.userIDList.length>50&&(e.userIDList=e.userIDList.slice(0,50));var s=e.groupID,r=e.userIDList;return this._getGroupMemberProfileAdvance(t(t({},e),{},{userIDList:r})).then(function(e){var t=e.data.members;return Qe(t)&&0!==t.length?(o._updateLocalGroupMemberMap(s,t),o.getModule(so).getUserProfile({userIDList:t.map(function(e){return e.userID;}),tagList:[Fe.NICK,Fe.AVATAR]})):_s([]);}).then(function(e){var t=e.data.map(function(e){return{userID:e.userID,nick:e.nick,avatar:e.avatar};});o._updateLocalGroupMemberMap(s,t);var n=r.filter(function(e){return o.hasLocalGroupMember(s,e);}).map(function(e){return o.getLocalGroupMemberInfo(s,e);});return a.setNetworkType(o.getNetworkType()).end(),as({memberList:n});});}},{key:"addGroupMember",value:function value(e){var t=this,o="".concat(this._className,".addGroupMember"),n=e.groupID,a=this.getModule(io).getLocalGroupProfile(n),s=a.type,r=new Va(Ba.ADD_GROUP_MEMBER);if(r.setMessage("groupID:".concat(n," groupType:").concat(s)),It(s)){var i=new ls({code:Ca.CANNOT_ADD_MEMBER_IN_AVCHATROOM,message:Sa.CANNOT_ADD_MEMBER_IN_AVCHATROOM});return r.setCode(Ca.CANNOT_ADD_MEMBER_IN_AVCHATROOM).setError(Sa.CANNOT_ADD_MEMBER_IN_AVCHATROOM).setNetworkType(this.getNetworkType()).end(),gs(i);}return e.userIDList=e.userIDList.map(function(e){return{userID:e};}),be.log("".concat(o," groupID:").concat(n)),this.request({protocolName:jn,requestData:e}).then(function(n){var s=n.data.members;be.log("".concat(o," ok"));var i=s.filter(function(e){return 1===e.result;}).map(function(e){return e.userID;}),c=s.filter(function(e){return 0===e.result;}).map(function(e){return e.userID;}),u=s.filter(function(e){return 2===e.result;}).map(function(e){return e.userID;}),l=s.filter(function(e){return 4===e.result;}).map(function(e){return e.userID;}),d="groupID:".concat(e.groupID,", ")+"successUserIDList:".concat(i,", ")+"failureUserIDList:".concat(c,", ")+"existedUserIDList:".concat(u,", ")+"overLimitUserIDList:".concat(l);return r.setNetworkType(t.getNetworkType()).setMoreMessage(d).end(),0===i.length?as({successUserIDList:i,failureUserIDList:c,existedUserIDList:u,overLimitUserIDList:l}):(a.memberCount+=i.length,t._updateConversationGroupProfile(a),as({successUserIDList:i,failureUserIDList:c,existedUserIDList:u,overLimitUserIDList:l,group:a}));}).catch(function(e){return t.probeNetwork().then(function(t){var o=m(t,2),n=o[0],a=o[1];r.setError(e,n,a).end();}),be.error("".concat(o," failed. error:"),e),gs(e);});}},{key:"deleteGroupMember",value:function value(e){var t=this,o="".concat(this._className,".deleteGroupMember"),n=e.groupID,a=e.userIDList,s=this.getModule(io).getLocalGroupProfile(n);if(Ze(s))return gs({code:Ca.CANNOT_FIND_GROUP,message:Sa.CANNOT_FIND_GROUP});if(It(s.type))return this.canIUse(H.AVCHATROOM_BAN_MBR)?this._banAVChatRoomMember(e):gs({code:Ca.CANNOT_USE_COMMERCIAL_ABILITY,message:Sa.CANNOT_USE_COMMERCIAL_ABILITY});var r=new Va(Ba.DELETE_GROUP_MEMBER),i="groupID:".concat(n," ").concat(a.length>5?"userIDList.length:".concat(a.length):"userIDList:".concat(a));return r.setMessage(i),be.log("".concat(o," groupID:").concat(n," userIDList:"),a),this.request({protocolName:$n,requestData:e}).then(function(){return r.setNetworkType(t.getNetworkType()).end(),be.log("".concat(o," ok")),s.memberCount-=1,t._updateConversationGroupProfile(s),t.deleteLocalGroupMembers(n,a),as({group:s,userIDList:a});}).catch(function(e){return t.probeNetwork().then(function(t){var o=m(t,2),n=o[0],a=o[1];r.setError(e,n,a).end();}),be.error("".concat(o," failed. error:"),e),gs(e);});}},{key:"_updateConversationGroupProfile",value:function value(e){this.getModule(po).updateConversationGroupProfile([e]);}},{key:"_banAVChatRoomMember",value:function value(e){var t=this,o="".concat(this._className,"._banAVChatRoomMember"),n=e.groupID,a=e.userIDList,s="groupID:".concat(n," ").concat(a.length>5?"userIDList.length:".concat(a.length):"userIDList:".concat(a)),r=new Va(Ba.BAN_AVCHATROOM_MEMBER);r.setMessage(s),be.log("".concat(o," groupID:").concat(n," userIDList:"),a);var i=this.getModule(io).getLocalGroupProfile(n);return Ze(e.duration)||0===e.duration?gs({code:Ca.BAN_DURATION_INVALID,message:Sa.BAN_DURATION_INVALID}):this.request({protocolName:zn,requestData:e}).then(function(){return r.setNetworkType(t.getNetworkType()).end(),be.log("".concat(o," ok")),t.deleteLocalGroupMembers(n,a),as({group:i,userIDList:a});}).catch(function(e){return t.probeNetwork().then(function(t){var o=m(t,2),n=o[0],a=o[1];r.setError(e,n,a).end();}),be.error("".concat(o," failed. error:"),e),gs(e);});}},{key:"setGroupMemberMuteTime",value:function value(e){var t=this,o=e.groupID,n=e.userID,a=e.muteTime,s="".concat(this._className,".setGroupMemberMuteTime");if(n===this.getMyUserID())return gs(new ls({code:Ca.CANNOT_MUTE_SELF,message:Sa.CANNOT_MUTE_SELF}));be.log("".concat(s," groupID:").concat(o," userID:").concat(n));var r=new Va(Ba.SET_GROUP_MEMBER_MUTE_TIME);return r.setMessage("groupID:".concat(o," userID:").concat(n," muteTime:").concat(a)),this.modifyGroupMemberInfo({groupID:o,userID:n,muteTime:a}).then(function(e){r.setNetworkType(t.getNetworkType()).end(),be.log("".concat(s," ok"));var n=t.getModule(io);return as({group:n.getLocalGroupProfile(o),member:e});}).catch(function(e){return t.probeNetwork().then(function(t){var o=m(t,2),n=o[0],a=o[1];r.setError(e,n,a).end();}),be.error("".concat(s," failed. error:"),e),gs(e);});}},{key:"setGroupMemberRole",value:function value(e){var t=this,o="".concat(this._className,".setGroupMemberRole"),n=e.groupID,a=e.userID,s=e.role,r=this.getModule(io).getLocalGroupProfile(n);if(r.selfInfo.role!==D.GRP_MBR_ROLE_OWNER)return gs({code:Ca.NOT_OWNER,message:Sa.NOT_OWNER});if([D.GRP_WORK,D.GRP_AVCHATROOM].includes(r.type))return gs({code:Ca.CANNOT_SET_MEMBER_ROLE_IN_WORK_AND_AVCHATROOM,message:Sa.CANNOT_SET_MEMBER_ROLE_IN_WORK_AND_AVCHATROOM});var i=[D.GRP_MBR_ROLE_ADMIN,D.GRP_MBR_ROLE_MEMBER];if(yt({groupID:n})&&i.push(D.GRP_MBR_ROLE_CUSTOM),i.indexOf(s)<0)return gs({code:Ca.INVALID_MEMBER_ROLE,message:Sa.INVALID_MEMBER_ROLE});if(a===this.getMyUserID())return gs({code:Ca.CANNOT_SET_SELF_MEMBER_ROLE,message:Sa.CANNOT_SET_SELF_MEMBER_ROLE});var c=new Va(Ba.SET_GROUP_MEMBER_ROLE);return c.setMessage("groupID:".concat(n," userID:").concat(a," role:").concat(s)),be.log("".concat(o," groupID:").concat(n," userID:").concat(a)),this.modifyGroupMemberInfo({groupID:n,userID:a,role:s}).then(function(e){return c.setNetworkType(t.getNetworkType()).end(),be.log("".concat(o," ok")),as({group:r,member:e});}).catch(function(e){return t.probeNetwork().then(function(t){var o=m(t,2),n=o[0],a=o[1];c.setError(e,n,a).end();}),be.error("".concat(o," failed. error:"),e),gs(e);});}},{key:"setGroupMemberNameCard",value:function value(e){var t=this,o="".concat(this._className,".setGroupMemberNameCard"),n=e.groupID,a=e.userID,s=void 0===a?this.getMyUserID():a,r=e.nameCard;be.log("".concat(o," groupID:").concat(n," userID:").concat(s));var i=new Va(Ba.SET_GROUP_MEMBER_NAME_CARD);return i.setMessage("groupID:".concat(n," userID:").concat(s," nameCard:").concat(r)),this.modifyGroupMemberInfo({groupID:n,userID:s,nameCard:r}).then(function(e){be.log("".concat(o," ok")),i.setNetworkType(t.getNetworkType()).end();var a=t.getModule(io).getLocalGroupProfile(n);return s===t.getMyUserID()&&a&&a.setSelfNameCard(r),as({group:a,member:e});}).catch(function(e){return t.probeNetwork().then(function(t){var o=m(t,2),n=o[0],a=o[1];i.setError(e,n,a).end();}),be.error("".concat(o," failed. error:"),e),gs(e);});}},{key:"setGroupMemberCustomField",value:function value(e){var t=this,o="".concat(this._className,".setGroupMemberCustomField"),n=e.groupID,a=e.userID,s=void 0===a?this.getMyUserID():a,r=e.memberCustomField;be.log("".concat(o," groupID:").concat(n," userID:").concat(s));var i=new Va(Ba.SET_GROUP_MEMBER_CUSTOM_FIELD);return i.setMessage("groupID:".concat(n," userID:").concat(s," memberCustomField:").concat(JSON.stringify(r))),this.modifyGroupMemberInfo({groupID:n,userID:s,memberCustomField:r}).then(function(e){i.setNetworkType(t.getNetworkType()).end(),be.log("".concat(o," ok"));var a=t.getModule(io).getLocalGroupProfile(n);return as({group:a,member:e});}).catch(function(e){return t.probeNetwork().then(function(t){var o=m(t,2),n=o[0],a=o[1];i.setError(e,n,a).end();}),be.error("".concat(o," failed. error:"),e),gs(e);});}},{key:"modifyGroupMemberInfo",value:function value(e){var o=this,n=e.groupID,a=e.userID,s=void 0;return Tt(n)&&(n=wt(s=n)),this.request({protocolName:Jn,requestData:t(t({},e),{},{groupID:n,topicID:s})}).then(function(){if(o.hasLocalGroupMember(n,a)){var t=o.getLocalGroupMemberInfo(n,a);return Ze(e.muteTime)||t.updateMuteUntil(e.muteTime),Ze(e.role)||t.updateRole(e.role),Ze(e.nameCard)||t.updateNameCard(e.nameCard),Ze(e.memberCustomField)||t.updateMemberCustomField(e.memberCustomField),t;}return o.getGroupMemberProfile({groupID:n,userIDList:[a]}).then(function(e){return m(e.data.memberList,1)[0];});});}},{key:"_getGroupMemberProfileAdvance",value:function value(e){return this.request({protocolName:Yn,requestData:t(t({},e),{},{memberInfoFilter:e.memberInfoFilter?e.memberInfoFilter:["Role","JoinTime","NameCard","ShutUpUntil"]})});}},{key:"_updateLocalGroupMemberMap",value:function value(e,t){var o=this;return Qe(t)&&0!==t.length?t.map(function(t){return o.hasLocalGroupMember(e,t.userID)?o.getLocalGroupMemberInfo(e,t.userID).updateMember(t):o.setLocalGroupMember(e,new zs(t)),o.getLocalGroupMemberInfo(e,t.userID);}):[];}},{key:"deleteLocalGroupMembers",value:function value(e,t){var o=this.groupMemberListMap.get(e);o&&t.forEach(function(e){o.delete(e);});}},{key:"getLocalGroupMemberInfo",value:function value(e,t){return this.groupMemberListMap.has(e)?this.groupMemberListMap.get(e).get(t):null;}},{key:"setLocalGroupMember",value:function value(e,t){if(this.groupMemberListMap.has(e))this.groupMemberListMap.get(e).set(t.userID,t);else{var o=new Map().set(t.userID,t);this.groupMemberListMap.set(e,o);}}},{key:"getLocalGroupMemberList",value:function value(e){return this.groupMemberListMap.get(e);}},{key:"hasLocalGroupMember",value:function value(e,t){return this.groupMemberListMap.has(e)&&this.groupMemberListMap.get(e).has(t);}},{key:"hasLocalGroupMemberMap",value:function value(e){return this.groupMemberListMap.has(e);}},{key:"reset",value:function value(){this.groupMemberListMap.clear();}}]),a;}(Ro),Xs=["topicID","topicName","avatar","introduction","notification","unreadCount","muteAllMembers","customData","groupAtInfoList","nextMessageSeq","selfInfo"],Qs=function Qs(e){return Kt(e)?{lastTime:0,lastSequence:0,fromAccount:"",payload:null,type:"",messageForShow:"",nick:"",version:0,cloudCustomData:"",isRevoked:!1}:{lastTime:e.time||0,lastSequence:e.sequence||0,fromAccount:e.from||"",payload:e.payload||null,type:e.type||"",messageForShow:Ft(e.type,e.payload),nick:e.nick||"",version:e.version||0,cloudCustomData:e.cloudCustomData||"",isRevoked:e.isRevoked||!1};},Zs=function(){function e(t){n(this,e),this.topicID="",this.topicName="",this.avatar="",this.introduction="",this.notification="",this.unreadCount=0,this.muteAllMembers=!1,this.customData="",this.groupAtInfoList=[],this.nextMessageSeq=0,this.lastMessage=Qs(t.lastMessage),this.selfInfo={muteTime:0,readedSequence:0,messageRemindType:""},this._initTopic(t);}return s(e,[{key:"_initTopic",value:function value(e){for(var t in e){Xs.indexOf(t)<0||("selfInfo"===t?this.updateSelfInfo(e[t]):this[t]="muteAllMembers"===t?1===e[t]:e[t]);}}},{key:"updateUnreadCount",value:function value(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.unreadCount=e;}},{key:"updateNextMessageSeq",value:function value(e){this.nextMessageSeq=e;}},{key:"updateLastMessage",value:function value(e){this.lastMessage=Qs(e);}},{key:"updateGroupAtInfoList",value:function value(e){this.groupAtInfoList=JSON.parse(JSON.stringify(e));}},{key:"updateTopic",value:function value(e){Ze(e.selfInfo)||this.updateSelfInfo(e.selfInfo),Ze(e.muteAllMembers)||(this.muteAllMembers=1===e.muteAllMembers),ct(this,e,["groupID","lastMessageTime","selfInfo","muteAllMembers","lastMsg"]);}},{key:"updateSelfInfo",value:function value(e){return 0!==ct(this.selfInfo,e,[],[""]);}},{key:"reduceUnreadCount",value:function value(){return this.unreadCount>=1&&(this.unreadCount-=1,!0);}},{key:"isLastMessageRevoked",value:function value(e){return e.sequence===this.lastMessage.lastSequence;}},{key:"setLastMessageRevoked",value:function value(e){this.lastMessage.isRevoked=e;}}]),e;}(),er=function(e){i(a,e);var o=f(a);function a(e){var t;return n(this,a),(t=o.call(this,e))._className="TopicModule",t._topicMap=new Map(),t._getTopicTimeMap=new Map(),t.TOPIC_CACHE_TIME=300,t.TOPIC_LAST_ACTIVE_TIME=3600,t.getInnerEmitterInstance().on(Ms,t._onCloudConfigUpdated,g(t)),t;}return s(a,[{key:"_onCloudConfigUpdated",value:function value(){var e=this.getCloudConfig("topic_cache_time"),t=this.getCloudConfig("topic_last_active_time");Ze(e)||(this.TOPIC_CACHE_TIME=Number(e)),Ze(t)||(this.TOPIC_LAST_ACTIVE_TIME=Number(t));}},{key:"onTopicCreated",value:function value(e){var t=e.groupID;this.resetGetTopicTime(t),this.emitOuterEvent(S.TOPIC_CREATED,e);}},{key:"onTopicDeleted",value:function value(e){var t=this,o=e.groupID,n=e.topicIDList;(void 0===n?[]:n).forEach(function(e){t._deleteLocalTopic(o,e);}),this.emitOuterEvent(S.TOPIC_DELETED,e);}},{key:"onTopicMessageRemindTypeUpdated",value:function value(e){var t=e.groupID,o=e.topicID,n=e.messageRemindType,a=this.getLocalTopic(t,o);if(a){var s=a.updateSelfInfo({messageRemindType:n});s&&this.emitOuterEvent(S.TOPIC_UPDATED,{groupID:t,topic:a}),be.debug("".concat(this._className,".onTopicMessageRemindTypeUpdated topicID:").concat(o)+" messageRemindType:".concat(n," isTopicUpdated:").concat(s));}}},{key:"onTopicProfileUpdated",value:function value(e){var t=e.groupID,o=e.topicID,n=this.getLocalTopic(t,o);n&&(n.updateTopic(e),this.emitOuterEvent(S.TOPIC_UPDATED,{groupID:t,topic:n}));}},{key:"onConversationProxy",value:function value(e){var t=e.topicID,o=e.unreadCount,n=e.groupAtInfoList,a=wt(t),s=this.getLocalTopic(a,t),r=!1;s&&(Ze(o)||s.unreadCount===o||(s.updateUnreadCount(o),r=!0),Ze(n)||(s.updateGroupAtInfoList(n),r=!0)),r&&this.emitOuterEvent(S.TOPIC_UPDATED,{groupID:a,topic:s});}},{key:"onMessageSent",value:function value(e){var t=e.groupID,o=e.topicID,n=e.lastMessage,a=this.getLocalTopic(t,o);a&&(a.nextMessageSeq+=1,a.updateLastMessage(n),this.emitOuterEvent(S.TOPIC_UPDATED,{groupID:t,topic:a}));}},{key:"onMessageModified",value:function value(e){var t=e.to,o=e.time,n=e.sequence,a=e.elements,s=e.cloudCustomData,r=e.messageVersion,i=wt(t),c=this.getLocalTopic(i,t);if(c){var u=c.lastMessage;be.debug("".concat(this._className,".onMessageModified topicID:").concat(t," lastMessage:"),JSON.stringify(u),"options:",JSON.stringify(e)),u&&(null===u.payload||u.lastTime===o&&u.lastSequence===n&&u.version!==r)&&(u.type=a[0].type,u.payload=a[0].content,u.messageForShow=Ft(u.type,u.payload),u.cloudCustomData=s,u.version=r,u.lastSequence=n,u.lastTime=o,this.emitOuterEvent(S.TOPIC_UPDATED,{groupID:i,topic:c}));}}},{key:"onMessageRevoked",value:function value(e){var t=this;if(0!==e.length){var o=null,n=null,a=!1;e.forEach(function(e){var s=e.to;n=wt(s),(o=t.getLocalTopic(n,s))&&(o.reduceUnreadCount()&&(a=!0),o.isLastMessageRevoked(e)&&(o.setLastMessageRevoked(!0),a=!0));}),a&&this.emitOuterEvent(S.TOPIC_UPDATED,{groupID:n,topic:o});}}},{key:"getJoinedCommunityList",value:function value(){return this.getModule(io).getGroupList({isGroupWithTopicOnly:!0}).then(function(e){var t=e.data.groupList;return as({groupList:void 0===t?[]:t});}).catch(function(e){return gs(e);});}},{key:"createTopicInCommunity",value:function value(e){var o=this,n="".concat(this._className,".createTopicInCommunity"),a=e.topicID;if(!Ze(a)&&!Tt(a))return gs({code:Ca.ILLEGAL_TOPIC_ID,message:Sa.ILLEGAL_TOPIC_ID});var s=new Va(Ba.CREATE_TOPIC);return this.request({protocolName:_a,requestData:t({},e)}).then(function(a){var r=a.data.topicID;return s.setMessage("topicID:".concat(r)).setNetworkType(o.getNetworkType()).end(),be.log("".concat(n," ok")),o._updateTopicMap([t(t({},e),{},{topicID:r})]),as({topicID:r});}).catch(function(e){return o.probeNetwork().then(function(t){var o=m(t,2),n=o[0],a=o[1];s.setError(e,n,a).end();}),be.error("".concat(n," failed. error:"),e),gs(e);});}},{key:"deleteTopicFromCommunity",value:function value(e){var t=this,o="".concat(this._className,".deleteTopicFromCommunity"),n=e.groupID,a=e.topicIDList,s=void 0===a?[]:a,r=new Va(Ba.DELETE_TOPIC);return r.setMessage("groupID:".concat(n," topicIDList:").concat(s)),this.request({protocolName:ga,requestData:{groupID:n,topicIDList:s}}).then(function(e){var o=e.data.resultList,a=[],s=[];(void 0===o?[]:o).forEach(function(e){var t=e.topicID,o=e.errorCode,n=e.errorInfo;0===o?a.push({topicID:t}):s.push({topicID:t,code:o,message:n});});var i="success count:".concat(a.length,", fail count:").concat(s.length);return r.setMoreMessage("".concat(i)).setNetworkType(t.getNetworkType()).end(),be.log("".concat(i)),a.forEach(function(e){t._deleteLocalTopic(n,e.topicID);}),as({successTopicList:a,failureTopicList:s});}).catch(function(e){return t.probeNetwork().then(function(t){var o=m(t,2),n=o[0],a=o[1];r.setError(e,n,a).end();}),be.error("".concat(o," failed. error:"),e),gs(e);});}},{key:"updateTopicProfile",value:function value(e){var o=this,n="".concat(this._className,".updateTopicProfile"),a=new Va(Ba.UPDATE_TOPIC_PROFILE);return a.setMessage("groupID:".concat(e.groupID," topicID:").concat(e.topicID)),be.log("".concat(n," options:"),e),Ze(e.muteAllMembers)||(e.muteAllMembers=!0===e.muteAllMembers?"On":"Off"),this.request({protocolName:ha,requestData:t({},e)}).then(function(){return a.setNetworkType(o.getNetworkType()).end(),be.log("".concat(n," ok")),o._updateTopicMap([e]),as({topic:o.getLocalTopic(e.groupID,e.topicID)});}).catch(function(e){return o.probeNetwork().then(function(t){var o=m(t,2),n=o[0],s=o[1];a.setError(e,n,s).end();}),be.error("".concat(n," failed. error:"),e),gs(e);});}},{key:"getTopicList",value:function value(e){var o=this,n="".concat(this._className,".getTopicList"),a=e.groupID,s=e.topicIDList,r=void 0===s?[]:s,i=0===r.length,c=new Va(Ba.GET_TOPIC_LIST);if(c.setMessage("groupID:".concat(a)),this._getTopicTimeMap.has(a)){var u=this._getTopicTimeMap.get(a),l=u.isGetAll,d=u.time;if((l||!l&&!i)&&Date.now()-d<1e3*this.TOPIC_CACHE_TIME){var p=this._getLocalTopicList(a,r);if(i||p.length===r.length)return c.setNetworkType(this.getNetworkType()).setMoreMessage("from cache, topic count:".concat(p.length)).end(),be.log("".concat(n," groupID:").concat(a," from cache, topic count:").concat(p.length)),_s({successTopicList:p,failureTopicList:[]});}}return this.request({protocolName:fa,requestData:{groupID:a,topicIDList:r}}).then(function(e){var s=e.data.topicInfoList,r=[],u=[],l=[];(void 0===s?[]:s).forEach(function(e){var o=e.topic,n=e.selfInfo,a=e.errorCode,s=e.errorInfo,i=o.topicID;0===a?(r.push(t(t({},o),{},{selfInfo:n})),u.push(i)):l.push({topicID:i,code:a,message:s});}),o._updateTopicMap(r),o._handleTopicAtInfo(r);var d="success count:".concat(u.length,", fail count:").concat(l.length);c.setNetworkType(o.getNetworkType()).setMoreMessage("".concat(d)).end(),be.log("".concat(n," groupID:").concat(a," from remote, ").concat(d));var p=[];return Kt(u)||(o._getTopicTimeMap.set(a,{time:Date.now(),isGetAll:i}),p=o._getLocalTopicList(a,u)),as({successTopicList:p,failureTopicList:l});}).catch(function(e){return o.probeNetwork(e).then(function(t){var o=m(t,2),n=o[0],a=o[1];c.setError(e,n,a).end();}),be.error("".concat(n," failed. error:"),e),gs(e);});}},{key:"hasLocalTopic",value:function value(e,t){return!!this._topicMap.has(e)&&this._topicMap.get(e).has(t);}},{key:"getLocalTopic",value:function value(e,t){var o=null;return this._topicMap.has(e)&&(o=this._topicMap.get(e).get(t)),o;}},{key:"_getLocalTopicList",value:function value(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=this._topicMap.get(e),n=[];return o&&(n=M(o.values())),0===t.length?n:n.filter(function(e){return t.includes(e.topicID);});}},{key:"_deleteLocalTopic",value:function value(e,t){this._topicMap.has(e)&&(this._topicMap.get(e).delete(t),be.log("".concat(this._className,"._deleteLocalTopic groupID:").concat(e," topicID:").concat(t)));}},{key:"_updateTopicMap",value:function value(e){var t=this,o=[];(e.forEach(function(e){var n=e.groupID,a=e.topicID,s=null;t._topicMap.has(n)||t._topicMap.set(n,new Map()),t._topicMap.get(n).has(a)?(s=t._topicMap.get(n).get(a)).updateTopic(e):(t._getTopicLastMessage(e),s=new Zs(e),t._topicMap.get(n).set(a,s));var r=s.nextMessageSeq-s.selfInfo.readedSequence-1,i=r>0?r:0;s.updateUnreadCount(i),o.push({conversationID:"".concat(D.CONV_GROUP).concat(a),type:D.CONV_TOPIC,unreadCount:i});}),o.length>0)&&this.getModule(po).updateTopicConversation(o);}},{key:"resetGetTopicTime",value:function value(e){var t=this;Ze(e)?M(this._getTopicTimeMap.keys()).forEach(function(e){t._getTopicTimeMap.set(e,0);}):this._getTopicTimeMap.set(e,0);}},{key:"getTopicListOnReconnected",value:function value(){var e=this,t=M(this._topicMap.keys()),o=[];t.forEach(function(t){var n=[];e._getLocalTopicList(t).forEach(function(t){var o=t.lastMessage.lastTime,a=void 0===o?0:o;Date.now()-1e3*a<1e3*e.TOPIC_LAST_ACTIVE_TIME&&n.push(t.topicID);}),n.length>0&&o.push({groupID:t,topicIDList:n});}),be.log("".concat(this._className,".getTopicListOnReconnected. active community count:").concat(o.length)),this._relayGetTopicList(o);}},{key:"_relayGetTopicList",value:function value(e){var t=this;if(0!==e.length){var o=e.shift(),n=o.topicIDList.length>5?"topicIDList.length:".concat(o.topicIDList.length):"topicIDList:".concat(o.topicIDList),a=new Va(Ba.RELAY_GET_TOPIC_LIST);a.setMessage(n),be.log("".concat(this._className,"._relayGetTopicList. ").concat(n)),this.getTopicList(o).then(function(){a.setNetworkType(t.getNetworkType()).end(),t._relayGetTopicList(e);}).catch(function(o){t.probeNetwork().then(function(e){var t=m(e,2),n=t[0],s=t[1];a.setError(o,n,s).end();}),t._relayGetTopicList(e);});}}},{key:"_handleTopicAtInfo",value:function value(e){var o=this;0!==e.length&&e.forEach(function(e){var n=e.groupID,a=e.topicID,s=e.groupAtInfoList,r=[];Ze(s)||(s.forEach(function(e){r.push(t(t({},e),{},{groupID:n,topicID:a}));}),o.getModule(po).onNewGroupAtTips({dataList:r}));});}},{key:"_getTopicLastMessage",value:function value(e){if(!Ze(e.lastMsg)){var t={time:e.lastMsg.time,sequence:e.lastMsg.sequence,from:e.lastMsg.from,payload:e.lastMsg.elements[0]?e.lastMsg.elements[0].content:null,type:e.lastMsg.elements[0]?e.lastMsg.elements[0].type:"",nick:e.lastMsg.nick,version:e.lastMsg.messageVersion,cloudCustomData:e.lastMsg.cloudCustomData};e.lastMessage=t;}}},{key:"deleteTopicListInCommunity",value:function value(e){var t=this,o=this._getLocalTopicList(e),n=this.getModule(po);o.forEach(function(o){var a=o.topicID;t._deleteLocalTopic(e,a),t._getTopicTimeMap.delete(e),n.deleteLocalConversation("".concat(D.CONV_GROUP).concat(a));});}},{key:"reset",value:function value(){be.log("".concat(this._className,".reset")),this._topicMap.clear(),this._getTopicTimeMap.clear(),this.TOPIC_CACHE_TIME=300,this.TOPIC_LAST_ACTIVE_TIME=3600;}}]),a;}(Ro),tr=function(){function e(t){n(this,e),this._userModule=t,this._className="ProfileHandler",this.TAG="profile",this.accountProfileMap=new Map(),this.expirationTime=864e5;}return s(e,[{key:"setExpirationTime",value:function value(e){this.expirationTime=e;}},{key:"getUserProfile",value:function value(e){var t=this,o=e.userIDList;e.fromAccount=this._userModule.getMyAccount(),o.length>100&&(be.warn("".concat(this._className,".getUserProfile 获取用户资料人数不能超过100人")),o.length=100);for(var n,a=[],s=[],r=0,i=o.length;r<i;r++){n=o[r],this._userModule.isMyFriend(n)&&this._containsAccount(n)?s.push(this._getProfileFromMap(n)):a.push(n);}if(0===a.length)return _s(s);e.toAccount=a;var c=e.bFromGetMyProfile||!1,u=[];e.toAccount.forEach(function(e){u.push({toAccount:e,standardSequence:0,customSequence:0});}),e.userItem=u;var l=new Va(Ba.GET_USER_PROFILE);return l.setMessage(o.length>5?"userIDList.length:".concat(o.length):"userIDList:".concat(o)),this._userModule.request({protocolName:qo,requestData:e}).then(function(e){l.setNetworkType(t._userModule.getNetworkType()).end(),be.info("".concat(t._className,".getUserProfile ok"));var o=t._handleResponse(e).concat(s);return as(c?o[0]:o);}).catch(function(e){return t._userModule.probeNetwork().then(function(t){var o=m(t,2),n=o[0],a=o[1];l.setError(e,n,a).end();}),be.error("".concat(t._className,".getUserProfile failed. error:"),e),gs(e);});}},{key:"getMyProfile",value:function value(){var e=this._userModule.getMyAccount();if(be.log("".concat(this._className,".getMyProfile myAccount:").concat(e)),this._fillMap(),this._containsAccount(e)){var t=this._getProfileFromMap(e);return be.debug("".concat(this._className,".getMyProfile from cache, myProfile:")+JSON.stringify(t)),_s(t);}return this.getUserProfile({fromAccount:e,userIDList:[e],bFromGetMyProfile:!0});}},{key:"_handleResponse",value:function value(e){for(var t,o,n=it.now(),a=e.data.userProfileItem,s=[],r=0,i=a.length;r<i;r++){"@TLS#NOT_FOUND"!==a[r].to&&""!==a[r].to&&(t=a[r].to,o=this._updateMap(t,this._getLatestProfileFromResponse(t,a[r].profileItem)),s.push(o));}return be.log("".concat(this._className,"._handleResponse cost ").concat(it.now()-n," ms")),s;}},{key:"_getLatestProfileFromResponse",value:function value(e,t){var o={};if(o.userID=e,o.profileCustomField=[],!Kt(t))for(var n=0,a=t.length;n<a;n++){if(t[n].tag.indexOf("Tag_Profile_Custom")>-1)o.profileCustomField.push({key:t[n].tag,value:t[n].value});else switch(t[n].tag){case Fe.NICK:o.nick=t[n].value;break;case Fe.GENDER:o.gender=t[n].value;break;case Fe.BIRTHDAY:o.birthday=t[n].value;break;case Fe.LOCATION:o.location=t[n].value;break;case Fe.SELFSIGNATURE:o.selfSignature=t[n].value;break;case Fe.ALLOWTYPE:o.allowType=t[n].value;break;case Fe.LANGUAGE:o.language=t[n].value;break;case Fe.AVATAR:o.avatar=t[n].value;break;case Fe.MESSAGESETTINGS:o.messageSettings=t[n].value;break;case Fe.ADMINFORBIDTYPE:o.adminForbidType=t[n].value;break;case Fe.LEVEL:o.level=t[n].value;break;case Fe.ROLE:o.role=t[n].value;break;default:be.warn("".concat(this._className,"._handleResponse unknown tag:"),t[n].tag,t[n].value);}}return o;}},{key:"updateMyProfile",value:function value(e){var t=this,o="".concat(this._className,".updateMyProfile"),n=new Va(Ba.UPDATE_MY_PROFILE);n.setMessage(JSON.stringify(e));var a=new Ns().validate(e);if(!a.valid)return n.setCode(Ca.UPDATE_PROFILE_INVALID_PARAM).setMoreMessage("".concat(o," info:").concat(a.tips)).setNetworkType(this._userModule.getNetworkType()).end(),be.error("".concat(o," info:").concat(a.tips,",请参考 https://web.sdk.qcloud.com/im/doc/zh-cn/SDK.html#updateMyProfile")),gs({code:Ca.UPDATE_PROFILE_INVALID_PARAM,message:Sa.UPDATE_PROFILE_INVALID_PARAM});var s=[];for(var r in e){Object.prototype.hasOwnProperty.call(e,r)&&("profileCustomField"===r?e.profileCustomField.forEach(function(e){s.push({tag:e.key,value:e.value});}):s.push({tag:Fe[r.toUpperCase()],value:e[r]}));}return 0===s.length?(n.setCode(Ca.UPDATE_PROFILE_NO_KEY).setMoreMessage(Sa.UPDATE_PROFILE_NO_KEY).setNetworkType(this._userModule.getNetworkType()).end(),be.error("".concat(o," info:").concat(Sa.UPDATE_PROFILE_NO_KEY,",请参考 https://web.sdk.qcloud.com/im/doc/zh-cn/SDK.html#updateMyProfile")),gs({code:Ca.UPDATE_PROFILE_NO_KEY,message:Sa.UPDATE_PROFILE_NO_KEY})):this._userModule.request({protocolName:Vo,requestData:{fromAccount:this._userModule.getMyAccount(),profileItem:s}}).then(function(a){n.setNetworkType(t._userModule.getNetworkType()).end(),be.info("".concat(o," ok"));var s=t._updateMap(t._userModule.getMyAccount(),e);return t._userModule.emitOuterEvent(S.PROFILE_UPDATED,[s]),_s(s);}).catch(function(e){return t._userModule.probeNetwork().then(function(t){var o=m(t,2),a=o[0],s=o[1];n.setError(e,a,s).end();}),be.error("".concat(o," failed. error:"),e),gs(e);});}},{key:"onProfileModified",value:function value(e){var t=e.dataList;if(!Kt(t)){var o,n,a=t.length;be.debug("".concat(this._className,".onProfileModified count:").concat(a," dataList:"),e.dataList);for(var s=[],r=0;r<a;r++){o=t[r].userID,n=this._updateMap(o,this._getLatestProfileFromResponse(o,t[r].profileList)),s.push(n);}s.length>0&&(this._userModule.emitInnerEvent(vs,s),this._userModule.emitOuterEvent(S.PROFILE_UPDATED,s));}}},{key:"_fillMap",value:function value(){if(0===this.accountProfileMap.size){for(var e=this._getCachedProfiles(),t=Date.now(),o=0,n=e.length;o<n;o++){t-e[o].lastUpdatedTime<this.expirationTime&&this.accountProfileMap.set(e[o].userID,e[o]);}be.log("".concat(this._className,"._fillMap from cache, map.size:").concat(this.accountProfileMap.size));}}},{key:"_updateMap",value:function value(e,t){var o,n=Date.now();return this._containsAccount(e)?(o=this._getProfileFromMap(e),t.profileCustomField&&Mt(o.profileCustomField,t.profileCustomField),ct(o,t,["profileCustomField"]),o.lastUpdatedTime=n):(o=new Ns(t),(this._userModule.isMyFriend(e)||e===this._userModule.getMyAccount())&&(o.lastUpdatedTime=n,this.accountProfileMap.set(e,o))),this._flushMap(e===this._userModule.getMyAccount()),o;}},{key:"_flushMap",value:function value(e){var t=M(this.accountProfileMap.values()),o=this._userModule.getStorageModule();be.debug("".concat(this._className,"._flushMap length:").concat(t.length," flushAtOnce:").concat(e)),o.setItem(this.TAG,t,e);}},{key:"_containsAccount",value:function value(e){return this.accountProfileMap.has(e);}},{key:"_getProfileFromMap",value:function value(e){return this.accountProfileMap.get(e);}},{key:"_getCachedProfiles",value:function value(){var e=this._userModule.getStorageModule().getItem(this.TAG);return Kt(e)?[]:e;}},{key:"onConversationsProfileUpdated",value:function value(e){for(var t,o,n,a=[],s=0,r=e.length;s<r;s++){o=(t=e[s]).userID,this._userModule.isMyFriend(o)||(this._containsAccount(o)?(n=this._getProfileFromMap(o),ct(n,t)>0&&a.push(o)):a.push(t.userID));}0!==a.length&&(be.info("".concat(this._className,".onConversationsProfileUpdated toAccountList:").concat(a)),this.getUserProfile({userIDList:a}));}},{key:"getNickAndAvatarByUserID",value:function value(e){if(this._containsAccount(e)){var t=this._getProfileFromMap(e);return{nick:t.nick,avatar:t.avatar};}return{nick:"",avatar:""};}},{key:"reset",value:function value(){this._flushMap(!0),this.accountProfileMap.clear();}}]),e;}(),or=s(function e(t){n(this,e),Kt||(this.userID=t.userID||"",this.timeStamp=t.timeStamp||0);}),nr=function(){function e(t){n(this,e),this._userModule=t,this._className="BlacklistHandler",this._blacklistMap=new Map(),this.startIndex=0,this.maxLimited=100,this.currentSequence=0;}return s(e,[{key:"getLocalBlacklist",value:function value(){return M(this._blacklistMap.keys());}},{key:"getBlacklist",value:function value(){var e=this,t="".concat(this._className,".getBlacklist"),o={fromAccount:this._userModule.getMyAccount(),maxLimited:this.maxLimited,startIndex:0,lastSequence:this.currentSequence},n=new Va(Ba.GET_BLACKLIST);return this._userModule.request({protocolName:Bo,requestData:o}).then(function(o){var a=o.data,s=a.blackListItem,r=a.currentSequence,i=Kt(s)?0:s.length;n.setNetworkType(e._userModule.getNetworkType()).setMessage("blackList count:".concat(i)).end(),be.info("".concat(t," ok")),e.currentSequence=r,e._handleResponse(s,!0),e._userModule.emitOuterEvent(S.BLACKLIST_UPDATED,M(e._blacklistMap.keys()));}).catch(function(o){return e._userModule.probeNetwork().then(function(e){var t=m(e,2),a=t[0],s=t[1];n.setError(o,a,s).end();}),be.error("".concat(t," failed. error:"),o),gs(o);});}},{key:"addBlacklist",value:function value(e){var t=this,o="".concat(this._className,".addBlacklist"),n=new Va(Ba.ADD_TO_BLACKLIST);if(!Qe(e.userIDList))return n.setCode(Ca.ADD_BLACKLIST_INVALID_PARAM).setMessage(Sa.ADD_BLACKLIST_INVALID_PARAM).setNetworkType(this._userModule.getNetworkType()).end(),be.error("".concat(o," options.userIDList 必需是数组")),gs({code:Ca.ADD_BLACKLIST_INVALID_PARAM,message:Sa.ADD_BLACKLIST_INVALID_PARAM});var a=this._userModule.getMyAccount();return 1===e.userIDList.length&&e.userIDList[0]===a?(n.setCode(Ca.CANNOT_ADD_SELF_TO_BLACKLIST).setMessage(Sa.CANNOT_ADD_SELF_TO_BLACKLIST).setNetworkType(this._userModule.getNetworkType()).end(),be.error("".concat(o," 不能把自己拉黑")),gs({code:Ca.CANNOT_ADD_SELF_TO_BLACKLIST,message:Sa.CANNOT_ADD_SELF_TO_BLACKLIST})):(e.userIDList.includes(a)&&(e.userIDList=e.userIDList.filter(function(e){return e!==a;}),be.warn("".concat(o," 不能把自己拉黑,已过滤"))),e.fromAccount=this._userModule.getMyAccount(),e.toAccount=e.userIDList,this._userModule.request({protocolName:Ko,requestData:e}).then(function(a){return n.setNetworkType(t._userModule.getNetworkType()).setMessage(e.userIDList.length>5?"userIDList.length:".concat(e.userIDList.length):"userIDList:".concat(e.userIDList)).end(),be.info("".concat(o," ok")),t._handleResponse(a.resultItem,!0),as(M(t._blacklistMap.keys()));}).catch(function(e){return t._userModule.probeNetwork().then(function(t){var o=m(t,2),a=o[0],s=o[1];n.setError(e,a,s).end();}),be.error("".concat(o," failed. error:"),e),gs(e);}));}},{key:"_handleResponse",value:function value(e,t){if(!Kt(e))for(var o,n,a,s=0,r=e.length;s<r;s++){n=e[s].to,a=e[s].resultCode,(Ze(a)||0===a)&&(t?((o=this._blacklistMap.has(n)?this._blacklistMap.get(n):new or()).userID=n,!Kt(e[s].addBlackTimeStamp)&&(o.timeStamp=e[s].addBlackTimeStamp),this._blacklistMap.set(n,o)):this._blacklistMap.has(n)&&(o=this._blacklistMap.get(n),this._blacklistMap.delete(n)));}be.log("".concat(this._className,"._handleResponse total:").concat(this._blacklistMap.size," bAdd:").concat(t));}},{key:"deleteBlacklist",value:function value(e){var t=this,o="".concat(this._className,".deleteBlacklist"),n=new Va(Ba.REMOVE_FROM_BLACKLIST);return Qe(e.userIDList)?(e.fromAccount=this._userModule.getMyAccount(),e.toAccount=e.userIDList,this._userModule.request({protocolName:Ho,requestData:e}).then(function(a){return n.setNetworkType(t._userModule.getNetworkType()).setMessage(e.userIDList.length>5?"userIDList.length:".concat(e.userIDList.length):"userIDList:".concat(e.userIDList)).end(),be.info("".concat(o," ok")),t._handleResponse(a.data.resultItem,!1),as(M(t._blacklistMap.keys()));}).catch(function(e){return t._userModule.probeNetwork().then(function(t){var o=m(t,2),a=o[0],s=o[1];n.setError(e,a,s).end();}),be.error("".concat(o," failed. error:"),e),gs(e);})):(n.setCode(Ca.DEL_BLACKLIST_INVALID_PARAM).setMessage(Sa.DEL_BLACKLIST_INVALID_PARAM).setNetworkType(this._userModule.getNetworkType()).end(),be.error("".concat(o," options.userIDList 必需是数组")),gs({code:Ca.DEL_BLACKLIST_INVALID_PARAM,message:Sa.DEL_BLACKLIST_INVALID_PARAM}));}},{key:"onAccountDeleted",value:function value(e){for(var t,o=[],n=0,a=e.length;n<a;n++){t=e[n],this._blacklistMap.has(t)&&(this._blacklistMap.delete(t),o.push(t));}o.length>0&&(be.log("".concat(this._className,".onAccountDeleted count:").concat(o.length," userIDList:"),o),this._userModule.emitOuterEvent(S.BLACKLIST_UPDATED,M(this._blacklistMap.keys())));}},{key:"onAccountAdded",value:function value(e){for(var t,o=[],n=0,a=e.length;n<a;n++){t=e[n],this._blacklistMap.has(t)||(this._blacklistMap.set(t,new or({userID:t})),o.push(t));}o.length>0&&(be.log("".concat(this._className,".onAccountAdded count:").concat(o.length," userIDList:"),o),this._userModule.emitOuterEvent(S.BLACKLIST_UPDATED,M(this._blacklistMap.keys())));}},{key:"reset",value:function value(){this._blacklistMap.clear(),this.startIndex=0,this.maxLimited=100,this.currentSequence=0;}}]),e;}(),ar=function ar(e){var t=String(e).replace(/[=]+$/,""),o="";if(t.length%4==1)return be.warn("decodeBase64 failed: ".concat(e," to be decoded is not correctly encoded.")),"";for(var n,a,s=0,r=0;a=t.charAt(r++);~a&&(n=s%4?64*n+a:a,s++%4)?o+=String.fromCharCode(255&n>>(-2*s&6)):0){a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a);}try{return decodeURIComponent(escape(o));}catch(i){return be.warn("decodeBase64 failed: ".concat(e," to be decoded is not correctly encoded.")),"";}},sr=function(){function e(t){n(this,e),this._userModule=t,this._className="UserStatusHandler",this.MAX_QUERY_USER_COUNT=500,this.MAX_SUBSCRIBE_USER_COUNT=100,this.MAX_UNSUBSCRIBE_USER_COUNT=100,this._userModule.getInnerEmitterInstance().on(Ms,this._onCloudConfigUpdated,this);}return s(e,[{key:"_onCloudConfigUpdated",value:function value(){var e=this._userModule.getCloudConfig("status_query_count"),t=this._userModule.getCloudConfig("status_sub_count"),o=this._userModule.getCloudConfig("status_unsub_count");be.log("".concat(this._className,"._onCloudConfigUpdated statusQueryCount:").concat(e," statusSubscribeCount:").concat(t)+" statusUnsubscribeCount:".concat(o)),Ze(e)||(this.MAX_QUERY_USER_COUNT=parseInt(e,10)),Ze(e)||(this.MAX_SUBSCRIBE_USER_COUNT=parseInt(t,10)),Ze(e)||(this.MAX_UNSUBSCRIBE_USER_COUNT=parseInt(o,10));}},{key:"onUserStatusUpdated",value:function value(e){var t=e.dataList,o=this._userModule.getMyUserID(),n=this._userModule.getModule(_o),a=t.map(function(e){var t=e.to,a=e.statusType,s=e.customStatus,r=ar(s);return t===o&&n.setCustomStatus(r),{userID:t,statusType:a,customStatus:r};});this._userModule.emitOuterEvent(S.USER_STATUS_UPDATED,a);}},{key:"setSelfStatus",value:function value(e){var t=this,o="".concat(this._className,".setSelfStatus"),n=e.customStatus,a=new Va(Ba.SET_SELF_STATUS);return this._userModule.request({protocolName:ma,requestData:{customStatus:n}}).then(function(e){return a.setNetworkType(t._userModule.getNetworkType()).setMessage("customStatus:".concat(n)).end(),be.log("".concat(o," ok. customStatus:").concat(n)),t._userModule.getModule(_o).setCustomStatus(n),as({userID:t._userModule.getMyUserID(),statusType:1,customStatus:n});}).catch(function(e){return t._userModule.probeNetwork().then(function(t){var o=m(t,2),n=o[0],s=o[1];a.setError(e,n,s).end();}),be.error("".concat(o," failed. error:"),e),gs(e);});}},{key:"getUserStatus",value:function value(e){var t=this,o="".concat(this._className,".getUserStatus"),n=e.userIDList,a=void 0===n?[]:n,s=this._userModule.getMyUserID(),r=M(a),i=void 0,c=r.indexOf(s);if(c>-1){r.splice(c,1);var u=this._userModule.getModule(_o).getCustomStatus();i={userID:s,statusType:1,customStatus:u};}if(0===r.length)return _s({successUserList:[i],failureUserList:[]});if(!this._userModule.canIUse(H.USER_STATUS))return gs({code:Ca.CANNOT_USE_COMMERCIAL_ABILITY,message:Sa.CANNOT_USE_COMMERCIAL_ABILITY});r.length>this.MAX_QUERY_USER_COUNT&&(be.warn("".concat(o," 查询用户状态单次请求不能超过").concat(this.MAX_QUERY_USER_COUNT,"个用户")),r=a.slice(0,this.MAX_QUERY_USER_COUNT));var l=new Va(Ba.GET_USER_STATUS);return this._userModule.request({protocolName:Ma,requestData:{userIDList:r}}).then(function(e){var n=e.data,s=n.successUserList,r=void 0===s?[]:s,c=n.failureUserList,u=void 0===c?[]:c,d=r.map(function(e){var t=e.userID,o=e.statusType,n=e.customStatus;return{userID:t,statusType:o,customStatus:ar(n)};}),p=u.map(function(e){var t=e.userID,o=e.invalidUserID,n=e.errorCode,a=e.errorInfo;return{userID:Kt(o)?t:o,code:n,message:a};});Ze(i)||d.unshift(i);var _="userID count:".concat(a.length,", success count:").concat(d.length,", fail count:").concat(p.length);return l.setNetworkType(t._userModule.getNetworkType()).setMessage("".concat(_)).end(),be.log("".concat(o," ok. ").concat(_,".")),as({successUserList:d,failureUserList:p});}).catch(function(e){return t._userModule.probeNetwork().then(function(t){var o=m(t,2),n=o[0],s=o[1];l.setMessage("userID count:".concat(a.length)).setError(e,n,s).end();}),be.error("".concat(o," failed. error:"),e),gs(e);});}},{key:"subscribeUserStatus",value:function value(e){var t=this;if(!this._userModule.canIUse(H.USER_STATUS))return gs({code:Ca.CANNOT_USE_COMMERCIAL_ABILITY,message:Sa.CANNOT_USE_COMMERCIAL_ABILITY});var o="".concat(this._className,".subscribeUserStatus"),n=e.userIDList,a=void 0===n?[]:n,s=M(a);s.length>this.MAX_SUBSCRIBE_USER_COUNT&&(be.warn("".concat(o," 订阅用户状态单次请求不能超过").concat(this.MAX_SUBSCRIBE_USER_COUNT,"个用户")),s=a.slice(0,this.MAX_SUBSCRIBE_USER_COUNT));var r=new Va(Ba.SUBSCRIBE_USER_STATUS),i="userID count:".concat(a.length);return be.log("".concat(o," ").concat(i)),this._userModule.request({protocolName:va,requestData:{userIDList:s}}).then(function(e){var n=e.data.failureUserList,a=(void 0===n?[]:n).map(function(e){var t=e.userID,o=e.invalidUserID,n=e.errorCode,a=e.errorInfo;return{userID:Kt(o)?t:o,code:n,message:a};});return r.setNetworkType(t._userModule.getNetworkType()).setMessage("".concat(i," fail count:").concat(a.length)).end(),be.log("".concat(o," ok. fail count:").concat(a.length,".")),as({failureUserList:a});}).catch(function(e){return t._userModule.probeNetwork().then(function(t){var o=m(t,2),n=o[0],a=o[1];r.setMessage("".concat(i)).setError(e,n,a).end();}),be.error("".concat(o," failed. error:"),e),gs(e);});}},{key:"unsubscribeUserStatus",value:function value(e){var t=this;if(!this._userModule.canIUse(H.USER_STATUS))return gs({code:Ca.CANNOT_USE_COMMERCIAL_ABILITY,message:Sa.CANNOT_USE_COMMERCIAL_ABILITY});var o="".concat(this._className,".unsubscribeUserStatus"),n=(e||{}).userIDList,a=void 0===n?[]:n,s=M(a);a.length>this.MAX_UNSUBSCRIBE_USER_COUNT&&(be.warn("".concat(o," 取消订阅用户状态单次请求不能超过").concat(this.MAX_UNSUBSCRIBE_USER_COUNT,"个用户")),s=a.slice(0,this.MAX_UNSUBSCRIBE_USER_COUNT));var r=new Va(Ba.UNSUBSCRIBE_USER_STATUS),i="userID count:".concat(a.length);be.log("".concat(o," ").concat(i));var c={userIDList:s};return 0===s.length&&(c.userIDList=void 0,c.unsubscribeAll=1),this._userModule.request({protocolName:Ia,requestData:c}).then(function(e){var n=e.data.failureUserList,a=(void 0===n?[]:n).map(function(e){var t=e.userID,o=e.invalidUserID,n=e.errorCode,a=e.errorInfo;return{userID:Kt(o)?t:o,code:n,message:a};});return r.setNetworkType(t._userModule.getNetworkType()).setMessage("".concat(i," fail count:").concat(a.length)).end(),be.log("".concat(o," ok. fail count:").concat(a.length,".")),as({failureUserList:a});}).catch(function(e){return t._userModule.probeNetwork().then(function(t){var o=m(t,2),n=o[0],a=o[1];r.setMessage("".concat(i)).setError(e,n,a).end();}),be.error("".concat(o," failed. error:"),e),gs(e);});}},{key:"reset",value:function value(){this.MAX_QUERY_USER_COUNT=500,this.MAX_SUBSCRIBE_USER_COUNT=100,this.MAX_UNSUBSCRIBE_USER_COUNT=100;}}]),e;}(),rr=function(e){i(o,e);var t=f(o);function o(e){var a;return n(this,o),(a=t.call(this,e))._className="UserModule",a._profileHandler=new tr(g(a)),a._blacklistHandler=new nr(g(a)),a._userStatusHandler=new sr(g(a)),a.getInnerEmitterInstance().on(ms,a.onContextUpdated,g(a)),a;}return s(o,[{key:"onContextUpdated",value:function value(e){this._profileHandler.getMyProfile(),this._blacklistHandler.getBlacklist();}},{key:"onProfileModified",value:function value(e){this._profileHandler.onProfileModified(e);}},{key:"onRelationChainModified",value:function value(e){var t=e.dataList;if(!Kt(t)){var o=[];t.forEach(function(e){e.blackListDelAccount&&o.push.apply(o,M(e.blackListDelAccount));}),o.length>0&&this._blacklistHandler.onAccountDeleted(o);var n=[];t.forEach(function(e){e.blackListAddAccount&&n.push.apply(n,M(e.blackListAddAccount));}),n.length>0&&this._blacklistHandler.onAccountAdded(n);}}},{key:"onConversationsProfileUpdated",value:function value(e){this._profileHandler.onConversationsProfileUpdated(e);}},{key:"getMyAccount",value:function value(){return this.getMyUserID();}},{key:"getMyProfile",value:function value(){return this._profileHandler.getMyProfile();}},{key:"getStorageModule",value:function value(){return this.getModule(go);}},{key:"isMyFriend",value:function value(e){var t=this.getModule(co);return!!t&&t.isMyFriend(e);}},{key:"getUserProfile",value:function value(e){return this._profileHandler.getUserProfile(e);}},{key:"updateMyProfile",value:function value(e){return this._profileHandler.updateMyProfile(e);}},{key:"getNickAndAvatarByUserID",value:function value(e){return this._profileHandler.getNickAndAvatarByUserID(e);}},{key:"getLocalBlacklist",value:function value(){var e=this._blacklistHandler.getLocalBlacklist();return _s(e);}},{key:"addBlacklist",value:function value(e){return this._blacklistHandler.addBlacklist(e);}},{key:"deleteBlacklist",value:function value(e){return this._blacklistHandler.deleteBlacklist(e);}},{key:"onUserStatusUpdated",value:function value(e){this._userStatusHandler.onUserStatusUpdated(e);}},{key:"setSelfStatus",value:function value(e){return this._userStatusHandler.setSelfStatus(e);}},{key:"getUserStatus",value:function value(e){return this._userStatusHandler.getUserStatus(e);}},{key:"subscribeUserStatus",value:function value(e){return this._userStatusHandler.subscribeUserStatus(e);}},{key:"unsubscribeUserStatus",value:function value(e){return this._userStatusHandler.unsubscribeUserStatus(e);}},{key:"reset",value:function value(){be.log("".concat(this._className,".reset")),this._profileHandler.reset(),this._blacklistHandler.reset(),this._userStatusHandler.reset();}}]),o;}(Ro),ir=function(){function e(t,o){n(this,e),this._moduleManager=t,this._isLoggedIn=!1,this._SDKAppID=o.SDKAppID,this._userID=o.userID||"",this._userSig=o.userSig||"",this._version="2.22.1",this._a2Key="",this._tinyID="",this._customStatus="",this._contentType="json",this._unlimitedAVChatRoom=o.unlimitedAVChatRoom,this._scene=o.scene||"",this._oversea=o.oversea,this._instanceID=o.instanceID,this._statusInstanceID=0,this._isDevMode=o.devMode,this._proxyServer=o.proxyServer;}return s(e,[{key:"isLoggedIn",value:function value(){return this._isLoggedIn;}},{key:"isOversea",value:function value(){return this._oversea;}},{key:"isPrivateNetWork",value:function value(){return this._proxyServer;}},{key:"isDevMode",value:function value(){return this._isDevMode;}},{key:"isSingaporeSite",value:function value(){return this._SDKAppID>=2e7&&this._SDKAppID<3e7;}},{key:"isKoreaSite",value:function value(){return this._SDKAppID>=3e7&&this._SDKAppID<4e7;}},{key:"isGermanySite",value:function value(){return this._SDKAppID>=4e7&&this._SDKAppID<5e7;}},{key:"isIndiaSite",value:function value(){return this._SDKAppID>=5e7&&this._SDKAppID<6e7;}},{key:"isUnlimitedAVChatRoom",value:function value(){return this._unlimitedAVChatRoom;}},{key:"setUserID",value:function value(e){this._userID=e;}},{key:"getUserID",value:function value(){return this._userID;}},{key:"setUserSig",value:function value(e){this._userSig=e;}},{key:"getUserSig",value:function value(){return this._userSig;}},{key:"getSDKAppID",value:function value(){return this._SDKAppID;}},{key:"setTinyID",value:function value(e){this._tinyID=e,this._isLoggedIn=!0;}},{key:"getTinyID",value:function value(){return this._tinyID;}},{key:"setCustomStatus",value:function value(e){this._customStatus=e;}},{key:"getCustomStatus",value:function value(){return this._customStatus;}},{key:"getScene",value:function value(){return this._isTUIKit()?"tuikit":this._scene;}},{key:"getInstanceID",value:function value(){return this._instanceID;}},{key:"getStatusInstanceID",value:function value(){return this._statusInstanceID;}},{key:"setStatusInstanceID",value:function value(e){this._statusInstanceID=e;}},{key:"getVersion",value:function value(){return this._version;}},{key:"getA2Key",value:function value(){return this._a2Key;}},{key:"setA2Key",value:function value(e){this._a2Key=e;}},{key:"getContentType",value:function value(){return this._contentType;}},{key:"getProxyServer",value:function value(){return this._proxyServer;}},{key:"_isTUIKit",value:function value(){var e=!1,t=!1,o=!1,n=!1,a=[];te&&(a=Object.keys(ne)),oe&&(a=ee?Object.keys(uni):Object.keys(window));for(var s=0,r=a.length;s<r;s++){if(a[s].toLowerCase().includes("uikit")){e=!0;break;}}if(a=null,te&&ot(getApp)){var i=getApp().globalData;Xe(i)&&!0===i.isTUIKit&&(t=!0);}!0===this._moduleManager.getModule(go).getStorageSync("TIM_".concat(this._SDKAppID,"_isTUIKit"))&&(o=!0);var c=null;if($&&!J&&"undefined"==typeof uni&&__wxConfig&&(c=__wxConfig.pages),z&&"undefined"==typeof uni&&__qqConfig&&(c=__qqConfig.pages),Qe(c)&&c.length>0){for(var u=0,l=c.length;u<l;u++){if(c[u].toLowerCase().includes("tui")){n=!0;break;}}c=null;}return e||t||o||n;}},{key:"reset",value:function value(){this._isLoggedIn=!1,this._userSig="",this._a2Key="",this._tinyID="",this._customStatus="",this._statusInstanceID=0;}}]),e;}(),cr=function(e){i(o,e);var t=f(o);function o(e){var a;return n(this,o),(a=t.call(this,e))._className="SignModule",a._helloInterval=120,a._lastLoginTs=0,a._lastWsHelloTs=0,a._isWebUniapp=0,Is.mixin(g(a)),a;}return s(o,[{key:"onCheckTimer",value:function value(e){this.isLoggedIn()&&e%this._helloInterval==0&&this._hello();}},{key:"login",value:function value(e){if(this.isLoggedIn()){var t="您已经登录帐号".concat(e.userID,"!如需切换帐号登录,请先调用 logout 接口登出,再调用 login 接口登录。");return be.warn(t),_s({actionStatus:"OK",errorCode:0,errorInfo:t,repeatLogin:!0});}if(Date.now()-this._lastLoginTs<=15e3)return be.warn("您正在尝试登录帐号".concat(e.userID,"!请勿重复登录。")),gs({code:Ca.REPEAT_LOGIN,message:Sa.REPEAT_LOGIN});be.log("".concat(this._className,".login userID:").concat(e.userID));var o=this._checkLoginInfo(e);if(0!==o.code)return gs(o);var n=this.getModule(_o),a=e.userID,s=e.userSig;return n.setUserID(a),n.setUserSig(s),this.getModule(yo).updateProtocolConfig(),this._login();}},{key:"_login",value:function value(){var e=this,t=this.getModule(_o),o=t.getScene(),n=0,a=new Va(Ba.LOGIN);a.setMessage("".concat(o)).setMoreMessage("identifier:".concat(this.getMyUserID())),ee?"tuikit"===o?a.setUIPlatform(4):a.setUIPlatform(3):te?"tuikit"===o?a.setUIPlatform(12):a.setUIPlatform(11):oe&&(Ee?"tuikit"===o?a.setUIPlatform(17):a.setUIPlatform(16):"tuikit"===o?a.setUIPlatform(14):a.setUIPlatform(13));var s=this.getModule(Oo);if(s.canIUseOfflinePush()){this._isWebUniapp=s.getUniAppPlatform();var r=this._getStatusInstanceID();t.setStatusInstanceID(r),this.getModule(yo).updateProtocolConfig(),n=s.getDeviceBrand();}return this._lastLoginTs=Date.now(),this.request({protocolName:Lo,requestData:{deviceBrand:n,isWebUniapp:this._isWebUniapp}}).then(function(n){e._lastLoginTs=0;var s=Date.now(),r=null,i=n.data,c=i.a2Key,u=i.tinyID,l=i.helloInterval,d=i.instanceID,p=i.timeStamp,_=i.customStatus,g=void 0===_?"":_;be.log("".concat(e._className,".login ok. scene:").concat(o," helloInterval:").concat(l," instanceID:").concat(d," timeStamp:").concat(p));var h=1e3*p,f=s-a.getStartTs(),m=h+parseInt(f/2)-s,M=a.getStartTs()+m;if(a.start(M),function(e,t){Oe=t;var o=new Date();o.setTime(e),be.info("baseTime from server: ".concat(o," offset: ").concat(Oe));}(h,m),!u)throw r=new ls({code:Ca.NO_TINYID,message:Sa.NO_TINYID}),a.setError(r,!0,e.getNetworkType()).end(),r;if(!c)throw r=new ls({code:Ca.NO_A2KEY,message:Sa.NO_A2KEY}),a.setError(r,!0,e.getNetworkType()).end(),r;a.setNetworkType(e.getNetworkType()).setMoreMessage("helloInterval:".concat(l," instanceID:").concat(d," offset:").concat(m)).end(),t.setA2Key(c),t.setTinyID(u),t.setStatusInstanceID(d);var v=ar(g);t.setCustomStatus(v),e.getModule(yo).updateProtocolConfig(),e.emitInnerEvent(ms),e._helloInterval=l,e.triggerReady();var I=e.getModule(Oo);return I.canIUseOfflinePush()&&(uni.setStorageSync("timUniAppInstanceID",d),I.init()),e._fetchCloudControlConfig(),n;}).catch(function(t){return e.probeNetwork().then(function(e){var o=m(e,2),n=o[0],s=o[1];a.setError(t,n,s).end(!0);}),e._moduleManager.setNotReadyReason(Ca.LOGIN_FAILED),be.error("".concat(e._className,".login failed. error:"),t),e._lastLoginTs=0,e._moduleManager.onLoginFailed(),gs(t);});}},{key:"logout",value:function value(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(!this.isLoggedIn())return gs({code:Ca.USER_NOT_LOGGED_IN,message:Sa.USER_NOT_LOGGED_IN});var o=new Va(Ba.LOGOUT);return o.setNetworkType(this.getNetworkType()).setMessage("identifier:".concat(this.getMyUserID())).end(!0),be.info("".concat(this._className,".logout type:").concat(t)),0===t&&this._moduleManager.setNotReadyReason(Ca.LOGGED_OUT),this.request({protocolName:ko,requestData:{type:t}}).then(function(){return e.resetReady(),_s({});}).catch(function(t){return be.error("".concat(e._className,"._logout error:"),t),e.resetReady(),_s({});});}},{key:"_fetchCloudControlConfig",value:function value(){this.getModule(Co).fetchConfig();}},{key:"_getStatusInstanceID",value:function value(){return uni.getStorageSync("timUniAppInstanceID");}},{key:"_hello",value:function value(){var e=this;this._lastWsHelloTs=Date.now(),this.request({protocolName:Go,requestData:{isWebUniapp:this._isWebUniapp}}).catch(function(t){be.warn("".concat(e._className,"._hello error:"),t);});}},{key:"getLastWsHelloTs",value:function value(){return this._lastWsHelloTs;}},{key:"_checkLoginInfo",value:function value(e){var t=0,o="";return Kt(this.getModule(_o).getSDKAppID())?(t=Ca.NO_SDKAPPID,o=Sa.NO_SDKAPPID):Kt(e.userID)?(t=Ca.NO_IDENTIFIER,o=Sa.NO_IDENTIFIER):Kt(e.userSig)&&(t=Ca.NO_USERSIG,o=Sa.NO_USERSIG),{code:t,message:o};}},{key:"onMultipleAccountKickedOut",value:function value(e){var t=this;new Va(Ba.KICKED_OUT).setNetworkType(this.getNetworkType()).setMessage("type:".concat(D.KICKED_OUT_MULT_ACCOUNT," newInstanceInfo:").concat(JSON.stringify(e))).end(!0),be.warn("".concat(this._className,".onMultipleAccountKickedOut userID:").concat(this.getMyUserID()," newInstanceInfo:"),e),this.logout(1).then(function(){t.emitOuterEvent(S.KICKED_OUT,{type:D.KICKED_OUT_MULT_ACCOUNT}),t._moduleManager.setNotReadyReason(Ca.KICKED_OUT_MULT_ACCOUNT),t._moduleManager.reset();});}},{key:"onMultipleDeviceKickedOut",value:function value(e){var t=this;new Va(Ba.KICKED_OUT).setNetworkType(this.getNetworkType()).setMessage("type:".concat(D.KICKED_OUT_MULT_DEVICE," newInstanceInfo:").concat(JSON.stringify(e))).end(!0),be.warn("".concat(this._className,".onMultipleDeviceKickedOut userID:").concat(this.getMyUserID()," newInstanceInfo:"),e),this.logout(1).then(function(){t.emitOuterEvent(S.KICKED_OUT,{type:D.KICKED_OUT_MULT_DEVICE}),t._moduleManager.setNotReadyReason(Ca.KICKED_OUT_MULT_DEVICE),t._moduleManager.reset();});}},{key:"onUserSigExpired",value:function value(){new Va(Ba.KICKED_OUT).setNetworkType(this.getNetworkType()).setMessage(D.KICKED_OUT_USERSIG_EXPIRED).end(!0),be.warn("".concat(this._className,".onUserSigExpired: userSig 签名过期被踢下线")),0!==this.getModule(_o).getStatusInstanceID()&&(this.emitOuterEvent(S.KICKED_OUT,{type:D.KICKED_OUT_USERSIG_EXPIRED}),this._moduleManager.setNotReadyReason(Ca.KICKED_OUT_USERSIG_EXPIRED),this._moduleManager.reset());}},{key:"onRestApiKickedOut",value:function value(e){(new Va(Ba.KICKED_OUT).setNetworkType(this.getNetworkType()).setMessage("type:".concat(D.KICKED_OUT_REST_API," newInstanceInfo:").concat(JSON.stringify(e))).end(!0),be.warn("".concat(this._className,".onRestApiKickedOut userID:").concat(this.getMyUserID()," newInstanceInfo:"),e),0!==this.getModule(_o).getStatusInstanceID())&&(this.emitOuterEvent(S.KICKED_OUT,{type:D.KICKED_OUT_REST_API}),this._moduleManager.setNotReadyReason(Ca.KICKED_OUT_REST_API),this._moduleManager.reset(),this.getModule(To).onRestApiKickedOut());}},{key:"reset",value:function value(){be.log("".concat(this._className,".reset")),this.resetReady(),this._helloInterval=120,this._lastLoginTs=0,this._lastWsHelloTs=0,this._isWebUniapp=0;}}]),o;}(Ro);function ur(){return null;}var lr=function(){function e(t){n(this,e),this._moduleManager=t,this._className="StorageModule",this._storageQueue=new Map(),this._errorTolerantHandle();}return s(e,[{key:"_errorTolerantHandle",value:function value(){te||!Ze(window)&&!Ze(window.localStorage)||(this.getItem=ur,this.setItem=ur,this.removeItem=ur,this.clear=ur);}},{key:"onCheckTimer",value:function value(e){if(e%20==0){if(0===this._storageQueue.size)return;this._doFlush();}}},{key:"_doFlush",value:function value(){try{var e,t=C(this._storageQueue);try{for(t.s();!(e=t.n()).done;){var o=m(e.value,2),n=o[0],a=o[1];this._setStorageSync(this._getKey(n),a);}}catch(s){t.e(s);}finally{t.f();}this._storageQueue.clear();}catch(r){be.warn("".concat(this._className,"._doFlush error:"),r);}}},{key:"_getPrefix",value:function value(){var e=this._moduleManager.getModule(_o);return"TIM_".concat(e.getSDKAppID(),"_").concat(e.getUserID(),"_");}},{key:"_getKey",value:function value(e){return"".concat(this._getPrefix()).concat(e);}},{key:"getItem",value:function value(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];try{var o=t?this._getKey(e):e;return this.getStorageSync(o);}catch(n){return be.warn("".concat(this._className,".getItem error:"),n),{};}}},{key:"setItem",value:function value(e,t){var o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(o){var a=n?this._getKey(e):e;this._setStorageSync(a,t);}else this._storageQueue.set(e,t);}},{key:"clear",value:function value(){try{te?ne.clearStorageSync():localStorage&&localStorage.clear();}catch(e){be.warn("".concat(this._className,".clear error:"),e);}}},{key:"removeItem",value:function value(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];try{var o=t?this._getKey(e):e;this._removeStorageSync(o);}catch(n){be.warn("".concat(this._className,".removeItem error:"),n);}}},{key:"getSize",value:function value(e){var t=this,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"b";try{var n={size:0,limitSize:5242880,unit:o};if(Object.defineProperty(n,"leftSize",{enumerable:!0,get:function get(){return n.limitSize-n.size;}}),te&&(n.limitSize=1024*ne.getStorageInfoSync().limitSize),e)n.size=JSON.stringify(this.getItem(e)).length+this._getKey(e).length;else if(te){var a=ne.getStorageInfoSync(),s=a.keys;s.forEach(function(e){n.size+=JSON.stringify(t.getStorageSync(e)).length+t._getKey(e).length;});}else if(localStorage)for(var r in localStorage){localStorage.hasOwnProperty(r)&&(n.size+=localStorage.getItem(r).length+r.length);}return this._convertUnit(n);}catch(i){be.warn("".concat(this._className," error:"),i);}}},{key:"_convertUnit",value:function value(e){var t={},o=e.unit;for(var n in t.unit=o,e){"number"==typeof e[n]&&("kb"===o.toLowerCase()?t[n]=Math.round(e[n]/1024):"mb"===o.toLowerCase()?t[n]=Math.round(e[n]/1024/1024):t[n]=e[n]);}return t;}},{key:"_setStorageSync",value:function value(e,t){te?Q?my.setStorageSync({key:e,data:t}):ne.setStorageSync(e,t):localStorage&&localStorage.setItem(e,JSON.stringify(t));}},{key:"getStorageSync",value:function value(e){return te?Q?my.getStorageSync({key:e}).data:ne.getStorageSync(e):localStorage?JSON.parse(localStorage.getItem(e)):{};}},{key:"_removeStorageSync",value:function value(e){te?Q?my.removeStorageSync({key:e}):ne.removeStorageSync(e):localStorage&&localStorage.removeItem(e);}},{key:"reset",value:function value(){be.log("".concat(this._className,".reset")),this._doFlush();}}]),e;}(),dr=function(){function e(t){n(this,e),this._className="SSOLogBody",this._report=[];}return s(e,[{key:"pushIn",value:function value(e){be.debug("".concat(this._className,".pushIn"),this._report.length,e),this._report.push(e);}},{key:"backfill",value:function value(e){var t;Qe(e)&&0!==e.length&&(be.debug("".concat(this._className,".backfill"),this._report.length,e.length),(t=this._report).unshift.apply(t,M(e)));}},{key:"getLogsNumInMemory",value:function value(){return this._report.length;}},{key:"isEmpty",value:function value(){return 0===this._report.length;}},{key:"_reset",value:function value(){this._report.length=0,this._report=[];}},{key:"getLogsInMemory",value:function value(){var e=this._report.slice();return this._reset(),e;}}]),e;}(),pr=function pr(e){var t=e.getModule(_o);return{SDKType:10,SDKAppID:t.getSDKAppID(),SDKVersion:t.getVersion(),tinyID:Number(t.getTinyID()),userID:t.getUserID(),platform:e.getPlatform(),instanceID:t.getInstanceID(),traceID:Re()};},_r=function(e){i(a,e);var o=f(a);function a(e){var t;n(this,a),(t=o.call(this,e))._className="EventStatModule",t.TAG="im-ssolog-event",t._reportBody=new dr(),t.MIN_THRESHOLD=20,t.MAX_THRESHOLD=100,t.WAITING_TIME=6e4,t.REPORT_LEVEL=[4,5,6],t.REPORT_SDKAPPID_BLACKLIST=[],t.REPORT_TINYID_WHITELIST=[],t._lastReportTime=Date.now();var s=t.getInnerEmitterInstance();return s.on(ms,t._onLoginSuccess,g(t)),s.on(Ms,t._onCloudConfigUpdated,g(t)),t;}return s(a,[{key:"reportAtOnce",value:function value(){be.debug("".concat(this._className,".reportAtOnce")),this._report();}},{key:"_onLoginSuccess",value:function value(){var e=this,t=this.getModule(go),o=t.getItem(this.TAG,!1);!Kt(o)&&ot(o.forEach)&&(be.log("".concat(this._className,"._onLoginSuccess get ssolog in storage, count:").concat(o.length)),o.forEach(function(t){e._reportBody.pushIn(t);}),t.removeItem(this.TAG,!1));}},{key:"_onCloudConfigUpdated",value:function value(){var e=this.getCloudConfig("evt_rpt_threshold"),t=this.getCloudConfig("evt_rpt_waiting"),o=this.getCloudConfig("evt_rpt_level"),n=this.getCloudConfig("evt_rpt_sdkappid_bl"),a=this.getCloudConfig("evt_rpt_tinyid_wl");Ze(e)||(this.MIN_THRESHOLD=Number(e)),Ze(t)||(this.WAITING_TIME=Number(t)),Ze(o)||(this.REPORT_LEVEL=o.split(",").map(function(e){return Number(e);})),Ze(n)||(this.REPORT_SDKAPPID_BLACKLIST=n.split(",").map(function(e){return Number(e);})),Ze(a)||(this.REPORT_TINYID_WHITELIST=a.split(","));}},{key:"pushIn",value:function value(e){e instanceof Va&&(e.updateTimeStamp(),this._reportBody.pushIn(e),this._reportBody.getLogsNumInMemory()>=this.MIN_THRESHOLD&&this._report());}},{key:"onCheckTimer",value:function value(){Date.now()<this._lastReportTime+this.WAITING_TIME||this._reportBody.isEmpty()||this._report();}},{key:"_filterLogs",value:function value(e){var t=this,o=this.getModule(_o),n=o.getSDKAppID(),a=o.getTinyID();return Ut(this.REPORT_SDKAPPID_BLACKLIST,n)&&!bt(this.REPORT_TINYID_WHITELIST,a)?[]:e.filter(function(e){return t.REPORT_LEVEL.includes(e.level);});}},{key:"_report",value:function value(){var e=this;if(!this._reportBody.isEmpty()){var o=this._reportBody.getLogsInMemory(),n=this._filterLogs(o);if(0!==n.length){var a={header:pr(this),event:n};this.request({protocolName:ea,requestData:t({},a)}).then(function(){e._lastReportTime=Date.now();}).catch(function(t){be.warn("".concat(e._className,".report failed. networkType:").concat(e.getNetworkType()," error:"),t),e._reportBody.backfill(o),e._reportBody.getLogsNumInMemory()>e.MAX_THRESHOLD&&e._flushAtOnce();});}else this._lastReportTime=Date.now();}}},{key:"_flushAtOnce",value:function value(){var e=this.getModule(go),t=e.getItem(this.TAG,!1),o=this._reportBody.getLogsInMemory();if(Kt(t))be.log("".concat(this._className,"._flushAtOnce count:").concat(o.length)),e.setItem(this.TAG,o,!0,!1);else{var n=o.concat(t);n.length>this.MAX_THRESHOLD&&(n=n.slice(0,this.MAX_THRESHOLD)),be.log("".concat(this._className,"._flushAtOnce count:").concat(n.length)),e.setItem(this.TAG,n,!0,!1);}}},{key:"reset",value:function value(){be.log("".concat(this._className,".reset")),this._lastReportTime=0,this._report(),this.REPORT_SDKAPPID_BLACKLIST=[],this.REPORT_TINYID_WHITELIST=[];}}]),a;}(Ro),gr="none",hr="online",fr=[Ca.OVER_FREQUENCY_LIMIT,Ca.OPEN_SERVICE_OVERLOAD_ERROR],mr=function(){function e(t){n(this,e),this._moduleManager=t,this._networkType="",this._className="NetMonitorModule",this.MAX_WAIT_TIME=3e3,this._mpNetworkStatusCallback=null,this._webOnlineCallback=null,this._webOfflineCallback=null;}return s(e,[{key:"start",value:function value(){var e=this;te?(ne.getNetworkType({success:function success(t){e._networkType=t.networkType,t.networkType===gr?be.warn("".concat(e._className,".start no network, please check!")):be.info("".concat(e._className,".start networkType:").concat(t.networkType));}}),this._mpNetworkStatusCallback=this._onNetworkStatusChange.bind(this),ne.onNetworkStatusChange(this._mpNetworkStatusCallback)):(this._networkType=hr,this._webOnlineCallback=this._onWebOnline.bind(this),this._webOfflineCallback=this._onWebOffline.bind(this),window&&(window.addEventListener("online",this._webOnlineCallback),window.addEventListener("offline",this._webOfflineCallback)));}},{key:"_onWebOnline",value:function value(){this._onNetworkStatusChange({isConnected:!0,networkType:hr});}},{key:"_onWebOffline",value:function value(){this._onNetworkStatusChange({isConnected:!1,networkType:gr});}},{key:"_onNetworkStatusChange",value:function value(e){var t=e.isConnected,o=e.networkType,n=!1;t?(be.info("".concat(this._className,"._onNetworkStatusChange previousNetworkType:").concat(this._networkType," currentNetworkType:").concat(o)),this._networkType!==o&&(n=!0,this._moduleManager.getModule(To).reConnect(!0))):this._networkType!==o&&(n=!0,be.warn("".concat(this._className,"._onNetworkStatusChange no network, please check!")),this._moduleManager.getModule(To).offline());n&&(new Va(Ba.NETWORK_CHANGE).setMessage("isConnected:".concat(t," previousNetworkType:").concat(this._networkType," networkType:").concat(o)).end(),this._networkType=o);}},{key:"probe",value:function value(e){var t=this;return!Ze(e)&&fr.includes(e.code)?Promise.resolve([!0,this._networkType]):new Promise(function(e,o){te?ne.getNetworkType({success:function success(o){t._networkType=o.networkType,o.networkType===gr?(be.warn("".concat(t._className,".probe no network, please check!")),e([!1,o.networkType])):(be.info("".concat(t._className,".probe networkType:").concat(o.networkType)),e([!0,o.networkType]));}}):t._networkType===gr?e([!1,gr]):e([!0,hr]);});}},{key:"getNetworkType",value:function value(){return this._networkType;}},{key:"reset",value:function value(){be.log("".concat(this._className,".reset")),te?null!==this._mpNetworkStatusCallback&&(ne.offNetworkStatusChange&&(Z||J?ne.offNetworkStatusChange(this._mpNetworkStatusCallback):ne.offNetworkStatusChange()),this._mpNetworkStatusCallback=null):window&&(null!==this._webOnlineCallback&&(window.removeEventListener("online",this._webOnlineCallback),this._webOnlineCallback=null),null!==this._onWebOffline&&(window.removeEventListener("offline",this._webOfflineCallback),this._webOfflineCallback=null));}}]),e;}(),Mr=O(function(e){var t=Object.prototype.hasOwnProperty,o="~";function n(){}function a(e,t,o){this.fn=e,this.context=t,this.once=o||!1;}function s(e,t,n,s,r){if("function"!=typeof n)throw new TypeError("The listener must be a function");var i=new a(n,s||e,r),c=o?o+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],i]:e._events[c].push(i):(e._events[c]=i,e._eventsCount++),e;}function r(e,t){0==--e._eventsCount?e._events=new n():delete e._events[t];}function i(){this._events=new n(),this._eventsCount=0;}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(o=!1)),i.prototype.eventNames=function(){var e,n,a=[];if(0===this._eventsCount)return a;for(n in e=this._events){t.call(e,n)&&a.push(o?n.slice(1):n);}return Object.getOwnPropertySymbols?a.concat(Object.getOwnPropertySymbols(e)):a;},i.prototype.listeners=function(e){var t=o?o+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var a=0,s=n.length,r=new Array(s);a<s;a++){r[a]=n[a].fn;}return r;},i.prototype.listenerCount=function(e){var t=o?o+e:e,n=this._events[t];return n?n.fn?1:n.length:0;},i.prototype.emit=function(e,t,n,a,s,r){var i=o?o+e:e;if(!this._events[i])return!1;var c,u,l=this._events[i],d=arguments.length;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),d){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,t),!0;case 3:return l.fn.call(l.context,t,n),!0;case 4:return l.fn.call(l.context,t,n,a),!0;case 5:return l.fn.call(l.context,t,n,a,s),!0;case 6:return l.fn.call(l.context,t,n,a,s,r),!0;}for(u=1,c=new Array(d-1);u<d;u++){c[u-1]=arguments[u];}l.fn.apply(l.context,c);}else{var p,_=l.length;for(u=0;u<_;u++){switch(l[u].once&&this.removeListener(e,l[u].fn,void 0,!0),d){case 1:l[u].fn.call(l[u].context);break;case 2:l[u].fn.call(l[u].context,t);break;case 3:l[u].fn.call(l[u].context,t,n);break;case 4:l[u].fn.call(l[u].context,t,n,a);break;default:if(!c)for(p=1,c=new Array(d-1);p<d;p++){c[p-1]=arguments[p];}l[u].fn.apply(l[u].context,c);}}}return!0;},i.prototype.on=function(e,t,o){return s(this,e,t,o,!1);},i.prototype.once=function(e,t,o){return s(this,e,t,o,!0);},i.prototype.removeListener=function(e,t,n,a){var s=o?o+e:e;if(!this._events[s])return this;if(!t)return r(this,s),this;var i=this._events[s];if(i.fn)i.fn!==t||a&&!i.once||n&&i.context!==n||r(this,s);else{for(var c=0,u=[],l=i.length;c<l;c++){(i[c].fn!==t||a&&!i[c].once||n&&i[c].context!==n)&&u.push(i[c]);}u.length?this._events[s]=1===u.length?u[0]:u:r(this,s);}return this;},i.prototype.removeAllListeners=function(e){var t;return e?(t=o?o+e:e,this._events[t]&&r(this,t)):(this._events=new n(),this._eventsCount=0),this;},i.prototype.off=i.prototype.removeListener,i.prototype.addListener=i.prototype.on,i.prefixed=o,i.EventEmitter=i,e.exports=i;}),vr=function(e){i(o,e);var t=f(o);function o(e){var a;return n(this,o),(a=t.call(this,e))._className="BigDataChannelModule",a.FILETYPE={SOUND:2106,FILE:2107,VIDEO:2113},a._bdh_download_server="grouptalk.c2c.qq.com",a._BDHBizID=10001,a._authKey="",a._expireTime=0,a.getInnerEmitterInstance().on(ms,a._getAuthKey,g(a)),a;}return s(o,[{key:"_getAuthKey",value:function value(){var e=this;this.request({protocolName:bo}).then(function(t){t.data.authKey&&(e._authKey=t.data.authKey,e._expireTime=parseInt(t.data.expireTime));});}},{key:"_isFromOlderVersion",value:function value(e){return!(!e.content||2===e.content.downloadFlag);}},{key:"parseElements",value:function value(e,t){if(!Qe(e)||!t)return[];for(var o=[],n=null,a=0;a<e.length;a++){n=e[a],this._needParse(n)?o.push(this._parseElement(n,t)):o.push(e[a]);}return o;}},{key:"_needParse",value:function value(e){return!e.cloudCustomData&&!(!this._isFromOlderVersion(e)||e.type!==D.MSG_AUDIO&&e.type!==D.MSG_FILE&&e.type!==D.MSG_VIDEO);}},{key:"_parseElement",value:function value(e,t){switch(e.type){case D.MSG_AUDIO:return this._parseAudioElement(e,t);case D.MSG_FILE:return this._parseFileElement(e,t);case D.MSG_VIDEO:return this._parseVideoElement(e,t);}}},{key:"_parseAudioElement",value:function value(e,t){return e.content.url=this._genAudioUrl(e.content.uuid,t),e;}},{key:"_parseFileElement",value:function value(e,t){return e.content.url=this._genFileUrl(e.content.uuid,t,e.content.fileName),e;}},{key:"_parseVideoElement",value:function value(e,t){return e.content.url=this._genVideoUrl(e.content.uuid,t),e;}},{key:"_genAudioUrl",value:function value(e,t){if(""===this._authKey)return be.warn("".concat(this._className,"._genAudioUrl no authKey!")),"";var o=this.getModule(_o).getSDKAppID();return"https://".concat(this._bdh_download_server,"/asn.com/stddownload_common_file?authkey=").concat(this._authKey,"&bid=").concat(this._BDHBizID,"&subbid=").concat(o,"&fileid=").concat(e,"&filetype=").concat(this.FILETYPE.SOUND,"&openid=").concat(t,"&ver=0");}},{key:"_genFileUrl",value:function value(e,t,o){if(""===this._authKey)return be.warn("".concat(this._className,"._genFileUrl no authKey!")),"";o||(o="".concat(Math.floor(1e5*Math.random()),"-").concat(Date.now()));var n=this.getModule(_o).getSDKAppID();return"https://".concat(this._bdh_download_server,"/asn.com/stddownload_common_file?authkey=").concat(this._authKey,"&bid=").concat(this._BDHBizID,"&subbid=").concat(n,"&fileid=").concat(e,"&filetype=").concat(this.FILETYPE.FILE,"&openid=").concat(t,"&ver=0&filename=").concat(encodeURIComponent(o));}},{key:"_genVideoUrl",value:function value(e,t){if(""===this._authKey)return be.warn("".concat(this._className,"._genVideoUrl no authKey!")),"";var o=this.getModule(_o).getSDKAppID();return"https://".concat(this._bdh_download_server,"/asn.com/stddownload_common_file?authkey=").concat(this._authKey,"&bid=").concat(this._BDHBizID,"&subbid=").concat(o,"&fileid=").concat(e,"&filetype=").concat(this.FILETYPE.VIDEO,"&openid=").concat(t,"&ver=0");}},{key:"reset",value:function value(){be.log("".concat(this._className,".reset")),this._authKey="",this.expireTime=0;}}]),o;}(Ro),Ir=["requestSnapshotUrl"],yr=function(e){i(a,e);var o=f(a);function a(e){var t;return n(this,a),(t=o.call(this,e))._className="UploadModule",t.TIMUploadPlugin=null,t.timUploadPlugin=null,t.COSSDK=null,t._cosUploadMethod=null,t.expiredTimeLimit=600,t.appid=0,t.bucketName="",t.ciUrl="",t.directory="",t.downloadUrl="",t.uploadUrl="",t.region="ap-shanghai",t.cos=null,t.cosOptions={secretId:"",secretKey:"",sessionToken:"",expiredTime:0},t.uploadFileType="",t.duration=900,t.tryCount=0,t.getInnerEmitterInstance().on(ms,t._init,g(t)),t;}return s(a,[{key:"_init",value:function value(){var e="".concat(this._className,"._init"),t=this.getModule(vo);if(this.TIMUploadPlugin=t.getPlugin("tim-upload-plugin"),this.TIMUploadPlugin)this._initUploaderMethod();else{var o=te?"cos-wx-sdk":"cos-js-sdk";this.COSSDK=t.getPlugin(o),this.COSSDK?(this._getAuthorizationKey(),be.warn("".concat(e," v2.9.2起推荐使用 tim-upload-plugin 代替 ").concat(o,",上传更快更安全。详细请参考 https://web.sdk.qcloud.com/im/doc/zh-cn/SDK.html#registerPlugin"))):be.warn("".concat(e," 没有检测到上传插件,将无法发送图片、音频、视频、文件等类型的消息。详细请参考 https://web.sdk.qcloud.com/im/doc/zh-cn/SDK.html#registerPlugin"));}}},{key:"_getAuthorizationKey",value:function value(){var e=this,t=new Va(Ba.GET_COS_AUTH_KEY),o=Math.ceil(Date.now()/1e3);this.request({protocolName:Xn,requestData:{duration:this.expiredTimeLimit}}).then(function(n){var a=n.data;be.log("".concat(e._className,"._getAuthorizationKey ok. data:"),a);var s=a.expiredTime-o;t.setMessage("requestId:".concat(a.requestId," requestTime:").concat(o," expiredTime:").concat(a.expiredTime," diff:").concat(s,"s")).setNetworkType(e.getNetworkType()).end(),!te&&a.region&&(e.region=a.region),e.appid=a.appid,e.bucketName=a.bucketName,e.ciUrl=a.ciUrl,e.directory=a.directory,e.downloadUrl=a.downloadUrl,e.uploadUrl=a.uploadUrl,e.cosOptions={secretId:a.secretId,secretKey:a.secretKey,sessionToken:a.sessionToken,expiredTime:a.expiredTime},be.log("".concat(e._className,"._getAuthorizationKey ok. region:").concat(e.region," bucketName:").concat(e.bucketName)),e._initUploaderMethod();}).catch(function(o){e.probeNetwork().then(function(e){var n=m(e,2),a=n[0],s=n[1];t.setError(o,a,s).end();}),be.warn("".concat(e._className,"._getAuthorizationKey failed. error:"),o);});}},{key:"_getCosPreSigUrl",value:function value(e){var t=this,o="".concat(this._className,"._getCosPreSigUrl"),n=Math.ceil(Date.now()/1e3),a=new Va(Ba.GET_COS_PRE_SIG_URL);return this.request({protocolName:Qn,requestData:{fileType:e.fileType,fileName:e.fileName,uploadMethod:e.uploadMethod,duration:e.duration}}).then(function(e){t.tryCount=0;var s=e.data||{},r=s.expiredTime-n;return be.log("".concat(o," ok. data:"),s),a.setMessage("requestId:".concat(s.requestId," expiredTime:").concat(s.expiredTime," diff:").concat(r,"s")).setNetworkType(t.getNetworkType()).end(),s;}).catch(function(n){return-1===n.code&&(n.code=Ca.COS_GET_SIG_FAIL),t.probeNetwork().then(function(e){var t=m(e,2),o=t[0],s=t[1];a.setError(n,o,s).end();}),be.warn("".concat(o," failed. error:"),n),t.tryCount<1?(t.tryCount++,t._getCosPreSigUrl(e)):(t.tryCount=0,gs({code:Ca.COS_GET_SIG_FAIL,message:Sa.COS_GET_SIG_FAIL}));});}},{key:"_initUploaderMethod",value:function value(){var e=this;if(this.TIMUploadPlugin)return this.timUploadPlugin=new this.TIMUploadPlugin(),void(this._cosUploadMethod=function(t,o){e.timUploadPlugin.uploadFile(t,o);});this.appid&&(this.cos=te?new this.COSSDK({ForcePathStyle:!0,getAuthorization:this._getAuthorization.bind(this)}):new this.COSSDK({getAuthorization:this._getAuthorization.bind(this)}),this._cosUploadMethod=te?function(t,o){e.cos.postObject(t,o);}:function(t,o){e.cos.uploadFiles(t,o);});}},{key:"onCheckTimer",value:function value(e){this.COSSDK&&(this.TIMUploadPlugin||this.isLoggedIn()&&e%60==0&&Math.ceil(Date.now()/1e3)>=this.cosOptions.expiredTime-120&&this._getAuthorizationKey());}},{key:"_getAuthorization",value:function value(e,t){t({TmpSecretId:this.cosOptions.secretId,TmpSecretKey:this.cosOptions.secretKey,XCosSecurityToken:this.cosOptions.sessionToken,ExpiredTime:this.cosOptions.expiredTime});}},{key:"upload",value:function value(e){if(!0===e.getRelayFlag())return Promise.resolve();var t=this.getModule(No);switch(e.type){case D.MSG_IMAGE:return t.addTotalCount(ka),this._uploadImage(e);case D.MSG_FILE:return t.addTotalCount(ka),this._uploadFile(e);case D.MSG_AUDIO:return t.addTotalCount(ka),this._uploadAudio(e);case D.MSG_VIDEO:return t.addTotalCount(ka),this._uploadVideo(e);default:return Promise.resolve();}}},{key:"_uploadImage",value:function value(e){var o=this,n=this.getModule(ao),a=e.getElements()[0],s=n.getMessageOption(e.clientSequence);return this.doUploadImage({file:s.payload.file,to:s.to,onProgress:function onProgress(e){if(a.updatePercent(e),ot(s.onProgress))try{s.onProgress(e);}catch(t){return gs({code:Ca.MESSAGE_ONPROGRESS_FUNCTION_ERROR,message:Sa.MESSAGE_ONPROGRESS_FUNCTION_ERROR});}}}).then(function(n){var s=n.location,r=n.fileType,i=n.fileSize,c=n.width,u=n.height,l=o.isPrivateNetWork()?s:ft(s);a.updateImageFormat(r);var d=Lt({originUrl:l,originWidth:c,originHeight:u,min:198}),p=Lt({originUrl:l,originWidth:c,originHeight:u,min:720});return a.updateImageInfoArray([{size:i,url:l,width:c,height:u},t({},p),t({},d)]),e;});}},{key:"_uploadFile",value:function value(e){var t=this,o=this.getModule(ao),n=e.getElements()[0],a=o.getMessageOption(e.clientSequence);return this.doUploadFile({file:a.payload.file,to:a.to,onProgress:function onProgress(e){if(n.updatePercent(e),ot(a.onProgress))try{a.onProgress(e);}catch(t){return gs({code:Ca.MESSAGE_ONPROGRESS_FUNCTION_ERROR,message:Sa.MESSAGE_ONPROGRESS_FUNCTION_ERROR});}}}).then(function(o){var a=o.location,s=t.isPrivateNetWork()?a:ft(a);return n.updateFileUrl(s),e;});}},{key:"_uploadAudio",value:function value(e){var t=this,o=this.getModule(ao),n=e.getElements()[0],a=o.getMessageOption(e.clientSequence);return this.doUploadAudio({file:a.payload.file,to:a.to,onProgress:function onProgress(e){if(n.updatePercent(e),ot(a.onProgress))try{a.onProgress(e);}catch(t){return gs({code:Ca.MESSAGE_ONPROGRESS_FUNCTION_ERROR,message:Sa.MESSAGE_ONPROGRESS_FUNCTION_ERROR});}}}).then(function(o){var a=o.location,s=t.isPrivateNetWork()?a:ft(a);return n.updateAudioUrl(s),e;});}},{key:"_uploadVideo",value:function value(e){var t=this,o=this.getModule(ao),n=e.getElements()[0],a=o.getMessageOption(e.clientSequence);return this.doUploadVideo({file:a.payload.file,to:a.to,onProgress:function onProgress(e){if(n.updatePercent(e),ot(a.onProgress))try{a.onProgress(e);}catch(t){return gs({code:Ca.MESSAGE_ONPROGRESS_FUNCTION_ERROR,message:Sa.MESSAGE_ONPROGRESS_FUNCTION_ERROR});}}}).then(function(o){var a=o.location,s=o.snapshotInfo,r=t.isPrivateNetWork()?a:ft(a);return n.updateVideoUrl(r),Kt(s)||n.updateSnapshotInfo(s),e;});}},{key:"doUploadImage",value:function value(e){var t=this;if(!e.file)return gs({code:Ca.MESSAGE_IMAGE_SELECT_FILE_FIRST,message:Sa.MESSAGE_IMAGE_SELECT_FILE_FIRST});var o=this._checkImageType(e.file);if(!0!==o)return o;var n=this._checkImageSize(e.file);if(!0!==n)return n;var a=null;return this._setUploadFileType(Es),this.uploadByCOS(e).then(function(e){return a=e,t.isPrivateNetWork()?Nt(e.location):Nt("https://".concat(e.location));}).then(function(e){return a.width=e.width,a.height=e.height,Promise.resolve(a);});}},{key:"_checkImageType",value:function value(e){var t="";return t=te?e.url.slice(e.url.lastIndexOf(".")+1):e.files[0].name.slice(e.files[0].name.lastIndexOf(".")+1),ys.indexOf(t.toLowerCase())>=0||gs({code:Ca.MESSAGE_IMAGE_TYPES_LIMIT,message:Sa.MESSAGE_IMAGE_TYPES_LIMIT});}},{key:"_checkImageSize",value:function value(e){var t=0;return 0===(t=te?e.size:e.files[0].size)?gs({code:Ca.MESSAGE_FILE_IS_EMPTY,message:"".concat(Sa.MESSAGE_FILE_IS_EMPTY)}):t<20971520||gs({code:Ca.MESSAGE_IMAGE_SIZE_LIMIT,message:"".concat(Sa.MESSAGE_IMAGE_SIZE_LIMIT)});}},{key:"doUploadFile",value:function value(e){var t=null;return e.file?e.file.files[0].size>104857600?gs(t={code:Ca.MESSAGE_FILE_SIZE_LIMIT,message:Sa.MESSAGE_FILE_SIZE_LIMIT}):0===e.file.files[0].size?(t={code:Ca.MESSAGE_FILE_IS_EMPTY,message:"".concat(Sa.MESSAGE_FILE_IS_EMPTY)},gs(t)):(this._setUploadFileType(Ds),this.uploadByCOS(e)):gs(t={code:Ca.MESSAGE_FILE_SELECT_FILE_FIRST,message:Sa.MESSAGE_FILE_SELECT_FILE_FIRST});}},{key:"doUploadVideo",value:function value(e){return e.file.videoFile.size>104857600?gs({code:Ca.MESSAGE_VIDEO_SIZE_LIMIT,message:"".concat(Sa.MESSAGE_VIDEO_SIZE_LIMIT)}):0===e.file.videoFile.size?gs({code:Ca.MESSAGE_FILE_IS_EMPTY,message:"".concat(Sa.MESSAGE_FILE_IS_EMPTY)}):-1===Ts.indexOf(e.file.videoFile.type)?gs({code:Ca.MESSAGE_VIDEO_TYPES_LIMIT,message:"".concat(Sa.MESSAGE_VIDEO_TYPES_LIMIT)}):(this._setUploadFileType(Cs),te?this.handleVideoUpload({file:e.file.videoFile,onProgress:e.onProgress}):oe?this.handleVideoUpload(e):void 0);}},{key:"handleVideoUpload",value:function value(e){var t=this;return new Promise(function(o,n){t.uploadByCOS(e).then(function(e){o(e);}).catch(function(){t.uploadByCOS(e).then(function(e){o(e);}).catch(function(){n(new ls({code:Ca.MESSAGE_VIDEO_UPLOAD_FAIL,message:Sa.MESSAGE_VIDEO_UPLOAD_FAIL}));});});});}},{key:"doUploadAudio",value:function value(e){return e.file?e.file.size>20971520?gs(new ls({code:Ca.MESSAGE_AUDIO_SIZE_LIMIT,message:"".concat(Sa.MESSAGE_AUDIO_SIZE_LIMIT)})):0===e.file.size?gs(new ls({code:Ca.MESSAGE_FILE_IS_EMPTY,message:"".concat(Sa.MESSAGE_FILE_IS_EMPTY)})):(this._setUploadFileType(Ss),this.uploadByCOS(e)):gs(new ls({code:Ca.MESSAGE_AUDIO_UPLOAD_FAIL,message:Sa.MESSAGE_AUDIO_UPLOAD_FAIL}));}},{key:"uploadByCOS",value:function value(e){var t=this,o="".concat(this._className,".uploadByCOS");if(!ot(this._cosUploadMethod))return be.warn("".concat(o," 没有检测到上传插件,将无法发送图片、音频、视频、文件等类型的消息。详细请参考 https://web.sdk.qcloud.com/im/doc/zh-cn/SDK.html#registerPlugin")),gs({code:Ca.COS_UNDETECTED,message:Sa.COS_UNDETECTED});if(this.timUploadPlugin)return this._uploadWithPreSigUrl(e);var n=new Va(Ba.UPLOAD),a=Date.now(),s=this._getFile(e);return new Promise(function(r,i){var c=te?t._createCosOptionsWXMiniApp(e):t._createCosOptionsWeb(e),u=t;t._cosUploadMethod(c,function(e,c){var l=Object.create(null);if(c){if(e||Qe(c.files)&&c.files[0].error){var d=new ls({code:Ca.MESSAGE_FILE_UPLOAD_FAIL,message:Sa.MESSAGE_FILE_UPLOAD_FAIL});return n.setError(d,!0,t.getNetworkType()).end(),be.log("".concat(o," failed. error:"),c.files[0].error),403===c.files[0].error.statusCode&&(be.warn("".concat(o," failed. cos AccessKeyId was invalid, regain auth key!")),t._getAuthorizationKey()),void i(d);}l.fileName=s.name,l.fileSize=s.size,l.fileType=s.type.slice(s.type.indexOf("/")+1).toLowerCase(),l.location=te?c.Location:c.files[0].data.Location;var p=Date.now()-a,_=u._formatFileSize(s.size),g=u._formatSpeed(1e3*s.size/p),h="size:".concat(_," time:").concat(p,"ms speed:").concat(g);be.log("".concat(o," success. name:").concat(s.name," ").concat(h)),r(l);var f=t.getModule(No);return f.addCost(ka,p),f.addFileSize(ka,s.size),void n.setNetworkType(t.getNetworkType()).setMessage(h).end();}var m=new ls({code:Ca.MESSAGE_FILE_UPLOAD_FAIL,message:Sa.MESSAGE_FILE_UPLOAD_FAIL});n.setError(m,!0,u.getNetworkType()).end(),be.warn("".concat(o," failed. error:"),e),403===e.statusCode&&(be.warn("".concat(o," failed. cos AccessKeyId was invalid, regain auth key!")),t._getAuthorizationKey()),i(m);});});}},{key:"_uploadWithPreSigUrl",value:function value(e){var t=this,o="".concat(this._className,"._uploadWithPreSigUrl"),n=this._getFile(e);return this._createCosOptionsPreSigUrl(e).then(function(e){return new Promise(function(a,s){var r=new Va(Ba.UPLOAD),i=e.requestSnapshotUrl,c=void 0===i?void 0:i,u=_(e,Ir),l=Date.now();t._cosUploadMethod(u,function(e,i){var u=Object.create(null);if(e||403===i.statusCode)return r.setError(new ls(e),!0,t.getNetworkType()).end(),be.log("".concat(o," failed, error:"),e),void s(new ls({code:Ca.MESSAGE_FILE_UPLOAD_FAIL,message:Sa.MESSAGE_FILE_UPLOAD_FAIL}));var d=i.data.location||"";t.isPrivateNetWork()||0!==d.indexOf("https://")&&0!==d.indexOf("http://")||(d=d.split("//")[1]),u.fileName=n.name,u.fileSize=n.size,u.fileType=n.type.slice(n.type.indexOf("/")+1).toLowerCase(),u.location=d;var p=Date.now()-l,_=t._formatFileSize(n.size),g=t._formatSpeed(1e3*n.size/p),h="size:".concat(_,",time:").concat(p,"ms,speed:").concat(g," res:").concat(JSON.stringify(i.data));be.log("".concat(o," success name:").concat(n.name,",").concat(h)),r.setNetworkType(t.getNetworkType()).setMessage(h).end();var f=t.getModule(No);if(f.addCost(ka,p),f.addFileSize(ka,n.size),!Kt(c))return t._getSnapshotInfoByUrl(c).then(function(e){u.snapshotInfo=e,a(u);});a(u);});});});}},{key:"_getFile",value:function value(e){var t;return Qe(e.file.files)||(t=e.file.files,"filelist"===at(t))?e.file.files[0]:e.file;}},{key:"_formatFileSize",value:function value(e){return e<1024?e+"B":e<1048576?Math.floor(e/1024)+"KB":Math.floor(e/1048576)+"MB";}},{key:"_formatSpeed",value:function value(e){return e<=1048576?Pt(e/1024,1)+"KB/s":Pt(e/1048576,1)+"MB/s";}},{key:"_createCosOptionsWeb",value:function value(e){var t=this._getFile(e),o=t.name,n=o.slice(o.lastIndexOf(".")),a=this._genFileName("".concat(dt(999999)).concat(n));return{files:[{Bucket:"".concat(this.bucketName,"-").concat(this.appid),Region:this.region,Key:"".concat(this.directory,"/").concat(a),Body:t}],SliceSize:1048576,onProgress:function onProgress(t){if("function"==typeof e.onProgress)try{e.onProgress(t.percent);}catch(o){be.warn("onProgress callback error:",o);}},onFileFinish:function onFileFinish(e,t,o){}};}},{key:"_createCosOptionsWXMiniApp",value:function value(e){var t=this._getFile(e),o=this._genFileName(t.name),n=t.url;return{Bucket:"".concat(this.bucketName,"-").concat(this.appid),Region:this.region,Key:"".concat(this.directory,"/").concat(o),FilePath:n,onProgress:function onProgress(t){if(be.log(JSON.stringify(t)),"function"==typeof e.onProgress)try{e.onProgress(t.percent);}catch(o){be.warn("onProgress callback error:",o);}}};}},{key:"_createCosOptionsPreSigUrl",value:function value(e){var t=this,o="",n="",a=0,s=this._getFile(e);if(te)o=this._genFileName(s.name),n=s.url,a=1;else{var r=s.name,i=r.slice(r.lastIndexOf("."));o=this._genFileName("".concat(dt(999999)).concat(i)),n=s,a=0;}return this._getCosPreSigUrl({fileType:this.uploadFileType,fileName:o,uploadMethod:a,duration:this.duration}).then(function(a){var s=a.uploadUrl,r=a.downloadUrl,i=a.requestSnapshotUrl,c=void 0===i?void 0:i;return{url:s,fileType:t.uploadFileType,fileName:o,resources:n,downloadUrl:r,requestSnapshotUrl:c,onProgress:function onProgress(t){if("function"==typeof e.onProgress)try{e.onProgress(t.percent);}catch(o){be.warn("onProgress callback error:",o),be.error(o);}}};});}},{key:"_genFileName",value:function value(e){return"".concat(At(),"-").concat(e);}},{key:"_setUploadFileType",value:function value(e){this.uploadFileType=e;}},{key:"_getSnapshotInfoByUrl",value:function value(e){var t=this,o=new Va(Ba.GET_SNAPSHOT_INFO);return this.request({protocolName:Zn,requestData:{platform:this.getPlatform(),coverName:this._genFileName(dt(99999)),requestSnapshotUrl:e}}).then(function(e){var t=(e.data||{}).snapshotUrl;return o.setMessage("snapshotUrl:".concat(t)).end(),Kt(t)?{}:Nt(t).then(function(e){return{snapshotUrl:t,snapshotWidth:e.width,snapshotHeight:e.height};});}).catch(function(e){return be.warn("".concat(t._className,"._getSnapshotInfoByUrl failed. error:"),e),o.setCode(e.errorCode).setMessage(e.errorInfo).end(),{};});}},{key:"reset",value:function value(){be.log("".concat(this._className,".reset"));}}]),a;}(Ro),Tr=["downloadKey","pbDownloadKey","messageList"],Er=function(){function e(t){n(this,e),this._className="MergerMessageHandler",this._messageModule=t;}return s(e,[{key:"uploadMergerMessage",value:function value(e,t){var o=this;be.debug("".concat(this._className,".uploadMergerMessage message:"),e,"messageBytes:".concat(t));var n=e.payload.messageList,a=n.length,s=new Va(Ba.UPLOAD_MERGER_MESSAGE);return this._messageModule.request({protocolName:ra,requestData:{messageList:n}}).then(function(e){be.debug("".concat(o._className,".uploadMergerMessage ok. response:"),e.data);var n=e.data,r=n.pbDownloadKey,i=n.downloadKey,c={pbDownloadKey:r,downloadKey:i,messageNumber:a};return s.setNetworkType(o._messageModule.getNetworkType()).setMessage("".concat(a,"-").concat(t,"-").concat(i)).end(),c;}).catch(function(e){throw be.warn("".concat(o._className,".uploadMergerMessage failed. error:"),e),o._messageModule.probeNetwork().then(function(t){var o=m(t,2),n=o[0],a=o[1];s.setError(e,n,a).end();}),e;});}},{key:"downloadMergerMessage",value:function value(e){var o=this;be.debug("".concat(this._className,".downloadMergerMessage message:"),e);var n=e.payload.downloadKey,a=new Va(Ba.DOWNLOAD_MERGER_MESSAGE);return a.setMessage("downloadKey:".concat(n)),this._messageModule.request({protocolName:ia,requestData:{downloadKey:n}}).then(function(n){if(be.debug("".concat(o._className,".downloadMergerMessage ok. response:"),n.data),ot(e.clearElement)){var s=e.payload,r=(s.downloadKey,s.pbDownloadKey,s.messageList,_(s,Tr));e.clearElement(),e.setElement({type:e.type,content:t({messageList:n.data.messageList},r)});}else{var i=[];n.data.messageList.forEach(function(e){if(!Kt(e)){var t=new es(e);i.push(t);}}),e.payload.messageList=i,e.payload.downloadKey="",e.payload.pbDownloadKey="";}return a.setNetworkType(o._messageModule.getNetworkType()).end(),e;}).catch(function(e){throw be.warn("".concat(o._className,".downloadMergerMessage failed. key:").concat(n," error:"),e),o._messageModule.probeNetwork().then(function(t){var o=m(t,2),n=o[0],s=o[1];a.setError(e,n,s).end();}),e;});}},{key:"createMergerMessagePack",value:function value(e,t,o){return e.conversationType===D.CONV_C2C?this._createC2CMergerMessagePack(e,t,o):this._createGroupMergerMessagePack(e,t,o);}},{key:"_createC2CMergerMessagePack",value:function value(e,t,o){var n=null;t&&(t.offlinePushInfo&&(n=t.offlinePushInfo),!0===t.onlineUserOnly&&(n?n.disablePush=!0:n={disablePush:!0}));var a="";ze(e.cloudCustomData)&&e.cloudCustomData.length>0&&(a=e.cloudCustomData);var s=o.pbDownloadKey,r=o.downloadKey,i=o.messageNumber,c=e.payload,u=c.title,l=c.abstractList,d=c.compatibleText,p=this._messageModule.getModule(ro);return{protocolName:wo,tjgID:this._messageModule.generateTjgID(e),requestData:{fromAccount:this._messageModule.getMyUserID(),toAccount:e.to,msgBody:[{msgType:e.type,msgContent:{pbDownloadKey:s,downloadKey:r,title:u,abstractList:l,compatibleText:d,messageNumber:i}}],cloudCustomData:a,clientTime:e.clientTime,msgSeq:e.sequence,msgRandom:e.random,msgLifeTime:p&&p.isOnlineMessage(e,t)?0:void 0,offlinePushInfo:n?{pushFlag:!0===n.disablePush?1:0,title:n.title||"",desc:n.description||"",ext:n.extension||"",apnsInfo:{badgeMode:!0===n.ignoreIOSBadge?1:0},androidInfo:{OPPOChannelID:n.androidOPPOChannelID||""}}:void 0}};}},{key:"_createGroupMergerMessagePack",value:function value(e,t,o){var n=null;t&&t.offlinePushInfo&&(n=t.offlinePushInfo);var a="";ze(e.cloudCustomData)&&e.cloudCustomData.length>0&&(a=e.cloudCustomData);var s=o.pbDownloadKey,r=o.downloadKey,i=o.messageNumber,c=e.payload,u=c.title,l=c.abstractList,d=c.compatibleText,p=this._messageModule.getModule(io);return{protocolName:Fo,tjgID:this._messageModule.generateTjgID(e),requestData:{fromAccount:this._messageModule.getMyUserID(),groupID:e.to,msgBody:[{msgType:e.type,msgContent:{pbDownloadKey:s,downloadKey:r,title:u,abstractList:l,compatibleText:d,messageNumber:i}}],random:e.random,priority:e.priority,clientSequence:e.clientSequence,groupAtInfo:void 0,cloudCustomData:a,onlineOnlyFlag:p&&p.isOnlineMessage(e,t)?1:0,offlinePushInfo:n?{pushFlag:!0===n.disablePush?1:0,title:n.title||"",desc:n.description||"",ext:n.extension||"",apnsInfo:{badgeMode:!0===n.ignoreIOSBadge?1:0},androidInfo:{OPPOChannelID:n.androidOPPOChannelID||""}}:void 0,clientTime:e.clientTime,needReadReceipt:!0!==e.needReadReceipt||p.isMessageFromOrToAVChatroom(e.to)?0:1}};}}]),e;}(),Cr={ERR_SVR_COMM_SENSITIVE_TEXT:80001,ERR_SVR_COMM_BODY_SIZE_LIMIT:80002,OPEN_SERVICE_OVERLOAD_ERROR:60022,ERR_SVR_MSG_PKG_PARSE_FAILED:20001,ERR_SVR_MSG_INTERNAL_AUTH_FAILED:20002,ERR_SVR_MSG_INVALID_ID:20003,ERR_SVR_MSG_PUSH_DENY:20006,ERR_SVR_MSG_IN_PEER_BLACKLIST:20007,ERR_SVR_MSG_BOTH_NOT_FRIEND:20009,ERR_SVR_MSG_NOT_PEER_FRIEND:20010,ERR_SVR_MSG_NOT_SELF_FRIEND:20011,ERR_SVR_MSG_SHUTUP_DENY:20012,ERR_SVR_GROUP_INVALID_PARAMETERS:10004,ERR_SVR_GROUP_PERMISSION_DENY:10007,ERR_SVR_GROUP_NOT_FOUND:10010,ERR_SVR_GROUP_INVALID_GROUPID:10015,ERR_SVR_GROUP_REJECT_FROM_THIRDPARTY:10016,ERR_SVR_GROUP_SHUTUP_DENY:10017,MESSAGE_SEND_FAIL:2100,OVER_FREQUENCY_LIMIT:2996},Sr=[Ca.MESSAGE_ONPROGRESS_FUNCTION_ERROR,Ca.MESSAGE_IMAGE_SELECT_FILE_FIRST,Ca.MESSAGE_IMAGE_TYPES_LIMIT,Ca.MESSAGE_FILE_IS_EMPTY,Ca.MESSAGE_IMAGE_SIZE_LIMIT,Ca.MESSAGE_FILE_SELECT_FILE_FIRST,Ca.MESSAGE_FILE_SIZE_LIMIT,Ca.MESSAGE_VIDEO_SIZE_LIMIT,Ca.MESSAGE_VIDEO_TYPES_LIMIT,Ca.MESSAGE_AUDIO_UPLOAD_FAIL,Ca.MESSAGE_AUDIO_SIZE_LIMIT,Ca.COS_UNDETECTED];var Dr=function(e){i(a,e);var o=f(a);function a(e){var t;return n(this,a),(t=o.call(this,e))._className="MessageModule",t._messageOptionsMap=new Map(),t._mergerMessageHandler=new Er(g(t)),t;}return s(a,[{key:"createTextMessage",value:function value(e){var t=this.getMyUserID();e.currentUser=t,e.senderTinyID=this.getMyTinyID();var o=new ns(e),n="string"==typeof e.payload?e.payload:e.payload.text,a=new Ka({text:n}),s=this._getNickAndAvatarByUserID(t);return o.setElement(a),o.setNickAndAvatar(s),o.setNameCard(this._getNameCardByGroupID(o)),o;}},{key:"createImageMessage",value:function value(e){var t=this.getMyUserID();e.currentUser=t,e.senderTinyID=this.getMyTinyID();var o=new ns(e);if(te){var n=e.payload.file;if(je(n))return void be.warn("小程序环境下调用 createImageMessage 接口时,payload.file 不支持传入 File 对象");var a=n.tempFilePaths[0],s={url:a,name:a.slice(a.lastIndexOf("/")+1),size:n.tempFiles&&n.tempFiles[0].size||1,type:a.slice(a.lastIndexOf(".")+1).toLowerCase()};e.payload.file=s;}else if(oe)if(je(e.payload.file)){var r=e.payload.file;e.payload.file={files:[r]};}else if(Xe(e.payload.file)&&"undefined"!=typeof uni){var i=e.payload.file.tempFiles[0];e.payload.file={files:[i]};}var c=new Ha({imageFormat:we.UNKNOWN,uuid:this._generateUUID(),file:e.payload.file}),u=this._getNickAndAvatarByUserID(t);return o.setElement(c),o.setNickAndAvatar(u),o.setNameCard(this._getNameCardByGroupID(o)),this._messageOptionsMap.set(o.clientSequence,e),o;}},{key:"createAudioMessage",value:function value(e){var t=e.payload.file;if(te){var o={url:t.tempFilePath,name:t.tempFilePath.slice(t.tempFilePath.lastIndexOf("/")+1),size:t.fileSize,second:parseInt(t.duration)/1e3,type:t.tempFilePath.slice(t.tempFilePath.lastIndexOf(".")+1).toLowerCase()};e.payload.file=o;}var n=this.getMyUserID();e.currentUser=n,e.senderTinyID=this.getMyTinyID();var a=new ns(e),s=new Wa({second:Math.floor(t.duration/1e3),size:t.fileSize||t.size,url:t.tempFilePath,uuid:this._generateUUID()}),r=this._getNickAndAvatarByUserID(n);return a.setElement(s),a.setNickAndAvatar(r),a.setNameCard(this._getNameCardByGroupID(a)),this._messageOptionsMap.set(a.clientSequence,e),a;}},{key:"createVideoMessage",value:function value(e){var t=this.getMyUserID();e.currentUser=t,e.senderTinyID=this.getMyTinyID(),e.payload.file.thumbUrl="https://web.sdk.qcloud.com/im/assets/images/transparent.png",e.payload.file.thumbSize=1668;var o={};if(te){if(Q)return void be.warn("createVideoMessage 不支持在支付宝小程序环境下使用");if(je(e.payload.file))return void be.warn("小程序环境下调用 createVideoMessage 接口时,payload.file 不支持传入 File 对象");var n=e.payload.file;o.url=n.tempFilePath,o.name=n.tempFilePath.slice(n.tempFilePath.lastIndexOf("/")+1),o.size=n.size,o.second=n.duration,o.type=n.tempFilePath.slice(n.tempFilePath.lastIndexOf(".")+1).toLowerCase();}else if(oe){if(je(e.payload.file)){var a=e.payload.file;e.payload.file.files=[a];}else if(Xe(e.payload.file)&&"undefined"!=typeof uni){var s=e.payload.file.tempFile;e.payload.file.files=[s];}var r=e.payload.file;o.url=window.URL.createObjectURL(r.files[0]),o.name=r.files[0].name,o.size=r.files[0].size,o.second=r.files[0].duration||0,o.type=r.files[0].type.split("/")[1];}e.payload.file.videoFile=o;var i=new ns(e),c=new Qa({videoFormat:o.type,videoSecond:Pt(o.second,0),videoSize:o.size,remoteVideoUrl:"",videoUrl:o.url,videoUUID:this._generateUUID(),thumbUUID:this._generateUUID(),thumbWidth:e.payload.file.width||200,thumbHeight:e.payload.file.height||200,thumbUrl:e.payload.file.thumbUrl,thumbSize:e.payload.file.thumbSize,thumbFormat:e.payload.file.thumbUrl.slice(e.payload.file.thumbUrl.lastIndexOf(".")+1).toLowerCase()}),u=this._getNickAndAvatarByUserID(t);return i.setElement(c),i.setNickAndAvatar(u),i.setNameCard(this._getNameCardByGroupID(i)),this._messageOptionsMap.set(i.clientSequence,e),i;}},{key:"createCustomMessage",value:function value(e){var t=this.getMyUserID();e.currentUser=t,e.senderTinyID=this.getMyTinyID();var o=new ns(e),n=new Xa({data:e.payload.data,description:e.payload.description,extension:e.payload.extension}),a=this._getNickAndAvatarByUserID(t);return o.setElement(n),o.setNickAndAvatar(a),o.setNameCard(this._getNameCardByGroupID(o)),o;}},{key:"createFaceMessage",value:function value(e){var t=this.getMyUserID();e.currentUser=t,e.senderTinyID=this.getMyTinyID();var o=new ns(e),n=new xa(e.payload),a=this._getNickAndAvatarByUserID(t);return o.setElement(n),o.setNickAndAvatar(a),o.setNameCard(this._getNameCardByGroupID(o)),o;}},{key:"createMergerMessage",value:function value(e){var t=this.getMyUserID();e.currentUser=t,e.senderTinyID=this.getMyTinyID();var o=this._getNickAndAvatarByUserID(t),n=new ns(e),a=new ts(e.payload);return n.setElement(a),n.setNickAndAvatar(o),n.setNameCard(this._getNameCardByGroupID(n)),n.setRelayFlag(!0),n;}},{key:"createForwardMessage",value:function value(e){var t=e.to,o=e.conversationType,n=e.priority,a=e.payload,s=e.needReadReceipt,r=this.getMyUserID(),i=this._getNickAndAvatarByUserID(r);if(a.type===D.MSG_GRP_TIP)return gs(new ls({code:Ca.MESSAGE_FORWARD_TYPE_INVALID,message:Sa.MESSAGE_FORWARD_TYPE_INVALID}));var c={to:t,conversationType:o,conversationID:"".concat(o).concat(t),priority:n,isPlaceMessage:0,status:Yt.UNSEND,currentUser:r,senderTinyID:this.getMyTinyID(),cloudCustomData:e.cloudCustomData||a.cloudCustomData||"",needReadReceipt:s},u=new ns(c);return u.setElement(a.getElements()[0]),u.setNickAndAvatar(i),u.setNameCard(this._getNameCardByGroupID(a)),u.setRelayFlag(!0),u;}},{key:"downloadMergerMessage",value:function value(e){return this._mergerMessageHandler.downloadMergerMessage(e);}},{key:"createFileMessage",value:function value(e){if(te){var o,n="createFileMessage 接口不可用!";if(!$&&!z&&!Z)return void be.warn("小程序目前不支持选择文件,".concat(n));var a=ne.getSystemInfoSync().SDKVersion;if($&&Rt(a,o="2.5.0")<0)return void be.warn("wx.chooseMessageFile 需要基础库".concat(o,"或更高版本,").concat(n));if(z&&Rt(a,o="1.18.0")<0)return void be.warn("qq.chooseMessageFile 需要基础库".concat(o,"或更高版本,").concat(n));}if(oe||Z){if(je(e.payload.file)){var s=e.payload.file;e.payload.file={files:[s]};}else if(Xe(e.payload.file)&&"undefined"!=typeof uni){var r=e.payload.file,i=r.tempFiles,c=r.files,u=null;Qe(i)?u=i[0]:Qe(c)&&(u=c[0]),e.payload.file={files:[u]};}}else if($||z){var l=e.payload.file.tempFiles,d=t(t({},l[0]),{},{url:l[0].path});e.payload.file={files:[d]};}var p=this.getMyUserID();e.currentUser=p,e.senderTinyID=this.getMyTinyID();var _=new ns(e),g=new Ja({uuid:this._generateUUID(),file:e.payload.file}),h=this._getNickAndAvatarByUserID(p);return _.setElement(g),_.setNickAndAvatar(h),_.setNameCard(this._getNameCardByGroupID(_)),this._messageOptionsMap.set(_.clientSequence,e),_;}},{key:"createLocationMessage",value:function value(e){var t=this.getMyUserID();e.currentUser=t,e.senderTinyID=this.getMyTinyID();var o=new ns(e),n=new Za(e.payload),a=this._getNickAndAvatarByUserID(t);return o.setElement(n),o.setNickAndAvatar(a),o.setNameCard(this._getNameCardByGroupID(o)),o;}},{key:"_onCannotFindModule",value:function value(){return gs({code:Ca.CANNOT_FIND_MODULE,message:Sa.CANNOT_FIND_MODULE});}},{key:"sendMessageInstance",value:function value(e,t){var o,n=this,a=null;switch(e.conversationType){case D.CONV_C2C:if(!(a=this.getModule(ro)))return this._onCannotFindModule();break;case D.CONV_GROUP:if(!(a=this.getModule(io)))return this._onCannotFindModule();if(yt({groupID:e.to})){var s=a.getLocalGroupProfile(e.to);if(s&&s.isSupportTopic)return gs({code:Ca.MESSAGE_SEND_GROUP_WITH_TOPIC_FAIL,message:Sa.MESSAGE_SEND_GROUP_WITH_TOPIC_FAIL});if(!Ze(t)&&!Ze(t.messageControlInfo))return gs({code:Ca.MESSAGE_CONTROL_INFO_FAIL,message:Sa.MESSAGE_CONTROL_INFO_FAIL});}break;default:return gs({code:Ca.MESSAGE_SEND_INVALID_CONVERSATION_TYPE,message:Sa.MESSAGE_SEND_INVALID_CONVERSATION_TYPE});}var r=this.getModule(Mo),i=this.getModule(io);return r.upload(e).then(function(){n._getSendMessageSpecifiedKey(e)===La&&n.getModule(No).addSuccessCount(ka);return i.guardForAVChatRoom(e).then(function(){if(!e.isSendable())return gs({code:Ca.MESSAGE_FILE_URL_IS_EMPTY,message:Sa.MESSAGE_FILE_URL_IS_EMPTY});n._addSendMessageTotalCount(e),o=Date.now();var s=function(e){var t="utf-8";oe&&document&&(t=document.charset.toLowerCase());var o,n,a=0;if(n=e.length,"utf-8"===t||"utf8"===t)for(var s=0;s<n;s++){(o=e.codePointAt(s))<=127?a+=1:o<=2047?a+=2:o<=65535?a+=3:(a+=4,s++);}else if("utf-16"===t||"utf16"===t)for(var r=0;r<n;r++){(o=e.codePointAt(r))<=65535?a+=2:(a+=4,r++);}else a=e.replace(/[^\x00-\xff]/g,"aa").length;return a;}(JSON.stringify(e));return e.type===D.MSG_MERGER&&s>7e3?n._mergerMessageHandler.uploadMergerMessage(e,s).then(function(o){var a=n._mergerMessageHandler.createMergerMessagePack(e,t,o);return n.request(a);}):(n.getModule(po).setMessageRandom(e),e.conversationType===D.CONV_C2C||e.conversationType===D.CONV_GROUP?a.sendMessage(e,t):void 0);}).then(function(s){var r=s.data,i=r.time,c=r.sequence,u=r.readReceiptCode;$e(u)&&0!==u&&(new Va(Ba.SEND_MESSAGE_WITH_RECEIPT).setMessage("from:".concat(e.from," to:").concat(e.to," sequence:").concat(c," readReceiptCode:").concat(u)).end(),be.warn("".concat(n._className,".sendMessageInstance readReceiptCode:").concat(u," message:").concat(us[u])));n._addSendMessageSuccessCount(e,o),n._messageOptionsMap.delete(e.clientSequence);var l=n.getModule(po);e.status=Yt.SUCCESS,e.time=i;var d=!1;if(e.conversationType===D.CONV_GROUP)e.sequence=c;else if(e.conversationType===D.CONV_C2C){var p=l.getLatestMessageSentByMe(e.conversationID);if(p){var _=p.nick,g=p.avatar;_===e.nick&&g===e.avatar||(d=!0);}}if(d&&l.modifyMessageSentByMe({conversationID:e.conversationID,latestNick:e.nick,latestAvatar:e.avatar}),a.isOnlineMessage(e,t))e._onlineOnlyFlag=!0;else{l.appendToMessageList(e);var h=e;Xe(t)&&Xe(t.messageControlInfo)&&(!0===t.messageControlInfo.excludedFromLastMessage&&(e._isExcludedFromLastMessage=!0,h=""),!0===t.messageControlInfo.excludedFromUnreadCount&&(e._isExcludedFromUnreadCount=!0));var f=e.conversationType;if(Tt(e.to))f=D.CONV_TOPIC,n.getModule(lo).onMessageSent({groupID:wt(e.to),topicID:e.to,lastMessage:h});l.onMessageSent({conversationOptionsList:[{conversationID:e.conversationID,unreadCount:0,type:f,subType:e.conversationSubType,lastMessage:h}]});}return e.getRelayFlag()||"TIMImageElem"!==e.type||kt(e.payload.imageInfoArray),as({message:e});});}).catch(function(t){return n._onSendMessageFailed(e,t);});}},{key:"_onSendMessageFailed",value:function value(e,t){e.status=Yt.FAIL,this.getModule(po).deleteMessageRandom(e),this._addSendMessageFailCountOnUser(e,t);var o=new Va(Ba.SEND_MESSAGE);return o.setMessage("tjg_id:".concat(this.generateTjgID(e)," type:").concat(e.type," from:").concat(e.from," to:").concat(e.to)),this.probeNetwork().then(function(e){var n=m(e,2),a=n[0],s=n[1];o.setError(t,a,s).end();}),be.error("".concat(this._className,"._onSendMessageFailed error:"),t),gs(new ls({code:t&&t.code?t.code:Ca.MESSAGE_SEND_FAIL,message:t&&t.message?t.message:Sa.MESSAGE_SEND_FAIL,data:{message:e}}));}},{key:"_getSendMessageSpecifiedKey",value:function value(e){if([D.MSG_IMAGE,D.MSG_AUDIO,D.MSG_VIDEO,D.MSG_FILE].includes(e.type))return La;if(e.conversationType===D.CONV_C2C)return Aa;if(e.conversationType===D.CONV_GROUP){var t=this.getModule(io).getLocalGroupProfile(e.to);if(!t)return;var o=t.type;return It(o)?Ra:Oa;}}},{key:"_addSendMessageTotalCount",value:function value(e){var t=this._getSendMessageSpecifiedKey(e);t&&this.getModule(No).addTotalCount(t);}},{key:"_addSendMessageSuccessCount",value:function value(e,t){var o=Math.abs(Date.now()-t),n=this._getSendMessageSpecifiedKey(e);if(n){var a=this.getModule(No);a.addSuccessCount(n),a.addCost(n,o);}}},{key:"_addSendMessageFailCountOnUser",value:function value(e,t){var o,n,a=t.code,s=void 0===a?-1:a,r=this.getModule(No),i=this._getSendMessageSpecifiedKey(e);i===La&&(o=s,n=!1,Sr.includes(o)&&(n=!0),n)?r.addFailedCountOfUserSide(ka):function(e){var t=!1;return Object.values(Cr).includes(e)&&(t=!0),(e>=120001&&e<=13e4||e>=10100&&e<=10200)&&(t=!0),t;}(s)&&i&&r.addFailedCountOfUserSide(i);}},{key:"resendMessage",value:function value(e){return e.isResend=!0,e.status=Yt.UNSEND,this.sendMessageInstance(e);}},{key:"revokeMessage",value:function value(e){var t=this,o=null;if(e.conversationType===D.CONV_C2C){if(!(o=this.getModule(ro)))return this._onCannotFindModule();}else if(e.conversationType===D.CONV_GROUP&&!(o=this.getModule(io)))return this._onCannotFindModule();var n=new Va(Ba.REVOKE_MESSAGE);return n.setMessage("tjg_id:".concat(this.generateTjgID(e)," type:").concat(e.type," from:").concat(e.from," to:").concat(e.to)),o.revokeMessage(e).then(function(o){var a=o.data.recallRetList;if(!Kt(a)&&0!==a[0].retCode){var s=new ls({code:a[0].retCode,message:us[a[0].retCode]||Sa.MESSAGE_REVOKE_FAIL,data:{message:e}});return n.setCode(s.code).setMoreMessage(s.message).end(),gs(s);}return be.info("".concat(t._className,".revokeMessage ok. ID:").concat(e.ID)),e.isRevoked=!0,n.end(),t.getModule(po).onMessageRevoked([e]),as({message:e});}).catch(function(o){t.probeNetwork().then(function(e){var t=m(e,2),a=t[0],s=t[1];n.setError(o,a,s).end();});var a=new ls({code:o&&o.code?o.code:Ca.MESSAGE_REVOKE_FAIL,message:o&&o.message?o.message:Sa.MESSAGE_REVOKE_FAIL,data:{message:e}});return be.warn("".concat(t._className,".revokeMessage failed. error:"),o),gs(a);});}},{key:"deleteMessage",value:function value(e){var t=this,o=null,n=e[0],a=n.conversationID,s="",r=[],i=[];if(n.conversationType===D.CONV_C2C)o=this.getModule(ro),s=a.replace(D.CONV_C2C,""),e.forEach(function(e){e&&e.status===Yt.SUCCESS&&e.conversationID===a&&(e._onlineOnlyFlag||r.push("".concat(e.sequence,"_").concat(e.random,"_").concat(e.time)),i.push(e));});else if(n.conversationType===D.CONV_GROUP)o=this.getModule(io),s=a.replace(D.CONV_GROUP,""),e.forEach(function(e){e&&e.status===Yt.SUCCESS&&e.conversationID===a&&(e._onlineOnlyFlag||r.push("".concat(e.sequence)),i.push(e));});else if(n.conversationType===D.CONV_SYSTEM)return gs({code:Ca.CANNOT_DELETE_GROUP_SYSTEM_NOTICE,message:Sa.CANNOT_DELETE_GROUP_SYSTEM_NOTICE});if(!o)return this._onCannotFindModule();if(0===r.length)return this._onMessageDeleted(i);r.length>30&&(r=r.slice(0,30),i=i.slice(0,30));var c=new Va(Ba.DELETE_MESSAGE);return c.setMessage("to:".concat(s," count:").concat(r.length)),o.deleteMessage({to:s,keyList:r}).then(function(e){return c.end(),be.info("".concat(t._className,".deleteMessage ok")),t._onMessageDeleted(i);}).catch(function(e){t.probeNetwork().then(function(t){var o=m(t,2),n=o[0],a=o[1];c.setError(e,n,a).end();}),be.warn("".concat(t._className,".deleteMessage failed. error:"),e);var o=new ls({code:e&&e.code?e.code:Ca.MESSAGE_DELETE_FAIL,message:e&&e.message?e.message:Sa.MESSAGE_DELETE_FAIL});return gs(o);});}},{key:"_onMessageDeleted",value:function value(e){return this.getModule(po).onMessageDeleted(e),_s({messageList:e});}},{key:"modifyRemoteMessage",value:function value(e){var t=this,o=null,n=e.conversationType,a=e.to;if(this.getModule(io).isMessageFromOrToAVChatroom(a))return gs({code:Ca.MESSAGE_MODIFY_DISABLED_IN_AVCHATROOM,message:Sa.MESSAGE_MODIFY_DISABLED_IN_AVCHATROOM,data:{message:e}});n===D.CONV_C2C?o=this.getModule(ro):n===D.CONV_GROUP&&(o=this.getModule(io));var s=new Va(Ba.MODIFY_MESSAGE);return s.setMessage("to:".concat(a)),o.modifyRemoteMessage(e).then(function(o){s.end(),be.info("".concat(t._className,".modifyRemoteMessage ok"));var n=t._onModifyRemoteMessageResp(e,o.data);return as({message:n});}).catch(function(o){if(s.setCode(o.code).setMoreMessage(o.message).end(),be.warn("".concat(t._className,".modifyRemoteMessage failed. error:"),o),20027===o.code){var n=t._onModifyRemoteMessageResp(e,o.data);return gs({code:Ca.MESSAGE_MODIFY_CONFLICT,message:Sa.MESSAGE_MODIFY_CONFLICT,data:{message:n}});}return gs({code:o.code,message:o.message,data:{message:e}});});}},{key:"_onModifyRemoteMessageResp",value:function value(e,t){be.debug("".concat(this._className,"._onModifyRemoteMessageResp options:"),t);var o=e.conversationType,n=e.from,a=e.to,s=e.random,r=e.sequence,i=e.time,c=t.elements,u=t.messageVersion,l=t.cloudCustomData,d=void 0===l?"":l;return this.getModule(po).onMessageModified({conversationType:o,from:n,to:a,time:i,random:s,sequence:r,elements:c,cloudCustomData:d,messageVersion:u});}},{key:"_generateUUID",value:function value(){var e=this.getModule(_o);return"".concat(e.getSDKAppID(),"-").concat(e.getUserID(),"-").concat(function(){for(var e="",t=32;t>0;--t){e+=pt[Math.floor(Math.random()*_t)];}return e;}());}},{key:"getMessageOption",value:function value(e){return this._messageOptionsMap.get(e);}},{key:"_getNickAndAvatarByUserID",value:function value(e){return this.getModule(so).getNickAndAvatarByUserID(e);}},{key:"_getNameCardByGroupID",value:function value(e){if(e.conversationType===D.CONV_GROUP){var t=this.getModule(io);if(t)return t.getMyNameCardByGroupID(e.to);}return"";}},{key:"reset",value:function value(){be.log("".concat(this._className,".reset")),this._messageOptionsMap.clear();}}]),a;}(Ro),Nr=function(e){i(o,e);var t=f(o);function o(e){var a;return n(this,o),(a=t.call(this,e))._className="PluginModule",a.plugins={},a;}return s(o,[{key:"registerPlugin",value:function value(e){var t=this;Object.keys(e).forEach(function(o){t.plugins[o]=e[o];}),new Va(Ba.REGISTER_PLUGIN).setMessage("".concat(Object.keys(e))).end();}},{key:"getPlugin",value:function value(e){return this.plugins[e];}},{key:"reset",value:function value(){be.log("".concat(this._className,".reset"));}}]),o;}(Ro),Ar=function(e){i(o,e);var t=f(o);function o(e){var a;return n(this,o),(a=t.call(this,e))._className="SyncUnreadMessageModule",a._cookie="",a._onlineSyncFlag=!1,a.getInnerEmitterInstance().on(ms,a._onLoginSuccess,g(a)),a;}return s(o,[{key:"_onLoginSuccess",value:function value(e){this._startSync({cookie:this._cookie,syncFlag:0,isOnlineSync:0});}},{key:"_startSync",value:function value(e){var t=this,o=e.cookie,n=e.syncFlag,a=e.isOnlineSync;be.log("".concat(this._className,"._startSync cookie:").concat(o," syncFlag:").concat(n," isOnlineSync:").concat(a)),this.request({protocolName:Uo,requestData:{cookie:o,syncFlag:n,isOnlineSync:a}}).then(function(e){var o=e.data,n=o.cookie,a=o.syncFlag,s=o.eventArray,r=o.messageList,i=o.C2CRemainingUnreadList,c=o.C2CPairUnreadList;if(t._cookie=n,Kt(n));else if(0===a||1===a){if(s)t.getModule(yo).onMessage({head:{},body:{eventArray:s,isInstantMessage:t._onlineSyncFlag,isSyncingEnded:!1}});t.getModule(ro).onNewC2CMessage({dataList:r,isInstantMessage:!1,C2CRemainingUnreadList:i,C2CPairUnreadList:c}),t._startSync({cookie:n,syncFlag:a,isOnlineSync:0});}else if(2===a){if(s)t.getModule(yo).onMessage({head:{},body:{eventArray:s,isInstantMessage:t._onlineSyncFlag,isSyncingEnded:!0}});t.getModule(ro).onNewC2CMessage({dataList:r,isInstantMessage:t._onlineSyncFlag,C2CRemainingUnreadList:i,C2CPairUnreadList:c});}}).catch(function(e){be.error("".concat(t._className,"._startSync failed. error:"),e);});}},{key:"startOnlineSync",value:function value(){be.log("".concat(this._className,".startOnlineSync")),this._onlineSyncFlag=!0,this._startSync({cookie:this._cookie,syncFlag:0,isOnlineSync:1});}},{key:"startSyncOnReconnected",value:function value(){be.log("".concat(this._className,".startSyncOnReconnected.")),this._onlineSyncFlag=!0,this._startSync({cookie:this._cookie,syncFlag:0,isOnlineSync:0});}},{key:"reset",value:function value(){be.log("".concat(this._className,".reset")),this._onlineSyncFlag=!1,this._cookie="";}}]),o;}(Ro),Or={request:{toAccount:"To_Account",fromAccount:"From_Account",to:"To_Account",from:"From_Account",groupID:"GroupId",groupAtUserID:"GroupAt_Account",extension:"Ext",data:"Data",description:"Desc",elements:"MsgBody",sizeType:"Type",downloadFlag:"Download_Flag",thumbUUID:"ThumbUUID",videoUUID:"VideoUUID",remoteAudioUrl:"Url",remoteVideoUrl:"VideoUrl",videoUrl:"",imageUrl:"URL",fileUrl:"Url",uuid:"UUID",priority:"MsgPriority",receiverUserID:"To_Account",receiverGroupID:"GroupId",messageSender:"SenderId",messageReceiver:"ReceiverId",nick:"From_AccountNick",avatar:"From_AccountHeadurl",messageNumber:"MsgNum",pbDownloadKey:"PbMsgKey",downloadKey:"JsonMsgKey",applicationType:"PendencyType",userIDList:"To_Account",groupNameList:"GroupName",userID:"To_Account",groupAttributeList:"GroupAttr",mainSequence:"AttrMainSeq",avChatRoomKey:"BytesKey",attributeControl:"AttrControl",sequence:"seq",messageControlInfo:"SendMsgControl",updateSequence:"UpdateSeq",clientTime:"MsgClientTime",sequenceList:"MsgSeqList",topicID:"TopicId",customData:"CustomString",isSupportTopic:"SupportTopic",isWebUniapp:"is_web_uniapp"},response:{MsgPriority:"priority",ThumbUUID:"thumbUUID",VideoUUID:"videoUUID",Download_Flag:"downloadFlag",GroupId:"groupID",Member_Account:"userID",MsgList:"messageList",SyncFlag:"syncFlag",To_Account:"to",From_Account:"from",MsgSeq:"sequence",MsgRandom:"random",MsgTime:"time",MsgTimeStamp:"time",MsgContent:"content",MsgBody:"elements",From_AccountNick:"nick",From_AccountHeadurl:"avatar",GroupWithdrawInfoArray:"revokedInfos",GroupReadInfoArray:"groupMessageReadNotice",LastReadMsgSeq:"lastMessageSeq",WithdrawC2cMsgNotify:"c2cMessageRevokedNotify",C2cWithdrawInfoArray:"revokedInfos",C2cReadedReceipt:"c2cMessageReadReceipt",ReadC2cMsgNotify:"c2cMessageReadNotice",LastReadTime:"peerReadTime",MsgRand:"random",MsgType:"type",MsgShow:"messageShow",NextMsgSeq:"nextMessageSeq",FaceUrl:"avatar",ProfileDataMod:"profileModify",Profile_Account:"userID",ValueBytes:"value",ValueNum:"value",NoticeSeq:"noticeSequence",NotifySeq:"notifySequence",MsgFrom_AccountExtraInfo:"messageFromAccountExtraInformation",Operator_Account:"operatorID",OpType:"operationType",ReportType:"operationType",UserId:"userID",User_Account:"userID",List_Account:"userIDList",MsgOperatorMemberExtraInfo:"operatorInfo",MsgMemberExtraInfo:"memberInfoList",ImageUrl:"avatar",NickName:"nick",MsgGroupNewInfo:"newGroupProfile",MsgAppDefinedData:"groupCustomField",Owner_Account:"ownerID",GroupFaceUrl:"avatar",GroupIntroduction:"introduction",GroupNotification:"notification",GroupApplyJoinOption:"joinOption",MsgKey:"messageKey",GroupInfo:"groupProfile",ShutupTime:"muteTime",Desc:"description",Ext:"extension",GroupAt_Account:"groupAtUserID",MsgNum:"messageNumber",PbMsgKey:"pbDownloadKey",JsonMsgKey:"downloadKey",MsgModifiedFlag:"isModified",PendencyItem:"applicationItem",PendencyType:"applicationType",AddTime:"time",AddSource:"source",AddWording:"wording",ProfileImImage:"avatar",PendencyAdd:"friendApplicationAdded",FrienPencydDel_Account:"friendApplicationDeletedUserIDList",Peer_Account:"userID",GroupAttr:"groupAttributeList",GroupAttrAry:"groupAttributeList",AttrMainSeq:"mainSequence",seq:"sequence",GroupAttrOption:"groupAttributeOption",BytesChangedKeys:"changedKeyList",GroupAttrInfo:"groupAttributeList",GroupAttrSeq:"mainSequence",PushChangedAttrValFlag:"hasChangedAttributeInfo",SubKeySeq:"sequence",Val:"value",MsgGroupFromCardName:"senderNameCard",MsgGroupFromNickName:"senderNick",C2cNick:"peerNick",C2cImage:"peerAvatar",SendMsgControl:"messageControlInfo",NoLastMsg:"excludedFromLastMessage",NoUnread:"excludedFromUnreadCount",UpdateSeq:"updateSequence",MuteNotifications:"muteFlag",MsgClientTime:"clientTime",TinyId:"tinyID",GroupMsgReceiptList:"readReceiptList",ReadNum:"readCount",UnreadNum:"unreadCount",TopicId:"topicID",MillionGroupFlag:"communityType",SupportTopic:"isSupportTopic",MsgTopicNewInfo:"newTopicInfo",ShutupAll:"muteAllMembers",CustomString:"customData",TopicFaceUrl:"avatar",TopicIntroduction:"introduction",TopicNotification:"notification",TopicIdArray:"topicIDList",MsgVersion:"messageVersion",C2cMsgModNotifys:"c2cMessageModified",GroupMsgModNotifys:"groupMessageModified",ApplyJoinOption:"joinOption",MsgFlag:"messageRemindType",AtInfoList:"groupAtInfoList",AtFlagList:"groupAtType",AtMsgSeq:"sequence",BanDuration:"duration",BanDescription:"reason"},ignoreKeyWord:["C2C","ID","USP"]};function Rr(e,t){if("string"!=typeof e&&!Array.isArray(e))throw new TypeError("Expected the input to be `string | string[]`");t=Object.assign({pascalCase:!1},t);var o;return 0===(e=Array.isArray(e)?e.map(function(e){return e.trim();}).filter(function(e){return e.length;}).join("-"):e.trim()).length?"":1===e.length?t.pascalCase?e.toUpperCase():e.toLowerCase():(e!==e.toLowerCase()&&(e=Lr(e)),e=e.replace(/^[_.\- ]+/,"").toLowerCase().replace(/[_.\- ]+(\w|$)/g,function(e,t){return t.toUpperCase();}).replace(/\d+(\w|$)/g,function(e){return e.toUpperCase();}),o=e,t.pascalCase?o.charAt(0).toUpperCase()+o.slice(1):o);}var Lr=function Lr(e){for(var t=!1,o=!1,n=!1,a=0;a<e.length;a++){var s=e[a];t&&/[a-zA-Z]/.test(s)&&s.toUpperCase()===s?(e=e.slice(0,a)+"-"+e.slice(a),t=!1,n=o,o=!0,a++):o&&n&&/[a-zA-Z]/.test(s)&&s.toLowerCase()===s?(e=e.slice(0,a-1)+"-"+e.slice(a-1),n=o,o=!1,t=!0):(t=s.toLowerCase()===s&&s.toUpperCase()!==s,n=o,o=s.toUpperCase()===s&&s.toLowerCase()!==s);}return e;};function kr(e,t){var o=0;return function e(t,n){if(++o>100)return o--,t;if(Qe(t)){var a=t.map(function(t){return Je(t)?e(t,n):t;});return o--,a;}if(Je(t)){var s=(r=t,i=function i(e,t){if(!st(t))return!1;if((a=t)!==Rr(a))for(var o=0;o<Or.ignoreKeyWord.length&&!t.includes(Or.ignoreKeyWord[o]);o++){;}var a;return Ze(n[t])?function(e){return"OPPOChannelID"===e?e:e[0].toUpperCase()+Rr(e).slice(1);}(t):n[t];},c=Object.create(null),Object.keys(r).forEach(function(e){var t=i(r[e],e);t&&(c[t]=r[e]);}),c);return s=Dt(s,function(t,o){return Qe(t)||Je(t)?e(t,n):t;}),o--,s;}var r,i,c;}(e,t);}function Gr(e,t){if(Qe(e))return e.map(function(e){return Je(e)?Gr(e,t):e;});if(Je(e)){var o=(n=e,a=function a(e,o){return Ze(t[o])?Rr(o):t[o];},s={},Object.keys(n).forEach(function(e){s[a(n[e],e)]=n[e];}),s);return o=Dt(o,function(e){return Qe(e)||Je(e)?Gr(e,t):e;});}var n,a,s;}var Pr=String.fromCharCode,Ur=function Ur(e){var t=0|e.charCodeAt(0);if(55296<=t)if(t<56320){var o=0|e.charCodeAt(1);if(56320<=o&&o<=57343){if((t=(t<<10)+o-56613888|0)>65535)return Pr(240|t>>>18,128|t>>>12&63,128|t>>>6&63,128|63&t);}else t=65533;}else t<=57343&&(t=65533);return t<=2047?Pr(192|t>>>6,128|63&t):Pr(224|t>>>12,128|t>>>6&63,128|63&t);},br=function br(e){for(var t=void 0===e?"":(""+e).replace(/[\x80-\uD7ff\uDC00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]?/g,Ur),o=0|t.length,n=new Uint8Array(o),a=0;a<o;a=a+1|0){n[a]=0|t.charCodeAt(a);}return n;},wr=function wr(e){for(var t=new Uint8Array(e),o="",n=0,a=t.length;n<a;){var s=t[n],r=0,i=0;if(s<=127?(r=0,i=255&s):s<=223?(r=1,i=31&s):s<=239?(r=2,i=15&s):s<=244&&(r=3,i=7&s),a-n-r>0)for(var c=0;c<r;){i=i<<6|63&(s=t[n+c+1]),c+=1;}else i=65533,r=a-n;o+=String.fromCodePoint(i),n+=r+1;}return o;},Fr=function(){function e(t){n(this,e),this._handler=t;var o=t.getURL();if(this._socket=null,this._workerSocket=null,this._id=dt(),this._handler.getIsWorkerEnabled()){var a=URL.createObjectURL(new Blob([';let _socket = null;onmessage = function(event) { if (event.data.cmd === "start") { const url = event.data.url; _socket = new WebSocket(url); _socket.binaryType = "arraybuffer"; _socket.onopen = function() { postMessage({ callback: "onOpen" }); }; _socket.onclose = function(e) { postMessage({ callback: "onOpen", e: { code: e.code, reason: e.reason } }); }; _socket.onmessage = function(e) { postMessage({ callback: "onMessage", data: e.data }); }; _socket.onerror = function(e) { postMessage({ callback: "onError", e: { isTrusted: "true" } }); }; } else if (event.data.cmd === "sendMessage") { if (_socket !== null) { _socket.send(event.data.data); } } else if (event.data.cmd === "stop") { if (_socket !== null) { _socket.close(event.data.code); _socket = null; } }};'],{type:"application/javascript; charset=utf-8"}));this._workerSocket=new Worker(a);var s=this;this._workerSocket.onmessage=function(e){var t=e.data,o=t.callback,n=t.e;"onOpen"===o?s._onOpen():"onClose"===o?s._onClose(n):"onError"===o?s._onError(n):"onMessage"===o&&s._onMessage(e.data);},this._workerSocket.postMessage({cmd:"start",id:this._id,url:o});}else te?Q?(ne.connectSocket({url:o,header:{"content-type":"application/json"}}),ne.onSocketClose(this._onClose.bind(this)),ne.onSocketOpen(this._onOpen.bind(this)),ne.onSocketMessage(this._onMessage.bind(this)),ne.onSocketError(this._onError.bind(this))):(this._socket=ne.connectSocket({url:o,header:{"content-type":"application/json"},complete:function complete(){}}),this._socket.onClose(this._onClose.bind(this)),this._socket.onOpen(this._onOpen.bind(this)),this._socket.onMessage(this._onMessage.bind(this)),this._socket.onError(this._onError.bind(this))):oe&&(this._socket=new WebSocket(o),this._socket.binaryType="arraybuffer",this._socket.onopen=this._onOpen.bind(this),this._socket.onmessage=this._onMessage.bind(this),this._socket.onclose=this._onClose.bind(this),this._socket.onerror=this._onError.bind(this));this._canIUseBinaryFrame=t.canIUseBinaryFrame();}return s(e,[{key:"getID",value:function value(){return this._id;}},{key:"_onOpen",value:function value(){this._handler.onOpen({id:this._id});}},{key:"_onClose",value:function value(e){this._handler.onClose({id:this._id,e:e});}},{key:"_onMessage",value:function value(e){this._handler.onMessage({data:this._canIUseBinaryFrame?wr(e.data):e.data});}},{key:"_onError",value:function value(e){this._handler.onError({id:this._id,e:e});}},{key:"setIsWorkerEnabled",value:function value(e){this._isWorkerEnabled=!0;}},{key:"close",value:function value(e){if(this._workerSocket&&(this._workerSocket.postMessage({cmd:"stop",code:e}),this._workerSocket.terminate(),this._workerSocket=null),Q)return ne.offSocketClose(),ne.offSocketMessage(),ne.offSocketOpen(),ne.offSocketError(),void ne.closeSocket();this._socket&&(te?(this._socket.onClose(function(){}),this._socket.onOpen(function(){}),this._socket.onMessage(function(){}),this._socket.onError(function(){})):oe&&(this._socket.onopen=null,this._socket.onmessage=null,this._socket.onclose=null,this._socket.onerror=null),X?this._socket.close({code:e}):this._socket.close(e),this._socket=null);}},{key:"send",value:function value(e){if(this._workerSocket)this._workerSocket.postMessage({cmd:"sendMessage",data:this._canIUseBinaryFrame?br(e.data).buffer:e.data});else{if(Q)return void ne.sendSocketMessage({data:e.data,fail:function fail(){e.fail&&e.requestID&&e.fail(e.requestID);}});this._socket&&(te?this._socket.send({data:this._canIUseBinaryFrame?br(e.data).buffer:e.data,fail:function fail(){e.fail&&e.requestID&&e.fail(e.requestID);}}):oe&&this._socket.send(this._canIUseBinaryFrame?br(e.data).buffer:e.data));}}}]),e;}(),qr=4e3,Vr=4001,Br=["keyMap"],Kr=["keyMap"],Hr="connected",xr="connecting",Wr="disconnected",Yr=function(){function e(t){n(this,e),this._channelModule=t,this._className="SocketHandler",this._promiseMap=new Map(),this._readyState=Wr,this._simpleRequestMap=new Map(),this.MAX_SIZE=100,this._startSequence=dt(),this._startTs=0,this._reConnectFlag=!1,this._nextPingTs=0,this._reConnectCount=0,this.MAX_RECONNECT_COUNT=3,this._socketID=-1,this._random=0,this._socket=null,this._url="",this._onOpenTs=0,this._canIUseBinaryFrame=!0,this._isWorkerEnabled=!0,this._setWebsocketHost(),this._initConnection();}return s(e,[{key:"_setWebsocketHost",value:function value(){var e=this._channelModule.getModule(_o),t=b;this._channelModule.isOversea()&&(t=w),e.isSingaporeSite()?t=F:e.isKoreaSite()?t=q:e.isGermanySite()?t=V:e.isIndiaSite()&&(t=B),K.HOST.setCurrent(t);}},{key:"_initConnection",value:function value(){Ze(K.HOST.CURRENT.BACKUP)||""===this._url?this._url=K.HOST.CURRENT.DEFAULT:this._url===K.HOST.CURRENT.DEFAULT?this._url=K.HOST.CURRENT.BACKUP:this._url===K.HOST.CURRENT.BACKUP&&(this._url=K.HOST.CURRENT.DEFAULT);var e=this._channelModule.getModule(_o).getProxyServer();Kt(e)||(this._url=e),this._connect(),this._nextPingTs=0;}},{key:"onCheckTimer",value:function value(e){e%1==0&&this._checkPromiseMap();}},{key:"_checkPromiseMap",value:function value(){var e=this;0!==this._promiseMap.size&&this._promiseMap.forEach(function(t,o){var n=t.reject,a=t.timestamp,s=15e3;-1!==o.indexOf(Lo)&&(s=9e4),Date.now()-a>=s&&(be.log("".concat(e._className,"._checkPromiseMap request timeout, delete requestID:").concat(o)),e._promiseMap.delete(o),n(new ls({code:Ca.NETWORK_TIMEOUT,message:Sa.NETWORK_TIMEOUT})),e._channelModule.onRequestTimeout(o));});}},{key:"onOpen",value:function value(e){if(""!==this._readyState){this._onOpenTs=Date.now();var t=e.id;this._socketID=t;var o=Date.now()-this._startTs;be.log("".concat(this._className,"._onOpen cost ").concat(o," ms. socketID:").concat(t)),new Va(Ba.WS_ON_OPEN).setMessage(o).setCostTime(o).setMoreMessage("socketID:".concat(t)).end(),e.id===this._socketID&&(this._readyState=Hr,this._reConnectCount=0,this._resend(),!0===this._reConnectFlag&&(this._channelModule.onReconnected(),this._reConnectFlag=!1),this._channelModule.onOpen());}}},{key:"onClose",value:function value(e){var t=new Va(Ba.WS_ON_CLOSE),o=e.id,n=e.e,a="sourceSocketID:".concat(o," currentSocketID:").concat(this._socketID," code:").concat(n.code," reason:").concat(n.reason),s=0;0!==this._onOpenTs&&(s=Date.now()-this._onOpenTs),t.setMessage(s).setCostTime(s).setMoreMessage(a).setCode(n.code).end(),be.log("".concat(this._className,"._onClose ").concat(a," onlineTime:").concat(s)),o===this._socketID&&(this._readyState=Wr,s<1e3?this._channelModule.onReconnectFailed():this._channelModule.onClose());}},{key:"onError",value:function value(e){var t=e.id,o=e.e,n="sourceSocketID:".concat(t," currentSocketID:").concat(this._socketID);new Va(Ba.WS_ON_ERROR).setMessage(o.errMsg||ut(o)).setMoreMessage(n).setLevel("error").end(),be.warn("".concat(this._className,"._onError"),o,n),t===this._socketID&&(this._readyState="",this._channelModule.onError());}},{key:"onMessage",value:function value(e){var t;try{t=JSON.parse(e.data);}catch(u){new Va(Ba.JSON_PARSE_ERROR).setMessage(e.data).end();}if(t&&t.head){var o=this._getRequestIDFromHead(t.head),n=Gt(t.head),a=Gr(t.body,this._getResponseKeyMap(n));if(be.debug("".concat(this._className,".onMessage ret:").concat(JSON.stringify(a)," requestID:").concat(o," has:").concat(this._promiseMap.has(o))),this._setNextPingTs(),this._promiseMap.has(o)){var s=this._promiseMap.get(o),r=s.resolve,i=s.reject,c=s.timestamp;return this._promiseMap.delete(o),this._calcRTT(c),void(a.errorCode&&0!==a.errorCode?(this._channelModule.onErrorCodeNotZero(a),i(new ls({code:a.errorCode,message:a.errorInfo||"",data:o.includes(Xo)||o.includes(Fn)?{elements:a.elements,messageVersion:a.messageVersion,cloudCustomData:a.cloudCustomData}:void 0}))):r(as(a)));}this._channelModule.onMessage({head:t.head,body:a});}}},{key:"_calcRTT",value:function value(e){var t=Date.now()-e;this._channelModule.getModule(No).addRTT(t);}},{key:"_connect",value:function value(){this._startTs=Date.now(),this._onOpenTs=0,this._socket=new Fr(this),this._socketID=this._socket.getID(),this._readyState=xr,be.log("".concat(this._className,"._connect isWorkerEnabled:").concat(this.getIsWorkerEnabled()," socketID:").concat(this._socketID," url:").concat(this.getURL())),new Va(Ba.WS_CONNECT).setMessage("socketID:".concat(this._socketID," url:").concat(this.getURL())).end();}},{key:"getURL",value:function value(){var e=this._channelModule.getModule(_o);e.isDevMode()&&(this._canIUseBinaryFrame=!1);var t=Ot();(Q||$&&"windows"===t||Z)&&(this._canIUseBinaryFrame=!1);var o=-1;"ios"===t?o=de||-1:"android"===t&&(o=_e||-1);var n=this._channelModule.getPlatform(),a=e.getSDKAppID(),s=e.getInstanceID();return this._canIUseBinaryFrame?"".concat(this._url,"/binfo?sdkappid=").concat(a,"&instanceid=").concat(s,"&random=").concat(this._getRandom(),"&platform=").concat(n,"&host=").concat(t,"&version=").concat(o):"".concat(this._url,"/info?sdkappid=").concat(a,"&instanceid=").concat(s,"&random=").concat(this._getRandom(),"&platform=").concat(n,"&host=").concat(t,"&version=").concat(o);}},{key:"_closeConnection",value:function value(e){be.log("".concat(this._className,"._closeConnection socketID:").concat(this._socketID)),this._socket&&(this._socket.close(e),this._socketID=-1,this._socket=null,this._readyState=Wr);}},{key:"_resend",value:function value(){var e=this;if(be.log("".concat(this._className,"._resend reConnectFlag:").concat(this._reConnectFlag),"promiseMap.size:".concat(this._promiseMap.size," simpleRequestMap.size:").concat(this._simpleRequestMap.size)),this._promiseMap.size>0&&this._promiseMap.forEach(function(t,o){var n=t.uplinkData,a=t.resolve,s=t.reject;e._promiseMap.set(o,{resolve:a,reject:s,timestamp:Date.now(),uplinkData:n}),e._execute(o,n);}),this._simpleRequestMap.size>0){var t,o=C(this._simpleRequestMap);try{for(o.s();!(t=o.n()).done;){var n=m(t.value,2),a=n[0],s=n[1];this._execute(a,s);}}catch(r){o.e(r);}finally{o.f();}this._simpleRequestMap.clear();}}},{key:"send",value:function value(e){var t=this;e.head.seq=this._getSequence(),e.head.reqtime=Math.floor(Date.now()/1e3);e.keyMap;var o=_(e,Br),n=this._getRequestIDFromHead(e.head),a=JSON.stringify(o);return new Promise(function(e,s){(t._promiseMap.set(n,{resolve:e,reject:s,timestamp:Date.now(),uplinkData:a}),be.debug("".concat(t._className,".send uplinkData:").concat(JSON.stringify(o)," requestID:").concat(n," readyState:").concat(t._readyState)),t._readyState!==Hr)?t._reConnect():(t._execute(n,a),t._channelModule.getModule(No).addRequestCount());});}},{key:"simplySend",value:function value(e){e.head.seq=this._getSequence(),e.head.reqtime=Math.floor(Date.now()/1e3);e.keyMap;var t=_(e,Kr),o=this._getRequestIDFromHead(e.head),n=JSON.stringify(t);this._readyState!==Hr?(this._simpleRequestMap.size<this.MAX_SIZE?this._simpleRequestMap.set(o,n):be.log("".concat(this._className,".simplySend. simpleRequestMap is full, drop request!")),this._reConnect()):this._execute(o,n);}},{key:"_execute",value:function value(e,t){this._socket.send({data:t,fail:te?this._onSendFail.bind(this):void 0,requestID:e});}},{key:"_onSendFail",value:function value(e){be.log("".concat(this._className,"._onSendFail requestID:").concat(e));}},{key:"_getSequence",value:function value(){var e;if(this._startSequence<2415919103)return e=this._startSequence,this._startSequence+=1,2415919103===this._startSequence&&(this._startSequence=dt()),e;}},{key:"_getRequestIDFromHead",value:function value(e){return e.servcmd+e.seq;}},{key:"_getResponseKeyMap",value:function value(e){var o=this._channelModule.getKeyMap(e);return t(t({},Or.response),o.response);}},{key:"_reConnect",value:function value(){this._readyState!==Hr&&this._readyState!==xr&&this.forcedReconnect();}},{key:"forcedReconnect",value:function value(){var e=this;be.log("".concat(this._className,".forcedReconnect count:").concat(this._reConnectCount," readyState:").concat(this._readyState)),this._reConnectFlag=!0,this._resetRandom(),this._reConnectCount<this.MAX_RECONNECT_COUNT?(this._reConnectCount+=1,this._closeConnection(Vr),this._initConnection()):(this._reConnectCount=0,this._channelModule.probeNetwork().then(function(t){var o=m(t,2),n=o[0];o[1];n?(be.warn("".concat(e._className,".forcedReconnect disconnected from wsserver but network is ok, continue...")),e._closeConnection(Vr),e._initConnection()):e._channelModule.onReconnectFailed();}));}},{key:"getReconnectFlag",value:function value(){return this._reConnectFlag;}},{key:"_setNextPingTs",value:function value(){this._nextPingTs=Date.now()+1e4;}},{key:"getNextPingTs",value:function value(){return this._nextPingTs;}},{key:"isConnected",value:function value(){return this._readyState===Hr;}},{key:"canIUseBinaryFrame",value:function value(){return this._canIUseBinaryFrame;}},{key:"setIsWorkerEnabled",value:function value(e){be.log("".concat(this._className,".setIsWorkerEnabled flag:").concat(e)),this._isWorkerEnabled=e;}},{key:"getIsWorkerEnabled",value:function value(){return this._isWorkerEnabled&&Te;}},{key:"_getRandom",value:function value(){return 0===this._random&&(this._random=Math.random()),this._random;}},{key:"_resetRandom",value:function value(){this._random=0;}},{key:"close",value:function value(){be.log("".concat(this._className,".close")),this._closeConnection(qr),this._promiseMap.clear(),this._startSequence=dt(),this._readyState=Wr,this._simpleRequestMap.clear(),this._reConnectFlag=!1,this._reConnectCount=0,this._onOpenTs=0,this._url="",this._random=0,this._canIUseBinaryFrame=!0,this._isWorkerEnabled=!0;}}]),e;}(),jr=function(e){i(o,e);var t=f(o);function o(e){var a;if(n(this,o),(a=t.call(this,e))._className="ChannelModule",a._socketHandler=new Yr(g(a)),a._probing=!1,a._isAppShowing=!0,a._previousState=D.NET_STATE_CONNECTED,te&&"function"==typeof ne.onAppShow&&"function"==typeof ne.onAppHide){var s=a._onAppHide.bind(g(a)),r=a._onAppShow.bind(g(a));"function"==typeof ne.offAppHide&&ne.offAppHide(s),"function"==typeof ne.offAppShow&&ne.offAppShow(r),ne.onAppHide(s),ne.onAppShow(r);}return a._timerForNotLoggedIn=-1,a._timerForNotLoggedIn=setInterval(a.onCheckTimer.bind(g(a)),1e3),a._fatalErrorFlag=!1,a;}return s(o,[{key:"onCheckTimer",value:function value(e){this._socketHandler&&(this.isLoggedIn()?(this._timerForNotLoggedIn>0&&(clearInterval(this._timerForNotLoggedIn),this._timerForNotLoggedIn=-1),this._socketHandler.onCheckTimer(e)):this._socketHandler.onCheckTimer(1),this._checkNextPing());}},{key:"onErrorCodeNotZero",value:function value(e){this.getModule(yo).onErrorCodeNotZero(e);}},{key:"onMessage",value:function value(e){this.getModule(yo).onMessage(e);}},{key:"send",value:function value(e){return this._socketHandler?this._previousState!==D.NET_STATE_CONNECTED&&e.head.servcmd.includes(ea)?(this.reConnect(),this._sendLogViaHTTP(e)):this._socketHandler.send(e):Promise.reject();}},{key:"_sendLogViaHTTP",value:function value(e){var t=K.HOST.CURRENT.STAT;return new Promise(function(o,n){var a="".concat(t,"/v4/imopenstat/tim_web_report_v2?sdkappid=").concat(e.head.sdkappid,"&reqtime=").concat(Date.now()),s=JSON.stringify(e.body),r="application/x-www-form-urlencoded;charset=UTF-8";if(te)ne.request({url:a,data:s,method:"POST",timeout:3e3,header:{"content-type":r},success:function success(){o();},fail:function fail(){n(new ls({code:Ca.NETWORK_ERROR,message:Sa.NETWORK_ERROR}));}});else{var i=new XMLHttpRequest(),c=setTimeout(function(){i.abort(),n(new ls({code:Ca.NETWORK_TIMEOUT,message:Sa.NETWORK_TIMEOUT}));},3e3);i.onreadystatechange=function(){4===i.readyState&&(clearTimeout(c),200===i.status||304===i.status?o():n(new ls({code:Ca.NETWORK_ERROR,message:Sa.NETWORK_ERROR})));},i.open("POST",a,!0),i.setRequestHeader("Content-type",r),i.send(s);}});}},{key:"simplySend",value:function value(e){return this._socketHandler?this._socketHandler.simplySend(e):Promise.reject();}},{key:"onOpen",value:function value(){this._ping();}},{key:"onClose",value:function value(){this._socketHandler&&this._socketHandler.getReconnectFlag()&&this._emitNetStateChangeEvent(D.NET_STATE_DISCONNECTED);this.reConnect();}},{key:"onError",value:function value(){te&&!Z&&be.error("".concat(this._className,".onError 从v2.11.2起,SDK 支持了 WebSocket,如您未添加相关受信域名,请先添加!(如已添加请忽略),升级指引: https://web.sdk.qcloud.com/im/doc/zh-cn/tutorial-02-upgradeguideline.html")),this._emitNetStateChangeEvent(D.NET_STATE_DISCONNECTED);}},{key:"getKeyMap",value:function value(e){return this.getModule(yo).getKeyMap(e);}},{key:"_onAppHide",value:function value(){this._isAppShowing=!1;}},{key:"_onAppShow",value:function value(){this._isAppShowing=!0;}},{key:"onRequestTimeout",value:function value(e){}},{key:"onReconnected",value:function value(){be.log("".concat(this._className,".onReconnected")),this.getModule(yo).onReconnected(),this._emitNetStateChangeEvent(D.NET_STATE_CONNECTED);}},{key:"onReconnectFailed",value:function value(){be.log("".concat(this._className,".onReconnectFailed")),this._emitNetStateChangeEvent(D.NET_STATE_DISCONNECTED);}},{key:"setIsWorkerEnabled",value:function value(e){this._socketHandler&&this._socketHandler.setIsWorkerEnabled(!1);}},{key:"offline",value:function value(){this._emitNetStateChangeEvent(D.NET_STATE_DISCONNECTED);}},{key:"reConnect",value:function value(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=!1;this._socketHandler&&(t=this._socketHandler.getReconnectFlag());var o="forcedFlag:".concat(e," fatalErrorFlag:").concat(this._fatalErrorFlag," previousState:").concat(this._previousState," reconnectFlag:").concat(t);if(be.log("".concat(this._className,".reConnect ").concat(o)),!this._fatalErrorFlag&&this._socketHandler){if(!0===e)this._socketHandler.forcedReconnect();else{if(this._previousState===D.NET_STATE_CONNECTING&&t)return;this._socketHandler.forcedReconnect();}this._emitNetStateChangeEvent(D.NET_STATE_CONNECTING);}}},{key:"_emitNetStateChangeEvent",value:function value(e){this._previousState!==e&&(be.log("".concat(this._className,"._emitNetStateChangeEvent from ").concat(this._previousState," to ").concat(e)),this._previousState=e,this.emitOuterEvent(S.NET_STATE_CHANGE,{state:e}));}},{key:"_ping",value:function value(){var e=this;if(!0!==this._probing){this._probing=!0;var t=this.getModule(yo).getProtocolData({protocolName:ta});this.send(t).then(function(){e._probing=!1;}).catch(function(t){if(be.warn("".concat(e._className,"._ping failed. error:"),t),e._probing=!1,t&&60002===t.code)return new Va(Ba.ERROR).setMessage("code:".concat(t.code," message:").concat(t.message)).setNetworkType(e.getModule(fo).getNetworkType()).end(),e._fatalErrorFlag=!0,void e._emitNetStateChangeEvent(D.NET_STATE_DISCONNECTED);e.probeNetwork().then(function(t){var o=m(t,2),n=o[0],a=o[1];be.log("".concat(e._className,"._ping failed. probe network, isAppShowing:").concat(e._isAppShowing," online:").concat(n," networkType:").concat(a)),n?e.reConnect():e._emitNetStateChangeEvent(D.NET_STATE_DISCONNECTED);});});}}},{key:"_checkNextPing",value:function value(){this._socketHandler&&this._socketHandler.isConnected()&&Date.now()>=this._socketHandler.getNextPingTs()&&this._ping();}},{key:"dealloc",value:function value(){this._socketHandler&&(this._socketHandler.close(),this._socketHandler=null),this._timerForNotLoggedIn>-1&&clearInterval(this._timerForNotLoggedIn);}},{key:"onRestApiKickedOut",value:function value(){this._socketHandler&&(this._socketHandler.close(),this.reConnect(!0));}},{key:"reset",value:function value(){be.log("".concat(this._className,".reset")),this._previousState=D.NET_STATE_CONNECTED,this._probing=!1,this._fatalErrorFlag=!1,this._timerForNotLoggedIn=setInterval(this.onCheckTimer.bind(this),1e3);}}]),o;}(Ro),$r=["a2","tinyid"],zr=["a2","tinyid"],Jr=function(){function e(t){n(this,e),this._className="ProtocolHandler",this._sessionModule=t,this._configMap=new Map(),this._fillConfigMap();}return s(e,[{key:"_fillConfigMap",value:function value(){this._configMap.clear();var e=this._sessionModule.genCommonHead(),o=this._sessionModule.genCosSpecifiedHead(),n=this._sessionModule.genSSOReportHead();this._configMap.set(Lo,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.IM_OPEN_STATUS,".").concat(K.CMD.LOGIN)}),body:{state:"Online",isWebUniapp:0,deviceBrand:0},keyMap:{request:{deviceBrand:"InstType"},response:{InstId:"instanceID",HelloInterval:"helloInterval"}}};}(e)),this._configMap.set(ko,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.IM_OPEN_STATUS,".").concat(K.CMD.LOGOUT)}),body:{type:0},keyMap:{request:{type:"wslogout_type"}}};}(e)),this._configMap.set(Go,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.IM_OPEN_STATUS,".").concat(K.CMD.HELLO)}),body:{isWebUniapp:0},keyMap:{response:{NewInstInfo:"newInstanceInfo"}}};}(e)),this._configMap.set(Po,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.STAT_SERVICE,".").concat(K.CMD.KICK_OTHER)}),body:{}};}(e)),this._configMap.set(Xn,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.IM_COS_SIGN,".").concat(K.CMD.COS_SIGN)}),body:{cmd:"open_im_cos_svc",subCmd:"get_cos_token",duration:300,version:2},keyMap:{request:{userSig:"usersig",subCmd:"sub_cmd",cmd:"cmd",duration:"duration",version:"version"},response:{expired_time:"expiredTime",bucket_name:"bucketName",session_token:"sessionToken",tmp_secret_id:"secretId",tmp_secret_key:"secretKey"}}};}(o)),this._configMap.set(Qn,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.CUSTOM_UPLOAD,".").concat(K.CMD.COS_PRE_SIG)}),body:{fileType:void 0,fileName:void 0,uploadMethod:0,duration:900},keyMap:{request:{userSig:"usersig",fileType:"file_type",fileName:"file_name",uploadMethod:"upload_method"},response:{expired_time:"expiredTime",request_id:"requestId",head_url:"headUrl",upload_url:"uploadUrl",download_url:"downloadUrl",ci_url:"ciUrl",snapshot_url:"requestSnapshotUrl"}}};}(o)),this._configMap.set(Zn,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.CUSTOM_UPLOAD,".").concat(K.CMD.VIDEO_COVER)}),body:{version:1,platform:void 0,coverName:void 0,requestSnapshotUrl:void 0},keyMap:{request:{version:"version",platform:"platform",coverName:"cover_name",requestSnapshotUrl:"snapshot_url"},response:{error_code:"errorCode",error_msg:"errorInfo",download_url:"snapshotUrl"}}};}(o)),this._configMap.set(la,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.IM_CONFIG_MANAGER,".").concat(K.CMD.FETCH_COMMERCIAL_CONFIG)}),body:{SDKAppID:0},keyMap:{request:{SDKAppID:"uint32_sdkappid"},response:{int32_error_code:"errorCode",str_error_message:"errorMessage",str_purchase_bits:"purchaseBits",uint32_expired_time:"expiredTime"}}};}(e)),this._configMap.set(da,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.IM_CONFIG_MANAGER,".").concat(K.CMD.PUSHED_COMMERCIAL_CONFIG)}),body:{},keyMap:{response:{int32_error_code:"errorCode",str_error_message:"errorMessage",str_purchase_bits:"purchaseBits",uint32_expired_time:"expiredTime"}}};}(e)),this._configMap.set(ca,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.IM_CONFIG_MANAGER,".").concat(K.CMD.FETCH_CLOUD_CONTROL_CONFIG)}),body:{SDKAppID:0,version:0},keyMap:{request:{SDKAppID:"uint32_sdkappid",version:"uint64_version"},response:{int32_error_code:"errorCode",str_error_message:"errorMessage",str_json_config:"cloudControlConfig",uint32_expired_time:"expiredTime",uint32_sdkappid:"SDKAppID",uint64_version:"version"}}};}(e)),this._configMap.set(ua,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.IM_CONFIG_MANAGER,".").concat(K.CMD.PUSHED_CLOUD_CONTROL_CONFIG)}),body:{},keyMap:{response:{int32_error_code:"errorCode",str_error_message:"errorMessage",str_json_config:"cloudControlConfig",uint32_expired_time:"expiredTime",uint32_sdkappid:"SDKAppID",uint64_version:"version"}}};}(e)),this._configMap.set(pa,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.OVERLOAD_PUSH,".").concat(K.CMD.OVERLOAD_NOTIFY)}),body:{},keyMap:{response:{OverLoadServCmd:"overloadCommand",DelaySecs:"waitingTime"}}};}(e)),this._configMap.set(Uo,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.OPEN_IM,".").concat(K.CMD.GET_MESSAGES)}),body:{cookie:"",syncFlag:0,needAbstract:1,isOnlineSync:0},keyMap:{request:{fromAccount:"From_Account",toAccount:"To_Account",from:"From_Account",to:"To_Account",time:"MsgTimeStamp",sequence:"MsgSeq",random:"MsgRandom",elements:"MsgBody"},response:{MsgList:"messageList",SyncFlag:"syncFlag",To_Account:"to",From_Account:"from",ClientSeq:"clientSequence",MsgSeq:"sequence",NoticeSeq:"noticeSequence",NotifySeq:"notifySequence",MsgRandom:"random",MsgTimeStamp:"time",MsgContent:"content",ToGroupId:"groupID",MsgKey:"messageKey",GroupTips:"groupTips",MsgBody:"elements",MsgType:"type",C2CRemainingUnreadCount:"C2CRemainingUnreadList",C2CPairUnreadCount:"C2CPairUnreadList"}}};}(e)),this._configMap.set(bo,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.OPEN_IM,".").concat(K.CMD.BIG_DATA_HALLWAY_AUTH_KEY)}),body:{}};}(e)),this._configMap.set(wo,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.OPEN_IM,".").concat(K.CMD.SEND_MESSAGE)}),body:{fromAccount:"",toAccount:"",msgSeq:0,msgRandom:0,msgBody:[],cloudCustomData:void 0,nick:"",avatar:"",msgLifeTime:void 0,offlinePushInfo:{pushFlag:0,title:"",desc:"",ext:"",apnsInfo:{badgeMode:0},androidInfo:{OPPOChannelID:""}},messageControlInfo:void 0,clientTime:void 0,needReadReceipt:0},keyMap:{request:{fromAccount:"From_Account",toAccount:"To_Account",msgTimeStamp:"MsgTimeStamp",msgSeq:"MsgSeq",msgRandom:"MsgRandom",msgBody:"MsgBody",count:"MaxCnt",lastMessageTime:"LastMsgTime",messageKey:"MsgKey",peerAccount:"Peer_Account",data:"Data",description:"Desc",extension:"Ext",type:"MsgType",content:"MsgContent",sizeType:"Type",uuid:"UUID",url:"",imageUrl:"URL",fileUrl:"Url",remoteAudioUrl:"Url",remoteVideoUrl:"VideoUrl",thumbUUID:"ThumbUUID",videoUUID:"VideoUUID",videoUrl:"",downloadFlag:"Download_Flag",nick:"From_AccountNick",avatar:"From_AccountHeadurl",from:"From_Account",time:"MsgTimeStamp",messageRandom:"MsgRandom",messageSequence:"MsgSeq",elements:"MsgBody",clientSequence:"ClientSeq",payload:"MsgContent",messageList:"MsgList",messageNumber:"MsgNum",abstractList:"AbstractList",messageBody:"MsgBody",needReadReceipt:"IsNeedReadReceipt"}}};}(e)),this._configMap.set(Fo,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.GROUP,".").concat(K.CMD.SEND_GROUP_MESSAGE)}),body:{fromAccount:"",groupID:"",random:0,clientSequence:0,priority:"",msgBody:[],cloudCustomData:void 0,onlineOnlyFlag:0,offlinePushInfo:{pushFlag:0,title:"",desc:"",ext:"",apnsInfo:{badgeMode:0},androidInfo:{OPPOChannelID:""}},groupAtInfo:[],messageControlInfo:void 0,clientTime:void 0,needReadReceipt:0,topicID:void 0},keyMap:{request:{to:"GroupId",extension:"Ext",data:"Data",description:"Desc",random:"Random",sequence:"ReqMsgSeq",count:"ReqMsgNumber",type:"MsgType",priority:"MsgPriority",content:"MsgContent",elements:"MsgBody",sizeType:"Type",uuid:"UUID",url:"",imageUrl:"URL",fileUrl:"Url",remoteAudioUrl:"Url",remoteVideoUrl:"VideoUrl",thumbUUID:"ThumbUUID",videoUUID:"VideoUUID",videoUrl:"",downloadFlag:"Download_Flag",clientSequence:"ClientSeq",from:"From_Account",time:"MsgTimeStamp",messageRandom:"MsgRandom",messageSequence:"MsgSeq",payload:"MsgContent",messageList:"MsgList",messageNumber:"MsgNum",abstractList:"AbstractList",messageBody:"MsgBody",needReadReceipt:"NeedReadReceipt"},response:{MsgTime:"time",MsgSeq:"sequence"}}};}(e)),this._configMap.set(xo,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.OPEN_IM,".").concat(K.CMD.REVOKE_C2C_MESSAGE)}),body:{msgInfo:{fromAccount:"",toAccount:"",msgTimeStamp:0,msgSeq:0,msgRandom:0}},keyMap:{request:{msgInfo:"MsgInfo",msgTimeStamp:"MsgTimeStamp",msgSeq:"MsgSeq",msgRandom:"MsgRandom"}}};}(e)),this._configMap.set(Cn,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.GROUP,".").concat(K.CMD.REVOKE_GROUP_MESSAGE)}),body:{groupID:"",msgSeqList:void 0,topicID:""},keyMap:{request:{msgSeqList:"MsgSeqList",msgSeq:"MsgSeq"}}};}(e)),this._configMap.set($o,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.OPEN_IM,".").concat(K.CMD.GET_C2C_ROAM_MESSAGES)}),body:{peerAccount:"",count:15,lastMessageTime:0,messageKey:"",withRecalledMessage:1,direction:0},keyMap:{request:{messageKey:"MsgKey",peerAccount:"Peer_Account",count:"MaxCnt",lastMessageTime:"LastMsgTime",withRecalledMessage:"WithRecalledMsg",direction:"GetDirection"},response:{LastMsgTime:"lastMessageTime",IsNeedReadReceipt:"needReadReceipt"}}};}(e)),this._configMap.set(Xo,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.OPEN_IM,".").concat(K.CMD.MODIFY_C2C_MESSAGE)}),body:{from:"",to:"",sequence:0,random:0,time:0,version:0,elements:void 0,cloudCustomData:void 0},keyMap:{request:{sequence:"MsgSeq",random:"MsgRandom",time:"MsgTime",version:"MsgVersion",type:"MsgType",content:"MsgContent"}}};}(e)),this._configMap.set(Nn,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.GROUP,".").concat(K.CMD.GET_GROUP_ROAM_MESSAGES)}),body:{withRecalledMsg:1,groupID:"",count:15,sequence:"",topicID:void 0},keyMap:{request:{sequence:"ReqMsgSeq",count:"ReqMsgNumber",withRecalledMessage:"WithRecalledMsg"},response:{Random:"random",MsgTime:"time",MsgSeq:"sequence",ReqMsgSeq:"sequence",RspMsgList:"messageList",IsPlaceMsg:"isPlaceMessage",IsSystemMsg:"isSystemMessage",ToGroupId:"to",EnumFrom_AccountType:"fromAccountType",EnumTo_AccountType:"toAccountType",GroupCode:"groupCode",MsgPriority:"priority",MsgBody:"elements",MsgType:"type",MsgContent:"content",IsFinished:"complete",Download_Flag:"downloadFlag",ClientSeq:"clientSequence",ThumbUUID:"thumbUUID",VideoUUID:"videoUUID",ToTopicId:"topicID"}}};}(e)),this._configMap.set(Wo,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.OPEN_IM,".").concat(K.CMD.SET_C2C_MESSAGE_READ)}),body:{C2CMsgReaded:void 0},keyMap:{request:{lastMessageTime:"LastedMsgTime"}}};}(e)),this._configMap.set(Yo,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.OPEN_IM,".").concat(K.CMD.SET_C2C_PEER_MUTE_NOTIFICATIONS)}),body:{userIDList:void 0,muteFlag:0},keyMap:{request:{userIDList:"Peer_Account",muteFlag:"Mute_Notifications"}}};}(e)),this._configMap.set(jo,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.OPEN_IM,".").concat(K.CMD.GET_C2C_PEER_MUTE_NOTIFICATIONS)}),body:{updateSequence:0},keyMap:{response:{MuteNotificationsList:"muteFlagList"}}};}(e)),this._configMap.set(Sn,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.GROUP,".").concat(K.CMD.SET_GROUP_MESSAGE_READ)}),body:{groupID:void 0,messageReadSeq:void 0,topicID:void 0},keyMap:{request:{messageReadSeq:"MsgReadedSeq"}}};}(e)),this._configMap.set(Dn,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.OPEN_IM,".").concat(K.CMD.SET_ALL_MESSAGE_READ)}),body:{readAllC2CMessage:0,groupMessageReadInfoList:[]},keyMap:{request:{readAllC2CMessage:"C2CReadAllMsg",groupMessageReadInfoList:"GroupReadInfo",messageSequence:"MsgSeq"},response:{C2CReadAllMsg:"readAllC2CMessage",GroupReadInfoArray:"groupMessageReadInfoList"}}};}(e)),this._configMap.set(Jo,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.OPEN_IM,".").concat(K.CMD.DELETE_C2C_MESSAGE)}),body:{fromAccount:"",to:"",keyList:void 0},keyMap:{request:{keyList:"MsgKeyList"}}};}(e)),this._configMap.set(wn,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.GROUP,".").concat(K.CMD.DELETE_GROUP_MESSAGE)}),body:{groupID:"",deleter:"",keyList:void 0,topicID:void 0},keyMap:{request:{deleter:"Deleter_Account",keyList:"Seqs"}}};}(e)),this._configMap.set(Fn,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.OPEN_IM,".").concat(K.CMD.MODIFY_GROUP_MESSAGE)}),body:{groupID:"",topicID:void 0,sequence:0,version:0,elements:void 0,cloudCustomData:void 0},keyMap:{request:{sequence:"MsgSeq",version:"MsgVersion",type:"MsgType",content:"MsgContent"}}};}(e)),this._configMap.set(An,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.GROUP,".").concat(K.CMD.GET_READ_RECEIPT)}),body:{groupID:"",sequenceList:void 0},keyMap:{request:{sequence:"MsgSeq"}}};}(e)),this._configMap.set(Rn,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.OPEN_IM,".").concat(K.CMD.SEND_C2C_READ_RECEIPT)}),body:{peerAccount:"",messageInfoList:void 0},keyMap:{request:{peerAccount:"Peer_Account",messageInfoList:"C2CMsgInfo",fromAccount:"From_Account",toAccount:"To_Account",sequence:"MsgSeq",random:"MsgRandom",time:"MsgTime",clientTime:"MsgClientTime"}}};}(e)),this._configMap.set(On,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.GROUP,".").concat(K.CMD.SEND_READ_RECEIPT)}),body:{groupID:"",sequenceList:void 0},keyMap:{request:{sequenceList:"MsgSeqList",sequence:"MsgSeq"}}};}(e)),this._configMap.set(Ln,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.GROUP,".").concat(K.CMD.GET_READ_RECEIPT_DETAIL)}),body:{groupID:"",sequence:void 0,flag:0,cursor:0,count:0},keyMap:{request:{sequence:"MsgSeq",count:"Num"},response:{ReadList:"readUserIDList",Read_Account:"userID",UnreadList:"unreadUserIDList",Unread_Account:"userID",IsFinish:"isCompleted"}}};}(e)),this._configMap.set(zo,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.OPEN_IM,".").concat(K.CMD.GET_PEER_READ_TIME)}),body:{userIDList:void 0},keyMap:{request:{userIDList:"To_Account"},response:{ReadTime:"peerReadTimeList"}}};}(e)),this._configMap.set(Zo,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.RECENT_CONTACT,".").concat(K.CMD.GET_CONVERSATION_LIST)}),body:{fromAccount:void 0,count:0},keyMap:{request:{},response:{SessionItem:"conversations",ToAccount:"groupID",To_Account:"userID",UnreadMsgCount:"unreadCount",MsgGroupReadedSeq:"messageReadSeq",C2cPeerReadTime:"c2cPeerReadTime"}}};}(e)),this._configMap.set(Qo,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.RECENT_CONTACT,".").concat(K.CMD.PAGING_GET_CONVERSATION_LIST)}),body:{fromAccount:void 0,timeStamp:void 0,startIndex:void 0,pinnedTimeStamp:void 0,pinnedStartIndex:void 0,orderType:void 0,messageAssistFlag:4,assistFlag:15},keyMap:{request:{messageAssistFlag:"MsgAssistFlags",assistFlag:"AssistFlags",pinnedTimeStamp:"TopTimeStamp",pinnedStartIndex:"TopStartIndex"},response:{SessionItem:"conversations",ToAccount:"groupID",To_Account:"userID",UnreadMsgCount:"unreadCount",MsgGroupReadedSeq:"messageReadSeq",C2cPeerReadTime:"c2cPeerReadTime",LastMsgFlags:"lastMessageFlag",TopFlags:"isPinned",TopTimeStamp:"pinnedTimeStamp",TopStartIndex:"pinnedStartIndex",GroupId:"convGroupID"}}};}(e)),this._configMap.set(en,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.RECENT_CONTACT,".").concat(K.CMD.DELETE_CONVERSATION)}),body:{fromAccount:"",toAccount:void 0,type:1,toGroupID:void 0,clearHistoryMessage:1},keyMap:{request:{toGroupID:"ToGroupid",clearHistoryMessage:"ClearRamble"}}};}(e)),this._configMap.set(tn,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.RECENT_CONTACT,".").concat(K.CMD.PIN_CONVERSATION)}),body:{fromAccount:"",operationType:1,itemList:void 0},keyMap:{request:{itemList:"RecentContactItem"}}};}(e)),this._configMap.set(on,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.OPEN_IM,".").concat(K.CMD.DELETE_GROUP_AT_TIPS)}),body:{messageListToDelete:void 0},keyMap:{request:{messageListToDelete:"DelMsgList",messageSeq:"MsgSeq",messageRandom:"MsgRandom"}}};}(e)),this._configMap.set(nn,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.RECENT_CONTACT,".").concat(K.CMD.MARK_CONVERSATION)}),body:{fromAccount:"",itemList:void 0},keyMap:{request:{itemList:"MarkItem",operationType:"OptType",groupID:"ToGroupId"},response:{ToGroupId:"groupID",OptType:"operationType"}}};}(e)),this._configMap.set(an,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.RECENT_CONTACT,".").concat(K.CMD.MARK_CONVERSATION)}),body:{fromAccount:"",itemList:void 0},keyMap:{request:{itemList:"MarkItem",operationType:"OptType",groupID:"ToGroupId"},response:{ToGroupId:"groupID",OptType:"operationType"}}};}(e)),this._configMap.set(sn,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.RECENT_CONTACT,".").concat(K.CMD.CREATE_CONVERSATION_GROUP)}),body:{fromAccount:"",itemList:void 0},keyMap:{request:{itemList:"GroupContactItem",groupID:"ToGroupId"},response:{GroupId:"convGroupID",ToGroupId:"groupID",OptType:"operationType"}}};}(e)),this._configMap.set(rn,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.RECENT_CONTACT,".").concat(K.CMD.DELETE_CONVERSATION_GROUP)}),body:{fromAccount:"",groupName:void 0},keyMap:{request:{},response:{GroupId:"convGroupID"}}};}(e)),this._configMap.set(cn,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.RECENT_CONTACT,".").concat(K.CMD.UPDATE_CONVERSATION_GROUP)}),body:{fromAccount:"",updateType:void 0,updateGroup:void 0},keyMap:{request:{oldName:"OldGroupName",newName:"NewGroupName",groupID:"ToGroupId",operationType:"ContactOptType",groupName:"OldGroupName",updateItem:"ContactUpdateItem"},response:{ContactOptType:"operationType",ToGroupId:"groupID",GroupId:"convGroupID"}}};}(e)),this._configMap.set(un,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.RECENT_CONTACT,".").concat(K.CMD.UPDATE_CONVERSATION_GROUP)}),body:{fromAccount:"",updateType:void 0,updateGroup:{groupName:void 0,updateGroupType:void 0,updateItem:void 0}},keyMap:{request:{},response:{}}};}(e)),this._configMap.set(ln,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.RECENT_CONTACT,".").concat(K.CMD.UPDATE_CONVERSATION_GROUP)}),body:{fromAccount:"",updateType:void 0,updateGroup:void 0},keyMap:{request:{},response:{}}};}(e)),this._configMap.set(dn,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.RECENT_CONTACT,".").concat(K.CMD.GET_CONVERSATION_GROUP_LIST)}),body:{fromAccount:"",startTime:void 0,startIndex:void 0},keyMap:{request:{},response:{GroupId:"convGroupID",ToGroupId:"groupID",OptType:"operationType",CustomMark:"customData",ContactGroupId:"convGroupIDList"}}};}(e)),this._configMap.set(qo,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.PROFILE,".").concat(K.CMD.PORTRAIT_GET)}),body:{fromAccount:"",userItem:[]},keyMap:{request:{toAccount:"To_Account",standardSequence:"StandardSequence",customSequence:"CustomSequence"}}};}(e)),this._configMap.set(Vo,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.PROFILE,".").concat(K.CMD.PORTRAIT_SET)}),body:{fromAccount:"",profileItem:[{tag:Fe.NICK,value:""},{tag:Fe.GENDER,value:""},{tag:Fe.ALLOWTYPE,value:""},{tag:Fe.AVATAR,value:""}]},keyMap:{request:{toAccount:"To_Account",standardSequence:"StandardSequence",customSequence:"CustomSequence"}}};}(e)),this._configMap.set(Bo,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.FRIEND,".").concat(K.CMD.GET_BLACKLIST)}),body:{fromAccount:"",startIndex:0,maxLimited:30,lastSequence:0},keyMap:{response:{CurruentSequence:"currentSequence"}}};}(e)),this._configMap.set(Ko,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.FRIEND,".").concat(K.CMD.ADD_BLACKLIST)}),body:{fromAccount:"",toAccount:[]}};}(e)),this._configMap.set(Ho,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.FRIEND,".").concat(K.CMD.DELETE_BLACKLIST)}),body:{fromAccount:"",toAccount:[]}};}(e)),this._configMap.set(ma,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.IM_OPEN_STATUS,".").concat(K.CMD.SET_SELF_STATUS)}),body:{customStatus:""},keyMap:{}};}(e)),this._configMap.set(Ma,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.IM_OPEN_STATUS,".").concat(K.CMD.GET_USER_STATUS)}),body:{userIDList:void 0},keyMap:{response:{UserStatusList:"successUserList",ErrorList:"failureUserList",To_Account:"userID",Invalid_Account:"invalidUserID",Status:"statusType"}}};}(e)),this._configMap.set(va,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.IM_OPEN_STATUS,".").concat(K.CMD.SUBSCRIBE_USER_STATUS)}),body:{userIDList:void 0},keyMap:{response:{ErrorList:"failureUserList",To_Account:"userID",Invalid_Account:"invalidUserID"}}};}(e)),this._configMap.set(Ia,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.IM_OPEN_STATUS,".").concat(K.CMD.UNSUBSCRIBE_USER_STATUS)}),body:{userIDList:void 0,unsubscribeAll:void 0},keyMap:{response:{ErrorList:"failureUserList",To_Account:"userID",Invalid_Account:"invalidUserID"}}};}(e)),this._configMap.set(pn,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.GROUP,".").concat(K.CMD.GET_JOINED_GROUPS)}),body:{memberAccount:"",limit:void 0,offset:void 0,groupType:void 0,responseFilter:{groupBaseInfoFilter:void 0,selfInfoFilter:void 0},isSupportTopic:0},keyMap:{request:{memberAccount:"Member_Account"},response:{GroupIdList:"groups",NoUnreadSeqList:"excludedUnreadSequenceList",MsgSeq:"readedSequence"}}};}(e)),this._configMap.set(_n,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.GROUP,".").concat(K.CMD.GET_GROUP_INFO)}),body:{groupIDList:void 0,responseFilter:{groupBaseInfoFilter:["Type","Name","Introduction","Notification","FaceUrl","Owner_Account","CreateTime","InfoSeq","LastInfoTime","LastMsgTime","MemberNum","MaxMemberNum","ApplyJoinOption","NextMsgSeq","ShutUpAllMember"],groupCustomFieldFilter:void 0,memberInfoFilter:void 0,memberCustomFieldFilter:void 0}},keyMap:{request:{groupIDList:"GroupIdList",groupCustomField:"AppDefinedData",memberCustomField:"AppMemberDefinedData",groupCustomFieldFilter:"AppDefinedDataFilter_Group",memberCustomFieldFilter:"AppDefinedDataFilter_GroupMember"},response:{GroupIdList:"groups",AppDefinedData:"groupCustomField",AppMemberDefinedData:"memberCustomField",AppDefinedDataFilter_Group:"groupCustomFieldFilter",AppDefinedDataFilter_GroupMember:"memberCustomFieldFilter",InfoSeq:"infoSequence",MemberList:"members",GroupInfo:"groups",ShutUpUntil:"muteUntil",ShutUpAllMember:"muteAllMembers"}}};}(e)),this._configMap.set(gn,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.GROUP,".").concat(K.CMD.CREATE_GROUP)}),body:{type:void 0,name:void 0,groupID:void 0,ownerID:void 0,introduction:void 0,notification:void 0,maxMemberNum:void 0,joinOption:void 0,memberList:void 0,groupCustomField:void 0,memberCustomField:void 0,webPushFlag:1,avatar:"",isSupportTopic:void 0},keyMap:{request:{ownerID:"Owner_Account",userID:"Member_Account",avatar:"FaceUrl",maxMemberNum:"MaxMemberCount",joinOption:"ApplyJoinOption",groupCustomField:"AppDefinedData",memberCustomField:"AppMemberDefinedData"},response:{HugeGroupFlag:"avChatRoomFlag",OverJoinedGroupLimit_Account:"overLimitUserIDList"}}};}(e)),this._configMap.set(hn,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.GROUP,".").concat(K.CMD.DESTROY_GROUP)}),body:{groupID:void 0}};}(e)),this._configMap.set(fn,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.GROUP,".").concat(K.CMD.MODIFY_GROUP_INFO)}),body:{groupID:void 0,name:void 0,introduction:void 0,notification:void 0,avatar:void 0,maxMemberNum:void 0,joinOption:void 0,groupCustomField:void 0,muteAllMembers:void 0},keyMap:{request:{maxMemberNum:"MaxMemberCount",groupCustomField:"AppDefinedData",muteAllMembers:"ShutUpAllMember",joinOption:"ApplyJoinOption",avatar:"FaceUrl"},response:{AppDefinedData:"groupCustomField",ShutUpAllMember:"muteAllMembers"}}};}(e)),this._configMap.set(mn,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.GROUP,".").concat(K.CMD.APPLY_JOIN_GROUP)}),body:{groupID:void 0,applyMessage:void 0,userDefinedField:void 0,webPushFlag:1,historyMessageFlag:void 0},keyMap:{request:{applyMessage:"ApplyMsg",historyMessageFlag:"HugeGroupHistoryMsgFlag"},response:{HugeGroupFlag:"avChatRoomFlag",AVChatRoomKey:"avChatRoomKey",RspMsgList:"messageList",ToGroupId:"to"}}};}(e)),this._configMap.set(Mn,function(e){e.a2,e.tinyid;return{head:t(t({},_(e,$r)),{},{servcmd:"".concat(K.NAME.BIG_GROUP_NO_AUTH,".").concat(K.CMD.APPLY_JOIN_GROUP)}),body:{groupID:void 0,applyMessage:void 0,userDefinedField:void 0,webPushFlag:1},keyMap:{request:{applyMessage:"ApplyMsg"},response:{HugeGroupFlag:"avChatRoomFlag"}}};}(e)),this._configMap.set(vn,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.GROUP,".").concat(K.CMD.QUIT_GROUP)}),body:{groupID:void 0}};}(e)),this._configMap.set(In,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.GROUP,".").concat(K.CMD.SEARCH_GROUP_BY_ID)}),body:{groupIDList:void 0,responseFilter:{groupBasePublicInfoFilter:["Type","Name","Introduction","Notification","FaceUrl","CreateTime","Owner_Account","LastInfoTime","LastMsgTime","NextMsgSeq","MemberNum","MaxMemberNum","ApplyJoinOption"]}},keyMap:{response:{}}};}(e)),this._configMap.set(yn,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.GROUP,".").concat(K.CMD.CHANGE_GROUP_OWNER)}),body:{groupID:void 0,newOwnerID:void 0},keyMap:{request:{newOwnerID:"NewOwner_Account"}}};}(e)),this._configMap.set(Tn,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.GROUP,".").concat(K.CMD.HANDLE_APPLY_JOIN_GROUP)}),body:{groupID:void 0,applicant:void 0,handleAction:void 0,handleMessage:void 0,authentication:void 0,messageKey:void 0,userDefinedField:void 0},keyMap:{request:{applicant:"Applicant_Account",handleAction:"HandleMsg",handleMessage:"ApprovalMsg",messageKey:"MsgKey"}}};}(e)),this._configMap.set(En,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.GROUP,".").concat(K.CMD.HANDLE_GROUP_INVITATION)}),body:{groupID:void 0,inviter:void 0,handleAction:void 0,handleMessage:void 0,authentication:void 0,messageKey:void 0,userDefinedField:void 0},keyMap:{request:{inviter:"Inviter_Account",handleAction:"HandleMsg",handleMessage:"ApprovalMsg",messageKey:"MsgKey"}}};}(e)),this._configMap.set(kn,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.GROUP,".").concat(K.CMD.GET_GROUP_APPLICATION)}),body:{startTime:void 0,limit:void 0,handleAccount:void 0},keyMap:{request:{handleAccount:"Handle_Account"}}};}(e)),this._configMap.set(Gn,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.OPEN_IM,".").concat(K.CMD.DELETE_GROUP_SYSTEM_MESSAGE)}),body:{messageListToDelete:void 0},keyMap:{request:{messageListToDelete:"DelMsgList",messageSeq:"MsgSeq",messageRandom:"MsgRandom"}}};}(e)),this._configMap.set(Pn,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.BIG_GROUP_LONG_POLLING,".").concat(K.CMD.AVCHATROOM_LONG_POLL)}),body:{USP:1,startSeq:1,startBroadcastSeq:void 0,holdTime:90,key:void 0},keyMap:{request:{USP:"USP"},response:{ToGroupId:"groupID",RspBroadcastMsgList:"broadcastMessageList",IsSystemMsg:"isSystemMessage"}}};}(e)),this._configMap.set(Un,function(e){e.a2,e.tinyid;return{head:t(t({},_(e,zr)),{},{servcmd:"".concat(K.NAME.BIG_GROUP_LONG_POLLING_NO_AUTH,".").concat(K.CMD.AVCHATROOM_LONG_POLL)}),body:{USP:1,startSeq:1,holdTime:90,key:void 0},keyMap:{request:{USP:"USP"},response:{ToGroupId:"groupID"}}};}(e)),this._configMap.set(bn,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.GROUP,".").concat(K.CMD.GET_ONLINE_MEMBER_NUM)}),body:{groupID:void 0}};}(e)),this._configMap.set(qn,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.GROUP,".").concat(K.CMD.SET_GROUP_ATTRIBUTES)}),body:{groupID:void 0,groupAttributeList:void 0,mainSequence:void 0,avChatRoomKey:void 0,attributeControl:["RaceConflict"]},keyMap:{request:{key:"key",value:"value"}}};}(e)),this._configMap.set(Vn,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.GROUP,".").concat(K.CMD.MODIFY_GROUP_ATTRIBUTES)}),body:{groupID:void 0,groupAttributeList:void 0,mainSequence:void 0,avChatRoomKey:void 0,attributeControl:["RaceConflict"]},keyMap:{request:{key:"key",value:"value"}}};}(e)),this._configMap.set(Bn,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.GROUP,".").concat(K.CMD.DELETE_GROUP_ATTRIBUTES)}),body:{groupID:void 0,groupAttributeList:void 0,mainSequence:void 0,avChatRoomKey:void 0,attributeControl:["RaceConflict"]},keyMap:{request:{key:"key"}}};}(e)),this._configMap.set(Kn,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.GROUP,".").concat(K.CMD.CLEAR_GROUP_ATTRIBUTES)}),body:{groupID:void 0,mainSequence:void 0,avChatRoomKey:void 0,attributeControl:["RaceConflict"]}};}(e)),this._configMap.set(Hn,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.GROUP_ATTR,".").concat(K.CMD.GET_GROUP_ATTRIBUTES)}),body:{groupID:void 0,avChatRoomKey:void 0,groupType:1},keyMap:{request:{avChatRoomKey:"Key",groupType:"GroupType"}}};}(e)),this._configMap.set(_a,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.GROUP_COMMUNITY,".").concat(K.CMD.CREATE_TOPIC)}),body:{groupID:void 0,topicName:void 0,avatar:void 0,customData:void 0,topicID:void 0,notification:void 0,introduction:void 0},keyMap:{request:{avatar:"FaceUrl"}}};}(e)),this._configMap.set(ga,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.GROUP_COMMUNITY,".").concat(K.CMD.DELETE_TOPIC)}),body:{groupID:void 0,topicIDList:void 0},keyMap:{request:{topicIDList:"TopicIdList"},response:{DestroyResultItem:"resultList"}}};}(e)),this._configMap.set(ha,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.GROUP_COMMUNITY,".").concat(K.CMD.UPDATE_TOPIC_PROFILE)}),body:{groupID:void 0,topicID:void 0,avatar:void 0,customData:void 0,notification:void 0,introduction:void 0,muteAllMembers:void 0,topicName:void 0},keyMap:{request:{avatar:"FaceUrl",muteAllMembers:"ShutUpAllMember"}}};}(e)),this._configMap.set(fa,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.GROUP_COMMUNITY,".").concat(K.CMD.GET_TOPIC_LIST)}),body:{groupID:void 0,topicIDList:void 0},keyMap:{request:{topicIDList:"TopicIdList"},response:{TopicAndSelfInfo:"topicInfoList",TopicInfo:"topic",GroupID:"groupID",ShutUpTime:"muteTime",ShutUpAllFlag:"muteAllMembers",LastMsgTime:"lastMessageTime",MsgSeq:"readedSequence",LastMsgSeq:"sequence"}}};}(e)),this._configMap.set(xn,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.GROUP,".").concat(K.CMD.GET_GROUP_MEMBER_LIST)}),body:{groupID:void 0,limit:0,offset:void 0,next:void 0,memberRoleFilter:void 0,memberInfoFilter:["Role","NameCard","ShutUpUntil","JoinTime"],memberCustomFieldFilter:void 0},keyMap:{request:{memberCustomFieldFilter:"AppDefinedDataFilter_GroupMember"},response:{AppMemberDefinedData:"memberCustomField",AppDefinedDataFilter_GroupMember:"memberCustomFieldFilter",MemberList:"members",ShutUpUntil:"muteUntil"}}};}(e)),this._configMap.set(Wn,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.GROUP_AVCHATROOM,".").concat(K.CMD.GET_AVCHATROOM_MEMBER_LIST)}),body:{groupID:void 0,offset:void 0},keyMap:{request:{offset:"Timestamp"},response:{NextTimestamp:"offset"}}};}(e)),this._configMap.set(Yn,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.GROUP,".").concat(K.CMD.GET_GROUP_MEMBER_INFO)}),body:{groupID:void 0,userIDList:void 0,memberInfoFilter:void 0,memberCustomFieldFilter:void 0},keyMap:{request:{userIDList:"Member_List_Account",memberCustomFieldFilter:"AppDefinedDataFilter_GroupMember"},response:{MemberList:"members",ShutUpUntil:"muteUntil",AppDefinedDataFilter_GroupMember:"memberCustomFieldFilter",AppMemberDefinedData:"memberCustomField"}}};}(e)),this._configMap.set(jn,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.GROUP,".").concat(K.CMD.ADD_GROUP_MEMBER)}),body:{groupID:void 0,silence:void 0,userIDList:void 0},keyMap:{request:{userID:"Member_Account",userIDList:"MemberList"},response:{MemberList:"members"}}};}(e)),this._configMap.set($n,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.GROUP,".").concat(K.CMD.DELETE_GROUP_MEMBER)}),body:{groupID:void 0,userIDList:void 0,reason:void 0},keyMap:{request:{userIDList:"MemberToDel_Account"}}};}(e)),this._configMap.set(zn,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.GROUP,".").concat(K.CMD.BAN_AVCHATROOM_MEMBER)}),body:{groupID:void 0,userIDList:void 0,duration:void 0,reason:""},keyMap:{request:{userIDList:"Members_Account",duration:"Duration",reason:"Description"}}};}(e)),this._configMap.set(Jn,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.GROUP,".").concat(K.CMD.MODIFY_GROUP_MEMBER_INFO)}),body:{groupID:void 0,topicID:void 0,userID:void 0,messageRemindType:void 0,nameCard:void 0,role:void 0,memberCustomField:void 0,muteTime:void 0},keyMap:{request:{userID:"Member_Account",memberCustomField:"AppMemberDefinedData",muteTime:"ShutUpTime",messageRemindType:"MsgFlag"}}};}(e)),this._configMap.set(ea,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.IM_OPEN_STAT,".").concat(K.CMD.TIM_WEB_REPORT_V2)}),body:{header:{},event:[],quality:[]},keyMap:{request:{SDKType:"sdk_type",SDKVersion:"sdk_version",deviceType:"device_type",platform:"platform",instanceID:"instance_id",traceID:"trace_id",SDKAppID:"sdk_app_id",userID:"user_id",tinyID:"tiny_id",extension:"extension",timestamp:"timestamp",networkType:"network_type",eventType:"event_type",code:"error_code",message:"error_message",moreMessage:"more_message",duplicate:"duplicate",costTime:"cost_time",level:"level",qualityType:"quality_type",reportIndex:"report_index",wholePeriod:"whole_period",totalCount:"total_count",rttCount:"success_count_business",successRateOfRequest:"percent_business",countLessThan1Second:"success_count_business",percentOfCountLessThan1Second:"percent_business",countLessThan3Second:"success_count_platform",percentOfCountLessThan3Second:"percent_platform",successCountOfBusiness:"success_count_business",successRateOfBusiness:"percent_business",successCountOfPlatform:"success_count_platform",successRateOfPlatform:"percent_platform",successCountOfMessageReceived:"success_count_business",successRateOfMessageReceived:"percent_business",avgRTT:"average_value",avgDelay:"average_value",avgValue:"average_value",uiPlatform:"ui_platform"}}};}(n)),this._configMap.set(ta,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.HEARTBEAT,".").concat(K.CMD.ALIVE)}),body:{}};}(e)),this._configMap.set(oa,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.IM_OPEN_PUSH,".").concat(K.CMD.MESSAGE_PUSH)}),body:{},keyMap:{response:{C2cMsgArray:"C2CMessageArray",GroupMsgArray:"groupMessageArray",GroupTips:"groupTips",C2cNotifyMsgArray:"C2CNotifyMessageArray",C2cMsgInfo:"C2CReadReceiptArray",ClientSeq:"clientSequence",MsgPriority:"priority",NoticeSeq:"noticeSequence",MsgContent:"content",MsgType:"type",MsgBody:"elements",ToGroupId:"to",Desc:"description",Ext:"extension",IsSyncMsg:"isSyncMessage",Flag:"needSync",NeedAck:"needAck",PendencyAdd_Account:"userID",ProfileImNick:"nick",PendencyType:"applicationType",C2CReadAllMsg:"readAllC2CMessage",IsNeedReadReceipt:"needReadReceipt",Status:"statusType"}}};}(e)),this._configMap.set(na,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.IM_OPEN_PUSH,".").concat(K.CMD.MULTI_MESSAGE_PUSH)}),body:{},keyMap:{response:{GroupMsgArray:"groupMessageArray",GroupTips:"groupTips",ClientSeq:"clientSequence",MsgPriority:"priority",NoticeSeq:"noticeSequence",MsgContent:"content",MsgType:"type",MsgBody:"elements",ToGroupId:"to",Desc:"description",Ext:"extension",IsSyncMsg:"isSyncMessage",Flag:"needSync",NeedAck:"needAck",PendencyType:"applicationType"}}};}(e)),this._configMap.set(aa,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.OPEN_IM,".").concat(K.CMD.MESSAGE_PUSH_ACK)}),body:{sessionData:void 0},keyMap:{request:{sessionData:"SessionData"}}};}(e)),this._configMap.set(sa,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.IM_OPEN_STATUS,".").concat(K.CMD.STATUS_FORCE_OFFLINE)}),body:{},keyMap:{response:{C2cNotifyMsgArray:"C2CNotifyMessageArray",NoticeSeq:"noticeSequence",KickoutMsgNotify:"kickoutMsgNotify",NewInstInfo:"newInstanceInfo"}}};}(e)),this._configMap.set(ia,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.IM_LONG_MESSAGE,".").concat(K.CMD.DOWNLOAD_MERGER_MESSAGE)}),body:{downloadKey:""},keyMap:{response:{Data:"data",Desc:"description",Ext:"extension",Download_Flag:"downloadFlag",ThumbUUID:"thumbUUID",VideoUUID:"videoUUID"}}};}(e)),this._configMap.set(ra,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.IM_LONG_MESSAGE,".").concat(K.CMD.UPLOAD_MERGER_MESSAGE)}),body:{messageList:[]},keyMap:{request:{fromAccount:"From_Account",toAccount:"To_Account",msgTimeStamp:"MsgTimeStamp",msgSeq:"MsgSeq",msgRandom:"MsgRandom",msgBody:"MsgBody",type:"MsgType",content:"MsgContent",data:"Data",description:"Desc",extension:"Ext",sizeType:"Type",uuid:"UUID",url:"",imageUrl:"URL",fileUrl:"Url",remoteAudioUrl:"Url",remoteVideoUrl:"VideoUrl",thumbUUID:"ThumbUUID",videoUUID:"VideoUUID",videoUrl:"",downloadFlag:"Download_Flag",from:"From_Account",time:"MsgTimeStamp",messageRandom:"MsgRandom",messageSequence:"MsgSeq",elements:"MsgBody",clientSequence:"ClientSeq",payload:"MsgContent",messageList:"MsgList",messageNumber:"MsgNum",abstractList:"AbstractList",messageBody:"MsgBody"}}};}(e)),this._configMap.set(Ea,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.IM_OPEN_STATUS,".").concat(K.CMD.SET_TOKEN)}),body:{tokenID:"",pushMsg:0,sdkAppID:0,businessID:"",deviceBrand:"",deviceToken:"",isTpns:0,isWebUniapp:0},keyMap:{request:{tokenID:"TokenID",pushMsg:"PushMsg",sdkAppID:"EnterVersion",businessID:"BusiID",deviceBrand:"InstType",deviceToken:"VarToken",isTpns:"IsTpns"}}};}(e)),this._configMap.set(Ta,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.IM_OPEN_STATUS,".").concat(K.CMD.STAT_FOREGROUND)}),body:{isWebUniapp:0}};}(e)),this._configMap.set(ya,function(e){return{head:t(t({},e),{},{servcmd:"".concat(K.NAME.IM_OPEN_STATUS,".").concat(K.CMD.STAT_BACKGROUND)}),body:{C2CUnread:0,GroupUnread:0,isWebUniapp:0},keyMap:{request:{c2cUnreadCount:"C2cUnread",groupUnreadCount:"GrpUnread"}}};}(e));}},{key:"has",value:function value(e){return this._configMap.has(e);}},{key:"get",value:function value(e){return this._configMap.get(e);}},{key:"update",value:function value(){this._fillConfigMap();}},{key:"getKeyMap",value:function value(e){return this.has(e)?this.get(e).keyMap||{}:(be.warn("".concat(this._className,".getKeyMap unknown protocolName:").concat(e)),{});}},{key:"getProtocolData",value:function value(e){var t=e.protocolName,o=e.requestData,n=this.get(t),a=null;if(o){var s=this._simpleDeepCopy(n),r=this._updateService(o,s),i=r.body,c=Object.create(null);for(var u in i){if(Object.prototype.hasOwnProperty.call(i,u)){if(c[u]=i[u],void 0===o[u])continue;c[u]=o[u];}}r.body=c,a=this._getUplinkData(r);}else a=this._getUplinkData(n);return a;}},{key:"_getUplinkData",value:function value(e){var t=this._requestDataCleaner(e),o=Gt(t.head),n=kr(t.body,this._getRequestKeyMap(o));return t.body=n,t;}},{key:"_updateService",value:function value(e,t){var o=Gt(t.head);if(t.head.servcmd.includes(K.NAME.GROUP)){var n=e.type,a=e.groupID,s=void 0===a?void 0:a,r=e.groupIDList,i=void 0===r?[]:r;Ze(s)&&(s=i[0]||""),yt({type:n,groupID:s})&&(t.head.servcmd="".concat(K.NAME.GROUP_COMMUNITY,".").concat(o));}return t;}},{key:"_getRequestKeyMap",value:function value(e){var o=this.getKeyMap(e);return t(t({},Or.request),o.request);}},{key:"_requestDataCleaner",value:function value(e){var t=Array.isArray(e)?[]:Object.create(null);for(var n in e){Object.prototype.hasOwnProperty.call(e,n)&&st(n)&&null!==e[n]&&void 0!==e[n]&&("object"!==o(e[n])?t[n]=e[n]:t[n]=this._requestDataCleaner.bind(this)(e[n]));}return t;}},{key:"_simpleDeepCopy",value:function value(e){for(var t,o=Object.keys(e),n={},a=0,s=o.length;a<s;a++){t=o[a],Qe(e[t])?n[t]=Array.from(e[t]):Je(e[t])?n[t]=this._simpleDeepCopy(e[t]):n[t]=e[t];}return n;}}]),e;}(),Xr=[aa],Qr=function(){function e(t){n(this,e),this._sessionModule=t,this._className="DownlinkHandler",this._eventHandlerMap=new Map(),this._eventHandlerMap.set("C2CMessageArray",this._c2cMessageArrayHandler.bind(this)),this._eventHandlerMap.set("groupMessageArray",this._groupMessageArrayHandler.bind(this)),this._eventHandlerMap.set("groupTips",this._groupTipsHandler.bind(this)),this._eventHandlerMap.set("C2CNotifyMessageArray",this._C2CNotifyMessageArrayHandler.bind(this)),this._eventHandlerMap.set("C2CReadReceiptArray",this._C2CReadReceiptArrayHandler.bind(this)),this._eventHandlerMap.set("profileModify",this._profileHandler.bind(this)),this._eventHandlerMap.set("friendListMod",this._relationChainHandler.bind(this)),this._eventHandlerMap.set("recentContactMod",this._recentContactHandler.bind(this)),this._eventHandlerMap.set("readAllC2CMessage",this._allMessageReadHandler.bind(this)),this._eventHandlerMap.set("c2cMessageModified",this._c2cMessageModifiedHandler.bind(this)),this._eventHandlerMap.set("groupMessageModified",this._groupMessageModifiedHandler.bind(this)),this._eventHandlerMap.set("userStatusList",this._userStatusListHandler.bind(this)),this._keys=M(this._eventHandlerMap.keys());}return s(e,[{key:"_c2cMessageArrayHandler",value:function value(e){var t=this._sessionModule.getModule(ro);if(t){if(e.dataList.forEach(function(e){if(1===e.isSyncMessage){var t=e.from;e.from=e.to,e.to=t;}}),1===e.needSync)this._sessionModule.getModule(Io).startOnlineSync();t.onNewC2CMessage({dataList:e.dataList,isInstantMessage:!0});}}},{key:"_c2cMessageModifiedHandler",value:function value(e){var t=this._sessionModule.getModule(ro);t&&t.onC2CMessageModified(e);}},{key:"_groupMessageArrayHandler",value:function value(e){var t=this._sessionModule.getModule(io);t&&t.onNewGroupMessage({event:e.event,dataList:e.dataList,isInstantMessage:!0});}},{key:"_groupMessageModifiedHandler",value:function value(e){var t=this._sessionModule.getModule(io);t&&t.onGroupMessageModified(e);}},{key:"_groupTipsHandler",value:function value(e){var t=this._sessionModule.getModule(io);if(t){var o=e.event,n=e.dataList,a=e.isInstantMessage,s=void 0===a||a,r=e.isSyncingEnded;switch(o){case 4:case 6:t.onNewGroupTips({event:o,dataList:n});break;case 5:n.forEach(function(e){Qe(e.elements.revokedInfos)?t.onGroupMessageRevoked({dataList:n}):Qe(e.elements.groupMessageReadNotice)?t.onGroupMessageReadNotice({dataList:n}):Qe(e.elements.readReceiptList)?t.onReadReceiptList({dataList:n}):t.onNewGroupSystemNotice({dataList:n,isInstantMessage:s,isSyncingEnded:r});});break;case 12:this._sessionModule.getModule(po).onNewGroupAtTips({dataList:n});break;default:be.log("".concat(this._className,"._groupTipsHandler unknown event:").concat(o," dataList:"),n);}}}},{key:"_C2CNotifyMessageArrayHandler",value:function value(e){var t=this,o=e.dataList;if(Qe(o)){var n=this._sessionModule.getModule(ro);o.forEach(function(e){if(Xe(e))if(e.hasOwnProperty("kickoutMsgNotify")){var a=e.kickoutMsgNotify,s=a.kickType,r=a.newInstanceInfo,i=void 0===r?{}:r;1===s?t._sessionModule.onMultipleAccountKickedOut(i):2===s?t._sessionModule.onMultipleDeviceKickedOut(i):3===s&&t._sessionModule.onRestApiKickedOut(i);}else if(e.hasOwnProperty("c2cMessageRevokedNotify"))n&&n.onC2CMessageRevoked({dataList:o});else if(e.hasOwnProperty("c2cMessageReadReceipt"))n&&n.onC2CMessageReadReceipt({dataList:o});else if(e.hasOwnProperty("c2cMessageReadNotice"))n&&n.onC2CMessageReadNotice({dataList:o});else if(e.hasOwnProperty("muteNotificationsSync")){t._sessionModule.getModule(po).onC2CMessageRemindTypeSynced({dataList:o});}});}}},{key:"_C2CReadReceiptArrayHandler",value:function value(e){this._sessionModule.getModule(ro).onReadReceiptList(e);}},{key:"_profileHandler",value:function value(e){this._sessionModule.getModule(so).onProfileModified({dataList:e.dataList});var t=this._sessionModule.getModule(co);t&&t.onFriendProfileModified({dataList:e.dataList});}},{key:"_relationChainHandler",value:function value(e){this._sessionModule.getModule(so).onRelationChainModified({dataList:e.dataList});var t=this._sessionModule.getModule(co);t&&t.onRelationChainModified({dataList:e.dataList});}},{key:"_recentContactHandler",value:function value(e){var t=e.dataList;if(Qe(t)){var o=this._sessionModule.getModule(po);o&&t.forEach(function(e){var t=e.pushType;if(1===t){var n=e.recentContactDeleteItem;o.onConversationDeleted(n.recentContactList);}else if(2===t){var a=e.recentContactTopItem;o.onConversationPinned(a.recentContactList);}else if(3===t){var s=e.recentContactTopItem;o.onConversationUnpinned(s.recentContactList);}else if(4===t){var r=e.recentContactMarkContact;o.onConversationMarkUpdated(r.recentContactMarkContactItem);}else if(5===t){var i=e.recentContactCreateContactGroup;o.onConversationGroupCreated(i.msgContactGroupContactItem);}else if(6===t){var c=e.recentContactDelContactGroup;o.onConversationGroupDeleted(c.msgGroupItem);}else if(7===t){var u=e.recentContactUpdateContactGroup,l=u.msgUpdateGroup.updateGroupType;1===l?o.onConversationGroupNameUpdated(u.msgUpdateGroup):2===l&&o.onConversationInGroupUpdated(u.msgUpdateGroup);}});}}},{key:"_allMessageReadHandler",value:function value(e){var t=e.dataList,o=this._sessionModule.getModule(po);o&&o.onPushedAllMessageRead(t);}},{key:"_userStatusListHandler",value:function value(e){this._sessionModule.getModule(so).onUserStatusUpdated(e);}},{key:"onMessage",value:function value(e){var t=this,o=e.body;if(this._filterMessageFromIMOpenPush(e)){var n=o.eventArray,a=o.isInstantMessage,s=o.isSyncingEnded,r=o.needSync;if(Qe(n))for(var i=null,c=null,u=0,l=0,d=n.length;l<d;l++){u=(i=n[l]).event;var p=Object.keys(i).find(function(e){return-1!==t._keys.indexOf(e);});p?(c=14===u?{readAllC2CMessage:i[p],groupMessageReadInfoList:i.groupMessageReadNotice||[]}:16===u?{userID:i.userID,readReceiptList:i[p]}:i[p],this._eventHandlerMap.get(p)({event:u,dataList:c,isInstantMessage:a,isSyncingEnded:s,needSync:r})):be.log("".concat(this._className,".onMessage unknown eventItem:").concat(i));}}}},{key:"_filterMessageFromIMOpenPush",value:function value(e){var t=e.head,o=e.body,n=t.servcmd,a=!1;if(Ze(n)||(a=n.includes(K.NAME.IM_CONFIG_MANAGER)||n.includes(K.NAME.OVERLOAD_PUSH)||n.includes(K.NAME.STAT_SERVICE)),!a)return!0;if(n.includes(K.CMD.PUSHED_CLOUD_CONTROL_CONFIG))this._sessionModule.getModule(Co).onPushedCloudControlConfig(o);else if(n.includes(K.CMD.PUSHED_COMMERCIAL_CONFIG)){this._sessionModule.getModule(Ao).onPushedConfig(o);}else if(n.includes(K.CMD.OVERLOAD_NOTIFY))this._sessionModule.onPushedServerOverload(o);else if(n.includes(K.CMD.KICK_OTHER)){var s=Date.now();this._sessionModule.reLoginOnKickOther();var r=new Va(Ba.KICK_OTHER),i=this._sessionModule.getModule(no).getLastWsHelloTs(),c=s-i;r.setMessage("last wshello time:".concat(i," diff:").concat(c,"ms")).setNetworkType(this._sessionModule.getNetworkType()).end();}return!1;}}]),e;}(),Zr=[{cmd:K.CMD.GET_GROUP_INFO,interval:1,count:20},{cmd:K.CMD.GET_AVCHATROOM_MEMBER_LIST,interval:3,count:1},{cmd:K.CMD.GET_TOPIC_LIST,interval:1,count:10},{cmd:K.CMD.SET_GROUP_ATTRIBUTES,interval:5,count:10},{cmd:K.CMD.MODIFY_GROUP_ATTRIBUTES,interval:5,count:10},{cmd:K.CMD.DELETE_GROUP_ATTRIBUTES,interval:5,count:10},{cmd:K.CMD.CLEAR_GROUP_ATTRIBUTES,interval:5,count:10},{cmd:K.CMD.GET_GROUP_ATTRIBUTES,interval:5,count:20},{cmd:K.CMD.SET_ALL_MESSAGE_READ,interval:1,count:1},{cmd:K.CMD.GET_USER_STATUS,interval:5,count:20},{cmd:K.CMD.SUBSCRIBE_USER_STATUS,interval:5,count:20},{cmd:K.CMD.UNSUBSCRIBE_USER_STATUS,interval:5,count:20}],ei=function(e){i(o,e);var t=f(o);function o(e){var a;return n(this,o),(a=t.call(this,e))._className="SessionModule",a._platform=a.getPlatform(),a._protocolHandler=new Jr(g(a)),a._messageDispatcher=new Qr(g(a)),a._commandFrequencyLimitMap=new Map(),a._commandRequestInfoMap=new Map(),a._serverOverloadInfoMap=new Map(),a._init(),a.getInnerEmitterInstance().on(Ms,a._onCloudConfigUpdated,g(a)),a;}return s(o,[{key:"_init",value:function value(){this._updateCommandFrequencyLimitMap(Zr);}},{key:"_onCloudConfigUpdated",value:function value(){var e=this.getCloudConfig("cmd_frequency_limit");Ze(e)||(e=JSON.parse(e),this._updateCommandFrequencyLimitMap(e));}},{key:"_updateCommandFrequencyLimitMap",value:function value(e){var t=this;e.forEach(function(e){t._commandFrequencyLimitMap.set(e.cmd,{interval:e.interval,count:e.count});});}},{key:"updateProtocolConfig",value:function value(){this._protocolHandler.update();}},{key:"request",value:function value(e){be.debug("".concat(this._className,".request options:"),e);var t=e.protocolName,o=e.tjgID;if(!this._protocolHandler.has(t))return be.warn("".concat(this._className,".request unknown protocol:").concat(t)),gs({code:Ca.CANNOT_FIND_PROTOCOL,message:Sa.CANNOT_FIND_PROTOCOL});var n=this.getProtocolData(e),a=n.head.servcmd;if(this._isFrequencyOverLimit(a))return gs({code:Ca.OVER_FREQUENCY_LIMIT,message:Sa.OVER_FREQUENCY_LIMIT});if(this._isServerOverload(a))return gs({code:Ca.OPEN_SERVICE_OVERLOAD_ERROR,message:Sa.OPEN_SERVICE_OVERLOAD_ERROR});Kt(o)||(n.head.tjgID=o);var s=this.getModule(To);return Xr.includes(t)?s.simplySend(n):s.send(n);}},{key:"getKeyMap",value:function value(e){return this._protocolHandler.getKeyMap(e);}},{key:"genCommonHead",value:function value(){var e=this.getModule(_o);return{ver:"v4",platform:this._platform,websdkappid:U,websdkversion:P,a2:e.getA2Key()||void 0,tinyid:e.getTinyID()||void 0,status_instid:e.getStatusInstanceID(),sdkappid:e.getSDKAppID(),contenttype:e.getContentType(),reqtime:0,identifier:e.getA2Key()?void 0:e.getUserID(),usersig:e.getA2Key()?void 0:e.getUserSig(),sdkability:11827,tjgID:""};}},{key:"genCosSpecifiedHead",value:function value(){var e=this.getModule(_o);return{ver:"v4",platform:this._platform,websdkappid:U,websdkversion:P,sdkappid:e.getSDKAppID(),contenttype:e.getContentType(),reqtime:0,identifier:e.getUserID(),usersig:e.getUserSig(),status_instid:e.getStatusInstanceID(),sdkability:11827};}},{key:"genSSOReportHead",value:function value(){var e=this.getModule(_o);return{ver:"v4",platform:this._platform,websdkappid:U,websdkversion:P,sdkappid:e.getSDKAppID(),contenttype:"",reqtime:0,identifier:"",usersig:"",status_instid:e.getStatusInstanceID(),sdkability:11827};}},{key:"getProtocolData",value:function value(e){return this._protocolHandler.getProtocolData(e);}},{key:"onErrorCodeNotZero",value:function value(e){var t=e.errorCode;if(t===Ca.HELLO_ANSWER_KICKED_OUT){var o=e.kickType,n=e.newInstanceInfo,a=void 0===n?{}:n;1===o?this.onMultipleAccountKickedOut(a):2===o?this.onMultipleDeviceKickedOut(a):3===o&&this.onRestApiKickedOut(a);}t!==Ca.MESSAGE_A2KEY_EXPIRED&&t!==Ca.ACCOUNT_A2KEY_EXPIRED||(this._onUserSigExpired(),this.getModule(To).reConnect());}},{key:"onMessage",value:function value(e){var t=e.body,o=t.needAck,n=void 0===o?0:o,a=t.sessionData;1===n&&this._sendACK(a),this._messageDispatcher.onMessage(e);}},{key:"onReconnected",value:function value(){this._reLoginOnReconnected();}},{key:"reLoginOnKickOther",value:function value(){be.log("".concat(this._className,".reLoginOnKickOther")),this._reLogin();}},{key:"_reLoginOnReconnected",value:function value(){be.log("".concat(this._className,"._reLoginOnReconnected")),this._reLogin();}},{key:"_reLogin",value:function value(){var e=this;if(this.isLoggedIn()){var t=0,o=this.getModule(Oo);o.canIUseOfflinePush()&&(t=o.getUniAppPlatform()),this.request({protocolName:Lo,requestData:{isWebUniapp:t}}).then(function(t){var o=t.data.instanceID;e.getModule(_o).setStatusInstanceID(o),be.log("".concat(e._className,"._reLogin ok. start to sync unread messages")),e.getModule(Io).startSyncOnReconnected(),e.getModule(po).syncConversationList(),e.getModule(Do).startPull(),e.getModule(io).updateLocalMainSequenceOnReconnected();var n=e.getModule(lo);n.resetGetTopicTime(),n.getTopicListOnReconnected();});}}},{key:"onMultipleAccountKickedOut",value:function value(e){this.getModule(no).onMultipleAccountKickedOut(e);}},{key:"onMultipleDeviceKickedOut",value:function value(e){this.getModule(no).onMultipleDeviceKickedOut(e);}},{key:"_onUserSigExpired",value:function value(){this.getModule(no).onUserSigExpired();}},{key:"onRestApiKickedOut",value:function value(e){this.getModule(no).onRestApiKickedOut(e);}},{key:"_sendACK",value:function value(e){this.request({protocolName:aa,requestData:{sessionData:e}});}},{key:"_isFrequencyOverLimit",value:function value(e){var t=e.split(".")[1];if(!this._commandFrequencyLimitMap.has(t))return!1;if(!this._commandRequestInfoMap.has(t))return this._commandRequestInfoMap.set(t,{startTime:Date.now(),requestCount:1}),!1;var o=this._commandFrequencyLimitMap.get(t),n=o.count,a=o.interval,s=this._commandRequestInfoMap.get(t),r=s.startTime,i=s.requestCount;if(Date.now()-r>1e3*a)return this._commandRequestInfoMap.set(t,{startTime:Date.now(),requestCount:1}),!1;i+=1,this._commandRequestInfoMap.set(t,{startTime:r,requestCount:i});var c=!1;return i>n&&(c=!0),c;}},{key:"_isServerOverload",value:function value(e){if(!this._serverOverloadInfoMap.has(e))return!1;var t=this._serverOverloadInfoMap.get(e),o=t.overloadTime,n=t.waitingTime,a=!1;return Date.now()-o<=1e3*n?a=!0:(this._serverOverloadInfoMap.delete(e),a=!1),a;}},{key:"onPushedServerOverload",value:function value(e){var t=e.overloadCommand,o=e.waitingTime;this._serverOverloadInfoMap.set(t,{overloadTime:Date.now(),waitingTime:o}),be.warn("".concat(this._className,".onPushedServerOverload waitingTime:").concat(o,"s"));}},{key:"reset",value:function value(){be.log("".concat(this._className,".reset")),this._updateCommandFrequencyLimitMap(Zr),this._commandRequestInfoMap.clear(),this._serverOverloadInfoMap.clear();}}]),o;}(Ro),ti=function(e){i(o,e);var t=f(o);function o(e){var a;return n(this,o),(a=t.call(this,e))._className="MessageLossDetectionModule",a._maybeLostSequencesMap=new Map(),a._firstRoundRet=[],a;}return s(o,[{key:"onMessageMaybeLost",value:function value(e,t,o){this._maybeLostSequencesMap.has(e)||this._maybeLostSequencesMap.set(e,[]);for(var n=this._maybeLostSequencesMap.get(e),a=0;a<o;a++){-1===n.indexOf(t+a)&&n.push(t+a);}}},{key:"detectFirstRound",value:function value(e,t){var o=this._maybeLostSequencesMap.get(e);if(!Kt(o)&&!Kt(t)){var n=o.filter(function(e){return-1===t.indexOf(e);});0===n.length?be.info("".concat(this._className,".detectFirstRound no message loss. conversationID:").concat(e)):this._firstRoundRet=this._firstRoundRet.concat(n),o.length=0;}}},{key:"detectSecondRound",value:function value(e,t){if(!Kt(this._firstRoundRet)&&!Kt(t)){var o=this._firstRoundRet.filter(function(e){return-1===t.indexOf(e);});this._firstRoundRet.length=0;var n,a=o.length;if(0!==a)a<=5?n=e+"-"+o.join("-"):(o.sort(function(e,t){return e-t;}),n=e+" start:"+o[0]+" end:"+o[a-1]+" count:"+a),new Va(Ba.MESSAGE_LOSS).setMessage(n).setNetworkType(this.getNetworkType()).setLevel("warning").end(),be.info("".concat(this._className,".detectSecondRound message loss detected. conversationID:").concat(e," lostSequences:").concat(o));}}},{key:"reset",value:function value(){be.log("".concat(this._className,".reset")),this._maybeLostSequencesMap.clear(),this._firstRoundRet.length=0;}}]),o;}(Ro),oi=function(e){i(o,e);var t=f(o);function o(e){var a;return n(this,o),(a=t.call(this,e))._className="CloudControlModule",a._cloudConfig=new Map(),a._expiredTime=0,a._version=0,a._isFetching=!1,a;}return s(o,[{key:"getCloudConfig",value:function value(e){return Ze(e)?this._cloudConfig:this._cloudConfig.has(e)?this._cloudConfig.get(e):void 0;}},{key:"_canFetchConfig",value:function value(){return this.isLoggedIn()&&!this._isFetching&&Date.now()>=this._expiredTime;}},{key:"fetchConfig",value:function value(){var e=this,t=this._canFetchConfig();if(be.log("".concat(this._className,".fetchConfig canFetchConfig:").concat(t)),t){var o=new Va(Ba.FETCH_CLOUD_CONTROL_CONFIG),n=this.getModule(_o).getSDKAppID();this._isFetching=!0,this.request({protocolName:ca,requestData:{SDKAppID:n,version:this._version}}).then(function(t){e._isFetching=!1,o.setMessage("version:".concat(e._version," newVersion:").concat(t.data.version," config:").concat(t.data.cloudControlConfig)).setNetworkType(e.getNetworkType()).end(),be.log("".concat(e._className,".fetchConfig ok")),e._parseCloudControlConfig(t.data);}).catch(function(t){e._isFetching=!1,e.probeNetwork().then(function(e){var n=m(e,2),a=n[0],s=n[1];o.setError(t,a,s).end();}),be.log("".concat(e._className,".fetchConfig failed. error:"),t),e._setExpiredTimeOnResponseError(12e4);});}}},{key:"onPushedCloudControlConfig",value:function value(e){be.log("".concat(this._className,".onPushedCloudControlConfig")),new Va(Ba.PUSHED_CLOUD_CONTROL_CONFIG).setNetworkType(this.getNetworkType()).setMessage("newVersion:".concat(e.version," config:").concat(e.cloudControlConfig)).end(),this._parseCloudControlConfig(e);}},{key:"onCheckTimer",value:function value(e){this._canFetchConfig()&&this.fetchConfig();}},{key:"_parseCloudControlConfig",value:function value(e){var t=this,o="".concat(this._className,"._parseCloudControlConfig"),n=e.errorCode,a=e.errorMessage,s=e.cloudControlConfig,r=e.version,i=e.expiredTime;if(0===n){if(this._version!==r){var c=null;try{c=JSON.parse(s);}catch(u){be.error("".concat(o," JSON parse error:").concat(s));}c&&(this._cloudConfig.clear(),Object.keys(c).forEach(function(e){t._cloudConfig.set(e,c[e]);}),this._version=r,this.emitInnerEvent(Ms));}this._expiredTime=Date.now()+1e3*i;}else Ze(n)?(be.log("".concat(o," failed. Invalid message format:"),e),this._setExpiredTimeOnResponseError(36e5)):(be.error("".concat(o," errorCode:").concat(n," errorMessage:").concat(a)),this._setExpiredTimeOnResponseError(12e4));}},{key:"_setExpiredTimeOnResponseError",value:function value(e){this._expiredTime=Date.now()+e;}},{key:"reset",value:function value(){be.log("".concat(this._className,".reset")),this._cloudConfig.clear(),this._expiredTime=0,this._version=0,this._isFetching=!1;}}]),o;}(Ro),ni=function(e){i(o,e);var t=f(o);function o(e){var a;return n(this,o),(a=t.call(this,e))._className="PullGroupMessageModule",a._remoteLastMessageSequenceMap=new Map(),a.PULL_LIMIT_COUNT=15,a;}return s(o,[{key:"startPull",value:function value(){var e=this,t=this._getNeedPullConversationList();this._getRemoteLastMessageSequenceList().then(function(){var o=e.getModule(po);t.forEach(function(t){var n=t.conversationID,a=n.replace(D.CONV_GROUP,""),s=o.getGroupLocalLastMessageSequence(n),r=e._remoteLastMessageSequenceMap.get(a)||0,i=r-s;be.log("".concat(e._className,".startPull groupID:").concat(a," localLastMessageSequence:").concat(s," ")+"remoteLastMessageSequence:".concat(r," diff:").concat(i)),s>0&&i>=1&&i<300&&e._pullMissingMessage({groupID:a,localLastMessageSequence:s,remoteLastMessageSequence:r,diff:i});});});}},{key:"_getNeedPullConversationList",value:function value(){return this.getModule(po).getLocalConversationList().filter(function(e){return e.type===D.CONV_GROUP&&e.groupProfile.type!==D.GRP_AVCHATROOM;});}},{key:"_getRemoteLastMessageSequenceList",value:function value(){var e=this;return this.getModule(io).getGroupList().then(function(t){for(var o=t.data.groupList,n=void 0===o?[]:o,a=0;a<n.length;a++){var s=n[a],r=s.groupID,i=s.nextMessageSeq;if(s.type!==D.GRP_AVCHATROOM){var c=i-1;e._remoteLastMessageSequenceMap.set(r,c);}}});}},{key:"_pullMissingMessage",value:function value(e){var t=this,o=e.localLastMessageSequence,n=e.remoteLastMessageSequence,a=e.diff;e.count=a>this.PULL_LIMIT_COUNT?this.PULL_LIMIT_COUNT:a,e.sequence=a>this.PULL_LIMIT_COUNT?o+this.PULL_LIMIT_COUNT:o+a,this._getGroupMissingMessage(e).then(function(s){s.length>0&&(s[0].sequence+1<=n&&(e.localLastMessageSequence=o+t.PULL_LIMIT_COUNT,e.diff=a-t.PULL_LIMIT_COUNT,t._pullMissingMessage(e)),t.getModule(io).onNewGroupMessage({dataList:s,isInstantMessage:!1}));});}},{key:"_getGroupMissingMessage",value:function value(e){var t=this,o=new Va(Ba.GET_GROUP_MISSING_MESSAGE);return this.request({protocolName:Nn,requestData:{groupID:e.groupID,count:e.count,sequence:e.sequence}}).then(function(n){var a=n.data.messageList,s=void 0===a?[]:a;return o.setNetworkType(t.getNetworkType()).setMessage("groupID:".concat(e.groupID," count:").concat(e.count," sequence:").concat(e.sequence," messageList length:").concat(s.length)).end(),s;}).catch(function(e){t.probeNetwork().then(function(t){var n=m(t,2),a=n[0],s=n[1];o.setError(e,a,s).end();});});}},{key:"reset",value:function value(){be.log("".concat(this._className,".reset")),this._remoteLastMessageSequenceMap.clear();}}]),o;}(Ro),ai=function(){function e(){n(this,e),this._className="AvgE2EDelay",this._e2eDelayArray=[];}return s(e,[{key:"addMessageDelay",value:function value(e){var t=ke()-e;t>=0&&this._e2eDelayArray.push(t);}},{key:"_calcAvg",value:function value(e,t){if(0===t)return 0;var o=0;return e.forEach(function(e){o+=e;}),Pt(o/t,1);}},{key:"_calcCountWithLimit",value:function value(e){var t=e.e2eDelayArray,o=e.min,n=e.max;return t.filter(function(e){return o<=e&&e<n;}).length;}},{key:"_calcPercent",value:function value(e,t){var o=Pt(e/t*100,2);return o>100&&(o=100),o;}},{key:"_checkE2EDelayException",value:function value(e,t){var o=e.filter(function(e){return e>t;});if(o.length>0){var n=o.length,a=Math.min.apply(Math,M(o)),s=Math.max.apply(Math,M(o)),r=this._calcAvg(o,n),i=Pt(n/e.length*100,2);if(i>50)new Va(Ba.MESSAGE_E2E_DELAY_EXCEPTION).setMessage("message e2e delay exception. count:".concat(n," min:").concat(a," max:").concat(s," avg:").concat(r," percent:").concat(i)).setLevel("warning").end();}}},{key:"getStatResult",value:function value(){var e=this._e2eDelayArray.length;if(0===e)return null;var t=M(this._e2eDelayArray),o=this._calcCountWithLimit({e2eDelayArray:t,min:0,max:1}),n=this._calcCountWithLimit({e2eDelayArray:t,min:1,max:3}),a=this._calcPercent(o,e),s=this._calcPercent(n,e),r=this._calcAvg(t,e);return this._checkE2EDelayException(t,3),t.length=0,this.reset(),{totalCount:e,countLessThan1Second:o,percentOfCountLessThan1Second:a,countLessThan3Second:n,percentOfCountLessThan3Second:s,avgDelay:r};}},{key:"reset",value:function value(){this._e2eDelayArray.length=0;}}]),e;}(),si=function(){function e(){n(this,e),this._className="AvgRTT",this._requestCount=0,this._rttArray=[];}return s(e,[{key:"addRequestCount",value:function value(){this._requestCount+=1;}},{key:"addRTT",value:function value(e){this._rttArray.push(e);}},{key:"_calcTotalCount",value:function value(){return this._requestCount;}},{key:"_calcRTTCount",value:function value(e){return e.length;}},{key:"_calcSuccessRateOfRequest",value:function value(e,t){if(0===t)return 0;var o=Pt(e/t*100,2);return o>100&&(o=100),o;}},{key:"_calcAvg",value:function value(e,t){if(0===t)return 0;var o=0;return e.forEach(function(e){o+=e;}),parseInt(o/t);}},{key:"_calcMax",value:function value(){return Math.max.apply(Math,M(this._rttArray));}},{key:"_calcMin",value:function value(){return Math.min.apply(Math,M(this._rttArray));}},{key:"getStatResult",value:function value(){var e=this._calcTotalCount(),t=M(this._rttArray);if(0===e)return null;var o=this._calcRTTCount(t),n=this._calcSuccessRateOfRequest(o,e),a=this._calcAvg(t,o);return be.log("".concat(this._className,".getStatResult max:").concat(this._calcMax()," min:").concat(this._calcMin()," avg:").concat(a)),this.reset(),{totalCount:e,rttCount:o,successRateOfRequest:n,avgRTT:a};}},{key:"reset",value:function value(){this._requestCount=0,this._rttArray.length=0;}}]),e;}(),ri=function(){function e(){n(this,e),this._map=new Map();}return s(e,[{key:"initMap",value:function value(e){var t=this;e.forEach(function(e){t._map.set(e,{totalCount:0,successCount:0,failedCountOfUserSide:0,costArray:[],fileSizeArray:[]});});}},{key:"addTotalCount",value:function value(e){return!(Ze(e)||!this._map.has(e))&&(this._map.get(e).totalCount+=1,!0);}},{key:"addSuccessCount",value:function value(e){return!(Ze(e)||!this._map.has(e))&&(this._map.get(e).successCount+=1,!0);}},{key:"addFailedCountOfUserSide",value:function value(e){return!(Ze(e)||!this._map.has(e))&&(this._map.get(e).failedCountOfUserSide+=1,!0);}},{key:"addCost",value:function value(e,t){return!(Ze(e)||!this._map.has(e))&&(this._map.get(e).costArray.push(t),!0);}},{key:"addFileSize",value:function value(e,t){return!(Ze(e)||!this._map.has(e))&&(this._map.get(e).fileSizeArray.push(t),!0);}},{key:"_calcSuccessRateOfBusiness",value:function value(e){if(Ze(e)||!this._map.has(e))return-1;var t=this._map.get(e),o=Pt(t.successCount/t.totalCount*100,2);return o>100&&(o=100),o;}},{key:"_calcSuccessRateOfPlatform",value:function value(e){if(Ze(e)||!this._map.has(e))return-1;var t=this._map.get(e),o=this._calcSuccessCountOfPlatform(e)/t.totalCount*100;return(o=Pt(o,2))>100&&(o=100),o;}},{key:"_calcTotalCount",value:function value(e){return Ze(e)||!this._map.has(e)?-1:this._map.get(e).totalCount;}},{key:"_calcSuccessCountOfBusiness",value:function value(e){return Ze(e)||!this._map.has(e)?-1:this._map.get(e).successCount;}},{key:"_calcSuccessCountOfPlatform",value:function value(e){if(Ze(e)||!this._map.has(e))return-1;var t=this._map.get(e);return t.successCount+t.failedCountOfUserSide;}},{key:"_calcAvg",value:function value(e){return Ze(e)||!this._map.has(e)?-1:e===ka?this._calcAvgSpeed(e):this._calcAvgCost(e);}},{key:"_calcAvgCost",value:function value(e){var t=this._map.get(e).costArray.length;if(0===t)return 0;var o=0;return this._map.get(e).costArray.forEach(function(e){o+=e;}),parseInt(o/t);}},{key:"_calcAvgSpeed",value:function value(e){var t=0,o=0;return this._map.get(e).costArray.forEach(function(e){t+=e;}),this._map.get(e).fileSizeArray.forEach(function(e){o+=e;}),parseInt(1e3*o/t);}},{key:"getStatResult",value:function value(e){var t=this._calcTotalCount(e);if(0===t)return null;var o=this._calcSuccessCountOfBusiness(e),n=this._calcSuccessRateOfBusiness(e),a=this._calcSuccessCountOfPlatform(e),s=this._calcSuccessRateOfPlatform(e),r=this._calcAvg(e);return this.reset(e),{totalCount:t,successCountOfBusiness:o,successRateOfBusiness:n,successCountOfPlatform:a,successRateOfPlatform:s,avgValue:r};}},{key:"reset",value:function value(e){Ze(e)?this._map.clear():this._map.set(e,{totalCount:0,successCount:0,failedCountOfUserSide:0,costArray:[],fileSizeArray:[]});}}]),e;}(),ii=function(){function e(){n(this,e),this._lastMap=new Map(),this._currentMap=new Map();}return s(e,[{key:"initMap",value:function value(e){var t=this;e.forEach(function(e){t._lastMap.set(e,new Map()),t._currentMap.set(e,new Map());});}},{key:"addMessageSequence",value:function value(e){var t=e.key,o=e.message;if(Ze(t)||!this._lastMap.has(t)||!this._currentMap.has(t))return!1;var n=o.conversationID,a=o.sequence,s=n.replace(D.CONV_GROUP,"");if(0===this._lastMap.get(t).size)this._addCurrentMap(e);else if(this._lastMap.get(t).has(s)){var r=this._lastMap.get(t).get(s),i=r.length-1;a>r[0]&&a<r[i]?(r.push(a),r.sort(),this._lastMap.get(t).set(s,r)):this._addCurrentMap(e);}else this._addCurrentMap(e);return!0;}},{key:"_addCurrentMap",value:function value(e){var t=e.key,o=e.message,n=o.conversationID,a=o.sequence,s=n.replace(D.CONV_GROUP,"");this._currentMap.get(t).has(s)||this._currentMap.get(t).set(s,[]),this._currentMap.get(t).get(s).push(a);}},{key:"_copyData",value:function value(e){if(!Ze(e)){this._lastMap.set(e,new Map());var t,o=this._lastMap.get(e),n=C(this._currentMap.get(e));try{for(n.s();!(t=n.n()).done;){var a=m(t.value,2),s=a[0],r=a[1];o.set(s,r);}}catch(i){n.e(i);}finally{n.f();}o=null,this._currentMap.set(e,new Map());}}},{key:"getStatResult",value:function value(e){if(Ze(this._currentMap.get(e))||Ze(this._lastMap.get(e)))return null;if(0===this._lastMap.get(e).size)return this._copyData(e),null;var t=0,o=0;if(this._lastMap.get(e).forEach(function(e,n){var a=M(e.values()),s=a.length,r=a[s-1]-a[0]+1;t+=r,o+=s;}),0===t)return null;var n=Pt(o/t*100,2);return n>100&&(n=100),this._copyData(e),{totalCount:t,successCountOfMessageReceived:o,successRateOfMessageReceived:n};}},{key:"reset",value:function value(){this._currentMap.clear(),this._lastMap.clear();}}]),e;}(),ci=function(e){i(a,e);var o=f(a);function a(e){var t;n(this,a),(t=o.call(this,e))._className="QualityStatModule",t.TAG="im-ssolog-quality-stat",t.reportIndex=0,t.wholePeriod=!1,t._qualityItems=[Da,Na,Aa,Oa,Ra,La,ka,Ga,Pa,Ua],t._messageSentItems=[Aa,Oa,Ra,La,ka],t._messageReceivedItems=[Ga,Pa,Ua],t.REPORT_INTERVAL=120,t.REPORT_SDKAPPID_BLACKLIST=[],t.REPORT_TINYID_WHITELIST=[],t._statInfoArr=[],t._avgRTT=new si(),t._avgE2EDelay=new ai(),t._rateMessageSent=new ri(),t._rateMessageReceived=new ii();var s=t.getInnerEmitterInstance();return s.on(ms,t._onLoginSuccess,g(t)),s.on(Ms,t._onCloudConfigUpdated,g(t)),t;}return s(a,[{key:"_onLoginSuccess",value:function value(){var e=this;this._rateMessageSent.initMap(this._messageSentItems),this._rateMessageReceived.initMap(this._messageReceivedItems);var t=this.getModule(go),o=t.getItem(this.TAG,!1);!Kt(o)&&ot(o.forEach)&&(be.log("".concat(this._className,"._onLoginSuccess.get quality stat log in storage, nums=").concat(o.length)),o.forEach(function(t){e._statInfoArr.push(t);}),t.removeItem(this.TAG,!1));}},{key:"_onCloudConfigUpdated",value:function value(){var e=this.getCloudConfig("q_rpt_interval"),t=this.getCloudConfig("q_rpt_sdkappid_bl"),o=this.getCloudConfig("q_rpt_tinyid_wl");Ze(e)||(this.REPORT_INTERVAL=Number(e)),Ze(t)||(this.REPORT_SDKAPPID_BLACKLIST=t.split(",").map(function(e){return Number(e);})),Ze(o)||(this.REPORT_TINYID_WHITELIST=o.split(","));}},{key:"onCheckTimer",value:function value(e){this.isLoggedIn()&&e%this.REPORT_INTERVAL==0&&(this.wholePeriod=!0,this._report());}},{key:"addRequestCount",value:function value(){this._avgRTT.addRequestCount();}},{key:"addRTT",value:function value(e){this._avgRTT.addRTT(e);}},{key:"addMessageDelay",value:function value(e){this._avgE2EDelay.addMessageDelay(e);}},{key:"addTotalCount",value:function value(e){this._rateMessageSent.addTotalCount(e)||be.warn("".concat(this._className,".addTotalCount invalid key:"),e);}},{key:"addSuccessCount",value:function value(e){this._rateMessageSent.addSuccessCount(e)||be.warn("".concat(this._className,".addSuccessCount invalid key:"),e);}},{key:"addFailedCountOfUserSide",value:function value(e){this._rateMessageSent.addFailedCountOfUserSide(e)||be.warn("".concat(this._className,".addFailedCountOfUserSide invalid key:"),e);}},{key:"addCost",value:function value(e,t){this._rateMessageSent.addCost(e,t)||be.warn("".concat(this._className,".addCost invalid key or cost:"),e,t);}},{key:"addFileSize",value:function value(e,t){this._rateMessageSent.addFileSize(e,t)||be.warn("".concat(this._className,".addFileSize invalid key or size:"),e,t);}},{key:"addMessageSequence",value:function value(e){this._rateMessageReceived.addMessageSequence(e)||be.warn("".concat(this._className,".addMessageSequence invalid key:"),e.key);}},{key:"_getQualityItem",value:function value(e){var o={},n=Fa[this.getNetworkType()];Ze(n)&&(n=8);var a={qualityType:ba[e],timestamp:Re(),networkType:n,extension:""};switch(e){case Da:o=this._avgRTT.getStatResult();break;case Na:o=this._avgE2EDelay.getStatResult();break;case Aa:case Oa:case Ra:case La:case ka:o=this._rateMessageSent.getStatResult(e);break;case Ga:case Pa:case Ua:o=this._rateMessageReceived.getStatResult(e);}return null===o?null:t(t({},a),o);}},{key:"_report",value:function value(e){var t=this,o=[],n=null;Ze(e)?this._qualityItems.forEach(function(e){null!==(n=t._getQualityItem(e))&&(n.reportIndex=t.reportIndex,n.wholePeriod=t.wholePeriod,o.push(n));}):null!==(n=this._getQualityItem(e))&&(n.reportIndex=this.reportIndex,n.wholePeriod=this.wholePeriod,o.push(n)),be.debug("".concat(this._className,"._report"),o),this._statInfoArr.length>0&&(o=o.concat(this._statInfoArr),this._statInfoArr=[]);var a=this.getModule(_o),s=a.getSDKAppID(),r=a.getTinyID();Ut(this.REPORT_SDKAPPID_BLACKLIST,s)&&!bt(this.REPORT_TINYID_WHITELIST,r)&&(o=[]),o.length>0&&this._doReport(o);}},{key:"_doReport",value:function value(e){var o=this,n={header:pr(this),quality:e};this.request({protocolName:ea,requestData:t({},n)}).then(function(){o.reportIndex++,o.wholePeriod=!1;}).catch(function(t){be.warn("".concat(o._className,"._doReport, online:").concat(o.getNetworkType()," error:"),t),o._statInfoArr=o._statInfoArr.concat(e),o._flushAtOnce();});}},{key:"_flushAtOnce",value:function value(){var e=this.getModule(go),t=e.getItem(this.TAG,!1),o=this._statInfoArr;if(Kt(t))be.log("".concat(this._className,"._flushAtOnce count:").concat(o.length)),e.setItem(this.TAG,o,!0,!1);else{var n=o.concat(t);n.length>10&&(n=n.slice(0,10)),be.log("".concat(this.className,"._flushAtOnce count:").concat(n.length)),e.setItem(this.TAG,n,!0,!1);}this._statInfoArr=[];}},{key:"reset",value:function value(){be.log("".concat(this._className,".reset")),this._report(),this.reportIndex=0,this.wholePeriod=!1,this.REPORT_SDKAPPID_BLACKLIST=[],this.REPORT_TINYID_WHITELIST=[],this._avgRTT.reset(),this._avgE2EDelay.reset(),this._rateMessageSent.reset(),this._rateMessageReceived.reset();}}]),a;}(Ro),ui=function(e){i(o,e);var t=f(o);function o(e){var a;return n(this,o),(a=t.call(this,e))._className="WorkerTimerModule",a._isWorkerEnabled=!0,a._workerTimer=null,a._init(),a.getInnerEmitterInstance().on(Ms,a._onCloudConfigUpdated,g(a)),a;}return s(o,[{key:"isWorkerEnabled",value:function value(){return this._isWorkerEnabled&&Te;}},{key:"startWorkerTimer",value:function value(){be.log("".concat(this._className,".startWorkerTimer")),this._workerTimer&&this._workerTimer.postMessage("start");}},{key:"stopWorkerTimer",value:function value(){be.log("".concat(this._className,".stopWorkerTimer")),this._workerTimer&&this._workerTimer.postMessage("stop");}},{key:"_init",value:function value(){if(Te){var e=URL.createObjectURL(new Blob(['let interval = -1;onmessage = function(event) { if (event.data === "start") { if (interval > 0) { clearInterval(interval); } interval = setInterval(() => { postMessage(""); }, 1000) } else if (event.data === "stop") { clearInterval(interval); interval = -1; }};'],{type:"application/javascript; charset=utf-8"}));this._workerTimer=new Worker(e);var t=this;this._workerTimer.onmessage=function(){t._moduleManager.onCheckTimer();};}}},{key:"_onCloudConfigUpdated",value:function value(){var e=this.getCloudConfig("enable_worker");be.log("".concat(this._className,"._onCloudConfigUpdated enableWorker:").concat(e)),Ze(e)||"1"===e?!this._isWorkerEnabled&&Te&&(this._isWorkerEnabled=!0,this.startWorkerTimer(),this._moduleManager.onWorkerTimerEnabled()):this._isWorkerEnabled&&Te&&(this._isWorkerEnabled=!1,this.stopWorkerTimer(),this._moduleManager.onWorkerTimerDisabled());}},{key:"terminate",value:function value(){be.log("".concat(this._className,".terminate")),this._workerTimer&&(this._workerTimer.terminate(),this._workerTimer=null);}},{key:"reset",value:function value(){be.log("".concat(this._className,".reset"));}}]),o;}(Ro),li=function(){function e(){n(this,e),this._className="PurchasedFeatureHandler",this._purchasedFeatureMap=new Map();}return s(e,[{key:"isValidPurchaseBits",value:function value(e){return e&&"string"==typeof e&&e.length>=1&&e.length<=64&&/[01]{1,64}/.test(e);}},{key:"parsePurchaseBits",value:function value(e){var t="".concat(this._className,".parsePurchaseBits");if(this.isValidPurchaseBits(e)){this._purchasedFeatureMap.clear();for(var o=null,n=e.length-1,a=0;n>=0;n--,a++){o=a<32?new L(0,Math.pow(2,a)).toString():new L(Math.pow(2,a-32),0).toString(),"1"===e[n]?this._purchasedFeatureMap.set(o,!0):this._purchasedFeatureMap.set(o,!1);}}else be.warn("".concat(t," invalid purchase bits:").concat(e));}},{key:"hasPurchasedFeature",value:function value(e){return!!this._purchasedFeatureMap.get(e);}},{key:"isFeatureEnabled",value:function value(e){for(var t=parseInt(e).toString(2),o=void 0,n=!0,a=t.length-1,s=0;a>=0;a--,s++){if("1"===t.charAt(a)&&(o=s<32?new L(0,Math.pow(2,s)).toString():new L(Math.pow(2,s-32),0).toString(),!this._purchasedFeatureMap.get(o))){n=!1;break;}}return be.log("".concat(this._className,".isFeatureEnabled decimalNumber:").concat(e," binaryString:").concat(t," ret:").concat(n)),_s({enabled:n});}},{key:"clear",value:function value(){this._purchasedFeatureMap.clear();}}]),e;}(),di=function(){function e(t){n(this,e),this._moduleManager=t,this._className="CommercialConfigModule",this._expiredTime=0,this._isFetching=!1,this._purchasedFeatureHandler=new li();}return s(e,[{key:"_canFetch",value:function value(){return this._getModule(_o).isLoggedIn()?!this._isFetching&&Date.now()>=this._expiredTime:(this._expiredTime=Date.now()+2e3,!1);}},{key:"onCheckTimer",value:function value(e){this._canFetch()&&this.fetchConfig();}},{key:"fetchConfig",value:function value(){var e=this,t=this._canFetch(),o="".concat(this._className,".fetchConfig");if(be.log("".concat(o," canFetch:").concat(t)),t){var n=this._getModule(fo),a=new Va(Ba.FETCH_COMMERCIAL_CONFIG);a.setNetworkType(n.getNetworkType());var s=this._getModule(_o).getSDKAppID(),r=this._getModule(yo);this._isFetching=!0,r.request({protocolName:la,requestData:{SDKAppID:s}}).then(function(t){a.setMessage("purchaseBits:".concat(t.data.purchaseBits)).end(),be.log("".concat(o," ok.")),e._parseConfig(t.data),e._isFetching=!1;}).catch(function(t){n.probe().then(function(e){var o=m(e,2),n=o[0],s=o[1];a.setError(t,n,s).end();}),e._isFetching=!1;});}}},{key:"onPushedConfig",value:function value(e){var t="".concat(this._className,".onPushedConfig");be.log("".concat(t)),new Va(Ba.PUSHED_COMMERCIAL_CONFIG).setNetworkType(this._getModule(fo).getNetworkType()).setMessage("purchaseBits:".concat(e.purchaseBits)).end(),this._parseConfig(e);}},{key:"_parseConfig",value:function value(e){var t="".concat(this._className,"._parseConfig"),o=e.errorCode,n=e.errorMessage,a=e.purchaseBits,s=e.expiredTime;0===o?(this._purchasedFeatureHandler.parsePurchaseBits(a),this._expiredTime=Date.now()+1e3*s):Ze(o)?(be.log("".concat(t," failed. Invalid message format:"),e),this._setExpiredTimeOnResponseError(36e5)):(be.error("".concat(t," errorCode:").concat(o," errorMessage:").concat(n)),this._setExpiredTimeOnResponseError(12e4));}},{key:"_setExpiredTimeOnResponseError",value:function value(e){this._expiredTime=Date.now()+e;}},{key:"canIUse",value:function value(e){return this._purchasedFeatureHandler.hasPurchasedFeature(e);}},{key:"isFeatureEnabled",value:function value(e){return this._purchasedFeatureHandler.isFeatureEnabled(e);}},{key:"_getModule",value:function value(e){return this._moduleManager.getModule(e);}},{key:"reset",value:function value(){be.log("".concat(this._className,".reset")),this._expiredTime=0,this._isFetching=!1,this._purchasedFeatureHandler.clear();}}]),e;}(),pi=function(e){i(o,e);var t=f(o);function o(e){var a;return n(this,o),(a=t.call(this,e))._moduleManager=e,a._className="OfflinePushModule",a._offlinePushPlugin=void 0,a._androidPushConfig={huaweiPushBussinessId:"",xiaomiPushBussinessId:"",xiaomiPushAppId:"",xiaomiPushAppKey:"",meizuPushBussinessId:"",meizuPushAppId:"",meizuPushAppKey:"",vivoPushBussinessId:"",fcmPushBussinessId:"",oppoPushBussinessId:"",oppoPushAppKey:"",oppoPushAppSecret:""},a._deviceToken="",a._businessID=0,a._iosBusinessID=0,a._c2cUnreadCount=0,a._groupUnreadCount=0,a._isWebUniapp=0,a;}return s(o,[{key:"registerPlugin",value:function value(e){if(Z){this._offlinePushPlugin=e["tim-offline-push-plugin"];var t=e.offlinePushConfig||{},o=t.huaweiBusinessID,n=t.xiaomiBusinessID,a=t.xiaomiAppID,s=t.xiaomiAppKey,r=t.meizuBusinessID,i=t.meizuAppID,c=t.meizuAppKey,u=t.vivoBusinessID,l=t.oppoBusinessID,d=t.oppoAppKey,p=t.oppoAppSecret,_=t.iosBusinessID;this._androidPushConfig.huaweiPushBussinessId=o,this._androidPushConfig.xiaomiPushBussinessId=n,this._androidPushConfig.xiaomiPushAppId=a,this._androidPushConfig.xiaomiPushAppKey=s,this._androidPushConfig.meizuPushBussinessId=r,this._androidPushConfig.meizuPushAppId=i,this._androidPushConfig.meizuPushAppKey=c,this._androidPushConfig.vivoPushBussinessId=u,this._androidPushConfig.oppoPushBussinessId=l,this._androidPushConfig.oppoPushAppKey=d,this._androidPushConfig.oppoPushAppSecret=p,new Va(Ba.REGISTER_PLUGIN).setMessage("tim-offline-push-plugin").end(),this._iosBusinessID=_,this._setDeviceState(),be.log("".concat(this._className,".registerPlugin offlinePushConfig:").concat(e.offlinePushConfig));}else be.warn("!!!离线推送插件仅支持在 uni-app 打包的 native app 环境使用");}},{key:"init",value:function value(){this._isWebUniapp=this.getUniAppPlatform(),this._getDeviceToken();}},{key:"_getDeviceToken",value:function value(){var e=this;be.log("".concat(this._className,"._getDeviceToken androidPushConfig:").concat(JSON.stringify(this._androidPushConfig),", iosBusinessID:").concat(this._iosBusinessID)),!Ze(this._offlinePushPlugin)&&ot(this._offlinePushPlugin.getDeviceToken)&&this._offlinePushPlugin.getDeviceToken(this._androidPushConfig,function(t){var o=t.data,n=o.deviceToken,a=o.deviceBrand,s=o.deviceType,r=o.bussinessId;e._deviceToken=n,e._businessID=r||e._iosBusinessID,new Va(Ba.GET_DEVICE_TOKEN).setMessage("androidPushConfig:".concat(JSON.stringify(e._androidPushConfig),", deviceToken:").concat(n,", deviceBrand:").concat(a||s,", businessID:").concat(e._businessID)).end(),e._setToken();});}},{key:"canIUseOfflinePush",value:function value(){return Z&&!Ze(this._offlinePushPlugin);}},{key:"_setDeviceState",value:function value(){var e=this;!Ze(this._offlinePushPlugin)&&ot(this._offlinePushPlugin.setAppShowListener)&&this._offlinePushPlugin.setAppShowListener(function(t){var o=t.appShow;e._moduleManager.isReady()&&(0===o?(e._getConvUnreadCount(),e._onBackground()):1===o&&e._onForeground());});}},{key:"getDeviceBrand",value:function value(){if(!Ze(this._offlinePushPlugin)&&ot(this._offlinePushPlugin.getDeviceType))return(this._offlinePushPlugin.getDeviceType()||{}).deviceType;}},{key:"_setToken",value:function value(){var e=this,t=this.getModule(_o),o=1,n="",a="";Kt(this._deviceToken)&&(o=0);var s=this.getUniAppPlatform(),r=this.getDeviceBrand();be.log("".concat(this._className,".setToken platform:").concat(s)),s===G.IOS||s===G.IPAD||s===G.MAC?a=this._deviceToken:s===G.ANDROID&&(n=this._deviceToken);var i=new Va(Ba.OFFLINE_PUSH_SET_TOKEN);return i.setMessage("deviceToken:".concat(a||n,", businessID:").concat(this._businessID,", deviceBrand:").concat(r,", isWebUniapp:").concat(this._isWebUniapp,", pushMsg:").concat(o)),this.request({protocolName:Ea,requestData:{tokenID:n,pushMsg:o,sdkAppID:t.getSDKAppID(),businessID:parseInt(this._businessID),deviceBrand:r,deviceToken:a,isWebUniapp:this._isWebUniapp}}).then(function(t){return i.setNetworkType(e.getNetworkType()).end(),be.log("".concat(e._className,".setToken ok")),t;}).catch(function(t){return e.probeNetwork().then(function(e){var o=m(e,2),n=o[0],a=o[1];i.setError(t,n,a).end();}),be.error("".concat(e._className,".setToken failed. error:"),t),gs(t);});}},{key:"_getConvUnreadCount",value:function value(){var e=this;this._c2cUnreadCount=0,this._groupUnreadCount=0,this.getModule(po).getLocalConversationList().forEach(function(t){t.type===D.CONV_C2C&&(e._c2cUnreadCount+=t.unreadCount),t.type===D.CONV_GROUP&&(e._groupUnreadCount+=t.unreadCount);});}},{key:"_onBackground",value:function value(){var e=this;this.request({protocolName:ya,requestData:{c2cUnreadCount:this._c2cUnreadCount,groupUnreadCount:this._groupUnreadCount,isWebUniapp:this._isWebUniapp}}).then(function(t){return be.log("".concat(e._className,"._onBackground ok")),t;}).catch(function(t){be.warn("".concat(e._className,"._onBackground error:"),t);});}},{key:"_onForeground",value:function value(){var e=this;this.request({protocolName:Ta,requestData:{isWebUniapp:this._isWebUniapp}}).then(function(t){return be.log("".concat(e._className,"._onForeground ok")),t;}).catch(function(t){be.warn("".concat(e._className,"._onForeground error:"),t);});}},{key:"getUniAppPlatform",value:function value(){var e=uni.getSystemInfoSync().platform,t=this.getDeviceBrand();return"ios"===e?G.IOS:"android"===e?G.ANDROID:1002===t?G.IPAD:1001===t?G.MAC:void 0;}},{key:"reset",value:function value(){this._deviceToken="",this._businessID=0,this._c2cUnreadCount=0,this._groupUnreadCount=0,this._isWebUniapp=0,be.log("".concat(this._className,".reset"));}}]),o;}(Ro),_i=function(){function e(t){n(this,e);var o=new Va(Ba.SDK_CONSTRUCT);this._className="ModuleManager",this._isReady=!1,this._reason=Ca.USER_NOT_LOGGED_IN,this._startLoginTs=0,this._moduleMap=new Map(),this._innerEmitter=null,this._outerEmitter=null,this._checkCount=0,this._checkTimer=-1,this._moduleMap.set(_o,new ir(this,t)),this._moduleMap.set(Ao,new di(this)),this._moduleMap.set(Co,new oi(this)),this._moduleMap.set(So,new ui(this)),this._moduleMap.set(No,new ci(this)),this._moduleMap.set(To,new jr(this)),this._moduleMap.set(yo,new ei(this)),this._moduleMap.set(no,new cr(this)),this._moduleMap.set(ao,new Dr(this)),this._moduleMap.set(so,new rr(this)),this._moduleMap.set(ro,new hs(this)),this._moduleMap.set(po,new bs(this)),this._moduleMap.set(io,new $s(this)),this._moduleMap.set(uo,new Js(this)),this._moduleMap.set(lo,new er(this)),this._moduleMap.set(go,new lr(this)),this._moduleMap.set(ho,new _r(this)),this._moduleMap.set(fo,new mr(this)),this._moduleMap.set(mo,new vr(this)),this._moduleMap.set(Mo,new yr(this)),this._moduleMap.set(vo,new Nr(this)),this._moduleMap.set(Io,new Ar(this)),this._moduleMap.set(Eo,new ti(this)),this._moduleMap.set(Do,new ni(this)),this._moduleMap.set(Oo,new pi(this)),this._eventThrottleMap=new Map();var a=t.instanceID,s=t.oversea,r=t.SDKAppID,i="instanceID:".concat(a," SDKAppID:").concat(r," host:").concat(Ot()," oversea:").concat(s," inBrowser:").concat(oe," inMiniApp:").concat(te)+" workerAvailable:".concat(Te," UserAgent:").concat(se);Va.bindEventStatModule(this._moduleMap.get(ho)),o.setMessage("".concat(i," ").concat(function(){var e="";if(te)try{var t=ne.getSystemInfoSync(),o=t.model,n=t.version,a=t.system,s=t.platform,r=t.SDKVersion;e="model:".concat(o," version:").concat(n," system:").concat(a," platform:").concat(s," SDKVersion:").concat(r);}catch(i){e="";}return e;}())).end(),be.info("SDK ".concat(i)),this._readyList=void 0,this._ssoLogForReady=null,this._initReadyList();}return s(e,[{key:"_startTimer",value:function value(){var e=this._moduleMap.get(So),t=e.isWorkerEnabled();be.log("".concat(this._className,".startTimer isWorkerEnabled:").concat(t," seed:").concat(this._checkTimer)),t?e.startWorkerTimer():this._startMainThreadTimer();}},{key:"_startMainThreadTimer",value:function value(){be.log("".concat(this._className,"._startMainThreadTimer")),this._checkTimer<0&&(this._checkTimer=setInterval(this.onCheckTimer.bind(this),1e3));}},{key:"stopTimer",value:function value(){var e=this._moduleMap.get(So),t=e.isWorkerEnabled();be.log("".concat(this._className,".stopTimer isWorkerEnabled:").concat(t," seed:").concat(this._checkTimer)),t?e.stopWorkerTimer():this._stopMainThreadTimer();}},{key:"_stopMainThreadTimer",value:function value(){be.log("".concat(this._className,"._stopMainThreadTimer")),this._checkTimer>0&&(clearInterval(this._checkTimer),this._checkTimer=-1,this._checkCount=0);}},{key:"_stopMainThreadSocket",value:function value(){be.log("".concat(this._className,"._stopMainThreadSocket"));var e=this._moduleMap.get(To);e.setIsWorkerEnabled(!0),e.reConnect();}},{key:"_startMainThreadSocket",value:function value(){be.log("".concat(this._className,"._startMainThreadSocket"));var e=this._moduleMap.get(To);e.setIsWorkerEnabled(!1),e.reConnect();}},{key:"onWorkerTimerEnabled",value:function value(){be.log("".concat(this._className,".onWorkerTimerEnabled, disable main thread timer and socket")),this._stopMainThreadTimer(),this._stopMainThreadSocket();}},{key:"onWorkerTimerDisabled",value:function value(){be.log("".concat(this._className,".onWorkerTimerDisabled, enable main thread timer and socket")),this._startMainThreadTimer(),this._startMainThreadSocket();}},{key:"onCheckTimer",value:function value(){this._checkCount+=1;var e,t=C(this._moduleMap);try{for(t.s();!(e=t.n()).done;){var o=m(e.value,2)[1];o.onCheckTimer&&o.onCheckTimer(this._checkCount);}}catch(n){t.e(n);}finally{t.f();}}},{key:"_initReadyList",value:function value(){var e=this;this._readyList=[this._moduleMap.get(no),this._moduleMap.get(po)],this._readyList.forEach(function(t){t.ready(function(){return e._onModuleReady();});});}},{key:"_onModuleReady",value:function value(){var e=!0;if(this._readyList.forEach(function(t){t.isReady()||(e=!1);}),e&&!this._isReady){this._isReady=!0,this._outerEmitter.emit(S.SDK_READY);var t=Date.now()-this._startLoginTs;be.warn("SDK is ready. cost ".concat(t," ms")),this._startLoginTs=Date.now();var o=this._moduleMap.get(fo).getNetworkType(),n=this._ssoLogForReady.getStartTs()+Oe;this._ssoLogForReady.setNetworkType(o).setMessage(t).start(n).end();}}},{key:"login",value:function value(){0===this._startLoginTs&&(Le(),this._startLoginTs=Date.now(),this._startTimer(),this._moduleMap.get(fo).start(),this._ssoLogForReady=new Va(Ba.SDK_READY),this._reason=Ca.LOGGING_IN);}},{key:"onLoginFailed",value:function value(){this._startLoginTs=0;}},{key:"getOuterEmitterInstance",value:function value(){return null===this._outerEmitter&&(this._outerEmitter=new Mr(),ps(this._outerEmitter),this._outerEmitter._emit=this._outerEmitter.emit,this._outerEmitter.emit=function(e,t){var o=this;if(e===S.CONVERSATION_LIST_UPDATED||e===S.FRIEND_LIST_UPDATED||e===S.GROUP_LIST_UPDATED){if(this._eventThrottleMap.has(e)){var n=Date.now(),a=this._eventThrottleMap.get(e);n-a.last<1e3?(a.timeoutID&&clearTimeout(a.timeoutID),a.timeoutID=setTimeout(function(){a.last=n,o._outerEmitter._emit.apply(o._outerEmitter,[e,{name:e,data:o._getEventData(e)}]);},500)):(a.last=n,this._outerEmitter._emit.apply(this._outerEmitter,[e,{name:e,data:this._getEventData(e)}]));}else this._eventThrottleMap.set(e,{last:Date.now(),timeoutID:-1}),this._outerEmitter._emit.apply(this._outerEmitter,[e,{name:e,data:this._getEventData(e)}]);}else this._outerEmitter._emit.apply(this._outerEmitter,[e,{name:e,data:arguments[1]}]);}.bind(this)),this._outerEmitter;}},{key:"_getEventData",value:function value(e){return e===S.CONVERSATION_LIST_UPDATED?this._moduleMap.get(po).getLocalConversationList():e===S.FRIEND_LIST_UPDATED?this._moduleMap.get(co).getLocalFriendList(!1):e===S.GROUP_LIST_UPDATED?this._moduleMap.get(io).getLocalGroupList():void 0;}},{key:"getInnerEmitterInstance",value:function value(){return null===this._innerEmitter&&(this._innerEmitter=new Mr(),this._innerEmitter._emit=this._innerEmitter.emit,this._innerEmitter.emit=function(e,t){var o;Xe(arguments[1])&&arguments[1].data?(be.warn("inner eventData has data property, please check!"),o=[e,{name:arguments[0],data:arguments[1].data}]):o=[e,{name:arguments[0],data:arguments[1]}],this._innerEmitter._emit.apply(this._innerEmitter,o);}.bind(this)),this._innerEmitter;}},{key:"hasModule",value:function value(e){return this._moduleMap.has(e);}},{key:"getModule",value:function value(e){return this._moduleMap.get(e);}},{key:"isReady",value:function value(){return this._isReady;}},{key:"getNotReadyReason",value:function value(){return this._reason;}},{key:"setNotReadyReason",value:function value(e){this._reason=e;}},{key:"onError",value:function value(e){be.warn("Oops! code:".concat(e.code," message:").concat(e.message)),new Va(Ba.ERROR).setMessage("code:".concat(e.code," message:").concat(e.message)).setNetworkType(this.getModule(fo).getNetworkType()).setLevel("error").end(),this.getOuterEmitterInstance().emit(S.ERROR,e);}},{key:"reset",value:function value(){be.log("".concat(this._className,".reset")),Le();var e,t=C(this._moduleMap);try{for(t.s();!(e=t.n()).done;){var o=m(e.value,2)[1];o.reset&&o.reset();}}catch(r){t.e(r);}finally{t.f();}this._startLoginTs=0,this._initReadyList(),this._isReady=!1,this.stopTimer(),this._outerEmitter.emit(S.SDK_NOT_READY);var n,a=C(this._eventThrottleMap);try{for(a.s();!(n=a.n()).done;){var s=m(n.value,2)[1];s.timeoutID&&clearTimeout(s.timeoutID);}}catch(r){a.e(r);}finally{a.f();}this._eventThrottleMap.clear();}}]),e;}(),gi=function(){function e(){n(this,e),this._funcMap=new Map();}return s(e,[{key:"defense",value:function value(e,t){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;if("string"!=typeof e)return null;if(0===e.length)return null;if("function"!=typeof t)return null;if(this._funcMap.has(e)&&this._funcMap.get(e).has(t))return this._funcMap.get(e).get(t);this._funcMap.has(e)||this._funcMap.set(e,new Map());var n=null;return this._funcMap.get(e).has(t)?n=this._funcMap.get(e).get(t):(n=this._pack(e,t,o),this._funcMap.get(e).set(t,n)),n;}},{key:"defenseOnce",value:function value(e,t){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;return"function"!=typeof t?null:this._pack(e,t,o);}},{key:"find",value:function value(e,t){return"string"!=typeof e||0===e.length||"function"!=typeof t?null:this._funcMap.has(e)?this._funcMap.get(e).has(t)?this._funcMap.get(e).get(t):(be.log("SafetyCallback.find: 找不到 func —— ".concat(e,"/").concat(""!==t.name?t.name:"[anonymous]")),null):(be.log("SafetyCallback.find: 找不到 eventName-".concat(e," 对应的 func")),null);}},{key:"delete",value:function value(e,t){return"function"==typeof t&&!!this._funcMap.has(e)&&!!this._funcMap.get(e).has(t)&&(this._funcMap.get(e).delete(t),0===this._funcMap.get(e).size&&this._funcMap.delete(e),!0);}},{key:"_pack",value:function value(e,t,o){return function(){try{t.apply(o,Array.from(arguments));}catch(r){var n=Object.values(S).indexOf(e);if(-1!==n){var a=Object.keys(S)[n];be.warn("接入侧事件 TIM.EVENT.".concat(a," 对应的回调函数逻辑存在问题,请检查!"),r);}var s=new Va(Ba.CALLBACK_FUNCTION_ERROR);s.setMessage("eventName:".concat(e)).setMoreMessage(r.message).end();}};}}]),e;}(),hi=function(){function e(t){n(this,e);var o={SDKAppID:t.SDKAppID,unlimitedAVChatRoom:t.unlimitedAVChatRoom||!1,scene:t.scene||"",oversea:t.oversea||!1,instanceID:At(),devMode:t.devMode||!1,proxyServer:t.proxyServer||void 0};this._moduleManager=new _i(o),this._safetyCallbackFactory=new gi();}return s(e,[{key:"onError",value:function value(e){this._moduleManager.onError(e);}},{key:"login",value:function value(e){return this._moduleManager.login(),this._moduleManager.getModule(no).login(e);}},{key:"logout",value:function value(){var e=this;return this._moduleManager.getModule(no).logout().then(function(t){return e._moduleManager.reset(),t;});}},{key:"isReady",value:function value(){return this._moduleManager.isReady();}},{key:"getNotReadyReason",value:function value(){return this._moduleManager.getNotReadyReason();}},{key:"destroy",value:function value(){var e=this;return this.logout().finally(function(){e._moduleManager.stopTimer(),e._moduleManager.getModule(So).terminate(),e._moduleManager.getModule(To).dealloc();var t=e._moduleManager.getOuterEmitterInstance(),o=e._moduleManager.getModule(_o);t.emit(S.SDK_DESTROY,{SDKAppID:o.getSDKAppID()});});}},{key:"on",value:function value(e,t,o){e===S.GROUP_SYSTEM_NOTICE_RECEIVED&&be.warn("!!!TIM.EVENT.GROUP_SYSTEM_NOTICE_RECEIVED v2.6.0起弃用,为了更好的体验,请在 TIM.EVENT.MESSAGE_RECEIVED 事件回调内接收处理群系统通知,详细请参考:https://web.sdk.qcloud.com/im/doc/zh-cn/Message.html#.GroupSystemNoticePayload"),be.debug("on","eventName:".concat(e)),this._moduleManager.getOuterEmitterInstance().on(e,this._safetyCallbackFactory.defense(e,t,o),o);}},{key:"once",value:function value(e,t,o){be.debug("once","eventName:".concat(e)),this._moduleManager.getOuterEmitterInstance().once(e,this._safetyCallbackFactory.defenseOnce(e,t,o),o||this);}},{key:"off",value:function value(e,t,o,n){be.debug("off","eventName:".concat(e));var a=this._safetyCallbackFactory.find(e,t);null!==a&&(this._moduleManager.getOuterEmitterInstance().off(e,a,o,n),this._safetyCallbackFactory.delete(e,t));}},{key:"registerPlugin",value:function value(e){Ze(e["tim-offline-push-plugin"])?this._moduleManager.getModule(vo).registerPlugin(e):this._moduleManager.getModule(Oo).registerPlugin(e);}},{key:"setLogLevel",value:function value(e){if(e<=0){console.log([""," ________ ______ __ __ __ __ ________ _______","| \\| \\| \\ / \\| \\ _ | \\| \\| \\"," \\$$$$$$$$ \\$$$$$$| $$\\ / $$| $$ / \\ | $$| $$$$$$$$| $$$$$$$\\"," | $$ | $$ | $$$\\ / $$$| $$/ $\\| $$| $$__ | $$__/ $$"," | $$ | $$ | $$$$\\ $$$$| $$ $$$\\ $$| $$ \\ | $$ $$"," | $$ | $$ | $$\\$$ $$ $$| $$ $$\\$$\\$$| $$$$$ | $$$$$$$\\"," | $$ _| $$_ | $$ \\$$$| $$| $$$$ \\$$$$| $$_____ | $$__/ $$"," | $$ | $$ \\| $$ \\$ | $$| $$$ \\$$$| $$ \\| $$ $$"," \\$$ \\$$$$$$ \\$$ \\$$ \\$$ \\$$ \\$$$$$$$$ \\$$$$$$$","",""].join("\n")),console.log("%cIM 智能客服,随时随地解决您的问题 →_→ https://cloud.tencent.com/act/event/smarty-service?from=im-doc","color:#006eff"),console.log("%c从v2.11.2起,SDK 支持了 WebSocket,小程序需要添加受信域名!升级指引: https://web.sdk.qcloud.com/im/doc/zh-cn/tutorial-02-upgradeguideline.html","color:#ff0000");console.log(["","参考以下文档,会更快解决问题哦!(#^.^#)\n","SDK 更新日志: https://cloud.tencent.com/document/product/269/38492\n","SDK 接口文档: https://web.sdk.qcloud.com/im/doc/zh-cn/SDK.html\n","常见问题: https://web.sdk.qcloud.com/im/doc/zh-cn/tutorial-01-faq.html\n","反馈问题?戳我提 issue: https://github.com/tencentyun/TIMSDK/issues\n","如果您需要在生产环境关闭上面的日志,请 tim.setLogLevel(1)\n"].join("\n"));}be.setLevel(e);}},{key:"createTextMessage",value:function value(e){return this._moduleManager.getModule(ao).createTextMessage(e);}},{key:"createTextAtMessage",value:function value(e){return this._moduleManager.getModule(ao).createTextMessage(e);}},{key:"createImageMessage",value:function value(e){return this._moduleManager.getModule(ao).createImageMessage(e);}},{key:"createAudioMessage",value:function value(e){return this._moduleManager.getModule(ao).createAudioMessage(e);}},{key:"createVideoMessage",value:function value(e){return this._moduleManager.getModule(ao).createVideoMessage(e);}},{key:"createCustomMessage",value:function value(e){return this._moduleManager.getModule(ao).createCustomMessage(e);}},{key:"createFaceMessage",value:function value(e){return this._moduleManager.getModule(ao).createFaceMessage(e);}},{key:"createFileMessage",value:function value(e){return this._moduleManager.getModule(ao).createFileMessage(e);}},{key:"createLocationMessage",value:function value(e){return this._moduleManager.getModule(ao).createLocationMessage(e);}},{key:"createMergerMessage",value:function value(e){return this._moduleManager.getModule(ao).createMergerMessage(e);}},{key:"downloadMergerMessage",value:function value(e){return e.type!==D.MSG_MERGER?gs(new ls({code:Ca.MESSAGE_MERGER_TYPE_INVALID,message:Sa.MESSAGE_MERGER_TYPE_INVALID})):Kt(e.payload.downloadKey)?gs(new ls({code:Ca.MESSAGE_MERGER_KEY_INVALID,message:Sa.MESSAGE_MERGER_KEY_INVALID})):this._moduleManager.getModule(ao).downloadMergerMessage(e).catch(function(e){return gs(new ls({code:Ca.MESSAGE_MERGER_DOWNLOAD_FAIL,message:Sa.MESSAGE_MERGER_DOWNLOAD_FAIL}));});}},{key:"createForwardMessage",value:function value(e){return this._moduleManager.getModule(ao).createForwardMessage(e);}},{key:"sendMessage",value:function value(e,t){return e instanceof ns?this._moduleManager.getModule(ao).sendMessageInstance(e,t):gs(new ls({code:Ca.MESSAGE_SEND_NEED_MESSAGE_INSTANCE,message:Sa.MESSAGE_SEND_NEED_MESSAGE_INSTANCE}));}},{key:"callExperimentalAPI",value:function value(e,t){return"handleGroupInvitation"===e?this._moduleManager.getModule(io).handleGroupInvitation(t):"isCommercialAbilityEnabled"===e?this._moduleManager.getModule(Ao).isFeatureEnabled(t):gs(new ls({code:Ca.INVALID_OPERATION,message:Sa.INVALID_OPERATION}));}},{key:"revokeMessage",value:function value(e){return this._moduleManager.getModule(ao).revokeMessage(e);}},{key:"resendMessage",value:function value(e){return this._moduleManager.getModule(ao).resendMessage(e);}},{key:"deleteMessage",value:function value(e){return this._moduleManager.getModule(ao).deleteMessage(e);}},{key:"modifyMessage",value:function value(e){return this._moduleManager.getModule(ao).modifyRemoteMessage(e);}},{key:"getMessageList",value:function value(e){return this._moduleManager.getModule(po).getMessageList(e);}},{key:"getMessageListHopping",value:function value(e){return this._moduleManager.getModule(po).getMessageListHopping(e);}},{key:"sendMessageReadReceipt",value:function value(e){return this._moduleManager.getModule(po).sendReadReceipt(e);}},{key:"getMessageReadReceiptList",value:function value(e){return this._moduleManager.getModule(po).getReadReceiptList(e);}},{key:"getGroupMessageReadMemberList",value:function value(e){return this._moduleManager.getModule(io).getReadReceiptDetail(e);}},{key:"findMessage",value:function value(e){return this._moduleManager.getModule(po).findMessage(e);}},{key:"setMessageRead",value:function value(e){return this._moduleManager.getModule(po).setMessageRead(e);}},{key:"getConversationList",value:function value(e){return this._moduleManager.getModule(po).getConversationList(e);}},{key:"getConversationProfile",value:function value(e){return this._moduleManager.getModule(po).getConversationProfile(e);}},{key:"deleteConversation",value:function value(e){return this._moduleManager.getModule(po).deleteConversation(e);}},{key:"pinConversation",value:function value(e){return this._moduleManager.getModule(po).pinConversation(e);}},{key:"setAllMessageRead",value:function value(e){return this._moduleManager.getModule(po).setAllMessageRead(e);}},{key:"setMessageRemindType",value:function value(e){return this._moduleManager.getModule(po).setMessageRemindType(e);}},{key:"setConversationCustomData",value:function value(e){return this._moduleManager.getModule(po).setConversationCustomData(e);}},{key:"markConversation",value:function value(e){return this._moduleManager.getModule(po).markConversation(e);}},{key:"getConversationGroupList",value:function value(){return this._moduleManager.getModule(po).getConversationGroupList();}},{key:"createConversationGroup",value:function value(e){return this._moduleManager.getModule(po).createConversationGroup(e);}},{key:"deleteConversationGroup",value:function value(e){return this._moduleManager.getModule(po).deleteConversationGroup(e);}},{key:"renameConversationGroup",value:function value(e){return this._moduleManager.getModule(po).renameConversationGroup(e);}},{key:"addConversationsToGroup",value:function value(e){return this._moduleManager.getModule(po).addConversationsToGroup(e);}},{key:"deleteConversationsFromGroup",value:function value(e){return this._moduleManager.getModule(po).deleteConversationsFromGroup(e);}},{key:"getMyProfile",value:function value(){return this._moduleManager.getModule(so).getMyProfile();}},{key:"getUserProfile",value:function value(e){return this._moduleManager.getModule(so).getUserProfile(e);}},{key:"updateMyProfile",value:function value(e){return this._moduleManager.getModule(so).updateMyProfile(e);}},{key:"getBlacklist",value:function value(){return this._moduleManager.getModule(so).getLocalBlacklist();}},{key:"addToBlacklist",value:function value(e){return this._moduleManager.getModule(so).addBlacklist(e);}},{key:"removeFromBlacklist",value:function value(e){return this._moduleManager.getModule(so).deleteBlacklist(e);}},{key:"setSelfStatus",value:function value(e){return this._moduleManager.getModule(so).setSelfStatus(e);}},{key:"getUserStatus",value:function value(e){return this._moduleManager.getModule(so).getUserStatus(e);}},{key:"subscribeUserStatus",value:function value(e){return this._moduleManager.getModule(so).subscribeUserStatus(e);}},{key:"unsubscribeUserStatus",value:function value(e){return this._moduleManager.getModule(so).unsubscribeUserStatus(e);}},{key:"getFriendList",value:function value(){var e=this._moduleManager.getModule(co);return e?e.getLocalFriendList():gs({code:Ca.CANNOT_FIND_MODULE,message:Sa.CANNOT_FIND_MODULE});}},{key:"addFriend",value:function value(e){var t=this._moduleManager.getModule(co);return t?t.addFriend(e):gs({code:Ca.CANNOT_FIND_MODULE,message:Sa.CANNOT_FIND_MODULE});}},{key:"deleteFriend",value:function value(e){var t=this._moduleManager.getModule(co);return t?t.deleteFriend(e):gs({code:Ca.CANNOT_FIND_MODULE,message:Sa.CANNOT_FIND_MODULE});}},{key:"checkFriend",value:function value(e){var t=this._moduleManager.getModule(co);return t?t.checkFriend(e):gs({code:Ca.CANNOT_FIND_MODULE,message:Sa.CANNOT_FIND_MODULE});}},{key:"getFriendProfile",value:function value(e){var t=this._moduleManager.getModule(co);return t?t.getFriendProfile(e):gs({code:Ca.CANNOT_FIND_MODULE,message:Sa.CANNOT_FIND_MODULE});}},{key:"updateFriend",value:function value(e){var t=this._moduleManager.getModule(co);return t?t.updateFriend(e):gs({code:Ca.CANNOT_FIND_MODULE,message:Sa.CANNOT_FIND_MODULE});}},{key:"getFriendApplicationList",value:function value(){var e=this._moduleManager.getModule(co);return e?e.getLocalFriendApplicationList():gs({code:Ca.CANNOT_FIND_MODULE,message:Sa.CANNOT_FIND_MODULE});}},{key:"acceptFriendApplication",value:function value(e){var t=this._moduleManager.getModule(co);return t?t.acceptFriendApplication(e):gs({code:Ca.CANNOT_FIND_MODULE,message:Sa.CANNOT_FIND_MODULE});}},{key:"refuseFriendApplication",value:function value(e){var t=this._moduleManager.getModule(co);return t?t.refuseFriendApplication(e):gs({code:Ca.CANNOT_FIND_MODULE,message:Sa.CANNOT_FIND_MODULE});}},{key:"deleteFriendApplication",value:function value(e){var t=this._moduleManager.getModule(co);return t?t.deleteFriendApplication(e):gs({code:Ca.CANNOT_FIND_MODULE,message:Sa.CANNOT_FIND_MODULE});}},{key:"setFriendApplicationRead",value:function value(){var e=this._moduleManager.getModule(co);return e?e.setFriendApplicationRead():gs({code:Ca.CANNOT_FIND_MODULE,message:Sa.CANNOT_FIND_MODULE});}},{key:"getFriendGroupList",value:function value(){var e=this._moduleManager.getModule(co);return e?e.getLocalFriendGroupList():gs({code:Ca.CANNOT_FIND_MODULE,message:Sa.CANNOT_FIND_MODULE});}},{key:"createFriendGroup",value:function value(e){var t=this._moduleManager.getModule(co);return t?t.createFriendGroup(e):gs({code:Ca.CANNOT_FIND_MODULE,message:Sa.CANNOT_FIND_MODULE});}},{key:"deleteFriendGroup",value:function value(e){var t=this._moduleManager.getModule(co);return t?t.deleteFriendGroup(e):gs({code:Ca.CANNOT_FIND_MODULE,message:Sa.CANNOT_FIND_MODULE});}},{key:"addToFriendGroup",value:function value(e){var t=this._moduleManager.getModule(co);return t?t.addToFriendGroup(e):gs({code:Ca.CANNOT_FIND_MODULE,message:Sa.CANNOT_FIND_MODULE});}},{key:"removeFromFriendGroup",value:function value(e){var t=this._moduleManager.getModule(co);return t?t.removeFromFriendGroup(e):gs({code:Ca.CANNOT_FIND_MODULE,message:Sa.CANNOT_FIND_MODULE});}},{key:"renameFriendGroup",value:function value(e){var t=this._moduleManager.getModule(co);return t?t.renameFriendGroup(e):gs({code:Ca.CANNOT_FIND_MODULE,message:Sa.CANNOT_FIND_MODULE});}},{key:"getGroupList",value:function value(e){return this._moduleManager.getModule(io).getGroupList(e);}},{key:"getGroupProfile",value:function value(e){return this._moduleManager.getModule(io).getGroupProfile(e);}},{key:"createGroup",value:function value(e){return this._moduleManager.getModule(io).createGroup(e);}},{key:"dismissGroup",value:function value(e){return this._moduleManager.getModule(io).dismissGroup(e);}},{key:"updateGroupProfile",value:function value(e){return this._moduleManager.getModule(io).updateGroupProfile(e);}},{key:"joinGroup",value:function value(e){return this._moduleManager.getModule(io).joinGroup(e);}},{key:"quitGroup",value:function value(e){return this._moduleManager.getModule(io).quitGroup(e);}},{key:"searchGroupByID",value:function value(e){return this._moduleManager.getModule(io).searchGroupByID(e);}},{key:"getGroupOnlineMemberCount",value:function value(e){return this._moduleManager.getModule(io).getGroupOnlineMemberCount(e);}},{key:"changeGroupOwner",value:function value(e){return this._moduleManager.getModule(io).changeGroupOwner(e);}},{key:"handleGroupApplication",value:function value(e){return this._moduleManager.getModule(io).handleGroupApplication(e);}},{key:"initGroupAttributes",value:function value(e){return this._moduleManager.getModule(io).initGroupAttributes(e);}},{key:"setGroupAttributes",value:function value(e){return this._moduleManager.getModule(io).setGroupAttributes(e);}},{key:"deleteGroupAttributes",value:function value(e){return this._moduleManager.getModule(io).deleteGroupAttributes(e);}},{key:"getGroupAttributes",value:function value(e){return this._moduleManager.getModule(io).getGroupAttributes(e);}},{key:"getGroupMemberList",value:function value(e){return this._moduleManager.getModule(uo).getGroupMemberList(e);}},{key:"getGroupMemberProfile",value:function value(e){return this._moduleManager.getModule(uo).getGroupMemberProfile(e);}},{key:"addGroupMember",value:function value(e){return this._moduleManager.getModule(uo).addGroupMember(e);}},{key:"deleteGroupMember",value:function value(e){return this._moduleManager.getModule(uo).deleteGroupMember(e);}},{key:"setGroupMemberMuteTime",value:function value(e){return this._moduleManager.getModule(uo).setGroupMemberMuteTime(e);}},{key:"setGroupMemberRole",value:function value(e){return this._moduleManager.getModule(uo).setGroupMemberRole(e);}},{key:"setGroupMemberNameCard",value:function value(e){return this._moduleManager.getModule(uo).setGroupMemberNameCard(e);}},{key:"setGroupMemberCustomField",value:function value(e){return this._moduleManager.getModule(uo).setGroupMemberCustomField(e);}},{key:"getJoinedCommunityList",value:function value(){return this._moduleManager.getModule(lo).getJoinedCommunityList();}},{key:"createTopicInCommunity",value:function value(e){return this._moduleManager.getModule(lo).createTopicInCommunity(e);}},{key:"deleteTopicFromCommunity",value:function value(e){return this._moduleManager.getModule(lo).deleteTopicFromCommunity(e);}},{key:"updateTopicProfile",value:function value(e){return this._moduleManager.getModule(lo).updateTopicProfile(e);}},{key:"getTopicList",value:function value(e){return this._moduleManager.getModule(lo).getTopicList(e);}}]),e;}(),fi={login:"login",logout:"logout",destroy:"destroy",on:"on",off:"off",ready:"ready",setLogLevel:"setLogLevel",joinGroup:"joinGroup",quitGroup:"quitGroup",registerPlugin:"registerPlugin",getGroupOnlineMemberCount:"getGroupOnlineMemberCount"};function mi(e,t){if(e.isReady()||void 0!==fi[t])return!0;var o=e.getNotReadyReason(),n="";Object.getOwnPropertyNames(Ca).forEach(function(e){Ca[e]===o&&(n=Sa[e]);});var a={code:o,message:"".concat(n,"导致 sdk not ready。").concat(t," ").concat(Sa.SDK_IS_NOT_READY,",请参考 https://web.sdk.qcloud.com/im/doc/zh-cn/module-EVENT.html#.SDK_READY")};return e.onError(a),a;}var Mi={},vi={};return vi.create=function(e){var o=0;if($e(e.SDKAppID))o=e.SDKAppID;else if(be.warn("TIM.create SDKAppID 的类型应该为 Number,请修改!"),o=parseInt(e.SDKAppID),isNaN(o))return be.error("TIM.create failed. 解析 SDKAppID 失败,请检查传参!"),null;if(o&&Mi[o])return Mi[o];be.log("TIM.create");var n=new hi(t(t({},e),{},{SDKAppID:o}));n.on(S.SDK_DESTROY,function(e){Mi[e.data.SDKAppID]=null,delete Mi[e.data.SDKAppID];});var a=function(e){var t=Object.create(null);return Object.keys(oo).forEach(function(o){if(e[o]){var n=oo[o],a=new N();t[n]=function(){var t=Array.from(arguments);return a.use(function(t,n){var a=mi(e,o);return!0===a?n():gs(a);}).use(function(e,t){if(!0===Ht(e,to[o],n))return t();}).use(function(t,n){return e[o].apply(e,t);}),a.run(t);};}}),t;}(n);return Mi[o]=a,be.log("TIM.create ok"),a;},vi.TYPES=D,vi.EVENT=S,vi.VERSION="2.22.1",be.log("TIM.VERSION: ".concat(vi.VERSION)),vi;});
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../HBuilderX/plugins/uniapp-cli/node_modules/webpack/buildin/global.js */ 2), __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
- /***/ }),
- /* 160 */
- /*!**********************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/tim-upload-plugin/index.js ***!
- \**********************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- /* WEBPACK VAR INJECTION */(function(uni) {var global, factory;global = this, factory = function factory() {function e(e, t) {var n = Object.keys(e);if (Object.getOwnPropertySymbols) {var o = Object.getOwnPropertySymbols(e);t && (o = o.filter(function (t) {return Object.getOwnPropertyDescriptor(e, t).enumerable;})), n.push.apply(n, o);}return n;}function t(t) {for (var n = 1; n < arguments.length; n++) {var o = null != arguments[n] ? arguments[n] : {};n % 2 ? e(Object(o), !0).forEach(function (e) {s(t, e, o[e]);}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(o)) : e(Object(o)).forEach(function (e) {Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(o, e));});}return t;}function n(e) {return (n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (e) {return typeof e;} : function (e) {return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;})(e);}function o(e, t) {if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");}function r(e, t) {for (var n = 0; n < t.length; n++) {var o = t[n];o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);}}function a(e, t, n) {return t && r(e.prototype, t), n && r(e, n), Object.defineProperty(e, "prototype", { writable: !1 }), e;}function s(e, t, n) {return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;}function i(e, t) {if (null == e) return {};var n,o,r = function (e, t) {if (null == e) return {};var n,o,r = {},a = Object.keys(e);for (o = 0; o < a.length; o++) {n = a[o], t.indexOf(n) >= 0 || (r[n] = e[n]);}return r;}(e, t);if (Object.getOwnPropertySymbols) {var a = Object.getOwnPropertySymbols(e);for (o = 0; o < a.length; o++) {n = a[o], t.indexOf(n) >= 0 || Object.prototype.propertyIsEnumerable.call(e, n) && (r[n] = e[n]);}}return r;}var f = "undefined" != typeof wx && "function" == typeof wx.getSystemInfoSync && Boolean(wx.getSystemInfoSync().fontSizeSetting),u = "undefined" != typeof qq && "function" == typeof qq.getSystemInfoSync && Boolean(qq.getSystemInfoSync().fontSizeSetting),l = "undefined" != typeof tt && "function" == typeof tt.getSystemInfoSync && Boolean(tt.getSystemInfoSync().fontSizeSetting),c = "undefined" != typeof swan && "function" == typeof swan.getSystemInfoSync && Boolean(swan.getSystemInfoSync().fontSizeSetting),y = "undefined" != typeof my && "function" == typeof my.getSystemInfoSync && Boolean(my.getSystemInfoSync().fontSizeSetting),d = "undefined" != typeof uni && "undefined" == typeof window,p = f || u || l || c || y || d,g = u ? qq : l ? tt : c ? swan : y ? my : f ? wx : d ? uni : {},h = function h(e) {if ("object" !== n(e) || null === e) return !1;var t = Object.getPrototypeOf(e);if (null === t) return !0;for (var o = t; null !== Object.getPrototypeOf(o);) {o = Object.getPrototypeOf(o);}return t === o;};function m(e) {if (null == e) return !0;if ("boolean" == typeof e) return !1;if ("number" == typeof e) return 0 === e;if ("string" == typeof e) return 0 === e.length;if ("function" == typeof e) return 0 === e.length;if (Array.isArray(e)) return 0 === e.length;if (e instanceof Error) return "" === e.message;if (h(e)) {for (var t in e) {if (Object.prototype.hasOwnProperty.call(e, t)) return !1;}return !0;}return !1;}var b = function () {function e() {o(this, e);}return a(e, [{ key: "request", value: function value(e, t) {var n = this,o = e.downloadUrl || "",r = (e.method || "PUT").toUpperCase(),a = e.url;if (e.qs) {var s = function (e) {var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "&",n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : "=";return m(e) ? "" : h(e) ? Object.keys(e).map(function (o) {var r = encodeURIComponent(o) + n;return Array.isArray(e[o]) ? e[o].map(function (e) {return r + encodeURIComponent(e);}).join(t) : r + encodeURIComponent(e[o]);}).filter(Boolean).join(t) : void 0;}(e.qs);s && (a += "".concat(-1 === a.indexOf("?") ? "?" : "&").concat(s));}var i = new XMLHttpRequest();i.open(r, a, !0), i.responseType = e.dataType || "text";var f = e.headers || {};if (!m(f)) for (var u in f) {f.hasOwnProperty(u) && "content-length" !== u.toLowerCase() && "user-agent" !== u.toLowerCase() && "origin" !== u.toLowerCase() && "host" !== u.toLowerCase() && i.setRequestHeader(u, f[u]);}return i.onload = function () {if (200 === i.status) t(null, n._xhrRes(i, n._xhrBody(i, o)));else {var e = { code: i.status, message: JSON.stringify(i.responseText) };t(e, n._xhrRes(i, n._xhrBody(i)));}}, i.onerror = function (e) {var o = n._xhrBody(i),r = { code: i.status, message: JSON.stringify(i.responseText) };o || i.statusText || 0 !== i.status || (e.message = "CORS blocked or network error"), t(r, n._xhrRes(i, o)), r = null;}, e.onProgress && i.upload && (i.upload.onprogress = function (t) {var n = t.total,o = t.loaded,r = Math.floor(100 * o / n);e.onProgress({ total: n, loaded: o, percent: (r >= 100 ? 100 : r) / 100 });}), i.send(e.resources), i;} }, { key: "_xhrRes", value: function value(e, t) {var n = {};return e.getAllResponseHeaders().trim().split("\n").forEach(function (e) {if (e) {var t = e.indexOf(":"),o = e.substr(0, t).trim().toLowerCase(),r = e.substr(t + 1).trim();n[o] = r;}}), { statusCode: e.status, statusMessage: e.statusText, headers: n, data: t };} }, { key: "_xhrBody", value: function value(e, t) {return 200 === e.status && t ? { location: t } : { response: e.responseText };} }]), e;}(),v = ["unknown", "image", "video", "audio", "log"],O = ["name"],S = function () {function e() {o(this, e);}return a(e, [{ key: "request", value: function value(e, n) {var o = this,r = e.resources,a = void 0 === r ? "" : r,s = e.headers,f = void 0 === s ? {} : s,u = e.url,l = e.downloadUrl,c = void 0 === l ? "" : l,d = null,p = "",h = c.match(/^(https?:\/\/[^/]+\/)([^/]*\/?)(.*)$/),m = { url: u, header: f, name: "file", filePath: a, formData: { key: p = (p = decodeURIComponent(h[3])).indexOf("?") > -1 ? p.split("?")[0] : p, success_action_status: 200, "Content-Type": "" }, timeout: e.timeout || 3e5 };if (y) {var b = m;b.name, m = t(t({}, i(b, O)), {}, { fileName: "file", fileType: v[e.fileType] });}return (d = g.uploadFile(t(t({}, m), {}, { success: function success(e) {o._handleResponse({ response: e, downloadUrl: c, callback: n });}, fail: function fail(e) {o._handleResponse({ response: e, downloadUrl: c, callback: n });} }))).onProgressUpdate(function (t) {e.onProgress && e.onProgress({ total: t.totalBytesExpectedToSend, loaded: t.totalBytesSent, percent: Math.floor(t.progress) / 100 });}), d;} }, { key: "_handleResponse", value: function value(e) {var n = e.downloadUrl,o = e.response,r = e.callback,a = o.header,s = {};if (a) for (var i in a) {a.hasOwnProperty(i) && (s[i.toLowerCase()] = a[i]);}var f = +o.statusCode;200 === f ? r(null, { statusCode: f, headers: s, data: t(t({}, o.data), {}, { location: n }) }) : r({ code: f, message: JSON.stringify(o.data) }, { statusCode: f, headers: s, data: void 0 });} }]), e;}();return function () {function e() {o(this, e), console.log("TIMUploadPlugin.VERSION: ".concat("1.0.5")), this.retry = 1, this.tryCount = 0, this.systemClockOffset = 0, this.httpRequest = p ? new S() : new b();}return a(e, [{ key: "uploadFile", value: function value(e, t) {var n = this;return this.httpRequest.request(e, function (o, r) {o && n.tryCount < n.retry && n.allowRetry(o) ? (n.tryCount++, n.uploadFile(e, t)) : (n.tryCount = 0, t(o, r));});} }, { key: "allowRetry", value: function value(e) {var t = !1,n = !1;if (e) {var o = e.headers && (e.headers.date || e.headers.Date) || e.error && e.error.ServerTime;try {var r = e.error && e.error.Code,a = e.error && e.error.Message;("RequestTimeTooSkewed" === r || "AccessDenied" === r && "Request has expired" === a) && (n = !0);} catch (f) {}if (n && o) {var s = Date.now(),i = Date.parse(o);Math.abs(s + this.systemClockOffset - i) >= 3e4 && (this.systemClockOffset = i - s, t = !0);} else 5 === Math.floor(e.statusCode / 100) && (t = !0);}return t;} }]), e;}();}, true ? module.exports = factory() : undefined;
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
- /***/ }),
- /* 161 */,
- /* 162 */,
- /* 163 */,
- /* 164 */,
- /* 165 */,
- /* 166 */,
- /* 167 */,
- /* 168 */,
- /* 169 */,
- /* 170 */,
- /* 171 */,
- /* 172 */,
- /* 173 */,
- /* 174 */,
- /* 175 */,
- /* 176 */,
- /* 177 */,
- /* 178 */,
- /* 179 */,
- /* 180 */,
- /* 181 */,
- /* 182 */,
- /* 183 */,
- /* 184 */,
- /* 185 */,
- /* 186 */,
- /* 187 */,
- /* 188 */,
- /* 189 */,
- /* 190 */,
- /* 191 */,
- /* 192 */,
- /* 193 */,
- /* 194 */,
- /* 195 */,
- /* 196 */,
- /* 197 */,
- /* 198 */,
- /* 199 */,
- /* 200 */,
- /* 201 */,
- /* 202 */,
- /* 203 */,
- /* 204 */,
- /* 205 */,
- /* 206 */,
- /* 207 */,
- /* 208 */,
- /* 209 */
- /*!******************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/util/oss.js ***!
- \******************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /* WEBPACK VAR INJECTION */(function(uni) {var _cryptoJs = _interopRequireDefault(__webpack_require__(/*! crypto-js */ 210));
- var _base = __webpack_require__(/*! ./base64.js */ 246);
- var _moment = _interopRequireDefault(__webpack_require__(/*! moment */ 13));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
- // 计算签名。
- function computeSignature(accessKeySecret, canonicalString) {
- return _cryptoJs.default.enc.Base64.stringify(_cryptoJs.default.HmacSHA1(canonicalString, accessKeySecret));
- }
- function getPolicy() {
- var date = new Date();
- date.setHours(date.getHours() + 1);
- var policyText = {
- expiration: date.toISOString(), // 设置policy过期时间。
- conditions: [
- // 限制上传大小。
- ["content-length-range", 0, 1024 * 1024 * 1024]] };
- return policyText;
- }
- function getKey(i, ext) {
- var now = new Date();
- var date = (0, _moment.default)(now).format('yyyyMMDD');
- var time = (0, _moment.default)(now).format('HHmmss');
- var longTime = (0, _moment.default)(now).format('yyyyMMDDHHmmss');
- var userId = JSON.parse(uni.getStorageSync('user')).id;
- return "".concat(date, "/").concat(userId, "/").concat(time, "/").concat(longTime).concat(i, ".").concat(ext);
- }
- module.exports = {
- computeSignature: computeSignature,
- getPolicy: getPolicy,
- getKey: getKey };
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
- /***/ }),
- /* 210 */
- /*!**************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/crypto-js/index.js ***!
- \**************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- ;(function (root, factory, undef) {
- if (true) {
- // CommonJS
- module.exports = exports = factory(__webpack_require__(/*! ./core */ 211), __webpack_require__(/*! ./x64-core */ 213), __webpack_require__(/*! ./lib-typedarrays */ 214), __webpack_require__(/*! ./enc-utf16 */ 215), __webpack_require__(/*! ./enc-base64 */ 216), __webpack_require__(/*! ./enc-base64url */ 217), __webpack_require__(/*! ./md5 */ 218), __webpack_require__(/*! ./sha1 */ 219), __webpack_require__(/*! ./sha256 */ 220), __webpack_require__(/*! ./sha224 */ 221), __webpack_require__(/*! ./sha512 */ 222), __webpack_require__(/*! ./sha384 */ 223), __webpack_require__(/*! ./sha3 */ 224), __webpack_require__(/*! ./ripemd160 */ 225), __webpack_require__(/*! ./hmac */ 226), __webpack_require__(/*! ./pbkdf2 */ 227), __webpack_require__(/*! ./evpkdf */ 228), __webpack_require__(/*! ./cipher-core */ 229), __webpack_require__(/*! ./mode-cfb */ 230), __webpack_require__(/*! ./mode-ctr */ 231), __webpack_require__(/*! ./mode-ctr-gladman */ 232), __webpack_require__(/*! ./mode-ofb */ 233), __webpack_require__(/*! ./mode-ecb */ 234), __webpack_require__(/*! ./pad-ansix923 */ 235), __webpack_require__(/*! ./pad-iso10126 */ 236), __webpack_require__(/*! ./pad-iso97971 */ 237), __webpack_require__(/*! ./pad-zeropadding */ 238), __webpack_require__(/*! ./pad-nopadding */ 239), __webpack_require__(/*! ./format-hex */ 240), __webpack_require__(/*! ./aes */ 241), __webpack_require__(/*! ./tripledes */ 242), __webpack_require__(/*! ./rc4 */ 243), __webpack_require__(/*! ./rabbit */ 244), __webpack_require__(/*! ./rabbit-legacy */ 245));
- } else
- {}
- })(this, function (CryptoJS) {
- return CryptoJS;
- });
- /***/ }),
- /* 211 */
- /*!*************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/crypto-js/core.js ***!
- \*************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- /* WEBPACK VAR INJECTION */(function(global) {;(function (root, factory) {
- if (true) {
- // CommonJS
- module.exports = exports = factory();
- } else
- {}
- })(this, function () {
- /*globals window, global, require*/
- /**
- * CryptoJS core components.
- */
- var CryptoJS = CryptoJS || function (Math, undefined) {
- var crypto;
- // Native crypto from window (Browser)
- if (typeof window !== 'undefined' && window.crypto) {
- crypto = window.crypto;
- }
- // Native crypto in web worker (Browser)
- if (typeof self !== 'undefined' && self.crypto) {
- crypto = self.crypto;
- }
- // Native crypto from worker
- if (typeof globalThis !== 'undefined' && globalThis.crypto) {
- crypto = globalThis.crypto;
- }
- // Native (experimental IE 11) crypto from window (Browser)
- if (!crypto && typeof window !== 'undefined' && window.msCrypto) {
- crypto = window.msCrypto;
- }
- // Native crypto from global (NodeJS)
- if (!crypto && typeof global !== 'undefined' && global.crypto) {
- crypto = global.crypto;
- }
- // Native crypto import via require (NodeJS)
- if (!crypto && "function" === 'function') {
- try {
- crypto = __webpack_require__(/*! crypto */ 212);
- } catch (err) {}
- }
- /*
- * Cryptographically secure pseudorandom number generator
- *
- * As Math.random() is cryptographically not safe to use
- */
- var cryptoSecureRandomInt = function cryptoSecureRandomInt() {
- if (crypto) {
- // Use getRandomValues method (Browser)
- if (typeof crypto.getRandomValues === 'function') {
- try {
- return crypto.getRandomValues(new Uint32Array(1))[0];
- } catch (err) {}
- }
- // Use randomBytes method (NodeJS)
- if (typeof crypto.randomBytes === 'function') {
- try {
- return crypto.randomBytes(4).readInt32LE();
- } catch (err) {}
- }
- }
- throw new Error('Native crypto module could not be used to get secure random number.');
- };
- /*
- * Local polyfill of Object.create
- */
- var create = Object.create || function () {
- function F() {}
- return function (obj) {
- var subtype;
- F.prototype = obj;
- subtype = new F();
- F.prototype = null;
- return subtype;
- };
- }();
- /**
- * CryptoJS namespace.
- */
- var C = {};
- /**
- * Library namespace.
- */
- var C_lib = C.lib = {};
- /**
- * Base object for prototypal inheritance.
- */
- var Base = C_lib.Base = function () {
- return {
- /**
- * Creates a new object that inherits from this object.
- *
- * @param {Object} overrides Properties to copy into the new object.
- *
- * @return {Object} The new object.
- *
- * @static
- *
- * @example
- *
- * var MyType = CryptoJS.lib.Base.extend({
- * field: 'value',
- *
- * method: function () {
- * }
- * });
- */
- extend: function extend(overrides) {
- // Spawn
- var subtype = create(this);
- // Augment
- if (overrides) {
- subtype.mixIn(overrides);
- }
- // Create default initializer
- if (!subtype.hasOwnProperty('init') || this.init === subtype.init) {
- subtype.init = function () {
- subtype.$super.init.apply(this, arguments);
- };
- }
- // Initializer's prototype is the subtype object
- subtype.init.prototype = subtype;
- // Reference supertype
- subtype.$super = this;
- return subtype;
- },
- /**
- * Extends this object and runs the init method.
- * Arguments to create() will be passed to init().
- *
- * @return {Object} The new object.
- *
- * @static
- *
- * @example
- *
- * var instance = MyType.create();
- */
- create: function create() {
- var instance = this.extend();
- instance.init.apply(instance, arguments);
- return instance;
- },
- /**
- * Initializes a newly created object.
- * Override this method to add some logic when your objects are created.
- *
- * @example
- *
- * var MyType = CryptoJS.lib.Base.extend({
- * init: function () {
- * // ...
- * }
- * });
- */
- init: function init() {
- },
- /**
- * Copies properties into this object.
- *
- * @param {Object} properties The properties to mix in.
- *
- * @example
- *
- * MyType.mixIn({
- * field: 'value'
- * });
- */
- mixIn: function mixIn(properties) {
- for (var propertyName in properties) {
- if (properties.hasOwnProperty(propertyName)) {
- this[propertyName] = properties[propertyName];
- }
- }
- // IE won't copy toString using the loop above
- if (properties.hasOwnProperty('toString')) {
- this.toString = properties.toString;
- }
- },
- /**
- * Creates a copy of this object.
- *
- * @return {Object} The clone.
- *
- * @example
- *
- * var clone = instance.clone();
- */
- clone: function clone() {
- return this.init.prototype.extend(this);
- } };
- }();
- /**
- * An array of 32-bit words.
- *
- * @property {Array} words The array of 32-bit words.
- * @property {number} sigBytes The number of significant bytes in this word array.
- */
- var WordArray = C_lib.WordArray = Base.extend({
- /**
- * Initializes a newly created word array.
- *
- * @param {Array} words (Optional) An array of 32-bit words.
- * @param {number} sigBytes (Optional) The number of significant bytes in the words.
- *
- * @example
- *
- * var wordArray = CryptoJS.lib.WordArray.create();
- * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]);
- * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6);
- */
- init: function init(words, sigBytes) {
- words = this.words = words || [];
- if (sigBytes != undefined) {
- this.sigBytes = sigBytes;
- } else {
- this.sigBytes = words.length * 4;
- }
- },
- /**
- * Converts this word array to a string.
- *
- * @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex
- *
- * @return {string} The stringified word array.
- *
- * @example
- *
- * var string = wordArray + '';
- * var string = wordArray.toString();
- * var string = wordArray.toString(CryptoJS.enc.Utf8);
- */
- toString: function toString(encoder) {
- return (encoder || Hex).stringify(this);
- },
- /**
- * Concatenates a word array to this word array.
- *
- * @param {WordArray} wordArray The word array to append.
- *
- * @return {WordArray} This word array.
- *
- * @example
- *
- * wordArray1.concat(wordArray2);
- */
- concat: function concat(wordArray) {
- // Shortcuts
- var thisWords = this.words;
- var thatWords = wordArray.words;
- var thisSigBytes = this.sigBytes;
- var thatSigBytes = wordArray.sigBytes;
- // Clamp excess bits
- this.clamp();
- // Concat
- if (thisSigBytes % 4) {
- // Copy one byte at a time
- for (var i = 0; i < thatSigBytes; i++) {
- var thatByte = thatWords[i >>> 2] >>> 24 - i % 4 * 8 & 0xff;
- thisWords[thisSigBytes + i >>> 2] |= thatByte << 24 - (thisSigBytes + i) % 4 * 8;
- }
- } else {
- // Copy one word at a time
- for (var j = 0; j < thatSigBytes; j += 4) {
- thisWords[thisSigBytes + j >>> 2] = thatWords[j >>> 2];
- }
- }
- this.sigBytes += thatSigBytes;
- // Chainable
- return this;
- },
- /**
- * Removes insignificant bits.
- *
- * @example
- *
- * wordArray.clamp();
- */
- clamp: function clamp() {
- // Shortcuts
- var words = this.words;
- var sigBytes = this.sigBytes;
- // Clamp
- words[sigBytes >>> 2] &= 0xffffffff << 32 - sigBytes % 4 * 8;
- words.length = Math.ceil(sigBytes / 4);
- },
- /**
- * Creates a copy of this word array.
- *
- * @return {WordArray} The clone.
- *
- * @example
- *
- * var clone = wordArray.clone();
- */
- clone: function clone() {
- var clone = Base.clone.call(this);
- clone.words = this.words.slice(0);
- return clone;
- },
- /**
- * Creates a word array filled with random bytes.
- *
- * @param {number} nBytes The number of random bytes to generate.
- *
- * @return {WordArray} The random word array.
- *
- * @static
- *
- * @example
- *
- * var wordArray = CryptoJS.lib.WordArray.random(16);
- */
- random: function random(nBytes) {
- var words = [];
- for (var i = 0; i < nBytes; i += 4) {
- words.push(cryptoSecureRandomInt());
- }
- return new WordArray.init(words, nBytes);
- } });
- /**
- * Encoder namespace.
- */
- var C_enc = C.enc = {};
- /**
- * Hex encoding strategy.
- */
- var Hex = C_enc.Hex = {
- /**
- * Converts a word array to a hex string.
- *
- * @param {WordArray} wordArray The word array.
- *
- * @return {string} The hex string.
- *
- * @static
- *
- * @example
- *
- * var hexString = CryptoJS.enc.Hex.stringify(wordArray);
- */
- stringify: function stringify(wordArray) {
- // Shortcuts
- var words = wordArray.words;
- var sigBytes = wordArray.sigBytes;
- // Convert
- var hexChars = [];
- for (var i = 0; i < sigBytes; i++) {
- var bite = words[i >>> 2] >>> 24 - i % 4 * 8 & 0xff;
- hexChars.push((bite >>> 4).toString(16));
- hexChars.push((bite & 0x0f).toString(16));
- }
- return hexChars.join('');
- },
- /**
- * Converts a hex string to a word array.
- *
- * @param {string} hexStr The hex string.
- *
- * @return {WordArray} The word array.
- *
- * @static
- *
- * @example
- *
- * var wordArray = CryptoJS.enc.Hex.parse(hexString);
- */
- parse: function parse(hexStr) {
- // Shortcut
- var hexStrLength = hexStr.length;
- // Convert
- var words = [];
- for (var i = 0; i < hexStrLength; i += 2) {
- words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << 24 - i % 8 * 4;
- }
- return new WordArray.init(words, hexStrLength / 2);
- } };
- /**
- * Latin1 encoding strategy.
- */
- var Latin1 = C_enc.Latin1 = {
- /**
- * Converts a word array to a Latin1 string.
- *
- * @param {WordArray} wordArray The word array.
- *
- * @return {string} The Latin1 string.
- *
- * @static
- *
- * @example
- *
- * var latin1String = CryptoJS.enc.Latin1.stringify(wordArray);
- */
- stringify: function stringify(wordArray) {
- // Shortcuts
- var words = wordArray.words;
- var sigBytes = wordArray.sigBytes;
- // Convert
- var latin1Chars = [];
- for (var i = 0; i < sigBytes; i++) {
- var bite = words[i >>> 2] >>> 24 - i % 4 * 8 & 0xff;
- latin1Chars.push(String.fromCharCode(bite));
- }
- return latin1Chars.join('');
- },
- /**
- * Converts a Latin1 string to a word array.
- *
- * @param {string} latin1Str The Latin1 string.
- *
- * @return {WordArray} The word array.
- *
- * @static
- *
- * @example
- *
- * var wordArray = CryptoJS.enc.Latin1.parse(latin1String);
- */
- parse: function parse(latin1Str) {
- // Shortcut
- var latin1StrLength = latin1Str.length;
- // Convert
- var words = [];
- for (var i = 0; i < latin1StrLength; i++) {
- words[i >>> 2] |= (latin1Str.charCodeAt(i) & 0xff) << 24 - i % 4 * 8;
- }
- return new WordArray.init(words, latin1StrLength);
- } };
- /**
- * UTF-8 encoding strategy.
- */
- var Utf8 = C_enc.Utf8 = {
- /**
- * Converts a word array to a UTF-8 string.
- *
- * @param {WordArray} wordArray The word array.
- *
- * @return {string} The UTF-8 string.
- *
- * @static
- *
- * @example
- *
- * var utf8String = CryptoJS.enc.Utf8.stringify(wordArray);
- */
- stringify: function stringify(wordArray) {
- try {
- return decodeURIComponent(escape(Latin1.stringify(wordArray)));
- } catch (e) {
- throw new Error('Malformed UTF-8 data');
- }
- },
- /**
- * Converts a UTF-8 string to a word array.
- *
- * @param {string} utf8Str The UTF-8 string.
- *
- * @return {WordArray} The word array.
- *
- * @static
- *
- * @example
- *
- * var wordArray = CryptoJS.enc.Utf8.parse(utf8String);
- */
- parse: function parse(utf8Str) {
- return Latin1.parse(unescape(encodeURIComponent(utf8Str)));
- } };
- /**
- * Abstract buffered block algorithm template.
- *
- * The property blockSize must be implemented in a concrete subtype.
- *
- * @property {number} _minBufferSize The number of blocks that should be kept unprocessed in the buffer. Default: 0
- */
- var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm = Base.extend({
- /**
- * Resets this block algorithm's data buffer to its initial state.
- *
- * @example
- *
- * bufferedBlockAlgorithm.reset();
- */
- reset: function reset() {
- // Initial values
- this._data = new WordArray.init();
- this._nDataBytes = 0;
- },
- /**
- * Adds new data to this block algorithm's buffer.
- *
- * @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8.
- *
- * @example
- *
- * bufferedBlockAlgorithm._append('data');
- * bufferedBlockAlgorithm._append(wordArray);
- */
- _append: function _append(data) {
- // Convert string to WordArray, else assume WordArray already
- if (typeof data == 'string') {
- data = Utf8.parse(data);
- }
- // Append
- this._data.concat(data);
- this._nDataBytes += data.sigBytes;
- },
- /**
- * Processes available data blocks.
- *
- * This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype.
- *
- * @param {boolean} doFlush Whether all blocks and partial blocks should be processed.
- *
- * @return {WordArray} The processed data.
- *
- * @example
- *
- * var processedData = bufferedBlockAlgorithm._process();
- * var processedData = bufferedBlockAlgorithm._process(!!'flush');
- */
- _process: function _process(doFlush) {
- var processedWords;
- // Shortcuts
- var data = this._data;
- var dataWords = data.words;
- var dataSigBytes = data.sigBytes;
- var blockSize = this.blockSize;
- var blockSizeBytes = blockSize * 4;
- // Count blocks ready
- var nBlocksReady = dataSigBytes / blockSizeBytes;
- if (doFlush) {
- // Round up to include partial blocks
- nBlocksReady = Math.ceil(nBlocksReady);
- } else {
- // Round down to include only full blocks,
- // less the number of blocks that must remain in the buffer
- nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0);
- }
- // Count words ready
- var nWordsReady = nBlocksReady * blockSize;
- // Count bytes ready
- var nBytesReady = Math.min(nWordsReady * 4, dataSigBytes);
- // Process blocks
- if (nWordsReady) {
- for (var offset = 0; offset < nWordsReady; offset += blockSize) {
- // Perform concrete-algorithm logic
- this._doProcessBlock(dataWords, offset);
- }
- // Remove processed words
- processedWords = dataWords.splice(0, nWordsReady);
- data.sigBytes -= nBytesReady;
- }
- // Return processed words
- return new WordArray.init(processedWords, nBytesReady);
- },
- /**
- * Creates a copy of this object.
- *
- * @return {Object} The clone.
- *
- * @example
- *
- * var clone = bufferedBlockAlgorithm.clone();
- */
- clone: function clone() {
- var clone = Base.clone.call(this);
- clone._data = this._data.clone();
- return clone;
- },
- _minBufferSize: 0 });
- /**
- * Abstract hasher template.
- *
- * @property {number} blockSize The number of 32-bit words this hasher operates on. Default: 16 (512 bits)
- */
- var Hasher = C_lib.Hasher = BufferedBlockAlgorithm.extend({
- /**
- * Configuration options.
- */
- cfg: Base.extend(),
- /**
- * Initializes a newly created hasher.
- *
- * @param {Object} cfg (Optional) The configuration options to use for this hash computation.
- *
- * @example
- *
- * var hasher = CryptoJS.algo.SHA256.create();
- */
- init: function init(cfg) {
- // Apply config defaults
- this.cfg = this.cfg.extend(cfg);
- // Set initial values
- this.reset();
- },
- /**
- * Resets this hasher to its initial state.
- *
- * @example
- *
- * hasher.reset();
- */
- reset: function reset() {
- // Reset data buffer
- BufferedBlockAlgorithm.reset.call(this);
- // Perform concrete-hasher logic
- this._doReset();
- },
- /**
- * Updates this hasher with a message.
- *
- * @param {WordArray|string} messageUpdate The message to append.
- *
- * @return {Hasher} This hasher.
- *
- * @example
- *
- * hasher.update('message');
- * hasher.update(wordArray);
- */
- update: function update(messageUpdate) {
- // Append
- this._append(messageUpdate);
- // Update the hash
- this._process();
- // Chainable
- return this;
- },
- /**
- * Finalizes the hash computation.
- * Note that the finalize operation is effectively a destructive, read-once operation.
- *
- * @param {WordArray|string} messageUpdate (Optional) A final message update.
- *
- * @return {WordArray} The hash.
- *
- * @example
- *
- * var hash = hasher.finalize();
- * var hash = hasher.finalize('message');
- * var hash = hasher.finalize(wordArray);
- */
- finalize: function finalize(messageUpdate) {
- // Final message update
- if (messageUpdate) {
- this._append(messageUpdate);
- }
- // Perform concrete-hasher logic
- var hash = this._doFinalize();
- return hash;
- },
- blockSize: 512 / 32,
- /**
- * Creates a shortcut function to a hasher's object interface.
- *
- * @param {Hasher} hasher The hasher to create a helper for.
- *
- * @return {Function} The shortcut function.
- *
- * @static
- *
- * @example
- *
- * var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256);
- */
- _createHelper: function _createHelper(hasher) {
- return function (message, cfg) {
- return new hasher.init(cfg).finalize(message);
- };
- },
- /**
- * Creates a shortcut function to the HMAC's object interface.
- *
- * @param {Hasher} hasher The hasher to use in this HMAC helper.
- *
- * @return {Function} The shortcut function.
- *
- * @static
- *
- * @example
- *
- * var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256);
- */
- _createHmacHelper: function _createHmacHelper(hasher) {
- return function (message, key) {
- return new C_algo.HMAC.init(hasher, key).finalize(message);
- };
- } });
- /**
- * Algorithm namespace.
- */
- var C_algo = C.algo = {};
- return C;
- }(Math);
- return CryptoJS;
- });
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../HBuilderX/plugins/uniapp-cli/node_modules/webpack/buildin/global.js */ 2)))
- /***/ }),
- /* 212 */
- /*!************************!*\
- !*** crypto (ignored) ***!
- \************************/
- /*! no static exports found */
- /***/ (function(module, exports) {
- /* (ignored) */
- /***/ }),
- /* 213 */
- /*!*****************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/crypto-js/x64-core.js ***!
- \*****************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- ;(function (root, factory) {
- if (true) {
- // CommonJS
- module.exports = exports = factory(__webpack_require__(/*! ./core */ 211));
- } else
- {}
- })(this, function (CryptoJS) {
- (function (undefined) {
- // Shortcuts
- var C = CryptoJS;
- var C_lib = C.lib;
- var Base = C_lib.Base;
- var X32WordArray = C_lib.WordArray;
- /**
- * x64 namespace.
- */
- var C_x64 = C.x64 = {};
- /**
- * A 64-bit word.
- */
- var X64Word = C_x64.Word = Base.extend({
- /**
- * Initializes a newly created 64-bit word.
- *
- * @param {number} high The high 32 bits.
- * @param {number} low The low 32 bits.
- *
- * @example
- *
- * var x64Word = CryptoJS.x64.Word.create(0x00010203, 0x04050607);
- */
- init: function init(high, low) {
- this.high = high;
- this.low = low;
- }
- /**
- * Bitwise NOTs this word.
- *
- * @return {X64Word} A new x64-Word object after negating.
- *
- * @example
- *
- * var negated = x64Word.not();
- */
- // not: function () {
- // var high = ~this.high;
- // var low = ~this.low;
- // return X64Word.create(high, low);
- // },
- /**
- * Bitwise ANDs this word with the passed word.
- *
- * @param {X64Word} word The x64-Word to AND with this word.
- *
- * @return {X64Word} A new x64-Word object after ANDing.
- *
- * @example
- *
- * var anded = x64Word.and(anotherX64Word);
- */
- // and: function (word) {
- // var high = this.high & word.high;
- // var low = this.low & word.low;
- // return X64Word.create(high, low);
- // },
- /**
- * Bitwise ORs this word with the passed word.
- *
- * @param {X64Word} word The x64-Word to OR with this word.
- *
- * @return {X64Word} A new x64-Word object after ORing.
- *
- * @example
- *
- * var ored = x64Word.or(anotherX64Word);
- */
- // or: function (word) {
- // var high = this.high | word.high;
- // var low = this.low | word.low;
- // return X64Word.create(high, low);
- // },
- /**
- * Bitwise XORs this word with the passed word.
- *
- * @param {X64Word} word The x64-Word to XOR with this word.
- *
- * @return {X64Word} A new x64-Word object after XORing.
- *
- * @example
- *
- * var xored = x64Word.xor(anotherX64Word);
- */
- // xor: function (word) {
- // var high = this.high ^ word.high;
- // var low = this.low ^ word.low;
- // return X64Word.create(high, low);
- // },
- /**
- * Shifts this word n bits to the left.
- *
- * @param {number} n The number of bits to shift.
- *
- * @return {X64Word} A new x64-Word object after shifting.
- *
- * @example
- *
- * var shifted = x64Word.shiftL(25);
- */
- // shiftL: function (n) {
- // if (n < 32) {
- // var high = (this.high << n) | (this.low >>> (32 - n));
- // var low = this.low << n;
- // } else {
- // var high = this.low << (n - 32);
- // var low = 0;
- // }
- // return X64Word.create(high, low);
- // },
- /**
- * Shifts this word n bits to the right.
- *
- * @param {number} n The number of bits to shift.
- *
- * @return {X64Word} A new x64-Word object after shifting.
- *
- * @example
- *
- * var shifted = x64Word.shiftR(7);
- */
- // shiftR: function (n) {
- // if (n < 32) {
- // var low = (this.low >>> n) | (this.high << (32 - n));
- // var high = this.high >>> n;
- // } else {
- // var low = this.high >>> (n - 32);
- // var high = 0;
- // }
- // return X64Word.create(high, low);
- // },
- /**
- * Rotates this word n bits to the left.
- *
- * @param {number} n The number of bits to rotate.
- *
- * @return {X64Word} A new x64-Word object after rotating.
- *
- * @example
- *
- * var rotated = x64Word.rotL(25);
- */
- // rotL: function (n) {
- // return this.shiftL(n).or(this.shiftR(64 - n));
- // },
- /**
- * Rotates this word n bits to the right.
- *
- * @param {number} n The number of bits to rotate.
- *
- * @return {X64Word} A new x64-Word object after rotating.
- *
- * @example
- *
- * var rotated = x64Word.rotR(7);
- */
- // rotR: function (n) {
- // return this.shiftR(n).or(this.shiftL(64 - n));
- // },
- /**
- * Adds this word with the passed word.
- *
- * @param {X64Word} word The x64-Word to add with this word.
- *
- * @return {X64Word} A new x64-Word object after adding.
- *
- * @example
- *
- * var added = x64Word.add(anotherX64Word);
- */
- // add: function (word) {
- // var low = (this.low + word.low) | 0;
- // var carry = (low >>> 0) < (this.low >>> 0) ? 1 : 0;
- // var high = (this.high + word.high + carry) | 0;
- // return X64Word.create(high, low);
- // }
- });
- /**
- * An array of 64-bit words.
- *
- * @property {Array} words The array of CryptoJS.x64.Word objects.
- * @property {number} sigBytes The number of significant bytes in this word array.
- */
- var X64WordArray = C_x64.WordArray = Base.extend({
- /**
- * Initializes a newly created word array.
- *
- * @param {Array} words (Optional) An array of CryptoJS.x64.Word objects.
- * @param {number} sigBytes (Optional) The number of significant bytes in the words.
- *
- * @example
- *
- * var wordArray = CryptoJS.x64.WordArray.create();
- *
- * var wordArray = CryptoJS.x64.WordArray.create([
- * CryptoJS.x64.Word.create(0x00010203, 0x04050607),
- * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f)
- * ]);
- *
- * var wordArray = CryptoJS.x64.WordArray.create([
- * CryptoJS.x64.Word.create(0x00010203, 0x04050607),
- * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f)
- * ], 10);
- */
- init: function init(words, sigBytes) {
- words = this.words = words || [];
- if (sigBytes != undefined) {
- this.sigBytes = sigBytes;
- } else {
- this.sigBytes = words.length * 8;
- }
- },
- /**
- * Converts this 64-bit word array to a 32-bit word array.
- *
- * @return {CryptoJS.lib.WordArray} This word array's data as a 32-bit word array.
- *
- * @example
- *
- * var x32WordArray = x64WordArray.toX32();
- */
- toX32: function toX32() {
- // Shortcuts
- var x64Words = this.words;
- var x64WordsLength = x64Words.length;
- // Convert
- var x32Words = [];
- for (var i = 0; i < x64WordsLength; i++) {
- var x64Word = x64Words[i];
- x32Words.push(x64Word.high);
- x32Words.push(x64Word.low);
- }
- return X32WordArray.create(x32Words, this.sigBytes);
- },
- /**
- * Creates a copy of this word array.
- *
- * @return {X64WordArray} The clone.
- *
- * @example
- *
- * var clone = x64WordArray.clone();
- */
- clone: function clone() {
- var clone = Base.clone.call(this);
- // Clone "words" array
- var words = clone.words = this.words.slice(0);
- // Clone each X64Word object
- var wordsLength = words.length;
- for (var i = 0; i < wordsLength; i++) {
- words[i] = words[i].clone();
- }
- return clone;
- } });
- })();
- return CryptoJS;
- });
- /***/ }),
- /* 214 */
- /*!************************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/crypto-js/lib-typedarrays.js ***!
- \************************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- ;(function (root, factory) {
- if (true) {
- // CommonJS
- module.exports = exports = factory(__webpack_require__(/*! ./core */ 211));
- } else
- {}
- })(this, function (CryptoJS) {
- (function () {
- // Check if typed arrays are supported
- if (typeof ArrayBuffer != 'function') {
- return;
- }
- // Shortcuts
- var C = CryptoJS;
- var C_lib = C.lib;
- var WordArray = C_lib.WordArray;
- // Reference original init
- var superInit = WordArray.init;
- // Augment WordArray.init to handle typed arrays
- var subInit = WordArray.init = function (typedArray) {
- // Convert buffers to uint8
- if (typedArray instanceof ArrayBuffer) {
- typedArray = new Uint8Array(typedArray);
- }
- // Convert other array views to uint8
- if (
- typedArray instanceof Int8Array ||
- typeof Uint8ClampedArray !== "undefined" && typedArray instanceof Uint8ClampedArray ||
- typedArray instanceof Int16Array ||
- typedArray instanceof Uint16Array ||
- typedArray instanceof Int32Array ||
- typedArray instanceof Uint32Array ||
- typedArray instanceof Float32Array ||
- typedArray instanceof Float64Array)
- {
- typedArray = new Uint8Array(typedArray.buffer, typedArray.byteOffset, typedArray.byteLength);
- }
- // Handle Uint8Array
- if (typedArray instanceof Uint8Array) {
- // Shortcut
- var typedArrayByteLength = typedArray.byteLength;
- // Extract bytes
- var words = [];
- for (var i = 0; i < typedArrayByteLength; i++) {
- words[i >>> 2] |= typedArray[i] << 24 - i % 4 * 8;
- }
- // Initialize this word array
- superInit.call(this, words, typedArrayByteLength);
- } else {
- // Else call normal init
- superInit.apply(this, arguments);
- }
- };
- subInit.prototype = WordArray;
- })();
- return CryptoJS.lib.WordArray;
- });
- /***/ }),
- /* 215 */
- /*!******************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/crypto-js/enc-utf16.js ***!
- \******************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- ;(function (root, factory) {
- if (true) {
- // CommonJS
- module.exports = exports = factory(__webpack_require__(/*! ./core */ 211));
- } else
- {}
- })(this, function (CryptoJS) {
- (function () {
- // Shortcuts
- var C = CryptoJS;
- var C_lib = C.lib;
- var WordArray = C_lib.WordArray;
- var C_enc = C.enc;
- /**
- * UTF-16 BE encoding strategy.
- */
- var Utf16BE = C_enc.Utf16 = C_enc.Utf16BE = {
- /**
- * Converts a word array to a UTF-16 BE string.
- *
- * @param {WordArray} wordArray The word array.
- *
- * @return {string} The UTF-16 BE string.
- *
- * @static
- *
- * @example
- *
- * var utf16String = CryptoJS.enc.Utf16.stringify(wordArray);
- */
- stringify: function stringify(wordArray) {
- // Shortcuts
- var words = wordArray.words;
- var sigBytes = wordArray.sigBytes;
- // Convert
- var utf16Chars = [];
- for (var i = 0; i < sigBytes; i += 2) {
- var codePoint = words[i >>> 2] >>> 16 - i % 4 * 8 & 0xffff;
- utf16Chars.push(String.fromCharCode(codePoint));
- }
- return utf16Chars.join('');
- },
- /**
- * Converts a UTF-16 BE string to a word array.
- *
- * @param {string} utf16Str The UTF-16 BE string.
- *
- * @return {WordArray} The word array.
- *
- * @static
- *
- * @example
- *
- * var wordArray = CryptoJS.enc.Utf16.parse(utf16String);
- */
- parse: function parse(utf16Str) {
- // Shortcut
- var utf16StrLength = utf16Str.length;
- // Convert
- var words = [];
- for (var i = 0; i < utf16StrLength; i++) {
- words[i >>> 1] |= utf16Str.charCodeAt(i) << 16 - i % 2 * 16;
- }
- return WordArray.create(words, utf16StrLength * 2);
- } };
- /**
- * UTF-16 LE encoding strategy.
- */
- C_enc.Utf16LE = {
- /**
- * Converts a word array to a UTF-16 LE string.
- *
- * @param {WordArray} wordArray The word array.
- *
- * @return {string} The UTF-16 LE string.
- *
- * @static
- *
- * @example
- *
- * var utf16Str = CryptoJS.enc.Utf16LE.stringify(wordArray);
- */
- stringify: function stringify(wordArray) {
- // Shortcuts
- var words = wordArray.words;
- var sigBytes = wordArray.sigBytes;
- // Convert
- var utf16Chars = [];
- for (var i = 0; i < sigBytes; i += 2) {
- var codePoint = swapEndian(words[i >>> 2] >>> 16 - i % 4 * 8 & 0xffff);
- utf16Chars.push(String.fromCharCode(codePoint));
- }
- return utf16Chars.join('');
- },
- /**
- * Converts a UTF-16 LE string to a word array.
- *
- * @param {string} utf16Str The UTF-16 LE string.
- *
- * @return {WordArray} The word array.
- *
- * @static
- *
- * @example
- *
- * var wordArray = CryptoJS.enc.Utf16LE.parse(utf16Str);
- */
- parse: function parse(utf16Str) {
- // Shortcut
- var utf16StrLength = utf16Str.length;
- // Convert
- var words = [];
- for (var i = 0; i < utf16StrLength; i++) {
- words[i >>> 1] |= swapEndian(utf16Str.charCodeAt(i) << 16 - i % 2 * 16);
- }
- return WordArray.create(words, utf16StrLength * 2);
- } };
- function swapEndian(word) {
- return word << 8 & 0xff00ff00 | word >>> 8 & 0x00ff00ff;
- }
- })();
- return CryptoJS.enc.Utf16;
- });
- /***/ }),
- /* 216 */
- /*!*******************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/crypto-js/enc-base64.js ***!
- \*******************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- ;(function (root, factory) {
- if (true) {
- // CommonJS
- module.exports = exports = factory(__webpack_require__(/*! ./core */ 211));
- } else
- {}
- })(this, function (CryptoJS) {
- (function () {
- // Shortcuts
- var C = CryptoJS;
- var C_lib = C.lib;
- var WordArray = C_lib.WordArray;
- var C_enc = C.enc;
- /**
- * Base64 encoding strategy.
- */
- var Base64 = C_enc.Base64 = {
- /**
- * Converts a word array to a Base64 string.
- *
- * @param {WordArray} wordArray The word array.
- *
- * @return {string} The Base64 string.
- *
- * @static
- *
- * @example
- *
- * var base64String = CryptoJS.enc.Base64.stringify(wordArray);
- */
- stringify: function stringify(wordArray) {
- // Shortcuts
- var words = wordArray.words;
- var sigBytes = wordArray.sigBytes;
- var map = this._map;
- // Clamp excess bits
- wordArray.clamp();
- // Convert
- var base64Chars = [];
- for (var i = 0; i < sigBytes; i += 3) {
- var byte1 = words[i >>> 2] >>> 24 - i % 4 * 8 & 0xff;
- var byte2 = words[i + 1 >>> 2] >>> 24 - (i + 1) % 4 * 8 & 0xff;
- var byte3 = words[i + 2 >>> 2] >>> 24 - (i + 2) % 4 * 8 & 0xff;
- var triplet = byte1 << 16 | byte2 << 8 | byte3;
- for (var j = 0; j < 4 && i + j * 0.75 < sigBytes; j++) {
- base64Chars.push(map.charAt(triplet >>> 6 * (3 - j) & 0x3f));
- }
- }
- // Add padding
- var paddingChar = map.charAt(64);
- if (paddingChar) {
- while (base64Chars.length % 4) {
- base64Chars.push(paddingChar);
- }
- }
- return base64Chars.join('');
- },
- /**
- * Converts a Base64 string to a word array.
- *
- * @param {string} base64Str The Base64 string.
- *
- * @return {WordArray} The word array.
- *
- * @static
- *
- * @example
- *
- * var wordArray = CryptoJS.enc.Base64.parse(base64String);
- */
- parse: function parse(base64Str) {
- // Shortcuts
- var base64StrLength = base64Str.length;
- var map = this._map;
- var reverseMap = this._reverseMap;
- if (!reverseMap) {
- reverseMap = this._reverseMap = [];
- for (var j = 0; j < map.length; j++) {
- reverseMap[map.charCodeAt(j)] = j;
- }
- }
- // Ignore padding
- var paddingChar = map.charAt(64);
- if (paddingChar) {
- var paddingIndex = base64Str.indexOf(paddingChar);
- if (paddingIndex !== -1) {
- base64StrLength = paddingIndex;
- }
- }
- // Convert
- return parseLoop(base64Str, base64StrLength, reverseMap);
- },
- _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=' };
- function parseLoop(base64Str, base64StrLength, reverseMap) {
- var words = [];
- var nBytes = 0;
- for (var i = 0; i < base64StrLength; i++) {
- if (i % 4) {
- var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << i % 4 * 2;
- var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> 6 - i % 4 * 2;
- var bitsCombined = bits1 | bits2;
- words[nBytes >>> 2] |= bitsCombined << 24 - nBytes % 4 * 8;
- nBytes++;
- }
- }
- return WordArray.create(words, nBytes);
- }
- })();
- return CryptoJS.enc.Base64;
- });
- /***/ }),
- /* 217 */
- /*!**********************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/crypto-js/enc-base64url.js ***!
- \**********************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- ;(function (root, factory) {
- if (true) {
- // CommonJS
- module.exports = exports = factory(__webpack_require__(/*! ./core */ 211));
- } else
- {}
- })(this, function (CryptoJS) {
- (function () {
- // Shortcuts
- var C = CryptoJS;
- var C_lib = C.lib;
- var WordArray = C_lib.WordArray;
- var C_enc = C.enc;
- /**
- * Base64url encoding strategy.
- */
- var Base64url = C_enc.Base64url = {
- /**
- * Converts a word array to a Base64url string.
- *
- * @param {WordArray} wordArray The word array.
- *
- * @param {boolean} urlSafe Whether to use url safe
- *
- * @return {string} The Base64url string.
- *
- * @static
- *
- * @example
- *
- * var base64String = CryptoJS.enc.Base64url.stringify(wordArray);
- */
- stringify: function stringify(wordArray) {var urlSafe = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
- // Shortcuts
- var words = wordArray.words;
- var sigBytes = wordArray.sigBytes;
- var map = urlSafe ? this._safe_map : this._map;
- // Clamp excess bits
- wordArray.clamp();
- // Convert
- var base64Chars = [];
- for (var i = 0; i < sigBytes; i += 3) {
- var byte1 = words[i >>> 2] >>> 24 - i % 4 * 8 & 0xff;
- var byte2 = words[i + 1 >>> 2] >>> 24 - (i + 1) % 4 * 8 & 0xff;
- var byte3 = words[i + 2 >>> 2] >>> 24 - (i + 2) % 4 * 8 & 0xff;
- var triplet = byte1 << 16 | byte2 << 8 | byte3;
- for (var j = 0; j < 4 && i + j * 0.75 < sigBytes; j++) {
- base64Chars.push(map.charAt(triplet >>> 6 * (3 - j) & 0x3f));
- }
- }
- // Add padding
- var paddingChar = map.charAt(64);
- if (paddingChar) {
- while (base64Chars.length % 4) {
- base64Chars.push(paddingChar);
- }
- }
- return base64Chars.join('');
- },
- /**
- * Converts a Base64url string to a word array.
- *
- * @param {string} base64Str The Base64url string.
- *
- * @param {boolean} urlSafe Whether to use url safe
- *
- * @return {WordArray} The word array.
- *
- * @static
- *
- * @example
- *
- * var wordArray = CryptoJS.enc.Base64url.parse(base64String);
- */
- parse: function parse(base64Str) {var urlSafe = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
- // Shortcuts
- var base64StrLength = base64Str.length;
- var map = urlSafe ? this._safe_map : this._map;
- var reverseMap = this._reverseMap;
- if (!reverseMap) {
- reverseMap = this._reverseMap = [];
- for (var j = 0; j < map.length; j++) {
- reverseMap[map.charCodeAt(j)] = j;
- }
- }
- // Ignore padding
- var paddingChar = map.charAt(64);
- if (paddingChar) {
- var paddingIndex = base64Str.indexOf(paddingChar);
- if (paddingIndex !== -1) {
- base64StrLength = paddingIndex;
- }
- }
- // Convert
- return parseLoop(base64Str, base64StrLength, reverseMap);
- },
- _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=',
- _safe_map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_' };
- function parseLoop(base64Str, base64StrLength, reverseMap) {
- var words = [];
- var nBytes = 0;
- for (var i = 0; i < base64StrLength; i++) {
- if (i % 4) {
- var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << i % 4 * 2;
- var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> 6 - i % 4 * 2;
- var bitsCombined = bits1 | bits2;
- words[nBytes >>> 2] |= bitsCombined << 24 - nBytes % 4 * 8;
- nBytes++;
- }
- }
- return WordArray.create(words, nBytes);
- }
- })();
- return CryptoJS.enc.Base64url;
- });
- /***/ }),
- /* 218 */
- /*!************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/crypto-js/md5.js ***!
- \************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- ;(function (root, factory) {
- if (true) {
- // CommonJS
- module.exports = exports = factory(__webpack_require__(/*! ./core */ 211));
- } else
- {}
- })(this, function (CryptoJS) {
- (function (Math) {
- // Shortcuts
- var C = CryptoJS;
- var C_lib = C.lib;
- var WordArray = C_lib.WordArray;
- var Hasher = C_lib.Hasher;
- var C_algo = C.algo;
- // Constants table
- var T = [];
- // Compute constants
- (function () {
- for (var i = 0; i < 64; i++) {
- T[i] = Math.abs(Math.sin(i + 1)) * 0x100000000 | 0;
- }
- })();
- /**
- * MD5 hash algorithm.
- */
- var MD5 = C_algo.MD5 = Hasher.extend({
- _doReset: function _doReset() {
- this._hash = new WordArray.init([
- 0x67452301, 0xefcdab89,
- 0x98badcfe, 0x10325476]);
- },
- _doProcessBlock: function _doProcessBlock(M, offset) {
- // Swap endian
- for (var i = 0; i < 16; i++) {
- // Shortcuts
- var offset_i = offset + i;
- var M_offset_i = M[offset_i];
- M[offset_i] =
- (M_offset_i << 8 | M_offset_i >>> 24) & 0x00ff00ff |
- (M_offset_i << 24 | M_offset_i >>> 8) & 0xff00ff00;
- }
- // Shortcuts
- var H = this._hash.words;
- var M_offset_0 = M[offset + 0];
- var M_offset_1 = M[offset + 1];
- var M_offset_2 = M[offset + 2];
- var M_offset_3 = M[offset + 3];
- var M_offset_4 = M[offset + 4];
- var M_offset_5 = M[offset + 5];
- var M_offset_6 = M[offset + 6];
- var M_offset_7 = M[offset + 7];
- var M_offset_8 = M[offset + 8];
- var M_offset_9 = M[offset + 9];
- var M_offset_10 = M[offset + 10];
- var M_offset_11 = M[offset + 11];
- var M_offset_12 = M[offset + 12];
- var M_offset_13 = M[offset + 13];
- var M_offset_14 = M[offset + 14];
- var M_offset_15 = M[offset + 15];
- // Working varialbes
- var a = H[0];
- var b = H[1];
- var c = H[2];
- var d = H[3];
- // Computation
- a = FF(a, b, c, d, M_offset_0, 7, T[0]);
- d = FF(d, a, b, c, M_offset_1, 12, T[1]);
- c = FF(c, d, a, b, M_offset_2, 17, T[2]);
- b = FF(b, c, d, a, M_offset_3, 22, T[3]);
- a = FF(a, b, c, d, M_offset_4, 7, T[4]);
- d = FF(d, a, b, c, M_offset_5, 12, T[5]);
- c = FF(c, d, a, b, M_offset_6, 17, T[6]);
- b = FF(b, c, d, a, M_offset_7, 22, T[7]);
- a = FF(a, b, c, d, M_offset_8, 7, T[8]);
- d = FF(d, a, b, c, M_offset_9, 12, T[9]);
- c = FF(c, d, a, b, M_offset_10, 17, T[10]);
- b = FF(b, c, d, a, M_offset_11, 22, T[11]);
- a = FF(a, b, c, d, M_offset_12, 7, T[12]);
- d = FF(d, a, b, c, M_offset_13, 12, T[13]);
- c = FF(c, d, a, b, M_offset_14, 17, T[14]);
- b = FF(b, c, d, a, M_offset_15, 22, T[15]);
- a = GG(a, b, c, d, M_offset_1, 5, T[16]);
- d = GG(d, a, b, c, M_offset_6, 9, T[17]);
- c = GG(c, d, a, b, M_offset_11, 14, T[18]);
- b = GG(b, c, d, a, M_offset_0, 20, T[19]);
- a = GG(a, b, c, d, M_offset_5, 5, T[20]);
- d = GG(d, a, b, c, M_offset_10, 9, T[21]);
- c = GG(c, d, a, b, M_offset_15, 14, T[22]);
- b = GG(b, c, d, a, M_offset_4, 20, T[23]);
- a = GG(a, b, c, d, M_offset_9, 5, T[24]);
- d = GG(d, a, b, c, M_offset_14, 9, T[25]);
- c = GG(c, d, a, b, M_offset_3, 14, T[26]);
- b = GG(b, c, d, a, M_offset_8, 20, T[27]);
- a = GG(a, b, c, d, M_offset_13, 5, T[28]);
- d = GG(d, a, b, c, M_offset_2, 9, T[29]);
- c = GG(c, d, a, b, M_offset_7, 14, T[30]);
- b = GG(b, c, d, a, M_offset_12, 20, T[31]);
- a = HH(a, b, c, d, M_offset_5, 4, T[32]);
- d = HH(d, a, b, c, M_offset_8, 11, T[33]);
- c = HH(c, d, a, b, M_offset_11, 16, T[34]);
- b = HH(b, c, d, a, M_offset_14, 23, T[35]);
- a = HH(a, b, c, d, M_offset_1, 4, T[36]);
- d = HH(d, a, b, c, M_offset_4, 11, T[37]);
- c = HH(c, d, a, b, M_offset_7, 16, T[38]);
- b = HH(b, c, d, a, M_offset_10, 23, T[39]);
- a = HH(a, b, c, d, M_offset_13, 4, T[40]);
- d = HH(d, a, b, c, M_offset_0, 11, T[41]);
- c = HH(c, d, a, b, M_offset_3, 16, T[42]);
- b = HH(b, c, d, a, M_offset_6, 23, T[43]);
- a = HH(a, b, c, d, M_offset_9, 4, T[44]);
- d = HH(d, a, b, c, M_offset_12, 11, T[45]);
- c = HH(c, d, a, b, M_offset_15, 16, T[46]);
- b = HH(b, c, d, a, M_offset_2, 23, T[47]);
- a = II(a, b, c, d, M_offset_0, 6, T[48]);
- d = II(d, a, b, c, M_offset_7, 10, T[49]);
- c = II(c, d, a, b, M_offset_14, 15, T[50]);
- b = II(b, c, d, a, M_offset_5, 21, T[51]);
- a = II(a, b, c, d, M_offset_12, 6, T[52]);
- d = II(d, a, b, c, M_offset_3, 10, T[53]);
- c = II(c, d, a, b, M_offset_10, 15, T[54]);
- b = II(b, c, d, a, M_offset_1, 21, T[55]);
- a = II(a, b, c, d, M_offset_8, 6, T[56]);
- d = II(d, a, b, c, M_offset_15, 10, T[57]);
- c = II(c, d, a, b, M_offset_6, 15, T[58]);
- b = II(b, c, d, a, M_offset_13, 21, T[59]);
- a = II(a, b, c, d, M_offset_4, 6, T[60]);
- d = II(d, a, b, c, M_offset_11, 10, T[61]);
- c = II(c, d, a, b, M_offset_2, 15, T[62]);
- b = II(b, c, d, a, M_offset_9, 21, T[63]);
- // Intermediate hash value
- H[0] = H[0] + a | 0;
- H[1] = H[1] + b | 0;
- H[2] = H[2] + c | 0;
- H[3] = H[3] + d | 0;
- },
- _doFinalize: function _doFinalize() {
- // Shortcuts
- var data = this._data;
- var dataWords = data.words;
- var nBitsTotal = this._nDataBytes * 8;
- var nBitsLeft = data.sigBytes * 8;
- // Add padding
- dataWords[nBitsLeft >>> 5] |= 0x80 << 24 - nBitsLeft % 32;
- var nBitsTotalH = Math.floor(nBitsTotal / 0x100000000);
- var nBitsTotalL = nBitsTotal;
- dataWords[(nBitsLeft + 64 >>> 9 << 4) + 15] =
- (nBitsTotalH << 8 | nBitsTotalH >>> 24) & 0x00ff00ff |
- (nBitsTotalH << 24 | nBitsTotalH >>> 8) & 0xff00ff00;
- dataWords[(nBitsLeft + 64 >>> 9 << 4) + 14] =
- (nBitsTotalL << 8 | nBitsTotalL >>> 24) & 0x00ff00ff |
- (nBitsTotalL << 24 | nBitsTotalL >>> 8) & 0xff00ff00;
- data.sigBytes = (dataWords.length + 1) * 4;
- // Hash final blocks
- this._process();
- // Shortcuts
- var hash = this._hash;
- var H = hash.words;
- // Swap endian
- for (var i = 0; i < 4; i++) {
- // Shortcut
- var H_i = H[i];
- H[i] = (H_i << 8 | H_i >>> 24) & 0x00ff00ff |
- (H_i << 24 | H_i >>> 8) & 0xff00ff00;
- }
- // Return final computed hash
- return hash;
- },
- clone: function clone() {
- var clone = Hasher.clone.call(this);
- clone._hash = this._hash.clone();
- return clone;
- } });
- function FF(a, b, c, d, x, s, t) {
- var n = a + (b & c | ~b & d) + x + t;
- return (n << s | n >>> 32 - s) + b;
- }
- function GG(a, b, c, d, x, s, t) {
- var n = a + (b & d | c & ~d) + x + t;
- return (n << s | n >>> 32 - s) + b;
- }
- function HH(a, b, c, d, x, s, t) {
- var n = a + (b ^ c ^ d) + x + t;
- return (n << s | n >>> 32 - s) + b;
- }
- function II(a, b, c, d, x, s, t) {
- var n = a + (c ^ (b | ~d)) + x + t;
- return (n << s | n >>> 32 - s) + b;
- }
- /**
- * Shortcut function to the hasher's object interface.
- *
- * @param {WordArray|string} message The message to hash.
- *
- * @return {WordArray} The hash.
- *
- * @static
- *
- * @example
- *
- * var hash = CryptoJS.MD5('message');
- * var hash = CryptoJS.MD5(wordArray);
- */
- C.MD5 = Hasher._createHelper(MD5);
- /**
- * Shortcut function to the HMAC's object interface.
- *
- * @param {WordArray|string} message The message to hash.
- * @param {WordArray|string} key The secret key.
- *
- * @return {WordArray} The HMAC.
- *
- * @static
- *
- * @example
- *
- * var hmac = CryptoJS.HmacMD5(message, key);
- */
- C.HmacMD5 = Hasher._createHmacHelper(MD5);
- })(Math);
- return CryptoJS.MD5;
- });
- /***/ }),
- /* 219 */
- /*!*************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/crypto-js/sha1.js ***!
- \*************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- ;(function (root, factory) {
- if (true) {
- // CommonJS
- module.exports = exports = factory(__webpack_require__(/*! ./core */ 211));
- } else
- {}
- })(this, function (CryptoJS) {
- (function () {
- // Shortcuts
- var C = CryptoJS;
- var C_lib = C.lib;
- var WordArray = C_lib.WordArray;
- var Hasher = C_lib.Hasher;
- var C_algo = C.algo;
- // Reusable object
- var W = [];
- /**
- * SHA-1 hash algorithm.
- */
- var SHA1 = C_algo.SHA1 = Hasher.extend({
- _doReset: function _doReset() {
- this._hash = new WordArray.init([
- 0x67452301, 0xefcdab89,
- 0x98badcfe, 0x10325476,
- 0xc3d2e1f0]);
- },
- _doProcessBlock: function _doProcessBlock(M, offset) {
- // Shortcut
- var H = this._hash.words;
- // Working variables
- var a = H[0];
- var b = H[1];
- var c = H[2];
- var d = H[3];
- var e = H[4];
- // Computation
- for (var i = 0; i < 80; i++) {
- if (i < 16) {
- W[i] = M[offset + i] | 0;
- } else {
- var n = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16];
- W[i] = n << 1 | n >>> 31;
- }
- var t = (a << 5 | a >>> 27) + e + W[i];
- if (i < 20) {
- t += (b & c | ~b & d) + 0x5a827999;
- } else if (i < 40) {
- t += (b ^ c ^ d) + 0x6ed9eba1;
- } else if (i < 60) {
- t += (b & c | b & d | c & d) - 0x70e44324;
- } else /* if (i < 80) */{
- t += (b ^ c ^ d) - 0x359d3e2a;
- }
- e = d;
- d = c;
- c = b << 30 | b >>> 2;
- b = a;
- a = t;
- }
- // Intermediate hash value
- H[0] = H[0] + a | 0;
- H[1] = H[1] + b | 0;
- H[2] = H[2] + c | 0;
- H[3] = H[3] + d | 0;
- H[4] = H[4] + e | 0;
- },
- _doFinalize: function _doFinalize() {
- // Shortcuts
- var data = this._data;
- var dataWords = data.words;
- var nBitsTotal = this._nDataBytes * 8;
- var nBitsLeft = data.sigBytes * 8;
- // Add padding
- dataWords[nBitsLeft >>> 5] |= 0x80 << 24 - nBitsLeft % 32;
- dataWords[(nBitsLeft + 64 >>> 9 << 4) + 14] = Math.floor(nBitsTotal / 0x100000000);
- dataWords[(nBitsLeft + 64 >>> 9 << 4) + 15] = nBitsTotal;
- data.sigBytes = dataWords.length * 4;
- // Hash final blocks
- this._process();
- // Return final computed hash
- return this._hash;
- },
- clone: function clone() {
- var clone = Hasher.clone.call(this);
- clone._hash = this._hash.clone();
- return clone;
- } });
- /**
- * Shortcut function to the hasher's object interface.
- *
- * @param {WordArray|string} message The message to hash.
- *
- * @return {WordArray} The hash.
- *
- * @static
- *
- * @example
- *
- * var hash = CryptoJS.SHA1('message');
- * var hash = CryptoJS.SHA1(wordArray);
- */
- C.SHA1 = Hasher._createHelper(SHA1);
- /**
- * Shortcut function to the HMAC's object interface.
- *
- * @param {WordArray|string} message The message to hash.
- * @param {WordArray|string} key The secret key.
- *
- * @return {WordArray} The HMAC.
- *
- * @static
- *
- * @example
- *
- * var hmac = CryptoJS.HmacSHA1(message, key);
- */
- C.HmacSHA1 = Hasher._createHmacHelper(SHA1);
- })();
- return CryptoJS.SHA1;
- });
- /***/ }),
- /* 220 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/crypto-js/sha256.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- ;(function (root, factory) {
- if (true) {
- // CommonJS
- module.exports = exports = factory(__webpack_require__(/*! ./core */ 211));
- } else
- {}
- })(this, function (CryptoJS) {
- (function (Math) {
- // Shortcuts
- var C = CryptoJS;
- var C_lib = C.lib;
- var WordArray = C_lib.WordArray;
- var Hasher = C_lib.Hasher;
- var C_algo = C.algo;
- // Initialization and round constants tables
- var H = [];
- var K = [];
- // Compute constants
- (function () {
- function isPrime(n) {
- var sqrtN = Math.sqrt(n);
- for (var factor = 2; factor <= sqrtN; factor++) {
- if (!(n % factor)) {
- return false;
- }
- }
- return true;
- }
- function getFractionalBits(n) {
- return (n - (n | 0)) * 0x100000000 | 0;
- }
- var n = 2;
- var nPrime = 0;
- while (nPrime < 64) {
- if (isPrime(n)) {
- if (nPrime < 8) {
- H[nPrime] = getFractionalBits(Math.pow(n, 1 / 2));
- }
- K[nPrime] = getFractionalBits(Math.pow(n, 1 / 3));
- nPrime++;
- }
- n++;
- }
- })();
- // Reusable object
- var W = [];
- /**
- * SHA-256 hash algorithm.
- */
- var SHA256 = C_algo.SHA256 = Hasher.extend({
- _doReset: function _doReset() {
- this._hash = new WordArray.init(H.slice(0));
- },
- _doProcessBlock: function _doProcessBlock(M, offset) {
- // Shortcut
- var H = this._hash.words;
- // Working variables
- var a = H[0];
- var b = H[1];
- var c = H[2];
- var d = H[3];
- var e = H[4];
- var f = H[5];
- var g = H[6];
- var h = H[7];
- // Computation
- for (var i = 0; i < 64; i++) {
- if (i < 16) {
- W[i] = M[offset + i] | 0;
- } else {
- var gamma0x = W[i - 15];
- var gamma0 = (gamma0x << 25 | gamma0x >>> 7) ^ (
- gamma0x << 14 | gamma0x >>> 18) ^
- gamma0x >>> 3;
- var gamma1x = W[i - 2];
- var gamma1 = (gamma1x << 15 | gamma1x >>> 17) ^ (
- gamma1x << 13 | gamma1x >>> 19) ^
- gamma1x >>> 10;
- W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16];
- }
- var ch = e & f ^ ~e & g;
- var maj = a & b ^ a & c ^ b & c;
- var sigma0 = (a << 30 | a >>> 2) ^ (a << 19 | a >>> 13) ^ (a << 10 | a >>> 22);
- var sigma1 = (e << 26 | e >>> 6) ^ (e << 21 | e >>> 11) ^ (e << 7 | e >>> 25);
- var t1 = h + sigma1 + ch + K[i] + W[i];
- var t2 = sigma0 + maj;
- h = g;
- g = f;
- f = e;
- e = d + t1 | 0;
- d = c;
- c = b;
- b = a;
- a = t1 + t2 | 0;
- }
- // Intermediate hash value
- H[0] = H[0] + a | 0;
- H[1] = H[1] + b | 0;
- H[2] = H[2] + c | 0;
- H[3] = H[3] + d | 0;
- H[4] = H[4] + e | 0;
- H[5] = H[5] + f | 0;
- H[6] = H[6] + g | 0;
- H[7] = H[7] + h | 0;
- },
- _doFinalize: function _doFinalize() {
- // Shortcuts
- var data = this._data;
- var dataWords = data.words;
- var nBitsTotal = this._nDataBytes * 8;
- var nBitsLeft = data.sigBytes * 8;
- // Add padding
- dataWords[nBitsLeft >>> 5] |= 0x80 << 24 - nBitsLeft % 32;
- dataWords[(nBitsLeft + 64 >>> 9 << 4) + 14] = Math.floor(nBitsTotal / 0x100000000);
- dataWords[(nBitsLeft + 64 >>> 9 << 4) + 15] = nBitsTotal;
- data.sigBytes = dataWords.length * 4;
- // Hash final blocks
- this._process();
- // Return final computed hash
- return this._hash;
- },
- clone: function clone() {
- var clone = Hasher.clone.call(this);
- clone._hash = this._hash.clone();
- return clone;
- } });
- /**
- * Shortcut function to the hasher's object interface.
- *
- * @param {WordArray|string} message The message to hash.
- *
- * @return {WordArray} The hash.
- *
- * @static
- *
- * @example
- *
- * var hash = CryptoJS.SHA256('message');
- * var hash = CryptoJS.SHA256(wordArray);
- */
- C.SHA256 = Hasher._createHelper(SHA256);
- /**
- * Shortcut function to the HMAC's object interface.
- *
- * @param {WordArray|string} message The message to hash.
- * @param {WordArray|string} key The secret key.
- *
- * @return {WordArray} The HMAC.
- *
- * @static
- *
- * @example
- *
- * var hmac = CryptoJS.HmacSHA256(message, key);
- */
- C.HmacSHA256 = Hasher._createHmacHelper(SHA256);
- })(Math);
- return CryptoJS.SHA256;
- });
- /***/ }),
- /* 221 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/crypto-js/sha224.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- ;(function (root, factory, undef) {
- if (true) {
- // CommonJS
- module.exports = exports = factory(__webpack_require__(/*! ./core */ 211), __webpack_require__(/*! ./sha256 */ 220));
- } else
- {}
- })(this, function (CryptoJS) {
- (function () {
- // Shortcuts
- var C = CryptoJS;
- var C_lib = C.lib;
- var WordArray = C_lib.WordArray;
- var C_algo = C.algo;
- var SHA256 = C_algo.SHA256;
- /**
- * SHA-224 hash algorithm.
- */
- var SHA224 = C_algo.SHA224 = SHA256.extend({
- _doReset: function _doReset() {
- this._hash = new WordArray.init([
- 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939,
- 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4]);
- },
- _doFinalize: function _doFinalize() {
- var hash = SHA256._doFinalize.call(this);
- hash.sigBytes -= 4;
- return hash;
- } });
- /**
- * Shortcut function to the hasher's object interface.
- *
- * @param {WordArray|string} message The message to hash.
- *
- * @return {WordArray} The hash.
- *
- * @static
- *
- * @example
- *
- * var hash = CryptoJS.SHA224('message');
- * var hash = CryptoJS.SHA224(wordArray);
- */
- C.SHA224 = SHA256._createHelper(SHA224);
- /**
- * Shortcut function to the HMAC's object interface.
- *
- * @param {WordArray|string} message The message to hash.
- * @param {WordArray|string} key The secret key.
- *
- * @return {WordArray} The HMAC.
- *
- * @static
- *
- * @example
- *
- * var hmac = CryptoJS.HmacSHA224(message, key);
- */
- C.HmacSHA224 = SHA256._createHmacHelper(SHA224);
- })();
- return CryptoJS.SHA224;
- });
- /***/ }),
- /* 222 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/crypto-js/sha512.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- ;(function (root, factory, undef) {
- if (true) {
- // CommonJS
- module.exports = exports = factory(__webpack_require__(/*! ./core */ 211), __webpack_require__(/*! ./x64-core */ 213));
- } else
- {}
- })(this, function (CryptoJS) {
- (function () {
- // Shortcuts
- var C = CryptoJS;
- var C_lib = C.lib;
- var Hasher = C_lib.Hasher;
- var C_x64 = C.x64;
- var X64Word = C_x64.Word;
- var X64WordArray = C_x64.WordArray;
- var C_algo = C.algo;
- function X64Word_create() {
- return X64Word.create.apply(X64Word, arguments);
- }
- // Constants
- var K = [
- X64Word_create(0x428a2f98, 0xd728ae22), X64Word_create(0x71374491, 0x23ef65cd),
- X64Word_create(0xb5c0fbcf, 0xec4d3b2f), X64Word_create(0xe9b5dba5, 0x8189dbbc),
- X64Word_create(0x3956c25b, 0xf348b538), X64Word_create(0x59f111f1, 0xb605d019),
- X64Word_create(0x923f82a4, 0xaf194f9b), X64Word_create(0xab1c5ed5, 0xda6d8118),
- X64Word_create(0xd807aa98, 0xa3030242), X64Word_create(0x12835b01, 0x45706fbe),
- X64Word_create(0x243185be, 0x4ee4b28c), X64Word_create(0x550c7dc3, 0xd5ffb4e2),
- X64Word_create(0x72be5d74, 0xf27b896f), X64Word_create(0x80deb1fe, 0x3b1696b1),
- X64Word_create(0x9bdc06a7, 0x25c71235), X64Word_create(0xc19bf174, 0xcf692694),
- X64Word_create(0xe49b69c1, 0x9ef14ad2), X64Word_create(0xefbe4786, 0x384f25e3),
- X64Word_create(0x0fc19dc6, 0x8b8cd5b5), X64Word_create(0x240ca1cc, 0x77ac9c65),
- X64Word_create(0x2de92c6f, 0x592b0275), X64Word_create(0x4a7484aa, 0x6ea6e483),
- X64Word_create(0x5cb0a9dc, 0xbd41fbd4), X64Word_create(0x76f988da, 0x831153b5),
- X64Word_create(0x983e5152, 0xee66dfab), X64Word_create(0xa831c66d, 0x2db43210),
- X64Word_create(0xb00327c8, 0x98fb213f), X64Word_create(0xbf597fc7, 0xbeef0ee4),
- X64Word_create(0xc6e00bf3, 0x3da88fc2), X64Word_create(0xd5a79147, 0x930aa725),
- X64Word_create(0x06ca6351, 0xe003826f), X64Word_create(0x14292967, 0x0a0e6e70),
- X64Word_create(0x27b70a85, 0x46d22ffc), X64Word_create(0x2e1b2138, 0x5c26c926),
- X64Word_create(0x4d2c6dfc, 0x5ac42aed), X64Word_create(0x53380d13, 0x9d95b3df),
- X64Word_create(0x650a7354, 0x8baf63de), X64Word_create(0x766a0abb, 0x3c77b2a8),
- X64Word_create(0x81c2c92e, 0x47edaee6), X64Word_create(0x92722c85, 0x1482353b),
- X64Word_create(0xa2bfe8a1, 0x4cf10364), X64Word_create(0xa81a664b, 0xbc423001),
- X64Word_create(0xc24b8b70, 0xd0f89791), X64Word_create(0xc76c51a3, 0x0654be30),
- X64Word_create(0xd192e819, 0xd6ef5218), X64Word_create(0xd6990624, 0x5565a910),
- X64Word_create(0xf40e3585, 0x5771202a), X64Word_create(0x106aa070, 0x32bbd1b8),
- X64Word_create(0x19a4c116, 0xb8d2d0c8), X64Word_create(0x1e376c08, 0x5141ab53),
- X64Word_create(0x2748774c, 0xdf8eeb99), X64Word_create(0x34b0bcb5, 0xe19b48a8),
- X64Word_create(0x391c0cb3, 0xc5c95a63), X64Word_create(0x4ed8aa4a, 0xe3418acb),
- X64Word_create(0x5b9cca4f, 0x7763e373), X64Word_create(0x682e6ff3, 0xd6b2b8a3),
- X64Word_create(0x748f82ee, 0x5defb2fc), X64Word_create(0x78a5636f, 0x43172f60),
- X64Word_create(0x84c87814, 0xa1f0ab72), X64Word_create(0x8cc70208, 0x1a6439ec),
- X64Word_create(0x90befffa, 0x23631e28), X64Word_create(0xa4506ceb, 0xde82bde9),
- X64Word_create(0xbef9a3f7, 0xb2c67915), X64Word_create(0xc67178f2, 0xe372532b),
- X64Word_create(0xca273ece, 0xea26619c), X64Word_create(0xd186b8c7, 0x21c0c207),
- X64Word_create(0xeada7dd6, 0xcde0eb1e), X64Word_create(0xf57d4f7f, 0xee6ed178),
- X64Word_create(0x06f067aa, 0x72176fba), X64Word_create(0x0a637dc5, 0xa2c898a6),
- X64Word_create(0x113f9804, 0xbef90dae), X64Word_create(0x1b710b35, 0x131c471b),
- X64Word_create(0x28db77f5, 0x23047d84), X64Word_create(0x32caab7b, 0x40c72493),
- X64Word_create(0x3c9ebe0a, 0x15c9bebc), X64Word_create(0x431d67c4, 0x9c100d4c),
- X64Word_create(0x4cc5d4be, 0xcb3e42b6), X64Word_create(0x597f299c, 0xfc657e2a),
- X64Word_create(0x5fcb6fab, 0x3ad6faec), X64Word_create(0x6c44198c, 0x4a475817)];
- // Reusable objects
- var W = [];
- (function () {
- for (var i = 0; i < 80; i++) {
- W[i] = X64Word_create();
- }
- })();
- /**
- * SHA-512 hash algorithm.
- */
- var SHA512 = C_algo.SHA512 = Hasher.extend({
- _doReset: function _doReset() {
- this._hash = new X64WordArray.init([
- new X64Word.init(0x6a09e667, 0xf3bcc908), new X64Word.init(0xbb67ae85, 0x84caa73b),
- new X64Word.init(0x3c6ef372, 0xfe94f82b), new X64Word.init(0xa54ff53a, 0x5f1d36f1),
- new X64Word.init(0x510e527f, 0xade682d1), new X64Word.init(0x9b05688c, 0x2b3e6c1f),
- new X64Word.init(0x1f83d9ab, 0xfb41bd6b), new X64Word.init(0x5be0cd19, 0x137e2179)]);
- },
- _doProcessBlock: function _doProcessBlock(M, offset) {
- // Shortcuts
- var H = this._hash.words;
- var H0 = H[0];
- var H1 = H[1];
- var H2 = H[2];
- var H3 = H[3];
- var H4 = H[4];
- var H5 = H[5];
- var H6 = H[6];
- var H7 = H[7];
- var H0h = H0.high;
- var H0l = H0.low;
- var H1h = H1.high;
- var H1l = H1.low;
- var H2h = H2.high;
- var H2l = H2.low;
- var H3h = H3.high;
- var H3l = H3.low;
- var H4h = H4.high;
- var H4l = H4.low;
- var H5h = H5.high;
- var H5l = H5.low;
- var H6h = H6.high;
- var H6l = H6.low;
- var H7h = H7.high;
- var H7l = H7.low;
- // Working variables
- var ah = H0h;
- var al = H0l;
- var bh = H1h;
- var bl = H1l;
- var ch = H2h;
- var cl = H2l;
- var dh = H3h;
- var dl = H3l;
- var eh = H4h;
- var el = H4l;
- var fh = H5h;
- var fl = H5l;
- var gh = H6h;
- var gl = H6l;
- var hh = H7h;
- var hl = H7l;
- // Rounds
- for (var i = 0; i < 80; i++) {
- var Wil;
- var Wih;
- // Shortcut
- var Wi = W[i];
- // Extend message
- if (i < 16) {
- Wih = Wi.high = M[offset + i * 2] | 0;
- Wil = Wi.low = M[offset + i * 2 + 1] | 0;
- } else {
- // Gamma0
- var gamma0x = W[i - 15];
- var gamma0xh = gamma0x.high;
- var gamma0xl = gamma0x.low;
- var gamma0h = (gamma0xh >>> 1 | gamma0xl << 31) ^ (gamma0xh >>> 8 | gamma0xl << 24) ^ gamma0xh >>> 7;
- var gamma0l = (gamma0xl >>> 1 | gamma0xh << 31) ^ (gamma0xl >>> 8 | gamma0xh << 24) ^ (gamma0xl >>> 7 | gamma0xh << 25);
- // Gamma1
- var gamma1x = W[i - 2];
- var gamma1xh = gamma1x.high;
- var gamma1xl = gamma1x.low;
- var gamma1h = (gamma1xh >>> 19 | gamma1xl << 13) ^ (gamma1xh << 3 | gamma1xl >>> 29) ^ gamma1xh >>> 6;
- var gamma1l = (gamma1xl >>> 19 | gamma1xh << 13) ^ (gamma1xl << 3 | gamma1xh >>> 29) ^ (gamma1xl >>> 6 | gamma1xh << 26);
- // W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16]
- var Wi7 = W[i - 7];
- var Wi7h = Wi7.high;
- var Wi7l = Wi7.low;
- var Wi16 = W[i - 16];
- var Wi16h = Wi16.high;
- var Wi16l = Wi16.low;
- Wil = gamma0l + Wi7l;
- Wih = gamma0h + Wi7h + (Wil >>> 0 < gamma0l >>> 0 ? 1 : 0);
- Wil = Wil + gamma1l;
- Wih = Wih + gamma1h + (Wil >>> 0 < gamma1l >>> 0 ? 1 : 0);
- Wil = Wil + Wi16l;
- Wih = Wih + Wi16h + (Wil >>> 0 < Wi16l >>> 0 ? 1 : 0);
- Wi.high = Wih;
- Wi.low = Wil;
- }
- var chh = eh & fh ^ ~eh & gh;
- var chl = el & fl ^ ~el & gl;
- var majh = ah & bh ^ ah & ch ^ bh & ch;
- var majl = al & bl ^ al & cl ^ bl & cl;
- var sigma0h = (ah >>> 28 | al << 4) ^ (ah << 30 | al >>> 2) ^ (ah << 25 | al >>> 7);
- var sigma0l = (al >>> 28 | ah << 4) ^ (al << 30 | ah >>> 2) ^ (al << 25 | ah >>> 7);
- var sigma1h = (eh >>> 14 | el << 18) ^ (eh >>> 18 | el << 14) ^ (eh << 23 | el >>> 9);
- var sigma1l = (el >>> 14 | eh << 18) ^ (el >>> 18 | eh << 14) ^ (el << 23 | eh >>> 9);
- // t1 = h + sigma1 + ch + K[i] + W[i]
- var Ki = K[i];
- var Kih = Ki.high;
- var Kil = Ki.low;
- var t1l = hl + sigma1l;
- var t1h = hh + sigma1h + (t1l >>> 0 < hl >>> 0 ? 1 : 0);
- var t1l = t1l + chl;
- var t1h = t1h + chh + (t1l >>> 0 < chl >>> 0 ? 1 : 0);
- var t1l = t1l + Kil;
- var t1h = t1h + Kih + (t1l >>> 0 < Kil >>> 0 ? 1 : 0);
- var t1l = t1l + Wil;
- var t1h = t1h + Wih + (t1l >>> 0 < Wil >>> 0 ? 1 : 0);
- // t2 = sigma0 + maj
- var t2l = sigma0l + majl;
- var t2h = sigma0h + majh + (t2l >>> 0 < sigma0l >>> 0 ? 1 : 0);
- // Update working variables
- hh = gh;
- hl = gl;
- gh = fh;
- gl = fl;
- fh = eh;
- fl = el;
- el = dl + t1l | 0;
- eh = dh + t1h + (el >>> 0 < dl >>> 0 ? 1 : 0) | 0;
- dh = ch;
- dl = cl;
- ch = bh;
- cl = bl;
- bh = ah;
- bl = al;
- al = t1l + t2l | 0;
- ah = t1h + t2h + (al >>> 0 < t1l >>> 0 ? 1 : 0) | 0;
- }
- // Intermediate hash value
- H0l = H0.low = H0l + al;
- H0.high = H0h + ah + (H0l >>> 0 < al >>> 0 ? 1 : 0);
- H1l = H1.low = H1l + bl;
- H1.high = H1h + bh + (H1l >>> 0 < bl >>> 0 ? 1 : 0);
- H2l = H2.low = H2l + cl;
- H2.high = H2h + ch + (H2l >>> 0 < cl >>> 0 ? 1 : 0);
- H3l = H3.low = H3l + dl;
- H3.high = H3h + dh + (H3l >>> 0 < dl >>> 0 ? 1 : 0);
- H4l = H4.low = H4l + el;
- H4.high = H4h + eh + (H4l >>> 0 < el >>> 0 ? 1 : 0);
- H5l = H5.low = H5l + fl;
- H5.high = H5h + fh + (H5l >>> 0 < fl >>> 0 ? 1 : 0);
- H6l = H6.low = H6l + gl;
- H6.high = H6h + gh + (H6l >>> 0 < gl >>> 0 ? 1 : 0);
- H7l = H7.low = H7l + hl;
- H7.high = H7h + hh + (H7l >>> 0 < hl >>> 0 ? 1 : 0);
- },
- _doFinalize: function _doFinalize() {
- // Shortcuts
- var data = this._data;
- var dataWords = data.words;
- var nBitsTotal = this._nDataBytes * 8;
- var nBitsLeft = data.sigBytes * 8;
- // Add padding
- dataWords[nBitsLeft >>> 5] |= 0x80 << 24 - nBitsLeft % 32;
- dataWords[(nBitsLeft + 128 >>> 10 << 5) + 30] = Math.floor(nBitsTotal / 0x100000000);
- dataWords[(nBitsLeft + 128 >>> 10 << 5) + 31] = nBitsTotal;
- data.sigBytes = dataWords.length * 4;
- // Hash final blocks
- this._process();
- // Convert hash to 32-bit word array before returning
- var hash = this._hash.toX32();
- // Return final computed hash
- return hash;
- },
- clone: function clone() {
- var clone = Hasher.clone.call(this);
- clone._hash = this._hash.clone();
- return clone;
- },
- blockSize: 1024 / 32 });
- /**
- * Shortcut function to the hasher's object interface.
- *
- * @param {WordArray|string} message The message to hash.
- *
- * @return {WordArray} The hash.
- *
- * @static
- *
- * @example
- *
- * var hash = CryptoJS.SHA512('message');
- * var hash = CryptoJS.SHA512(wordArray);
- */
- C.SHA512 = Hasher._createHelper(SHA512);
- /**
- * Shortcut function to the HMAC's object interface.
- *
- * @param {WordArray|string} message The message to hash.
- * @param {WordArray|string} key The secret key.
- *
- * @return {WordArray} The HMAC.
- *
- * @static
- *
- * @example
- *
- * var hmac = CryptoJS.HmacSHA512(message, key);
- */
- C.HmacSHA512 = Hasher._createHmacHelper(SHA512);
- })();
- return CryptoJS.SHA512;
- });
- /***/ }),
- /* 223 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/crypto-js/sha384.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- ;(function (root, factory, undef) {
- if (true) {
- // CommonJS
- module.exports = exports = factory(__webpack_require__(/*! ./core */ 211), __webpack_require__(/*! ./x64-core */ 213), __webpack_require__(/*! ./sha512 */ 222));
- } else
- {}
- })(this, function (CryptoJS) {
- (function () {
- // Shortcuts
- var C = CryptoJS;
- var C_x64 = C.x64;
- var X64Word = C_x64.Word;
- var X64WordArray = C_x64.WordArray;
- var C_algo = C.algo;
- var SHA512 = C_algo.SHA512;
- /**
- * SHA-384 hash algorithm.
- */
- var SHA384 = C_algo.SHA384 = SHA512.extend({
- _doReset: function _doReset() {
- this._hash = new X64WordArray.init([
- new X64Word.init(0xcbbb9d5d, 0xc1059ed8), new X64Word.init(0x629a292a, 0x367cd507),
- new X64Word.init(0x9159015a, 0x3070dd17), new X64Word.init(0x152fecd8, 0xf70e5939),
- new X64Word.init(0x67332667, 0xffc00b31), new X64Word.init(0x8eb44a87, 0x68581511),
- new X64Word.init(0xdb0c2e0d, 0x64f98fa7), new X64Word.init(0x47b5481d, 0xbefa4fa4)]);
- },
- _doFinalize: function _doFinalize() {
- var hash = SHA512._doFinalize.call(this);
- hash.sigBytes -= 16;
- return hash;
- } });
- /**
- * Shortcut function to the hasher's object interface.
- *
- * @param {WordArray|string} message The message to hash.
- *
- * @return {WordArray} The hash.
- *
- * @static
- *
- * @example
- *
- * var hash = CryptoJS.SHA384('message');
- * var hash = CryptoJS.SHA384(wordArray);
- */
- C.SHA384 = SHA512._createHelper(SHA384);
- /**
- * Shortcut function to the HMAC's object interface.
- *
- * @param {WordArray|string} message The message to hash.
- * @param {WordArray|string} key The secret key.
- *
- * @return {WordArray} The HMAC.
- *
- * @static
- *
- * @example
- *
- * var hmac = CryptoJS.HmacSHA384(message, key);
- */
- C.HmacSHA384 = SHA512._createHmacHelper(SHA384);
- })();
- return CryptoJS.SHA384;
- });
- /***/ }),
- /* 224 */
- /*!*************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/crypto-js/sha3.js ***!
- \*************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- ;(function (root, factory, undef) {
- if (true) {
- // CommonJS
- module.exports = exports = factory(__webpack_require__(/*! ./core */ 211), __webpack_require__(/*! ./x64-core */ 213));
- } else
- {}
- })(this, function (CryptoJS) {
- (function (Math) {
- // Shortcuts
- var C = CryptoJS;
- var C_lib = C.lib;
- var WordArray = C_lib.WordArray;
- var Hasher = C_lib.Hasher;
- var C_x64 = C.x64;
- var X64Word = C_x64.Word;
- var C_algo = C.algo;
- // Constants tables
- var RHO_OFFSETS = [];
- var PI_INDEXES = [];
- var ROUND_CONSTANTS = [];
- // Compute Constants
- (function () {
- // Compute rho offset constants
- var x = 1,y = 0;
- for (var t = 0; t < 24; t++) {
- RHO_OFFSETS[x + 5 * y] = (t + 1) * (t + 2) / 2 % 64;
- var newX = y % 5;
- var newY = (2 * x + 3 * y) % 5;
- x = newX;
- y = newY;
- }
- // Compute pi index constants
- for (var x = 0; x < 5; x++) {
- for (var y = 0; y < 5; y++) {
- PI_INDEXES[x + 5 * y] = y + (2 * x + 3 * y) % 5 * 5;
- }
- }
- // Compute round constants
- var LFSR = 0x01;
- for (var i = 0; i < 24; i++) {
- var roundConstantMsw = 0;
- var roundConstantLsw = 0;
- for (var j = 0; j < 7; j++) {
- if (LFSR & 0x01) {
- var bitPosition = (1 << j) - 1;
- if (bitPosition < 32) {
- roundConstantLsw ^= 1 << bitPosition;
- } else /* if (bitPosition >= 32) */{
- roundConstantMsw ^= 1 << bitPosition - 32;
- }
- }
- // Compute next LFSR
- if (LFSR & 0x80) {
- // Primitive polynomial over GF(2): x^8 + x^6 + x^5 + x^4 + 1
- LFSR = LFSR << 1 ^ 0x71;
- } else {
- LFSR <<= 1;
- }
- }
- ROUND_CONSTANTS[i] = X64Word.create(roundConstantMsw, roundConstantLsw);
- }
- })();
- // Reusable objects for temporary values
- var T = [];
- (function () {
- for (var i = 0; i < 25; i++) {
- T[i] = X64Word.create();
- }
- })();
- /**
- * SHA-3 hash algorithm.
- */
- var SHA3 = C_algo.SHA3 = Hasher.extend({
- /**
- * Configuration options.
- *
- * @property {number} outputLength
- * The desired number of bits in the output hash.
- * Only values permitted are: 224, 256, 384, 512.
- * Default: 512
- */
- cfg: Hasher.cfg.extend({
- outputLength: 512 }),
- _doReset: function _doReset() {
- var state = this._state = [];
- for (var i = 0; i < 25; i++) {
- state[i] = new X64Word.init();
- }
- this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32;
- },
- _doProcessBlock: function _doProcessBlock(M, offset) {
- // Shortcuts
- var state = this._state;
- var nBlockSizeLanes = this.blockSize / 2;
- // Absorb
- for (var i = 0; i < nBlockSizeLanes; i++) {
- // Shortcuts
- var M2i = M[offset + 2 * i];
- var M2i1 = M[offset + 2 * i + 1];
- // Swap endian
- M2i =
- (M2i << 8 | M2i >>> 24) & 0x00ff00ff |
- (M2i << 24 | M2i >>> 8) & 0xff00ff00;
- M2i1 =
- (M2i1 << 8 | M2i1 >>> 24) & 0x00ff00ff |
- (M2i1 << 24 | M2i1 >>> 8) & 0xff00ff00;
- // Absorb message into state
- var lane = state[i];
- lane.high ^= M2i1;
- lane.low ^= M2i;
- }
- // Rounds
- for (var round = 0; round < 24; round++) {
- // Theta
- for (var x = 0; x < 5; x++) {
- // Mix column lanes
- var tMsw = 0,tLsw = 0;
- for (var y = 0; y < 5; y++) {
- var lane = state[x + 5 * y];
- tMsw ^= lane.high;
- tLsw ^= lane.low;
- }
- // Temporary values
- var Tx = T[x];
- Tx.high = tMsw;
- Tx.low = tLsw;
- }
- for (var x = 0; x < 5; x++) {
- // Shortcuts
- var Tx4 = T[(x + 4) % 5];
- var Tx1 = T[(x + 1) % 5];
- var Tx1Msw = Tx1.high;
- var Tx1Lsw = Tx1.low;
- // Mix surrounding columns
- var tMsw = Tx4.high ^ (Tx1Msw << 1 | Tx1Lsw >>> 31);
- var tLsw = Tx4.low ^ (Tx1Lsw << 1 | Tx1Msw >>> 31);
- for (var y = 0; y < 5; y++) {
- var lane = state[x + 5 * y];
- lane.high ^= tMsw;
- lane.low ^= tLsw;
- }
- }
- // Rho Pi
- for (var laneIndex = 1; laneIndex < 25; laneIndex++) {
- var tMsw;
- var tLsw;
- // Shortcuts
- var lane = state[laneIndex];
- var laneMsw = lane.high;
- var laneLsw = lane.low;
- var rhoOffset = RHO_OFFSETS[laneIndex];
- // Rotate lanes
- if (rhoOffset < 32) {
- tMsw = laneMsw << rhoOffset | laneLsw >>> 32 - rhoOffset;
- tLsw = laneLsw << rhoOffset | laneMsw >>> 32 - rhoOffset;
- } else /* if (rhoOffset >= 32) */{
- tMsw = laneLsw << rhoOffset - 32 | laneMsw >>> 64 - rhoOffset;
- tLsw = laneMsw << rhoOffset - 32 | laneLsw >>> 64 - rhoOffset;
- }
- // Transpose lanes
- var TPiLane = T[PI_INDEXES[laneIndex]];
- TPiLane.high = tMsw;
- TPiLane.low = tLsw;
- }
- // Rho pi at x = y = 0
- var T0 = T[0];
- var state0 = state[0];
- T0.high = state0.high;
- T0.low = state0.low;
- // Chi
- for (var x = 0; x < 5; x++) {
- for (var y = 0; y < 5; y++) {
- // Shortcuts
- var laneIndex = x + 5 * y;
- var lane = state[laneIndex];
- var TLane = T[laneIndex];
- var Tx1Lane = T[(x + 1) % 5 + 5 * y];
- var Tx2Lane = T[(x + 2) % 5 + 5 * y];
- // Mix rows
- lane.high = TLane.high ^ ~Tx1Lane.high & Tx2Lane.high;
- lane.low = TLane.low ^ ~Tx1Lane.low & Tx2Lane.low;
- }
- }
- // Iota
- var lane = state[0];
- var roundConstant = ROUND_CONSTANTS[round];
- lane.high ^= roundConstant.high;
- lane.low ^= roundConstant.low;
- }
- },
- _doFinalize: function _doFinalize() {
- // Shortcuts
- var data = this._data;
- var dataWords = data.words;
- var nBitsTotal = this._nDataBytes * 8;
- var nBitsLeft = data.sigBytes * 8;
- var blockSizeBits = this.blockSize * 32;
- // Add padding
- dataWords[nBitsLeft >>> 5] |= 0x1 << 24 - nBitsLeft % 32;
- dataWords[(Math.ceil((nBitsLeft + 1) / blockSizeBits) * blockSizeBits >>> 5) - 1] |= 0x80;
- data.sigBytes = dataWords.length * 4;
- // Hash final blocks
- this._process();
- // Shortcuts
- var state = this._state;
- var outputLengthBytes = this.cfg.outputLength / 8;
- var outputLengthLanes = outputLengthBytes / 8;
- // Squeeze
- var hashWords = [];
- for (var i = 0; i < outputLengthLanes; i++) {
- // Shortcuts
- var lane = state[i];
- var laneMsw = lane.high;
- var laneLsw = lane.low;
- // Swap endian
- laneMsw =
- (laneMsw << 8 | laneMsw >>> 24) & 0x00ff00ff |
- (laneMsw << 24 | laneMsw >>> 8) & 0xff00ff00;
- laneLsw =
- (laneLsw << 8 | laneLsw >>> 24) & 0x00ff00ff |
- (laneLsw << 24 | laneLsw >>> 8) & 0xff00ff00;
- // Squeeze state to retrieve hash
- hashWords.push(laneLsw);
- hashWords.push(laneMsw);
- }
- // Return final computed hash
- return new WordArray.init(hashWords, outputLengthBytes);
- },
- clone: function clone() {
- var clone = Hasher.clone.call(this);
- var state = clone._state = this._state.slice(0);
- for (var i = 0; i < 25; i++) {
- state[i] = state[i].clone();
- }
- return clone;
- } });
- /**
- * Shortcut function to the hasher's object interface.
- *
- * @param {WordArray|string} message The message to hash.
- *
- * @return {WordArray} The hash.
- *
- * @static
- *
- * @example
- *
- * var hash = CryptoJS.SHA3('message');
- * var hash = CryptoJS.SHA3(wordArray);
- */
- C.SHA3 = Hasher._createHelper(SHA3);
- /**
- * Shortcut function to the HMAC's object interface.
- *
- * @param {WordArray|string} message The message to hash.
- * @param {WordArray|string} key The secret key.
- *
- * @return {WordArray} The HMAC.
- *
- * @static
- *
- * @example
- *
- * var hmac = CryptoJS.HmacSHA3(message, key);
- */
- C.HmacSHA3 = Hasher._createHmacHelper(SHA3);
- })(Math);
- return CryptoJS.SHA3;
- });
- /***/ }),
- /* 225 */
- /*!******************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/crypto-js/ripemd160.js ***!
- \******************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- ;(function (root, factory) {
- if (true) {
- // CommonJS
- module.exports = exports = factory(__webpack_require__(/*! ./core */ 211));
- } else
- {}
- })(this, function (CryptoJS) {
- /** @preserve
- (c) 2012 by Cédric Mesnil. All rights reserved.
- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
- (function (Math) {
- // Shortcuts
- var C = CryptoJS;
- var C_lib = C.lib;
- var WordArray = C_lib.WordArray;
- var Hasher = C_lib.Hasher;
- var C_algo = C.algo;
- // Constants table
- var _zl = WordArray.create([
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8,
- 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12,
- 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2,
- 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]);
- var _zr = WordArray.create([
- 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12,
- 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2,
- 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13,
- 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14,
- 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]);
- var _sl = WordArray.create([
- 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8,
- 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12,
- 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5,
- 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12,
- 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6]);
- var _sr = WordArray.create([
- 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6,
- 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11,
- 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5,
- 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8,
- 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11]);
- var _hl = WordArray.create([0x00000000, 0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xA953FD4E]);
- var _hr = WordArray.create([0x50A28BE6, 0x5C4DD124, 0x6D703EF3, 0x7A6D76E9, 0x00000000]);
- /**
- * RIPEMD160 hash algorithm.
- */
- var RIPEMD160 = C_algo.RIPEMD160 = Hasher.extend({
- _doReset: function _doReset() {
- this._hash = WordArray.create([0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0]);
- },
- _doProcessBlock: function _doProcessBlock(M, offset) {
- // Swap endian
- for (var i = 0; i < 16; i++) {
- // Shortcuts
- var offset_i = offset + i;
- var M_offset_i = M[offset_i];
- // Swap
- M[offset_i] =
- (M_offset_i << 8 | M_offset_i >>> 24) & 0x00ff00ff |
- (M_offset_i << 24 | M_offset_i >>> 8) & 0xff00ff00;
- }
- // Shortcut
- var H = this._hash.words;
- var hl = _hl.words;
- var hr = _hr.words;
- var zl = _zl.words;
- var zr = _zr.words;
- var sl = _sl.words;
- var sr = _sr.words;
- // Working variables
- var al, bl, cl, dl, el;
- var ar, br, cr, dr, er;
- ar = al = H[0];
- br = bl = H[1];
- cr = cl = H[2];
- dr = dl = H[3];
- er = el = H[4];
- // Computation
- var t;
- for (var i = 0; i < 80; i += 1) {
- t = al + M[offset + zl[i]] | 0;
- if (i < 16) {
- t += f1(bl, cl, dl) + hl[0];
- } else if (i < 32) {
- t += f2(bl, cl, dl) + hl[1];
- } else if (i < 48) {
- t += f3(bl, cl, dl) + hl[2];
- } else if (i < 64) {
- t += f4(bl, cl, dl) + hl[3];
- } else {// if (i<80) {
- t += f5(bl, cl, dl) + hl[4];
- }
- t = t | 0;
- t = rotl(t, sl[i]);
- t = t + el | 0;
- al = el;
- el = dl;
- dl = rotl(cl, 10);
- cl = bl;
- bl = t;
- t = ar + M[offset + zr[i]] | 0;
- if (i < 16) {
- t += f5(br, cr, dr) + hr[0];
- } else if (i < 32) {
- t += f4(br, cr, dr) + hr[1];
- } else if (i < 48) {
- t += f3(br, cr, dr) + hr[2];
- } else if (i < 64) {
- t += f2(br, cr, dr) + hr[3];
- } else {// if (i<80) {
- t += f1(br, cr, dr) + hr[4];
- }
- t = t | 0;
- t = rotl(t, sr[i]);
- t = t + er | 0;
- ar = er;
- er = dr;
- dr = rotl(cr, 10);
- cr = br;
- br = t;
- }
- // Intermediate hash value
- t = H[1] + cl + dr | 0;
- H[1] = H[2] + dl + er | 0;
- H[2] = H[3] + el + ar | 0;
- H[3] = H[4] + al + br | 0;
- H[4] = H[0] + bl + cr | 0;
- H[0] = t;
- },
- _doFinalize: function _doFinalize() {
- // Shortcuts
- var data = this._data;
- var dataWords = data.words;
- var nBitsTotal = this._nDataBytes * 8;
- var nBitsLeft = data.sigBytes * 8;
- // Add padding
- dataWords[nBitsLeft >>> 5] |= 0x80 << 24 - nBitsLeft % 32;
- dataWords[(nBitsLeft + 64 >>> 9 << 4) + 14] =
- (nBitsTotal << 8 | nBitsTotal >>> 24) & 0x00ff00ff |
- (nBitsTotal << 24 | nBitsTotal >>> 8) & 0xff00ff00;
- data.sigBytes = (dataWords.length + 1) * 4;
- // Hash final blocks
- this._process();
- // Shortcuts
- var hash = this._hash;
- var H = hash.words;
- // Swap endian
- for (var i = 0; i < 5; i++) {
- // Shortcut
- var H_i = H[i];
- // Swap
- H[i] = (H_i << 8 | H_i >>> 24) & 0x00ff00ff |
- (H_i << 24 | H_i >>> 8) & 0xff00ff00;
- }
- // Return final computed hash
- return hash;
- },
- clone: function clone() {
- var clone = Hasher.clone.call(this);
- clone._hash = this._hash.clone();
- return clone;
- } });
- function f1(x, y, z) {
- return x ^ y ^ z;
- }
- function f2(x, y, z) {
- return x & y | ~x & z;
- }
- function f3(x, y, z) {
- return (x | ~y) ^ z;
- }
- function f4(x, y, z) {
- return x & z | y & ~z;
- }
- function f5(x, y, z) {
- return x ^ (y | ~z);
- }
- function rotl(x, n) {
- return x << n | x >>> 32 - n;
- }
- /**
- * Shortcut function to the hasher's object interface.
- *
- * @param {WordArray|string} message The message to hash.
- *
- * @return {WordArray} The hash.
- *
- * @static
- *
- * @example
- *
- * var hash = CryptoJS.RIPEMD160('message');
- * var hash = CryptoJS.RIPEMD160(wordArray);
- */
- C.RIPEMD160 = Hasher._createHelper(RIPEMD160);
- /**
- * Shortcut function to the HMAC's object interface.
- *
- * @param {WordArray|string} message The message to hash.
- * @param {WordArray|string} key The secret key.
- *
- * @return {WordArray} The HMAC.
- *
- * @static
- *
- * @example
- *
- * var hmac = CryptoJS.HmacRIPEMD160(message, key);
- */
- C.HmacRIPEMD160 = Hasher._createHmacHelper(RIPEMD160);
- })(Math);
- return CryptoJS.RIPEMD160;
- });
- /***/ }),
- /* 226 */
- /*!*************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/crypto-js/hmac.js ***!
- \*************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- ;(function (root, factory) {
- if (true) {
- // CommonJS
- module.exports = exports = factory(__webpack_require__(/*! ./core */ 211));
- } else
- {}
- })(this, function (CryptoJS) {
- (function () {
- // Shortcuts
- var C = CryptoJS;
- var C_lib = C.lib;
- var Base = C_lib.Base;
- var C_enc = C.enc;
- var Utf8 = C_enc.Utf8;
- var C_algo = C.algo;
- /**
- * HMAC algorithm.
- */
- var HMAC = C_algo.HMAC = Base.extend({
- /**
- * Initializes a newly created HMAC.
- *
- * @param {Hasher} hasher The hash algorithm to use.
- * @param {WordArray|string} key The secret key.
- *
- * @example
- *
- * var hmacHasher = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, key);
- */
- init: function init(hasher, key) {
- // Init hasher
- hasher = this._hasher = new hasher.init();
- // Convert string to WordArray, else assume WordArray already
- if (typeof key == 'string') {
- key = Utf8.parse(key);
- }
- // Shortcuts
- var hasherBlockSize = hasher.blockSize;
- var hasherBlockSizeBytes = hasherBlockSize * 4;
- // Allow arbitrary length keys
- if (key.sigBytes > hasherBlockSizeBytes) {
- key = hasher.finalize(key);
- }
- // Clamp excess bits
- key.clamp();
- // Clone key for inner and outer pads
- var oKey = this._oKey = key.clone();
- var iKey = this._iKey = key.clone();
- // Shortcuts
- var oKeyWords = oKey.words;
- var iKeyWords = iKey.words;
- // XOR keys with pad constants
- for (var i = 0; i < hasherBlockSize; i++) {
- oKeyWords[i] ^= 0x5c5c5c5c;
- iKeyWords[i] ^= 0x36363636;
- }
- oKey.sigBytes = iKey.sigBytes = hasherBlockSizeBytes;
- // Set initial values
- this.reset();
- },
- /**
- * Resets this HMAC to its initial state.
- *
- * @example
- *
- * hmacHasher.reset();
- */
- reset: function reset() {
- // Shortcut
- var hasher = this._hasher;
- // Reset
- hasher.reset();
- hasher.update(this._iKey);
- },
- /**
- * Updates this HMAC with a message.
- *
- * @param {WordArray|string} messageUpdate The message to append.
- *
- * @return {HMAC} This HMAC instance.
- *
- * @example
- *
- * hmacHasher.update('message');
- * hmacHasher.update(wordArray);
- */
- update: function update(messageUpdate) {
- this._hasher.update(messageUpdate);
- // Chainable
- return this;
- },
- /**
- * Finalizes the HMAC computation.
- * Note that the finalize operation is effectively a destructive, read-once operation.
- *
- * @param {WordArray|string} messageUpdate (Optional) A final message update.
- *
- * @return {WordArray} The HMAC.
- *
- * @example
- *
- * var hmac = hmacHasher.finalize();
- * var hmac = hmacHasher.finalize('message');
- * var hmac = hmacHasher.finalize(wordArray);
- */
- finalize: function finalize(messageUpdate) {
- // Shortcut
- var hasher = this._hasher;
- // Compute HMAC
- var innerHash = hasher.finalize(messageUpdate);
- hasher.reset();
- var hmac = hasher.finalize(this._oKey.clone().concat(innerHash));
- return hmac;
- } });
- })();
- });
- /***/ }),
- /* 227 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/crypto-js/pbkdf2.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- ;(function (root, factory, undef) {
- if (true) {
- // CommonJS
- module.exports = exports = factory(__webpack_require__(/*! ./core */ 211), __webpack_require__(/*! ./sha1 */ 219), __webpack_require__(/*! ./hmac */ 226));
- } else
- {}
- })(this, function (CryptoJS) {
- (function () {
- // Shortcuts
- var C = CryptoJS;
- var C_lib = C.lib;
- var Base = C_lib.Base;
- var WordArray = C_lib.WordArray;
- var C_algo = C.algo;
- var SHA1 = C_algo.SHA1;
- var HMAC = C_algo.HMAC;
- /**
- * Password-Based Key Derivation Function 2 algorithm.
- */
- var PBKDF2 = C_algo.PBKDF2 = Base.extend({
- /**
- * Configuration options.
- *
- * @property {number} keySize The key size in words to generate. Default: 4 (128 bits)
- * @property {Hasher} hasher The hasher to use. Default: SHA1
- * @property {number} iterations The number of iterations to perform. Default: 1
- */
- cfg: Base.extend({
- keySize: 128 / 32,
- hasher: SHA1,
- iterations: 1 }),
- /**
- * Initializes a newly created key derivation function.
- *
- * @param {Object} cfg (Optional) The configuration options to use for the derivation.
- *
- * @example
- *
- * var kdf = CryptoJS.algo.PBKDF2.create();
- * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8 });
- * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8, iterations: 1000 });
- */
- init: function init(cfg) {
- this.cfg = this.cfg.extend(cfg);
- },
- /**
- * Computes the Password-Based Key Derivation Function 2.
- *
- * @param {WordArray|string} password The password.
- * @param {WordArray|string} salt A salt.
- *
- * @return {WordArray} The derived key.
- *
- * @example
- *
- * var key = kdf.compute(password, salt);
- */
- compute: function compute(password, salt) {
- // Shortcut
- var cfg = this.cfg;
- // Init HMAC
- var hmac = HMAC.create(cfg.hasher, password);
- // Initial values
- var derivedKey = WordArray.create();
- var blockIndex = WordArray.create([0x00000001]);
- // Shortcuts
- var derivedKeyWords = derivedKey.words;
- var blockIndexWords = blockIndex.words;
- var keySize = cfg.keySize;
- var iterations = cfg.iterations;
- // Generate key
- while (derivedKeyWords.length < keySize) {
- var block = hmac.update(salt).finalize(blockIndex);
- hmac.reset();
- // Shortcuts
- var blockWords = block.words;
- var blockWordsLength = blockWords.length;
- // Iterations
- var intermediate = block;
- for (var i = 1; i < iterations; i++) {
- intermediate = hmac.finalize(intermediate);
- hmac.reset();
- // Shortcut
- var intermediateWords = intermediate.words;
- // XOR intermediate with block
- for (var j = 0; j < blockWordsLength; j++) {
- blockWords[j] ^= intermediateWords[j];
- }
- }
- derivedKey.concat(block);
- blockIndexWords[0]++;
- }
- derivedKey.sigBytes = keySize * 4;
- return derivedKey;
- } });
- /**
- * Computes the Password-Based Key Derivation Function 2.
- *
- * @param {WordArray|string} password The password.
- * @param {WordArray|string} salt A salt.
- * @param {Object} cfg (Optional) The configuration options to use for this computation.
- *
- * @return {WordArray} The derived key.
- *
- * @static
- *
- * @example
- *
- * var key = CryptoJS.PBKDF2(password, salt);
- * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8 });
- * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8, iterations: 1000 });
- */
- C.PBKDF2 = function (password, salt, cfg) {
- return PBKDF2.create(cfg).compute(password, salt);
- };
- })();
- return CryptoJS.PBKDF2;
- });
- /***/ }),
- /* 228 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/crypto-js/evpkdf.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- ;(function (root, factory, undef) {
- if (true) {
- // CommonJS
- module.exports = exports = factory(__webpack_require__(/*! ./core */ 211), __webpack_require__(/*! ./sha1 */ 219), __webpack_require__(/*! ./hmac */ 226));
- } else
- {}
- })(this, function (CryptoJS) {
- (function () {
- // Shortcuts
- var C = CryptoJS;
- var C_lib = C.lib;
- var Base = C_lib.Base;
- var WordArray = C_lib.WordArray;
- var C_algo = C.algo;
- var MD5 = C_algo.MD5;
- /**
- * This key derivation function is meant to conform with EVP_BytesToKey.
- * www.openssl.org/docs/crypto/EVP_BytesToKey.html
- */
- var EvpKDF = C_algo.EvpKDF = Base.extend({
- /**
- * Configuration options.
- *
- * @property {number} keySize The key size in words to generate. Default: 4 (128 bits)
- * @property {Hasher} hasher The hash algorithm to use. Default: MD5
- * @property {number} iterations The number of iterations to perform. Default: 1
- */
- cfg: Base.extend({
- keySize: 128 / 32,
- hasher: MD5,
- iterations: 1 }),
- /**
- * Initializes a newly created key derivation function.
- *
- * @param {Object} cfg (Optional) The configuration options to use for the derivation.
- *
- * @example
- *
- * var kdf = CryptoJS.algo.EvpKDF.create();
- * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8 });
- * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8, iterations: 1000 });
- */
- init: function init(cfg) {
- this.cfg = this.cfg.extend(cfg);
- },
- /**
- * Derives a key from a password.
- *
- * @param {WordArray|string} password The password.
- * @param {WordArray|string} salt A salt.
- *
- * @return {WordArray} The derived key.
- *
- * @example
- *
- * var key = kdf.compute(password, salt);
- */
- compute: function compute(password, salt) {
- var block;
- // Shortcut
- var cfg = this.cfg;
- // Init hasher
- var hasher = cfg.hasher.create();
- // Initial values
- var derivedKey = WordArray.create();
- // Shortcuts
- var derivedKeyWords = derivedKey.words;
- var keySize = cfg.keySize;
- var iterations = cfg.iterations;
- // Generate key
- while (derivedKeyWords.length < keySize) {
- if (block) {
- hasher.update(block);
- }
- block = hasher.update(password).finalize(salt);
- hasher.reset();
- // Iterations
- for (var i = 1; i < iterations; i++) {
- block = hasher.finalize(block);
- hasher.reset();
- }
- derivedKey.concat(block);
- }
- derivedKey.sigBytes = keySize * 4;
- return derivedKey;
- } });
- /**
- * Derives a key from a password.
- *
- * @param {WordArray|string} password The password.
- * @param {WordArray|string} salt A salt.
- * @param {Object} cfg (Optional) The configuration options to use for this computation.
- *
- * @return {WordArray} The derived key.
- *
- * @static
- *
- * @example
- *
- * var key = CryptoJS.EvpKDF(password, salt);
- * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8 });
- * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8, iterations: 1000 });
- */
- C.EvpKDF = function (password, salt, cfg) {
- return EvpKDF.create(cfg).compute(password, salt);
- };
- })();
- return CryptoJS.EvpKDF;
- });
- /***/ }),
- /* 229 */
- /*!********************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/crypto-js/cipher-core.js ***!
- \********************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- ;(function (root, factory, undef) {
- if (true) {
- // CommonJS
- module.exports = exports = factory(__webpack_require__(/*! ./core */ 211), __webpack_require__(/*! ./evpkdf */ 228));
- } else
- {}
- })(this, function (CryptoJS) {
- /**
- * Cipher core components.
- */
- CryptoJS.lib.Cipher || function (undefined) {
- // Shortcuts
- var C = CryptoJS;
- var C_lib = C.lib;
- var Base = C_lib.Base;
- var WordArray = C_lib.WordArray;
- var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm;
- var C_enc = C.enc;
- var Utf8 = C_enc.Utf8;
- var Base64 = C_enc.Base64;
- var C_algo = C.algo;
- var EvpKDF = C_algo.EvpKDF;
- /**
- * Abstract base cipher template.
- *
- * @property {number} keySize This cipher's key size. Default: 4 (128 bits)
- * @property {number} ivSize This cipher's IV size. Default: 4 (128 bits)
- * @property {number} _ENC_XFORM_MODE A constant representing encryption mode.
- * @property {number} _DEC_XFORM_MODE A constant representing decryption mode.
- */
- var Cipher = C_lib.Cipher = BufferedBlockAlgorithm.extend({
- /**
- * Configuration options.
- *
- * @property {WordArray} iv The IV to use for this operation.
- */
- cfg: Base.extend(),
- /**
- * Creates this cipher in encryption mode.
- *
- * @param {WordArray} key The key.
- * @param {Object} cfg (Optional) The configuration options to use for this operation.
- *
- * @return {Cipher} A cipher instance.
- *
- * @static
- *
- * @example
- *
- * var cipher = CryptoJS.algo.AES.createEncryptor(keyWordArray, { iv: ivWordArray });
- */
- createEncryptor: function createEncryptor(key, cfg) {
- return this.create(this._ENC_XFORM_MODE, key, cfg);
- },
- /**
- * Creates this cipher in decryption mode.
- *
- * @param {WordArray} key The key.
- * @param {Object} cfg (Optional) The configuration options to use for this operation.
- *
- * @return {Cipher} A cipher instance.
- *
- * @static
- *
- * @example
- *
- * var cipher = CryptoJS.algo.AES.createDecryptor(keyWordArray, { iv: ivWordArray });
- */
- createDecryptor: function createDecryptor(key, cfg) {
- return this.create(this._DEC_XFORM_MODE, key, cfg);
- },
- /**
- * Initializes a newly created cipher.
- *
- * @param {number} xformMode Either the encryption or decryption transormation mode constant.
- * @param {WordArray} key The key.
- * @param {Object} cfg (Optional) The configuration options to use for this operation.
- *
- * @example
- *
- * var cipher = CryptoJS.algo.AES.create(CryptoJS.algo.AES._ENC_XFORM_MODE, keyWordArray, { iv: ivWordArray });
- */
- init: function init(xformMode, key, cfg) {
- // Apply config defaults
- this.cfg = this.cfg.extend(cfg);
- // Store transform mode and key
- this._xformMode = xformMode;
- this._key = key;
- // Set initial values
- this.reset();
- },
- /**
- * Resets this cipher to its initial state.
- *
- * @example
- *
- * cipher.reset();
- */
- reset: function reset() {
- // Reset data buffer
- BufferedBlockAlgorithm.reset.call(this);
- // Perform concrete-cipher logic
- this._doReset();
- },
- /**
- * Adds data to be encrypted or decrypted.
- *
- * @param {WordArray|string} dataUpdate The data to encrypt or decrypt.
- *
- * @return {WordArray} The data after processing.
- *
- * @example
- *
- * var encrypted = cipher.process('data');
- * var encrypted = cipher.process(wordArray);
- */
- process: function process(dataUpdate) {
- // Append
- this._append(dataUpdate);
- // Process available blocks
- return this._process();
- },
- /**
- * Finalizes the encryption or decryption process.
- * Note that the finalize operation is effectively a destructive, read-once operation.
- *
- * @param {WordArray|string} dataUpdate The final data to encrypt or decrypt.
- *
- * @return {WordArray} The data after final processing.
- *
- * @example
- *
- * var encrypted = cipher.finalize();
- * var encrypted = cipher.finalize('data');
- * var encrypted = cipher.finalize(wordArray);
- */
- finalize: function finalize(dataUpdate) {
- // Final data update
- if (dataUpdate) {
- this._append(dataUpdate);
- }
- // Perform concrete-cipher logic
- var finalProcessedData = this._doFinalize();
- return finalProcessedData;
- },
- keySize: 128 / 32,
- ivSize: 128 / 32,
- _ENC_XFORM_MODE: 1,
- _DEC_XFORM_MODE: 2,
- /**
- * Creates shortcut functions to a cipher's object interface.
- *
- * @param {Cipher} cipher The cipher to create a helper for.
- *
- * @return {Object} An object with encrypt and decrypt shortcut functions.
- *
- * @static
- *
- * @example
- *
- * var AES = CryptoJS.lib.Cipher._createHelper(CryptoJS.algo.AES);
- */
- _createHelper: function () {
- function selectCipherStrategy(key) {
- if (typeof key == 'string') {
- return PasswordBasedCipher;
- } else {
- return SerializableCipher;
- }
- }
- return function (cipher) {
- return {
- encrypt: function encrypt(message, key, cfg) {
- return selectCipherStrategy(key).encrypt(cipher, message, key, cfg);
- },
- decrypt: function decrypt(ciphertext, key, cfg) {
- return selectCipherStrategy(key).decrypt(cipher, ciphertext, key, cfg);
- } };
- };
- }() });
- /**
- * Abstract base stream cipher template.
- *
- * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 1 (32 bits)
- */
- var StreamCipher = C_lib.StreamCipher = Cipher.extend({
- _doFinalize: function _doFinalize() {
- // Process partial blocks
- var finalProcessedBlocks = this._process(!!'flush');
- return finalProcessedBlocks;
- },
- blockSize: 1 });
- /**
- * Mode namespace.
- */
- var C_mode = C.mode = {};
- /**
- * Abstract base block cipher mode template.
- */
- var BlockCipherMode = C_lib.BlockCipherMode = Base.extend({
- /**
- * Creates this mode for encryption.
- *
- * @param {Cipher} cipher A block cipher instance.
- * @param {Array} iv The IV words.
- *
- * @static
- *
- * @example
- *
- * var mode = CryptoJS.mode.CBC.createEncryptor(cipher, iv.words);
- */
- createEncryptor: function createEncryptor(cipher, iv) {
- return this.Encryptor.create(cipher, iv);
- },
- /**
- * Creates this mode for decryption.
- *
- * @param {Cipher} cipher A block cipher instance.
- * @param {Array} iv The IV words.
- *
- * @static
- *
- * @example
- *
- * var mode = CryptoJS.mode.CBC.createDecryptor(cipher, iv.words);
- */
- createDecryptor: function createDecryptor(cipher, iv) {
- return this.Decryptor.create(cipher, iv);
- },
- /**
- * Initializes a newly created mode.
- *
- * @param {Cipher} cipher A block cipher instance.
- * @param {Array} iv The IV words.
- *
- * @example
- *
- * var mode = CryptoJS.mode.CBC.Encryptor.create(cipher, iv.words);
- */
- init: function init(cipher, iv) {
- this._cipher = cipher;
- this._iv = iv;
- } });
- /**
- * Cipher Block Chaining mode.
- */
- var CBC = C_mode.CBC = function () {
- /**
- * Abstract base CBC mode.
- */
- var CBC = BlockCipherMode.extend();
- /**
- * CBC encryptor.
- */
- CBC.Encryptor = CBC.extend({
- /**
- * Processes the data block at offset.
- *
- * @param {Array} words The data words to operate on.
- * @param {number} offset The offset where the block starts.
- *
- * @example
- *
- * mode.processBlock(data.words, offset);
- */
- processBlock: function processBlock(words, offset) {
- // Shortcuts
- var cipher = this._cipher;
- var blockSize = cipher.blockSize;
- // XOR and encrypt
- xorBlock.call(this, words, offset, blockSize);
- cipher.encryptBlock(words, offset);
- // Remember this block to use with next block
- this._prevBlock = words.slice(offset, offset + blockSize);
- } });
- /**
- * CBC decryptor.
- */
- CBC.Decryptor = CBC.extend({
- /**
- * Processes the data block at offset.
- *
- * @param {Array} words The data words to operate on.
- * @param {number} offset The offset where the block starts.
- *
- * @example
- *
- * mode.processBlock(data.words, offset);
- */
- processBlock: function processBlock(words, offset) {
- // Shortcuts
- var cipher = this._cipher;
- var blockSize = cipher.blockSize;
- // Remember this block to use with next block
- var thisBlock = words.slice(offset, offset + blockSize);
- // Decrypt and XOR
- cipher.decryptBlock(words, offset);
- xorBlock.call(this, words, offset, blockSize);
- // This block becomes the previous block
- this._prevBlock = thisBlock;
- } });
- function xorBlock(words, offset, blockSize) {
- var block;
- // Shortcut
- var iv = this._iv;
- // Choose mixing block
- if (iv) {
- block = iv;
- // Remove IV for subsequent blocks
- this._iv = undefined;
- } else {
- block = this._prevBlock;
- }
- // XOR blocks
- for (var i = 0; i < blockSize; i++) {
- words[offset + i] ^= block[i];
- }
- }
- return CBC;
- }();
- /**
- * Padding namespace.
- */
- var C_pad = C.pad = {};
- /**
- * PKCS #5/7 padding strategy.
- */
- var Pkcs7 = C_pad.Pkcs7 = {
- /**
- * Pads data using the algorithm defined in PKCS #5/7.
- *
- * @param {WordArray} data The data to pad.
- * @param {number} blockSize The multiple that the data should be padded to.
- *
- * @static
- *
- * @example
- *
- * CryptoJS.pad.Pkcs7.pad(wordArray, 4);
- */
- pad: function pad(data, blockSize) {
- // Shortcut
- var blockSizeBytes = blockSize * 4;
- // Count padding bytes
- var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes;
- // Create padding word
- var paddingWord = nPaddingBytes << 24 | nPaddingBytes << 16 | nPaddingBytes << 8 | nPaddingBytes;
- // Create padding
- var paddingWords = [];
- for (var i = 0; i < nPaddingBytes; i += 4) {
- paddingWords.push(paddingWord);
- }
- var padding = WordArray.create(paddingWords, nPaddingBytes);
- // Add padding
- data.concat(padding);
- },
- /**
- * Unpads data that had been padded using the algorithm defined in PKCS #5/7.
- *
- * @param {WordArray} data The data to unpad.
- *
- * @static
- *
- * @example
- *
- * CryptoJS.pad.Pkcs7.unpad(wordArray);
- */
- unpad: function unpad(data) {
- // Get number of padding bytes from last byte
- var nPaddingBytes = data.words[data.sigBytes - 1 >>> 2] & 0xff;
- // Remove padding
- data.sigBytes -= nPaddingBytes;
- } };
- /**
- * Abstract base block cipher template.
- *
- * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 4 (128 bits)
- */
- var BlockCipher = C_lib.BlockCipher = Cipher.extend({
- /**
- * Configuration options.
- *
- * @property {Mode} mode The block mode to use. Default: CBC
- * @property {Padding} padding The padding strategy to use. Default: Pkcs7
- */
- cfg: Cipher.cfg.extend({
- mode: CBC,
- padding: Pkcs7 }),
- reset: function reset() {
- var modeCreator;
- // Reset cipher
- Cipher.reset.call(this);
- // Shortcuts
- var cfg = this.cfg;
- var iv = cfg.iv;
- var mode = cfg.mode;
- // Reset block mode
- if (this._xformMode == this._ENC_XFORM_MODE) {
- modeCreator = mode.createEncryptor;
- } else /* if (this._xformMode == this._DEC_XFORM_MODE) */{
- modeCreator = mode.createDecryptor;
- // Keep at least one block in the buffer for unpadding
- this._minBufferSize = 1;
- }
- if (this._mode && this._mode.__creator == modeCreator) {
- this._mode.init(this, iv && iv.words);
- } else {
- this._mode = modeCreator.call(mode, this, iv && iv.words);
- this._mode.__creator = modeCreator;
- }
- },
- _doProcessBlock: function _doProcessBlock(words, offset) {
- this._mode.processBlock(words, offset);
- },
- _doFinalize: function _doFinalize() {
- var finalProcessedBlocks;
- // Shortcut
- var padding = this.cfg.padding;
- // Finalize
- if (this._xformMode == this._ENC_XFORM_MODE) {
- // Pad data
- padding.pad(this._data, this.blockSize);
- // Process final blocks
- finalProcessedBlocks = this._process(!!'flush');
- } else /* if (this._xformMode == this._DEC_XFORM_MODE) */{
- // Process final blocks
- finalProcessedBlocks = this._process(!!'flush');
- // Unpad data
- padding.unpad(finalProcessedBlocks);
- }
- return finalProcessedBlocks;
- },
- blockSize: 128 / 32 });
- /**
- * A collection of cipher parameters.
- *
- * @property {WordArray} ciphertext The raw ciphertext.
- * @property {WordArray} key The key to this ciphertext.
- * @property {WordArray} iv The IV used in the ciphering operation.
- * @property {WordArray} salt The salt used with a key derivation function.
- * @property {Cipher} algorithm The cipher algorithm.
- * @property {Mode} mode The block mode used in the ciphering operation.
- * @property {Padding} padding The padding scheme used in the ciphering operation.
- * @property {number} blockSize The block size of the cipher.
- * @property {Format} formatter The default formatting strategy to convert this cipher params object to a string.
- */
- var CipherParams = C_lib.CipherParams = Base.extend({
- /**
- * Initializes a newly created cipher params object.
- *
- * @param {Object} cipherParams An object with any of the possible cipher parameters.
- *
- * @example
- *
- * var cipherParams = CryptoJS.lib.CipherParams.create({
- * ciphertext: ciphertextWordArray,
- * key: keyWordArray,
- * iv: ivWordArray,
- * salt: saltWordArray,
- * algorithm: CryptoJS.algo.AES,
- * mode: CryptoJS.mode.CBC,
- * padding: CryptoJS.pad.PKCS7,
- * blockSize: 4,
- * formatter: CryptoJS.format.OpenSSL
- * });
- */
- init: function init(cipherParams) {
- this.mixIn(cipherParams);
- },
- /**
- * Converts this cipher params object to a string.
- *
- * @param {Format} formatter (Optional) The formatting strategy to use.
- *
- * @return {string} The stringified cipher params.
- *
- * @throws Error If neither the formatter nor the default formatter is set.
- *
- * @example
- *
- * var string = cipherParams + '';
- * var string = cipherParams.toString();
- * var string = cipherParams.toString(CryptoJS.format.OpenSSL);
- */
- toString: function toString(formatter) {
- return (formatter || this.formatter).stringify(this);
- } });
- /**
- * Format namespace.
- */
- var C_format = C.format = {};
- /**
- * OpenSSL formatting strategy.
- */
- var OpenSSLFormatter = C_format.OpenSSL = {
- /**
- * Converts a cipher params object to an OpenSSL-compatible string.
- *
- * @param {CipherParams} cipherParams The cipher params object.
- *
- * @return {string} The OpenSSL-compatible string.
- *
- * @static
- *
- * @example
- *
- * var openSSLString = CryptoJS.format.OpenSSL.stringify(cipherParams);
- */
- stringify: function stringify(cipherParams) {
- var wordArray;
- // Shortcuts
- var ciphertext = cipherParams.ciphertext;
- var salt = cipherParams.salt;
- // Format
- if (salt) {
- wordArray = WordArray.create([0x53616c74, 0x65645f5f]).concat(salt).concat(ciphertext);
- } else {
- wordArray = ciphertext;
- }
- return wordArray.toString(Base64);
- },
- /**
- * Converts an OpenSSL-compatible string to a cipher params object.
- *
- * @param {string} openSSLStr The OpenSSL-compatible string.
- *
- * @return {CipherParams} The cipher params object.
- *
- * @static
- *
- * @example
- *
- * var cipherParams = CryptoJS.format.OpenSSL.parse(openSSLString);
- */
- parse: function parse(openSSLStr) {
- var salt;
- // Parse base64
- var ciphertext = Base64.parse(openSSLStr);
- // Shortcut
- var ciphertextWords = ciphertext.words;
- // Test for salt
- if (ciphertextWords[0] == 0x53616c74 && ciphertextWords[1] == 0x65645f5f) {
- // Extract salt
- salt = WordArray.create(ciphertextWords.slice(2, 4));
- // Remove salt from ciphertext
- ciphertextWords.splice(0, 4);
- ciphertext.sigBytes -= 16;
- }
- return CipherParams.create({ ciphertext: ciphertext, salt: salt });
- } };
- /**
- * A cipher wrapper that returns ciphertext as a serializable cipher params object.
- */
- var SerializableCipher = C_lib.SerializableCipher = Base.extend({
- /**
- * Configuration options.
- *
- * @property {Formatter} format The formatting strategy to convert cipher param objects to and from a string. Default: OpenSSL
- */
- cfg: Base.extend({
- format: OpenSSLFormatter }),
- /**
- * Encrypts a message.
- *
- * @param {Cipher} cipher The cipher algorithm to use.
- * @param {WordArray|string} message The message to encrypt.
- * @param {WordArray} key The key.
- * @param {Object} cfg (Optional) The configuration options to use for this operation.
- *
- * @return {CipherParams} A cipher params object.
- *
- * @static
- *
- * @example
- *
- * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key);
- * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv });
- * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv, format: CryptoJS.format.OpenSSL });
- */
- encrypt: function encrypt(cipher, message, key, cfg) {
- // Apply config defaults
- cfg = this.cfg.extend(cfg);
- // Encrypt
- var encryptor = cipher.createEncryptor(key, cfg);
- var ciphertext = encryptor.finalize(message);
- // Shortcut
- var cipherCfg = encryptor.cfg;
- // Create and return serializable cipher params
- return CipherParams.create({
- ciphertext: ciphertext,
- key: key,
- iv: cipherCfg.iv,
- algorithm: cipher,
- mode: cipherCfg.mode,
- padding: cipherCfg.padding,
- blockSize: cipher.blockSize,
- formatter: cfg.format });
- },
- /**
- * Decrypts serialized ciphertext.
- *
- * @param {Cipher} cipher The cipher algorithm to use.
- * @param {CipherParams|string} ciphertext The ciphertext to decrypt.
- * @param {WordArray} key The key.
- * @param {Object} cfg (Optional) The configuration options to use for this operation.
- *
- * @return {WordArray} The plaintext.
- *
- * @static
- *
- * @example
- *
- * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, key, { iv: iv, format: CryptoJS.format.OpenSSL });
- * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, key, { iv: iv, format: CryptoJS.format.OpenSSL });
- */
- decrypt: function decrypt(cipher, ciphertext, key, cfg) {
- // Apply config defaults
- cfg = this.cfg.extend(cfg);
- // Convert string to CipherParams
- ciphertext = this._parse(ciphertext, cfg.format);
- // Decrypt
- var plaintext = cipher.createDecryptor(key, cfg).finalize(ciphertext.ciphertext);
- return plaintext;
- },
- /**
- * Converts serialized ciphertext to CipherParams,
- * else assumed CipherParams already and returns ciphertext unchanged.
- *
- * @param {CipherParams|string} ciphertext The ciphertext.
- * @param {Formatter} format The formatting strategy to use to parse serialized ciphertext.
- *
- * @return {CipherParams} The unserialized ciphertext.
- *
- * @static
- *
- * @example
- *
- * var ciphertextParams = CryptoJS.lib.SerializableCipher._parse(ciphertextStringOrParams, format);
- */
- _parse: function _parse(ciphertext, format) {
- if (typeof ciphertext == 'string') {
- return format.parse(ciphertext, this);
- } else {
- return ciphertext;
- }
- } });
- /**
- * Key derivation function namespace.
- */
- var C_kdf = C.kdf = {};
- /**
- * OpenSSL key derivation function.
- */
- var OpenSSLKdf = C_kdf.OpenSSL = {
- /**
- * Derives a key and IV from a password.
- *
- * @param {string} password The password to derive from.
- * @param {number} keySize The size in words of the key to generate.
- * @param {number} ivSize The size in words of the IV to generate.
- * @param {WordArray|string} salt (Optional) A 64-bit salt to use. If omitted, a salt will be generated randomly.
- *
- * @return {CipherParams} A cipher params object with the key, IV, and salt.
- *
- * @static
- *
- * @example
- *
- * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32);
- * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt');
- */
- execute: function execute(password, keySize, ivSize, salt) {
- // Generate random salt
- if (!salt) {
- salt = WordArray.random(64 / 8);
- }
- // Derive key and IV
- var key = EvpKDF.create({ keySize: keySize + ivSize }).compute(password, salt);
- // Separate key and IV
- var iv = WordArray.create(key.words.slice(keySize), ivSize * 4);
- key.sigBytes = keySize * 4;
- // Return params
- return CipherParams.create({ key: key, iv: iv, salt: salt });
- } };
- /**
- * A serializable cipher wrapper that derives the key from a password,
- * and returns ciphertext as a serializable cipher params object.
- */
- var PasswordBasedCipher = C_lib.PasswordBasedCipher = SerializableCipher.extend({
- /**
- * Configuration options.
- *
- * @property {KDF} kdf The key derivation function to use to generate a key and IV from a password. Default: OpenSSL
- */
- cfg: SerializableCipher.cfg.extend({
- kdf: OpenSSLKdf }),
- /**
- * Encrypts a message using a password.
- *
- * @param {Cipher} cipher The cipher algorithm to use.
- * @param {WordArray|string} message The message to encrypt.
- * @param {string} password The password.
- * @param {Object} cfg (Optional) The configuration options to use for this operation.
- *
- * @return {CipherParams} A cipher params object.
- *
- * @static
- *
- * @example
- *
- * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password');
- * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password', { format: CryptoJS.format.OpenSSL });
- */
- encrypt: function encrypt(cipher, message, password, cfg) {
- // Apply config defaults
- cfg = this.cfg.extend(cfg);
- // Derive key and other params
- var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize);
- // Add IV to config
- cfg.iv = derivedParams.iv;
- // Encrypt
- var ciphertext = SerializableCipher.encrypt.call(this, cipher, message, derivedParams.key, cfg);
- // Mix in derived params
- ciphertext.mixIn(derivedParams);
- return ciphertext;
- },
- /**
- * Decrypts serialized ciphertext using a password.
- *
- * @param {Cipher} cipher The cipher algorithm to use.
- * @param {CipherParams|string} ciphertext The ciphertext to decrypt.
- * @param {string} password The password.
- * @param {Object} cfg (Optional) The configuration options to use for this operation.
- *
- * @return {WordArray} The plaintext.
- *
- * @static
- *
- * @example
- *
- * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, 'password', { format: CryptoJS.format.OpenSSL });
- * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, 'password', { format: CryptoJS.format.OpenSSL });
- */
- decrypt: function decrypt(cipher, ciphertext, password, cfg) {
- // Apply config defaults
- cfg = this.cfg.extend(cfg);
- // Convert string to CipherParams
- ciphertext = this._parse(ciphertext, cfg.format);
- // Derive key and other params
- var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, ciphertext.salt);
- // Add IV to config
- cfg.iv = derivedParams.iv;
- // Decrypt
- var plaintext = SerializableCipher.decrypt.call(this, cipher, ciphertext, derivedParams.key, cfg);
- return plaintext;
- } });
- }();
- });
- /***/ }),
- /* 230 */
- /*!*****************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/crypto-js/mode-cfb.js ***!
- \*****************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- ;(function (root, factory, undef) {
- if (true) {
- // CommonJS
- module.exports = exports = factory(__webpack_require__(/*! ./core */ 211), __webpack_require__(/*! ./cipher-core */ 229));
- } else
- {}
- })(this, function (CryptoJS) {
- /**
- * Cipher Feedback block mode.
- */
- CryptoJS.mode.CFB = function () {
- var CFB = CryptoJS.lib.BlockCipherMode.extend();
- CFB.Encryptor = CFB.extend({
- processBlock: function processBlock(words, offset) {
- // Shortcuts
- var cipher = this._cipher;
- var blockSize = cipher.blockSize;
- generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher);
- // Remember this block to use with next block
- this._prevBlock = words.slice(offset, offset + blockSize);
- } });
- CFB.Decryptor = CFB.extend({
- processBlock: function processBlock(words, offset) {
- // Shortcuts
- var cipher = this._cipher;
- var blockSize = cipher.blockSize;
- // Remember this block to use with next block
- var thisBlock = words.slice(offset, offset + blockSize);
- generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher);
- // This block becomes the previous block
- this._prevBlock = thisBlock;
- } });
- function generateKeystreamAndEncrypt(words, offset, blockSize, cipher) {
- var keystream;
- // Shortcut
- var iv = this._iv;
- // Generate keystream
- if (iv) {
- keystream = iv.slice(0);
- // Remove IV for subsequent blocks
- this._iv = undefined;
- } else {
- keystream = this._prevBlock;
- }
- cipher.encryptBlock(keystream, 0);
- // Encrypt
- for (var i = 0; i < blockSize; i++) {
- words[offset + i] ^= keystream[i];
- }
- }
- return CFB;
- }();
- return CryptoJS.mode.CFB;
- });
- /***/ }),
- /* 231 */
- /*!*****************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/crypto-js/mode-ctr.js ***!
- \*****************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- ;(function (root, factory, undef) {
- if (true) {
- // CommonJS
- module.exports = exports = factory(__webpack_require__(/*! ./core */ 211), __webpack_require__(/*! ./cipher-core */ 229));
- } else
- {}
- })(this, function (CryptoJS) {
- /**
- * Counter block mode.
- */
- CryptoJS.mode.CTR = function () {
- var CTR = CryptoJS.lib.BlockCipherMode.extend();
- var Encryptor = CTR.Encryptor = CTR.extend({
- processBlock: function processBlock(words, offset) {
- // Shortcuts
- var cipher = this._cipher;
- var blockSize = cipher.blockSize;
- var iv = this._iv;
- var counter = this._counter;
- // Generate keystream
- if (iv) {
- counter = this._counter = iv.slice(0);
- // Remove IV for subsequent blocks
- this._iv = undefined;
- }
- var keystream = counter.slice(0);
- cipher.encryptBlock(keystream, 0);
- // Increment counter
- counter[blockSize - 1] = counter[blockSize - 1] + 1 | 0;
- // Encrypt
- for (var i = 0; i < blockSize; i++) {
- words[offset + i] ^= keystream[i];
- }
- } });
- CTR.Decryptor = Encryptor;
- return CTR;
- }();
- return CryptoJS.mode.CTR;
- });
- /***/ }),
- /* 232 */
- /*!*************************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/crypto-js/mode-ctr-gladman.js ***!
- \*************************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- ;(function (root, factory, undef) {
- if (true) {
- // CommonJS
- module.exports = exports = factory(__webpack_require__(/*! ./core */ 211), __webpack_require__(/*! ./cipher-core */ 229));
- } else
- {}
- })(this, function (CryptoJS) {
- /** @preserve
- * Counter block mode compatible with Dr Brian Gladman fileenc.c
- * derived from CryptoJS.mode.CTR
- * Jan Hruby jhruby.web@gmail.com
- */
- CryptoJS.mode.CTRGladman = function () {
- var CTRGladman = CryptoJS.lib.BlockCipherMode.extend();
- function incWord(word)
- {
- if ((word >> 24 & 0xff) === 0xff) {//overflow
- var b1 = word >> 16 & 0xff;
- var b2 = word >> 8 & 0xff;
- var b3 = word & 0xff;
- if (b1 === 0xff) // overflow b1
- {
- b1 = 0;
- if (b2 === 0xff)
- {
- b2 = 0;
- if (b3 === 0xff)
- {
- b3 = 0;
- } else
- {
- ++b3;
- }
- } else
- {
- ++b2;
- }
- } else
- {
- ++b1;
- }
- word = 0;
- word += b1 << 16;
- word += b2 << 8;
- word += b3;
- } else
- {
- word += 0x01 << 24;
- }
- return word;
- }
- function incCounter(counter)
- {
- if ((counter[0] = incWord(counter[0])) === 0)
- {
- // encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8
- counter[1] = incWord(counter[1]);
- }
- return counter;
- }
- var Encryptor = CTRGladman.Encryptor = CTRGladman.extend({
- processBlock: function processBlock(words, offset) {
- // Shortcuts
- var cipher = this._cipher;
- var blockSize = cipher.blockSize;
- var iv = this._iv;
- var counter = this._counter;
- // Generate keystream
- if (iv) {
- counter = this._counter = iv.slice(0);
- // Remove IV for subsequent blocks
- this._iv = undefined;
- }
- incCounter(counter);
- var keystream = counter.slice(0);
- cipher.encryptBlock(keystream, 0);
- // Encrypt
- for (var i = 0; i < blockSize; i++) {
- words[offset + i] ^= keystream[i];
- }
- } });
- CTRGladman.Decryptor = Encryptor;
- return CTRGladman;
- }();
- return CryptoJS.mode.CTRGladman;
- });
- /***/ }),
- /* 233 */
- /*!*****************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/crypto-js/mode-ofb.js ***!
- \*****************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- ;(function (root, factory, undef) {
- if (true) {
- // CommonJS
- module.exports = exports = factory(__webpack_require__(/*! ./core */ 211), __webpack_require__(/*! ./cipher-core */ 229));
- } else
- {}
- })(this, function (CryptoJS) {
- /**
- * Output Feedback block mode.
- */
- CryptoJS.mode.OFB = function () {
- var OFB = CryptoJS.lib.BlockCipherMode.extend();
- var Encryptor = OFB.Encryptor = OFB.extend({
- processBlock: function processBlock(words, offset) {
- // Shortcuts
- var cipher = this._cipher;
- var blockSize = cipher.blockSize;
- var iv = this._iv;
- var keystream = this._keystream;
- // Generate keystream
- if (iv) {
- keystream = this._keystream = iv.slice(0);
- // Remove IV for subsequent blocks
- this._iv = undefined;
- }
- cipher.encryptBlock(keystream, 0);
- // Encrypt
- for (var i = 0; i < blockSize; i++) {
- words[offset + i] ^= keystream[i];
- }
- } });
- OFB.Decryptor = Encryptor;
- return OFB;
- }();
- return CryptoJS.mode.OFB;
- });
- /***/ }),
- /* 234 */
- /*!*****************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/crypto-js/mode-ecb.js ***!
- \*****************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- ;(function (root, factory, undef) {
- if (true) {
- // CommonJS
- module.exports = exports = factory(__webpack_require__(/*! ./core */ 211), __webpack_require__(/*! ./cipher-core */ 229));
- } else
- {}
- })(this, function (CryptoJS) {
- /**
- * Electronic Codebook block mode.
- */
- CryptoJS.mode.ECB = function () {
- var ECB = CryptoJS.lib.BlockCipherMode.extend();
- ECB.Encryptor = ECB.extend({
- processBlock: function processBlock(words, offset) {
- this._cipher.encryptBlock(words, offset);
- } });
- ECB.Decryptor = ECB.extend({
- processBlock: function processBlock(words, offset) {
- this._cipher.decryptBlock(words, offset);
- } });
- return ECB;
- }();
- return CryptoJS.mode.ECB;
- });
- /***/ }),
- /* 235 */
- /*!*********************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/crypto-js/pad-ansix923.js ***!
- \*********************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- ;(function (root, factory, undef) {
- if (true) {
- // CommonJS
- module.exports = exports = factory(__webpack_require__(/*! ./core */ 211), __webpack_require__(/*! ./cipher-core */ 229));
- } else
- {}
- })(this, function (CryptoJS) {
- /**
- * ANSI X.923 padding strategy.
- */
- CryptoJS.pad.AnsiX923 = {
- pad: function pad(data, blockSize) {
- // Shortcuts
- var dataSigBytes = data.sigBytes;
- var blockSizeBytes = blockSize * 4;
- // Count padding bytes
- var nPaddingBytes = blockSizeBytes - dataSigBytes % blockSizeBytes;
- // Compute last byte position
- var lastBytePos = dataSigBytes + nPaddingBytes - 1;
- // Pad
- data.clamp();
- data.words[lastBytePos >>> 2] |= nPaddingBytes << 24 - lastBytePos % 4 * 8;
- data.sigBytes += nPaddingBytes;
- },
- unpad: function unpad(data) {
- // Get number of padding bytes from last byte
- var nPaddingBytes = data.words[data.sigBytes - 1 >>> 2] & 0xff;
- // Remove padding
- data.sigBytes -= nPaddingBytes;
- } };
- return CryptoJS.pad.Ansix923;
- });
- /***/ }),
- /* 236 */
- /*!*********************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/crypto-js/pad-iso10126.js ***!
- \*********************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- ;(function (root, factory, undef) {
- if (true) {
- // CommonJS
- module.exports = exports = factory(__webpack_require__(/*! ./core */ 211), __webpack_require__(/*! ./cipher-core */ 229));
- } else
- {}
- })(this, function (CryptoJS) {
- /**
- * ISO 10126 padding strategy.
- */
- CryptoJS.pad.Iso10126 = {
- pad: function pad(data, blockSize) {
- // Shortcut
- var blockSizeBytes = blockSize * 4;
- // Count padding bytes
- var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes;
- // Pad
- data.concat(CryptoJS.lib.WordArray.random(nPaddingBytes - 1)).
- concat(CryptoJS.lib.WordArray.create([nPaddingBytes << 24], 1));
- },
- unpad: function unpad(data) {
- // Get number of padding bytes from last byte
- var nPaddingBytes = data.words[data.sigBytes - 1 >>> 2] & 0xff;
- // Remove padding
- data.sigBytes -= nPaddingBytes;
- } };
- return CryptoJS.pad.Iso10126;
- });
- /***/ }),
- /* 237 */
- /*!*********************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/crypto-js/pad-iso97971.js ***!
- \*********************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- ;(function (root, factory, undef) {
- if (true) {
- // CommonJS
- module.exports = exports = factory(__webpack_require__(/*! ./core */ 211), __webpack_require__(/*! ./cipher-core */ 229));
- } else
- {}
- })(this, function (CryptoJS) {
- /**
- * ISO/IEC 9797-1 Padding Method 2.
- */
- CryptoJS.pad.Iso97971 = {
- pad: function pad(data, blockSize) {
- // Add 0x80 byte
- data.concat(CryptoJS.lib.WordArray.create([0x80000000], 1));
- // Zero pad the rest
- CryptoJS.pad.ZeroPadding.pad(data, blockSize);
- },
- unpad: function unpad(data) {
- // Remove zero padding
- CryptoJS.pad.ZeroPadding.unpad(data);
- // Remove one more byte -- the 0x80 byte
- data.sigBytes--;
- } };
- return CryptoJS.pad.Iso97971;
- });
- /***/ }),
- /* 238 */
- /*!************************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/crypto-js/pad-zeropadding.js ***!
- \************************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- ;(function (root, factory, undef) {
- if (true) {
- // CommonJS
- module.exports = exports = factory(__webpack_require__(/*! ./core */ 211), __webpack_require__(/*! ./cipher-core */ 229));
- } else
- {}
- })(this, function (CryptoJS) {
- /**
- * Zero padding strategy.
- */
- CryptoJS.pad.ZeroPadding = {
- pad: function pad(data, blockSize) {
- // Shortcut
- var blockSizeBytes = blockSize * 4;
- // Pad
- data.clamp();
- data.sigBytes += blockSizeBytes - (data.sigBytes % blockSizeBytes || blockSizeBytes);
- },
- unpad: function unpad(data) {
- // Shortcut
- var dataWords = data.words;
- // Unpad
- var i = data.sigBytes - 1;
- for (var i = data.sigBytes - 1; i >= 0; i--) {
- if (dataWords[i >>> 2] >>> 24 - i % 4 * 8 & 0xff) {
- data.sigBytes = i + 1;
- break;
- }
- }
- } };
- return CryptoJS.pad.ZeroPadding;
- });
- /***/ }),
- /* 239 */
- /*!**********************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/crypto-js/pad-nopadding.js ***!
- \**********************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- ;(function (root, factory, undef) {
- if (true) {
- // CommonJS
- module.exports = exports = factory(__webpack_require__(/*! ./core */ 211), __webpack_require__(/*! ./cipher-core */ 229));
- } else
- {}
- })(this, function (CryptoJS) {
- /**
- * A noop padding strategy.
- */
- CryptoJS.pad.NoPadding = {
- pad: function pad() {
- },
- unpad: function unpad() {
- } };
- return CryptoJS.pad.NoPadding;
- });
- /***/ }),
- /* 240 */
- /*!*******************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/crypto-js/format-hex.js ***!
- \*******************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- ;(function (root, factory, undef) {
- if (true) {
- // CommonJS
- module.exports = exports = factory(__webpack_require__(/*! ./core */ 211), __webpack_require__(/*! ./cipher-core */ 229));
- } else
- {}
- })(this, function (CryptoJS) {
- (function (undefined) {
- // Shortcuts
- var C = CryptoJS;
- var C_lib = C.lib;
- var CipherParams = C_lib.CipherParams;
- var C_enc = C.enc;
- var Hex = C_enc.Hex;
- var C_format = C.format;
- var HexFormatter = C_format.Hex = {
- /**
- * Converts the ciphertext of a cipher params object to a hexadecimally encoded string.
- *
- * @param {CipherParams} cipherParams The cipher params object.
- *
- * @return {string} The hexadecimally encoded string.
- *
- * @static
- *
- * @example
- *
- * var hexString = CryptoJS.format.Hex.stringify(cipherParams);
- */
- stringify: function stringify(cipherParams) {
- return cipherParams.ciphertext.toString(Hex);
- },
- /**
- * Converts a hexadecimally encoded ciphertext string to a cipher params object.
- *
- * @param {string} input The hexadecimally encoded string.
- *
- * @return {CipherParams} The cipher params object.
- *
- * @static
- *
- * @example
- *
- * var cipherParams = CryptoJS.format.Hex.parse(hexString);
- */
- parse: function parse(input) {
- var ciphertext = Hex.parse(input);
- return CipherParams.create({ ciphertext: ciphertext });
- } };
- })();
- return CryptoJS.format.Hex;
- });
- /***/ }),
- /* 241 */
- /*!************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/crypto-js/aes.js ***!
- \************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- ;(function (root, factory, undef) {
- if (true) {
- // CommonJS
- module.exports = exports = factory(__webpack_require__(/*! ./core */ 211), __webpack_require__(/*! ./enc-base64 */ 216), __webpack_require__(/*! ./md5 */ 218), __webpack_require__(/*! ./evpkdf */ 228), __webpack_require__(/*! ./cipher-core */ 229));
- } else
- {}
- })(this, function (CryptoJS) {
- (function () {
- // Shortcuts
- var C = CryptoJS;
- var C_lib = C.lib;
- var BlockCipher = C_lib.BlockCipher;
- var C_algo = C.algo;
- // Lookup tables
- var SBOX = [];
- var INV_SBOX = [];
- var SUB_MIX_0 = [];
- var SUB_MIX_1 = [];
- var SUB_MIX_2 = [];
- var SUB_MIX_3 = [];
- var INV_SUB_MIX_0 = [];
- var INV_SUB_MIX_1 = [];
- var INV_SUB_MIX_2 = [];
- var INV_SUB_MIX_3 = [];
- // Compute lookup tables
- (function () {
- // Compute double table
- var d = [];
- for (var i = 0; i < 256; i++) {
- if (i < 128) {
- d[i] = i << 1;
- } else {
- d[i] = i << 1 ^ 0x11b;
- }
- }
- // Walk GF(2^8)
- var x = 0;
- var xi = 0;
- for (var i = 0; i < 256; i++) {
- // Compute sbox
- var sx = xi ^ xi << 1 ^ xi << 2 ^ xi << 3 ^ xi << 4;
- sx = sx >>> 8 ^ sx & 0xff ^ 0x63;
- SBOX[x] = sx;
- INV_SBOX[sx] = x;
- // Compute multiplication
- var x2 = d[x];
- var x4 = d[x2];
- var x8 = d[x4];
- // Compute sub bytes, mix columns tables
- var t = d[sx] * 0x101 ^ sx * 0x1010100;
- SUB_MIX_0[x] = t << 24 | t >>> 8;
- SUB_MIX_1[x] = t << 16 | t >>> 16;
- SUB_MIX_2[x] = t << 8 | t >>> 24;
- SUB_MIX_3[x] = t;
- // Compute inv sub bytes, inv mix columns tables
- var t = x8 * 0x1010101 ^ x4 * 0x10001 ^ x2 * 0x101 ^ x * 0x1010100;
- INV_SUB_MIX_0[sx] = t << 24 | t >>> 8;
- INV_SUB_MIX_1[sx] = t << 16 | t >>> 16;
- INV_SUB_MIX_2[sx] = t << 8 | t >>> 24;
- INV_SUB_MIX_3[sx] = t;
- // Compute next counter
- if (!x) {
- x = xi = 1;
- } else {
- x = x2 ^ d[d[d[x8 ^ x2]]];
- xi ^= d[d[xi]];
- }
- }
- })();
- // Precomputed Rcon lookup
- var RCON = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36];
- /**
- * AES block cipher algorithm.
- */
- var AES = C_algo.AES = BlockCipher.extend({
- _doReset: function _doReset() {
- var t;
- // Skip reset of nRounds has been set before and key did not change
- if (this._nRounds && this._keyPriorReset === this._key) {
- return;
- }
- // Shortcuts
- var key = this._keyPriorReset = this._key;
- var keyWords = key.words;
- var keySize = key.sigBytes / 4;
- // Compute number of rounds
- var nRounds = this._nRounds = keySize + 6;
- // Compute number of key schedule rows
- var ksRows = (nRounds + 1) * 4;
- // Compute key schedule
- var keySchedule = this._keySchedule = [];
- for (var ksRow = 0; ksRow < ksRows; ksRow++) {
- if (ksRow < keySize) {
- keySchedule[ksRow] = keyWords[ksRow];
- } else {
- t = keySchedule[ksRow - 1];
- if (!(ksRow % keySize)) {
- // Rot word
- t = t << 8 | t >>> 24;
- // Sub word
- t = SBOX[t >>> 24] << 24 | SBOX[t >>> 16 & 0xff] << 16 | SBOX[t >>> 8 & 0xff] << 8 | SBOX[t & 0xff];
- // Mix Rcon
- t ^= RCON[ksRow / keySize | 0] << 24;
- } else if (keySize > 6 && ksRow % keySize == 4) {
- // Sub word
- t = SBOX[t >>> 24] << 24 | SBOX[t >>> 16 & 0xff] << 16 | SBOX[t >>> 8 & 0xff] << 8 | SBOX[t & 0xff];
- }
- keySchedule[ksRow] = keySchedule[ksRow - keySize] ^ t;
- }
- }
- // Compute inv key schedule
- var invKeySchedule = this._invKeySchedule = [];
- for (var invKsRow = 0; invKsRow < ksRows; invKsRow++) {
- var ksRow = ksRows - invKsRow;
- if (invKsRow % 4) {
- var t = keySchedule[ksRow];
- } else {
- var t = keySchedule[ksRow - 4];
- }
- if (invKsRow < 4 || ksRow <= 4) {
- invKeySchedule[invKsRow] = t;
- } else {
- invKeySchedule[invKsRow] = INV_SUB_MIX_0[SBOX[t >>> 24]] ^ INV_SUB_MIX_1[SBOX[t >>> 16 & 0xff]] ^
- INV_SUB_MIX_2[SBOX[t >>> 8 & 0xff]] ^ INV_SUB_MIX_3[SBOX[t & 0xff]];
- }
- }
- },
- encryptBlock: function encryptBlock(M, offset) {
- this._doCryptBlock(M, offset, this._keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX);
- },
- decryptBlock: function decryptBlock(M, offset) {
- // Swap 2nd and 4th rows
- var t = M[offset + 1];
- M[offset + 1] = M[offset + 3];
- M[offset + 3] = t;
- this._doCryptBlock(M, offset, this._invKeySchedule, INV_SUB_MIX_0, INV_SUB_MIX_1, INV_SUB_MIX_2, INV_SUB_MIX_3, INV_SBOX);
- // Inv swap 2nd and 4th rows
- var t = M[offset + 1];
- M[offset + 1] = M[offset + 3];
- M[offset + 3] = t;
- },
- _doCryptBlock: function _doCryptBlock(M, offset, keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX) {
- // Shortcut
- var nRounds = this._nRounds;
- // Get input, add round key
- var s0 = M[offset] ^ keySchedule[0];
- var s1 = M[offset + 1] ^ keySchedule[1];
- var s2 = M[offset + 2] ^ keySchedule[2];
- var s3 = M[offset + 3] ^ keySchedule[3];
- // Key schedule row counter
- var ksRow = 4;
- // Rounds
- for (var round = 1; round < nRounds; round++) {
- // Shift rows, sub bytes, mix columns, add round key
- var t0 = SUB_MIX_0[s0 >>> 24] ^ SUB_MIX_1[s1 >>> 16 & 0xff] ^ SUB_MIX_2[s2 >>> 8 & 0xff] ^ SUB_MIX_3[s3 & 0xff] ^ keySchedule[ksRow++];
- var t1 = SUB_MIX_0[s1 >>> 24] ^ SUB_MIX_1[s2 >>> 16 & 0xff] ^ SUB_MIX_2[s3 >>> 8 & 0xff] ^ SUB_MIX_3[s0 & 0xff] ^ keySchedule[ksRow++];
- var t2 = SUB_MIX_0[s2 >>> 24] ^ SUB_MIX_1[s3 >>> 16 & 0xff] ^ SUB_MIX_2[s0 >>> 8 & 0xff] ^ SUB_MIX_3[s1 & 0xff] ^ keySchedule[ksRow++];
- var t3 = SUB_MIX_0[s3 >>> 24] ^ SUB_MIX_1[s0 >>> 16 & 0xff] ^ SUB_MIX_2[s1 >>> 8 & 0xff] ^ SUB_MIX_3[s2 & 0xff] ^ keySchedule[ksRow++];
- // Update state
- s0 = t0;
- s1 = t1;
- s2 = t2;
- s3 = t3;
- }
- // Shift rows, sub bytes, add round key
- var t0 = (SBOX[s0 >>> 24] << 24 | SBOX[s1 >>> 16 & 0xff] << 16 | SBOX[s2 >>> 8 & 0xff] << 8 | SBOX[s3 & 0xff]) ^ keySchedule[ksRow++];
- var t1 = (SBOX[s1 >>> 24] << 24 | SBOX[s2 >>> 16 & 0xff] << 16 | SBOX[s3 >>> 8 & 0xff] << 8 | SBOX[s0 & 0xff]) ^ keySchedule[ksRow++];
- var t2 = (SBOX[s2 >>> 24] << 24 | SBOX[s3 >>> 16 & 0xff] << 16 | SBOX[s0 >>> 8 & 0xff] << 8 | SBOX[s1 & 0xff]) ^ keySchedule[ksRow++];
- var t3 = (SBOX[s3 >>> 24] << 24 | SBOX[s0 >>> 16 & 0xff] << 16 | SBOX[s1 >>> 8 & 0xff] << 8 | SBOX[s2 & 0xff]) ^ keySchedule[ksRow++];
- // Set output
- M[offset] = t0;
- M[offset + 1] = t1;
- M[offset + 2] = t2;
- M[offset + 3] = t3;
- },
- keySize: 256 / 32 });
- /**
- * Shortcut functions to the cipher's object interface.
- *
- * @example
- *
- * var ciphertext = CryptoJS.AES.encrypt(message, key, cfg);
- * var plaintext = CryptoJS.AES.decrypt(ciphertext, key, cfg);
- */
- C.AES = BlockCipher._createHelper(AES);
- })();
- return CryptoJS.AES;
- });
- /***/ }),
- /* 242 */
- /*!******************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/crypto-js/tripledes.js ***!
- \******************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- ;(function (root, factory, undef) {
- if (true) {
- // CommonJS
- module.exports = exports = factory(__webpack_require__(/*! ./core */ 211), __webpack_require__(/*! ./enc-base64 */ 216), __webpack_require__(/*! ./md5 */ 218), __webpack_require__(/*! ./evpkdf */ 228), __webpack_require__(/*! ./cipher-core */ 229));
- } else
- {}
- })(this, function (CryptoJS) {
- (function () {
- // Shortcuts
- var C = CryptoJS;
- var C_lib = C.lib;
- var WordArray = C_lib.WordArray;
- var BlockCipher = C_lib.BlockCipher;
- var C_algo = C.algo;
- // Permuted Choice 1 constants
- var PC1 = [
- 57, 49, 41, 33, 25, 17, 9, 1,
- 58, 50, 42, 34, 26, 18, 10, 2,
- 59, 51, 43, 35, 27, 19, 11, 3,
- 60, 52, 44, 36, 63, 55, 47, 39,
- 31, 23, 15, 7, 62, 54, 46, 38,
- 30, 22, 14, 6, 61, 53, 45, 37,
- 29, 21, 13, 5, 28, 20, 12, 4];
- // Permuted Choice 2 constants
- var PC2 = [
- 14, 17, 11, 24, 1, 5,
- 3, 28, 15, 6, 21, 10,
- 23, 19, 12, 4, 26, 8,
- 16, 7, 27, 20, 13, 2,
- 41, 52, 31, 37, 47, 55,
- 30, 40, 51, 45, 33, 48,
- 44, 49, 39, 56, 34, 53,
- 46, 42, 50, 36, 29, 32];
- // Cumulative bit shift constants
- var BIT_SHIFTS = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28];
- // SBOXes and round permutation constants
- var SBOX_P = [
- {
- 0x0: 0x808200,
- 0x10000000: 0x8000,
- 0x20000000: 0x808002,
- 0x30000000: 0x2,
- 0x40000000: 0x200,
- 0x50000000: 0x808202,
- 0x60000000: 0x800202,
- 0x70000000: 0x800000,
- 0x80000000: 0x202,
- 0x90000000: 0x800200,
- 0xa0000000: 0x8200,
- 0xb0000000: 0x808000,
- 0xc0000000: 0x8002,
- 0xd0000000: 0x800002,
- 0xe0000000: 0x0,
- 0xf0000000: 0x8202,
- 0x8000000: 0x0,
- 0x18000000: 0x808202,
- 0x28000000: 0x8202,
- 0x38000000: 0x8000,
- 0x48000000: 0x808200,
- 0x58000000: 0x200,
- 0x68000000: 0x808002,
- 0x78000000: 0x2,
- 0x88000000: 0x800200,
- 0x98000000: 0x8200,
- 0xa8000000: 0x808000,
- 0xb8000000: 0x800202,
- 0xc8000000: 0x800002,
- 0xd8000000: 0x8002,
- 0xe8000000: 0x202,
- 0xf8000000: 0x800000,
- 0x1: 0x8000,
- 0x10000001: 0x2,
- 0x20000001: 0x808200,
- 0x30000001: 0x800000,
- 0x40000001: 0x808002,
- 0x50000001: 0x8200,
- 0x60000001: 0x200,
- 0x70000001: 0x800202,
- 0x80000001: 0x808202,
- 0x90000001: 0x808000,
- 0xa0000001: 0x800002,
- 0xb0000001: 0x8202,
- 0xc0000001: 0x202,
- 0xd0000001: 0x800200,
- 0xe0000001: 0x8002,
- 0xf0000001: 0x0,
- 0x8000001: 0x808202,
- 0x18000001: 0x808000,
- 0x28000001: 0x800000,
- 0x38000001: 0x200,
- 0x48000001: 0x8000,
- 0x58000001: 0x800002,
- 0x68000001: 0x2,
- 0x78000001: 0x8202,
- 0x88000001: 0x8002,
- 0x98000001: 0x800202,
- 0xa8000001: 0x202,
- 0xb8000001: 0x808200,
- 0xc8000001: 0x800200,
- 0xd8000001: 0x0,
- 0xe8000001: 0x8200,
- 0xf8000001: 0x808002 },
- {
- 0x0: 0x40084010,
- 0x1000000: 0x4000,
- 0x2000000: 0x80000,
- 0x3000000: 0x40080010,
- 0x4000000: 0x40000010,
- 0x5000000: 0x40084000,
- 0x6000000: 0x40004000,
- 0x7000000: 0x10,
- 0x8000000: 0x84000,
- 0x9000000: 0x40004010,
- 0xa000000: 0x40000000,
- 0xb000000: 0x84010,
- 0xc000000: 0x80010,
- 0xd000000: 0x0,
- 0xe000000: 0x4010,
- 0xf000000: 0x40080000,
- 0x800000: 0x40004000,
- 0x1800000: 0x84010,
- 0x2800000: 0x10,
- 0x3800000: 0x40004010,
- 0x4800000: 0x40084010,
- 0x5800000: 0x40000000,
- 0x6800000: 0x80000,
- 0x7800000: 0x40080010,
- 0x8800000: 0x80010,
- 0x9800000: 0x0,
- 0xa800000: 0x4000,
- 0xb800000: 0x40080000,
- 0xc800000: 0x40000010,
- 0xd800000: 0x84000,
- 0xe800000: 0x40084000,
- 0xf800000: 0x4010,
- 0x10000000: 0x0,
- 0x11000000: 0x40080010,
- 0x12000000: 0x40004010,
- 0x13000000: 0x40084000,
- 0x14000000: 0x40080000,
- 0x15000000: 0x10,
- 0x16000000: 0x84010,
- 0x17000000: 0x4000,
- 0x18000000: 0x4010,
- 0x19000000: 0x80000,
- 0x1a000000: 0x80010,
- 0x1b000000: 0x40000010,
- 0x1c000000: 0x84000,
- 0x1d000000: 0x40004000,
- 0x1e000000: 0x40000000,
- 0x1f000000: 0x40084010,
- 0x10800000: 0x84010,
- 0x11800000: 0x80000,
- 0x12800000: 0x40080000,
- 0x13800000: 0x4000,
- 0x14800000: 0x40004000,
- 0x15800000: 0x40084010,
- 0x16800000: 0x10,
- 0x17800000: 0x40000000,
- 0x18800000: 0x40084000,
- 0x19800000: 0x40000010,
- 0x1a800000: 0x40004010,
- 0x1b800000: 0x80010,
- 0x1c800000: 0x0,
- 0x1d800000: 0x4010,
- 0x1e800000: 0x40080010,
- 0x1f800000: 0x84000 },
- {
- 0x0: 0x104,
- 0x100000: 0x0,
- 0x200000: 0x4000100,
- 0x300000: 0x10104,
- 0x400000: 0x10004,
- 0x500000: 0x4000004,
- 0x600000: 0x4010104,
- 0x700000: 0x4010000,
- 0x800000: 0x4000000,
- 0x900000: 0x4010100,
- 0xa00000: 0x10100,
- 0xb00000: 0x4010004,
- 0xc00000: 0x4000104,
- 0xd00000: 0x10000,
- 0xe00000: 0x4,
- 0xf00000: 0x100,
- 0x80000: 0x4010100,
- 0x180000: 0x4010004,
- 0x280000: 0x0,
- 0x380000: 0x4000100,
- 0x480000: 0x4000004,
- 0x580000: 0x10000,
- 0x680000: 0x10004,
- 0x780000: 0x104,
- 0x880000: 0x4,
- 0x980000: 0x100,
- 0xa80000: 0x4010000,
- 0xb80000: 0x10104,
- 0xc80000: 0x10100,
- 0xd80000: 0x4000104,
- 0xe80000: 0x4010104,
- 0xf80000: 0x4000000,
- 0x1000000: 0x4010100,
- 0x1100000: 0x10004,
- 0x1200000: 0x10000,
- 0x1300000: 0x4000100,
- 0x1400000: 0x100,
- 0x1500000: 0x4010104,
- 0x1600000: 0x4000004,
- 0x1700000: 0x0,
- 0x1800000: 0x4000104,
- 0x1900000: 0x4000000,
- 0x1a00000: 0x4,
- 0x1b00000: 0x10100,
- 0x1c00000: 0x4010000,
- 0x1d00000: 0x104,
- 0x1e00000: 0x10104,
- 0x1f00000: 0x4010004,
- 0x1080000: 0x4000000,
- 0x1180000: 0x104,
- 0x1280000: 0x4010100,
- 0x1380000: 0x0,
- 0x1480000: 0x10004,
- 0x1580000: 0x4000100,
- 0x1680000: 0x100,
- 0x1780000: 0x4010004,
- 0x1880000: 0x10000,
- 0x1980000: 0x4010104,
- 0x1a80000: 0x10104,
- 0x1b80000: 0x4000004,
- 0x1c80000: 0x4000104,
- 0x1d80000: 0x4010000,
- 0x1e80000: 0x4,
- 0x1f80000: 0x10100 },
- {
- 0x0: 0x80401000,
- 0x10000: 0x80001040,
- 0x20000: 0x401040,
- 0x30000: 0x80400000,
- 0x40000: 0x0,
- 0x50000: 0x401000,
- 0x60000: 0x80000040,
- 0x70000: 0x400040,
- 0x80000: 0x80000000,
- 0x90000: 0x400000,
- 0xa0000: 0x40,
- 0xb0000: 0x80001000,
- 0xc0000: 0x80400040,
- 0xd0000: 0x1040,
- 0xe0000: 0x1000,
- 0xf0000: 0x80401040,
- 0x8000: 0x80001040,
- 0x18000: 0x40,
- 0x28000: 0x80400040,
- 0x38000: 0x80001000,
- 0x48000: 0x401000,
- 0x58000: 0x80401040,
- 0x68000: 0x0,
- 0x78000: 0x80400000,
- 0x88000: 0x1000,
- 0x98000: 0x80401000,
- 0xa8000: 0x400000,
- 0xb8000: 0x1040,
- 0xc8000: 0x80000000,
- 0xd8000: 0x400040,
- 0xe8000: 0x401040,
- 0xf8000: 0x80000040,
- 0x100000: 0x400040,
- 0x110000: 0x401000,
- 0x120000: 0x80000040,
- 0x130000: 0x0,
- 0x140000: 0x1040,
- 0x150000: 0x80400040,
- 0x160000: 0x80401000,
- 0x170000: 0x80001040,
- 0x180000: 0x80401040,
- 0x190000: 0x80000000,
- 0x1a0000: 0x80400000,
- 0x1b0000: 0x401040,
- 0x1c0000: 0x80001000,
- 0x1d0000: 0x400000,
- 0x1e0000: 0x40,
- 0x1f0000: 0x1000,
- 0x108000: 0x80400000,
- 0x118000: 0x80401040,
- 0x128000: 0x0,
- 0x138000: 0x401000,
- 0x148000: 0x400040,
- 0x158000: 0x80000000,
- 0x168000: 0x80001040,
- 0x178000: 0x40,
- 0x188000: 0x80000040,
- 0x198000: 0x1000,
- 0x1a8000: 0x80001000,
- 0x1b8000: 0x80400040,
- 0x1c8000: 0x1040,
- 0x1d8000: 0x80401000,
- 0x1e8000: 0x400000,
- 0x1f8000: 0x401040 },
- {
- 0x0: 0x80,
- 0x1000: 0x1040000,
- 0x2000: 0x40000,
- 0x3000: 0x20000000,
- 0x4000: 0x20040080,
- 0x5000: 0x1000080,
- 0x6000: 0x21000080,
- 0x7000: 0x40080,
- 0x8000: 0x1000000,
- 0x9000: 0x20040000,
- 0xa000: 0x20000080,
- 0xb000: 0x21040080,
- 0xc000: 0x21040000,
- 0xd000: 0x0,
- 0xe000: 0x1040080,
- 0xf000: 0x21000000,
- 0x800: 0x1040080,
- 0x1800: 0x21000080,
- 0x2800: 0x80,
- 0x3800: 0x1040000,
- 0x4800: 0x40000,
- 0x5800: 0x20040080,
- 0x6800: 0x21040000,
- 0x7800: 0x20000000,
- 0x8800: 0x20040000,
- 0x9800: 0x0,
- 0xa800: 0x21040080,
- 0xb800: 0x1000080,
- 0xc800: 0x20000080,
- 0xd800: 0x21000000,
- 0xe800: 0x1000000,
- 0xf800: 0x40080,
- 0x10000: 0x40000,
- 0x11000: 0x80,
- 0x12000: 0x20000000,
- 0x13000: 0x21000080,
- 0x14000: 0x1000080,
- 0x15000: 0x21040000,
- 0x16000: 0x20040080,
- 0x17000: 0x1000000,
- 0x18000: 0x21040080,
- 0x19000: 0x21000000,
- 0x1a000: 0x1040000,
- 0x1b000: 0x20040000,
- 0x1c000: 0x40080,
- 0x1d000: 0x20000080,
- 0x1e000: 0x0,
- 0x1f000: 0x1040080,
- 0x10800: 0x21000080,
- 0x11800: 0x1000000,
- 0x12800: 0x1040000,
- 0x13800: 0x20040080,
- 0x14800: 0x20000000,
- 0x15800: 0x1040080,
- 0x16800: 0x80,
- 0x17800: 0x21040000,
- 0x18800: 0x40080,
- 0x19800: 0x21040080,
- 0x1a800: 0x0,
- 0x1b800: 0x21000000,
- 0x1c800: 0x1000080,
- 0x1d800: 0x40000,
- 0x1e800: 0x20040000,
- 0x1f800: 0x20000080 },
- {
- 0x0: 0x10000008,
- 0x100: 0x2000,
- 0x200: 0x10200000,
- 0x300: 0x10202008,
- 0x400: 0x10002000,
- 0x500: 0x200000,
- 0x600: 0x200008,
- 0x700: 0x10000000,
- 0x800: 0x0,
- 0x900: 0x10002008,
- 0xa00: 0x202000,
- 0xb00: 0x8,
- 0xc00: 0x10200008,
- 0xd00: 0x202008,
- 0xe00: 0x2008,
- 0xf00: 0x10202000,
- 0x80: 0x10200000,
- 0x180: 0x10202008,
- 0x280: 0x8,
- 0x380: 0x200000,
- 0x480: 0x202008,
- 0x580: 0x10000008,
- 0x680: 0x10002000,
- 0x780: 0x2008,
- 0x880: 0x200008,
- 0x980: 0x2000,
- 0xa80: 0x10002008,
- 0xb80: 0x10200008,
- 0xc80: 0x0,
- 0xd80: 0x10202000,
- 0xe80: 0x202000,
- 0xf80: 0x10000000,
- 0x1000: 0x10002000,
- 0x1100: 0x10200008,
- 0x1200: 0x10202008,
- 0x1300: 0x2008,
- 0x1400: 0x200000,
- 0x1500: 0x10000000,
- 0x1600: 0x10000008,
- 0x1700: 0x202000,
- 0x1800: 0x202008,
- 0x1900: 0x0,
- 0x1a00: 0x8,
- 0x1b00: 0x10200000,
- 0x1c00: 0x2000,
- 0x1d00: 0x10002008,
- 0x1e00: 0x10202000,
- 0x1f00: 0x200008,
- 0x1080: 0x8,
- 0x1180: 0x202000,
- 0x1280: 0x200000,
- 0x1380: 0x10000008,
- 0x1480: 0x10002000,
- 0x1580: 0x2008,
- 0x1680: 0x10202008,
- 0x1780: 0x10200000,
- 0x1880: 0x10202000,
- 0x1980: 0x10200008,
- 0x1a80: 0x2000,
- 0x1b80: 0x202008,
- 0x1c80: 0x200008,
- 0x1d80: 0x0,
- 0x1e80: 0x10000000,
- 0x1f80: 0x10002008 },
- {
- 0x0: 0x100000,
- 0x10: 0x2000401,
- 0x20: 0x400,
- 0x30: 0x100401,
- 0x40: 0x2100401,
- 0x50: 0x0,
- 0x60: 0x1,
- 0x70: 0x2100001,
- 0x80: 0x2000400,
- 0x90: 0x100001,
- 0xa0: 0x2000001,
- 0xb0: 0x2100400,
- 0xc0: 0x2100000,
- 0xd0: 0x401,
- 0xe0: 0x100400,
- 0xf0: 0x2000000,
- 0x8: 0x2100001,
- 0x18: 0x0,
- 0x28: 0x2000401,
- 0x38: 0x2100400,
- 0x48: 0x100000,
- 0x58: 0x2000001,
- 0x68: 0x2000000,
- 0x78: 0x401,
- 0x88: 0x100401,
- 0x98: 0x2000400,
- 0xa8: 0x2100000,
- 0xb8: 0x100001,
- 0xc8: 0x400,
- 0xd8: 0x2100401,
- 0xe8: 0x1,
- 0xf8: 0x100400,
- 0x100: 0x2000000,
- 0x110: 0x100000,
- 0x120: 0x2000401,
- 0x130: 0x2100001,
- 0x140: 0x100001,
- 0x150: 0x2000400,
- 0x160: 0x2100400,
- 0x170: 0x100401,
- 0x180: 0x401,
- 0x190: 0x2100401,
- 0x1a0: 0x100400,
- 0x1b0: 0x1,
- 0x1c0: 0x0,
- 0x1d0: 0x2100000,
- 0x1e0: 0x2000001,
- 0x1f0: 0x400,
- 0x108: 0x100400,
- 0x118: 0x2000401,
- 0x128: 0x2100001,
- 0x138: 0x1,
- 0x148: 0x2000000,
- 0x158: 0x100000,
- 0x168: 0x401,
- 0x178: 0x2100400,
- 0x188: 0x2000001,
- 0x198: 0x2100000,
- 0x1a8: 0x0,
- 0x1b8: 0x2100401,
- 0x1c8: 0x100401,
- 0x1d8: 0x400,
- 0x1e8: 0x2000400,
- 0x1f8: 0x100001 },
- {
- 0x0: 0x8000820,
- 0x1: 0x20000,
- 0x2: 0x8000000,
- 0x3: 0x20,
- 0x4: 0x20020,
- 0x5: 0x8020820,
- 0x6: 0x8020800,
- 0x7: 0x800,
- 0x8: 0x8020000,
- 0x9: 0x8000800,
- 0xa: 0x20800,
- 0xb: 0x8020020,
- 0xc: 0x820,
- 0xd: 0x0,
- 0xe: 0x8000020,
- 0xf: 0x20820,
- 0x80000000: 0x800,
- 0x80000001: 0x8020820,
- 0x80000002: 0x8000820,
- 0x80000003: 0x8000000,
- 0x80000004: 0x8020000,
- 0x80000005: 0x20800,
- 0x80000006: 0x20820,
- 0x80000007: 0x20,
- 0x80000008: 0x8000020,
- 0x80000009: 0x820,
- 0x8000000a: 0x20020,
- 0x8000000b: 0x8020800,
- 0x8000000c: 0x0,
- 0x8000000d: 0x8020020,
- 0x8000000e: 0x8000800,
- 0x8000000f: 0x20000,
- 0x10: 0x20820,
- 0x11: 0x8020800,
- 0x12: 0x20,
- 0x13: 0x800,
- 0x14: 0x8000800,
- 0x15: 0x8000020,
- 0x16: 0x8020020,
- 0x17: 0x20000,
- 0x18: 0x0,
- 0x19: 0x20020,
- 0x1a: 0x8020000,
- 0x1b: 0x8000820,
- 0x1c: 0x8020820,
- 0x1d: 0x20800,
- 0x1e: 0x820,
- 0x1f: 0x8000000,
- 0x80000010: 0x20000,
- 0x80000011: 0x800,
- 0x80000012: 0x8020020,
- 0x80000013: 0x20820,
- 0x80000014: 0x20,
- 0x80000015: 0x8020000,
- 0x80000016: 0x8000000,
- 0x80000017: 0x8000820,
- 0x80000018: 0x8020820,
- 0x80000019: 0x8000020,
- 0x8000001a: 0x8000800,
- 0x8000001b: 0x0,
- 0x8000001c: 0x20800,
- 0x8000001d: 0x820,
- 0x8000001e: 0x20020,
- 0x8000001f: 0x8020800 }];
- // Masks that select the SBOX input
- var SBOX_MASK = [
- 0xf8000001, 0x1f800000, 0x01f80000, 0x001f8000,
- 0x0001f800, 0x00001f80, 0x000001f8, 0x8000001f];
- /**
- * DES block cipher algorithm.
- */
- var DES = C_algo.DES = BlockCipher.extend({
- _doReset: function _doReset() {
- // Shortcuts
- var key = this._key;
- var keyWords = key.words;
- // Select 56 bits according to PC1
- var keyBits = [];
- for (var i = 0; i < 56; i++) {
- var keyBitPos = PC1[i] - 1;
- keyBits[i] = keyWords[keyBitPos >>> 5] >>> 31 - keyBitPos % 32 & 1;
- }
- // Assemble 16 subkeys
- var subKeys = this._subKeys = [];
- for (var nSubKey = 0; nSubKey < 16; nSubKey++) {
- // Create subkey
- var subKey = subKeys[nSubKey] = [];
- // Shortcut
- var bitShift = BIT_SHIFTS[nSubKey];
- // Select 48 bits according to PC2
- for (var i = 0; i < 24; i++) {
- // Select from the left 28 key bits
- subKey[i / 6 | 0] |= keyBits[(PC2[i] - 1 + bitShift) % 28] << 31 - i % 6;
- // Select from the right 28 key bits
- subKey[4 + (i / 6 | 0)] |= keyBits[28 + (PC2[i + 24] - 1 + bitShift) % 28] << 31 - i % 6;
- }
- // Since each subkey is applied to an expanded 32-bit input,
- // the subkey can be broken into 8 values scaled to 32-bits,
- // which allows the key to be used without expansion
- subKey[0] = subKey[0] << 1 | subKey[0] >>> 31;
- for (var i = 1; i < 7; i++) {
- subKey[i] = subKey[i] >>> (i - 1) * 4 + 3;
- }
- subKey[7] = subKey[7] << 5 | subKey[7] >>> 27;
- }
- // Compute inverse subkeys
- var invSubKeys = this._invSubKeys = [];
- for (var i = 0; i < 16; i++) {
- invSubKeys[i] = subKeys[15 - i];
- }
- },
- encryptBlock: function encryptBlock(M, offset) {
- this._doCryptBlock(M, offset, this._subKeys);
- },
- decryptBlock: function decryptBlock(M, offset) {
- this._doCryptBlock(M, offset, this._invSubKeys);
- },
- _doCryptBlock: function _doCryptBlock(M, offset, subKeys) {
- // Get input
- this._lBlock = M[offset];
- this._rBlock = M[offset + 1];
- // Initial permutation
- exchangeLR.call(this, 4, 0x0f0f0f0f);
- exchangeLR.call(this, 16, 0x0000ffff);
- exchangeRL.call(this, 2, 0x33333333);
- exchangeRL.call(this, 8, 0x00ff00ff);
- exchangeLR.call(this, 1, 0x55555555);
- // Rounds
- for (var round = 0; round < 16; round++) {
- // Shortcuts
- var subKey = subKeys[round];
- var lBlock = this._lBlock;
- var rBlock = this._rBlock;
- // Feistel function
- var f = 0;
- for (var i = 0; i < 8; i++) {
- f |= SBOX_P[i][((rBlock ^ subKey[i]) & SBOX_MASK[i]) >>> 0];
- }
- this._lBlock = rBlock;
- this._rBlock = lBlock ^ f;
- }
- // Undo swap from last round
- var t = this._lBlock;
- this._lBlock = this._rBlock;
- this._rBlock = t;
- // Final permutation
- exchangeLR.call(this, 1, 0x55555555);
- exchangeRL.call(this, 8, 0x00ff00ff);
- exchangeRL.call(this, 2, 0x33333333);
- exchangeLR.call(this, 16, 0x0000ffff);
- exchangeLR.call(this, 4, 0x0f0f0f0f);
- // Set output
- M[offset] = this._lBlock;
- M[offset + 1] = this._rBlock;
- },
- keySize: 64 / 32,
- ivSize: 64 / 32,
- blockSize: 64 / 32 });
- // Swap bits across the left and right words
- function exchangeLR(offset, mask) {
- var t = (this._lBlock >>> offset ^ this._rBlock) & mask;
- this._rBlock ^= t;
- this._lBlock ^= t << offset;
- }
- function exchangeRL(offset, mask) {
- var t = (this._rBlock >>> offset ^ this._lBlock) & mask;
- this._lBlock ^= t;
- this._rBlock ^= t << offset;
- }
- /**
- * Shortcut functions to the cipher's object interface.
- *
- * @example
- *
- * var ciphertext = CryptoJS.DES.encrypt(message, key, cfg);
- * var plaintext = CryptoJS.DES.decrypt(ciphertext, key, cfg);
- */
- C.DES = BlockCipher._createHelper(DES);
- /**
- * Triple-DES block cipher algorithm.
- */
- var TripleDES = C_algo.TripleDES = BlockCipher.extend({
- _doReset: function _doReset() {
- // Shortcuts
- var key = this._key;
- var keyWords = key.words;
- // Make sure the key length is valid (64, 128 or >= 192 bit)
- if (keyWords.length !== 2 && keyWords.length !== 4 && keyWords.length < 6) {
- throw new Error('Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.');
- }
- // Extend the key according to the keying options defined in 3DES standard
- var key1 = keyWords.slice(0, 2);
- var key2 = keyWords.length < 4 ? keyWords.slice(0, 2) : keyWords.slice(2, 4);
- var key3 = keyWords.length < 6 ? keyWords.slice(0, 2) : keyWords.slice(4, 6);
- // Create DES instances
- this._des1 = DES.createEncryptor(WordArray.create(key1));
- this._des2 = DES.createEncryptor(WordArray.create(key2));
- this._des3 = DES.createEncryptor(WordArray.create(key3));
- },
- encryptBlock: function encryptBlock(M, offset) {
- this._des1.encryptBlock(M, offset);
- this._des2.decryptBlock(M, offset);
- this._des3.encryptBlock(M, offset);
- },
- decryptBlock: function decryptBlock(M, offset) {
- this._des3.decryptBlock(M, offset);
- this._des2.encryptBlock(M, offset);
- this._des1.decryptBlock(M, offset);
- },
- keySize: 192 / 32,
- ivSize: 64 / 32,
- blockSize: 64 / 32 });
- /**
- * Shortcut functions to the cipher's object interface.
- *
- * @example
- *
- * var ciphertext = CryptoJS.TripleDES.encrypt(message, key, cfg);
- * var plaintext = CryptoJS.TripleDES.decrypt(ciphertext, key, cfg);
- */
- C.TripleDES = BlockCipher._createHelper(TripleDES);
- })();
- return CryptoJS.TripleDES;
- });
- /***/ }),
- /* 243 */
- /*!************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/crypto-js/rc4.js ***!
- \************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- ;(function (root, factory, undef) {
- if (true) {
- // CommonJS
- module.exports = exports = factory(__webpack_require__(/*! ./core */ 211), __webpack_require__(/*! ./enc-base64 */ 216), __webpack_require__(/*! ./md5 */ 218), __webpack_require__(/*! ./evpkdf */ 228), __webpack_require__(/*! ./cipher-core */ 229));
- } else
- {}
- })(this, function (CryptoJS) {
- (function () {
- // Shortcuts
- var C = CryptoJS;
- var C_lib = C.lib;
- var StreamCipher = C_lib.StreamCipher;
- var C_algo = C.algo;
- /**
- * RC4 stream cipher algorithm.
- */
- var RC4 = C_algo.RC4 = StreamCipher.extend({
- _doReset: function _doReset() {
- // Shortcuts
- var key = this._key;
- var keyWords = key.words;
- var keySigBytes = key.sigBytes;
- // Init sbox
- var S = this._S = [];
- for (var i = 0; i < 256; i++) {
- S[i] = i;
- }
- // Key setup
- for (var i = 0, j = 0; i < 256; i++) {
- var keyByteIndex = i % keySigBytes;
- var keyByte = keyWords[keyByteIndex >>> 2] >>> 24 - keyByteIndex % 4 * 8 & 0xff;
- j = (j + S[i] + keyByte) % 256;
- // Swap
- var t = S[i];
- S[i] = S[j];
- S[j] = t;
- }
- // Counters
- this._i = this._j = 0;
- },
- _doProcessBlock: function _doProcessBlock(M, offset) {
- M[offset] ^= generateKeystreamWord.call(this);
- },
- keySize: 256 / 32,
- ivSize: 0 });
- function generateKeystreamWord() {
- // Shortcuts
- var S = this._S;
- var i = this._i;
- var j = this._j;
- // Generate keystream word
- var keystreamWord = 0;
- for (var n = 0; n < 4; n++) {
- i = (i + 1) % 256;
- j = (j + S[i]) % 256;
- // Swap
- var t = S[i];
- S[i] = S[j];
- S[j] = t;
- keystreamWord |= S[(S[i] + S[j]) % 256] << 24 - n * 8;
- }
- // Update counters
- this._i = i;
- this._j = j;
- return keystreamWord;
- }
- /**
- * Shortcut functions to the cipher's object interface.
- *
- * @example
- *
- * var ciphertext = CryptoJS.RC4.encrypt(message, key, cfg);
- * var plaintext = CryptoJS.RC4.decrypt(ciphertext, key, cfg);
- */
- C.RC4 = StreamCipher._createHelper(RC4);
- /**
- * Modified RC4 stream cipher algorithm.
- */
- var RC4Drop = C_algo.RC4Drop = RC4.extend({
- /**
- * Configuration options.
- *
- * @property {number} drop The number of keystream words to drop. Default 192
- */
- cfg: RC4.cfg.extend({
- drop: 192 }),
- _doReset: function _doReset() {
- RC4._doReset.call(this);
- // Drop
- for (var i = this.cfg.drop; i > 0; i--) {
- generateKeystreamWord.call(this);
- }
- } });
- /**
- * Shortcut functions to the cipher's object interface.
- *
- * @example
- *
- * var ciphertext = CryptoJS.RC4Drop.encrypt(message, key, cfg);
- * var plaintext = CryptoJS.RC4Drop.decrypt(ciphertext, key, cfg);
- */
- C.RC4Drop = StreamCipher._createHelper(RC4Drop);
- })();
- return CryptoJS.RC4;
- });
- /***/ }),
- /* 244 */
- /*!***************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/crypto-js/rabbit.js ***!
- \***************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- ;(function (root, factory, undef) {
- if (true) {
- // CommonJS
- module.exports = exports = factory(__webpack_require__(/*! ./core */ 211), __webpack_require__(/*! ./enc-base64 */ 216), __webpack_require__(/*! ./md5 */ 218), __webpack_require__(/*! ./evpkdf */ 228), __webpack_require__(/*! ./cipher-core */ 229));
- } else
- {}
- })(this, function (CryptoJS) {
- (function () {
- // Shortcuts
- var C = CryptoJS;
- var C_lib = C.lib;
- var StreamCipher = C_lib.StreamCipher;
- var C_algo = C.algo;
- // Reusable objects
- var S = [];
- var C_ = [];
- var G = [];
- /**
- * Rabbit stream cipher algorithm
- */
- var Rabbit = C_algo.Rabbit = StreamCipher.extend({
- _doReset: function _doReset() {
- // Shortcuts
- var K = this._key.words;
- var iv = this.cfg.iv;
- // Swap endian
- for (var i = 0; i < 4; i++) {
- K[i] = (K[i] << 8 | K[i] >>> 24) & 0x00ff00ff |
- (K[i] << 24 | K[i] >>> 8) & 0xff00ff00;
- }
- // Generate initial state values
- var X = this._X = [
- K[0], K[3] << 16 | K[2] >>> 16,
- K[1], K[0] << 16 | K[3] >>> 16,
- K[2], K[1] << 16 | K[0] >>> 16,
- K[3], K[2] << 16 | K[1] >>> 16];
- // Generate initial counter values
- var C = this._C = [
- K[2] << 16 | K[2] >>> 16, K[0] & 0xffff0000 | K[1] & 0x0000ffff,
- K[3] << 16 | K[3] >>> 16, K[1] & 0xffff0000 | K[2] & 0x0000ffff,
- K[0] << 16 | K[0] >>> 16, K[2] & 0xffff0000 | K[3] & 0x0000ffff,
- K[1] << 16 | K[1] >>> 16, K[3] & 0xffff0000 | K[0] & 0x0000ffff];
- // Carry bit
- this._b = 0;
- // Iterate the system four times
- for (var i = 0; i < 4; i++) {
- nextState.call(this);
- }
- // Modify the counters
- for (var i = 0; i < 8; i++) {
- C[i] ^= X[i + 4 & 7];
- }
- // IV setup
- if (iv) {
- // Shortcuts
- var IV = iv.words;
- var IV_0 = IV[0];
- var IV_1 = IV[1];
- // Generate four subvectors
- var i0 = (IV_0 << 8 | IV_0 >>> 24) & 0x00ff00ff | (IV_0 << 24 | IV_0 >>> 8) & 0xff00ff00;
- var i2 = (IV_1 << 8 | IV_1 >>> 24) & 0x00ff00ff | (IV_1 << 24 | IV_1 >>> 8) & 0xff00ff00;
- var i1 = i0 >>> 16 | i2 & 0xffff0000;
- var i3 = i2 << 16 | i0 & 0x0000ffff;
- // Modify counter values
- C[0] ^= i0;
- C[1] ^= i1;
- C[2] ^= i2;
- C[3] ^= i3;
- C[4] ^= i0;
- C[5] ^= i1;
- C[6] ^= i2;
- C[7] ^= i3;
- // Iterate the system four times
- for (var i = 0; i < 4; i++) {
- nextState.call(this);
- }
- }
- },
- _doProcessBlock: function _doProcessBlock(M, offset) {
- // Shortcut
- var X = this._X;
- // Iterate the system
- nextState.call(this);
- // Generate four keystream words
- S[0] = X[0] ^ X[5] >>> 16 ^ X[3] << 16;
- S[1] = X[2] ^ X[7] >>> 16 ^ X[5] << 16;
- S[2] = X[4] ^ X[1] >>> 16 ^ X[7] << 16;
- S[3] = X[6] ^ X[3] >>> 16 ^ X[1] << 16;
- for (var i = 0; i < 4; i++) {
- // Swap endian
- S[i] = (S[i] << 8 | S[i] >>> 24) & 0x00ff00ff |
- (S[i] << 24 | S[i] >>> 8) & 0xff00ff00;
- // Encrypt
- M[offset + i] ^= S[i];
- }
- },
- blockSize: 128 / 32,
- ivSize: 64 / 32 });
- function nextState() {
- // Shortcuts
- var X = this._X;
- var C = this._C;
- // Save old counter values
- for (var i = 0; i < 8; i++) {
- C_[i] = C[i];
- }
- // Calculate new counter values
- C[0] = C[0] + 0x4d34d34d + this._b | 0;
- C[1] = C[1] + 0xd34d34d3 + (C[0] >>> 0 < C_[0] >>> 0 ? 1 : 0) | 0;
- C[2] = C[2] + 0x34d34d34 + (C[1] >>> 0 < C_[1] >>> 0 ? 1 : 0) | 0;
- C[3] = C[3] + 0x4d34d34d + (C[2] >>> 0 < C_[2] >>> 0 ? 1 : 0) | 0;
- C[4] = C[4] + 0xd34d34d3 + (C[3] >>> 0 < C_[3] >>> 0 ? 1 : 0) | 0;
- C[5] = C[5] + 0x34d34d34 + (C[4] >>> 0 < C_[4] >>> 0 ? 1 : 0) | 0;
- C[6] = C[6] + 0x4d34d34d + (C[5] >>> 0 < C_[5] >>> 0 ? 1 : 0) | 0;
- C[7] = C[7] + 0xd34d34d3 + (C[6] >>> 0 < C_[6] >>> 0 ? 1 : 0) | 0;
- this._b = C[7] >>> 0 < C_[7] >>> 0 ? 1 : 0;
- // Calculate the g-values
- for (var i = 0; i < 8; i++) {
- var gx = X[i] + C[i];
- // Construct high and low argument for squaring
- var ga = gx & 0xffff;
- var gb = gx >>> 16;
- // Calculate high and low result of squaring
- var gh = ((ga * ga >>> 17) + ga * gb >>> 15) + gb * gb;
- var gl = ((gx & 0xffff0000) * gx | 0) + ((gx & 0x0000ffff) * gx | 0);
- // High XOR low
- G[i] = gh ^ gl;
- }
- // Calculate new state values
- X[0] = G[0] + (G[7] << 16 | G[7] >>> 16) + (G[6] << 16 | G[6] >>> 16) | 0;
- X[1] = G[1] + (G[0] << 8 | G[0] >>> 24) + G[7] | 0;
- X[2] = G[2] + (G[1] << 16 | G[1] >>> 16) + (G[0] << 16 | G[0] >>> 16) | 0;
- X[3] = G[3] + (G[2] << 8 | G[2] >>> 24) + G[1] | 0;
- X[4] = G[4] + (G[3] << 16 | G[3] >>> 16) + (G[2] << 16 | G[2] >>> 16) | 0;
- X[5] = G[5] + (G[4] << 8 | G[4] >>> 24) + G[3] | 0;
- X[6] = G[6] + (G[5] << 16 | G[5] >>> 16) + (G[4] << 16 | G[4] >>> 16) | 0;
- X[7] = G[7] + (G[6] << 8 | G[6] >>> 24) + G[5] | 0;
- }
- /**
- * Shortcut functions to the cipher's object interface.
- *
- * @example
- *
- * var ciphertext = CryptoJS.Rabbit.encrypt(message, key, cfg);
- * var plaintext = CryptoJS.Rabbit.decrypt(ciphertext, key, cfg);
- */
- C.Rabbit = StreamCipher._createHelper(Rabbit);
- })();
- return CryptoJS.Rabbit;
- });
- /***/ }),
- /* 245 */
- /*!**********************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/crypto-js/rabbit-legacy.js ***!
- \**********************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- ;(function (root, factory, undef) {
- if (true) {
- // CommonJS
- module.exports = exports = factory(__webpack_require__(/*! ./core */ 211), __webpack_require__(/*! ./enc-base64 */ 216), __webpack_require__(/*! ./md5 */ 218), __webpack_require__(/*! ./evpkdf */ 228), __webpack_require__(/*! ./cipher-core */ 229));
- } else
- {}
- })(this, function (CryptoJS) {
- (function () {
- // Shortcuts
- var C = CryptoJS;
- var C_lib = C.lib;
- var StreamCipher = C_lib.StreamCipher;
- var C_algo = C.algo;
- // Reusable objects
- var S = [];
- var C_ = [];
- var G = [];
- /**
- * Rabbit stream cipher algorithm.
- *
- * This is a legacy version that neglected to convert the key to little-endian.
- * This error doesn't affect the cipher's security,
- * but it does affect its compatibility with other implementations.
- */
- var RabbitLegacy = C_algo.RabbitLegacy = StreamCipher.extend({
- _doReset: function _doReset() {
- // Shortcuts
- var K = this._key.words;
- var iv = this.cfg.iv;
- // Generate initial state values
- var X = this._X = [
- K[0], K[3] << 16 | K[2] >>> 16,
- K[1], K[0] << 16 | K[3] >>> 16,
- K[2], K[1] << 16 | K[0] >>> 16,
- K[3], K[2] << 16 | K[1] >>> 16];
- // Generate initial counter values
- var C = this._C = [
- K[2] << 16 | K[2] >>> 16, K[0] & 0xffff0000 | K[1] & 0x0000ffff,
- K[3] << 16 | K[3] >>> 16, K[1] & 0xffff0000 | K[2] & 0x0000ffff,
- K[0] << 16 | K[0] >>> 16, K[2] & 0xffff0000 | K[3] & 0x0000ffff,
- K[1] << 16 | K[1] >>> 16, K[3] & 0xffff0000 | K[0] & 0x0000ffff];
- // Carry bit
- this._b = 0;
- // Iterate the system four times
- for (var i = 0; i < 4; i++) {
- nextState.call(this);
- }
- // Modify the counters
- for (var i = 0; i < 8; i++) {
- C[i] ^= X[i + 4 & 7];
- }
- // IV setup
- if (iv) {
- // Shortcuts
- var IV = iv.words;
- var IV_0 = IV[0];
- var IV_1 = IV[1];
- // Generate four subvectors
- var i0 = (IV_0 << 8 | IV_0 >>> 24) & 0x00ff00ff | (IV_0 << 24 | IV_0 >>> 8) & 0xff00ff00;
- var i2 = (IV_1 << 8 | IV_1 >>> 24) & 0x00ff00ff | (IV_1 << 24 | IV_1 >>> 8) & 0xff00ff00;
- var i1 = i0 >>> 16 | i2 & 0xffff0000;
- var i3 = i2 << 16 | i0 & 0x0000ffff;
- // Modify counter values
- C[0] ^= i0;
- C[1] ^= i1;
- C[2] ^= i2;
- C[3] ^= i3;
- C[4] ^= i0;
- C[5] ^= i1;
- C[6] ^= i2;
- C[7] ^= i3;
- // Iterate the system four times
- for (var i = 0; i < 4; i++) {
- nextState.call(this);
- }
- }
- },
- _doProcessBlock: function _doProcessBlock(M, offset) {
- // Shortcut
- var X = this._X;
- // Iterate the system
- nextState.call(this);
- // Generate four keystream words
- S[0] = X[0] ^ X[5] >>> 16 ^ X[3] << 16;
- S[1] = X[2] ^ X[7] >>> 16 ^ X[5] << 16;
- S[2] = X[4] ^ X[1] >>> 16 ^ X[7] << 16;
- S[3] = X[6] ^ X[3] >>> 16 ^ X[1] << 16;
- for (var i = 0; i < 4; i++) {
- // Swap endian
- S[i] = (S[i] << 8 | S[i] >>> 24) & 0x00ff00ff |
- (S[i] << 24 | S[i] >>> 8) & 0xff00ff00;
- // Encrypt
- M[offset + i] ^= S[i];
- }
- },
- blockSize: 128 / 32,
- ivSize: 64 / 32 });
- function nextState() {
- // Shortcuts
- var X = this._X;
- var C = this._C;
- // Save old counter values
- for (var i = 0; i < 8; i++) {
- C_[i] = C[i];
- }
- // Calculate new counter values
- C[0] = C[0] + 0x4d34d34d + this._b | 0;
- C[1] = C[1] + 0xd34d34d3 + (C[0] >>> 0 < C_[0] >>> 0 ? 1 : 0) | 0;
- C[2] = C[2] + 0x34d34d34 + (C[1] >>> 0 < C_[1] >>> 0 ? 1 : 0) | 0;
- C[3] = C[3] + 0x4d34d34d + (C[2] >>> 0 < C_[2] >>> 0 ? 1 : 0) | 0;
- C[4] = C[4] + 0xd34d34d3 + (C[3] >>> 0 < C_[3] >>> 0 ? 1 : 0) | 0;
- C[5] = C[5] + 0x34d34d34 + (C[4] >>> 0 < C_[4] >>> 0 ? 1 : 0) | 0;
- C[6] = C[6] + 0x4d34d34d + (C[5] >>> 0 < C_[5] >>> 0 ? 1 : 0) | 0;
- C[7] = C[7] + 0xd34d34d3 + (C[6] >>> 0 < C_[6] >>> 0 ? 1 : 0) | 0;
- this._b = C[7] >>> 0 < C_[7] >>> 0 ? 1 : 0;
- // Calculate the g-values
- for (var i = 0; i < 8; i++) {
- var gx = X[i] + C[i];
- // Construct high and low argument for squaring
- var ga = gx & 0xffff;
- var gb = gx >>> 16;
- // Calculate high and low result of squaring
- var gh = ((ga * ga >>> 17) + ga * gb >>> 15) + gb * gb;
- var gl = ((gx & 0xffff0000) * gx | 0) + ((gx & 0x0000ffff) * gx | 0);
- // High XOR low
- G[i] = gh ^ gl;
- }
- // Calculate new state values
- X[0] = G[0] + (G[7] << 16 | G[7] >>> 16) + (G[6] << 16 | G[6] >>> 16) | 0;
- X[1] = G[1] + (G[0] << 8 | G[0] >>> 24) + G[7] | 0;
- X[2] = G[2] + (G[1] << 16 | G[1] >>> 16) + (G[0] << 16 | G[0] >>> 16) | 0;
- X[3] = G[3] + (G[2] << 8 | G[2] >>> 24) + G[1] | 0;
- X[4] = G[4] + (G[3] << 16 | G[3] >>> 16) + (G[2] << 16 | G[2] >>> 16) | 0;
- X[5] = G[5] + (G[4] << 8 | G[4] >>> 24) + G[3] | 0;
- X[6] = G[6] + (G[5] << 16 | G[5] >>> 16) + (G[4] << 16 | G[4] >>> 16) | 0;
- X[7] = G[7] + (G[6] << 8 | G[6] >>> 24) + G[5] | 0;
- }
- /**
- * Shortcut functions to the cipher's object interface.
- *
- * @example
- *
- * var ciphertext = CryptoJS.RabbitLegacy.encrypt(message, key, cfg);
- * var plaintext = CryptoJS.RabbitLegacy.decrypt(ciphertext, key, cfg);
- */
- C.RabbitLegacy = StreamCipher._createHelper(RabbitLegacy);
- })();
- return CryptoJS.RabbitLegacy;
- });
- /***/ }),
- /* 246 */
- /*!*********************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/util/base64.js ***!
- \*********************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- /* WEBPACK VAR INJECTION */(function(global, Buffer) {//
- // THIS FILE IS AUTOMATICALLY GENERATED! DO NOT EDIT BY HAND!
- //
- ;
- (function (global, factory) {
- true ?
- module.exports = factory() :
- undefined;
- })(typeof self !== 'undefined' ? self :
- typeof window !== 'undefined' ? window :
- typeof global !== 'undefined' ? global :
- this, function () {
- 'use strict';
- /**
- * base64.ts
- *
- * Licensed under the BSD 3-Clause License.
- * http://opensource.org/licenses/BSD-3-Clause
- *
- * References:
- * http://en.wikipedia.org/wiki/Base64
- *
- * @author Dan Kogai (https://github.com/dankogai)
- */
- var version = '3.7.2';
- /**
- * @deprecated use lowercase `version`.
- */
- var VERSION = version;
- var _hasatob = typeof atob === 'function';
- var _hasbtoa = typeof btoa === 'function';
- var _hasBuffer = typeof Buffer === 'function';
- var _TD = typeof TextDecoder === 'function' ? new TextDecoder() : undefined;
- var _TE = typeof TextEncoder === 'function' ? new TextEncoder() : undefined;
- var b64ch = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
- var b64chs = Array.prototype.slice.call(b64ch);
- var b64tab = function (a) {
- var tab = {};
- a.forEach(function (c, i) {return tab[c] = i;});
- return tab;
- }(b64chs);
- var b64re = /^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/;
- var _fromCC = String.fromCharCode.bind(String);
- var _U8Afrom = typeof Uint8Array.from === 'function' ?
- Uint8Array.from.bind(Uint8Array) :
- function (it, fn) {
- if (fn === void 0) {fn = function fn(x) {return x;};}
- return new Uint8Array(Array.prototype.slice.call(it, 0).map(fn));
- };
- var _mkUriSafe = function _mkUriSafe(src) {return src.
- replace(/=/g, '').replace(/[+\/]/g, function (m0) {return m0 == '+' ? '-' : '_';});};
- var _tidyB64 = function _tidyB64(s) {return s.replace(/[^A-Za-z0-9\+\/]/g, '');};
- /**
- * polyfill version of `btoa`
- */
- var btoaPolyfill = function btoaPolyfill(bin) {
- // console.log('polyfilled');
- var u32,c0,c1,c2,asc = '';
- var pad = bin.length % 3;
- for (var i = 0; i < bin.length;) {
- if ((c0 = bin.charCodeAt(i++)) > 255 ||
- (c1 = bin.charCodeAt(i++)) > 255 ||
- (c2 = bin.charCodeAt(i++)) > 255)
- throw new TypeError('invalid character found');
- u32 = c0 << 16 | c1 << 8 | c2;
- asc += b64chs[u32 >> 18 & 63] +
- b64chs[u32 >> 12 & 63] +
- b64chs[u32 >> 6 & 63] +
- b64chs[u32 & 63];
- }
- return pad ? asc.slice(0, pad - 3) + "===".substring(pad) : asc;
- };
- /**
- * does what `window.btoa` of web browsers do.
- * @param {String} bin binary string
- * @returns {string} Base64-encoded string
- */
- var _btoa = _hasbtoa ? function (bin) {return btoa(bin);} :
- _hasBuffer ? function (bin) {return Buffer.from(bin, 'binary').toString('base64');} :
- btoaPolyfill;
- var _fromUint8Array = _hasBuffer ?
- function (u8a) {return Buffer.from(u8a).toString('base64');} :
- function (u8a) {
- // cf. https://stackoverflow.com/questions/12710001/how-to-convert-uint8-array-to-base64-encoded-string/12713326#12713326
- var maxargs = 0x1000;
- var strs = [];
- for (var i = 0, l = u8a.length; i < l; i += maxargs) {
- strs.push(_fromCC.apply(null, u8a.subarray(i, i + maxargs)));
- }
- return _btoa(strs.join(''));
- };
- /**
- * converts a Uint8Array to a Base64 string.
- * @param {boolean} [urlsafe] URL-and-filename-safe a la RFC4648 §5
- * @returns {string} Base64 string
- */
- var fromUint8Array = function fromUint8Array(u8a, urlsafe) {
- if (urlsafe === void 0) {urlsafe = false;}
- return urlsafe ? _mkUriSafe(_fromUint8Array(u8a)) : _fromUint8Array(u8a);
- };
- // This trick is found broken https://github.com/dankogai/js-base64/issues/130
- // const utob = (src: string) => unescape(encodeURIComponent(src));
- // reverting good old fationed regexp
- var cb_utob = function cb_utob(c) {
- if (c.length < 2) {
- var cc = c.charCodeAt(0);
- return cc < 0x80 ? c :
- cc < 0x800 ? _fromCC(0xc0 | cc >>> 6) +
- _fromCC(0x80 | cc & 0x3f) :
- _fromCC(0xe0 | cc >>> 12 & 0x0f) +
- _fromCC(0x80 | cc >>> 6 & 0x3f) +
- _fromCC(0x80 | cc & 0x3f);
- } else
- {
- var cc = 0x10000 +
- (c.charCodeAt(0) - 0xD800) * 0x400 + (
- c.charCodeAt(1) - 0xDC00);
- return _fromCC(0xf0 | cc >>> 18 & 0x07) +
- _fromCC(0x80 | cc >>> 12 & 0x3f) +
- _fromCC(0x80 | cc >>> 6 & 0x3f) +
- _fromCC(0x80 | cc & 0x3f);
- }
- };
- var re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g;
- /**
- * @deprecated should have been internal use only.
- * @param {string} src UTF-8 string
- * @returns {string} UTF-16 string
- */
- var utob = function utob(u) {return u.replace(re_utob, cb_utob);};
- //
- var _encode = _hasBuffer ?
- function (s) {return Buffer.from(s, 'utf8').toString('base64');} :
- _TE ?
- function (s) {return _fromUint8Array(_TE.encode(s));} :
- function (s) {return _btoa(utob(s));};
- /**
- * converts a UTF-8-encoded string to a Base64 string.
- * @param {boolean} [urlsafe] if `true` make the result URL-safe
- * @returns {string} Base64 string
- */
- var encode = function encode(src, urlsafe) {
- if (urlsafe === void 0) {urlsafe = false;}
- return urlsafe ?
- _mkUriSafe(_encode(src)) :
- _encode(src);
- };
- /**
- * converts a UTF-8-encoded string to URL-safe Base64 RFC4648 §5.
- * @returns {string} Base64 string
- */
- var encodeURI = function encodeURI(src) {return encode(src, true);};
- // This trick is found broken https://github.com/dankogai/js-base64/issues/130
- // const btou = (src: string) => decodeURIComponent(escape(src));
- // reverting good old fationed regexp
- var re_btou = /[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g;
- var cb_btou = function cb_btou(cccc) {
- switch (cccc.length) {
- case 4:
- var cp = (0x07 & cccc.charCodeAt(0)) << 18 |
- (0x3f & cccc.charCodeAt(1)) << 12 |
- (0x3f & cccc.charCodeAt(2)) << 6 |
- 0x3f & cccc.charCodeAt(3),offset = cp - 0x10000;
- return _fromCC((offset >>> 10) + 0xD800) +
- _fromCC((offset & 0x3FF) + 0xDC00);
- case 3:
- return _fromCC((0x0f & cccc.charCodeAt(0)) << 12 |
- (0x3f & cccc.charCodeAt(1)) << 6 |
- 0x3f & cccc.charCodeAt(2));
- default:
- return _fromCC((0x1f & cccc.charCodeAt(0)) << 6 |
- 0x3f & cccc.charCodeAt(1));}
- };
- /**
- * @deprecated should have been internal use only.
- * @param {string} src UTF-16 string
- * @returns {string} UTF-8 string
- */
- var btou = function btou(b) {return b.replace(re_btou, cb_btou);};
- /**
- * polyfill version of `atob`
- */
- var atobPolyfill = function atobPolyfill(asc) {
- // console.log('polyfilled');
- asc = asc.replace(/\s+/g, '');
- if (!b64re.test(asc))
- throw new TypeError('malformed base64.');
- asc += '=='.slice(2 - (asc.length & 3));
- var u24,bin = '',r1,r2;
- for (var i = 0; i < asc.length;) {
- u24 = b64tab[asc.charAt(i++)] << 18 |
- b64tab[asc.charAt(i++)] << 12 |
- (r1 = b64tab[asc.charAt(i++)]) << 6 | (
- r2 = b64tab[asc.charAt(i++)]);
- bin += r1 === 64 ? _fromCC(u24 >> 16 & 255) :
- r2 === 64 ? _fromCC(u24 >> 16 & 255, u24 >> 8 & 255) :
- _fromCC(u24 >> 16 & 255, u24 >> 8 & 255, u24 & 255);
- }
- return bin;
- };
- /**
- * does what `window.atob` of web browsers do.
- * @param {String} asc Base64-encoded string
- * @returns {string} binary string
- */
- var _atob = _hasatob ? function (asc) {return atob(_tidyB64(asc));} :
- _hasBuffer ? function (asc) {return Buffer.from(asc, 'base64').toString('binary');} :
- atobPolyfill;
- //
- var _toUint8Array = _hasBuffer ?
- function (a) {return _U8Afrom(Buffer.from(a, 'base64'));} :
- function (a) {return _U8Afrom(_atob(a), function (c) {return c.charCodeAt(0);});};
- /**
- * converts a Base64 string to a Uint8Array.
- */
- var toUint8Array = function toUint8Array(a) {return _toUint8Array(_unURI(a));};
- //
- var _decode = _hasBuffer ?
- function (a) {return Buffer.from(a, 'base64').toString('utf8');} :
- _TD ?
- function (a) {return _TD.decode(_toUint8Array(a));} :
- function (a) {return btou(_atob(a));};
- var _unURI = function _unURI(a) {return _tidyB64(a.replace(/[-_]/g, function (m0) {return m0 == '-' ? '+' : '/';}));};
- /**
- * converts a Base64 string to a UTF-8 string.
- * @param {String} src Base64 string. Both normal and URL-safe are supported
- * @returns {string} UTF-8 string
- */
- var decode = function decode(src) {return _decode(_unURI(src));};
- /**
- * check if a value is a valid Base64 string
- * @param {String} src a value to check
- */
- var isValid = function isValid(src) {
- if (typeof src !== 'string')
- return false;
- var s = src.replace(/\s+/g, '').replace(/={0,2}$/, '');
- return !/[^\s0-9a-zA-Z\+/]/.test(s) || !/[^\s0-9a-zA-Z\-_]/.test(s);
- };
- //
- var _noEnum = function _noEnum(v) {
- return {
- value: v, enumerable: false, writable: true, configurable: true };
- };
- /**
- * extend String.prototype with relevant methods
- */
- var extendString = function extendString() {
- var _add = function _add(name, body) {return Object.defineProperty(String.prototype, name, _noEnum(body));};
- _add('fromBase64', function () {return decode(this);});
- _add('toBase64', function (urlsafe) {return encode(this, urlsafe);});
- _add('toBase64URI', function () {return encode(this, true);});
- _add('toBase64URL', function () {return encode(this, true);});
- _add('toUint8Array', function () {return toUint8Array(this);});
- };
- /**
- * extend Uint8Array.prototype with relevant methods
- */
- var extendUint8Array = function extendUint8Array() {
- var _add = function _add(name, body) {return Object.defineProperty(Uint8Array.prototype, name, _noEnum(body));};
- _add('toBase64', function (urlsafe) {return fromUint8Array(this, urlsafe);});
- _add('toBase64URI', function () {return fromUint8Array(this, true);});
- _add('toBase64URL', function () {return fromUint8Array(this, true);});
- };
- /**
- * extend Builtin prototypes with relevant methods
- */
- var extendBuiltins = function extendBuiltins() {
- extendString();
- extendUint8Array();
- };
- var gBase64 = {
- version: version,
- VERSION: VERSION,
- atob: _atob,
- atobPolyfill: atobPolyfill,
- btoa: _btoa,
- btoaPolyfill: btoaPolyfill,
- fromBase64: decode,
- toBase64: encode,
- encode: encode,
- encodeURI: encodeURI,
- encodeURL: encodeURI,
- utob: utob,
- btou: btou,
- decode: decode,
- isValid: isValid,
- fromUint8Array: fromUint8Array,
- toUint8Array: toUint8Array,
- extendString: extendString,
- extendUint8Array: extendUint8Array,
- extendBuiltins: extendBuiltins };
- //
- // export Base64 to the namespace
- //
- // ES5 is yet to have Object.assign() that may make transpilers unhappy.
- // gBase64.Base64 = Object.assign({}, gBase64);
- gBase64.Base64 = {};
- Object.keys(gBase64).forEach(function (k) {return gBase64.Base64[k] = gBase64[k];});
- return gBase64;
- });
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../HBuilderX/plugins/uniapp-cli/node_modules/webpack/buildin/global.js */ 2), __webpack_require__(/*! ./../../../HBuilderX/plugins/uniapp-cli/node_modules/buffer/index.js */ 247).Buffer))
- /***/ }),
- /* 247 */
- /*!**************************************!*\
- !*** ./node_modules/buffer/index.js ***!
- \**************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /* WEBPACK VAR INJECTION */(function(global) {/*!
- * The buffer module from node.js, for the browser.
- *
- * @author Feross Aboukhadijeh <http://feross.org>
- * @license MIT
- */
- /* eslint-disable no-proto */
- var base64 = __webpack_require__(/*! base64-js */ 248)
- var ieee754 = __webpack_require__(/*! ieee754 */ 249)
- var isArray = __webpack_require__(/*! isarray */ 250)
- exports.Buffer = Buffer
- exports.SlowBuffer = SlowBuffer
- exports.INSPECT_MAX_BYTES = 50
- /**
- * If `Buffer.TYPED_ARRAY_SUPPORT`:
- * === true Use Uint8Array implementation (fastest)
- * === false Use Object implementation (most compatible, even IE6)
- *
- * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,
- * Opera 11.6+, iOS 4.2+.
- *
- * Due to various browser bugs, sometimes the Object implementation will be used even
- * when the browser supports typed arrays.
- *
- * Note:
- *
- * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,
- * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.
- *
- * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.
- *
- * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of
- * incorrect length in some situations.
- * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they
- * get the Object implementation, which is slower but behaves correctly.
- */
- Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined
- ? global.TYPED_ARRAY_SUPPORT
- : typedArraySupport()
- /*
- * Export kMaxLength after typed array support is determined.
- */
- exports.kMaxLength = kMaxLength()
- function typedArraySupport () {
- try {
- var arr = new Uint8Array(1)
- arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}
- return arr.foo() === 42 && // typed array instances can be augmented
- typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`
- arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`
- } catch (e) {
- return false
- }
- }
- function kMaxLength () {
- return Buffer.TYPED_ARRAY_SUPPORT
- ? 0x7fffffff
- : 0x3fffffff
- }
- function createBuffer (that, length) {
- if (kMaxLength() < length) {
- throw new RangeError('Invalid typed array length')
- }
- if (Buffer.TYPED_ARRAY_SUPPORT) {
- // Return an augmented `Uint8Array` instance, for best performance
- that = new Uint8Array(length)
- that.__proto__ = Buffer.prototype
- } else {
- // Fallback: Return an object instance of the Buffer class
- if (that === null) {
- that = new Buffer(length)
- }
- that.length = length
- }
- return that
- }
- /**
- * The Buffer constructor returns instances of `Uint8Array` that have their
- * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of
- * `Uint8Array`, so the returned instances will have all the node `Buffer` methods
- * and the `Uint8Array` methods. Square bracket notation works as expected -- it
- * returns a single octet.
- *
- * The `Uint8Array` prototype remains unmodified.
- */
- function Buffer (arg, encodingOrOffset, length) {
- if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {
- return new Buffer(arg, encodingOrOffset, length)
- }
- // Common case.
- if (typeof arg === 'number') {
- if (typeof encodingOrOffset === 'string') {
- throw new Error(
- 'If encoding is specified then the first argument must be a string'
- )
- }
- return allocUnsafe(this, arg)
- }
- return from(this, arg, encodingOrOffset, length)
- }
- Buffer.poolSize = 8192 // not used by this implementation
- // TODO: Legacy, not needed anymore. Remove in next major version.
- Buffer._augment = function (arr) {
- arr.__proto__ = Buffer.prototype
- return arr
- }
- function from (that, value, encodingOrOffset, length) {
- if (typeof value === 'number') {
- throw new TypeError('"value" argument must not be a number')
- }
- if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {
- return fromArrayBuffer(that, value, encodingOrOffset, length)
- }
- if (typeof value === 'string') {
- return fromString(that, value, encodingOrOffset)
- }
- return fromObject(that, value)
- }
- /**
- * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError
- * if value is a number.
- * Buffer.from(str[, encoding])
- * Buffer.from(array)
- * Buffer.from(buffer)
- * Buffer.from(arrayBuffer[, byteOffset[, length]])
- **/
- Buffer.from = function (value, encodingOrOffset, length) {
- return from(null, value, encodingOrOffset, length)
- }
- if (Buffer.TYPED_ARRAY_SUPPORT) {
- Buffer.prototype.__proto__ = Uint8Array.prototype
- Buffer.__proto__ = Uint8Array
- if (typeof Symbol !== 'undefined' && Symbol.species &&
- Buffer[Symbol.species] === Buffer) {
- // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97
- Object.defineProperty(Buffer, Symbol.species, {
- value: null,
- configurable: true
- })
- }
- }
- function assertSize (size) {
- if (typeof size !== 'number') {
- throw new TypeError('"size" argument must be a number')
- } else if (size < 0) {
- throw new RangeError('"size" argument must not be negative')
- }
- }
- function alloc (that, size, fill, encoding) {
- assertSize(size)
- if (size <= 0) {
- return createBuffer(that, size)
- }
- if (fill !== undefined) {
- // Only pay attention to encoding if it's a string. This
- // prevents accidentally sending in a number that would
- // be interpretted as a start offset.
- return typeof encoding === 'string'
- ? createBuffer(that, size).fill(fill, encoding)
- : createBuffer(that, size).fill(fill)
- }
- return createBuffer(that, size)
- }
- /**
- * Creates a new filled Buffer instance.
- * alloc(size[, fill[, encoding]])
- **/
- Buffer.alloc = function (size, fill, encoding) {
- return alloc(null, size, fill, encoding)
- }
- function allocUnsafe (that, size) {
- assertSize(size)
- that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)
- if (!Buffer.TYPED_ARRAY_SUPPORT) {
- for (var i = 0; i < size; ++i) {
- that[i] = 0
- }
- }
- return that
- }
- /**
- * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.
- * */
- Buffer.allocUnsafe = function (size) {
- return allocUnsafe(null, size)
- }
- /**
- * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
- */
- Buffer.allocUnsafeSlow = function (size) {
- return allocUnsafe(null, size)
- }
- function fromString (that, string, encoding) {
- if (typeof encoding !== 'string' || encoding === '') {
- encoding = 'utf8'
- }
- if (!Buffer.isEncoding(encoding)) {
- throw new TypeError('"encoding" must be a valid string encoding')
- }
- var length = byteLength(string, encoding) | 0
- that = createBuffer(that, length)
- var actual = that.write(string, encoding)
- if (actual !== length) {
- // Writing a hex string, for example, that contains invalid characters will
- // cause everything after the first invalid character to be ignored. (e.g.
- // 'abxxcd' will be treated as 'ab')
- that = that.slice(0, actual)
- }
- return that
- }
- function fromArrayLike (that, array) {
- var length = array.length < 0 ? 0 : checked(array.length) | 0
- that = createBuffer(that, length)
- for (var i = 0; i < length; i += 1) {
- that[i] = array[i] & 255
- }
- return that
- }
- function fromArrayBuffer (that, array, byteOffset, length) {
- array.byteLength // this throws if `array` is not a valid ArrayBuffer
- if (byteOffset < 0 || array.byteLength < byteOffset) {
- throw new RangeError('\'offset\' is out of bounds')
- }
- if (array.byteLength < byteOffset + (length || 0)) {
- throw new RangeError('\'length\' is out of bounds')
- }
- if (byteOffset === undefined && length === undefined) {
- array = new Uint8Array(array)
- } else if (length === undefined) {
- array = new Uint8Array(array, byteOffset)
- } else {
- array = new Uint8Array(array, byteOffset, length)
- }
- if (Buffer.TYPED_ARRAY_SUPPORT) {
- // Return an augmented `Uint8Array` instance, for best performance
- that = array
- that.__proto__ = Buffer.prototype
- } else {
- // Fallback: Return an object instance of the Buffer class
- that = fromArrayLike(that, array)
- }
- return that
- }
- function fromObject (that, obj) {
- if (Buffer.isBuffer(obj)) {
- var len = checked(obj.length) | 0
- that = createBuffer(that, len)
- if (that.length === 0) {
- return that
- }
- obj.copy(that, 0, 0, len)
- return that
- }
- if (obj) {
- if ((typeof ArrayBuffer !== 'undefined' &&
- obj.buffer instanceof ArrayBuffer) || 'length' in obj) {
- if (typeof obj.length !== 'number' || isnan(obj.length)) {
- return createBuffer(that, 0)
- }
- return fromArrayLike(that, obj)
- }
- if (obj.type === 'Buffer' && isArray(obj.data)) {
- return fromArrayLike(that, obj.data)
- }
- }
- throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')
- }
- function checked (length) {
- // Note: cannot use `length < kMaxLength()` here because that fails when
- // length is NaN (which is otherwise coerced to zero.)
- if (length >= kMaxLength()) {
- throw new RangeError('Attempt to allocate Buffer larger than maximum ' +
- 'size: 0x' + kMaxLength().toString(16) + ' bytes')
- }
- return length | 0
- }
- function SlowBuffer (length) {
- if (+length != length) { // eslint-disable-line eqeqeq
- length = 0
- }
- return Buffer.alloc(+length)
- }
- Buffer.isBuffer = function isBuffer (b) {
- return !!(b != null && b._isBuffer)
- }
- Buffer.compare = function compare (a, b) {
- if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {
- throw new TypeError('Arguments must be Buffers')
- }
- if (a === b) return 0
- var x = a.length
- var y = b.length
- for (var i = 0, len = Math.min(x, y); i < len; ++i) {
- if (a[i] !== b[i]) {
- x = a[i]
- y = b[i]
- break
- }
- }
- if (x < y) return -1
- if (y < x) return 1
- return 0
- }
- Buffer.isEncoding = function isEncoding (encoding) {
- switch (String(encoding).toLowerCase()) {
- case 'hex':
- case 'utf8':
- case 'utf-8':
- case 'ascii':
- case 'latin1':
- case 'binary':
- case 'base64':
- case 'ucs2':
- case 'ucs-2':
- case 'utf16le':
- case 'utf-16le':
- return true
- default:
- return false
- }
- }
- Buffer.concat = function concat (list, length) {
- if (!isArray(list)) {
- throw new TypeError('"list" argument must be an Array of Buffers')
- }
- if (list.length === 0) {
- return Buffer.alloc(0)
- }
- var i
- if (length === undefined) {
- length = 0
- for (i = 0; i < list.length; ++i) {
- length += list[i].length
- }
- }
- var buffer = Buffer.allocUnsafe(length)
- var pos = 0
- for (i = 0; i < list.length; ++i) {
- var buf = list[i]
- if (!Buffer.isBuffer(buf)) {
- throw new TypeError('"list" argument must be an Array of Buffers')
- }
- buf.copy(buffer, pos)
- pos += buf.length
- }
- return buffer
- }
- function byteLength (string, encoding) {
- if (Buffer.isBuffer(string)) {
- return string.length
- }
- if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&
- (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {
- return string.byteLength
- }
- if (typeof string !== 'string') {
- string = '' + string
- }
- var len = string.length
- if (len === 0) return 0
- // Use a for loop to avoid recursion
- var loweredCase = false
- for (;;) {
- switch (encoding) {
- case 'ascii':
- case 'latin1':
- case 'binary':
- return len
- case 'utf8':
- case 'utf-8':
- case undefined:
- return utf8ToBytes(string).length
- case 'ucs2':
- case 'ucs-2':
- case 'utf16le':
- case 'utf-16le':
- return len * 2
- case 'hex':
- return len >>> 1
- case 'base64':
- return base64ToBytes(string).length
- default:
- if (loweredCase) return utf8ToBytes(string).length // assume utf8
- encoding = ('' + encoding).toLowerCase()
- loweredCase = true
- }
- }
- }
- Buffer.byteLength = byteLength
- function slowToString (encoding, start, end) {
- var loweredCase = false
- // No need to verify that "this.length <= MAX_UINT32" since it's a read-only
- // property of a typed array.
- // This behaves neither like String nor Uint8Array in that we set start/end
- // to their upper/lower bounds if the value passed is out of range.
- // undefined is handled specially as per ECMA-262 6th Edition,
- // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.
- if (start === undefined || start < 0) {
- start = 0
- }
- // Return early if start > this.length. Done here to prevent potential uint32
- // coercion fail below.
- if (start > this.length) {
- return ''
- }
- if (end === undefined || end > this.length) {
- end = this.length
- }
- if (end <= 0) {
- return ''
- }
- // Force coersion to uint32. This will also coerce falsey/NaN values to 0.
- end >>>= 0
- start >>>= 0
- if (end <= start) {
- return ''
- }
- if (!encoding) encoding = 'utf8'
- while (true) {
- switch (encoding) {
- case 'hex':
- return hexSlice(this, start, end)
- case 'utf8':
- case 'utf-8':
- return utf8Slice(this, start, end)
- case 'ascii':
- return asciiSlice(this, start, end)
- case 'latin1':
- case 'binary':
- return latin1Slice(this, start, end)
- case 'base64':
- return base64Slice(this, start, end)
- case 'ucs2':
- case 'ucs-2':
- case 'utf16le':
- case 'utf-16le':
- return utf16leSlice(this, start, end)
- default:
- if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
- encoding = (encoding + '').toLowerCase()
- loweredCase = true
- }
- }
- }
- // The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect
- // Buffer instances.
- Buffer.prototype._isBuffer = true
- function swap (b, n, m) {
- var i = b[n]
- b[n] = b[m]
- b[m] = i
- }
- Buffer.prototype.swap16 = function swap16 () {
- var len = this.length
- if (len % 2 !== 0) {
- throw new RangeError('Buffer size must be a multiple of 16-bits')
- }
- for (var i = 0; i < len; i += 2) {
- swap(this, i, i + 1)
- }
- return this
- }
- Buffer.prototype.swap32 = function swap32 () {
- var len = this.length
- if (len % 4 !== 0) {
- throw new RangeError('Buffer size must be a multiple of 32-bits')
- }
- for (var i = 0; i < len; i += 4) {
- swap(this, i, i + 3)
- swap(this, i + 1, i + 2)
- }
- return this
- }
- Buffer.prototype.swap64 = function swap64 () {
- var len = this.length
- if (len % 8 !== 0) {
- throw new RangeError('Buffer size must be a multiple of 64-bits')
- }
- for (var i = 0; i < len; i += 8) {
- swap(this, i, i + 7)
- swap(this, i + 1, i + 6)
- swap(this, i + 2, i + 5)
- swap(this, i + 3, i + 4)
- }
- return this
- }
- Buffer.prototype.toString = function toString () {
- var length = this.length | 0
- if (length === 0) return ''
- if (arguments.length === 0) return utf8Slice(this, 0, length)
- return slowToString.apply(this, arguments)
- }
- Buffer.prototype.equals = function equals (b) {
- if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')
- if (this === b) return true
- return Buffer.compare(this, b) === 0
- }
- Buffer.prototype.inspect = function inspect () {
- var str = ''
- var max = exports.INSPECT_MAX_BYTES
- if (this.length > 0) {
- str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')
- if (this.length > max) str += ' ... '
- }
- return '<Buffer ' + str + '>'
- }
- Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {
- if (!Buffer.isBuffer(target)) {
- throw new TypeError('Argument must be a Buffer')
- }
- if (start === undefined) {
- start = 0
- }
- if (end === undefined) {
- end = target ? target.length : 0
- }
- if (thisStart === undefined) {
- thisStart = 0
- }
- if (thisEnd === undefined) {
- thisEnd = this.length
- }
- if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
- throw new RangeError('out of range index')
- }
- if (thisStart >= thisEnd && start >= end) {
- return 0
- }
- if (thisStart >= thisEnd) {
- return -1
- }
- if (start >= end) {
- return 1
- }
- start >>>= 0
- end >>>= 0
- thisStart >>>= 0
- thisEnd >>>= 0
- if (this === target) return 0
- var x = thisEnd - thisStart
- var y = end - start
- var len = Math.min(x, y)
- var thisCopy = this.slice(thisStart, thisEnd)
- var targetCopy = target.slice(start, end)
- for (var i = 0; i < len; ++i) {
- if (thisCopy[i] !== targetCopy[i]) {
- x = thisCopy[i]
- y = targetCopy[i]
- break
- }
- }
- if (x < y) return -1
- if (y < x) return 1
- return 0
- }
- // Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,
- // OR the last index of `val` in `buffer` at offset <= `byteOffset`.
- //
- // Arguments:
- // - buffer - a Buffer to search
- // - val - a string, Buffer, or number
- // - byteOffset - an index into `buffer`; will be clamped to an int32
- // - encoding - an optional encoding, relevant is val is a string
- // - dir - true for indexOf, false for lastIndexOf
- function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {
- // Empty buffer means no match
- if (buffer.length === 0) return -1
- // Normalize byteOffset
- if (typeof byteOffset === 'string') {
- encoding = byteOffset
- byteOffset = 0
- } else if (byteOffset > 0x7fffffff) {
- byteOffset = 0x7fffffff
- } else if (byteOffset < -0x80000000) {
- byteOffset = -0x80000000
- }
- byteOffset = +byteOffset // Coerce to Number.
- if (isNaN(byteOffset)) {
- // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer
- byteOffset = dir ? 0 : (buffer.length - 1)
- }
- // Normalize byteOffset: negative offsets start from the end of the buffer
- if (byteOffset < 0) byteOffset = buffer.length + byteOffset
- if (byteOffset >= buffer.length) {
- if (dir) return -1
- else byteOffset = buffer.length - 1
- } else if (byteOffset < 0) {
- if (dir) byteOffset = 0
- else return -1
- }
- // Normalize val
- if (typeof val === 'string') {
- val = Buffer.from(val, encoding)
- }
- // Finally, search either indexOf (if dir is true) or lastIndexOf
- if (Buffer.isBuffer(val)) {
- // Special case: looking for empty string/buffer always fails
- if (val.length === 0) {
- return -1
- }
- return arrayIndexOf(buffer, val, byteOffset, encoding, dir)
- } else if (typeof val === 'number') {
- val = val & 0xFF // Search for a byte value [0-255]
- if (Buffer.TYPED_ARRAY_SUPPORT &&
- typeof Uint8Array.prototype.indexOf === 'function') {
- if (dir) {
- return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)
- } else {
- return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)
- }
- }
- return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)
- }
- throw new TypeError('val must be string, number or Buffer')
- }
- function arrayIndexOf (arr, val, byteOffset, encoding, dir) {
- var indexSize = 1
- var arrLength = arr.length
- var valLength = val.length
- if (encoding !== undefined) {
- encoding = String(encoding).toLowerCase()
- if (encoding === 'ucs2' || encoding === 'ucs-2' ||
- encoding === 'utf16le' || encoding === 'utf-16le') {
- if (arr.length < 2 || val.length < 2) {
- return -1
- }
- indexSize = 2
- arrLength /= 2
- valLength /= 2
- byteOffset /= 2
- }
- }
- function read (buf, i) {
- if (indexSize === 1) {
- return buf[i]
- } else {
- return buf.readUInt16BE(i * indexSize)
- }
- }
- var i
- if (dir) {
- var foundIndex = -1
- for (i = byteOffset; i < arrLength; i++) {
- if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
- if (foundIndex === -1) foundIndex = i
- if (i - foundIndex + 1 === valLength) return foundIndex * indexSize
- } else {
- if (foundIndex !== -1) i -= i - foundIndex
- foundIndex = -1
- }
- }
- } else {
- if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength
- for (i = byteOffset; i >= 0; i--) {
- var found = true
- for (var j = 0; j < valLength; j++) {
- if (read(arr, i + j) !== read(val, j)) {
- found = false
- break
- }
- }
- if (found) return i
- }
- }
- return -1
- }
- Buffer.prototype.includes = function includes (val, byteOffset, encoding) {
- return this.indexOf(val, byteOffset, encoding) !== -1
- }
- Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {
- return bidirectionalIndexOf(this, val, byteOffset, encoding, true)
- }
- Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {
- return bidirectionalIndexOf(this, val, byteOffset, encoding, false)
- }
- function hexWrite (buf, string, offset, length) {
- offset = Number(offset) || 0
- var remaining = buf.length - offset
- if (!length) {
- length = remaining
- } else {
- length = Number(length)
- if (length > remaining) {
- length = remaining
- }
- }
- // must be an even number of digits
- var strLen = string.length
- if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')
- if (length > strLen / 2) {
- length = strLen / 2
- }
- for (var i = 0; i < length; ++i) {
- var parsed = parseInt(string.substr(i * 2, 2), 16)
- if (isNaN(parsed)) return i
- buf[offset + i] = parsed
- }
- return i
- }
- function utf8Write (buf, string, offset, length) {
- return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)
- }
- function asciiWrite (buf, string, offset, length) {
- return blitBuffer(asciiToBytes(string), buf, offset, length)
- }
- function latin1Write (buf, string, offset, length) {
- return asciiWrite(buf, string, offset, length)
- }
- function base64Write (buf, string, offset, length) {
- return blitBuffer(base64ToBytes(string), buf, offset, length)
- }
- function ucs2Write (buf, string, offset, length) {
- return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)
- }
- Buffer.prototype.write = function write (string, offset, length, encoding) {
- // Buffer#write(string)
- if (offset === undefined) {
- encoding = 'utf8'
- length = this.length
- offset = 0
- // Buffer#write(string, encoding)
- } else if (length === undefined && typeof offset === 'string') {
- encoding = offset
- length = this.length
- offset = 0
- // Buffer#write(string, offset[, length][, encoding])
- } else if (isFinite(offset)) {
- offset = offset | 0
- if (isFinite(length)) {
- length = length | 0
- if (encoding === undefined) encoding = 'utf8'
- } else {
- encoding = length
- length = undefined
- }
- // legacy write(string, encoding, offset, length) - remove in v0.13
- } else {
- throw new Error(
- 'Buffer.write(string, encoding, offset[, length]) is no longer supported'
- )
- }
- var remaining = this.length - offset
- if (length === undefined || length > remaining) length = remaining
- if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {
- throw new RangeError('Attempt to write outside buffer bounds')
- }
- if (!encoding) encoding = 'utf8'
- var loweredCase = false
- for (;;) {
- switch (encoding) {
- case 'hex':
- return hexWrite(this, string, offset, length)
- case 'utf8':
- case 'utf-8':
- return utf8Write(this, string, offset, length)
- case 'ascii':
- return asciiWrite(this, string, offset, length)
- case 'latin1':
- case 'binary':
- return latin1Write(this, string, offset, length)
- case 'base64':
- // Warning: maxLength not taken into account in base64Write
- return base64Write(this, string, offset, length)
- case 'ucs2':
- case 'ucs-2':
- case 'utf16le':
- case 'utf-16le':
- return ucs2Write(this, string, offset, length)
- default:
- if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
- encoding = ('' + encoding).toLowerCase()
- loweredCase = true
- }
- }
- }
- Buffer.prototype.toJSON = function toJSON () {
- return {
- type: 'Buffer',
- data: Array.prototype.slice.call(this._arr || this, 0)
- }
- }
- function base64Slice (buf, start, end) {
- if (start === 0 && end === buf.length) {
- return base64.fromByteArray(buf)
- } else {
- return base64.fromByteArray(buf.slice(start, end))
- }
- }
- function utf8Slice (buf, start, end) {
- end = Math.min(buf.length, end)
- var res = []
- var i = start
- while (i < end) {
- var firstByte = buf[i]
- var codePoint = null
- var bytesPerSequence = (firstByte > 0xEF) ? 4
- : (firstByte > 0xDF) ? 3
- : (firstByte > 0xBF) ? 2
- : 1
- if (i + bytesPerSequence <= end) {
- var secondByte, thirdByte, fourthByte, tempCodePoint
- switch (bytesPerSequence) {
- case 1:
- if (firstByte < 0x80) {
- codePoint = firstByte
- }
- break
- case 2:
- secondByte = buf[i + 1]
- if ((secondByte & 0xC0) === 0x80) {
- tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)
- if (tempCodePoint > 0x7F) {
- codePoint = tempCodePoint
- }
- }
- break
- case 3:
- secondByte = buf[i + 1]
- thirdByte = buf[i + 2]
- if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {
- tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)
- if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {
- codePoint = tempCodePoint
- }
- }
- break
- case 4:
- secondByte = buf[i + 1]
- thirdByte = buf[i + 2]
- fourthByte = buf[i + 3]
- if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {
- tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)
- if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {
- codePoint = tempCodePoint
- }
- }
- }
- }
- if (codePoint === null) {
- // we did not generate a valid codePoint so insert a
- // replacement char (U+FFFD) and advance only 1 byte
- codePoint = 0xFFFD
- bytesPerSequence = 1
- } else if (codePoint > 0xFFFF) {
- // encode to utf16 (surrogate pair dance)
- codePoint -= 0x10000
- res.push(codePoint >>> 10 & 0x3FF | 0xD800)
- codePoint = 0xDC00 | codePoint & 0x3FF
- }
- res.push(codePoint)
- i += bytesPerSequence
- }
- return decodeCodePointsArray(res)
- }
- // Based on http://stackoverflow.com/a/22747272/680742, the browser with
- // the lowest limit is Chrome, with 0x10000 args.
- // We go 1 magnitude less, for safety
- var MAX_ARGUMENTS_LENGTH = 0x1000
- function decodeCodePointsArray (codePoints) {
- var len = codePoints.length
- if (len <= MAX_ARGUMENTS_LENGTH) {
- return String.fromCharCode.apply(String, codePoints) // avoid extra slice()
- }
- // Decode in chunks to avoid "call stack size exceeded".
- var res = ''
- var i = 0
- while (i < len) {
- res += String.fromCharCode.apply(
- String,
- codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)
- )
- }
- return res
- }
- function asciiSlice (buf, start, end) {
- var ret = ''
- end = Math.min(buf.length, end)
- for (var i = start; i < end; ++i) {
- ret += String.fromCharCode(buf[i] & 0x7F)
- }
- return ret
- }
- function latin1Slice (buf, start, end) {
- var ret = ''
- end = Math.min(buf.length, end)
- for (var i = start; i < end; ++i) {
- ret += String.fromCharCode(buf[i])
- }
- return ret
- }
- function hexSlice (buf, start, end) {
- var len = buf.length
- if (!start || start < 0) start = 0
- if (!end || end < 0 || end > len) end = len
- var out = ''
- for (var i = start; i < end; ++i) {
- out += toHex(buf[i])
- }
- return out
- }
- function utf16leSlice (buf, start, end) {
- var bytes = buf.slice(start, end)
- var res = ''
- for (var i = 0; i < bytes.length; i += 2) {
- res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)
- }
- return res
- }
- Buffer.prototype.slice = function slice (start, end) {
- var len = this.length
- start = ~~start
- end = end === undefined ? len : ~~end
- if (start < 0) {
- start += len
- if (start < 0) start = 0
- } else if (start > len) {
- start = len
- }
- if (end < 0) {
- end += len
- if (end < 0) end = 0
- } else if (end > len) {
- end = len
- }
- if (end < start) end = start
- var newBuf
- if (Buffer.TYPED_ARRAY_SUPPORT) {
- newBuf = this.subarray(start, end)
- newBuf.__proto__ = Buffer.prototype
- } else {
- var sliceLen = end - start
- newBuf = new Buffer(sliceLen, undefined)
- for (var i = 0; i < sliceLen; ++i) {
- newBuf[i] = this[i + start]
- }
- }
- return newBuf
- }
- /*
- * Need to make sure that buffer isn't trying to write out of bounds.
- */
- function checkOffset (offset, ext, length) {
- if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')
- if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')
- }
- Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {
- offset = offset | 0
- byteLength = byteLength | 0
- if (!noAssert) checkOffset(offset, byteLength, this.length)
- var val = this[offset]
- var mul = 1
- var i = 0
- while (++i < byteLength && (mul *= 0x100)) {
- val += this[offset + i] * mul
- }
- return val
- }
- Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {
- offset = offset | 0
- byteLength = byteLength | 0
- if (!noAssert) {
- checkOffset(offset, byteLength, this.length)
- }
- var val = this[offset + --byteLength]
- var mul = 1
- while (byteLength > 0 && (mul *= 0x100)) {
- val += this[offset + --byteLength] * mul
- }
- return val
- }
- Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {
- if (!noAssert) checkOffset(offset, 1, this.length)
- return this[offset]
- }
- Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {
- if (!noAssert) checkOffset(offset, 2, this.length)
- return this[offset] | (this[offset + 1] << 8)
- }
- Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {
- if (!noAssert) checkOffset(offset, 2, this.length)
- return (this[offset] << 8) | this[offset + 1]
- }
- Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {
- if (!noAssert) checkOffset(offset, 4, this.length)
- return ((this[offset]) |
- (this[offset + 1] << 8) |
- (this[offset + 2] << 16)) +
- (this[offset + 3] * 0x1000000)
- }
- Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {
- if (!noAssert) checkOffset(offset, 4, this.length)
- return (this[offset] * 0x1000000) +
- ((this[offset + 1] << 16) |
- (this[offset + 2] << 8) |
- this[offset + 3])
- }
- Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {
- offset = offset | 0
- byteLength = byteLength | 0
- if (!noAssert) checkOffset(offset, byteLength, this.length)
- var val = this[offset]
- var mul = 1
- var i = 0
- while (++i < byteLength && (mul *= 0x100)) {
- val += this[offset + i] * mul
- }
- mul *= 0x80
- if (val >= mul) val -= Math.pow(2, 8 * byteLength)
- return val
- }
- Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {
- offset = offset | 0
- byteLength = byteLength | 0
- if (!noAssert) checkOffset(offset, byteLength, this.length)
- var i = byteLength
- var mul = 1
- var val = this[offset + --i]
- while (i > 0 && (mul *= 0x100)) {
- val += this[offset + --i] * mul
- }
- mul *= 0x80
- if (val >= mul) val -= Math.pow(2, 8 * byteLength)
- return val
- }
- Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) {
- if (!noAssert) checkOffset(offset, 1, this.length)
- if (!(this[offset] & 0x80)) return (this[offset])
- return ((0xff - this[offset] + 1) * -1)
- }
- Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {
- if (!noAssert) checkOffset(offset, 2, this.length)
- var val = this[offset] | (this[offset + 1] << 8)
- return (val & 0x8000) ? val | 0xFFFF0000 : val
- }
- Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {
- if (!noAssert) checkOffset(offset, 2, this.length)
- var val = this[offset + 1] | (this[offset] << 8)
- return (val & 0x8000) ? val | 0xFFFF0000 : val
- }
- Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {
- if (!noAssert) checkOffset(offset, 4, this.length)
- return (this[offset]) |
- (this[offset + 1] << 8) |
- (this[offset + 2] << 16) |
- (this[offset + 3] << 24)
- }
- Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {
- if (!noAssert) checkOffset(offset, 4, this.length)
- return (this[offset] << 24) |
- (this[offset + 1] << 16) |
- (this[offset + 2] << 8) |
- (this[offset + 3])
- }
- Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {
- if (!noAssert) checkOffset(offset, 4, this.length)
- return ieee754.read(this, offset, true, 23, 4)
- }
- Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {
- if (!noAssert) checkOffset(offset, 4, this.length)
- return ieee754.read(this, offset, false, 23, 4)
- }
- Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {
- if (!noAssert) checkOffset(offset, 8, this.length)
- return ieee754.read(this, offset, true, 52, 8)
- }
- Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {
- if (!noAssert) checkOffset(offset, 8, this.length)
- return ieee754.read(this, offset, false, 52, 8)
- }
- function checkInt (buf, value, offset, ext, max, min) {
- if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance')
- if (value > max || value < min) throw new RangeError('"value" argument is out of bounds')
- if (offset + ext > buf.length) throw new RangeError('Index out of range')
- }
- Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {
- value = +value
- offset = offset | 0
- byteLength = byteLength | 0
- if (!noAssert) {
- var maxBytes = Math.pow(2, 8 * byteLength) - 1
- checkInt(this, value, offset, byteLength, maxBytes, 0)
- }
- var mul = 1
- var i = 0
- this[offset] = value & 0xFF
- while (++i < byteLength && (mul *= 0x100)) {
- this[offset + i] = (value / mul) & 0xFF
- }
- return offset + byteLength
- }
- Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {
- value = +value
- offset = offset | 0
- byteLength = byteLength | 0
- if (!noAssert) {
- var maxBytes = Math.pow(2, 8 * byteLength) - 1
- checkInt(this, value, offset, byteLength, maxBytes, 0)
- }
- var i = byteLength - 1
- var mul = 1
- this[offset + i] = value & 0xFF
- while (--i >= 0 && (mul *= 0x100)) {
- this[offset + i] = (value / mul) & 0xFF
- }
- return offset + byteLength
- }
- Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {
- value = +value
- offset = offset | 0
- if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)
- if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
- this[offset] = (value & 0xff)
- return offset + 1
- }
- function objectWriteUInt16 (buf, value, offset, littleEndian) {
- if (value < 0) value = 0xffff + value + 1
- for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {
- buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>
- (littleEndian ? i : 1 - i) * 8
- }
- }
- Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {
- value = +value
- offset = offset | 0
- if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
- if (Buffer.TYPED_ARRAY_SUPPORT) {
- this[offset] = (value & 0xff)
- this[offset + 1] = (value >>> 8)
- } else {
- objectWriteUInt16(this, value, offset, true)
- }
- return offset + 2
- }
- Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {
- value = +value
- offset = offset | 0
- if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
- if (Buffer.TYPED_ARRAY_SUPPORT) {
- this[offset] = (value >>> 8)
- this[offset + 1] = (value & 0xff)
- } else {
- objectWriteUInt16(this, value, offset, false)
- }
- return offset + 2
- }
- function objectWriteUInt32 (buf, value, offset, littleEndian) {
- if (value < 0) value = 0xffffffff + value + 1
- for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {
- buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff
- }
- }
- Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {
- value = +value
- offset = offset | 0
- if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
- if (Buffer.TYPED_ARRAY_SUPPORT) {
- this[offset + 3] = (value >>> 24)
- this[offset + 2] = (value >>> 16)
- this[offset + 1] = (value >>> 8)
- this[offset] = (value & 0xff)
- } else {
- objectWriteUInt32(this, value, offset, true)
- }
- return offset + 4
- }
- Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {
- value = +value
- offset = offset | 0
- if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
- if (Buffer.TYPED_ARRAY_SUPPORT) {
- this[offset] = (value >>> 24)
- this[offset + 1] = (value >>> 16)
- this[offset + 2] = (value >>> 8)
- this[offset + 3] = (value & 0xff)
- } else {
- objectWriteUInt32(this, value, offset, false)
- }
- return offset + 4
- }
- Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {
- value = +value
- offset = offset | 0
- if (!noAssert) {
- var limit = Math.pow(2, 8 * byteLength - 1)
- checkInt(this, value, offset, byteLength, limit - 1, -limit)
- }
- var i = 0
- var mul = 1
- var sub = 0
- this[offset] = value & 0xFF
- while (++i < byteLength && (mul *= 0x100)) {
- if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {
- sub = 1
- }
- this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
- }
- return offset + byteLength
- }
- Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {
- value = +value
- offset = offset | 0
- if (!noAssert) {
- var limit = Math.pow(2, 8 * byteLength - 1)
- checkInt(this, value, offset, byteLength, limit - 1, -limit)
- }
- var i = byteLength - 1
- var mul = 1
- var sub = 0
- this[offset + i] = value & 0xFF
- while (--i >= 0 && (mul *= 0x100)) {
- if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {
- sub = 1
- }
- this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
- }
- return offset + byteLength
- }
- Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {
- value = +value
- offset = offset | 0
- if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)
- if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
- if (value < 0) value = 0xff + value + 1
- this[offset] = (value & 0xff)
- return offset + 1
- }
- Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {
- value = +value
- offset = offset | 0
- if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
- if (Buffer.TYPED_ARRAY_SUPPORT) {
- this[offset] = (value & 0xff)
- this[offset + 1] = (value >>> 8)
- } else {
- objectWriteUInt16(this, value, offset, true)
- }
- return offset + 2
- }
- Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {
- value = +value
- offset = offset | 0
- if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
- if (Buffer.TYPED_ARRAY_SUPPORT) {
- this[offset] = (value >>> 8)
- this[offset + 1] = (value & 0xff)
- } else {
- objectWriteUInt16(this, value, offset, false)
- }
- return offset + 2
- }
- Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {
- value = +value
- offset = offset | 0
- if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
- if (Buffer.TYPED_ARRAY_SUPPORT) {
- this[offset] = (value & 0xff)
- this[offset + 1] = (value >>> 8)
- this[offset + 2] = (value >>> 16)
- this[offset + 3] = (value >>> 24)
- } else {
- objectWriteUInt32(this, value, offset, true)
- }
- return offset + 4
- }
- Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {
- value = +value
- offset = offset | 0
- if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
- if (value < 0) value = 0xffffffff + value + 1
- if (Buffer.TYPED_ARRAY_SUPPORT) {
- this[offset] = (value >>> 24)
- this[offset + 1] = (value >>> 16)
- this[offset + 2] = (value >>> 8)
- this[offset + 3] = (value & 0xff)
- } else {
- objectWriteUInt32(this, value, offset, false)
- }
- return offset + 4
- }
- function checkIEEE754 (buf, value, offset, ext, max, min) {
- if (offset + ext > buf.length) throw new RangeError('Index out of range')
- if (offset < 0) throw new RangeError('Index out of range')
- }
- function writeFloat (buf, value, offset, littleEndian, noAssert) {
- if (!noAssert) {
- checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)
- }
- ieee754.write(buf, value, offset, littleEndian, 23, 4)
- return offset + 4
- }
- Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {
- return writeFloat(this, value, offset, true, noAssert)
- }
- Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {
- return writeFloat(this, value, offset, false, noAssert)
- }
- function writeDouble (buf, value, offset, littleEndian, noAssert) {
- if (!noAssert) {
- checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)
- }
- ieee754.write(buf, value, offset, littleEndian, 52, 8)
- return offset + 8
- }
- Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {
- return writeDouble(this, value, offset, true, noAssert)
- }
- Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {
- return writeDouble(this, value, offset, false, noAssert)
- }
- // copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
- Buffer.prototype.copy = function copy (target, targetStart, start, end) {
- if (!start) start = 0
- if (!end && end !== 0) end = this.length
- if (targetStart >= target.length) targetStart = target.length
- if (!targetStart) targetStart = 0
- if (end > 0 && end < start) end = start
- // Copy 0 bytes; we're done
- if (end === start) return 0
- if (target.length === 0 || this.length === 0) return 0
- // Fatal error conditions
- if (targetStart < 0) {
- throw new RangeError('targetStart out of bounds')
- }
- if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')
- if (end < 0) throw new RangeError('sourceEnd out of bounds')
- // Are we oob?
- if (end > this.length) end = this.length
- if (target.length - targetStart < end - start) {
- end = target.length - targetStart + start
- }
- var len = end - start
- var i
- if (this === target && start < targetStart && targetStart < end) {
- // descending copy from end
- for (i = len - 1; i >= 0; --i) {
- target[i + targetStart] = this[i + start]
- }
- } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {
- // ascending copy from start
- for (i = 0; i < len; ++i) {
- target[i + targetStart] = this[i + start]
- }
- } else {
- Uint8Array.prototype.set.call(
- target,
- this.subarray(start, start + len),
- targetStart
- )
- }
- return len
- }
- // Usage:
- // buffer.fill(number[, offset[, end]])
- // buffer.fill(buffer[, offset[, end]])
- // buffer.fill(string[, offset[, end]][, encoding])
- Buffer.prototype.fill = function fill (val, start, end, encoding) {
- // Handle string cases:
- if (typeof val === 'string') {
- if (typeof start === 'string') {
- encoding = start
- start = 0
- end = this.length
- } else if (typeof end === 'string') {
- encoding = end
- end = this.length
- }
- if (val.length === 1) {
- var code = val.charCodeAt(0)
- if (code < 256) {
- val = code
- }
- }
- if (encoding !== undefined && typeof encoding !== 'string') {
- throw new TypeError('encoding must be a string')
- }
- if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {
- throw new TypeError('Unknown encoding: ' + encoding)
- }
- } else if (typeof val === 'number') {
- val = val & 255
- }
- // Invalid ranges are not set to a default, so can range check early.
- if (start < 0 || this.length < start || this.length < end) {
- throw new RangeError('Out of range index')
- }
- if (end <= start) {
- return this
- }
- start = start >>> 0
- end = end === undefined ? this.length : end >>> 0
- if (!val) val = 0
- var i
- if (typeof val === 'number') {
- for (i = start; i < end; ++i) {
- this[i] = val
- }
- } else {
- var bytes = Buffer.isBuffer(val)
- ? val
- : utf8ToBytes(new Buffer(val, encoding).toString())
- var len = bytes.length
- for (i = 0; i < end - start; ++i) {
- this[i + start] = bytes[i % len]
- }
- }
- return this
- }
- // HELPER FUNCTIONS
- // ================
- var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g
- function base64clean (str) {
- // Node strips out invalid characters like \n and \t from the string, base64-js does not
- str = stringtrim(str).replace(INVALID_BASE64_RE, '')
- // Node converts strings with length < 2 to ''
- if (str.length < 2) return ''
- // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not
- while (str.length % 4 !== 0) {
- str = str + '='
- }
- return str
- }
- function stringtrim (str) {
- if (str.trim) return str.trim()
- return str.replace(/^\s+|\s+$/g, '')
- }
- function toHex (n) {
- if (n < 16) return '0' + n.toString(16)
- return n.toString(16)
- }
- function utf8ToBytes (string, units) {
- units = units || Infinity
- var codePoint
- var length = string.length
- var leadSurrogate = null
- var bytes = []
- for (var i = 0; i < length; ++i) {
- codePoint = string.charCodeAt(i)
- // is surrogate component
- if (codePoint > 0xD7FF && codePoint < 0xE000) {
- // last char was a lead
- if (!leadSurrogate) {
- // no lead yet
- if (codePoint > 0xDBFF) {
- // unexpected trail
- if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
- continue
- } else if (i + 1 === length) {
- // unpaired lead
- if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
- continue
- }
- // valid lead
- leadSurrogate = codePoint
- continue
- }
- // 2 leads in a row
- if (codePoint < 0xDC00) {
- if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
- leadSurrogate = codePoint
- continue
- }
- // valid surrogate pair
- codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000
- } else if (leadSurrogate) {
- // valid bmp char, but last char was a lead
- if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
- }
- leadSurrogate = null
- // encode utf8
- if (codePoint < 0x80) {
- if ((units -= 1) < 0) break
- bytes.push(codePoint)
- } else if (codePoint < 0x800) {
- if ((units -= 2) < 0) break
- bytes.push(
- codePoint >> 0x6 | 0xC0,
- codePoint & 0x3F | 0x80
- )
- } else if (codePoint < 0x10000) {
- if ((units -= 3) < 0) break
- bytes.push(
- codePoint >> 0xC | 0xE0,
- codePoint >> 0x6 & 0x3F | 0x80,
- codePoint & 0x3F | 0x80
- )
- } else if (codePoint < 0x110000) {
- if ((units -= 4) < 0) break
- bytes.push(
- codePoint >> 0x12 | 0xF0,
- codePoint >> 0xC & 0x3F | 0x80,
- codePoint >> 0x6 & 0x3F | 0x80,
- codePoint & 0x3F | 0x80
- )
- } else {
- throw new Error('Invalid code point')
- }
- }
- return bytes
- }
- function asciiToBytes (str) {
- var byteArray = []
- for (var i = 0; i < str.length; ++i) {
- // Node's code seems to be doing this and not & 0x7F..
- byteArray.push(str.charCodeAt(i) & 0xFF)
- }
- return byteArray
- }
- function utf16leToBytes (str, units) {
- var c, hi, lo
- var byteArray = []
- for (var i = 0; i < str.length; ++i) {
- if ((units -= 2) < 0) break
- c = str.charCodeAt(i)
- hi = c >> 8
- lo = c % 256
- byteArray.push(lo)
- byteArray.push(hi)
- }
- return byteArray
- }
- function base64ToBytes (str) {
- return base64.toByteArray(base64clean(str))
- }
- function blitBuffer (src, dst, offset, length) {
- for (var i = 0; i < length; ++i) {
- if ((i + offset >= dst.length) || (i >= src.length)) break
- dst[i + offset] = src[i]
- }
- return i
- }
- function isnan (val) {
- return val !== val // eslint-disable-line no-self-compare
- }
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ 2)))
- /***/ }),
- /* 248 */
- /*!*****************************************!*\
- !*** ./node_modules/base64-js/index.js ***!
- \*****************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- exports.byteLength = byteLength
- exports.toByteArray = toByteArray
- exports.fromByteArray = fromByteArray
- var lookup = []
- var revLookup = []
- var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array
- var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
- for (var i = 0, len = code.length; i < len; ++i) {
- lookup[i] = code[i]
- revLookup[code.charCodeAt(i)] = i
- }
- // Support decoding URL-safe base64 strings, as Node.js does.
- // See: https://en.wikipedia.org/wiki/Base64#URL_applications
- revLookup['-'.charCodeAt(0)] = 62
- revLookup['_'.charCodeAt(0)] = 63
- function getLens (b64) {
- var len = b64.length
- if (len % 4 > 0) {
- throw new Error('Invalid string. Length must be a multiple of 4')
- }
- // Trim off extra bytes after placeholder bytes are found
- // See: https://github.com/beatgammit/base64-js/issues/42
- var validLen = b64.indexOf('=')
- if (validLen === -1) validLen = len
- var placeHoldersLen = validLen === len
- ? 0
- : 4 - (validLen % 4)
- return [validLen, placeHoldersLen]
- }
- // base64 is 4/3 + up to two characters of the original data
- function byteLength (b64) {
- var lens = getLens(b64)
- var validLen = lens[0]
- var placeHoldersLen = lens[1]
- return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
- }
- function _byteLength (b64, validLen, placeHoldersLen) {
- return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
- }
- function toByteArray (b64) {
- var tmp
- var lens = getLens(b64)
- var validLen = lens[0]
- var placeHoldersLen = lens[1]
- var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))
- var curByte = 0
- // if there are placeholders, only get up to the last complete 4 chars
- var len = placeHoldersLen > 0
- ? validLen - 4
- : validLen
- var i
- for (i = 0; i < len; i += 4) {
- tmp =
- (revLookup[b64.charCodeAt(i)] << 18) |
- (revLookup[b64.charCodeAt(i + 1)] << 12) |
- (revLookup[b64.charCodeAt(i + 2)] << 6) |
- revLookup[b64.charCodeAt(i + 3)]
- arr[curByte++] = (tmp >> 16) & 0xFF
- arr[curByte++] = (tmp >> 8) & 0xFF
- arr[curByte++] = tmp & 0xFF
- }
- if (placeHoldersLen === 2) {
- tmp =
- (revLookup[b64.charCodeAt(i)] << 2) |
- (revLookup[b64.charCodeAt(i + 1)] >> 4)
- arr[curByte++] = tmp & 0xFF
- }
- if (placeHoldersLen === 1) {
- tmp =
- (revLookup[b64.charCodeAt(i)] << 10) |
- (revLookup[b64.charCodeAt(i + 1)] << 4) |
- (revLookup[b64.charCodeAt(i + 2)] >> 2)
- arr[curByte++] = (tmp >> 8) & 0xFF
- arr[curByte++] = tmp & 0xFF
- }
- return arr
- }
- function tripletToBase64 (num) {
- return lookup[num >> 18 & 0x3F] +
- lookup[num >> 12 & 0x3F] +
- lookup[num >> 6 & 0x3F] +
- lookup[num & 0x3F]
- }
- function encodeChunk (uint8, start, end) {
- var tmp
- var output = []
- for (var i = start; i < end; i += 3) {
- tmp =
- ((uint8[i] << 16) & 0xFF0000) +
- ((uint8[i + 1] << 8) & 0xFF00) +
- (uint8[i + 2] & 0xFF)
- output.push(tripletToBase64(tmp))
- }
- return output.join('')
- }
- function fromByteArray (uint8) {
- var tmp
- var len = uint8.length
- var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes
- var parts = []
- var maxChunkLength = 16383 // must be multiple of 3
- // go through the array every three bytes, we'll deal with trailing stuff later
- for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
- parts.push(encodeChunk(
- uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)
- ))
- }
- // pad the end with zeros, but make sure to not forget the extra bytes
- if (extraBytes === 1) {
- tmp = uint8[len - 1]
- parts.push(
- lookup[tmp >> 2] +
- lookup[(tmp << 4) & 0x3F] +
- '=='
- )
- } else if (extraBytes === 2) {
- tmp = (uint8[len - 2] << 8) + uint8[len - 1]
- parts.push(
- lookup[tmp >> 10] +
- lookup[(tmp >> 4) & 0x3F] +
- lookup[(tmp << 2) & 0x3F] +
- '='
- )
- }
- return parts.join('')
- }
- /***/ }),
- /* 249 */
- /*!***************************************!*\
- !*** ./node_modules/ieee754/index.js ***!
- \***************************************/
- /*! no static exports found */
- /***/ (function(module, exports) {
- exports.read = function (buffer, offset, isLE, mLen, nBytes) {
- var e, m
- var eLen = (nBytes * 8) - mLen - 1
- var eMax = (1 << eLen) - 1
- var eBias = eMax >> 1
- var nBits = -7
- var i = isLE ? (nBytes - 1) : 0
- var d = isLE ? -1 : 1
- var s = buffer[offset + i]
- i += d
- e = s & ((1 << (-nBits)) - 1)
- s >>= (-nBits)
- nBits += eLen
- for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}
- m = e & ((1 << (-nBits)) - 1)
- e >>= (-nBits)
- nBits += mLen
- for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}
- if (e === 0) {
- e = 1 - eBias
- } else if (e === eMax) {
- return m ? NaN : ((s ? -1 : 1) * Infinity)
- } else {
- m = m + Math.pow(2, mLen)
- e = e - eBias
- }
- return (s ? -1 : 1) * m * Math.pow(2, e - mLen)
- }
- exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
- var e, m, c
- var eLen = (nBytes * 8) - mLen - 1
- var eMax = (1 << eLen) - 1
- var eBias = eMax >> 1
- var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)
- var i = isLE ? 0 : (nBytes - 1)
- var d = isLE ? 1 : -1
- var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0
- value = Math.abs(value)
- if (isNaN(value) || value === Infinity) {
- m = isNaN(value) ? 1 : 0
- e = eMax
- } else {
- e = Math.floor(Math.log(value) / Math.LN2)
- if (value * (c = Math.pow(2, -e)) < 1) {
- e--
- c *= 2
- }
- if (e + eBias >= 1) {
- value += rt / c
- } else {
- value += rt * Math.pow(2, 1 - eBias)
- }
- if (value * c >= 2) {
- e++
- c /= 2
- }
- if (e + eBias >= eMax) {
- m = 0
- e = eMax
- } else if (e + eBias >= 1) {
- m = ((value * c) - 1) * Math.pow(2, mLen)
- e = e + eBias
- } else {
- m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)
- e = 0
- }
- }
- for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}
- e = (e << mLen) | m
- eLen += mLen
- for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}
- buffer[offset + i - d] |= s * 128
- }
- /***/ }),
- /* 250 */
- /*!***************************************!*\
- !*** ./node_modules/isarray/index.js ***!
- \***************************************/
- /*! no static exports found */
- /***/ (function(module, exports) {
- var toString = {}.toString;
- module.exports = Array.isArray || function (arr) {
- return toString.call(arr) == '[object Array]';
- };
- /***/ }),
- /* 251 */,
- /* 252 */,
- /* 253 */,
- /* 254 */,
- /* 255 */,
- /* 256 */,
- /* 257 */,
- /* 258 */,
- /* 259 */,
- /* 260 */,
- /* 261 */,
- /* 262 */,
- /* 263 */,
- /* 264 */,
- /* 265 */,
- /* 266 */,
- /* 267 */,
- /* 268 */,
- /* 269 */,
- /* 270 */,
- /* 271 */,
- /* 272 */,
- /* 273 */,
- /* 274 */,
- /* 275 */,
- /* 276 */,
- /* 277 */,
- /* 278 */,
- /* 279 */,
- /* 280 */,
- /* 281 */,
- /* 282 */,
- /* 283 */,
- /* 284 */,
- /* 285 */,
- /* 286 */,
- /* 287 */,
- /* 288 */,
- /* 289 */,
- /* 290 */,
- /* 291 */,
- /* 292 */,
- /* 293 */,
- /* 294 */,
- /* 295 */,
- /* 296 */,
- /* 297 */,
- /* 298 */,
- /* 299 */,
- /* 300 */,
- /* 301 */,
- /* 302 */,
- /* 303 */,
- /* 304 */,
- /* 305 */,
- /* 306 */,
- /* 307 */
- /*!**********************************************************!*\
- !*** ./node_modules/@babel/runtime/regenerator/index.js ***!
- \**********************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- module.exports = __webpack_require__(/*! regenerator-runtime */ 308);
- /***/ }),
- /* 308 */
- /*!************************************************************!*\
- !*** ./node_modules/regenerator-runtime/runtime-module.js ***!
- \************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- /**
- * Copyright (c) 2014-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
- // This method of obtaining a reference to the global object needs to be
- // kept identical to the way it is obtained in runtime.js
- var g = (function() {
- return this || (typeof self === "object" && self);
- })() || Function("return this")();
- // Use `getOwnPropertyNames` because not all browsers support calling
- // `hasOwnProperty` on the global `self` object in a worker. See #183.
- var hadRuntime = g.regeneratorRuntime &&
- Object.getOwnPropertyNames(g).indexOf("regeneratorRuntime") >= 0;
- // Save the old regeneratorRuntime in case it needs to be restored later.
- var oldRuntime = hadRuntime && g.regeneratorRuntime;
- // Force reevalutation of runtime.js.
- g.regeneratorRuntime = undefined;
- module.exports = __webpack_require__(/*! ./runtime */ 309);
- if (hadRuntime) {
- // Restore the original runtime.
- g.regeneratorRuntime = oldRuntime;
- } else {
- // Remove the global property added by runtime.js.
- try {
- delete g.regeneratorRuntime;
- } catch(e) {
- g.regeneratorRuntime = undefined;
- }
- }
- /***/ }),
- /* 309 */
- /*!*****************************************************!*\
- !*** ./node_modules/regenerator-runtime/runtime.js ***!
- \*****************************************************/
- /*! no static exports found */
- /***/ (function(module, exports) {
- /**
- * Copyright (c) 2014-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
- !(function(global) {
- "use strict";
- var Op = Object.prototype;
- var hasOwn = Op.hasOwnProperty;
- var undefined; // More compressible than void 0.
- var $Symbol = typeof Symbol === "function" ? Symbol : {};
- var iteratorSymbol = $Symbol.iterator || "@@iterator";
- var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
- var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
- var inModule = typeof module === "object";
- var runtime = global.regeneratorRuntime;
- if (runtime) {
- if (inModule) {
- // If regeneratorRuntime is defined globally and we're in a module,
- // make the exports object identical to regeneratorRuntime.
- module.exports = runtime;
- }
- // Don't bother evaluating the rest of this file if the runtime was
- // already defined globally.
- return;
- }
- // Define the runtime globally (as expected by generated code) as either
- // module.exports (if we're in a module) or a new, empty object.
- runtime = global.regeneratorRuntime = inModule ? module.exports : {};
- function wrap(innerFn, outerFn, self, tryLocsList) {
- // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
- var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
- var generator = Object.create(protoGenerator.prototype);
- var context = new Context(tryLocsList || []);
- // The ._invoke method unifies the implementations of the .next,
- // .throw, and .return methods.
- generator._invoke = makeInvokeMethod(innerFn, self, context);
- return generator;
- }
- runtime.wrap = wrap;
- // Try/catch helper to minimize deoptimizations. Returns a completion
- // record like context.tryEntries[i].completion. This interface could
- // have been (and was previously) designed to take a closure to be
- // invoked without arguments, but in all the cases we care about we
- // already have an existing method we want to call, so there's no need
- // to create a new function object. We can even get away with assuming
- // the method takes exactly one argument, since that happens to be true
- // in every case, so we don't have to touch the arguments object. The
- // only additional allocation required is the completion record, which
- // has a stable shape and so hopefully should be cheap to allocate.
- function tryCatch(fn, obj, arg) {
- try {
- return { type: "normal", arg: fn.call(obj, arg) };
- } catch (err) {
- return { type: "throw", arg: err };
- }
- }
- var GenStateSuspendedStart = "suspendedStart";
- var GenStateSuspendedYield = "suspendedYield";
- var GenStateExecuting = "executing";
- var GenStateCompleted = "completed";
- // Returning this object from the innerFn has the same effect as
- // breaking out of the dispatch switch statement.
- var ContinueSentinel = {};
- // Dummy constructor functions that we use as the .constructor and
- // .constructor.prototype properties for functions that return Generator
- // objects. For full spec compliance, you may wish to configure your
- // minifier not to mangle the names of these two functions.
- function Generator() {}
- function GeneratorFunction() {}
- function GeneratorFunctionPrototype() {}
- // This is a polyfill for %IteratorPrototype% for environments that
- // don't natively support it.
- var IteratorPrototype = {};
- IteratorPrototype[iteratorSymbol] = function () {
- return this;
- };
- var getProto = Object.getPrototypeOf;
- var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
- if (NativeIteratorPrototype &&
- NativeIteratorPrototype !== Op &&
- hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
- // This environment has a native %IteratorPrototype%; use it instead
- // of the polyfill.
- IteratorPrototype = NativeIteratorPrototype;
- }
- var Gp = GeneratorFunctionPrototype.prototype =
- Generator.prototype = Object.create(IteratorPrototype);
- GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
- GeneratorFunctionPrototype.constructor = GeneratorFunction;
- GeneratorFunctionPrototype[toStringTagSymbol] =
- GeneratorFunction.displayName = "GeneratorFunction";
- // Helper for defining the .next, .throw, and .return methods of the
- // Iterator interface in terms of a single ._invoke method.
- function defineIteratorMethods(prototype) {
- ["next", "throw", "return"].forEach(function(method) {
- prototype[method] = function(arg) {
- return this._invoke(method, arg);
- };
- });
- }
- runtime.isGeneratorFunction = function(genFun) {
- var ctor = typeof genFun === "function" && genFun.constructor;
- return ctor
- ? ctor === GeneratorFunction ||
- // For the native GeneratorFunction constructor, the best we can
- // do is to check its .name property.
- (ctor.displayName || ctor.name) === "GeneratorFunction"
- : false;
- };
- runtime.mark = function(genFun) {
- if (Object.setPrototypeOf) {
- Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
- } else {
- genFun.__proto__ = GeneratorFunctionPrototype;
- if (!(toStringTagSymbol in genFun)) {
- genFun[toStringTagSymbol] = "GeneratorFunction";
- }
- }
- genFun.prototype = Object.create(Gp);
- return genFun;
- };
- // Within the body of any async function, `await x` is transformed to
- // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
- // `hasOwn.call(value, "__await")` to determine if the yielded value is
- // meant to be awaited.
- runtime.awrap = function(arg) {
- return { __await: arg };
- };
- function AsyncIterator(generator) {
- function invoke(method, arg, resolve, reject) {
- var record = tryCatch(generator[method], generator, arg);
- if (record.type === "throw") {
- reject(record.arg);
- } else {
- var result = record.arg;
- var value = result.value;
- if (value &&
- typeof value === "object" &&
- hasOwn.call(value, "__await")) {
- return Promise.resolve(value.__await).then(function(value) {
- invoke("next", value, resolve, reject);
- }, function(err) {
- invoke("throw", err, resolve, reject);
- });
- }
- return Promise.resolve(value).then(function(unwrapped) {
- // When a yielded Promise is resolved, its final value becomes
- // the .value of the Promise<{value,done}> result for the
- // current iteration.
- result.value = unwrapped;
- resolve(result);
- }, function(error) {
- // If a rejected Promise was yielded, throw the rejection back
- // into the async generator function so it can be handled there.
- return invoke("throw", error, resolve, reject);
- });
- }
- }
- var previousPromise;
- function enqueue(method, arg) {
- function callInvokeWithMethodAndArg() {
- return new Promise(function(resolve, reject) {
- invoke(method, arg, resolve, reject);
- });
- }
- return previousPromise =
- // If enqueue has been called before, then we want to wait until
- // all previous Promises have been resolved before calling invoke,
- // so that results are always delivered in the correct order. If
- // enqueue has not been called before, then it is important to
- // call invoke immediately, without waiting on a callback to fire,
- // so that the async generator function has the opportunity to do
- // any necessary setup in a predictable way. This predictability
- // is why the Promise constructor synchronously invokes its
- // executor callback, and why async functions synchronously
- // execute code before the first await. Since we implement simple
- // async functions in terms of async generators, it is especially
- // important to get this right, even though it requires care.
- previousPromise ? previousPromise.then(
- callInvokeWithMethodAndArg,
- // Avoid propagating failures to Promises returned by later
- // invocations of the iterator.
- callInvokeWithMethodAndArg
- ) : callInvokeWithMethodAndArg();
- }
- // Define the unified helper method that is used to implement .next,
- // .throw, and .return (see defineIteratorMethods).
- this._invoke = enqueue;
- }
- defineIteratorMethods(AsyncIterator.prototype);
- AsyncIterator.prototype[asyncIteratorSymbol] = function () {
- return this;
- };
- runtime.AsyncIterator = AsyncIterator;
- // Note that simple async functions are implemented on top of
- // AsyncIterator objects; they just return a Promise for the value of
- // the final result produced by the iterator.
- runtime.async = function(innerFn, outerFn, self, tryLocsList) {
- var iter = new AsyncIterator(
- wrap(innerFn, outerFn, self, tryLocsList)
- );
- return runtime.isGeneratorFunction(outerFn)
- ? iter // If outerFn is a generator, return the full iterator.
- : iter.next().then(function(result) {
- return result.done ? result.value : iter.next();
- });
- };
- function makeInvokeMethod(innerFn, self, context) {
- var state = GenStateSuspendedStart;
- return function invoke(method, arg) {
- if (state === GenStateExecuting) {
- throw new Error("Generator is already running");
- }
- if (state === GenStateCompleted) {
- if (method === "throw") {
- throw arg;
- }
- // Be forgiving, per 25.3.3.3.3 of the spec:
- // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
- return doneResult();
- }
- context.method = method;
- context.arg = arg;
- while (true) {
- var delegate = context.delegate;
- if (delegate) {
- var delegateResult = maybeInvokeDelegate(delegate, context);
- if (delegateResult) {
- if (delegateResult === ContinueSentinel) continue;
- return delegateResult;
- }
- }
- if (context.method === "next") {
- // Setting context._sent for legacy support of Babel's
- // function.sent implementation.
- context.sent = context._sent = context.arg;
- } else if (context.method === "throw") {
- if (state === GenStateSuspendedStart) {
- state = GenStateCompleted;
- throw context.arg;
- }
- context.dispatchException(context.arg);
- } else if (context.method === "return") {
- context.abrupt("return", context.arg);
- }
- state = GenStateExecuting;
- var record = tryCatch(innerFn, self, context);
- if (record.type === "normal") {
- // If an exception is thrown from innerFn, we leave state ===
- // GenStateExecuting and loop back for another invocation.
- state = context.done
- ? GenStateCompleted
- : GenStateSuspendedYield;
- if (record.arg === ContinueSentinel) {
- continue;
- }
- return {
- value: record.arg,
- done: context.done
- };
- } else if (record.type === "throw") {
- state = GenStateCompleted;
- // Dispatch the exception by looping back around to the
- // context.dispatchException(context.arg) call above.
- context.method = "throw";
- context.arg = record.arg;
- }
- }
- };
- }
- // Call delegate.iterator[context.method](context.arg) and handle the
- // result, either by returning a { value, done } result from the
- // delegate iterator, or by modifying context.method and context.arg,
- // setting context.delegate to null, and returning the ContinueSentinel.
- function maybeInvokeDelegate(delegate, context) {
- var method = delegate.iterator[context.method];
- if (method === undefined) {
- // A .throw or .return when the delegate iterator has no .throw
- // method always terminates the yield* loop.
- context.delegate = null;
- if (context.method === "throw") {
- if (delegate.iterator.return) {
- // If the delegate iterator has a return method, give it a
- // chance to clean up.
- context.method = "return";
- context.arg = undefined;
- maybeInvokeDelegate(delegate, context);
- if (context.method === "throw") {
- // If maybeInvokeDelegate(context) changed context.method from
- // "return" to "throw", let that override the TypeError below.
- return ContinueSentinel;
- }
- }
- context.method = "throw";
- context.arg = new TypeError(
- "The iterator does not provide a 'throw' method");
- }
- return ContinueSentinel;
- }
- var record = tryCatch(method, delegate.iterator, context.arg);
- if (record.type === "throw") {
- context.method = "throw";
- context.arg = record.arg;
- context.delegate = null;
- return ContinueSentinel;
- }
- var info = record.arg;
- if (! info) {
- context.method = "throw";
- context.arg = new TypeError("iterator result is not an object");
- context.delegate = null;
- return ContinueSentinel;
- }
- if (info.done) {
- // Assign the result of the finished delegate to the temporary
- // variable specified by delegate.resultName (see delegateYield).
- context[delegate.resultName] = info.value;
- // Resume execution at the desired location (see delegateYield).
- context.next = delegate.nextLoc;
- // If context.method was "throw" but the delegate handled the
- // exception, let the outer generator proceed normally. If
- // context.method was "next", forget context.arg since it has been
- // "consumed" by the delegate iterator. If context.method was
- // "return", allow the original .return call to continue in the
- // outer generator.
- if (context.method !== "return") {
- context.method = "next";
- context.arg = undefined;
- }
- } else {
- // Re-yield the result returned by the delegate method.
- return info;
- }
- // The delegate iterator is finished, so forget it and continue with
- // the outer generator.
- context.delegate = null;
- return ContinueSentinel;
- }
- // Define Generator.prototype.{next,throw,return} in terms of the
- // unified ._invoke helper method.
- defineIteratorMethods(Gp);
- Gp[toStringTagSymbol] = "Generator";
- // A Generator should always return itself as the iterator object when the
- // @@iterator function is called on it. Some browsers' implementations of the
- // iterator prototype chain incorrectly implement this, causing the Generator
- // object to not be returned from this call. This ensures that doesn't happen.
- // See https://github.com/facebook/regenerator/issues/274 for more details.
- Gp[iteratorSymbol] = function() {
- return this;
- };
- Gp.toString = function() {
- return "[object Generator]";
- };
- function pushTryEntry(locs) {
- var entry = { tryLoc: locs[0] };
- if (1 in locs) {
- entry.catchLoc = locs[1];
- }
- if (2 in locs) {
- entry.finallyLoc = locs[2];
- entry.afterLoc = locs[3];
- }
- this.tryEntries.push(entry);
- }
- function resetTryEntry(entry) {
- var record = entry.completion || {};
- record.type = "normal";
- delete record.arg;
- entry.completion = record;
- }
- function Context(tryLocsList) {
- // The root entry object (effectively a try statement without a catch
- // or a finally block) gives us a place to store values thrown from
- // locations where there is no enclosing try statement.
- this.tryEntries = [{ tryLoc: "root" }];
- tryLocsList.forEach(pushTryEntry, this);
- this.reset(true);
- }
- runtime.keys = function(object) {
- var keys = [];
- for (var key in object) {
- keys.push(key);
- }
- keys.reverse();
- // Rather than returning an object with a next method, we keep
- // things simple and return the next function itself.
- return function next() {
- while (keys.length) {
- var key = keys.pop();
- if (key in object) {
- next.value = key;
- next.done = false;
- return next;
- }
- }
- // To avoid creating an additional object, we just hang the .value
- // and .done properties off the next function object itself. This
- // also ensures that the minifier will not anonymize the function.
- next.done = true;
- return next;
- };
- };
- function values(iterable) {
- if (iterable) {
- var iteratorMethod = iterable[iteratorSymbol];
- if (iteratorMethod) {
- return iteratorMethod.call(iterable);
- }
- if (typeof iterable.next === "function") {
- return iterable;
- }
- if (!isNaN(iterable.length)) {
- var i = -1, next = function next() {
- while (++i < iterable.length) {
- if (hasOwn.call(iterable, i)) {
- next.value = iterable[i];
- next.done = false;
- return next;
- }
- }
- next.value = undefined;
- next.done = true;
- return next;
- };
- return next.next = next;
- }
- }
- // Return an iterator with no values.
- return { next: doneResult };
- }
- runtime.values = values;
- function doneResult() {
- return { value: undefined, done: true };
- }
- Context.prototype = {
- constructor: Context,
- reset: function(skipTempReset) {
- this.prev = 0;
- this.next = 0;
- // Resetting context._sent for legacy support of Babel's
- // function.sent implementation.
- this.sent = this._sent = undefined;
- this.done = false;
- this.delegate = null;
- this.method = "next";
- this.arg = undefined;
- this.tryEntries.forEach(resetTryEntry);
- if (!skipTempReset) {
- for (var name in this) {
- // Not sure about the optimal order of these conditions:
- if (name.charAt(0) === "t" &&
- hasOwn.call(this, name) &&
- !isNaN(+name.slice(1))) {
- this[name] = undefined;
- }
- }
- }
- },
- stop: function() {
- this.done = true;
- var rootEntry = this.tryEntries[0];
- var rootRecord = rootEntry.completion;
- if (rootRecord.type === "throw") {
- throw rootRecord.arg;
- }
- return this.rval;
- },
- dispatchException: function(exception) {
- if (this.done) {
- throw exception;
- }
- var context = this;
- function handle(loc, caught) {
- record.type = "throw";
- record.arg = exception;
- context.next = loc;
- if (caught) {
- // If the dispatched exception was caught by a catch block,
- // then let that catch block handle the exception normally.
- context.method = "next";
- context.arg = undefined;
- }
- return !! caught;
- }
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
- var entry = this.tryEntries[i];
- var record = entry.completion;
- if (entry.tryLoc === "root") {
- // Exception thrown outside of any try block that could handle
- // it, so set the completion value of the entire function to
- // throw the exception.
- return handle("end");
- }
- if (entry.tryLoc <= this.prev) {
- var hasCatch = hasOwn.call(entry, "catchLoc");
- var hasFinally = hasOwn.call(entry, "finallyLoc");
- if (hasCatch && hasFinally) {
- if (this.prev < entry.catchLoc) {
- return handle(entry.catchLoc, true);
- } else if (this.prev < entry.finallyLoc) {
- return handle(entry.finallyLoc);
- }
- } else if (hasCatch) {
- if (this.prev < entry.catchLoc) {
- return handle(entry.catchLoc, true);
- }
- } else if (hasFinally) {
- if (this.prev < entry.finallyLoc) {
- return handle(entry.finallyLoc);
- }
- } else {
- throw new Error("try statement without catch or finally");
- }
- }
- }
- },
- abrupt: function(type, arg) {
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
- var entry = this.tryEntries[i];
- if (entry.tryLoc <= this.prev &&
- hasOwn.call(entry, "finallyLoc") &&
- this.prev < entry.finallyLoc) {
- var finallyEntry = entry;
- break;
- }
- }
- if (finallyEntry &&
- (type === "break" ||
- type === "continue") &&
- finallyEntry.tryLoc <= arg &&
- arg <= finallyEntry.finallyLoc) {
- // Ignore the finally entry if control is not jumping to a
- // location outside the try/catch block.
- finallyEntry = null;
- }
- var record = finallyEntry ? finallyEntry.completion : {};
- record.type = type;
- record.arg = arg;
- if (finallyEntry) {
- this.method = "next";
- this.next = finallyEntry.finallyLoc;
- return ContinueSentinel;
- }
- return this.complete(record);
- },
- complete: function(record, afterLoc) {
- if (record.type === "throw") {
- throw record.arg;
- }
- if (record.type === "break" ||
- record.type === "continue") {
- this.next = record.arg;
- } else if (record.type === "return") {
- this.rval = this.arg = record.arg;
- this.method = "return";
- this.next = "end";
- } else if (record.type === "normal" && afterLoc) {
- this.next = afterLoc;
- }
- return ContinueSentinel;
- },
- finish: function(finallyLoc) {
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
- var entry = this.tryEntries[i];
- if (entry.finallyLoc === finallyLoc) {
- this.complete(entry.completion, entry.afterLoc);
- resetTryEntry(entry);
- return ContinueSentinel;
- }
- }
- },
- "catch": function(tryLoc) {
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
- var entry = this.tryEntries[i];
- if (entry.tryLoc === tryLoc) {
- var record = entry.completion;
- if (record.type === "throw") {
- var thrown = record.arg;
- resetTryEntry(entry);
- }
- return thrown;
- }
- }
- // The context.catch method must only be called with a location
- // argument that corresponds to a known catch block.
- throw new Error("illegal catch attempt");
- },
- delegateYield: function(iterable, resultName, nextLoc) {
- this.delegate = {
- iterator: values(iterable),
- resultName: resultName,
- nextLoc: nextLoc
- };
- if (this.method === "next") {
- // Deliberately forget the last sent value so that we don't
- // accidentally pass it on to the delegate.
- this.arg = undefined;
- }
- return ContinueSentinel;
- }
- };
- })(
- // In sloppy mode, unbound `this` refers to the global object, fallback to
- // Function constructor if we're in global strict mode. That is sadly a form
- // of indirect eval which violates Content Security Policy.
- (function() {
- return this || (typeof self === "object" && self);
- })() || Function("return this")()
- );
- /***/ }),
- /* 310 */,
- /* 311 */,
- /* 312 */,
- /* 313 */,
- /* 314 */,
- /* 315 */,
- /* 316 */,
- /* 317 */,
- /* 318 */,
- /* 319 */,
- /* 320 */,
- /* 321 */,
- /* 322 */,
- /* 323 */,
- /* 324 */,
- /* 325 */,
- /* 326 */,
- /* 327 */,
- /* 328 */,
- /* 329 */,
- /* 330 */,
- /* 331 */,
- /* 332 */,
- /* 333 */,
- /* 334 */,
- /* 335 */,
- /* 336 */,
- /* 337 */,
- /* 338 */,
- /* 339 */,
- /* 340 */,
- /* 341 */,
- /* 342 */,
- /* 343 */,
- /* 344 */,
- /* 345 */,
- /* 346 */,
- /* 347 */,
- /* 348 */,
- /* 349 */,
- /* 350 */,
- /* 351 */,
- /* 352 */,
- /* 353 */,
- /* 354 */,
- /* 355 */,
- /* 356 */,
- /* 357 */,
- /* 358 */,
- /* 359 */,
- /* 360 */,
- /* 361 */,
- /* 362 */,
- /* 363 */,
- /* 364 */,
- /* 365 */,
- /* 366 */,
- /* 367 */,
- /* 368 */,
- /* 369 */,
- /* 370 */,
- /* 371 */,
- /* 372 */,
- /* 373 */,
- /* 374 */,
- /* 375 */,
- /* 376 */,
- /* 377 */,
- /* 378 */,
- /* 379 */,
- /* 380 */,
- /* 381 */,
- /* 382 */,
- /* 383 */,
- /* 384 */,
- /* 385 */,
- /* 386 */,
- /* 387 */,
- /* 388 */,
- /* 389 */,
- /* 390 */,
- /* 391 */,
- /* 392 */,
- /* 393 */,
- /* 394 */,
- /* 395 */,
- /* 396 */,
- /* 397 */,
- /* 398 */,
- /* 399 */,
- /* 400 */,
- /* 401 */,
- /* 402 */,
- /* 403 */,
- /* 404 */,
- /* 405 */,
- /* 406 */,
- /* 407 */,
- /* 408 */,
- /* 409 */,
- /* 410 */,
- /* 411 */,
- /* 412 */,
- /* 413 */,
- /* 414 */,
- /* 415 */,
- /* 416 */,
- /* 417 */,
- /* 418 */,
- /* 419 */,
- /* 420 */,
- /* 421 */,
- /* 422 */,
- /* 423 */,
- /* 424 */,
- /* 425 */,
- /* 426 */,
- /* 427 */,
- /* 428 */,
- /* 429 */,
- /* 430 */,
- /* 431 */,
- /* 432 */,
- /* 433 */,
- /* 434 */,
- /* 435 */,
- /* 436 */,
- /* 437 */,
- /* 438 */,
- /* 439 */,
- /* 440 */,
- /* 441 */,
- /* 442 */,
- /* 443 */,
- /* 444 */,
- /* 445 */,
- /* 446 */,
- /* 447 */,
- /* 448 */,
- /* 449 */,
- /* 450 */,
- /* 451 */,
- /* 452 */,
- /* 453 */,
- /* 454 */,
- /* 455 */,
- /* 456 */
- /*!**********************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/components/base/emojiMap.js ***!
- \**********************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });exports.emojiName = exports.emojiMap = exports.emojiUrl = void 0;var emojiUrl = 'https://web.sdk.qcloud.com/im/assets/emoji/';exports.emojiUrl = emojiUrl;
- var emojiMap = {
- '[NO]': 'emoji_0@2x.png',
- '[OK]': 'emoji_1@2x.png',
- '[下雨]': 'emoji_2@2x.png',
- '[么么哒]': 'emoji_3@2x.png',
- '[乒乓]': 'emoji_4@2x.png',
- '[便便]': 'emoji_5@2x.png',
- '[信封]': 'emoji_6@2x.png',
- '[偷笑]': 'emoji_7@2x.png',
- '[傲慢]': 'emoji_8@2x.png',
- '[再见]': 'emoji_9@2x.png',
- '[冷汗]': 'emoji_10@2x.png',
- '[凋谢]': 'emoji_11@2x.png',
- '[刀]': 'emoji_12@2x.png',
- '[删除]': 'emoji_13@2x.png',
- '[勾引]': 'emoji_14@2x.png',
- '[发呆]': 'emoji_15@2x.png',
- '[发抖]': 'emoji_16@2x.png',
- '[可怜]': 'emoji_17@2x.png',
- '[可爱]': 'emoji_18@2x.png',
- '[右哼哼]': 'emoji_19@2x.png',
- '[右太极]': 'emoji_20@2x.png',
- '[右车头]': 'emoji_21@2x.png',
- '[吐]': 'emoji_22@2x.png',
- '[吓]': 'emoji_23@2x.png',
- '[咒骂]': 'emoji_24@2x.png',
- '[咖啡]': 'emoji_25@2x.png',
- '[啤酒]': 'emoji_26@2x.png',
- '[嘘]': 'emoji_27@2x.png',
- '[回头]': 'emoji_28@2x.png',
- '[困]': 'emoji_29@2x.png',
- '[坏笑]': 'emoji_30@2x.png',
- '[多云]': 'emoji_31@2x.png',
- '[大兵]': 'emoji_32@2x.png',
- '[大哭]': 'emoji_33@2x.png',
- '[太阳]': 'emoji_34@2x.png',
- '[奋斗]': 'emoji_35@2x.png',
- '[奶瓶]': 'emoji_36@2x.png',
- '[委屈]': 'emoji_37@2x.png',
- '[害羞]': 'emoji_38@2x.png',
- '[尴尬]': 'emoji_39@2x.png',
- '[左哼哼]': 'emoji_40@2x.png',
- '[左太极]': 'emoji_41@2x.png',
- '[左车头]': 'emoji_42@2x.png',
- '[差劲]': 'emoji_43@2x.png',
- '[弱]': 'emoji_44@2x.png',
- '[强]': 'emoji_45@2x.png',
- '[彩带]': 'emoji_46@2x.png',
- '[彩球]': 'emoji_47@2x.png',
- '[得意]': 'emoji_48@2x.png',
- '[微笑]': 'emoji_49@2x.png',
- '[心碎了]': 'emoji_50@2x.png',
- '[快哭了]': 'emoji_51@2x.png',
- '[怄火]': 'emoji_52@2x.png',
- '[怒]': 'emoji_53@2x.png',
- '[惊恐]': 'emoji_54@2x.png',
- '[惊讶]': 'emoji_55@2x.png',
- '[憨笑]': 'emoji_56@2x.png',
- '[手枪]': 'emoji_57@2x.png',
- '[打哈欠]': 'emoji_58@2x.png',
- '[抓狂]': 'emoji_59@2x.png',
- '[折磨]': 'emoji_60@2x.png',
- '[抠鼻]': 'emoji_61@2x.png',
- '[抱抱]': 'emoji_62@2x.png',
- '[抱拳]': 'emoji_63@2x.png',
- '[拳头]': 'emoji_64@2x.png',
- '[挥手]': 'emoji_65@2x.png',
- '[握手]': 'emoji_66@2x.png',
- '[撇嘴]': 'emoji_67@2x.png',
- '[擦汗]': 'emoji_68@2x.png',
- '[敲打]': 'emoji_69@2x.png',
- '[晕]': 'emoji_70@2x.png',
- '[月亮]': 'emoji_71@2x.png',
- '[棒棒糖]': 'emoji_72@2x.png',
- '[汽车]': 'emoji_73@2x.png',
- '[沙发]': 'emoji_74@2x.png',
- '[流汗]': 'emoji_75@2x.png',
- '[流泪]': 'emoji_76@2x.png',
- '[激动]': 'emoji_77@2x.png',
- '[灯泡]': 'emoji_78@2x.png',
- '[炸弹]': 'emoji_79@2x.png',
- '[熊猫]': 'emoji_80@2x.png',
- '[爆筋]': 'emoji_81@2x.png',
- '[爱你]': 'emoji_82@2x.png',
- '[爱心]': 'emoji_83@2x.png',
- '[爱情]': 'emoji_84@2x.png',
- '[猪头]': 'emoji_85@2x.png',
- '[猫咪]': 'emoji_86@2x.png',
- '[献吻]': 'emoji_87@2x.png',
- '[玫瑰]': 'emoji_88@2x.png',
- '[瓢虫]': 'emoji_89@2x.png',
- '[疑问]': 'emoji_90@2x.png',
- '[白眼]': 'emoji_91@2x.png',
- '[皮球]': 'emoji_92@2x.png',
- '[睡觉]': 'emoji_93@2x.png',
- '[磕头]': 'emoji_94@2x.png',
- '[示爱]': 'emoji_95@2x.png',
- '[礼品袋]': 'emoji_96@2x.png',
- '[礼物]': 'emoji_97@2x.png',
- '[篮球]': 'emoji_98@2x.png',
- '[米饭]': 'emoji_99@2x.png',
- '[糗大了]': 'emoji_100@2x.png',
- '[红双喜]': 'emoji_101@2x.png',
- '[红灯笼]': 'emoji_102@2x.png',
- '[纸巾]': 'emoji_103@2x.png',
- '[胜利]': 'emoji_104@2x.png',
- '[色]': 'emoji_105@2x.png',
- '[药]': 'emoji_106@2x.png',
- '[菜刀]': 'emoji_107@2x.png',
- '[蛋糕]': 'emoji_108@2x.png',
- '[蜡烛]': 'emoji_109@2x.png',
- '[街舞]': 'emoji_110@2x.png',
- '[衰]': 'emoji_111@2x.png',
- '[西瓜]': 'emoji_112@2x.png',
- '[调皮]': 'emoji_113@2x.png',
- '[象棋]': 'emoji_114@2x.png',
- '[跳绳]': 'emoji_115@2x.png',
- '[跳跳]': 'emoji_116@2x.png',
- '[车厢]': 'emoji_117@2x.png',
- '[转圈]': 'emoji_118@2x.png',
- '[鄙视]': 'emoji_119@2x.png',
- '[酷]': 'emoji_120@2x.png',
- '[钞票]': 'emoji_121@2x.png',
- '[钻戒]': 'emoji_122@2x.png',
- '[闪电]': 'emoji_123@2x.png',
- '[闭嘴]': 'emoji_124@2x.png',
- '[闹钟]': 'emoji_125@2x.png',
- '[阴险]': 'emoji_126@2x.png',
- '[难过]': 'emoji_127@2x.png',
- '[雨伞]': 'emoji_128@2x.png',
- '[青蛙]': 'emoji_129@2x.png',
- '[面条]': 'emoji_130@2x.png',
- '[鞭炮]': 'emoji_131@2x.png',
- '[风车]': 'emoji_132@2x.png',
- '[飞吻]': 'emoji_133@2x.png',
- '[飞机]': 'emoji_134@2x.png',
- '[饥饿]': 'emoji_135@2x.png',
- '[香蕉]': 'emoji_136@2x.png',
- '[骷髅]': 'emoji_137@2x.png',
- '[麦克风]': 'emoji_138@2x.png',
- '[麻将]': 'emoji_139@2x.png',
- '[鼓掌]': 'emoji_140@2x.png',
- '[龇牙]': 'emoji_141@2x.png' };exports.emojiMap = emojiMap;
- var emojiName = ['[龇牙]', '[调皮]', '[流汗]', '[偷笑]', '[再见]', '[敲打]', '[擦汗]', '[猪头]', '[玫瑰]', '[流泪]', '[大哭]', '[嘘]', '[酷]', '[抓狂]', '[委屈]', '[便便]', '[炸弹]', '[菜刀]', '[可爱]', '[色]', '[害羞]', '[得意]', '[吐]', '[微笑]', '[怒]', '[尴尬]', '[惊恐]', '[冷汗]', '[爱心]', '[示爱]', '[白眼]', '[傲慢]', '[难过]', '[惊讶]', '[疑问]', '[困]', '[么么哒]', '[憨笑]', '[爱情]', '[衰]', '[撇嘴]', '[阴险]', '[奋斗]', '[发呆]', '[右哼哼]', '[抱抱]', '[坏笑]', '[飞吻]', '[鄙视]', '[晕]', '[大兵]', '[可怜]', '[强]', '[弱]', '[握手]', '[胜利]', '[抱拳]', '[凋谢]', '[米饭]', '[蛋糕]', '[西瓜]', '[啤酒]', '[瓢虫]', '[勾引]', '[OK]', '[爱你]', '[咖啡]', '[月亮]', '[刀]', '[发抖]', '[差劲]', '[拳头]', '[心碎了]', '[太阳]', '[礼物]', '[皮球]', '[骷髅]', '[挥手]', '[闪电]', '[饥饿]', '[困]', '[咒骂]', '[折磨]', '[抠鼻]', '[鼓掌]', '[糗大了]', '[左哼哼]', '[打哈欠]', '[快哭了]', '[吓]', '[篮球]', '[乒乓]', '[NO]', '[跳跳]', '[怄火]', '[转圈]', '[磕头]', '[回头]', '[跳绳]', '[激动]', '[街舞]', '[献吻]', '[左太极]', '[右太极]', '[闭嘴]', '[猫咪]', '[红双喜]', '[鞭炮]', '[红灯笼]', '[麻将]', '[麦克风]', '[礼品袋]', '[信封]', '[象棋]', '[彩带]', '[蜡烛]', '[爆筋]', '[棒棒糖]', '[奶瓶]', '[面条]', '[香蕉]', '[飞机]', '[左车头]', '[车厢]', '[右车头]', '[多云]', '[下雨]', '[钞票]', '[熊猫]', '[灯泡]', '[风车]', '[闹钟]', '[雨伞]', '[彩球]', '[钻戒]', '[沙发]', '[纸巾]', '[手枪]', '[青蛙]'];exports.emojiName = emojiName;
- /***/ }),
- /* 457 */,
- /* 458 */,
- /* 459 */,
- /* 460 */,
- /* 461 */,
- /* 462 */,
- /* 463 */,
- /* 464 */,
- /* 465 */,
- /* 466 */,
- /* 467 */,
- /* 468 */,
- /* 469 */,
- /* 470 */,
- /* 471 */
- /*!**************************************************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/@dcloudio/uni-ui/lib/uni-transition/createAnimation.js ***!
- \**************************************************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.createAnimation = createAnimation;function ownKeys(object, enumerableOnly) {var keys = Object.keys(object);if (Object.getOwnPropertySymbols) {var symbols = Object.getOwnPropertySymbols(object);if (enumerableOnly) symbols = symbols.filter(function (sym) {return Object.getOwnPropertyDescriptor(object, sym).enumerable;});keys.push.apply(keys, symbols);}return keys;}function _objectSpread(target) {for (var i = 1; i < arguments.length; i++) {var source = arguments[i] != null ? arguments[i] : {};if (i % 2) {ownKeys(Object(source), true).forEach(function (key) {_defineProperty(target, key, source[key]);});} else if (Object.getOwnPropertyDescriptors) {Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));} else {ownKeys(Object(source)).forEach(function (key) {Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));});}}return target;}function _defineProperty(obj, key, value) {if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}function _classCallCheck(instance, Constructor) {if (!(instance instanceof Constructor)) {throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target, props) {for (var i = 0; i < props.length; i++) {var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ("value" in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor);}}function _createClass(Constructor, protoProps, staticProps) {if (protoProps) _defineProperties(Constructor.prototype, protoProps);if (staticProps) _defineProperties(Constructor, staticProps);return Constructor;} // const defaultOption = {
- // duration: 300,
- // timingFunction: 'linear',
- // delay: 0,
- // transformOrigin: '50% 50% 0'
- // }
- var
- MPAnimation = /*#__PURE__*/function () {
- function MPAnimation(options, _this) {_classCallCheck(this, MPAnimation);
- this.options = options;
- this.animation = uni.createAnimation(options);
- this.currentStepAnimates = {};
- this.next = 0;
- this.$ = _this;
- }_createClass(MPAnimation, [{ key: "_nvuePushAnimates", value: function _nvuePushAnimates(
- type, args) {
- var aniObj = this.currentStepAnimates[this.next];
- var styles = {};
- if (!aniObj) {
- styles = {
- styles: {},
- config: {} };
- } else {
- styles = aniObj;
- }
- if (animateTypes1.includes(type)) {
- if (!styles.styles.transform) {
- styles.styles.transform = '';
- }
- var unit = '';
- if (type === 'rotate') {
- unit = 'deg';
- }
- styles.styles.transform += "".concat(type, "(").concat(args + unit, ") ");
- } else {
- styles.styles[type] = "".concat(args);
- }
- this.currentStepAnimates[this.next] = styles;
- } }, { key: "_animateRun", value: function _animateRun()
- {var styles = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
- var ref = this.$.$refs['ani'].ref;
- if (!ref) return;
- return new Promise(function (resolve, reject) {
- nvueAnimation.transition(ref, _objectSpread({
- styles: styles },
- config),
- function (res) {
- resolve();
- });
- });
- } }, { key: "_nvueNextAnimate", value: function _nvueNextAnimate(
- animates) {var _this2 = this;var step = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;var fn = arguments.length > 2 ? arguments[2] : undefined;
- var obj = animates[step];
- if (obj) {var
- styles =
- obj.styles,config = obj.config;
- this._animateRun(styles, config).then(function () {
- step += 1;
- _this2._nvueNextAnimate(animates, step, fn);
- });
- } else {
- this.currentStepAnimates = {};
- typeof fn === 'function' && fn();
- this.isEnd = true;
- }
- } }, { key: "step", value: function step()
- {var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
- this.animation.step(config);
- return this;
- } }, { key: "run", value: function run(
- fn) {
- this.$.animationData = this.animation.export();
- this.$.timer = setTimeout(function () {
- typeof fn === 'function' && fn();
- }, this.$.durationTime);
- } }]);return MPAnimation;}();
- var animateTypes1 = ['matrix', 'matrix3d', 'rotate', 'rotate3d', 'rotateX', 'rotateY', 'rotateZ', 'scale', 'scale3d',
- 'scaleX', 'scaleY', 'scaleZ', 'skew', 'skewX', 'skewY', 'translate', 'translate3d', 'translateX', 'translateY',
- 'translateZ'];
- var animateTypes2 = ['opacity', 'backgroundColor'];
- var animateTypes3 = ['width', 'height', 'left', 'right', 'top', 'bottom'];
- animateTypes1.concat(animateTypes2, animateTypes3).forEach(function (type) {
- MPAnimation.prototype[type] = function () {var _this$animation;
- (_this$animation = this.animation)[type].apply(_this$animation, arguments);
- return this;
- };
- });
- function createAnimation(option, _this) {
- if (!_this) return;
- clearTimeout(_this.timer);
- return new MPAnimation(option, _this);
- }
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
- /***/ }),
- /* 472 */,
- /* 473 */,
- /* 474 */,
- /* 475 */,
- /* 476 */,
- /* 477 */
- /*!****************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/components/base/message-facade.js ***!
- \****************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });exports.parseText = parseText;exports.parseGroupSystemNotice = parseGroupSystemNotice;exports.parseGroupTip = parseGroupTip;exports.parseImage = parseImage;exports.parseVideo = parseVideo;exports.parseAudio = parseAudio;var _emojiMap = __webpack_require__(/*! ./emojiMap */ 456);function _createForOfIteratorHelper(o, allowArrayLike) {var it;if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) {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(_e) {throw _e;}, 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 = o[Symbol.iterator]();}, n: function n() {var step = it.next();normalCompletion = step.done;return step;}, e: function e(_e2) {didErr = true;err = _e2;}, f: function f() {try {if (!normalCompletion && it.return != null) it.return();} finally {if (didErr) throw err;}} };}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);}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;}
- /** 传入message.element(群系统消息SystemMessage,群提示消息GroupTip除外)
- * content = {
- * type: 'TIMTextElem',
- * content: {
- * text: 'AAA[龇牙]AAA[龇牙]AAA[龇牙AAA]'
- * }
- *}
- **/
- // 群提示消息的含义 (opType)
- var GROUP_TIP_TYPE = {
- MEMBER_JOIN: 1,
- MEMBER_QUIT: 2,
- MEMBER_KICKED_OUT: 3,
- MEMBER_SET_ADMIN: 4,
- // 被设置为管理员
- MEMBER_CANCELED_ADMIN: 5,
- // 被取消管理员
- GROUP_INFO_MODIFIED: 6,
- // 修改群资料,转让群组为该类型,msgBody.msgGroupNewInfo.ownerAccount表示新群主的ID
- MEMBER_INFO_MODIFIED: 7 // 修改群成员信息
- };
- // 解析小程序text, 表情信息也是[嘻嘻]文本
- function parseText(message) {
- var renderDom = [];
- var temp = message.payload.text;
- var left = -1;
- var right = -1;
- while (temp !== '') {
- left = temp.indexOf('[');
- right = temp.indexOf(']');
- switch (left) {
- case 0:
- if (right === -1) {
- renderDom.push({
- name: 'span',
- text: temp });
- temp = '';
- } else {
- var _emoji = temp.slice(0, right + 1);
- if (_emojiMap.emojiMap[_emoji]) {
- renderDom.push({
- name: 'img',
- src: _emojiMap.emojiUrl + _emojiMap.emojiMap[_emoji] });
- temp = temp.substring(right + 1);
- } else {
- renderDom.push({
- name: 'span',
- text: '[' });
- temp = temp.slice(1);
- }
- }
- break;
- case -1:
- renderDom.push({
- name: 'span',
- text: temp });
- temp = '';
- break;
- default:
- renderDom.push({
- name: 'span',
- text: temp.slice(0, left) });
- temp = temp.substring(left);
- break;}
- }
- return renderDom;
- } // 解析群系统消息
- function parseGroupSystemNotice(message) {var
- payload =
- message.payload;
- var groupName = payload.groupProfile.name || payload.groupProfile.groupID;var
- groupID =
- payload.groupProfile.groupID;
- var text;
- switch (payload.operationType) {
- case 1:
- text = "".concat(payload.operatorID, " \u7533\u8BF7\u52A0\u5165\u7FA4\u7EC4\uFF1A").concat(groupName, "\uFF08\u7FA4ID:").concat(groupID, ")");
- break;
- case 2:
- text = "\u6210\u529F\u52A0\u5165\u7FA4\u7EC4\uFF1A".concat(groupName, " \uFF08\u7FA4ID:").concat(groupID, ")");
- break;
- case 3:
- text = "\u7533\u8BF7\u52A0\u5165\u7FA4\u7EC4\uFF1A".concat(groupName, " \uFF08\u7FA4ID:").concat(groupID, ")\u88AB\u62D2\u7EDD");
- break;
- case 4:
- text = "\u88AB\u7BA1\u7406\u5458".concat(payload.operatorID, "\u8E22\u51FA\u7FA4\u7EC4\uFF1A").concat(groupName, "\uFF08\u7FA4ID:").concat(groupID, ")");
- break;
- case 5:
- text = "\u7FA4\uFF1A".concat(groupName, " \uFF08\u7FA4ID:").concat(groupID, ")\u5DF2\u88AB").concat(payload.operatorID, "\u89E3\u6563");
- break;
- case 6:
- text = "\u6211\uFF08\u7528\u6237ID:".concat(payload.operatorID, "\uFF09\u6210\u529F\u521B\u5EFA\u7FA4\u804A:").concat(groupName, "\uFF08\u7FA4ID:").concat(groupID, ")");
- break;
- case 7:
- text = "\u7528\u6237ID\uFF1A".concat(payload.operatorID, "\u9080\u8BF7\u4F60\u52A0\u7FA4\uFF1A").concat(groupName, "\uFF08\u7FA4ID:").concat(groupID, ")");
- break;
- case 8:
- text = "\u4F60\u9000\u51FA\u7FA4\u7EC4\uFF1A".concat(groupName, "\uFF08\u7FA4ID:").concat(groupID, ")");
- break;
- case 9:
- text = "\u4F60\u88AB".concat(payload.operatorID, "\u8BBE\u7F6E\u4E3A\u7FA4\uFF1A").concat(groupName, "\uFF08\u7FA4ID:").concat(groupID, ")\u7684\u7BA1\u7406\u5458");
- break;
- case 10:
- text = "\u4F60\u88AB".concat(payload.operatorID, "\u64A4\u9500\u7FA4\uFF1A").concat(groupName, " \uFF08\u7FA4ID:").concat(groupID, ")\u7684\u7BA1\u7406\u5458\u8EAB\u4EFD");
- break;
- case 255:
- text = "\u81EA\u5B9A\u4E49\u7FA4\u7CFB\u7EDF\u901A\u77E5: ".concat(payload.userDefinedField);
- break;}
- return text;
- } // 解析群提示消息
- function parseGroupTip(message) {var
- payload =
- message.payload;
- var userName = message.nick || payload.userIDList.join(',');
- var tip;
- var user;
- switch (payload.operationType) {
- case GROUP_TIP_TYPE.MEMBER_JOIN:
- tip = "".concat(userName, " \u52A0\u5165\u7FA4\u804A");
- break;
- case GROUP_TIP_TYPE.MEMBER_QUIT:
- tip = "\u7FA4\u6210\u5458\u9000\u7FA4\uFF1A".concat(userName);
- break;
- case GROUP_TIP_TYPE.MEMBER_KICKED_OUT:
- tip = "\u7FA4\u6210\u5458\u88AB\u8E22\uFF1A".concat(userName);
- break;
- case GROUP_TIP_TYPE.MEMBER_SET_ADMIN:
- tip = "".concat(payload.operatorID, "\u5C06 ").concat(userName, "\u8BBE\u7F6E\u4E3A\u7BA1\u7406\u5458");
- break;
- case GROUP_TIP_TYPE.MEMBER_CANCELED_ADMIN:
- tip = "".concat(payload.operatorID, "\u5C06 ").concat(userName, "\u53D6\u6D88\u4F5C\u4E3A\u7BA1\u7406\u5458");
- break;
- case GROUP_TIP_TYPE.GROUP_INFO_MODIFIED:
- tip = '群资料修改';
- break;
- case GROUP_TIP_TYPE.MEMBER_INFO_MODIFIED:var _iterator = _createForOfIteratorHelper(
- payload.memberList),_step;try {for (_iterator.s(); !(_step = _iterator.n()).done;) {var member = _step.value;
- if (member.muteTime > 0) {
- tip = "\u7FA4\u6210\u5458\uFF1A".concat(member.userID, "\u88AB\u7981\u8A00").concat(member.muteTime, "\u79D2");
- } else {
- tip = "\u7FA4\u6210\u5458\uFF1A".concat(member.userID, "\u88AB\u53D6\u6D88\u7981\u8A00");
- }
- }} catch (err) {_iterator.e(err);} finally {_iterator.f();}
- break;
- case 256:
- user = message.nick || message.from;
- if (payload.text === '无应答') {
- user = payload.userIDList.join(',');
- }
- tip = payload.text === '结束群聊' ? '结束群聊' : "\"".concat(user, "\" ").concat(payload.text);
- break;}
- return [{
- name: 'groupTip',
- text: tip }];
- } // 解析图片消息
- function parseImage(message) {
- var renderDom = [{
- name: 'image',
- // 这里默认渲染的是 1080P 的图片
- src: message.payload.imageInfoArray[0].url }];
- return renderDom;
- } // 解析视频消息
- function parseVideo(message) {
- var renderDom = {
- name: 'video',
- src: message.payload.videoUrl };
- return renderDom;
- } // 解析语音消息
- function parseAudio(message) {
- var renderDom = {
- name: 'audio',
- src: message.payload.url,
- second: message.payload.second === 0 ? 1 : message.payload.second };
- return renderDom;
- }
- /***/ }),
- /* 478 */,
- /* 479 */,
- /* 480 */,
- /* 481 */,
- /* 482 */,
- /* 483 */,
- /* 484 */,
- /* 485 */,
- /* 486 */,
- /* 487 */,
- /* 488 */,
- /* 489 */,
- /* 490 */,
- /* 491 */,
- /* 492 */,
- /* 493 */,
- /* 494 */,
- /* 495 */,
- /* 496 */,
- /* 497 */,
- /* 498 */,
- /* 499 */,
- /* 500 */,
- /* 501 */,
- /* 502 */,
- /* 503 */,
- /* 504 */,
- /* 505 */,
- /* 506 */
- /*!********************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/components/base/common.js ***!
- \********************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });exports.caculateTimeago = caculateTimeago;exports.formateTime = formateTime;function caculateTimeago(dateTimeStamp) {
- var minute = 1000 * 60; // 把分,时,天,周,半个月,一个月用毫秒表示
- var hour = minute * 60;
- var day = hour * 24;
- var week = day * 7;
- var now = new Date().getTime(); // 获取当前时间毫秒
- var diffValue = now - dateTimeStamp; // 时间差
- var result = '';
- if (diffValue < 0) {
- return;
- }
- var minC = diffValue / minute; // 计算时间差的分,时,天,周,月
- var hourC = diffValue / hour;
- var dayC = diffValue / day;
- var weekC = diffValue / week;
- if (weekC >= 1 && weekC <= 4) {
- result = " ".concat(parseInt(weekC, 10), "\u5468\u524D");
- } else if (dayC >= 1 && dayC <= 6) {
- result = " ".concat(parseInt(dayC, 10), "\u5929\u524D");
- } else if (hourC >= 1 && hourC <= 23) {
- result = " ".concat(parseInt(hourC, 10), "\u5C0F\u65F6\u524D");
- } else if (minC >= 1 && minC <= 59) {
- result = " ".concat(parseInt(minC, 10), "\u5206\u949F\u524D");
- } else if (diffValue >= 0 && diffValue <= minute) {
- result = '刚刚';
- } else {
- var datetime = new Date();
- datetime.setTime(dateTimeStamp);
- var Nyear = datetime.getFullYear();
- var Nmonth = datetime.getMonth() + 1 < 10 ? "0".concat(datetime.getMonth() + 1) : datetime.getMonth() + 1;
- var Ndate = datetime.getDate() < 10 ? "0".concat(datetime.getDate()) : datetime.getDate();
- result = "".concat(Nyear, "-").concat(Nmonth, "-").concat(Ndate);
- }
- return result;
- }
- function formateTime(secondTime) {
- var time = secondTime;
- var newTime;
- var hour;
- var minite;
- var seconds;
- if (time >= 3600) {
- hour = parseInt(time / 3600) < 10 ? "0".concat(parseInt(time / 3600)) : parseInt(time / 3600);
- minite = parseInt(time % 60 / 60) < 10 ? "0".concat(parseInt(time % 60 / 60)) : parseInt(time % 60 / 60);
- seconds = time % 3600 < 10 ? "0".concat(time % 3600) : time % 3600;
- if (seconds > 60) {
- minite = parseInt(seconds / 60) < 10 ? "0".concat(parseInt(seconds / 60)) : parseInt(seconds / 60);
- seconds = seconds % 60 < 10 ? "0".concat(seconds % 60) : seconds % 60;
- }
- newTime = "".concat(hour, ":").concat(minite, ":").concat(seconds);
- } else if (time >= 60 && time < 3600) {
- minite = parseInt(time / 60) < 10 ? "0".concat(parseInt(time / 60)) : parseInt(time / 60);
- seconds = time % 60 < 10 ? "0".concat(time % 60) : time % 60;
- newTime = "00:".concat(minite, ":").concat(seconds);
- } else if (time < 60) {
- seconds = time < 10 ? "0".concat(time) : time;
- newTime = "00:00:".concat(seconds);
- }
- return newTime;
- }
- /***/ }),
- /* 507 */,
- /* 508 */,
- /* 509 */,
- /* 510 */,
- /* 511 */,
- /* 512 */,
- /* 513 */,
- /* 514 */,
- /* 515 */,
- /* 516 */,
- /* 517 */,
- /* 518 */,
- /* 519 */,
- /* 520 */,
- /* 521 */,
- /* 522 */,
- /* 523 */,
- /* 524 */,
- /* 525 */,
- /* 526 */,
- /* 527 */,
- /* 528 */,
- /* 529 */,
- /* 530 */,
- /* 531 */,
- /* 532 */,
- /* 533 */,
- /* 534 */,
- /* 535 */,
- /* 536 */,
- /* 537 */,
- /* 538 */,
- /* 539 */,
- /* 540 */,
- /* 541 */,
- /* 542 */,
- /* 543 */,
- /* 544 */,
- /* 545 */,
- /* 546 */,
- /* 547 */,
- /* 548 */,
- /* 549 */,
- /* 550 */,
- /* 551 */,
- /* 552 */,
- /* 553 */,
- /* 554 */,
- /* 555 */,
- /* 556 */,
- /* 557 */,
- /* 558 */,
- /* 559 */,
- /* 560 */,
- /* 561 */,
- /* 562 */,
- /* 563 */,
- /* 564 */,
- /* 565 */,
- /* 566 */,
- /* 567 */,
- /* 568 */,
- /* 569 */,
- /* 570 */,
- /* 571 */,
- /* 572 */,
- /* 573 */,
- /* 574 */,
- /* 575 */,
- /* 576 */,
- /* 577 */,
- /* 578 */,
- /* 579 */
- /*!***********************************************************************************!*\
- !*** D:/meloinfo/sugarpark-mini-program/node_modules/vue-jsonp/dist/index.esm.js ***!
- \***********************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });exports.jsonp = o;exports.VueJsonp = void 0;function e(t, n) {t = t.replace(/=/g, "");var o = [];switch (n.constructor) {case String:case Number:case Boolean:o.push(encodeURIComponent(t) + "=" + encodeURIComponent(n));break;case Array:n.forEach(function (n) {o = o.concat(e(t + "[]=", n));});break;case Object:Object.keys(n).forEach(function (r) {var a = n[r];o = o.concat(e(t + "[" + r + "]", a));});}return o;}function t(e) {var n = [];return e.forEach(function (e) {"string" == typeof e ? n.push(e) : n = n.concat(t(e));}), n;}
- /**
- * Vue Jsonp.
- * # Carry Your World #
- *
- * @author: LancerComet
- * @license: MIT
- */var n = { install: function install(e) {e.prototype.$jsonp = o;} };exports.VueJsonp = n;function o(n, o, r) {if (void 0 === o && (o = {}), "string" != typeof n) throw new Error('[Vue-jsonp] Type of param "url" is not string.');if ("object" != typeof o || !o) throw new Error("[Vue-jsonp] Invalid params, should be an object.");return r = "number" == typeof r ? r : 5e3, new Promise(function (a, c) {var u = "string" == typeof o.callbackQuery ? o.callbackQuery : "callback",i = "string" == typeof o.callbackName ? o.callbackName : "jsonp_" + (Math.floor(1e5 * Math.random()) * Date.now()).toString(16);o[u] = i, delete o.callbackQuery, delete o.callbackName;var s = [];Object.keys(o).forEach(function (t) {s = s.concat(e(t, o[t]));});var l = t(s).join("&"),f = function f() {p(), clearTimeout(m), c({ status: 400, statusText: "Bad Request" });},p = function p() {b.removeEventListener("error", f);},d = function d() {document.body.removeChild(b), delete window[i];},m = null;r > -1 && (m = setTimeout(function () {p(), d(), c({ statusText: "Request Timeout", status: 408 });}, r)), window[i] = function (e) {clearTimeout(m), p(), d(), a(e);};var b = document.createElement("script");b.addEventListener("error", f), b.src = n + (/\?/.test(n) ? "&" : "?") + l, document.body.appendChild(b);});}
- /***/ })
- ]]);
- //# sourceMappingURL=../../.sourcemap/mp-weixin/common/vendor.js.map
|