converse-muc-embedded.js 2.3 MB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493264942649526496264972649826499265002650126502265032650426505265062650726508265092651026511265122651326514265152651626517265182651926520265212652226523265242652526526265272652826529265302653126532265332653426535265362653726538265392654026541265422654326544265452654626547265482654926550265512655226553265542655526556265572655826559265602656126562265632656426565265662656726568265692657026571265722657326574265752657626577265782657926580265812658226583265842658526586265872658826589265902659126592265932659426595265962659726598265992660026601266022660326604266052660626607266082660926610266112661226613266142661526616266172661826619266202662126622266232662426625266262662726628266292663026631266322663326634266352663626637266382663926640266412664226643266442664526646266472664826649266502665126652266532665426655266562665726658266592666026661266622666326664266652666626667266682666926670266712667226673266742667526676266772667826679266802668126682266832668426685266862668726688266892669026691266922669326694266952669626697266982669926700267012670226703267042670526706267072670826709267102671126712267132671426715267162671726718267192672026721267222672326724267252672626727267282672926730267312673226733267342673526736267372673826739267402674126742267432674426745267462674726748267492675026751267522675326754267552675626757267582675926760267612676226763267642676526766267672676826769267702677126772267732677426775267762677726778267792678026781267822678326784267852678626787267882678926790267912679226793267942679526796267972679826799268002680126802268032680426805268062680726808268092681026811268122681326814268152681626817268182681926820268212682226823268242682526826268272682826829268302683126832268332683426835268362683726838268392684026841268422684326844268452684626847268482684926850268512685226853268542685526856268572685826859268602686126862268632686426865268662686726868268692687026871268722687326874268752687626877268782687926880268812688226883268842688526886268872688826889268902689126892268932689426895268962689726898268992690026901269022690326904269052690626907269082690926910269112691226913269142691526916269172691826919269202692126922269232692426925269262692726928269292693026931269322693326934269352693626937269382693926940269412694226943269442694526946269472694826949269502695126952269532695426955269562695726958269592696026961269622696326964269652696626967269682696926970269712697226973269742697526976269772697826979269802698126982269832698426985269862698726988269892699026991269922699326994269952699626997269982699927000270012700227003270042700527006270072700827009270102701127012270132701427015270162701727018270192702027021270222702327024270252702627027270282702927030270312703227033270342703527036270372703827039270402704127042270432704427045270462704727048270492705027051270522705327054270552705627057270582705927060270612706227063270642706527066270672706827069270702707127072270732707427075270762707727078270792708027081270822708327084270852708627087270882708927090270912709227093270942709527096270972709827099271002710127102271032710427105271062710727108271092711027111271122711327114271152711627117271182711927120271212712227123271242712527126271272712827129271302713127132271332713427135271362713727138271392714027141271422714327144271452714627147271482714927150271512715227153271542715527156271572715827159271602716127162271632716427165271662716727168271692717027171271722717327174271752717627177271782717927180271812718227183271842718527186271872718827189271902719127192271932719427195271962719727198271992720027201272022720327204272052720627207272082720927210272112721227213272142721527216272172721827219272202722127222272232722427225272262722727228272292723027231272322723327234272352723627237272382723927240272412724227243272442724527246272472724827249272502725127252272532725427255272562725727258272592726027261272622726327264272652726627267272682726927270272712727227273272742727527276272772727827279272802728127282272832728427285272862728727288272892729027291272922729327294272952729627297272982729927300273012730227303273042730527306273072730827309273102731127312273132731427315273162731727318273192732027321273222732327324273252732627327273282732927330273312733227333273342733527336273372733827339273402734127342273432734427345273462734727348273492735027351273522735327354273552735627357273582735927360273612736227363273642736527366273672736827369273702737127372273732737427375273762737727378273792738027381273822738327384273852738627387273882738927390273912739227393273942739527396273972739827399274002740127402274032740427405274062740727408274092741027411274122741327414274152741627417274182741927420274212742227423274242742527426274272742827429274302743127432274332743427435274362743727438274392744027441274422744327444274452744627447274482744927450274512745227453274542745527456274572745827459274602746127462274632746427465274662746727468274692747027471274722747327474274752747627477274782747927480274812748227483274842748527486274872748827489274902749127492274932749427495274962749727498274992750027501275022750327504275052750627507275082750927510275112751227513275142751527516275172751827519275202752127522275232752427525275262752727528275292753027531275322753327534275352753627537275382753927540275412754227543275442754527546275472754827549275502755127552275532755427555275562755727558275592756027561275622756327564275652756627567275682756927570275712757227573275742757527576275772757827579275802758127582275832758427585275862758727588275892759027591275922759327594275952759627597275982759927600276012760227603276042760527606276072760827609276102761127612276132761427615276162761727618276192762027621276222762327624276252762627627276282762927630276312763227633276342763527636276372763827639276402764127642276432764427645276462764727648276492765027651276522765327654276552765627657276582765927660276612766227663276642766527666276672766827669276702767127672276732767427675276762767727678276792768027681276822768327684276852768627687276882768927690276912769227693276942769527696276972769827699277002770127702277032770427705277062770727708277092771027711277122771327714277152771627717277182771927720277212772227723277242772527726277272772827729277302773127732277332773427735277362773727738277392774027741277422774327744277452774627747277482774927750277512775227753277542775527756277572775827759277602776127762277632776427765277662776727768277692777027771277722777327774277752777627777277782777927780277812778227783277842778527786277872778827789277902779127792277932779427795277962779727798277992780027801278022780327804278052780627807278082780927810278112781227813278142781527816278172781827819278202782127822278232782427825278262782727828278292783027831278322783327834278352783627837278382783927840278412784227843278442784527846278472784827849278502785127852278532785427855278562785727858278592786027861278622786327864278652786627867278682786927870278712787227873278742787527876278772787827879278802788127882278832788427885278862788727888278892789027891278922789327894278952789627897278982789927900279012790227903279042790527906279072790827909279102791127912279132791427915279162791727918279192792027921279222792327924279252792627927279282792927930279312793227933279342793527936279372793827939279402794127942279432794427945279462794727948279492795027951279522795327954279552795627957279582795927960279612796227963279642796527966279672796827969279702797127972279732797427975279762797727978279792798027981279822798327984279852798627987279882798927990279912799227993279942799527996279972799827999280002800128002280032800428005280062800728008280092801028011280122801328014280152801628017280182801928020280212802228023280242802528026280272802828029280302803128032280332803428035280362803728038280392804028041280422804328044280452804628047280482804928050280512805228053280542805528056280572805828059280602806128062280632806428065280662806728068280692807028071280722807328074280752807628077280782807928080280812808228083280842808528086280872808828089280902809128092280932809428095280962809728098280992810028101281022810328104281052810628107281082810928110281112811228113281142811528116281172811828119281202812128122281232812428125281262812728128281292813028131281322813328134281352813628137281382813928140281412814228143281442814528146281472814828149281502815128152281532815428155281562815728158281592816028161281622816328164281652816628167281682816928170281712817228173281742817528176281772817828179281802818128182281832818428185281862818728188281892819028191281922819328194281952819628197281982819928200282012820228203282042820528206282072820828209282102821128212282132821428215282162821728218282192822028221282222822328224282252822628227282282822928230282312823228233282342823528236282372823828239282402824128242282432824428245282462824728248282492825028251282522825328254282552825628257282582825928260282612826228263282642826528266282672826828269282702827128272282732827428275282762827728278282792828028281282822828328284282852828628287282882828928290282912829228293282942829528296282972829828299283002830128302283032830428305283062830728308283092831028311283122831328314283152831628317283182831928320283212832228323283242832528326283272832828329283302833128332283332833428335283362833728338283392834028341283422834328344283452834628347283482834928350283512835228353283542835528356283572835828359283602836128362283632836428365283662836728368283692837028371283722837328374283752837628377283782837928380283812838228383283842838528386283872838828389283902839128392283932839428395283962839728398283992840028401284022840328404284052840628407284082840928410284112841228413284142841528416284172841828419284202842128422284232842428425284262842728428284292843028431284322843328434284352843628437284382843928440284412844228443284442844528446284472844828449284502845128452284532845428455284562845728458284592846028461284622846328464284652846628467284682846928470284712847228473284742847528476284772847828479284802848128482284832848428485284862848728488284892849028491284922849328494284952849628497284982849928500285012850228503285042850528506285072850828509285102851128512285132851428515285162851728518285192852028521285222852328524285252852628527285282852928530285312853228533285342853528536285372853828539285402854128542285432854428545285462854728548285492855028551285522855328554285552855628557285582855928560285612856228563285642856528566285672856828569285702857128572285732857428575285762857728578285792858028581285822858328584285852858628587285882858928590285912859228593285942859528596285972859828599286002860128602286032860428605286062860728608286092861028611286122861328614286152861628617286182861928620286212862228623286242862528626286272862828629286302863128632286332863428635286362863728638286392864028641286422864328644286452864628647286482864928650286512865228653286542865528656286572865828659286602866128662286632866428665286662866728668286692867028671286722867328674286752867628677286782867928680286812868228683286842868528686286872868828689286902869128692286932869428695286962869728698286992870028701287022870328704287052870628707287082870928710287112871228713287142871528716287172871828719287202872128722287232872428725287262872728728287292873028731287322873328734287352873628737287382873928740287412874228743287442874528746287472874828749287502875128752287532875428755287562875728758287592876028761287622876328764287652876628767287682876928770287712877228773287742877528776287772877828779287802878128782287832878428785287862878728788287892879028791287922879328794287952879628797287982879928800288012880228803288042880528806288072880828809288102881128812288132881428815288162881728818288192882028821288222882328824288252882628827288282882928830288312883228833288342883528836288372883828839288402884128842288432884428845288462884728848288492885028851288522885328854288552885628857288582885928860288612886228863288642886528866288672886828869288702887128872288732887428875288762887728878288792888028881288822888328884288852888628887288882888928890288912889228893288942889528896288972889828899289002890128902289032890428905289062890728908289092891028911289122891328914289152891628917289182891928920289212892228923289242892528926289272892828929289302893128932289332893428935289362893728938289392894028941289422894328944289452894628947289482894928950289512895228953289542895528956289572895828959289602896128962289632896428965289662896728968289692897028971289722897328974289752897628977289782897928980289812898228983289842898528986289872898828989289902899128992289932899428995289962899728998289992900029001290022900329004290052900629007290082900929010290112901229013290142901529016290172901829019290202902129022290232902429025290262902729028290292903029031290322903329034290352903629037290382903929040290412904229043290442904529046290472904829049290502905129052290532905429055290562905729058290592906029061290622906329064290652906629067290682906929070290712907229073290742907529076290772907829079290802908129082290832908429085290862908729088290892909029091290922909329094290952909629097290982909929100291012910229103291042910529106291072910829109291102911129112291132911429115291162911729118291192912029121291222912329124291252912629127291282912929130291312913229133291342913529136291372913829139291402914129142291432914429145291462914729148291492915029151291522915329154291552915629157291582915929160291612916229163291642916529166291672916829169291702917129172291732917429175291762917729178291792918029181291822918329184291852918629187291882918929190291912919229193291942919529196291972919829199292002920129202292032920429205292062920729208292092921029211292122921329214292152921629217292182921929220292212922229223292242922529226292272922829229292302923129232292332923429235292362923729238292392924029241292422924329244292452924629247292482924929250292512925229253292542925529256292572925829259292602926129262292632926429265292662926729268292692927029271292722927329274292752927629277292782927929280292812928229283292842928529286292872928829289292902929129292292932929429295292962929729298292992930029301293022930329304293052930629307293082930929310293112931229313293142931529316293172931829319293202932129322293232932429325293262932729328293292933029331293322933329334293352933629337293382933929340293412934229343293442934529346293472934829349293502935129352293532935429355293562935729358293592936029361293622936329364293652936629367293682936929370293712937229373293742937529376293772937829379293802938129382293832938429385293862938729388293892939029391293922939329394293952939629397293982939929400294012940229403294042940529406294072940829409294102941129412294132941429415294162941729418294192942029421294222942329424294252942629427294282942929430294312943229433294342943529436294372943829439294402944129442294432944429445294462944729448294492945029451294522945329454294552945629457294582945929460294612946229463294642946529466294672946829469294702947129472294732947429475294762947729478294792948029481294822948329484294852948629487294882948929490294912949229493294942949529496294972949829499295002950129502295032950429505295062950729508295092951029511295122951329514295152951629517295182951929520295212952229523295242952529526295272952829529295302953129532295332953429535295362953729538295392954029541295422954329544295452954629547295482954929550295512955229553295542955529556295572955829559295602956129562295632956429565295662956729568295692957029571295722957329574295752957629577295782957929580295812958229583295842958529586295872958829589295902959129592295932959429595295962959729598295992960029601296022960329604296052960629607296082960929610296112961229613296142961529616296172961829619296202962129622296232962429625296262962729628296292963029631296322963329634296352963629637296382963929640296412964229643296442964529646296472964829649296502965129652296532965429655296562965729658296592966029661296622966329664296652966629667296682966929670296712967229673296742967529676296772967829679296802968129682296832968429685296862968729688296892969029691296922969329694296952969629697296982969929700297012970229703297042970529706297072970829709297102971129712297132971429715297162971729718297192972029721297222972329724297252972629727297282972929730297312973229733297342973529736297372973829739297402974129742297432974429745297462974729748297492975029751297522975329754297552975629757297582975929760297612976229763297642976529766297672976829769297702977129772297732977429775297762977729778297792978029781297822978329784297852978629787297882978929790297912979229793297942979529796297972979829799298002980129802298032980429805298062980729808298092981029811298122981329814298152981629817298182981929820298212982229823298242982529826298272982829829298302983129832298332983429835298362983729838298392984029841298422984329844298452984629847298482984929850298512985229853298542985529856298572985829859298602986129862298632986429865298662986729868298692987029871298722987329874298752987629877298782987929880298812988229883298842988529886298872988829889298902989129892298932989429895298962989729898298992990029901299022990329904299052990629907299082990929910299112991229913299142991529916299172991829919299202992129922299232992429925299262992729928299292993029931299322993329934299352993629937299382993929940299412994229943299442994529946299472994829949299502995129952299532995429955299562995729958299592996029961299622996329964299652996629967299682996929970299712997229973299742997529976299772997829979299802998129982299832998429985299862998729988299892999029991299922999329994299952999629997299982999930000300013000230003300043000530006300073000830009300103001130012300133001430015300163001730018300193002030021300223002330024300253002630027300283002930030300313003230033300343003530036300373003830039300403004130042300433004430045300463004730048300493005030051300523005330054300553005630057300583005930060300613006230063300643006530066300673006830069300703007130072300733007430075300763007730078300793008030081300823008330084300853008630087300883008930090300913009230093300943009530096300973009830099301003010130102301033010430105301063010730108301093011030111301123011330114301153011630117301183011930120301213012230123301243012530126301273012830129301303013130132301333013430135301363013730138301393014030141301423014330144301453014630147301483014930150301513015230153301543015530156301573015830159301603016130162301633016430165301663016730168301693017030171301723017330174301753017630177301783017930180301813018230183301843018530186301873018830189301903019130192301933019430195301963019730198301993020030201302023020330204302053020630207302083020930210302113021230213302143021530216302173021830219302203022130222302233022430225302263022730228302293023030231302323023330234302353023630237302383023930240302413024230243302443024530246302473024830249302503025130252302533025430255302563025730258302593026030261302623026330264302653026630267302683026930270302713027230273302743027530276302773027830279302803028130282302833028430285302863028730288302893029030291302923029330294302953029630297302983029930300303013030230303303043030530306303073030830309303103031130312303133031430315303163031730318303193032030321303223032330324303253032630327303283032930330303313033230333303343033530336303373033830339303403034130342303433034430345303463034730348303493035030351303523035330354303553035630357303583035930360303613036230363303643036530366303673036830369303703037130372303733037430375303763037730378303793038030381303823038330384303853038630387303883038930390303913039230393303943039530396303973039830399304003040130402304033040430405304063040730408304093041030411304123041330414304153041630417304183041930420304213042230423304243042530426304273042830429304303043130432304333043430435304363043730438304393044030441304423044330444304453044630447304483044930450304513045230453304543045530456304573045830459304603046130462304633046430465304663046730468304693047030471304723047330474304753047630477304783047930480304813048230483304843048530486304873048830489304903049130492304933049430495304963049730498304993050030501305023050330504305053050630507305083050930510305113051230513305143051530516305173051830519305203052130522305233052430525305263052730528305293053030531305323053330534305353053630537305383053930540305413054230543305443054530546305473054830549305503055130552305533055430555305563055730558305593056030561305623056330564305653056630567305683056930570305713057230573305743057530576305773057830579305803058130582305833058430585305863058730588305893059030591305923059330594305953059630597305983059930600306013060230603306043060530606306073060830609306103061130612306133061430615306163061730618306193062030621306223062330624306253062630627306283062930630306313063230633306343063530636306373063830639306403064130642306433064430645306463064730648306493065030651306523065330654306553065630657306583065930660306613066230663306643066530666306673066830669306703067130672306733067430675306763067730678306793068030681306823068330684306853068630687306883068930690306913069230693306943069530696306973069830699307003070130702307033070430705307063070730708307093071030711307123071330714307153071630717307183071930720307213072230723307243072530726307273072830729307303073130732307333073430735307363073730738307393074030741307423074330744307453074630747307483074930750307513075230753307543075530756307573075830759307603076130762307633076430765307663076730768307693077030771307723077330774307753077630777307783077930780307813078230783307843078530786307873078830789307903079130792307933079430795307963079730798307993080030801308023080330804308053080630807308083080930810308113081230813308143081530816308173081830819308203082130822308233082430825308263082730828308293083030831308323083330834308353083630837308383083930840308413084230843308443084530846308473084830849308503085130852308533085430855308563085730858308593086030861308623086330864308653086630867308683086930870308713087230873308743087530876308773087830879308803088130882308833088430885308863088730888308893089030891308923089330894308953089630897308983089930900309013090230903309043090530906309073090830909309103091130912309133091430915309163091730918309193092030921309223092330924309253092630927309283092930930309313093230933309343093530936309373093830939309403094130942309433094430945309463094730948309493095030951309523095330954309553095630957309583095930960309613096230963309643096530966309673096830969309703097130972309733097430975309763097730978309793098030981309823098330984309853098630987309883098930990309913099230993309943099530996309973099830999310003100131002310033100431005310063100731008310093101031011310123101331014310153101631017310183101931020310213102231023310243102531026310273102831029310303103131032310333103431035310363103731038310393104031041310423104331044310453104631047310483104931050310513105231053310543105531056310573105831059310603106131062310633106431065310663106731068310693107031071310723107331074310753107631077310783107931080310813108231083310843108531086310873108831089310903109131092310933109431095310963109731098310993110031101311023110331104311053110631107311083110931110311113111231113311143111531116311173111831119311203112131122311233112431125311263112731128311293113031131311323113331134311353113631137311383113931140311413114231143311443114531146311473114831149311503115131152311533115431155311563115731158311593116031161311623116331164311653116631167311683116931170311713117231173311743117531176311773117831179311803118131182311833118431185311863118731188311893119031191311923119331194311953119631197311983119931200312013120231203312043120531206312073120831209312103121131212312133121431215312163121731218312193122031221312223122331224312253122631227312283122931230312313123231233312343123531236312373123831239312403124131242312433124431245312463124731248312493125031251312523125331254312553125631257312583125931260312613126231263312643126531266312673126831269312703127131272312733127431275312763127731278312793128031281312823128331284312853128631287312883128931290312913129231293312943129531296312973129831299313003130131302313033130431305313063130731308313093131031311313123131331314313153131631317313183131931320313213132231323313243132531326313273132831329313303133131332313333133431335313363133731338313393134031341313423134331344313453134631347313483134931350313513135231353313543135531356313573135831359313603136131362313633136431365313663136731368313693137031371313723137331374313753137631377313783137931380313813138231383313843138531386313873138831389313903139131392313933139431395313963139731398313993140031401314023140331404314053140631407314083140931410314113141231413314143141531416314173141831419314203142131422314233142431425314263142731428314293143031431314323143331434314353143631437314383143931440314413144231443314443144531446314473144831449314503145131452314533145431455314563145731458314593146031461314623146331464314653146631467314683146931470314713147231473314743147531476314773147831479314803148131482314833148431485314863148731488314893149031491314923149331494314953149631497314983149931500315013150231503315043150531506315073150831509315103151131512315133151431515315163151731518315193152031521315223152331524315253152631527315283152931530315313153231533315343153531536315373153831539315403154131542315433154431545315463154731548315493155031551315523155331554315553155631557315583155931560315613156231563315643156531566315673156831569315703157131572315733157431575315763157731578315793158031581315823158331584315853158631587315883158931590315913159231593315943159531596315973159831599316003160131602316033160431605316063160731608316093161031611316123161331614316153161631617316183161931620316213162231623316243162531626316273162831629316303163131632316333163431635316363163731638316393164031641316423164331644316453164631647316483164931650316513165231653316543165531656316573165831659316603166131662316633166431665316663166731668316693167031671316723167331674316753167631677316783167931680316813168231683316843168531686316873168831689316903169131692316933169431695316963169731698316993170031701317023170331704317053170631707317083170931710317113171231713317143171531716317173171831719317203172131722317233172431725317263172731728317293173031731317323173331734317353173631737317383173931740317413174231743317443174531746317473174831749317503175131752317533175431755317563175731758317593176031761317623176331764317653176631767317683176931770317713177231773317743177531776317773177831779317803178131782317833178431785317863178731788317893179031791317923179331794317953179631797317983179931800318013180231803318043180531806318073180831809318103181131812318133181431815318163181731818318193182031821318223182331824318253182631827318283182931830318313183231833318343183531836318373183831839318403184131842318433184431845318463184731848318493185031851318523185331854318553185631857318583185931860318613186231863318643186531866318673186831869318703187131872318733187431875318763187731878318793188031881318823188331884318853188631887318883188931890318913189231893318943189531896318973189831899319003190131902319033190431905319063190731908319093191031911319123191331914319153191631917319183191931920319213192231923319243192531926319273192831929319303193131932319333193431935319363193731938319393194031941319423194331944319453194631947319483194931950319513195231953319543195531956319573195831959319603196131962319633196431965319663196731968319693197031971319723197331974319753197631977319783197931980319813198231983319843198531986319873198831989319903199131992319933199431995319963199731998319993200032001320023200332004320053200632007320083200932010320113201232013320143201532016320173201832019320203202132022320233202432025320263202732028320293203032031320323203332034320353203632037320383203932040320413204232043320443204532046320473204832049320503205132052320533205432055320563205732058320593206032061320623206332064320653206632067320683206932070320713207232073320743207532076320773207832079320803208132082320833208432085320863208732088320893209032091320923209332094320953209632097320983209932100321013210232103321043210532106321073210832109321103211132112321133211432115321163211732118321193212032121321223212332124321253212632127321283212932130321313213232133321343213532136321373213832139321403214132142321433214432145321463214732148321493215032151321523215332154321553215632157321583215932160321613216232163321643216532166321673216832169321703217132172321733217432175321763217732178321793218032181321823218332184321853218632187321883218932190321913219232193321943219532196321973219832199322003220132202322033220432205322063220732208322093221032211322123221332214322153221632217322183221932220322213222232223322243222532226322273222832229322303223132232322333223432235322363223732238322393224032241322423224332244322453224632247322483224932250322513225232253322543225532256322573225832259322603226132262322633226432265322663226732268322693227032271322723227332274322753227632277322783227932280322813228232283322843228532286322873228832289322903229132292322933229432295322963229732298322993230032301323023230332304323053230632307323083230932310323113231232313323143231532316323173231832319323203232132322323233232432325323263232732328323293233032331323323233332334323353233632337323383233932340323413234232343323443234532346323473234832349323503235132352323533235432355323563235732358323593236032361323623236332364323653236632367323683236932370323713237232373323743237532376323773237832379323803238132382323833238432385323863238732388323893239032391323923239332394323953239632397323983239932400324013240232403324043240532406324073240832409324103241132412324133241432415324163241732418324193242032421324223242332424324253242632427324283242932430324313243232433324343243532436324373243832439324403244132442324433244432445324463244732448324493245032451324523245332454324553245632457324583245932460324613246232463324643246532466324673246832469324703247132472324733247432475324763247732478324793248032481324823248332484324853248632487324883248932490324913249232493324943249532496324973249832499325003250132502325033250432505325063250732508325093251032511325123251332514325153251632517325183251932520325213252232523325243252532526325273252832529325303253132532325333253432535325363253732538325393254032541325423254332544325453254632547325483254932550325513255232553325543255532556325573255832559325603256132562325633256432565325663256732568325693257032571325723257332574325753257632577325783257932580325813258232583325843258532586325873258832589325903259132592325933259432595325963259732598325993260032601326023260332604326053260632607326083260932610326113261232613326143261532616326173261832619326203262132622326233262432625326263262732628326293263032631326323263332634326353263632637326383263932640326413264232643326443264532646326473264832649326503265132652326533265432655326563265732658326593266032661326623266332664326653266632667326683266932670326713267232673326743267532676326773267832679326803268132682326833268432685326863268732688326893269032691326923269332694326953269632697326983269932700327013270232703327043270532706327073270832709327103271132712327133271432715327163271732718327193272032721327223272332724327253272632727327283272932730327313273232733327343273532736327373273832739327403274132742327433274432745327463274732748327493275032751327523275332754327553275632757327583275932760327613276232763327643276532766327673276832769327703277132772327733277432775327763277732778327793278032781327823278332784327853278632787327883278932790327913279232793327943279532796327973279832799328003280132802328033280432805328063280732808328093281032811328123281332814328153281632817328183281932820328213282232823328243282532826328273282832829328303283132832328333283432835328363283732838328393284032841328423284332844328453284632847328483284932850328513285232853328543285532856328573285832859328603286132862328633286432865328663286732868328693287032871328723287332874328753287632877328783287932880328813288232883328843288532886328873288832889328903289132892328933289432895328963289732898328993290032901329023290332904329053290632907329083290932910329113291232913329143291532916329173291832919329203292132922329233292432925329263292732928329293293032931329323293332934329353293632937329383293932940329413294232943329443294532946329473294832949329503295132952329533295432955329563295732958329593296032961329623296332964329653296632967329683296932970329713297232973329743297532976329773297832979329803298132982329833298432985329863298732988329893299032991329923299332994329953299632997329983299933000330013300233003330043300533006330073300833009330103301133012330133301433015330163301733018330193302033021330223302333024330253302633027330283302933030330313303233033330343303533036330373303833039330403304133042330433304433045330463304733048330493305033051330523305333054330553305633057330583305933060330613306233063330643306533066330673306833069330703307133072330733307433075330763307733078330793308033081330823308333084330853308633087330883308933090330913309233093330943309533096330973309833099331003310133102331033310433105331063310733108331093311033111331123311333114331153311633117331183311933120331213312233123331243312533126331273312833129331303313133132331333313433135331363313733138331393314033141331423314333144331453314633147331483314933150331513315233153331543315533156331573315833159331603316133162331633316433165331663316733168331693317033171331723317333174331753317633177331783317933180331813318233183331843318533186331873318833189331903319133192331933319433195331963319733198331993320033201332023320333204332053320633207332083320933210332113321233213332143321533216332173321833219332203322133222332233322433225332263322733228332293323033231332323323333234332353323633237332383323933240332413324233243332443324533246332473324833249332503325133252332533325433255332563325733258332593326033261332623326333264332653326633267332683326933270332713327233273332743327533276332773327833279332803328133282332833328433285332863328733288332893329033291332923329333294332953329633297332983329933300333013330233303333043330533306333073330833309333103331133312333133331433315333163331733318333193332033321333223332333324333253332633327333283332933330333313333233333333343333533336333373333833339333403334133342333433334433345333463334733348333493335033351333523335333354333553335633357333583335933360333613336233363333643336533366333673336833369333703337133372333733337433375333763337733378333793338033381333823338333384333853338633387333883338933390333913339233393333943339533396333973339833399334003340133402334033340433405334063340733408334093341033411334123341333414334153341633417334183341933420334213342233423334243342533426334273342833429334303343133432334333343433435334363343733438334393344033441334423344333444334453344633447334483344933450334513345233453334543345533456334573345833459334603346133462334633346433465334663346733468334693347033471334723347333474334753347633477334783347933480334813348233483334843348533486334873348833489334903349133492334933349433495334963349733498334993350033501335023350333504335053350633507335083350933510335113351233513335143351533516335173351833519335203352133522335233352433525335263352733528335293353033531335323353333534335353353633537335383353933540335413354233543335443354533546335473354833549335503355133552335533355433555335563355733558335593356033561335623356333564335653356633567335683356933570335713357233573335743357533576335773357833579335803358133582335833358433585335863358733588335893359033591335923359333594335953359633597335983359933600336013360233603336043360533606336073360833609336103361133612336133361433615336163361733618336193362033621336223362333624336253362633627336283362933630336313363233633336343363533636336373363833639336403364133642336433364433645336463364733648336493365033651336523365333654336553365633657336583365933660336613366233663336643366533666336673366833669336703367133672336733367433675336763367733678336793368033681336823368333684336853368633687336883368933690336913369233693336943369533696336973369833699337003370133702337033370433705337063370733708337093371033711337123371333714337153371633717337183371933720337213372233723337243372533726337273372833729337303373133732337333373433735337363373733738337393374033741337423374333744337453374633747337483374933750337513375233753337543375533756337573375833759337603376133762337633376433765337663376733768337693377033771337723377333774337753377633777337783377933780337813378233783337843378533786337873378833789337903379133792337933379433795337963379733798337993380033801338023380333804338053380633807338083380933810338113381233813338143381533816338173381833819338203382133822338233382433825338263382733828338293383033831338323383333834338353383633837338383383933840338413384233843338443384533846338473384833849338503385133852338533385433855338563385733858338593386033861338623386333864338653386633867338683386933870338713387233873338743387533876338773387833879338803388133882338833388433885338863388733888338893389033891338923389333894338953389633897338983389933900339013390233903339043390533906339073390833909339103391133912339133391433915339163391733918339193392033921339223392333924339253392633927339283392933930339313393233933339343393533936339373393833939339403394133942339433394433945339463394733948339493395033951339523395333954339553395633957339583395933960339613396233963339643396533966339673396833969339703397133972339733397433975339763397733978339793398033981339823398333984339853398633987339883398933990339913399233993339943399533996339973399833999340003400134002340033400434005340063400734008340093401034011340123401334014340153401634017340183401934020340213402234023340243402534026340273402834029340303403134032340333403434035340363403734038340393404034041340423404334044340453404634047340483404934050340513405234053340543405534056340573405834059340603406134062340633406434065340663406734068340693407034071340723407334074340753407634077340783407934080340813408234083340843408534086340873408834089340903409134092340933409434095340963409734098340993410034101341023410334104341053410634107341083410934110341113411234113341143411534116341173411834119341203412134122341233412434125341263412734128341293413034131341323413334134341353413634137341383413934140341413414234143341443414534146341473414834149341503415134152341533415434155341563415734158341593416034161341623416334164341653416634167341683416934170341713417234173341743417534176341773417834179341803418134182341833418434185341863418734188341893419034191341923419334194341953419634197341983419934200342013420234203342043420534206342073420834209342103421134212342133421434215342163421734218342193422034221342223422334224342253422634227342283422934230342313423234233342343423534236342373423834239342403424134242342433424434245342463424734248342493425034251342523425334254342553425634257342583425934260342613426234263342643426534266342673426834269342703427134272342733427434275342763427734278342793428034281342823428334284342853428634287342883428934290342913429234293342943429534296342973429834299343003430134302343033430434305343063430734308343093431034311343123431334314343153431634317343183431934320343213432234323343243432534326343273432834329343303433134332343333433434335343363433734338343393434034341343423434334344343453434634347343483434934350343513435234353343543435534356343573435834359343603436134362343633436434365343663436734368343693437034371343723437334374343753437634377343783437934380343813438234383343843438534386343873438834389343903439134392343933439434395343963439734398343993440034401344023440334404344053440634407344083440934410344113441234413344143441534416344173441834419344203442134422344233442434425344263442734428344293443034431344323443334434344353443634437344383443934440344413444234443344443444534446344473444834449344503445134452344533445434455344563445734458344593446034461344623446334464344653446634467344683446934470344713447234473344743447534476344773447834479344803448134482344833448434485344863448734488344893449034491344923449334494344953449634497344983449934500345013450234503345043450534506345073450834509345103451134512345133451434515345163451734518345193452034521345223452334524345253452634527345283452934530345313453234533345343453534536345373453834539345403454134542345433454434545345463454734548345493455034551345523455334554345553455634557345583455934560345613456234563345643456534566345673456834569345703457134572345733457434575345763457734578345793458034581345823458334584345853458634587345883458934590345913459234593345943459534596345973459834599346003460134602346033460434605346063460734608346093461034611346123461334614346153461634617346183461934620346213462234623346243462534626346273462834629346303463134632346333463434635346363463734638346393464034641346423464334644346453464634647346483464934650346513465234653346543465534656346573465834659346603466134662346633466434665346663466734668346693467034671346723467334674346753467634677346783467934680346813468234683346843468534686346873468834689346903469134692346933469434695346963469734698346993470034701347023470334704347053470634707347083470934710347113471234713347143471534716347173471834719347203472134722347233472434725347263472734728347293473034731347323473334734347353473634737347383473934740347413474234743347443474534746347473474834749347503475134752347533475434755347563475734758347593476034761347623476334764347653476634767347683476934770347713477234773347743477534776347773477834779347803478134782347833478434785347863478734788347893479034791347923479334794347953479634797347983479934800348013480234803348043480534806348073480834809348103481134812348133481434815348163481734818348193482034821348223482334824348253482634827348283482934830348313483234833348343483534836348373483834839348403484134842348433484434845348463484734848348493485034851348523485334854348553485634857348583485934860348613486234863348643486534866348673486834869348703487134872348733487434875348763487734878348793488034881348823488334884348853488634887348883488934890348913489234893348943489534896348973489834899349003490134902349033490434905349063490734908349093491034911349123491334914349153491634917349183491934920349213492234923349243492534926349273492834929349303493134932349333493434935349363493734938349393494034941349423494334944349453494634947349483494934950349513495234953349543495534956349573495834959349603496134962349633496434965349663496734968349693497034971349723497334974349753497634977349783497934980349813498234983349843498534986349873498834989349903499134992349933499434995349963499734998349993500035001350023500335004350053500635007350083500935010350113501235013350143501535016350173501835019350203502135022350233502435025350263502735028350293503035031350323503335034350353503635037350383503935040350413504235043350443504535046350473504835049350503505135052350533505435055350563505735058350593506035061350623506335064350653506635067350683506935070350713507235073350743507535076350773507835079350803508135082350833508435085350863508735088350893509035091350923509335094350953509635097350983509935100351013510235103351043510535106351073510835109351103511135112351133511435115351163511735118351193512035121351223512335124351253512635127351283512935130351313513235133351343513535136351373513835139351403514135142351433514435145351463514735148351493515035151351523515335154351553515635157351583515935160351613516235163351643516535166351673516835169351703517135172351733517435175351763517735178351793518035181351823518335184351853518635187351883518935190351913519235193351943519535196351973519835199352003520135202352033520435205352063520735208352093521035211352123521335214352153521635217352183521935220352213522235223352243522535226352273522835229352303523135232352333523435235352363523735238352393524035241352423524335244352453524635247352483524935250352513525235253352543525535256352573525835259352603526135262352633526435265352663526735268352693527035271352723527335274352753527635277352783527935280352813528235283352843528535286352873528835289352903529135292352933529435295352963529735298352993530035301353023530335304353053530635307353083530935310353113531235313353143531535316353173531835319353203532135322353233532435325353263532735328353293533035331353323533335334353353533635337353383533935340353413534235343353443534535346353473534835349353503535135352353533535435355353563535735358353593536035361353623536335364353653536635367353683536935370353713537235373353743537535376353773537835379353803538135382353833538435385353863538735388353893539035391353923539335394353953539635397353983539935400354013540235403354043540535406354073540835409354103541135412354133541435415354163541735418354193542035421354223542335424354253542635427354283542935430354313543235433354343543535436354373543835439354403544135442354433544435445354463544735448354493545035451354523545335454354553545635457354583545935460354613546235463354643546535466354673546835469354703547135472354733547435475354763547735478354793548035481354823548335484354853548635487354883548935490354913549235493354943549535496354973549835499355003550135502355033550435505355063550735508355093551035511355123551335514355153551635517355183551935520355213552235523355243552535526355273552835529355303553135532355333553435535355363553735538355393554035541355423554335544355453554635547355483554935550355513555235553355543555535556355573555835559355603556135562355633556435565355663556735568355693557035571355723557335574355753557635577355783557935580355813558235583355843558535586355873558835589355903559135592355933559435595355963559735598355993560035601356023560335604356053560635607356083560935610356113561235613356143561535616356173561835619356203562135622356233562435625356263562735628356293563035631356323563335634356353563635637356383563935640356413564235643356443564535646356473564835649356503565135652356533565435655356563565735658356593566035661356623566335664356653566635667356683566935670356713567235673356743567535676356773567835679356803568135682356833568435685356863568735688356893569035691356923569335694356953569635697356983569935700357013570235703357043570535706357073570835709357103571135712357133571435715357163571735718357193572035721357223572335724357253572635727357283572935730357313573235733357343573535736357373573835739357403574135742357433574435745357463574735748357493575035751357523575335754357553575635757357583575935760357613576235763357643576535766357673576835769357703577135772357733577435775357763577735778357793578035781357823578335784357853578635787357883578935790357913579235793357943579535796357973579835799358003580135802358033580435805358063580735808358093581035811358123581335814358153581635817358183581935820358213582235823358243582535826358273582835829358303583135832358333583435835358363583735838358393584035841358423584335844358453584635847358483584935850358513585235853358543585535856358573585835859358603586135862358633586435865358663586735868358693587035871358723587335874358753587635877358783587935880358813588235883358843588535886358873588835889358903589135892358933589435895358963589735898358993590035901359023590335904359053590635907359083590935910359113591235913359143591535916359173591835919359203592135922359233592435925359263592735928359293593035931359323593335934359353593635937359383593935940359413594235943359443594535946359473594835949359503595135952359533595435955359563595735958359593596035961359623596335964359653596635967359683596935970359713597235973359743597535976359773597835979359803598135982359833598435985359863598735988359893599035991359923599335994359953599635997359983599936000360013600236003360043600536006360073600836009360103601136012360133601436015360163601736018360193602036021360223602336024360253602636027360283602936030360313603236033360343603536036360373603836039360403604136042360433604436045360463604736048360493605036051360523605336054360553605636057360583605936060360613606236063360643606536066360673606836069360703607136072360733607436075360763607736078360793608036081360823608336084360853608636087360883608936090360913609236093360943609536096360973609836099361003610136102361033610436105361063610736108361093611036111361123611336114361153611636117361183611936120361213612236123361243612536126361273612836129361303613136132361333613436135361363613736138361393614036141361423614336144361453614636147361483614936150361513615236153361543615536156361573615836159361603616136162361633616436165361663616736168361693617036171361723617336174361753617636177361783617936180361813618236183361843618536186361873618836189361903619136192361933619436195361963619736198361993620036201362023620336204362053620636207362083620936210362113621236213362143621536216362173621836219362203622136222362233622436225362263622736228362293623036231362323623336234362353623636237362383623936240362413624236243362443624536246362473624836249362503625136252362533625436255362563625736258362593626036261362623626336264362653626636267362683626936270362713627236273362743627536276362773627836279362803628136282362833628436285362863628736288362893629036291362923629336294362953629636297362983629936300363013630236303363043630536306363073630836309363103631136312363133631436315363163631736318363193632036321363223632336324363253632636327363283632936330363313633236333363343633536336363373633836339363403634136342363433634436345363463634736348363493635036351363523635336354363553635636357363583635936360363613636236363363643636536366363673636836369363703637136372363733637436375363763637736378363793638036381363823638336384363853638636387363883638936390363913639236393363943639536396363973639836399364003640136402364033640436405364063640736408364093641036411364123641336414364153641636417364183641936420364213642236423364243642536426364273642836429364303643136432364333643436435364363643736438364393644036441364423644336444364453644636447364483644936450364513645236453364543645536456364573645836459364603646136462364633646436465364663646736468364693647036471364723647336474364753647636477364783647936480364813648236483364843648536486364873648836489364903649136492364933649436495364963649736498364993650036501365023650336504365053650636507365083650936510365113651236513365143651536516365173651836519365203652136522365233652436525365263652736528365293653036531365323653336534365353653636537365383653936540365413654236543365443654536546365473654836549365503655136552365533655436555365563655736558365593656036561365623656336564365653656636567365683656936570365713657236573365743657536576365773657836579365803658136582365833658436585365863658736588365893659036591365923659336594365953659636597365983659936600366013660236603366043660536606366073660836609366103661136612366133661436615366163661736618366193662036621366223662336624366253662636627366283662936630366313663236633366343663536636366373663836639366403664136642366433664436645366463664736648366493665036651366523665336654366553665636657366583665936660366613666236663366643666536666366673666836669366703667136672366733667436675366763667736678366793668036681366823668336684366853668636687366883668936690366913669236693366943669536696366973669836699367003670136702367033670436705367063670736708367093671036711367123671336714367153671636717367183671936720367213672236723367243672536726367273672836729367303673136732367333673436735367363673736738367393674036741367423674336744367453674636747367483674936750367513675236753367543675536756367573675836759367603676136762367633676436765367663676736768367693677036771367723677336774367753677636777367783677936780367813678236783367843678536786367873678836789367903679136792367933679436795367963679736798367993680036801368023680336804368053680636807368083680936810368113681236813368143681536816368173681836819368203682136822368233682436825368263682736828368293683036831368323683336834368353683636837368383683936840368413684236843368443684536846368473684836849368503685136852368533685436855368563685736858368593686036861368623686336864368653686636867368683686936870368713687236873368743687536876368773687836879368803688136882368833688436885368863688736888368893689036891368923689336894368953689636897368983689936900369013690236903369043690536906369073690836909369103691136912369133691436915369163691736918369193692036921369223692336924369253692636927369283692936930369313693236933369343693536936369373693836939369403694136942369433694436945369463694736948369493695036951369523695336954369553695636957369583695936960369613696236963369643696536966369673696836969369703697136972369733697436975369763697736978369793698036981369823698336984369853698636987369883698936990369913699236993369943699536996369973699836999370003700137002370033700437005370063700737008370093701037011370123701337014370153701637017370183701937020370213702237023370243702537026370273702837029370303703137032370333703437035370363703737038370393704037041370423704337044370453704637047370483704937050370513705237053370543705537056370573705837059370603706137062370633706437065370663706737068370693707037071370723707337074370753707637077370783707937080370813708237083370843708537086370873708837089370903709137092370933709437095370963709737098370993710037101371023710337104371053710637107371083710937110371113711237113371143711537116371173711837119371203712137122371233712437125371263712737128371293713037131371323713337134371353713637137371383713937140371413714237143371443714537146371473714837149371503715137152371533715437155371563715737158371593716037161371623716337164371653716637167371683716937170371713717237173371743717537176371773717837179371803718137182371833718437185371863718737188371893719037191371923719337194371953719637197371983719937200372013720237203372043720537206372073720837209372103721137212372133721437215372163721737218372193722037221372223722337224372253722637227372283722937230372313723237233372343723537236372373723837239372403724137242372433724437245372463724737248372493725037251372523725337254372553725637257372583725937260372613726237263372643726537266372673726837269372703727137272372733727437275372763727737278372793728037281372823728337284372853728637287372883728937290372913729237293372943729537296372973729837299373003730137302373033730437305373063730737308373093731037311373123731337314373153731637317373183731937320373213732237323373243732537326373273732837329373303733137332373333733437335373363733737338373393734037341373423734337344373453734637347373483734937350373513735237353373543735537356373573735837359373603736137362373633736437365373663736737368373693737037371373723737337374373753737637377373783737937380373813738237383373843738537386373873738837389373903739137392373933739437395373963739737398373993740037401374023740337404374053740637407374083740937410374113741237413374143741537416374173741837419374203742137422374233742437425374263742737428374293743037431374323743337434374353743637437374383743937440374413744237443374443744537446374473744837449374503745137452374533745437455374563745737458374593746037461374623746337464374653746637467374683746937470374713747237473374743747537476374773747837479374803748137482374833748437485374863748737488374893749037491374923749337494374953749637497374983749937500375013750237503375043750537506375073750837509375103751137512375133751437515375163751737518375193752037521375223752337524375253752637527375283752937530375313753237533375343753537536375373753837539375403754137542375433754437545375463754737548375493755037551375523755337554375553755637557375583755937560375613756237563375643756537566375673756837569375703757137572375733757437575375763757737578375793758037581375823758337584375853758637587375883758937590375913759237593375943759537596375973759837599376003760137602376033760437605376063760737608376093761037611376123761337614376153761637617376183761937620376213762237623376243762537626376273762837629376303763137632376333763437635376363763737638376393764037641376423764337644376453764637647376483764937650376513765237653376543765537656376573765837659376603766137662376633766437665376663766737668376693767037671376723767337674376753767637677376783767937680376813768237683376843768537686376873768837689376903769137692376933769437695376963769737698376993770037701377023770337704377053770637707377083770937710377113771237713377143771537716377173771837719377203772137722377233772437725377263772737728377293773037731377323773337734377353773637737377383773937740377413774237743377443774537746377473774837749377503775137752377533775437755377563775737758377593776037761377623776337764377653776637767377683776937770377713777237773377743777537776377773777837779377803778137782377833778437785377863778737788377893779037791377923779337794377953779637797377983779937800378013780237803378043780537806378073780837809378103781137812378133781437815378163781737818378193782037821378223782337824378253782637827378283782937830378313783237833378343783537836378373783837839378403784137842378433784437845378463784737848378493785037851378523785337854378553785637857378583785937860378613786237863378643786537866378673786837869378703787137872378733787437875378763787737878378793788037881378823788337884378853788637887378883788937890378913789237893378943789537896378973789837899379003790137902379033790437905379063790737908379093791037911379123791337914379153791637917379183791937920379213792237923379243792537926379273792837929379303793137932379333793437935379363793737938379393794037941379423794337944379453794637947379483794937950379513795237953379543795537956379573795837959379603796137962379633796437965379663796737968379693797037971379723797337974379753797637977379783797937980379813798237983379843798537986379873798837989379903799137992379933799437995379963799737998379993800038001380023800338004380053800638007380083800938010380113801238013380143801538016380173801838019380203802138022380233802438025380263802738028380293803038031380323803338034380353803638037380383803938040380413804238043380443804538046380473804838049380503805138052380533805438055380563805738058380593806038061380623806338064380653806638067380683806938070380713807238073380743807538076380773807838079380803808138082380833808438085380863808738088380893809038091380923809338094380953809638097380983809938100381013810238103381043810538106381073810838109381103811138112381133811438115381163811738118381193812038121381223812338124381253812638127381283812938130381313813238133381343813538136381373813838139381403814138142381433814438145381463814738148381493815038151381523815338154381553815638157381583815938160381613816238163381643816538166381673816838169381703817138172381733817438175381763817738178381793818038181381823818338184381853818638187381883818938190381913819238193381943819538196381973819838199382003820138202382033820438205382063820738208382093821038211382123821338214382153821638217382183821938220382213822238223382243822538226382273822838229382303823138232382333823438235382363823738238382393824038241382423824338244382453824638247382483824938250382513825238253382543825538256382573825838259382603826138262382633826438265382663826738268382693827038271382723827338274382753827638277382783827938280382813828238283382843828538286382873828838289382903829138292382933829438295382963829738298382993830038301383023830338304383053830638307383083830938310383113831238313383143831538316383173831838319383203832138322383233832438325383263832738328383293833038331383323833338334383353833638337383383833938340383413834238343383443834538346383473834838349383503835138352383533835438355383563835738358383593836038361383623836338364383653836638367383683836938370383713837238373383743837538376383773837838379383803838138382383833838438385383863838738388383893839038391383923839338394383953839638397383983839938400384013840238403384043840538406384073840838409384103841138412384133841438415384163841738418384193842038421384223842338424384253842638427384283842938430384313843238433384343843538436384373843838439384403844138442384433844438445384463844738448384493845038451384523845338454384553845638457384583845938460384613846238463384643846538466384673846838469384703847138472384733847438475384763847738478384793848038481384823848338484384853848638487384883848938490384913849238493384943849538496384973849838499385003850138502385033850438505385063850738508385093851038511385123851338514385153851638517385183851938520385213852238523385243852538526385273852838529385303853138532385333853438535385363853738538385393854038541385423854338544385453854638547385483854938550385513855238553385543855538556385573855838559385603856138562385633856438565385663856738568385693857038571385723857338574385753857638577385783857938580385813858238583385843858538586385873858838589385903859138592385933859438595385963859738598385993860038601386023860338604386053860638607386083860938610386113861238613386143861538616386173861838619386203862138622386233862438625386263862738628386293863038631386323863338634386353863638637386383863938640386413864238643386443864538646386473864838649386503865138652386533865438655386563865738658386593866038661386623866338664386653866638667386683866938670386713867238673386743867538676386773867838679386803868138682386833868438685386863868738688386893869038691386923869338694386953869638697386983869938700387013870238703387043870538706387073870838709387103871138712387133871438715387163871738718387193872038721387223872338724387253872638727387283872938730387313873238733387343873538736387373873838739387403874138742387433874438745387463874738748387493875038751387523875338754387553875638757387583875938760387613876238763387643876538766387673876838769387703877138772387733877438775387763877738778387793878038781387823878338784387853878638787387883878938790387913879238793387943879538796387973879838799388003880138802388033880438805388063880738808388093881038811388123881338814388153881638817388183881938820388213882238823388243882538826388273882838829388303883138832388333883438835388363883738838388393884038841388423884338844388453884638847388483884938850388513885238853388543885538856388573885838859388603886138862388633886438865388663886738868388693887038871388723887338874388753887638877388783887938880388813888238883388843888538886388873888838889388903889138892388933889438895388963889738898388993890038901389023890338904389053890638907389083890938910389113891238913389143891538916389173891838919389203892138922389233892438925389263892738928389293893038931389323893338934389353893638937389383893938940389413894238943389443894538946389473894838949389503895138952389533895438955389563895738958389593896038961389623896338964389653896638967389683896938970389713897238973389743897538976389773897838979389803898138982389833898438985389863898738988389893899038991389923899338994389953899638997389983899939000390013900239003390043900539006390073900839009390103901139012390133901439015390163901739018390193902039021390223902339024390253902639027390283902939030390313903239033390343903539036390373903839039390403904139042390433904439045390463904739048390493905039051390523905339054390553905639057390583905939060390613906239063390643906539066390673906839069390703907139072390733907439075390763907739078390793908039081390823908339084390853908639087390883908939090390913909239093390943909539096390973909839099391003910139102391033910439105391063910739108391093911039111391123911339114391153911639117391183911939120391213912239123391243912539126391273912839129391303913139132391333913439135391363913739138391393914039141391423914339144391453914639147391483914939150391513915239153391543915539156391573915839159391603916139162391633916439165391663916739168391693917039171391723917339174391753917639177391783917939180391813918239183391843918539186391873918839189391903919139192391933919439195391963919739198391993920039201392023920339204392053920639207392083920939210392113921239213392143921539216392173921839219392203922139222392233922439225392263922739228392293923039231392323923339234392353923639237392383923939240392413924239243392443924539246392473924839249392503925139252392533925439255392563925739258392593926039261392623926339264392653926639267392683926939270392713927239273392743927539276392773927839279392803928139282392833928439285392863928739288392893929039291392923929339294392953929639297392983929939300393013930239303393043930539306393073930839309393103931139312393133931439315393163931739318393193932039321393223932339324393253932639327393283932939330393313933239333393343933539336393373933839339393403934139342393433934439345393463934739348393493935039351393523935339354393553935639357393583935939360393613936239363393643936539366393673936839369393703937139372393733937439375393763937739378393793938039381393823938339384393853938639387393883938939390393913939239393393943939539396393973939839399394003940139402394033940439405394063940739408394093941039411394123941339414394153941639417394183941939420394213942239423394243942539426394273942839429394303943139432394333943439435394363943739438394393944039441394423944339444394453944639447394483944939450394513945239453394543945539456394573945839459394603946139462394633946439465394663946739468394693947039471394723947339474394753947639477394783947939480394813948239483394843948539486394873948839489394903949139492394933949439495394963949739498394993950039501395023950339504395053950639507395083950939510395113951239513395143951539516395173951839519395203952139522395233952439525395263952739528395293953039531395323953339534395353953639537395383953939540395413954239543395443954539546395473954839549395503955139552395533955439555395563955739558395593956039561395623956339564395653956639567395683956939570395713957239573395743957539576395773957839579395803958139582395833958439585395863958739588395893959039591395923959339594395953959639597395983959939600396013960239603396043960539606396073960839609396103961139612396133961439615396163961739618396193962039621396223962339624396253962639627396283962939630396313963239633396343963539636396373963839639396403964139642396433964439645396463964739648396493965039651396523965339654396553965639657396583965939660396613966239663396643966539666396673966839669396703967139672396733967439675396763967739678396793968039681396823968339684396853968639687396883968939690396913969239693396943969539696396973969839699397003970139702397033970439705397063970739708397093971039711397123971339714397153971639717397183971939720397213972239723397243972539726397273972839729397303973139732397333973439735397363973739738397393974039741397423974339744397453974639747397483974939750397513975239753397543975539756397573975839759397603976139762397633976439765397663976739768397693977039771397723977339774397753977639777397783977939780397813978239783397843978539786397873978839789397903979139792397933979439795397963979739798397993980039801398023980339804398053980639807398083980939810398113981239813398143981539816398173981839819398203982139822398233982439825398263982739828398293983039831398323983339834398353983639837398383983939840398413984239843398443984539846398473984839849398503985139852398533985439855398563985739858398593986039861398623986339864398653986639867398683986939870398713987239873398743987539876398773987839879398803988139882398833988439885398863988739888398893989039891398923989339894398953989639897398983989939900399013990239903399043990539906399073990839909399103991139912399133991439915399163991739918399193992039921399223992339924399253992639927399283992939930399313993239933399343993539936399373993839939399403994139942399433994439945399463994739948399493995039951399523995339954399553995639957399583995939960399613996239963399643996539966399673996839969399703997139972399733997439975399763997739978399793998039981399823998339984399853998639987399883998939990399913999239993399943999539996399973999839999400004000140002400034000440005400064000740008400094001040011400124001340014400154001640017400184001940020400214002240023400244002540026400274002840029400304003140032400334003440035400364003740038400394004040041400424004340044400454004640047400484004940050400514005240053400544005540056400574005840059400604006140062400634006440065400664006740068400694007040071400724007340074400754007640077400784007940080400814008240083400844008540086400874008840089400904009140092400934009440095400964009740098400994010040101401024010340104401054010640107401084010940110401114011240113401144011540116401174011840119401204012140122401234012440125401264012740128401294013040131401324013340134401354013640137401384013940140401414014240143401444014540146401474014840149401504015140152401534015440155401564015740158401594016040161401624016340164401654016640167401684016940170401714017240173401744017540176401774017840179401804018140182401834018440185401864018740188401894019040191401924019340194401954019640197401984019940200402014020240203402044020540206402074020840209402104021140212402134021440215402164021740218402194022040221402224022340224402254022640227402284022940230402314023240233402344023540236402374023840239402404024140242402434024440245402464024740248402494025040251402524025340254402554025640257402584025940260402614026240263402644026540266402674026840269402704027140272402734027440275402764027740278402794028040281402824028340284402854028640287402884028940290402914029240293402944029540296402974029840299403004030140302403034030440305403064030740308403094031040311403124031340314403154031640317403184031940320403214032240323403244032540326403274032840329403304033140332403334033440335403364033740338403394034040341403424034340344403454034640347403484034940350403514035240353403544035540356403574035840359403604036140362403634036440365403664036740368403694037040371403724037340374403754037640377403784037940380403814038240383403844038540386403874038840389403904039140392403934039440395403964039740398403994040040401404024040340404404054040640407404084040940410404114041240413404144041540416404174041840419404204042140422404234042440425404264042740428404294043040431404324043340434404354043640437404384043940440404414044240443404444044540446404474044840449404504045140452404534045440455404564045740458404594046040461404624046340464404654046640467404684046940470404714047240473404744047540476404774047840479404804048140482404834048440485404864048740488404894049040491404924049340494404954049640497404984049940500405014050240503405044050540506405074050840509405104051140512405134051440515405164051740518405194052040521405224052340524405254052640527405284052940530405314053240533405344053540536405374053840539405404054140542405434054440545405464054740548405494055040551405524055340554405554055640557405584055940560405614056240563405644056540566405674056840569405704057140572405734057440575405764057740578405794058040581405824058340584405854058640587405884058940590405914059240593405944059540596405974059840599406004060140602406034060440605406064060740608406094061040611406124061340614406154061640617406184061940620406214062240623406244062540626406274062840629406304063140632406334063440635406364063740638406394064040641406424064340644406454064640647406484064940650406514065240653406544065540656406574065840659406604066140662406634066440665406664066740668406694067040671406724067340674406754067640677406784067940680406814068240683406844068540686406874068840689406904069140692406934069440695406964069740698406994070040701407024070340704407054070640707407084070940710407114071240713407144071540716407174071840719407204072140722407234072440725407264072740728407294073040731407324073340734407354073640737407384073940740407414074240743407444074540746407474074840749407504075140752407534075440755407564075740758407594076040761407624076340764407654076640767407684076940770407714077240773407744077540776407774077840779407804078140782407834078440785407864078740788407894079040791407924079340794407954079640797407984079940800408014080240803408044080540806408074080840809408104081140812408134081440815408164081740818408194082040821408224082340824408254082640827408284082940830408314083240833408344083540836408374083840839408404084140842408434084440845408464084740848408494085040851408524085340854408554085640857408584085940860408614086240863408644086540866408674086840869408704087140872408734087440875408764087740878408794088040881408824088340884408854088640887408884088940890408914089240893408944089540896408974089840899409004090140902409034090440905409064090740908409094091040911409124091340914409154091640917409184091940920409214092240923409244092540926409274092840929409304093140932409334093440935409364093740938409394094040941409424094340944409454094640947409484094940950409514095240953409544095540956409574095840959409604096140962409634096440965409664096740968409694097040971409724097340974409754097640977409784097940980409814098240983409844098540986409874098840989409904099140992409934099440995409964099740998409994100041001410024100341004410054100641007410084100941010410114101241013410144101541016410174101841019410204102141022410234102441025410264102741028410294103041031410324103341034410354103641037410384103941040410414104241043410444104541046410474104841049410504105141052410534105441055410564105741058410594106041061410624106341064410654106641067410684106941070410714107241073410744107541076410774107841079410804108141082410834108441085410864108741088410894109041091410924109341094410954109641097410984109941100411014110241103411044110541106411074110841109411104111141112411134111441115411164111741118411194112041121411224112341124411254112641127411284112941130411314113241133411344113541136411374113841139411404114141142411434114441145411464114741148411494115041151411524115341154411554115641157411584115941160411614116241163411644116541166411674116841169411704117141172411734117441175411764117741178411794118041181411824118341184411854118641187411884118941190411914119241193411944119541196411974119841199412004120141202412034120441205412064120741208412094121041211412124121341214412154121641217412184121941220412214122241223412244122541226412274122841229412304123141232412334123441235412364123741238412394124041241412424124341244412454124641247412484124941250412514125241253412544125541256412574125841259412604126141262412634126441265412664126741268412694127041271412724127341274412754127641277412784127941280412814128241283412844128541286412874128841289412904129141292412934129441295412964129741298412994130041301413024130341304413054130641307413084130941310413114131241313413144131541316413174131841319413204132141322413234132441325413264132741328413294133041331413324133341334413354133641337413384133941340413414134241343413444134541346413474134841349413504135141352413534135441355413564135741358413594136041361413624136341364413654136641367413684136941370413714137241373413744137541376413774137841379413804138141382413834138441385413864138741388413894139041391413924139341394413954139641397413984139941400414014140241403414044140541406414074140841409414104141141412414134141441415414164141741418414194142041421414224142341424414254142641427414284142941430414314143241433414344143541436414374143841439414404144141442414434144441445414464144741448414494145041451414524145341454414554145641457414584145941460414614146241463414644146541466414674146841469414704147141472414734147441475414764147741478414794148041481414824148341484414854148641487414884148941490414914149241493414944149541496414974149841499415004150141502415034150441505415064150741508415094151041511415124151341514415154151641517415184151941520415214152241523415244152541526415274152841529415304153141532415334153441535415364153741538415394154041541415424154341544415454154641547415484154941550415514155241553415544155541556415574155841559415604156141562415634156441565415664156741568415694157041571415724157341574415754157641577415784157941580415814158241583415844158541586415874158841589415904159141592415934159441595415964159741598415994160041601416024160341604416054160641607416084160941610416114161241613416144161541616416174161841619416204162141622416234162441625416264162741628416294163041631416324163341634416354163641637416384163941640416414164241643416444164541646416474164841649416504165141652416534165441655416564165741658416594166041661416624166341664416654166641667416684166941670416714167241673416744167541676416774167841679416804168141682416834168441685416864168741688416894169041691416924169341694416954169641697416984169941700417014170241703417044170541706417074170841709417104171141712417134171441715417164171741718417194172041721417224172341724417254172641727417284172941730417314173241733417344173541736417374173841739417404174141742417434174441745417464174741748417494175041751417524175341754417554175641757417584175941760417614176241763417644176541766417674176841769417704177141772417734177441775417764177741778417794178041781417824178341784417854178641787417884178941790417914179241793417944179541796417974179841799418004180141802418034180441805418064180741808418094181041811418124181341814418154181641817418184181941820418214182241823418244182541826418274182841829418304183141832418334183441835418364183741838418394184041841418424184341844418454184641847418484184941850418514185241853418544185541856418574185841859418604186141862418634186441865418664186741868418694187041871418724187341874418754187641877418784187941880418814188241883418844188541886418874188841889418904189141892418934189441895418964189741898418994190041901419024190341904419054190641907419084190941910419114191241913419144191541916419174191841919419204192141922419234192441925419264192741928419294193041931419324193341934419354193641937419384193941940419414194241943419444194541946419474194841949419504195141952419534195441955419564195741958419594196041961419624196341964419654196641967419684196941970419714197241973419744197541976419774197841979419804198141982419834198441985419864198741988419894199041991419924199341994419954199641997419984199942000420014200242003420044200542006420074200842009420104201142012420134201442015420164201742018420194202042021420224202342024420254202642027420284202942030420314203242033420344203542036420374203842039420404204142042420434204442045420464204742048420494205042051420524205342054420554205642057420584205942060420614206242063420644206542066420674206842069420704207142072420734207442075420764207742078420794208042081420824208342084420854208642087420884208942090420914209242093420944209542096420974209842099421004210142102421034210442105421064210742108421094211042111421124211342114421154211642117421184211942120421214212242123421244212542126421274212842129421304213142132421334213442135421364213742138421394214042141421424214342144421454214642147421484214942150421514215242153421544215542156421574215842159421604216142162421634216442165421664216742168421694217042171421724217342174421754217642177421784217942180421814218242183421844218542186421874218842189421904219142192421934219442195421964219742198421994220042201422024220342204422054220642207422084220942210422114221242213422144221542216422174221842219422204222142222422234222442225422264222742228422294223042231422324223342234422354223642237422384223942240422414224242243422444224542246422474224842249422504225142252422534225442255422564225742258422594226042261422624226342264422654226642267422684226942270422714227242273422744227542276422774227842279422804228142282422834228442285422864228742288422894229042291422924229342294422954229642297422984229942300423014230242303423044230542306423074230842309423104231142312423134231442315423164231742318423194232042321423224232342324423254232642327423284232942330423314233242333423344233542336423374233842339423404234142342423434234442345423464234742348423494235042351423524235342354423554235642357423584235942360423614236242363423644236542366423674236842369423704237142372423734237442375423764237742378423794238042381423824238342384423854238642387423884238942390423914239242393423944239542396423974239842399424004240142402424034240442405424064240742408424094241042411424124241342414424154241642417424184241942420424214242242423424244242542426424274242842429424304243142432424334243442435424364243742438424394244042441424424244342444424454244642447424484244942450424514245242453424544245542456424574245842459424604246142462424634246442465424664246742468424694247042471424724247342474424754247642477424784247942480424814248242483424844248542486424874248842489424904249142492424934249442495424964249742498424994250042501425024250342504425054250642507425084250942510425114251242513425144251542516425174251842519425204252142522425234252442525425264252742528425294253042531425324253342534425354253642537425384253942540425414254242543425444254542546425474254842549425504255142552425534255442555425564255742558425594256042561425624256342564425654256642567425684256942570425714257242573425744257542576425774257842579425804258142582425834258442585425864258742588425894259042591425924259342594425954259642597425984259942600426014260242603426044260542606426074260842609426104261142612426134261442615426164261742618426194262042621426224262342624426254262642627426284262942630426314263242633426344263542636426374263842639426404264142642426434264442645426464264742648426494265042651426524265342654426554265642657426584265942660426614266242663426644266542666426674266842669426704267142672426734267442675426764267742678426794268042681426824268342684426854268642687426884268942690426914269242693426944269542696426974269842699427004270142702427034270442705427064270742708427094271042711427124271342714427154271642717427184271942720427214272242723427244272542726427274272842729427304273142732427334273442735427364273742738427394274042741427424274342744427454274642747427484274942750427514275242753427544275542756427574275842759427604276142762427634276442765427664276742768427694277042771427724277342774427754277642777427784277942780427814278242783427844278542786427874278842789427904279142792427934279442795427964279742798427994280042801428024280342804428054280642807428084280942810428114281242813428144281542816428174281842819428204282142822428234282442825428264282742828428294283042831428324283342834428354283642837428384283942840428414284242843428444284542846428474284842849428504285142852428534285442855428564285742858428594286042861428624286342864428654286642867428684286942870428714287242873428744287542876428774287842879428804288142882428834288442885428864288742888428894289042891428924289342894428954289642897428984289942900429014290242903429044290542906429074290842909429104291142912429134291442915429164291742918429194292042921429224292342924429254292642927429284292942930429314293242933429344293542936429374293842939429404294142942429434294442945429464294742948429494295042951429524295342954429554295642957429584295942960429614296242963429644296542966429674296842969429704297142972429734297442975429764297742978429794298042981429824298342984429854298642987429884298942990429914299242993429944299542996429974299842999430004300143002430034300443005430064300743008430094301043011430124301343014430154301643017430184301943020430214302243023430244302543026430274302843029430304303143032430334303443035430364303743038430394304043041430424304343044430454304643047430484304943050430514305243053430544305543056430574305843059430604306143062430634306443065430664306743068430694307043071430724307343074430754307643077430784307943080430814308243083430844308543086430874308843089430904309143092430934309443095430964309743098430994310043101431024310343104431054310643107431084310943110431114311243113431144311543116431174311843119431204312143122431234312443125431264312743128431294313043131431324313343134431354313643137431384313943140431414314243143431444314543146431474314843149431504315143152431534315443155431564315743158431594316043161431624316343164431654316643167431684316943170431714317243173431744317543176431774317843179431804318143182431834318443185431864318743188431894319043191431924319343194431954319643197431984319943200432014320243203432044320543206432074320843209432104321143212432134321443215432164321743218432194322043221432224322343224432254322643227432284322943230432314323243233432344323543236432374323843239432404324143242432434324443245432464324743248432494325043251432524325343254432554325643257432584325943260432614326243263432644326543266432674326843269432704327143272432734327443275432764327743278432794328043281432824328343284432854328643287432884328943290432914329243293432944329543296432974329843299433004330143302433034330443305433064330743308433094331043311433124331343314433154331643317433184331943320433214332243323433244332543326433274332843329433304333143332433334333443335433364333743338433394334043341433424334343344433454334643347433484334943350433514335243353433544335543356433574335843359433604336143362433634336443365433664336743368433694337043371433724337343374433754337643377433784337943380433814338243383433844338543386433874338843389433904339143392433934339443395433964339743398433994340043401434024340343404434054340643407434084340943410434114341243413434144341543416434174341843419434204342143422434234342443425434264342743428434294343043431434324343343434434354343643437434384343943440434414344243443434444344543446434474344843449434504345143452434534345443455434564345743458434594346043461434624346343464434654346643467434684346943470434714347243473434744347543476434774347843479434804348143482434834348443485434864348743488434894349043491434924349343494434954349643497434984349943500435014350243503435044350543506435074350843509435104351143512435134351443515435164351743518435194352043521435224352343524435254352643527435284352943530435314353243533435344353543536435374353843539435404354143542435434354443545435464354743548435494355043551435524355343554435554355643557435584355943560435614356243563435644356543566435674356843569435704357143572435734357443575435764357743578435794358043581435824358343584435854358643587435884358943590435914359243593435944359543596435974359843599436004360143602436034360443605436064360743608436094361043611436124361343614436154361643617436184361943620436214362243623436244362543626436274362843629436304363143632436334363443635436364363743638436394364043641436424364343644436454364643647436484364943650436514365243653436544365543656436574365843659436604366143662436634366443665436664366743668436694367043671436724367343674436754367643677436784367943680436814368243683436844368543686436874368843689436904369143692436934369443695436964369743698436994370043701437024370343704437054370643707437084370943710437114371243713437144371543716437174371843719437204372143722437234372443725437264372743728437294373043731437324373343734437354373643737437384373943740437414374243743437444374543746437474374843749437504375143752437534375443755437564375743758437594376043761437624376343764437654376643767437684376943770437714377243773437744377543776437774377843779437804378143782437834378443785437864378743788437894379043791437924379343794437954379643797437984379943800438014380243803438044380543806438074380843809438104381143812438134381443815438164381743818438194382043821438224382343824438254382643827438284382943830438314383243833438344383543836438374383843839438404384143842438434384443845438464384743848438494385043851438524385343854438554385643857438584385943860438614386243863438644386543866438674386843869438704387143872438734387443875438764387743878438794388043881438824388343884438854388643887438884388943890438914389243893438944389543896438974389843899439004390143902439034390443905439064390743908439094391043911439124391343914439154391643917439184391943920439214392243923439244392543926439274392843929439304393143932439334393443935439364393743938439394394043941439424394343944439454394643947439484394943950439514395243953439544395543956439574395843959439604396143962439634396443965439664396743968439694397043971439724397343974439754397643977439784397943980439814398243983439844398543986439874398843989439904399143992439934399443995439964399743998439994400044001440024400344004440054400644007440084400944010440114401244013440144401544016440174401844019440204402144022440234402444025440264402744028440294403044031440324403344034440354403644037440384403944040440414404244043440444404544046440474404844049440504405144052440534405444055440564405744058440594406044061440624406344064440654406644067440684406944070440714407244073440744407544076440774407844079440804408144082440834408444085440864408744088440894409044091440924409344094440954409644097440984409944100441014410244103441044410544106441074410844109441104411144112441134411444115441164411744118441194412044121441224412344124441254412644127441284412944130441314413244133441344413544136441374413844139441404414144142441434414444145441464414744148441494415044151441524415344154441554415644157441584415944160441614416244163441644416544166441674416844169441704417144172441734417444175441764417744178441794418044181441824418344184441854418644187441884418944190441914419244193441944419544196441974419844199442004420144202442034420444205442064420744208442094421044211442124421344214442154421644217442184421944220442214422244223442244422544226442274422844229442304423144232442334423444235442364423744238442394424044241442424424344244442454424644247442484424944250442514425244253442544425544256442574425844259442604426144262442634426444265442664426744268442694427044271442724427344274442754427644277442784427944280442814428244283442844428544286442874428844289442904429144292442934429444295442964429744298442994430044301443024430344304443054430644307443084430944310443114431244313443144431544316443174431844319443204432144322443234432444325443264432744328443294433044331443324433344334443354433644337443384433944340443414434244343443444434544346443474434844349443504435144352443534435444355443564435744358443594436044361443624436344364443654436644367443684436944370443714437244373443744437544376443774437844379443804438144382443834438444385443864438744388443894439044391443924439344394443954439644397443984439944400444014440244403444044440544406444074440844409444104441144412444134441444415444164441744418444194442044421444224442344424444254442644427444284442944430444314443244433444344443544436444374443844439444404444144442444434444444445444464444744448444494445044451444524445344454444554445644457444584445944460444614446244463444644446544466444674446844469444704447144472444734447444475444764447744478444794448044481444824448344484444854448644487444884448944490444914449244493444944449544496444974449844499445004450144502445034450444505445064450744508445094451044511445124451344514445154451644517445184451944520445214452244523445244452544526445274452844529445304453144532445334453444535445364453744538445394454044541445424454344544445454454644547445484454944550445514455244553445544455544556445574455844559445604456144562445634456444565445664456744568445694457044571445724457344574445754457644577445784457944580445814458244583445844458544586445874458844589445904459144592445934459444595445964459744598445994460044601446024460344604446054460644607446084460944610446114461244613446144461544616446174461844619446204462144622446234462444625446264462744628446294463044631446324463344634446354463644637446384463944640446414464244643446444464544646446474464844649446504465144652446534465444655446564465744658446594466044661446624466344664446654466644667446684466944670446714467244673446744467544676446774467844679446804468144682446834468444685446864468744688446894469044691446924469344694446954469644697446984469944700447014470244703447044470544706447074470844709447104471144712447134471444715447164471744718447194472044721447224472344724447254472644727447284472944730447314473244733447344473544736447374473844739447404474144742447434474444745447464474744748447494475044751447524475344754447554475644757447584475944760447614476244763447644476544766447674476844769447704477144772447734477444775447764477744778447794478044781447824478344784447854478644787447884478944790447914479244793447944479544796447974479844799448004480144802448034480444805448064480744808448094481044811448124481344814448154481644817448184481944820448214482244823448244482544826448274482844829448304483144832448334483444835448364483744838448394484044841448424484344844448454484644847448484484944850448514485244853448544485544856448574485844859448604486144862448634486444865448664486744868448694487044871448724487344874448754487644877448784487944880448814488244883448844488544886448874488844889448904489144892448934489444895448964489744898448994490044901449024490344904449054490644907449084490944910449114491244913449144491544916449174491844919449204492144922449234492444925449264492744928449294493044931449324493344934449354493644937449384493944940449414494244943449444494544946449474494844949449504495144952449534495444955449564495744958449594496044961449624496344964449654496644967449684496944970449714497244973449744497544976449774497844979449804498144982449834498444985449864498744988449894499044991449924499344994449954499644997449984499945000450014500245003450044500545006450074500845009450104501145012450134501445015450164501745018450194502045021450224502345024450254502645027450284502945030450314503245033450344503545036450374503845039450404504145042450434504445045450464504745048450494505045051450524505345054450554505645057450584505945060450614506245063450644506545066450674506845069450704507145072450734507445075450764507745078450794508045081450824508345084450854508645087450884508945090450914509245093450944509545096450974509845099451004510145102451034510445105451064510745108451094511045111451124511345114451154511645117451184511945120451214512245123451244512545126451274512845129451304513145132451334513445135451364513745138451394514045141451424514345144451454514645147451484514945150451514515245153451544515545156451574515845159451604516145162451634516445165451664516745168451694517045171451724517345174451754517645177451784517945180451814518245183451844518545186451874518845189451904519145192451934519445195451964519745198451994520045201452024520345204452054520645207452084520945210452114521245213452144521545216452174521845219452204522145222452234522445225452264522745228452294523045231452324523345234452354523645237452384523945240452414524245243452444524545246452474524845249452504525145252452534525445255452564525745258452594526045261452624526345264452654526645267452684526945270452714527245273452744527545276452774527845279452804528145282452834528445285452864528745288452894529045291452924529345294452954529645297452984529945300453014530245303453044530545306453074530845309453104531145312453134531445315453164531745318453194532045321453224532345324453254532645327453284532945330453314533245333453344533545336453374533845339453404534145342453434534445345453464534745348453494535045351453524535345354453554535645357453584535945360453614536245363453644536545366453674536845369453704537145372453734537445375453764537745378453794538045381453824538345384453854538645387453884538945390453914539245393453944539545396453974539845399454004540145402454034540445405454064540745408454094541045411454124541345414454154541645417454184541945420454214542245423454244542545426454274542845429454304543145432454334543445435454364543745438454394544045441454424544345444454454544645447454484544945450454514545245453454544545545456454574545845459454604546145462454634546445465454664546745468454694547045471454724547345474454754547645477454784547945480454814548245483454844548545486454874548845489454904549145492454934549445495454964549745498454994550045501455024550345504455054550645507455084550945510455114551245513455144551545516455174551845519455204552145522455234552445525455264552745528455294553045531455324553345534455354553645537455384553945540455414554245543455444554545546455474554845549455504555145552455534555445555455564555745558455594556045561455624556345564455654556645567455684556945570455714557245573455744557545576455774557845579455804558145582455834558445585455864558745588455894559045591455924559345594455954559645597455984559945600456014560245603456044560545606456074560845609456104561145612456134561445615456164561745618456194562045621456224562345624456254562645627456284562945630456314563245633456344563545636456374563845639456404564145642456434564445645456464564745648456494565045651456524565345654456554565645657456584565945660456614566245663456644566545666456674566845669456704567145672456734567445675456764567745678456794568045681456824568345684456854568645687456884568945690456914569245693456944569545696456974569845699457004570145702457034570445705457064570745708457094571045711457124571345714457154571645717457184571945720457214572245723457244572545726457274572845729457304573145732457334573445735457364573745738457394574045741457424574345744457454574645747457484574945750457514575245753457544575545756457574575845759457604576145762457634576445765457664576745768457694577045771457724577345774457754577645777457784577945780457814578245783457844578545786457874578845789457904579145792457934579445795457964579745798457994580045801458024580345804458054580645807458084580945810458114581245813458144581545816458174581845819458204582145822458234582445825458264582745828458294583045831458324583345834458354583645837458384583945840458414584245843458444584545846458474584845849458504585145852458534585445855458564585745858458594586045861458624586345864458654586645867458684586945870458714587245873458744587545876458774587845879458804588145882458834588445885458864588745888458894589045891458924589345894458954589645897458984589945900459014590245903459044590545906459074590845909459104591145912459134591445915459164591745918459194592045921459224592345924459254592645927459284592945930459314593245933459344593545936459374593845939459404594145942459434594445945459464594745948459494595045951459524595345954459554595645957459584595945960459614596245963459644596545966459674596845969459704597145972459734597445975459764597745978459794598045981459824598345984459854598645987459884598945990459914599245993459944599545996459974599845999460004600146002460034600446005460064600746008460094601046011460124601346014460154601646017460184601946020460214602246023460244602546026460274602846029460304603146032460334603446035460364603746038460394604046041460424604346044460454604646047460484604946050460514605246053460544605546056460574605846059460604606146062460634606446065460664606746068460694607046071460724607346074460754607646077460784607946080460814608246083460844608546086460874608846089460904609146092460934609446095460964609746098460994610046101461024610346104461054610646107461084610946110461114611246113461144611546116461174611846119461204612146122461234612446125461264612746128461294613046131461324613346134461354613646137461384613946140461414614246143461444614546146461474614846149461504615146152461534615446155461564615746158461594616046161461624616346164461654616646167461684616946170461714617246173461744617546176461774617846179461804618146182461834618446185461864618746188461894619046191461924619346194461954619646197461984619946200462014620246203462044620546206462074620846209462104621146212462134621446215462164621746218462194622046221462224622346224462254622646227462284622946230462314623246233462344623546236462374623846239462404624146242462434624446245462464624746248462494625046251462524625346254462554625646257462584625946260462614626246263462644626546266462674626846269462704627146272462734627446275462764627746278462794628046281462824628346284462854628646287462884628946290462914629246293462944629546296462974629846299463004630146302463034630446305463064630746308463094631046311463124631346314463154631646317463184631946320463214632246323463244632546326463274632846329463304633146332463334633446335463364633746338463394634046341463424634346344463454634646347463484634946350463514635246353463544635546356463574635846359463604636146362463634636446365463664636746368463694637046371463724637346374463754637646377463784637946380463814638246383463844638546386463874638846389463904639146392463934639446395463964639746398463994640046401464024640346404464054640646407464084640946410464114641246413464144641546416464174641846419464204642146422464234642446425464264642746428464294643046431464324643346434464354643646437464384643946440464414644246443464444644546446464474644846449464504645146452464534645446455464564645746458464594646046461464624646346464464654646646467464684646946470464714647246473464744647546476464774647846479464804648146482464834648446485464864648746488464894649046491464924649346494464954649646497464984649946500465014650246503465044650546506465074650846509465104651146512465134651446515465164651746518465194652046521465224652346524465254652646527465284652946530465314653246533465344653546536465374653846539465404654146542465434654446545465464654746548465494655046551465524655346554465554655646557465584655946560465614656246563465644656546566465674656846569465704657146572465734657446575465764657746578465794658046581465824658346584465854658646587465884658946590465914659246593465944659546596465974659846599466004660146602466034660446605466064660746608466094661046611466124661346614466154661646617466184661946620466214662246623466244662546626466274662846629466304663146632466334663446635466364663746638466394664046641466424664346644466454664646647466484664946650466514665246653466544665546656466574665846659466604666146662466634666446665466664666746668466694667046671466724667346674466754667646677466784667946680466814668246683466844668546686466874668846689466904669146692466934669446695466964669746698466994670046701467024670346704467054670646707467084670946710467114671246713467144671546716467174671846719467204672146722467234672446725467264672746728467294673046731467324673346734467354673646737467384673946740467414674246743467444674546746467474674846749467504675146752467534675446755467564675746758467594676046761467624676346764467654676646767467684676946770467714677246773467744677546776467774677846779467804678146782467834678446785467864678746788467894679046791467924679346794467954679646797467984679946800468014680246803468044680546806468074680846809468104681146812468134681446815468164681746818468194682046821468224682346824468254682646827468284682946830468314683246833468344683546836468374683846839468404684146842468434684446845468464684746848468494685046851468524685346854468554685646857468584685946860468614686246863468644686546866468674686846869468704687146872468734687446875468764687746878468794688046881468824688346884468854688646887468884688946890468914689246893468944689546896468974689846899469004690146902469034690446905469064690746908469094691046911469124691346914469154691646917469184691946920469214692246923469244692546926469274692846929469304693146932469334693446935469364693746938469394694046941469424694346944469454694646947469484694946950469514695246953469544695546956469574695846959469604696146962469634696446965469664696746968469694697046971469724697346974469754697646977469784697946980469814698246983469844698546986469874698846989469904699146992469934699446995469964699746998469994700047001470024700347004470054700647007470084700947010470114701247013470144701547016470174701847019470204702147022470234702447025470264702747028470294703047031470324703347034470354703647037470384703947040470414704247043470444704547046470474704847049470504705147052470534705447055470564705747058470594706047061470624706347064470654706647067470684706947070470714707247073470744707547076470774707847079470804708147082470834708447085470864708747088470894709047091470924709347094470954709647097470984709947100471014710247103471044710547106471074710847109471104711147112471134711447115471164711747118471194712047121471224712347124471254712647127471284712947130471314713247133471344713547136471374713847139471404714147142471434714447145471464714747148471494715047151471524715347154471554715647157471584715947160471614716247163471644716547166471674716847169471704717147172471734717447175471764717747178471794718047181471824718347184471854718647187471884718947190471914719247193471944719547196471974719847199472004720147202472034720447205472064720747208472094721047211472124721347214472154721647217472184721947220472214722247223472244722547226472274722847229472304723147232472334723447235472364723747238472394724047241472424724347244472454724647247472484724947250472514725247253472544725547256472574725847259472604726147262472634726447265472664726747268472694727047271472724727347274472754727647277472784727947280472814728247283472844728547286472874728847289472904729147292472934729447295472964729747298472994730047301473024730347304473054730647307473084730947310473114731247313473144731547316473174731847319473204732147322473234732447325473264732747328473294733047331473324733347334473354733647337473384733947340473414734247343473444734547346473474734847349473504735147352473534735447355473564735747358473594736047361473624736347364473654736647367473684736947370473714737247373473744737547376473774737847379473804738147382473834738447385473864738747388473894739047391473924739347394473954739647397473984739947400474014740247403474044740547406474074740847409474104741147412474134741447415474164741747418474194742047421474224742347424474254742647427474284742947430474314743247433474344743547436474374743847439474404744147442474434744447445474464744747448474494745047451474524745347454474554745647457474584745947460474614746247463474644746547466474674746847469474704747147472474734747447475474764747747478474794748047481474824748347484474854748647487474884748947490474914749247493474944749547496474974749847499475004750147502475034750447505475064750747508475094751047511475124751347514475154751647517475184751947520475214752247523475244752547526475274752847529475304753147532475334753447535475364753747538475394754047541475424754347544475454754647547475484754947550475514755247553475544755547556475574755847559475604756147562475634756447565475664756747568475694757047571475724757347574475754757647577475784757947580475814758247583475844758547586475874758847589475904759147592475934759447595475964759747598475994760047601476024760347604476054760647607476084760947610476114761247613476144761547616476174761847619476204762147622476234762447625476264762747628476294763047631476324763347634476354763647637476384763947640476414764247643476444764547646476474764847649476504765147652476534765447655476564765747658476594766047661476624766347664476654766647667476684766947670476714767247673476744767547676476774767847679476804768147682476834768447685476864768747688476894769047691476924769347694476954769647697476984769947700477014770247703477044770547706477074770847709477104771147712477134771447715477164771747718477194772047721477224772347724477254772647727477284772947730477314773247733477344773547736477374773847739477404774147742477434774447745477464774747748477494775047751477524775347754477554775647757477584775947760477614776247763477644776547766477674776847769477704777147772477734777447775477764777747778477794778047781477824778347784477854778647787477884778947790477914779247793477944779547796477974779847799478004780147802478034780447805478064780747808478094781047811478124781347814478154781647817478184781947820478214782247823478244782547826478274782847829478304783147832478334783447835478364783747838478394784047841478424784347844478454784647847478484784947850478514785247853478544785547856478574785847859478604786147862478634786447865478664786747868478694787047871478724787347874478754787647877478784787947880478814788247883478844788547886478874788847889478904789147892478934789447895478964789747898478994790047901479024790347904479054790647907479084790947910479114791247913479144791547916479174791847919479204792147922479234792447925479264792747928479294793047931479324793347934479354793647937479384793947940479414794247943479444794547946479474794847949479504795147952479534795447955479564795747958479594796047961479624796347964479654796647967479684796947970479714797247973479744797547976479774797847979479804798147982479834798447985479864798747988479894799047991479924799347994479954799647997479984799948000480014800248003480044800548006480074800848009480104801148012480134801448015480164801748018480194802048021480224802348024480254802648027480284802948030480314803248033480344803548036480374803848039480404804148042480434804448045480464804748048480494805048051480524805348054480554805648057480584805948060480614806248063480644806548066480674806848069480704807148072480734807448075480764807748078480794808048081480824808348084480854808648087480884808948090480914809248093480944809548096480974809848099481004810148102481034810448105481064810748108481094811048111481124811348114481154811648117481184811948120481214812248123481244812548126481274812848129481304813148132481334813448135481364813748138481394814048141481424814348144481454814648147481484814948150481514815248153481544815548156481574815848159481604816148162481634816448165481664816748168481694817048171481724817348174481754817648177481784817948180481814818248183481844818548186481874818848189481904819148192481934819448195481964819748198481994820048201482024820348204482054820648207482084820948210482114821248213482144821548216482174821848219482204822148222482234822448225482264822748228482294823048231482324823348234482354823648237482384823948240482414824248243482444824548246482474824848249482504825148252482534825448255482564825748258482594826048261482624826348264482654826648267482684826948270482714827248273482744827548276482774827848279482804828148282482834828448285482864828748288482894829048291482924829348294482954829648297482984829948300483014830248303483044830548306483074830848309483104831148312483134831448315483164831748318483194832048321483224832348324483254832648327483284832948330483314833248333483344833548336483374833848339483404834148342483434834448345483464834748348483494835048351483524835348354483554835648357483584835948360483614836248363483644836548366483674836848369483704837148372483734837448375483764837748378483794838048381483824838348384483854838648387483884838948390483914839248393483944839548396483974839848399484004840148402484034840448405484064840748408484094841048411484124841348414484154841648417484184841948420484214842248423484244842548426484274842848429484304843148432484334843448435484364843748438484394844048441484424844348444484454844648447484484844948450484514845248453484544845548456484574845848459484604846148462484634846448465484664846748468484694847048471484724847348474484754847648477484784847948480484814848248483484844848548486484874848848489484904849148492484934849448495484964849748498484994850048501485024850348504485054850648507485084850948510485114851248513485144851548516485174851848519485204852148522485234852448525485264852748528485294853048531485324853348534485354853648537485384853948540485414854248543485444854548546485474854848549485504855148552485534855448555485564855748558485594856048561485624856348564485654856648567485684856948570485714857248573485744857548576485774857848579485804858148582485834858448585485864858748588485894859048591485924859348594485954859648597485984859948600486014860248603486044860548606486074860848609486104861148612486134861448615486164861748618486194862048621486224862348624486254862648627486284862948630486314863248633486344863548636486374863848639486404864148642486434864448645486464864748648486494865048651486524865348654486554865648657486584865948660486614866248663486644866548666486674866848669486704867148672486734867448675486764867748678486794868048681486824868348684486854868648687486884868948690486914869248693486944869548696486974869848699487004870148702487034870448705487064870748708487094871048711487124871348714487154871648717487184871948720487214872248723487244872548726487274872848729487304873148732487334873448735487364873748738487394874048741487424874348744487454874648747487484874948750487514875248753487544875548756487574875848759487604876148762487634876448765487664876748768487694877048771487724877348774487754877648777487784877948780487814878248783487844878548786487874878848789487904879148792487934879448795487964879748798487994880048801488024880348804488054880648807488084880948810488114881248813488144881548816488174881848819488204882148822488234882448825488264882748828488294883048831488324883348834488354883648837488384883948840488414884248843488444884548846488474884848849488504885148852488534885448855488564885748858488594886048861488624886348864488654886648867488684886948870488714887248873488744887548876488774887848879488804888148882488834888448885488864888748888488894889048891488924889348894488954889648897488984889948900489014890248903489044890548906489074890848909489104891148912489134891448915489164891748918489194892048921489224892348924489254892648927489284892948930489314893248933489344893548936489374893848939489404894148942489434894448945489464894748948489494895048951489524895348954489554895648957489584895948960489614896248963489644896548966489674896848969489704897148972489734897448975489764897748978489794898048981489824898348984489854898648987489884898948990489914899248993489944899548996489974899848999490004900149002490034900449005490064900749008490094901049011490124901349014490154901649017490184901949020490214902249023490244902549026490274902849029490304903149032490334903449035490364903749038490394904049041490424904349044490454904649047490484904949050490514905249053490544905549056490574905849059490604906149062490634906449065490664906749068490694907049071490724907349074490754907649077490784907949080490814908249083490844908549086490874908849089490904909149092490934909449095490964909749098490994910049101491024910349104491054910649107491084910949110491114911249113491144911549116491174911849119491204912149122491234912449125491264912749128491294913049131491324913349134491354913649137491384913949140491414914249143491444914549146491474914849149491504915149152491534915449155491564915749158491594916049161491624916349164491654916649167491684916949170491714917249173491744917549176491774917849179491804918149182491834918449185491864918749188491894919049191491924919349194491954919649197491984919949200492014920249203492044920549206492074920849209492104921149212492134921449215492164921749218492194922049221492224922349224492254922649227492284922949230492314923249233492344923549236492374923849239492404924149242492434924449245492464924749248492494925049251492524925349254492554925649257492584925949260492614926249263492644926549266492674926849269492704927149272492734927449275492764927749278492794928049281492824928349284492854928649287492884928949290492914929249293492944929549296492974929849299493004930149302493034930449305493064930749308493094931049311493124931349314493154931649317493184931949320493214932249323493244932549326493274932849329493304933149332493334933449335493364933749338493394934049341493424934349344493454934649347493484934949350493514935249353493544935549356493574935849359493604936149362493634936449365493664936749368493694937049371493724937349374493754937649377493784937949380493814938249383493844938549386493874938849389493904939149392493934939449395493964939749398493994940049401494024940349404494054940649407494084940949410494114941249413494144941549416494174941849419494204942149422494234942449425494264942749428494294943049431494324943349434494354943649437494384943949440494414944249443494444944549446494474944849449494504945149452494534945449455494564945749458494594946049461494624946349464494654946649467494684946949470494714947249473494744947549476494774947849479494804948149482494834948449485494864948749488494894949049491494924949349494494954949649497494984949949500495014950249503495044950549506495074950849509495104951149512495134951449515495164951749518495194952049521495224952349524495254952649527495284952949530495314953249533495344953549536495374953849539495404954149542495434954449545495464954749548495494955049551495524955349554495554955649557495584955949560495614956249563495644956549566495674956849569495704957149572495734957449575495764957749578495794958049581495824958349584495854958649587495884958949590495914959249593495944959549596495974959849599496004960149602496034960449605496064960749608496094961049611496124961349614496154961649617496184961949620496214962249623496244962549626496274962849629496304963149632496334963449635496364963749638496394964049641496424964349644496454964649647496484964949650496514965249653496544965549656496574965849659496604966149662496634966449665496664966749668496694967049671496724967349674496754967649677496784967949680496814968249683496844968549686496874968849689496904969149692496934969449695496964969749698496994970049701497024970349704497054970649707497084970949710497114971249713497144971549716497174971849719497204972149722497234972449725497264972749728497294973049731497324973349734497354973649737497384973949740497414974249743497444974549746497474974849749497504975149752497534975449755497564975749758497594976049761497624976349764497654976649767497684976949770497714977249773497744977549776497774977849779497804978149782497834978449785497864978749788497894979049791497924979349794497954979649797497984979949800498014980249803498044980549806498074980849809498104981149812498134981449815498164981749818498194982049821498224982349824498254982649827498284982949830498314983249833498344983549836498374983849839498404984149842498434984449845498464984749848498494985049851498524985349854498554985649857498584985949860498614986249863498644986549866498674986849869498704987149872498734987449875498764987749878498794988049881498824988349884498854988649887498884988949890498914989249893498944989549896498974989849899499004990149902499034990449905499064990749908499094991049911499124991349914499154991649917499184991949920499214992249923499244992549926499274992849929499304993149932499334993449935499364993749938499394994049941499424994349944499454994649947499484994949950499514995249953499544995549956499574995849959499604996149962499634996449965499664996749968499694997049971499724997349974499754997649977499784997949980499814998249983499844998549986499874998849989499904999149992499934999449995499964999749998499995000050001500025000350004500055000650007500085000950010500115001250013500145001550016500175001850019500205002150022500235002450025500265002750028500295003050031500325003350034500355003650037500385003950040500415004250043500445004550046500475004850049500505005150052500535005450055500565005750058500595006050061500625006350064500655006650067500685006950070500715007250073500745007550076500775007850079500805008150082500835008450085500865008750088500895009050091500925009350094500955009650097500985009950100501015010250103501045010550106501075010850109501105011150112501135011450115501165011750118501195012050121501225012350124501255012650127501285012950130501315013250133501345013550136501375013850139501405014150142501435014450145501465014750148501495015050151501525015350154501555015650157501585015950160501615016250163501645016550166501675016850169501705017150172501735017450175501765017750178501795018050181501825018350184501855018650187501885018950190501915019250193501945019550196501975019850199502005020150202502035020450205502065020750208502095021050211502125021350214502155021650217502185021950220502215022250223502245022550226502275022850229502305023150232502335023450235502365023750238502395024050241502425024350244502455024650247502485024950250502515025250253502545025550256502575025850259502605026150262502635026450265502665026750268502695027050271502725027350274502755027650277502785027950280502815028250283502845028550286502875028850289502905029150292502935029450295502965029750298502995030050301503025030350304503055030650307503085030950310503115031250313503145031550316503175031850319503205032150322503235032450325503265032750328503295033050331503325033350334503355033650337503385033950340503415034250343503445034550346503475034850349503505035150352503535035450355503565035750358503595036050361503625036350364503655036650367503685036950370503715037250373503745037550376503775037850379503805038150382503835038450385503865038750388503895039050391503925039350394503955039650397503985039950400504015040250403504045040550406504075040850409504105041150412504135041450415504165041750418504195042050421504225042350424504255042650427504285042950430504315043250433504345043550436504375043850439504405044150442504435044450445504465044750448504495045050451504525045350454504555045650457504585045950460504615046250463504645046550466504675046850469504705047150472504735047450475504765047750478504795048050481504825048350484504855048650487504885048950490504915049250493504945049550496504975049850499505005050150502505035050450505505065050750508505095051050511505125051350514505155051650517505185051950520505215052250523505245052550526505275052850529505305053150532505335053450535505365053750538505395054050541505425054350544505455054650547505485054950550505515055250553505545055550556505575055850559505605056150562505635056450565505665056750568505695057050571505725057350574505755057650577505785057950580505815058250583505845058550586505875058850589505905059150592505935059450595505965059750598505995060050601506025060350604506055060650607506085060950610506115061250613506145061550616506175061850619506205062150622506235062450625506265062750628506295063050631506325063350634506355063650637506385063950640506415064250643506445064550646506475064850649506505065150652506535065450655506565065750658506595066050661506625066350664506655066650667506685066950670506715067250673506745067550676506775067850679506805068150682506835068450685506865068750688506895069050691506925069350694506955069650697506985069950700507015070250703507045070550706507075070850709507105071150712507135071450715507165071750718507195072050721507225072350724507255072650727507285072950730507315073250733507345073550736507375073850739507405074150742507435074450745507465074750748507495075050751507525075350754507555075650757507585075950760507615076250763507645076550766507675076850769507705077150772507735077450775507765077750778507795078050781507825078350784507855078650787507885078950790507915079250793507945079550796507975079850799508005080150802508035080450805508065080750808508095081050811508125081350814508155081650817508185081950820508215082250823508245082550826508275082850829508305083150832508335083450835508365083750838508395084050841508425084350844508455084650847508485084950850508515085250853508545085550856508575085850859508605086150862508635086450865508665086750868508695087050871508725087350874508755087650877508785087950880508815088250883508845088550886508875088850889508905089150892508935089450895508965089750898508995090050901509025090350904509055090650907509085090950910509115091250913509145091550916509175091850919509205092150922509235092450925509265092750928509295093050931509325093350934509355093650937509385093950940509415094250943509445094550946509475094850949509505095150952509535095450955509565095750958509595096050961509625096350964509655096650967509685096950970509715097250973509745097550976509775097850979509805098150982509835098450985509865098750988509895099050991509925099350994509955099650997509985099951000510015100251003510045100551006510075100851009510105101151012510135101451015510165101751018510195102051021510225102351024510255102651027510285102951030510315103251033510345103551036510375103851039510405104151042510435104451045510465104751048510495105051051510525105351054510555105651057510585105951060510615106251063510645106551066510675106851069510705107151072510735107451075510765107751078510795108051081510825108351084510855108651087510885108951090510915109251093510945109551096510975109851099511005110151102511035110451105511065110751108511095111051111511125111351114511155111651117511185111951120511215112251123511245112551126511275112851129511305113151132511335113451135511365113751138511395114051141511425114351144511455114651147511485114951150511515115251153511545115551156511575115851159511605116151162511635116451165511665116751168511695117051171511725117351174511755117651177511785117951180511815118251183511845118551186511875118851189511905119151192511935119451195511965119751198511995120051201512025120351204512055120651207512085120951210512115121251213512145121551216512175121851219512205122151222512235122451225512265122751228512295123051231512325123351234512355123651237512385123951240512415124251243512445124551246512475124851249512505125151252512535125451255512565125751258512595126051261512625126351264512655126651267512685126951270512715127251273512745127551276512775127851279512805128151282512835128451285512865128751288512895129051291512925129351294512955129651297512985129951300513015130251303513045130551306513075130851309513105131151312513135131451315513165131751318513195132051321513225132351324513255132651327513285132951330513315133251333513345133551336513375133851339513405134151342513435134451345513465134751348513495135051351513525135351354513555135651357513585135951360513615136251363513645136551366513675136851369513705137151372513735137451375513765137751378513795138051381513825138351384513855138651387513885138951390513915139251393513945139551396513975139851399514005140151402514035140451405514065140751408514095141051411514125141351414514155141651417514185141951420514215142251423514245142551426514275142851429514305143151432514335143451435514365143751438514395144051441514425144351444514455144651447514485144951450514515145251453514545145551456514575145851459514605146151462514635146451465514665146751468514695147051471514725147351474514755147651477514785147951480514815148251483514845148551486514875148851489514905149151492514935149451495514965149751498514995150051501515025150351504515055150651507515085150951510515115151251513515145151551516515175151851519515205152151522515235152451525515265152751528515295153051531515325153351534515355153651537515385153951540515415154251543515445154551546515475154851549515505155151552515535155451555515565155751558515595156051561515625156351564515655156651567515685156951570515715157251573515745157551576515775157851579515805158151582515835158451585515865158751588515895159051591515925159351594515955159651597515985159951600516015160251603516045160551606516075160851609516105161151612516135161451615516165161751618516195162051621516225162351624516255162651627516285162951630516315163251633516345163551636516375163851639516405164151642516435164451645516465164751648516495165051651516525165351654516555165651657516585165951660516615166251663516645166551666516675166851669516705167151672516735167451675516765167751678516795168051681516825168351684516855168651687516885168951690516915169251693516945169551696516975169851699517005170151702517035170451705517065170751708517095171051711517125171351714517155171651717517185171951720517215172251723517245172551726517275172851729517305173151732517335173451735517365173751738517395174051741517425174351744517455174651747517485174951750517515175251753517545175551756517575175851759517605176151762517635176451765517665176751768517695177051771517725177351774517755177651777517785177951780517815178251783517845178551786517875178851789517905179151792517935179451795517965179751798517995180051801518025180351804518055180651807518085180951810518115181251813518145181551816518175181851819518205182151822518235182451825518265182751828518295183051831518325183351834518355183651837518385183951840518415184251843518445184551846518475184851849518505185151852518535185451855518565185751858518595186051861518625186351864518655186651867518685186951870518715187251873518745187551876518775187851879518805188151882518835188451885518865188751888518895189051891518925189351894518955189651897518985189951900519015190251903519045190551906519075190851909519105191151912519135191451915519165191751918519195192051921519225192351924519255192651927519285192951930519315193251933519345193551936519375193851939519405194151942519435194451945519465194751948
  1. /** Converse.js
  2. *
  3. * An XMPP chat client that runs in the browser.
  4. *
  5. * Version: 3.3.4
  6. */
  7. /* jshint ignore:start */
  8. (function (root, factory) {
  9. root.converse = factory();
  10. }(this, function () {
  11. //almond, and your modules will be inlined here
  12. /* jshint ignore:end */
  13. /**
  14. * @license almond 0.3.3 Copyright jQuery Foundation and other contributors.
  15. * Released under MIT license, http://github.com/requirejs/almond/LICENSE
  16. */
  17. //Going sloppy to avoid 'use strict' string cost, but strict practices should
  18. //be followed.
  19. /*global setTimeout: false */
  20. var requirejs, require, define;
  21. (function (undef) {
  22. var main, req, makeMap, handlers,
  23. defined = {},
  24. waiting = {},
  25. config = {},
  26. defining = {},
  27. hasOwn = Object.prototype.hasOwnProperty,
  28. aps = [].slice,
  29. jsSuffixRegExp = /\.js$/;
  30. function hasProp(obj, prop) {
  31. return hasOwn.call(obj, prop);
  32. }
  33. /**
  34. * Given a relative module name, like ./something, normalize it to
  35. * a real name that can be mapped to a path.
  36. * @param {String} name the relative name
  37. * @param {String} baseName a real name that the name arg is relative
  38. * to.
  39. * @returns {String} normalized name
  40. */
  41. function normalize(name, baseName) {
  42. var nameParts, nameSegment, mapValue, foundMap, lastIndex,
  43. foundI, foundStarMap, starI, i, j, part, normalizedBaseParts,
  44. baseParts = baseName && baseName.split("/"),
  45. map = config.map,
  46. starMap = (map && map['*']) || {};
  47. //Adjust any relative paths.
  48. if (name) {
  49. name = name.split('/');
  50. lastIndex = name.length - 1;
  51. // If wanting node ID compatibility, strip .js from end
  52. // of IDs. Have to do this here, and not in nameToUrl
  53. // because node allows either .js or non .js to map
  54. // to same file.
  55. if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) {
  56. name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, '');
  57. }
  58. // Starts with a '.' so need the baseName
  59. if (name[0].charAt(0) === '.' && baseParts) {
  60. //Convert baseName to array, and lop off the last part,
  61. //so that . matches that 'directory' and not name of the baseName's
  62. //module. For instance, baseName of 'one/two/three', maps to
  63. //'one/two/three.js', but we want the directory, 'one/two' for
  64. //this normalization.
  65. normalizedBaseParts = baseParts.slice(0, baseParts.length - 1);
  66. name = normalizedBaseParts.concat(name);
  67. }
  68. //start trimDots
  69. for (i = 0; i < name.length; i++) {
  70. part = name[i];
  71. if (part === '.') {
  72. name.splice(i, 1);
  73. i -= 1;
  74. } else if (part === '..') {
  75. // If at the start, or previous value is still ..,
  76. // keep them so that when converted to a path it may
  77. // still work when converted to a path, even though
  78. // as an ID it is less than ideal. In larger point
  79. // releases, may be better to just kick out an error.
  80. if (i === 0 || (i === 1 && name[2] === '..') || name[i - 1] === '..') {
  81. continue;
  82. } else if (i > 0) {
  83. name.splice(i - 1, 2);
  84. i -= 2;
  85. }
  86. }
  87. }
  88. //end trimDots
  89. name = name.join('/');
  90. }
  91. //Apply map config if available.
  92. if ((baseParts || starMap) && map) {
  93. nameParts = name.split('/');
  94. for (i = nameParts.length; i > 0; i -= 1) {
  95. nameSegment = nameParts.slice(0, i).join("/");
  96. if (baseParts) {
  97. //Find the longest baseName segment match in the config.
  98. //So, do joins on the biggest to smallest lengths of baseParts.
  99. for (j = baseParts.length; j > 0; j -= 1) {
  100. mapValue = map[baseParts.slice(0, j).join('/')];
  101. //baseName segment has config, find if it has one for
  102. //this name.
  103. if (mapValue) {
  104. mapValue = mapValue[nameSegment];
  105. if (mapValue) {
  106. //Match, update name to the new value.
  107. foundMap = mapValue;
  108. foundI = i;
  109. break;
  110. }
  111. }
  112. }
  113. }
  114. if (foundMap) {
  115. break;
  116. }
  117. //Check for a star map match, but just hold on to it,
  118. //if there is a shorter segment match later in a matching
  119. //config, then favor over this star map.
  120. if (!foundStarMap && starMap && starMap[nameSegment]) {
  121. foundStarMap = starMap[nameSegment];
  122. starI = i;
  123. }
  124. }
  125. if (!foundMap && foundStarMap) {
  126. foundMap = foundStarMap;
  127. foundI = starI;
  128. }
  129. if (foundMap) {
  130. nameParts.splice(0, foundI, foundMap);
  131. name = nameParts.join('/');
  132. }
  133. }
  134. return name;
  135. }
  136. function makeRequire(relName, forceSync) {
  137. return function () {
  138. //A version of a require function that passes a moduleName
  139. //value for items that may need to
  140. //look up paths relative to the moduleName
  141. var args = aps.call(arguments, 0);
  142. //If first arg is not require('string'), and there is only
  143. //one arg, it is the array form without a callback. Insert
  144. //a null so that the following concat is correct.
  145. if (typeof args[0] !== 'string' && args.length === 1) {
  146. args.push(null);
  147. }
  148. return req.apply(undef, args.concat([relName, forceSync]));
  149. };
  150. }
  151. function makeNormalize(relName) {
  152. return function (name) {
  153. return normalize(name, relName);
  154. };
  155. }
  156. function makeLoad(depName) {
  157. return function (value) {
  158. defined[depName] = value;
  159. };
  160. }
  161. function callDep(name) {
  162. if (hasProp(waiting, name)) {
  163. var args = waiting[name];
  164. delete waiting[name];
  165. defining[name] = true;
  166. main.apply(undef, args);
  167. }
  168. if (!hasProp(defined, name) && !hasProp(defining, name)) {
  169. throw new Error('No ' + name);
  170. }
  171. return defined[name];
  172. }
  173. //Turns a plugin!resource to [plugin, resource]
  174. //with the plugin being undefined if the name
  175. //did not have a plugin prefix.
  176. function splitPrefix(name) {
  177. var prefix,
  178. index = name ? name.indexOf('!') : -1;
  179. if (index > -1) {
  180. prefix = name.substring(0, index);
  181. name = name.substring(index + 1, name.length);
  182. }
  183. return [prefix, name];
  184. }
  185. //Creates a parts array for a relName where first part is plugin ID,
  186. //second part is resource ID. Assumes relName has already been normalized.
  187. function makeRelParts(relName) {
  188. return relName ? splitPrefix(relName) : [];
  189. }
  190. /**
  191. * Makes a name map, normalizing the name, and using a plugin
  192. * for normalization if necessary. Grabs a ref to plugin
  193. * too, as an optimization.
  194. */
  195. makeMap = function (name, relParts) {
  196. var plugin,
  197. parts = splitPrefix(name),
  198. prefix = parts[0],
  199. relResourceName = relParts[1];
  200. name = parts[1];
  201. if (prefix) {
  202. prefix = normalize(prefix, relResourceName);
  203. plugin = callDep(prefix);
  204. }
  205. //Normalize according
  206. if (prefix) {
  207. if (plugin && plugin.normalize) {
  208. name = plugin.normalize(name, makeNormalize(relResourceName));
  209. } else {
  210. name = normalize(name, relResourceName);
  211. }
  212. } else {
  213. name = normalize(name, relResourceName);
  214. parts = splitPrefix(name);
  215. prefix = parts[0];
  216. name = parts[1];
  217. if (prefix) {
  218. plugin = callDep(prefix);
  219. }
  220. }
  221. //Using ridiculous property names for space reasons
  222. return {
  223. f: prefix ? prefix + '!' + name : name, //fullName
  224. n: name,
  225. pr: prefix,
  226. p: plugin
  227. };
  228. };
  229. function makeConfig(name) {
  230. return function () {
  231. return (config && config.config && config.config[name]) || {};
  232. };
  233. }
  234. handlers = {
  235. require: function (name) {
  236. return makeRequire(name);
  237. },
  238. exports: function (name) {
  239. var e = defined[name];
  240. if (typeof e !== 'undefined') {
  241. return e;
  242. } else {
  243. return (defined[name] = {});
  244. }
  245. },
  246. module: function (name) {
  247. return {
  248. id: name,
  249. uri: '',
  250. exports: defined[name],
  251. config: makeConfig(name)
  252. };
  253. }
  254. };
  255. main = function (name, deps, callback, relName) {
  256. var cjsModule, depName, ret, map, i, relParts,
  257. args = [],
  258. callbackType = typeof callback,
  259. usingExports;
  260. //Use name if no relName
  261. relName = relName || name;
  262. relParts = makeRelParts(relName);
  263. //Call the callback to define the module, if necessary.
  264. if (callbackType === 'undefined' || callbackType === 'function') {
  265. //Pull out the defined dependencies and pass the ordered
  266. //values to the callback.
  267. //Default to [require, exports, module] if no deps
  268. deps = !deps.length && callback.length ? ['require', 'exports', 'module'] : deps;
  269. for (i = 0; i < deps.length; i += 1) {
  270. map = makeMap(deps[i], relParts);
  271. depName = map.f;
  272. //Fast path CommonJS standard dependencies.
  273. if (depName === "require") {
  274. args[i] = handlers.require(name);
  275. } else if (depName === "exports") {
  276. //CommonJS module spec 1.1
  277. args[i] = handlers.exports(name);
  278. usingExports = true;
  279. } else if (depName === "module") {
  280. //CommonJS module spec 1.1
  281. cjsModule = args[i] = handlers.module(name);
  282. } else if (hasProp(defined, depName) ||
  283. hasProp(waiting, depName) ||
  284. hasProp(defining, depName)) {
  285. args[i] = callDep(depName);
  286. } else if (map.p) {
  287. map.p.load(map.n, makeRequire(relName, true), makeLoad(depName), {});
  288. args[i] = defined[depName];
  289. } else {
  290. throw new Error(name + ' missing ' + depName);
  291. }
  292. }
  293. ret = callback ? callback.apply(defined[name], args) : undefined;
  294. if (name) {
  295. //If setting exports via "module" is in play,
  296. //favor that over return value and exports. After that,
  297. //favor a non-undefined return value over exports use.
  298. if (cjsModule && cjsModule.exports !== undef &&
  299. cjsModule.exports !== defined[name]) {
  300. defined[name] = cjsModule.exports;
  301. } else if (ret !== undef || !usingExports) {
  302. //Use the return value from the function.
  303. defined[name] = ret;
  304. }
  305. }
  306. } else if (name) {
  307. //May just be an object definition for the module. Only
  308. //worry about defining if have a module name.
  309. defined[name] = callback;
  310. }
  311. };
  312. requirejs = require = req = function (deps, callback, relName, forceSync, alt) {
  313. if (typeof deps === "string") {
  314. if (handlers[deps]) {
  315. //callback in this case is really relName
  316. return handlers[deps](callback);
  317. }
  318. //Just return the module wanted. In this scenario, the
  319. //deps arg is the module name, and second arg (if passed)
  320. //is just the relName.
  321. //Normalize module name, if it contains . or ..
  322. return callDep(makeMap(deps, makeRelParts(callback)).f);
  323. } else if (!deps.splice) {
  324. //deps is a config object, not an array.
  325. config = deps;
  326. if (config.deps) {
  327. req(config.deps, config.callback);
  328. }
  329. if (!callback) {
  330. return;
  331. }
  332. if (callback.splice) {
  333. //callback is an array, which means it is a dependency list.
  334. //Adjust args if there are dependencies
  335. deps = callback;
  336. callback = relName;
  337. relName = null;
  338. } else {
  339. deps = undef;
  340. }
  341. }
  342. //Support require(['a'])
  343. callback = callback || function () {};
  344. //If relName is a function, it is an errback handler,
  345. //so remove it.
  346. if (typeof relName === 'function') {
  347. relName = forceSync;
  348. forceSync = alt;
  349. }
  350. //Simulate async callback;
  351. if (forceSync) {
  352. main(undef, deps, callback, relName);
  353. } else {
  354. //Using a non-zero value because of concern for what old browsers
  355. //do, and latest browsers "upgrade" to 4 if lower value is used:
  356. //http://www.whatwg.org/specs/web-apps/current-work/multipage/timers.html#dom-windowtimers-settimeout:
  357. //If want a value immediately, use require('id') instead -- something
  358. //that works in almond on the global level, but not guaranteed and
  359. //unlikely to work in other AMD implementations.
  360. setTimeout(function () {
  361. main(undef, deps, callback, relName);
  362. }, 4);
  363. }
  364. return req;
  365. };
  366. /**
  367. * Just drops the config on the floor, but returns req in case
  368. * the config return value is used.
  369. */
  370. req.config = function (cfg) {
  371. return req(cfg);
  372. };
  373. /**
  374. * Expose module registry for debugging and tooling
  375. */
  376. requirejs._defined = defined;
  377. define = function (name, deps, callback) {
  378. if (typeof name !== 'string') {
  379. throw new Error('See almond README: incorrect module build, no module name');
  380. }
  381. //This module may not have dependencies
  382. if (!deps.splice) {
  383. //deps is not an array, so probably means
  384. //an object literal or factory function for
  385. //the value. Adjust args.
  386. callback = deps;
  387. deps = [];
  388. }
  389. if (!hasProp(defined, name) && !hasProp(waiting, name)) {
  390. waiting[name] = [name, deps, callback];
  391. }
  392. };
  393. define.amd = {
  394. jQuery: true
  395. };
  396. }());
  397. define("almond", function(){});
  398. /*!
  399. * Sizzle CSS Selector Engine v2.3.3
  400. * https://sizzlejs.com/
  401. *
  402. * Copyright jQuery Foundation and other contributors
  403. * Released under the MIT license
  404. * http://jquery.org/license
  405. *
  406. * Date: 2016-08-08
  407. */
  408. (function( window ) {
  409. var i,
  410. support,
  411. Expr,
  412. getText,
  413. isXML,
  414. tokenize,
  415. compile,
  416. select,
  417. outermostContext,
  418. sortInput,
  419. hasDuplicate,
  420. // Local document vars
  421. setDocument,
  422. document,
  423. docElem,
  424. documentIsHTML,
  425. rbuggyQSA,
  426. rbuggyMatches,
  427. matches,
  428. contains,
  429. // Instance-specific data
  430. expando = "sizzle" + 1 * new Date(),
  431. preferredDoc = window.document,
  432. dirruns = 0,
  433. done = 0,
  434. classCache = createCache(),
  435. tokenCache = createCache(),
  436. compilerCache = createCache(),
  437. sortOrder = function( a, b ) {
  438. if ( a === b ) {
  439. hasDuplicate = true;
  440. }
  441. return 0;
  442. },
  443. // Instance methods
  444. hasOwn = ({}).hasOwnProperty,
  445. arr = [],
  446. pop = arr.pop,
  447. push_native = arr.push,
  448. push = arr.push,
  449. slice = arr.slice,
  450. // Use a stripped-down indexOf as it's faster than native
  451. // https://jsperf.com/thor-indexof-vs-for/5
  452. indexOf = function( list, elem ) {
  453. var i = 0,
  454. len = list.length;
  455. for ( ; i < len; i++ ) {
  456. if ( list[i] === elem ) {
  457. return i;
  458. }
  459. }
  460. return -1;
  461. },
  462. booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
  463. // Regular expressions
  464. // http://www.w3.org/TR/css3-selectors/#whitespace
  465. whitespace = "[\\x20\\t\\r\\n\\f]",
  466. // http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
  467. identifier = "(?:\\\\.|[\\w-]|[^\0-\\xa0])+",
  468. // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors
  469. attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace +
  470. // Operator (capture 2)
  471. "*([*^$|!~]?=)" + whitespace +
  472. // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
  473. "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace +
  474. "*\\]",
  475. pseudos = ":(" + identifier + ")(?:\\((" +
  476. // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:
  477. // 1. quoted (capture 3; capture 4 or capture 5)
  478. "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" +
  479. // 2. simple (capture 6)
  480. "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" +
  481. // 3. anything else (capture 2)
  482. ".*" +
  483. ")\\)|)",
  484. // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
  485. rwhitespace = new RegExp( whitespace + "+", "g" ),
  486. rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
  487. rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
  488. rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ),
  489. rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ),
  490. rpseudo = new RegExp( pseudos ),
  491. ridentifier = new RegExp( "^" + identifier + "$" ),
  492. matchExpr = {
  493. "ID": new RegExp( "^#(" + identifier + ")" ),
  494. "CLASS": new RegExp( "^\\.(" + identifier + ")" ),
  495. "TAG": new RegExp( "^(" + identifier + "|[*])" ),
  496. "ATTR": new RegExp( "^" + attributes ),
  497. "PSEUDO": new RegExp( "^" + pseudos ),
  498. "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
  499. "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
  500. "*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
  501. "bool": new RegExp( "^(?:" + booleans + ")$", "i" ),
  502. // For use in libraries implementing .is()
  503. // We use this for POS matching in `select`
  504. "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
  505. whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
  506. },
  507. rinputs = /^(?:input|select|textarea|button)$/i,
  508. rheader = /^h\d$/i,
  509. rnative = /^[^{]+\{\s*\[native \w/,
  510. // Easily-parseable/retrievable ID or TAG or CLASS selectors
  511. rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
  512. rsibling = /[+~]/,
  513. // CSS escapes
  514. // http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
  515. runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ),
  516. funescape = function( _, escaped, escapedWhitespace ) {
  517. var high = "0x" + escaped - 0x10000;
  518. // NaN means non-codepoint
  519. // Support: Firefox<24
  520. // Workaround erroneous numeric interpretation of +"0x"
  521. return high !== high || escapedWhitespace ?
  522. escaped :
  523. high < 0 ?
  524. // BMP codepoint
  525. String.fromCharCode( high + 0x10000 ) :
  526. // Supplemental Plane codepoint (surrogate pair)
  527. String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
  528. },
  529. // CSS string/identifier serialization
  530. // https://drafts.csswg.org/cssom/#common-serializing-idioms
  531. rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,
  532. fcssescape = function( ch, asCodePoint ) {
  533. if ( asCodePoint ) {
  534. // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER
  535. if ( ch === "\0" ) {
  536. return "\uFFFD";
  537. }
  538. // Control characters and (dependent upon position) numbers get escaped as code points
  539. return ch.slice( 0, -1 ) + "\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " ";
  540. }
  541. // Other potentially-special ASCII characters get backslash-escaped
  542. return "\\" + ch;
  543. },
  544. // Used for iframes
  545. // See setDocument()
  546. // Removing the function wrapper causes a "Permission Denied"
  547. // error in IE
  548. unloadHandler = function() {
  549. setDocument();
  550. },
  551. disabledAncestor = addCombinator(
  552. function( elem ) {
  553. return elem.disabled === true && ("form" in elem || "label" in elem);
  554. },
  555. { dir: "parentNode", next: "legend" }
  556. );
  557. // Optimize for push.apply( _, NodeList )
  558. try {
  559. push.apply(
  560. (arr = slice.call( preferredDoc.childNodes )),
  561. preferredDoc.childNodes
  562. );
  563. // Support: Android<4.0
  564. // Detect silently failing push.apply
  565. arr[ preferredDoc.childNodes.length ].nodeType;
  566. } catch ( e ) {
  567. push = { apply: arr.length ?
  568. // Leverage slice if possible
  569. function( target, els ) {
  570. push_native.apply( target, slice.call(els) );
  571. } :
  572. // Support: IE<9
  573. // Otherwise append directly
  574. function( target, els ) {
  575. var j = target.length,
  576. i = 0;
  577. // Can't trust NodeList.length
  578. while ( (target[j++] = els[i++]) ) {}
  579. target.length = j - 1;
  580. }
  581. };
  582. }
  583. function Sizzle( selector, context, results, seed ) {
  584. var m, i, elem, nid, match, groups, newSelector,
  585. newContext = context && context.ownerDocument,
  586. // nodeType defaults to 9, since context defaults to document
  587. nodeType = context ? context.nodeType : 9;
  588. results = results || [];
  589. // Return early from calls with invalid selector or context
  590. if ( typeof selector !== "string" || !selector ||
  591. nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {
  592. return results;
  593. }
  594. // Try to shortcut find operations (as opposed to filters) in HTML documents
  595. if ( !seed ) {
  596. if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
  597. setDocument( context );
  598. }
  599. context = context || document;
  600. if ( documentIsHTML ) {
  601. // If the selector is sufficiently simple, try using a "get*By*" DOM method
  602. // (excepting DocumentFragment context, where the methods don't exist)
  603. if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) {
  604. // ID selector
  605. if ( (m = match[1]) ) {
  606. // Document context
  607. if ( nodeType === 9 ) {
  608. if ( (elem = context.getElementById( m )) ) {
  609. // Support: IE, Opera, Webkit
  610. // TODO: identify versions
  611. // getElementById can match elements by name instead of ID
  612. if ( elem.id === m ) {
  613. results.push( elem );
  614. return results;
  615. }
  616. } else {
  617. return results;
  618. }
  619. // Element context
  620. } else {
  621. // Support: IE, Opera, Webkit
  622. // TODO: identify versions
  623. // getElementById can match elements by name instead of ID
  624. if ( newContext && (elem = newContext.getElementById( m )) &&
  625. contains( context, elem ) &&
  626. elem.id === m ) {
  627. results.push( elem );
  628. return results;
  629. }
  630. }
  631. // Type selector
  632. } else if ( match[2] ) {
  633. push.apply( results, context.getElementsByTagName( selector ) );
  634. return results;
  635. // Class selector
  636. } else if ( (m = match[3]) && support.getElementsByClassName &&
  637. context.getElementsByClassName ) {
  638. push.apply( results, context.getElementsByClassName( m ) );
  639. return results;
  640. }
  641. }
  642. // Take advantage of querySelectorAll
  643. if ( support.qsa &&
  644. !compilerCache[ selector + " " ] &&
  645. (!rbuggyQSA || !rbuggyQSA.test( selector )) ) {
  646. if ( nodeType !== 1 ) {
  647. newContext = context;
  648. newSelector = selector;
  649. // qSA looks outside Element context, which is not what we want
  650. // Thanks to Andrew Dupont for this workaround technique
  651. // Support: IE <=8
  652. // Exclude object elements
  653. } else if ( context.nodeName.toLowerCase() !== "object" ) {
  654. // Capture the context ID, setting it first if necessary
  655. if ( (nid = context.getAttribute( "id" )) ) {
  656. nid = nid.replace( rcssescape, fcssescape );
  657. } else {
  658. context.setAttribute( "id", (nid = expando) );
  659. }
  660. // Prefix every selector in the list
  661. groups = tokenize( selector );
  662. i = groups.length;
  663. while ( i-- ) {
  664. groups[i] = "#" + nid + " " + toSelector( groups[i] );
  665. }
  666. newSelector = groups.join( "," );
  667. // Expand context for sibling selectors
  668. newContext = rsibling.test( selector ) && testContext( context.parentNode ) ||
  669. context;
  670. }
  671. if ( newSelector ) {
  672. try {
  673. push.apply( results,
  674. newContext.querySelectorAll( newSelector )
  675. );
  676. return results;
  677. } catch ( qsaError ) {
  678. } finally {
  679. if ( nid === expando ) {
  680. context.removeAttribute( "id" );
  681. }
  682. }
  683. }
  684. }
  685. }
  686. }
  687. // All others
  688. return select( selector.replace( rtrim, "$1" ), context, results, seed );
  689. }
  690. /**
  691. * Create key-value caches of limited size
  692. * @returns {function(string, object)} Returns the Object data after storing it on itself with
  693. * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
  694. * deleting the oldest entry
  695. */
  696. function createCache() {
  697. var keys = [];
  698. function cache( key, value ) {
  699. // Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
  700. if ( keys.push( key + " " ) > Expr.cacheLength ) {
  701. // Only keep the most recent entries
  702. delete cache[ keys.shift() ];
  703. }
  704. return (cache[ key + " " ] = value);
  705. }
  706. return cache;
  707. }
  708. /**
  709. * Mark a function for special use by Sizzle
  710. * @param {Function} fn The function to mark
  711. */
  712. function markFunction( fn ) {
  713. fn[ expando ] = true;
  714. return fn;
  715. }
  716. /**
  717. * Support testing using an element
  718. * @param {Function} fn Passed the created element and returns a boolean result
  719. */
  720. function assert( fn ) {
  721. var el = document.createElement("fieldset");
  722. try {
  723. return !!fn( el );
  724. } catch (e) {
  725. return false;
  726. } finally {
  727. // Remove from its parent by default
  728. if ( el.parentNode ) {
  729. el.parentNode.removeChild( el );
  730. }
  731. // release memory in IE
  732. el = null;
  733. }
  734. }
  735. /**
  736. * Adds the same handler for all of the specified attrs
  737. * @param {String} attrs Pipe-separated list of attributes
  738. * @param {Function} handler The method that will be applied
  739. */
  740. function addHandle( attrs, handler ) {
  741. var arr = attrs.split("|"),
  742. i = arr.length;
  743. while ( i-- ) {
  744. Expr.attrHandle[ arr[i] ] = handler;
  745. }
  746. }
  747. /**
  748. * Checks document order of two siblings
  749. * @param {Element} a
  750. * @param {Element} b
  751. * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b
  752. */
  753. function siblingCheck( a, b ) {
  754. var cur = b && a,
  755. diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
  756. a.sourceIndex - b.sourceIndex;
  757. // Use IE sourceIndex if available on both nodes
  758. if ( diff ) {
  759. return diff;
  760. }
  761. // Check if b follows a
  762. if ( cur ) {
  763. while ( (cur = cur.nextSibling) ) {
  764. if ( cur === b ) {
  765. return -1;
  766. }
  767. }
  768. }
  769. return a ? 1 : -1;
  770. }
  771. /**
  772. * Returns a function to use in pseudos for input types
  773. * @param {String} type
  774. */
  775. function createInputPseudo( type ) {
  776. return function( elem ) {
  777. var name = elem.nodeName.toLowerCase();
  778. return name === "input" && elem.type === type;
  779. };
  780. }
  781. /**
  782. * Returns a function to use in pseudos for buttons
  783. * @param {String} type
  784. */
  785. function createButtonPseudo( type ) {
  786. return function( elem ) {
  787. var name = elem.nodeName.toLowerCase();
  788. return (name === "input" || name === "button") && elem.type === type;
  789. };
  790. }
  791. /**
  792. * Returns a function to use in pseudos for :enabled/:disabled
  793. * @param {Boolean} disabled true for :disabled; false for :enabled
  794. */
  795. function createDisabledPseudo( disabled ) {
  796. // Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable
  797. return function( elem ) {
  798. // Only certain elements can match :enabled or :disabled
  799. // https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled
  800. // https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled
  801. if ( "form" in elem ) {
  802. // Check for inherited disabledness on relevant non-disabled elements:
  803. // * listed form-associated elements in a disabled fieldset
  804. // https://html.spec.whatwg.org/multipage/forms.html#category-listed
  805. // https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled
  806. // * option elements in a disabled optgroup
  807. // https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled
  808. // All such elements have a "form" property.
  809. if ( elem.parentNode && elem.disabled === false ) {
  810. // Option elements defer to a parent optgroup if present
  811. if ( "label" in elem ) {
  812. if ( "label" in elem.parentNode ) {
  813. return elem.parentNode.disabled === disabled;
  814. } else {
  815. return elem.disabled === disabled;
  816. }
  817. }
  818. // Support: IE 6 - 11
  819. // Use the isDisabled shortcut property to check for disabled fieldset ancestors
  820. return elem.isDisabled === disabled ||
  821. // Where there is no isDisabled, check manually
  822. /* jshint -W018 */
  823. elem.isDisabled !== !disabled &&
  824. disabledAncestor( elem ) === disabled;
  825. }
  826. return elem.disabled === disabled;
  827. // Try to winnow out elements that can't be disabled before trusting the disabled property.
  828. // Some victims get caught in our net (label, legend, menu, track), but it shouldn't
  829. // even exist on them, let alone have a boolean value.
  830. } else if ( "label" in elem ) {
  831. return elem.disabled === disabled;
  832. }
  833. // Remaining elements are neither :enabled nor :disabled
  834. return false;
  835. };
  836. }
  837. /**
  838. * Returns a function to use in pseudos for positionals
  839. * @param {Function} fn
  840. */
  841. function createPositionalPseudo( fn ) {
  842. return markFunction(function( argument ) {
  843. argument = +argument;
  844. return markFunction(function( seed, matches ) {
  845. var j,
  846. matchIndexes = fn( [], seed.length, argument ),
  847. i = matchIndexes.length;
  848. // Match elements found at the specified indexes
  849. while ( i-- ) {
  850. if ( seed[ (j = matchIndexes[i]) ] ) {
  851. seed[j] = !(matches[j] = seed[j]);
  852. }
  853. }
  854. });
  855. });
  856. }
  857. /**
  858. * Checks a node for validity as a Sizzle context
  859. * @param {Element|Object=} context
  860. * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value
  861. */
  862. function testContext( context ) {
  863. return context && typeof context.getElementsByTagName !== "undefined" && context;
  864. }
  865. // Expose support vars for convenience
  866. support = Sizzle.support = {};
  867. /**
  868. * Detects XML nodes
  869. * @param {Element|Object} elem An element or a document
  870. * @returns {Boolean} True iff elem is a non-HTML XML node
  871. */
  872. isXML = Sizzle.isXML = function( elem ) {
  873. // documentElement is verified for cases where it doesn't yet exist
  874. // (such as loading iframes in IE - #4833)
  875. var documentElement = elem && (elem.ownerDocument || elem).documentElement;
  876. return documentElement ? documentElement.nodeName !== "HTML" : false;
  877. };
  878. /**
  879. * Sets document-related variables once based on the current document
  880. * @param {Element|Object} [doc] An element or document object to use to set the document
  881. * @returns {Object} Returns the current document
  882. */
  883. setDocument = Sizzle.setDocument = function( node ) {
  884. var hasCompare, subWindow,
  885. doc = node ? node.ownerDocument || node : preferredDoc;
  886. // Return early if doc is invalid or already selected
  887. if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
  888. return document;
  889. }
  890. // Update global variables
  891. document = doc;
  892. docElem = document.documentElement;
  893. documentIsHTML = !isXML( document );
  894. // Support: IE 9-11, Edge
  895. // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936)
  896. if ( preferredDoc !== document &&
  897. (subWindow = document.defaultView) && subWindow.top !== subWindow ) {
  898. // Support: IE 11, Edge
  899. if ( subWindow.addEventListener ) {
  900. subWindow.addEventListener( "unload", unloadHandler, false );
  901. // Support: IE 9 - 10 only
  902. } else if ( subWindow.attachEvent ) {
  903. subWindow.attachEvent( "onunload", unloadHandler );
  904. }
  905. }
  906. /* Attributes
  907. ---------------------------------------------------------------------- */
  908. // Support: IE<8
  909. // Verify that getAttribute really returns attributes and not properties
  910. // (excepting IE8 booleans)
  911. support.attributes = assert(function( el ) {
  912. el.className = "i";
  913. return !el.getAttribute("className");
  914. });
  915. /* getElement(s)By*
  916. ---------------------------------------------------------------------- */
  917. // Check if getElementsByTagName("*") returns only elements
  918. support.getElementsByTagName = assert(function( el ) {
  919. el.appendChild( document.createComment("") );
  920. return !el.getElementsByTagName("*").length;
  921. });
  922. // Support: IE<9
  923. support.getElementsByClassName = rnative.test( document.getElementsByClassName );
  924. // Support: IE<10
  925. // Check if getElementById returns elements by name
  926. // The broken getElementById methods don't pick up programmatically-set names,
  927. // so use a roundabout getElementsByName test
  928. support.getById = assert(function( el ) {
  929. docElem.appendChild( el ).id = expando;
  930. return !document.getElementsByName || !document.getElementsByName( expando ).length;
  931. });
  932. // ID filter and find
  933. if ( support.getById ) {
  934. Expr.filter["ID"] = function( id ) {
  935. var attrId = id.replace( runescape, funescape );
  936. return function( elem ) {
  937. return elem.getAttribute("id") === attrId;
  938. };
  939. };
  940. Expr.find["ID"] = function( id, context ) {
  941. if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
  942. var elem = context.getElementById( id );
  943. return elem ? [ elem ] : [];
  944. }
  945. };
  946. } else {
  947. Expr.filter["ID"] = function( id ) {
  948. var attrId = id.replace( runescape, funescape );
  949. return function( elem ) {
  950. var node = typeof elem.getAttributeNode !== "undefined" &&
  951. elem.getAttributeNode("id");
  952. return node && node.value === attrId;
  953. };
  954. };
  955. // Support: IE 6 - 7 only
  956. // getElementById is not reliable as a find shortcut
  957. Expr.find["ID"] = function( id, context ) {
  958. if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
  959. var node, i, elems,
  960. elem = context.getElementById( id );
  961. if ( elem ) {
  962. // Verify the id attribute
  963. node = elem.getAttributeNode("id");
  964. if ( node && node.value === id ) {
  965. return [ elem ];
  966. }
  967. // Fall back on getElementsByName
  968. elems = context.getElementsByName( id );
  969. i = 0;
  970. while ( (elem = elems[i++]) ) {
  971. node = elem.getAttributeNode("id");
  972. if ( node && node.value === id ) {
  973. return [ elem ];
  974. }
  975. }
  976. }
  977. return [];
  978. }
  979. };
  980. }
  981. // Tag
  982. Expr.find["TAG"] = support.getElementsByTagName ?
  983. function( tag, context ) {
  984. if ( typeof context.getElementsByTagName !== "undefined" ) {
  985. return context.getElementsByTagName( tag );
  986. // DocumentFragment nodes don't have gEBTN
  987. } else if ( support.qsa ) {
  988. return context.querySelectorAll( tag );
  989. }
  990. } :
  991. function( tag, context ) {
  992. var elem,
  993. tmp = [],
  994. i = 0,
  995. // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too
  996. results = context.getElementsByTagName( tag );
  997. // Filter out possible comments
  998. if ( tag === "*" ) {
  999. while ( (elem = results[i++]) ) {
  1000. if ( elem.nodeType === 1 ) {
  1001. tmp.push( elem );
  1002. }
  1003. }
  1004. return tmp;
  1005. }
  1006. return results;
  1007. };
  1008. // Class
  1009. Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) {
  1010. if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) {
  1011. return context.getElementsByClassName( className );
  1012. }
  1013. };
  1014. /* QSA/matchesSelector
  1015. ---------------------------------------------------------------------- */
  1016. // QSA and matchesSelector support
  1017. // matchesSelector(:active) reports false when true (IE9/Opera 11.5)
  1018. rbuggyMatches = [];
  1019. // qSa(:focus) reports false when true (Chrome 21)
  1020. // We allow this because of a bug in IE8/9 that throws an error
  1021. // whenever `document.activeElement` is accessed on an iframe
  1022. // So, we allow :focus to pass through QSA all the time to avoid the IE error
  1023. // See https://bugs.jquery.com/ticket/13378
  1024. rbuggyQSA = [];
  1025. if ( (support.qsa = rnative.test( document.querySelectorAll )) ) {
  1026. // Build QSA regex
  1027. // Regex strategy adopted from Diego Perini
  1028. assert(function( el ) {
  1029. // Select is set to empty string on purpose
  1030. // This is to test IE's treatment of not explicitly
  1031. // setting a boolean content attribute,
  1032. // since its presence should be enough
  1033. // https://bugs.jquery.com/ticket/12359
  1034. docElem.appendChild( el ).innerHTML = "<a id='" + expando + "'></a>" +
  1035. "<select id='" + expando + "-\r\\' msallowcapture=''>" +
  1036. "<option selected=''></option></select>";
  1037. // Support: IE8, Opera 11-12.16
  1038. // Nothing should be selected when empty strings follow ^= or $= or *=
  1039. // The test attribute must be unknown in Opera but "safe" for WinRT
  1040. // https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section
  1041. if ( el.querySelectorAll("[msallowcapture^='']").length ) {
  1042. rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
  1043. }
  1044. // Support: IE8
  1045. // Boolean attributes and "value" are not treated correctly
  1046. if ( !el.querySelectorAll("[selected]").length ) {
  1047. rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
  1048. }
  1049. // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+
  1050. if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) {
  1051. rbuggyQSA.push("~=");
  1052. }
  1053. // Webkit/Opera - :checked should return selected option elements
  1054. // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
  1055. // IE8 throws error here and will not see later tests
  1056. if ( !el.querySelectorAll(":checked").length ) {
  1057. rbuggyQSA.push(":checked");
  1058. }
  1059. // Support: Safari 8+, iOS 8+
  1060. // https://bugs.webkit.org/show_bug.cgi?id=136851
  1061. // In-page `selector#id sibling-combinator selector` fails
  1062. if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) {
  1063. rbuggyQSA.push(".#.+[+~]");
  1064. }
  1065. });
  1066. assert(function( el ) {
  1067. el.innerHTML = "<a href='' disabled='disabled'></a>" +
  1068. "<select disabled='disabled'><option/></select>";
  1069. // Support: Windows 8 Native Apps
  1070. // The type and name attributes are restricted during .innerHTML assignment
  1071. var input = document.createElement("input");
  1072. input.setAttribute( "type", "hidden" );
  1073. el.appendChild( input ).setAttribute( "name", "D" );
  1074. // Support: IE8
  1075. // Enforce case-sensitivity of name attribute
  1076. if ( el.querySelectorAll("[name=d]").length ) {
  1077. rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" );
  1078. }
  1079. // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
  1080. // IE8 throws error here and will not see later tests
  1081. if ( el.querySelectorAll(":enabled").length !== 2 ) {
  1082. rbuggyQSA.push( ":enabled", ":disabled" );
  1083. }
  1084. // Support: IE9-11+
  1085. // IE's :disabled selector does not pick up the children of disabled fieldsets
  1086. docElem.appendChild( el ).disabled = true;
  1087. if ( el.querySelectorAll(":disabled").length !== 2 ) {
  1088. rbuggyQSA.push( ":enabled", ":disabled" );
  1089. }
  1090. // Opera 10-11 does not throw on post-comma invalid pseudos
  1091. el.querySelectorAll("*,:x");
  1092. rbuggyQSA.push(",.*:");
  1093. });
  1094. }
  1095. if ( (support.matchesSelector = rnative.test( (matches = docElem.matches ||
  1096. docElem.webkitMatchesSelector ||
  1097. docElem.mozMatchesSelector ||
  1098. docElem.oMatchesSelector ||
  1099. docElem.msMatchesSelector) )) ) {
  1100. assert(function( el ) {
  1101. // Check to see if it's possible to do matchesSelector
  1102. // on a disconnected node (IE 9)
  1103. support.disconnectedMatch = matches.call( el, "*" );
  1104. // This should fail with an exception
  1105. // Gecko does not error, returns false instead
  1106. matches.call( el, "[s!='']:x" );
  1107. rbuggyMatches.push( "!=", pseudos );
  1108. });
  1109. }
  1110. rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") );
  1111. rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") );
  1112. /* Contains
  1113. ---------------------------------------------------------------------- */
  1114. hasCompare = rnative.test( docElem.compareDocumentPosition );
  1115. // Element contains another
  1116. // Purposefully self-exclusive
  1117. // As in, an element does not contain itself
  1118. contains = hasCompare || rnative.test( docElem.contains ) ?
  1119. function( a, b ) {
  1120. var adown = a.nodeType === 9 ? a.documentElement : a,
  1121. bup = b && b.parentNode;
  1122. return a === bup || !!( bup && bup.nodeType === 1 && (
  1123. adown.contains ?
  1124. adown.contains( bup ) :
  1125. a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
  1126. ));
  1127. } :
  1128. function( a, b ) {
  1129. if ( b ) {
  1130. while ( (b = b.parentNode) ) {
  1131. if ( b === a ) {
  1132. return true;
  1133. }
  1134. }
  1135. }
  1136. return false;
  1137. };
  1138. /* Sorting
  1139. ---------------------------------------------------------------------- */
  1140. // Document order sorting
  1141. sortOrder = hasCompare ?
  1142. function( a, b ) {
  1143. // Flag for duplicate removal
  1144. if ( a === b ) {
  1145. hasDuplicate = true;
  1146. return 0;
  1147. }
  1148. // Sort on method existence if only one input has compareDocumentPosition
  1149. var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
  1150. if ( compare ) {
  1151. return compare;
  1152. }
  1153. // Calculate position if both inputs belong to the same document
  1154. compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ?
  1155. a.compareDocumentPosition( b ) :
  1156. // Otherwise we know they are disconnected
  1157. 1;
  1158. // Disconnected nodes
  1159. if ( compare & 1 ||
  1160. (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {
  1161. // Choose the first element that is related to our preferred document
  1162. if ( a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) {
  1163. return -1;
  1164. }
  1165. if ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) {
  1166. return 1;
  1167. }
  1168. // Maintain original order
  1169. return sortInput ?
  1170. ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
  1171. 0;
  1172. }
  1173. return compare & 4 ? -1 : 1;
  1174. } :
  1175. function( a, b ) {
  1176. // Exit early if the nodes are identical
  1177. if ( a === b ) {
  1178. hasDuplicate = true;
  1179. return 0;
  1180. }
  1181. var cur,
  1182. i = 0,
  1183. aup = a.parentNode,
  1184. bup = b.parentNode,
  1185. ap = [ a ],
  1186. bp = [ b ];
  1187. // Parentless nodes are either documents or disconnected
  1188. if ( !aup || !bup ) {
  1189. return a === document ? -1 :
  1190. b === document ? 1 :
  1191. aup ? -1 :
  1192. bup ? 1 :
  1193. sortInput ?
  1194. ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
  1195. 0;
  1196. // If the nodes are siblings, we can do a quick check
  1197. } else if ( aup === bup ) {
  1198. return siblingCheck( a, b );
  1199. }
  1200. // Otherwise we need full lists of their ancestors for comparison
  1201. cur = a;
  1202. while ( (cur = cur.parentNode) ) {
  1203. ap.unshift( cur );
  1204. }
  1205. cur = b;
  1206. while ( (cur = cur.parentNode) ) {
  1207. bp.unshift( cur );
  1208. }
  1209. // Walk down the tree looking for a discrepancy
  1210. while ( ap[i] === bp[i] ) {
  1211. i++;
  1212. }
  1213. return i ?
  1214. // Do a sibling check if the nodes have a common ancestor
  1215. siblingCheck( ap[i], bp[i] ) :
  1216. // Otherwise nodes in our document sort first
  1217. ap[i] === preferredDoc ? -1 :
  1218. bp[i] === preferredDoc ? 1 :
  1219. 0;
  1220. };
  1221. return document;
  1222. };
  1223. Sizzle.matches = function( expr, elements ) {
  1224. return Sizzle( expr, null, null, elements );
  1225. };
  1226. Sizzle.matchesSelector = function( elem, expr ) {
  1227. // Set document vars if needed
  1228. if ( ( elem.ownerDocument || elem ) !== document ) {
  1229. setDocument( elem );
  1230. }
  1231. // Make sure that attribute selectors are quoted
  1232. expr = expr.replace( rattributeQuotes, "='$1']" );
  1233. if ( support.matchesSelector && documentIsHTML &&
  1234. !compilerCache[ expr + " " ] &&
  1235. ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
  1236. ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {
  1237. try {
  1238. var ret = matches.call( elem, expr );
  1239. // IE 9's matchesSelector returns false on disconnected nodes
  1240. if ( ret || support.disconnectedMatch ||
  1241. // As well, disconnected nodes are said to be in a document
  1242. // fragment in IE 9
  1243. elem.document && elem.document.nodeType !== 11 ) {
  1244. return ret;
  1245. }
  1246. } catch (e) {}
  1247. }
  1248. return Sizzle( expr, document, null, [ elem ] ).length > 0;
  1249. };
  1250. Sizzle.contains = function( context, elem ) {
  1251. // Set document vars if needed
  1252. if ( ( context.ownerDocument || context ) !== document ) {
  1253. setDocument( context );
  1254. }
  1255. return contains( context, elem );
  1256. };
  1257. Sizzle.attr = function( elem, name ) {
  1258. // Set document vars if needed
  1259. if ( ( elem.ownerDocument || elem ) !== document ) {
  1260. setDocument( elem );
  1261. }
  1262. var fn = Expr.attrHandle[ name.toLowerCase() ],
  1263. // Don't get fooled by Object.prototype properties (jQuery #13807)
  1264. val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
  1265. fn( elem, name, !documentIsHTML ) :
  1266. undefined;
  1267. return val !== undefined ?
  1268. val :
  1269. support.attributes || !documentIsHTML ?
  1270. elem.getAttribute( name ) :
  1271. (val = elem.getAttributeNode(name)) && val.specified ?
  1272. val.value :
  1273. null;
  1274. };
  1275. Sizzle.escape = function( sel ) {
  1276. return (sel + "").replace( rcssescape, fcssescape );
  1277. };
  1278. Sizzle.error = function( msg ) {
  1279. throw new Error( "Syntax error, unrecognized expression: " + msg );
  1280. };
  1281. /**
  1282. * Document sorting and removing duplicates
  1283. * @param {ArrayLike} results
  1284. */
  1285. Sizzle.uniqueSort = function( results ) {
  1286. var elem,
  1287. duplicates = [],
  1288. j = 0,
  1289. i = 0;
  1290. // Unless we *know* we can detect duplicates, assume their presence
  1291. hasDuplicate = !support.detectDuplicates;
  1292. sortInput = !support.sortStable && results.slice( 0 );
  1293. results.sort( sortOrder );
  1294. if ( hasDuplicate ) {
  1295. while ( (elem = results[i++]) ) {
  1296. if ( elem === results[ i ] ) {
  1297. j = duplicates.push( i );
  1298. }
  1299. }
  1300. while ( j-- ) {
  1301. results.splice( duplicates[ j ], 1 );
  1302. }
  1303. }
  1304. // Clear input after sorting to release objects
  1305. // See https://github.com/jquery/sizzle/pull/225
  1306. sortInput = null;
  1307. return results;
  1308. };
  1309. /**
  1310. * Utility function for retrieving the text value of an array of DOM nodes
  1311. * @param {Array|Element} elem
  1312. */
  1313. getText = Sizzle.getText = function( elem ) {
  1314. var node,
  1315. ret = "",
  1316. i = 0,
  1317. nodeType = elem.nodeType;
  1318. if ( !nodeType ) {
  1319. // If no nodeType, this is expected to be an array
  1320. while ( (node = elem[i++]) ) {
  1321. // Do not traverse comment nodes
  1322. ret += getText( node );
  1323. }
  1324. } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
  1325. // Use textContent for elements
  1326. // innerText usage removed for consistency of new lines (jQuery #11153)
  1327. if ( typeof elem.textContent === "string" ) {
  1328. return elem.textContent;
  1329. } else {
  1330. // Traverse its children
  1331. for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
  1332. ret += getText( elem );
  1333. }
  1334. }
  1335. } else if ( nodeType === 3 || nodeType === 4 ) {
  1336. return elem.nodeValue;
  1337. }
  1338. // Do not include comment or processing instruction nodes
  1339. return ret;
  1340. };
  1341. Expr = Sizzle.selectors = {
  1342. // Can be adjusted by the user
  1343. cacheLength: 50,
  1344. createPseudo: markFunction,
  1345. match: matchExpr,
  1346. attrHandle: {},
  1347. find: {},
  1348. relative: {
  1349. ">": { dir: "parentNode", first: true },
  1350. " ": { dir: "parentNode" },
  1351. "+": { dir: "previousSibling", first: true },
  1352. "~": { dir: "previousSibling" }
  1353. },
  1354. preFilter: {
  1355. "ATTR": function( match ) {
  1356. match[1] = match[1].replace( runescape, funescape );
  1357. // Move the given value to match[3] whether quoted or unquoted
  1358. match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape );
  1359. if ( match[2] === "~=" ) {
  1360. match[3] = " " + match[3] + " ";
  1361. }
  1362. return match.slice( 0, 4 );
  1363. },
  1364. "CHILD": function( match ) {
  1365. /* matches from matchExpr["CHILD"]
  1366. 1 type (only|nth|...)
  1367. 2 what (child|of-type)
  1368. 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
  1369. 4 xn-component of xn+y argument ([+-]?\d*n|)
  1370. 5 sign of xn-component
  1371. 6 x of xn-component
  1372. 7 sign of y-component
  1373. 8 y of y-component
  1374. */
  1375. match[1] = match[1].toLowerCase();
  1376. if ( match[1].slice( 0, 3 ) === "nth" ) {
  1377. // nth-* requires argument
  1378. if ( !match[3] ) {
  1379. Sizzle.error( match[0] );
  1380. }
  1381. // numeric x and y parameters for Expr.filter.CHILD
  1382. // remember that false/true cast respectively to 0/1
  1383. match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) );
  1384. match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" );
  1385. // other types prohibit arguments
  1386. } else if ( match[3] ) {
  1387. Sizzle.error( match[0] );
  1388. }
  1389. return match;
  1390. },
  1391. "PSEUDO": function( match ) {
  1392. var excess,
  1393. unquoted = !match[6] && match[2];
  1394. if ( matchExpr["CHILD"].test( match[0] ) ) {
  1395. return null;
  1396. }
  1397. // Accept quoted arguments as-is
  1398. if ( match[3] ) {
  1399. match[2] = match[4] || match[5] || "";
  1400. // Strip excess characters from unquoted arguments
  1401. } else if ( unquoted && rpseudo.test( unquoted ) &&
  1402. // Get excess from tokenize (recursively)
  1403. (excess = tokenize( unquoted, true )) &&
  1404. // advance to the next closing parenthesis
  1405. (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {
  1406. // excess is a negative index
  1407. match[0] = match[0].slice( 0, excess );
  1408. match[2] = unquoted.slice( 0, excess );
  1409. }
  1410. // Return only captures needed by the pseudo filter method (type and argument)
  1411. return match.slice( 0, 3 );
  1412. }
  1413. },
  1414. filter: {
  1415. "TAG": function( nodeNameSelector ) {
  1416. var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
  1417. return nodeNameSelector === "*" ?
  1418. function() { return true; } :
  1419. function( elem ) {
  1420. return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
  1421. };
  1422. },
  1423. "CLASS": function( className ) {
  1424. var pattern = classCache[ className + " " ];
  1425. return pattern ||
  1426. (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&
  1427. classCache( className, function( elem ) {
  1428. return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" );
  1429. });
  1430. },
  1431. "ATTR": function( name, operator, check ) {
  1432. return function( elem ) {
  1433. var result = Sizzle.attr( elem, name );
  1434. if ( result == null ) {
  1435. return operator === "!=";
  1436. }
  1437. if ( !operator ) {
  1438. return true;
  1439. }
  1440. result += "";
  1441. return operator === "=" ? result === check :
  1442. operator === "!=" ? result !== check :
  1443. operator === "^=" ? check && result.indexOf( check ) === 0 :
  1444. operator === "*=" ? check && result.indexOf( check ) > -1 :
  1445. operator === "$=" ? check && result.slice( -check.length ) === check :
  1446. operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 :
  1447. operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :
  1448. false;
  1449. };
  1450. },
  1451. "CHILD": function( type, what, argument, first, last ) {
  1452. var simple = type.slice( 0, 3 ) !== "nth",
  1453. forward = type.slice( -4 ) !== "last",
  1454. ofType = what === "of-type";
  1455. return first === 1 && last === 0 ?
  1456. // Shortcut for :nth-*(n)
  1457. function( elem ) {
  1458. return !!elem.parentNode;
  1459. } :
  1460. function( elem, context, xml ) {
  1461. var cache, uniqueCache, outerCache, node, nodeIndex, start,
  1462. dir = simple !== forward ? "nextSibling" : "previousSibling",
  1463. parent = elem.parentNode,
  1464. name = ofType && elem.nodeName.toLowerCase(),
  1465. useCache = !xml && !ofType,
  1466. diff = false;
  1467. if ( parent ) {
  1468. // :(first|last|only)-(child|of-type)
  1469. if ( simple ) {
  1470. while ( dir ) {
  1471. node = elem;
  1472. while ( (node = node[ dir ]) ) {
  1473. if ( ofType ?
  1474. node.nodeName.toLowerCase() === name :
  1475. node.nodeType === 1 ) {
  1476. return false;
  1477. }
  1478. }
  1479. // Reverse direction for :only-* (if we haven't yet done so)
  1480. start = dir = type === "only" && !start && "nextSibling";
  1481. }
  1482. return true;
  1483. }
  1484. start = [ forward ? parent.firstChild : parent.lastChild ];
  1485. // non-xml :nth-child(...) stores cache data on `parent`
  1486. if ( forward && useCache ) {
  1487. // Seek `elem` from a previously-cached index
  1488. // ...in a gzip-friendly way
  1489. node = parent;
  1490. outerCache = node[ expando ] || (node[ expando ] = {});
  1491. // Support: IE <9 only
  1492. // Defend against cloned attroperties (jQuery gh-1709)
  1493. uniqueCache = outerCache[ node.uniqueID ] ||
  1494. (outerCache[ node.uniqueID ] = {});
  1495. cache = uniqueCache[ type ] || [];
  1496. nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
  1497. diff = nodeIndex && cache[ 2 ];
  1498. node = nodeIndex && parent.childNodes[ nodeIndex ];
  1499. while ( (node = ++nodeIndex && node && node[ dir ] ||
  1500. // Fallback to seeking `elem` from the start
  1501. (diff = nodeIndex = 0) || start.pop()) ) {
  1502. // When found, cache indexes on `parent` and break
  1503. if ( node.nodeType === 1 && ++diff && node === elem ) {
  1504. uniqueCache[ type ] = [ dirruns, nodeIndex, diff ];
  1505. break;
  1506. }
  1507. }
  1508. } else {
  1509. // Use previously-cached element index if available
  1510. if ( useCache ) {
  1511. // ...in a gzip-friendly way
  1512. node = elem;
  1513. outerCache = node[ expando ] || (node[ expando ] = {});
  1514. // Support: IE <9 only
  1515. // Defend against cloned attroperties (jQuery gh-1709)
  1516. uniqueCache = outerCache[ node.uniqueID ] ||
  1517. (outerCache[ node.uniqueID ] = {});
  1518. cache = uniqueCache[ type ] || [];
  1519. nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
  1520. diff = nodeIndex;
  1521. }
  1522. // xml :nth-child(...)
  1523. // or :nth-last-child(...) or :nth(-last)?-of-type(...)
  1524. if ( diff === false ) {
  1525. // Use the same loop as above to seek `elem` from the start
  1526. while ( (node = ++nodeIndex && node && node[ dir ] ||
  1527. (diff = nodeIndex = 0) || start.pop()) ) {
  1528. if ( ( ofType ?
  1529. node.nodeName.toLowerCase() === name :
  1530. node.nodeType === 1 ) &&
  1531. ++diff ) {
  1532. // Cache the index of each encountered element
  1533. if ( useCache ) {
  1534. outerCache = node[ expando ] || (node[ expando ] = {});
  1535. // Support: IE <9 only
  1536. // Defend against cloned attroperties (jQuery gh-1709)
  1537. uniqueCache = outerCache[ node.uniqueID ] ||
  1538. (outerCache[ node.uniqueID ] = {});
  1539. uniqueCache[ type ] = [ dirruns, diff ];
  1540. }
  1541. if ( node === elem ) {
  1542. break;
  1543. }
  1544. }
  1545. }
  1546. }
  1547. }
  1548. // Incorporate the offset, then check against cycle size
  1549. diff -= last;
  1550. return diff === first || ( diff % first === 0 && diff / first >= 0 );
  1551. }
  1552. };
  1553. },
  1554. "PSEUDO": function( pseudo, argument ) {
  1555. // pseudo-class names are case-insensitive
  1556. // http://www.w3.org/TR/selectors/#pseudo-classes
  1557. // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
  1558. // Remember that setFilters inherits from pseudos
  1559. var args,
  1560. fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
  1561. Sizzle.error( "unsupported pseudo: " + pseudo );
  1562. // The user may use createPseudo to indicate that
  1563. // arguments are needed to create the filter function
  1564. // just as Sizzle does
  1565. if ( fn[ expando ] ) {
  1566. return fn( argument );
  1567. }
  1568. // But maintain support for old signatures
  1569. if ( fn.length > 1 ) {
  1570. args = [ pseudo, pseudo, "", argument ];
  1571. return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
  1572. markFunction(function( seed, matches ) {
  1573. var idx,
  1574. matched = fn( seed, argument ),
  1575. i = matched.length;
  1576. while ( i-- ) {
  1577. idx = indexOf( seed, matched[i] );
  1578. seed[ idx ] = !( matches[ idx ] = matched[i] );
  1579. }
  1580. }) :
  1581. function( elem ) {
  1582. return fn( elem, 0, args );
  1583. };
  1584. }
  1585. return fn;
  1586. }
  1587. },
  1588. pseudos: {
  1589. // Potentially complex pseudos
  1590. "not": markFunction(function( selector ) {
  1591. // Trim the selector passed to compile
  1592. // to avoid treating leading and trailing
  1593. // spaces as combinators
  1594. var input = [],
  1595. results = [],
  1596. matcher = compile( selector.replace( rtrim, "$1" ) );
  1597. return matcher[ expando ] ?
  1598. markFunction(function( seed, matches, context, xml ) {
  1599. var elem,
  1600. unmatched = matcher( seed, null, xml, [] ),
  1601. i = seed.length;
  1602. // Match elements unmatched by `matcher`
  1603. while ( i-- ) {
  1604. if ( (elem = unmatched[i]) ) {
  1605. seed[i] = !(matches[i] = elem);
  1606. }
  1607. }
  1608. }) :
  1609. function( elem, context, xml ) {
  1610. input[0] = elem;
  1611. matcher( input, null, xml, results );
  1612. // Don't keep the element (issue #299)
  1613. input[0] = null;
  1614. return !results.pop();
  1615. };
  1616. }),
  1617. "has": markFunction(function( selector ) {
  1618. return function( elem ) {
  1619. return Sizzle( selector, elem ).length > 0;
  1620. };
  1621. }),
  1622. "contains": markFunction(function( text ) {
  1623. text = text.replace( runescape, funescape );
  1624. return function( elem ) {
  1625. return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
  1626. };
  1627. }),
  1628. // "Whether an element is represented by a :lang() selector
  1629. // is based solely on the element's language value
  1630. // being equal to the identifier C,
  1631. // or beginning with the identifier C immediately followed by "-".
  1632. // The matching of C against the element's language value is performed case-insensitively.
  1633. // The identifier C does not have to be a valid language name."
  1634. // http://www.w3.org/TR/selectors/#lang-pseudo
  1635. "lang": markFunction( function( lang ) {
  1636. // lang value must be a valid identifier
  1637. if ( !ridentifier.test(lang || "") ) {
  1638. Sizzle.error( "unsupported lang: " + lang );
  1639. }
  1640. lang = lang.replace( runescape, funescape ).toLowerCase();
  1641. return function( elem ) {
  1642. var elemLang;
  1643. do {
  1644. if ( (elemLang = documentIsHTML ?
  1645. elem.lang :
  1646. elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) {
  1647. elemLang = elemLang.toLowerCase();
  1648. return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
  1649. }
  1650. } while ( (elem = elem.parentNode) && elem.nodeType === 1 );
  1651. return false;
  1652. };
  1653. }),
  1654. // Miscellaneous
  1655. "target": function( elem ) {
  1656. var hash = window.location && window.location.hash;
  1657. return hash && hash.slice( 1 ) === elem.id;
  1658. },
  1659. "root": function( elem ) {
  1660. return elem === docElem;
  1661. },
  1662. "focus": function( elem ) {
  1663. return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
  1664. },
  1665. // Boolean properties
  1666. "enabled": createDisabledPseudo( false ),
  1667. "disabled": createDisabledPseudo( true ),
  1668. "checked": function( elem ) {
  1669. // In CSS3, :checked should return both checked and selected elements
  1670. // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
  1671. var nodeName = elem.nodeName.toLowerCase();
  1672. return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
  1673. },
  1674. "selected": function( elem ) {
  1675. // Accessing this property makes selected-by-default
  1676. // options in Safari work properly
  1677. if ( elem.parentNode ) {
  1678. elem.parentNode.selectedIndex;
  1679. }
  1680. return elem.selected === true;
  1681. },
  1682. // Contents
  1683. "empty": function( elem ) {
  1684. // http://www.w3.org/TR/selectors/#empty-pseudo
  1685. // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),
  1686. // but not by others (comment: 8; processing instruction: 7; etc.)
  1687. // nodeType < 6 works because attributes (2) do not appear as children
  1688. for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
  1689. if ( elem.nodeType < 6 ) {
  1690. return false;
  1691. }
  1692. }
  1693. return true;
  1694. },
  1695. "parent": function( elem ) {
  1696. return !Expr.pseudos["empty"]( elem );
  1697. },
  1698. // Element/input types
  1699. "header": function( elem ) {
  1700. return rheader.test( elem.nodeName );
  1701. },
  1702. "input": function( elem ) {
  1703. return rinputs.test( elem.nodeName );
  1704. },
  1705. "button": function( elem ) {
  1706. var name = elem.nodeName.toLowerCase();
  1707. return name === "input" && elem.type === "button" || name === "button";
  1708. },
  1709. "text": function( elem ) {
  1710. var attr;
  1711. return elem.nodeName.toLowerCase() === "input" &&
  1712. elem.type === "text" &&
  1713. // Support: IE<8
  1714. // New HTML5 attribute values (e.g., "search") appear with elem.type === "text"
  1715. ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" );
  1716. },
  1717. // Position-in-collection
  1718. "first": createPositionalPseudo(function() {
  1719. return [ 0 ];
  1720. }),
  1721. "last": createPositionalPseudo(function( matchIndexes, length ) {
  1722. return [ length - 1 ];
  1723. }),
  1724. "eq": createPositionalPseudo(function( matchIndexes, length, argument ) {
  1725. return [ argument < 0 ? argument + length : argument ];
  1726. }),
  1727. "even": createPositionalPseudo(function( matchIndexes, length ) {
  1728. var i = 0;
  1729. for ( ; i < length; i += 2 ) {
  1730. matchIndexes.push( i );
  1731. }
  1732. return matchIndexes;
  1733. }),
  1734. "odd": createPositionalPseudo(function( matchIndexes, length ) {
  1735. var i = 1;
  1736. for ( ; i < length; i += 2 ) {
  1737. matchIndexes.push( i );
  1738. }
  1739. return matchIndexes;
  1740. }),
  1741. "lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
  1742. var i = argument < 0 ? argument + length : argument;
  1743. for ( ; --i >= 0; ) {
  1744. matchIndexes.push( i );
  1745. }
  1746. return matchIndexes;
  1747. }),
  1748. "gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
  1749. var i = argument < 0 ? argument + length : argument;
  1750. for ( ; ++i < length; ) {
  1751. matchIndexes.push( i );
  1752. }
  1753. return matchIndexes;
  1754. })
  1755. }
  1756. };
  1757. Expr.pseudos["nth"] = Expr.pseudos["eq"];
  1758. // Add button/input type pseudos
  1759. for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
  1760. Expr.pseudos[ i ] = createInputPseudo( i );
  1761. }
  1762. for ( i in { submit: true, reset: true } ) {
  1763. Expr.pseudos[ i ] = createButtonPseudo( i );
  1764. }
  1765. // Easy API for creating new setFilters
  1766. function setFilters() {}
  1767. setFilters.prototype = Expr.filters = Expr.pseudos;
  1768. Expr.setFilters = new setFilters();
  1769. tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
  1770. var matched, match, tokens, type,
  1771. soFar, groups, preFilters,
  1772. cached = tokenCache[ selector + " " ];
  1773. if ( cached ) {
  1774. return parseOnly ? 0 : cached.slice( 0 );
  1775. }
  1776. soFar = selector;
  1777. groups = [];
  1778. preFilters = Expr.preFilter;
  1779. while ( soFar ) {
  1780. // Comma and first run
  1781. if ( !matched || (match = rcomma.exec( soFar )) ) {
  1782. if ( match ) {
  1783. // Don't consume trailing commas as valid
  1784. soFar = soFar.slice( match[0].length ) || soFar;
  1785. }
  1786. groups.push( (tokens = []) );
  1787. }
  1788. matched = false;
  1789. // Combinators
  1790. if ( (match = rcombinators.exec( soFar )) ) {
  1791. matched = match.shift();
  1792. tokens.push({
  1793. value: matched,
  1794. // Cast descendant combinators to space
  1795. type: match[0].replace( rtrim, " " )
  1796. });
  1797. soFar = soFar.slice( matched.length );
  1798. }
  1799. // Filters
  1800. for ( type in Expr.filter ) {
  1801. if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
  1802. (match = preFilters[ type ]( match ))) ) {
  1803. matched = match.shift();
  1804. tokens.push({
  1805. value: matched,
  1806. type: type,
  1807. matches: match
  1808. });
  1809. soFar = soFar.slice( matched.length );
  1810. }
  1811. }
  1812. if ( !matched ) {
  1813. break;
  1814. }
  1815. }
  1816. // Return the length of the invalid excess
  1817. // if we're just parsing
  1818. // Otherwise, throw an error or return tokens
  1819. return parseOnly ?
  1820. soFar.length :
  1821. soFar ?
  1822. Sizzle.error( selector ) :
  1823. // Cache the tokens
  1824. tokenCache( selector, groups ).slice( 0 );
  1825. };
  1826. function toSelector( tokens ) {
  1827. var i = 0,
  1828. len = tokens.length,
  1829. selector = "";
  1830. for ( ; i < len; i++ ) {
  1831. selector += tokens[i].value;
  1832. }
  1833. return selector;
  1834. }
  1835. function addCombinator( matcher, combinator, base ) {
  1836. var dir = combinator.dir,
  1837. skip = combinator.next,
  1838. key = skip || dir,
  1839. checkNonElements = base && key === "parentNode",
  1840. doneName = done++;
  1841. return combinator.first ?
  1842. // Check against closest ancestor/preceding element
  1843. function( elem, context, xml ) {
  1844. while ( (elem = elem[ dir ]) ) {
  1845. if ( elem.nodeType === 1 || checkNonElements ) {
  1846. return matcher( elem, context, xml );
  1847. }
  1848. }
  1849. return false;
  1850. } :
  1851. // Check against all ancestor/preceding elements
  1852. function( elem, context, xml ) {
  1853. var oldCache, uniqueCache, outerCache,
  1854. newCache = [ dirruns, doneName ];
  1855. // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching
  1856. if ( xml ) {
  1857. while ( (elem = elem[ dir ]) ) {
  1858. if ( elem.nodeType === 1 || checkNonElements ) {
  1859. if ( matcher( elem, context, xml ) ) {
  1860. return true;
  1861. }
  1862. }
  1863. }
  1864. } else {
  1865. while ( (elem = elem[ dir ]) ) {
  1866. if ( elem.nodeType === 1 || checkNonElements ) {
  1867. outerCache = elem[ expando ] || (elem[ expando ] = {});
  1868. // Support: IE <9 only
  1869. // Defend against cloned attroperties (jQuery gh-1709)
  1870. uniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {});
  1871. if ( skip && skip === elem.nodeName.toLowerCase() ) {
  1872. elem = elem[ dir ] || elem;
  1873. } else if ( (oldCache = uniqueCache[ key ]) &&
  1874. oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {
  1875. // Assign to newCache so results back-propagate to previous elements
  1876. return (newCache[ 2 ] = oldCache[ 2 ]);
  1877. } else {
  1878. // Reuse newcache so results back-propagate to previous elements
  1879. uniqueCache[ key ] = newCache;
  1880. // A match means we're done; a fail means we have to keep checking
  1881. if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {
  1882. return true;
  1883. }
  1884. }
  1885. }
  1886. }
  1887. }
  1888. return false;
  1889. };
  1890. }
  1891. function elementMatcher( matchers ) {
  1892. return matchers.length > 1 ?
  1893. function( elem, context, xml ) {
  1894. var i = matchers.length;
  1895. while ( i-- ) {
  1896. if ( !matchers[i]( elem, context, xml ) ) {
  1897. return false;
  1898. }
  1899. }
  1900. return true;
  1901. } :
  1902. matchers[0];
  1903. }
  1904. function multipleContexts( selector, contexts, results ) {
  1905. var i = 0,
  1906. len = contexts.length;
  1907. for ( ; i < len; i++ ) {
  1908. Sizzle( selector, contexts[i], results );
  1909. }
  1910. return results;
  1911. }
  1912. function condense( unmatched, map, filter, context, xml ) {
  1913. var elem,
  1914. newUnmatched = [],
  1915. i = 0,
  1916. len = unmatched.length,
  1917. mapped = map != null;
  1918. for ( ; i < len; i++ ) {
  1919. if ( (elem = unmatched[i]) ) {
  1920. if ( !filter || filter( elem, context, xml ) ) {
  1921. newUnmatched.push( elem );
  1922. if ( mapped ) {
  1923. map.push( i );
  1924. }
  1925. }
  1926. }
  1927. }
  1928. return newUnmatched;
  1929. }
  1930. function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
  1931. if ( postFilter && !postFilter[ expando ] ) {
  1932. postFilter = setMatcher( postFilter );
  1933. }
  1934. if ( postFinder && !postFinder[ expando ] ) {
  1935. postFinder = setMatcher( postFinder, postSelector );
  1936. }
  1937. return markFunction(function( seed, results, context, xml ) {
  1938. var temp, i, elem,
  1939. preMap = [],
  1940. postMap = [],
  1941. preexisting = results.length,
  1942. // Get initial elements from seed or context
  1943. elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),
  1944. // Prefilter to get matcher input, preserving a map for seed-results synchronization
  1945. matcherIn = preFilter && ( seed || !selector ) ?
  1946. condense( elems, preMap, preFilter, context, xml ) :
  1947. elems,
  1948. matcherOut = matcher ?
  1949. // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
  1950. postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
  1951. // ...intermediate processing is necessary
  1952. [] :
  1953. // ...otherwise use results directly
  1954. results :
  1955. matcherIn;
  1956. // Find primary matches
  1957. if ( matcher ) {
  1958. matcher( matcherIn, matcherOut, context, xml );
  1959. }
  1960. // Apply postFilter
  1961. if ( postFilter ) {
  1962. temp = condense( matcherOut, postMap );
  1963. postFilter( temp, [], context, xml );
  1964. // Un-match failing elements by moving them back to matcherIn
  1965. i = temp.length;
  1966. while ( i-- ) {
  1967. if ( (elem = temp[i]) ) {
  1968. matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
  1969. }
  1970. }
  1971. }
  1972. if ( seed ) {
  1973. if ( postFinder || preFilter ) {
  1974. if ( postFinder ) {
  1975. // Get the final matcherOut by condensing this intermediate into postFinder contexts
  1976. temp = [];
  1977. i = matcherOut.length;
  1978. while ( i-- ) {
  1979. if ( (elem = matcherOut[i]) ) {
  1980. // Restore matcherIn since elem is not yet a final match
  1981. temp.push( (matcherIn[i] = elem) );
  1982. }
  1983. }
  1984. postFinder( null, (matcherOut = []), temp, xml );
  1985. }
  1986. // Move matched elements from seed to results to keep them synchronized
  1987. i = matcherOut.length;
  1988. while ( i-- ) {
  1989. if ( (elem = matcherOut[i]) &&
  1990. (temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) {
  1991. seed[temp] = !(results[temp] = elem);
  1992. }
  1993. }
  1994. }
  1995. // Add elements to results, through postFinder if defined
  1996. } else {
  1997. matcherOut = condense(
  1998. matcherOut === results ?
  1999. matcherOut.splice( preexisting, matcherOut.length ) :
  2000. matcherOut
  2001. );
  2002. if ( postFinder ) {
  2003. postFinder( null, results, matcherOut, xml );
  2004. } else {
  2005. push.apply( results, matcherOut );
  2006. }
  2007. }
  2008. });
  2009. }
  2010. function matcherFromTokens( tokens ) {
  2011. var checkContext, matcher, j,
  2012. len = tokens.length,
  2013. leadingRelative = Expr.relative[ tokens[0].type ],
  2014. implicitRelative = leadingRelative || Expr.relative[" "],
  2015. i = leadingRelative ? 1 : 0,
  2016. // The foundational matcher ensures that elements are reachable from top-level context(s)
  2017. matchContext = addCombinator( function( elem ) {
  2018. return elem === checkContext;
  2019. }, implicitRelative, true ),
  2020. matchAnyContext = addCombinator( function( elem ) {
  2021. return indexOf( checkContext, elem ) > -1;
  2022. }, implicitRelative, true ),
  2023. matchers = [ function( elem, context, xml ) {
  2024. var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
  2025. (checkContext = context).nodeType ?
  2026. matchContext( elem, context, xml ) :
  2027. matchAnyContext( elem, context, xml ) );
  2028. // Avoid hanging onto element (issue #299)
  2029. checkContext = null;
  2030. return ret;
  2031. } ];
  2032. for ( ; i < len; i++ ) {
  2033. if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
  2034. matchers = [ addCombinator(elementMatcher( matchers ), matcher) ];
  2035. } else {
  2036. matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );
  2037. // Return special upon seeing a positional matcher
  2038. if ( matcher[ expando ] ) {
  2039. // Find the next relative operator (if any) for proper handling
  2040. j = ++i;
  2041. for ( ; j < len; j++ ) {
  2042. if ( Expr.relative[ tokens[j].type ] ) {
  2043. break;
  2044. }
  2045. }
  2046. return setMatcher(
  2047. i > 1 && elementMatcher( matchers ),
  2048. i > 1 && toSelector(
  2049. // If the preceding token was a descendant combinator, insert an implicit any-element `*`
  2050. tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" })
  2051. ).replace( rtrim, "$1" ),
  2052. matcher,
  2053. i < j && matcherFromTokens( tokens.slice( i, j ) ),
  2054. j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
  2055. j < len && toSelector( tokens )
  2056. );
  2057. }
  2058. matchers.push( matcher );
  2059. }
  2060. }
  2061. return elementMatcher( matchers );
  2062. }
  2063. function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
  2064. var bySet = setMatchers.length > 0,
  2065. byElement = elementMatchers.length > 0,
  2066. superMatcher = function( seed, context, xml, results, outermost ) {
  2067. var elem, j, matcher,
  2068. matchedCount = 0,
  2069. i = "0",
  2070. unmatched = seed && [],
  2071. setMatched = [],
  2072. contextBackup = outermostContext,
  2073. // We must always have either seed elements or outermost context
  2074. elems = seed || byElement && Expr.find["TAG"]( "*", outermost ),
  2075. // Use integer dirruns iff this is the outermost matcher
  2076. dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1),
  2077. len = elems.length;
  2078. if ( outermost ) {
  2079. outermostContext = context === document || context || outermost;
  2080. }
  2081. // Add elements passing elementMatchers directly to results
  2082. // Support: IE<9, Safari
  2083. // Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id
  2084. for ( ; i !== len && (elem = elems[i]) != null; i++ ) {
  2085. if ( byElement && elem ) {
  2086. j = 0;
  2087. if ( !context && elem.ownerDocument !== document ) {
  2088. setDocument( elem );
  2089. xml = !documentIsHTML;
  2090. }
  2091. while ( (matcher = elementMatchers[j++]) ) {
  2092. if ( matcher( elem, context || document, xml) ) {
  2093. results.push( elem );
  2094. break;
  2095. }
  2096. }
  2097. if ( outermost ) {
  2098. dirruns = dirrunsUnique;
  2099. }
  2100. }
  2101. // Track unmatched elements for set filters
  2102. if ( bySet ) {
  2103. // They will have gone through all possible matchers
  2104. if ( (elem = !matcher && elem) ) {
  2105. matchedCount--;
  2106. }
  2107. // Lengthen the array for every element, matched or not
  2108. if ( seed ) {
  2109. unmatched.push( elem );
  2110. }
  2111. }
  2112. }
  2113. // `i` is now the count of elements visited above, and adding it to `matchedCount`
  2114. // makes the latter nonnegative.
  2115. matchedCount += i;
  2116. // Apply set filters to unmatched elements
  2117. // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`
  2118. // equals `i`), unless we didn't visit _any_ elements in the above loop because we have
  2119. // no element matchers and no seed.
  2120. // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that
  2121. // case, which will result in a "00" `matchedCount` that differs from `i` but is also
  2122. // numerically zero.
  2123. if ( bySet && i !== matchedCount ) {
  2124. j = 0;
  2125. while ( (matcher = setMatchers[j++]) ) {
  2126. matcher( unmatched, setMatched, context, xml );
  2127. }
  2128. if ( seed ) {
  2129. // Reintegrate element matches to eliminate the need for sorting
  2130. if ( matchedCount > 0 ) {
  2131. while ( i-- ) {
  2132. if ( !(unmatched[i] || setMatched[i]) ) {
  2133. setMatched[i] = pop.call( results );
  2134. }
  2135. }
  2136. }
  2137. // Discard index placeholder values to get only actual matches
  2138. setMatched = condense( setMatched );
  2139. }
  2140. // Add matches to results
  2141. push.apply( results, setMatched );
  2142. // Seedless set matches succeeding multiple successful matchers stipulate sorting
  2143. if ( outermost && !seed && setMatched.length > 0 &&
  2144. ( matchedCount + setMatchers.length ) > 1 ) {
  2145. Sizzle.uniqueSort( results );
  2146. }
  2147. }
  2148. // Override manipulation of globals by nested matchers
  2149. if ( outermost ) {
  2150. dirruns = dirrunsUnique;
  2151. outermostContext = contextBackup;
  2152. }
  2153. return unmatched;
  2154. };
  2155. return bySet ?
  2156. markFunction( superMatcher ) :
  2157. superMatcher;
  2158. }
  2159. compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {
  2160. var i,
  2161. setMatchers = [],
  2162. elementMatchers = [],
  2163. cached = compilerCache[ selector + " " ];
  2164. if ( !cached ) {
  2165. // Generate a function of recursive functions that can be used to check each element
  2166. if ( !match ) {
  2167. match = tokenize( selector );
  2168. }
  2169. i = match.length;
  2170. while ( i-- ) {
  2171. cached = matcherFromTokens( match[i] );
  2172. if ( cached[ expando ] ) {
  2173. setMatchers.push( cached );
  2174. } else {
  2175. elementMatchers.push( cached );
  2176. }
  2177. }
  2178. // Cache the compiled function
  2179. cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );
  2180. // Save selector and tokenization
  2181. cached.selector = selector;
  2182. }
  2183. return cached;
  2184. };
  2185. /**
  2186. * A low-level selection function that works with Sizzle's compiled
  2187. * selector functions
  2188. * @param {String|Function} selector A selector or a pre-compiled
  2189. * selector function built with Sizzle.compile
  2190. * @param {Element} context
  2191. * @param {Array} [results]
  2192. * @param {Array} [seed] A set of elements to match against
  2193. */
  2194. select = Sizzle.select = function( selector, context, results, seed ) {
  2195. var i, tokens, token, type, find,
  2196. compiled = typeof selector === "function" && selector,
  2197. match = !seed && tokenize( (selector = compiled.selector || selector) );
  2198. results = results || [];
  2199. // Try to minimize operations if there is only one selector in the list and no seed
  2200. // (the latter of which guarantees us context)
  2201. if ( match.length === 1 ) {
  2202. // Reduce context if the leading compound selector is an ID
  2203. tokens = match[0] = match[0].slice( 0 );
  2204. if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
  2205. context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[1].type ] ) {
  2206. context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
  2207. if ( !context ) {
  2208. return results;
  2209. // Precompiled matchers will still verify ancestry, so step up a level
  2210. } else if ( compiled ) {
  2211. context = context.parentNode;
  2212. }
  2213. selector = selector.slice( tokens.shift().value.length );
  2214. }
  2215. // Fetch a seed set for right-to-left matching
  2216. i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length;
  2217. while ( i-- ) {
  2218. token = tokens[i];
  2219. // Abort if we hit a combinator
  2220. if ( Expr.relative[ (type = token.type) ] ) {
  2221. break;
  2222. }
  2223. if ( (find = Expr.find[ type ]) ) {
  2224. // Search, expanding context for leading sibling combinators
  2225. if ( (seed = find(
  2226. token.matches[0].replace( runescape, funescape ),
  2227. rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context
  2228. )) ) {
  2229. // If seed is empty or no tokens remain, we can return early
  2230. tokens.splice( i, 1 );
  2231. selector = seed.length && toSelector( tokens );
  2232. if ( !selector ) {
  2233. push.apply( results, seed );
  2234. return results;
  2235. }
  2236. break;
  2237. }
  2238. }
  2239. }
  2240. }
  2241. // Compile and execute a filtering function if one is not provided
  2242. // Provide `match` to avoid retokenization if we modified the selector above
  2243. ( compiled || compile( selector, match ) )(
  2244. seed,
  2245. context,
  2246. !documentIsHTML,
  2247. results,
  2248. !context || rsibling.test( selector ) && testContext( context.parentNode ) || context
  2249. );
  2250. return results;
  2251. };
  2252. // One-time assignments
  2253. // Sort stability
  2254. support.sortStable = expando.split("").sort( sortOrder ).join("") === expando;
  2255. // Support: Chrome 14-35+
  2256. // Always assume duplicates if they aren't passed to the comparison function
  2257. support.detectDuplicates = !!hasDuplicate;
  2258. // Initialize against the default document
  2259. setDocument();
  2260. // Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
  2261. // Detached nodes confoundingly follow *each other*
  2262. support.sortDetached = assert(function( el ) {
  2263. // Should return 1, but returns 4 (following)
  2264. return el.compareDocumentPosition( document.createElement("fieldset") ) & 1;
  2265. });
  2266. // Support: IE<8
  2267. // Prevent attribute/property "interpolation"
  2268. // https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
  2269. if ( !assert(function( el ) {
  2270. el.innerHTML = "<a href='#'></a>";
  2271. return el.firstChild.getAttribute("href") === "#" ;
  2272. }) ) {
  2273. addHandle( "type|href|height|width", function( elem, name, isXML ) {
  2274. if ( !isXML ) {
  2275. return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );
  2276. }
  2277. });
  2278. }
  2279. // Support: IE<9
  2280. // Use defaultValue in place of getAttribute("value")
  2281. if ( !support.attributes || !assert(function( el ) {
  2282. el.innerHTML = "<input/>";
  2283. el.firstChild.setAttribute( "value", "" );
  2284. return el.firstChild.getAttribute( "value" ) === "";
  2285. }) ) {
  2286. addHandle( "value", function( elem, name, isXML ) {
  2287. if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {
  2288. return elem.defaultValue;
  2289. }
  2290. });
  2291. }
  2292. // Support: IE<9
  2293. // Use getAttributeNode to fetch booleans when getAttribute lies
  2294. if ( !assert(function( el ) {
  2295. return el.getAttribute("disabled") == null;
  2296. }) ) {
  2297. addHandle( booleans, function( elem, name, isXML ) {
  2298. var val;
  2299. if ( !isXML ) {
  2300. return elem[ name ] === true ? name.toLowerCase() :
  2301. (val = elem.getAttributeNode( name )) && val.specified ?
  2302. val.value :
  2303. null;
  2304. }
  2305. });
  2306. }
  2307. // EXPOSE
  2308. var _sizzle = window.Sizzle;
  2309. Sizzle.noConflict = function() {
  2310. if ( window.Sizzle === Sizzle ) {
  2311. window.Sizzle = _sizzle;
  2312. }
  2313. return Sizzle;
  2314. };
  2315. if ( typeof define === "function" && define.amd ) {
  2316. define('sizzle',[],function() { return Sizzle; });
  2317. // Sizzle requires that there be a global window in Common-JS like environments
  2318. } else if ( typeof module !== "undefined" && module.exports ) {
  2319. module.exports = Sizzle;
  2320. } else {
  2321. window.Sizzle = Sizzle;
  2322. }
  2323. // EXPOSE
  2324. })( window );
  2325. /*!
  2326. * @overview es6-promise - a tiny implementation of Promises/A+.
  2327. * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
  2328. * @license Licensed under MIT license
  2329. * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
  2330. * @version v4.2.4+314e4831
  2331. */
  2332. (function (global, factory) {
  2333. typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
  2334. typeof define === 'function' && define.amd ? define('es6-promise',factory) :
  2335. (global.ES6Promise = factory());
  2336. }(this, (function () { 'use strict';
  2337. function objectOrFunction(x) {
  2338. var type = typeof x;
  2339. return x !== null && (type === 'object' || type === 'function');
  2340. }
  2341. function isFunction(x) {
  2342. return typeof x === 'function';
  2343. }
  2344. var _isArray = void 0;
  2345. if (Array.isArray) {
  2346. _isArray = Array.isArray;
  2347. } else {
  2348. _isArray = function (x) {
  2349. return Object.prototype.toString.call(x) === '[object Array]';
  2350. };
  2351. }
  2352. var isArray = _isArray;
  2353. var len = 0;
  2354. var vertxNext = void 0;
  2355. var customSchedulerFn = void 0;
  2356. var asap = function asap(callback, arg) {
  2357. queue[len] = callback;
  2358. queue[len + 1] = arg;
  2359. len += 2;
  2360. if (len === 2) {
  2361. // If len is 2, that means that we need to schedule an async flush.
  2362. // If additional callbacks are queued before the queue is flushed, they
  2363. // will be processed by this flush that we are scheduling.
  2364. if (customSchedulerFn) {
  2365. customSchedulerFn(flush);
  2366. } else {
  2367. scheduleFlush();
  2368. }
  2369. }
  2370. };
  2371. function setScheduler(scheduleFn) {
  2372. customSchedulerFn = scheduleFn;
  2373. }
  2374. function setAsap(asapFn) {
  2375. asap = asapFn;
  2376. }
  2377. var browserWindow = typeof window !== 'undefined' ? window : undefined;
  2378. var browserGlobal = browserWindow || {};
  2379. var BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;
  2380. var isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';
  2381. // test for web worker but not in IE10
  2382. var isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';
  2383. // node
  2384. function useNextTick() {
  2385. // node version 0.10.x displays a deprecation warning when nextTick is used recursively
  2386. // see https://github.com/cujojs/when/issues/410 for details
  2387. return function () {
  2388. return process.nextTick(flush);
  2389. };
  2390. }
  2391. // vertx
  2392. function useVertxTimer() {
  2393. if (typeof vertxNext !== 'undefined') {
  2394. return function () {
  2395. vertxNext(flush);
  2396. };
  2397. }
  2398. return useSetTimeout();
  2399. }
  2400. function useMutationObserver() {
  2401. var iterations = 0;
  2402. var observer = new BrowserMutationObserver(flush);
  2403. var node = document.createTextNode('');
  2404. observer.observe(node, { characterData: true });
  2405. return function () {
  2406. node.data = iterations = ++iterations % 2;
  2407. };
  2408. }
  2409. // web worker
  2410. function useMessageChannel() {
  2411. var channel = new MessageChannel();
  2412. channel.port1.onmessage = flush;
  2413. return function () {
  2414. return channel.port2.postMessage(0);
  2415. };
  2416. }
  2417. function useSetTimeout() {
  2418. // Store setTimeout reference so es6-promise will be unaffected by
  2419. // other code modifying setTimeout (like sinon.useFakeTimers())
  2420. var globalSetTimeout = setTimeout;
  2421. return function () {
  2422. return globalSetTimeout(flush, 1);
  2423. };
  2424. }
  2425. var queue = new Array(1000);
  2426. function flush() {
  2427. for (var i = 0; i < len; i += 2) {
  2428. var callback = queue[i];
  2429. var arg = queue[i + 1];
  2430. callback(arg);
  2431. queue[i] = undefined;
  2432. queue[i + 1] = undefined;
  2433. }
  2434. len = 0;
  2435. }
  2436. function attemptVertx() {
  2437. try {
  2438. var vertx = Function('return this')().require('vertx');
  2439. vertxNext = vertx.runOnLoop || vertx.runOnContext;
  2440. return useVertxTimer();
  2441. } catch (e) {
  2442. return useSetTimeout();
  2443. }
  2444. }
  2445. var scheduleFlush = void 0;
  2446. // Decide what async method to use to triggering processing of queued callbacks:
  2447. if (isNode) {
  2448. scheduleFlush = useNextTick();
  2449. } else if (BrowserMutationObserver) {
  2450. scheduleFlush = useMutationObserver();
  2451. } else if (isWorker) {
  2452. scheduleFlush = useMessageChannel();
  2453. } else if (browserWindow === undefined && typeof require === 'function') {
  2454. scheduleFlush = attemptVertx();
  2455. } else {
  2456. scheduleFlush = useSetTimeout();
  2457. }
  2458. function then(onFulfillment, onRejection) {
  2459. var parent = this;
  2460. var child = new this.constructor(noop);
  2461. if (child[PROMISE_ID] === undefined) {
  2462. makePromise(child);
  2463. }
  2464. var _state = parent._state;
  2465. if (_state) {
  2466. var callback = arguments[_state - 1];
  2467. asap(function () {
  2468. return invokeCallback(_state, child, callback, parent._result);
  2469. });
  2470. } else {
  2471. subscribe(parent, child, onFulfillment, onRejection);
  2472. }
  2473. return child;
  2474. }
  2475. /**
  2476. `Promise.resolve` returns a promise that will become resolved with the
  2477. passed `value`. It is shorthand for the following:
  2478. ```javascript
  2479. let promise = new Promise(function(resolve, reject){
  2480. resolve(1);
  2481. });
  2482. promise.then(function(value){
  2483. // value === 1
  2484. });
  2485. ```
  2486. Instead of writing the above, your code now simply becomes the following:
  2487. ```javascript
  2488. let promise = Promise.resolve(1);
  2489. promise.then(function(value){
  2490. // value === 1
  2491. });
  2492. ```
  2493. @method resolve
  2494. @static
  2495. @param {Any} value value that the returned promise will be resolved with
  2496. Useful for tooling.
  2497. @return {Promise} a promise that will become fulfilled with the given
  2498. `value`
  2499. */
  2500. function resolve$1(object) {
  2501. /*jshint validthis:true */
  2502. var Constructor = this;
  2503. if (object && typeof object === 'object' && object.constructor === Constructor) {
  2504. return object;
  2505. }
  2506. var promise = new Constructor(noop);
  2507. resolve(promise, object);
  2508. return promise;
  2509. }
  2510. var PROMISE_ID = Math.random().toString(36).substring(2);
  2511. function noop() {}
  2512. var PENDING = void 0;
  2513. var FULFILLED = 1;
  2514. var REJECTED = 2;
  2515. var TRY_CATCH_ERROR = { error: null };
  2516. function selfFulfillment() {
  2517. return new TypeError("You cannot resolve a promise with itself");
  2518. }
  2519. function cannotReturnOwn() {
  2520. return new TypeError('A promises callback cannot return that same promise.');
  2521. }
  2522. function getThen(promise) {
  2523. try {
  2524. return promise.then;
  2525. } catch (error) {
  2526. TRY_CATCH_ERROR.error = error;
  2527. return TRY_CATCH_ERROR;
  2528. }
  2529. }
  2530. function tryThen(then$$1, value, fulfillmentHandler, rejectionHandler) {
  2531. try {
  2532. then$$1.call(value, fulfillmentHandler, rejectionHandler);
  2533. } catch (e) {
  2534. return e;
  2535. }
  2536. }
  2537. function handleForeignThenable(promise, thenable, then$$1) {
  2538. asap(function (promise) {
  2539. var sealed = false;
  2540. var error = tryThen(then$$1, thenable, function (value) {
  2541. if (sealed) {
  2542. return;
  2543. }
  2544. sealed = true;
  2545. if (thenable !== value) {
  2546. resolve(promise, value);
  2547. } else {
  2548. fulfill(promise, value);
  2549. }
  2550. }, function (reason) {
  2551. if (sealed) {
  2552. return;
  2553. }
  2554. sealed = true;
  2555. reject(promise, reason);
  2556. }, 'Settle: ' + (promise._label || ' unknown promise'));
  2557. if (!sealed && error) {
  2558. sealed = true;
  2559. reject(promise, error);
  2560. }
  2561. }, promise);
  2562. }
  2563. function handleOwnThenable(promise, thenable) {
  2564. if (thenable._state === FULFILLED) {
  2565. fulfill(promise, thenable._result);
  2566. } else if (thenable._state === REJECTED) {
  2567. reject(promise, thenable._result);
  2568. } else {
  2569. subscribe(thenable, undefined, function (value) {
  2570. return resolve(promise, value);
  2571. }, function (reason) {
  2572. return reject(promise, reason);
  2573. });
  2574. }
  2575. }
  2576. function handleMaybeThenable(promise, maybeThenable, then$$1) {
  2577. if (maybeThenable.constructor === promise.constructor && then$$1 === then && maybeThenable.constructor.resolve === resolve$1) {
  2578. handleOwnThenable(promise, maybeThenable);
  2579. } else {
  2580. if (then$$1 === TRY_CATCH_ERROR) {
  2581. reject(promise, TRY_CATCH_ERROR.error);
  2582. TRY_CATCH_ERROR.error = null;
  2583. } else if (then$$1 === undefined) {
  2584. fulfill(promise, maybeThenable);
  2585. } else if (isFunction(then$$1)) {
  2586. handleForeignThenable(promise, maybeThenable, then$$1);
  2587. } else {
  2588. fulfill(promise, maybeThenable);
  2589. }
  2590. }
  2591. }
  2592. function resolve(promise, value) {
  2593. if (promise === value) {
  2594. reject(promise, selfFulfillment());
  2595. } else if (objectOrFunction(value)) {
  2596. handleMaybeThenable(promise, value, getThen(value));
  2597. } else {
  2598. fulfill(promise, value);
  2599. }
  2600. }
  2601. function publishRejection(promise) {
  2602. if (promise._onerror) {
  2603. promise._onerror(promise._result);
  2604. }
  2605. publish(promise);
  2606. }
  2607. function fulfill(promise, value) {
  2608. if (promise._state !== PENDING) {
  2609. return;
  2610. }
  2611. promise._result = value;
  2612. promise._state = FULFILLED;
  2613. if (promise._subscribers.length !== 0) {
  2614. asap(publish, promise);
  2615. }
  2616. }
  2617. function reject(promise, reason) {
  2618. if (promise._state !== PENDING) {
  2619. return;
  2620. }
  2621. promise._state = REJECTED;
  2622. promise._result = reason;
  2623. asap(publishRejection, promise);
  2624. }
  2625. function subscribe(parent, child, onFulfillment, onRejection) {
  2626. var _subscribers = parent._subscribers;
  2627. var length = _subscribers.length;
  2628. parent._onerror = null;
  2629. _subscribers[length] = child;
  2630. _subscribers[length + FULFILLED] = onFulfillment;
  2631. _subscribers[length + REJECTED] = onRejection;
  2632. if (length === 0 && parent._state) {
  2633. asap(publish, parent);
  2634. }
  2635. }
  2636. function publish(promise) {
  2637. var subscribers = promise._subscribers;
  2638. var settled = promise._state;
  2639. if (subscribers.length === 0) {
  2640. return;
  2641. }
  2642. var child = void 0,
  2643. callback = void 0,
  2644. detail = promise._result;
  2645. for (var i = 0; i < subscribers.length; i += 3) {
  2646. child = subscribers[i];
  2647. callback = subscribers[i + settled];
  2648. if (child) {
  2649. invokeCallback(settled, child, callback, detail);
  2650. } else {
  2651. callback(detail);
  2652. }
  2653. }
  2654. promise._subscribers.length = 0;
  2655. }
  2656. function tryCatch(callback, detail) {
  2657. try {
  2658. return callback(detail);
  2659. } catch (e) {
  2660. TRY_CATCH_ERROR.error = e;
  2661. return TRY_CATCH_ERROR;
  2662. }
  2663. }
  2664. function invokeCallback(settled, promise, callback, detail) {
  2665. var hasCallback = isFunction(callback),
  2666. value = void 0,
  2667. error = void 0,
  2668. succeeded = void 0,
  2669. failed = void 0;
  2670. if (hasCallback) {
  2671. value = tryCatch(callback, detail);
  2672. if (value === TRY_CATCH_ERROR) {
  2673. failed = true;
  2674. error = value.error;
  2675. value.error = null;
  2676. } else {
  2677. succeeded = true;
  2678. }
  2679. if (promise === value) {
  2680. reject(promise, cannotReturnOwn());
  2681. return;
  2682. }
  2683. } else {
  2684. value = detail;
  2685. succeeded = true;
  2686. }
  2687. if (promise._state !== PENDING) {
  2688. // noop
  2689. } else if (hasCallback && succeeded) {
  2690. resolve(promise, value);
  2691. } else if (failed) {
  2692. reject(promise, error);
  2693. } else if (settled === FULFILLED) {
  2694. fulfill(promise, value);
  2695. } else if (settled === REJECTED) {
  2696. reject(promise, value);
  2697. }
  2698. }
  2699. function initializePromise(promise, resolver) {
  2700. try {
  2701. resolver(function resolvePromise(value) {
  2702. resolve(promise, value);
  2703. }, function rejectPromise(reason) {
  2704. reject(promise, reason);
  2705. });
  2706. } catch (e) {
  2707. reject(promise, e);
  2708. }
  2709. }
  2710. var id = 0;
  2711. function nextId() {
  2712. return id++;
  2713. }
  2714. function makePromise(promise) {
  2715. promise[PROMISE_ID] = id++;
  2716. promise._state = undefined;
  2717. promise._result = undefined;
  2718. promise._subscribers = [];
  2719. }
  2720. function validationError() {
  2721. return new Error('Array Methods must be provided an Array');
  2722. }
  2723. var Enumerator = function () {
  2724. function Enumerator(Constructor, input) {
  2725. this._instanceConstructor = Constructor;
  2726. this.promise = new Constructor(noop);
  2727. if (!this.promise[PROMISE_ID]) {
  2728. makePromise(this.promise);
  2729. }
  2730. if (isArray(input)) {
  2731. this.length = input.length;
  2732. this._remaining = input.length;
  2733. this._result = new Array(this.length);
  2734. if (this.length === 0) {
  2735. fulfill(this.promise, this._result);
  2736. } else {
  2737. this.length = this.length || 0;
  2738. this._enumerate(input);
  2739. if (this._remaining === 0) {
  2740. fulfill(this.promise, this._result);
  2741. }
  2742. }
  2743. } else {
  2744. reject(this.promise, validationError());
  2745. }
  2746. }
  2747. Enumerator.prototype._enumerate = function _enumerate(input) {
  2748. for (var i = 0; this._state === PENDING && i < input.length; i++) {
  2749. this._eachEntry(input[i], i);
  2750. }
  2751. };
  2752. Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {
  2753. var c = this._instanceConstructor;
  2754. var resolve$$1 = c.resolve;
  2755. if (resolve$$1 === resolve$1) {
  2756. var _then = getThen(entry);
  2757. if (_then === then && entry._state !== PENDING) {
  2758. this._settledAt(entry._state, i, entry._result);
  2759. } else if (typeof _then !== 'function') {
  2760. this._remaining--;
  2761. this._result[i] = entry;
  2762. } else if (c === Promise$2) {
  2763. var promise = new c(noop);
  2764. handleMaybeThenable(promise, entry, _then);
  2765. this._willSettleAt(promise, i);
  2766. } else {
  2767. this._willSettleAt(new c(function (resolve$$1) {
  2768. return resolve$$1(entry);
  2769. }), i);
  2770. }
  2771. } else {
  2772. this._willSettleAt(resolve$$1(entry), i);
  2773. }
  2774. };
  2775. Enumerator.prototype._settledAt = function _settledAt(state, i, value) {
  2776. var promise = this.promise;
  2777. if (promise._state === PENDING) {
  2778. this._remaining--;
  2779. if (state === REJECTED) {
  2780. reject(promise, value);
  2781. } else {
  2782. this._result[i] = value;
  2783. }
  2784. }
  2785. if (this._remaining === 0) {
  2786. fulfill(promise, this._result);
  2787. }
  2788. };
  2789. Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {
  2790. var enumerator = this;
  2791. subscribe(promise, undefined, function (value) {
  2792. return enumerator._settledAt(FULFILLED, i, value);
  2793. }, function (reason) {
  2794. return enumerator._settledAt(REJECTED, i, reason);
  2795. });
  2796. };
  2797. return Enumerator;
  2798. }();
  2799. /**
  2800. `Promise.all` accepts an array of promises, and returns a new promise which
  2801. is fulfilled with an array of fulfillment values for the passed promises, or
  2802. rejected with the reason of the first passed promise to be rejected. It casts all
  2803. elements of the passed iterable to promises as it runs this algorithm.
  2804. Example:
  2805. ```javascript
  2806. let promise1 = resolve(1);
  2807. let promise2 = resolve(2);
  2808. let promise3 = resolve(3);
  2809. let promises = [ promise1, promise2, promise3 ];
  2810. Promise.all(promises).then(function(array){
  2811. // The array here would be [ 1, 2, 3 ];
  2812. });
  2813. ```
  2814. If any of the `promises` given to `all` are rejected, the first promise
  2815. that is rejected will be given as an argument to the returned promises's
  2816. rejection handler. For example:
  2817. Example:
  2818. ```javascript
  2819. let promise1 = resolve(1);
  2820. let promise2 = reject(new Error("2"));
  2821. let promise3 = reject(new Error("3"));
  2822. let promises = [ promise1, promise2, promise3 ];
  2823. Promise.all(promises).then(function(array){
  2824. // Code here never runs because there are rejected promises!
  2825. }, function(error) {
  2826. // error.message === "2"
  2827. });
  2828. ```
  2829. @method all
  2830. @static
  2831. @param {Array} entries array of promises
  2832. @param {String} label optional string for labeling the promise.
  2833. Useful for tooling.
  2834. @return {Promise} promise that is fulfilled when all `promises` have been
  2835. fulfilled, or rejected if any of them become rejected.
  2836. @static
  2837. */
  2838. function all(entries) {
  2839. return new Enumerator(this, entries).promise;
  2840. }
  2841. /**
  2842. `Promise.race` returns a new promise which is settled in the same way as the
  2843. first passed promise to settle.
  2844. Example:
  2845. ```javascript
  2846. let promise1 = new Promise(function(resolve, reject){
  2847. setTimeout(function(){
  2848. resolve('promise 1');
  2849. }, 200);
  2850. });
  2851. let promise2 = new Promise(function(resolve, reject){
  2852. setTimeout(function(){
  2853. resolve('promise 2');
  2854. }, 100);
  2855. });
  2856. Promise.race([promise1, promise2]).then(function(result){
  2857. // result === 'promise 2' because it was resolved before promise1
  2858. // was resolved.
  2859. });
  2860. ```
  2861. `Promise.race` is deterministic in that only the state of the first
  2862. settled promise matters. For example, even if other promises given to the
  2863. `promises` array argument are resolved, but the first settled promise has
  2864. become rejected before the other promises became fulfilled, the returned
  2865. promise will become rejected:
  2866. ```javascript
  2867. let promise1 = new Promise(function(resolve, reject){
  2868. setTimeout(function(){
  2869. resolve('promise 1');
  2870. }, 200);
  2871. });
  2872. let promise2 = new Promise(function(resolve, reject){
  2873. setTimeout(function(){
  2874. reject(new Error('promise 2'));
  2875. }, 100);
  2876. });
  2877. Promise.race([promise1, promise2]).then(function(result){
  2878. // Code here never runs
  2879. }, function(reason){
  2880. // reason.message === 'promise 2' because promise 2 became rejected before
  2881. // promise 1 became fulfilled
  2882. });
  2883. ```
  2884. An example real-world use case is implementing timeouts:
  2885. ```javascript
  2886. Promise.race([ajax('foo.json'), timeout(5000)])
  2887. ```
  2888. @method race
  2889. @static
  2890. @param {Array} promises array of promises to observe
  2891. Useful for tooling.
  2892. @return {Promise} a promise which settles in the same way as the first passed
  2893. promise to settle.
  2894. */
  2895. function race(entries) {
  2896. /*jshint validthis:true */
  2897. var Constructor = this;
  2898. if (!isArray(entries)) {
  2899. return new Constructor(function (_, reject) {
  2900. return reject(new TypeError('You must pass an array to race.'));
  2901. });
  2902. } else {
  2903. return new Constructor(function (resolve, reject) {
  2904. var length = entries.length;
  2905. for (var i = 0; i < length; i++) {
  2906. Constructor.resolve(entries[i]).then(resolve, reject);
  2907. }
  2908. });
  2909. }
  2910. }
  2911. /**
  2912. `Promise.reject` returns a promise rejected with the passed `reason`.
  2913. It is shorthand for the following:
  2914. ```javascript
  2915. let promise = new Promise(function(resolve, reject){
  2916. reject(new Error('WHOOPS'));
  2917. });
  2918. promise.then(function(value){
  2919. // Code here doesn't run because the promise is rejected!
  2920. }, function(reason){
  2921. // reason.message === 'WHOOPS'
  2922. });
  2923. ```
  2924. Instead of writing the above, your code now simply becomes the following:
  2925. ```javascript
  2926. let promise = Promise.reject(new Error('WHOOPS'));
  2927. promise.then(function(value){
  2928. // Code here doesn't run because the promise is rejected!
  2929. }, function(reason){
  2930. // reason.message === 'WHOOPS'
  2931. });
  2932. ```
  2933. @method reject
  2934. @static
  2935. @param {Any} reason value that the returned promise will be rejected with.
  2936. Useful for tooling.
  2937. @return {Promise} a promise rejected with the given `reason`.
  2938. */
  2939. function reject$1(reason) {
  2940. /*jshint validthis:true */
  2941. var Constructor = this;
  2942. var promise = new Constructor(noop);
  2943. reject(promise, reason);
  2944. return promise;
  2945. }
  2946. function needsResolver() {
  2947. throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');
  2948. }
  2949. function needsNew() {
  2950. throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");
  2951. }
  2952. /**
  2953. Promise objects represent the eventual result of an asynchronous operation. The
  2954. primary way of interacting with a promise is through its `then` method, which
  2955. registers callbacks to receive either a promise's eventual value or the reason
  2956. why the promise cannot be fulfilled.
  2957. Terminology
  2958. -----------
  2959. - `promise` is an object or function with a `then` method whose behavior conforms to this specification.
  2960. - `thenable` is an object or function that defines a `then` method.
  2961. - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).
  2962. - `exception` is a value that is thrown using the throw statement.
  2963. - `reason` is a value that indicates why a promise was rejected.
  2964. - `settled` the final resting state of a promise, fulfilled or rejected.
  2965. A promise can be in one of three states: pending, fulfilled, or rejected.
  2966. Promises that are fulfilled have a fulfillment value and are in the fulfilled
  2967. state. Promises that are rejected have a rejection reason and are in the
  2968. rejected state. A fulfillment value is never a thenable.
  2969. Promises can also be said to *resolve* a value. If this value is also a
  2970. promise, then the original promise's settled state will match the value's
  2971. settled state. So a promise that *resolves* a promise that rejects will
  2972. itself reject, and a promise that *resolves* a promise that fulfills will
  2973. itself fulfill.
  2974. Basic Usage:
  2975. ------------
  2976. ```js
  2977. let promise = new Promise(function(resolve, reject) {
  2978. // on success
  2979. resolve(value);
  2980. // on failure
  2981. reject(reason);
  2982. });
  2983. promise.then(function(value) {
  2984. // on fulfillment
  2985. }, function(reason) {
  2986. // on rejection
  2987. });
  2988. ```
  2989. Advanced Usage:
  2990. ---------------
  2991. Promises shine when abstracting away asynchronous interactions such as
  2992. `XMLHttpRequest`s.
  2993. ```js
  2994. function getJSON(url) {
  2995. return new Promise(function(resolve, reject){
  2996. let xhr = new XMLHttpRequest();
  2997. xhr.open('GET', url);
  2998. xhr.onreadystatechange = handler;
  2999. xhr.responseType = 'json';
  3000. xhr.setRequestHeader('Accept', 'application/json');
  3001. xhr.send();
  3002. function handler() {
  3003. if (this.readyState === this.DONE) {
  3004. if (this.status === 200) {
  3005. resolve(this.response);
  3006. } else {
  3007. reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));
  3008. }
  3009. }
  3010. };
  3011. });
  3012. }
  3013. getJSON('/posts.json').then(function(json) {
  3014. // on fulfillment
  3015. }, function(reason) {
  3016. // on rejection
  3017. });
  3018. ```
  3019. Unlike callbacks, promises are great composable primitives.
  3020. ```js
  3021. Promise.all([
  3022. getJSON('/posts'),
  3023. getJSON('/comments')
  3024. ]).then(function(values){
  3025. values[0] // => postsJSON
  3026. values[1] // => commentsJSON
  3027. return values;
  3028. });
  3029. ```
  3030. @class Promise
  3031. @param {Function} resolver
  3032. Useful for tooling.
  3033. @constructor
  3034. */
  3035. var Promise$2 = function () {
  3036. function Promise(resolver) {
  3037. this[PROMISE_ID] = nextId();
  3038. this._result = this._state = undefined;
  3039. this._subscribers = [];
  3040. if (noop !== resolver) {
  3041. typeof resolver !== 'function' && needsResolver();
  3042. this instanceof Promise ? initializePromise(this, resolver) : needsNew();
  3043. }
  3044. }
  3045. /**
  3046. The primary way of interacting with a promise is through its `then` method,
  3047. which registers callbacks to receive either a promise's eventual value or the
  3048. reason why the promise cannot be fulfilled.
  3049. ```js
  3050. findUser().then(function(user){
  3051. // user is available
  3052. }, function(reason){
  3053. // user is unavailable, and you are given the reason why
  3054. });
  3055. ```
  3056. Chaining
  3057. --------
  3058. The return value of `then` is itself a promise. This second, 'downstream'
  3059. promise is resolved with the return value of the first promise's fulfillment
  3060. or rejection handler, or rejected if the handler throws an exception.
  3061. ```js
  3062. findUser().then(function (user) {
  3063. return user.name;
  3064. }, function (reason) {
  3065. return 'default name';
  3066. }).then(function (userName) {
  3067. // If `findUser` fulfilled, `userName` will be the user's name, otherwise it
  3068. // will be `'default name'`
  3069. });
  3070. findUser().then(function (user) {
  3071. throw new Error('Found user, but still unhappy');
  3072. }, function (reason) {
  3073. throw new Error('`findUser` rejected and we're unhappy');
  3074. }).then(function (value) {
  3075. // never reached
  3076. }, function (reason) {
  3077. // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.
  3078. // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.
  3079. });
  3080. ```
  3081. If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.
  3082. ```js
  3083. findUser().then(function (user) {
  3084. throw new PedagogicalException('Upstream error');
  3085. }).then(function (value) {
  3086. // never reached
  3087. }).then(function (value) {
  3088. // never reached
  3089. }, function (reason) {
  3090. // The `PedgagocialException` is propagated all the way down to here
  3091. });
  3092. ```
  3093. Assimilation
  3094. ------------
  3095. Sometimes the value you want to propagate to a downstream promise can only be
  3096. retrieved asynchronously. This can be achieved by returning a promise in the
  3097. fulfillment or rejection handler. The downstream promise will then be pending
  3098. until the returned promise is settled. This is called *assimilation*.
  3099. ```js
  3100. findUser().then(function (user) {
  3101. return findCommentsByAuthor(user);
  3102. }).then(function (comments) {
  3103. // The user's comments are now available
  3104. });
  3105. ```
  3106. If the assimliated promise rejects, then the downstream promise will also reject.
  3107. ```js
  3108. findUser().then(function (user) {
  3109. return findCommentsByAuthor(user);
  3110. }).then(function (comments) {
  3111. // If `findCommentsByAuthor` fulfills, we'll have the value here
  3112. }, function (reason) {
  3113. // If `findCommentsByAuthor` rejects, we'll have the reason here
  3114. });
  3115. ```
  3116. Simple Example
  3117. --------------
  3118. Synchronous Example
  3119. ```javascript
  3120. let result;
  3121. try {
  3122. result = findResult();
  3123. // success
  3124. } catch(reason) {
  3125. // failure
  3126. }
  3127. ```
  3128. Errback Example
  3129. ```js
  3130. findResult(function(result, err){
  3131. if (err) {
  3132. // failure
  3133. } else {
  3134. // success
  3135. }
  3136. });
  3137. ```
  3138. Promise Example;
  3139. ```javascript
  3140. findResult().then(function(result){
  3141. // success
  3142. }, function(reason){
  3143. // failure
  3144. });
  3145. ```
  3146. Advanced Example
  3147. --------------
  3148. Synchronous Example
  3149. ```javascript
  3150. let author, books;
  3151. try {
  3152. author = findAuthor();
  3153. books = findBooksByAuthor(author);
  3154. // success
  3155. } catch(reason) {
  3156. // failure
  3157. }
  3158. ```
  3159. Errback Example
  3160. ```js
  3161. function foundBooks(books) {
  3162. }
  3163. function failure(reason) {
  3164. }
  3165. findAuthor(function(author, err){
  3166. if (err) {
  3167. failure(err);
  3168. // failure
  3169. } else {
  3170. try {
  3171. findBoooksByAuthor(author, function(books, err) {
  3172. if (err) {
  3173. failure(err);
  3174. } else {
  3175. try {
  3176. foundBooks(books);
  3177. } catch(reason) {
  3178. failure(reason);
  3179. }
  3180. }
  3181. });
  3182. } catch(error) {
  3183. failure(err);
  3184. }
  3185. // success
  3186. }
  3187. });
  3188. ```
  3189. Promise Example;
  3190. ```javascript
  3191. findAuthor().
  3192. then(findBooksByAuthor).
  3193. then(function(books){
  3194. // found books
  3195. }).catch(function(reason){
  3196. // something went wrong
  3197. });
  3198. ```
  3199. @method then
  3200. @param {Function} onFulfilled
  3201. @param {Function} onRejected
  3202. Useful for tooling.
  3203. @return {Promise}
  3204. */
  3205. /**
  3206. `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same
  3207. as the catch block of a try/catch statement.
  3208. ```js
  3209. function findAuthor(){
  3210. throw new Error('couldn't find that author');
  3211. }
  3212. // synchronous
  3213. try {
  3214. findAuthor();
  3215. } catch(reason) {
  3216. // something went wrong
  3217. }
  3218. // async with promises
  3219. findAuthor().catch(function(reason){
  3220. // something went wrong
  3221. });
  3222. ```
  3223. @method catch
  3224. @param {Function} onRejection
  3225. Useful for tooling.
  3226. @return {Promise}
  3227. */
  3228. Promise.prototype.catch = function _catch(onRejection) {
  3229. return this.then(null, onRejection);
  3230. };
  3231. /**
  3232. `finally` will be invoked regardless of the promise's fate just as native
  3233. try/catch/finally behaves
  3234. Synchronous example:
  3235. ```js
  3236. findAuthor() {
  3237. if (Math.random() > 0.5) {
  3238. throw new Error();
  3239. }
  3240. return new Author();
  3241. }
  3242. try {
  3243. return findAuthor(); // succeed or fail
  3244. } catch(error) {
  3245. return findOtherAuther();
  3246. } finally {
  3247. // always runs
  3248. // doesn't affect the return value
  3249. }
  3250. ```
  3251. Asynchronous example:
  3252. ```js
  3253. findAuthor().catch(function(reason){
  3254. return findOtherAuther();
  3255. }).finally(function(){
  3256. // author was either found, or not
  3257. });
  3258. ```
  3259. @method finally
  3260. @param {Function} callback
  3261. @return {Promise}
  3262. */
  3263. Promise.prototype.finally = function _finally(callback) {
  3264. var promise = this;
  3265. var constructor = promise.constructor;
  3266. return promise.then(function (value) {
  3267. return constructor.resolve(callback()).then(function () {
  3268. return value;
  3269. });
  3270. }, function (reason) {
  3271. return constructor.resolve(callback()).then(function () {
  3272. throw reason;
  3273. });
  3274. });
  3275. };
  3276. return Promise;
  3277. }();
  3278. Promise$2.prototype.then = then;
  3279. Promise$2.all = all;
  3280. Promise$2.race = race;
  3281. Promise$2.resolve = resolve$1;
  3282. Promise$2.reject = reject$1;
  3283. Promise$2._setScheduler = setScheduler;
  3284. Promise$2._setAsap = setAsap;
  3285. Promise$2._asap = asap;
  3286. /*global self*/
  3287. function polyfill() {
  3288. var local = void 0;
  3289. if (typeof global !== 'undefined') {
  3290. local = global;
  3291. } else if (typeof self !== 'undefined') {
  3292. local = self;
  3293. } else {
  3294. try {
  3295. local = Function('return this')();
  3296. } catch (e) {
  3297. throw new Error('polyfill failed because global object is unavailable in this environment');
  3298. }
  3299. }
  3300. var P = local.Promise;
  3301. if (P) {
  3302. var promiseToString = null;
  3303. try {
  3304. promiseToString = Object.prototype.toString.call(P.resolve());
  3305. } catch (e) {
  3306. // silently ignored
  3307. }
  3308. if (promiseToString === '[object Promise]' && !P.cast) {
  3309. return;
  3310. }
  3311. }
  3312. local.Promise = Promise$2;
  3313. }
  3314. // Strange compat..
  3315. Promise$2.polyfill = polyfill;
  3316. Promise$2.Promise = Promise$2;
  3317. Promise$2.polyfill();
  3318. return Promise$2;
  3319. })));
  3320. //# sourceMappingURL=es6-promise.auto.map
  3321. ;
  3322. /**
  3323. * @license
  3324. * Lodash <https://lodash.com/>
  3325. * Copyright JS Foundation and other contributors <https://js.foundation/>
  3326. * Released under MIT license <https://lodash.com/license>
  3327. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  3328. * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  3329. */
  3330. ;(function() {
  3331. /** Used as a safe reference for `undefined` in pre-ES5 environments. */
  3332. var undefined;
  3333. /** Used as the semantic version number. */
  3334. var VERSION = '4.17.4';
  3335. /** Used as the size to enable large array optimizations. */
  3336. var LARGE_ARRAY_SIZE = 200;
  3337. /** Error message constants. */
  3338. var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',
  3339. FUNC_ERROR_TEXT = 'Expected a function';
  3340. /** Used to stand-in for `undefined` hash values. */
  3341. var HASH_UNDEFINED = '__lodash_hash_undefined__';
  3342. /** Used as the maximum memoize cache size. */
  3343. var MAX_MEMOIZE_SIZE = 500;
  3344. /** Used as the internal argument placeholder. */
  3345. var PLACEHOLDER = '__lodash_placeholder__';
  3346. /** Used to compose bitmasks for cloning. */
  3347. var CLONE_DEEP_FLAG = 1,
  3348. CLONE_FLAT_FLAG = 2,
  3349. CLONE_SYMBOLS_FLAG = 4;
  3350. /** Used to compose bitmasks for value comparisons. */
  3351. var COMPARE_PARTIAL_FLAG = 1,
  3352. COMPARE_UNORDERED_FLAG = 2;
  3353. /** Used to compose bitmasks for function metadata. */
  3354. var WRAP_BIND_FLAG = 1,
  3355. WRAP_BIND_KEY_FLAG = 2,
  3356. WRAP_CURRY_BOUND_FLAG = 4,
  3357. WRAP_CURRY_FLAG = 8,
  3358. WRAP_CURRY_RIGHT_FLAG = 16,
  3359. WRAP_PARTIAL_FLAG = 32,
  3360. WRAP_PARTIAL_RIGHT_FLAG = 64,
  3361. WRAP_ARY_FLAG = 128,
  3362. WRAP_REARG_FLAG = 256,
  3363. WRAP_FLIP_FLAG = 512;
  3364. /** Used as default options for `_.truncate`. */
  3365. var DEFAULT_TRUNC_LENGTH = 30,
  3366. DEFAULT_TRUNC_OMISSION = '...';
  3367. /** Used to detect hot functions by number of calls within a span of milliseconds. */
  3368. var HOT_COUNT = 800,
  3369. HOT_SPAN = 16;
  3370. /** Used to indicate the type of lazy iteratees. */
  3371. var LAZY_FILTER_FLAG = 1,
  3372. LAZY_MAP_FLAG = 2,
  3373. LAZY_WHILE_FLAG = 3;
  3374. /** Used as references for various `Number` constants. */
  3375. var INFINITY = 1 / 0,
  3376. MAX_SAFE_INTEGER = 9007199254740991,
  3377. MAX_INTEGER = 1.7976931348623157e+308,
  3378. NAN = 0 / 0;
  3379. /** Used as references for the maximum length and index of an array. */
  3380. var MAX_ARRAY_LENGTH = 4294967295,
  3381. MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,
  3382. HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
  3383. /** Used to associate wrap methods with their bit flags. */
  3384. var wrapFlags = [
  3385. ['ary', WRAP_ARY_FLAG],
  3386. ['bind', WRAP_BIND_FLAG],
  3387. ['bindKey', WRAP_BIND_KEY_FLAG],
  3388. ['curry', WRAP_CURRY_FLAG],
  3389. ['curryRight', WRAP_CURRY_RIGHT_FLAG],
  3390. ['flip', WRAP_FLIP_FLAG],
  3391. ['partial', WRAP_PARTIAL_FLAG],
  3392. ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],
  3393. ['rearg', WRAP_REARG_FLAG]
  3394. ];
  3395. /** `Object#toString` result references. */
  3396. var argsTag = '[object Arguments]',
  3397. arrayTag = '[object Array]',
  3398. asyncTag = '[object AsyncFunction]',
  3399. boolTag = '[object Boolean]',
  3400. dateTag = '[object Date]',
  3401. domExcTag = '[object DOMException]',
  3402. errorTag = '[object Error]',
  3403. funcTag = '[object Function]',
  3404. genTag = '[object GeneratorFunction]',
  3405. mapTag = '[object Map]',
  3406. numberTag = '[object Number]',
  3407. nullTag = '[object Null]',
  3408. objectTag = '[object Object]',
  3409. promiseTag = '[object Promise]',
  3410. proxyTag = '[object Proxy]',
  3411. regexpTag = '[object RegExp]',
  3412. setTag = '[object Set]',
  3413. stringTag = '[object String]',
  3414. symbolTag = '[object Symbol]',
  3415. undefinedTag = '[object Undefined]',
  3416. weakMapTag = '[object WeakMap]',
  3417. weakSetTag = '[object WeakSet]';
  3418. var arrayBufferTag = '[object ArrayBuffer]',
  3419. dataViewTag = '[object DataView]',
  3420. float32Tag = '[object Float32Array]',
  3421. float64Tag = '[object Float64Array]',
  3422. int8Tag = '[object Int8Array]',
  3423. int16Tag = '[object Int16Array]',
  3424. int32Tag = '[object Int32Array]',
  3425. uint8Tag = '[object Uint8Array]',
  3426. uint8ClampedTag = '[object Uint8ClampedArray]',
  3427. uint16Tag = '[object Uint16Array]',
  3428. uint32Tag = '[object Uint32Array]';
  3429. /** Used to match empty string literals in compiled template source. */
  3430. var reEmptyStringLeading = /\b__p \+= '';/g,
  3431. reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
  3432. reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
  3433. /** Used to match HTML entities and HTML characters. */
  3434. var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,
  3435. reUnescapedHtml = /[&<>"']/g,
  3436. reHasEscapedHtml = RegExp(reEscapedHtml.source),
  3437. reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
  3438. /** Used to match template delimiters. */
  3439. var reEscape = /<%-([\s\S]+?)%>/g,
  3440. reEvaluate = /<%([\s\S]+?)%>/g,
  3441. reInterpolate = /<%=([\s\S]+?)%>/g;
  3442. /** Used to match property names within property paths. */
  3443. var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
  3444. reIsPlainProp = /^\w*$/,
  3445. reLeadingDot = /^\./,
  3446. rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
  3447. /**
  3448. * Used to match `RegExp`
  3449. * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
  3450. */
  3451. var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
  3452. reHasRegExpChar = RegExp(reRegExpChar.source);
  3453. /** Used to match leading and trailing whitespace. */
  3454. var reTrim = /^\s+|\s+$/g,
  3455. reTrimStart = /^\s+/,
  3456. reTrimEnd = /\s+$/;
  3457. /** Used to match wrap detail comments. */
  3458. var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,
  3459. reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/,
  3460. reSplitDetails = /,? & /;
  3461. /** Used to match words composed of alphanumeric characters. */
  3462. var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
  3463. /** Used to match backslashes in property paths. */
  3464. var reEscapeChar = /\\(\\)?/g;
  3465. /**
  3466. * Used to match
  3467. * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).
  3468. */
  3469. var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
  3470. /** Used to match `RegExp` flags from their coerced string values. */
  3471. var reFlags = /\w*$/;
  3472. /** Used to detect bad signed hexadecimal string values. */
  3473. var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
  3474. /** Used to detect binary string values. */
  3475. var reIsBinary = /^0b[01]+$/i;
  3476. /** Used to detect host constructors (Safari). */
  3477. var reIsHostCtor = /^\[object .+?Constructor\]$/;
  3478. /** Used to detect octal string values. */
  3479. var reIsOctal = /^0o[0-7]+$/i;
  3480. /** Used to detect unsigned integer values. */
  3481. var reIsUint = /^(?:0|[1-9]\d*)$/;
  3482. /** Used to match Latin Unicode letters (excluding mathematical operators). */
  3483. var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
  3484. /** Used to ensure capturing order of template delimiters. */
  3485. var reNoMatch = /($^)/;
  3486. /** Used to match unescaped characters in compiled string literals. */
  3487. var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
  3488. /** Used to compose unicode character classes. */
  3489. var rsAstralRange = '\\ud800-\\udfff',
  3490. rsComboMarksRange = '\\u0300-\\u036f',
  3491. reComboHalfMarksRange = '\\ufe20-\\ufe2f',
  3492. rsComboSymbolsRange = '\\u20d0-\\u20ff',
  3493. rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
  3494. rsDingbatRange = '\\u2700-\\u27bf',
  3495. rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
  3496. rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
  3497. rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
  3498. rsPunctuationRange = '\\u2000-\\u206f',
  3499. rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000',
  3500. rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
  3501. rsVarRange = '\\ufe0e\\ufe0f',
  3502. rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
  3503. /** Used to compose unicode capture groups. */
  3504. var rsApos = "['\u2019]",
  3505. rsAstral = '[' + rsAstralRange + ']',
  3506. rsBreak = '[' + rsBreakRange + ']',
  3507. rsCombo = '[' + rsComboRange + ']',
  3508. rsDigits = '\\d+',
  3509. rsDingbat = '[' + rsDingbatRange + ']',
  3510. rsLower = '[' + rsLowerRange + ']',
  3511. rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
  3512. rsFitz = '\\ud83c[\\udffb-\\udfff]',
  3513. rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
  3514. rsNonAstral = '[^' + rsAstralRange + ']',
  3515. rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
  3516. rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
  3517. rsUpper = '[' + rsUpperRange + ']',
  3518. rsZWJ = '\\u200d';
  3519. /** Used to compose unicode regexes. */
  3520. var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',
  3521. rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',
  3522. rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',
  3523. rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',
  3524. reOptMod = rsModifier + '?',
  3525. rsOptVar = '[' + rsVarRange + ']?',
  3526. rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
  3527. rsOrdLower = '\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)',
  3528. rsOrdUpper = '\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)',
  3529. rsSeq = rsOptVar + reOptMod + rsOptJoin,
  3530. rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,
  3531. rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
  3532. /** Used to match apostrophes. */
  3533. var reApos = RegExp(rsApos, 'g');
  3534. /**
  3535. * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
  3536. * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
  3537. */
  3538. var reComboMark = RegExp(rsCombo, 'g');
  3539. /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
  3540. var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
  3541. /** Used to match complex or compound words. */
  3542. var reUnicodeWord = RegExp([
  3543. rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
  3544. rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',
  3545. rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,
  3546. rsUpper + '+' + rsOptContrUpper,
  3547. rsOrdUpper,
  3548. rsOrdLower,
  3549. rsDigits,
  3550. rsEmoji
  3551. ].join('|'), 'g');
  3552. /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
  3553. var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');
  3554. /** Used to detect strings that need a more robust regexp to match words. */
  3555. var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
  3556. /** Used to assign default `context` object properties. */
  3557. var contextProps = [
  3558. 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',
  3559. 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',
  3560. 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',
  3561. 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',
  3562. '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'
  3563. ];
  3564. /** Used to make template sourceURLs easier to identify. */
  3565. var templateCounter = -1;
  3566. /** Used to identify `toStringTag` values of typed arrays. */
  3567. var typedArrayTags = {};
  3568. typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
  3569. typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
  3570. typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
  3571. typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
  3572. typedArrayTags[uint32Tag] = true;
  3573. typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
  3574. typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
  3575. typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
  3576. typedArrayTags[errorTag] = typedArrayTags[funcTag] =
  3577. typedArrayTags[mapTag] = typedArrayTags[numberTag] =
  3578. typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
  3579. typedArrayTags[setTag] = typedArrayTags[stringTag] =
  3580. typedArrayTags[weakMapTag] = false;
  3581. /** Used to identify `toStringTag` values supported by `_.clone`. */
  3582. var cloneableTags = {};
  3583. cloneableTags[argsTag] = cloneableTags[arrayTag] =
  3584. cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
  3585. cloneableTags[boolTag] = cloneableTags[dateTag] =
  3586. cloneableTags[float32Tag] = cloneableTags[float64Tag] =
  3587. cloneableTags[int8Tag] = cloneableTags[int16Tag] =
  3588. cloneableTags[int32Tag] = cloneableTags[mapTag] =
  3589. cloneableTags[numberTag] = cloneableTags[objectTag] =
  3590. cloneableTags[regexpTag] = cloneableTags[setTag] =
  3591. cloneableTags[stringTag] = cloneableTags[symbolTag] =
  3592. cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
  3593. cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
  3594. cloneableTags[errorTag] = cloneableTags[funcTag] =
  3595. cloneableTags[weakMapTag] = false;
  3596. /** Used to map Latin Unicode letters to basic Latin letters. */
  3597. var deburredLetters = {
  3598. // Latin-1 Supplement block.
  3599. '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
  3600. '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
  3601. '\xc7': 'C', '\xe7': 'c',
  3602. '\xd0': 'D', '\xf0': 'd',
  3603. '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
  3604. '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
  3605. '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
  3606. '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
  3607. '\xd1': 'N', '\xf1': 'n',
  3608. '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
  3609. '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
  3610. '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
  3611. '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
  3612. '\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
  3613. '\xc6': 'Ae', '\xe6': 'ae',
  3614. '\xde': 'Th', '\xfe': 'th',
  3615. '\xdf': 'ss',
  3616. // Latin Extended-A block.
  3617. '\u0100': 'A', '\u0102': 'A', '\u0104': 'A',
  3618. '\u0101': 'a', '\u0103': 'a', '\u0105': 'a',
  3619. '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
  3620. '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
  3621. '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
  3622. '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
  3623. '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
  3624. '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
  3625. '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
  3626. '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
  3627. '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
  3628. '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
  3629. '\u0134': 'J', '\u0135': 'j',
  3630. '\u0136': 'K', '\u0137': 'k', '\u0138': 'k',
  3631. '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
  3632. '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
  3633. '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
  3634. '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
  3635. '\u014c': 'O', '\u014e': 'O', '\u0150': 'O',
  3636. '\u014d': 'o', '\u014f': 'o', '\u0151': 'o',
  3637. '\u0154': 'R', '\u0156': 'R', '\u0158': 'R',
  3638. '\u0155': 'r', '\u0157': 'r', '\u0159': 'r',
  3639. '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
  3640. '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's',
  3641. '\u0162': 'T', '\u0164': 'T', '\u0166': 'T',
  3642. '\u0163': 't', '\u0165': 't', '\u0167': 't',
  3643. '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
  3644. '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
  3645. '\u0174': 'W', '\u0175': 'w',
  3646. '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y',
  3647. '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z',
  3648. '\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
  3649. '\u0132': 'IJ', '\u0133': 'ij',
  3650. '\u0152': 'Oe', '\u0153': 'oe',
  3651. '\u0149': "'n", '\u017f': 's'
  3652. };
  3653. /** Used to map characters to HTML entities. */
  3654. var htmlEscapes = {
  3655. '&': '&amp;',
  3656. '<': '&lt;',
  3657. '>': '&gt;',
  3658. '"': '&quot;',
  3659. "'": '&#39;'
  3660. };
  3661. /** Used to map HTML entities to characters. */
  3662. var htmlUnescapes = {
  3663. '&amp;': '&',
  3664. '&lt;': '<',
  3665. '&gt;': '>',
  3666. '&quot;': '"',
  3667. '&#39;': "'"
  3668. };
  3669. /** Used to escape characters for inclusion in compiled string literals. */
  3670. var stringEscapes = {
  3671. '\\': '\\',
  3672. "'": "'",
  3673. '\n': 'n',
  3674. '\r': 'r',
  3675. '\u2028': 'u2028',
  3676. '\u2029': 'u2029'
  3677. };
  3678. /** Built-in method references without a dependency on `root`. */
  3679. var freeParseFloat = parseFloat,
  3680. freeParseInt = parseInt;
  3681. /** Detect free variable `global` from Node.js. */
  3682. var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
  3683. /** Detect free variable `self`. */
  3684. var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
  3685. /** Used as a reference to the global object. */
  3686. var root = freeGlobal || freeSelf || Function('return this')();
  3687. /** Detect free variable `exports`. */
  3688. var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
  3689. /** Detect free variable `module`. */
  3690. var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
  3691. /** Detect the popular CommonJS extension `module.exports`. */
  3692. var moduleExports = freeModule && freeModule.exports === freeExports;
  3693. /** Detect free variable `process` from Node.js. */
  3694. var freeProcess = moduleExports && freeGlobal.process;
  3695. /** Used to access faster Node.js helpers. */
  3696. var nodeUtil = (function() {
  3697. try {
  3698. return freeProcess && freeProcess.binding && freeProcess.binding('util');
  3699. } catch (e) {}
  3700. }());
  3701. /* Node.js helper references. */
  3702. var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,
  3703. nodeIsDate = nodeUtil && nodeUtil.isDate,
  3704. nodeIsMap = nodeUtil && nodeUtil.isMap,
  3705. nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,
  3706. nodeIsSet = nodeUtil && nodeUtil.isSet,
  3707. nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
  3708. /*--------------------------------------------------------------------------*/
  3709. /**
  3710. * Adds the key-value `pair` to `map`.
  3711. *
  3712. * @private
  3713. * @param {Object} map The map to modify.
  3714. * @param {Array} pair The key-value pair to add.
  3715. * @returns {Object} Returns `map`.
  3716. */
  3717. function addMapEntry(map, pair) {
  3718. // Don't return `map.set` because it's not chainable in IE 11.
  3719. map.set(pair[0], pair[1]);
  3720. return map;
  3721. }
  3722. /**
  3723. * Adds `value` to `set`.
  3724. *
  3725. * @private
  3726. * @param {Object} set The set to modify.
  3727. * @param {*} value The value to add.
  3728. * @returns {Object} Returns `set`.
  3729. */
  3730. function addSetEntry(set, value) {
  3731. // Don't return `set.add` because it's not chainable in IE 11.
  3732. set.add(value);
  3733. return set;
  3734. }
  3735. /**
  3736. * A faster alternative to `Function#apply`, this function invokes `func`
  3737. * with the `this` binding of `thisArg` and the arguments of `args`.
  3738. *
  3739. * @private
  3740. * @param {Function} func The function to invoke.
  3741. * @param {*} thisArg The `this` binding of `func`.
  3742. * @param {Array} args The arguments to invoke `func` with.
  3743. * @returns {*} Returns the result of `func`.
  3744. */
  3745. function apply(func, thisArg, args) {
  3746. switch (args.length) {
  3747. case 0: return func.call(thisArg);
  3748. case 1: return func.call(thisArg, args[0]);
  3749. case 2: return func.call(thisArg, args[0], args[1]);
  3750. case 3: return func.call(thisArg, args[0], args[1], args[2]);
  3751. }
  3752. return func.apply(thisArg, args);
  3753. }
  3754. /**
  3755. * A specialized version of `baseAggregator` for arrays.
  3756. *
  3757. * @private
  3758. * @param {Array} [array] The array to iterate over.
  3759. * @param {Function} setter The function to set `accumulator` values.
  3760. * @param {Function} iteratee The iteratee to transform keys.
  3761. * @param {Object} accumulator The initial aggregated object.
  3762. * @returns {Function} Returns `accumulator`.
  3763. */
  3764. function arrayAggregator(array, setter, iteratee, accumulator) {
  3765. var index = -1,
  3766. length = array == null ? 0 : array.length;
  3767. while (++index < length) {
  3768. var value = array[index];
  3769. setter(accumulator, value, iteratee(value), array);
  3770. }
  3771. return accumulator;
  3772. }
  3773. /**
  3774. * A specialized version of `_.forEach` for arrays without support for
  3775. * iteratee shorthands.
  3776. *
  3777. * @private
  3778. * @param {Array} [array] The array to iterate over.
  3779. * @param {Function} iteratee The function invoked per iteration.
  3780. * @returns {Array} Returns `array`.
  3781. */
  3782. function arrayEach(array, iteratee) {
  3783. var index = -1,
  3784. length = array == null ? 0 : array.length;
  3785. while (++index < length) {
  3786. if (iteratee(array[index], index, array) === false) {
  3787. break;
  3788. }
  3789. }
  3790. return array;
  3791. }
  3792. /**
  3793. * A specialized version of `_.forEachRight` for arrays without support for
  3794. * iteratee shorthands.
  3795. *
  3796. * @private
  3797. * @param {Array} [array] The array to iterate over.
  3798. * @param {Function} iteratee The function invoked per iteration.
  3799. * @returns {Array} Returns `array`.
  3800. */
  3801. function arrayEachRight(array, iteratee) {
  3802. var length = array == null ? 0 : array.length;
  3803. while (length--) {
  3804. if (iteratee(array[length], length, array) === false) {
  3805. break;
  3806. }
  3807. }
  3808. return array;
  3809. }
  3810. /**
  3811. * A specialized version of `_.every` for arrays without support for
  3812. * iteratee shorthands.
  3813. *
  3814. * @private
  3815. * @param {Array} [array] The array to iterate over.
  3816. * @param {Function} predicate The function invoked per iteration.
  3817. * @returns {boolean} Returns `true` if all elements pass the predicate check,
  3818. * else `false`.
  3819. */
  3820. function arrayEvery(array, predicate) {
  3821. var index = -1,
  3822. length = array == null ? 0 : array.length;
  3823. while (++index < length) {
  3824. if (!predicate(array[index], index, array)) {
  3825. return false;
  3826. }
  3827. }
  3828. return true;
  3829. }
  3830. /**
  3831. * A specialized version of `_.filter` for arrays without support for
  3832. * iteratee shorthands.
  3833. *
  3834. * @private
  3835. * @param {Array} [array] The array to iterate over.
  3836. * @param {Function} predicate The function invoked per iteration.
  3837. * @returns {Array} Returns the new filtered array.
  3838. */
  3839. function arrayFilter(array, predicate) {
  3840. var index = -1,
  3841. length = array == null ? 0 : array.length,
  3842. resIndex = 0,
  3843. result = [];
  3844. while (++index < length) {
  3845. var value = array[index];
  3846. if (predicate(value, index, array)) {
  3847. result[resIndex++] = value;
  3848. }
  3849. }
  3850. return result;
  3851. }
  3852. /**
  3853. * A specialized version of `_.includes` for arrays without support for
  3854. * specifying an index to search from.
  3855. *
  3856. * @private
  3857. * @param {Array} [array] The array to inspect.
  3858. * @param {*} target The value to search for.
  3859. * @returns {boolean} Returns `true` if `target` is found, else `false`.
  3860. */
  3861. function arrayIncludes(array, value) {
  3862. var length = array == null ? 0 : array.length;
  3863. return !!length && baseIndexOf(array, value, 0) > -1;
  3864. }
  3865. /**
  3866. * This function is like `arrayIncludes` except that it accepts a comparator.
  3867. *
  3868. * @private
  3869. * @param {Array} [array] The array to inspect.
  3870. * @param {*} target The value to search for.
  3871. * @param {Function} comparator The comparator invoked per element.
  3872. * @returns {boolean} Returns `true` if `target` is found, else `false`.
  3873. */
  3874. function arrayIncludesWith(array, value, comparator) {
  3875. var index = -1,
  3876. length = array == null ? 0 : array.length;
  3877. while (++index < length) {
  3878. if (comparator(value, array[index])) {
  3879. return true;
  3880. }
  3881. }
  3882. return false;
  3883. }
  3884. /**
  3885. * A specialized version of `_.map` for arrays without support for iteratee
  3886. * shorthands.
  3887. *
  3888. * @private
  3889. * @param {Array} [array] The array to iterate over.
  3890. * @param {Function} iteratee The function invoked per iteration.
  3891. * @returns {Array} Returns the new mapped array.
  3892. */
  3893. function arrayMap(array, iteratee) {
  3894. var index = -1,
  3895. length = array == null ? 0 : array.length,
  3896. result = Array(length);
  3897. while (++index < length) {
  3898. result[index] = iteratee(array[index], index, array);
  3899. }
  3900. return result;
  3901. }
  3902. /**
  3903. * Appends the elements of `values` to `array`.
  3904. *
  3905. * @private
  3906. * @param {Array} array The array to modify.
  3907. * @param {Array} values The values to append.
  3908. * @returns {Array} Returns `array`.
  3909. */
  3910. function arrayPush(array, values) {
  3911. var index = -1,
  3912. length = values.length,
  3913. offset = array.length;
  3914. while (++index < length) {
  3915. array[offset + index] = values[index];
  3916. }
  3917. return array;
  3918. }
  3919. /**
  3920. * A specialized version of `_.reduce` for arrays without support for
  3921. * iteratee shorthands.
  3922. *
  3923. * @private
  3924. * @param {Array} [array] The array to iterate over.
  3925. * @param {Function} iteratee The function invoked per iteration.
  3926. * @param {*} [accumulator] The initial value.
  3927. * @param {boolean} [initAccum] Specify using the first element of `array` as
  3928. * the initial value.
  3929. * @returns {*} Returns the accumulated value.
  3930. */
  3931. function arrayReduce(array, iteratee, accumulator, initAccum) {
  3932. var index = -1,
  3933. length = array == null ? 0 : array.length;
  3934. if (initAccum && length) {
  3935. accumulator = array[++index];
  3936. }
  3937. while (++index < length) {
  3938. accumulator = iteratee(accumulator, array[index], index, array);
  3939. }
  3940. return accumulator;
  3941. }
  3942. /**
  3943. * A specialized version of `_.reduceRight` for arrays without support for
  3944. * iteratee shorthands.
  3945. *
  3946. * @private
  3947. * @param {Array} [array] The array to iterate over.
  3948. * @param {Function} iteratee The function invoked per iteration.
  3949. * @param {*} [accumulator] The initial value.
  3950. * @param {boolean} [initAccum] Specify using the last element of `array` as
  3951. * the initial value.
  3952. * @returns {*} Returns the accumulated value.
  3953. */
  3954. function arrayReduceRight(array, iteratee, accumulator, initAccum) {
  3955. var length = array == null ? 0 : array.length;
  3956. if (initAccum && length) {
  3957. accumulator = array[--length];
  3958. }
  3959. while (length--) {
  3960. accumulator = iteratee(accumulator, array[length], length, array);
  3961. }
  3962. return accumulator;
  3963. }
  3964. /**
  3965. * A specialized version of `_.some` for arrays without support for iteratee
  3966. * shorthands.
  3967. *
  3968. * @private
  3969. * @param {Array} [array] The array to iterate over.
  3970. * @param {Function} predicate The function invoked per iteration.
  3971. * @returns {boolean} Returns `true` if any element passes the predicate check,
  3972. * else `false`.
  3973. */
  3974. function arraySome(array, predicate) {
  3975. var index = -1,
  3976. length = array == null ? 0 : array.length;
  3977. while (++index < length) {
  3978. if (predicate(array[index], index, array)) {
  3979. return true;
  3980. }
  3981. }
  3982. return false;
  3983. }
  3984. /**
  3985. * Gets the size of an ASCII `string`.
  3986. *
  3987. * @private
  3988. * @param {string} string The string inspect.
  3989. * @returns {number} Returns the string size.
  3990. */
  3991. var asciiSize = baseProperty('length');
  3992. /**
  3993. * Converts an ASCII `string` to an array.
  3994. *
  3995. * @private
  3996. * @param {string} string The string to convert.
  3997. * @returns {Array} Returns the converted array.
  3998. */
  3999. function asciiToArray(string) {
  4000. return string.split('');
  4001. }
  4002. /**
  4003. * Splits an ASCII `string` into an array of its words.
  4004. *
  4005. * @private
  4006. * @param {string} The string to inspect.
  4007. * @returns {Array} Returns the words of `string`.
  4008. */
  4009. function asciiWords(string) {
  4010. return string.match(reAsciiWord) || [];
  4011. }
  4012. /**
  4013. * The base implementation of methods like `_.findKey` and `_.findLastKey`,
  4014. * without support for iteratee shorthands, which iterates over `collection`
  4015. * using `eachFunc`.
  4016. *
  4017. * @private
  4018. * @param {Array|Object} collection The collection to inspect.
  4019. * @param {Function} predicate The function invoked per iteration.
  4020. * @param {Function} eachFunc The function to iterate over `collection`.
  4021. * @returns {*} Returns the found element or its key, else `undefined`.
  4022. */
  4023. function baseFindKey(collection, predicate, eachFunc) {
  4024. var result;
  4025. eachFunc(collection, function(value, key, collection) {
  4026. if (predicate(value, key, collection)) {
  4027. result = key;
  4028. return false;
  4029. }
  4030. });
  4031. return result;
  4032. }
  4033. /**
  4034. * The base implementation of `_.findIndex` and `_.findLastIndex` without
  4035. * support for iteratee shorthands.
  4036. *
  4037. * @private
  4038. * @param {Array} array The array to inspect.
  4039. * @param {Function} predicate The function invoked per iteration.
  4040. * @param {number} fromIndex The index to search from.
  4041. * @param {boolean} [fromRight] Specify iterating from right to left.
  4042. * @returns {number} Returns the index of the matched value, else `-1`.
  4043. */
  4044. function baseFindIndex(array, predicate, fromIndex, fromRight) {
  4045. var length = array.length,
  4046. index = fromIndex + (fromRight ? 1 : -1);
  4047. while ((fromRight ? index-- : ++index < length)) {
  4048. if (predicate(array[index], index, array)) {
  4049. return index;
  4050. }
  4051. }
  4052. return -1;
  4053. }
  4054. /**
  4055. * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
  4056. *
  4057. * @private
  4058. * @param {Array} array The array to inspect.
  4059. * @param {*} value The value to search for.
  4060. * @param {number} fromIndex The index to search from.
  4061. * @returns {number} Returns the index of the matched value, else `-1`.
  4062. */
  4063. function baseIndexOf(array, value, fromIndex) {
  4064. return value === value
  4065. ? strictIndexOf(array, value, fromIndex)
  4066. : baseFindIndex(array, baseIsNaN, fromIndex);
  4067. }
  4068. /**
  4069. * This function is like `baseIndexOf` except that it accepts a comparator.
  4070. *
  4071. * @private
  4072. * @param {Array} array The array to inspect.
  4073. * @param {*} value The value to search for.
  4074. * @param {number} fromIndex The index to search from.
  4075. * @param {Function} comparator The comparator invoked per element.
  4076. * @returns {number} Returns the index of the matched value, else `-1`.
  4077. */
  4078. function baseIndexOfWith(array, value, fromIndex, comparator) {
  4079. var index = fromIndex - 1,
  4080. length = array.length;
  4081. while (++index < length) {
  4082. if (comparator(array[index], value)) {
  4083. return index;
  4084. }
  4085. }
  4086. return -1;
  4087. }
  4088. /**
  4089. * The base implementation of `_.isNaN` without support for number objects.
  4090. *
  4091. * @private
  4092. * @param {*} value The value to check.
  4093. * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
  4094. */
  4095. function baseIsNaN(value) {
  4096. return value !== value;
  4097. }
  4098. /**
  4099. * The base implementation of `_.mean` and `_.meanBy` without support for
  4100. * iteratee shorthands.
  4101. *
  4102. * @private
  4103. * @param {Array} array The array to iterate over.
  4104. * @param {Function} iteratee The function invoked per iteration.
  4105. * @returns {number} Returns the mean.
  4106. */
  4107. function baseMean(array, iteratee) {
  4108. var length = array == null ? 0 : array.length;
  4109. return length ? (baseSum(array, iteratee) / length) : NAN;
  4110. }
  4111. /**
  4112. * The base implementation of `_.property` without support for deep paths.
  4113. *
  4114. * @private
  4115. * @param {string} key The key of the property to get.
  4116. * @returns {Function} Returns the new accessor function.
  4117. */
  4118. function baseProperty(key) {
  4119. return function(object) {
  4120. return object == null ? undefined : object[key];
  4121. };
  4122. }
  4123. /**
  4124. * The base implementation of `_.propertyOf` without support for deep paths.
  4125. *
  4126. * @private
  4127. * @param {Object} object The object to query.
  4128. * @returns {Function} Returns the new accessor function.
  4129. */
  4130. function basePropertyOf(object) {
  4131. return function(key) {
  4132. return object == null ? undefined : object[key];
  4133. };
  4134. }
  4135. /**
  4136. * The base implementation of `_.reduce` and `_.reduceRight`, without support
  4137. * for iteratee shorthands, which iterates over `collection` using `eachFunc`.
  4138. *
  4139. * @private
  4140. * @param {Array|Object} collection The collection to iterate over.
  4141. * @param {Function} iteratee The function invoked per iteration.
  4142. * @param {*} accumulator The initial value.
  4143. * @param {boolean} initAccum Specify using the first or last element of
  4144. * `collection` as the initial value.
  4145. * @param {Function} eachFunc The function to iterate over `collection`.
  4146. * @returns {*} Returns the accumulated value.
  4147. */
  4148. function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
  4149. eachFunc(collection, function(value, index, collection) {
  4150. accumulator = initAccum
  4151. ? (initAccum = false, value)
  4152. : iteratee(accumulator, value, index, collection);
  4153. });
  4154. return accumulator;
  4155. }
  4156. /**
  4157. * The base implementation of `_.sortBy` which uses `comparer` to define the
  4158. * sort order of `array` and replaces criteria objects with their corresponding
  4159. * values.
  4160. *
  4161. * @private
  4162. * @param {Array} array The array to sort.
  4163. * @param {Function} comparer The function to define sort order.
  4164. * @returns {Array} Returns `array`.
  4165. */
  4166. function baseSortBy(array, comparer) {
  4167. var length = array.length;
  4168. array.sort(comparer);
  4169. while (length--) {
  4170. array[length] = array[length].value;
  4171. }
  4172. return array;
  4173. }
  4174. /**
  4175. * The base implementation of `_.sum` and `_.sumBy` without support for
  4176. * iteratee shorthands.
  4177. *
  4178. * @private
  4179. * @param {Array} array The array to iterate over.
  4180. * @param {Function} iteratee The function invoked per iteration.
  4181. * @returns {number} Returns the sum.
  4182. */
  4183. function baseSum(array, iteratee) {
  4184. var result,
  4185. index = -1,
  4186. length = array.length;
  4187. while (++index < length) {
  4188. var current = iteratee(array[index]);
  4189. if (current !== undefined) {
  4190. result = result === undefined ? current : (result + current);
  4191. }
  4192. }
  4193. return result;
  4194. }
  4195. /**
  4196. * The base implementation of `_.times` without support for iteratee shorthands
  4197. * or max array length checks.
  4198. *
  4199. * @private
  4200. * @param {number} n The number of times to invoke `iteratee`.
  4201. * @param {Function} iteratee The function invoked per iteration.
  4202. * @returns {Array} Returns the array of results.
  4203. */
  4204. function baseTimes(n, iteratee) {
  4205. var index = -1,
  4206. result = Array(n);
  4207. while (++index < n) {
  4208. result[index] = iteratee(index);
  4209. }
  4210. return result;
  4211. }
  4212. /**
  4213. * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array
  4214. * of key-value pairs for `object` corresponding to the property names of `props`.
  4215. *
  4216. * @private
  4217. * @param {Object} object The object to query.
  4218. * @param {Array} props The property names to get values for.
  4219. * @returns {Object} Returns the key-value pairs.
  4220. */
  4221. function baseToPairs(object, props) {
  4222. return arrayMap(props, function(key) {
  4223. return [key, object[key]];
  4224. });
  4225. }
  4226. /**
  4227. * The base implementation of `_.unary` without support for storing metadata.
  4228. *
  4229. * @private
  4230. * @param {Function} func The function to cap arguments for.
  4231. * @returns {Function} Returns the new capped function.
  4232. */
  4233. function baseUnary(func) {
  4234. return function(value) {
  4235. return func(value);
  4236. };
  4237. }
  4238. /**
  4239. * The base implementation of `_.values` and `_.valuesIn` which creates an
  4240. * array of `object` property values corresponding to the property names
  4241. * of `props`.
  4242. *
  4243. * @private
  4244. * @param {Object} object The object to query.
  4245. * @param {Array} props The property names to get values for.
  4246. * @returns {Object} Returns the array of property values.
  4247. */
  4248. function baseValues(object, props) {
  4249. return arrayMap(props, function(key) {
  4250. return object[key];
  4251. });
  4252. }
  4253. /**
  4254. * Checks if a `cache` value for `key` exists.
  4255. *
  4256. * @private
  4257. * @param {Object} cache The cache to query.
  4258. * @param {string} key The key of the entry to check.
  4259. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  4260. */
  4261. function cacheHas(cache, key) {
  4262. return cache.has(key);
  4263. }
  4264. /**
  4265. * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol
  4266. * that is not found in the character symbols.
  4267. *
  4268. * @private
  4269. * @param {Array} strSymbols The string symbols to inspect.
  4270. * @param {Array} chrSymbols The character symbols to find.
  4271. * @returns {number} Returns the index of the first unmatched string symbol.
  4272. */
  4273. function charsStartIndex(strSymbols, chrSymbols) {
  4274. var index = -1,
  4275. length = strSymbols.length;
  4276. while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
  4277. return index;
  4278. }
  4279. /**
  4280. * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol
  4281. * that is not found in the character symbols.
  4282. *
  4283. * @private
  4284. * @param {Array} strSymbols The string symbols to inspect.
  4285. * @param {Array} chrSymbols The character symbols to find.
  4286. * @returns {number} Returns the index of the last unmatched string symbol.
  4287. */
  4288. function charsEndIndex(strSymbols, chrSymbols) {
  4289. var index = strSymbols.length;
  4290. while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
  4291. return index;
  4292. }
  4293. /**
  4294. * Gets the number of `placeholder` occurrences in `array`.
  4295. *
  4296. * @private
  4297. * @param {Array} array The array to inspect.
  4298. * @param {*} placeholder The placeholder to search for.
  4299. * @returns {number} Returns the placeholder count.
  4300. */
  4301. function countHolders(array, placeholder) {
  4302. var length = array.length,
  4303. result = 0;
  4304. while (length--) {
  4305. if (array[length] === placeholder) {
  4306. ++result;
  4307. }
  4308. }
  4309. return result;
  4310. }
  4311. /**
  4312. * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
  4313. * letters to basic Latin letters.
  4314. *
  4315. * @private
  4316. * @param {string} letter The matched letter to deburr.
  4317. * @returns {string} Returns the deburred letter.
  4318. */
  4319. var deburrLetter = basePropertyOf(deburredLetters);
  4320. /**
  4321. * Used by `_.escape` to convert characters to HTML entities.
  4322. *
  4323. * @private
  4324. * @param {string} chr The matched character to escape.
  4325. * @returns {string} Returns the escaped character.
  4326. */
  4327. var escapeHtmlChar = basePropertyOf(htmlEscapes);
  4328. /**
  4329. * Used by `_.template` to escape characters for inclusion in compiled string literals.
  4330. *
  4331. * @private
  4332. * @param {string} chr The matched character to escape.
  4333. * @returns {string} Returns the escaped character.
  4334. */
  4335. function escapeStringChar(chr) {
  4336. return '\\' + stringEscapes[chr];
  4337. }
  4338. /**
  4339. * Gets the value at `key` of `object`.
  4340. *
  4341. * @private
  4342. * @param {Object} [object] The object to query.
  4343. * @param {string} key The key of the property to get.
  4344. * @returns {*} Returns the property value.
  4345. */
  4346. function getValue(object, key) {
  4347. return object == null ? undefined : object[key];
  4348. }
  4349. /**
  4350. * Checks if `string` contains Unicode symbols.
  4351. *
  4352. * @private
  4353. * @param {string} string The string to inspect.
  4354. * @returns {boolean} Returns `true` if a symbol is found, else `false`.
  4355. */
  4356. function hasUnicode(string) {
  4357. return reHasUnicode.test(string);
  4358. }
  4359. /**
  4360. * Checks if `string` contains a word composed of Unicode symbols.
  4361. *
  4362. * @private
  4363. * @param {string} string The string to inspect.
  4364. * @returns {boolean} Returns `true` if a word is found, else `false`.
  4365. */
  4366. function hasUnicodeWord(string) {
  4367. return reHasUnicodeWord.test(string);
  4368. }
  4369. /**
  4370. * Converts `iterator` to an array.
  4371. *
  4372. * @private
  4373. * @param {Object} iterator The iterator to convert.
  4374. * @returns {Array} Returns the converted array.
  4375. */
  4376. function iteratorToArray(iterator) {
  4377. var data,
  4378. result = [];
  4379. while (!(data = iterator.next()).done) {
  4380. result.push(data.value);
  4381. }
  4382. return result;
  4383. }
  4384. /**
  4385. * Converts `map` to its key-value pairs.
  4386. *
  4387. * @private
  4388. * @param {Object} map The map to convert.
  4389. * @returns {Array} Returns the key-value pairs.
  4390. */
  4391. function mapToArray(map) {
  4392. var index = -1,
  4393. result = Array(map.size);
  4394. map.forEach(function(value, key) {
  4395. result[++index] = [key, value];
  4396. });
  4397. return result;
  4398. }
  4399. /**
  4400. * Creates a unary function that invokes `func` with its argument transformed.
  4401. *
  4402. * @private
  4403. * @param {Function} func The function to wrap.
  4404. * @param {Function} transform The argument transform.
  4405. * @returns {Function} Returns the new function.
  4406. */
  4407. function overArg(func, transform) {
  4408. return function(arg) {
  4409. return func(transform(arg));
  4410. };
  4411. }
  4412. /**
  4413. * Replaces all `placeholder` elements in `array` with an internal placeholder
  4414. * and returns an array of their indexes.
  4415. *
  4416. * @private
  4417. * @param {Array} array The array to modify.
  4418. * @param {*} placeholder The placeholder to replace.
  4419. * @returns {Array} Returns the new array of placeholder indexes.
  4420. */
  4421. function replaceHolders(array, placeholder) {
  4422. var index = -1,
  4423. length = array.length,
  4424. resIndex = 0,
  4425. result = [];
  4426. while (++index < length) {
  4427. var value = array[index];
  4428. if (value === placeholder || value === PLACEHOLDER) {
  4429. array[index] = PLACEHOLDER;
  4430. result[resIndex++] = index;
  4431. }
  4432. }
  4433. return result;
  4434. }
  4435. /**
  4436. * Converts `set` to an array of its values.
  4437. *
  4438. * @private
  4439. * @param {Object} set The set to convert.
  4440. * @returns {Array} Returns the values.
  4441. */
  4442. function setToArray(set) {
  4443. var index = -1,
  4444. result = Array(set.size);
  4445. set.forEach(function(value) {
  4446. result[++index] = value;
  4447. });
  4448. return result;
  4449. }
  4450. /**
  4451. * Converts `set` to its value-value pairs.
  4452. *
  4453. * @private
  4454. * @param {Object} set The set to convert.
  4455. * @returns {Array} Returns the value-value pairs.
  4456. */
  4457. function setToPairs(set) {
  4458. var index = -1,
  4459. result = Array(set.size);
  4460. set.forEach(function(value) {
  4461. result[++index] = [value, value];
  4462. });
  4463. return result;
  4464. }
  4465. /**
  4466. * A specialized version of `_.indexOf` which performs strict equality
  4467. * comparisons of values, i.e. `===`.
  4468. *
  4469. * @private
  4470. * @param {Array} array The array to inspect.
  4471. * @param {*} value The value to search for.
  4472. * @param {number} fromIndex The index to search from.
  4473. * @returns {number} Returns the index of the matched value, else `-1`.
  4474. */
  4475. function strictIndexOf(array, value, fromIndex) {
  4476. var index = fromIndex - 1,
  4477. length = array.length;
  4478. while (++index < length) {
  4479. if (array[index] === value) {
  4480. return index;
  4481. }
  4482. }
  4483. return -1;
  4484. }
  4485. /**
  4486. * A specialized version of `_.lastIndexOf` which performs strict equality
  4487. * comparisons of values, i.e. `===`.
  4488. *
  4489. * @private
  4490. * @param {Array} array The array to inspect.
  4491. * @param {*} value The value to search for.
  4492. * @param {number} fromIndex The index to search from.
  4493. * @returns {number} Returns the index of the matched value, else `-1`.
  4494. */
  4495. function strictLastIndexOf(array, value, fromIndex) {
  4496. var index = fromIndex + 1;
  4497. while (index--) {
  4498. if (array[index] === value) {
  4499. return index;
  4500. }
  4501. }
  4502. return index;
  4503. }
  4504. /**
  4505. * Gets the number of symbols in `string`.
  4506. *
  4507. * @private
  4508. * @param {string} string The string to inspect.
  4509. * @returns {number} Returns the string size.
  4510. */
  4511. function stringSize(string) {
  4512. return hasUnicode(string)
  4513. ? unicodeSize(string)
  4514. : asciiSize(string);
  4515. }
  4516. /**
  4517. * Converts `string` to an array.
  4518. *
  4519. * @private
  4520. * @param {string} string The string to convert.
  4521. * @returns {Array} Returns the converted array.
  4522. */
  4523. function stringToArray(string) {
  4524. return hasUnicode(string)
  4525. ? unicodeToArray(string)
  4526. : asciiToArray(string);
  4527. }
  4528. /**
  4529. * Used by `_.unescape` to convert HTML entities to characters.
  4530. *
  4531. * @private
  4532. * @param {string} chr The matched character to unescape.
  4533. * @returns {string} Returns the unescaped character.
  4534. */
  4535. var unescapeHtmlChar = basePropertyOf(htmlUnescapes);
  4536. /**
  4537. * Gets the size of a Unicode `string`.
  4538. *
  4539. * @private
  4540. * @param {string} string The string inspect.
  4541. * @returns {number} Returns the string size.
  4542. */
  4543. function unicodeSize(string) {
  4544. var result = reUnicode.lastIndex = 0;
  4545. while (reUnicode.test(string)) {
  4546. ++result;
  4547. }
  4548. return result;
  4549. }
  4550. /**
  4551. * Converts a Unicode `string` to an array.
  4552. *
  4553. * @private
  4554. * @param {string} string The string to convert.
  4555. * @returns {Array} Returns the converted array.
  4556. */
  4557. function unicodeToArray(string) {
  4558. return string.match(reUnicode) || [];
  4559. }
  4560. /**
  4561. * Splits a Unicode `string` into an array of its words.
  4562. *
  4563. * @private
  4564. * @param {string} The string to inspect.
  4565. * @returns {Array} Returns the words of `string`.
  4566. */
  4567. function unicodeWords(string) {
  4568. return string.match(reUnicodeWord) || [];
  4569. }
  4570. /*--------------------------------------------------------------------------*/
  4571. /**
  4572. * Create a new pristine `lodash` function using the `context` object.
  4573. *
  4574. * @static
  4575. * @memberOf _
  4576. * @since 1.1.0
  4577. * @category Util
  4578. * @param {Object} [context=root] The context object.
  4579. * @returns {Function} Returns a new `lodash` function.
  4580. * @example
  4581. *
  4582. * _.mixin({ 'foo': _.constant('foo') });
  4583. *
  4584. * var lodash = _.runInContext();
  4585. * lodash.mixin({ 'bar': lodash.constant('bar') });
  4586. *
  4587. * _.isFunction(_.foo);
  4588. * // => true
  4589. * _.isFunction(_.bar);
  4590. * // => false
  4591. *
  4592. * lodash.isFunction(lodash.foo);
  4593. * // => false
  4594. * lodash.isFunction(lodash.bar);
  4595. * // => true
  4596. *
  4597. * // Create a suped-up `defer` in Node.js.
  4598. * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;
  4599. */
  4600. var runInContext = (function runInContext(context) {
  4601. context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));
  4602. /** Built-in constructor references. */
  4603. var Array = context.Array,
  4604. Date = context.Date,
  4605. Error = context.Error,
  4606. Function = context.Function,
  4607. Math = context.Math,
  4608. Object = context.Object,
  4609. RegExp = context.RegExp,
  4610. String = context.String,
  4611. TypeError = context.TypeError;
  4612. /** Used for built-in method references. */
  4613. var arrayProto = Array.prototype,
  4614. funcProto = Function.prototype,
  4615. objectProto = Object.prototype;
  4616. /** Used to detect overreaching core-js shims. */
  4617. var coreJsData = context['__core-js_shared__'];
  4618. /** Used to resolve the decompiled source of functions. */
  4619. var funcToString = funcProto.toString;
  4620. /** Used to check objects for own properties. */
  4621. var hasOwnProperty = objectProto.hasOwnProperty;
  4622. /** Used to generate unique IDs. */
  4623. var idCounter = 0;
  4624. /** Used to detect methods masquerading as native. */
  4625. var maskSrcKey = (function() {
  4626. var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
  4627. return uid ? ('Symbol(src)_1.' + uid) : '';
  4628. }());
  4629. /**
  4630. * Used to resolve the
  4631. * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
  4632. * of values.
  4633. */
  4634. var nativeObjectToString = objectProto.toString;
  4635. /** Used to infer the `Object` constructor. */
  4636. var objectCtorString = funcToString.call(Object);
  4637. /** Used to restore the original `_` reference in `_.noConflict`. */
  4638. var oldDash = root._;
  4639. /** Used to detect if a method is native. */
  4640. var reIsNative = RegExp('^' +
  4641. funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
  4642. .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
  4643. );
  4644. /** Built-in value references. */
  4645. var Buffer = moduleExports ? context.Buffer : undefined,
  4646. Symbol = context.Symbol,
  4647. Uint8Array = context.Uint8Array,
  4648. allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,
  4649. getPrototype = overArg(Object.getPrototypeOf, Object),
  4650. objectCreate = Object.create,
  4651. propertyIsEnumerable = objectProto.propertyIsEnumerable,
  4652. splice = arrayProto.splice,
  4653. spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,
  4654. symIterator = Symbol ? Symbol.iterator : undefined,
  4655. symToStringTag = Symbol ? Symbol.toStringTag : undefined;
  4656. var defineProperty = (function() {
  4657. try {
  4658. var func = getNative(Object, 'defineProperty');
  4659. func({}, '', {});
  4660. return func;
  4661. } catch (e) {}
  4662. }());
  4663. /** Mocked built-ins. */
  4664. var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,
  4665. ctxNow = Date && Date.now !== root.Date.now && Date.now,
  4666. ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
  4667. /* Built-in method references for those with the same name as other `lodash` methods. */
  4668. var nativeCeil = Math.ceil,
  4669. nativeFloor = Math.floor,
  4670. nativeGetSymbols = Object.getOwnPropertySymbols,
  4671. nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
  4672. nativeIsFinite = context.isFinite,
  4673. nativeJoin = arrayProto.join,
  4674. nativeKeys = overArg(Object.keys, Object),
  4675. nativeMax = Math.max,
  4676. nativeMin = Math.min,
  4677. nativeNow = Date.now,
  4678. nativeParseInt = context.parseInt,
  4679. nativeRandom = Math.random,
  4680. nativeReverse = arrayProto.reverse;
  4681. /* Built-in method references that are verified to be native. */
  4682. var DataView = getNative(context, 'DataView'),
  4683. Map = getNative(context, 'Map'),
  4684. Promise = getNative(context, 'Promise'),
  4685. Set = getNative(context, 'Set'),
  4686. WeakMap = getNative(context, 'WeakMap'),
  4687. nativeCreate = getNative(Object, 'create');
  4688. /** Used to store function metadata. */
  4689. var metaMap = WeakMap && new WeakMap;
  4690. /** Used to lookup unminified function names. */
  4691. var realNames = {};
  4692. /** Used to detect maps, sets, and weakmaps. */
  4693. var dataViewCtorString = toSource(DataView),
  4694. mapCtorString = toSource(Map),
  4695. promiseCtorString = toSource(Promise),
  4696. setCtorString = toSource(Set),
  4697. weakMapCtorString = toSource(WeakMap);
  4698. /** Used to convert symbols to primitives and strings. */
  4699. var symbolProto = Symbol ? Symbol.prototype : undefined,
  4700. symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,
  4701. symbolToString = symbolProto ? symbolProto.toString : undefined;
  4702. /*------------------------------------------------------------------------*/
  4703. /**
  4704. * Creates a `lodash` object which wraps `value` to enable implicit method
  4705. * chain sequences. Methods that operate on and return arrays, collections,
  4706. * and functions can be chained together. Methods that retrieve a single value
  4707. * or may return a primitive value will automatically end the chain sequence
  4708. * and return the unwrapped value. Otherwise, the value must be unwrapped
  4709. * with `_#value`.
  4710. *
  4711. * Explicit chain sequences, which must be unwrapped with `_#value`, may be
  4712. * enabled using `_.chain`.
  4713. *
  4714. * The execution of chained methods is lazy, that is, it's deferred until
  4715. * `_#value` is implicitly or explicitly called.
  4716. *
  4717. * Lazy evaluation allows several methods to support shortcut fusion.
  4718. * Shortcut fusion is an optimization to merge iteratee calls; this avoids
  4719. * the creation of intermediate arrays and can greatly reduce the number of
  4720. * iteratee executions. Sections of a chain sequence qualify for shortcut
  4721. * fusion if the section is applied to an array and iteratees accept only
  4722. * one argument. The heuristic for whether a section qualifies for shortcut
  4723. * fusion is subject to change.
  4724. *
  4725. * Chaining is supported in custom builds as long as the `_#value` method is
  4726. * directly or indirectly included in the build.
  4727. *
  4728. * In addition to lodash methods, wrappers have `Array` and `String` methods.
  4729. *
  4730. * The wrapper `Array` methods are:
  4731. * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`
  4732. *
  4733. * The wrapper `String` methods are:
  4734. * `replace` and `split`
  4735. *
  4736. * The wrapper methods that support shortcut fusion are:
  4737. * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,
  4738. * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,
  4739. * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`
  4740. *
  4741. * The chainable wrapper methods are:
  4742. * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,
  4743. * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,
  4744. * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,
  4745. * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,
  4746. * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,
  4747. * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,
  4748. * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,
  4749. * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,
  4750. * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,
  4751. * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,
  4752. * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,
  4753. * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,
  4754. * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,
  4755. * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,
  4756. * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,
  4757. * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,
  4758. * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,
  4759. * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,
  4760. * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,
  4761. * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,
  4762. * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,
  4763. * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,
  4764. * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,
  4765. * `zipObject`, `zipObjectDeep`, and `zipWith`
  4766. *
  4767. * The wrapper methods that are **not** chainable by default are:
  4768. * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,
  4769. * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,
  4770. * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,
  4771. * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,
  4772. * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,
  4773. * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,
  4774. * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,
  4775. * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,
  4776. * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,
  4777. * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,
  4778. * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,
  4779. * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,
  4780. * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,
  4781. * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,
  4782. * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,
  4783. * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,
  4784. * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,
  4785. * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,
  4786. * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,
  4787. * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,
  4788. * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,
  4789. * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,
  4790. * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,
  4791. * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,
  4792. * `upperFirst`, `value`, and `words`
  4793. *
  4794. * @name _
  4795. * @constructor
  4796. * @category Seq
  4797. * @param {*} value The value to wrap in a `lodash` instance.
  4798. * @returns {Object} Returns the new `lodash` wrapper instance.
  4799. * @example
  4800. *
  4801. * function square(n) {
  4802. * return n * n;
  4803. * }
  4804. *
  4805. * var wrapped = _([1, 2, 3]);
  4806. *
  4807. * // Returns an unwrapped value.
  4808. * wrapped.reduce(_.add);
  4809. * // => 6
  4810. *
  4811. * // Returns a wrapped value.
  4812. * var squares = wrapped.map(square);
  4813. *
  4814. * _.isArray(squares);
  4815. * // => false
  4816. *
  4817. * _.isArray(squares.value());
  4818. * // => true
  4819. */
  4820. function lodash(value) {
  4821. if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
  4822. if (value instanceof LodashWrapper) {
  4823. return value;
  4824. }
  4825. if (hasOwnProperty.call(value, '__wrapped__')) {
  4826. return wrapperClone(value);
  4827. }
  4828. }
  4829. return new LodashWrapper(value);
  4830. }
  4831. /**
  4832. * The base implementation of `_.create` without support for assigning
  4833. * properties to the created object.
  4834. *
  4835. * @private
  4836. * @param {Object} proto The object to inherit from.
  4837. * @returns {Object} Returns the new object.
  4838. */
  4839. var baseCreate = (function() {
  4840. function object() {}
  4841. return function(proto) {
  4842. if (!isObject(proto)) {
  4843. return {};
  4844. }
  4845. if (objectCreate) {
  4846. return objectCreate(proto);
  4847. }
  4848. object.prototype = proto;
  4849. var result = new object;
  4850. object.prototype = undefined;
  4851. return result;
  4852. };
  4853. }());
  4854. /**
  4855. * The function whose prototype chain sequence wrappers inherit from.
  4856. *
  4857. * @private
  4858. */
  4859. function baseLodash() {
  4860. // No operation performed.
  4861. }
  4862. /**
  4863. * The base constructor for creating `lodash` wrapper objects.
  4864. *
  4865. * @private
  4866. * @param {*} value The value to wrap.
  4867. * @param {boolean} [chainAll] Enable explicit method chain sequences.
  4868. */
  4869. function LodashWrapper(value, chainAll) {
  4870. this.__wrapped__ = value;
  4871. this.__actions__ = [];
  4872. this.__chain__ = !!chainAll;
  4873. this.__index__ = 0;
  4874. this.__values__ = undefined;
  4875. }
  4876. /**
  4877. * By default, the template delimiters used by lodash are like those in
  4878. * embedded Ruby (ERB) as well as ES2015 template strings. Change the
  4879. * following template settings to use alternative delimiters.
  4880. *
  4881. * @static
  4882. * @memberOf _
  4883. * @type {Object}
  4884. */
  4885. lodash.templateSettings = {
  4886. /**
  4887. * Used to detect `data` property values to be HTML-escaped.
  4888. *
  4889. * @memberOf _.templateSettings
  4890. * @type {RegExp}
  4891. */
  4892. 'escape': reEscape,
  4893. /**
  4894. * Used to detect code to be evaluated.
  4895. *
  4896. * @memberOf _.templateSettings
  4897. * @type {RegExp}
  4898. */
  4899. 'evaluate': reEvaluate,
  4900. /**
  4901. * Used to detect `data` property values to inject.
  4902. *
  4903. * @memberOf _.templateSettings
  4904. * @type {RegExp}
  4905. */
  4906. 'interpolate': reInterpolate,
  4907. /**
  4908. * Used to reference the data object in the template text.
  4909. *
  4910. * @memberOf _.templateSettings
  4911. * @type {string}
  4912. */
  4913. 'variable': '',
  4914. /**
  4915. * Used to import variables into the compiled template.
  4916. *
  4917. * @memberOf _.templateSettings
  4918. * @type {Object}
  4919. */
  4920. 'imports': {
  4921. /**
  4922. * A reference to the `lodash` function.
  4923. *
  4924. * @memberOf _.templateSettings.imports
  4925. * @type {Function}
  4926. */
  4927. '_': lodash
  4928. }
  4929. };
  4930. // Ensure wrappers are instances of `baseLodash`.
  4931. lodash.prototype = baseLodash.prototype;
  4932. lodash.prototype.constructor = lodash;
  4933. LodashWrapper.prototype = baseCreate(baseLodash.prototype);
  4934. LodashWrapper.prototype.constructor = LodashWrapper;
  4935. /*------------------------------------------------------------------------*/
  4936. /**
  4937. * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.
  4938. *
  4939. * @private
  4940. * @constructor
  4941. * @param {*} value The value to wrap.
  4942. */
  4943. function LazyWrapper(value) {
  4944. this.__wrapped__ = value;
  4945. this.__actions__ = [];
  4946. this.__dir__ = 1;
  4947. this.__filtered__ = false;
  4948. this.__iteratees__ = [];
  4949. this.__takeCount__ = MAX_ARRAY_LENGTH;
  4950. this.__views__ = [];
  4951. }
  4952. /**
  4953. * Creates a clone of the lazy wrapper object.
  4954. *
  4955. * @private
  4956. * @name clone
  4957. * @memberOf LazyWrapper
  4958. * @returns {Object} Returns the cloned `LazyWrapper` object.
  4959. */
  4960. function lazyClone() {
  4961. var result = new LazyWrapper(this.__wrapped__);
  4962. result.__actions__ = copyArray(this.__actions__);
  4963. result.__dir__ = this.__dir__;
  4964. result.__filtered__ = this.__filtered__;
  4965. result.__iteratees__ = copyArray(this.__iteratees__);
  4966. result.__takeCount__ = this.__takeCount__;
  4967. result.__views__ = copyArray(this.__views__);
  4968. return result;
  4969. }
  4970. /**
  4971. * Reverses the direction of lazy iteration.
  4972. *
  4973. * @private
  4974. * @name reverse
  4975. * @memberOf LazyWrapper
  4976. * @returns {Object} Returns the new reversed `LazyWrapper` object.
  4977. */
  4978. function lazyReverse() {
  4979. if (this.__filtered__) {
  4980. var result = new LazyWrapper(this);
  4981. result.__dir__ = -1;
  4982. result.__filtered__ = true;
  4983. } else {
  4984. result = this.clone();
  4985. result.__dir__ *= -1;
  4986. }
  4987. return result;
  4988. }
  4989. /**
  4990. * Extracts the unwrapped value from its lazy wrapper.
  4991. *
  4992. * @private
  4993. * @name value
  4994. * @memberOf LazyWrapper
  4995. * @returns {*} Returns the unwrapped value.
  4996. */
  4997. function lazyValue() {
  4998. var array = this.__wrapped__.value(),
  4999. dir = this.__dir__,
  5000. isArr = isArray(array),
  5001. isRight = dir < 0,
  5002. arrLength = isArr ? array.length : 0,
  5003. view = getView(0, arrLength, this.__views__),
  5004. start = view.start,
  5005. end = view.end,
  5006. length = end - start,
  5007. index = isRight ? end : (start - 1),
  5008. iteratees = this.__iteratees__,
  5009. iterLength = iteratees.length,
  5010. resIndex = 0,
  5011. takeCount = nativeMin(length, this.__takeCount__);
  5012. if (!isArr || (!isRight && arrLength == length && takeCount == length)) {
  5013. return baseWrapperValue(array, this.__actions__);
  5014. }
  5015. var result = [];
  5016. outer:
  5017. while (length-- && resIndex < takeCount) {
  5018. index += dir;
  5019. var iterIndex = -1,
  5020. value = array[index];
  5021. while (++iterIndex < iterLength) {
  5022. var data = iteratees[iterIndex],
  5023. iteratee = data.iteratee,
  5024. type = data.type,
  5025. computed = iteratee(value);
  5026. if (type == LAZY_MAP_FLAG) {
  5027. value = computed;
  5028. } else if (!computed) {
  5029. if (type == LAZY_FILTER_FLAG) {
  5030. continue outer;
  5031. } else {
  5032. break outer;
  5033. }
  5034. }
  5035. }
  5036. result[resIndex++] = value;
  5037. }
  5038. return result;
  5039. }
  5040. // Ensure `LazyWrapper` is an instance of `baseLodash`.
  5041. LazyWrapper.prototype = baseCreate(baseLodash.prototype);
  5042. LazyWrapper.prototype.constructor = LazyWrapper;
  5043. /*------------------------------------------------------------------------*/
  5044. /**
  5045. * Creates a hash object.
  5046. *
  5047. * @private
  5048. * @constructor
  5049. * @param {Array} [entries] The key-value pairs to cache.
  5050. */
  5051. function Hash(entries) {
  5052. var index = -1,
  5053. length = entries == null ? 0 : entries.length;
  5054. this.clear();
  5055. while (++index < length) {
  5056. var entry = entries[index];
  5057. this.set(entry[0], entry[1]);
  5058. }
  5059. }
  5060. /**
  5061. * Removes all key-value entries from the hash.
  5062. *
  5063. * @private
  5064. * @name clear
  5065. * @memberOf Hash
  5066. */
  5067. function hashClear() {
  5068. this.__data__ = nativeCreate ? nativeCreate(null) : {};
  5069. this.size = 0;
  5070. }
  5071. /**
  5072. * Removes `key` and its value from the hash.
  5073. *
  5074. * @private
  5075. * @name delete
  5076. * @memberOf Hash
  5077. * @param {Object} hash The hash to modify.
  5078. * @param {string} key The key of the value to remove.
  5079. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  5080. */
  5081. function hashDelete(key) {
  5082. var result = this.has(key) && delete this.__data__[key];
  5083. this.size -= result ? 1 : 0;
  5084. return result;
  5085. }
  5086. /**
  5087. * Gets the hash value for `key`.
  5088. *
  5089. * @private
  5090. * @name get
  5091. * @memberOf Hash
  5092. * @param {string} key The key of the value to get.
  5093. * @returns {*} Returns the entry value.
  5094. */
  5095. function hashGet(key) {
  5096. var data = this.__data__;
  5097. if (nativeCreate) {
  5098. var result = data[key];
  5099. return result === HASH_UNDEFINED ? undefined : result;
  5100. }
  5101. return hasOwnProperty.call(data, key) ? data[key] : undefined;
  5102. }
  5103. /**
  5104. * Checks if a hash value for `key` exists.
  5105. *
  5106. * @private
  5107. * @name has
  5108. * @memberOf Hash
  5109. * @param {string} key The key of the entry to check.
  5110. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  5111. */
  5112. function hashHas(key) {
  5113. var data = this.__data__;
  5114. return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
  5115. }
  5116. /**
  5117. * Sets the hash `key` to `value`.
  5118. *
  5119. * @private
  5120. * @name set
  5121. * @memberOf Hash
  5122. * @param {string} key The key of the value to set.
  5123. * @param {*} value The value to set.
  5124. * @returns {Object} Returns the hash instance.
  5125. */
  5126. function hashSet(key, value) {
  5127. var data = this.__data__;
  5128. this.size += this.has(key) ? 0 : 1;
  5129. data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
  5130. return this;
  5131. }
  5132. // Add methods to `Hash`.
  5133. Hash.prototype.clear = hashClear;
  5134. Hash.prototype['delete'] = hashDelete;
  5135. Hash.prototype.get = hashGet;
  5136. Hash.prototype.has = hashHas;
  5137. Hash.prototype.set = hashSet;
  5138. /*------------------------------------------------------------------------*/
  5139. /**
  5140. * Creates an list cache object.
  5141. *
  5142. * @private
  5143. * @constructor
  5144. * @param {Array} [entries] The key-value pairs to cache.
  5145. */
  5146. function ListCache(entries) {
  5147. var index = -1,
  5148. length = entries == null ? 0 : entries.length;
  5149. this.clear();
  5150. while (++index < length) {
  5151. var entry = entries[index];
  5152. this.set(entry[0], entry[1]);
  5153. }
  5154. }
  5155. /**
  5156. * Removes all key-value entries from the list cache.
  5157. *
  5158. * @private
  5159. * @name clear
  5160. * @memberOf ListCache
  5161. */
  5162. function listCacheClear() {
  5163. this.__data__ = [];
  5164. this.size = 0;
  5165. }
  5166. /**
  5167. * Removes `key` and its value from the list cache.
  5168. *
  5169. * @private
  5170. * @name delete
  5171. * @memberOf ListCache
  5172. * @param {string} key The key of the value to remove.
  5173. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  5174. */
  5175. function listCacheDelete(key) {
  5176. var data = this.__data__,
  5177. index = assocIndexOf(data, key);
  5178. if (index < 0) {
  5179. return false;
  5180. }
  5181. var lastIndex = data.length - 1;
  5182. if (index == lastIndex) {
  5183. data.pop();
  5184. } else {
  5185. splice.call(data, index, 1);
  5186. }
  5187. --this.size;
  5188. return true;
  5189. }
  5190. /**
  5191. * Gets the list cache value for `key`.
  5192. *
  5193. * @private
  5194. * @name get
  5195. * @memberOf ListCache
  5196. * @param {string} key The key of the value to get.
  5197. * @returns {*} Returns the entry value.
  5198. */
  5199. function listCacheGet(key) {
  5200. var data = this.__data__,
  5201. index = assocIndexOf(data, key);
  5202. return index < 0 ? undefined : data[index][1];
  5203. }
  5204. /**
  5205. * Checks if a list cache value for `key` exists.
  5206. *
  5207. * @private
  5208. * @name has
  5209. * @memberOf ListCache
  5210. * @param {string} key The key of the entry to check.
  5211. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  5212. */
  5213. function listCacheHas(key) {
  5214. return assocIndexOf(this.__data__, key) > -1;
  5215. }
  5216. /**
  5217. * Sets the list cache `key` to `value`.
  5218. *
  5219. * @private
  5220. * @name set
  5221. * @memberOf ListCache
  5222. * @param {string} key The key of the value to set.
  5223. * @param {*} value The value to set.
  5224. * @returns {Object} Returns the list cache instance.
  5225. */
  5226. function listCacheSet(key, value) {
  5227. var data = this.__data__,
  5228. index = assocIndexOf(data, key);
  5229. if (index < 0) {
  5230. ++this.size;
  5231. data.push([key, value]);
  5232. } else {
  5233. data[index][1] = value;
  5234. }
  5235. return this;
  5236. }
  5237. // Add methods to `ListCache`.
  5238. ListCache.prototype.clear = listCacheClear;
  5239. ListCache.prototype['delete'] = listCacheDelete;
  5240. ListCache.prototype.get = listCacheGet;
  5241. ListCache.prototype.has = listCacheHas;
  5242. ListCache.prototype.set = listCacheSet;
  5243. /*------------------------------------------------------------------------*/
  5244. /**
  5245. * Creates a map cache object to store key-value pairs.
  5246. *
  5247. * @private
  5248. * @constructor
  5249. * @param {Array} [entries] The key-value pairs to cache.
  5250. */
  5251. function MapCache(entries) {
  5252. var index = -1,
  5253. length = entries == null ? 0 : entries.length;
  5254. this.clear();
  5255. while (++index < length) {
  5256. var entry = entries[index];
  5257. this.set(entry[0], entry[1]);
  5258. }
  5259. }
  5260. /**
  5261. * Removes all key-value entries from the map.
  5262. *
  5263. * @private
  5264. * @name clear
  5265. * @memberOf MapCache
  5266. */
  5267. function mapCacheClear() {
  5268. this.size = 0;
  5269. this.__data__ = {
  5270. 'hash': new Hash,
  5271. 'map': new (Map || ListCache),
  5272. 'string': new Hash
  5273. };
  5274. }
  5275. /**
  5276. * Removes `key` and its value from the map.
  5277. *
  5278. * @private
  5279. * @name delete
  5280. * @memberOf MapCache
  5281. * @param {string} key The key of the value to remove.
  5282. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  5283. */
  5284. function mapCacheDelete(key) {
  5285. var result = getMapData(this, key)['delete'](key);
  5286. this.size -= result ? 1 : 0;
  5287. return result;
  5288. }
  5289. /**
  5290. * Gets the map value for `key`.
  5291. *
  5292. * @private
  5293. * @name get
  5294. * @memberOf MapCache
  5295. * @param {string} key The key of the value to get.
  5296. * @returns {*} Returns the entry value.
  5297. */
  5298. function mapCacheGet(key) {
  5299. return getMapData(this, key).get(key);
  5300. }
  5301. /**
  5302. * Checks if a map value for `key` exists.
  5303. *
  5304. * @private
  5305. * @name has
  5306. * @memberOf MapCache
  5307. * @param {string} key The key of the entry to check.
  5308. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  5309. */
  5310. function mapCacheHas(key) {
  5311. return getMapData(this, key).has(key);
  5312. }
  5313. /**
  5314. * Sets the map `key` to `value`.
  5315. *
  5316. * @private
  5317. * @name set
  5318. * @memberOf MapCache
  5319. * @param {string} key The key of the value to set.
  5320. * @param {*} value The value to set.
  5321. * @returns {Object} Returns the map cache instance.
  5322. */
  5323. function mapCacheSet(key, value) {
  5324. var data = getMapData(this, key),
  5325. size = data.size;
  5326. data.set(key, value);
  5327. this.size += data.size == size ? 0 : 1;
  5328. return this;
  5329. }
  5330. // Add methods to `MapCache`.
  5331. MapCache.prototype.clear = mapCacheClear;
  5332. MapCache.prototype['delete'] = mapCacheDelete;
  5333. MapCache.prototype.get = mapCacheGet;
  5334. MapCache.prototype.has = mapCacheHas;
  5335. MapCache.prototype.set = mapCacheSet;
  5336. /*------------------------------------------------------------------------*/
  5337. /**
  5338. *
  5339. * Creates an array cache object to store unique values.
  5340. *
  5341. * @private
  5342. * @constructor
  5343. * @param {Array} [values] The values to cache.
  5344. */
  5345. function SetCache(values) {
  5346. var index = -1,
  5347. length = values == null ? 0 : values.length;
  5348. this.__data__ = new MapCache;
  5349. while (++index < length) {
  5350. this.add(values[index]);
  5351. }
  5352. }
  5353. /**
  5354. * Adds `value` to the array cache.
  5355. *
  5356. * @private
  5357. * @name add
  5358. * @memberOf SetCache
  5359. * @alias push
  5360. * @param {*} value The value to cache.
  5361. * @returns {Object} Returns the cache instance.
  5362. */
  5363. function setCacheAdd(value) {
  5364. this.__data__.set(value, HASH_UNDEFINED);
  5365. return this;
  5366. }
  5367. /**
  5368. * Checks if `value` is in the array cache.
  5369. *
  5370. * @private
  5371. * @name has
  5372. * @memberOf SetCache
  5373. * @param {*} value The value to search for.
  5374. * @returns {number} Returns `true` if `value` is found, else `false`.
  5375. */
  5376. function setCacheHas(value) {
  5377. return this.__data__.has(value);
  5378. }
  5379. // Add methods to `SetCache`.
  5380. SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
  5381. SetCache.prototype.has = setCacheHas;
  5382. /*------------------------------------------------------------------------*/
  5383. /**
  5384. * Creates a stack cache object to store key-value pairs.
  5385. *
  5386. * @private
  5387. * @constructor
  5388. * @param {Array} [entries] The key-value pairs to cache.
  5389. */
  5390. function Stack(entries) {
  5391. var data = this.__data__ = new ListCache(entries);
  5392. this.size = data.size;
  5393. }
  5394. /**
  5395. * Removes all key-value entries from the stack.
  5396. *
  5397. * @private
  5398. * @name clear
  5399. * @memberOf Stack
  5400. */
  5401. function stackClear() {
  5402. this.__data__ = new ListCache;
  5403. this.size = 0;
  5404. }
  5405. /**
  5406. * Removes `key` and its value from the stack.
  5407. *
  5408. * @private
  5409. * @name delete
  5410. * @memberOf Stack
  5411. * @param {string} key The key of the value to remove.
  5412. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  5413. */
  5414. function stackDelete(key) {
  5415. var data = this.__data__,
  5416. result = data['delete'](key);
  5417. this.size = data.size;
  5418. return result;
  5419. }
  5420. /**
  5421. * Gets the stack value for `key`.
  5422. *
  5423. * @private
  5424. * @name get
  5425. * @memberOf Stack
  5426. * @param {string} key The key of the value to get.
  5427. * @returns {*} Returns the entry value.
  5428. */
  5429. function stackGet(key) {
  5430. return this.__data__.get(key);
  5431. }
  5432. /**
  5433. * Checks if a stack value for `key` exists.
  5434. *
  5435. * @private
  5436. * @name has
  5437. * @memberOf Stack
  5438. * @param {string} key The key of the entry to check.
  5439. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  5440. */
  5441. function stackHas(key) {
  5442. return this.__data__.has(key);
  5443. }
  5444. /**
  5445. * Sets the stack `key` to `value`.
  5446. *
  5447. * @private
  5448. * @name set
  5449. * @memberOf Stack
  5450. * @param {string} key The key of the value to set.
  5451. * @param {*} value The value to set.
  5452. * @returns {Object} Returns the stack cache instance.
  5453. */
  5454. function stackSet(key, value) {
  5455. var data = this.__data__;
  5456. if (data instanceof ListCache) {
  5457. var pairs = data.__data__;
  5458. if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
  5459. pairs.push([key, value]);
  5460. this.size = ++data.size;
  5461. return this;
  5462. }
  5463. data = this.__data__ = new MapCache(pairs);
  5464. }
  5465. data.set(key, value);
  5466. this.size = data.size;
  5467. return this;
  5468. }
  5469. // Add methods to `Stack`.
  5470. Stack.prototype.clear = stackClear;
  5471. Stack.prototype['delete'] = stackDelete;
  5472. Stack.prototype.get = stackGet;
  5473. Stack.prototype.has = stackHas;
  5474. Stack.prototype.set = stackSet;
  5475. /*------------------------------------------------------------------------*/
  5476. /**
  5477. * Creates an array of the enumerable property names of the array-like `value`.
  5478. *
  5479. * @private
  5480. * @param {*} value The value to query.
  5481. * @param {boolean} inherited Specify returning inherited property names.
  5482. * @returns {Array} Returns the array of property names.
  5483. */
  5484. function arrayLikeKeys(value, inherited) {
  5485. var isArr = isArray(value),
  5486. isArg = !isArr && isArguments(value),
  5487. isBuff = !isArr && !isArg && isBuffer(value),
  5488. isType = !isArr && !isArg && !isBuff && isTypedArray(value),
  5489. skipIndexes = isArr || isArg || isBuff || isType,
  5490. result = skipIndexes ? baseTimes(value.length, String) : [],
  5491. length = result.length;
  5492. for (var key in value) {
  5493. if ((inherited || hasOwnProperty.call(value, key)) &&
  5494. !(skipIndexes && (
  5495. // Safari 9 has enumerable `arguments.length` in strict mode.
  5496. key == 'length' ||
  5497. // Node.js 0.10 has enumerable non-index properties on buffers.
  5498. (isBuff && (key == 'offset' || key == 'parent')) ||
  5499. // PhantomJS 2 has enumerable non-index properties on typed arrays.
  5500. (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
  5501. // Skip index properties.
  5502. isIndex(key, length)
  5503. ))) {
  5504. result.push(key);
  5505. }
  5506. }
  5507. return result;
  5508. }
  5509. /**
  5510. * A specialized version of `_.sample` for arrays.
  5511. *
  5512. * @private
  5513. * @param {Array} array The array to sample.
  5514. * @returns {*} Returns the random element.
  5515. */
  5516. function arraySample(array) {
  5517. var length = array.length;
  5518. return length ? array[baseRandom(0, length - 1)] : undefined;
  5519. }
  5520. /**
  5521. * A specialized version of `_.sampleSize` for arrays.
  5522. *
  5523. * @private
  5524. * @param {Array} array The array to sample.
  5525. * @param {number} n The number of elements to sample.
  5526. * @returns {Array} Returns the random elements.
  5527. */
  5528. function arraySampleSize(array, n) {
  5529. return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));
  5530. }
  5531. /**
  5532. * A specialized version of `_.shuffle` for arrays.
  5533. *
  5534. * @private
  5535. * @param {Array} array The array to shuffle.
  5536. * @returns {Array} Returns the new shuffled array.
  5537. */
  5538. function arrayShuffle(array) {
  5539. return shuffleSelf(copyArray(array));
  5540. }
  5541. /**
  5542. * This function is like `assignValue` except that it doesn't assign
  5543. * `undefined` values.
  5544. *
  5545. * @private
  5546. * @param {Object} object The object to modify.
  5547. * @param {string} key The key of the property to assign.
  5548. * @param {*} value The value to assign.
  5549. */
  5550. function assignMergeValue(object, key, value) {
  5551. if ((value !== undefined && !eq(object[key], value)) ||
  5552. (value === undefined && !(key in object))) {
  5553. baseAssignValue(object, key, value);
  5554. }
  5555. }
  5556. /**
  5557. * Assigns `value` to `key` of `object` if the existing value is not equivalent
  5558. * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  5559. * for equality comparisons.
  5560. *
  5561. * @private
  5562. * @param {Object} object The object to modify.
  5563. * @param {string} key The key of the property to assign.
  5564. * @param {*} value The value to assign.
  5565. */
  5566. function assignValue(object, key, value) {
  5567. var objValue = object[key];
  5568. if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
  5569. (value === undefined && !(key in object))) {
  5570. baseAssignValue(object, key, value);
  5571. }
  5572. }
  5573. /**
  5574. * Gets the index at which the `key` is found in `array` of key-value pairs.
  5575. *
  5576. * @private
  5577. * @param {Array} array The array to inspect.
  5578. * @param {*} key The key to search for.
  5579. * @returns {number} Returns the index of the matched value, else `-1`.
  5580. */
  5581. function assocIndexOf(array, key) {
  5582. var length = array.length;
  5583. while (length--) {
  5584. if (eq(array[length][0], key)) {
  5585. return length;
  5586. }
  5587. }
  5588. return -1;
  5589. }
  5590. /**
  5591. * Aggregates elements of `collection` on `accumulator` with keys transformed
  5592. * by `iteratee` and values set by `setter`.
  5593. *
  5594. * @private
  5595. * @param {Array|Object} collection The collection to iterate over.
  5596. * @param {Function} setter The function to set `accumulator` values.
  5597. * @param {Function} iteratee The iteratee to transform keys.
  5598. * @param {Object} accumulator The initial aggregated object.
  5599. * @returns {Function} Returns `accumulator`.
  5600. */
  5601. function baseAggregator(collection, setter, iteratee, accumulator) {
  5602. baseEach(collection, function(value, key, collection) {
  5603. setter(accumulator, value, iteratee(value), collection);
  5604. });
  5605. return accumulator;
  5606. }
  5607. /**
  5608. * The base implementation of `_.assign` without support for multiple sources
  5609. * or `customizer` functions.
  5610. *
  5611. * @private
  5612. * @param {Object} object The destination object.
  5613. * @param {Object} source The source object.
  5614. * @returns {Object} Returns `object`.
  5615. */
  5616. function baseAssign(object, source) {
  5617. return object && copyObject(source, keys(source), object);
  5618. }
  5619. /**
  5620. * The base implementation of `_.assignIn` without support for multiple sources
  5621. * or `customizer` functions.
  5622. *
  5623. * @private
  5624. * @param {Object} object The destination object.
  5625. * @param {Object} source The source object.
  5626. * @returns {Object} Returns `object`.
  5627. */
  5628. function baseAssignIn(object, source) {
  5629. return object && copyObject(source, keysIn(source), object);
  5630. }
  5631. /**
  5632. * The base implementation of `assignValue` and `assignMergeValue` without
  5633. * value checks.
  5634. *
  5635. * @private
  5636. * @param {Object} object The object to modify.
  5637. * @param {string} key The key of the property to assign.
  5638. * @param {*} value The value to assign.
  5639. */
  5640. function baseAssignValue(object, key, value) {
  5641. if (key == '__proto__' && defineProperty) {
  5642. defineProperty(object, key, {
  5643. 'configurable': true,
  5644. 'enumerable': true,
  5645. 'value': value,
  5646. 'writable': true
  5647. });
  5648. } else {
  5649. object[key] = value;
  5650. }
  5651. }
  5652. /**
  5653. * The base implementation of `_.at` without support for individual paths.
  5654. *
  5655. * @private
  5656. * @param {Object} object The object to iterate over.
  5657. * @param {string[]} paths The property paths to pick.
  5658. * @returns {Array} Returns the picked elements.
  5659. */
  5660. function baseAt(object, paths) {
  5661. var index = -1,
  5662. length = paths.length,
  5663. result = Array(length),
  5664. skip = object == null;
  5665. while (++index < length) {
  5666. result[index] = skip ? undefined : get(object, paths[index]);
  5667. }
  5668. return result;
  5669. }
  5670. /**
  5671. * The base implementation of `_.clamp` which doesn't coerce arguments.
  5672. *
  5673. * @private
  5674. * @param {number} number The number to clamp.
  5675. * @param {number} [lower] The lower bound.
  5676. * @param {number} upper The upper bound.
  5677. * @returns {number} Returns the clamped number.
  5678. */
  5679. function baseClamp(number, lower, upper) {
  5680. if (number === number) {
  5681. if (upper !== undefined) {
  5682. number = number <= upper ? number : upper;
  5683. }
  5684. if (lower !== undefined) {
  5685. number = number >= lower ? number : lower;
  5686. }
  5687. }
  5688. return number;
  5689. }
  5690. /**
  5691. * The base implementation of `_.clone` and `_.cloneDeep` which tracks
  5692. * traversed objects.
  5693. *
  5694. * @private
  5695. * @param {*} value The value to clone.
  5696. * @param {boolean} bitmask The bitmask flags.
  5697. * 1 - Deep clone
  5698. * 2 - Flatten inherited properties
  5699. * 4 - Clone symbols
  5700. * @param {Function} [customizer] The function to customize cloning.
  5701. * @param {string} [key] The key of `value`.
  5702. * @param {Object} [object] The parent object of `value`.
  5703. * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
  5704. * @returns {*} Returns the cloned value.
  5705. */
  5706. function baseClone(value, bitmask, customizer, key, object, stack) {
  5707. var result,
  5708. isDeep = bitmask & CLONE_DEEP_FLAG,
  5709. isFlat = bitmask & CLONE_FLAT_FLAG,
  5710. isFull = bitmask & CLONE_SYMBOLS_FLAG;
  5711. if (customizer) {
  5712. result = object ? customizer(value, key, object, stack) : customizer(value);
  5713. }
  5714. if (result !== undefined) {
  5715. return result;
  5716. }
  5717. if (!isObject(value)) {
  5718. return value;
  5719. }
  5720. var isArr = isArray(value);
  5721. if (isArr) {
  5722. result = initCloneArray(value);
  5723. if (!isDeep) {
  5724. return copyArray(value, result);
  5725. }
  5726. } else {
  5727. var tag = getTag(value),
  5728. isFunc = tag == funcTag || tag == genTag;
  5729. if (isBuffer(value)) {
  5730. return cloneBuffer(value, isDeep);
  5731. }
  5732. if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
  5733. result = (isFlat || isFunc) ? {} : initCloneObject(value);
  5734. if (!isDeep) {
  5735. return isFlat
  5736. ? copySymbolsIn(value, baseAssignIn(result, value))
  5737. : copySymbols(value, baseAssign(result, value));
  5738. }
  5739. } else {
  5740. if (!cloneableTags[tag]) {
  5741. return object ? value : {};
  5742. }
  5743. result = initCloneByTag(value, tag, baseClone, isDeep);
  5744. }
  5745. }
  5746. // Check for circular references and return its corresponding clone.
  5747. stack || (stack = new Stack);
  5748. var stacked = stack.get(value);
  5749. if (stacked) {
  5750. return stacked;
  5751. }
  5752. stack.set(value, result);
  5753. var keysFunc = isFull
  5754. ? (isFlat ? getAllKeysIn : getAllKeys)
  5755. : (isFlat ? keysIn : keys);
  5756. var props = isArr ? undefined : keysFunc(value);
  5757. arrayEach(props || value, function(subValue, key) {
  5758. if (props) {
  5759. key = subValue;
  5760. subValue = value[key];
  5761. }
  5762. // Recursively populate clone (susceptible to call stack limits).
  5763. assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
  5764. });
  5765. return result;
  5766. }
  5767. /**
  5768. * The base implementation of `_.conforms` which doesn't clone `source`.
  5769. *
  5770. * @private
  5771. * @param {Object} source The object of property predicates to conform to.
  5772. * @returns {Function} Returns the new spec function.
  5773. */
  5774. function baseConforms(source) {
  5775. var props = keys(source);
  5776. return function(object) {
  5777. return baseConformsTo(object, source, props);
  5778. };
  5779. }
  5780. /**
  5781. * The base implementation of `_.conformsTo` which accepts `props` to check.
  5782. *
  5783. * @private
  5784. * @param {Object} object The object to inspect.
  5785. * @param {Object} source The object of property predicates to conform to.
  5786. * @returns {boolean} Returns `true` if `object` conforms, else `false`.
  5787. */
  5788. function baseConformsTo(object, source, props) {
  5789. var length = props.length;
  5790. if (object == null) {
  5791. return !length;
  5792. }
  5793. object = Object(object);
  5794. while (length--) {
  5795. var key = props[length],
  5796. predicate = source[key],
  5797. value = object[key];
  5798. if ((value === undefined && !(key in object)) || !predicate(value)) {
  5799. return false;
  5800. }
  5801. }
  5802. return true;
  5803. }
  5804. /**
  5805. * The base implementation of `_.delay` and `_.defer` which accepts `args`
  5806. * to provide to `func`.
  5807. *
  5808. * @private
  5809. * @param {Function} func The function to delay.
  5810. * @param {number} wait The number of milliseconds to delay invocation.
  5811. * @param {Array} args The arguments to provide to `func`.
  5812. * @returns {number|Object} Returns the timer id or timeout object.
  5813. */
  5814. function baseDelay(func, wait, args) {
  5815. if (typeof func != 'function') {
  5816. throw new TypeError(FUNC_ERROR_TEXT);
  5817. }
  5818. return setTimeout(function() { func.apply(undefined, args); }, wait);
  5819. }
  5820. /**
  5821. * The base implementation of methods like `_.difference` without support
  5822. * for excluding multiple arrays or iteratee shorthands.
  5823. *
  5824. * @private
  5825. * @param {Array} array The array to inspect.
  5826. * @param {Array} values The values to exclude.
  5827. * @param {Function} [iteratee] The iteratee invoked per element.
  5828. * @param {Function} [comparator] The comparator invoked per element.
  5829. * @returns {Array} Returns the new array of filtered values.
  5830. */
  5831. function baseDifference(array, values, iteratee, comparator) {
  5832. var index = -1,
  5833. includes = arrayIncludes,
  5834. isCommon = true,
  5835. length = array.length,
  5836. result = [],
  5837. valuesLength = values.length;
  5838. if (!length) {
  5839. return result;
  5840. }
  5841. if (iteratee) {
  5842. values = arrayMap(values, baseUnary(iteratee));
  5843. }
  5844. if (comparator) {
  5845. includes = arrayIncludesWith;
  5846. isCommon = false;
  5847. }
  5848. else if (values.length >= LARGE_ARRAY_SIZE) {
  5849. includes = cacheHas;
  5850. isCommon = false;
  5851. values = new SetCache(values);
  5852. }
  5853. outer:
  5854. while (++index < length) {
  5855. var value = array[index],
  5856. computed = iteratee == null ? value : iteratee(value);
  5857. value = (comparator || value !== 0) ? value : 0;
  5858. if (isCommon && computed === computed) {
  5859. var valuesIndex = valuesLength;
  5860. while (valuesIndex--) {
  5861. if (values[valuesIndex] === computed) {
  5862. continue outer;
  5863. }
  5864. }
  5865. result.push(value);
  5866. }
  5867. else if (!includes(values, computed, comparator)) {
  5868. result.push(value);
  5869. }
  5870. }
  5871. return result;
  5872. }
  5873. /**
  5874. * The base implementation of `_.forEach` without support for iteratee shorthands.
  5875. *
  5876. * @private
  5877. * @param {Array|Object} collection The collection to iterate over.
  5878. * @param {Function} iteratee The function invoked per iteration.
  5879. * @returns {Array|Object} Returns `collection`.
  5880. */
  5881. var baseEach = createBaseEach(baseForOwn);
  5882. /**
  5883. * The base implementation of `_.forEachRight` without support for iteratee shorthands.
  5884. *
  5885. * @private
  5886. * @param {Array|Object} collection The collection to iterate over.
  5887. * @param {Function} iteratee The function invoked per iteration.
  5888. * @returns {Array|Object} Returns `collection`.
  5889. */
  5890. var baseEachRight = createBaseEach(baseForOwnRight, true);
  5891. /**
  5892. * The base implementation of `_.every` without support for iteratee shorthands.
  5893. *
  5894. * @private
  5895. * @param {Array|Object} collection The collection to iterate over.
  5896. * @param {Function} predicate The function invoked per iteration.
  5897. * @returns {boolean} Returns `true` if all elements pass the predicate check,
  5898. * else `false`
  5899. */
  5900. function baseEvery(collection, predicate) {
  5901. var result = true;
  5902. baseEach(collection, function(value, index, collection) {
  5903. result = !!predicate(value, index, collection);
  5904. return result;
  5905. });
  5906. return result;
  5907. }
  5908. /**
  5909. * The base implementation of methods like `_.max` and `_.min` which accepts a
  5910. * `comparator` to determine the extremum value.
  5911. *
  5912. * @private
  5913. * @param {Array} array The array to iterate over.
  5914. * @param {Function} iteratee The iteratee invoked per iteration.
  5915. * @param {Function} comparator The comparator used to compare values.
  5916. * @returns {*} Returns the extremum value.
  5917. */
  5918. function baseExtremum(array, iteratee, comparator) {
  5919. var index = -1,
  5920. length = array.length;
  5921. while (++index < length) {
  5922. var value = array[index],
  5923. current = iteratee(value);
  5924. if (current != null && (computed === undefined
  5925. ? (current === current && !isSymbol(current))
  5926. : comparator(current, computed)
  5927. )) {
  5928. var computed = current,
  5929. result = value;
  5930. }
  5931. }
  5932. return result;
  5933. }
  5934. /**
  5935. * The base implementation of `_.fill` without an iteratee call guard.
  5936. *
  5937. * @private
  5938. * @param {Array} array The array to fill.
  5939. * @param {*} value The value to fill `array` with.
  5940. * @param {number} [start=0] The start position.
  5941. * @param {number} [end=array.length] The end position.
  5942. * @returns {Array} Returns `array`.
  5943. */
  5944. function baseFill(array, value, start, end) {
  5945. var length = array.length;
  5946. start = toInteger(start);
  5947. if (start < 0) {
  5948. start = -start > length ? 0 : (length + start);
  5949. }
  5950. end = (end === undefined || end > length) ? length : toInteger(end);
  5951. if (end < 0) {
  5952. end += length;
  5953. }
  5954. end = start > end ? 0 : toLength(end);
  5955. while (start < end) {
  5956. array[start++] = value;
  5957. }
  5958. return array;
  5959. }
  5960. /**
  5961. * The base implementation of `_.filter` without support for iteratee shorthands.
  5962. *
  5963. * @private
  5964. * @param {Array|Object} collection The collection to iterate over.
  5965. * @param {Function} predicate The function invoked per iteration.
  5966. * @returns {Array} Returns the new filtered array.
  5967. */
  5968. function baseFilter(collection, predicate) {
  5969. var result = [];
  5970. baseEach(collection, function(value, index, collection) {
  5971. if (predicate(value, index, collection)) {
  5972. result.push(value);
  5973. }
  5974. });
  5975. return result;
  5976. }
  5977. /**
  5978. * The base implementation of `_.flatten` with support for restricting flattening.
  5979. *
  5980. * @private
  5981. * @param {Array} array The array to flatten.
  5982. * @param {number} depth The maximum recursion depth.
  5983. * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
  5984. * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
  5985. * @param {Array} [result=[]] The initial result value.
  5986. * @returns {Array} Returns the new flattened array.
  5987. */
  5988. function baseFlatten(array, depth, predicate, isStrict, result) {
  5989. var index = -1,
  5990. length = array.length;
  5991. predicate || (predicate = isFlattenable);
  5992. result || (result = []);
  5993. while (++index < length) {
  5994. var value = array[index];
  5995. if (depth > 0 && predicate(value)) {
  5996. if (depth > 1) {
  5997. // Recursively flatten arrays (susceptible to call stack limits).
  5998. baseFlatten(value, depth - 1, predicate, isStrict, result);
  5999. } else {
  6000. arrayPush(result, value);
  6001. }
  6002. } else if (!isStrict) {
  6003. result[result.length] = value;
  6004. }
  6005. }
  6006. return result;
  6007. }
  6008. /**
  6009. * The base implementation of `baseForOwn` which iterates over `object`
  6010. * properties returned by `keysFunc` and invokes `iteratee` for each property.
  6011. * Iteratee functions may exit iteration early by explicitly returning `false`.
  6012. *
  6013. * @private
  6014. * @param {Object} object The object to iterate over.
  6015. * @param {Function} iteratee The function invoked per iteration.
  6016. * @param {Function} keysFunc The function to get the keys of `object`.
  6017. * @returns {Object} Returns `object`.
  6018. */
  6019. var baseFor = createBaseFor();
  6020. /**
  6021. * This function is like `baseFor` except that it iterates over properties
  6022. * in the opposite order.
  6023. *
  6024. * @private
  6025. * @param {Object} object The object to iterate over.
  6026. * @param {Function} iteratee The function invoked per iteration.
  6027. * @param {Function} keysFunc The function to get the keys of `object`.
  6028. * @returns {Object} Returns `object`.
  6029. */
  6030. var baseForRight = createBaseFor(true);
  6031. /**
  6032. * The base implementation of `_.forOwn` without support for iteratee shorthands.
  6033. *
  6034. * @private
  6035. * @param {Object} object The object to iterate over.
  6036. * @param {Function} iteratee The function invoked per iteration.
  6037. * @returns {Object} Returns `object`.
  6038. */
  6039. function baseForOwn(object, iteratee) {
  6040. return object && baseFor(object, iteratee, keys);
  6041. }
  6042. /**
  6043. * The base implementation of `_.forOwnRight` without support for iteratee shorthands.
  6044. *
  6045. * @private
  6046. * @param {Object} object The object to iterate over.
  6047. * @param {Function} iteratee The function invoked per iteration.
  6048. * @returns {Object} Returns `object`.
  6049. */
  6050. function baseForOwnRight(object, iteratee) {
  6051. return object && baseForRight(object, iteratee, keys);
  6052. }
  6053. /**
  6054. * The base implementation of `_.functions` which creates an array of
  6055. * `object` function property names filtered from `props`.
  6056. *
  6057. * @private
  6058. * @param {Object} object The object to inspect.
  6059. * @param {Array} props The property names to filter.
  6060. * @returns {Array} Returns the function names.
  6061. */
  6062. function baseFunctions(object, props) {
  6063. return arrayFilter(props, function(key) {
  6064. return isFunction(object[key]);
  6065. });
  6066. }
  6067. /**
  6068. * The base implementation of `_.get` without support for default values.
  6069. *
  6070. * @private
  6071. * @param {Object} object The object to query.
  6072. * @param {Array|string} path The path of the property to get.
  6073. * @returns {*} Returns the resolved value.
  6074. */
  6075. function baseGet(object, path) {
  6076. path = castPath(path, object);
  6077. var index = 0,
  6078. length = path.length;
  6079. while (object != null && index < length) {
  6080. object = object[toKey(path[index++])];
  6081. }
  6082. return (index && index == length) ? object : undefined;
  6083. }
  6084. /**
  6085. * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
  6086. * `keysFunc` and `symbolsFunc` to get the enumerable property names and
  6087. * symbols of `object`.
  6088. *
  6089. * @private
  6090. * @param {Object} object The object to query.
  6091. * @param {Function} keysFunc The function to get the keys of `object`.
  6092. * @param {Function} symbolsFunc The function to get the symbols of `object`.
  6093. * @returns {Array} Returns the array of property names and symbols.
  6094. */
  6095. function baseGetAllKeys(object, keysFunc, symbolsFunc) {
  6096. var result = keysFunc(object);
  6097. return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
  6098. }
  6099. /**
  6100. * The base implementation of `getTag` without fallbacks for buggy environments.
  6101. *
  6102. * @private
  6103. * @param {*} value The value to query.
  6104. * @returns {string} Returns the `toStringTag`.
  6105. */
  6106. function baseGetTag(value) {
  6107. if (value == null) {
  6108. return value === undefined ? undefinedTag : nullTag;
  6109. }
  6110. return (symToStringTag && symToStringTag in Object(value))
  6111. ? getRawTag(value)
  6112. : objectToString(value);
  6113. }
  6114. /**
  6115. * The base implementation of `_.gt` which doesn't coerce arguments.
  6116. *
  6117. * @private
  6118. * @param {*} value The value to compare.
  6119. * @param {*} other The other value to compare.
  6120. * @returns {boolean} Returns `true` if `value` is greater than `other`,
  6121. * else `false`.
  6122. */
  6123. function baseGt(value, other) {
  6124. return value > other;
  6125. }
  6126. /**
  6127. * The base implementation of `_.has` without support for deep paths.
  6128. *
  6129. * @private
  6130. * @param {Object} [object] The object to query.
  6131. * @param {Array|string} key The key to check.
  6132. * @returns {boolean} Returns `true` if `key` exists, else `false`.
  6133. */
  6134. function baseHas(object, key) {
  6135. return object != null && hasOwnProperty.call(object, key);
  6136. }
  6137. /**
  6138. * The base implementation of `_.hasIn` without support for deep paths.
  6139. *
  6140. * @private
  6141. * @param {Object} [object] The object to query.
  6142. * @param {Array|string} key The key to check.
  6143. * @returns {boolean} Returns `true` if `key` exists, else `false`.
  6144. */
  6145. function baseHasIn(object, key) {
  6146. return object != null && key in Object(object);
  6147. }
  6148. /**
  6149. * The base implementation of `_.inRange` which doesn't coerce arguments.
  6150. *
  6151. * @private
  6152. * @param {number} number The number to check.
  6153. * @param {number} start The start of the range.
  6154. * @param {number} end The end of the range.
  6155. * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
  6156. */
  6157. function baseInRange(number, start, end) {
  6158. return number >= nativeMin(start, end) && number < nativeMax(start, end);
  6159. }
  6160. /**
  6161. * The base implementation of methods like `_.intersection`, without support
  6162. * for iteratee shorthands, that accepts an array of arrays to inspect.
  6163. *
  6164. * @private
  6165. * @param {Array} arrays The arrays to inspect.
  6166. * @param {Function} [iteratee] The iteratee invoked per element.
  6167. * @param {Function} [comparator] The comparator invoked per element.
  6168. * @returns {Array} Returns the new array of shared values.
  6169. */
  6170. function baseIntersection(arrays, iteratee, comparator) {
  6171. var includes = comparator ? arrayIncludesWith : arrayIncludes,
  6172. length = arrays[0].length,
  6173. othLength = arrays.length,
  6174. othIndex = othLength,
  6175. caches = Array(othLength),
  6176. maxLength = Infinity,
  6177. result = [];
  6178. while (othIndex--) {
  6179. var array = arrays[othIndex];
  6180. if (othIndex && iteratee) {
  6181. array = arrayMap(array, baseUnary(iteratee));
  6182. }
  6183. maxLength = nativeMin(array.length, maxLength);
  6184. caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))
  6185. ? new SetCache(othIndex && array)
  6186. : undefined;
  6187. }
  6188. array = arrays[0];
  6189. var index = -1,
  6190. seen = caches[0];
  6191. outer:
  6192. while (++index < length && result.length < maxLength) {
  6193. var value = array[index],
  6194. computed = iteratee ? iteratee(value) : value;
  6195. value = (comparator || value !== 0) ? value : 0;
  6196. if (!(seen
  6197. ? cacheHas(seen, computed)
  6198. : includes(result, computed, comparator)
  6199. )) {
  6200. othIndex = othLength;
  6201. while (--othIndex) {
  6202. var cache = caches[othIndex];
  6203. if (!(cache
  6204. ? cacheHas(cache, computed)
  6205. : includes(arrays[othIndex], computed, comparator))
  6206. ) {
  6207. continue outer;
  6208. }
  6209. }
  6210. if (seen) {
  6211. seen.push(computed);
  6212. }
  6213. result.push(value);
  6214. }
  6215. }
  6216. return result;
  6217. }
  6218. /**
  6219. * The base implementation of `_.invert` and `_.invertBy` which inverts
  6220. * `object` with values transformed by `iteratee` and set by `setter`.
  6221. *
  6222. * @private
  6223. * @param {Object} object The object to iterate over.
  6224. * @param {Function} setter The function to set `accumulator` values.
  6225. * @param {Function} iteratee The iteratee to transform values.
  6226. * @param {Object} accumulator The initial inverted object.
  6227. * @returns {Function} Returns `accumulator`.
  6228. */
  6229. function baseInverter(object, setter, iteratee, accumulator) {
  6230. baseForOwn(object, function(value, key, object) {
  6231. setter(accumulator, iteratee(value), key, object);
  6232. });
  6233. return accumulator;
  6234. }
  6235. /**
  6236. * The base implementation of `_.invoke` without support for individual
  6237. * method arguments.
  6238. *
  6239. * @private
  6240. * @param {Object} object The object to query.
  6241. * @param {Array|string} path The path of the method to invoke.
  6242. * @param {Array} args The arguments to invoke the method with.
  6243. * @returns {*} Returns the result of the invoked method.
  6244. */
  6245. function baseInvoke(object, path, args) {
  6246. path = castPath(path, object);
  6247. object = parent(object, path);
  6248. var func = object == null ? object : object[toKey(last(path))];
  6249. return func == null ? undefined : apply(func, object, args);
  6250. }
  6251. /**
  6252. * The base implementation of `_.isArguments`.
  6253. *
  6254. * @private
  6255. * @param {*} value The value to check.
  6256. * @returns {boolean} Returns `true` if `value` is an `arguments` object,
  6257. */
  6258. function baseIsArguments(value) {
  6259. return isObjectLike(value) && baseGetTag(value) == argsTag;
  6260. }
  6261. /**
  6262. * The base implementation of `_.isArrayBuffer` without Node.js optimizations.
  6263. *
  6264. * @private
  6265. * @param {*} value The value to check.
  6266. * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
  6267. */
  6268. function baseIsArrayBuffer(value) {
  6269. return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;
  6270. }
  6271. /**
  6272. * The base implementation of `_.isDate` without Node.js optimizations.
  6273. *
  6274. * @private
  6275. * @param {*} value The value to check.
  6276. * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
  6277. */
  6278. function baseIsDate(value) {
  6279. return isObjectLike(value) && baseGetTag(value) == dateTag;
  6280. }
  6281. /**
  6282. * The base implementation of `_.isEqual` which supports partial comparisons
  6283. * and tracks traversed objects.
  6284. *
  6285. * @private
  6286. * @param {*} value The value to compare.
  6287. * @param {*} other The other value to compare.
  6288. * @param {boolean} bitmask The bitmask flags.
  6289. * 1 - Unordered comparison
  6290. * 2 - Partial comparison
  6291. * @param {Function} [customizer] The function to customize comparisons.
  6292. * @param {Object} [stack] Tracks traversed `value` and `other` objects.
  6293. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  6294. */
  6295. function baseIsEqual(value, other, bitmask, customizer, stack) {
  6296. if (value === other) {
  6297. return true;
  6298. }
  6299. if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
  6300. return value !== value && other !== other;
  6301. }
  6302. return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
  6303. }
  6304. /**
  6305. * A specialized version of `baseIsEqual` for arrays and objects which performs
  6306. * deep comparisons and tracks traversed objects enabling objects with circular
  6307. * references to be compared.
  6308. *
  6309. * @private
  6310. * @param {Object} object The object to compare.
  6311. * @param {Object} other The other object to compare.
  6312. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  6313. * @param {Function} customizer The function to customize comparisons.
  6314. * @param {Function} equalFunc The function to determine equivalents of values.
  6315. * @param {Object} [stack] Tracks traversed `object` and `other` objects.
  6316. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  6317. */
  6318. function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
  6319. var objIsArr = isArray(object),
  6320. othIsArr = isArray(other),
  6321. objTag = objIsArr ? arrayTag : getTag(object),
  6322. othTag = othIsArr ? arrayTag : getTag(other);
  6323. objTag = objTag == argsTag ? objectTag : objTag;
  6324. othTag = othTag == argsTag ? objectTag : othTag;
  6325. var objIsObj = objTag == objectTag,
  6326. othIsObj = othTag == objectTag,
  6327. isSameTag = objTag == othTag;
  6328. if (isSameTag && isBuffer(object)) {
  6329. if (!isBuffer(other)) {
  6330. return false;
  6331. }
  6332. objIsArr = true;
  6333. objIsObj = false;
  6334. }
  6335. if (isSameTag && !objIsObj) {
  6336. stack || (stack = new Stack);
  6337. return (objIsArr || isTypedArray(object))
  6338. ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
  6339. : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
  6340. }
  6341. if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
  6342. var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
  6343. othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
  6344. if (objIsWrapped || othIsWrapped) {
  6345. var objUnwrapped = objIsWrapped ? object.value() : object,
  6346. othUnwrapped = othIsWrapped ? other.value() : other;
  6347. stack || (stack = new Stack);
  6348. return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
  6349. }
  6350. }
  6351. if (!isSameTag) {
  6352. return false;
  6353. }
  6354. stack || (stack = new Stack);
  6355. return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
  6356. }
  6357. /**
  6358. * The base implementation of `_.isMap` without Node.js optimizations.
  6359. *
  6360. * @private
  6361. * @param {*} value The value to check.
  6362. * @returns {boolean} Returns `true` if `value` is a map, else `false`.
  6363. */
  6364. function baseIsMap(value) {
  6365. return isObjectLike(value) && getTag(value) == mapTag;
  6366. }
  6367. /**
  6368. * The base implementation of `_.isMatch` without support for iteratee shorthands.
  6369. *
  6370. * @private
  6371. * @param {Object} object The object to inspect.
  6372. * @param {Object} source The object of property values to match.
  6373. * @param {Array} matchData The property names, values, and compare flags to match.
  6374. * @param {Function} [customizer] The function to customize comparisons.
  6375. * @returns {boolean} Returns `true` if `object` is a match, else `false`.
  6376. */
  6377. function baseIsMatch(object, source, matchData, customizer) {
  6378. var index = matchData.length,
  6379. length = index,
  6380. noCustomizer = !customizer;
  6381. if (object == null) {
  6382. return !length;
  6383. }
  6384. object = Object(object);
  6385. while (index--) {
  6386. var data = matchData[index];
  6387. if ((noCustomizer && data[2])
  6388. ? data[1] !== object[data[0]]
  6389. : !(data[0] in object)
  6390. ) {
  6391. return false;
  6392. }
  6393. }
  6394. while (++index < length) {
  6395. data = matchData[index];
  6396. var key = data[0],
  6397. objValue = object[key],
  6398. srcValue = data[1];
  6399. if (noCustomizer && data[2]) {
  6400. if (objValue === undefined && !(key in object)) {
  6401. return false;
  6402. }
  6403. } else {
  6404. var stack = new Stack;
  6405. if (customizer) {
  6406. var result = customizer(objValue, srcValue, key, object, source, stack);
  6407. }
  6408. if (!(result === undefined
  6409. ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)
  6410. : result
  6411. )) {
  6412. return false;
  6413. }
  6414. }
  6415. }
  6416. return true;
  6417. }
  6418. /**
  6419. * The base implementation of `_.isNative` without bad shim checks.
  6420. *
  6421. * @private
  6422. * @param {*} value The value to check.
  6423. * @returns {boolean} Returns `true` if `value` is a native function,
  6424. * else `false`.
  6425. */
  6426. function baseIsNative(value) {
  6427. if (!isObject(value) || isMasked(value)) {
  6428. return false;
  6429. }
  6430. var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
  6431. return pattern.test(toSource(value));
  6432. }
  6433. /**
  6434. * The base implementation of `_.isRegExp` without Node.js optimizations.
  6435. *
  6436. * @private
  6437. * @param {*} value The value to check.
  6438. * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
  6439. */
  6440. function baseIsRegExp(value) {
  6441. return isObjectLike(value) && baseGetTag(value) == regexpTag;
  6442. }
  6443. /**
  6444. * The base implementation of `_.isSet` without Node.js optimizations.
  6445. *
  6446. * @private
  6447. * @param {*} value The value to check.
  6448. * @returns {boolean} Returns `true` if `value` is a set, else `false`.
  6449. */
  6450. function baseIsSet(value) {
  6451. return isObjectLike(value) && getTag(value) == setTag;
  6452. }
  6453. /**
  6454. * The base implementation of `_.isTypedArray` without Node.js optimizations.
  6455. *
  6456. * @private
  6457. * @param {*} value The value to check.
  6458. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
  6459. */
  6460. function baseIsTypedArray(value) {
  6461. return isObjectLike(value) &&
  6462. isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
  6463. }
  6464. /**
  6465. * The base implementation of `_.iteratee`.
  6466. *
  6467. * @private
  6468. * @param {*} [value=_.identity] The value to convert to an iteratee.
  6469. * @returns {Function} Returns the iteratee.
  6470. */
  6471. function baseIteratee(value) {
  6472. // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
  6473. // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
  6474. if (typeof value == 'function') {
  6475. return value;
  6476. }
  6477. if (value == null) {
  6478. return identity;
  6479. }
  6480. if (typeof value == 'object') {
  6481. return isArray(value)
  6482. ? baseMatchesProperty(value[0], value[1])
  6483. : baseMatches(value);
  6484. }
  6485. return property(value);
  6486. }
  6487. /**
  6488. * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
  6489. *
  6490. * @private
  6491. * @param {Object} object The object to query.
  6492. * @returns {Array} Returns the array of property names.
  6493. */
  6494. function baseKeys(object) {
  6495. if (!isPrototype(object)) {
  6496. return nativeKeys(object);
  6497. }
  6498. var result = [];
  6499. for (var key in Object(object)) {
  6500. if (hasOwnProperty.call(object, key) && key != 'constructor') {
  6501. result.push(key);
  6502. }
  6503. }
  6504. return result;
  6505. }
  6506. /**
  6507. * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
  6508. *
  6509. * @private
  6510. * @param {Object} object The object to query.
  6511. * @returns {Array} Returns the array of property names.
  6512. */
  6513. function baseKeysIn(object) {
  6514. if (!isObject(object)) {
  6515. return nativeKeysIn(object);
  6516. }
  6517. var isProto = isPrototype(object),
  6518. result = [];
  6519. for (var key in object) {
  6520. if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
  6521. result.push(key);
  6522. }
  6523. }
  6524. return result;
  6525. }
  6526. /**
  6527. * The base implementation of `_.lt` which doesn't coerce arguments.
  6528. *
  6529. * @private
  6530. * @param {*} value The value to compare.
  6531. * @param {*} other The other value to compare.
  6532. * @returns {boolean} Returns `true` if `value` is less than `other`,
  6533. * else `false`.
  6534. */
  6535. function baseLt(value, other) {
  6536. return value < other;
  6537. }
  6538. /**
  6539. * The base implementation of `_.map` without support for iteratee shorthands.
  6540. *
  6541. * @private
  6542. * @param {Array|Object} collection The collection to iterate over.
  6543. * @param {Function} iteratee The function invoked per iteration.
  6544. * @returns {Array} Returns the new mapped array.
  6545. */
  6546. function baseMap(collection, iteratee) {
  6547. var index = -1,
  6548. result = isArrayLike(collection) ? Array(collection.length) : [];
  6549. baseEach(collection, function(value, key, collection) {
  6550. result[++index] = iteratee(value, key, collection);
  6551. });
  6552. return result;
  6553. }
  6554. /**
  6555. * The base implementation of `_.matches` which doesn't clone `source`.
  6556. *
  6557. * @private
  6558. * @param {Object} source The object of property values to match.
  6559. * @returns {Function} Returns the new spec function.
  6560. */
  6561. function baseMatches(source) {
  6562. var matchData = getMatchData(source);
  6563. if (matchData.length == 1 && matchData[0][2]) {
  6564. return matchesStrictComparable(matchData[0][0], matchData[0][1]);
  6565. }
  6566. return function(object) {
  6567. return object === source || baseIsMatch(object, source, matchData);
  6568. };
  6569. }
  6570. /**
  6571. * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
  6572. *
  6573. * @private
  6574. * @param {string} path The path of the property to get.
  6575. * @param {*} srcValue The value to match.
  6576. * @returns {Function} Returns the new spec function.
  6577. */
  6578. function baseMatchesProperty(path, srcValue) {
  6579. if (isKey(path) && isStrictComparable(srcValue)) {
  6580. return matchesStrictComparable(toKey(path), srcValue);
  6581. }
  6582. return function(object) {
  6583. var objValue = get(object, path);
  6584. return (objValue === undefined && objValue === srcValue)
  6585. ? hasIn(object, path)
  6586. : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
  6587. };
  6588. }
  6589. /**
  6590. * The base implementation of `_.merge` without support for multiple sources.
  6591. *
  6592. * @private
  6593. * @param {Object} object The destination object.
  6594. * @param {Object} source The source object.
  6595. * @param {number} srcIndex The index of `source`.
  6596. * @param {Function} [customizer] The function to customize merged values.
  6597. * @param {Object} [stack] Tracks traversed source values and their merged
  6598. * counterparts.
  6599. */
  6600. function baseMerge(object, source, srcIndex, customizer, stack) {
  6601. if (object === source) {
  6602. return;
  6603. }
  6604. baseFor(source, function(srcValue, key) {
  6605. if (isObject(srcValue)) {
  6606. stack || (stack = new Stack);
  6607. baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
  6608. }
  6609. else {
  6610. var newValue = customizer
  6611. ? customizer(object[key], srcValue, (key + ''), object, source, stack)
  6612. : undefined;
  6613. if (newValue === undefined) {
  6614. newValue = srcValue;
  6615. }
  6616. assignMergeValue(object, key, newValue);
  6617. }
  6618. }, keysIn);
  6619. }
  6620. /**
  6621. * A specialized version of `baseMerge` for arrays and objects which performs
  6622. * deep merges and tracks traversed objects enabling objects with circular
  6623. * references to be merged.
  6624. *
  6625. * @private
  6626. * @param {Object} object The destination object.
  6627. * @param {Object} source The source object.
  6628. * @param {string} key The key of the value to merge.
  6629. * @param {number} srcIndex The index of `source`.
  6630. * @param {Function} mergeFunc The function to merge values.
  6631. * @param {Function} [customizer] The function to customize assigned values.
  6632. * @param {Object} [stack] Tracks traversed source values and their merged
  6633. * counterparts.
  6634. */
  6635. function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
  6636. var objValue = object[key],
  6637. srcValue = source[key],
  6638. stacked = stack.get(srcValue);
  6639. if (stacked) {
  6640. assignMergeValue(object, key, stacked);
  6641. return;
  6642. }
  6643. var newValue = customizer
  6644. ? customizer(objValue, srcValue, (key + ''), object, source, stack)
  6645. : undefined;
  6646. var isCommon = newValue === undefined;
  6647. if (isCommon) {
  6648. var isArr = isArray(srcValue),
  6649. isBuff = !isArr && isBuffer(srcValue),
  6650. isTyped = !isArr && !isBuff && isTypedArray(srcValue);
  6651. newValue = srcValue;
  6652. if (isArr || isBuff || isTyped) {
  6653. if (isArray(objValue)) {
  6654. newValue = objValue;
  6655. }
  6656. else if (isArrayLikeObject(objValue)) {
  6657. newValue = copyArray(objValue);
  6658. }
  6659. else if (isBuff) {
  6660. isCommon = false;
  6661. newValue = cloneBuffer(srcValue, true);
  6662. }
  6663. else if (isTyped) {
  6664. isCommon = false;
  6665. newValue = cloneTypedArray(srcValue, true);
  6666. }
  6667. else {
  6668. newValue = [];
  6669. }
  6670. }
  6671. else if (isPlainObject(srcValue) || isArguments(srcValue)) {
  6672. newValue = objValue;
  6673. if (isArguments(objValue)) {
  6674. newValue = toPlainObject(objValue);
  6675. }
  6676. else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) {
  6677. newValue = initCloneObject(srcValue);
  6678. }
  6679. }
  6680. else {
  6681. isCommon = false;
  6682. }
  6683. }
  6684. if (isCommon) {
  6685. // Recursively merge objects and arrays (susceptible to call stack limits).
  6686. stack.set(srcValue, newValue);
  6687. mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
  6688. stack['delete'](srcValue);
  6689. }
  6690. assignMergeValue(object, key, newValue);
  6691. }
  6692. /**
  6693. * The base implementation of `_.nth` which doesn't coerce arguments.
  6694. *
  6695. * @private
  6696. * @param {Array} array The array to query.
  6697. * @param {number} n The index of the element to return.
  6698. * @returns {*} Returns the nth element of `array`.
  6699. */
  6700. function baseNth(array, n) {
  6701. var length = array.length;
  6702. if (!length) {
  6703. return;
  6704. }
  6705. n += n < 0 ? length : 0;
  6706. return isIndex(n, length) ? array[n] : undefined;
  6707. }
  6708. /**
  6709. * The base implementation of `_.orderBy` without param guards.
  6710. *
  6711. * @private
  6712. * @param {Array|Object} collection The collection to iterate over.
  6713. * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
  6714. * @param {string[]} orders The sort orders of `iteratees`.
  6715. * @returns {Array} Returns the new sorted array.
  6716. */
  6717. function baseOrderBy(collection, iteratees, orders) {
  6718. var index = -1;
  6719. iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(getIteratee()));
  6720. var result = baseMap(collection, function(value, key, collection) {
  6721. var criteria = arrayMap(iteratees, function(iteratee) {
  6722. return iteratee(value);
  6723. });
  6724. return { 'criteria': criteria, 'index': ++index, 'value': value };
  6725. });
  6726. return baseSortBy(result, function(object, other) {
  6727. return compareMultiple(object, other, orders);
  6728. });
  6729. }
  6730. /**
  6731. * The base implementation of `_.pick` without support for individual
  6732. * property identifiers.
  6733. *
  6734. * @private
  6735. * @param {Object} object The source object.
  6736. * @param {string[]} paths The property paths to pick.
  6737. * @returns {Object} Returns the new object.
  6738. */
  6739. function basePick(object, paths) {
  6740. return basePickBy(object, paths, function(value, path) {
  6741. return hasIn(object, path);
  6742. });
  6743. }
  6744. /**
  6745. * The base implementation of `_.pickBy` without support for iteratee shorthands.
  6746. *
  6747. * @private
  6748. * @param {Object} object The source object.
  6749. * @param {string[]} paths The property paths to pick.
  6750. * @param {Function} predicate The function invoked per property.
  6751. * @returns {Object} Returns the new object.
  6752. */
  6753. function basePickBy(object, paths, predicate) {
  6754. var index = -1,
  6755. length = paths.length,
  6756. result = {};
  6757. while (++index < length) {
  6758. var path = paths[index],
  6759. value = baseGet(object, path);
  6760. if (predicate(value, path)) {
  6761. baseSet(result, castPath(path, object), value);
  6762. }
  6763. }
  6764. return result;
  6765. }
  6766. /**
  6767. * A specialized version of `baseProperty` which supports deep paths.
  6768. *
  6769. * @private
  6770. * @param {Array|string} path The path of the property to get.
  6771. * @returns {Function} Returns the new accessor function.
  6772. */
  6773. function basePropertyDeep(path) {
  6774. return function(object) {
  6775. return baseGet(object, path);
  6776. };
  6777. }
  6778. /**
  6779. * The base implementation of `_.pullAllBy` without support for iteratee
  6780. * shorthands.
  6781. *
  6782. * @private
  6783. * @param {Array} array The array to modify.
  6784. * @param {Array} values The values to remove.
  6785. * @param {Function} [iteratee] The iteratee invoked per element.
  6786. * @param {Function} [comparator] The comparator invoked per element.
  6787. * @returns {Array} Returns `array`.
  6788. */
  6789. function basePullAll(array, values, iteratee, comparator) {
  6790. var indexOf = comparator ? baseIndexOfWith : baseIndexOf,
  6791. index = -1,
  6792. length = values.length,
  6793. seen = array;
  6794. if (array === values) {
  6795. values = copyArray(values);
  6796. }
  6797. if (iteratee) {
  6798. seen = arrayMap(array, baseUnary(iteratee));
  6799. }
  6800. while (++index < length) {
  6801. var fromIndex = 0,
  6802. value = values[index],
  6803. computed = iteratee ? iteratee(value) : value;
  6804. while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {
  6805. if (seen !== array) {
  6806. splice.call(seen, fromIndex, 1);
  6807. }
  6808. splice.call(array, fromIndex, 1);
  6809. }
  6810. }
  6811. return array;
  6812. }
  6813. /**
  6814. * The base implementation of `_.pullAt` without support for individual
  6815. * indexes or capturing the removed elements.
  6816. *
  6817. * @private
  6818. * @param {Array} array The array to modify.
  6819. * @param {number[]} indexes The indexes of elements to remove.
  6820. * @returns {Array} Returns `array`.
  6821. */
  6822. function basePullAt(array, indexes) {
  6823. var length = array ? indexes.length : 0,
  6824. lastIndex = length - 1;
  6825. while (length--) {
  6826. var index = indexes[length];
  6827. if (length == lastIndex || index !== previous) {
  6828. var previous = index;
  6829. if (isIndex(index)) {
  6830. splice.call(array, index, 1);
  6831. } else {
  6832. baseUnset(array, index);
  6833. }
  6834. }
  6835. }
  6836. return array;
  6837. }
  6838. /**
  6839. * The base implementation of `_.random` without support for returning
  6840. * floating-point numbers.
  6841. *
  6842. * @private
  6843. * @param {number} lower The lower bound.
  6844. * @param {number} upper The upper bound.
  6845. * @returns {number} Returns the random number.
  6846. */
  6847. function baseRandom(lower, upper) {
  6848. return lower + nativeFloor(nativeRandom() * (upper - lower + 1));
  6849. }
  6850. /**
  6851. * The base implementation of `_.range` and `_.rangeRight` which doesn't
  6852. * coerce arguments.
  6853. *
  6854. * @private
  6855. * @param {number} start The start of the range.
  6856. * @param {number} end The end of the range.
  6857. * @param {number} step The value to increment or decrement by.
  6858. * @param {boolean} [fromRight] Specify iterating from right to left.
  6859. * @returns {Array} Returns the range of numbers.
  6860. */
  6861. function baseRange(start, end, step, fromRight) {
  6862. var index = -1,
  6863. length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),
  6864. result = Array(length);
  6865. while (length--) {
  6866. result[fromRight ? length : ++index] = start;
  6867. start += step;
  6868. }
  6869. return result;
  6870. }
  6871. /**
  6872. * The base implementation of `_.repeat` which doesn't coerce arguments.
  6873. *
  6874. * @private
  6875. * @param {string} string The string to repeat.
  6876. * @param {number} n The number of times to repeat the string.
  6877. * @returns {string} Returns the repeated string.
  6878. */
  6879. function baseRepeat(string, n) {
  6880. var result = '';
  6881. if (!string || n < 1 || n > MAX_SAFE_INTEGER) {
  6882. return result;
  6883. }
  6884. // Leverage the exponentiation by squaring algorithm for a faster repeat.
  6885. // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.
  6886. do {
  6887. if (n % 2) {
  6888. result += string;
  6889. }
  6890. n = nativeFloor(n / 2);
  6891. if (n) {
  6892. string += string;
  6893. }
  6894. } while (n);
  6895. return result;
  6896. }
  6897. /**
  6898. * The base implementation of `_.rest` which doesn't validate or coerce arguments.
  6899. *
  6900. * @private
  6901. * @param {Function} func The function to apply a rest parameter to.
  6902. * @param {number} [start=func.length-1] The start position of the rest parameter.
  6903. * @returns {Function} Returns the new function.
  6904. */
  6905. function baseRest(func, start) {
  6906. return setToString(overRest(func, start, identity), func + '');
  6907. }
  6908. /**
  6909. * The base implementation of `_.sample`.
  6910. *
  6911. * @private
  6912. * @param {Array|Object} collection The collection to sample.
  6913. * @returns {*} Returns the random element.
  6914. */
  6915. function baseSample(collection) {
  6916. return arraySample(values(collection));
  6917. }
  6918. /**
  6919. * The base implementation of `_.sampleSize` without param guards.
  6920. *
  6921. * @private
  6922. * @param {Array|Object} collection The collection to sample.
  6923. * @param {number} n The number of elements to sample.
  6924. * @returns {Array} Returns the random elements.
  6925. */
  6926. function baseSampleSize(collection, n) {
  6927. var array = values(collection);
  6928. return shuffleSelf(array, baseClamp(n, 0, array.length));
  6929. }
  6930. /**
  6931. * The base implementation of `_.set`.
  6932. *
  6933. * @private
  6934. * @param {Object} object The object to modify.
  6935. * @param {Array|string} path The path of the property to set.
  6936. * @param {*} value The value to set.
  6937. * @param {Function} [customizer] The function to customize path creation.
  6938. * @returns {Object} Returns `object`.
  6939. */
  6940. function baseSet(object, path, value, customizer) {
  6941. if (!isObject(object)) {
  6942. return object;
  6943. }
  6944. path = castPath(path, object);
  6945. var index = -1,
  6946. length = path.length,
  6947. lastIndex = length - 1,
  6948. nested = object;
  6949. while (nested != null && ++index < length) {
  6950. var key = toKey(path[index]),
  6951. newValue = value;
  6952. if (index != lastIndex) {
  6953. var objValue = nested[key];
  6954. newValue = customizer ? customizer(objValue, key, nested) : undefined;
  6955. if (newValue === undefined) {
  6956. newValue = isObject(objValue)
  6957. ? objValue
  6958. : (isIndex(path[index + 1]) ? [] : {});
  6959. }
  6960. }
  6961. assignValue(nested, key, newValue);
  6962. nested = nested[key];
  6963. }
  6964. return object;
  6965. }
  6966. /**
  6967. * The base implementation of `setData` without support for hot loop shorting.
  6968. *
  6969. * @private
  6970. * @param {Function} func The function to associate metadata with.
  6971. * @param {*} data The metadata.
  6972. * @returns {Function} Returns `func`.
  6973. */
  6974. var baseSetData = !metaMap ? identity : function(func, data) {
  6975. metaMap.set(func, data);
  6976. return func;
  6977. };
  6978. /**
  6979. * The base implementation of `setToString` without support for hot loop shorting.
  6980. *
  6981. * @private
  6982. * @param {Function} func The function to modify.
  6983. * @param {Function} string The `toString` result.
  6984. * @returns {Function} Returns `func`.
  6985. */
  6986. var baseSetToString = !defineProperty ? identity : function(func, string) {
  6987. return defineProperty(func, 'toString', {
  6988. 'configurable': true,
  6989. 'enumerable': false,
  6990. 'value': constant(string),
  6991. 'writable': true
  6992. });
  6993. };
  6994. /**
  6995. * The base implementation of `_.shuffle`.
  6996. *
  6997. * @private
  6998. * @param {Array|Object} collection The collection to shuffle.
  6999. * @returns {Array} Returns the new shuffled array.
  7000. */
  7001. function baseShuffle(collection) {
  7002. return shuffleSelf(values(collection));
  7003. }
  7004. /**
  7005. * The base implementation of `_.slice` without an iteratee call guard.
  7006. *
  7007. * @private
  7008. * @param {Array} array The array to slice.
  7009. * @param {number} [start=0] The start position.
  7010. * @param {number} [end=array.length] The end position.
  7011. * @returns {Array} Returns the slice of `array`.
  7012. */
  7013. function baseSlice(array, start, end) {
  7014. var index = -1,
  7015. length = array.length;
  7016. if (start < 0) {
  7017. start = -start > length ? 0 : (length + start);
  7018. }
  7019. end = end > length ? length : end;
  7020. if (end < 0) {
  7021. end += length;
  7022. }
  7023. length = start > end ? 0 : ((end - start) >>> 0);
  7024. start >>>= 0;
  7025. var result = Array(length);
  7026. while (++index < length) {
  7027. result[index] = array[index + start];
  7028. }
  7029. return result;
  7030. }
  7031. /**
  7032. * The base implementation of `_.some` without support for iteratee shorthands.
  7033. *
  7034. * @private
  7035. * @param {Array|Object} collection The collection to iterate over.
  7036. * @param {Function} predicate The function invoked per iteration.
  7037. * @returns {boolean} Returns `true` if any element passes the predicate check,
  7038. * else `false`.
  7039. */
  7040. function baseSome(collection, predicate) {
  7041. var result;
  7042. baseEach(collection, function(value, index, collection) {
  7043. result = predicate(value, index, collection);
  7044. return !result;
  7045. });
  7046. return !!result;
  7047. }
  7048. /**
  7049. * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which
  7050. * performs a binary search of `array` to determine the index at which `value`
  7051. * should be inserted into `array` in order to maintain its sort order.
  7052. *
  7053. * @private
  7054. * @param {Array} array The sorted array to inspect.
  7055. * @param {*} value The value to evaluate.
  7056. * @param {boolean} [retHighest] Specify returning the highest qualified index.
  7057. * @returns {number} Returns the index at which `value` should be inserted
  7058. * into `array`.
  7059. */
  7060. function baseSortedIndex(array, value, retHighest) {
  7061. var low = 0,
  7062. high = array == null ? low : array.length;
  7063. if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
  7064. while (low < high) {
  7065. var mid = (low + high) >>> 1,
  7066. computed = array[mid];
  7067. if (computed !== null && !isSymbol(computed) &&
  7068. (retHighest ? (computed <= value) : (computed < value))) {
  7069. low = mid + 1;
  7070. } else {
  7071. high = mid;
  7072. }
  7073. }
  7074. return high;
  7075. }
  7076. return baseSortedIndexBy(array, value, identity, retHighest);
  7077. }
  7078. /**
  7079. * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`
  7080. * which invokes `iteratee` for `value` and each element of `array` to compute
  7081. * their sort ranking. The iteratee is invoked with one argument; (value).
  7082. *
  7083. * @private
  7084. * @param {Array} array The sorted array to inspect.
  7085. * @param {*} value The value to evaluate.
  7086. * @param {Function} iteratee The iteratee invoked per element.
  7087. * @param {boolean} [retHighest] Specify returning the highest qualified index.
  7088. * @returns {number} Returns the index at which `value` should be inserted
  7089. * into `array`.
  7090. */
  7091. function baseSortedIndexBy(array, value, iteratee, retHighest) {
  7092. value = iteratee(value);
  7093. var low = 0,
  7094. high = array == null ? 0 : array.length,
  7095. valIsNaN = value !== value,
  7096. valIsNull = value === null,
  7097. valIsSymbol = isSymbol(value),
  7098. valIsUndefined = value === undefined;
  7099. while (low < high) {
  7100. var mid = nativeFloor((low + high) / 2),
  7101. computed = iteratee(array[mid]),
  7102. othIsDefined = computed !== undefined,
  7103. othIsNull = computed === null,
  7104. othIsReflexive = computed === computed,
  7105. othIsSymbol = isSymbol(computed);
  7106. if (valIsNaN) {
  7107. var setLow = retHighest || othIsReflexive;
  7108. } else if (valIsUndefined) {
  7109. setLow = othIsReflexive && (retHighest || othIsDefined);
  7110. } else if (valIsNull) {
  7111. setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);
  7112. } else if (valIsSymbol) {
  7113. setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);
  7114. } else if (othIsNull || othIsSymbol) {
  7115. setLow = false;
  7116. } else {
  7117. setLow = retHighest ? (computed <= value) : (computed < value);
  7118. }
  7119. if (setLow) {
  7120. low = mid + 1;
  7121. } else {
  7122. high = mid;
  7123. }
  7124. }
  7125. return nativeMin(high, MAX_ARRAY_INDEX);
  7126. }
  7127. /**
  7128. * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without
  7129. * support for iteratee shorthands.
  7130. *
  7131. * @private
  7132. * @param {Array} array The array to inspect.
  7133. * @param {Function} [iteratee] The iteratee invoked per element.
  7134. * @returns {Array} Returns the new duplicate free array.
  7135. */
  7136. function baseSortedUniq(array, iteratee) {
  7137. var index = -1,
  7138. length = array.length,
  7139. resIndex = 0,
  7140. result = [];
  7141. while (++index < length) {
  7142. var value = array[index],
  7143. computed = iteratee ? iteratee(value) : value;
  7144. if (!index || !eq(computed, seen)) {
  7145. var seen = computed;
  7146. result[resIndex++] = value === 0 ? 0 : value;
  7147. }
  7148. }
  7149. return result;
  7150. }
  7151. /**
  7152. * The base implementation of `_.toNumber` which doesn't ensure correct
  7153. * conversions of binary, hexadecimal, or octal string values.
  7154. *
  7155. * @private
  7156. * @param {*} value The value to process.
  7157. * @returns {number} Returns the number.
  7158. */
  7159. function baseToNumber(value) {
  7160. if (typeof value == 'number') {
  7161. return value;
  7162. }
  7163. if (isSymbol(value)) {
  7164. return NAN;
  7165. }
  7166. return +value;
  7167. }
  7168. /**
  7169. * The base implementation of `_.toString` which doesn't convert nullish
  7170. * values to empty strings.
  7171. *
  7172. * @private
  7173. * @param {*} value The value to process.
  7174. * @returns {string} Returns the string.
  7175. */
  7176. function baseToString(value) {
  7177. // Exit early for strings to avoid a performance hit in some environments.
  7178. if (typeof value == 'string') {
  7179. return value;
  7180. }
  7181. if (isArray(value)) {
  7182. // Recursively convert values (susceptible to call stack limits).
  7183. return arrayMap(value, baseToString) + '';
  7184. }
  7185. if (isSymbol(value)) {
  7186. return symbolToString ? symbolToString.call(value) : '';
  7187. }
  7188. var result = (value + '');
  7189. return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
  7190. }
  7191. /**
  7192. * The base implementation of `_.uniqBy` without support for iteratee shorthands.
  7193. *
  7194. * @private
  7195. * @param {Array} array The array to inspect.
  7196. * @param {Function} [iteratee] The iteratee invoked per element.
  7197. * @param {Function} [comparator] The comparator invoked per element.
  7198. * @returns {Array} Returns the new duplicate free array.
  7199. */
  7200. function baseUniq(array, iteratee, comparator) {
  7201. var index = -1,
  7202. includes = arrayIncludes,
  7203. length = array.length,
  7204. isCommon = true,
  7205. result = [],
  7206. seen = result;
  7207. if (comparator) {
  7208. isCommon = false;
  7209. includes = arrayIncludesWith;
  7210. }
  7211. else if (length >= LARGE_ARRAY_SIZE) {
  7212. var set = iteratee ? null : createSet(array);
  7213. if (set) {
  7214. return setToArray(set);
  7215. }
  7216. isCommon = false;
  7217. includes = cacheHas;
  7218. seen = new SetCache;
  7219. }
  7220. else {
  7221. seen = iteratee ? [] : result;
  7222. }
  7223. outer:
  7224. while (++index < length) {
  7225. var value = array[index],
  7226. computed = iteratee ? iteratee(value) : value;
  7227. value = (comparator || value !== 0) ? value : 0;
  7228. if (isCommon && computed === computed) {
  7229. var seenIndex = seen.length;
  7230. while (seenIndex--) {
  7231. if (seen[seenIndex] === computed) {
  7232. continue outer;
  7233. }
  7234. }
  7235. if (iteratee) {
  7236. seen.push(computed);
  7237. }
  7238. result.push(value);
  7239. }
  7240. else if (!includes(seen, computed, comparator)) {
  7241. if (seen !== result) {
  7242. seen.push(computed);
  7243. }
  7244. result.push(value);
  7245. }
  7246. }
  7247. return result;
  7248. }
  7249. /**
  7250. * The base implementation of `_.unset`.
  7251. *
  7252. * @private
  7253. * @param {Object} object The object to modify.
  7254. * @param {Array|string} path The property path to unset.
  7255. * @returns {boolean} Returns `true` if the property is deleted, else `false`.
  7256. */
  7257. function baseUnset(object, path) {
  7258. path = castPath(path, object);
  7259. object = parent(object, path);
  7260. return object == null || delete object[toKey(last(path))];
  7261. }
  7262. /**
  7263. * The base implementation of `_.update`.
  7264. *
  7265. * @private
  7266. * @param {Object} object The object to modify.
  7267. * @param {Array|string} path The path of the property to update.
  7268. * @param {Function} updater The function to produce the updated value.
  7269. * @param {Function} [customizer] The function to customize path creation.
  7270. * @returns {Object} Returns `object`.
  7271. */
  7272. function baseUpdate(object, path, updater, customizer) {
  7273. return baseSet(object, path, updater(baseGet(object, path)), customizer);
  7274. }
  7275. /**
  7276. * The base implementation of methods like `_.dropWhile` and `_.takeWhile`
  7277. * without support for iteratee shorthands.
  7278. *
  7279. * @private
  7280. * @param {Array} array The array to query.
  7281. * @param {Function} predicate The function invoked per iteration.
  7282. * @param {boolean} [isDrop] Specify dropping elements instead of taking them.
  7283. * @param {boolean} [fromRight] Specify iterating from right to left.
  7284. * @returns {Array} Returns the slice of `array`.
  7285. */
  7286. function baseWhile(array, predicate, isDrop, fromRight) {
  7287. var length = array.length,
  7288. index = fromRight ? length : -1;
  7289. while ((fromRight ? index-- : ++index < length) &&
  7290. predicate(array[index], index, array)) {}
  7291. return isDrop
  7292. ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))
  7293. : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));
  7294. }
  7295. /**
  7296. * The base implementation of `wrapperValue` which returns the result of
  7297. * performing a sequence of actions on the unwrapped `value`, where each
  7298. * successive action is supplied the return value of the previous.
  7299. *
  7300. * @private
  7301. * @param {*} value The unwrapped value.
  7302. * @param {Array} actions Actions to perform to resolve the unwrapped value.
  7303. * @returns {*} Returns the resolved value.
  7304. */
  7305. function baseWrapperValue(value, actions) {
  7306. var result = value;
  7307. if (result instanceof LazyWrapper) {
  7308. result = result.value();
  7309. }
  7310. return arrayReduce(actions, function(result, action) {
  7311. return action.func.apply(action.thisArg, arrayPush([result], action.args));
  7312. }, result);
  7313. }
  7314. /**
  7315. * The base implementation of methods like `_.xor`, without support for
  7316. * iteratee shorthands, that accepts an array of arrays to inspect.
  7317. *
  7318. * @private
  7319. * @param {Array} arrays The arrays to inspect.
  7320. * @param {Function} [iteratee] The iteratee invoked per element.
  7321. * @param {Function} [comparator] The comparator invoked per element.
  7322. * @returns {Array} Returns the new array of values.
  7323. */
  7324. function baseXor(arrays, iteratee, comparator) {
  7325. var length = arrays.length;
  7326. if (length < 2) {
  7327. return length ? baseUniq(arrays[0]) : [];
  7328. }
  7329. var index = -1,
  7330. result = Array(length);
  7331. while (++index < length) {
  7332. var array = arrays[index],
  7333. othIndex = -1;
  7334. while (++othIndex < length) {
  7335. if (othIndex != index) {
  7336. result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);
  7337. }
  7338. }
  7339. }
  7340. return baseUniq(baseFlatten(result, 1), iteratee, comparator);
  7341. }
  7342. /**
  7343. * This base implementation of `_.zipObject` which assigns values using `assignFunc`.
  7344. *
  7345. * @private
  7346. * @param {Array} props The property identifiers.
  7347. * @param {Array} values The property values.
  7348. * @param {Function} assignFunc The function to assign values.
  7349. * @returns {Object} Returns the new object.
  7350. */
  7351. function baseZipObject(props, values, assignFunc) {
  7352. var index = -1,
  7353. length = props.length,
  7354. valsLength = values.length,
  7355. result = {};
  7356. while (++index < length) {
  7357. var value = index < valsLength ? values[index] : undefined;
  7358. assignFunc(result, props[index], value);
  7359. }
  7360. return result;
  7361. }
  7362. /**
  7363. * Casts `value` to an empty array if it's not an array like object.
  7364. *
  7365. * @private
  7366. * @param {*} value The value to inspect.
  7367. * @returns {Array|Object} Returns the cast array-like object.
  7368. */
  7369. function castArrayLikeObject(value) {
  7370. return isArrayLikeObject(value) ? value : [];
  7371. }
  7372. /**
  7373. * Casts `value` to `identity` if it's not a function.
  7374. *
  7375. * @private
  7376. * @param {*} value The value to inspect.
  7377. * @returns {Function} Returns cast function.
  7378. */
  7379. function castFunction(value) {
  7380. return typeof value == 'function' ? value : identity;
  7381. }
  7382. /**
  7383. * Casts `value` to a path array if it's not one.
  7384. *
  7385. * @private
  7386. * @param {*} value The value to inspect.
  7387. * @param {Object} [object] The object to query keys on.
  7388. * @returns {Array} Returns the cast property path array.
  7389. */
  7390. function castPath(value, object) {
  7391. if (isArray(value)) {
  7392. return value;
  7393. }
  7394. return isKey(value, object) ? [value] : stringToPath(toString(value));
  7395. }
  7396. /**
  7397. * A `baseRest` alias which can be replaced with `identity` by module
  7398. * replacement plugins.
  7399. *
  7400. * @private
  7401. * @type {Function}
  7402. * @param {Function} func The function to apply a rest parameter to.
  7403. * @returns {Function} Returns the new function.
  7404. */
  7405. var castRest = baseRest;
  7406. /**
  7407. * Casts `array` to a slice if it's needed.
  7408. *
  7409. * @private
  7410. * @param {Array} array The array to inspect.
  7411. * @param {number} start The start position.
  7412. * @param {number} [end=array.length] The end position.
  7413. * @returns {Array} Returns the cast slice.
  7414. */
  7415. function castSlice(array, start, end) {
  7416. var length = array.length;
  7417. end = end === undefined ? length : end;
  7418. return (!start && end >= length) ? array : baseSlice(array, start, end);
  7419. }
  7420. /**
  7421. * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout).
  7422. *
  7423. * @private
  7424. * @param {number|Object} id The timer id or timeout object of the timer to clear.
  7425. */
  7426. var clearTimeout = ctxClearTimeout || function(id) {
  7427. return root.clearTimeout(id);
  7428. };
  7429. /**
  7430. * Creates a clone of `buffer`.
  7431. *
  7432. * @private
  7433. * @param {Buffer} buffer The buffer to clone.
  7434. * @param {boolean} [isDeep] Specify a deep clone.
  7435. * @returns {Buffer} Returns the cloned buffer.
  7436. */
  7437. function cloneBuffer(buffer, isDeep) {
  7438. if (isDeep) {
  7439. return buffer.slice();
  7440. }
  7441. var length = buffer.length,
  7442. result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
  7443. buffer.copy(result);
  7444. return result;
  7445. }
  7446. /**
  7447. * Creates a clone of `arrayBuffer`.
  7448. *
  7449. * @private
  7450. * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
  7451. * @returns {ArrayBuffer} Returns the cloned array buffer.
  7452. */
  7453. function cloneArrayBuffer(arrayBuffer) {
  7454. var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
  7455. new Uint8Array(result).set(new Uint8Array(arrayBuffer));
  7456. return result;
  7457. }
  7458. /**
  7459. * Creates a clone of `dataView`.
  7460. *
  7461. * @private
  7462. * @param {Object} dataView The data view to clone.
  7463. * @param {boolean} [isDeep] Specify a deep clone.
  7464. * @returns {Object} Returns the cloned data view.
  7465. */
  7466. function cloneDataView(dataView, isDeep) {
  7467. var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
  7468. return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
  7469. }
  7470. /**
  7471. * Creates a clone of `map`.
  7472. *
  7473. * @private
  7474. * @param {Object} map The map to clone.
  7475. * @param {Function} cloneFunc The function to clone values.
  7476. * @param {boolean} [isDeep] Specify a deep clone.
  7477. * @returns {Object} Returns the cloned map.
  7478. */
  7479. function cloneMap(map, isDeep, cloneFunc) {
  7480. var array = isDeep ? cloneFunc(mapToArray(map), CLONE_DEEP_FLAG) : mapToArray(map);
  7481. return arrayReduce(array, addMapEntry, new map.constructor);
  7482. }
  7483. /**
  7484. * Creates a clone of `regexp`.
  7485. *
  7486. * @private
  7487. * @param {Object} regexp The regexp to clone.
  7488. * @returns {Object} Returns the cloned regexp.
  7489. */
  7490. function cloneRegExp(regexp) {
  7491. var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
  7492. result.lastIndex = regexp.lastIndex;
  7493. return result;
  7494. }
  7495. /**
  7496. * Creates a clone of `set`.
  7497. *
  7498. * @private
  7499. * @param {Object} set The set to clone.
  7500. * @param {Function} cloneFunc The function to clone values.
  7501. * @param {boolean} [isDeep] Specify a deep clone.
  7502. * @returns {Object} Returns the cloned set.
  7503. */
  7504. function cloneSet(set, isDeep, cloneFunc) {
  7505. var array = isDeep ? cloneFunc(setToArray(set), CLONE_DEEP_FLAG) : setToArray(set);
  7506. return arrayReduce(array, addSetEntry, new set.constructor);
  7507. }
  7508. /**
  7509. * Creates a clone of the `symbol` object.
  7510. *
  7511. * @private
  7512. * @param {Object} symbol The symbol object to clone.
  7513. * @returns {Object} Returns the cloned symbol object.
  7514. */
  7515. function cloneSymbol(symbol) {
  7516. return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
  7517. }
  7518. /**
  7519. * Creates a clone of `typedArray`.
  7520. *
  7521. * @private
  7522. * @param {Object} typedArray The typed array to clone.
  7523. * @param {boolean} [isDeep] Specify a deep clone.
  7524. * @returns {Object} Returns the cloned typed array.
  7525. */
  7526. function cloneTypedArray(typedArray, isDeep) {
  7527. var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
  7528. return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
  7529. }
  7530. /**
  7531. * Compares values to sort them in ascending order.
  7532. *
  7533. * @private
  7534. * @param {*} value The value to compare.
  7535. * @param {*} other The other value to compare.
  7536. * @returns {number} Returns the sort order indicator for `value`.
  7537. */
  7538. function compareAscending(value, other) {
  7539. if (value !== other) {
  7540. var valIsDefined = value !== undefined,
  7541. valIsNull = value === null,
  7542. valIsReflexive = value === value,
  7543. valIsSymbol = isSymbol(value);
  7544. var othIsDefined = other !== undefined,
  7545. othIsNull = other === null,
  7546. othIsReflexive = other === other,
  7547. othIsSymbol = isSymbol(other);
  7548. if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||
  7549. (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||
  7550. (valIsNull && othIsDefined && othIsReflexive) ||
  7551. (!valIsDefined && othIsReflexive) ||
  7552. !valIsReflexive) {
  7553. return 1;
  7554. }
  7555. if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||
  7556. (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||
  7557. (othIsNull && valIsDefined && valIsReflexive) ||
  7558. (!othIsDefined && valIsReflexive) ||
  7559. !othIsReflexive) {
  7560. return -1;
  7561. }
  7562. }
  7563. return 0;
  7564. }
  7565. /**
  7566. * Used by `_.orderBy` to compare multiple properties of a value to another
  7567. * and stable sort them.
  7568. *
  7569. * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,
  7570. * specify an order of "desc" for descending or "asc" for ascending sort order
  7571. * of corresponding values.
  7572. *
  7573. * @private
  7574. * @param {Object} object The object to compare.
  7575. * @param {Object} other The other object to compare.
  7576. * @param {boolean[]|string[]} orders The order to sort by for each property.
  7577. * @returns {number} Returns the sort order indicator for `object`.
  7578. */
  7579. function compareMultiple(object, other, orders) {
  7580. var index = -1,
  7581. objCriteria = object.criteria,
  7582. othCriteria = other.criteria,
  7583. length = objCriteria.length,
  7584. ordersLength = orders.length;
  7585. while (++index < length) {
  7586. var result = compareAscending(objCriteria[index], othCriteria[index]);
  7587. if (result) {
  7588. if (index >= ordersLength) {
  7589. return result;
  7590. }
  7591. var order = orders[index];
  7592. return result * (order == 'desc' ? -1 : 1);
  7593. }
  7594. }
  7595. // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
  7596. // that causes it, under certain circumstances, to provide the same value for
  7597. // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247
  7598. // for more details.
  7599. //
  7600. // This also ensures a stable sort in V8 and other engines.
  7601. // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.
  7602. return object.index - other.index;
  7603. }
  7604. /**
  7605. * Creates an array that is the composition of partially applied arguments,
  7606. * placeholders, and provided arguments into a single array of arguments.
  7607. *
  7608. * @private
  7609. * @param {Array} args The provided arguments.
  7610. * @param {Array} partials The arguments to prepend to those provided.
  7611. * @param {Array} holders The `partials` placeholder indexes.
  7612. * @params {boolean} [isCurried] Specify composing for a curried function.
  7613. * @returns {Array} Returns the new array of composed arguments.
  7614. */
  7615. function composeArgs(args, partials, holders, isCurried) {
  7616. var argsIndex = -1,
  7617. argsLength = args.length,
  7618. holdersLength = holders.length,
  7619. leftIndex = -1,
  7620. leftLength = partials.length,
  7621. rangeLength = nativeMax(argsLength - holdersLength, 0),
  7622. result = Array(leftLength + rangeLength),
  7623. isUncurried = !isCurried;
  7624. while (++leftIndex < leftLength) {
  7625. result[leftIndex] = partials[leftIndex];
  7626. }
  7627. while (++argsIndex < holdersLength) {
  7628. if (isUncurried || argsIndex < argsLength) {
  7629. result[holders[argsIndex]] = args[argsIndex];
  7630. }
  7631. }
  7632. while (rangeLength--) {
  7633. result[leftIndex++] = args[argsIndex++];
  7634. }
  7635. return result;
  7636. }
  7637. /**
  7638. * This function is like `composeArgs` except that the arguments composition
  7639. * is tailored for `_.partialRight`.
  7640. *
  7641. * @private
  7642. * @param {Array} args The provided arguments.
  7643. * @param {Array} partials The arguments to append to those provided.
  7644. * @param {Array} holders The `partials` placeholder indexes.
  7645. * @params {boolean} [isCurried] Specify composing for a curried function.
  7646. * @returns {Array} Returns the new array of composed arguments.
  7647. */
  7648. function composeArgsRight(args, partials, holders, isCurried) {
  7649. var argsIndex = -1,
  7650. argsLength = args.length,
  7651. holdersIndex = -1,
  7652. holdersLength = holders.length,
  7653. rightIndex = -1,
  7654. rightLength = partials.length,
  7655. rangeLength = nativeMax(argsLength - holdersLength, 0),
  7656. result = Array(rangeLength + rightLength),
  7657. isUncurried = !isCurried;
  7658. while (++argsIndex < rangeLength) {
  7659. result[argsIndex] = args[argsIndex];
  7660. }
  7661. var offset = argsIndex;
  7662. while (++rightIndex < rightLength) {
  7663. result[offset + rightIndex] = partials[rightIndex];
  7664. }
  7665. while (++holdersIndex < holdersLength) {
  7666. if (isUncurried || argsIndex < argsLength) {
  7667. result[offset + holders[holdersIndex]] = args[argsIndex++];
  7668. }
  7669. }
  7670. return result;
  7671. }
  7672. /**
  7673. * Copies the values of `source` to `array`.
  7674. *
  7675. * @private
  7676. * @param {Array} source The array to copy values from.
  7677. * @param {Array} [array=[]] The array to copy values to.
  7678. * @returns {Array} Returns `array`.
  7679. */
  7680. function copyArray(source, array) {
  7681. var index = -1,
  7682. length = source.length;
  7683. array || (array = Array(length));
  7684. while (++index < length) {
  7685. array[index] = source[index];
  7686. }
  7687. return array;
  7688. }
  7689. /**
  7690. * Copies properties of `source` to `object`.
  7691. *
  7692. * @private
  7693. * @param {Object} source The object to copy properties from.
  7694. * @param {Array} props The property identifiers to copy.
  7695. * @param {Object} [object={}] The object to copy properties to.
  7696. * @param {Function} [customizer] The function to customize copied values.
  7697. * @returns {Object} Returns `object`.
  7698. */
  7699. function copyObject(source, props, object, customizer) {
  7700. var isNew = !object;
  7701. object || (object = {});
  7702. var index = -1,
  7703. length = props.length;
  7704. while (++index < length) {
  7705. var key = props[index];
  7706. var newValue = customizer
  7707. ? customizer(object[key], source[key], key, object, source)
  7708. : undefined;
  7709. if (newValue === undefined) {
  7710. newValue = source[key];
  7711. }
  7712. if (isNew) {
  7713. baseAssignValue(object, key, newValue);
  7714. } else {
  7715. assignValue(object, key, newValue);
  7716. }
  7717. }
  7718. return object;
  7719. }
  7720. /**
  7721. * Copies own symbols of `source` to `object`.
  7722. *
  7723. * @private
  7724. * @param {Object} source The object to copy symbols from.
  7725. * @param {Object} [object={}] The object to copy symbols to.
  7726. * @returns {Object} Returns `object`.
  7727. */
  7728. function copySymbols(source, object) {
  7729. return copyObject(source, getSymbols(source), object);
  7730. }
  7731. /**
  7732. * Copies own and inherited symbols of `source` to `object`.
  7733. *
  7734. * @private
  7735. * @param {Object} source The object to copy symbols from.
  7736. * @param {Object} [object={}] The object to copy symbols to.
  7737. * @returns {Object} Returns `object`.
  7738. */
  7739. function copySymbolsIn(source, object) {
  7740. return copyObject(source, getSymbolsIn(source), object);
  7741. }
  7742. /**
  7743. * Creates a function like `_.groupBy`.
  7744. *
  7745. * @private
  7746. * @param {Function} setter The function to set accumulator values.
  7747. * @param {Function} [initializer] The accumulator object initializer.
  7748. * @returns {Function} Returns the new aggregator function.
  7749. */
  7750. function createAggregator(setter, initializer) {
  7751. return function(collection, iteratee) {
  7752. var func = isArray(collection) ? arrayAggregator : baseAggregator,
  7753. accumulator = initializer ? initializer() : {};
  7754. return func(collection, setter, getIteratee(iteratee, 2), accumulator);
  7755. };
  7756. }
  7757. /**
  7758. * Creates a function like `_.assign`.
  7759. *
  7760. * @private
  7761. * @param {Function} assigner The function to assign values.
  7762. * @returns {Function} Returns the new assigner function.
  7763. */
  7764. function createAssigner(assigner) {
  7765. return baseRest(function(object, sources) {
  7766. var index = -1,
  7767. length = sources.length,
  7768. customizer = length > 1 ? sources[length - 1] : undefined,
  7769. guard = length > 2 ? sources[2] : undefined;
  7770. customizer = (assigner.length > 3 && typeof customizer == 'function')
  7771. ? (length--, customizer)
  7772. : undefined;
  7773. if (guard && isIterateeCall(sources[0], sources[1], guard)) {
  7774. customizer = length < 3 ? undefined : customizer;
  7775. length = 1;
  7776. }
  7777. object = Object(object);
  7778. while (++index < length) {
  7779. var source = sources[index];
  7780. if (source) {
  7781. assigner(object, source, index, customizer);
  7782. }
  7783. }
  7784. return object;
  7785. });
  7786. }
  7787. /**
  7788. * Creates a `baseEach` or `baseEachRight` function.
  7789. *
  7790. * @private
  7791. * @param {Function} eachFunc The function to iterate over a collection.
  7792. * @param {boolean} [fromRight] Specify iterating from right to left.
  7793. * @returns {Function} Returns the new base function.
  7794. */
  7795. function createBaseEach(eachFunc, fromRight) {
  7796. return function(collection, iteratee) {
  7797. if (collection == null) {
  7798. return collection;
  7799. }
  7800. if (!isArrayLike(collection)) {
  7801. return eachFunc(collection, iteratee);
  7802. }
  7803. var length = collection.length,
  7804. index = fromRight ? length : -1,
  7805. iterable = Object(collection);
  7806. while ((fromRight ? index-- : ++index < length)) {
  7807. if (iteratee(iterable[index], index, iterable) === false) {
  7808. break;
  7809. }
  7810. }
  7811. return collection;
  7812. };
  7813. }
  7814. /**
  7815. * Creates a base function for methods like `_.forIn` and `_.forOwn`.
  7816. *
  7817. * @private
  7818. * @param {boolean} [fromRight] Specify iterating from right to left.
  7819. * @returns {Function} Returns the new base function.
  7820. */
  7821. function createBaseFor(fromRight) {
  7822. return function(object, iteratee, keysFunc) {
  7823. var index = -1,
  7824. iterable = Object(object),
  7825. props = keysFunc(object),
  7826. length = props.length;
  7827. while (length--) {
  7828. var key = props[fromRight ? length : ++index];
  7829. if (iteratee(iterable[key], key, iterable) === false) {
  7830. break;
  7831. }
  7832. }
  7833. return object;
  7834. };
  7835. }
  7836. /**
  7837. * Creates a function that wraps `func` to invoke it with the optional `this`
  7838. * binding of `thisArg`.
  7839. *
  7840. * @private
  7841. * @param {Function} func The function to wrap.
  7842. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  7843. * @param {*} [thisArg] The `this` binding of `func`.
  7844. * @returns {Function} Returns the new wrapped function.
  7845. */
  7846. function createBind(func, bitmask, thisArg) {
  7847. var isBind = bitmask & WRAP_BIND_FLAG,
  7848. Ctor = createCtor(func);
  7849. function wrapper() {
  7850. var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
  7851. return fn.apply(isBind ? thisArg : this, arguments);
  7852. }
  7853. return wrapper;
  7854. }
  7855. /**
  7856. * Creates a function like `_.lowerFirst`.
  7857. *
  7858. * @private
  7859. * @param {string} methodName The name of the `String` case method to use.
  7860. * @returns {Function} Returns the new case function.
  7861. */
  7862. function createCaseFirst(methodName) {
  7863. return function(string) {
  7864. string = toString(string);
  7865. var strSymbols = hasUnicode(string)
  7866. ? stringToArray(string)
  7867. : undefined;
  7868. var chr = strSymbols
  7869. ? strSymbols[0]
  7870. : string.charAt(0);
  7871. var trailing = strSymbols
  7872. ? castSlice(strSymbols, 1).join('')
  7873. : string.slice(1);
  7874. return chr[methodName]() + trailing;
  7875. };
  7876. }
  7877. /**
  7878. * Creates a function like `_.camelCase`.
  7879. *
  7880. * @private
  7881. * @param {Function} callback The function to combine each word.
  7882. * @returns {Function} Returns the new compounder function.
  7883. */
  7884. function createCompounder(callback) {
  7885. return function(string) {
  7886. return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');
  7887. };
  7888. }
  7889. /**
  7890. * Creates a function that produces an instance of `Ctor` regardless of
  7891. * whether it was invoked as part of a `new` expression or by `call` or `apply`.
  7892. *
  7893. * @private
  7894. * @param {Function} Ctor The constructor to wrap.
  7895. * @returns {Function} Returns the new wrapped function.
  7896. */
  7897. function createCtor(Ctor) {
  7898. return function() {
  7899. // Use a `switch` statement to work with class constructors. See
  7900. // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist
  7901. // for more details.
  7902. var args = arguments;
  7903. switch (args.length) {
  7904. case 0: return new Ctor;
  7905. case 1: return new Ctor(args[0]);
  7906. case 2: return new Ctor(args[0], args[1]);
  7907. case 3: return new Ctor(args[0], args[1], args[2]);
  7908. case 4: return new Ctor(args[0], args[1], args[2], args[3]);
  7909. case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);
  7910. case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
  7911. case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
  7912. }
  7913. var thisBinding = baseCreate(Ctor.prototype),
  7914. result = Ctor.apply(thisBinding, args);
  7915. // Mimic the constructor's `return` behavior.
  7916. // See https://es5.github.io/#x13.2.2 for more details.
  7917. return isObject(result) ? result : thisBinding;
  7918. };
  7919. }
  7920. /**
  7921. * Creates a function that wraps `func` to enable currying.
  7922. *
  7923. * @private
  7924. * @param {Function} func The function to wrap.
  7925. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  7926. * @param {number} arity The arity of `func`.
  7927. * @returns {Function} Returns the new wrapped function.
  7928. */
  7929. function createCurry(func, bitmask, arity) {
  7930. var Ctor = createCtor(func);
  7931. function wrapper() {
  7932. var length = arguments.length,
  7933. args = Array(length),
  7934. index = length,
  7935. placeholder = getHolder(wrapper);
  7936. while (index--) {
  7937. args[index] = arguments[index];
  7938. }
  7939. var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)
  7940. ? []
  7941. : replaceHolders(args, placeholder);
  7942. length -= holders.length;
  7943. if (length < arity) {
  7944. return createRecurry(
  7945. func, bitmask, createHybrid, wrapper.placeholder, undefined,
  7946. args, holders, undefined, undefined, arity - length);
  7947. }
  7948. var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
  7949. return apply(fn, this, args);
  7950. }
  7951. return wrapper;
  7952. }
  7953. /**
  7954. * Creates a `_.find` or `_.findLast` function.
  7955. *
  7956. * @private
  7957. * @param {Function} findIndexFunc The function to find the collection index.
  7958. * @returns {Function} Returns the new find function.
  7959. */
  7960. function createFind(findIndexFunc) {
  7961. return function(collection, predicate, fromIndex) {
  7962. var iterable = Object(collection);
  7963. if (!isArrayLike(collection)) {
  7964. var iteratee = getIteratee(predicate, 3);
  7965. collection = keys(collection);
  7966. predicate = function(key) { return iteratee(iterable[key], key, iterable); };
  7967. }
  7968. var index = findIndexFunc(collection, predicate, fromIndex);
  7969. return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;
  7970. };
  7971. }
  7972. /**
  7973. * Creates a `_.flow` or `_.flowRight` function.
  7974. *
  7975. * @private
  7976. * @param {boolean} [fromRight] Specify iterating from right to left.
  7977. * @returns {Function} Returns the new flow function.
  7978. */
  7979. function createFlow(fromRight) {
  7980. return flatRest(function(funcs) {
  7981. var length = funcs.length,
  7982. index = length,
  7983. prereq = LodashWrapper.prototype.thru;
  7984. if (fromRight) {
  7985. funcs.reverse();
  7986. }
  7987. while (index--) {
  7988. var func = funcs[index];
  7989. if (typeof func != 'function') {
  7990. throw new TypeError(FUNC_ERROR_TEXT);
  7991. }
  7992. if (prereq && !wrapper && getFuncName(func) == 'wrapper') {
  7993. var wrapper = new LodashWrapper([], true);
  7994. }
  7995. }
  7996. index = wrapper ? index : length;
  7997. while (++index < length) {
  7998. func = funcs[index];
  7999. var funcName = getFuncName(func),
  8000. data = funcName == 'wrapper' ? getData(func) : undefined;
  8001. if (data && isLaziable(data[0]) &&
  8002. data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&
  8003. !data[4].length && data[9] == 1
  8004. ) {
  8005. wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
  8006. } else {
  8007. wrapper = (func.length == 1 && isLaziable(func))
  8008. ? wrapper[funcName]()
  8009. : wrapper.thru(func);
  8010. }
  8011. }
  8012. return function() {
  8013. var args = arguments,
  8014. value = args[0];
  8015. if (wrapper && args.length == 1 && isArray(value)) {
  8016. return wrapper.plant(value).value();
  8017. }
  8018. var index = 0,
  8019. result = length ? funcs[index].apply(this, args) : value;
  8020. while (++index < length) {
  8021. result = funcs[index].call(this, result);
  8022. }
  8023. return result;
  8024. };
  8025. });
  8026. }
  8027. /**
  8028. * Creates a function that wraps `func` to invoke it with optional `this`
  8029. * binding of `thisArg`, partial application, and currying.
  8030. *
  8031. * @private
  8032. * @param {Function|string} func The function or method name to wrap.
  8033. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  8034. * @param {*} [thisArg] The `this` binding of `func`.
  8035. * @param {Array} [partials] The arguments to prepend to those provided to
  8036. * the new function.
  8037. * @param {Array} [holders] The `partials` placeholder indexes.
  8038. * @param {Array} [partialsRight] The arguments to append to those provided
  8039. * to the new function.
  8040. * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.
  8041. * @param {Array} [argPos] The argument positions of the new function.
  8042. * @param {number} [ary] The arity cap of `func`.
  8043. * @param {number} [arity] The arity of `func`.
  8044. * @returns {Function} Returns the new wrapped function.
  8045. */
  8046. function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {
  8047. var isAry = bitmask & WRAP_ARY_FLAG,
  8048. isBind = bitmask & WRAP_BIND_FLAG,
  8049. isBindKey = bitmask & WRAP_BIND_KEY_FLAG,
  8050. isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),
  8051. isFlip = bitmask & WRAP_FLIP_FLAG,
  8052. Ctor = isBindKey ? undefined : createCtor(func);
  8053. function wrapper() {
  8054. var length = arguments.length,
  8055. args = Array(length),
  8056. index = length;
  8057. while (index--) {
  8058. args[index] = arguments[index];
  8059. }
  8060. if (isCurried) {
  8061. var placeholder = getHolder(wrapper),
  8062. holdersCount = countHolders(args, placeholder);
  8063. }
  8064. if (partials) {
  8065. args = composeArgs(args, partials, holders, isCurried);
  8066. }
  8067. if (partialsRight) {
  8068. args = composeArgsRight(args, partialsRight, holdersRight, isCurried);
  8069. }
  8070. length -= holdersCount;
  8071. if (isCurried && length < arity) {
  8072. var newHolders = replaceHolders(args, placeholder);
  8073. return createRecurry(
  8074. func, bitmask, createHybrid, wrapper.placeholder, thisArg,
  8075. args, newHolders, argPos, ary, arity - length
  8076. );
  8077. }
  8078. var thisBinding = isBind ? thisArg : this,
  8079. fn = isBindKey ? thisBinding[func] : func;
  8080. length = args.length;
  8081. if (argPos) {
  8082. args = reorder(args, argPos);
  8083. } else if (isFlip && length > 1) {
  8084. args.reverse();
  8085. }
  8086. if (isAry && ary < length) {
  8087. args.length = ary;
  8088. }
  8089. if (this && this !== root && this instanceof wrapper) {
  8090. fn = Ctor || createCtor(fn);
  8091. }
  8092. return fn.apply(thisBinding, args);
  8093. }
  8094. return wrapper;
  8095. }
  8096. /**
  8097. * Creates a function like `_.invertBy`.
  8098. *
  8099. * @private
  8100. * @param {Function} setter The function to set accumulator values.
  8101. * @param {Function} toIteratee The function to resolve iteratees.
  8102. * @returns {Function} Returns the new inverter function.
  8103. */
  8104. function createInverter(setter, toIteratee) {
  8105. return function(object, iteratee) {
  8106. return baseInverter(object, setter, toIteratee(iteratee), {});
  8107. };
  8108. }
  8109. /**
  8110. * Creates a function that performs a mathematical operation on two values.
  8111. *
  8112. * @private
  8113. * @param {Function} operator The function to perform the operation.
  8114. * @param {number} [defaultValue] The value used for `undefined` arguments.
  8115. * @returns {Function} Returns the new mathematical operation function.
  8116. */
  8117. function createMathOperation(operator, defaultValue) {
  8118. return function(value, other) {
  8119. var result;
  8120. if (value === undefined && other === undefined) {
  8121. return defaultValue;
  8122. }
  8123. if (value !== undefined) {
  8124. result = value;
  8125. }
  8126. if (other !== undefined) {
  8127. if (result === undefined) {
  8128. return other;
  8129. }
  8130. if (typeof value == 'string' || typeof other == 'string') {
  8131. value = baseToString(value);
  8132. other = baseToString(other);
  8133. } else {
  8134. value = baseToNumber(value);
  8135. other = baseToNumber(other);
  8136. }
  8137. result = operator(value, other);
  8138. }
  8139. return result;
  8140. };
  8141. }
  8142. /**
  8143. * Creates a function like `_.over`.
  8144. *
  8145. * @private
  8146. * @param {Function} arrayFunc The function to iterate over iteratees.
  8147. * @returns {Function} Returns the new over function.
  8148. */
  8149. function createOver(arrayFunc) {
  8150. return flatRest(function(iteratees) {
  8151. iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
  8152. return baseRest(function(args) {
  8153. var thisArg = this;
  8154. return arrayFunc(iteratees, function(iteratee) {
  8155. return apply(iteratee, thisArg, args);
  8156. });
  8157. });
  8158. });
  8159. }
  8160. /**
  8161. * Creates the padding for `string` based on `length`. The `chars` string
  8162. * is truncated if the number of characters exceeds `length`.
  8163. *
  8164. * @private
  8165. * @param {number} length The padding length.
  8166. * @param {string} [chars=' '] The string used as padding.
  8167. * @returns {string} Returns the padding for `string`.
  8168. */
  8169. function createPadding(length, chars) {
  8170. chars = chars === undefined ? ' ' : baseToString(chars);
  8171. var charsLength = chars.length;
  8172. if (charsLength < 2) {
  8173. return charsLength ? baseRepeat(chars, length) : chars;
  8174. }
  8175. var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));
  8176. return hasUnicode(chars)
  8177. ? castSlice(stringToArray(result), 0, length).join('')
  8178. : result.slice(0, length);
  8179. }
  8180. /**
  8181. * Creates a function that wraps `func` to invoke it with the `this` binding
  8182. * of `thisArg` and `partials` prepended to the arguments it receives.
  8183. *
  8184. * @private
  8185. * @param {Function} func The function to wrap.
  8186. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  8187. * @param {*} thisArg The `this` binding of `func`.
  8188. * @param {Array} partials The arguments to prepend to those provided to
  8189. * the new function.
  8190. * @returns {Function} Returns the new wrapped function.
  8191. */
  8192. function createPartial(func, bitmask, thisArg, partials) {
  8193. var isBind = bitmask & WRAP_BIND_FLAG,
  8194. Ctor = createCtor(func);
  8195. function wrapper() {
  8196. var argsIndex = -1,
  8197. argsLength = arguments.length,
  8198. leftIndex = -1,
  8199. leftLength = partials.length,
  8200. args = Array(leftLength + argsLength),
  8201. fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
  8202. while (++leftIndex < leftLength) {
  8203. args[leftIndex] = partials[leftIndex];
  8204. }
  8205. while (argsLength--) {
  8206. args[leftIndex++] = arguments[++argsIndex];
  8207. }
  8208. return apply(fn, isBind ? thisArg : this, args);
  8209. }
  8210. return wrapper;
  8211. }
  8212. /**
  8213. * Creates a `_.range` or `_.rangeRight` function.
  8214. *
  8215. * @private
  8216. * @param {boolean} [fromRight] Specify iterating from right to left.
  8217. * @returns {Function} Returns the new range function.
  8218. */
  8219. function createRange(fromRight) {
  8220. return function(start, end, step) {
  8221. if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {
  8222. end = step = undefined;
  8223. }
  8224. // Ensure the sign of `-0` is preserved.
  8225. start = toFinite(start);
  8226. if (end === undefined) {
  8227. end = start;
  8228. start = 0;
  8229. } else {
  8230. end = toFinite(end);
  8231. }
  8232. step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);
  8233. return baseRange(start, end, step, fromRight);
  8234. };
  8235. }
  8236. /**
  8237. * Creates a function that performs a relational operation on two values.
  8238. *
  8239. * @private
  8240. * @param {Function} operator The function to perform the operation.
  8241. * @returns {Function} Returns the new relational operation function.
  8242. */
  8243. function createRelationalOperation(operator) {
  8244. return function(value, other) {
  8245. if (!(typeof value == 'string' && typeof other == 'string')) {
  8246. value = toNumber(value);
  8247. other = toNumber(other);
  8248. }
  8249. return operator(value, other);
  8250. };
  8251. }
  8252. /**
  8253. * Creates a function that wraps `func` to continue currying.
  8254. *
  8255. * @private
  8256. * @param {Function} func The function to wrap.
  8257. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  8258. * @param {Function} wrapFunc The function to create the `func` wrapper.
  8259. * @param {*} placeholder The placeholder value.
  8260. * @param {*} [thisArg] The `this` binding of `func`.
  8261. * @param {Array} [partials] The arguments to prepend to those provided to
  8262. * the new function.
  8263. * @param {Array} [holders] The `partials` placeholder indexes.
  8264. * @param {Array} [argPos] The argument positions of the new function.
  8265. * @param {number} [ary] The arity cap of `func`.
  8266. * @param {number} [arity] The arity of `func`.
  8267. * @returns {Function} Returns the new wrapped function.
  8268. */
  8269. function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {
  8270. var isCurry = bitmask & WRAP_CURRY_FLAG,
  8271. newHolders = isCurry ? holders : undefined,
  8272. newHoldersRight = isCurry ? undefined : holders,
  8273. newPartials = isCurry ? partials : undefined,
  8274. newPartialsRight = isCurry ? undefined : partials;
  8275. bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);
  8276. bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);
  8277. if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {
  8278. bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);
  8279. }
  8280. var newData = [
  8281. func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,
  8282. newHoldersRight, argPos, ary, arity
  8283. ];
  8284. var result = wrapFunc.apply(undefined, newData);
  8285. if (isLaziable(func)) {
  8286. setData(result, newData);
  8287. }
  8288. result.placeholder = placeholder;
  8289. return setWrapToString(result, func, bitmask);
  8290. }
  8291. /**
  8292. * Creates a function like `_.round`.
  8293. *
  8294. * @private
  8295. * @param {string} methodName The name of the `Math` method to use when rounding.
  8296. * @returns {Function} Returns the new round function.
  8297. */
  8298. function createRound(methodName) {
  8299. var func = Math[methodName];
  8300. return function(number, precision) {
  8301. number = toNumber(number);
  8302. precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
  8303. if (precision) {
  8304. // Shift with exponential notation to avoid floating-point issues.
  8305. // See [MDN](https://mdn.io/round#Examples) for more details.
  8306. var pair = (toString(number) + 'e').split('e'),
  8307. value = func(pair[0] + 'e' + (+pair[1] + precision));
  8308. pair = (toString(value) + 'e').split('e');
  8309. return +(pair[0] + 'e' + (+pair[1] - precision));
  8310. }
  8311. return func(number);
  8312. };
  8313. }
  8314. /**
  8315. * Creates a set object of `values`.
  8316. *
  8317. * @private
  8318. * @param {Array} values The values to add to the set.
  8319. * @returns {Object} Returns the new set.
  8320. */
  8321. var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {
  8322. return new Set(values);
  8323. };
  8324. /**
  8325. * Creates a `_.toPairs` or `_.toPairsIn` function.
  8326. *
  8327. * @private
  8328. * @param {Function} keysFunc The function to get the keys of a given object.
  8329. * @returns {Function} Returns the new pairs function.
  8330. */
  8331. function createToPairs(keysFunc) {
  8332. return function(object) {
  8333. var tag = getTag(object);
  8334. if (tag == mapTag) {
  8335. return mapToArray(object);
  8336. }
  8337. if (tag == setTag) {
  8338. return setToPairs(object);
  8339. }
  8340. return baseToPairs(object, keysFunc(object));
  8341. };
  8342. }
  8343. /**
  8344. * Creates a function that either curries or invokes `func` with optional
  8345. * `this` binding and partially applied arguments.
  8346. *
  8347. * @private
  8348. * @param {Function|string} func The function or method name to wrap.
  8349. * @param {number} bitmask The bitmask flags.
  8350. * 1 - `_.bind`
  8351. * 2 - `_.bindKey`
  8352. * 4 - `_.curry` or `_.curryRight` of a bound function
  8353. * 8 - `_.curry`
  8354. * 16 - `_.curryRight`
  8355. * 32 - `_.partial`
  8356. * 64 - `_.partialRight`
  8357. * 128 - `_.rearg`
  8358. * 256 - `_.ary`
  8359. * 512 - `_.flip`
  8360. * @param {*} [thisArg] The `this` binding of `func`.
  8361. * @param {Array} [partials] The arguments to be partially applied.
  8362. * @param {Array} [holders] The `partials` placeholder indexes.
  8363. * @param {Array} [argPos] The argument positions of the new function.
  8364. * @param {number} [ary] The arity cap of `func`.
  8365. * @param {number} [arity] The arity of `func`.
  8366. * @returns {Function} Returns the new wrapped function.
  8367. */
  8368. function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {
  8369. var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;
  8370. if (!isBindKey && typeof func != 'function') {
  8371. throw new TypeError(FUNC_ERROR_TEXT);
  8372. }
  8373. var length = partials ? partials.length : 0;
  8374. if (!length) {
  8375. bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);
  8376. partials = holders = undefined;
  8377. }
  8378. ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);
  8379. arity = arity === undefined ? arity : toInteger(arity);
  8380. length -= holders ? holders.length : 0;
  8381. if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {
  8382. var partialsRight = partials,
  8383. holdersRight = holders;
  8384. partials = holders = undefined;
  8385. }
  8386. var data = isBindKey ? undefined : getData(func);
  8387. var newData = [
  8388. func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,
  8389. argPos, ary, arity
  8390. ];
  8391. if (data) {
  8392. mergeData(newData, data);
  8393. }
  8394. func = newData[0];
  8395. bitmask = newData[1];
  8396. thisArg = newData[2];
  8397. partials = newData[3];
  8398. holders = newData[4];
  8399. arity = newData[9] = newData[9] === undefined
  8400. ? (isBindKey ? 0 : func.length)
  8401. : nativeMax(newData[9] - length, 0);
  8402. if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {
  8403. bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);
  8404. }
  8405. if (!bitmask || bitmask == WRAP_BIND_FLAG) {
  8406. var result = createBind(func, bitmask, thisArg);
  8407. } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {
  8408. result = createCurry(func, bitmask, arity);
  8409. } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {
  8410. result = createPartial(func, bitmask, thisArg, partials);
  8411. } else {
  8412. result = createHybrid.apply(undefined, newData);
  8413. }
  8414. var setter = data ? baseSetData : setData;
  8415. return setWrapToString(setter(result, newData), func, bitmask);
  8416. }
  8417. /**
  8418. * Used by `_.defaults` to customize its `_.assignIn` use to assign properties
  8419. * of source objects to the destination object for all destination properties
  8420. * that resolve to `undefined`.
  8421. *
  8422. * @private
  8423. * @param {*} objValue The destination value.
  8424. * @param {*} srcValue The source value.
  8425. * @param {string} key The key of the property to assign.
  8426. * @param {Object} object The parent object of `objValue`.
  8427. * @returns {*} Returns the value to assign.
  8428. */
  8429. function customDefaultsAssignIn(objValue, srcValue, key, object) {
  8430. if (objValue === undefined ||
  8431. (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {
  8432. return srcValue;
  8433. }
  8434. return objValue;
  8435. }
  8436. /**
  8437. * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source
  8438. * objects into destination objects that are passed thru.
  8439. *
  8440. * @private
  8441. * @param {*} objValue The destination value.
  8442. * @param {*} srcValue The source value.
  8443. * @param {string} key The key of the property to merge.
  8444. * @param {Object} object The parent object of `objValue`.
  8445. * @param {Object} source The parent object of `srcValue`.
  8446. * @param {Object} [stack] Tracks traversed source values and their merged
  8447. * counterparts.
  8448. * @returns {*} Returns the value to assign.
  8449. */
  8450. function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {
  8451. if (isObject(objValue) && isObject(srcValue)) {
  8452. // Recursively merge objects and arrays (susceptible to call stack limits).
  8453. stack.set(srcValue, objValue);
  8454. baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);
  8455. stack['delete'](srcValue);
  8456. }
  8457. return objValue;
  8458. }
  8459. /**
  8460. * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain
  8461. * objects.
  8462. *
  8463. * @private
  8464. * @param {*} value The value to inspect.
  8465. * @param {string} key The key of the property to inspect.
  8466. * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.
  8467. */
  8468. function customOmitClone(value) {
  8469. return isPlainObject(value) ? undefined : value;
  8470. }
  8471. /**
  8472. * A specialized version of `baseIsEqualDeep` for arrays with support for
  8473. * partial deep comparisons.
  8474. *
  8475. * @private
  8476. * @param {Array} array The array to compare.
  8477. * @param {Array} other The other array to compare.
  8478. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  8479. * @param {Function} customizer The function to customize comparisons.
  8480. * @param {Function} equalFunc The function to determine equivalents of values.
  8481. * @param {Object} stack Tracks traversed `array` and `other` objects.
  8482. * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
  8483. */
  8484. function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
  8485. var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
  8486. arrLength = array.length,
  8487. othLength = other.length;
  8488. if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
  8489. return false;
  8490. }
  8491. // Assume cyclic values are equal.
  8492. var stacked = stack.get(array);
  8493. if (stacked && stack.get(other)) {
  8494. return stacked == other;
  8495. }
  8496. var index = -1,
  8497. result = true,
  8498. seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;
  8499. stack.set(array, other);
  8500. stack.set(other, array);
  8501. // Ignore non-index properties.
  8502. while (++index < arrLength) {
  8503. var arrValue = array[index],
  8504. othValue = other[index];
  8505. if (customizer) {
  8506. var compared = isPartial
  8507. ? customizer(othValue, arrValue, index, other, array, stack)
  8508. : customizer(arrValue, othValue, index, array, other, stack);
  8509. }
  8510. if (compared !== undefined) {
  8511. if (compared) {
  8512. continue;
  8513. }
  8514. result = false;
  8515. break;
  8516. }
  8517. // Recursively compare arrays (susceptible to call stack limits).
  8518. if (seen) {
  8519. if (!arraySome(other, function(othValue, othIndex) {
  8520. if (!cacheHas(seen, othIndex) &&
  8521. (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
  8522. return seen.push(othIndex);
  8523. }
  8524. })) {
  8525. result = false;
  8526. break;
  8527. }
  8528. } else if (!(
  8529. arrValue === othValue ||
  8530. equalFunc(arrValue, othValue, bitmask, customizer, stack)
  8531. )) {
  8532. result = false;
  8533. break;
  8534. }
  8535. }
  8536. stack['delete'](array);
  8537. stack['delete'](other);
  8538. return result;
  8539. }
  8540. /**
  8541. * A specialized version of `baseIsEqualDeep` for comparing objects of
  8542. * the same `toStringTag`.
  8543. *
  8544. * **Note:** This function only supports comparing values with tags of
  8545. * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
  8546. *
  8547. * @private
  8548. * @param {Object} object The object to compare.
  8549. * @param {Object} other The other object to compare.
  8550. * @param {string} tag The `toStringTag` of the objects to compare.
  8551. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  8552. * @param {Function} customizer The function to customize comparisons.
  8553. * @param {Function} equalFunc The function to determine equivalents of values.
  8554. * @param {Object} stack Tracks traversed `object` and `other` objects.
  8555. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  8556. */
  8557. function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
  8558. switch (tag) {
  8559. case dataViewTag:
  8560. if ((object.byteLength != other.byteLength) ||
  8561. (object.byteOffset != other.byteOffset)) {
  8562. return false;
  8563. }
  8564. object = object.buffer;
  8565. other = other.buffer;
  8566. case arrayBufferTag:
  8567. if ((object.byteLength != other.byteLength) ||
  8568. !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
  8569. return false;
  8570. }
  8571. return true;
  8572. case boolTag:
  8573. case dateTag:
  8574. case numberTag:
  8575. // Coerce booleans to `1` or `0` and dates to milliseconds.
  8576. // Invalid dates are coerced to `NaN`.
  8577. return eq(+object, +other);
  8578. case errorTag:
  8579. return object.name == other.name && object.message == other.message;
  8580. case regexpTag:
  8581. case stringTag:
  8582. // Coerce regexes to strings and treat strings, primitives and objects,
  8583. // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
  8584. // for more details.
  8585. return object == (other + '');
  8586. case mapTag:
  8587. var convert = mapToArray;
  8588. case setTag:
  8589. var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
  8590. convert || (convert = setToArray);
  8591. if (object.size != other.size && !isPartial) {
  8592. return false;
  8593. }
  8594. // Assume cyclic values are equal.
  8595. var stacked = stack.get(object);
  8596. if (stacked) {
  8597. return stacked == other;
  8598. }
  8599. bitmask |= COMPARE_UNORDERED_FLAG;
  8600. // Recursively compare objects (susceptible to call stack limits).
  8601. stack.set(object, other);
  8602. var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
  8603. stack['delete'](object);
  8604. return result;
  8605. case symbolTag:
  8606. if (symbolValueOf) {
  8607. return symbolValueOf.call(object) == symbolValueOf.call(other);
  8608. }
  8609. }
  8610. return false;
  8611. }
  8612. /**
  8613. * A specialized version of `baseIsEqualDeep` for objects with support for
  8614. * partial deep comparisons.
  8615. *
  8616. * @private
  8617. * @param {Object} object The object to compare.
  8618. * @param {Object} other The other object to compare.
  8619. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  8620. * @param {Function} customizer The function to customize comparisons.
  8621. * @param {Function} equalFunc The function to determine equivalents of values.
  8622. * @param {Object} stack Tracks traversed `object` and `other` objects.
  8623. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  8624. */
  8625. function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
  8626. var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
  8627. objProps = getAllKeys(object),
  8628. objLength = objProps.length,
  8629. othProps = getAllKeys(other),
  8630. othLength = othProps.length;
  8631. if (objLength != othLength && !isPartial) {
  8632. return false;
  8633. }
  8634. var index = objLength;
  8635. while (index--) {
  8636. var key = objProps[index];
  8637. if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
  8638. return false;
  8639. }
  8640. }
  8641. // Assume cyclic values are equal.
  8642. var stacked = stack.get(object);
  8643. if (stacked && stack.get(other)) {
  8644. return stacked == other;
  8645. }
  8646. var result = true;
  8647. stack.set(object, other);
  8648. stack.set(other, object);
  8649. var skipCtor = isPartial;
  8650. while (++index < objLength) {
  8651. key = objProps[index];
  8652. var objValue = object[key],
  8653. othValue = other[key];
  8654. if (customizer) {
  8655. var compared = isPartial
  8656. ? customizer(othValue, objValue, key, other, object, stack)
  8657. : customizer(objValue, othValue, key, object, other, stack);
  8658. }
  8659. // Recursively compare objects (susceptible to call stack limits).
  8660. if (!(compared === undefined
  8661. ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
  8662. : compared
  8663. )) {
  8664. result = false;
  8665. break;
  8666. }
  8667. skipCtor || (skipCtor = key == 'constructor');
  8668. }
  8669. if (result && !skipCtor) {
  8670. var objCtor = object.constructor,
  8671. othCtor = other.constructor;
  8672. // Non `Object` object instances with different constructors are not equal.
  8673. if (objCtor != othCtor &&
  8674. ('constructor' in object && 'constructor' in other) &&
  8675. !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
  8676. typeof othCtor == 'function' && othCtor instanceof othCtor)) {
  8677. result = false;
  8678. }
  8679. }
  8680. stack['delete'](object);
  8681. stack['delete'](other);
  8682. return result;
  8683. }
  8684. /**
  8685. * A specialized version of `baseRest` which flattens the rest array.
  8686. *
  8687. * @private
  8688. * @param {Function} func The function to apply a rest parameter to.
  8689. * @returns {Function} Returns the new function.
  8690. */
  8691. function flatRest(func) {
  8692. return setToString(overRest(func, undefined, flatten), func + '');
  8693. }
  8694. /**
  8695. * Creates an array of own enumerable property names and symbols of `object`.
  8696. *
  8697. * @private
  8698. * @param {Object} object The object to query.
  8699. * @returns {Array} Returns the array of property names and symbols.
  8700. */
  8701. function getAllKeys(object) {
  8702. return baseGetAllKeys(object, keys, getSymbols);
  8703. }
  8704. /**
  8705. * Creates an array of own and inherited enumerable property names and
  8706. * symbols of `object`.
  8707. *
  8708. * @private
  8709. * @param {Object} object The object to query.
  8710. * @returns {Array} Returns the array of property names and symbols.
  8711. */
  8712. function getAllKeysIn(object) {
  8713. return baseGetAllKeys(object, keysIn, getSymbolsIn);
  8714. }
  8715. /**
  8716. * Gets metadata for `func`.
  8717. *
  8718. * @private
  8719. * @param {Function} func The function to query.
  8720. * @returns {*} Returns the metadata for `func`.
  8721. */
  8722. var getData = !metaMap ? noop : function(func) {
  8723. return metaMap.get(func);
  8724. };
  8725. /**
  8726. * Gets the name of `func`.
  8727. *
  8728. * @private
  8729. * @param {Function} func The function to query.
  8730. * @returns {string} Returns the function name.
  8731. */
  8732. function getFuncName(func) {
  8733. var result = (func.name + ''),
  8734. array = realNames[result],
  8735. length = hasOwnProperty.call(realNames, result) ? array.length : 0;
  8736. while (length--) {
  8737. var data = array[length],
  8738. otherFunc = data.func;
  8739. if (otherFunc == null || otherFunc == func) {
  8740. return data.name;
  8741. }
  8742. }
  8743. return result;
  8744. }
  8745. /**
  8746. * Gets the argument placeholder value for `func`.
  8747. *
  8748. * @private
  8749. * @param {Function} func The function to inspect.
  8750. * @returns {*} Returns the placeholder value.
  8751. */
  8752. function getHolder(func) {
  8753. var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;
  8754. return object.placeholder;
  8755. }
  8756. /**
  8757. * Gets the appropriate "iteratee" function. If `_.iteratee` is customized,
  8758. * this function returns the custom method, otherwise it returns `baseIteratee`.
  8759. * If arguments are provided, the chosen function is invoked with them and
  8760. * its result is returned.
  8761. *
  8762. * @private
  8763. * @param {*} [value] The value to convert to an iteratee.
  8764. * @param {number} [arity] The arity of the created iteratee.
  8765. * @returns {Function} Returns the chosen function or its result.
  8766. */
  8767. function getIteratee() {
  8768. var result = lodash.iteratee || iteratee;
  8769. result = result === iteratee ? baseIteratee : result;
  8770. return arguments.length ? result(arguments[0], arguments[1]) : result;
  8771. }
  8772. /**
  8773. * Gets the data for `map`.
  8774. *
  8775. * @private
  8776. * @param {Object} map The map to query.
  8777. * @param {string} key The reference key.
  8778. * @returns {*} Returns the map data.
  8779. */
  8780. function getMapData(map, key) {
  8781. var data = map.__data__;
  8782. return isKeyable(key)
  8783. ? data[typeof key == 'string' ? 'string' : 'hash']
  8784. : data.map;
  8785. }
  8786. /**
  8787. * Gets the property names, values, and compare flags of `object`.
  8788. *
  8789. * @private
  8790. * @param {Object} object The object to query.
  8791. * @returns {Array} Returns the match data of `object`.
  8792. */
  8793. function getMatchData(object) {
  8794. var result = keys(object),
  8795. length = result.length;
  8796. while (length--) {
  8797. var key = result[length],
  8798. value = object[key];
  8799. result[length] = [key, value, isStrictComparable(value)];
  8800. }
  8801. return result;
  8802. }
  8803. /**
  8804. * Gets the native function at `key` of `object`.
  8805. *
  8806. * @private
  8807. * @param {Object} object The object to query.
  8808. * @param {string} key The key of the method to get.
  8809. * @returns {*} Returns the function if it's native, else `undefined`.
  8810. */
  8811. function getNative(object, key) {
  8812. var value = getValue(object, key);
  8813. return baseIsNative(value) ? value : undefined;
  8814. }
  8815. /**
  8816. * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
  8817. *
  8818. * @private
  8819. * @param {*} value The value to query.
  8820. * @returns {string} Returns the raw `toStringTag`.
  8821. */
  8822. function getRawTag(value) {
  8823. var isOwn = hasOwnProperty.call(value, symToStringTag),
  8824. tag = value[symToStringTag];
  8825. try {
  8826. value[symToStringTag] = undefined;
  8827. var unmasked = true;
  8828. } catch (e) {}
  8829. var result = nativeObjectToString.call(value);
  8830. if (unmasked) {
  8831. if (isOwn) {
  8832. value[symToStringTag] = tag;
  8833. } else {
  8834. delete value[symToStringTag];
  8835. }
  8836. }
  8837. return result;
  8838. }
  8839. /**
  8840. * Creates an array of the own enumerable symbols of `object`.
  8841. *
  8842. * @private
  8843. * @param {Object} object The object to query.
  8844. * @returns {Array} Returns the array of symbols.
  8845. */
  8846. var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
  8847. if (object == null) {
  8848. return [];
  8849. }
  8850. object = Object(object);
  8851. return arrayFilter(nativeGetSymbols(object), function(symbol) {
  8852. return propertyIsEnumerable.call(object, symbol);
  8853. });
  8854. };
  8855. /**
  8856. * Creates an array of the own and inherited enumerable symbols of `object`.
  8857. *
  8858. * @private
  8859. * @param {Object} object The object to query.
  8860. * @returns {Array} Returns the array of symbols.
  8861. */
  8862. var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
  8863. var result = [];
  8864. while (object) {
  8865. arrayPush(result, getSymbols(object));
  8866. object = getPrototype(object);
  8867. }
  8868. return result;
  8869. };
  8870. /**
  8871. * Gets the `toStringTag` of `value`.
  8872. *
  8873. * @private
  8874. * @param {*} value The value to query.
  8875. * @returns {string} Returns the `toStringTag`.
  8876. */
  8877. var getTag = baseGetTag;
  8878. // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
  8879. if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
  8880. (Map && getTag(new Map) != mapTag) ||
  8881. (Promise && getTag(Promise.resolve()) != promiseTag) ||
  8882. (Set && getTag(new Set) != setTag) ||
  8883. (WeakMap && getTag(new WeakMap) != weakMapTag)) {
  8884. getTag = function(value) {
  8885. var result = baseGetTag(value),
  8886. Ctor = result == objectTag ? value.constructor : undefined,
  8887. ctorString = Ctor ? toSource(Ctor) : '';
  8888. if (ctorString) {
  8889. switch (ctorString) {
  8890. case dataViewCtorString: return dataViewTag;
  8891. case mapCtorString: return mapTag;
  8892. case promiseCtorString: return promiseTag;
  8893. case setCtorString: return setTag;
  8894. case weakMapCtorString: return weakMapTag;
  8895. }
  8896. }
  8897. return result;
  8898. };
  8899. }
  8900. /**
  8901. * Gets the view, applying any `transforms` to the `start` and `end` positions.
  8902. *
  8903. * @private
  8904. * @param {number} start The start of the view.
  8905. * @param {number} end The end of the view.
  8906. * @param {Array} transforms The transformations to apply to the view.
  8907. * @returns {Object} Returns an object containing the `start` and `end`
  8908. * positions of the view.
  8909. */
  8910. function getView(start, end, transforms) {
  8911. var index = -1,
  8912. length = transforms.length;
  8913. while (++index < length) {
  8914. var data = transforms[index],
  8915. size = data.size;
  8916. switch (data.type) {
  8917. case 'drop': start += size; break;
  8918. case 'dropRight': end -= size; break;
  8919. case 'take': end = nativeMin(end, start + size); break;
  8920. case 'takeRight': start = nativeMax(start, end - size); break;
  8921. }
  8922. }
  8923. return { 'start': start, 'end': end };
  8924. }
  8925. /**
  8926. * Extracts wrapper details from the `source` body comment.
  8927. *
  8928. * @private
  8929. * @param {string} source The source to inspect.
  8930. * @returns {Array} Returns the wrapper details.
  8931. */
  8932. function getWrapDetails(source) {
  8933. var match = source.match(reWrapDetails);
  8934. return match ? match[1].split(reSplitDetails) : [];
  8935. }
  8936. /**
  8937. * Checks if `path` exists on `object`.
  8938. *
  8939. * @private
  8940. * @param {Object} object The object to query.
  8941. * @param {Array|string} path The path to check.
  8942. * @param {Function} hasFunc The function to check properties.
  8943. * @returns {boolean} Returns `true` if `path` exists, else `false`.
  8944. */
  8945. function hasPath(object, path, hasFunc) {
  8946. path = castPath(path, object);
  8947. var index = -1,
  8948. length = path.length,
  8949. result = false;
  8950. while (++index < length) {
  8951. var key = toKey(path[index]);
  8952. if (!(result = object != null && hasFunc(object, key))) {
  8953. break;
  8954. }
  8955. object = object[key];
  8956. }
  8957. if (result || ++index != length) {
  8958. return result;
  8959. }
  8960. length = object == null ? 0 : object.length;
  8961. return !!length && isLength(length) && isIndex(key, length) &&
  8962. (isArray(object) || isArguments(object));
  8963. }
  8964. /**
  8965. * Initializes an array clone.
  8966. *
  8967. * @private
  8968. * @param {Array} array The array to clone.
  8969. * @returns {Array} Returns the initialized clone.
  8970. */
  8971. function initCloneArray(array) {
  8972. var length = array.length,
  8973. result = array.constructor(length);
  8974. // Add properties assigned by `RegExp#exec`.
  8975. if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
  8976. result.index = array.index;
  8977. result.input = array.input;
  8978. }
  8979. return result;
  8980. }
  8981. /**
  8982. * Initializes an object clone.
  8983. *
  8984. * @private
  8985. * @param {Object} object The object to clone.
  8986. * @returns {Object} Returns the initialized clone.
  8987. */
  8988. function initCloneObject(object) {
  8989. return (typeof object.constructor == 'function' && !isPrototype(object))
  8990. ? baseCreate(getPrototype(object))
  8991. : {};
  8992. }
  8993. /**
  8994. * Initializes an object clone based on its `toStringTag`.
  8995. *
  8996. * **Note:** This function only supports cloning values with tags of
  8997. * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
  8998. *
  8999. * @private
  9000. * @param {Object} object The object to clone.
  9001. * @param {string} tag The `toStringTag` of the object to clone.
  9002. * @param {Function} cloneFunc The function to clone values.
  9003. * @param {boolean} [isDeep] Specify a deep clone.
  9004. * @returns {Object} Returns the initialized clone.
  9005. */
  9006. function initCloneByTag(object, tag, cloneFunc, isDeep) {
  9007. var Ctor = object.constructor;
  9008. switch (tag) {
  9009. case arrayBufferTag:
  9010. return cloneArrayBuffer(object);
  9011. case boolTag:
  9012. case dateTag:
  9013. return new Ctor(+object);
  9014. case dataViewTag:
  9015. return cloneDataView(object, isDeep);
  9016. case float32Tag: case float64Tag:
  9017. case int8Tag: case int16Tag: case int32Tag:
  9018. case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
  9019. return cloneTypedArray(object, isDeep);
  9020. case mapTag:
  9021. return cloneMap(object, isDeep, cloneFunc);
  9022. case numberTag:
  9023. case stringTag:
  9024. return new Ctor(object);
  9025. case regexpTag:
  9026. return cloneRegExp(object);
  9027. case setTag:
  9028. return cloneSet(object, isDeep, cloneFunc);
  9029. case symbolTag:
  9030. return cloneSymbol(object);
  9031. }
  9032. }
  9033. /**
  9034. * Inserts wrapper `details` in a comment at the top of the `source` body.
  9035. *
  9036. * @private
  9037. * @param {string} source The source to modify.
  9038. * @returns {Array} details The details to insert.
  9039. * @returns {string} Returns the modified source.
  9040. */
  9041. function insertWrapDetails(source, details) {
  9042. var length = details.length;
  9043. if (!length) {
  9044. return source;
  9045. }
  9046. var lastIndex = length - 1;
  9047. details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];
  9048. details = details.join(length > 2 ? ', ' : ' ');
  9049. return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n');
  9050. }
  9051. /**
  9052. * Checks if `value` is a flattenable `arguments` object or array.
  9053. *
  9054. * @private
  9055. * @param {*} value The value to check.
  9056. * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
  9057. */
  9058. function isFlattenable(value) {
  9059. return isArray(value) || isArguments(value) ||
  9060. !!(spreadableSymbol && value && value[spreadableSymbol]);
  9061. }
  9062. /**
  9063. * Checks if `value` is a valid array-like index.
  9064. *
  9065. * @private
  9066. * @param {*} value The value to check.
  9067. * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
  9068. * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
  9069. */
  9070. function isIndex(value, length) {
  9071. length = length == null ? MAX_SAFE_INTEGER : length;
  9072. return !!length &&
  9073. (typeof value == 'number' || reIsUint.test(value)) &&
  9074. (value > -1 && value % 1 == 0 && value < length);
  9075. }
  9076. /**
  9077. * Checks if the given arguments are from an iteratee call.
  9078. *
  9079. * @private
  9080. * @param {*} value The potential iteratee value argument.
  9081. * @param {*} index The potential iteratee index or key argument.
  9082. * @param {*} object The potential iteratee object argument.
  9083. * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
  9084. * else `false`.
  9085. */
  9086. function isIterateeCall(value, index, object) {
  9087. if (!isObject(object)) {
  9088. return false;
  9089. }
  9090. var type = typeof index;
  9091. if (type == 'number'
  9092. ? (isArrayLike(object) && isIndex(index, object.length))
  9093. : (type == 'string' && index in object)
  9094. ) {
  9095. return eq(object[index], value);
  9096. }
  9097. return false;
  9098. }
  9099. /**
  9100. * Checks if `value` is a property name and not a property path.
  9101. *
  9102. * @private
  9103. * @param {*} value The value to check.
  9104. * @param {Object} [object] The object to query keys on.
  9105. * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
  9106. */
  9107. function isKey(value, object) {
  9108. if (isArray(value)) {
  9109. return false;
  9110. }
  9111. var type = typeof value;
  9112. if (type == 'number' || type == 'symbol' || type == 'boolean' ||
  9113. value == null || isSymbol(value)) {
  9114. return true;
  9115. }
  9116. return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
  9117. (object != null && value in Object(object));
  9118. }
  9119. /**
  9120. * Checks if `value` is suitable for use as unique object key.
  9121. *
  9122. * @private
  9123. * @param {*} value The value to check.
  9124. * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
  9125. */
  9126. function isKeyable(value) {
  9127. var type = typeof value;
  9128. return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
  9129. ? (value !== '__proto__')
  9130. : (value === null);
  9131. }
  9132. /**
  9133. * Checks if `func` has a lazy counterpart.
  9134. *
  9135. * @private
  9136. * @param {Function} func The function to check.
  9137. * @returns {boolean} Returns `true` if `func` has a lazy counterpart,
  9138. * else `false`.
  9139. */
  9140. function isLaziable(func) {
  9141. var funcName = getFuncName(func),
  9142. other = lodash[funcName];
  9143. if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {
  9144. return false;
  9145. }
  9146. if (func === other) {
  9147. return true;
  9148. }
  9149. var data = getData(other);
  9150. return !!data && func === data[0];
  9151. }
  9152. /**
  9153. * Checks if `func` has its source masked.
  9154. *
  9155. * @private
  9156. * @param {Function} func The function to check.
  9157. * @returns {boolean} Returns `true` if `func` is masked, else `false`.
  9158. */
  9159. function isMasked(func) {
  9160. return !!maskSrcKey && (maskSrcKey in func);
  9161. }
  9162. /**
  9163. * Checks if `func` is capable of being masked.
  9164. *
  9165. * @private
  9166. * @param {*} value The value to check.
  9167. * @returns {boolean} Returns `true` if `func` is maskable, else `false`.
  9168. */
  9169. var isMaskable = coreJsData ? isFunction : stubFalse;
  9170. /**
  9171. * Checks if `value` is likely a prototype object.
  9172. *
  9173. * @private
  9174. * @param {*} value The value to check.
  9175. * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
  9176. */
  9177. function isPrototype(value) {
  9178. var Ctor = value && value.constructor,
  9179. proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
  9180. return value === proto;
  9181. }
  9182. /**
  9183. * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
  9184. *
  9185. * @private
  9186. * @param {*} value The value to check.
  9187. * @returns {boolean} Returns `true` if `value` if suitable for strict
  9188. * equality comparisons, else `false`.
  9189. */
  9190. function isStrictComparable(value) {
  9191. return value === value && !isObject(value);
  9192. }
  9193. /**
  9194. * A specialized version of `matchesProperty` for source values suitable
  9195. * for strict equality comparisons, i.e. `===`.
  9196. *
  9197. * @private
  9198. * @param {string} key The key of the property to get.
  9199. * @param {*} srcValue The value to match.
  9200. * @returns {Function} Returns the new spec function.
  9201. */
  9202. function matchesStrictComparable(key, srcValue) {
  9203. return function(object) {
  9204. if (object == null) {
  9205. return false;
  9206. }
  9207. return object[key] === srcValue &&
  9208. (srcValue !== undefined || (key in Object(object)));
  9209. };
  9210. }
  9211. /**
  9212. * A specialized version of `_.memoize` which clears the memoized function's
  9213. * cache when it exceeds `MAX_MEMOIZE_SIZE`.
  9214. *
  9215. * @private
  9216. * @param {Function} func The function to have its output memoized.
  9217. * @returns {Function} Returns the new memoized function.
  9218. */
  9219. function memoizeCapped(func) {
  9220. var result = memoize(func, function(key) {
  9221. if (cache.size === MAX_MEMOIZE_SIZE) {
  9222. cache.clear();
  9223. }
  9224. return key;
  9225. });
  9226. var cache = result.cache;
  9227. return result;
  9228. }
  9229. /**
  9230. * Merges the function metadata of `source` into `data`.
  9231. *
  9232. * Merging metadata reduces the number of wrappers used to invoke a function.
  9233. * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`
  9234. * may be applied regardless of execution order. Methods like `_.ary` and
  9235. * `_.rearg` modify function arguments, making the order in which they are
  9236. * executed important, preventing the merging of metadata. However, we make
  9237. * an exception for a safe combined case where curried functions have `_.ary`
  9238. * and or `_.rearg` applied.
  9239. *
  9240. * @private
  9241. * @param {Array} data The destination metadata.
  9242. * @param {Array} source The source metadata.
  9243. * @returns {Array} Returns `data`.
  9244. */
  9245. function mergeData(data, source) {
  9246. var bitmask = data[1],
  9247. srcBitmask = source[1],
  9248. newBitmask = bitmask | srcBitmask,
  9249. isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);
  9250. var isCombo =
  9251. ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||
  9252. ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||
  9253. ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));
  9254. // Exit early if metadata can't be merged.
  9255. if (!(isCommon || isCombo)) {
  9256. return data;
  9257. }
  9258. // Use source `thisArg` if available.
  9259. if (srcBitmask & WRAP_BIND_FLAG) {
  9260. data[2] = source[2];
  9261. // Set when currying a bound function.
  9262. newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;
  9263. }
  9264. // Compose partial arguments.
  9265. var value = source[3];
  9266. if (value) {
  9267. var partials = data[3];
  9268. data[3] = partials ? composeArgs(partials, value, source[4]) : value;
  9269. data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];
  9270. }
  9271. // Compose partial right arguments.
  9272. value = source[5];
  9273. if (value) {
  9274. partials = data[5];
  9275. data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;
  9276. data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];
  9277. }
  9278. // Use source `argPos` if available.
  9279. value = source[7];
  9280. if (value) {
  9281. data[7] = value;
  9282. }
  9283. // Use source `ary` if it's smaller.
  9284. if (srcBitmask & WRAP_ARY_FLAG) {
  9285. data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);
  9286. }
  9287. // Use source `arity` if one is not provided.
  9288. if (data[9] == null) {
  9289. data[9] = source[9];
  9290. }
  9291. // Use source `func` and merge bitmasks.
  9292. data[0] = source[0];
  9293. data[1] = newBitmask;
  9294. return data;
  9295. }
  9296. /**
  9297. * This function is like
  9298. * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
  9299. * except that it includes inherited enumerable properties.
  9300. *
  9301. * @private
  9302. * @param {Object} object The object to query.
  9303. * @returns {Array} Returns the array of property names.
  9304. */
  9305. function nativeKeysIn(object) {
  9306. var result = [];
  9307. if (object != null) {
  9308. for (var key in Object(object)) {
  9309. result.push(key);
  9310. }
  9311. }
  9312. return result;
  9313. }
  9314. /**
  9315. * Converts `value` to a string using `Object.prototype.toString`.
  9316. *
  9317. * @private
  9318. * @param {*} value The value to convert.
  9319. * @returns {string} Returns the converted string.
  9320. */
  9321. function objectToString(value) {
  9322. return nativeObjectToString.call(value);
  9323. }
  9324. /**
  9325. * A specialized version of `baseRest` which transforms the rest array.
  9326. *
  9327. * @private
  9328. * @param {Function} func The function to apply a rest parameter to.
  9329. * @param {number} [start=func.length-1] The start position of the rest parameter.
  9330. * @param {Function} transform The rest array transform.
  9331. * @returns {Function} Returns the new function.
  9332. */
  9333. function overRest(func, start, transform) {
  9334. start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
  9335. return function() {
  9336. var args = arguments,
  9337. index = -1,
  9338. length = nativeMax(args.length - start, 0),
  9339. array = Array(length);
  9340. while (++index < length) {
  9341. array[index] = args[start + index];
  9342. }
  9343. index = -1;
  9344. var otherArgs = Array(start + 1);
  9345. while (++index < start) {
  9346. otherArgs[index] = args[index];
  9347. }
  9348. otherArgs[start] = transform(array);
  9349. return apply(func, this, otherArgs);
  9350. };
  9351. }
  9352. /**
  9353. * Gets the parent value at `path` of `object`.
  9354. *
  9355. * @private
  9356. * @param {Object} object The object to query.
  9357. * @param {Array} path The path to get the parent value of.
  9358. * @returns {*} Returns the parent value.
  9359. */
  9360. function parent(object, path) {
  9361. return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
  9362. }
  9363. /**
  9364. * Reorder `array` according to the specified indexes where the element at
  9365. * the first index is assigned as the first element, the element at
  9366. * the second index is assigned as the second element, and so on.
  9367. *
  9368. * @private
  9369. * @param {Array} array The array to reorder.
  9370. * @param {Array} indexes The arranged array indexes.
  9371. * @returns {Array} Returns `array`.
  9372. */
  9373. function reorder(array, indexes) {
  9374. var arrLength = array.length,
  9375. length = nativeMin(indexes.length, arrLength),
  9376. oldArray = copyArray(array);
  9377. while (length--) {
  9378. var index = indexes[length];
  9379. array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;
  9380. }
  9381. return array;
  9382. }
  9383. /**
  9384. * Sets metadata for `func`.
  9385. *
  9386. * **Note:** If this function becomes hot, i.e. is invoked a lot in a short
  9387. * period of time, it will trip its breaker and transition to an identity
  9388. * function to avoid garbage collection pauses in V8. See
  9389. * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)
  9390. * for more details.
  9391. *
  9392. * @private
  9393. * @param {Function} func The function to associate metadata with.
  9394. * @param {*} data The metadata.
  9395. * @returns {Function} Returns `func`.
  9396. */
  9397. var setData = shortOut(baseSetData);
  9398. /**
  9399. * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout).
  9400. *
  9401. * @private
  9402. * @param {Function} func The function to delay.
  9403. * @param {number} wait The number of milliseconds to delay invocation.
  9404. * @returns {number|Object} Returns the timer id or timeout object.
  9405. */
  9406. var setTimeout = ctxSetTimeout || function(func, wait) {
  9407. return root.setTimeout(func, wait);
  9408. };
  9409. /**
  9410. * Sets the `toString` method of `func` to return `string`.
  9411. *
  9412. * @private
  9413. * @param {Function} func The function to modify.
  9414. * @param {Function} string The `toString` result.
  9415. * @returns {Function} Returns `func`.
  9416. */
  9417. var setToString = shortOut(baseSetToString);
  9418. /**
  9419. * Sets the `toString` method of `wrapper` to mimic the source of `reference`
  9420. * with wrapper details in a comment at the top of the source body.
  9421. *
  9422. * @private
  9423. * @param {Function} wrapper The function to modify.
  9424. * @param {Function} reference The reference function.
  9425. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  9426. * @returns {Function} Returns `wrapper`.
  9427. */
  9428. function setWrapToString(wrapper, reference, bitmask) {
  9429. var source = (reference + '');
  9430. return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));
  9431. }
  9432. /**
  9433. * Creates a function that'll short out and invoke `identity` instead
  9434. * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
  9435. * milliseconds.
  9436. *
  9437. * @private
  9438. * @param {Function} func The function to restrict.
  9439. * @returns {Function} Returns the new shortable function.
  9440. */
  9441. function shortOut(func) {
  9442. var count = 0,
  9443. lastCalled = 0;
  9444. return function() {
  9445. var stamp = nativeNow(),
  9446. remaining = HOT_SPAN - (stamp - lastCalled);
  9447. lastCalled = stamp;
  9448. if (remaining > 0) {
  9449. if (++count >= HOT_COUNT) {
  9450. return arguments[0];
  9451. }
  9452. } else {
  9453. count = 0;
  9454. }
  9455. return func.apply(undefined, arguments);
  9456. };
  9457. }
  9458. /**
  9459. * A specialized version of `_.shuffle` which mutates and sets the size of `array`.
  9460. *
  9461. * @private
  9462. * @param {Array} array The array to shuffle.
  9463. * @param {number} [size=array.length] The size of `array`.
  9464. * @returns {Array} Returns `array`.
  9465. */
  9466. function shuffleSelf(array, size) {
  9467. var index = -1,
  9468. length = array.length,
  9469. lastIndex = length - 1;
  9470. size = size === undefined ? length : size;
  9471. while (++index < size) {
  9472. var rand = baseRandom(index, lastIndex),
  9473. value = array[rand];
  9474. array[rand] = array[index];
  9475. array[index] = value;
  9476. }
  9477. array.length = size;
  9478. return array;
  9479. }
  9480. /**
  9481. * Converts `string` to a property path array.
  9482. *
  9483. * @private
  9484. * @param {string} string The string to convert.
  9485. * @returns {Array} Returns the property path array.
  9486. */
  9487. var stringToPath = memoizeCapped(function(string) {
  9488. var result = [];
  9489. if (reLeadingDot.test(string)) {
  9490. result.push('');
  9491. }
  9492. string.replace(rePropName, function(match, number, quote, string) {
  9493. result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));
  9494. });
  9495. return result;
  9496. });
  9497. /**
  9498. * Converts `value` to a string key if it's not a string or symbol.
  9499. *
  9500. * @private
  9501. * @param {*} value The value to inspect.
  9502. * @returns {string|symbol} Returns the key.
  9503. */
  9504. function toKey(value) {
  9505. if (typeof value == 'string' || isSymbol(value)) {
  9506. return value;
  9507. }
  9508. var result = (value + '');
  9509. return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
  9510. }
  9511. /**
  9512. * Converts `func` to its source code.
  9513. *
  9514. * @private
  9515. * @param {Function} func The function to convert.
  9516. * @returns {string} Returns the source code.
  9517. */
  9518. function toSource(func) {
  9519. if (func != null) {
  9520. try {
  9521. return funcToString.call(func);
  9522. } catch (e) {}
  9523. try {
  9524. return (func + '');
  9525. } catch (e) {}
  9526. }
  9527. return '';
  9528. }
  9529. /**
  9530. * Updates wrapper `details` based on `bitmask` flags.
  9531. *
  9532. * @private
  9533. * @returns {Array} details The details to modify.
  9534. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  9535. * @returns {Array} Returns `details`.
  9536. */
  9537. function updateWrapDetails(details, bitmask) {
  9538. arrayEach(wrapFlags, function(pair) {
  9539. var value = '_.' + pair[0];
  9540. if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {
  9541. details.push(value);
  9542. }
  9543. });
  9544. return details.sort();
  9545. }
  9546. /**
  9547. * Creates a clone of `wrapper`.
  9548. *
  9549. * @private
  9550. * @param {Object} wrapper The wrapper to clone.
  9551. * @returns {Object} Returns the cloned wrapper.
  9552. */
  9553. function wrapperClone(wrapper) {
  9554. if (wrapper instanceof LazyWrapper) {
  9555. return wrapper.clone();
  9556. }
  9557. var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);
  9558. result.__actions__ = copyArray(wrapper.__actions__);
  9559. result.__index__ = wrapper.__index__;
  9560. result.__values__ = wrapper.__values__;
  9561. return result;
  9562. }
  9563. /*------------------------------------------------------------------------*/
  9564. /**
  9565. * Creates an array of elements split into groups the length of `size`.
  9566. * If `array` can't be split evenly, the final chunk will be the remaining
  9567. * elements.
  9568. *
  9569. * @static
  9570. * @memberOf _
  9571. * @since 3.0.0
  9572. * @category Array
  9573. * @param {Array} array The array to process.
  9574. * @param {number} [size=1] The length of each chunk
  9575. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  9576. * @returns {Array} Returns the new array of chunks.
  9577. * @example
  9578. *
  9579. * _.chunk(['a', 'b', 'c', 'd'], 2);
  9580. * // => [['a', 'b'], ['c', 'd']]
  9581. *
  9582. * _.chunk(['a', 'b', 'c', 'd'], 3);
  9583. * // => [['a', 'b', 'c'], ['d']]
  9584. */
  9585. function chunk(array, size, guard) {
  9586. if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {
  9587. size = 1;
  9588. } else {
  9589. size = nativeMax(toInteger(size), 0);
  9590. }
  9591. var length = array == null ? 0 : array.length;
  9592. if (!length || size < 1) {
  9593. return [];
  9594. }
  9595. var index = 0,
  9596. resIndex = 0,
  9597. result = Array(nativeCeil(length / size));
  9598. while (index < length) {
  9599. result[resIndex++] = baseSlice(array, index, (index += size));
  9600. }
  9601. return result;
  9602. }
  9603. /**
  9604. * Creates an array with all falsey values removed. The values `false`, `null`,
  9605. * `0`, `""`, `undefined`, and `NaN` are falsey.
  9606. *
  9607. * @static
  9608. * @memberOf _
  9609. * @since 0.1.0
  9610. * @category Array
  9611. * @param {Array} array The array to compact.
  9612. * @returns {Array} Returns the new array of filtered values.
  9613. * @example
  9614. *
  9615. * _.compact([0, 1, false, 2, '', 3]);
  9616. * // => [1, 2, 3]
  9617. */
  9618. function compact(array) {
  9619. var index = -1,
  9620. length = array == null ? 0 : array.length,
  9621. resIndex = 0,
  9622. result = [];
  9623. while (++index < length) {
  9624. var value = array[index];
  9625. if (value) {
  9626. result[resIndex++] = value;
  9627. }
  9628. }
  9629. return result;
  9630. }
  9631. /**
  9632. * Creates a new array concatenating `array` with any additional arrays
  9633. * and/or values.
  9634. *
  9635. * @static
  9636. * @memberOf _
  9637. * @since 4.0.0
  9638. * @category Array
  9639. * @param {Array} array The array to concatenate.
  9640. * @param {...*} [values] The values to concatenate.
  9641. * @returns {Array} Returns the new concatenated array.
  9642. * @example
  9643. *
  9644. * var array = [1];
  9645. * var other = _.concat(array, 2, [3], [[4]]);
  9646. *
  9647. * console.log(other);
  9648. * // => [1, 2, 3, [4]]
  9649. *
  9650. * console.log(array);
  9651. * // => [1]
  9652. */
  9653. function concat() {
  9654. var length = arguments.length;
  9655. if (!length) {
  9656. return [];
  9657. }
  9658. var args = Array(length - 1),
  9659. array = arguments[0],
  9660. index = length;
  9661. while (index--) {
  9662. args[index - 1] = arguments[index];
  9663. }
  9664. return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));
  9665. }
  9666. /**
  9667. * Creates an array of `array` values not included in the other given arrays
  9668. * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  9669. * for equality comparisons. The order and references of result values are
  9670. * determined by the first array.
  9671. *
  9672. * **Note:** Unlike `_.pullAll`, this method returns a new array.
  9673. *
  9674. * @static
  9675. * @memberOf _
  9676. * @since 0.1.0
  9677. * @category Array
  9678. * @param {Array} array The array to inspect.
  9679. * @param {...Array} [values] The values to exclude.
  9680. * @returns {Array} Returns the new array of filtered values.
  9681. * @see _.without, _.xor
  9682. * @example
  9683. *
  9684. * _.difference([2, 1], [2, 3]);
  9685. * // => [1]
  9686. */
  9687. var difference = baseRest(function(array, values) {
  9688. return isArrayLikeObject(array)
  9689. ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))
  9690. : [];
  9691. });
  9692. /**
  9693. * This method is like `_.difference` except that it accepts `iteratee` which
  9694. * is invoked for each element of `array` and `values` to generate the criterion
  9695. * by which they're compared. The order and references of result values are
  9696. * determined by the first array. The iteratee is invoked with one argument:
  9697. * (value).
  9698. *
  9699. * **Note:** Unlike `_.pullAllBy`, this method returns a new array.
  9700. *
  9701. * @static
  9702. * @memberOf _
  9703. * @since 4.0.0
  9704. * @category Array
  9705. * @param {Array} array The array to inspect.
  9706. * @param {...Array} [values] The values to exclude.
  9707. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  9708. * @returns {Array} Returns the new array of filtered values.
  9709. * @example
  9710. *
  9711. * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);
  9712. * // => [1.2]
  9713. *
  9714. * // The `_.property` iteratee shorthand.
  9715. * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');
  9716. * // => [{ 'x': 2 }]
  9717. */
  9718. var differenceBy = baseRest(function(array, values) {
  9719. var iteratee = last(values);
  9720. if (isArrayLikeObject(iteratee)) {
  9721. iteratee = undefined;
  9722. }
  9723. return isArrayLikeObject(array)
  9724. ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2))
  9725. : [];
  9726. });
  9727. /**
  9728. * This method is like `_.difference` except that it accepts `comparator`
  9729. * which is invoked to compare elements of `array` to `values`. The order and
  9730. * references of result values are determined by the first array. The comparator
  9731. * is invoked with two arguments: (arrVal, othVal).
  9732. *
  9733. * **Note:** Unlike `_.pullAllWith`, this method returns a new array.
  9734. *
  9735. * @static
  9736. * @memberOf _
  9737. * @since 4.0.0
  9738. * @category Array
  9739. * @param {Array} array The array to inspect.
  9740. * @param {...Array} [values] The values to exclude.
  9741. * @param {Function} [comparator] The comparator invoked per element.
  9742. * @returns {Array} Returns the new array of filtered values.
  9743. * @example
  9744. *
  9745. * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
  9746. *
  9747. * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);
  9748. * // => [{ 'x': 2, 'y': 1 }]
  9749. */
  9750. var differenceWith = baseRest(function(array, values) {
  9751. var comparator = last(values);
  9752. if (isArrayLikeObject(comparator)) {
  9753. comparator = undefined;
  9754. }
  9755. return isArrayLikeObject(array)
  9756. ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)
  9757. : [];
  9758. });
  9759. /**
  9760. * Creates a slice of `array` with `n` elements dropped from the beginning.
  9761. *
  9762. * @static
  9763. * @memberOf _
  9764. * @since 0.5.0
  9765. * @category Array
  9766. * @param {Array} array The array to query.
  9767. * @param {number} [n=1] The number of elements to drop.
  9768. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  9769. * @returns {Array} Returns the slice of `array`.
  9770. * @example
  9771. *
  9772. * _.drop([1, 2, 3]);
  9773. * // => [2, 3]
  9774. *
  9775. * _.drop([1, 2, 3], 2);
  9776. * // => [3]
  9777. *
  9778. * _.drop([1, 2, 3], 5);
  9779. * // => []
  9780. *
  9781. * _.drop([1, 2, 3], 0);
  9782. * // => [1, 2, 3]
  9783. */
  9784. function drop(array, n, guard) {
  9785. var length = array == null ? 0 : array.length;
  9786. if (!length) {
  9787. return [];
  9788. }
  9789. n = (guard || n === undefined) ? 1 : toInteger(n);
  9790. return baseSlice(array, n < 0 ? 0 : n, length);
  9791. }
  9792. /**
  9793. * Creates a slice of `array` with `n` elements dropped from the end.
  9794. *
  9795. * @static
  9796. * @memberOf _
  9797. * @since 3.0.0
  9798. * @category Array
  9799. * @param {Array} array The array to query.
  9800. * @param {number} [n=1] The number of elements to drop.
  9801. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  9802. * @returns {Array} Returns the slice of `array`.
  9803. * @example
  9804. *
  9805. * _.dropRight([1, 2, 3]);
  9806. * // => [1, 2]
  9807. *
  9808. * _.dropRight([1, 2, 3], 2);
  9809. * // => [1]
  9810. *
  9811. * _.dropRight([1, 2, 3], 5);
  9812. * // => []
  9813. *
  9814. * _.dropRight([1, 2, 3], 0);
  9815. * // => [1, 2, 3]
  9816. */
  9817. function dropRight(array, n, guard) {
  9818. var length = array == null ? 0 : array.length;
  9819. if (!length) {
  9820. return [];
  9821. }
  9822. n = (guard || n === undefined) ? 1 : toInteger(n);
  9823. n = length - n;
  9824. return baseSlice(array, 0, n < 0 ? 0 : n);
  9825. }
  9826. /**
  9827. * Creates a slice of `array` excluding elements dropped from the end.
  9828. * Elements are dropped until `predicate` returns falsey. The predicate is
  9829. * invoked with three arguments: (value, index, array).
  9830. *
  9831. * @static
  9832. * @memberOf _
  9833. * @since 3.0.0
  9834. * @category Array
  9835. * @param {Array} array The array to query.
  9836. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  9837. * @returns {Array} Returns the slice of `array`.
  9838. * @example
  9839. *
  9840. * var users = [
  9841. * { 'user': 'barney', 'active': true },
  9842. * { 'user': 'fred', 'active': false },
  9843. * { 'user': 'pebbles', 'active': false }
  9844. * ];
  9845. *
  9846. * _.dropRightWhile(users, function(o) { return !o.active; });
  9847. * // => objects for ['barney']
  9848. *
  9849. * // The `_.matches` iteratee shorthand.
  9850. * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });
  9851. * // => objects for ['barney', 'fred']
  9852. *
  9853. * // The `_.matchesProperty` iteratee shorthand.
  9854. * _.dropRightWhile(users, ['active', false]);
  9855. * // => objects for ['barney']
  9856. *
  9857. * // The `_.property` iteratee shorthand.
  9858. * _.dropRightWhile(users, 'active');
  9859. * // => objects for ['barney', 'fred', 'pebbles']
  9860. */
  9861. function dropRightWhile(array, predicate) {
  9862. return (array && array.length)
  9863. ? baseWhile(array, getIteratee(predicate, 3), true, true)
  9864. : [];
  9865. }
  9866. /**
  9867. * Creates a slice of `array` excluding elements dropped from the beginning.
  9868. * Elements are dropped until `predicate` returns falsey. The predicate is
  9869. * invoked with three arguments: (value, index, array).
  9870. *
  9871. * @static
  9872. * @memberOf _
  9873. * @since 3.0.0
  9874. * @category Array
  9875. * @param {Array} array The array to query.
  9876. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  9877. * @returns {Array} Returns the slice of `array`.
  9878. * @example
  9879. *
  9880. * var users = [
  9881. * { 'user': 'barney', 'active': false },
  9882. * { 'user': 'fred', 'active': false },
  9883. * { 'user': 'pebbles', 'active': true }
  9884. * ];
  9885. *
  9886. * _.dropWhile(users, function(o) { return !o.active; });
  9887. * // => objects for ['pebbles']
  9888. *
  9889. * // The `_.matches` iteratee shorthand.
  9890. * _.dropWhile(users, { 'user': 'barney', 'active': false });
  9891. * // => objects for ['fred', 'pebbles']
  9892. *
  9893. * // The `_.matchesProperty` iteratee shorthand.
  9894. * _.dropWhile(users, ['active', false]);
  9895. * // => objects for ['pebbles']
  9896. *
  9897. * // The `_.property` iteratee shorthand.
  9898. * _.dropWhile(users, 'active');
  9899. * // => objects for ['barney', 'fred', 'pebbles']
  9900. */
  9901. function dropWhile(array, predicate) {
  9902. return (array && array.length)
  9903. ? baseWhile(array, getIteratee(predicate, 3), true)
  9904. : [];
  9905. }
  9906. /**
  9907. * Fills elements of `array` with `value` from `start` up to, but not
  9908. * including, `end`.
  9909. *
  9910. * **Note:** This method mutates `array`.
  9911. *
  9912. * @static
  9913. * @memberOf _
  9914. * @since 3.2.0
  9915. * @category Array
  9916. * @param {Array} array The array to fill.
  9917. * @param {*} value The value to fill `array` with.
  9918. * @param {number} [start=0] The start position.
  9919. * @param {number} [end=array.length] The end position.
  9920. * @returns {Array} Returns `array`.
  9921. * @example
  9922. *
  9923. * var array = [1, 2, 3];
  9924. *
  9925. * _.fill(array, 'a');
  9926. * console.log(array);
  9927. * // => ['a', 'a', 'a']
  9928. *
  9929. * _.fill(Array(3), 2);
  9930. * // => [2, 2, 2]
  9931. *
  9932. * _.fill([4, 6, 8, 10], '*', 1, 3);
  9933. * // => [4, '*', '*', 10]
  9934. */
  9935. function fill(array, value, start, end) {
  9936. var length = array == null ? 0 : array.length;
  9937. if (!length) {
  9938. return [];
  9939. }
  9940. if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {
  9941. start = 0;
  9942. end = length;
  9943. }
  9944. return baseFill(array, value, start, end);
  9945. }
  9946. /**
  9947. * This method is like `_.find` except that it returns the index of the first
  9948. * element `predicate` returns truthy for instead of the element itself.
  9949. *
  9950. * @static
  9951. * @memberOf _
  9952. * @since 1.1.0
  9953. * @category Array
  9954. * @param {Array} array The array to inspect.
  9955. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  9956. * @param {number} [fromIndex=0] The index to search from.
  9957. * @returns {number} Returns the index of the found element, else `-1`.
  9958. * @example
  9959. *
  9960. * var users = [
  9961. * { 'user': 'barney', 'active': false },
  9962. * { 'user': 'fred', 'active': false },
  9963. * { 'user': 'pebbles', 'active': true }
  9964. * ];
  9965. *
  9966. * _.findIndex(users, function(o) { return o.user == 'barney'; });
  9967. * // => 0
  9968. *
  9969. * // The `_.matches` iteratee shorthand.
  9970. * _.findIndex(users, { 'user': 'fred', 'active': false });
  9971. * // => 1
  9972. *
  9973. * // The `_.matchesProperty` iteratee shorthand.
  9974. * _.findIndex(users, ['active', false]);
  9975. * // => 0
  9976. *
  9977. * // The `_.property` iteratee shorthand.
  9978. * _.findIndex(users, 'active');
  9979. * // => 2
  9980. */
  9981. function findIndex(array, predicate, fromIndex) {
  9982. var length = array == null ? 0 : array.length;
  9983. if (!length) {
  9984. return -1;
  9985. }
  9986. var index = fromIndex == null ? 0 : toInteger(fromIndex);
  9987. if (index < 0) {
  9988. index = nativeMax(length + index, 0);
  9989. }
  9990. return baseFindIndex(array, getIteratee(predicate, 3), index);
  9991. }
  9992. /**
  9993. * This method is like `_.findIndex` except that it iterates over elements
  9994. * of `collection` from right to left.
  9995. *
  9996. * @static
  9997. * @memberOf _
  9998. * @since 2.0.0
  9999. * @category Array
  10000. * @param {Array} array The array to inspect.
  10001. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  10002. * @param {number} [fromIndex=array.length-1] The index to search from.
  10003. * @returns {number} Returns the index of the found element, else `-1`.
  10004. * @example
  10005. *
  10006. * var users = [
  10007. * { 'user': 'barney', 'active': true },
  10008. * { 'user': 'fred', 'active': false },
  10009. * { 'user': 'pebbles', 'active': false }
  10010. * ];
  10011. *
  10012. * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });
  10013. * // => 2
  10014. *
  10015. * // The `_.matches` iteratee shorthand.
  10016. * _.findLastIndex(users, { 'user': 'barney', 'active': true });
  10017. * // => 0
  10018. *
  10019. * // The `_.matchesProperty` iteratee shorthand.
  10020. * _.findLastIndex(users, ['active', false]);
  10021. * // => 2
  10022. *
  10023. * // The `_.property` iteratee shorthand.
  10024. * _.findLastIndex(users, 'active');
  10025. * // => 0
  10026. */
  10027. function findLastIndex(array, predicate, fromIndex) {
  10028. var length = array == null ? 0 : array.length;
  10029. if (!length) {
  10030. return -1;
  10031. }
  10032. var index = length - 1;
  10033. if (fromIndex !== undefined) {
  10034. index = toInteger(fromIndex);
  10035. index = fromIndex < 0
  10036. ? nativeMax(length + index, 0)
  10037. : nativeMin(index, length - 1);
  10038. }
  10039. return baseFindIndex(array, getIteratee(predicate, 3), index, true);
  10040. }
  10041. /**
  10042. * Flattens `array` a single level deep.
  10043. *
  10044. * @static
  10045. * @memberOf _
  10046. * @since 0.1.0
  10047. * @category Array
  10048. * @param {Array} array The array to flatten.
  10049. * @returns {Array} Returns the new flattened array.
  10050. * @example
  10051. *
  10052. * _.flatten([1, [2, [3, [4]], 5]]);
  10053. * // => [1, 2, [3, [4]], 5]
  10054. */
  10055. function flatten(array) {
  10056. var length = array == null ? 0 : array.length;
  10057. return length ? baseFlatten(array, 1) : [];
  10058. }
  10059. /**
  10060. * Recursively flattens `array`.
  10061. *
  10062. * @static
  10063. * @memberOf _
  10064. * @since 3.0.0
  10065. * @category Array
  10066. * @param {Array} array The array to flatten.
  10067. * @returns {Array} Returns the new flattened array.
  10068. * @example
  10069. *
  10070. * _.flattenDeep([1, [2, [3, [4]], 5]]);
  10071. * // => [1, 2, 3, 4, 5]
  10072. */
  10073. function flattenDeep(array) {
  10074. var length = array == null ? 0 : array.length;
  10075. return length ? baseFlatten(array, INFINITY) : [];
  10076. }
  10077. /**
  10078. * Recursively flatten `array` up to `depth` times.
  10079. *
  10080. * @static
  10081. * @memberOf _
  10082. * @since 4.4.0
  10083. * @category Array
  10084. * @param {Array} array The array to flatten.
  10085. * @param {number} [depth=1] The maximum recursion depth.
  10086. * @returns {Array} Returns the new flattened array.
  10087. * @example
  10088. *
  10089. * var array = [1, [2, [3, [4]], 5]];
  10090. *
  10091. * _.flattenDepth(array, 1);
  10092. * // => [1, 2, [3, [4]], 5]
  10093. *
  10094. * _.flattenDepth(array, 2);
  10095. * // => [1, 2, 3, [4], 5]
  10096. */
  10097. function flattenDepth(array, depth) {
  10098. var length = array == null ? 0 : array.length;
  10099. if (!length) {
  10100. return [];
  10101. }
  10102. depth = depth === undefined ? 1 : toInteger(depth);
  10103. return baseFlatten(array, depth);
  10104. }
  10105. /**
  10106. * The inverse of `_.toPairs`; this method returns an object composed
  10107. * from key-value `pairs`.
  10108. *
  10109. * @static
  10110. * @memberOf _
  10111. * @since 4.0.0
  10112. * @category Array
  10113. * @param {Array} pairs The key-value pairs.
  10114. * @returns {Object} Returns the new object.
  10115. * @example
  10116. *
  10117. * _.fromPairs([['a', 1], ['b', 2]]);
  10118. * // => { 'a': 1, 'b': 2 }
  10119. */
  10120. function fromPairs(pairs) {
  10121. var index = -1,
  10122. length = pairs == null ? 0 : pairs.length,
  10123. result = {};
  10124. while (++index < length) {
  10125. var pair = pairs[index];
  10126. result[pair[0]] = pair[1];
  10127. }
  10128. return result;
  10129. }
  10130. /**
  10131. * Gets the first element of `array`.
  10132. *
  10133. * @static
  10134. * @memberOf _
  10135. * @since 0.1.0
  10136. * @alias first
  10137. * @category Array
  10138. * @param {Array} array The array to query.
  10139. * @returns {*} Returns the first element of `array`.
  10140. * @example
  10141. *
  10142. * _.head([1, 2, 3]);
  10143. * // => 1
  10144. *
  10145. * _.head([]);
  10146. * // => undefined
  10147. */
  10148. function head(array) {
  10149. return (array && array.length) ? array[0] : undefined;
  10150. }
  10151. /**
  10152. * Gets the index at which the first occurrence of `value` is found in `array`
  10153. * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  10154. * for equality comparisons. If `fromIndex` is negative, it's used as the
  10155. * offset from the end of `array`.
  10156. *
  10157. * @static
  10158. * @memberOf _
  10159. * @since 0.1.0
  10160. * @category Array
  10161. * @param {Array} array The array to inspect.
  10162. * @param {*} value The value to search for.
  10163. * @param {number} [fromIndex=0] The index to search from.
  10164. * @returns {number} Returns the index of the matched value, else `-1`.
  10165. * @example
  10166. *
  10167. * _.indexOf([1, 2, 1, 2], 2);
  10168. * // => 1
  10169. *
  10170. * // Search from the `fromIndex`.
  10171. * _.indexOf([1, 2, 1, 2], 2, 2);
  10172. * // => 3
  10173. */
  10174. function indexOf(array, value, fromIndex) {
  10175. var length = array == null ? 0 : array.length;
  10176. if (!length) {
  10177. return -1;
  10178. }
  10179. var index = fromIndex == null ? 0 : toInteger(fromIndex);
  10180. if (index < 0) {
  10181. index = nativeMax(length + index, 0);
  10182. }
  10183. return baseIndexOf(array, value, index);
  10184. }
  10185. /**
  10186. * Gets all but the last element of `array`.
  10187. *
  10188. * @static
  10189. * @memberOf _
  10190. * @since 0.1.0
  10191. * @category Array
  10192. * @param {Array} array The array to query.
  10193. * @returns {Array} Returns the slice of `array`.
  10194. * @example
  10195. *
  10196. * _.initial([1, 2, 3]);
  10197. * // => [1, 2]
  10198. */
  10199. function initial(array) {
  10200. var length = array == null ? 0 : array.length;
  10201. return length ? baseSlice(array, 0, -1) : [];
  10202. }
  10203. /**
  10204. * Creates an array of unique values that are included in all given arrays
  10205. * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  10206. * for equality comparisons. The order and references of result values are
  10207. * determined by the first array.
  10208. *
  10209. * @static
  10210. * @memberOf _
  10211. * @since 0.1.0
  10212. * @category Array
  10213. * @param {...Array} [arrays] The arrays to inspect.
  10214. * @returns {Array} Returns the new array of intersecting values.
  10215. * @example
  10216. *
  10217. * _.intersection([2, 1], [2, 3]);
  10218. * // => [2]
  10219. */
  10220. var intersection = baseRest(function(arrays) {
  10221. var mapped = arrayMap(arrays, castArrayLikeObject);
  10222. return (mapped.length && mapped[0] === arrays[0])
  10223. ? baseIntersection(mapped)
  10224. : [];
  10225. });
  10226. /**
  10227. * This method is like `_.intersection` except that it accepts `iteratee`
  10228. * which is invoked for each element of each `arrays` to generate the criterion
  10229. * by which they're compared. The order and references of result values are
  10230. * determined by the first array. The iteratee is invoked with one argument:
  10231. * (value).
  10232. *
  10233. * @static
  10234. * @memberOf _
  10235. * @since 4.0.0
  10236. * @category Array
  10237. * @param {...Array} [arrays] The arrays to inspect.
  10238. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  10239. * @returns {Array} Returns the new array of intersecting values.
  10240. * @example
  10241. *
  10242. * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);
  10243. * // => [2.1]
  10244. *
  10245. * // The `_.property` iteratee shorthand.
  10246. * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
  10247. * // => [{ 'x': 1 }]
  10248. */
  10249. var intersectionBy = baseRest(function(arrays) {
  10250. var iteratee = last(arrays),
  10251. mapped = arrayMap(arrays, castArrayLikeObject);
  10252. if (iteratee === last(mapped)) {
  10253. iteratee = undefined;
  10254. } else {
  10255. mapped.pop();
  10256. }
  10257. return (mapped.length && mapped[0] === arrays[0])
  10258. ? baseIntersection(mapped, getIteratee(iteratee, 2))
  10259. : [];
  10260. });
  10261. /**
  10262. * This method is like `_.intersection` except that it accepts `comparator`
  10263. * which is invoked to compare elements of `arrays`. The order and references
  10264. * of result values are determined by the first array. The comparator is
  10265. * invoked with two arguments: (arrVal, othVal).
  10266. *
  10267. * @static
  10268. * @memberOf _
  10269. * @since 4.0.0
  10270. * @category Array
  10271. * @param {...Array} [arrays] The arrays to inspect.
  10272. * @param {Function} [comparator] The comparator invoked per element.
  10273. * @returns {Array} Returns the new array of intersecting values.
  10274. * @example
  10275. *
  10276. * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
  10277. * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
  10278. *
  10279. * _.intersectionWith(objects, others, _.isEqual);
  10280. * // => [{ 'x': 1, 'y': 2 }]
  10281. */
  10282. var intersectionWith = baseRest(function(arrays) {
  10283. var comparator = last(arrays),
  10284. mapped = arrayMap(arrays, castArrayLikeObject);
  10285. comparator = typeof comparator == 'function' ? comparator : undefined;
  10286. if (comparator) {
  10287. mapped.pop();
  10288. }
  10289. return (mapped.length && mapped[0] === arrays[0])
  10290. ? baseIntersection(mapped, undefined, comparator)
  10291. : [];
  10292. });
  10293. /**
  10294. * Converts all elements in `array` into a string separated by `separator`.
  10295. *
  10296. * @static
  10297. * @memberOf _
  10298. * @since 4.0.0
  10299. * @category Array
  10300. * @param {Array} array The array to convert.
  10301. * @param {string} [separator=','] The element separator.
  10302. * @returns {string} Returns the joined string.
  10303. * @example
  10304. *
  10305. * _.join(['a', 'b', 'c'], '~');
  10306. * // => 'a~b~c'
  10307. */
  10308. function join(array, separator) {
  10309. return array == null ? '' : nativeJoin.call(array, separator);
  10310. }
  10311. /**
  10312. * Gets the last element of `array`.
  10313. *
  10314. * @static
  10315. * @memberOf _
  10316. * @since 0.1.0
  10317. * @category Array
  10318. * @param {Array} array The array to query.
  10319. * @returns {*} Returns the last element of `array`.
  10320. * @example
  10321. *
  10322. * _.last([1, 2, 3]);
  10323. * // => 3
  10324. */
  10325. function last(array) {
  10326. var length = array == null ? 0 : array.length;
  10327. return length ? array[length - 1] : undefined;
  10328. }
  10329. /**
  10330. * This method is like `_.indexOf` except that it iterates over elements of
  10331. * `array` from right to left.
  10332. *
  10333. * @static
  10334. * @memberOf _
  10335. * @since 0.1.0
  10336. * @category Array
  10337. * @param {Array} array The array to inspect.
  10338. * @param {*} value The value to search for.
  10339. * @param {number} [fromIndex=array.length-1] The index to search from.
  10340. * @returns {number} Returns the index of the matched value, else `-1`.
  10341. * @example
  10342. *
  10343. * _.lastIndexOf([1, 2, 1, 2], 2);
  10344. * // => 3
  10345. *
  10346. * // Search from the `fromIndex`.
  10347. * _.lastIndexOf([1, 2, 1, 2], 2, 2);
  10348. * // => 1
  10349. */
  10350. function lastIndexOf(array, value, fromIndex) {
  10351. var length = array == null ? 0 : array.length;
  10352. if (!length) {
  10353. return -1;
  10354. }
  10355. var index = length;
  10356. if (fromIndex !== undefined) {
  10357. index = toInteger(fromIndex);
  10358. index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);
  10359. }
  10360. return value === value
  10361. ? strictLastIndexOf(array, value, index)
  10362. : baseFindIndex(array, baseIsNaN, index, true);
  10363. }
  10364. /**
  10365. * Gets the element at index `n` of `array`. If `n` is negative, the nth
  10366. * element from the end is returned.
  10367. *
  10368. * @static
  10369. * @memberOf _
  10370. * @since 4.11.0
  10371. * @category Array
  10372. * @param {Array} array The array to query.
  10373. * @param {number} [n=0] The index of the element to return.
  10374. * @returns {*} Returns the nth element of `array`.
  10375. * @example
  10376. *
  10377. * var array = ['a', 'b', 'c', 'd'];
  10378. *
  10379. * _.nth(array, 1);
  10380. * // => 'b'
  10381. *
  10382. * _.nth(array, -2);
  10383. * // => 'c';
  10384. */
  10385. function nth(array, n) {
  10386. return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;
  10387. }
  10388. /**
  10389. * Removes all given values from `array` using
  10390. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  10391. * for equality comparisons.
  10392. *
  10393. * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`
  10394. * to remove elements from an array by predicate.
  10395. *
  10396. * @static
  10397. * @memberOf _
  10398. * @since 2.0.0
  10399. * @category Array
  10400. * @param {Array} array The array to modify.
  10401. * @param {...*} [values] The values to remove.
  10402. * @returns {Array} Returns `array`.
  10403. * @example
  10404. *
  10405. * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
  10406. *
  10407. * _.pull(array, 'a', 'c');
  10408. * console.log(array);
  10409. * // => ['b', 'b']
  10410. */
  10411. var pull = baseRest(pullAll);
  10412. /**
  10413. * This method is like `_.pull` except that it accepts an array of values to remove.
  10414. *
  10415. * **Note:** Unlike `_.difference`, this method mutates `array`.
  10416. *
  10417. * @static
  10418. * @memberOf _
  10419. * @since 4.0.0
  10420. * @category Array
  10421. * @param {Array} array The array to modify.
  10422. * @param {Array} values The values to remove.
  10423. * @returns {Array} Returns `array`.
  10424. * @example
  10425. *
  10426. * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
  10427. *
  10428. * _.pullAll(array, ['a', 'c']);
  10429. * console.log(array);
  10430. * // => ['b', 'b']
  10431. */
  10432. function pullAll(array, values) {
  10433. return (array && array.length && values && values.length)
  10434. ? basePullAll(array, values)
  10435. : array;
  10436. }
  10437. /**
  10438. * This method is like `_.pullAll` except that it accepts `iteratee` which is
  10439. * invoked for each element of `array` and `values` to generate the criterion
  10440. * by which they're compared. The iteratee is invoked with one argument: (value).
  10441. *
  10442. * **Note:** Unlike `_.differenceBy`, this method mutates `array`.
  10443. *
  10444. * @static
  10445. * @memberOf _
  10446. * @since 4.0.0
  10447. * @category Array
  10448. * @param {Array} array The array to modify.
  10449. * @param {Array} values The values to remove.
  10450. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  10451. * @returns {Array} Returns `array`.
  10452. * @example
  10453. *
  10454. * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];
  10455. *
  10456. * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');
  10457. * console.log(array);
  10458. * // => [{ 'x': 2 }]
  10459. */
  10460. function pullAllBy(array, values, iteratee) {
  10461. return (array && array.length && values && values.length)
  10462. ? basePullAll(array, values, getIteratee(iteratee, 2))
  10463. : array;
  10464. }
  10465. /**
  10466. * This method is like `_.pullAll` except that it accepts `comparator` which
  10467. * is invoked to compare elements of `array` to `values`. The comparator is
  10468. * invoked with two arguments: (arrVal, othVal).
  10469. *
  10470. * **Note:** Unlike `_.differenceWith`, this method mutates `array`.
  10471. *
  10472. * @static
  10473. * @memberOf _
  10474. * @since 4.6.0
  10475. * @category Array
  10476. * @param {Array} array The array to modify.
  10477. * @param {Array} values The values to remove.
  10478. * @param {Function} [comparator] The comparator invoked per element.
  10479. * @returns {Array} Returns `array`.
  10480. * @example
  10481. *
  10482. * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];
  10483. *
  10484. * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);
  10485. * console.log(array);
  10486. * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]
  10487. */
  10488. function pullAllWith(array, values, comparator) {
  10489. return (array && array.length && values && values.length)
  10490. ? basePullAll(array, values, undefined, comparator)
  10491. : array;
  10492. }
  10493. /**
  10494. * Removes elements from `array` corresponding to `indexes` and returns an
  10495. * array of removed elements.
  10496. *
  10497. * **Note:** Unlike `_.at`, this method mutates `array`.
  10498. *
  10499. * @static
  10500. * @memberOf _
  10501. * @since 3.0.0
  10502. * @category Array
  10503. * @param {Array} array The array to modify.
  10504. * @param {...(number|number[])} [indexes] The indexes of elements to remove.
  10505. * @returns {Array} Returns the new array of removed elements.
  10506. * @example
  10507. *
  10508. * var array = ['a', 'b', 'c', 'd'];
  10509. * var pulled = _.pullAt(array, [1, 3]);
  10510. *
  10511. * console.log(array);
  10512. * // => ['a', 'c']
  10513. *
  10514. * console.log(pulled);
  10515. * // => ['b', 'd']
  10516. */
  10517. var pullAt = flatRest(function(array, indexes) {
  10518. var length = array == null ? 0 : array.length,
  10519. result = baseAt(array, indexes);
  10520. basePullAt(array, arrayMap(indexes, function(index) {
  10521. return isIndex(index, length) ? +index : index;
  10522. }).sort(compareAscending));
  10523. return result;
  10524. });
  10525. /**
  10526. * Removes all elements from `array` that `predicate` returns truthy for
  10527. * and returns an array of the removed elements. The predicate is invoked
  10528. * with three arguments: (value, index, array).
  10529. *
  10530. * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`
  10531. * to pull elements from an array by value.
  10532. *
  10533. * @static
  10534. * @memberOf _
  10535. * @since 2.0.0
  10536. * @category Array
  10537. * @param {Array} array The array to modify.
  10538. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  10539. * @returns {Array} Returns the new array of removed elements.
  10540. * @example
  10541. *
  10542. * var array = [1, 2, 3, 4];
  10543. * var evens = _.remove(array, function(n) {
  10544. * return n % 2 == 0;
  10545. * });
  10546. *
  10547. * console.log(array);
  10548. * // => [1, 3]
  10549. *
  10550. * console.log(evens);
  10551. * // => [2, 4]
  10552. */
  10553. function remove(array, predicate) {
  10554. var result = [];
  10555. if (!(array && array.length)) {
  10556. return result;
  10557. }
  10558. var index = -1,
  10559. indexes = [],
  10560. length = array.length;
  10561. predicate = getIteratee(predicate, 3);
  10562. while (++index < length) {
  10563. var value = array[index];
  10564. if (predicate(value, index, array)) {
  10565. result.push(value);
  10566. indexes.push(index);
  10567. }
  10568. }
  10569. basePullAt(array, indexes);
  10570. return result;
  10571. }
  10572. /**
  10573. * Reverses `array` so that the first element becomes the last, the second
  10574. * element becomes the second to last, and so on.
  10575. *
  10576. * **Note:** This method mutates `array` and is based on
  10577. * [`Array#reverse`](https://mdn.io/Array/reverse).
  10578. *
  10579. * @static
  10580. * @memberOf _
  10581. * @since 4.0.0
  10582. * @category Array
  10583. * @param {Array} array The array to modify.
  10584. * @returns {Array} Returns `array`.
  10585. * @example
  10586. *
  10587. * var array = [1, 2, 3];
  10588. *
  10589. * _.reverse(array);
  10590. * // => [3, 2, 1]
  10591. *
  10592. * console.log(array);
  10593. * // => [3, 2, 1]
  10594. */
  10595. function reverse(array) {
  10596. return array == null ? array : nativeReverse.call(array);
  10597. }
  10598. /**
  10599. * Creates a slice of `array` from `start` up to, but not including, `end`.
  10600. *
  10601. * **Note:** This method is used instead of
  10602. * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are
  10603. * returned.
  10604. *
  10605. * @static
  10606. * @memberOf _
  10607. * @since 3.0.0
  10608. * @category Array
  10609. * @param {Array} array The array to slice.
  10610. * @param {number} [start=0] The start position.
  10611. * @param {number} [end=array.length] The end position.
  10612. * @returns {Array} Returns the slice of `array`.
  10613. */
  10614. function slice(array, start, end) {
  10615. var length = array == null ? 0 : array.length;
  10616. if (!length) {
  10617. return [];
  10618. }
  10619. if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {
  10620. start = 0;
  10621. end = length;
  10622. }
  10623. else {
  10624. start = start == null ? 0 : toInteger(start);
  10625. end = end === undefined ? length : toInteger(end);
  10626. }
  10627. return baseSlice(array, start, end);
  10628. }
  10629. /**
  10630. * Uses a binary search to determine the lowest index at which `value`
  10631. * should be inserted into `array` in order to maintain its sort order.
  10632. *
  10633. * @static
  10634. * @memberOf _
  10635. * @since 0.1.0
  10636. * @category Array
  10637. * @param {Array} array The sorted array to inspect.
  10638. * @param {*} value The value to evaluate.
  10639. * @returns {number} Returns the index at which `value` should be inserted
  10640. * into `array`.
  10641. * @example
  10642. *
  10643. * _.sortedIndex([30, 50], 40);
  10644. * // => 1
  10645. */
  10646. function sortedIndex(array, value) {
  10647. return baseSortedIndex(array, value);
  10648. }
  10649. /**
  10650. * This method is like `_.sortedIndex` except that it accepts `iteratee`
  10651. * which is invoked for `value` and each element of `array` to compute their
  10652. * sort ranking. The iteratee is invoked with one argument: (value).
  10653. *
  10654. * @static
  10655. * @memberOf _
  10656. * @since 4.0.0
  10657. * @category Array
  10658. * @param {Array} array The sorted array to inspect.
  10659. * @param {*} value The value to evaluate.
  10660. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  10661. * @returns {number} Returns the index at which `value` should be inserted
  10662. * into `array`.
  10663. * @example
  10664. *
  10665. * var objects = [{ 'x': 4 }, { 'x': 5 }];
  10666. *
  10667. * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
  10668. * // => 0
  10669. *
  10670. * // The `_.property` iteratee shorthand.
  10671. * _.sortedIndexBy(objects, { 'x': 4 }, 'x');
  10672. * // => 0
  10673. */
  10674. function sortedIndexBy(array, value, iteratee) {
  10675. return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));
  10676. }
  10677. /**
  10678. * This method is like `_.indexOf` except that it performs a binary
  10679. * search on a sorted `array`.
  10680. *
  10681. * @static
  10682. * @memberOf _
  10683. * @since 4.0.0
  10684. * @category Array
  10685. * @param {Array} array The array to inspect.
  10686. * @param {*} value The value to search for.
  10687. * @returns {number} Returns the index of the matched value, else `-1`.
  10688. * @example
  10689. *
  10690. * _.sortedIndexOf([4, 5, 5, 5, 6], 5);
  10691. * // => 1
  10692. */
  10693. function sortedIndexOf(array, value) {
  10694. var length = array == null ? 0 : array.length;
  10695. if (length) {
  10696. var index = baseSortedIndex(array, value);
  10697. if (index < length && eq(array[index], value)) {
  10698. return index;
  10699. }
  10700. }
  10701. return -1;
  10702. }
  10703. /**
  10704. * This method is like `_.sortedIndex` except that it returns the highest
  10705. * index at which `value` should be inserted into `array` in order to
  10706. * maintain its sort order.
  10707. *
  10708. * @static
  10709. * @memberOf _
  10710. * @since 3.0.0
  10711. * @category Array
  10712. * @param {Array} array The sorted array to inspect.
  10713. * @param {*} value The value to evaluate.
  10714. * @returns {number} Returns the index at which `value` should be inserted
  10715. * into `array`.
  10716. * @example
  10717. *
  10718. * _.sortedLastIndex([4, 5, 5, 5, 6], 5);
  10719. * // => 4
  10720. */
  10721. function sortedLastIndex(array, value) {
  10722. return baseSortedIndex(array, value, true);
  10723. }
  10724. /**
  10725. * This method is like `_.sortedLastIndex` except that it accepts `iteratee`
  10726. * which is invoked for `value` and each element of `array` to compute their
  10727. * sort ranking. The iteratee is invoked with one argument: (value).
  10728. *
  10729. * @static
  10730. * @memberOf _
  10731. * @since 4.0.0
  10732. * @category Array
  10733. * @param {Array} array The sorted array to inspect.
  10734. * @param {*} value The value to evaluate.
  10735. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  10736. * @returns {number} Returns the index at which `value` should be inserted
  10737. * into `array`.
  10738. * @example
  10739. *
  10740. * var objects = [{ 'x': 4 }, { 'x': 5 }];
  10741. *
  10742. * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
  10743. * // => 1
  10744. *
  10745. * // The `_.property` iteratee shorthand.
  10746. * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');
  10747. * // => 1
  10748. */
  10749. function sortedLastIndexBy(array, value, iteratee) {
  10750. return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);
  10751. }
  10752. /**
  10753. * This method is like `_.lastIndexOf` except that it performs a binary
  10754. * search on a sorted `array`.
  10755. *
  10756. * @static
  10757. * @memberOf _
  10758. * @since 4.0.0
  10759. * @category Array
  10760. * @param {Array} array The array to inspect.
  10761. * @param {*} value The value to search for.
  10762. * @returns {number} Returns the index of the matched value, else `-1`.
  10763. * @example
  10764. *
  10765. * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);
  10766. * // => 3
  10767. */
  10768. function sortedLastIndexOf(array, value) {
  10769. var length = array == null ? 0 : array.length;
  10770. if (length) {
  10771. var index = baseSortedIndex(array, value, true) - 1;
  10772. if (eq(array[index], value)) {
  10773. return index;
  10774. }
  10775. }
  10776. return -1;
  10777. }
  10778. /**
  10779. * This method is like `_.uniq` except that it's designed and optimized
  10780. * for sorted arrays.
  10781. *
  10782. * @static
  10783. * @memberOf _
  10784. * @since 4.0.0
  10785. * @category Array
  10786. * @param {Array} array The array to inspect.
  10787. * @returns {Array} Returns the new duplicate free array.
  10788. * @example
  10789. *
  10790. * _.sortedUniq([1, 1, 2]);
  10791. * // => [1, 2]
  10792. */
  10793. function sortedUniq(array) {
  10794. return (array && array.length)
  10795. ? baseSortedUniq(array)
  10796. : [];
  10797. }
  10798. /**
  10799. * This method is like `_.uniqBy` except that it's designed and optimized
  10800. * for sorted arrays.
  10801. *
  10802. * @static
  10803. * @memberOf _
  10804. * @since 4.0.0
  10805. * @category Array
  10806. * @param {Array} array The array to inspect.
  10807. * @param {Function} [iteratee] The iteratee invoked per element.
  10808. * @returns {Array} Returns the new duplicate free array.
  10809. * @example
  10810. *
  10811. * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);
  10812. * // => [1.1, 2.3]
  10813. */
  10814. function sortedUniqBy(array, iteratee) {
  10815. return (array && array.length)
  10816. ? baseSortedUniq(array, getIteratee(iteratee, 2))
  10817. : [];
  10818. }
  10819. /**
  10820. * Gets all but the first element of `array`.
  10821. *
  10822. * @static
  10823. * @memberOf _
  10824. * @since 4.0.0
  10825. * @category Array
  10826. * @param {Array} array The array to query.
  10827. * @returns {Array} Returns the slice of `array`.
  10828. * @example
  10829. *
  10830. * _.tail([1, 2, 3]);
  10831. * // => [2, 3]
  10832. */
  10833. function tail(array) {
  10834. var length = array == null ? 0 : array.length;
  10835. return length ? baseSlice(array, 1, length) : [];
  10836. }
  10837. /**
  10838. * Creates a slice of `array` with `n` elements taken from the beginning.
  10839. *
  10840. * @static
  10841. * @memberOf _
  10842. * @since 0.1.0
  10843. * @category Array
  10844. * @param {Array} array The array to query.
  10845. * @param {number} [n=1] The number of elements to take.
  10846. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  10847. * @returns {Array} Returns the slice of `array`.
  10848. * @example
  10849. *
  10850. * _.take([1, 2, 3]);
  10851. * // => [1]
  10852. *
  10853. * _.take([1, 2, 3], 2);
  10854. * // => [1, 2]
  10855. *
  10856. * _.take([1, 2, 3], 5);
  10857. * // => [1, 2, 3]
  10858. *
  10859. * _.take([1, 2, 3], 0);
  10860. * // => []
  10861. */
  10862. function take(array, n, guard) {
  10863. if (!(array && array.length)) {
  10864. return [];
  10865. }
  10866. n = (guard || n === undefined) ? 1 : toInteger(n);
  10867. return baseSlice(array, 0, n < 0 ? 0 : n);
  10868. }
  10869. /**
  10870. * Creates a slice of `array` with `n` elements taken from the end.
  10871. *
  10872. * @static
  10873. * @memberOf _
  10874. * @since 3.0.0
  10875. * @category Array
  10876. * @param {Array} array The array to query.
  10877. * @param {number} [n=1] The number of elements to take.
  10878. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  10879. * @returns {Array} Returns the slice of `array`.
  10880. * @example
  10881. *
  10882. * _.takeRight([1, 2, 3]);
  10883. * // => [3]
  10884. *
  10885. * _.takeRight([1, 2, 3], 2);
  10886. * // => [2, 3]
  10887. *
  10888. * _.takeRight([1, 2, 3], 5);
  10889. * // => [1, 2, 3]
  10890. *
  10891. * _.takeRight([1, 2, 3], 0);
  10892. * // => []
  10893. */
  10894. function takeRight(array, n, guard) {
  10895. var length = array == null ? 0 : array.length;
  10896. if (!length) {
  10897. return [];
  10898. }
  10899. n = (guard || n === undefined) ? 1 : toInteger(n);
  10900. n = length - n;
  10901. return baseSlice(array, n < 0 ? 0 : n, length);
  10902. }
  10903. /**
  10904. * Creates a slice of `array` with elements taken from the end. Elements are
  10905. * taken until `predicate` returns falsey. The predicate is invoked with
  10906. * three arguments: (value, index, array).
  10907. *
  10908. * @static
  10909. * @memberOf _
  10910. * @since 3.0.0
  10911. * @category Array
  10912. * @param {Array} array The array to query.
  10913. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  10914. * @returns {Array} Returns the slice of `array`.
  10915. * @example
  10916. *
  10917. * var users = [
  10918. * { 'user': 'barney', 'active': true },
  10919. * { 'user': 'fred', 'active': false },
  10920. * { 'user': 'pebbles', 'active': false }
  10921. * ];
  10922. *
  10923. * _.takeRightWhile(users, function(o) { return !o.active; });
  10924. * // => objects for ['fred', 'pebbles']
  10925. *
  10926. * // The `_.matches` iteratee shorthand.
  10927. * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });
  10928. * // => objects for ['pebbles']
  10929. *
  10930. * // The `_.matchesProperty` iteratee shorthand.
  10931. * _.takeRightWhile(users, ['active', false]);
  10932. * // => objects for ['fred', 'pebbles']
  10933. *
  10934. * // The `_.property` iteratee shorthand.
  10935. * _.takeRightWhile(users, 'active');
  10936. * // => []
  10937. */
  10938. function takeRightWhile(array, predicate) {
  10939. return (array && array.length)
  10940. ? baseWhile(array, getIteratee(predicate, 3), false, true)
  10941. : [];
  10942. }
  10943. /**
  10944. * Creates a slice of `array` with elements taken from the beginning. Elements
  10945. * are taken until `predicate` returns falsey. The predicate is invoked with
  10946. * three arguments: (value, index, array).
  10947. *
  10948. * @static
  10949. * @memberOf _
  10950. * @since 3.0.0
  10951. * @category Array
  10952. * @param {Array} array The array to query.
  10953. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  10954. * @returns {Array} Returns the slice of `array`.
  10955. * @example
  10956. *
  10957. * var users = [
  10958. * { 'user': 'barney', 'active': false },
  10959. * { 'user': 'fred', 'active': false },
  10960. * { 'user': 'pebbles', 'active': true }
  10961. * ];
  10962. *
  10963. * _.takeWhile(users, function(o) { return !o.active; });
  10964. * // => objects for ['barney', 'fred']
  10965. *
  10966. * // The `_.matches` iteratee shorthand.
  10967. * _.takeWhile(users, { 'user': 'barney', 'active': false });
  10968. * // => objects for ['barney']
  10969. *
  10970. * // The `_.matchesProperty` iteratee shorthand.
  10971. * _.takeWhile(users, ['active', false]);
  10972. * // => objects for ['barney', 'fred']
  10973. *
  10974. * // The `_.property` iteratee shorthand.
  10975. * _.takeWhile(users, 'active');
  10976. * // => []
  10977. */
  10978. function takeWhile(array, predicate) {
  10979. return (array && array.length)
  10980. ? baseWhile(array, getIteratee(predicate, 3))
  10981. : [];
  10982. }
  10983. /**
  10984. * Creates an array of unique values, in order, from all given arrays using
  10985. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  10986. * for equality comparisons.
  10987. *
  10988. * @static
  10989. * @memberOf _
  10990. * @since 0.1.0
  10991. * @category Array
  10992. * @param {...Array} [arrays] The arrays to inspect.
  10993. * @returns {Array} Returns the new array of combined values.
  10994. * @example
  10995. *
  10996. * _.union([2], [1, 2]);
  10997. * // => [2, 1]
  10998. */
  10999. var union = baseRest(function(arrays) {
  11000. return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));
  11001. });
  11002. /**
  11003. * This method is like `_.union` except that it accepts `iteratee` which is
  11004. * invoked for each element of each `arrays` to generate the criterion by
  11005. * which uniqueness is computed. Result values are chosen from the first
  11006. * array in which the value occurs. The iteratee is invoked with one argument:
  11007. * (value).
  11008. *
  11009. * @static
  11010. * @memberOf _
  11011. * @since 4.0.0
  11012. * @category Array
  11013. * @param {...Array} [arrays] The arrays to inspect.
  11014. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  11015. * @returns {Array} Returns the new array of combined values.
  11016. * @example
  11017. *
  11018. * _.unionBy([2.1], [1.2, 2.3], Math.floor);
  11019. * // => [2.1, 1.2]
  11020. *
  11021. * // The `_.property` iteratee shorthand.
  11022. * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
  11023. * // => [{ 'x': 1 }, { 'x': 2 }]
  11024. */
  11025. var unionBy = baseRest(function(arrays) {
  11026. var iteratee = last(arrays);
  11027. if (isArrayLikeObject(iteratee)) {
  11028. iteratee = undefined;
  11029. }
  11030. return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2));
  11031. });
  11032. /**
  11033. * This method is like `_.union` except that it accepts `comparator` which
  11034. * is invoked to compare elements of `arrays`. Result values are chosen from
  11035. * the first array in which the value occurs. The comparator is invoked
  11036. * with two arguments: (arrVal, othVal).
  11037. *
  11038. * @static
  11039. * @memberOf _
  11040. * @since 4.0.0
  11041. * @category Array
  11042. * @param {...Array} [arrays] The arrays to inspect.
  11043. * @param {Function} [comparator] The comparator invoked per element.
  11044. * @returns {Array} Returns the new array of combined values.
  11045. * @example
  11046. *
  11047. * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
  11048. * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
  11049. *
  11050. * _.unionWith(objects, others, _.isEqual);
  11051. * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
  11052. */
  11053. var unionWith = baseRest(function(arrays) {
  11054. var comparator = last(arrays);
  11055. comparator = typeof comparator == 'function' ? comparator : undefined;
  11056. return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);
  11057. });
  11058. /**
  11059. * Creates a duplicate-free version of an array, using
  11060. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  11061. * for equality comparisons, in which only the first occurrence of each element
  11062. * is kept. The order of result values is determined by the order they occur
  11063. * in the array.
  11064. *
  11065. * @static
  11066. * @memberOf _
  11067. * @since 0.1.0
  11068. * @category Array
  11069. * @param {Array} array The array to inspect.
  11070. * @returns {Array} Returns the new duplicate free array.
  11071. * @example
  11072. *
  11073. * _.uniq([2, 1, 2]);
  11074. * // => [2, 1]
  11075. */
  11076. function uniq(array) {
  11077. return (array && array.length) ? baseUniq(array) : [];
  11078. }
  11079. /**
  11080. * This method is like `_.uniq` except that it accepts `iteratee` which is
  11081. * invoked for each element in `array` to generate the criterion by which
  11082. * uniqueness is computed. The order of result values is determined by the
  11083. * order they occur in the array. The iteratee is invoked with one argument:
  11084. * (value).
  11085. *
  11086. * @static
  11087. * @memberOf _
  11088. * @since 4.0.0
  11089. * @category Array
  11090. * @param {Array} array The array to inspect.
  11091. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  11092. * @returns {Array} Returns the new duplicate free array.
  11093. * @example
  11094. *
  11095. * _.uniqBy([2.1, 1.2, 2.3], Math.floor);
  11096. * // => [2.1, 1.2]
  11097. *
  11098. * // The `_.property` iteratee shorthand.
  11099. * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
  11100. * // => [{ 'x': 1 }, { 'x': 2 }]
  11101. */
  11102. function uniqBy(array, iteratee) {
  11103. return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : [];
  11104. }
  11105. /**
  11106. * This method is like `_.uniq` except that it accepts `comparator` which
  11107. * is invoked to compare elements of `array`. The order of result values is
  11108. * determined by the order they occur in the array.The comparator is invoked
  11109. * with two arguments: (arrVal, othVal).
  11110. *
  11111. * @static
  11112. * @memberOf _
  11113. * @since 4.0.0
  11114. * @category Array
  11115. * @param {Array} array The array to inspect.
  11116. * @param {Function} [comparator] The comparator invoked per element.
  11117. * @returns {Array} Returns the new duplicate free array.
  11118. * @example
  11119. *
  11120. * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];
  11121. *
  11122. * _.uniqWith(objects, _.isEqual);
  11123. * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]
  11124. */
  11125. function uniqWith(array, comparator) {
  11126. comparator = typeof comparator == 'function' ? comparator : undefined;
  11127. return (array && array.length) ? baseUniq(array, undefined, comparator) : [];
  11128. }
  11129. /**
  11130. * This method is like `_.zip` except that it accepts an array of grouped
  11131. * elements and creates an array regrouping the elements to their pre-zip
  11132. * configuration.
  11133. *
  11134. * @static
  11135. * @memberOf _
  11136. * @since 1.2.0
  11137. * @category Array
  11138. * @param {Array} array The array of grouped elements to process.
  11139. * @returns {Array} Returns the new array of regrouped elements.
  11140. * @example
  11141. *
  11142. * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);
  11143. * // => [['a', 1, true], ['b', 2, false]]
  11144. *
  11145. * _.unzip(zipped);
  11146. * // => [['a', 'b'], [1, 2], [true, false]]
  11147. */
  11148. function unzip(array) {
  11149. if (!(array && array.length)) {
  11150. return [];
  11151. }
  11152. var length = 0;
  11153. array = arrayFilter(array, function(group) {
  11154. if (isArrayLikeObject(group)) {
  11155. length = nativeMax(group.length, length);
  11156. return true;
  11157. }
  11158. });
  11159. return baseTimes(length, function(index) {
  11160. return arrayMap(array, baseProperty(index));
  11161. });
  11162. }
  11163. /**
  11164. * This method is like `_.unzip` except that it accepts `iteratee` to specify
  11165. * how regrouped values should be combined. The iteratee is invoked with the
  11166. * elements of each group: (...group).
  11167. *
  11168. * @static
  11169. * @memberOf _
  11170. * @since 3.8.0
  11171. * @category Array
  11172. * @param {Array} array The array of grouped elements to process.
  11173. * @param {Function} [iteratee=_.identity] The function to combine
  11174. * regrouped values.
  11175. * @returns {Array} Returns the new array of regrouped elements.
  11176. * @example
  11177. *
  11178. * var zipped = _.zip([1, 2], [10, 20], [100, 200]);
  11179. * // => [[1, 10, 100], [2, 20, 200]]
  11180. *
  11181. * _.unzipWith(zipped, _.add);
  11182. * // => [3, 30, 300]
  11183. */
  11184. function unzipWith(array, iteratee) {
  11185. if (!(array && array.length)) {
  11186. return [];
  11187. }
  11188. var result = unzip(array);
  11189. if (iteratee == null) {
  11190. return result;
  11191. }
  11192. return arrayMap(result, function(group) {
  11193. return apply(iteratee, undefined, group);
  11194. });
  11195. }
  11196. /**
  11197. * Creates an array excluding all given values using
  11198. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  11199. * for equality comparisons.
  11200. *
  11201. * **Note:** Unlike `_.pull`, this method returns a new array.
  11202. *
  11203. * @static
  11204. * @memberOf _
  11205. * @since 0.1.0
  11206. * @category Array
  11207. * @param {Array} array The array to inspect.
  11208. * @param {...*} [values] The values to exclude.
  11209. * @returns {Array} Returns the new array of filtered values.
  11210. * @see _.difference, _.xor
  11211. * @example
  11212. *
  11213. * _.without([2, 1, 2, 3], 1, 2);
  11214. * // => [3]
  11215. */
  11216. var without = baseRest(function(array, values) {
  11217. return isArrayLikeObject(array)
  11218. ? baseDifference(array, values)
  11219. : [];
  11220. });
  11221. /**
  11222. * Creates an array of unique values that is the
  11223. * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)
  11224. * of the given arrays. The order of result values is determined by the order
  11225. * they occur in the arrays.
  11226. *
  11227. * @static
  11228. * @memberOf _
  11229. * @since 2.4.0
  11230. * @category Array
  11231. * @param {...Array} [arrays] The arrays to inspect.
  11232. * @returns {Array} Returns the new array of filtered values.
  11233. * @see _.difference, _.without
  11234. * @example
  11235. *
  11236. * _.xor([2, 1], [2, 3]);
  11237. * // => [1, 3]
  11238. */
  11239. var xor = baseRest(function(arrays) {
  11240. return baseXor(arrayFilter(arrays, isArrayLikeObject));
  11241. });
  11242. /**
  11243. * This method is like `_.xor` except that it accepts `iteratee` which is
  11244. * invoked for each element of each `arrays` to generate the criterion by
  11245. * which by which they're compared. The order of result values is determined
  11246. * by the order they occur in the arrays. The iteratee is invoked with one
  11247. * argument: (value).
  11248. *
  11249. * @static
  11250. * @memberOf _
  11251. * @since 4.0.0
  11252. * @category Array
  11253. * @param {...Array} [arrays] The arrays to inspect.
  11254. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  11255. * @returns {Array} Returns the new array of filtered values.
  11256. * @example
  11257. *
  11258. * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);
  11259. * // => [1.2, 3.4]
  11260. *
  11261. * // The `_.property` iteratee shorthand.
  11262. * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
  11263. * // => [{ 'x': 2 }]
  11264. */
  11265. var xorBy = baseRest(function(arrays) {
  11266. var iteratee = last(arrays);
  11267. if (isArrayLikeObject(iteratee)) {
  11268. iteratee = undefined;
  11269. }
  11270. return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));
  11271. });
  11272. /**
  11273. * This method is like `_.xor` except that it accepts `comparator` which is
  11274. * invoked to compare elements of `arrays`. The order of result values is
  11275. * determined by the order they occur in the arrays. The comparator is invoked
  11276. * with two arguments: (arrVal, othVal).
  11277. *
  11278. * @static
  11279. * @memberOf _
  11280. * @since 4.0.0
  11281. * @category Array
  11282. * @param {...Array} [arrays] The arrays to inspect.
  11283. * @param {Function} [comparator] The comparator invoked per element.
  11284. * @returns {Array} Returns the new array of filtered values.
  11285. * @example
  11286. *
  11287. * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
  11288. * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
  11289. *
  11290. * _.xorWith(objects, others, _.isEqual);
  11291. * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
  11292. */
  11293. var xorWith = baseRest(function(arrays) {
  11294. var comparator = last(arrays);
  11295. comparator = typeof comparator == 'function' ? comparator : undefined;
  11296. return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);
  11297. });
  11298. /**
  11299. * Creates an array of grouped elements, the first of which contains the
  11300. * first elements of the given arrays, the second of which contains the
  11301. * second elements of the given arrays, and so on.
  11302. *
  11303. * @static
  11304. * @memberOf _
  11305. * @since 0.1.0
  11306. * @category Array
  11307. * @param {...Array} [arrays] The arrays to process.
  11308. * @returns {Array} Returns the new array of grouped elements.
  11309. * @example
  11310. *
  11311. * _.zip(['a', 'b'], [1, 2], [true, false]);
  11312. * // => [['a', 1, true], ['b', 2, false]]
  11313. */
  11314. var zip = baseRest(unzip);
  11315. /**
  11316. * This method is like `_.fromPairs` except that it accepts two arrays,
  11317. * one of property identifiers and one of corresponding values.
  11318. *
  11319. * @static
  11320. * @memberOf _
  11321. * @since 0.4.0
  11322. * @category Array
  11323. * @param {Array} [props=[]] The property identifiers.
  11324. * @param {Array} [values=[]] The property values.
  11325. * @returns {Object} Returns the new object.
  11326. * @example
  11327. *
  11328. * _.zipObject(['a', 'b'], [1, 2]);
  11329. * // => { 'a': 1, 'b': 2 }
  11330. */
  11331. function zipObject(props, values) {
  11332. return baseZipObject(props || [], values || [], assignValue);
  11333. }
  11334. /**
  11335. * This method is like `_.zipObject` except that it supports property paths.
  11336. *
  11337. * @static
  11338. * @memberOf _
  11339. * @since 4.1.0
  11340. * @category Array
  11341. * @param {Array} [props=[]] The property identifiers.
  11342. * @param {Array} [values=[]] The property values.
  11343. * @returns {Object} Returns the new object.
  11344. * @example
  11345. *
  11346. * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);
  11347. * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }
  11348. */
  11349. function zipObjectDeep(props, values) {
  11350. return baseZipObject(props || [], values || [], baseSet);
  11351. }
  11352. /**
  11353. * This method is like `_.zip` except that it accepts `iteratee` to specify
  11354. * how grouped values should be combined. The iteratee is invoked with the
  11355. * elements of each group: (...group).
  11356. *
  11357. * @static
  11358. * @memberOf _
  11359. * @since 3.8.0
  11360. * @category Array
  11361. * @param {...Array} [arrays] The arrays to process.
  11362. * @param {Function} [iteratee=_.identity] The function to combine
  11363. * grouped values.
  11364. * @returns {Array} Returns the new array of grouped elements.
  11365. * @example
  11366. *
  11367. * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {
  11368. * return a + b + c;
  11369. * });
  11370. * // => [111, 222]
  11371. */
  11372. var zipWith = baseRest(function(arrays) {
  11373. var length = arrays.length,
  11374. iteratee = length > 1 ? arrays[length - 1] : undefined;
  11375. iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;
  11376. return unzipWith(arrays, iteratee);
  11377. });
  11378. /*------------------------------------------------------------------------*/
  11379. /**
  11380. * Creates a `lodash` wrapper instance that wraps `value` with explicit method
  11381. * chain sequences enabled. The result of such sequences must be unwrapped
  11382. * with `_#value`.
  11383. *
  11384. * @static
  11385. * @memberOf _
  11386. * @since 1.3.0
  11387. * @category Seq
  11388. * @param {*} value The value to wrap.
  11389. * @returns {Object} Returns the new `lodash` wrapper instance.
  11390. * @example
  11391. *
  11392. * var users = [
  11393. * { 'user': 'barney', 'age': 36 },
  11394. * { 'user': 'fred', 'age': 40 },
  11395. * { 'user': 'pebbles', 'age': 1 }
  11396. * ];
  11397. *
  11398. * var youngest = _
  11399. * .chain(users)
  11400. * .sortBy('age')
  11401. * .map(function(o) {
  11402. * return o.user + ' is ' + o.age;
  11403. * })
  11404. * .head()
  11405. * .value();
  11406. * // => 'pebbles is 1'
  11407. */
  11408. function chain(value) {
  11409. var result = lodash(value);
  11410. result.__chain__ = true;
  11411. return result;
  11412. }
  11413. /**
  11414. * This method invokes `interceptor` and returns `value`. The interceptor
  11415. * is invoked with one argument; (value). The purpose of this method is to
  11416. * "tap into" a method chain sequence in order to modify intermediate results.
  11417. *
  11418. * @static
  11419. * @memberOf _
  11420. * @since 0.1.0
  11421. * @category Seq
  11422. * @param {*} value The value to provide to `interceptor`.
  11423. * @param {Function} interceptor The function to invoke.
  11424. * @returns {*} Returns `value`.
  11425. * @example
  11426. *
  11427. * _([1, 2, 3])
  11428. * .tap(function(array) {
  11429. * // Mutate input array.
  11430. * array.pop();
  11431. * })
  11432. * .reverse()
  11433. * .value();
  11434. * // => [2, 1]
  11435. */
  11436. function tap(value, interceptor) {
  11437. interceptor(value);
  11438. return value;
  11439. }
  11440. /**
  11441. * This method is like `_.tap` except that it returns the result of `interceptor`.
  11442. * The purpose of this method is to "pass thru" values replacing intermediate
  11443. * results in a method chain sequence.
  11444. *
  11445. * @static
  11446. * @memberOf _
  11447. * @since 3.0.0
  11448. * @category Seq
  11449. * @param {*} value The value to provide to `interceptor`.
  11450. * @param {Function} interceptor The function to invoke.
  11451. * @returns {*} Returns the result of `interceptor`.
  11452. * @example
  11453. *
  11454. * _(' abc ')
  11455. * .chain()
  11456. * .trim()
  11457. * .thru(function(value) {
  11458. * return [value];
  11459. * })
  11460. * .value();
  11461. * // => ['abc']
  11462. */
  11463. function thru(value, interceptor) {
  11464. return interceptor(value);
  11465. }
  11466. /**
  11467. * This method is the wrapper version of `_.at`.
  11468. *
  11469. * @name at
  11470. * @memberOf _
  11471. * @since 1.0.0
  11472. * @category Seq
  11473. * @param {...(string|string[])} [paths] The property paths to pick.
  11474. * @returns {Object} Returns the new `lodash` wrapper instance.
  11475. * @example
  11476. *
  11477. * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
  11478. *
  11479. * _(object).at(['a[0].b.c', 'a[1]']).value();
  11480. * // => [3, 4]
  11481. */
  11482. var wrapperAt = flatRest(function(paths) {
  11483. var length = paths.length,
  11484. start = length ? paths[0] : 0,
  11485. value = this.__wrapped__,
  11486. interceptor = function(object) { return baseAt(object, paths); };
  11487. if (length > 1 || this.__actions__.length ||
  11488. !(value instanceof LazyWrapper) || !isIndex(start)) {
  11489. return this.thru(interceptor);
  11490. }
  11491. value = value.slice(start, +start + (length ? 1 : 0));
  11492. value.__actions__.push({
  11493. 'func': thru,
  11494. 'args': [interceptor],
  11495. 'thisArg': undefined
  11496. });
  11497. return new LodashWrapper(value, this.__chain__).thru(function(array) {
  11498. if (length && !array.length) {
  11499. array.push(undefined);
  11500. }
  11501. return array;
  11502. });
  11503. });
  11504. /**
  11505. * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.
  11506. *
  11507. * @name chain
  11508. * @memberOf _
  11509. * @since 0.1.0
  11510. * @category Seq
  11511. * @returns {Object} Returns the new `lodash` wrapper instance.
  11512. * @example
  11513. *
  11514. * var users = [
  11515. * { 'user': 'barney', 'age': 36 },
  11516. * { 'user': 'fred', 'age': 40 }
  11517. * ];
  11518. *
  11519. * // A sequence without explicit chaining.
  11520. * _(users).head();
  11521. * // => { 'user': 'barney', 'age': 36 }
  11522. *
  11523. * // A sequence with explicit chaining.
  11524. * _(users)
  11525. * .chain()
  11526. * .head()
  11527. * .pick('user')
  11528. * .value();
  11529. * // => { 'user': 'barney' }
  11530. */
  11531. function wrapperChain() {
  11532. return chain(this);
  11533. }
  11534. /**
  11535. * Executes the chain sequence and returns the wrapped result.
  11536. *
  11537. * @name commit
  11538. * @memberOf _
  11539. * @since 3.2.0
  11540. * @category Seq
  11541. * @returns {Object} Returns the new `lodash` wrapper instance.
  11542. * @example
  11543. *
  11544. * var array = [1, 2];
  11545. * var wrapped = _(array).push(3);
  11546. *
  11547. * console.log(array);
  11548. * // => [1, 2]
  11549. *
  11550. * wrapped = wrapped.commit();
  11551. * console.log(array);
  11552. * // => [1, 2, 3]
  11553. *
  11554. * wrapped.last();
  11555. * // => 3
  11556. *
  11557. * console.log(array);
  11558. * // => [1, 2, 3]
  11559. */
  11560. function wrapperCommit() {
  11561. return new LodashWrapper(this.value(), this.__chain__);
  11562. }
  11563. /**
  11564. * Gets the next value on a wrapped object following the
  11565. * [iterator protocol](https://mdn.io/iteration_protocols#iterator).
  11566. *
  11567. * @name next
  11568. * @memberOf _
  11569. * @since 4.0.0
  11570. * @category Seq
  11571. * @returns {Object} Returns the next iterator value.
  11572. * @example
  11573. *
  11574. * var wrapped = _([1, 2]);
  11575. *
  11576. * wrapped.next();
  11577. * // => { 'done': false, 'value': 1 }
  11578. *
  11579. * wrapped.next();
  11580. * // => { 'done': false, 'value': 2 }
  11581. *
  11582. * wrapped.next();
  11583. * // => { 'done': true, 'value': undefined }
  11584. */
  11585. function wrapperNext() {
  11586. if (this.__values__ === undefined) {
  11587. this.__values__ = toArray(this.value());
  11588. }
  11589. var done = this.__index__ >= this.__values__.length,
  11590. value = done ? undefined : this.__values__[this.__index__++];
  11591. return { 'done': done, 'value': value };
  11592. }
  11593. /**
  11594. * Enables the wrapper to be iterable.
  11595. *
  11596. * @name Symbol.iterator
  11597. * @memberOf _
  11598. * @since 4.0.0
  11599. * @category Seq
  11600. * @returns {Object} Returns the wrapper object.
  11601. * @example
  11602. *
  11603. * var wrapped = _([1, 2]);
  11604. *
  11605. * wrapped[Symbol.iterator]() === wrapped;
  11606. * // => true
  11607. *
  11608. * Array.from(wrapped);
  11609. * // => [1, 2]
  11610. */
  11611. function wrapperToIterator() {
  11612. return this;
  11613. }
  11614. /**
  11615. * Creates a clone of the chain sequence planting `value` as the wrapped value.
  11616. *
  11617. * @name plant
  11618. * @memberOf _
  11619. * @since 3.2.0
  11620. * @category Seq
  11621. * @param {*} value The value to plant.
  11622. * @returns {Object} Returns the new `lodash` wrapper instance.
  11623. * @example
  11624. *
  11625. * function square(n) {
  11626. * return n * n;
  11627. * }
  11628. *
  11629. * var wrapped = _([1, 2]).map(square);
  11630. * var other = wrapped.plant([3, 4]);
  11631. *
  11632. * other.value();
  11633. * // => [9, 16]
  11634. *
  11635. * wrapped.value();
  11636. * // => [1, 4]
  11637. */
  11638. function wrapperPlant(value) {
  11639. var result,
  11640. parent = this;
  11641. while (parent instanceof baseLodash) {
  11642. var clone = wrapperClone(parent);
  11643. clone.__index__ = 0;
  11644. clone.__values__ = undefined;
  11645. if (result) {
  11646. previous.__wrapped__ = clone;
  11647. } else {
  11648. result = clone;
  11649. }
  11650. var previous = clone;
  11651. parent = parent.__wrapped__;
  11652. }
  11653. previous.__wrapped__ = value;
  11654. return result;
  11655. }
  11656. /**
  11657. * This method is the wrapper version of `_.reverse`.
  11658. *
  11659. * **Note:** This method mutates the wrapped array.
  11660. *
  11661. * @name reverse
  11662. * @memberOf _
  11663. * @since 0.1.0
  11664. * @category Seq
  11665. * @returns {Object} Returns the new `lodash` wrapper instance.
  11666. * @example
  11667. *
  11668. * var array = [1, 2, 3];
  11669. *
  11670. * _(array).reverse().value()
  11671. * // => [3, 2, 1]
  11672. *
  11673. * console.log(array);
  11674. * // => [3, 2, 1]
  11675. */
  11676. function wrapperReverse() {
  11677. var value = this.__wrapped__;
  11678. if (value instanceof LazyWrapper) {
  11679. var wrapped = value;
  11680. if (this.__actions__.length) {
  11681. wrapped = new LazyWrapper(this);
  11682. }
  11683. wrapped = wrapped.reverse();
  11684. wrapped.__actions__.push({
  11685. 'func': thru,
  11686. 'args': [reverse],
  11687. 'thisArg': undefined
  11688. });
  11689. return new LodashWrapper(wrapped, this.__chain__);
  11690. }
  11691. return this.thru(reverse);
  11692. }
  11693. /**
  11694. * Executes the chain sequence to resolve the unwrapped value.
  11695. *
  11696. * @name value
  11697. * @memberOf _
  11698. * @since 0.1.0
  11699. * @alias toJSON, valueOf
  11700. * @category Seq
  11701. * @returns {*} Returns the resolved unwrapped value.
  11702. * @example
  11703. *
  11704. * _([1, 2, 3]).value();
  11705. * // => [1, 2, 3]
  11706. */
  11707. function wrapperValue() {
  11708. return baseWrapperValue(this.__wrapped__, this.__actions__);
  11709. }
  11710. /*------------------------------------------------------------------------*/
  11711. /**
  11712. * Creates an object composed of keys generated from the results of running
  11713. * each element of `collection` thru `iteratee`. The corresponding value of
  11714. * each key is the number of times the key was returned by `iteratee`. The
  11715. * iteratee is invoked with one argument: (value).
  11716. *
  11717. * @static
  11718. * @memberOf _
  11719. * @since 0.5.0
  11720. * @category Collection
  11721. * @param {Array|Object} collection The collection to iterate over.
  11722. * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
  11723. * @returns {Object} Returns the composed aggregate object.
  11724. * @example
  11725. *
  11726. * _.countBy([6.1, 4.2, 6.3], Math.floor);
  11727. * // => { '4': 1, '6': 2 }
  11728. *
  11729. * // The `_.property` iteratee shorthand.
  11730. * _.countBy(['one', 'two', 'three'], 'length');
  11731. * // => { '3': 2, '5': 1 }
  11732. */
  11733. var countBy = createAggregator(function(result, value, key) {
  11734. if (hasOwnProperty.call(result, key)) {
  11735. ++result[key];
  11736. } else {
  11737. baseAssignValue(result, key, 1);
  11738. }
  11739. });
  11740. /**
  11741. * Checks if `predicate` returns truthy for **all** elements of `collection`.
  11742. * Iteration is stopped once `predicate` returns falsey. The predicate is
  11743. * invoked with three arguments: (value, index|key, collection).
  11744. *
  11745. * **Note:** This method returns `true` for
  11746. * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because
  11747. * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of
  11748. * elements of empty collections.
  11749. *
  11750. * @static
  11751. * @memberOf _
  11752. * @since 0.1.0
  11753. * @category Collection
  11754. * @param {Array|Object} collection The collection to iterate over.
  11755. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  11756. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  11757. * @returns {boolean} Returns `true` if all elements pass the predicate check,
  11758. * else `false`.
  11759. * @example
  11760. *
  11761. * _.every([true, 1, null, 'yes'], Boolean);
  11762. * // => false
  11763. *
  11764. * var users = [
  11765. * { 'user': 'barney', 'age': 36, 'active': false },
  11766. * { 'user': 'fred', 'age': 40, 'active': false }
  11767. * ];
  11768. *
  11769. * // The `_.matches` iteratee shorthand.
  11770. * _.every(users, { 'user': 'barney', 'active': false });
  11771. * // => false
  11772. *
  11773. * // The `_.matchesProperty` iteratee shorthand.
  11774. * _.every(users, ['active', false]);
  11775. * // => true
  11776. *
  11777. * // The `_.property` iteratee shorthand.
  11778. * _.every(users, 'active');
  11779. * // => false
  11780. */
  11781. function every(collection, predicate, guard) {
  11782. var func = isArray(collection) ? arrayEvery : baseEvery;
  11783. if (guard && isIterateeCall(collection, predicate, guard)) {
  11784. predicate = undefined;
  11785. }
  11786. return func(collection, getIteratee(predicate, 3));
  11787. }
  11788. /**
  11789. * Iterates over elements of `collection`, returning an array of all elements
  11790. * `predicate` returns truthy for. The predicate is invoked with three
  11791. * arguments: (value, index|key, collection).
  11792. *
  11793. * **Note:** Unlike `_.remove`, this method returns a new array.
  11794. *
  11795. * @static
  11796. * @memberOf _
  11797. * @since 0.1.0
  11798. * @category Collection
  11799. * @param {Array|Object} collection The collection to iterate over.
  11800. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  11801. * @returns {Array} Returns the new filtered array.
  11802. * @see _.reject
  11803. * @example
  11804. *
  11805. * var users = [
  11806. * { 'user': 'barney', 'age': 36, 'active': true },
  11807. * { 'user': 'fred', 'age': 40, 'active': false }
  11808. * ];
  11809. *
  11810. * _.filter(users, function(o) { return !o.active; });
  11811. * // => objects for ['fred']
  11812. *
  11813. * // The `_.matches` iteratee shorthand.
  11814. * _.filter(users, { 'age': 36, 'active': true });
  11815. * // => objects for ['barney']
  11816. *
  11817. * // The `_.matchesProperty` iteratee shorthand.
  11818. * _.filter(users, ['active', false]);
  11819. * // => objects for ['fred']
  11820. *
  11821. * // The `_.property` iteratee shorthand.
  11822. * _.filter(users, 'active');
  11823. * // => objects for ['barney']
  11824. */
  11825. function filter(collection, predicate) {
  11826. var func = isArray(collection) ? arrayFilter : baseFilter;
  11827. return func(collection, getIteratee(predicate, 3));
  11828. }
  11829. /**
  11830. * Iterates over elements of `collection`, returning the first element
  11831. * `predicate` returns truthy for. The predicate is invoked with three
  11832. * arguments: (value, index|key, collection).
  11833. *
  11834. * @static
  11835. * @memberOf _
  11836. * @since 0.1.0
  11837. * @category Collection
  11838. * @param {Array|Object} collection The collection to inspect.
  11839. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  11840. * @param {number} [fromIndex=0] The index to search from.
  11841. * @returns {*} Returns the matched element, else `undefined`.
  11842. * @example
  11843. *
  11844. * var users = [
  11845. * { 'user': 'barney', 'age': 36, 'active': true },
  11846. * { 'user': 'fred', 'age': 40, 'active': false },
  11847. * { 'user': 'pebbles', 'age': 1, 'active': true }
  11848. * ];
  11849. *
  11850. * _.find(users, function(o) { return o.age < 40; });
  11851. * // => object for 'barney'
  11852. *
  11853. * // The `_.matches` iteratee shorthand.
  11854. * _.find(users, { 'age': 1, 'active': true });
  11855. * // => object for 'pebbles'
  11856. *
  11857. * // The `_.matchesProperty` iteratee shorthand.
  11858. * _.find(users, ['active', false]);
  11859. * // => object for 'fred'
  11860. *
  11861. * // The `_.property` iteratee shorthand.
  11862. * _.find(users, 'active');
  11863. * // => object for 'barney'
  11864. */
  11865. var find = createFind(findIndex);
  11866. /**
  11867. * This method is like `_.find` except that it iterates over elements of
  11868. * `collection` from right to left.
  11869. *
  11870. * @static
  11871. * @memberOf _
  11872. * @since 2.0.0
  11873. * @category Collection
  11874. * @param {Array|Object} collection The collection to inspect.
  11875. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  11876. * @param {number} [fromIndex=collection.length-1] The index to search from.
  11877. * @returns {*} Returns the matched element, else `undefined`.
  11878. * @example
  11879. *
  11880. * _.findLast([1, 2, 3, 4], function(n) {
  11881. * return n % 2 == 1;
  11882. * });
  11883. * // => 3
  11884. */
  11885. var findLast = createFind(findLastIndex);
  11886. /**
  11887. * Creates a flattened array of values by running each element in `collection`
  11888. * thru `iteratee` and flattening the mapped results. The iteratee is invoked
  11889. * with three arguments: (value, index|key, collection).
  11890. *
  11891. * @static
  11892. * @memberOf _
  11893. * @since 4.0.0
  11894. * @category Collection
  11895. * @param {Array|Object} collection The collection to iterate over.
  11896. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  11897. * @returns {Array} Returns the new flattened array.
  11898. * @example
  11899. *
  11900. * function duplicate(n) {
  11901. * return [n, n];
  11902. * }
  11903. *
  11904. * _.flatMap([1, 2], duplicate);
  11905. * // => [1, 1, 2, 2]
  11906. */
  11907. function flatMap(collection, iteratee) {
  11908. return baseFlatten(map(collection, iteratee), 1);
  11909. }
  11910. /**
  11911. * This method is like `_.flatMap` except that it recursively flattens the
  11912. * mapped results.
  11913. *
  11914. * @static
  11915. * @memberOf _
  11916. * @since 4.7.0
  11917. * @category Collection
  11918. * @param {Array|Object} collection The collection to iterate over.
  11919. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  11920. * @returns {Array} Returns the new flattened array.
  11921. * @example
  11922. *
  11923. * function duplicate(n) {
  11924. * return [[[n, n]]];
  11925. * }
  11926. *
  11927. * _.flatMapDeep([1, 2], duplicate);
  11928. * // => [1, 1, 2, 2]
  11929. */
  11930. function flatMapDeep(collection, iteratee) {
  11931. return baseFlatten(map(collection, iteratee), INFINITY);
  11932. }
  11933. /**
  11934. * This method is like `_.flatMap` except that it recursively flattens the
  11935. * mapped results up to `depth` times.
  11936. *
  11937. * @static
  11938. * @memberOf _
  11939. * @since 4.7.0
  11940. * @category Collection
  11941. * @param {Array|Object} collection The collection to iterate over.
  11942. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  11943. * @param {number} [depth=1] The maximum recursion depth.
  11944. * @returns {Array} Returns the new flattened array.
  11945. * @example
  11946. *
  11947. * function duplicate(n) {
  11948. * return [[[n, n]]];
  11949. * }
  11950. *
  11951. * _.flatMapDepth([1, 2], duplicate, 2);
  11952. * // => [[1, 1], [2, 2]]
  11953. */
  11954. function flatMapDepth(collection, iteratee, depth) {
  11955. depth = depth === undefined ? 1 : toInteger(depth);
  11956. return baseFlatten(map(collection, iteratee), depth);
  11957. }
  11958. /**
  11959. * Iterates over elements of `collection` and invokes `iteratee` for each element.
  11960. * The iteratee is invoked with three arguments: (value, index|key, collection).
  11961. * Iteratee functions may exit iteration early by explicitly returning `false`.
  11962. *
  11963. * **Note:** As with other "Collections" methods, objects with a "length"
  11964. * property are iterated like arrays. To avoid this behavior use `_.forIn`
  11965. * or `_.forOwn` for object iteration.
  11966. *
  11967. * @static
  11968. * @memberOf _
  11969. * @since 0.1.0
  11970. * @alias each
  11971. * @category Collection
  11972. * @param {Array|Object} collection The collection to iterate over.
  11973. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  11974. * @returns {Array|Object} Returns `collection`.
  11975. * @see _.forEachRight
  11976. * @example
  11977. *
  11978. * _.forEach([1, 2], function(value) {
  11979. * console.log(value);
  11980. * });
  11981. * // => Logs `1` then `2`.
  11982. *
  11983. * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
  11984. * console.log(key);
  11985. * });
  11986. * // => Logs 'a' then 'b' (iteration order is not guaranteed).
  11987. */
  11988. function forEach(collection, iteratee) {
  11989. var func = isArray(collection) ? arrayEach : baseEach;
  11990. return func(collection, getIteratee(iteratee, 3));
  11991. }
  11992. /**
  11993. * This method is like `_.forEach` except that it iterates over elements of
  11994. * `collection` from right to left.
  11995. *
  11996. * @static
  11997. * @memberOf _
  11998. * @since 2.0.0
  11999. * @alias eachRight
  12000. * @category Collection
  12001. * @param {Array|Object} collection The collection to iterate over.
  12002. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  12003. * @returns {Array|Object} Returns `collection`.
  12004. * @see _.forEach
  12005. * @example
  12006. *
  12007. * _.forEachRight([1, 2], function(value) {
  12008. * console.log(value);
  12009. * });
  12010. * // => Logs `2` then `1`.
  12011. */
  12012. function forEachRight(collection, iteratee) {
  12013. var func = isArray(collection) ? arrayEachRight : baseEachRight;
  12014. return func(collection, getIteratee(iteratee, 3));
  12015. }
  12016. /**
  12017. * Creates an object composed of keys generated from the results of running
  12018. * each element of `collection` thru `iteratee`. The order of grouped values
  12019. * is determined by the order they occur in `collection`. The corresponding
  12020. * value of each key is an array of elements responsible for generating the
  12021. * key. The iteratee is invoked with one argument: (value).
  12022. *
  12023. * @static
  12024. * @memberOf _
  12025. * @since 0.1.0
  12026. * @category Collection
  12027. * @param {Array|Object} collection The collection to iterate over.
  12028. * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
  12029. * @returns {Object} Returns the composed aggregate object.
  12030. * @example
  12031. *
  12032. * _.groupBy([6.1, 4.2, 6.3], Math.floor);
  12033. * // => { '4': [4.2], '6': [6.1, 6.3] }
  12034. *
  12035. * // The `_.property` iteratee shorthand.
  12036. * _.groupBy(['one', 'two', 'three'], 'length');
  12037. * // => { '3': ['one', 'two'], '5': ['three'] }
  12038. */
  12039. var groupBy = createAggregator(function(result, value, key) {
  12040. if (hasOwnProperty.call(result, key)) {
  12041. result[key].push(value);
  12042. } else {
  12043. baseAssignValue(result, key, [value]);
  12044. }
  12045. });
  12046. /**
  12047. * Checks if `value` is in `collection`. If `collection` is a string, it's
  12048. * checked for a substring of `value`, otherwise
  12049. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  12050. * is used for equality comparisons. If `fromIndex` is negative, it's used as
  12051. * the offset from the end of `collection`.
  12052. *
  12053. * @static
  12054. * @memberOf _
  12055. * @since 0.1.0
  12056. * @category Collection
  12057. * @param {Array|Object|string} collection The collection to inspect.
  12058. * @param {*} value The value to search for.
  12059. * @param {number} [fromIndex=0] The index to search from.
  12060. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
  12061. * @returns {boolean} Returns `true` if `value` is found, else `false`.
  12062. * @example
  12063. *
  12064. * _.includes([1, 2, 3], 1);
  12065. * // => true
  12066. *
  12067. * _.includes([1, 2, 3], 1, 2);
  12068. * // => false
  12069. *
  12070. * _.includes({ 'a': 1, 'b': 2 }, 1);
  12071. * // => true
  12072. *
  12073. * _.includes('abcd', 'bc');
  12074. * // => true
  12075. */
  12076. function includes(collection, value, fromIndex, guard) {
  12077. collection = isArrayLike(collection) ? collection : values(collection);
  12078. fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;
  12079. var length = collection.length;
  12080. if (fromIndex < 0) {
  12081. fromIndex = nativeMax(length + fromIndex, 0);
  12082. }
  12083. return isString(collection)
  12084. ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)
  12085. : (!!length && baseIndexOf(collection, value, fromIndex) > -1);
  12086. }
  12087. /**
  12088. * Invokes the method at `path` of each element in `collection`, returning
  12089. * an array of the results of each invoked method. Any additional arguments
  12090. * are provided to each invoked method. If `path` is a function, it's invoked
  12091. * for, and `this` bound to, each element in `collection`.
  12092. *
  12093. * @static
  12094. * @memberOf _
  12095. * @since 4.0.0
  12096. * @category Collection
  12097. * @param {Array|Object} collection The collection to iterate over.
  12098. * @param {Array|Function|string} path The path of the method to invoke or
  12099. * the function invoked per iteration.
  12100. * @param {...*} [args] The arguments to invoke each method with.
  12101. * @returns {Array} Returns the array of results.
  12102. * @example
  12103. *
  12104. * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');
  12105. * // => [[1, 5, 7], [1, 2, 3]]
  12106. *
  12107. * _.invokeMap([123, 456], String.prototype.split, '');
  12108. * // => [['1', '2', '3'], ['4', '5', '6']]
  12109. */
  12110. var invokeMap = baseRest(function(collection, path, args) {
  12111. var index = -1,
  12112. isFunc = typeof path == 'function',
  12113. result = isArrayLike(collection) ? Array(collection.length) : [];
  12114. baseEach(collection, function(value) {
  12115. result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);
  12116. });
  12117. return result;
  12118. });
  12119. /**
  12120. * Creates an object composed of keys generated from the results of running
  12121. * each element of `collection` thru `iteratee`. The corresponding value of
  12122. * each key is the last element responsible for generating the key. The
  12123. * iteratee is invoked with one argument: (value).
  12124. *
  12125. * @static
  12126. * @memberOf _
  12127. * @since 4.0.0
  12128. * @category Collection
  12129. * @param {Array|Object} collection The collection to iterate over.
  12130. * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
  12131. * @returns {Object} Returns the composed aggregate object.
  12132. * @example
  12133. *
  12134. * var array = [
  12135. * { 'dir': 'left', 'code': 97 },
  12136. * { 'dir': 'right', 'code': 100 }
  12137. * ];
  12138. *
  12139. * _.keyBy(array, function(o) {
  12140. * return String.fromCharCode(o.code);
  12141. * });
  12142. * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
  12143. *
  12144. * _.keyBy(array, 'dir');
  12145. * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }
  12146. */
  12147. var keyBy = createAggregator(function(result, value, key) {
  12148. baseAssignValue(result, key, value);
  12149. });
  12150. /**
  12151. * Creates an array of values by running each element in `collection` thru
  12152. * `iteratee`. The iteratee is invoked with three arguments:
  12153. * (value, index|key, collection).
  12154. *
  12155. * Many lodash methods are guarded to work as iteratees for methods like
  12156. * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
  12157. *
  12158. * The guarded methods are:
  12159. * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
  12160. * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
  12161. * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
  12162. * `template`, `trim`, `trimEnd`, `trimStart`, and `words`
  12163. *
  12164. * @static
  12165. * @memberOf _
  12166. * @since 0.1.0
  12167. * @category Collection
  12168. * @param {Array|Object} collection The collection to iterate over.
  12169. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  12170. * @returns {Array} Returns the new mapped array.
  12171. * @example
  12172. *
  12173. * function square(n) {
  12174. * return n * n;
  12175. * }
  12176. *
  12177. * _.map([4, 8], square);
  12178. * // => [16, 64]
  12179. *
  12180. * _.map({ 'a': 4, 'b': 8 }, square);
  12181. * // => [16, 64] (iteration order is not guaranteed)
  12182. *
  12183. * var users = [
  12184. * { 'user': 'barney' },
  12185. * { 'user': 'fred' }
  12186. * ];
  12187. *
  12188. * // The `_.property` iteratee shorthand.
  12189. * _.map(users, 'user');
  12190. * // => ['barney', 'fred']
  12191. */
  12192. function map(collection, iteratee) {
  12193. var func = isArray(collection) ? arrayMap : baseMap;
  12194. return func(collection, getIteratee(iteratee, 3));
  12195. }
  12196. /**
  12197. * This method is like `_.sortBy` except that it allows specifying the sort
  12198. * orders of the iteratees to sort by. If `orders` is unspecified, all values
  12199. * are sorted in ascending order. Otherwise, specify an order of "desc" for
  12200. * descending or "asc" for ascending sort order of corresponding values.
  12201. *
  12202. * @static
  12203. * @memberOf _
  12204. * @since 4.0.0
  12205. * @category Collection
  12206. * @param {Array|Object} collection The collection to iterate over.
  12207. * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]
  12208. * The iteratees to sort by.
  12209. * @param {string[]} [orders] The sort orders of `iteratees`.
  12210. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
  12211. * @returns {Array} Returns the new sorted array.
  12212. * @example
  12213. *
  12214. * var users = [
  12215. * { 'user': 'fred', 'age': 48 },
  12216. * { 'user': 'barney', 'age': 34 },
  12217. * { 'user': 'fred', 'age': 40 },
  12218. * { 'user': 'barney', 'age': 36 }
  12219. * ];
  12220. *
  12221. * // Sort by `user` in ascending order and by `age` in descending order.
  12222. * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);
  12223. * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
  12224. */
  12225. function orderBy(collection, iteratees, orders, guard) {
  12226. if (collection == null) {
  12227. return [];
  12228. }
  12229. if (!isArray(iteratees)) {
  12230. iteratees = iteratees == null ? [] : [iteratees];
  12231. }
  12232. orders = guard ? undefined : orders;
  12233. if (!isArray(orders)) {
  12234. orders = orders == null ? [] : [orders];
  12235. }
  12236. return baseOrderBy(collection, iteratees, orders);
  12237. }
  12238. /**
  12239. * Creates an array of elements split into two groups, the first of which
  12240. * contains elements `predicate` returns truthy for, the second of which
  12241. * contains elements `predicate` returns falsey for. The predicate is
  12242. * invoked with one argument: (value).
  12243. *
  12244. * @static
  12245. * @memberOf _
  12246. * @since 3.0.0
  12247. * @category Collection
  12248. * @param {Array|Object} collection The collection to iterate over.
  12249. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  12250. * @returns {Array} Returns the array of grouped elements.
  12251. * @example
  12252. *
  12253. * var users = [
  12254. * { 'user': 'barney', 'age': 36, 'active': false },
  12255. * { 'user': 'fred', 'age': 40, 'active': true },
  12256. * { 'user': 'pebbles', 'age': 1, 'active': false }
  12257. * ];
  12258. *
  12259. * _.partition(users, function(o) { return o.active; });
  12260. * // => objects for [['fred'], ['barney', 'pebbles']]
  12261. *
  12262. * // The `_.matches` iteratee shorthand.
  12263. * _.partition(users, { 'age': 1, 'active': false });
  12264. * // => objects for [['pebbles'], ['barney', 'fred']]
  12265. *
  12266. * // The `_.matchesProperty` iteratee shorthand.
  12267. * _.partition(users, ['active', false]);
  12268. * // => objects for [['barney', 'pebbles'], ['fred']]
  12269. *
  12270. * // The `_.property` iteratee shorthand.
  12271. * _.partition(users, 'active');
  12272. * // => objects for [['fred'], ['barney', 'pebbles']]
  12273. */
  12274. var partition = createAggregator(function(result, value, key) {
  12275. result[key ? 0 : 1].push(value);
  12276. }, function() { return [[], []]; });
  12277. /**
  12278. * Reduces `collection` to a value which is the accumulated result of running
  12279. * each element in `collection` thru `iteratee`, where each successive
  12280. * invocation is supplied the return value of the previous. If `accumulator`
  12281. * is not given, the first element of `collection` is used as the initial
  12282. * value. The iteratee is invoked with four arguments:
  12283. * (accumulator, value, index|key, collection).
  12284. *
  12285. * Many lodash methods are guarded to work as iteratees for methods like
  12286. * `_.reduce`, `_.reduceRight`, and `_.transform`.
  12287. *
  12288. * The guarded methods are:
  12289. * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,
  12290. * and `sortBy`
  12291. *
  12292. * @static
  12293. * @memberOf _
  12294. * @since 0.1.0
  12295. * @category Collection
  12296. * @param {Array|Object} collection The collection to iterate over.
  12297. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  12298. * @param {*} [accumulator] The initial value.
  12299. * @returns {*} Returns the accumulated value.
  12300. * @see _.reduceRight
  12301. * @example
  12302. *
  12303. * _.reduce([1, 2], function(sum, n) {
  12304. * return sum + n;
  12305. * }, 0);
  12306. * // => 3
  12307. *
  12308. * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
  12309. * (result[value] || (result[value] = [])).push(key);
  12310. * return result;
  12311. * }, {});
  12312. * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
  12313. */
  12314. function reduce(collection, iteratee, accumulator) {
  12315. var func = isArray(collection) ? arrayReduce : baseReduce,
  12316. initAccum = arguments.length < 3;
  12317. return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);
  12318. }
  12319. /**
  12320. * This method is like `_.reduce` except that it iterates over elements of
  12321. * `collection` from right to left.
  12322. *
  12323. * @static
  12324. * @memberOf _
  12325. * @since 0.1.0
  12326. * @category Collection
  12327. * @param {Array|Object} collection The collection to iterate over.
  12328. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  12329. * @param {*} [accumulator] The initial value.
  12330. * @returns {*} Returns the accumulated value.
  12331. * @see _.reduce
  12332. * @example
  12333. *
  12334. * var array = [[0, 1], [2, 3], [4, 5]];
  12335. *
  12336. * _.reduceRight(array, function(flattened, other) {
  12337. * return flattened.concat(other);
  12338. * }, []);
  12339. * // => [4, 5, 2, 3, 0, 1]
  12340. */
  12341. function reduceRight(collection, iteratee, accumulator) {
  12342. var func = isArray(collection) ? arrayReduceRight : baseReduce,
  12343. initAccum = arguments.length < 3;
  12344. return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);
  12345. }
  12346. /**
  12347. * The opposite of `_.filter`; this method returns the elements of `collection`
  12348. * that `predicate` does **not** return truthy for.
  12349. *
  12350. * @static
  12351. * @memberOf _
  12352. * @since 0.1.0
  12353. * @category Collection
  12354. * @param {Array|Object} collection The collection to iterate over.
  12355. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  12356. * @returns {Array} Returns the new filtered array.
  12357. * @see _.filter
  12358. * @example
  12359. *
  12360. * var users = [
  12361. * { 'user': 'barney', 'age': 36, 'active': false },
  12362. * { 'user': 'fred', 'age': 40, 'active': true }
  12363. * ];
  12364. *
  12365. * _.reject(users, function(o) { return !o.active; });
  12366. * // => objects for ['fred']
  12367. *
  12368. * // The `_.matches` iteratee shorthand.
  12369. * _.reject(users, { 'age': 40, 'active': true });
  12370. * // => objects for ['barney']
  12371. *
  12372. * // The `_.matchesProperty` iteratee shorthand.
  12373. * _.reject(users, ['active', false]);
  12374. * // => objects for ['fred']
  12375. *
  12376. * // The `_.property` iteratee shorthand.
  12377. * _.reject(users, 'active');
  12378. * // => objects for ['barney']
  12379. */
  12380. function reject(collection, predicate) {
  12381. var func = isArray(collection) ? arrayFilter : baseFilter;
  12382. return func(collection, negate(getIteratee(predicate, 3)));
  12383. }
  12384. /**
  12385. * Gets a random element from `collection`.
  12386. *
  12387. * @static
  12388. * @memberOf _
  12389. * @since 2.0.0
  12390. * @category Collection
  12391. * @param {Array|Object} collection The collection to sample.
  12392. * @returns {*} Returns the random element.
  12393. * @example
  12394. *
  12395. * _.sample([1, 2, 3, 4]);
  12396. * // => 2
  12397. */
  12398. function sample(collection) {
  12399. var func = isArray(collection) ? arraySample : baseSample;
  12400. return func(collection);
  12401. }
  12402. /**
  12403. * Gets `n` random elements at unique keys from `collection` up to the
  12404. * size of `collection`.
  12405. *
  12406. * @static
  12407. * @memberOf _
  12408. * @since 4.0.0
  12409. * @category Collection
  12410. * @param {Array|Object} collection The collection to sample.
  12411. * @param {number} [n=1] The number of elements to sample.
  12412. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  12413. * @returns {Array} Returns the random elements.
  12414. * @example
  12415. *
  12416. * _.sampleSize([1, 2, 3], 2);
  12417. * // => [3, 1]
  12418. *
  12419. * _.sampleSize([1, 2, 3], 4);
  12420. * // => [2, 3, 1]
  12421. */
  12422. function sampleSize(collection, n, guard) {
  12423. if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {
  12424. n = 1;
  12425. } else {
  12426. n = toInteger(n);
  12427. }
  12428. var func = isArray(collection) ? arraySampleSize : baseSampleSize;
  12429. return func(collection, n);
  12430. }
  12431. /**
  12432. * Creates an array of shuffled values, using a version of the
  12433. * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).
  12434. *
  12435. * @static
  12436. * @memberOf _
  12437. * @since 0.1.0
  12438. * @category Collection
  12439. * @param {Array|Object} collection The collection to shuffle.
  12440. * @returns {Array} Returns the new shuffled array.
  12441. * @example
  12442. *
  12443. * _.shuffle([1, 2, 3, 4]);
  12444. * // => [4, 1, 3, 2]
  12445. */
  12446. function shuffle(collection) {
  12447. var func = isArray(collection) ? arrayShuffle : baseShuffle;
  12448. return func(collection);
  12449. }
  12450. /**
  12451. * Gets the size of `collection` by returning its length for array-like
  12452. * values or the number of own enumerable string keyed properties for objects.
  12453. *
  12454. * @static
  12455. * @memberOf _
  12456. * @since 0.1.0
  12457. * @category Collection
  12458. * @param {Array|Object|string} collection The collection to inspect.
  12459. * @returns {number} Returns the collection size.
  12460. * @example
  12461. *
  12462. * _.size([1, 2, 3]);
  12463. * // => 3
  12464. *
  12465. * _.size({ 'a': 1, 'b': 2 });
  12466. * // => 2
  12467. *
  12468. * _.size('pebbles');
  12469. * // => 7
  12470. */
  12471. function size(collection) {
  12472. if (collection == null) {
  12473. return 0;
  12474. }
  12475. if (isArrayLike(collection)) {
  12476. return isString(collection) ? stringSize(collection) : collection.length;
  12477. }
  12478. var tag = getTag(collection);
  12479. if (tag == mapTag || tag == setTag) {
  12480. return collection.size;
  12481. }
  12482. return baseKeys(collection).length;
  12483. }
  12484. /**
  12485. * Checks if `predicate` returns truthy for **any** element of `collection`.
  12486. * Iteration is stopped once `predicate` returns truthy. The predicate is
  12487. * invoked with three arguments: (value, index|key, collection).
  12488. *
  12489. * @static
  12490. * @memberOf _
  12491. * @since 0.1.0
  12492. * @category Collection
  12493. * @param {Array|Object} collection The collection to iterate over.
  12494. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  12495. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  12496. * @returns {boolean} Returns `true` if any element passes the predicate check,
  12497. * else `false`.
  12498. * @example
  12499. *
  12500. * _.some([null, 0, 'yes', false], Boolean);
  12501. * // => true
  12502. *
  12503. * var users = [
  12504. * { 'user': 'barney', 'active': true },
  12505. * { 'user': 'fred', 'active': false }
  12506. * ];
  12507. *
  12508. * // The `_.matches` iteratee shorthand.
  12509. * _.some(users, { 'user': 'barney', 'active': false });
  12510. * // => false
  12511. *
  12512. * // The `_.matchesProperty` iteratee shorthand.
  12513. * _.some(users, ['active', false]);
  12514. * // => true
  12515. *
  12516. * // The `_.property` iteratee shorthand.
  12517. * _.some(users, 'active');
  12518. * // => true
  12519. */
  12520. function some(collection, predicate, guard) {
  12521. var func = isArray(collection) ? arraySome : baseSome;
  12522. if (guard && isIterateeCall(collection, predicate, guard)) {
  12523. predicate = undefined;
  12524. }
  12525. return func(collection, getIteratee(predicate, 3));
  12526. }
  12527. /**
  12528. * Creates an array of elements, sorted in ascending order by the results of
  12529. * running each element in a collection thru each iteratee. This method
  12530. * performs a stable sort, that is, it preserves the original sort order of
  12531. * equal elements. The iteratees are invoked with one argument: (value).
  12532. *
  12533. * @static
  12534. * @memberOf _
  12535. * @since 0.1.0
  12536. * @category Collection
  12537. * @param {Array|Object} collection The collection to iterate over.
  12538. * @param {...(Function|Function[])} [iteratees=[_.identity]]
  12539. * The iteratees to sort by.
  12540. * @returns {Array} Returns the new sorted array.
  12541. * @example
  12542. *
  12543. * var users = [
  12544. * { 'user': 'fred', 'age': 48 },
  12545. * { 'user': 'barney', 'age': 36 },
  12546. * { 'user': 'fred', 'age': 40 },
  12547. * { 'user': 'barney', 'age': 34 }
  12548. * ];
  12549. *
  12550. * _.sortBy(users, [function(o) { return o.user; }]);
  12551. * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
  12552. *
  12553. * _.sortBy(users, ['user', 'age']);
  12554. * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]]
  12555. */
  12556. var sortBy = baseRest(function(collection, iteratees) {
  12557. if (collection == null) {
  12558. return [];
  12559. }
  12560. var length = iteratees.length;
  12561. if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
  12562. iteratees = [];
  12563. } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
  12564. iteratees = [iteratees[0]];
  12565. }
  12566. return baseOrderBy(collection, baseFlatten(iteratees, 1), []);
  12567. });
  12568. /*------------------------------------------------------------------------*/
  12569. /**
  12570. * Gets the timestamp of the number of milliseconds that have elapsed since
  12571. * the Unix epoch (1 January 1970 00:00:00 UTC).
  12572. *
  12573. * @static
  12574. * @memberOf _
  12575. * @since 2.4.0
  12576. * @category Date
  12577. * @returns {number} Returns the timestamp.
  12578. * @example
  12579. *
  12580. * _.defer(function(stamp) {
  12581. * console.log(_.now() - stamp);
  12582. * }, _.now());
  12583. * // => Logs the number of milliseconds it took for the deferred invocation.
  12584. */
  12585. var now = ctxNow || function() {
  12586. return root.Date.now();
  12587. };
  12588. /*------------------------------------------------------------------------*/
  12589. /**
  12590. * The opposite of `_.before`; this method creates a function that invokes
  12591. * `func` once it's called `n` or more times.
  12592. *
  12593. * @static
  12594. * @memberOf _
  12595. * @since 0.1.0
  12596. * @category Function
  12597. * @param {number} n The number of calls before `func` is invoked.
  12598. * @param {Function} func The function to restrict.
  12599. * @returns {Function} Returns the new restricted function.
  12600. * @example
  12601. *
  12602. * var saves = ['profile', 'settings'];
  12603. *
  12604. * var done = _.after(saves.length, function() {
  12605. * console.log('done saving!');
  12606. * });
  12607. *
  12608. * _.forEach(saves, function(type) {
  12609. * asyncSave({ 'type': type, 'complete': done });
  12610. * });
  12611. * // => Logs 'done saving!' after the two async saves have completed.
  12612. */
  12613. function after(n, func) {
  12614. if (typeof func != 'function') {
  12615. throw new TypeError(FUNC_ERROR_TEXT);
  12616. }
  12617. n = toInteger(n);
  12618. return function() {
  12619. if (--n < 1) {
  12620. return func.apply(this, arguments);
  12621. }
  12622. };
  12623. }
  12624. /**
  12625. * Creates a function that invokes `func`, with up to `n` arguments,
  12626. * ignoring any additional arguments.
  12627. *
  12628. * @static
  12629. * @memberOf _
  12630. * @since 3.0.0
  12631. * @category Function
  12632. * @param {Function} func The function to cap arguments for.
  12633. * @param {number} [n=func.length] The arity cap.
  12634. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  12635. * @returns {Function} Returns the new capped function.
  12636. * @example
  12637. *
  12638. * _.map(['6', '8', '10'], _.ary(parseInt, 1));
  12639. * // => [6, 8, 10]
  12640. */
  12641. function ary(func, n, guard) {
  12642. n = guard ? undefined : n;
  12643. n = (func && n == null) ? func.length : n;
  12644. return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);
  12645. }
  12646. /**
  12647. * Creates a function that invokes `func`, with the `this` binding and arguments
  12648. * of the created function, while it's called less than `n` times. Subsequent
  12649. * calls to the created function return the result of the last `func` invocation.
  12650. *
  12651. * @static
  12652. * @memberOf _
  12653. * @since 3.0.0
  12654. * @category Function
  12655. * @param {number} n The number of calls at which `func` is no longer invoked.
  12656. * @param {Function} func The function to restrict.
  12657. * @returns {Function} Returns the new restricted function.
  12658. * @example
  12659. *
  12660. * jQuery(element).on('click', _.before(5, addContactToList));
  12661. * // => Allows adding up to 4 contacts to the list.
  12662. */
  12663. function before(n, func) {
  12664. var result;
  12665. if (typeof func != 'function') {
  12666. throw new TypeError(FUNC_ERROR_TEXT);
  12667. }
  12668. n = toInteger(n);
  12669. return function() {
  12670. if (--n > 0) {
  12671. result = func.apply(this, arguments);
  12672. }
  12673. if (n <= 1) {
  12674. func = undefined;
  12675. }
  12676. return result;
  12677. };
  12678. }
  12679. /**
  12680. * Creates a function that invokes `func` with the `this` binding of `thisArg`
  12681. * and `partials` prepended to the arguments it receives.
  12682. *
  12683. * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
  12684. * may be used as a placeholder for partially applied arguments.
  12685. *
  12686. * **Note:** Unlike native `Function#bind`, this method doesn't set the "length"
  12687. * property of bound functions.
  12688. *
  12689. * @static
  12690. * @memberOf _
  12691. * @since 0.1.0
  12692. * @category Function
  12693. * @param {Function} func The function to bind.
  12694. * @param {*} thisArg The `this` binding of `func`.
  12695. * @param {...*} [partials] The arguments to be partially applied.
  12696. * @returns {Function} Returns the new bound function.
  12697. * @example
  12698. *
  12699. * function greet(greeting, punctuation) {
  12700. * return greeting + ' ' + this.user + punctuation;
  12701. * }
  12702. *
  12703. * var object = { 'user': 'fred' };
  12704. *
  12705. * var bound = _.bind(greet, object, 'hi');
  12706. * bound('!');
  12707. * // => 'hi fred!'
  12708. *
  12709. * // Bound with placeholders.
  12710. * var bound = _.bind(greet, object, _, '!');
  12711. * bound('hi');
  12712. * // => 'hi fred!'
  12713. */
  12714. var bind = baseRest(function(func, thisArg, partials) {
  12715. var bitmask = WRAP_BIND_FLAG;
  12716. if (partials.length) {
  12717. var holders = replaceHolders(partials, getHolder(bind));
  12718. bitmask |= WRAP_PARTIAL_FLAG;
  12719. }
  12720. return createWrap(func, bitmask, thisArg, partials, holders);
  12721. });
  12722. /**
  12723. * Creates a function that invokes the method at `object[key]` with `partials`
  12724. * prepended to the arguments it receives.
  12725. *
  12726. * This method differs from `_.bind` by allowing bound functions to reference
  12727. * methods that may be redefined or don't yet exist. See
  12728. * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)
  12729. * for more details.
  12730. *
  12731. * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic
  12732. * builds, may be used as a placeholder for partially applied arguments.
  12733. *
  12734. * @static
  12735. * @memberOf _
  12736. * @since 0.10.0
  12737. * @category Function
  12738. * @param {Object} object The object to invoke the method on.
  12739. * @param {string} key The key of the method.
  12740. * @param {...*} [partials] The arguments to be partially applied.
  12741. * @returns {Function} Returns the new bound function.
  12742. * @example
  12743. *
  12744. * var object = {
  12745. * 'user': 'fred',
  12746. * 'greet': function(greeting, punctuation) {
  12747. * return greeting + ' ' + this.user + punctuation;
  12748. * }
  12749. * };
  12750. *
  12751. * var bound = _.bindKey(object, 'greet', 'hi');
  12752. * bound('!');
  12753. * // => 'hi fred!'
  12754. *
  12755. * object.greet = function(greeting, punctuation) {
  12756. * return greeting + 'ya ' + this.user + punctuation;
  12757. * };
  12758. *
  12759. * bound('!');
  12760. * // => 'hiya fred!'
  12761. *
  12762. * // Bound with placeholders.
  12763. * var bound = _.bindKey(object, 'greet', _, '!');
  12764. * bound('hi');
  12765. * // => 'hiya fred!'
  12766. */
  12767. var bindKey = baseRest(function(object, key, partials) {
  12768. var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;
  12769. if (partials.length) {
  12770. var holders = replaceHolders(partials, getHolder(bindKey));
  12771. bitmask |= WRAP_PARTIAL_FLAG;
  12772. }
  12773. return createWrap(key, bitmask, object, partials, holders);
  12774. });
  12775. /**
  12776. * Creates a function that accepts arguments of `func` and either invokes
  12777. * `func` returning its result, if at least `arity` number of arguments have
  12778. * been provided, or returns a function that accepts the remaining `func`
  12779. * arguments, and so on. The arity of `func` may be specified if `func.length`
  12780. * is not sufficient.
  12781. *
  12782. * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,
  12783. * may be used as a placeholder for provided arguments.
  12784. *
  12785. * **Note:** This method doesn't set the "length" property of curried functions.
  12786. *
  12787. * @static
  12788. * @memberOf _
  12789. * @since 2.0.0
  12790. * @category Function
  12791. * @param {Function} func The function to curry.
  12792. * @param {number} [arity=func.length] The arity of `func`.
  12793. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  12794. * @returns {Function} Returns the new curried function.
  12795. * @example
  12796. *
  12797. * var abc = function(a, b, c) {
  12798. * return [a, b, c];
  12799. * };
  12800. *
  12801. * var curried = _.curry(abc);
  12802. *
  12803. * curried(1)(2)(3);
  12804. * // => [1, 2, 3]
  12805. *
  12806. * curried(1, 2)(3);
  12807. * // => [1, 2, 3]
  12808. *
  12809. * curried(1, 2, 3);
  12810. * // => [1, 2, 3]
  12811. *
  12812. * // Curried with placeholders.
  12813. * curried(1)(_, 3)(2);
  12814. * // => [1, 2, 3]
  12815. */
  12816. function curry(func, arity, guard) {
  12817. arity = guard ? undefined : arity;
  12818. var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
  12819. result.placeholder = curry.placeholder;
  12820. return result;
  12821. }
  12822. /**
  12823. * This method is like `_.curry` except that arguments are applied to `func`
  12824. * in the manner of `_.partialRight` instead of `_.partial`.
  12825. *
  12826. * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic
  12827. * builds, may be used as a placeholder for provided arguments.
  12828. *
  12829. * **Note:** This method doesn't set the "length" property of curried functions.
  12830. *
  12831. * @static
  12832. * @memberOf _
  12833. * @since 3.0.0
  12834. * @category Function
  12835. * @param {Function} func The function to curry.
  12836. * @param {number} [arity=func.length] The arity of `func`.
  12837. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  12838. * @returns {Function} Returns the new curried function.
  12839. * @example
  12840. *
  12841. * var abc = function(a, b, c) {
  12842. * return [a, b, c];
  12843. * };
  12844. *
  12845. * var curried = _.curryRight(abc);
  12846. *
  12847. * curried(3)(2)(1);
  12848. * // => [1, 2, 3]
  12849. *
  12850. * curried(2, 3)(1);
  12851. * // => [1, 2, 3]
  12852. *
  12853. * curried(1, 2, 3);
  12854. * // => [1, 2, 3]
  12855. *
  12856. * // Curried with placeholders.
  12857. * curried(3)(1, _)(2);
  12858. * // => [1, 2, 3]
  12859. */
  12860. function curryRight(func, arity, guard) {
  12861. arity = guard ? undefined : arity;
  12862. var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
  12863. result.placeholder = curryRight.placeholder;
  12864. return result;
  12865. }
  12866. /**
  12867. * Creates a debounced function that delays invoking `func` until after `wait`
  12868. * milliseconds have elapsed since the last time the debounced function was
  12869. * invoked. The debounced function comes with a `cancel` method to cancel
  12870. * delayed `func` invocations and a `flush` method to immediately invoke them.
  12871. * Provide `options` to indicate whether `func` should be invoked on the
  12872. * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
  12873. * with the last arguments provided to the debounced function. Subsequent
  12874. * calls to the debounced function return the result of the last `func`
  12875. * invocation.
  12876. *
  12877. * **Note:** If `leading` and `trailing` options are `true`, `func` is
  12878. * invoked on the trailing edge of the timeout only if the debounced function
  12879. * is invoked more than once during the `wait` timeout.
  12880. *
  12881. * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
  12882. * until to the next tick, similar to `setTimeout` with a timeout of `0`.
  12883. *
  12884. * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
  12885. * for details over the differences between `_.debounce` and `_.throttle`.
  12886. *
  12887. * @static
  12888. * @memberOf _
  12889. * @since 0.1.0
  12890. * @category Function
  12891. * @param {Function} func The function to debounce.
  12892. * @param {number} [wait=0] The number of milliseconds to delay.
  12893. * @param {Object} [options={}] The options object.
  12894. * @param {boolean} [options.leading=false]
  12895. * Specify invoking on the leading edge of the timeout.
  12896. * @param {number} [options.maxWait]
  12897. * The maximum time `func` is allowed to be delayed before it's invoked.
  12898. * @param {boolean} [options.trailing=true]
  12899. * Specify invoking on the trailing edge of the timeout.
  12900. * @returns {Function} Returns the new debounced function.
  12901. * @example
  12902. *
  12903. * // Avoid costly calculations while the window size is in flux.
  12904. * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
  12905. *
  12906. * // Invoke `sendMail` when clicked, debouncing subsequent calls.
  12907. * jQuery(element).on('click', _.debounce(sendMail, 300, {
  12908. * 'leading': true,
  12909. * 'trailing': false
  12910. * }));
  12911. *
  12912. * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
  12913. * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
  12914. * var source = new EventSource('/stream');
  12915. * jQuery(source).on('message', debounced);
  12916. *
  12917. * // Cancel the trailing debounced invocation.
  12918. * jQuery(window).on('popstate', debounced.cancel);
  12919. */
  12920. function debounce(func, wait, options) {
  12921. var lastArgs,
  12922. lastThis,
  12923. maxWait,
  12924. result,
  12925. timerId,
  12926. lastCallTime,
  12927. lastInvokeTime = 0,
  12928. leading = false,
  12929. maxing = false,
  12930. trailing = true;
  12931. if (typeof func != 'function') {
  12932. throw new TypeError(FUNC_ERROR_TEXT);
  12933. }
  12934. wait = toNumber(wait) || 0;
  12935. if (isObject(options)) {
  12936. leading = !!options.leading;
  12937. maxing = 'maxWait' in options;
  12938. maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
  12939. trailing = 'trailing' in options ? !!options.trailing : trailing;
  12940. }
  12941. function invokeFunc(time) {
  12942. var args = lastArgs,
  12943. thisArg = lastThis;
  12944. lastArgs = lastThis = undefined;
  12945. lastInvokeTime = time;
  12946. result = func.apply(thisArg, args);
  12947. return result;
  12948. }
  12949. function leadingEdge(time) {
  12950. // Reset any `maxWait` timer.
  12951. lastInvokeTime = time;
  12952. // Start the timer for the trailing edge.
  12953. timerId = setTimeout(timerExpired, wait);
  12954. // Invoke the leading edge.
  12955. return leading ? invokeFunc(time) : result;
  12956. }
  12957. function remainingWait(time) {
  12958. var timeSinceLastCall = time - lastCallTime,
  12959. timeSinceLastInvoke = time - lastInvokeTime,
  12960. result = wait - timeSinceLastCall;
  12961. return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;
  12962. }
  12963. function shouldInvoke(time) {
  12964. var timeSinceLastCall = time - lastCallTime,
  12965. timeSinceLastInvoke = time - lastInvokeTime;
  12966. // Either this is the first call, activity has stopped and we're at the
  12967. // trailing edge, the system time has gone backwards and we're treating
  12968. // it as the trailing edge, or we've hit the `maxWait` limit.
  12969. return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
  12970. (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
  12971. }
  12972. function timerExpired() {
  12973. var time = now();
  12974. if (shouldInvoke(time)) {
  12975. return trailingEdge(time);
  12976. }
  12977. // Restart the timer.
  12978. timerId = setTimeout(timerExpired, remainingWait(time));
  12979. }
  12980. function trailingEdge(time) {
  12981. timerId = undefined;
  12982. // Only invoke if we have `lastArgs` which means `func` has been
  12983. // debounced at least once.
  12984. if (trailing && lastArgs) {
  12985. return invokeFunc(time);
  12986. }
  12987. lastArgs = lastThis = undefined;
  12988. return result;
  12989. }
  12990. function cancel() {
  12991. if (timerId !== undefined) {
  12992. clearTimeout(timerId);
  12993. }
  12994. lastInvokeTime = 0;
  12995. lastArgs = lastCallTime = lastThis = timerId = undefined;
  12996. }
  12997. function flush() {
  12998. return timerId === undefined ? result : trailingEdge(now());
  12999. }
  13000. function debounced() {
  13001. var time = now(),
  13002. isInvoking = shouldInvoke(time);
  13003. lastArgs = arguments;
  13004. lastThis = this;
  13005. lastCallTime = time;
  13006. if (isInvoking) {
  13007. if (timerId === undefined) {
  13008. return leadingEdge(lastCallTime);
  13009. }
  13010. if (maxing) {
  13011. // Handle invocations in a tight loop.
  13012. timerId = setTimeout(timerExpired, wait);
  13013. return invokeFunc(lastCallTime);
  13014. }
  13015. }
  13016. if (timerId === undefined) {
  13017. timerId = setTimeout(timerExpired, wait);
  13018. }
  13019. return result;
  13020. }
  13021. debounced.cancel = cancel;
  13022. debounced.flush = flush;
  13023. return debounced;
  13024. }
  13025. /**
  13026. * Defers invoking the `func` until the current call stack has cleared. Any
  13027. * additional arguments are provided to `func` when it's invoked.
  13028. *
  13029. * @static
  13030. * @memberOf _
  13031. * @since 0.1.0
  13032. * @category Function
  13033. * @param {Function} func The function to defer.
  13034. * @param {...*} [args] The arguments to invoke `func` with.
  13035. * @returns {number} Returns the timer id.
  13036. * @example
  13037. *
  13038. * _.defer(function(text) {
  13039. * console.log(text);
  13040. * }, 'deferred');
  13041. * // => Logs 'deferred' after one millisecond.
  13042. */
  13043. var defer = baseRest(function(func, args) {
  13044. return baseDelay(func, 1, args);
  13045. });
  13046. /**
  13047. * Invokes `func` after `wait` milliseconds. Any additional arguments are
  13048. * provided to `func` when it's invoked.
  13049. *
  13050. * @static
  13051. * @memberOf _
  13052. * @since 0.1.0
  13053. * @category Function
  13054. * @param {Function} func The function to delay.
  13055. * @param {number} wait The number of milliseconds to delay invocation.
  13056. * @param {...*} [args] The arguments to invoke `func` with.
  13057. * @returns {number} Returns the timer id.
  13058. * @example
  13059. *
  13060. * _.delay(function(text) {
  13061. * console.log(text);
  13062. * }, 1000, 'later');
  13063. * // => Logs 'later' after one second.
  13064. */
  13065. var delay = baseRest(function(func, wait, args) {
  13066. return baseDelay(func, toNumber(wait) || 0, args);
  13067. });
  13068. /**
  13069. * Creates a function that invokes `func` with arguments reversed.
  13070. *
  13071. * @static
  13072. * @memberOf _
  13073. * @since 4.0.0
  13074. * @category Function
  13075. * @param {Function} func The function to flip arguments for.
  13076. * @returns {Function} Returns the new flipped function.
  13077. * @example
  13078. *
  13079. * var flipped = _.flip(function() {
  13080. * return _.toArray(arguments);
  13081. * });
  13082. *
  13083. * flipped('a', 'b', 'c', 'd');
  13084. * // => ['d', 'c', 'b', 'a']
  13085. */
  13086. function flip(func) {
  13087. return createWrap(func, WRAP_FLIP_FLAG);
  13088. }
  13089. /**
  13090. * Creates a function that memoizes the result of `func`. If `resolver` is
  13091. * provided, it determines the cache key for storing the result based on the
  13092. * arguments provided to the memoized function. By default, the first argument
  13093. * provided to the memoized function is used as the map cache key. The `func`
  13094. * is invoked with the `this` binding of the memoized function.
  13095. *
  13096. * **Note:** The cache is exposed as the `cache` property on the memoized
  13097. * function. Its creation may be customized by replacing the `_.memoize.Cache`
  13098. * constructor with one whose instances implement the
  13099. * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
  13100. * method interface of `clear`, `delete`, `get`, `has`, and `set`.
  13101. *
  13102. * @static
  13103. * @memberOf _
  13104. * @since 0.1.0
  13105. * @category Function
  13106. * @param {Function} func The function to have its output memoized.
  13107. * @param {Function} [resolver] The function to resolve the cache key.
  13108. * @returns {Function} Returns the new memoized function.
  13109. * @example
  13110. *
  13111. * var object = { 'a': 1, 'b': 2 };
  13112. * var other = { 'c': 3, 'd': 4 };
  13113. *
  13114. * var values = _.memoize(_.values);
  13115. * values(object);
  13116. * // => [1, 2]
  13117. *
  13118. * values(other);
  13119. * // => [3, 4]
  13120. *
  13121. * object.a = 2;
  13122. * values(object);
  13123. * // => [1, 2]
  13124. *
  13125. * // Modify the result cache.
  13126. * values.cache.set(object, ['a', 'b']);
  13127. * values(object);
  13128. * // => ['a', 'b']
  13129. *
  13130. * // Replace `_.memoize.Cache`.
  13131. * _.memoize.Cache = WeakMap;
  13132. */
  13133. function memoize(func, resolver) {
  13134. if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
  13135. throw new TypeError(FUNC_ERROR_TEXT);
  13136. }
  13137. var memoized = function() {
  13138. var args = arguments,
  13139. key = resolver ? resolver.apply(this, args) : args[0],
  13140. cache = memoized.cache;
  13141. if (cache.has(key)) {
  13142. return cache.get(key);
  13143. }
  13144. var result = func.apply(this, args);
  13145. memoized.cache = cache.set(key, result) || cache;
  13146. return result;
  13147. };
  13148. memoized.cache = new (memoize.Cache || MapCache);
  13149. return memoized;
  13150. }
  13151. // Expose `MapCache`.
  13152. memoize.Cache = MapCache;
  13153. /**
  13154. * Creates a function that negates the result of the predicate `func`. The
  13155. * `func` predicate is invoked with the `this` binding and arguments of the
  13156. * created function.
  13157. *
  13158. * @static
  13159. * @memberOf _
  13160. * @since 3.0.0
  13161. * @category Function
  13162. * @param {Function} predicate The predicate to negate.
  13163. * @returns {Function} Returns the new negated function.
  13164. * @example
  13165. *
  13166. * function isEven(n) {
  13167. * return n % 2 == 0;
  13168. * }
  13169. *
  13170. * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));
  13171. * // => [1, 3, 5]
  13172. */
  13173. function negate(predicate) {
  13174. if (typeof predicate != 'function') {
  13175. throw new TypeError(FUNC_ERROR_TEXT);
  13176. }
  13177. return function() {
  13178. var args = arguments;
  13179. switch (args.length) {
  13180. case 0: return !predicate.call(this);
  13181. case 1: return !predicate.call(this, args[0]);
  13182. case 2: return !predicate.call(this, args[0], args[1]);
  13183. case 3: return !predicate.call(this, args[0], args[1], args[2]);
  13184. }
  13185. return !predicate.apply(this, args);
  13186. };
  13187. }
  13188. /**
  13189. * Creates a function that is restricted to invoking `func` once. Repeat calls
  13190. * to the function return the value of the first invocation. The `func` is
  13191. * invoked with the `this` binding and arguments of the created function.
  13192. *
  13193. * @static
  13194. * @memberOf _
  13195. * @since 0.1.0
  13196. * @category Function
  13197. * @param {Function} func The function to restrict.
  13198. * @returns {Function} Returns the new restricted function.
  13199. * @example
  13200. *
  13201. * var initialize = _.once(createApplication);
  13202. * initialize();
  13203. * initialize();
  13204. * // => `createApplication` is invoked once
  13205. */
  13206. function once(func) {
  13207. return before(2, func);
  13208. }
  13209. /**
  13210. * Creates a function that invokes `func` with its arguments transformed.
  13211. *
  13212. * @static
  13213. * @since 4.0.0
  13214. * @memberOf _
  13215. * @category Function
  13216. * @param {Function} func The function to wrap.
  13217. * @param {...(Function|Function[])} [transforms=[_.identity]]
  13218. * The argument transforms.
  13219. * @returns {Function} Returns the new function.
  13220. * @example
  13221. *
  13222. * function doubled(n) {
  13223. * return n * 2;
  13224. * }
  13225. *
  13226. * function square(n) {
  13227. * return n * n;
  13228. * }
  13229. *
  13230. * var func = _.overArgs(function(x, y) {
  13231. * return [x, y];
  13232. * }, [square, doubled]);
  13233. *
  13234. * func(9, 3);
  13235. * // => [81, 6]
  13236. *
  13237. * func(10, 5);
  13238. * // => [100, 10]
  13239. */
  13240. var overArgs = castRest(function(func, transforms) {
  13241. transforms = (transforms.length == 1 && isArray(transforms[0]))
  13242. ? arrayMap(transforms[0], baseUnary(getIteratee()))
  13243. : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));
  13244. var funcsLength = transforms.length;
  13245. return baseRest(function(args) {
  13246. var index = -1,
  13247. length = nativeMin(args.length, funcsLength);
  13248. while (++index < length) {
  13249. args[index] = transforms[index].call(this, args[index]);
  13250. }
  13251. return apply(func, this, args);
  13252. });
  13253. });
  13254. /**
  13255. * Creates a function that invokes `func` with `partials` prepended to the
  13256. * arguments it receives. This method is like `_.bind` except it does **not**
  13257. * alter the `this` binding.
  13258. *
  13259. * The `_.partial.placeholder` value, which defaults to `_` in monolithic
  13260. * builds, may be used as a placeholder for partially applied arguments.
  13261. *
  13262. * **Note:** This method doesn't set the "length" property of partially
  13263. * applied functions.
  13264. *
  13265. * @static
  13266. * @memberOf _
  13267. * @since 0.2.0
  13268. * @category Function
  13269. * @param {Function} func The function to partially apply arguments to.
  13270. * @param {...*} [partials] The arguments to be partially applied.
  13271. * @returns {Function} Returns the new partially applied function.
  13272. * @example
  13273. *
  13274. * function greet(greeting, name) {
  13275. * return greeting + ' ' + name;
  13276. * }
  13277. *
  13278. * var sayHelloTo = _.partial(greet, 'hello');
  13279. * sayHelloTo('fred');
  13280. * // => 'hello fred'
  13281. *
  13282. * // Partially applied with placeholders.
  13283. * var greetFred = _.partial(greet, _, 'fred');
  13284. * greetFred('hi');
  13285. * // => 'hi fred'
  13286. */
  13287. var partial = baseRest(function(func, partials) {
  13288. var holders = replaceHolders(partials, getHolder(partial));
  13289. return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);
  13290. });
  13291. /**
  13292. * This method is like `_.partial` except that partially applied arguments
  13293. * are appended to the arguments it receives.
  13294. *
  13295. * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic
  13296. * builds, may be used as a placeholder for partially applied arguments.
  13297. *
  13298. * **Note:** This method doesn't set the "length" property of partially
  13299. * applied functions.
  13300. *
  13301. * @static
  13302. * @memberOf _
  13303. * @since 1.0.0
  13304. * @category Function
  13305. * @param {Function} func The function to partially apply arguments to.
  13306. * @param {...*} [partials] The arguments to be partially applied.
  13307. * @returns {Function} Returns the new partially applied function.
  13308. * @example
  13309. *
  13310. * function greet(greeting, name) {
  13311. * return greeting + ' ' + name;
  13312. * }
  13313. *
  13314. * var greetFred = _.partialRight(greet, 'fred');
  13315. * greetFred('hi');
  13316. * // => 'hi fred'
  13317. *
  13318. * // Partially applied with placeholders.
  13319. * var sayHelloTo = _.partialRight(greet, 'hello', _);
  13320. * sayHelloTo('fred');
  13321. * // => 'hello fred'
  13322. */
  13323. var partialRight = baseRest(function(func, partials) {
  13324. var holders = replaceHolders(partials, getHolder(partialRight));
  13325. return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);
  13326. });
  13327. /**
  13328. * Creates a function that invokes `func` with arguments arranged according
  13329. * to the specified `indexes` where the argument value at the first index is
  13330. * provided as the first argument, the argument value at the second index is
  13331. * provided as the second argument, and so on.
  13332. *
  13333. * @static
  13334. * @memberOf _
  13335. * @since 3.0.0
  13336. * @category Function
  13337. * @param {Function} func The function to rearrange arguments for.
  13338. * @param {...(number|number[])} indexes The arranged argument indexes.
  13339. * @returns {Function} Returns the new function.
  13340. * @example
  13341. *
  13342. * var rearged = _.rearg(function(a, b, c) {
  13343. * return [a, b, c];
  13344. * }, [2, 0, 1]);
  13345. *
  13346. * rearged('b', 'c', 'a')
  13347. * // => ['a', 'b', 'c']
  13348. */
  13349. var rearg = flatRest(function(func, indexes) {
  13350. return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);
  13351. });
  13352. /**
  13353. * Creates a function that invokes `func` with the `this` binding of the
  13354. * created function and arguments from `start` and beyond provided as
  13355. * an array.
  13356. *
  13357. * **Note:** This method is based on the
  13358. * [rest parameter](https://mdn.io/rest_parameters).
  13359. *
  13360. * @static
  13361. * @memberOf _
  13362. * @since 4.0.0
  13363. * @category Function
  13364. * @param {Function} func The function to apply a rest parameter to.
  13365. * @param {number} [start=func.length-1] The start position of the rest parameter.
  13366. * @returns {Function} Returns the new function.
  13367. * @example
  13368. *
  13369. * var say = _.rest(function(what, names) {
  13370. * return what + ' ' + _.initial(names).join(', ') +
  13371. * (_.size(names) > 1 ? ', & ' : '') + _.last(names);
  13372. * });
  13373. *
  13374. * say('hello', 'fred', 'barney', 'pebbles');
  13375. * // => 'hello fred, barney, & pebbles'
  13376. */
  13377. function rest(func, start) {
  13378. if (typeof func != 'function') {
  13379. throw new TypeError(FUNC_ERROR_TEXT);
  13380. }
  13381. start = start === undefined ? start : toInteger(start);
  13382. return baseRest(func, start);
  13383. }
  13384. /**
  13385. * Creates a function that invokes `func` with the `this` binding of the
  13386. * create function and an array of arguments much like
  13387. * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).
  13388. *
  13389. * **Note:** This method is based on the
  13390. * [spread operator](https://mdn.io/spread_operator).
  13391. *
  13392. * @static
  13393. * @memberOf _
  13394. * @since 3.2.0
  13395. * @category Function
  13396. * @param {Function} func The function to spread arguments over.
  13397. * @param {number} [start=0] The start position of the spread.
  13398. * @returns {Function} Returns the new function.
  13399. * @example
  13400. *
  13401. * var say = _.spread(function(who, what) {
  13402. * return who + ' says ' + what;
  13403. * });
  13404. *
  13405. * say(['fred', 'hello']);
  13406. * // => 'fred says hello'
  13407. *
  13408. * var numbers = Promise.all([
  13409. * Promise.resolve(40),
  13410. * Promise.resolve(36)
  13411. * ]);
  13412. *
  13413. * numbers.then(_.spread(function(x, y) {
  13414. * return x + y;
  13415. * }));
  13416. * // => a Promise of 76
  13417. */
  13418. function spread(func, start) {
  13419. if (typeof func != 'function') {
  13420. throw new TypeError(FUNC_ERROR_TEXT);
  13421. }
  13422. start = start == null ? 0 : nativeMax(toInteger(start), 0);
  13423. return baseRest(function(args) {
  13424. var array = args[start],
  13425. otherArgs = castSlice(args, 0, start);
  13426. if (array) {
  13427. arrayPush(otherArgs, array);
  13428. }
  13429. return apply(func, this, otherArgs);
  13430. });
  13431. }
  13432. /**
  13433. * Creates a throttled function that only invokes `func` at most once per
  13434. * every `wait` milliseconds. The throttled function comes with a `cancel`
  13435. * method to cancel delayed `func` invocations and a `flush` method to
  13436. * immediately invoke them. Provide `options` to indicate whether `func`
  13437. * should be invoked on the leading and/or trailing edge of the `wait`
  13438. * timeout. The `func` is invoked with the last arguments provided to the
  13439. * throttled function. Subsequent calls to the throttled function return the
  13440. * result of the last `func` invocation.
  13441. *
  13442. * **Note:** If `leading` and `trailing` options are `true`, `func` is
  13443. * invoked on the trailing edge of the timeout only if the throttled function
  13444. * is invoked more than once during the `wait` timeout.
  13445. *
  13446. * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
  13447. * until to the next tick, similar to `setTimeout` with a timeout of `0`.
  13448. *
  13449. * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
  13450. * for details over the differences between `_.throttle` and `_.debounce`.
  13451. *
  13452. * @static
  13453. * @memberOf _
  13454. * @since 0.1.0
  13455. * @category Function
  13456. * @param {Function} func The function to throttle.
  13457. * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
  13458. * @param {Object} [options={}] The options object.
  13459. * @param {boolean} [options.leading=true]
  13460. * Specify invoking on the leading edge of the timeout.
  13461. * @param {boolean} [options.trailing=true]
  13462. * Specify invoking on the trailing edge of the timeout.
  13463. * @returns {Function} Returns the new throttled function.
  13464. * @example
  13465. *
  13466. * // Avoid excessively updating the position while scrolling.
  13467. * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
  13468. *
  13469. * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
  13470. * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
  13471. * jQuery(element).on('click', throttled);
  13472. *
  13473. * // Cancel the trailing throttled invocation.
  13474. * jQuery(window).on('popstate', throttled.cancel);
  13475. */
  13476. function throttle(func, wait, options) {
  13477. var leading = true,
  13478. trailing = true;
  13479. if (typeof func != 'function') {
  13480. throw new TypeError(FUNC_ERROR_TEXT);
  13481. }
  13482. if (isObject(options)) {
  13483. leading = 'leading' in options ? !!options.leading : leading;
  13484. trailing = 'trailing' in options ? !!options.trailing : trailing;
  13485. }
  13486. return debounce(func, wait, {
  13487. 'leading': leading,
  13488. 'maxWait': wait,
  13489. 'trailing': trailing
  13490. });
  13491. }
  13492. /**
  13493. * Creates a function that accepts up to one argument, ignoring any
  13494. * additional arguments.
  13495. *
  13496. * @static
  13497. * @memberOf _
  13498. * @since 4.0.0
  13499. * @category Function
  13500. * @param {Function} func The function to cap arguments for.
  13501. * @returns {Function} Returns the new capped function.
  13502. * @example
  13503. *
  13504. * _.map(['6', '8', '10'], _.unary(parseInt));
  13505. * // => [6, 8, 10]
  13506. */
  13507. function unary(func) {
  13508. return ary(func, 1);
  13509. }
  13510. /**
  13511. * Creates a function that provides `value` to `wrapper` as its first
  13512. * argument. Any additional arguments provided to the function are appended
  13513. * to those provided to the `wrapper`. The wrapper is invoked with the `this`
  13514. * binding of the created function.
  13515. *
  13516. * @static
  13517. * @memberOf _
  13518. * @since 0.1.0
  13519. * @category Function
  13520. * @param {*} value The value to wrap.
  13521. * @param {Function} [wrapper=identity] The wrapper function.
  13522. * @returns {Function} Returns the new function.
  13523. * @example
  13524. *
  13525. * var p = _.wrap(_.escape, function(func, text) {
  13526. * return '<p>' + func(text) + '</p>';
  13527. * });
  13528. *
  13529. * p('fred, barney, & pebbles');
  13530. * // => '<p>fred, barney, &amp; pebbles</p>'
  13531. */
  13532. function wrap(value, wrapper) {
  13533. return partial(castFunction(wrapper), value);
  13534. }
  13535. /*------------------------------------------------------------------------*/
  13536. /**
  13537. * Casts `value` as an array if it's not one.
  13538. *
  13539. * @static
  13540. * @memberOf _
  13541. * @since 4.4.0
  13542. * @category Lang
  13543. * @param {*} value The value to inspect.
  13544. * @returns {Array} Returns the cast array.
  13545. * @example
  13546. *
  13547. * _.castArray(1);
  13548. * // => [1]
  13549. *
  13550. * _.castArray({ 'a': 1 });
  13551. * // => [{ 'a': 1 }]
  13552. *
  13553. * _.castArray('abc');
  13554. * // => ['abc']
  13555. *
  13556. * _.castArray(null);
  13557. * // => [null]
  13558. *
  13559. * _.castArray(undefined);
  13560. * // => [undefined]
  13561. *
  13562. * _.castArray();
  13563. * // => []
  13564. *
  13565. * var array = [1, 2, 3];
  13566. * console.log(_.castArray(array) === array);
  13567. * // => true
  13568. */
  13569. function castArray() {
  13570. if (!arguments.length) {
  13571. return [];
  13572. }
  13573. var value = arguments[0];
  13574. return isArray(value) ? value : [value];
  13575. }
  13576. /**
  13577. * Creates a shallow clone of `value`.
  13578. *
  13579. * **Note:** This method is loosely based on the
  13580. * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)
  13581. * and supports cloning arrays, array buffers, booleans, date objects, maps,
  13582. * numbers, `Object` objects, regexes, sets, strings, symbols, and typed
  13583. * arrays. The own enumerable properties of `arguments` objects are cloned
  13584. * as plain objects. An empty object is returned for uncloneable values such
  13585. * as error objects, functions, DOM nodes, and WeakMaps.
  13586. *
  13587. * @static
  13588. * @memberOf _
  13589. * @since 0.1.0
  13590. * @category Lang
  13591. * @param {*} value The value to clone.
  13592. * @returns {*} Returns the cloned value.
  13593. * @see _.cloneDeep
  13594. * @example
  13595. *
  13596. * var objects = [{ 'a': 1 }, { 'b': 2 }];
  13597. *
  13598. * var shallow = _.clone(objects);
  13599. * console.log(shallow[0] === objects[0]);
  13600. * // => true
  13601. */
  13602. function clone(value) {
  13603. return baseClone(value, CLONE_SYMBOLS_FLAG);
  13604. }
  13605. /**
  13606. * This method is like `_.clone` except that it accepts `customizer` which
  13607. * is invoked to produce the cloned value. If `customizer` returns `undefined`,
  13608. * cloning is handled by the method instead. The `customizer` is invoked with
  13609. * up to four arguments; (value [, index|key, object, stack]).
  13610. *
  13611. * @static
  13612. * @memberOf _
  13613. * @since 4.0.0
  13614. * @category Lang
  13615. * @param {*} value The value to clone.
  13616. * @param {Function} [customizer] The function to customize cloning.
  13617. * @returns {*} Returns the cloned value.
  13618. * @see _.cloneDeepWith
  13619. * @example
  13620. *
  13621. * function customizer(value) {
  13622. * if (_.isElement(value)) {
  13623. * return value.cloneNode(false);
  13624. * }
  13625. * }
  13626. *
  13627. * var el = _.cloneWith(document.body, customizer);
  13628. *
  13629. * console.log(el === document.body);
  13630. * // => false
  13631. * console.log(el.nodeName);
  13632. * // => 'BODY'
  13633. * console.log(el.childNodes.length);
  13634. * // => 0
  13635. */
  13636. function cloneWith(value, customizer) {
  13637. customizer = typeof customizer == 'function' ? customizer : undefined;
  13638. return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);
  13639. }
  13640. /**
  13641. * This method is like `_.clone` except that it recursively clones `value`.
  13642. *
  13643. * @static
  13644. * @memberOf _
  13645. * @since 1.0.0
  13646. * @category Lang
  13647. * @param {*} value The value to recursively clone.
  13648. * @returns {*} Returns the deep cloned value.
  13649. * @see _.clone
  13650. * @example
  13651. *
  13652. * var objects = [{ 'a': 1 }, { 'b': 2 }];
  13653. *
  13654. * var deep = _.cloneDeep(objects);
  13655. * console.log(deep[0] === objects[0]);
  13656. * // => false
  13657. */
  13658. function cloneDeep(value) {
  13659. return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
  13660. }
  13661. /**
  13662. * This method is like `_.cloneWith` except that it recursively clones `value`.
  13663. *
  13664. * @static
  13665. * @memberOf _
  13666. * @since 4.0.0
  13667. * @category Lang
  13668. * @param {*} value The value to recursively clone.
  13669. * @param {Function} [customizer] The function to customize cloning.
  13670. * @returns {*} Returns the deep cloned value.
  13671. * @see _.cloneWith
  13672. * @example
  13673. *
  13674. * function customizer(value) {
  13675. * if (_.isElement(value)) {
  13676. * return value.cloneNode(true);
  13677. * }
  13678. * }
  13679. *
  13680. * var el = _.cloneDeepWith(document.body, customizer);
  13681. *
  13682. * console.log(el === document.body);
  13683. * // => false
  13684. * console.log(el.nodeName);
  13685. * // => 'BODY'
  13686. * console.log(el.childNodes.length);
  13687. * // => 20
  13688. */
  13689. function cloneDeepWith(value, customizer) {
  13690. customizer = typeof customizer == 'function' ? customizer : undefined;
  13691. return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);
  13692. }
  13693. /**
  13694. * Checks if `object` conforms to `source` by invoking the predicate
  13695. * properties of `source` with the corresponding property values of `object`.
  13696. *
  13697. * **Note:** This method is equivalent to `_.conforms` when `source` is
  13698. * partially applied.
  13699. *
  13700. * @static
  13701. * @memberOf _
  13702. * @since 4.14.0
  13703. * @category Lang
  13704. * @param {Object} object The object to inspect.
  13705. * @param {Object} source The object of property predicates to conform to.
  13706. * @returns {boolean} Returns `true` if `object` conforms, else `false`.
  13707. * @example
  13708. *
  13709. * var object = { 'a': 1, 'b': 2 };
  13710. *
  13711. * _.conformsTo(object, { 'b': function(n) { return n > 1; } });
  13712. * // => true
  13713. *
  13714. * _.conformsTo(object, { 'b': function(n) { return n > 2; } });
  13715. * // => false
  13716. */
  13717. function conformsTo(object, source) {
  13718. return source == null || baseConformsTo(object, source, keys(source));
  13719. }
  13720. /**
  13721. * Performs a
  13722. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  13723. * comparison between two values to determine if they are equivalent.
  13724. *
  13725. * @static
  13726. * @memberOf _
  13727. * @since 4.0.0
  13728. * @category Lang
  13729. * @param {*} value The value to compare.
  13730. * @param {*} other The other value to compare.
  13731. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  13732. * @example
  13733. *
  13734. * var object = { 'a': 1 };
  13735. * var other = { 'a': 1 };
  13736. *
  13737. * _.eq(object, object);
  13738. * // => true
  13739. *
  13740. * _.eq(object, other);
  13741. * // => false
  13742. *
  13743. * _.eq('a', 'a');
  13744. * // => true
  13745. *
  13746. * _.eq('a', Object('a'));
  13747. * // => false
  13748. *
  13749. * _.eq(NaN, NaN);
  13750. * // => true
  13751. */
  13752. function eq(value, other) {
  13753. return value === other || (value !== value && other !== other);
  13754. }
  13755. /**
  13756. * Checks if `value` is greater than `other`.
  13757. *
  13758. * @static
  13759. * @memberOf _
  13760. * @since 3.9.0
  13761. * @category Lang
  13762. * @param {*} value The value to compare.
  13763. * @param {*} other The other value to compare.
  13764. * @returns {boolean} Returns `true` if `value` is greater than `other`,
  13765. * else `false`.
  13766. * @see _.lt
  13767. * @example
  13768. *
  13769. * _.gt(3, 1);
  13770. * // => true
  13771. *
  13772. * _.gt(3, 3);
  13773. * // => false
  13774. *
  13775. * _.gt(1, 3);
  13776. * // => false
  13777. */
  13778. var gt = createRelationalOperation(baseGt);
  13779. /**
  13780. * Checks if `value` is greater than or equal to `other`.
  13781. *
  13782. * @static
  13783. * @memberOf _
  13784. * @since 3.9.0
  13785. * @category Lang
  13786. * @param {*} value The value to compare.
  13787. * @param {*} other The other value to compare.
  13788. * @returns {boolean} Returns `true` if `value` is greater than or equal to
  13789. * `other`, else `false`.
  13790. * @see _.lte
  13791. * @example
  13792. *
  13793. * _.gte(3, 1);
  13794. * // => true
  13795. *
  13796. * _.gte(3, 3);
  13797. * // => true
  13798. *
  13799. * _.gte(1, 3);
  13800. * // => false
  13801. */
  13802. var gte = createRelationalOperation(function(value, other) {
  13803. return value >= other;
  13804. });
  13805. /**
  13806. * Checks if `value` is likely an `arguments` object.
  13807. *
  13808. * @static
  13809. * @memberOf _
  13810. * @since 0.1.0
  13811. * @category Lang
  13812. * @param {*} value The value to check.
  13813. * @returns {boolean} Returns `true` if `value` is an `arguments` object,
  13814. * else `false`.
  13815. * @example
  13816. *
  13817. * _.isArguments(function() { return arguments; }());
  13818. * // => true
  13819. *
  13820. * _.isArguments([1, 2, 3]);
  13821. * // => false
  13822. */
  13823. var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
  13824. return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
  13825. !propertyIsEnumerable.call(value, 'callee');
  13826. };
  13827. /**
  13828. * Checks if `value` is classified as an `Array` object.
  13829. *
  13830. * @static
  13831. * @memberOf _
  13832. * @since 0.1.0
  13833. * @category Lang
  13834. * @param {*} value The value to check.
  13835. * @returns {boolean} Returns `true` if `value` is an array, else `false`.
  13836. * @example
  13837. *
  13838. * _.isArray([1, 2, 3]);
  13839. * // => true
  13840. *
  13841. * _.isArray(document.body.children);
  13842. * // => false
  13843. *
  13844. * _.isArray('abc');
  13845. * // => false
  13846. *
  13847. * _.isArray(_.noop);
  13848. * // => false
  13849. */
  13850. var isArray = Array.isArray;
  13851. /**
  13852. * Checks if `value` is classified as an `ArrayBuffer` object.
  13853. *
  13854. * @static
  13855. * @memberOf _
  13856. * @since 4.3.0
  13857. * @category Lang
  13858. * @param {*} value The value to check.
  13859. * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
  13860. * @example
  13861. *
  13862. * _.isArrayBuffer(new ArrayBuffer(2));
  13863. * // => true
  13864. *
  13865. * _.isArrayBuffer(new Array(2));
  13866. * // => false
  13867. */
  13868. var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;
  13869. /**
  13870. * Checks if `value` is array-like. A value is considered array-like if it's
  13871. * not a function and has a `value.length` that's an integer greater than or
  13872. * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
  13873. *
  13874. * @static
  13875. * @memberOf _
  13876. * @since 4.0.0
  13877. * @category Lang
  13878. * @param {*} value The value to check.
  13879. * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
  13880. * @example
  13881. *
  13882. * _.isArrayLike([1, 2, 3]);
  13883. * // => true
  13884. *
  13885. * _.isArrayLike(document.body.children);
  13886. * // => true
  13887. *
  13888. * _.isArrayLike('abc');
  13889. * // => true
  13890. *
  13891. * _.isArrayLike(_.noop);
  13892. * // => false
  13893. */
  13894. function isArrayLike(value) {
  13895. return value != null && isLength(value.length) && !isFunction(value);
  13896. }
  13897. /**
  13898. * This method is like `_.isArrayLike` except that it also checks if `value`
  13899. * is an object.
  13900. *
  13901. * @static
  13902. * @memberOf _
  13903. * @since 4.0.0
  13904. * @category Lang
  13905. * @param {*} value The value to check.
  13906. * @returns {boolean} Returns `true` if `value` is an array-like object,
  13907. * else `false`.
  13908. * @example
  13909. *
  13910. * _.isArrayLikeObject([1, 2, 3]);
  13911. * // => true
  13912. *
  13913. * _.isArrayLikeObject(document.body.children);
  13914. * // => true
  13915. *
  13916. * _.isArrayLikeObject('abc');
  13917. * // => false
  13918. *
  13919. * _.isArrayLikeObject(_.noop);
  13920. * // => false
  13921. */
  13922. function isArrayLikeObject(value) {
  13923. return isObjectLike(value) && isArrayLike(value);
  13924. }
  13925. /**
  13926. * Checks if `value` is classified as a boolean primitive or object.
  13927. *
  13928. * @static
  13929. * @memberOf _
  13930. * @since 0.1.0
  13931. * @category Lang
  13932. * @param {*} value The value to check.
  13933. * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.
  13934. * @example
  13935. *
  13936. * _.isBoolean(false);
  13937. * // => true
  13938. *
  13939. * _.isBoolean(null);
  13940. * // => false
  13941. */
  13942. function isBoolean(value) {
  13943. return value === true || value === false ||
  13944. (isObjectLike(value) && baseGetTag(value) == boolTag);
  13945. }
  13946. /**
  13947. * Checks if `value` is a buffer.
  13948. *
  13949. * @static
  13950. * @memberOf _
  13951. * @since 4.3.0
  13952. * @category Lang
  13953. * @param {*} value The value to check.
  13954. * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
  13955. * @example
  13956. *
  13957. * _.isBuffer(new Buffer(2));
  13958. * // => true
  13959. *
  13960. * _.isBuffer(new Uint8Array(2));
  13961. * // => false
  13962. */
  13963. var isBuffer = nativeIsBuffer || stubFalse;
  13964. /**
  13965. * Checks if `value` is classified as a `Date` object.
  13966. *
  13967. * @static
  13968. * @memberOf _
  13969. * @since 0.1.0
  13970. * @category Lang
  13971. * @param {*} value The value to check.
  13972. * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
  13973. * @example
  13974. *
  13975. * _.isDate(new Date);
  13976. * // => true
  13977. *
  13978. * _.isDate('Mon April 23 2012');
  13979. * // => false
  13980. */
  13981. var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;
  13982. /**
  13983. * Checks if `value` is likely a DOM element.
  13984. *
  13985. * @static
  13986. * @memberOf _
  13987. * @since 0.1.0
  13988. * @category Lang
  13989. * @param {*} value The value to check.
  13990. * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.
  13991. * @example
  13992. *
  13993. * _.isElement(document.body);
  13994. * // => true
  13995. *
  13996. * _.isElement('<body>');
  13997. * // => false
  13998. */
  13999. function isElement(value) {
  14000. return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);
  14001. }
  14002. /**
  14003. * Checks if `value` is an empty object, collection, map, or set.
  14004. *
  14005. * Objects are considered empty if they have no own enumerable string keyed
  14006. * properties.
  14007. *
  14008. * Array-like values such as `arguments` objects, arrays, buffers, strings, or
  14009. * jQuery-like collections are considered empty if they have a `length` of `0`.
  14010. * Similarly, maps and sets are considered empty if they have a `size` of `0`.
  14011. *
  14012. * @static
  14013. * @memberOf _
  14014. * @since 0.1.0
  14015. * @category Lang
  14016. * @param {*} value The value to check.
  14017. * @returns {boolean} Returns `true` if `value` is empty, else `false`.
  14018. * @example
  14019. *
  14020. * _.isEmpty(null);
  14021. * // => true
  14022. *
  14023. * _.isEmpty(true);
  14024. * // => true
  14025. *
  14026. * _.isEmpty(1);
  14027. * // => true
  14028. *
  14029. * _.isEmpty([1, 2, 3]);
  14030. * // => false
  14031. *
  14032. * _.isEmpty({ 'a': 1 });
  14033. * // => false
  14034. */
  14035. function isEmpty(value) {
  14036. if (value == null) {
  14037. return true;
  14038. }
  14039. if (isArrayLike(value) &&
  14040. (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||
  14041. isBuffer(value) || isTypedArray(value) || isArguments(value))) {
  14042. return !value.length;
  14043. }
  14044. var tag = getTag(value);
  14045. if (tag == mapTag || tag == setTag) {
  14046. return !value.size;
  14047. }
  14048. if (isPrototype(value)) {
  14049. return !baseKeys(value).length;
  14050. }
  14051. for (var key in value) {
  14052. if (hasOwnProperty.call(value, key)) {
  14053. return false;
  14054. }
  14055. }
  14056. return true;
  14057. }
  14058. /**
  14059. * Performs a deep comparison between two values to determine if they are
  14060. * equivalent.
  14061. *
  14062. * **Note:** This method supports comparing arrays, array buffers, booleans,
  14063. * date objects, error objects, maps, numbers, `Object` objects, regexes,
  14064. * sets, strings, symbols, and typed arrays. `Object` objects are compared
  14065. * by their own, not inherited, enumerable properties. Functions and DOM
  14066. * nodes are compared by strict equality, i.e. `===`.
  14067. *
  14068. * @static
  14069. * @memberOf _
  14070. * @since 0.1.0
  14071. * @category Lang
  14072. * @param {*} value The value to compare.
  14073. * @param {*} other The other value to compare.
  14074. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  14075. * @example
  14076. *
  14077. * var object = { 'a': 1 };
  14078. * var other = { 'a': 1 };
  14079. *
  14080. * _.isEqual(object, other);
  14081. * // => true
  14082. *
  14083. * object === other;
  14084. * // => false
  14085. */
  14086. function isEqual(value, other) {
  14087. return baseIsEqual(value, other);
  14088. }
  14089. /**
  14090. * This method is like `_.isEqual` except that it accepts `customizer` which
  14091. * is invoked to compare values. If `customizer` returns `undefined`, comparisons
  14092. * are handled by the method instead. The `customizer` is invoked with up to
  14093. * six arguments: (objValue, othValue [, index|key, object, other, stack]).
  14094. *
  14095. * @static
  14096. * @memberOf _
  14097. * @since 4.0.0
  14098. * @category Lang
  14099. * @param {*} value The value to compare.
  14100. * @param {*} other The other value to compare.
  14101. * @param {Function} [customizer] The function to customize comparisons.
  14102. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  14103. * @example
  14104. *
  14105. * function isGreeting(value) {
  14106. * return /^h(?:i|ello)$/.test(value);
  14107. * }
  14108. *
  14109. * function customizer(objValue, othValue) {
  14110. * if (isGreeting(objValue) && isGreeting(othValue)) {
  14111. * return true;
  14112. * }
  14113. * }
  14114. *
  14115. * var array = ['hello', 'goodbye'];
  14116. * var other = ['hi', 'goodbye'];
  14117. *
  14118. * _.isEqualWith(array, other, customizer);
  14119. * // => true
  14120. */
  14121. function isEqualWith(value, other, customizer) {
  14122. customizer = typeof customizer == 'function' ? customizer : undefined;
  14123. var result = customizer ? customizer(value, other) : undefined;
  14124. return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;
  14125. }
  14126. /**
  14127. * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,
  14128. * `SyntaxError`, `TypeError`, or `URIError` object.
  14129. *
  14130. * @static
  14131. * @memberOf _
  14132. * @since 3.0.0
  14133. * @category Lang
  14134. * @param {*} value The value to check.
  14135. * @returns {boolean} Returns `true` if `value` is an error object, else `false`.
  14136. * @example
  14137. *
  14138. * _.isError(new Error);
  14139. * // => true
  14140. *
  14141. * _.isError(Error);
  14142. * // => false
  14143. */
  14144. function isError(value) {
  14145. if (!isObjectLike(value)) {
  14146. return false;
  14147. }
  14148. var tag = baseGetTag(value);
  14149. return tag == errorTag || tag == domExcTag ||
  14150. (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));
  14151. }
  14152. /**
  14153. * Checks if `value` is a finite primitive number.
  14154. *
  14155. * **Note:** This method is based on
  14156. * [`Number.isFinite`](https://mdn.io/Number/isFinite).
  14157. *
  14158. * @static
  14159. * @memberOf _
  14160. * @since 0.1.0
  14161. * @category Lang
  14162. * @param {*} value The value to check.
  14163. * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.
  14164. * @example
  14165. *
  14166. * _.isFinite(3);
  14167. * // => true
  14168. *
  14169. * _.isFinite(Number.MIN_VALUE);
  14170. * // => true
  14171. *
  14172. * _.isFinite(Infinity);
  14173. * // => false
  14174. *
  14175. * _.isFinite('3');
  14176. * // => false
  14177. */
  14178. function isFinite(value) {
  14179. return typeof value == 'number' && nativeIsFinite(value);
  14180. }
  14181. /**
  14182. * Checks if `value` is classified as a `Function` object.
  14183. *
  14184. * @static
  14185. * @memberOf _
  14186. * @since 0.1.0
  14187. * @category Lang
  14188. * @param {*} value The value to check.
  14189. * @returns {boolean} Returns `true` if `value` is a function, else `false`.
  14190. * @example
  14191. *
  14192. * _.isFunction(_);
  14193. * // => true
  14194. *
  14195. * _.isFunction(/abc/);
  14196. * // => false
  14197. */
  14198. function isFunction(value) {
  14199. if (!isObject(value)) {
  14200. return false;
  14201. }
  14202. // The use of `Object#toString` avoids issues with the `typeof` operator
  14203. // in Safari 9 which returns 'object' for typed arrays and other constructors.
  14204. var tag = baseGetTag(value);
  14205. return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
  14206. }
  14207. /**
  14208. * Checks if `value` is an integer.
  14209. *
  14210. * **Note:** This method is based on
  14211. * [`Number.isInteger`](https://mdn.io/Number/isInteger).
  14212. *
  14213. * @static
  14214. * @memberOf _
  14215. * @since 4.0.0
  14216. * @category Lang
  14217. * @param {*} value The value to check.
  14218. * @returns {boolean} Returns `true` if `value` is an integer, else `false`.
  14219. * @example
  14220. *
  14221. * _.isInteger(3);
  14222. * // => true
  14223. *
  14224. * _.isInteger(Number.MIN_VALUE);
  14225. * // => false
  14226. *
  14227. * _.isInteger(Infinity);
  14228. * // => false
  14229. *
  14230. * _.isInteger('3');
  14231. * // => false
  14232. */
  14233. function isInteger(value) {
  14234. return typeof value == 'number' && value == toInteger(value);
  14235. }
  14236. /**
  14237. * Checks if `value` is a valid array-like length.
  14238. *
  14239. * **Note:** This method is loosely based on
  14240. * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
  14241. *
  14242. * @static
  14243. * @memberOf _
  14244. * @since 4.0.0
  14245. * @category Lang
  14246. * @param {*} value The value to check.
  14247. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
  14248. * @example
  14249. *
  14250. * _.isLength(3);
  14251. * // => true
  14252. *
  14253. * _.isLength(Number.MIN_VALUE);
  14254. * // => false
  14255. *
  14256. * _.isLength(Infinity);
  14257. * // => false
  14258. *
  14259. * _.isLength('3');
  14260. * // => false
  14261. */
  14262. function isLength(value) {
  14263. return typeof value == 'number' &&
  14264. value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
  14265. }
  14266. /**
  14267. * Checks if `value` is the
  14268. * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
  14269. * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
  14270. *
  14271. * @static
  14272. * @memberOf _
  14273. * @since 0.1.0
  14274. * @category Lang
  14275. * @param {*} value The value to check.
  14276. * @returns {boolean} Returns `true` if `value` is an object, else `false`.
  14277. * @example
  14278. *
  14279. * _.isObject({});
  14280. * // => true
  14281. *
  14282. * _.isObject([1, 2, 3]);
  14283. * // => true
  14284. *
  14285. * _.isObject(_.noop);
  14286. * // => true
  14287. *
  14288. * _.isObject(null);
  14289. * // => false
  14290. */
  14291. function isObject(value) {
  14292. var type = typeof value;
  14293. return value != null && (type == 'object' || type == 'function');
  14294. }
  14295. /**
  14296. * Checks if `value` is object-like. A value is object-like if it's not `null`
  14297. * and has a `typeof` result of "object".
  14298. *
  14299. * @static
  14300. * @memberOf _
  14301. * @since 4.0.0
  14302. * @category Lang
  14303. * @param {*} value The value to check.
  14304. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  14305. * @example
  14306. *
  14307. * _.isObjectLike({});
  14308. * // => true
  14309. *
  14310. * _.isObjectLike([1, 2, 3]);
  14311. * // => true
  14312. *
  14313. * _.isObjectLike(_.noop);
  14314. * // => false
  14315. *
  14316. * _.isObjectLike(null);
  14317. * // => false
  14318. */
  14319. function isObjectLike(value) {
  14320. return value != null && typeof value == 'object';
  14321. }
  14322. /**
  14323. * Checks if `value` is classified as a `Map` object.
  14324. *
  14325. * @static
  14326. * @memberOf _
  14327. * @since 4.3.0
  14328. * @category Lang
  14329. * @param {*} value The value to check.
  14330. * @returns {boolean} Returns `true` if `value` is a map, else `false`.
  14331. * @example
  14332. *
  14333. * _.isMap(new Map);
  14334. * // => true
  14335. *
  14336. * _.isMap(new WeakMap);
  14337. * // => false
  14338. */
  14339. var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
  14340. /**
  14341. * Performs a partial deep comparison between `object` and `source` to
  14342. * determine if `object` contains equivalent property values.
  14343. *
  14344. * **Note:** This method is equivalent to `_.matches` when `source` is
  14345. * partially applied.
  14346. *
  14347. * Partial comparisons will match empty array and empty object `source`
  14348. * values against any array or object value, respectively. See `_.isEqual`
  14349. * for a list of supported value comparisons.
  14350. *
  14351. * @static
  14352. * @memberOf _
  14353. * @since 3.0.0
  14354. * @category Lang
  14355. * @param {Object} object The object to inspect.
  14356. * @param {Object} source The object of property values to match.
  14357. * @returns {boolean} Returns `true` if `object` is a match, else `false`.
  14358. * @example
  14359. *
  14360. * var object = { 'a': 1, 'b': 2 };
  14361. *
  14362. * _.isMatch(object, { 'b': 2 });
  14363. * // => true
  14364. *
  14365. * _.isMatch(object, { 'b': 1 });
  14366. * // => false
  14367. */
  14368. function isMatch(object, source) {
  14369. return object === source || baseIsMatch(object, source, getMatchData(source));
  14370. }
  14371. /**
  14372. * This method is like `_.isMatch` except that it accepts `customizer` which
  14373. * is invoked to compare values. If `customizer` returns `undefined`, comparisons
  14374. * are handled by the method instead. The `customizer` is invoked with five
  14375. * arguments: (objValue, srcValue, index|key, object, source).
  14376. *
  14377. * @static
  14378. * @memberOf _
  14379. * @since 4.0.0
  14380. * @category Lang
  14381. * @param {Object} object The object to inspect.
  14382. * @param {Object} source The object of property values to match.
  14383. * @param {Function} [customizer] The function to customize comparisons.
  14384. * @returns {boolean} Returns `true` if `object` is a match, else `false`.
  14385. * @example
  14386. *
  14387. * function isGreeting(value) {
  14388. * return /^h(?:i|ello)$/.test(value);
  14389. * }
  14390. *
  14391. * function customizer(objValue, srcValue) {
  14392. * if (isGreeting(objValue) && isGreeting(srcValue)) {
  14393. * return true;
  14394. * }
  14395. * }
  14396. *
  14397. * var object = { 'greeting': 'hello' };
  14398. * var source = { 'greeting': 'hi' };
  14399. *
  14400. * _.isMatchWith(object, source, customizer);
  14401. * // => true
  14402. */
  14403. function isMatchWith(object, source, customizer) {
  14404. customizer = typeof customizer == 'function' ? customizer : undefined;
  14405. return baseIsMatch(object, source, getMatchData(source), customizer);
  14406. }
  14407. /**
  14408. * Checks if `value` is `NaN`.
  14409. *
  14410. * **Note:** This method is based on
  14411. * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as
  14412. * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for
  14413. * `undefined` and other non-number values.
  14414. *
  14415. * @static
  14416. * @memberOf _
  14417. * @since 0.1.0
  14418. * @category Lang
  14419. * @param {*} value The value to check.
  14420. * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
  14421. * @example
  14422. *
  14423. * _.isNaN(NaN);
  14424. * // => true
  14425. *
  14426. * _.isNaN(new Number(NaN));
  14427. * // => true
  14428. *
  14429. * isNaN(undefined);
  14430. * // => true
  14431. *
  14432. * _.isNaN(undefined);
  14433. * // => false
  14434. */
  14435. function isNaN(value) {
  14436. // An `NaN` primitive is the only value that is not equal to itself.
  14437. // Perform the `toStringTag` check first to avoid errors with some
  14438. // ActiveX objects in IE.
  14439. return isNumber(value) && value != +value;
  14440. }
  14441. /**
  14442. * Checks if `value` is a pristine native function.
  14443. *
  14444. * **Note:** This method can't reliably detect native functions in the presence
  14445. * of the core-js package because core-js circumvents this kind of detection.
  14446. * Despite multiple requests, the core-js maintainer has made it clear: any
  14447. * attempt to fix the detection will be obstructed. As a result, we're left
  14448. * with little choice but to throw an error. Unfortunately, this also affects
  14449. * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),
  14450. * which rely on core-js.
  14451. *
  14452. * @static
  14453. * @memberOf _
  14454. * @since 3.0.0
  14455. * @category Lang
  14456. * @param {*} value The value to check.
  14457. * @returns {boolean} Returns `true` if `value` is a native function,
  14458. * else `false`.
  14459. * @example
  14460. *
  14461. * _.isNative(Array.prototype.push);
  14462. * // => true
  14463. *
  14464. * _.isNative(_);
  14465. * // => false
  14466. */
  14467. function isNative(value) {
  14468. if (isMaskable(value)) {
  14469. throw new Error(CORE_ERROR_TEXT);
  14470. }
  14471. return baseIsNative(value);
  14472. }
  14473. /**
  14474. * Checks if `value` is `null`.
  14475. *
  14476. * @static
  14477. * @memberOf _
  14478. * @since 0.1.0
  14479. * @category Lang
  14480. * @param {*} value The value to check.
  14481. * @returns {boolean} Returns `true` if `value` is `null`, else `false`.
  14482. * @example
  14483. *
  14484. * _.isNull(null);
  14485. * // => true
  14486. *
  14487. * _.isNull(void 0);
  14488. * // => false
  14489. */
  14490. function isNull(value) {
  14491. return value === null;
  14492. }
  14493. /**
  14494. * Checks if `value` is `null` or `undefined`.
  14495. *
  14496. * @static
  14497. * @memberOf _
  14498. * @since 4.0.0
  14499. * @category Lang
  14500. * @param {*} value The value to check.
  14501. * @returns {boolean} Returns `true` if `value` is nullish, else `false`.
  14502. * @example
  14503. *
  14504. * _.isNil(null);
  14505. * // => true
  14506. *
  14507. * _.isNil(void 0);
  14508. * // => true
  14509. *
  14510. * _.isNil(NaN);
  14511. * // => false
  14512. */
  14513. function isNil(value) {
  14514. return value == null;
  14515. }
  14516. /**
  14517. * Checks if `value` is classified as a `Number` primitive or object.
  14518. *
  14519. * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are
  14520. * classified as numbers, use the `_.isFinite` method.
  14521. *
  14522. * @static
  14523. * @memberOf _
  14524. * @since 0.1.0
  14525. * @category Lang
  14526. * @param {*} value The value to check.
  14527. * @returns {boolean} Returns `true` if `value` is a number, else `false`.
  14528. * @example
  14529. *
  14530. * _.isNumber(3);
  14531. * // => true
  14532. *
  14533. * _.isNumber(Number.MIN_VALUE);
  14534. * // => true
  14535. *
  14536. * _.isNumber(Infinity);
  14537. * // => true
  14538. *
  14539. * _.isNumber('3');
  14540. * // => false
  14541. */
  14542. function isNumber(value) {
  14543. return typeof value == 'number' ||
  14544. (isObjectLike(value) && baseGetTag(value) == numberTag);
  14545. }
  14546. /**
  14547. * Checks if `value` is a plain object, that is, an object created by the
  14548. * `Object` constructor or one with a `[[Prototype]]` of `null`.
  14549. *
  14550. * @static
  14551. * @memberOf _
  14552. * @since 0.8.0
  14553. * @category Lang
  14554. * @param {*} value The value to check.
  14555. * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
  14556. * @example
  14557. *
  14558. * function Foo() {
  14559. * this.a = 1;
  14560. * }
  14561. *
  14562. * _.isPlainObject(new Foo);
  14563. * // => false
  14564. *
  14565. * _.isPlainObject([1, 2, 3]);
  14566. * // => false
  14567. *
  14568. * _.isPlainObject({ 'x': 0, 'y': 0 });
  14569. * // => true
  14570. *
  14571. * _.isPlainObject(Object.create(null));
  14572. * // => true
  14573. */
  14574. function isPlainObject(value) {
  14575. if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
  14576. return false;
  14577. }
  14578. var proto = getPrototype(value);
  14579. if (proto === null) {
  14580. return true;
  14581. }
  14582. var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
  14583. return typeof Ctor == 'function' && Ctor instanceof Ctor &&
  14584. funcToString.call(Ctor) == objectCtorString;
  14585. }
  14586. /**
  14587. * Checks if `value` is classified as a `RegExp` object.
  14588. *
  14589. * @static
  14590. * @memberOf _
  14591. * @since 0.1.0
  14592. * @category Lang
  14593. * @param {*} value The value to check.
  14594. * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
  14595. * @example
  14596. *
  14597. * _.isRegExp(/abc/);
  14598. * // => true
  14599. *
  14600. * _.isRegExp('/abc/');
  14601. * // => false
  14602. */
  14603. var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;
  14604. /**
  14605. * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754
  14606. * double precision number which isn't the result of a rounded unsafe integer.
  14607. *
  14608. * **Note:** This method is based on
  14609. * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).
  14610. *
  14611. * @static
  14612. * @memberOf _
  14613. * @since 4.0.0
  14614. * @category Lang
  14615. * @param {*} value The value to check.
  14616. * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.
  14617. * @example
  14618. *
  14619. * _.isSafeInteger(3);
  14620. * // => true
  14621. *
  14622. * _.isSafeInteger(Number.MIN_VALUE);
  14623. * // => false
  14624. *
  14625. * _.isSafeInteger(Infinity);
  14626. * // => false
  14627. *
  14628. * _.isSafeInteger('3');
  14629. * // => false
  14630. */
  14631. function isSafeInteger(value) {
  14632. return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;
  14633. }
  14634. /**
  14635. * Checks if `value` is classified as a `Set` object.
  14636. *
  14637. * @static
  14638. * @memberOf _
  14639. * @since 4.3.0
  14640. * @category Lang
  14641. * @param {*} value The value to check.
  14642. * @returns {boolean} Returns `true` if `value` is a set, else `false`.
  14643. * @example
  14644. *
  14645. * _.isSet(new Set);
  14646. * // => true
  14647. *
  14648. * _.isSet(new WeakSet);
  14649. * // => false
  14650. */
  14651. var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
  14652. /**
  14653. * Checks if `value` is classified as a `String` primitive or object.
  14654. *
  14655. * @static
  14656. * @since 0.1.0
  14657. * @memberOf _
  14658. * @category Lang
  14659. * @param {*} value The value to check.
  14660. * @returns {boolean} Returns `true` if `value` is a string, else `false`.
  14661. * @example
  14662. *
  14663. * _.isString('abc');
  14664. * // => true
  14665. *
  14666. * _.isString(1);
  14667. * // => false
  14668. */
  14669. function isString(value) {
  14670. return typeof value == 'string' ||
  14671. (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);
  14672. }
  14673. /**
  14674. * Checks if `value` is classified as a `Symbol` primitive or object.
  14675. *
  14676. * @static
  14677. * @memberOf _
  14678. * @since 4.0.0
  14679. * @category Lang
  14680. * @param {*} value The value to check.
  14681. * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
  14682. * @example
  14683. *
  14684. * _.isSymbol(Symbol.iterator);
  14685. * // => true
  14686. *
  14687. * _.isSymbol('abc');
  14688. * // => false
  14689. */
  14690. function isSymbol(value) {
  14691. return typeof value == 'symbol' ||
  14692. (isObjectLike(value) && baseGetTag(value) == symbolTag);
  14693. }
  14694. /**
  14695. * Checks if `value` is classified as a typed array.
  14696. *
  14697. * @static
  14698. * @memberOf _
  14699. * @since 3.0.0
  14700. * @category Lang
  14701. * @param {*} value The value to check.
  14702. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
  14703. * @example
  14704. *
  14705. * _.isTypedArray(new Uint8Array);
  14706. * // => true
  14707. *
  14708. * _.isTypedArray([]);
  14709. * // => false
  14710. */
  14711. var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
  14712. /**
  14713. * Checks if `value` is `undefined`.
  14714. *
  14715. * @static
  14716. * @since 0.1.0
  14717. * @memberOf _
  14718. * @category Lang
  14719. * @param {*} value The value to check.
  14720. * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
  14721. * @example
  14722. *
  14723. * _.isUndefined(void 0);
  14724. * // => true
  14725. *
  14726. * _.isUndefined(null);
  14727. * // => false
  14728. */
  14729. function isUndefined(value) {
  14730. return value === undefined;
  14731. }
  14732. /**
  14733. * Checks if `value` is classified as a `WeakMap` object.
  14734. *
  14735. * @static
  14736. * @memberOf _
  14737. * @since 4.3.0
  14738. * @category Lang
  14739. * @param {*} value The value to check.
  14740. * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.
  14741. * @example
  14742. *
  14743. * _.isWeakMap(new WeakMap);
  14744. * // => true
  14745. *
  14746. * _.isWeakMap(new Map);
  14747. * // => false
  14748. */
  14749. function isWeakMap(value) {
  14750. return isObjectLike(value) && getTag(value) == weakMapTag;
  14751. }
  14752. /**
  14753. * Checks if `value` is classified as a `WeakSet` object.
  14754. *
  14755. * @static
  14756. * @memberOf _
  14757. * @since 4.3.0
  14758. * @category Lang
  14759. * @param {*} value The value to check.
  14760. * @returns {boolean} Returns `true` if `value` is a weak set, else `false`.
  14761. * @example
  14762. *
  14763. * _.isWeakSet(new WeakSet);
  14764. * // => true
  14765. *
  14766. * _.isWeakSet(new Set);
  14767. * // => false
  14768. */
  14769. function isWeakSet(value) {
  14770. return isObjectLike(value) && baseGetTag(value) == weakSetTag;
  14771. }
  14772. /**
  14773. * Checks if `value` is less than `other`.
  14774. *
  14775. * @static
  14776. * @memberOf _
  14777. * @since 3.9.0
  14778. * @category Lang
  14779. * @param {*} value The value to compare.
  14780. * @param {*} other The other value to compare.
  14781. * @returns {boolean} Returns `true` if `value` is less than `other`,
  14782. * else `false`.
  14783. * @see _.gt
  14784. * @example
  14785. *
  14786. * _.lt(1, 3);
  14787. * // => true
  14788. *
  14789. * _.lt(3, 3);
  14790. * // => false
  14791. *
  14792. * _.lt(3, 1);
  14793. * // => false
  14794. */
  14795. var lt = createRelationalOperation(baseLt);
  14796. /**
  14797. * Checks if `value` is less than or equal to `other`.
  14798. *
  14799. * @static
  14800. * @memberOf _
  14801. * @since 3.9.0
  14802. * @category Lang
  14803. * @param {*} value The value to compare.
  14804. * @param {*} other The other value to compare.
  14805. * @returns {boolean} Returns `true` if `value` is less than or equal to
  14806. * `other`, else `false`.
  14807. * @see _.gte
  14808. * @example
  14809. *
  14810. * _.lte(1, 3);
  14811. * // => true
  14812. *
  14813. * _.lte(3, 3);
  14814. * // => true
  14815. *
  14816. * _.lte(3, 1);
  14817. * // => false
  14818. */
  14819. var lte = createRelationalOperation(function(value, other) {
  14820. return value <= other;
  14821. });
  14822. /**
  14823. * Converts `value` to an array.
  14824. *
  14825. * @static
  14826. * @since 0.1.0
  14827. * @memberOf _
  14828. * @category Lang
  14829. * @param {*} value The value to convert.
  14830. * @returns {Array} Returns the converted array.
  14831. * @example
  14832. *
  14833. * _.toArray({ 'a': 1, 'b': 2 });
  14834. * // => [1, 2]
  14835. *
  14836. * _.toArray('abc');
  14837. * // => ['a', 'b', 'c']
  14838. *
  14839. * _.toArray(1);
  14840. * // => []
  14841. *
  14842. * _.toArray(null);
  14843. * // => []
  14844. */
  14845. function toArray(value) {
  14846. if (!value) {
  14847. return [];
  14848. }
  14849. if (isArrayLike(value)) {
  14850. return isString(value) ? stringToArray(value) : copyArray(value);
  14851. }
  14852. if (symIterator && value[symIterator]) {
  14853. return iteratorToArray(value[symIterator]());
  14854. }
  14855. var tag = getTag(value),
  14856. func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);
  14857. return func(value);
  14858. }
  14859. /**
  14860. * Converts `value` to a finite number.
  14861. *
  14862. * @static
  14863. * @memberOf _
  14864. * @since 4.12.0
  14865. * @category Lang
  14866. * @param {*} value The value to convert.
  14867. * @returns {number} Returns the converted number.
  14868. * @example
  14869. *
  14870. * _.toFinite(3.2);
  14871. * // => 3.2
  14872. *
  14873. * _.toFinite(Number.MIN_VALUE);
  14874. * // => 5e-324
  14875. *
  14876. * _.toFinite(Infinity);
  14877. * // => 1.7976931348623157e+308
  14878. *
  14879. * _.toFinite('3.2');
  14880. * // => 3.2
  14881. */
  14882. function toFinite(value) {
  14883. if (!value) {
  14884. return value === 0 ? value : 0;
  14885. }
  14886. value = toNumber(value);
  14887. if (value === INFINITY || value === -INFINITY) {
  14888. var sign = (value < 0 ? -1 : 1);
  14889. return sign * MAX_INTEGER;
  14890. }
  14891. return value === value ? value : 0;
  14892. }
  14893. /**
  14894. * Converts `value` to an integer.
  14895. *
  14896. * **Note:** This method is loosely based on
  14897. * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
  14898. *
  14899. * @static
  14900. * @memberOf _
  14901. * @since 4.0.0
  14902. * @category Lang
  14903. * @param {*} value The value to convert.
  14904. * @returns {number} Returns the converted integer.
  14905. * @example
  14906. *
  14907. * _.toInteger(3.2);
  14908. * // => 3
  14909. *
  14910. * _.toInteger(Number.MIN_VALUE);
  14911. * // => 0
  14912. *
  14913. * _.toInteger(Infinity);
  14914. * // => 1.7976931348623157e+308
  14915. *
  14916. * _.toInteger('3.2');
  14917. * // => 3
  14918. */
  14919. function toInteger(value) {
  14920. var result = toFinite(value),
  14921. remainder = result % 1;
  14922. return result === result ? (remainder ? result - remainder : result) : 0;
  14923. }
  14924. /**
  14925. * Converts `value` to an integer suitable for use as the length of an
  14926. * array-like object.
  14927. *
  14928. * **Note:** This method is based on
  14929. * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
  14930. *
  14931. * @static
  14932. * @memberOf _
  14933. * @since 4.0.0
  14934. * @category Lang
  14935. * @param {*} value The value to convert.
  14936. * @returns {number} Returns the converted integer.
  14937. * @example
  14938. *
  14939. * _.toLength(3.2);
  14940. * // => 3
  14941. *
  14942. * _.toLength(Number.MIN_VALUE);
  14943. * // => 0
  14944. *
  14945. * _.toLength(Infinity);
  14946. * // => 4294967295
  14947. *
  14948. * _.toLength('3.2');
  14949. * // => 3
  14950. */
  14951. function toLength(value) {
  14952. return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;
  14953. }
  14954. /**
  14955. * Converts `value` to a number.
  14956. *
  14957. * @static
  14958. * @memberOf _
  14959. * @since 4.0.0
  14960. * @category Lang
  14961. * @param {*} value The value to process.
  14962. * @returns {number} Returns the number.
  14963. * @example
  14964. *
  14965. * _.toNumber(3.2);
  14966. * // => 3.2
  14967. *
  14968. * _.toNumber(Number.MIN_VALUE);
  14969. * // => 5e-324
  14970. *
  14971. * _.toNumber(Infinity);
  14972. * // => Infinity
  14973. *
  14974. * _.toNumber('3.2');
  14975. * // => 3.2
  14976. */
  14977. function toNumber(value) {
  14978. if (typeof value == 'number') {
  14979. return value;
  14980. }
  14981. if (isSymbol(value)) {
  14982. return NAN;
  14983. }
  14984. if (isObject(value)) {
  14985. var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
  14986. value = isObject(other) ? (other + '') : other;
  14987. }
  14988. if (typeof value != 'string') {
  14989. return value === 0 ? value : +value;
  14990. }
  14991. value = value.replace(reTrim, '');
  14992. var isBinary = reIsBinary.test(value);
  14993. return (isBinary || reIsOctal.test(value))
  14994. ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
  14995. : (reIsBadHex.test(value) ? NAN : +value);
  14996. }
  14997. /**
  14998. * Converts `value` to a plain object flattening inherited enumerable string
  14999. * keyed properties of `value` to own properties of the plain object.
  15000. *
  15001. * @static
  15002. * @memberOf _
  15003. * @since 3.0.0
  15004. * @category Lang
  15005. * @param {*} value The value to convert.
  15006. * @returns {Object} Returns the converted plain object.
  15007. * @example
  15008. *
  15009. * function Foo() {
  15010. * this.b = 2;
  15011. * }
  15012. *
  15013. * Foo.prototype.c = 3;
  15014. *
  15015. * _.assign({ 'a': 1 }, new Foo);
  15016. * // => { 'a': 1, 'b': 2 }
  15017. *
  15018. * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
  15019. * // => { 'a': 1, 'b': 2, 'c': 3 }
  15020. */
  15021. function toPlainObject(value) {
  15022. return copyObject(value, keysIn(value));
  15023. }
  15024. /**
  15025. * Converts `value` to a safe integer. A safe integer can be compared and
  15026. * represented correctly.
  15027. *
  15028. * @static
  15029. * @memberOf _
  15030. * @since 4.0.0
  15031. * @category Lang
  15032. * @param {*} value The value to convert.
  15033. * @returns {number} Returns the converted integer.
  15034. * @example
  15035. *
  15036. * _.toSafeInteger(3.2);
  15037. * // => 3
  15038. *
  15039. * _.toSafeInteger(Number.MIN_VALUE);
  15040. * // => 0
  15041. *
  15042. * _.toSafeInteger(Infinity);
  15043. * // => 9007199254740991
  15044. *
  15045. * _.toSafeInteger('3.2');
  15046. * // => 3
  15047. */
  15048. function toSafeInteger(value) {
  15049. return value
  15050. ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)
  15051. : (value === 0 ? value : 0);
  15052. }
  15053. /**
  15054. * Converts `value` to a string. An empty string is returned for `null`
  15055. * and `undefined` values. The sign of `-0` is preserved.
  15056. *
  15057. * @static
  15058. * @memberOf _
  15059. * @since 4.0.0
  15060. * @category Lang
  15061. * @param {*} value The value to convert.
  15062. * @returns {string} Returns the converted string.
  15063. * @example
  15064. *
  15065. * _.toString(null);
  15066. * // => ''
  15067. *
  15068. * _.toString(-0);
  15069. * // => '-0'
  15070. *
  15071. * _.toString([1, 2, 3]);
  15072. * // => '1,2,3'
  15073. */
  15074. function toString(value) {
  15075. return value == null ? '' : baseToString(value);
  15076. }
  15077. /*------------------------------------------------------------------------*/
  15078. /**
  15079. * Assigns own enumerable string keyed properties of source objects to the
  15080. * destination object. Source objects are applied from left to right.
  15081. * Subsequent sources overwrite property assignments of previous sources.
  15082. *
  15083. * **Note:** This method mutates `object` and is loosely based on
  15084. * [`Object.assign`](https://mdn.io/Object/assign).
  15085. *
  15086. * @static
  15087. * @memberOf _
  15088. * @since 0.10.0
  15089. * @category Object
  15090. * @param {Object} object The destination object.
  15091. * @param {...Object} [sources] The source objects.
  15092. * @returns {Object} Returns `object`.
  15093. * @see _.assignIn
  15094. * @example
  15095. *
  15096. * function Foo() {
  15097. * this.a = 1;
  15098. * }
  15099. *
  15100. * function Bar() {
  15101. * this.c = 3;
  15102. * }
  15103. *
  15104. * Foo.prototype.b = 2;
  15105. * Bar.prototype.d = 4;
  15106. *
  15107. * _.assign({ 'a': 0 }, new Foo, new Bar);
  15108. * // => { 'a': 1, 'c': 3 }
  15109. */
  15110. var assign = createAssigner(function(object, source) {
  15111. if (isPrototype(source) || isArrayLike(source)) {
  15112. copyObject(source, keys(source), object);
  15113. return;
  15114. }
  15115. for (var key in source) {
  15116. if (hasOwnProperty.call(source, key)) {
  15117. assignValue(object, key, source[key]);
  15118. }
  15119. }
  15120. });
  15121. /**
  15122. * This method is like `_.assign` except that it iterates over own and
  15123. * inherited source properties.
  15124. *
  15125. * **Note:** This method mutates `object`.
  15126. *
  15127. * @static
  15128. * @memberOf _
  15129. * @since 4.0.0
  15130. * @alias extend
  15131. * @category Object
  15132. * @param {Object} object The destination object.
  15133. * @param {...Object} [sources] The source objects.
  15134. * @returns {Object} Returns `object`.
  15135. * @see _.assign
  15136. * @example
  15137. *
  15138. * function Foo() {
  15139. * this.a = 1;
  15140. * }
  15141. *
  15142. * function Bar() {
  15143. * this.c = 3;
  15144. * }
  15145. *
  15146. * Foo.prototype.b = 2;
  15147. * Bar.prototype.d = 4;
  15148. *
  15149. * _.assignIn({ 'a': 0 }, new Foo, new Bar);
  15150. * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }
  15151. */
  15152. var assignIn = createAssigner(function(object, source) {
  15153. copyObject(source, keysIn(source), object);
  15154. });
  15155. /**
  15156. * This method is like `_.assignIn` except that it accepts `customizer`
  15157. * which is invoked to produce the assigned values. If `customizer` returns
  15158. * `undefined`, assignment is handled by the method instead. The `customizer`
  15159. * is invoked with five arguments: (objValue, srcValue, key, object, source).
  15160. *
  15161. * **Note:** This method mutates `object`.
  15162. *
  15163. * @static
  15164. * @memberOf _
  15165. * @since 4.0.0
  15166. * @alias extendWith
  15167. * @category Object
  15168. * @param {Object} object The destination object.
  15169. * @param {...Object} sources The source objects.
  15170. * @param {Function} [customizer] The function to customize assigned values.
  15171. * @returns {Object} Returns `object`.
  15172. * @see _.assignWith
  15173. * @example
  15174. *
  15175. * function customizer(objValue, srcValue) {
  15176. * return _.isUndefined(objValue) ? srcValue : objValue;
  15177. * }
  15178. *
  15179. * var defaults = _.partialRight(_.assignInWith, customizer);
  15180. *
  15181. * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
  15182. * // => { 'a': 1, 'b': 2 }
  15183. */
  15184. var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {
  15185. copyObject(source, keysIn(source), object, customizer);
  15186. });
  15187. /**
  15188. * This method is like `_.assign` except that it accepts `customizer`
  15189. * which is invoked to produce the assigned values. If `customizer` returns
  15190. * `undefined`, assignment is handled by the method instead. The `customizer`
  15191. * is invoked with five arguments: (objValue, srcValue, key, object, source).
  15192. *
  15193. * **Note:** This method mutates `object`.
  15194. *
  15195. * @static
  15196. * @memberOf _
  15197. * @since 4.0.0
  15198. * @category Object
  15199. * @param {Object} object The destination object.
  15200. * @param {...Object} sources The source objects.
  15201. * @param {Function} [customizer] The function to customize assigned values.
  15202. * @returns {Object} Returns `object`.
  15203. * @see _.assignInWith
  15204. * @example
  15205. *
  15206. * function customizer(objValue, srcValue) {
  15207. * return _.isUndefined(objValue) ? srcValue : objValue;
  15208. * }
  15209. *
  15210. * var defaults = _.partialRight(_.assignWith, customizer);
  15211. *
  15212. * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
  15213. * // => { 'a': 1, 'b': 2 }
  15214. */
  15215. var assignWith = createAssigner(function(object, source, srcIndex, customizer) {
  15216. copyObject(source, keys(source), object, customizer);
  15217. });
  15218. /**
  15219. * Creates an array of values corresponding to `paths` of `object`.
  15220. *
  15221. * @static
  15222. * @memberOf _
  15223. * @since 1.0.0
  15224. * @category Object
  15225. * @param {Object} object The object to iterate over.
  15226. * @param {...(string|string[])} [paths] The property paths to pick.
  15227. * @returns {Array} Returns the picked values.
  15228. * @example
  15229. *
  15230. * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
  15231. *
  15232. * _.at(object, ['a[0].b.c', 'a[1]']);
  15233. * // => [3, 4]
  15234. */
  15235. var at = flatRest(baseAt);
  15236. /**
  15237. * Creates an object that inherits from the `prototype` object. If a
  15238. * `properties` object is given, its own enumerable string keyed properties
  15239. * are assigned to the created object.
  15240. *
  15241. * @static
  15242. * @memberOf _
  15243. * @since 2.3.0
  15244. * @category Object
  15245. * @param {Object} prototype The object to inherit from.
  15246. * @param {Object} [properties] The properties to assign to the object.
  15247. * @returns {Object} Returns the new object.
  15248. * @example
  15249. *
  15250. * function Shape() {
  15251. * this.x = 0;
  15252. * this.y = 0;
  15253. * }
  15254. *
  15255. * function Circle() {
  15256. * Shape.call(this);
  15257. * }
  15258. *
  15259. * Circle.prototype = _.create(Shape.prototype, {
  15260. * 'constructor': Circle
  15261. * });
  15262. *
  15263. * var circle = new Circle;
  15264. * circle instanceof Circle;
  15265. * // => true
  15266. *
  15267. * circle instanceof Shape;
  15268. * // => true
  15269. */
  15270. function create(prototype, properties) {
  15271. var result = baseCreate(prototype);
  15272. return properties == null ? result : baseAssign(result, properties);
  15273. }
  15274. /**
  15275. * Assigns own and inherited enumerable string keyed properties of source
  15276. * objects to the destination object for all destination properties that
  15277. * resolve to `undefined`. Source objects are applied from left to right.
  15278. * Once a property is set, additional values of the same property are ignored.
  15279. *
  15280. * **Note:** This method mutates `object`.
  15281. *
  15282. * @static
  15283. * @since 0.1.0
  15284. * @memberOf _
  15285. * @category Object
  15286. * @param {Object} object The destination object.
  15287. * @param {...Object} [sources] The source objects.
  15288. * @returns {Object} Returns `object`.
  15289. * @see _.defaultsDeep
  15290. * @example
  15291. *
  15292. * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
  15293. * // => { 'a': 1, 'b': 2 }
  15294. */
  15295. var defaults = baseRest(function(args) {
  15296. args.push(undefined, customDefaultsAssignIn);
  15297. return apply(assignInWith, undefined, args);
  15298. });
  15299. /**
  15300. * This method is like `_.defaults` except that it recursively assigns
  15301. * default properties.
  15302. *
  15303. * **Note:** This method mutates `object`.
  15304. *
  15305. * @static
  15306. * @memberOf _
  15307. * @since 3.10.0
  15308. * @category Object
  15309. * @param {Object} object The destination object.
  15310. * @param {...Object} [sources] The source objects.
  15311. * @returns {Object} Returns `object`.
  15312. * @see _.defaults
  15313. * @example
  15314. *
  15315. * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });
  15316. * // => { 'a': { 'b': 2, 'c': 3 } }
  15317. */
  15318. var defaultsDeep = baseRest(function(args) {
  15319. args.push(undefined, customDefaultsMerge);
  15320. return apply(mergeWith, undefined, args);
  15321. });
  15322. /**
  15323. * This method is like `_.find` except that it returns the key of the first
  15324. * element `predicate` returns truthy for instead of the element itself.
  15325. *
  15326. * @static
  15327. * @memberOf _
  15328. * @since 1.1.0
  15329. * @category Object
  15330. * @param {Object} object The object to inspect.
  15331. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  15332. * @returns {string|undefined} Returns the key of the matched element,
  15333. * else `undefined`.
  15334. * @example
  15335. *
  15336. * var users = {
  15337. * 'barney': { 'age': 36, 'active': true },
  15338. * 'fred': { 'age': 40, 'active': false },
  15339. * 'pebbles': { 'age': 1, 'active': true }
  15340. * };
  15341. *
  15342. * _.findKey(users, function(o) { return o.age < 40; });
  15343. * // => 'barney' (iteration order is not guaranteed)
  15344. *
  15345. * // The `_.matches` iteratee shorthand.
  15346. * _.findKey(users, { 'age': 1, 'active': true });
  15347. * // => 'pebbles'
  15348. *
  15349. * // The `_.matchesProperty` iteratee shorthand.
  15350. * _.findKey(users, ['active', false]);
  15351. * // => 'fred'
  15352. *
  15353. * // The `_.property` iteratee shorthand.
  15354. * _.findKey(users, 'active');
  15355. * // => 'barney'
  15356. */
  15357. function findKey(object, predicate) {
  15358. return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);
  15359. }
  15360. /**
  15361. * This method is like `_.findKey` except that it iterates over elements of
  15362. * a collection in the opposite order.
  15363. *
  15364. * @static
  15365. * @memberOf _
  15366. * @since 2.0.0
  15367. * @category Object
  15368. * @param {Object} object The object to inspect.
  15369. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  15370. * @returns {string|undefined} Returns the key of the matched element,
  15371. * else `undefined`.
  15372. * @example
  15373. *
  15374. * var users = {
  15375. * 'barney': { 'age': 36, 'active': true },
  15376. * 'fred': { 'age': 40, 'active': false },
  15377. * 'pebbles': { 'age': 1, 'active': true }
  15378. * };
  15379. *
  15380. * _.findLastKey(users, function(o) { return o.age < 40; });
  15381. * // => returns 'pebbles' assuming `_.findKey` returns 'barney'
  15382. *
  15383. * // The `_.matches` iteratee shorthand.
  15384. * _.findLastKey(users, { 'age': 36, 'active': true });
  15385. * // => 'barney'
  15386. *
  15387. * // The `_.matchesProperty` iteratee shorthand.
  15388. * _.findLastKey(users, ['active', false]);
  15389. * // => 'fred'
  15390. *
  15391. * // The `_.property` iteratee shorthand.
  15392. * _.findLastKey(users, 'active');
  15393. * // => 'pebbles'
  15394. */
  15395. function findLastKey(object, predicate) {
  15396. return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);
  15397. }
  15398. /**
  15399. * Iterates over own and inherited enumerable string keyed properties of an
  15400. * object and invokes `iteratee` for each property. The iteratee is invoked
  15401. * with three arguments: (value, key, object). Iteratee functions may exit
  15402. * iteration early by explicitly returning `false`.
  15403. *
  15404. * @static
  15405. * @memberOf _
  15406. * @since 0.3.0
  15407. * @category Object
  15408. * @param {Object} object The object to iterate over.
  15409. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  15410. * @returns {Object} Returns `object`.
  15411. * @see _.forInRight
  15412. * @example
  15413. *
  15414. * function Foo() {
  15415. * this.a = 1;
  15416. * this.b = 2;
  15417. * }
  15418. *
  15419. * Foo.prototype.c = 3;
  15420. *
  15421. * _.forIn(new Foo, function(value, key) {
  15422. * console.log(key);
  15423. * });
  15424. * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).
  15425. */
  15426. function forIn(object, iteratee) {
  15427. return object == null
  15428. ? object
  15429. : baseFor(object, getIteratee(iteratee, 3), keysIn);
  15430. }
  15431. /**
  15432. * This method is like `_.forIn` except that it iterates over properties of
  15433. * `object` in the opposite order.
  15434. *
  15435. * @static
  15436. * @memberOf _
  15437. * @since 2.0.0
  15438. * @category Object
  15439. * @param {Object} object The object to iterate over.
  15440. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  15441. * @returns {Object} Returns `object`.
  15442. * @see _.forIn
  15443. * @example
  15444. *
  15445. * function Foo() {
  15446. * this.a = 1;
  15447. * this.b = 2;
  15448. * }
  15449. *
  15450. * Foo.prototype.c = 3;
  15451. *
  15452. * _.forInRight(new Foo, function(value, key) {
  15453. * console.log(key);
  15454. * });
  15455. * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.
  15456. */
  15457. function forInRight(object, iteratee) {
  15458. return object == null
  15459. ? object
  15460. : baseForRight(object, getIteratee(iteratee, 3), keysIn);
  15461. }
  15462. /**
  15463. * Iterates over own enumerable string keyed properties of an object and
  15464. * invokes `iteratee` for each property. The iteratee is invoked with three
  15465. * arguments: (value, key, object). Iteratee functions may exit iteration
  15466. * early by explicitly returning `false`.
  15467. *
  15468. * @static
  15469. * @memberOf _
  15470. * @since 0.3.0
  15471. * @category Object
  15472. * @param {Object} object The object to iterate over.
  15473. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  15474. * @returns {Object} Returns `object`.
  15475. * @see _.forOwnRight
  15476. * @example
  15477. *
  15478. * function Foo() {
  15479. * this.a = 1;
  15480. * this.b = 2;
  15481. * }
  15482. *
  15483. * Foo.prototype.c = 3;
  15484. *
  15485. * _.forOwn(new Foo, function(value, key) {
  15486. * console.log(key);
  15487. * });
  15488. * // => Logs 'a' then 'b' (iteration order is not guaranteed).
  15489. */
  15490. function forOwn(object, iteratee) {
  15491. return object && baseForOwn(object, getIteratee(iteratee, 3));
  15492. }
  15493. /**
  15494. * This method is like `_.forOwn` except that it iterates over properties of
  15495. * `object` in the opposite order.
  15496. *
  15497. * @static
  15498. * @memberOf _
  15499. * @since 2.0.0
  15500. * @category Object
  15501. * @param {Object} object The object to iterate over.
  15502. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  15503. * @returns {Object} Returns `object`.
  15504. * @see _.forOwn
  15505. * @example
  15506. *
  15507. * function Foo() {
  15508. * this.a = 1;
  15509. * this.b = 2;
  15510. * }
  15511. *
  15512. * Foo.prototype.c = 3;
  15513. *
  15514. * _.forOwnRight(new Foo, function(value, key) {
  15515. * console.log(key);
  15516. * });
  15517. * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.
  15518. */
  15519. function forOwnRight(object, iteratee) {
  15520. return object && baseForOwnRight(object, getIteratee(iteratee, 3));
  15521. }
  15522. /**
  15523. * Creates an array of function property names from own enumerable properties
  15524. * of `object`.
  15525. *
  15526. * @static
  15527. * @since 0.1.0
  15528. * @memberOf _
  15529. * @category Object
  15530. * @param {Object} object The object to inspect.
  15531. * @returns {Array} Returns the function names.
  15532. * @see _.functionsIn
  15533. * @example
  15534. *
  15535. * function Foo() {
  15536. * this.a = _.constant('a');
  15537. * this.b = _.constant('b');
  15538. * }
  15539. *
  15540. * Foo.prototype.c = _.constant('c');
  15541. *
  15542. * _.functions(new Foo);
  15543. * // => ['a', 'b']
  15544. */
  15545. function functions(object) {
  15546. return object == null ? [] : baseFunctions(object, keys(object));
  15547. }
  15548. /**
  15549. * Creates an array of function property names from own and inherited
  15550. * enumerable properties of `object`.
  15551. *
  15552. * @static
  15553. * @memberOf _
  15554. * @since 4.0.0
  15555. * @category Object
  15556. * @param {Object} object The object to inspect.
  15557. * @returns {Array} Returns the function names.
  15558. * @see _.functions
  15559. * @example
  15560. *
  15561. * function Foo() {
  15562. * this.a = _.constant('a');
  15563. * this.b = _.constant('b');
  15564. * }
  15565. *
  15566. * Foo.prototype.c = _.constant('c');
  15567. *
  15568. * _.functionsIn(new Foo);
  15569. * // => ['a', 'b', 'c']
  15570. */
  15571. function functionsIn(object) {
  15572. return object == null ? [] : baseFunctions(object, keysIn(object));
  15573. }
  15574. /**
  15575. * Gets the value at `path` of `object`. If the resolved value is
  15576. * `undefined`, the `defaultValue` is returned in its place.
  15577. *
  15578. * @static
  15579. * @memberOf _
  15580. * @since 3.7.0
  15581. * @category Object
  15582. * @param {Object} object The object to query.
  15583. * @param {Array|string} path The path of the property to get.
  15584. * @param {*} [defaultValue] The value returned for `undefined` resolved values.
  15585. * @returns {*} Returns the resolved value.
  15586. * @example
  15587. *
  15588. * var object = { 'a': [{ 'b': { 'c': 3 } }] };
  15589. *
  15590. * _.get(object, 'a[0].b.c');
  15591. * // => 3
  15592. *
  15593. * _.get(object, ['a', '0', 'b', 'c']);
  15594. * // => 3
  15595. *
  15596. * _.get(object, 'a.b.c', 'default');
  15597. * // => 'default'
  15598. */
  15599. function get(object, path, defaultValue) {
  15600. var result = object == null ? undefined : baseGet(object, path);
  15601. return result === undefined ? defaultValue : result;
  15602. }
  15603. /**
  15604. * Checks if `path` is a direct property of `object`.
  15605. *
  15606. * @static
  15607. * @since 0.1.0
  15608. * @memberOf _
  15609. * @category Object
  15610. * @param {Object} object The object to query.
  15611. * @param {Array|string} path The path to check.
  15612. * @returns {boolean} Returns `true` if `path` exists, else `false`.
  15613. * @example
  15614. *
  15615. * var object = { 'a': { 'b': 2 } };
  15616. * var other = _.create({ 'a': _.create({ 'b': 2 }) });
  15617. *
  15618. * _.has(object, 'a');
  15619. * // => true
  15620. *
  15621. * _.has(object, 'a.b');
  15622. * // => true
  15623. *
  15624. * _.has(object, ['a', 'b']);
  15625. * // => true
  15626. *
  15627. * _.has(other, 'a');
  15628. * // => false
  15629. */
  15630. function has(object, path) {
  15631. return object != null && hasPath(object, path, baseHas);
  15632. }
  15633. /**
  15634. * Checks if `path` is a direct or inherited property of `object`.
  15635. *
  15636. * @static
  15637. * @memberOf _
  15638. * @since 4.0.0
  15639. * @category Object
  15640. * @param {Object} object The object to query.
  15641. * @param {Array|string} path The path to check.
  15642. * @returns {boolean} Returns `true` if `path` exists, else `false`.
  15643. * @example
  15644. *
  15645. * var object = _.create({ 'a': _.create({ 'b': 2 }) });
  15646. *
  15647. * _.hasIn(object, 'a');
  15648. * // => true
  15649. *
  15650. * _.hasIn(object, 'a.b');
  15651. * // => true
  15652. *
  15653. * _.hasIn(object, ['a', 'b']);
  15654. * // => true
  15655. *
  15656. * _.hasIn(object, 'b');
  15657. * // => false
  15658. */
  15659. function hasIn(object, path) {
  15660. return object != null && hasPath(object, path, baseHasIn);
  15661. }
  15662. /**
  15663. * Creates an object composed of the inverted keys and values of `object`.
  15664. * If `object` contains duplicate values, subsequent values overwrite
  15665. * property assignments of previous values.
  15666. *
  15667. * @static
  15668. * @memberOf _
  15669. * @since 0.7.0
  15670. * @category Object
  15671. * @param {Object} object The object to invert.
  15672. * @returns {Object} Returns the new inverted object.
  15673. * @example
  15674. *
  15675. * var object = { 'a': 1, 'b': 2, 'c': 1 };
  15676. *
  15677. * _.invert(object);
  15678. * // => { '1': 'c', '2': 'b' }
  15679. */
  15680. var invert = createInverter(function(result, value, key) {
  15681. result[value] = key;
  15682. }, constant(identity));
  15683. /**
  15684. * This method is like `_.invert` except that the inverted object is generated
  15685. * from the results of running each element of `object` thru `iteratee`. The
  15686. * corresponding inverted value of each inverted key is an array of keys
  15687. * responsible for generating the inverted value. The iteratee is invoked
  15688. * with one argument: (value).
  15689. *
  15690. * @static
  15691. * @memberOf _
  15692. * @since 4.1.0
  15693. * @category Object
  15694. * @param {Object} object The object to invert.
  15695. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  15696. * @returns {Object} Returns the new inverted object.
  15697. * @example
  15698. *
  15699. * var object = { 'a': 1, 'b': 2, 'c': 1 };
  15700. *
  15701. * _.invertBy(object);
  15702. * // => { '1': ['a', 'c'], '2': ['b'] }
  15703. *
  15704. * _.invertBy(object, function(value) {
  15705. * return 'group' + value;
  15706. * });
  15707. * // => { 'group1': ['a', 'c'], 'group2': ['b'] }
  15708. */
  15709. var invertBy = createInverter(function(result, value, key) {
  15710. if (hasOwnProperty.call(result, value)) {
  15711. result[value].push(key);
  15712. } else {
  15713. result[value] = [key];
  15714. }
  15715. }, getIteratee);
  15716. /**
  15717. * Invokes the method at `path` of `object`.
  15718. *
  15719. * @static
  15720. * @memberOf _
  15721. * @since 4.0.0
  15722. * @category Object
  15723. * @param {Object} object The object to query.
  15724. * @param {Array|string} path The path of the method to invoke.
  15725. * @param {...*} [args] The arguments to invoke the method with.
  15726. * @returns {*} Returns the result of the invoked method.
  15727. * @example
  15728. *
  15729. * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };
  15730. *
  15731. * _.invoke(object, 'a[0].b.c.slice', 1, 3);
  15732. * // => [2, 3]
  15733. */
  15734. var invoke = baseRest(baseInvoke);
  15735. /**
  15736. * Creates an array of the own enumerable property names of `object`.
  15737. *
  15738. * **Note:** Non-object values are coerced to objects. See the
  15739. * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
  15740. * for more details.
  15741. *
  15742. * @static
  15743. * @since 0.1.0
  15744. * @memberOf _
  15745. * @category Object
  15746. * @param {Object} object The object to query.
  15747. * @returns {Array} Returns the array of property names.
  15748. * @example
  15749. *
  15750. * function Foo() {
  15751. * this.a = 1;
  15752. * this.b = 2;
  15753. * }
  15754. *
  15755. * Foo.prototype.c = 3;
  15756. *
  15757. * _.keys(new Foo);
  15758. * // => ['a', 'b'] (iteration order is not guaranteed)
  15759. *
  15760. * _.keys('hi');
  15761. * // => ['0', '1']
  15762. */
  15763. function keys(object) {
  15764. return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
  15765. }
  15766. /**
  15767. * Creates an array of the own and inherited enumerable property names of `object`.
  15768. *
  15769. * **Note:** Non-object values are coerced to objects.
  15770. *
  15771. * @static
  15772. * @memberOf _
  15773. * @since 3.0.0
  15774. * @category Object
  15775. * @param {Object} object The object to query.
  15776. * @returns {Array} Returns the array of property names.
  15777. * @example
  15778. *
  15779. * function Foo() {
  15780. * this.a = 1;
  15781. * this.b = 2;
  15782. * }
  15783. *
  15784. * Foo.prototype.c = 3;
  15785. *
  15786. * _.keysIn(new Foo);
  15787. * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
  15788. */
  15789. function keysIn(object) {
  15790. return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
  15791. }
  15792. /**
  15793. * The opposite of `_.mapValues`; this method creates an object with the
  15794. * same values as `object` and keys generated by running each own enumerable
  15795. * string keyed property of `object` thru `iteratee`. The iteratee is invoked
  15796. * with three arguments: (value, key, object).
  15797. *
  15798. * @static
  15799. * @memberOf _
  15800. * @since 3.8.0
  15801. * @category Object
  15802. * @param {Object} object The object to iterate over.
  15803. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  15804. * @returns {Object} Returns the new mapped object.
  15805. * @see _.mapValues
  15806. * @example
  15807. *
  15808. * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {
  15809. * return key + value;
  15810. * });
  15811. * // => { 'a1': 1, 'b2': 2 }
  15812. */
  15813. function mapKeys(object, iteratee) {
  15814. var result = {};
  15815. iteratee = getIteratee(iteratee, 3);
  15816. baseForOwn(object, function(value, key, object) {
  15817. baseAssignValue(result, iteratee(value, key, object), value);
  15818. });
  15819. return result;
  15820. }
  15821. /**
  15822. * Creates an object with the same keys as `object` and values generated
  15823. * by running each own enumerable string keyed property of `object` thru
  15824. * `iteratee`. The iteratee is invoked with three arguments:
  15825. * (value, key, object).
  15826. *
  15827. * @static
  15828. * @memberOf _
  15829. * @since 2.4.0
  15830. * @category Object
  15831. * @param {Object} object The object to iterate over.
  15832. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  15833. * @returns {Object} Returns the new mapped object.
  15834. * @see _.mapKeys
  15835. * @example
  15836. *
  15837. * var users = {
  15838. * 'fred': { 'user': 'fred', 'age': 40 },
  15839. * 'pebbles': { 'user': 'pebbles', 'age': 1 }
  15840. * };
  15841. *
  15842. * _.mapValues(users, function(o) { return o.age; });
  15843. * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
  15844. *
  15845. * // The `_.property` iteratee shorthand.
  15846. * _.mapValues(users, 'age');
  15847. * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
  15848. */
  15849. function mapValues(object, iteratee) {
  15850. var result = {};
  15851. iteratee = getIteratee(iteratee, 3);
  15852. baseForOwn(object, function(value, key, object) {
  15853. baseAssignValue(result, key, iteratee(value, key, object));
  15854. });
  15855. return result;
  15856. }
  15857. /**
  15858. * This method is like `_.assign` except that it recursively merges own and
  15859. * inherited enumerable string keyed properties of source objects into the
  15860. * destination object. Source properties that resolve to `undefined` are
  15861. * skipped if a destination value exists. Array and plain object properties
  15862. * are merged recursively. Other objects and value types are overridden by
  15863. * assignment. Source objects are applied from left to right. Subsequent
  15864. * sources overwrite property assignments of previous sources.
  15865. *
  15866. * **Note:** This method mutates `object`.
  15867. *
  15868. * @static
  15869. * @memberOf _
  15870. * @since 0.5.0
  15871. * @category Object
  15872. * @param {Object} object The destination object.
  15873. * @param {...Object} [sources] The source objects.
  15874. * @returns {Object} Returns `object`.
  15875. * @example
  15876. *
  15877. * var object = {
  15878. * 'a': [{ 'b': 2 }, { 'd': 4 }]
  15879. * };
  15880. *
  15881. * var other = {
  15882. * 'a': [{ 'c': 3 }, { 'e': 5 }]
  15883. * };
  15884. *
  15885. * _.merge(object, other);
  15886. * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
  15887. */
  15888. var merge = createAssigner(function(object, source, srcIndex) {
  15889. baseMerge(object, source, srcIndex);
  15890. });
  15891. /**
  15892. * This method is like `_.merge` except that it accepts `customizer` which
  15893. * is invoked to produce the merged values of the destination and source
  15894. * properties. If `customizer` returns `undefined`, merging is handled by the
  15895. * method instead. The `customizer` is invoked with six arguments:
  15896. * (objValue, srcValue, key, object, source, stack).
  15897. *
  15898. * **Note:** This method mutates `object`.
  15899. *
  15900. * @static
  15901. * @memberOf _
  15902. * @since 4.0.0
  15903. * @category Object
  15904. * @param {Object} object The destination object.
  15905. * @param {...Object} sources The source objects.
  15906. * @param {Function} customizer The function to customize assigned values.
  15907. * @returns {Object} Returns `object`.
  15908. * @example
  15909. *
  15910. * function customizer(objValue, srcValue) {
  15911. * if (_.isArray(objValue)) {
  15912. * return objValue.concat(srcValue);
  15913. * }
  15914. * }
  15915. *
  15916. * var object = { 'a': [1], 'b': [2] };
  15917. * var other = { 'a': [3], 'b': [4] };
  15918. *
  15919. * _.mergeWith(object, other, customizer);
  15920. * // => { 'a': [1, 3], 'b': [2, 4] }
  15921. */
  15922. var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {
  15923. baseMerge(object, source, srcIndex, customizer);
  15924. });
  15925. /**
  15926. * The opposite of `_.pick`; this method creates an object composed of the
  15927. * own and inherited enumerable property paths of `object` that are not omitted.
  15928. *
  15929. * **Note:** This method is considerably slower than `_.pick`.
  15930. *
  15931. * @static
  15932. * @since 0.1.0
  15933. * @memberOf _
  15934. * @category Object
  15935. * @param {Object} object The source object.
  15936. * @param {...(string|string[])} [paths] The property paths to omit.
  15937. * @returns {Object} Returns the new object.
  15938. * @example
  15939. *
  15940. * var object = { 'a': 1, 'b': '2', 'c': 3 };
  15941. *
  15942. * _.omit(object, ['a', 'c']);
  15943. * // => { 'b': '2' }
  15944. */
  15945. var omit = flatRest(function(object, paths) {
  15946. var result = {};
  15947. if (object == null) {
  15948. return result;
  15949. }
  15950. var isDeep = false;
  15951. paths = arrayMap(paths, function(path) {
  15952. path = castPath(path, object);
  15953. isDeep || (isDeep = path.length > 1);
  15954. return path;
  15955. });
  15956. copyObject(object, getAllKeysIn(object), result);
  15957. if (isDeep) {
  15958. result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
  15959. }
  15960. var length = paths.length;
  15961. while (length--) {
  15962. baseUnset(result, paths[length]);
  15963. }
  15964. return result;
  15965. });
  15966. /**
  15967. * The opposite of `_.pickBy`; this method creates an object composed of
  15968. * the own and inherited enumerable string keyed properties of `object` that
  15969. * `predicate` doesn't return truthy for. The predicate is invoked with two
  15970. * arguments: (value, key).
  15971. *
  15972. * @static
  15973. * @memberOf _
  15974. * @since 4.0.0
  15975. * @category Object
  15976. * @param {Object} object The source object.
  15977. * @param {Function} [predicate=_.identity] The function invoked per property.
  15978. * @returns {Object} Returns the new object.
  15979. * @example
  15980. *
  15981. * var object = { 'a': 1, 'b': '2', 'c': 3 };
  15982. *
  15983. * _.omitBy(object, _.isNumber);
  15984. * // => { 'b': '2' }
  15985. */
  15986. function omitBy(object, predicate) {
  15987. return pickBy(object, negate(getIteratee(predicate)));
  15988. }
  15989. /**
  15990. * Creates an object composed of the picked `object` properties.
  15991. *
  15992. * @static
  15993. * @since 0.1.0
  15994. * @memberOf _
  15995. * @category Object
  15996. * @param {Object} object The source object.
  15997. * @param {...(string|string[])} [paths] The property paths to pick.
  15998. * @returns {Object} Returns the new object.
  15999. * @example
  16000. *
  16001. * var object = { 'a': 1, 'b': '2', 'c': 3 };
  16002. *
  16003. * _.pick(object, ['a', 'c']);
  16004. * // => { 'a': 1, 'c': 3 }
  16005. */
  16006. var pick = flatRest(function(object, paths) {
  16007. return object == null ? {} : basePick(object, paths);
  16008. });
  16009. /**
  16010. * Creates an object composed of the `object` properties `predicate` returns
  16011. * truthy for. The predicate is invoked with two arguments: (value, key).
  16012. *
  16013. * @static
  16014. * @memberOf _
  16015. * @since 4.0.0
  16016. * @category Object
  16017. * @param {Object} object The source object.
  16018. * @param {Function} [predicate=_.identity] The function invoked per property.
  16019. * @returns {Object} Returns the new object.
  16020. * @example
  16021. *
  16022. * var object = { 'a': 1, 'b': '2', 'c': 3 };
  16023. *
  16024. * _.pickBy(object, _.isNumber);
  16025. * // => { 'a': 1, 'c': 3 }
  16026. */
  16027. function pickBy(object, predicate) {
  16028. if (object == null) {
  16029. return {};
  16030. }
  16031. var props = arrayMap(getAllKeysIn(object), function(prop) {
  16032. return [prop];
  16033. });
  16034. predicate = getIteratee(predicate);
  16035. return basePickBy(object, props, function(value, path) {
  16036. return predicate(value, path[0]);
  16037. });
  16038. }
  16039. /**
  16040. * This method is like `_.get` except that if the resolved value is a
  16041. * function it's invoked with the `this` binding of its parent object and
  16042. * its result is returned.
  16043. *
  16044. * @static
  16045. * @since 0.1.0
  16046. * @memberOf _
  16047. * @category Object
  16048. * @param {Object} object The object to query.
  16049. * @param {Array|string} path The path of the property to resolve.
  16050. * @param {*} [defaultValue] The value returned for `undefined` resolved values.
  16051. * @returns {*} Returns the resolved value.
  16052. * @example
  16053. *
  16054. * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };
  16055. *
  16056. * _.result(object, 'a[0].b.c1');
  16057. * // => 3
  16058. *
  16059. * _.result(object, 'a[0].b.c2');
  16060. * // => 4
  16061. *
  16062. * _.result(object, 'a[0].b.c3', 'default');
  16063. * // => 'default'
  16064. *
  16065. * _.result(object, 'a[0].b.c3', _.constant('default'));
  16066. * // => 'default'
  16067. */
  16068. function result(object, path, defaultValue) {
  16069. path = castPath(path, object);
  16070. var index = -1,
  16071. length = path.length;
  16072. // Ensure the loop is entered when path is empty.
  16073. if (!length) {
  16074. length = 1;
  16075. object = undefined;
  16076. }
  16077. while (++index < length) {
  16078. var value = object == null ? undefined : object[toKey(path[index])];
  16079. if (value === undefined) {
  16080. index = length;
  16081. value = defaultValue;
  16082. }
  16083. object = isFunction(value) ? value.call(object) : value;
  16084. }
  16085. return object;
  16086. }
  16087. /**
  16088. * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,
  16089. * it's created. Arrays are created for missing index properties while objects
  16090. * are created for all other missing properties. Use `_.setWith` to customize
  16091. * `path` creation.
  16092. *
  16093. * **Note:** This method mutates `object`.
  16094. *
  16095. * @static
  16096. * @memberOf _
  16097. * @since 3.7.0
  16098. * @category Object
  16099. * @param {Object} object The object to modify.
  16100. * @param {Array|string} path The path of the property to set.
  16101. * @param {*} value The value to set.
  16102. * @returns {Object} Returns `object`.
  16103. * @example
  16104. *
  16105. * var object = { 'a': [{ 'b': { 'c': 3 } }] };
  16106. *
  16107. * _.set(object, 'a[0].b.c', 4);
  16108. * console.log(object.a[0].b.c);
  16109. * // => 4
  16110. *
  16111. * _.set(object, ['x', '0', 'y', 'z'], 5);
  16112. * console.log(object.x[0].y.z);
  16113. * // => 5
  16114. */
  16115. function set(object, path, value) {
  16116. return object == null ? object : baseSet(object, path, value);
  16117. }
  16118. /**
  16119. * This method is like `_.set` except that it accepts `customizer` which is
  16120. * invoked to produce the objects of `path`. If `customizer` returns `undefined`
  16121. * path creation is handled by the method instead. The `customizer` is invoked
  16122. * with three arguments: (nsValue, key, nsObject).
  16123. *
  16124. * **Note:** This method mutates `object`.
  16125. *
  16126. * @static
  16127. * @memberOf _
  16128. * @since 4.0.0
  16129. * @category Object
  16130. * @param {Object} object The object to modify.
  16131. * @param {Array|string} path The path of the property to set.
  16132. * @param {*} value The value to set.
  16133. * @param {Function} [customizer] The function to customize assigned values.
  16134. * @returns {Object} Returns `object`.
  16135. * @example
  16136. *
  16137. * var object = {};
  16138. *
  16139. * _.setWith(object, '[0][1]', 'a', Object);
  16140. * // => { '0': { '1': 'a' } }
  16141. */
  16142. function setWith(object, path, value, customizer) {
  16143. customizer = typeof customizer == 'function' ? customizer : undefined;
  16144. return object == null ? object : baseSet(object, path, value, customizer);
  16145. }
  16146. /**
  16147. * Creates an array of own enumerable string keyed-value pairs for `object`
  16148. * which can be consumed by `_.fromPairs`. If `object` is a map or set, its
  16149. * entries are returned.
  16150. *
  16151. * @static
  16152. * @memberOf _
  16153. * @since 4.0.0
  16154. * @alias entries
  16155. * @category Object
  16156. * @param {Object} object The object to query.
  16157. * @returns {Array} Returns the key-value pairs.
  16158. * @example
  16159. *
  16160. * function Foo() {
  16161. * this.a = 1;
  16162. * this.b = 2;
  16163. * }
  16164. *
  16165. * Foo.prototype.c = 3;
  16166. *
  16167. * _.toPairs(new Foo);
  16168. * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)
  16169. */
  16170. var toPairs = createToPairs(keys);
  16171. /**
  16172. * Creates an array of own and inherited enumerable string keyed-value pairs
  16173. * for `object` which can be consumed by `_.fromPairs`. If `object` is a map
  16174. * or set, its entries are returned.
  16175. *
  16176. * @static
  16177. * @memberOf _
  16178. * @since 4.0.0
  16179. * @alias entriesIn
  16180. * @category Object
  16181. * @param {Object} object The object to query.
  16182. * @returns {Array} Returns the key-value pairs.
  16183. * @example
  16184. *
  16185. * function Foo() {
  16186. * this.a = 1;
  16187. * this.b = 2;
  16188. * }
  16189. *
  16190. * Foo.prototype.c = 3;
  16191. *
  16192. * _.toPairsIn(new Foo);
  16193. * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)
  16194. */
  16195. var toPairsIn = createToPairs(keysIn);
  16196. /**
  16197. * An alternative to `_.reduce`; this method transforms `object` to a new
  16198. * `accumulator` object which is the result of running each of its own
  16199. * enumerable string keyed properties thru `iteratee`, with each invocation
  16200. * potentially mutating the `accumulator` object. If `accumulator` is not
  16201. * provided, a new object with the same `[[Prototype]]` will be used. The
  16202. * iteratee is invoked with four arguments: (accumulator, value, key, object).
  16203. * Iteratee functions may exit iteration early by explicitly returning `false`.
  16204. *
  16205. * @static
  16206. * @memberOf _
  16207. * @since 1.3.0
  16208. * @category Object
  16209. * @param {Object} object The object to iterate over.
  16210. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  16211. * @param {*} [accumulator] The custom accumulator value.
  16212. * @returns {*} Returns the accumulated value.
  16213. * @example
  16214. *
  16215. * _.transform([2, 3, 4], function(result, n) {
  16216. * result.push(n *= n);
  16217. * return n % 2 == 0;
  16218. * }, []);
  16219. * // => [4, 9]
  16220. *
  16221. * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
  16222. * (result[value] || (result[value] = [])).push(key);
  16223. * }, {});
  16224. * // => { '1': ['a', 'c'], '2': ['b'] }
  16225. */
  16226. function transform(object, iteratee, accumulator) {
  16227. var isArr = isArray(object),
  16228. isArrLike = isArr || isBuffer(object) || isTypedArray(object);
  16229. iteratee = getIteratee(iteratee, 4);
  16230. if (accumulator == null) {
  16231. var Ctor = object && object.constructor;
  16232. if (isArrLike) {
  16233. accumulator = isArr ? new Ctor : [];
  16234. }
  16235. else if (isObject(object)) {
  16236. accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
  16237. }
  16238. else {
  16239. accumulator = {};
  16240. }
  16241. }
  16242. (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {
  16243. return iteratee(accumulator, value, index, object);
  16244. });
  16245. return accumulator;
  16246. }
  16247. /**
  16248. * Removes the property at `path` of `object`.
  16249. *
  16250. * **Note:** This method mutates `object`.
  16251. *
  16252. * @static
  16253. * @memberOf _
  16254. * @since 4.0.0
  16255. * @category Object
  16256. * @param {Object} object The object to modify.
  16257. * @param {Array|string} path The path of the property to unset.
  16258. * @returns {boolean} Returns `true` if the property is deleted, else `false`.
  16259. * @example
  16260. *
  16261. * var object = { 'a': [{ 'b': { 'c': 7 } }] };
  16262. * _.unset(object, 'a[0].b.c');
  16263. * // => true
  16264. *
  16265. * console.log(object);
  16266. * // => { 'a': [{ 'b': {} }] };
  16267. *
  16268. * _.unset(object, ['a', '0', 'b', 'c']);
  16269. * // => true
  16270. *
  16271. * console.log(object);
  16272. * // => { 'a': [{ 'b': {} }] };
  16273. */
  16274. function unset(object, path) {
  16275. return object == null ? true : baseUnset(object, path);
  16276. }
  16277. /**
  16278. * This method is like `_.set` except that accepts `updater` to produce the
  16279. * value to set. Use `_.updateWith` to customize `path` creation. The `updater`
  16280. * is invoked with one argument: (value).
  16281. *
  16282. * **Note:** This method mutates `object`.
  16283. *
  16284. * @static
  16285. * @memberOf _
  16286. * @since 4.6.0
  16287. * @category Object
  16288. * @param {Object} object The object to modify.
  16289. * @param {Array|string} path The path of the property to set.
  16290. * @param {Function} updater The function to produce the updated value.
  16291. * @returns {Object} Returns `object`.
  16292. * @example
  16293. *
  16294. * var object = { 'a': [{ 'b': { 'c': 3 } }] };
  16295. *
  16296. * _.update(object, 'a[0].b.c', function(n) { return n * n; });
  16297. * console.log(object.a[0].b.c);
  16298. * // => 9
  16299. *
  16300. * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });
  16301. * console.log(object.x[0].y.z);
  16302. * // => 0
  16303. */
  16304. function update(object, path, updater) {
  16305. return object == null ? object : baseUpdate(object, path, castFunction(updater));
  16306. }
  16307. /**
  16308. * This method is like `_.update` except that it accepts `customizer` which is
  16309. * invoked to produce the objects of `path`. If `customizer` returns `undefined`
  16310. * path creation is handled by the method instead. The `customizer` is invoked
  16311. * with three arguments: (nsValue, key, nsObject).
  16312. *
  16313. * **Note:** This method mutates `object`.
  16314. *
  16315. * @static
  16316. * @memberOf _
  16317. * @since 4.6.0
  16318. * @category Object
  16319. * @param {Object} object The object to modify.
  16320. * @param {Array|string} path The path of the property to set.
  16321. * @param {Function} updater The function to produce the updated value.
  16322. * @param {Function} [customizer] The function to customize assigned values.
  16323. * @returns {Object} Returns `object`.
  16324. * @example
  16325. *
  16326. * var object = {};
  16327. *
  16328. * _.updateWith(object, '[0][1]', _.constant('a'), Object);
  16329. * // => { '0': { '1': 'a' } }
  16330. */
  16331. function updateWith(object, path, updater, customizer) {
  16332. customizer = typeof customizer == 'function' ? customizer : undefined;
  16333. return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);
  16334. }
  16335. /**
  16336. * Creates an array of the own enumerable string keyed property values of `object`.
  16337. *
  16338. * **Note:** Non-object values are coerced to objects.
  16339. *
  16340. * @static
  16341. * @since 0.1.0
  16342. * @memberOf _
  16343. * @category Object
  16344. * @param {Object} object The object to query.
  16345. * @returns {Array} Returns the array of property values.
  16346. * @example
  16347. *
  16348. * function Foo() {
  16349. * this.a = 1;
  16350. * this.b = 2;
  16351. * }
  16352. *
  16353. * Foo.prototype.c = 3;
  16354. *
  16355. * _.values(new Foo);
  16356. * // => [1, 2] (iteration order is not guaranteed)
  16357. *
  16358. * _.values('hi');
  16359. * // => ['h', 'i']
  16360. */
  16361. function values(object) {
  16362. return object == null ? [] : baseValues(object, keys(object));
  16363. }
  16364. /**
  16365. * Creates an array of the own and inherited enumerable string keyed property
  16366. * values of `object`.
  16367. *
  16368. * **Note:** Non-object values are coerced to objects.
  16369. *
  16370. * @static
  16371. * @memberOf _
  16372. * @since 3.0.0
  16373. * @category Object
  16374. * @param {Object} object The object to query.
  16375. * @returns {Array} Returns the array of property values.
  16376. * @example
  16377. *
  16378. * function Foo() {
  16379. * this.a = 1;
  16380. * this.b = 2;
  16381. * }
  16382. *
  16383. * Foo.prototype.c = 3;
  16384. *
  16385. * _.valuesIn(new Foo);
  16386. * // => [1, 2, 3] (iteration order is not guaranteed)
  16387. */
  16388. function valuesIn(object) {
  16389. return object == null ? [] : baseValues(object, keysIn(object));
  16390. }
  16391. /*------------------------------------------------------------------------*/
  16392. /**
  16393. * Clamps `number` within the inclusive `lower` and `upper` bounds.
  16394. *
  16395. * @static
  16396. * @memberOf _
  16397. * @since 4.0.0
  16398. * @category Number
  16399. * @param {number} number The number to clamp.
  16400. * @param {number} [lower] The lower bound.
  16401. * @param {number} upper The upper bound.
  16402. * @returns {number} Returns the clamped number.
  16403. * @example
  16404. *
  16405. * _.clamp(-10, -5, 5);
  16406. * // => -5
  16407. *
  16408. * _.clamp(10, -5, 5);
  16409. * // => 5
  16410. */
  16411. function clamp(number, lower, upper) {
  16412. if (upper === undefined) {
  16413. upper = lower;
  16414. lower = undefined;
  16415. }
  16416. if (upper !== undefined) {
  16417. upper = toNumber(upper);
  16418. upper = upper === upper ? upper : 0;
  16419. }
  16420. if (lower !== undefined) {
  16421. lower = toNumber(lower);
  16422. lower = lower === lower ? lower : 0;
  16423. }
  16424. return baseClamp(toNumber(number), lower, upper);
  16425. }
  16426. /**
  16427. * Checks if `n` is between `start` and up to, but not including, `end`. If
  16428. * `end` is not specified, it's set to `start` with `start` then set to `0`.
  16429. * If `start` is greater than `end` the params are swapped to support
  16430. * negative ranges.
  16431. *
  16432. * @static
  16433. * @memberOf _
  16434. * @since 3.3.0
  16435. * @category Number
  16436. * @param {number} number The number to check.
  16437. * @param {number} [start=0] The start of the range.
  16438. * @param {number} end The end of the range.
  16439. * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
  16440. * @see _.range, _.rangeRight
  16441. * @example
  16442. *
  16443. * _.inRange(3, 2, 4);
  16444. * // => true
  16445. *
  16446. * _.inRange(4, 8);
  16447. * // => true
  16448. *
  16449. * _.inRange(4, 2);
  16450. * // => false
  16451. *
  16452. * _.inRange(2, 2);
  16453. * // => false
  16454. *
  16455. * _.inRange(1.2, 2);
  16456. * // => true
  16457. *
  16458. * _.inRange(5.2, 4);
  16459. * // => false
  16460. *
  16461. * _.inRange(-3, -2, -6);
  16462. * // => true
  16463. */
  16464. function inRange(number, start, end) {
  16465. start = toFinite(start);
  16466. if (end === undefined) {
  16467. end = start;
  16468. start = 0;
  16469. } else {
  16470. end = toFinite(end);
  16471. }
  16472. number = toNumber(number);
  16473. return baseInRange(number, start, end);
  16474. }
  16475. /**
  16476. * Produces a random number between the inclusive `lower` and `upper` bounds.
  16477. * If only one argument is provided a number between `0` and the given number
  16478. * is returned. If `floating` is `true`, or either `lower` or `upper` are
  16479. * floats, a floating-point number is returned instead of an integer.
  16480. *
  16481. * **Note:** JavaScript follows the IEEE-754 standard for resolving
  16482. * floating-point values which can produce unexpected results.
  16483. *
  16484. * @static
  16485. * @memberOf _
  16486. * @since 0.7.0
  16487. * @category Number
  16488. * @param {number} [lower=0] The lower bound.
  16489. * @param {number} [upper=1] The upper bound.
  16490. * @param {boolean} [floating] Specify returning a floating-point number.
  16491. * @returns {number} Returns the random number.
  16492. * @example
  16493. *
  16494. * _.random(0, 5);
  16495. * // => an integer between 0 and 5
  16496. *
  16497. * _.random(5);
  16498. * // => also an integer between 0 and 5
  16499. *
  16500. * _.random(5, true);
  16501. * // => a floating-point number between 0 and 5
  16502. *
  16503. * _.random(1.2, 5.2);
  16504. * // => a floating-point number between 1.2 and 5.2
  16505. */
  16506. function random(lower, upper, floating) {
  16507. if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {
  16508. upper = floating = undefined;
  16509. }
  16510. if (floating === undefined) {
  16511. if (typeof upper == 'boolean') {
  16512. floating = upper;
  16513. upper = undefined;
  16514. }
  16515. else if (typeof lower == 'boolean') {
  16516. floating = lower;
  16517. lower = undefined;
  16518. }
  16519. }
  16520. if (lower === undefined && upper === undefined) {
  16521. lower = 0;
  16522. upper = 1;
  16523. }
  16524. else {
  16525. lower = toFinite(lower);
  16526. if (upper === undefined) {
  16527. upper = lower;
  16528. lower = 0;
  16529. } else {
  16530. upper = toFinite(upper);
  16531. }
  16532. }
  16533. if (lower > upper) {
  16534. var temp = lower;
  16535. lower = upper;
  16536. upper = temp;
  16537. }
  16538. if (floating || lower % 1 || upper % 1) {
  16539. var rand = nativeRandom();
  16540. return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);
  16541. }
  16542. return baseRandom(lower, upper);
  16543. }
  16544. /*------------------------------------------------------------------------*/
  16545. /**
  16546. * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
  16547. *
  16548. * @static
  16549. * @memberOf _
  16550. * @since 3.0.0
  16551. * @category String
  16552. * @param {string} [string=''] The string to convert.
  16553. * @returns {string} Returns the camel cased string.
  16554. * @example
  16555. *
  16556. * _.camelCase('Foo Bar');
  16557. * // => 'fooBar'
  16558. *
  16559. * _.camelCase('--foo-bar--');
  16560. * // => 'fooBar'
  16561. *
  16562. * _.camelCase('__FOO_BAR__');
  16563. * // => 'fooBar'
  16564. */
  16565. var camelCase = createCompounder(function(result, word, index) {
  16566. word = word.toLowerCase();
  16567. return result + (index ? capitalize(word) : word);
  16568. });
  16569. /**
  16570. * Converts the first character of `string` to upper case and the remaining
  16571. * to lower case.
  16572. *
  16573. * @static
  16574. * @memberOf _
  16575. * @since 3.0.0
  16576. * @category String
  16577. * @param {string} [string=''] The string to capitalize.
  16578. * @returns {string} Returns the capitalized string.
  16579. * @example
  16580. *
  16581. * _.capitalize('FRED');
  16582. * // => 'Fred'
  16583. */
  16584. function capitalize(string) {
  16585. return upperFirst(toString(string).toLowerCase());
  16586. }
  16587. /**
  16588. * Deburrs `string` by converting
  16589. * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
  16590. * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
  16591. * letters to basic Latin letters and removing
  16592. * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
  16593. *
  16594. * @static
  16595. * @memberOf _
  16596. * @since 3.0.0
  16597. * @category String
  16598. * @param {string} [string=''] The string to deburr.
  16599. * @returns {string} Returns the deburred string.
  16600. * @example
  16601. *
  16602. * _.deburr('déjà vu');
  16603. * // => 'deja vu'
  16604. */
  16605. function deburr(string) {
  16606. string = toString(string);
  16607. return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');
  16608. }
  16609. /**
  16610. * Checks if `string` ends with the given target string.
  16611. *
  16612. * @static
  16613. * @memberOf _
  16614. * @since 3.0.0
  16615. * @category String
  16616. * @param {string} [string=''] The string to inspect.
  16617. * @param {string} [target] The string to search for.
  16618. * @param {number} [position=string.length] The position to search up to.
  16619. * @returns {boolean} Returns `true` if `string` ends with `target`,
  16620. * else `false`.
  16621. * @example
  16622. *
  16623. * _.endsWith('abc', 'c');
  16624. * // => true
  16625. *
  16626. * _.endsWith('abc', 'b');
  16627. * // => false
  16628. *
  16629. * _.endsWith('abc', 'b', 2);
  16630. * // => true
  16631. */
  16632. function endsWith(string, target, position) {
  16633. string = toString(string);
  16634. target = baseToString(target);
  16635. var length = string.length;
  16636. position = position === undefined
  16637. ? length
  16638. : baseClamp(toInteger(position), 0, length);
  16639. var end = position;
  16640. position -= target.length;
  16641. return position >= 0 && string.slice(position, end) == target;
  16642. }
  16643. /**
  16644. * Converts the characters "&", "<", ">", '"', and "'" in `string` to their
  16645. * corresponding HTML entities.
  16646. *
  16647. * **Note:** No other characters are escaped. To escape additional
  16648. * characters use a third-party library like [_he_](https://mths.be/he).
  16649. *
  16650. * Though the ">" character is escaped for symmetry, characters like
  16651. * ">" and "/" don't need escaping in HTML and have no special meaning
  16652. * unless they're part of a tag or unquoted attribute value. See
  16653. * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
  16654. * (under "semi-related fun fact") for more details.
  16655. *
  16656. * When working with HTML you should always
  16657. * [quote attribute values](http://wonko.com/post/html-escaping) to reduce
  16658. * XSS vectors.
  16659. *
  16660. * @static
  16661. * @since 0.1.0
  16662. * @memberOf _
  16663. * @category String
  16664. * @param {string} [string=''] The string to escape.
  16665. * @returns {string} Returns the escaped string.
  16666. * @example
  16667. *
  16668. * _.escape('fred, barney, & pebbles');
  16669. * // => 'fred, barney, &amp; pebbles'
  16670. */
  16671. function escape(string) {
  16672. string = toString(string);
  16673. return (string && reHasUnescapedHtml.test(string))
  16674. ? string.replace(reUnescapedHtml, escapeHtmlChar)
  16675. : string;
  16676. }
  16677. /**
  16678. * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+",
  16679. * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`.
  16680. *
  16681. * @static
  16682. * @memberOf _
  16683. * @since 3.0.0
  16684. * @category String
  16685. * @param {string} [string=''] The string to escape.
  16686. * @returns {string} Returns the escaped string.
  16687. * @example
  16688. *
  16689. * _.escapeRegExp('[lodash](https://lodash.com/)');
  16690. * // => '\[lodash\]\(https://lodash\.com/\)'
  16691. */
  16692. function escapeRegExp(string) {
  16693. string = toString(string);
  16694. return (string && reHasRegExpChar.test(string))
  16695. ? string.replace(reRegExpChar, '\\$&')
  16696. : string;
  16697. }
  16698. /**
  16699. * Converts `string` to
  16700. * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).
  16701. *
  16702. * @static
  16703. * @memberOf _
  16704. * @since 3.0.0
  16705. * @category String
  16706. * @param {string} [string=''] The string to convert.
  16707. * @returns {string} Returns the kebab cased string.
  16708. * @example
  16709. *
  16710. * _.kebabCase('Foo Bar');
  16711. * // => 'foo-bar'
  16712. *
  16713. * _.kebabCase('fooBar');
  16714. * // => 'foo-bar'
  16715. *
  16716. * _.kebabCase('__FOO_BAR__');
  16717. * // => 'foo-bar'
  16718. */
  16719. var kebabCase = createCompounder(function(result, word, index) {
  16720. return result + (index ? '-' : '') + word.toLowerCase();
  16721. });
  16722. /**
  16723. * Converts `string`, as space separated words, to lower case.
  16724. *
  16725. * @static
  16726. * @memberOf _
  16727. * @since 4.0.0
  16728. * @category String
  16729. * @param {string} [string=''] The string to convert.
  16730. * @returns {string} Returns the lower cased string.
  16731. * @example
  16732. *
  16733. * _.lowerCase('--Foo-Bar--');
  16734. * // => 'foo bar'
  16735. *
  16736. * _.lowerCase('fooBar');
  16737. * // => 'foo bar'
  16738. *
  16739. * _.lowerCase('__FOO_BAR__');
  16740. * // => 'foo bar'
  16741. */
  16742. var lowerCase = createCompounder(function(result, word, index) {
  16743. return result + (index ? ' ' : '') + word.toLowerCase();
  16744. });
  16745. /**
  16746. * Converts the first character of `string` to lower case.
  16747. *
  16748. * @static
  16749. * @memberOf _
  16750. * @since 4.0.0
  16751. * @category String
  16752. * @param {string} [string=''] The string to convert.
  16753. * @returns {string} Returns the converted string.
  16754. * @example
  16755. *
  16756. * _.lowerFirst('Fred');
  16757. * // => 'fred'
  16758. *
  16759. * _.lowerFirst('FRED');
  16760. * // => 'fRED'
  16761. */
  16762. var lowerFirst = createCaseFirst('toLowerCase');
  16763. /**
  16764. * Pads `string` on the left and right sides if it's shorter than `length`.
  16765. * Padding characters are truncated if they can't be evenly divided by `length`.
  16766. *
  16767. * @static
  16768. * @memberOf _
  16769. * @since 3.0.0
  16770. * @category String
  16771. * @param {string} [string=''] The string to pad.
  16772. * @param {number} [length=0] The padding length.
  16773. * @param {string} [chars=' '] The string used as padding.
  16774. * @returns {string} Returns the padded string.
  16775. * @example
  16776. *
  16777. * _.pad('abc', 8);
  16778. * // => ' abc '
  16779. *
  16780. * _.pad('abc', 8, '_-');
  16781. * // => '_-abc_-_'
  16782. *
  16783. * _.pad('abc', 3);
  16784. * // => 'abc'
  16785. */
  16786. function pad(string, length, chars) {
  16787. string = toString(string);
  16788. length = toInteger(length);
  16789. var strLength = length ? stringSize(string) : 0;
  16790. if (!length || strLength >= length) {
  16791. return string;
  16792. }
  16793. var mid = (length - strLength) / 2;
  16794. return (
  16795. createPadding(nativeFloor(mid), chars) +
  16796. string +
  16797. createPadding(nativeCeil(mid), chars)
  16798. );
  16799. }
  16800. /**
  16801. * Pads `string` on the right side if it's shorter than `length`. Padding
  16802. * characters are truncated if they exceed `length`.
  16803. *
  16804. * @static
  16805. * @memberOf _
  16806. * @since 4.0.0
  16807. * @category String
  16808. * @param {string} [string=''] The string to pad.
  16809. * @param {number} [length=0] The padding length.
  16810. * @param {string} [chars=' '] The string used as padding.
  16811. * @returns {string} Returns the padded string.
  16812. * @example
  16813. *
  16814. * _.padEnd('abc', 6);
  16815. * // => 'abc '
  16816. *
  16817. * _.padEnd('abc', 6, '_-');
  16818. * // => 'abc_-_'
  16819. *
  16820. * _.padEnd('abc', 3);
  16821. * // => 'abc'
  16822. */
  16823. function padEnd(string, length, chars) {
  16824. string = toString(string);
  16825. length = toInteger(length);
  16826. var strLength = length ? stringSize(string) : 0;
  16827. return (length && strLength < length)
  16828. ? (string + createPadding(length - strLength, chars))
  16829. : string;
  16830. }
  16831. /**
  16832. * Pads `string` on the left side if it's shorter than `length`. Padding
  16833. * characters are truncated if they exceed `length`.
  16834. *
  16835. * @static
  16836. * @memberOf _
  16837. * @since 4.0.0
  16838. * @category String
  16839. * @param {string} [string=''] The string to pad.
  16840. * @param {number} [length=0] The padding length.
  16841. * @param {string} [chars=' '] The string used as padding.
  16842. * @returns {string} Returns the padded string.
  16843. * @example
  16844. *
  16845. * _.padStart('abc', 6);
  16846. * // => ' abc'
  16847. *
  16848. * _.padStart('abc', 6, '_-');
  16849. * // => '_-_abc'
  16850. *
  16851. * _.padStart('abc', 3);
  16852. * // => 'abc'
  16853. */
  16854. function padStart(string, length, chars) {
  16855. string = toString(string);
  16856. length = toInteger(length);
  16857. var strLength = length ? stringSize(string) : 0;
  16858. return (length && strLength < length)
  16859. ? (createPadding(length - strLength, chars) + string)
  16860. : string;
  16861. }
  16862. /**
  16863. * Converts `string` to an integer of the specified radix. If `radix` is
  16864. * `undefined` or `0`, a `radix` of `10` is used unless `value` is a
  16865. * hexadecimal, in which case a `radix` of `16` is used.
  16866. *
  16867. * **Note:** This method aligns with the
  16868. * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.
  16869. *
  16870. * @static
  16871. * @memberOf _
  16872. * @since 1.1.0
  16873. * @category String
  16874. * @param {string} string The string to convert.
  16875. * @param {number} [radix=10] The radix to interpret `value` by.
  16876. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  16877. * @returns {number} Returns the converted integer.
  16878. * @example
  16879. *
  16880. * _.parseInt('08');
  16881. * // => 8
  16882. *
  16883. * _.map(['6', '08', '10'], _.parseInt);
  16884. * // => [6, 8, 10]
  16885. */
  16886. function parseInt(string, radix, guard) {
  16887. if (guard || radix == null) {
  16888. radix = 0;
  16889. } else if (radix) {
  16890. radix = +radix;
  16891. }
  16892. return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);
  16893. }
  16894. /**
  16895. * Repeats the given string `n` times.
  16896. *
  16897. * @static
  16898. * @memberOf _
  16899. * @since 3.0.0
  16900. * @category String
  16901. * @param {string} [string=''] The string to repeat.
  16902. * @param {number} [n=1] The number of times to repeat the string.
  16903. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  16904. * @returns {string} Returns the repeated string.
  16905. * @example
  16906. *
  16907. * _.repeat('*', 3);
  16908. * // => '***'
  16909. *
  16910. * _.repeat('abc', 2);
  16911. * // => 'abcabc'
  16912. *
  16913. * _.repeat('abc', 0);
  16914. * // => ''
  16915. */
  16916. function repeat(string, n, guard) {
  16917. if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {
  16918. n = 1;
  16919. } else {
  16920. n = toInteger(n);
  16921. }
  16922. return baseRepeat(toString(string), n);
  16923. }
  16924. /**
  16925. * Replaces matches for `pattern` in `string` with `replacement`.
  16926. *
  16927. * **Note:** This method is based on
  16928. * [`String#replace`](https://mdn.io/String/replace).
  16929. *
  16930. * @static
  16931. * @memberOf _
  16932. * @since 4.0.0
  16933. * @category String
  16934. * @param {string} [string=''] The string to modify.
  16935. * @param {RegExp|string} pattern The pattern to replace.
  16936. * @param {Function|string} replacement The match replacement.
  16937. * @returns {string} Returns the modified string.
  16938. * @example
  16939. *
  16940. * _.replace('Hi Fred', 'Fred', 'Barney');
  16941. * // => 'Hi Barney'
  16942. */
  16943. function replace() {
  16944. var args = arguments,
  16945. string = toString(args[0]);
  16946. return args.length < 3 ? string : string.replace(args[1], args[2]);
  16947. }
  16948. /**
  16949. * Converts `string` to
  16950. * [snake case](https://en.wikipedia.org/wiki/Snake_case).
  16951. *
  16952. * @static
  16953. * @memberOf _
  16954. * @since 3.0.0
  16955. * @category String
  16956. * @param {string} [string=''] The string to convert.
  16957. * @returns {string} Returns the snake cased string.
  16958. * @example
  16959. *
  16960. * _.snakeCase('Foo Bar');
  16961. * // => 'foo_bar'
  16962. *
  16963. * _.snakeCase('fooBar');
  16964. * // => 'foo_bar'
  16965. *
  16966. * _.snakeCase('--FOO-BAR--');
  16967. * // => 'foo_bar'
  16968. */
  16969. var snakeCase = createCompounder(function(result, word, index) {
  16970. return result + (index ? '_' : '') + word.toLowerCase();
  16971. });
  16972. /**
  16973. * Splits `string` by `separator`.
  16974. *
  16975. * **Note:** This method is based on
  16976. * [`String#split`](https://mdn.io/String/split).
  16977. *
  16978. * @static
  16979. * @memberOf _
  16980. * @since 4.0.0
  16981. * @category String
  16982. * @param {string} [string=''] The string to split.
  16983. * @param {RegExp|string} separator The separator pattern to split by.
  16984. * @param {number} [limit] The length to truncate results to.
  16985. * @returns {Array} Returns the string segments.
  16986. * @example
  16987. *
  16988. * _.split('a-b-c', '-', 2);
  16989. * // => ['a', 'b']
  16990. */
  16991. function split(string, separator, limit) {
  16992. if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {
  16993. separator = limit = undefined;
  16994. }
  16995. limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;
  16996. if (!limit) {
  16997. return [];
  16998. }
  16999. string = toString(string);
  17000. if (string && (
  17001. typeof separator == 'string' ||
  17002. (separator != null && !isRegExp(separator))
  17003. )) {
  17004. separator = baseToString(separator);
  17005. if (!separator && hasUnicode(string)) {
  17006. return castSlice(stringToArray(string), 0, limit);
  17007. }
  17008. }
  17009. return string.split(separator, limit);
  17010. }
  17011. /**
  17012. * Converts `string` to
  17013. * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).
  17014. *
  17015. * @static
  17016. * @memberOf _
  17017. * @since 3.1.0
  17018. * @category String
  17019. * @param {string} [string=''] The string to convert.
  17020. * @returns {string} Returns the start cased string.
  17021. * @example
  17022. *
  17023. * _.startCase('--foo-bar--');
  17024. * // => 'Foo Bar'
  17025. *
  17026. * _.startCase('fooBar');
  17027. * // => 'Foo Bar'
  17028. *
  17029. * _.startCase('__FOO_BAR__');
  17030. * // => 'FOO BAR'
  17031. */
  17032. var startCase = createCompounder(function(result, word, index) {
  17033. return result + (index ? ' ' : '') + upperFirst(word);
  17034. });
  17035. /**
  17036. * Checks if `string` starts with the given target string.
  17037. *
  17038. * @static
  17039. * @memberOf _
  17040. * @since 3.0.0
  17041. * @category String
  17042. * @param {string} [string=''] The string to inspect.
  17043. * @param {string} [target] The string to search for.
  17044. * @param {number} [position=0] The position to search from.
  17045. * @returns {boolean} Returns `true` if `string` starts with `target`,
  17046. * else `false`.
  17047. * @example
  17048. *
  17049. * _.startsWith('abc', 'a');
  17050. * // => true
  17051. *
  17052. * _.startsWith('abc', 'b');
  17053. * // => false
  17054. *
  17055. * _.startsWith('abc', 'b', 1);
  17056. * // => true
  17057. */
  17058. function startsWith(string, target, position) {
  17059. string = toString(string);
  17060. position = position == null
  17061. ? 0
  17062. : baseClamp(toInteger(position), 0, string.length);
  17063. target = baseToString(target);
  17064. return string.slice(position, position + target.length) == target;
  17065. }
  17066. /**
  17067. * Creates a compiled template function that can interpolate data properties
  17068. * in "interpolate" delimiters, HTML-escape interpolated data properties in
  17069. * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data
  17070. * properties may be accessed as free variables in the template. If a setting
  17071. * object is given, it takes precedence over `_.templateSettings` values.
  17072. *
  17073. * **Note:** In the development build `_.template` utilizes
  17074. * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
  17075. * for easier debugging.
  17076. *
  17077. * For more information on precompiling templates see
  17078. * [lodash's custom builds documentation](https://lodash.com/custom-builds).
  17079. *
  17080. * For more information on Chrome extension sandboxes see
  17081. * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).
  17082. *
  17083. * @static
  17084. * @since 0.1.0
  17085. * @memberOf _
  17086. * @category String
  17087. * @param {string} [string=''] The template string.
  17088. * @param {Object} [options={}] The options object.
  17089. * @param {RegExp} [options.escape=_.templateSettings.escape]
  17090. * The HTML "escape" delimiter.
  17091. * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]
  17092. * The "evaluate" delimiter.
  17093. * @param {Object} [options.imports=_.templateSettings.imports]
  17094. * An object to import into the template as free variables.
  17095. * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]
  17096. * The "interpolate" delimiter.
  17097. * @param {string} [options.sourceURL='lodash.templateSources[n]']
  17098. * The sourceURL of the compiled template.
  17099. * @param {string} [options.variable='obj']
  17100. * The data object variable name.
  17101. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  17102. * @returns {Function} Returns the compiled template function.
  17103. * @example
  17104. *
  17105. * // Use the "interpolate" delimiter to create a compiled template.
  17106. * var compiled = _.template('hello <%= user %>!');
  17107. * compiled({ 'user': 'fred' });
  17108. * // => 'hello fred!'
  17109. *
  17110. * // Use the HTML "escape" delimiter to escape data property values.
  17111. * var compiled = _.template('<b><%- value %></b>');
  17112. * compiled({ 'value': '<script>' });
  17113. * // => '<b>&lt;script&gt;</b>'
  17114. *
  17115. * // Use the "evaluate" delimiter to execute JavaScript and generate HTML.
  17116. * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');
  17117. * compiled({ 'users': ['fred', 'barney'] });
  17118. * // => '<li>fred</li><li>barney</li>'
  17119. *
  17120. * // Use the internal `print` function in "evaluate" delimiters.
  17121. * var compiled = _.template('<% print("hello " + user); %>!');
  17122. * compiled({ 'user': 'barney' });
  17123. * // => 'hello barney!'
  17124. *
  17125. * // Use the ES template literal delimiter as an "interpolate" delimiter.
  17126. * // Disable support by replacing the "interpolate" delimiter.
  17127. * var compiled = _.template('hello ${ user }!');
  17128. * compiled({ 'user': 'pebbles' });
  17129. * // => 'hello pebbles!'
  17130. *
  17131. * // Use backslashes to treat delimiters as plain text.
  17132. * var compiled = _.template('<%= "\\<%- value %\\>" %>');
  17133. * compiled({ 'value': 'ignored' });
  17134. * // => '<%- value %>'
  17135. *
  17136. * // Use the `imports` option to import `jQuery` as `jq`.
  17137. * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';
  17138. * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });
  17139. * compiled({ 'users': ['fred', 'barney'] });
  17140. * // => '<li>fred</li><li>barney</li>'
  17141. *
  17142. * // Use the `sourceURL` option to specify a custom sourceURL for the template.
  17143. * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });
  17144. * compiled(data);
  17145. * // => Find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector.
  17146. *
  17147. * // Use the `variable` option to ensure a with-statement isn't used in the compiled template.
  17148. * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });
  17149. * compiled.source;
  17150. * // => function(data) {
  17151. * // var __t, __p = '';
  17152. * // __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';
  17153. * // return __p;
  17154. * // }
  17155. *
  17156. * // Use custom template delimiters.
  17157. * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g;
  17158. * var compiled = _.template('hello {{ user }}!');
  17159. * compiled({ 'user': 'mustache' });
  17160. * // => 'hello mustache!'
  17161. *
  17162. * // Use the `source` property to inline compiled templates for meaningful
  17163. * // line numbers in error messages and stack traces.
  17164. * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\
  17165. * var JST = {\
  17166. * "main": ' + _.template(mainText).source + '\
  17167. * };\
  17168. * ');
  17169. */
  17170. function template(string, options, guard) {
  17171. // Based on John Resig's `tmpl` implementation
  17172. // (http://ejohn.org/blog/javascript-micro-templating/)
  17173. // and Laura Doktorova's doT.js (https://github.com/olado/doT).
  17174. var settings = lodash.templateSettings;
  17175. if (guard && isIterateeCall(string, options, guard)) {
  17176. options = undefined;
  17177. }
  17178. string = toString(string);
  17179. options = assignInWith({}, options, settings, customDefaultsAssignIn);
  17180. var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn),
  17181. importsKeys = keys(imports),
  17182. importsValues = baseValues(imports, importsKeys);
  17183. var isEscaping,
  17184. isEvaluating,
  17185. index = 0,
  17186. interpolate = options.interpolate || reNoMatch,
  17187. source = "__p += '";
  17188. // Compile the regexp to match each delimiter.
  17189. var reDelimiters = RegExp(
  17190. (options.escape || reNoMatch).source + '|' +
  17191. interpolate.source + '|' +
  17192. (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +
  17193. (options.evaluate || reNoMatch).source + '|$'
  17194. , 'g');
  17195. // Use a sourceURL for easier debugging.
  17196. var sourceURL = '//# sourceURL=' +
  17197. ('sourceURL' in options
  17198. ? options.sourceURL
  17199. : ('lodash.templateSources[' + (++templateCounter) + ']')
  17200. ) + '\n';
  17201. string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
  17202. interpolateValue || (interpolateValue = esTemplateValue);
  17203. // Escape characters that can't be included in string literals.
  17204. source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);
  17205. // Replace delimiters with snippets.
  17206. if (escapeValue) {
  17207. isEscaping = true;
  17208. source += "' +\n__e(" + escapeValue + ") +\n'";
  17209. }
  17210. if (evaluateValue) {
  17211. isEvaluating = true;
  17212. source += "';\n" + evaluateValue + ";\n__p += '";
  17213. }
  17214. if (interpolateValue) {
  17215. source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
  17216. }
  17217. index = offset + match.length;
  17218. // The JS engine embedded in Adobe products needs `match` returned in
  17219. // order to produce the correct `offset` value.
  17220. return match;
  17221. });
  17222. source += "';\n";
  17223. // If `variable` is not specified wrap a with-statement around the generated
  17224. // code to add the data object to the top of the scope chain.
  17225. var variable = options.variable;
  17226. if (!variable) {
  17227. source = 'with (obj) {\n' + source + '\n}\n';
  17228. }
  17229. // Cleanup code by stripping empty strings.
  17230. source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)
  17231. .replace(reEmptyStringMiddle, '$1')
  17232. .replace(reEmptyStringTrailing, '$1;');
  17233. // Frame code as the function body.
  17234. source = 'function(' + (variable || 'obj') + ') {\n' +
  17235. (variable
  17236. ? ''
  17237. : 'obj || (obj = {});\n'
  17238. ) +
  17239. "var __t, __p = ''" +
  17240. (isEscaping
  17241. ? ', __e = _.escape'
  17242. : ''
  17243. ) +
  17244. (isEvaluating
  17245. ? ', __j = Array.prototype.join;\n' +
  17246. "function print() { __p += __j.call(arguments, '') }\n"
  17247. : ';\n'
  17248. ) +
  17249. source +
  17250. 'return __p\n}';
  17251. var result = attempt(function() {
  17252. return Function(importsKeys, sourceURL + 'return ' + source)
  17253. .apply(undefined, importsValues);
  17254. });
  17255. // Provide the compiled function's source by its `toString` method or
  17256. // the `source` property as a convenience for inlining compiled templates.
  17257. result.source = source;
  17258. if (isError(result)) {
  17259. throw result;
  17260. }
  17261. return result;
  17262. }
  17263. /**
  17264. * Converts `string`, as a whole, to lower case just like
  17265. * [String#toLowerCase](https://mdn.io/toLowerCase).
  17266. *
  17267. * @static
  17268. * @memberOf _
  17269. * @since 4.0.0
  17270. * @category String
  17271. * @param {string} [string=''] The string to convert.
  17272. * @returns {string} Returns the lower cased string.
  17273. * @example
  17274. *
  17275. * _.toLower('--Foo-Bar--');
  17276. * // => '--foo-bar--'
  17277. *
  17278. * _.toLower('fooBar');
  17279. * // => 'foobar'
  17280. *
  17281. * _.toLower('__FOO_BAR__');
  17282. * // => '__foo_bar__'
  17283. */
  17284. function toLower(value) {
  17285. return toString(value).toLowerCase();
  17286. }
  17287. /**
  17288. * Converts `string`, as a whole, to upper case just like
  17289. * [String#toUpperCase](https://mdn.io/toUpperCase).
  17290. *
  17291. * @static
  17292. * @memberOf _
  17293. * @since 4.0.0
  17294. * @category String
  17295. * @param {string} [string=''] The string to convert.
  17296. * @returns {string} Returns the upper cased string.
  17297. * @example
  17298. *
  17299. * _.toUpper('--foo-bar--');
  17300. * // => '--FOO-BAR--'
  17301. *
  17302. * _.toUpper('fooBar');
  17303. * // => 'FOOBAR'
  17304. *
  17305. * _.toUpper('__foo_bar__');
  17306. * // => '__FOO_BAR__'
  17307. */
  17308. function toUpper(value) {
  17309. return toString(value).toUpperCase();
  17310. }
  17311. /**
  17312. * Removes leading and trailing whitespace or specified characters from `string`.
  17313. *
  17314. * @static
  17315. * @memberOf _
  17316. * @since 3.0.0
  17317. * @category String
  17318. * @param {string} [string=''] The string to trim.
  17319. * @param {string} [chars=whitespace] The characters to trim.
  17320. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  17321. * @returns {string} Returns the trimmed string.
  17322. * @example
  17323. *
  17324. * _.trim(' abc ');
  17325. * // => 'abc'
  17326. *
  17327. * _.trim('-_-abc-_-', '_-');
  17328. * // => 'abc'
  17329. *
  17330. * _.map([' foo ', ' bar '], _.trim);
  17331. * // => ['foo', 'bar']
  17332. */
  17333. function trim(string, chars, guard) {
  17334. string = toString(string);
  17335. if (string && (guard || chars === undefined)) {
  17336. return string.replace(reTrim, '');
  17337. }
  17338. if (!string || !(chars = baseToString(chars))) {
  17339. return string;
  17340. }
  17341. var strSymbols = stringToArray(string),
  17342. chrSymbols = stringToArray(chars),
  17343. start = charsStartIndex(strSymbols, chrSymbols),
  17344. end = charsEndIndex(strSymbols, chrSymbols) + 1;
  17345. return castSlice(strSymbols, start, end).join('');
  17346. }
  17347. /**
  17348. * Removes trailing whitespace or specified characters from `string`.
  17349. *
  17350. * @static
  17351. * @memberOf _
  17352. * @since 4.0.0
  17353. * @category String
  17354. * @param {string} [string=''] The string to trim.
  17355. * @param {string} [chars=whitespace] The characters to trim.
  17356. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  17357. * @returns {string} Returns the trimmed string.
  17358. * @example
  17359. *
  17360. * _.trimEnd(' abc ');
  17361. * // => ' abc'
  17362. *
  17363. * _.trimEnd('-_-abc-_-', '_-');
  17364. * // => '-_-abc'
  17365. */
  17366. function trimEnd(string, chars, guard) {
  17367. string = toString(string);
  17368. if (string && (guard || chars === undefined)) {
  17369. return string.replace(reTrimEnd, '');
  17370. }
  17371. if (!string || !(chars = baseToString(chars))) {
  17372. return string;
  17373. }
  17374. var strSymbols = stringToArray(string),
  17375. end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;
  17376. return castSlice(strSymbols, 0, end).join('');
  17377. }
  17378. /**
  17379. * Removes leading whitespace or specified characters from `string`.
  17380. *
  17381. * @static
  17382. * @memberOf _
  17383. * @since 4.0.0
  17384. * @category String
  17385. * @param {string} [string=''] The string to trim.
  17386. * @param {string} [chars=whitespace] The characters to trim.
  17387. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  17388. * @returns {string} Returns the trimmed string.
  17389. * @example
  17390. *
  17391. * _.trimStart(' abc ');
  17392. * // => 'abc '
  17393. *
  17394. * _.trimStart('-_-abc-_-', '_-');
  17395. * // => 'abc-_-'
  17396. */
  17397. function trimStart(string, chars, guard) {
  17398. string = toString(string);
  17399. if (string && (guard || chars === undefined)) {
  17400. return string.replace(reTrimStart, '');
  17401. }
  17402. if (!string || !(chars = baseToString(chars))) {
  17403. return string;
  17404. }
  17405. var strSymbols = stringToArray(string),
  17406. start = charsStartIndex(strSymbols, stringToArray(chars));
  17407. return castSlice(strSymbols, start).join('');
  17408. }
  17409. /**
  17410. * Truncates `string` if it's longer than the given maximum string length.
  17411. * The last characters of the truncated string are replaced with the omission
  17412. * string which defaults to "...".
  17413. *
  17414. * @static
  17415. * @memberOf _
  17416. * @since 4.0.0
  17417. * @category String
  17418. * @param {string} [string=''] The string to truncate.
  17419. * @param {Object} [options={}] The options object.
  17420. * @param {number} [options.length=30] The maximum string length.
  17421. * @param {string} [options.omission='...'] The string to indicate text is omitted.
  17422. * @param {RegExp|string} [options.separator] The separator pattern to truncate to.
  17423. * @returns {string} Returns the truncated string.
  17424. * @example
  17425. *
  17426. * _.truncate('hi-diddly-ho there, neighborino');
  17427. * // => 'hi-diddly-ho there, neighbo...'
  17428. *
  17429. * _.truncate('hi-diddly-ho there, neighborino', {
  17430. * 'length': 24,
  17431. * 'separator': ' '
  17432. * });
  17433. * // => 'hi-diddly-ho there,...'
  17434. *
  17435. * _.truncate('hi-diddly-ho there, neighborino', {
  17436. * 'length': 24,
  17437. * 'separator': /,? +/
  17438. * });
  17439. * // => 'hi-diddly-ho there...'
  17440. *
  17441. * _.truncate('hi-diddly-ho there, neighborino', {
  17442. * 'omission': ' [...]'
  17443. * });
  17444. * // => 'hi-diddly-ho there, neig [...]'
  17445. */
  17446. function truncate(string, options) {
  17447. var length = DEFAULT_TRUNC_LENGTH,
  17448. omission = DEFAULT_TRUNC_OMISSION;
  17449. if (isObject(options)) {
  17450. var separator = 'separator' in options ? options.separator : separator;
  17451. length = 'length' in options ? toInteger(options.length) : length;
  17452. omission = 'omission' in options ? baseToString(options.omission) : omission;
  17453. }
  17454. string = toString(string);
  17455. var strLength = string.length;
  17456. if (hasUnicode(string)) {
  17457. var strSymbols = stringToArray(string);
  17458. strLength = strSymbols.length;
  17459. }
  17460. if (length >= strLength) {
  17461. return string;
  17462. }
  17463. var end = length - stringSize(omission);
  17464. if (end < 1) {
  17465. return omission;
  17466. }
  17467. var result = strSymbols
  17468. ? castSlice(strSymbols, 0, end).join('')
  17469. : string.slice(0, end);
  17470. if (separator === undefined) {
  17471. return result + omission;
  17472. }
  17473. if (strSymbols) {
  17474. end += (result.length - end);
  17475. }
  17476. if (isRegExp(separator)) {
  17477. if (string.slice(end).search(separator)) {
  17478. var match,
  17479. substring = result;
  17480. if (!separator.global) {
  17481. separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g');
  17482. }
  17483. separator.lastIndex = 0;
  17484. while ((match = separator.exec(substring))) {
  17485. var newEnd = match.index;
  17486. }
  17487. result = result.slice(0, newEnd === undefined ? end : newEnd);
  17488. }
  17489. } else if (string.indexOf(baseToString(separator), end) != end) {
  17490. var index = result.lastIndexOf(separator);
  17491. if (index > -1) {
  17492. result = result.slice(0, index);
  17493. }
  17494. }
  17495. return result + omission;
  17496. }
  17497. /**
  17498. * The inverse of `_.escape`; this method converts the HTML entities
  17499. * `&amp;`, `&lt;`, `&gt;`, `&quot;`, and `&#39;` in `string` to
  17500. * their corresponding characters.
  17501. *
  17502. * **Note:** No other HTML entities are unescaped. To unescape additional
  17503. * HTML entities use a third-party library like [_he_](https://mths.be/he).
  17504. *
  17505. * @static
  17506. * @memberOf _
  17507. * @since 0.6.0
  17508. * @category String
  17509. * @param {string} [string=''] The string to unescape.
  17510. * @returns {string} Returns the unescaped string.
  17511. * @example
  17512. *
  17513. * _.unescape('fred, barney, &amp; pebbles');
  17514. * // => 'fred, barney, & pebbles'
  17515. */
  17516. function unescape(string) {
  17517. string = toString(string);
  17518. return (string && reHasEscapedHtml.test(string))
  17519. ? string.replace(reEscapedHtml, unescapeHtmlChar)
  17520. : string;
  17521. }
  17522. /**
  17523. * Converts `string`, as space separated words, to upper case.
  17524. *
  17525. * @static
  17526. * @memberOf _
  17527. * @since 4.0.0
  17528. * @category String
  17529. * @param {string} [string=''] The string to convert.
  17530. * @returns {string} Returns the upper cased string.
  17531. * @example
  17532. *
  17533. * _.upperCase('--foo-bar');
  17534. * // => 'FOO BAR'
  17535. *
  17536. * _.upperCase('fooBar');
  17537. * // => 'FOO BAR'
  17538. *
  17539. * _.upperCase('__foo_bar__');
  17540. * // => 'FOO BAR'
  17541. */
  17542. var upperCase = createCompounder(function(result, word, index) {
  17543. return result + (index ? ' ' : '') + word.toUpperCase();
  17544. });
  17545. /**
  17546. * Converts the first character of `string` to upper case.
  17547. *
  17548. * @static
  17549. * @memberOf _
  17550. * @since 4.0.0
  17551. * @category String
  17552. * @param {string} [string=''] The string to convert.
  17553. * @returns {string} Returns the converted string.
  17554. * @example
  17555. *
  17556. * _.upperFirst('fred');
  17557. * // => 'Fred'
  17558. *
  17559. * _.upperFirst('FRED');
  17560. * // => 'FRED'
  17561. */
  17562. var upperFirst = createCaseFirst('toUpperCase');
  17563. /**
  17564. * Splits `string` into an array of its words.
  17565. *
  17566. * @static
  17567. * @memberOf _
  17568. * @since 3.0.0
  17569. * @category String
  17570. * @param {string} [string=''] The string to inspect.
  17571. * @param {RegExp|string} [pattern] The pattern to match words.
  17572. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  17573. * @returns {Array} Returns the words of `string`.
  17574. * @example
  17575. *
  17576. * _.words('fred, barney, & pebbles');
  17577. * // => ['fred', 'barney', 'pebbles']
  17578. *
  17579. * _.words('fred, barney, & pebbles', /[^, ]+/g);
  17580. * // => ['fred', 'barney', '&', 'pebbles']
  17581. */
  17582. function words(string, pattern, guard) {
  17583. string = toString(string);
  17584. pattern = guard ? undefined : pattern;
  17585. if (pattern === undefined) {
  17586. return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);
  17587. }
  17588. return string.match(pattern) || [];
  17589. }
  17590. /*------------------------------------------------------------------------*/
  17591. /**
  17592. * Attempts to invoke `func`, returning either the result or the caught error
  17593. * object. Any additional arguments are provided to `func` when it's invoked.
  17594. *
  17595. * @static
  17596. * @memberOf _
  17597. * @since 3.0.0
  17598. * @category Util
  17599. * @param {Function} func The function to attempt.
  17600. * @param {...*} [args] The arguments to invoke `func` with.
  17601. * @returns {*} Returns the `func` result or error object.
  17602. * @example
  17603. *
  17604. * // Avoid throwing errors for invalid selectors.
  17605. * var elements = _.attempt(function(selector) {
  17606. * return document.querySelectorAll(selector);
  17607. * }, '>_>');
  17608. *
  17609. * if (_.isError(elements)) {
  17610. * elements = [];
  17611. * }
  17612. */
  17613. var attempt = baseRest(function(func, args) {
  17614. try {
  17615. return apply(func, undefined, args);
  17616. } catch (e) {
  17617. return isError(e) ? e : new Error(e);
  17618. }
  17619. });
  17620. /**
  17621. * Binds methods of an object to the object itself, overwriting the existing
  17622. * method.
  17623. *
  17624. * **Note:** This method doesn't set the "length" property of bound functions.
  17625. *
  17626. * @static
  17627. * @since 0.1.0
  17628. * @memberOf _
  17629. * @category Util
  17630. * @param {Object} object The object to bind and assign the bound methods to.
  17631. * @param {...(string|string[])} methodNames The object method names to bind.
  17632. * @returns {Object} Returns `object`.
  17633. * @example
  17634. *
  17635. * var view = {
  17636. * 'label': 'docs',
  17637. * 'click': function() {
  17638. * console.log('clicked ' + this.label);
  17639. * }
  17640. * };
  17641. *
  17642. * _.bindAll(view, ['click']);
  17643. * jQuery(element).on('click', view.click);
  17644. * // => Logs 'clicked docs' when clicked.
  17645. */
  17646. var bindAll = flatRest(function(object, methodNames) {
  17647. arrayEach(methodNames, function(key) {
  17648. key = toKey(key);
  17649. baseAssignValue(object, key, bind(object[key], object));
  17650. });
  17651. return object;
  17652. });
  17653. /**
  17654. * Creates a function that iterates over `pairs` and invokes the corresponding
  17655. * function of the first predicate to return truthy. The predicate-function
  17656. * pairs are invoked with the `this` binding and arguments of the created
  17657. * function.
  17658. *
  17659. * @static
  17660. * @memberOf _
  17661. * @since 4.0.0
  17662. * @category Util
  17663. * @param {Array} pairs The predicate-function pairs.
  17664. * @returns {Function} Returns the new composite function.
  17665. * @example
  17666. *
  17667. * var func = _.cond([
  17668. * [_.matches({ 'a': 1 }), _.constant('matches A')],
  17669. * [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],
  17670. * [_.stubTrue, _.constant('no match')]
  17671. * ]);
  17672. *
  17673. * func({ 'a': 1, 'b': 2 });
  17674. * // => 'matches A'
  17675. *
  17676. * func({ 'a': 0, 'b': 1 });
  17677. * // => 'matches B'
  17678. *
  17679. * func({ 'a': '1', 'b': '2' });
  17680. * // => 'no match'
  17681. */
  17682. function cond(pairs) {
  17683. var length = pairs == null ? 0 : pairs.length,
  17684. toIteratee = getIteratee();
  17685. pairs = !length ? [] : arrayMap(pairs, function(pair) {
  17686. if (typeof pair[1] != 'function') {
  17687. throw new TypeError(FUNC_ERROR_TEXT);
  17688. }
  17689. return [toIteratee(pair[0]), pair[1]];
  17690. });
  17691. return baseRest(function(args) {
  17692. var index = -1;
  17693. while (++index < length) {
  17694. var pair = pairs[index];
  17695. if (apply(pair[0], this, args)) {
  17696. return apply(pair[1], this, args);
  17697. }
  17698. }
  17699. });
  17700. }
  17701. /**
  17702. * Creates a function that invokes the predicate properties of `source` with
  17703. * the corresponding property values of a given object, returning `true` if
  17704. * all predicates return truthy, else `false`.
  17705. *
  17706. * **Note:** The created function is equivalent to `_.conformsTo` with
  17707. * `source` partially applied.
  17708. *
  17709. * @static
  17710. * @memberOf _
  17711. * @since 4.0.0
  17712. * @category Util
  17713. * @param {Object} source The object of property predicates to conform to.
  17714. * @returns {Function} Returns the new spec function.
  17715. * @example
  17716. *
  17717. * var objects = [
  17718. * { 'a': 2, 'b': 1 },
  17719. * { 'a': 1, 'b': 2 }
  17720. * ];
  17721. *
  17722. * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } }));
  17723. * // => [{ 'a': 1, 'b': 2 }]
  17724. */
  17725. function conforms(source) {
  17726. return baseConforms(baseClone(source, CLONE_DEEP_FLAG));
  17727. }
  17728. /**
  17729. * Creates a function that returns `value`.
  17730. *
  17731. * @static
  17732. * @memberOf _
  17733. * @since 2.4.0
  17734. * @category Util
  17735. * @param {*} value The value to return from the new function.
  17736. * @returns {Function} Returns the new constant function.
  17737. * @example
  17738. *
  17739. * var objects = _.times(2, _.constant({ 'a': 1 }));
  17740. *
  17741. * console.log(objects);
  17742. * // => [{ 'a': 1 }, { 'a': 1 }]
  17743. *
  17744. * console.log(objects[0] === objects[1]);
  17745. * // => true
  17746. */
  17747. function constant(value) {
  17748. return function() {
  17749. return value;
  17750. };
  17751. }
  17752. /**
  17753. * Checks `value` to determine whether a default value should be returned in
  17754. * its place. The `defaultValue` is returned if `value` is `NaN`, `null`,
  17755. * or `undefined`.
  17756. *
  17757. * @static
  17758. * @memberOf _
  17759. * @since 4.14.0
  17760. * @category Util
  17761. * @param {*} value The value to check.
  17762. * @param {*} defaultValue The default value.
  17763. * @returns {*} Returns the resolved value.
  17764. * @example
  17765. *
  17766. * _.defaultTo(1, 10);
  17767. * // => 1
  17768. *
  17769. * _.defaultTo(undefined, 10);
  17770. * // => 10
  17771. */
  17772. function defaultTo(value, defaultValue) {
  17773. return (value == null || value !== value) ? defaultValue : value;
  17774. }
  17775. /**
  17776. * Creates a function that returns the result of invoking the given functions
  17777. * with the `this` binding of the created function, where each successive
  17778. * invocation is supplied the return value of the previous.
  17779. *
  17780. * @static
  17781. * @memberOf _
  17782. * @since 3.0.0
  17783. * @category Util
  17784. * @param {...(Function|Function[])} [funcs] The functions to invoke.
  17785. * @returns {Function} Returns the new composite function.
  17786. * @see _.flowRight
  17787. * @example
  17788. *
  17789. * function square(n) {
  17790. * return n * n;
  17791. * }
  17792. *
  17793. * var addSquare = _.flow([_.add, square]);
  17794. * addSquare(1, 2);
  17795. * // => 9
  17796. */
  17797. var flow = createFlow();
  17798. /**
  17799. * This method is like `_.flow` except that it creates a function that
  17800. * invokes the given functions from right to left.
  17801. *
  17802. * @static
  17803. * @since 3.0.0
  17804. * @memberOf _
  17805. * @category Util
  17806. * @param {...(Function|Function[])} [funcs] The functions to invoke.
  17807. * @returns {Function} Returns the new composite function.
  17808. * @see _.flow
  17809. * @example
  17810. *
  17811. * function square(n) {
  17812. * return n * n;
  17813. * }
  17814. *
  17815. * var addSquare = _.flowRight([square, _.add]);
  17816. * addSquare(1, 2);
  17817. * // => 9
  17818. */
  17819. var flowRight = createFlow(true);
  17820. /**
  17821. * This method returns the first argument it receives.
  17822. *
  17823. * @static
  17824. * @since 0.1.0
  17825. * @memberOf _
  17826. * @category Util
  17827. * @param {*} value Any value.
  17828. * @returns {*} Returns `value`.
  17829. * @example
  17830. *
  17831. * var object = { 'a': 1 };
  17832. *
  17833. * console.log(_.identity(object) === object);
  17834. * // => true
  17835. */
  17836. function identity(value) {
  17837. return value;
  17838. }
  17839. /**
  17840. * Creates a function that invokes `func` with the arguments of the created
  17841. * function. If `func` is a property name, the created function returns the
  17842. * property value for a given element. If `func` is an array or object, the
  17843. * created function returns `true` for elements that contain the equivalent
  17844. * source properties, otherwise it returns `false`.
  17845. *
  17846. * @static
  17847. * @since 4.0.0
  17848. * @memberOf _
  17849. * @category Util
  17850. * @param {*} [func=_.identity] The value to convert to a callback.
  17851. * @returns {Function} Returns the callback.
  17852. * @example
  17853. *
  17854. * var users = [
  17855. * { 'user': 'barney', 'age': 36, 'active': true },
  17856. * { 'user': 'fred', 'age': 40, 'active': false }
  17857. * ];
  17858. *
  17859. * // The `_.matches` iteratee shorthand.
  17860. * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));
  17861. * // => [{ 'user': 'barney', 'age': 36, 'active': true }]
  17862. *
  17863. * // The `_.matchesProperty` iteratee shorthand.
  17864. * _.filter(users, _.iteratee(['user', 'fred']));
  17865. * // => [{ 'user': 'fred', 'age': 40 }]
  17866. *
  17867. * // The `_.property` iteratee shorthand.
  17868. * _.map(users, _.iteratee('user'));
  17869. * // => ['barney', 'fred']
  17870. *
  17871. * // Create custom iteratee shorthands.
  17872. * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {
  17873. * return !_.isRegExp(func) ? iteratee(func) : function(string) {
  17874. * return func.test(string);
  17875. * };
  17876. * });
  17877. *
  17878. * _.filter(['abc', 'def'], /ef/);
  17879. * // => ['def']
  17880. */
  17881. function iteratee(func) {
  17882. return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG));
  17883. }
  17884. /**
  17885. * Creates a function that performs a partial deep comparison between a given
  17886. * object and `source`, returning `true` if the given object has equivalent
  17887. * property values, else `false`.
  17888. *
  17889. * **Note:** The created function is equivalent to `_.isMatch` with `source`
  17890. * partially applied.
  17891. *
  17892. * Partial comparisons will match empty array and empty object `source`
  17893. * values against any array or object value, respectively. See `_.isEqual`
  17894. * for a list of supported value comparisons.
  17895. *
  17896. * @static
  17897. * @memberOf _
  17898. * @since 3.0.0
  17899. * @category Util
  17900. * @param {Object} source The object of property values to match.
  17901. * @returns {Function} Returns the new spec function.
  17902. * @example
  17903. *
  17904. * var objects = [
  17905. * { 'a': 1, 'b': 2, 'c': 3 },
  17906. * { 'a': 4, 'b': 5, 'c': 6 }
  17907. * ];
  17908. *
  17909. * _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));
  17910. * // => [{ 'a': 4, 'b': 5, 'c': 6 }]
  17911. */
  17912. function matches(source) {
  17913. return baseMatches(baseClone(source, CLONE_DEEP_FLAG));
  17914. }
  17915. /**
  17916. * Creates a function that performs a partial deep comparison between the
  17917. * value at `path` of a given object to `srcValue`, returning `true` if the
  17918. * object value is equivalent, else `false`.
  17919. *
  17920. * **Note:** Partial comparisons will match empty array and empty object
  17921. * `srcValue` values against any array or object value, respectively. See
  17922. * `_.isEqual` for a list of supported value comparisons.
  17923. *
  17924. * @static
  17925. * @memberOf _
  17926. * @since 3.2.0
  17927. * @category Util
  17928. * @param {Array|string} path The path of the property to get.
  17929. * @param {*} srcValue The value to match.
  17930. * @returns {Function} Returns the new spec function.
  17931. * @example
  17932. *
  17933. * var objects = [
  17934. * { 'a': 1, 'b': 2, 'c': 3 },
  17935. * { 'a': 4, 'b': 5, 'c': 6 }
  17936. * ];
  17937. *
  17938. * _.find(objects, _.matchesProperty('a', 4));
  17939. * // => { 'a': 4, 'b': 5, 'c': 6 }
  17940. */
  17941. function matchesProperty(path, srcValue) {
  17942. return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));
  17943. }
  17944. /**
  17945. * Creates a function that invokes the method at `path` of a given object.
  17946. * Any additional arguments are provided to the invoked method.
  17947. *
  17948. * @static
  17949. * @memberOf _
  17950. * @since 3.7.0
  17951. * @category Util
  17952. * @param {Array|string} path The path of the method to invoke.
  17953. * @param {...*} [args] The arguments to invoke the method with.
  17954. * @returns {Function} Returns the new invoker function.
  17955. * @example
  17956. *
  17957. * var objects = [
  17958. * { 'a': { 'b': _.constant(2) } },
  17959. * { 'a': { 'b': _.constant(1) } }
  17960. * ];
  17961. *
  17962. * _.map(objects, _.method('a.b'));
  17963. * // => [2, 1]
  17964. *
  17965. * _.map(objects, _.method(['a', 'b']));
  17966. * // => [2, 1]
  17967. */
  17968. var method = baseRest(function(path, args) {
  17969. return function(object) {
  17970. return baseInvoke(object, path, args);
  17971. };
  17972. });
  17973. /**
  17974. * The opposite of `_.method`; this method creates a function that invokes
  17975. * the method at a given path of `object`. Any additional arguments are
  17976. * provided to the invoked method.
  17977. *
  17978. * @static
  17979. * @memberOf _
  17980. * @since 3.7.0
  17981. * @category Util
  17982. * @param {Object} object The object to query.
  17983. * @param {...*} [args] The arguments to invoke the method with.
  17984. * @returns {Function} Returns the new invoker function.
  17985. * @example
  17986. *
  17987. * var array = _.times(3, _.constant),
  17988. * object = { 'a': array, 'b': array, 'c': array };
  17989. *
  17990. * _.map(['a[2]', 'c[0]'], _.methodOf(object));
  17991. * // => [2, 0]
  17992. *
  17993. * _.map([['a', '2'], ['c', '0']], _.methodOf(object));
  17994. * // => [2, 0]
  17995. */
  17996. var methodOf = baseRest(function(object, args) {
  17997. return function(path) {
  17998. return baseInvoke(object, path, args);
  17999. };
  18000. });
  18001. /**
  18002. * Adds all own enumerable string keyed function properties of a source
  18003. * object to the destination object. If `object` is a function, then methods
  18004. * are added to its prototype as well.
  18005. *
  18006. * **Note:** Use `_.runInContext` to create a pristine `lodash` function to
  18007. * avoid conflicts caused by modifying the original.
  18008. *
  18009. * @static
  18010. * @since 0.1.0
  18011. * @memberOf _
  18012. * @category Util
  18013. * @param {Function|Object} [object=lodash] The destination object.
  18014. * @param {Object} source The object of functions to add.
  18015. * @param {Object} [options={}] The options object.
  18016. * @param {boolean} [options.chain=true] Specify whether mixins are chainable.
  18017. * @returns {Function|Object} Returns `object`.
  18018. * @example
  18019. *
  18020. * function vowels(string) {
  18021. * return _.filter(string, function(v) {
  18022. * return /[aeiou]/i.test(v);
  18023. * });
  18024. * }
  18025. *
  18026. * _.mixin({ 'vowels': vowels });
  18027. * _.vowels('fred');
  18028. * // => ['e']
  18029. *
  18030. * _('fred').vowels().value();
  18031. * // => ['e']
  18032. *
  18033. * _.mixin({ 'vowels': vowels }, { 'chain': false });
  18034. * _('fred').vowels();
  18035. * // => ['e']
  18036. */
  18037. function mixin(object, source, options) {
  18038. var props = keys(source),
  18039. methodNames = baseFunctions(source, props);
  18040. if (options == null &&
  18041. !(isObject(source) && (methodNames.length || !props.length))) {
  18042. options = source;
  18043. source = object;
  18044. object = this;
  18045. methodNames = baseFunctions(source, keys(source));
  18046. }
  18047. var chain = !(isObject(options) && 'chain' in options) || !!options.chain,
  18048. isFunc = isFunction(object);
  18049. arrayEach(methodNames, function(methodName) {
  18050. var func = source[methodName];
  18051. object[methodName] = func;
  18052. if (isFunc) {
  18053. object.prototype[methodName] = function() {
  18054. var chainAll = this.__chain__;
  18055. if (chain || chainAll) {
  18056. var result = object(this.__wrapped__),
  18057. actions = result.__actions__ = copyArray(this.__actions__);
  18058. actions.push({ 'func': func, 'args': arguments, 'thisArg': object });
  18059. result.__chain__ = chainAll;
  18060. return result;
  18061. }
  18062. return func.apply(object, arrayPush([this.value()], arguments));
  18063. };
  18064. }
  18065. });
  18066. return object;
  18067. }
  18068. /**
  18069. * Reverts the `_` variable to its previous value and returns a reference to
  18070. * the `lodash` function.
  18071. *
  18072. * @static
  18073. * @since 0.1.0
  18074. * @memberOf _
  18075. * @category Util
  18076. * @returns {Function} Returns the `lodash` function.
  18077. * @example
  18078. *
  18079. * var lodash = _.noConflict();
  18080. */
  18081. function noConflict() {
  18082. if (root._ === this) {
  18083. root._ = oldDash;
  18084. }
  18085. return this;
  18086. }
  18087. /**
  18088. * This method returns `undefined`.
  18089. *
  18090. * @static
  18091. * @memberOf _
  18092. * @since 2.3.0
  18093. * @category Util
  18094. * @example
  18095. *
  18096. * _.times(2, _.noop);
  18097. * // => [undefined, undefined]
  18098. */
  18099. function noop() {
  18100. // No operation performed.
  18101. }
  18102. /**
  18103. * Creates a function that gets the argument at index `n`. If `n` is negative,
  18104. * the nth argument from the end is returned.
  18105. *
  18106. * @static
  18107. * @memberOf _
  18108. * @since 4.0.0
  18109. * @category Util
  18110. * @param {number} [n=0] The index of the argument to return.
  18111. * @returns {Function} Returns the new pass-thru function.
  18112. * @example
  18113. *
  18114. * var func = _.nthArg(1);
  18115. * func('a', 'b', 'c', 'd');
  18116. * // => 'b'
  18117. *
  18118. * var func = _.nthArg(-2);
  18119. * func('a', 'b', 'c', 'd');
  18120. * // => 'c'
  18121. */
  18122. function nthArg(n) {
  18123. n = toInteger(n);
  18124. return baseRest(function(args) {
  18125. return baseNth(args, n);
  18126. });
  18127. }
  18128. /**
  18129. * Creates a function that invokes `iteratees` with the arguments it receives
  18130. * and returns their results.
  18131. *
  18132. * @static
  18133. * @memberOf _
  18134. * @since 4.0.0
  18135. * @category Util
  18136. * @param {...(Function|Function[])} [iteratees=[_.identity]]
  18137. * The iteratees to invoke.
  18138. * @returns {Function} Returns the new function.
  18139. * @example
  18140. *
  18141. * var func = _.over([Math.max, Math.min]);
  18142. *
  18143. * func(1, 2, 3, 4);
  18144. * // => [4, 1]
  18145. */
  18146. var over = createOver(arrayMap);
  18147. /**
  18148. * Creates a function that checks if **all** of the `predicates` return
  18149. * truthy when invoked with the arguments it receives.
  18150. *
  18151. * @static
  18152. * @memberOf _
  18153. * @since 4.0.0
  18154. * @category Util
  18155. * @param {...(Function|Function[])} [predicates=[_.identity]]
  18156. * The predicates to check.
  18157. * @returns {Function} Returns the new function.
  18158. * @example
  18159. *
  18160. * var func = _.overEvery([Boolean, isFinite]);
  18161. *
  18162. * func('1');
  18163. * // => true
  18164. *
  18165. * func(null);
  18166. * // => false
  18167. *
  18168. * func(NaN);
  18169. * // => false
  18170. */
  18171. var overEvery = createOver(arrayEvery);
  18172. /**
  18173. * Creates a function that checks if **any** of the `predicates` return
  18174. * truthy when invoked with the arguments it receives.
  18175. *
  18176. * @static
  18177. * @memberOf _
  18178. * @since 4.0.0
  18179. * @category Util
  18180. * @param {...(Function|Function[])} [predicates=[_.identity]]
  18181. * The predicates to check.
  18182. * @returns {Function} Returns the new function.
  18183. * @example
  18184. *
  18185. * var func = _.overSome([Boolean, isFinite]);
  18186. *
  18187. * func('1');
  18188. * // => true
  18189. *
  18190. * func(null);
  18191. * // => true
  18192. *
  18193. * func(NaN);
  18194. * // => false
  18195. */
  18196. var overSome = createOver(arraySome);
  18197. /**
  18198. * Creates a function that returns the value at `path` of a given object.
  18199. *
  18200. * @static
  18201. * @memberOf _
  18202. * @since 2.4.0
  18203. * @category Util
  18204. * @param {Array|string} path The path of the property to get.
  18205. * @returns {Function} Returns the new accessor function.
  18206. * @example
  18207. *
  18208. * var objects = [
  18209. * { 'a': { 'b': 2 } },
  18210. * { 'a': { 'b': 1 } }
  18211. * ];
  18212. *
  18213. * _.map(objects, _.property('a.b'));
  18214. * // => [2, 1]
  18215. *
  18216. * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
  18217. * // => [1, 2]
  18218. */
  18219. function property(path) {
  18220. return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
  18221. }
  18222. /**
  18223. * The opposite of `_.property`; this method creates a function that returns
  18224. * the value at a given path of `object`.
  18225. *
  18226. * @static
  18227. * @memberOf _
  18228. * @since 3.0.0
  18229. * @category Util
  18230. * @param {Object} object The object to query.
  18231. * @returns {Function} Returns the new accessor function.
  18232. * @example
  18233. *
  18234. * var array = [0, 1, 2],
  18235. * object = { 'a': array, 'b': array, 'c': array };
  18236. *
  18237. * _.map(['a[2]', 'c[0]'], _.propertyOf(object));
  18238. * // => [2, 0]
  18239. *
  18240. * _.map([['a', '2'], ['c', '0']], _.propertyOf(object));
  18241. * // => [2, 0]
  18242. */
  18243. function propertyOf(object) {
  18244. return function(path) {
  18245. return object == null ? undefined : baseGet(object, path);
  18246. };
  18247. }
  18248. /**
  18249. * Creates an array of numbers (positive and/or negative) progressing from
  18250. * `start` up to, but not including, `end`. A step of `-1` is used if a negative
  18251. * `start` is specified without an `end` or `step`. If `end` is not specified,
  18252. * it's set to `start` with `start` then set to `0`.
  18253. *
  18254. * **Note:** JavaScript follows the IEEE-754 standard for resolving
  18255. * floating-point values which can produce unexpected results.
  18256. *
  18257. * @static
  18258. * @since 0.1.0
  18259. * @memberOf _
  18260. * @category Util
  18261. * @param {number} [start=0] The start of the range.
  18262. * @param {number} end The end of the range.
  18263. * @param {number} [step=1] The value to increment or decrement by.
  18264. * @returns {Array} Returns the range of numbers.
  18265. * @see _.inRange, _.rangeRight
  18266. * @example
  18267. *
  18268. * _.range(4);
  18269. * // => [0, 1, 2, 3]
  18270. *
  18271. * _.range(-4);
  18272. * // => [0, -1, -2, -3]
  18273. *
  18274. * _.range(1, 5);
  18275. * // => [1, 2, 3, 4]
  18276. *
  18277. * _.range(0, 20, 5);
  18278. * // => [0, 5, 10, 15]
  18279. *
  18280. * _.range(0, -4, -1);
  18281. * // => [0, -1, -2, -3]
  18282. *
  18283. * _.range(1, 4, 0);
  18284. * // => [1, 1, 1]
  18285. *
  18286. * _.range(0);
  18287. * // => []
  18288. */
  18289. var range = createRange();
  18290. /**
  18291. * This method is like `_.range` except that it populates values in
  18292. * descending order.
  18293. *
  18294. * @static
  18295. * @memberOf _
  18296. * @since 4.0.0
  18297. * @category Util
  18298. * @param {number} [start=0] The start of the range.
  18299. * @param {number} end The end of the range.
  18300. * @param {number} [step=1] The value to increment or decrement by.
  18301. * @returns {Array} Returns the range of numbers.
  18302. * @see _.inRange, _.range
  18303. * @example
  18304. *
  18305. * _.rangeRight(4);
  18306. * // => [3, 2, 1, 0]
  18307. *
  18308. * _.rangeRight(-4);
  18309. * // => [-3, -2, -1, 0]
  18310. *
  18311. * _.rangeRight(1, 5);
  18312. * // => [4, 3, 2, 1]
  18313. *
  18314. * _.rangeRight(0, 20, 5);
  18315. * // => [15, 10, 5, 0]
  18316. *
  18317. * _.rangeRight(0, -4, -1);
  18318. * // => [-3, -2, -1, 0]
  18319. *
  18320. * _.rangeRight(1, 4, 0);
  18321. * // => [1, 1, 1]
  18322. *
  18323. * _.rangeRight(0);
  18324. * // => []
  18325. */
  18326. var rangeRight = createRange(true);
  18327. /**
  18328. * This method returns a new empty array.
  18329. *
  18330. * @static
  18331. * @memberOf _
  18332. * @since 4.13.0
  18333. * @category Util
  18334. * @returns {Array} Returns the new empty array.
  18335. * @example
  18336. *
  18337. * var arrays = _.times(2, _.stubArray);
  18338. *
  18339. * console.log(arrays);
  18340. * // => [[], []]
  18341. *
  18342. * console.log(arrays[0] === arrays[1]);
  18343. * // => false
  18344. */
  18345. function stubArray() {
  18346. return [];
  18347. }
  18348. /**
  18349. * This method returns `false`.
  18350. *
  18351. * @static
  18352. * @memberOf _
  18353. * @since 4.13.0
  18354. * @category Util
  18355. * @returns {boolean} Returns `false`.
  18356. * @example
  18357. *
  18358. * _.times(2, _.stubFalse);
  18359. * // => [false, false]
  18360. */
  18361. function stubFalse() {
  18362. return false;
  18363. }
  18364. /**
  18365. * This method returns a new empty object.
  18366. *
  18367. * @static
  18368. * @memberOf _
  18369. * @since 4.13.0
  18370. * @category Util
  18371. * @returns {Object} Returns the new empty object.
  18372. * @example
  18373. *
  18374. * var objects = _.times(2, _.stubObject);
  18375. *
  18376. * console.log(objects);
  18377. * // => [{}, {}]
  18378. *
  18379. * console.log(objects[0] === objects[1]);
  18380. * // => false
  18381. */
  18382. function stubObject() {
  18383. return {};
  18384. }
  18385. /**
  18386. * This method returns an empty string.
  18387. *
  18388. * @static
  18389. * @memberOf _
  18390. * @since 4.13.0
  18391. * @category Util
  18392. * @returns {string} Returns the empty string.
  18393. * @example
  18394. *
  18395. * _.times(2, _.stubString);
  18396. * // => ['', '']
  18397. */
  18398. function stubString() {
  18399. return '';
  18400. }
  18401. /**
  18402. * This method returns `true`.
  18403. *
  18404. * @static
  18405. * @memberOf _
  18406. * @since 4.13.0
  18407. * @category Util
  18408. * @returns {boolean} Returns `true`.
  18409. * @example
  18410. *
  18411. * _.times(2, _.stubTrue);
  18412. * // => [true, true]
  18413. */
  18414. function stubTrue() {
  18415. return true;
  18416. }
  18417. /**
  18418. * Invokes the iteratee `n` times, returning an array of the results of
  18419. * each invocation. The iteratee is invoked with one argument; (index).
  18420. *
  18421. * @static
  18422. * @since 0.1.0
  18423. * @memberOf _
  18424. * @category Util
  18425. * @param {number} n The number of times to invoke `iteratee`.
  18426. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  18427. * @returns {Array} Returns the array of results.
  18428. * @example
  18429. *
  18430. * _.times(3, String);
  18431. * // => ['0', '1', '2']
  18432. *
  18433. * _.times(4, _.constant(0));
  18434. * // => [0, 0, 0, 0]
  18435. */
  18436. function times(n, iteratee) {
  18437. n = toInteger(n);
  18438. if (n < 1 || n > MAX_SAFE_INTEGER) {
  18439. return [];
  18440. }
  18441. var index = MAX_ARRAY_LENGTH,
  18442. length = nativeMin(n, MAX_ARRAY_LENGTH);
  18443. iteratee = getIteratee(iteratee);
  18444. n -= MAX_ARRAY_LENGTH;
  18445. var result = baseTimes(length, iteratee);
  18446. while (++index < n) {
  18447. iteratee(index);
  18448. }
  18449. return result;
  18450. }
  18451. /**
  18452. * Converts `value` to a property path array.
  18453. *
  18454. * @static
  18455. * @memberOf _
  18456. * @since 4.0.0
  18457. * @category Util
  18458. * @param {*} value The value to convert.
  18459. * @returns {Array} Returns the new property path array.
  18460. * @example
  18461. *
  18462. * _.toPath('a.b.c');
  18463. * // => ['a', 'b', 'c']
  18464. *
  18465. * _.toPath('a[0].b.c');
  18466. * // => ['a', '0', 'b', 'c']
  18467. */
  18468. function toPath(value) {
  18469. if (isArray(value)) {
  18470. return arrayMap(value, toKey);
  18471. }
  18472. return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));
  18473. }
  18474. /**
  18475. * Generates a unique ID. If `prefix` is given, the ID is appended to it.
  18476. *
  18477. * @static
  18478. * @since 0.1.0
  18479. * @memberOf _
  18480. * @category Util
  18481. * @param {string} [prefix=''] The value to prefix the ID with.
  18482. * @returns {string} Returns the unique ID.
  18483. * @example
  18484. *
  18485. * _.uniqueId('contact_');
  18486. * // => 'contact_104'
  18487. *
  18488. * _.uniqueId();
  18489. * // => '105'
  18490. */
  18491. function uniqueId(prefix) {
  18492. var id = ++idCounter;
  18493. return toString(prefix) + id;
  18494. }
  18495. /*------------------------------------------------------------------------*/
  18496. /**
  18497. * Adds two numbers.
  18498. *
  18499. * @static
  18500. * @memberOf _
  18501. * @since 3.4.0
  18502. * @category Math
  18503. * @param {number} augend The first number in an addition.
  18504. * @param {number} addend The second number in an addition.
  18505. * @returns {number} Returns the total.
  18506. * @example
  18507. *
  18508. * _.add(6, 4);
  18509. * // => 10
  18510. */
  18511. var add = createMathOperation(function(augend, addend) {
  18512. return augend + addend;
  18513. }, 0);
  18514. /**
  18515. * Computes `number` rounded up to `precision`.
  18516. *
  18517. * @static
  18518. * @memberOf _
  18519. * @since 3.10.0
  18520. * @category Math
  18521. * @param {number} number The number to round up.
  18522. * @param {number} [precision=0] The precision to round up to.
  18523. * @returns {number} Returns the rounded up number.
  18524. * @example
  18525. *
  18526. * _.ceil(4.006);
  18527. * // => 5
  18528. *
  18529. * _.ceil(6.004, 2);
  18530. * // => 6.01
  18531. *
  18532. * _.ceil(6040, -2);
  18533. * // => 6100
  18534. */
  18535. var ceil = createRound('ceil');
  18536. /**
  18537. * Divide two numbers.
  18538. *
  18539. * @static
  18540. * @memberOf _
  18541. * @since 4.7.0
  18542. * @category Math
  18543. * @param {number} dividend The first number in a division.
  18544. * @param {number} divisor The second number in a division.
  18545. * @returns {number} Returns the quotient.
  18546. * @example
  18547. *
  18548. * _.divide(6, 4);
  18549. * // => 1.5
  18550. */
  18551. var divide = createMathOperation(function(dividend, divisor) {
  18552. return dividend / divisor;
  18553. }, 1);
  18554. /**
  18555. * Computes `number` rounded down to `precision`.
  18556. *
  18557. * @static
  18558. * @memberOf _
  18559. * @since 3.10.0
  18560. * @category Math
  18561. * @param {number} number The number to round down.
  18562. * @param {number} [precision=0] The precision to round down to.
  18563. * @returns {number} Returns the rounded down number.
  18564. * @example
  18565. *
  18566. * _.floor(4.006);
  18567. * // => 4
  18568. *
  18569. * _.floor(0.046, 2);
  18570. * // => 0.04
  18571. *
  18572. * _.floor(4060, -2);
  18573. * // => 4000
  18574. */
  18575. var floor = createRound('floor');
  18576. /**
  18577. * Computes the maximum value of `array`. If `array` is empty or falsey,
  18578. * `undefined` is returned.
  18579. *
  18580. * @static
  18581. * @since 0.1.0
  18582. * @memberOf _
  18583. * @category Math
  18584. * @param {Array} array The array to iterate over.
  18585. * @returns {*} Returns the maximum value.
  18586. * @example
  18587. *
  18588. * _.max([4, 2, 8, 6]);
  18589. * // => 8
  18590. *
  18591. * _.max([]);
  18592. * // => undefined
  18593. */
  18594. function max(array) {
  18595. return (array && array.length)
  18596. ? baseExtremum(array, identity, baseGt)
  18597. : undefined;
  18598. }
  18599. /**
  18600. * This method is like `_.max` except that it accepts `iteratee` which is
  18601. * invoked for each element in `array` to generate the criterion by which
  18602. * the value is ranked. The iteratee is invoked with one argument: (value).
  18603. *
  18604. * @static
  18605. * @memberOf _
  18606. * @since 4.0.0
  18607. * @category Math
  18608. * @param {Array} array The array to iterate over.
  18609. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  18610. * @returns {*} Returns the maximum value.
  18611. * @example
  18612. *
  18613. * var objects = [{ 'n': 1 }, { 'n': 2 }];
  18614. *
  18615. * _.maxBy(objects, function(o) { return o.n; });
  18616. * // => { 'n': 2 }
  18617. *
  18618. * // The `_.property` iteratee shorthand.
  18619. * _.maxBy(objects, 'n');
  18620. * // => { 'n': 2 }
  18621. */
  18622. function maxBy(array, iteratee) {
  18623. return (array && array.length)
  18624. ? baseExtremum(array, getIteratee(iteratee, 2), baseGt)
  18625. : undefined;
  18626. }
  18627. /**
  18628. * Computes the mean of the values in `array`.
  18629. *
  18630. * @static
  18631. * @memberOf _
  18632. * @since 4.0.0
  18633. * @category Math
  18634. * @param {Array} array The array to iterate over.
  18635. * @returns {number} Returns the mean.
  18636. * @example
  18637. *
  18638. * _.mean([4, 2, 8, 6]);
  18639. * // => 5
  18640. */
  18641. function mean(array) {
  18642. return baseMean(array, identity);
  18643. }
  18644. /**
  18645. * This method is like `_.mean` except that it accepts `iteratee` which is
  18646. * invoked for each element in `array` to generate the value to be averaged.
  18647. * The iteratee is invoked with one argument: (value).
  18648. *
  18649. * @static
  18650. * @memberOf _
  18651. * @since 4.7.0
  18652. * @category Math
  18653. * @param {Array} array The array to iterate over.
  18654. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  18655. * @returns {number} Returns the mean.
  18656. * @example
  18657. *
  18658. * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
  18659. *
  18660. * _.meanBy(objects, function(o) { return o.n; });
  18661. * // => 5
  18662. *
  18663. * // The `_.property` iteratee shorthand.
  18664. * _.meanBy(objects, 'n');
  18665. * // => 5
  18666. */
  18667. function meanBy(array, iteratee) {
  18668. return baseMean(array, getIteratee(iteratee, 2));
  18669. }
  18670. /**
  18671. * Computes the minimum value of `array`. If `array` is empty or falsey,
  18672. * `undefined` is returned.
  18673. *
  18674. * @static
  18675. * @since 0.1.0
  18676. * @memberOf _
  18677. * @category Math
  18678. * @param {Array} array The array to iterate over.
  18679. * @returns {*} Returns the minimum value.
  18680. * @example
  18681. *
  18682. * _.min([4, 2, 8, 6]);
  18683. * // => 2
  18684. *
  18685. * _.min([]);
  18686. * // => undefined
  18687. */
  18688. function min(array) {
  18689. return (array && array.length)
  18690. ? baseExtremum(array, identity, baseLt)
  18691. : undefined;
  18692. }
  18693. /**
  18694. * This method is like `_.min` except that it accepts `iteratee` which is
  18695. * invoked for each element in `array` to generate the criterion by which
  18696. * the value is ranked. The iteratee is invoked with one argument: (value).
  18697. *
  18698. * @static
  18699. * @memberOf _
  18700. * @since 4.0.0
  18701. * @category Math
  18702. * @param {Array} array The array to iterate over.
  18703. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  18704. * @returns {*} Returns the minimum value.
  18705. * @example
  18706. *
  18707. * var objects = [{ 'n': 1 }, { 'n': 2 }];
  18708. *
  18709. * _.minBy(objects, function(o) { return o.n; });
  18710. * // => { 'n': 1 }
  18711. *
  18712. * // The `_.property` iteratee shorthand.
  18713. * _.minBy(objects, 'n');
  18714. * // => { 'n': 1 }
  18715. */
  18716. function minBy(array, iteratee) {
  18717. return (array && array.length)
  18718. ? baseExtremum(array, getIteratee(iteratee, 2), baseLt)
  18719. : undefined;
  18720. }
  18721. /**
  18722. * Multiply two numbers.
  18723. *
  18724. * @static
  18725. * @memberOf _
  18726. * @since 4.7.0
  18727. * @category Math
  18728. * @param {number} multiplier The first number in a multiplication.
  18729. * @param {number} multiplicand The second number in a multiplication.
  18730. * @returns {number} Returns the product.
  18731. * @example
  18732. *
  18733. * _.multiply(6, 4);
  18734. * // => 24
  18735. */
  18736. var multiply = createMathOperation(function(multiplier, multiplicand) {
  18737. return multiplier * multiplicand;
  18738. }, 1);
  18739. /**
  18740. * Computes `number` rounded to `precision`.
  18741. *
  18742. * @static
  18743. * @memberOf _
  18744. * @since 3.10.0
  18745. * @category Math
  18746. * @param {number} number The number to round.
  18747. * @param {number} [precision=0] The precision to round to.
  18748. * @returns {number} Returns the rounded number.
  18749. * @example
  18750. *
  18751. * _.round(4.006);
  18752. * // => 4
  18753. *
  18754. * _.round(4.006, 2);
  18755. * // => 4.01
  18756. *
  18757. * _.round(4060, -2);
  18758. * // => 4100
  18759. */
  18760. var round = createRound('round');
  18761. /**
  18762. * Subtract two numbers.
  18763. *
  18764. * @static
  18765. * @memberOf _
  18766. * @since 4.0.0
  18767. * @category Math
  18768. * @param {number} minuend The first number in a subtraction.
  18769. * @param {number} subtrahend The second number in a subtraction.
  18770. * @returns {number} Returns the difference.
  18771. * @example
  18772. *
  18773. * _.subtract(6, 4);
  18774. * // => 2
  18775. */
  18776. var subtract = createMathOperation(function(minuend, subtrahend) {
  18777. return minuend - subtrahend;
  18778. }, 0);
  18779. /**
  18780. * Computes the sum of the values in `array`.
  18781. *
  18782. * @static
  18783. * @memberOf _
  18784. * @since 3.4.0
  18785. * @category Math
  18786. * @param {Array} array The array to iterate over.
  18787. * @returns {number} Returns the sum.
  18788. * @example
  18789. *
  18790. * _.sum([4, 2, 8, 6]);
  18791. * // => 20
  18792. */
  18793. function sum(array) {
  18794. return (array && array.length)
  18795. ? baseSum(array, identity)
  18796. : 0;
  18797. }
  18798. /**
  18799. * This method is like `_.sum` except that it accepts `iteratee` which is
  18800. * invoked for each element in `array` to generate the value to be summed.
  18801. * The iteratee is invoked with one argument: (value).
  18802. *
  18803. * @static
  18804. * @memberOf _
  18805. * @since 4.0.0
  18806. * @category Math
  18807. * @param {Array} array The array to iterate over.
  18808. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  18809. * @returns {number} Returns the sum.
  18810. * @example
  18811. *
  18812. * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
  18813. *
  18814. * _.sumBy(objects, function(o) { return o.n; });
  18815. * // => 20
  18816. *
  18817. * // The `_.property` iteratee shorthand.
  18818. * _.sumBy(objects, 'n');
  18819. * // => 20
  18820. */
  18821. function sumBy(array, iteratee) {
  18822. return (array && array.length)
  18823. ? baseSum(array, getIteratee(iteratee, 2))
  18824. : 0;
  18825. }
  18826. /*------------------------------------------------------------------------*/
  18827. // Add methods that return wrapped values in chain sequences.
  18828. lodash.after = after;
  18829. lodash.ary = ary;
  18830. lodash.assign = assign;
  18831. lodash.assignIn = assignIn;
  18832. lodash.assignInWith = assignInWith;
  18833. lodash.assignWith = assignWith;
  18834. lodash.at = at;
  18835. lodash.before = before;
  18836. lodash.bind = bind;
  18837. lodash.bindAll = bindAll;
  18838. lodash.bindKey = bindKey;
  18839. lodash.castArray = castArray;
  18840. lodash.chain = chain;
  18841. lodash.chunk = chunk;
  18842. lodash.compact = compact;
  18843. lodash.concat = concat;
  18844. lodash.cond = cond;
  18845. lodash.conforms = conforms;
  18846. lodash.constant = constant;
  18847. lodash.countBy = countBy;
  18848. lodash.create = create;
  18849. lodash.curry = curry;
  18850. lodash.curryRight = curryRight;
  18851. lodash.debounce = debounce;
  18852. lodash.defaults = defaults;
  18853. lodash.defaultsDeep = defaultsDeep;
  18854. lodash.defer = defer;
  18855. lodash.delay = delay;
  18856. lodash.difference = difference;
  18857. lodash.differenceBy = differenceBy;
  18858. lodash.differenceWith = differenceWith;
  18859. lodash.drop = drop;
  18860. lodash.dropRight = dropRight;
  18861. lodash.dropRightWhile = dropRightWhile;
  18862. lodash.dropWhile = dropWhile;
  18863. lodash.fill = fill;
  18864. lodash.filter = filter;
  18865. lodash.flatMap = flatMap;
  18866. lodash.flatMapDeep = flatMapDeep;
  18867. lodash.flatMapDepth = flatMapDepth;
  18868. lodash.flatten = flatten;
  18869. lodash.flattenDeep = flattenDeep;
  18870. lodash.flattenDepth = flattenDepth;
  18871. lodash.flip = flip;
  18872. lodash.flow = flow;
  18873. lodash.flowRight = flowRight;
  18874. lodash.fromPairs = fromPairs;
  18875. lodash.functions = functions;
  18876. lodash.functionsIn = functionsIn;
  18877. lodash.groupBy = groupBy;
  18878. lodash.initial = initial;
  18879. lodash.intersection = intersection;
  18880. lodash.intersectionBy = intersectionBy;
  18881. lodash.intersectionWith = intersectionWith;
  18882. lodash.invert = invert;
  18883. lodash.invertBy = invertBy;
  18884. lodash.invokeMap = invokeMap;
  18885. lodash.iteratee = iteratee;
  18886. lodash.keyBy = keyBy;
  18887. lodash.keys = keys;
  18888. lodash.keysIn = keysIn;
  18889. lodash.map = map;
  18890. lodash.mapKeys = mapKeys;
  18891. lodash.mapValues = mapValues;
  18892. lodash.matches = matches;
  18893. lodash.matchesProperty = matchesProperty;
  18894. lodash.memoize = memoize;
  18895. lodash.merge = merge;
  18896. lodash.mergeWith = mergeWith;
  18897. lodash.method = method;
  18898. lodash.methodOf = methodOf;
  18899. lodash.mixin = mixin;
  18900. lodash.negate = negate;
  18901. lodash.nthArg = nthArg;
  18902. lodash.omit = omit;
  18903. lodash.omitBy = omitBy;
  18904. lodash.once = once;
  18905. lodash.orderBy = orderBy;
  18906. lodash.over = over;
  18907. lodash.overArgs = overArgs;
  18908. lodash.overEvery = overEvery;
  18909. lodash.overSome = overSome;
  18910. lodash.partial = partial;
  18911. lodash.partialRight = partialRight;
  18912. lodash.partition = partition;
  18913. lodash.pick = pick;
  18914. lodash.pickBy = pickBy;
  18915. lodash.property = property;
  18916. lodash.propertyOf = propertyOf;
  18917. lodash.pull = pull;
  18918. lodash.pullAll = pullAll;
  18919. lodash.pullAllBy = pullAllBy;
  18920. lodash.pullAllWith = pullAllWith;
  18921. lodash.pullAt = pullAt;
  18922. lodash.range = range;
  18923. lodash.rangeRight = rangeRight;
  18924. lodash.rearg = rearg;
  18925. lodash.reject = reject;
  18926. lodash.remove = remove;
  18927. lodash.rest = rest;
  18928. lodash.reverse = reverse;
  18929. lodash.sampleSize = sampleSize;
  18930. lodash.set = set;
  18931. lodash.setWith = setWith;
  18932. lodash.shuffle = shuffle;
  18933. lodash.slice = slice;
  18934. lodash.sortBy = sortBy;
  18935. lodash.sortedUniq = sortedUniq;
  18936. lodash.sortedUniqBy = sortedUniqBy;
  18937. lodash.split = split;
  18938. lodash.spread = spread;
  18939. lodash.tail = tail;
  18940. lodash.take = take;
  18941. lodash.takeRight = takeRight;
  18942. lodash.takeRightWhile = takeRightWhile;
  18943. lodash.takeWhile = takeWhile;
  18944. lodash.tap = tap;
  18945. lodash.throttle = throttle;
  18946. lodash.thru = thru;
  18947. lodash.toArray = toArray;
  18948. lodash.toPairs = toPairs;
  18949. lodash.toPairsIn = toPairsIn;
  18950. lodash.toPath = toPath;
  18951. lodash.toPlainObject = toPlainObject;
  18952. lodash.transform = transform;
  18953. lodash.unary = unary;
  18954. lodash.union = union;
  18955. lodash.unionBy = unionBy;
  18956. lodash.unionWith = unionWith;
  18957. lodash.uniq = uniq;
  18958. lodash.uniqBy = uniqBy;
  18959. lodash.uniqWith = uniqWith;
  18960. lodash.unset = unset;
  18961. lodash.unzip = unzip;
  18962. lodash.unzipWith = unzipWith;
  18963. lodash.update = update;
  18964. lodash.updateWith = updateWith;
  18965. lodash.values = values;
  18966. lodash.valuesIn = valuesIn;
  18967. lodash.without = without;
  18968. lodash.words = words;
  18969. lodash.wrap = wrap;
  18970. lodash.xor = xor;
  18971. lodash.xorBy = xorBy;
  18972. lodash.xorWith = xorWith;
  18973. lodash.zip = zip;
  18974. lodash.zipObject = zipObject;
  18975. lodash.zipObjectDeep = zipObjectDeep;
  18976. lodash.zipWith = zipWith;
  18977. // Add aliases.
  18978. lodash.entries = toPairs;
  18979. lodash.entriesIn = toPairsIn;
  18980. lodash.extend = assignIn;
  18981. lodash.extendWith = assignInWith;
  18982. // Add methods to `lodash.prototype`.
  18983. mixin(lodash, lodash);
  18984. /*------------------------------------------------------------------------*/
  18985. // Add methods that return unwrapped values in chain sequences.
  18986. lodash.add = add;
  18987. lodash.attempt = attempt;
  18988. lodash.camelCase = camelCase;
  18989. lodash.capitalize = capitalize;
  18990. lodash.ceil = ceil;
  18991. lodash.clamp = clamp;
  18992. lodash.clone = clone;
  18993. lodash.cloneDeep = cloneDeep;
  18994. lodash.cloneDeepWith = cloneDeepWith;
  18995. lodash.cloneWith = cloneWith;
  18996. lodash.conformsTo = conformsTo;
  18997. lodash.deburr = deburr;
  18998. lodash.defaultTo = defaultTo;
  18999. lodash.divide = divide;
  19000. lodash.endsWith = endsWith;
  19001. lodash.eq = eq;
  19002. lodash.escape = escape;
  19003. lodash.escapeRegExp = escapeRegExp;
  19004. lodash.every = every;
  19005. lodash.find = find;
  19006. lodash.findIndex = findIndex;
  19007. lodash.findKey = findKey;
  19008. lodash.findLast = findLast;
  19009. lodash.findLastIndex = findLastIndex;
  19010. lodash.findLastKey = findLastKey;
  19011. lodash.floor = floor;
  19012. lodash.forEach = forEach;
  19013. lodash.forEachRight = forEachRight;
  19014. lodash.forIn = forIn;
  19015. lodash.forInRight = forInRight;
  19016. lodash.forOwn = forOwn;
  19017. lodash.forOwnRight = forOwnRight;
  19018. lodash.get = get;
  19019. lodash.gt = gt;
  19020. lodash.gte = gte;
  19021. lodash.has = has;
  19022. lodash.hasIn = hasIn;
  19023. lodash.head = head;
  19024. lodash.identity = identity;
  19025. lodash.includes = includes;
  19026. lodash.indexOf = indexOf;
  19027. lodash.inRange = inRange;
  19028. lodash.invoke = invoke;
  19029. lodash.isArguments = isArguments;
  19030. lodash.isArray = isArray;
  19031. lodash.isArrayBuffer = isArrayBuffer;
  19032. lodash.isArrayLike = isArrayLike;
  19033. lodash.isArrayLikeObject = isArrayLikeObject;
  19034. lodash.isBoolean = isBoolean;
  19035. lodash.isBuffer = isBuffer;
  19036. lodash.isDate = isDate;
  19037. lodash.isElement = isElement;
  19038. lodash.isEmpty = isEmpty;
  19039. lodash.isEqual = isEqual;
  19040. lodash.isEqualWith = isEqualWith;
  19041. lodash.isError = isError;
  19042. lodash.isFinite = isFinite;
  19043. lodash.isFunction = isFunction;
  19044. lodash.isInteger = isInteger;
  19045. lodash.isLength = isLength;
  19046. lodash.isMap = isMap;
  19047. lodash.isMatch = isMatch;
  19048. lodash.isMatchWith = isMatchWith;
  19049. lodash.isNaN = isNaN;
  19050. lodash.isNative = isNative;
  19051. lodash.isNil = isNil;
  19052. lodash.isNull = isNull;
  19053. lodash.isNumber = isNumber;
  19054. lodash.isObject = isObject;
  19055. lodash.isObjectLike = isObjectLike;
  19056. lodash.isPlainObject = isPlainObject;
  19057. lodash.isRegExp = isRegExp;
  19058. lodash.isSafeInteger = isSafeInteger;
  19059. lodash.isSet = isSet;
  19060. lodash.isString = isString;
  19061. lodash.isSymbol = isSymbol;
  19062. lodash.isTypedArray = isTypedArray;
  19063. lodash.isUndefined = isUndefined;
  19064. lodash.isWeakMap = isWeakMap;
  19065. lodash.isWeakSet = isWeakSet;
  19066. lodash.join = join;
  19067. lodash.kebabCase = kebabCase;
  19068. lodash.last = last;
  19069. lodash.lastIndexOf = lastIndexOf;
  19070. lodash.lowerCase = lowerCase;
  19071. lodash.lowerFirst = lowerFirst;
  19072. lodash.lt = lt;
  19073. lodash.lte = lte;
  19074. lodash.max = max;
  19075. lodash.maxBy = maxBy;
  19076. lodash.mean = mean;
  19077. lodash.meanBy = meanBy;
  19078. lodash.min = min;
  19079. lodash.minBy = minBy;
  19080. lodash.stubArray = stubArray;
  19081. lodash.stubFalse = stubFalse;
  19082. lodash.stubObject = stubObject;
  19083. lodash.stubString = stubString;
  19084. lodash.stubTrue = stubTrue;
  19085. lodash.multiply = multiply;
  19086. lodash.nth = nth;
  19087. lodash.noConflict = noConflict;
  19088. lodash.noop = noop;
  19089. lodash.now = now;
  19090. lodash.pad = pad;
  19091. lodash.padEnd = padEnd;
  19092. lodash.padStart = padStart;
  19093. lodash.parseInt = parseInt;
  19094. lodash.random = random;
  19095. lodash.reduce = reduce;
  19096. lodash.reduceRight = reduceRight;
  19097. lodash.repeat = repeat;
  19098. lodash.replace = replace;
  19099. lodash.result = result;
  19100. lodash.round = round;
  19101. lodash.runInContext = runInContext;
  19102. lodash.sample = sample;
  19103. lodash.size = size;
  19104. lodash.snakeCase = snakeCase;
  19105. lodash.some = some;
  19106. lodash.sortedIndex = sortedIndex;
  19107. lodash.sortedIndexBy = sortedIndexBy;
  19108. lodash.sortedIndexOf = sortedIndexOf;
  19109. lodash.sortedLastIndex = sortedLastIndex;
  19110. lodash.sortedLastIndexBy = sortedLastIndexBy;
  19111. lodash.sortedLastIndexOf = sortedLastIndexOf;
  19112. lodash.startCase = startCase;
  19113. lodash.startsWith = startsWith;
  19114. lodash.subtract = subtract;
  19115. lodash.sum = sum;
  19116. lodash.sumBy = sumBy;
  19117. lodash.template = template;
  19118. lodash.times = times;
  19119. lodash.toFinite = toFinite;
  19120. lodash.toInteger = toInteger;
  19121. lodash.toLength = toLength;
  19122. lodash.toLower = toLower;
  19123. lodash.toNumber = toNumber;
  19124. lodash.toSafeInteger = toSafeInteger;
  19125. lodash.toString = toString;
  19126. lodash.toUpper = toUpper;
  19127. lodash.trim = trim;
  19128. lodash.trimEnd = trimEnd;
  19129. lodash.trimStart = trimStart;
  19130. lodash.truncate = truncate;
  19131. lodash.unescape = unescape;
  19132. lodash.uniqueId = uniqueId;
  19133. lodash.upperCase = upperCase;
  19134. lodash.upperFirst = upperFirst;
  19135. // Add aliases.
  19136. lodash.each = forEach;
  19137. lodash.eachRight = forEachRight;
  19138. lodash.first = head;
  19139. mixin(lodash, (function() {
  19140. var source = {};
  19141. baseForOwn(lodash, function(func, methodName) {
  19142. if (!hasOwnProperty.call(lodash.prototype, methodName)) {
  19143. source[methodName] = func;
  19144. }
  19145. });
  19146. return source;
  19147. }()), { 'chain': false });
  19148. /*------------------------------------------------------------------------*/
  19149. /**
  19150. * The semantic version number.
  19151. *
  19152. * @static
  19153. * @memberOf _
  19154. * @type {string}
  19155. */
  19156. lodash.VERSION = VERSION;
  19157. // Assign default placeholders.
  19158. arrayEach(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function(methodName) {
  19159. lodash[methodName].placeholder = lodash;
  19160. });
  19161. // Add `LazyWrapper` methods for `_.drop` and `_.take` variants.
  19162. arrayEach(['drop', 'take'], function(methodName, index) {
  19163. LazyWrapper.prototype[methodName] = function(n) {
  19164. n = n === undefined ? 1 : nativeMax(toInteger(n), 0);
  19165. var result = (this.__filtered__ && !index)
  19166. ? new LazyWrapper(this)
  19167. : this.clone();
  19168. if (result.__filtered__) {
  19169. result.__takeCount__ = nativeMin(n, result.__takeCount__);
  19170. } else {
  19171. result.__views__.push({
  19172. 'size': nativeMin(n, MAX_ARRAY_LENGTH),
  19173. 'type': methodName + (result.__dir__ < 0 ? 'Right' : '')
  19174. });
  19175. }
  19176. return result;
  19177. };
  19178. LazyWrapper.prototype[methodName + 'Right'] = function(n) {
  19179. return this.reverse()[methodName](n).reverse();
  19180. };
  19181. });
  19182. // Add `LazyWrapper` methods that accept an `iteratee` value.
  19183. arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) {
  19184. var type = index + 1,
  19185. isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;
  19186. LazyWrapper.prototype[methodName] = function(iteratee) {
  19187. var result = this.clone();
  19188. result.__iteratees__.push({
  19189. 'iteratee': getIteratee(iteratee, 3),
  19190. 'type': type
  19191. });
  19192. result.__filtered__ = result.__filtered__ || isFilter;
  19193. return result;
  19194. };
  19195. });
  19196. // Add `LazyWrapper` methods for `_.head` and `_.last`.
  19197. arrayEach(['head', 'last'], function(methodName, index) {
  19198. var takeName = 'take' + (index ? 'Right' : '');
  19199. LazyWrapper.prototype[methodName] = function() {
  19200. return this[takeName](1).value()[0];
  19201. };
  19202. });
  19203. // Add `LazyWrapper` methods for `_.initial` and `_.tail`.
  19204. arrayEach(['initial', 'tail'], function(methodName, index) {
  19205. var dropName = 'drop' + (index ? '' : 'Right');
  19206. LazyWrapper.prototype[methodName] = function() {
  19207. return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);
  19208. };
  19209. });
  19210. LazyWrapper.prototype.compact = function() {
  19211. return this.filter(identity);
  19212. };
  19213. LazyWrapper.prototype.find = function(predicate) {
  19214. return this.filter(predicate).head();
  19215. };
  19216. LazyWrapper.prototype.findLast = function(predicate) {
  19217. return this.reverse().find(predicate);
  19218. };
  19219. LazyWrapper.prototype.invokeMap = baseRest(function(path, args) {
  19220. if (typeof path == 'function') {
  19221. return new LazyWrapper(this);
  19222. }
  19223. return this.map(function(value) {
  19224. return baseInvoke(value, path, args);
  19225. });
  19226. });
  19227. LazyWrapper.prototype.reject = function(predicate) {
  19228. return this.filter(negate(getIteratee(predicate)));
  19229. };
  19230. LazyWrapper.prototype.slice = function(start, end) {
  19231. start = toInteger(start);
  19232. var result = this;
  19233. if (result.__filtered__ && (start > 0 || end < 0)) {
  19234. return new LazyWrapper(result);
  19235. }
  19236. if (start < 0) {
  19237. result = result.takeRight(-start);
  19238. } else if (start) {
  19239. result = result.drop(start);
  19240. }
  19241. if (end !== undefined) {
  19242. end = toInteger(end);
  19243. result = end < 0 ? result.dropRight(-end) : result.take(end - start);
  19244. }
  19245. return result;
  19246. };
  19247. LazyWrapper.prototype.takeRightWhile = function(predicate) {
  19248. return this.reverse().takeWhile(predicate).reverse();
  19249. };
  19250. LazyWrapper.prototype.toArray = function() {
  19251. return this.take(MAX_ARRAY_LENGTH);
  19252. };
  19253. // Add `LazyWrapper` methods to `lodash.prototype`.
  19254. baseForOwn(LazyWrapper.prototype, function(func, methodName) {
  19255. var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName),
  19256. isTaker = /^(?:head|last)$/.test(methodName),
  19257. lodashFunc = lodash[isTaker ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName],
  19258. retUnwrapped = isTaker || /^find/.test(methodName);
  19259. if (!lodashFunc) {
  19260. return;
  19261. }
  19262. lodash.prototype[methodName] = function() {
  19263. var value = this.__wrapped__,
  19264. args = isTaker ? [1] : arguments,
  19265. isLazy = value instanceof LazyWrapper,
  19266. iteratee = args[0],
  19267. useLazy = isLazy || isArray(value);
  19268. var interceptor = function(value) {
  19269. var result = lodashFunc.apply(lodash, arrayPush([value], args));
  19270. return (isTaker && chainAll) ? result[0] : result;
  19271. };
  19272. if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {
  19273. // Avoid lazy use if the iteratee has a "length" value other than `1`.
  19274. isLazy = useLazy = false;
  19275. }
  19276. var chainAll = this.__chain__,
  19277. isHybrid = !!this.__actions__.length,
  19278. isUnwrapped = retUnwrapped && !chainAll,
  19279. onlyLazy = isLazy && !isHybrid;
  19280. if (!retUnwrapped && useLazy) {
  19281. value = onlyLazy ? value : new LazyWrapper(this);
  19282. var result = func.apply(value, args);
  19283. result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });
  19284. return new LodashWrapper(result, chainAll);
  19285. }
  19286. if (isUnwrapped && onlyLazy) {
  19287. return func.apply(this, args);
  19288. }
  19289. result = this.thru(interceptor);
  19290. return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result;
  19291. };
  19292. });
  19293. // Add `Array` methods to `lodash.prototype`.
  19294. arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {
  19295. var func = arrayProto[methodName],
  19296. chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',
  19297. retUnwrapped = /^(?:pop|shift)$/.test(methodName);
  19298. lodash.prototype[methodName] = function() {
  19299. var args = arguments;
  19300. if (retUnwrapped && !this.__chain__) {
  19301. var value = this.value();
  19302. return func.apply(isArray(value) ? value : [], args);
  19303. }
  19304. return this[chainName](function(value) {
  19305. return func.apply(isArray(value) ? value : [], args);
  19306. });
  19307. };
  19308. });
  19309. // Map minified method names to their real names.
  19310. baseForOwn(LazyWrapper.prototype, function(func, methodName) {
  19311. var lodashFunc = lodash[methodName];
  19312. if (lodashFunc) {
  19313. var key = (lodashFunc.name + ''),
  19314. names = realNames[key] || (realNames[key] = []);
  19315. names.push({ 'name': methodName, 'func': lodashFunc });
  19316. }
  19317. });
  19318. realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [{
  19319. 'name': 'wrapper',
  19320. 'func': undefined
  19321. }];
  19322. // Add methods to `LazyWrapper`.
  19323. LazyWrapper.prototype.clone = lazyClone;
  19324. LazyWrapper.prototype.reverse = lazyReverse;
  19325. LazyWrapper.prototype.value = lazyValue;
  19326. // Add chain sequence methods to the `lodash` wrapper.
  19327. lodash.prototype.at = wrapperAt;
  19328. lodash.prototype.chain = wrapperChain;
  19329. lodash.prototype.commit = wrapperCommit;
  19330. lodash.prototype.next = wrapperNext;
  19331. lodash.prototype.plant = wrapperPlant;
  19332. lodash.prototype.reverse = wrapperReverse;
  19333. lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;
  19334. // Add lazy aliases.
  19335. lodash.prototype.first = lodash.prototype.head;
  19336. if (symIterator) {
  19337. lodash.prototype[symIterator] = wrapperToIterator;
  19338. }
  19339. return lodash;
  19340. });
  19341. /*--------------------------------------------------------------------------*/
  19342. // Export lodash.
  19343. var _ = runInContext();
  19344. // Some AMD build optimizers, like r.js, check for condition patterns like:
  19345. if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) {
  19346. // Expose Lodash on the global object to prevent errors when Lodash is
  19347. // loaded by a script tag in the presence of an AMD loader.
  19348. // See http://requirejs.org/docs/errors.html#mismatch for more details.
  19349. // Use `_.noConflict` to remove Lodash from the global object.
  19350. root._ = _;
  19351. // Define as an anonymous module so, through path mapping, it can be
  19352. // referenced as the "underscore" module.
  19353. define('lodash',[],function() {
  19354. return _;
  19355. });
  19356. }
  19357. // Check for `exports` after `define` in case a build optimizer adds it.
  19358. else if (freeModule) {
  19359. // Export for Node.js.
  19360. (freeModule.exports = _)._ = _;
  19361. // Export for CommonJS support.
  19362. freeExports._ = _;
  19363. }
  19364. else {
  19365. // Export to the global object.
  19366. root._ = _;
  19367. }
  19368. }.call(this));
  19369. /*global define */
  19370. define('lodash.noconflict',['lodash'], function (_) {
  19371. if (!_.isUndefined(require) && !_.isUndefined(require.s)) {
  19372. /* XXX: This is a hack to make sure that the compiled templates have
  19373. * access to the _ object.
  19374. *
  19375. * Otherwise we sometimes get errors like this:
  19376. *
  19377. * TypeError: Cannot read property 'escape' of undefined
  19378. * at eval (./src/templates/chatroom_sidebar.html:6)
  19379. */
  19380. var lodashLoader = require.s.contexts._.config.lodashLoader;
  19381. lodashLoader.templateSettings.imports = { '_': _ };
  19382. require.config({'lodashLoader': lodashLoader});
  19383. }
  19384. return _.noConflict();
  19385. });
  19386. (function webpackUniversalModuleDefinition(root, factory) {
  19387. if(typeof exports === 'object' && typeof module === 'object')
  19388. module.exports = factory();
  19389. else if(typeof define === 'function' && define.amd)
  19390. define('lodash.converter',[], factory);
  19391. else if(typeof exports === 'object')
  19392. exports["fp"] = factory();
  19393. else
  19394. root["fp"] = factory();
  19395. })(this, function() {
  19396. return /******/ (function(modules) { // webpackBootstrap
  19397. /******/ // The module cache
  19398. /******/ var installedModules = {};
  19399. /******/ // The require function
  19400. /******/ function __webpack_require__(moduleId) {
  19401. /******/ // Check if module is in cache
  19402. /******/ if(installedModules[moduleId])
  19403. /******/ return installedModules[moduleId].exports;
  19404. /******/ // Create a new module (and put it into the cache)
  19405. /******/ var module = installedModules[moduleId] = {
  19406. /******/ exports: {},
  19407. /******/ id: moduleId,
  19408. /******/ loaded: false
  19409. /******/ };
  19410. /******/ // Execute the module function
  19411. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  19412. /******/ // Flag the module as loaded
  19413. /******/ module.loaded = true;
  19414. /******/ // Return the exports of the module
  19415. /******/ return module.exports;
  19416. /******/ }
  19417. /******/ // expose the modules object (__webpack_modules__)
  19418. /******/ __webpack_require__.m = modules;
  19419. /******/ // expose the module cache
  19420. /******/ __webpack_require__.c = installedModules;
  19421. /******/ // __webpack_public_path__
  19422. /******/ __webpack_require__.p = "";
  19423. /******/ // Load entry module and return exports
  19424. /******/ return __webpack_require__(0);
  19425. /******/ })
  19426. /************************************************************************/
  19427. /******/ ([
  19428. /* 0 */
  19429. /***/ function(module, exports, __webpack_require__) {
  19430. var baseConvert = __webpack_require__(1);
  19431. /**
  19432. * Converts `lodash` to an immutable auto-curried iteratee-first data-last
  19433. * version with conversion `options` applied.
  19434. *
  19435. * @param {Function} lodash The lodash function to convert.
  19436. * @param {Object} [options] The options object. See `baseConvert` for more details.
  19437. * @returns {Function} Returns the converted `lodash`.
  19438. */
  19439. function browserConvert(lodash, options) {
  19440. return baseConvert(lodash, lodash, options);
  19441. }
  19442. if (typeof _ == 'function' && typeof _.runInContext == 'function') {
  19443. // XXX: Customization in order to be able to run both _ and fp in the
  19444. // non-AMD usecase.
  19445. fp = browserConvert(_.runInContext());
  19446. }
  19447. module.exports = browserConvert;
  19448. /***/ },
  19449. /* 1 */
  19450. /***/ function(module, exports, __webpack_require__) {
  19451. var mapping = __webpack_require__(2),
  19452. fallbackHolder = __webpack_require__(3);
  19453. /** Built-in value reference. */
  19454. var push = Array.prototype.push;
  19455. /**
  19456. * Creates a function, with an arity of `n`, that invokes `func` with the
  19457. * arguments it receives.
  19458. *
  19459. * @private
  19460. * @param {Function} func The function to wrap.
  19461. * @param {number} n The arity of the new function.
  19462. * @returns {Function} Returns the new function.
  19463. */
  19464. function baseArity(func, n) {
  19465. return n == 2
  19466. ? function(a, b) { return func.apply(undefined, arguments); }
  19467. : function(a) { return func.apply(undefined, arguments); };
  19468. }
  19469. /**
  19470. * Creates a function that invokes `func`, with up to `n` arguments, ignoring
  19471. * any additional arguments.
  19472. *
  19473. * @private
  19474. * @param {Function} func The function to cap arguments for.
  19475. * @param {number} n The arity cap.
  19476. * @returns {Function} Returns the new function.
  19477. */
  19478. function baseAry(func, n) {
  19479. return n == 2
  19480. ? function(a, b) { return func(a, b); }
  19481. : function(a) { return func(a); };
  19482. }
  19483. /**
  19484. * Creates a clone of `array`.
  19485. *
  19486. * @private
  19487. * @param {Array} array The array to clone.
  19488. * @returns {Array} Returns the cloned array.
  19489. */
  19490. function cloneArray(array) {
  19491. var length = array ? array.length : 0,
  19492. result = Array(length);
  19493. while (length--) {
  19494. result[length] = array[length];
  19495. }
  19496. return result;
  19497. }
  19498. /**
  19499. * Creates a function that clones a given object using the assignment `func`.
  19500. *
  19501. * @private
  19502. * @param {Function} func The assignment function.
  19503. * @returns {Function} Returns the new cloner function.
  19504. */
  19505. function createCloner(func) {
  19506. return function(object) {
  19507. return func({}, object);
  19508. };
  19509. }
  19510. /**
  19511. * A specialized version of `_.spread` which flattens the spread array into
  19512. * the arguments of the invoked `func`.
  19513. *
  19514. * @private
  19515. * @param {Function} func The function to spread arguments over.
  19516. * @param {number} start The start position of the spread.
  19517. * @returns {Function} Returns the new function.
  19518. */
  19519. function flatSpread(func, start) {
  19520. return function() {
  19521. var length = arguments.length,
  19522. lastIndex = length - 1,
  19523. args = Array(length);
  19524. while (length--) {
  19525. args[length] = arguments[length];
  19526. }
  19527. var array = args[start],
  19528. otherArgs = args.slice(0, start);
  19529. if (array) {
  19530. push.apply(otherArgs, array);
  19531. }
  19532. if (start != lastIndex) {
  19533. push.apply(otherArgs, args.slice(start + 1));
  19534. }
  19535. return func.apply(this, otherArgs);
  19536. };
  19537. }
  19538. /**
  19539. * Creates a function that wraps `func` and uses `cloner` to clone the first
  19540. * argument it receives.
  19541. *
  19542. * @private
  19543. * @param {Function} func The function to wrap.
  19544. * @param {Function} cloner The function to clone arguments.
  19545. * @returns {Function} Returns the new immutable function.
  19546. */
  19547. function wrapImmutable(func, cloner) {
  19548. return function() {
  19549. var length = arguments.length;
  19550. if (!length) {
  19551. return;
  19552. }
  19553. var args = Array(length);
  19554. while (length--) {
  19555. args[length] = arguments[length];
  19556. }
  19557. var result = args[0] = cloner.apply(undefined, args);
  19558. func.apply(undefined, args);
  19559. return result;
  19560. };
  19561. }
  19562. /**
  19563. * The base implementation of `convert` which accepts a `util` object of methods
  19564. * required to perform conversions.
  19565. *
  19566. * @param {Object} util The util object.
  19567. * @param {string} name The name of the function to convert.
  19568. * @param {Function} func The function to convert.
  19569. * @param {Object} [options] The options object.
  19570. * @param {boolean} [options.cap=true] Specify capping iteratee arguments.
  19571. * @param {boolean} [options.curry=true] Specify currying.
  19572. * @param {boolean} [options.fixed=true] Specify fixed arity.
  19573. * @param {boolean} [options.immutable=true] Specify immutable operations.
  19574. * @param {boolean} [options.rearg=true] Specify rearranging arguments.
  19575. * @returns {Function|Object} Returns the converted function or object.
  19576. */
  19577. function baseConvert(util, name, func, options) {
  19578. var setPlaceholder,
  19579. isLib = typeof name == 'function',
  19580. isObj = name === Object(name);
  19581. if (isObj) {
  19582. options = func;
  19583. func = name;
  19584. name = undefined;
  19585. }
  19586. if (func == null) {
  19587. throw new TypeError;
  19588. }
  19589. options || (options = {});
  19590. var config = {
  19591. 'cap': 'cap' in options ? options.cap : true,
  19592. 'curry': 'curry' in options ? options.curry : true,
  19593. 'fixed': 'fixed' in options ? options.fixed : true,
  19594. 'immutable': 'immutable' in options ? options.immutable : true,
  19595. 'rearg': 'rearg' in options ? options.rearg : true
  19596. };
  19597. var forceCurry = ('curry' in options) && options.curry,
  19598. forceFixed = ('fixed' in options) && options.fixed,
  19599. forceRearg = ('rearg' in options) && options.rearg,
  19600. placeholder = isLib ? func : fallbackHolder,
  19601. pristine = isLib ? func.runInContext() : undefined;
  19602. var helpers = isLib ? func : {
  19603. 'ary': util.ary,
  19604. 'assign': util.assign,
  19605. 'clone': util.clone,
  19606. 'curry': util.curry,
  19607. 'forEach': util.forEach,
  19608. 'isArray': util.isArray,
  19609. 'isFunction': util.isFunction,
  19610. 'iteratee': util.iteratee,
  19611. 'keys': util.keys,
  19612. 'rearg': util.rearg,
  19613. 'toInteger': util.toInteger,
  19614. 'toPath': util.toPath
  19615. };
  19616. var ary = helpers.ary,
  19617. assign = helpers.assign,
  19618. clone = helpers.clone,
  19619. curry = helpers.curry,
  19620. each = helpers.forEach,
  19621. isArray = helpers.isArray,
  19622. isFunction = helpers.isFunction,
  19623. keys = helpers.keys,
  19624. rearg = helpers.rearg,
  19625. toInteger = helpers.toInteger,
  19626. toPath = helpers.toPath;
  19627. var aryMethodKeys = keys(mapping.aryMethod);
  19628. var wrappers = {
  19629. 'castArray': function(castArray) {
  19630. return function() {
  19631. var value = arguments[0];
  19632. return isArray(value)
  19633. ? castArray(cloneArray(value))
  19634. : castArray.apply(undefined, arguments);
  19635. };
  19636. },
  19637. 'iteratee': function(iteratee) {
  19638. return function() {
  19639. var func = arguments[0],
  19640. arity = arguments[1],
  19641. result = iteratee(func, arity),
  19642. length = result.length;
  19643. if (config.cap && typeof arity == 'number') {
  19644. arity = arity > 2 ? (arity - 2) : 1;
  19645. return (length && length <= arity) ? result : baseAry(result, arity);
  19646. }
  19647. return result;
  19648. };
  19649. },
  19650. 'mixin': function(mixin) {
  19651. return function(source) {
  19652. var func = this;
  19653. if (!isFunction(func)) {
  19654. return mixin(func, Object(source));
  19655. }
  19656. var pairs = [];
  19657. each(keys(source), function(key) {
  19658. if (isFunction(source[key])) {
  19659. pairs.push([key, func.prototype[key]]);
  19660. }
  19661. });
  19662. mixin(func, Object(source));
  19663. each(pairs, function(pair) {
  19664. var value = pair[1];
  19665. if (isFunction(value)) {
  19666. func.prototype[pair[0]] = value;
  19667. } else {
  19668. delete func.prototype[pair[0]];
  19669. }
  19670. });
  19671. return func;
  19672. };
  19673. },
  19674. 'nthArg': function(nthArg) {
  19675. return function(n) {
  19676. var arity = n < 0 ? 1 : (toInteger(n) + 1);
  19677. return curry(nthArg(n), arity);
  19678. };
  19679. },
  19680. 'rearg': function(rearg) {
  19681. return function(func, indexes) {
  19682. var arity = indexes ? indexes.length : 0;
  19683. return curry(rearg(func, indexes), arity);
  19684. };
  19685. },
  19686. 'runInContext': function(runInContext) {
  19687. return function(context) {
  19688. return baseConvert(util, runInContext(context), options);
  19689. };
  19690. }
  19691. };
  19692. /*--------------------------------------------------------------------------*/
  19693. /**
  19694. * Casts `func` to a function with an arity capped iteratee if needed.
  19695. *
  19696. * @private
  19697. * @param {string} name The name of the function to inspect.
  19698. * @param {Function} func The function to inspect.
  19699. * @returns {Function} Returns the cast function.
  19700. */
  19701. function castCap(name, func) {
  19702. if (config.cap) {
  19703. var indexes = mapping.iterateeRearg[name];
  19704. if (indexes) {
  19705. return iterateeRearg(func, indexes);
  19706. }
  19707. var n = !isLib && mapping.iterateeAry[name];
  19708. if (n) {
  19709. return iterateeAry(func, n);
  19710. }
  19711. }
  19712. return func;
  19713. }
  19714. /**
  19715. * Casts `func` to a curried function if needed.
  19716. *
  19717. * @private
  19718. * @param {string} name The name of the function to inspect.
  19719. * @param {Function} func The function to inspect.
  19720. * @param {number} n The arity of `func`.
  19721. * @returns {Function} Returns the cast function.
  19722. */
  19723. function castCurry(name, func, n) {
  19724. return (forceCurry || (config.curry && n > 1))
  19725. ? curry(func, n)
  19726. : func;
  19727. }
  19728. /**
  19729. * Casts `func` to a fixed arity function if needed.
  19730. *
  19731. * @private
  19732. * @param {string} name The name of the function to inspect.
  19733. * @param {Function} func The function to inspect.
  19734. * @param {number} n The arity cap.
  19735. * @returns {Function} Returns the cast function.
  19736. */
  19737. function castFixed(name, func, n) {
  19738. if (config.fixed && (forceFixed || !mapping.skipFixed[name])) {
  19739. var data = mapping.methodSpread[name],
  19740. start = data && data.start;
  19741. return start === undefined ? ary(func, n) : flatSpread(func, start);
  19742. }
  19743. return func;
  19744. }
  19745. /**
  19746. * Casts `func` to an rearged function if needed.
  19747. *
  19748. * @private
  19749. * @param {string} name The name of the function to inspect.
  19750. * @param {Function} func The function to inspect.
  19751. * @param {number} n The arity of `func`.
  19752. * @returns {Function} Returns the cast function.
  19753. */
  19754. function castRearg(name, func, n) {
  19755. return (config.rearg && n > 1 && (forceRearg || !mapping.skipRearg[name]))
  19756. ? rearg(func, mapping.methodRearg[name] || mapping.aryRearg[n])
  19757. : func;
  19758. }
  19759. /**
  19760. * Creates a clone of `object` by `path`.
  19761. *
  19762. * @private
  19763. * @param {Object} object The object to clone.
  19764. * @param {Array|string} path The path to clone by.
  19765. * @returns {Object} Returns the cloned object.
  19766. */
  19767. function cloneByPath(object, path) {
  19768. path = toPath(path);
  19769. var index = -1,
  19770. length = path.length,
  19771. lastIndex = length - 1,
  19772. result = clone(Object(object)),
  19773. nested = result;
  19774. while (nested != null && ++index < length) {
  19775. var key = path[index],
  19776. value = nested[key];
  19777. if (value != null) {
  19778. nested[path[index]] = clone(index == lastIndex ? value : Object(value));
  19779. }
  19780. nested = nested[key];
  19781. }
  19782. return result;
  19783. }
  19784. /**
  19785. * Converts `lodash` to an immutable auto-curried iteratee-first data-last
  19786. * version with conversion `options` applied.
  19787. *
  19788. * @param {Object} [options] The options object. See `baseConvert` for more details.
  19789. * @returns {Function} Returns the converted `lodash`.
  19790. */
  19791. function convertLib(options) {
  19792. return _.runInContext.convert(options)(undefined);
  19793. }
  19794. /**
  19795. * Create a converter function for `func` of `name`.
  19796. *
  19797. * @param {string} name The name of the function to convert.
  19798. * @param {Function} func The function to convert.
  19799. * @returns {Function} Returns the new converter function.
  19800. */
  19801. function createConverter(name, func) {
  19802. var realName = mapping.aliasToReal[name] || name,
  19803. methodName = mapping.remap[realName] || realName,
  19804. oldOptions = options;
  19805. return function(options) {
  19806. var newUtil = isLib ? pristine : helpers,
  19807. newFunc = isLib ? pristine[methodName] : func,
  19808. newOptions = assign(assign({}, oldOptions), options);
  19809. return baseConvert(newUtil, realName, newFunc, newOptions);
  19810. };
  19811. }
  19812. /**
  19813. * Creates a function that wraps `func` to invoke its iteratee, with up to `n`
  19814. * arguments, ignoring any additional arguments.
  19815. *
  19816. * @private
  19817. * @param {Function} func The function to cap iteratee arguments for.
  19818. * @param {number} n The arity cap.
  19819. * @returns {Function} Returns the new function.
  19820. */
  19821. function iterateeAry(func, n) {
  19822. return overArg(func, function(func) {
  19823. return typeof func == 'function' ? baseAry(func, n) : func;
  19824. });
  19825. }
  19826. /**
  19827. * Creates a function that wraps `func` to invoke its iteratee with arguments
  19828. * arranged according to the specified `indexes` where the argument value at
  19829. * the first index is provided as the first argument, the argument value at
  19830. * the second index is provided as the second argument, and so on.
  19831. *
  19832. * @private
  19833. * @param {Function} func The function to rearrange iteratee arguments for.
  19834. * @param {number[]} indexes The arranged argument indexes.
  19835. * @returns {Function} Returns the new function.
  19836. */
  19837. function iterateeRearg(func, indexes) {
  19838. return overArg(func, function(func) {
  19839. var n = indexes.length;
  19840. return baseArity(rearg(baseAry(func, n), indexes), n);
  19841. });
  19842. }
  19843. /**
  19844. * Creates a function that invokes `func` with its first argument transformed.
  19845. *
  19846. * @private
  19847. * @param {Function} func The function to wrap.
  19848. * @param {Function} transform The argument transform.
  19849. * @returns {Function} Returns the new function.
  19850. */
  19851. function overArg(func, transform) {
  19852. return function() {
  19853. var length = arguments.length;
  19854. if (!length) {
  19855. return func();
  19856. }
  19857. var args = Array(length);
  19858. while (length--) {
  19859. args[length] = arguments[length];
  19860. }
  19861. var index = config.rearg ? 0 : (length - 1);
  19862. args[index] = transform(args[index]);
  19863. return func.apply(undefined, args);
  19864. };
  19865. }
  19866. /**
  19867. * Creates a function that wraps `func` and applys the conversions
  19868. * rules by `name`.
  19869. *
  19870. * @private
  19871. * @param {string} name The name of the function to wrap.
  19872. * @param {Function} func The function to wrap.
  19873. * @returns {Function} Returns the converted function.
  19874. */
  19875. function wrap(name, func) {
  19876. var result,
  19877. realName = mapping.aliasToReal[name] || name,
  19878. wrapped = func,
  19879. wrapper = wrappers[realName];
  19880. if (wrapper) {
  19881. wrapped = wrapper(func);
  19882. }
  19883. else if (config.immutable) {
  19884. if (mapping.mutate.array[realName]) {
  19885. wrapped = wrapImmutable(func, cloneArray);
  19886. }
  19887. else if (mapping.mutate.object[realName]) {
  19888. wrapped = wrapImmutable(func, createCloner(func));
  19889. }
  19890. else if (mapping.mutate.set[realName]) {
  19891. wrapped = wrapImmutable(func, cloneByPath);
  19892. }
  19893. }
  19894. each(aryMethodKeys, function(aryKey) {
  19895. each(mapping.aryMethod[aryKey], function(otherName) {
  19896. if (realName == otherName) {
  19897. var data = mapping.methodSpread[realName],
  19898. afterRearg = data && data.afterRearg;
  19899. result = afterRearg
  19900. ? castFixed(realName, castRearg(realName, wrapped, aryKey), aryKey)
  19901. : castRearg(realName, castFixed(realName, wrapped, aryKey), aryKey);
  19902. result = castCap(realName, result);
  19903. result = castCurry(realName, result, aryKey);
  19904. return false;
  19905. }
  19906. });
  19907. return !result;
  19908. });
  19909. result || (result = wrapped);
  19910. if (result == func) {
  19911. result = forceCurry ? curry(result, 1) : function() {
  19912. return func.apply(this, arguments);
  19913. };
  19914. }
  19915. result.convert = createConverter(realName, func);
  19916. if (mapping.placeholder[realName]) {
  19917. setPlaceholder = true;
  19918. result.placeholder = func.placeholder = placeholder;
  19919. }
  19920. return result;
  19921. }
  19922. /*--------------------------------------------------------------------------*/
  19923. if (!isObj) {
  19924. return wrap(name, func);
  19925. }
  19926. var _ = func;
  19927. // Convert methods by ary cap.
  19928. var pairs = [];
  19929. each(aryMethodKeys, function(aryKey) {
  19930. each(mapping.aryMethod[aryKey], function(key) {
  19931. var func = _[mapping.remap[key] || key];
  19932. if (func) {
  19933. pairs.push([key, wrap(key, func)]);
  19934. }
  19935. });
  19936. });
  19937. // Convert remaining methods.
  19938. each(keys(_), function(key) {
  19939. var func = _[key];
  19940. if (typeof func == 'function') {
  19941. var length = pairs.length;
  19942. while (length--) {
  19943. if (pairs[length][0] == key) {
  19944. return;
  19945. }
  19946. }
  19947. func.convert = createConverter(key, func);
  19948. pairs.push([key, func]);
  19949. }
  19950. });
  19951. // Assign to `_` leaving `_.prototype` unchanged to allow chaining.
  19952. each(pairs, function(pair) {
  19953. _[pair[0]] = pair[1];
  19954. });
  19955. _.convert = convertLib;
  19956. if (setPlaceholder) {
  19957. _.placeholder = placeholder;
  19958. }
  19959. // Assign aliases.
  19960. each(keys(_), function(key) {
  19961. each(mapping.realToAlias[key] || [], function(alias) {
  19962. _[alias] = _[key];
  19963. });
  19964. });
  19965. return _;
  19966. }
  19967. module.exports = baseConvert;
  19968. /***/ },
  19969. /* 2 */
  19970. /***/ function(module, exports) {
  19971. /** Used to map aliases to their real names. */
  19972. exports.aliasToReal = {
  19973. // Lodash aliases.
  19974. 'each': 'forEach',
  19975. 'eachRight': 'forEachRight',
  19976. 'entries': 'toPairs',
  19977. 'entriesIn': 'toPairsIn',
  19978. 'extend': 'assignIn',
  19979. 'extendAll': 'assignInAll',
  19980. 'extendAllWith': 'assignInAllWith',
  19981. 'extendWith': 'assignInWith',
  19982. 'first': 'head',
  19983. // Methods that are curried variants of others.
  19984. 'conforms': 'conformsTo',
  19985. 'matches': 'isMatch',
  19986. 'property': 'get',
  19987. // Ramda aliases.
  19988. '__': 'placeholder',
  19989. 'F': 'stubFalse',
  19990. 'T': 'stubTrue',
  19991. 'all': 'every',
  19992. 'allPass': 'overEvery',
  19993. 'always': 'constant',
  19994. 'any': 'some',
  19995. 'anyPass': 'overSome',
  19996. 'apply': 'spread',
  19997. 'assoc': 'set',
  19998. 'assocPath': 'set',
  19999. 'complement': 'negate',
  20000. 'compose': 'flowRight',
  20001. 'contains': 'includes',
  20002. 'dissoc': 'unset',
  20003. 'dissocPath': 'unset',
  20004. 'dropLast': 'dropRight',
  20005. 'dropLastWhile': 'dropRightWhile',
  20006. 'equals': 'isEqual',
  20007. 'identical': 'eq',
  20008. 'indexBy': 'keyBy',
  20009. 'init': 'initial',
  20010. 'invertObj': 'invert',
  20011. 'juxt': 'over',
  20012. 'omitAll': 'omit',
  20013. 'nAry': 'ary',
  20014. 'path': 'get',
  20015. 'pathEq': 'matchesProperty',
  20016. 'pathOr': 'getOr',
  20017. 'paths': 'at',
  20018. 'pickAll': 'pick',
  20019. 'pipe': 'flow',
  20020. 'pluck': 'map',
  20021. 'prop': 'get',
  20022. 'propEq': 'matchesProperty',
  20023. 'propOr': 'getOr',
  20024. 'props': 'at',
  20025. 'symmetricDifference': 'xor',
  20026. 'symmetricDifferenceBy': 'xorBy',
  20027. 'symmetricDifferenceWith': 'xorWith',
  20028. 'takeLast': 'takeRight',
  20029. 'takeLastWhile': 'takeRightWhile',
  20030. 'unapply': 'rest',
  20031. 'unnest': 'flatten',
  20032. 'useWith': 'overArgs',
  20033. 'where': 'conformsTo',
  20034. 'whereEq': 'isMatch',
  20035. 'zipObj': 'zipObject'
  20036. };
  20037. /** Used to map ary to method names. */
  20038. exports.aryMethod = {
  20039. '1': [
  20040. 'assignAll', 'assignInAll', 'attempt', 'castArray', 'ceil', 'create',
  20041. 'curry', 'curryRight', 'defaultsAll', 'defaultsDeepAll', 'floor', 'flow',
  20042. 'flowRight', 'fromPairs', 'invert', 'iteratee', 'memoize', 'method', 'mergeAll',
  20043. 'methodOf', 'mixin', 'nthArg', 'over', 'overEvery', 'overSome','rest', 'reverse',
  20044. 'round', 'runInContext', 'spread', 'template', 'trim', 'trimEnd', 'trimStart',
  20045. 'uniqueId', 'words', 'zipAll'
  20046. ],
  20047. '2': [
  20048. 'add', 'after', 'ary', 'assign', 'assignAllWith', 'assignIn', 'assignInAllWith',
  20049. 'at', 'before', 'bind', 'bindAll', 'bindKey', 'chunk', 'cloneDeepWith',
  20050. 'cloneWith', 'concat', 'conformsTo', 'countBy', 'curryN', 'curryRightN',
  20051. 'debounce', 'defaults', 'defaultsDeep', 'defaultTo', 'delay', 'difference',
  20052. 'divide', 'drop', 'dropRight', 'dropRightWhile', 'dropWhile', 'endsWith', 'eq',
  20053. 'every', 'filter', 'find', 'findIndex', 'findKey', 'findLast', 'findLastIndex',
  20054. 'findLastKey', 'flatMap', 'flatMapDeep', 'flattenDepth', 'forEach',
  20055. 'forEachRight', 'forIn', 'forInRight', 'forOwn', 'forOwnRight', 'get',
  20056. 'groupBy', 'gt', 'gte', 'has', 'hasIn', 'includes', 'indexOf', 'intersection',
  20057. 'invertBy', 'invoke', 'invokeMap', 'isEqual', 'isMatch', 'join', 'keyBy',
  20058. 'lastIndexOf', 'lt', 'lte', 'map', 'mapKeys', 'mapValues', 'matchesProperty',
  20059. 'maxBy', 'meanBy', 'merge', 'mergeAllWith', 'minBy', 'multiply', 'nth', 'omit',
  20060. 'omitBy', 'overArgs', 'pad', 'padEnd', 'padStart', 'parseInt', 'partial',
  20061. 'partialRight', 'partition', 'pick', 'pickBy', 'propertyOf', 'pull', 'pullAll',
  20062. 'pullAt', 'random', 'range', 'rangeRight', 'rearg', 'reject', 'remove',
  20063. 'repeat', 'restFrom', 'result', 'sampleSize', 'some', 'sortBy', 'sortedIndex',
  20064. 'sortedIndexOf', 'sortedLastIndex', 'sortedLastIndexOf', 'sortedUniqBy',
  20065. 'split', 'spreadFrom', 'startsWith', 'subtract', 'sumBy', 'take', 'takeRight',
  20066. 'takeRightWhile', 'takeWhile', 'tap', 'throttle', 'thru', 'times', 'trimChars',
  20067. 'trimCharsEnd', 'trimCharsStart', 'truncate', 'union', 'uniqBy', 'uniqWith',
  20068. 'unset', 'unzipWith', 'without', 'wrap', 'xor', 'zip', 'zipObject',
  20069. 'zipObjectDeep'
  20070. ],
  20071. '3': [
  20072. 'assignInWith', 'assignWith', 'clamp', 'differenceBy', 'differenceWith',
  20073. 'findFrom', 'findIndexFrom', 'findLastFrom', 'findLastIndexFrom', 'getOr',
  20074. 'includesFrom', 'indexOfFrom', 'inRange', 'intersectionBy', 'intersectionWith',
  20075. 'invokeArgs', 'invokeArgsMap', 'isEqualWith', 'isMatchWith', 'flatMapDepth',
  20076. 'lastIndexOfFrom', 'mergeWith', 'orderBy', 'padChars', 'padCharsEnd',
  20077. 'padCharsStart', 'pullAllBy', 'pullAllWith', 'rangeStep', 'rangeStepRight',
  20078. 'reduce', 'reduceRight', 'replace', 'set', 'slice', 'sortedIndexBy',
  20079. 'sortedLastIndexBy', 'transform', 'unionBy', 'unionWith', 'update', 'xorBy',
  20080. 'xorWith', 'zipWith'
  20081. ],
  20082. '4': [
  20083. 'fill', 'setWith', 'updateWith'
  20084. ]
  20085. };
  20086. /** Used to map ary to rearg configs. */
  20087. exports.aryRearg = {
  20088. '2': [1, 0],
  20089. '3': [2, 0, 1],
  20090. '4': [3, 2, 0, 1]
  20091. };
  20092. /** Used to map method names to their iteratee ary. */
  20093. exports.iterateeAry = {
  20094. 'dropRightWhile': 1,
  20095. 'dropWhile': 1,
  20096. 'every': 1,
  20097. 'filter': 1,
  20098. 'find': 1,
  20099. 'findFrom': 1,
  20100. 'findIndex': 1,
  20101. 'findIndexFrom': 1,
  20102. 'findKey': 1,
  20103. 'findLast': 1,
  20104. 'findLastFrom': 1,
  20105. 'findLastIndex': 1,
  20106. 'findLastIndexFrom': 1,
  20107. 'findLastKey': 1,
  20108. 'flatMap': 1,
  20109. 'flatMapDeep': 1,
  20110. 'flatMapDepth': 1,
  20111. 'forEach': 1,
  20112. 'forEachRight': 1,
  20113. 'forIn': 1,
  20114. 'forInRight': 1,
  20115. 'forOwn': 1,
  20116. 'forOwnRight': 1,
  20117. 'map': 1,
  20118. 'mapKeys': 1,
  20119. 'mapValues': 1,
  20120. 'partition': 1,
  20121. 'reduce': 2,
  20122. 'reduceRight': 2,
  20123. 'reject': 1,
  20124. 'remove': 1,
  20125. 'some': 1,
  20126. 'takeRightWhile': 1,
  20127. 'takeWhile': 1,
  20128. 'times': 1,
  20129. 'transform': 2
  20130. };
  20131. /** Used to map method names to iteratee rearg configs. */
  20132. exports.iterateeRearg = {
  20133. 'mapKeys': [1],
  20134. 'reduceRight': [1, 0]
  20135. };
  20136. /** Used to map method names to rearg configs. */
  20137. exports.methodRearg = {
  20138. 'assignInAllWith': [1, 0],
  20139. 'assignInWith': [1, 2, 0],
  20140. 'assignAllWith': [1, 0],
  20141. 'assignWith': [1, 2, 0],
  20142. 'differenceBy': [1, 2, 0],
  20143. 'differenceWith': [1, 2, 0],
  20144. 'getOr': [2, 1, 0],
  20145. 'intersectionBy': [1, 2, 0],
  20146. 'intersectionWith': [1, 2, 0],
  20147. 'isEqualWith': [1, 2, 0],
  20148. 'isMatchWith': [2, 1, 0],
  20149. 'mergeAllWith': [1, 0],
  20150. 'mergeWith': [1, 2, 0],
  20151. 'padChars': [2, 1, 0],
  20152. 'padCharsEnd': [2, 1, 0],
  20153. 'padCharsStart': [2, 1, 0],
  20154. 'pullAllBy': [2, 1, 0],
  20155. 'pullAllWith': [2, 1, 0],
  20156. 'rangeStep': [1, 2, 0],
  20157. 'rangeStepRight': [1, 2, 0],
  20158. 'setWith': [3, 1, 2, 0],
  20159. 'sortedIndexBy': [2, 1, 0],
  20160. 'sortedLastIndexBy': [2, 1, 0],
  20161. 'unionBy': [1, 2, 0],
  20162. 'unionWith': [1, 2, 0],
  20163. 'updateWith': [3, 1, 2, 0],
  20164. 'xorBy': [1, 2, 0],
  20165. 'xorWith': [1, 2, 0],
  20166. 'zipWith': [1, 2, 0]
  20167. };
  20168. /** Used to map method names to spread configs. */
  20169. exports.methodSpread = {
  20170. 'assignAll': { 'start': 0 },
  20171. 'assignAllWith': { 'start': 0 },
  20172. 'assignInAll': { 'start': 0 },
  20173. 'assignInAllWith': { 'start': 0 },
  20174. 'defaultsAll': { 'start': 0 },
  20175. 'defaultsDeepAll': { 'start': 0 },
  20176. 'invokeArgs': { 'start': 2 },
  20177. 'invokeArgsMap': { 'start': 2 },
  20178. 'mergeAll': { 'start': 0 },
  20179. 'mergeAllWith': { 'start': 0 },
  20180. 'partial': { 'start': 1 },
  20181. 'partialRight': { 'start': 1 },
  20182. 'without': { 'start': 1 },
  20183. 'zipAll': { 'start': 0 }
  20184. };
  20185. /** Used to identify methods which mutate arrays or objects. */
  20186. exports.mutate = {
  20187. 'array': {
  20188. 'fill': true,
  20189. 'pull': true,
  20190. 'pullAll': true,
  20191. 'pullAllBy': true,
  20192. 'pullAllWith': true,
  20193. 'pullAt': true,
  20194. 'remove': true,
  20195. 'reverse': true
  20196. },
  20197. 'object': {
  20198. 'assign': true,
  20199. 'assignAll': true,
  20200. 'assignAllWith': true,
  20201. 'assignIn': true,
  20202. 'assignInAll': true,
  20203. 'assignInAllWith': true,
  20204. 'assignInWith': true,
  20205. 'assignWith': true,
  20206. 'defaults': true,
  20207. 'defaultsAll': true,
  20208. 'defaultsDeep': true,
  20209. 'defaultsDeepAll': true,
  20210. 'merge': true,
  20211. 'mergeAll': true,
  20212. 'mergeAllWith': true,
  20213. 'mergeWith': true,
  20214. },
  20215. 'set': {
  20216. 'set': true,
  20217. 'setWith': true,
  20218. 'unset': true,
  20219. 'update': true,
  20220. 'updateWith': true
  20221. }
  20222. };
  20223. /** Used to track methods with placeholder support */
  20224. exports.placeholder = {
  20225. 'bind': true,
  20226. 'bindKey': true,
  20227. 'curry': true,
  20228. 'curryRight': true,
  20229. 'partial': true,
  20230. 'partialRight': true
  20231. };
  20232. /** Used to map real names to their aliases. */
  20233. exports.realToAlias = (function() {
  20234. var hasOwnProperty = Object.prototype.hasOwnProperty,
  20235. object = exports.aliasToReal,
  20236. result = {};
  20237. for (var key in object) {
  20238. var value = object[key];
  20239. if (hasOwnProperty.call(result, value)) {
  20240. result[value].push(key);
  20241. } else {
  20242. result[value] = [key];
  20243. }
  20244. }
  20245. return result;
  20246. }());
  20247. /** Used to map method names to other names. */
  20248. exports.remap = {
  20249. 'assignAll': 'assign',
  20250. 'assignAllWith': 'assignWith',
  20251. 'assignInAll': 'assignIn',
  20252. 'assignInAllWith': 'assignInWith',
  20253. 'curryN': 'curry',
  20254. 'curryRightN': 'curryRight',
  20255. 'defaultsAll': 'defaults',
  20256. 'defaultsDeepAll': 'defaultsDeep',
  20257. 'findFrom': 'find',
  20258. 'findIndexFrom': 'findIndex',
  20259. 'findLastFrom': 'findLast',
  20260. 'findLastIndexFrom': 'findLastIndex',
  20261. 'getOr': 'get',
  20262. 'includesFrom': 'includes',
  20263. 'indexOfFrom': 'indexOf',
  20264. 'invokeArgs': 'invoke',
  20265. 'invokeArgsMap': 'invokeMap',
  20266. 'lastIndexOfFrom': 'lastIndexOf',
  20267. 'mergeAll': 'merge',
  20268. 'mergeAllWith': 'mergeWith',
  20269. 'padChars': 'pad',
  20270. 'padCharsEnd': 'padEnd',
  20271. 'padCharsStart': 'padStart',
  20272. 'propertyOf': 'get',
  20273. 'rangeStep': 'range',
  20274. 'rangeStepRight': 'rangeRight',
  20275. 'restFrom': 'rest',
  20276. 'spreadFrom': 'spread',
  20277. 'trimChars': 'trim',
  20278. 'trimCharsEnd': 'trimEnd',
  20279. 'trimCharsStart': 'trimStart',
  20280. 'zipAll': 'zip'
  20281. };
  20282. /** Used to track methods that skip fixing their arity. */
  20283. exports.skipFixed = {
  20284. 'castArray': true,
  20285. 'flow': true,
  20286. 'flowRight': true,
  20287. 'iteratee': true,
  20288. 'mixin': true,
  20289. 'rearg': true,
  20290. 'runInContext': true
  20291. };
  20292. /** Used to track methods that skip rearranging arguments. */
  20293. exports.skipRearg = {
  20294. 'add': true,
  20295. 'assign': true,
  20296. 'assignIn': true,
  20297. 'bind': true,
  20298. 'bindKey': true,
  20299. 'concat': true,
  20300. 'difference': true,
  20301. 'divide': true,
  20302. 'eq': true,
  20303. 'gt': true,
  20304. 'gte': true,
  20305. 'isEqual': true,
  20306. 'lt': true,
  20307. 'lte': true,
  20308. 'matchesProperty': true,
  20309. 'merge': true,
  20310. 'multiply': true,
  20311. 'overArgs': true,
  20312. 'partial': true,
  20313. 'partialRight': true,
  20314. 'propertyOf': true,
  20315. 'random': true,
  20316. 'range': true,
  20317. 'rangeRight': true,
  20318. 'subtract': true,
  20319. 'zip': true,
  20320. 'zipObject': true,
  20321. 'zipObjectDeep': true
  20322. };
  20323. /***/ },
  20324. /* 3 */
  20325. /***/ function(module, exports) {
  20326. /**
  20327. * The default argument placeholder value for methods.
  20328. *
  20329. * @type {Object}
  20330. */
  20331. module.exports = {};
  20332. /***/ }
  20333. /******/ ])
  20334. });
  20335. ;
  20336. define('lodash.fp',['lodash', 'lodash.converter'], function (_, lodashConverter) {
  20337. var fp = lodashConverter(_.runInContext());
  20338. return fp;
  20339. });
  20340. function CustomEvent ( event, params ) {
  20341. params = params || { bubbles: false, cancelable: false, detail: undefined };
  20342. var evt = document.createEvent( 'CustomEvent' );
  20343. evt.initCustomEvent( event, params.bubbles, params.cancelable, params.detail );
  20344. return evt;
  20345. }
  20346. if ( typeof window.CustomEvent !== "function" ) {
  20347. CustomEvent.prototype = window.Event.prototype;
  20348. window.CustomEvent = CustomEvent;
  20349. }
  20350. if (!String.prototype.includes) {
  20351. String.prototype.includes = function(search, start) {
  20352. 'use strict';
  20353. if (typeof start !== 'number') {
  20354. start = 0;
  20355. }
  20356. if (start + search.length > this.length) {
  20357. return false;
  20358. } else {
  20359. return this.indexOf(search, start) !== -1; // eslint-disable-line lodash/prefer-includes
  20360. }
  20361. };
  20362. }
  20363. if (!String.prototype.endsWith) {
  20364. String.prototype.endsWith = function (searchString, position) {
  20365. var subjectString = this.toString();
  20366. if (position === undefined || position > subjectString.length) {
  20367. position = subjectString.length;
  20368. }
  20369. position -= searchString.length;
  20370. var lastIndex = subjectString.indexOf(searchString, position);
  20371. return lastIndex !== -1 && lastIndex === position;
  20372. };
  20373. }
  20374. if (!String.prototype.startsWith) {
  20375. String.prototype.startsWith = function (searchString, position) {
  20376. position = position || 0;
  20377. return this.substr(position, searchString.length) === searchString;
  20378. };
  20379. }
  20380. if (!String.prototype.splitOnce) {
  20381. String.prototype.splitOnce = function (delimiter) {
  20382. var components = this.split(delimiter);
  20383. return [components.shift(), components.join(delimiter)];
  20384. };
  20385. }
  20386. if (!String.prototype.trim) {
  20387. String.prototype.trim = function () {
  20388. return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
  20389. };
  20390. }
  20391. ;
  20392. define("polyfill", function(){});
  20393. /**
  20394. * @preserve jed.js https://github.com/SlexAxton/Jed
  20395. */
  20396. /*
  20397. -----------
  20398. A gettext compatible i18n library for modern JavaScript Applications
  20399. by Alex Sexton - AlexSexton [at] gmail - @SlexAxton
  20400. MIT License
  20401. A jQuery Foundation project - requires CLA to contribute -
  20402. https://contribute.jquery.org/CLA/
  20403. Jed offers the entire applicable GNU gettext spec'd set of
  20404. functions, but also offers some nicer wrappers around them.
  20405. The api for gettext was written for a language with no function
  20406. overloading, so Jed allows a little more of that.
  20407. Many thanks to Joshua I. Miller - unrtst@cpan.org - who wrote
  20408. gettext.js back in 2008. I was able to vet a lot of my ideas
  20409. against his. I also made sure Jed passed against his tests
  20410. in order to offer easy upgrades -- jsgettext.berlios.de
  20411. */
  20412. (function (root, undef) {
  20413. // Set up some underscore-style functions, if you already have
  20414. // underscore, feel free to delete this section, and use it
  20415. // directly, however, the amount of functions used doesn't
  20416. // warrant having underscore as a full dependency.
  20417. // Underscore 1.3.0 was used to port and is licensed
  20418. // under the MIT License by Jeremy Ashkenas.
  20419. var ArrayProto = Array.prototype,
  20420. ObjProto = Object.prototype,
  20421. slice = ArrayProto.slice,
  20422. hasOwnProp = ObjProto.hasOwnProperty,
  20423. nativeForEach = ArrayProto.forEach,
  20424. breaker = {};
  20425. // We're not using the OOP style _ so we don't need the
  20426. // extra level of indirection. This still means that you
  20427. // sub out for real `_` though.
  20428. var _ = {
  20429. forEach : function( obj, iterator, context ) {
  20430. var i, l, key;
  20431. if ( obj === null ) {
  20432. return;
  20433. }
  20434. if ( nativeForEach && obj.forEach === nativeForEach ) {
  20435. obj.forEach( iterator, context );
  20436. }
  20437. else if ( obj.length === +obj.length ) {
  20438. for ( i = 0, l = obj.length; i < l; i++ ) {
  20439. if ( i in obj && iterator.call( context, obj[i], i, obj ) === breaker ) {
  20440. return;
  20441. }
  20442. }
  20443. }
  20444. else {
  20445. for ( key in obj) {
  20446. if ( hasOwnProp.call( obj, key ) ) {
  20447. if ( iterator.call (context, obj[key], key, obj ) === breaker ) {
  20448. return;
  20449. }
  20450. }
  20451. }
  20452. }
  20453. },
  20454. extend : function( obj ) {
  20455. this.forEach( slice.call( arguments, 1 ), function ( source ) {
  20456. for ( var prop in source ) {
  20457. obj[prop] = source[prop];
  20458. }
  20459. });
  20460. return obj;
  20461. }
  20462. };
  20463. // END Miniature underscore impl
  20464. // Jed is a constructor function
  20465. var Jed = function ( options ) {
  20466. // Some minimal defaults
  20467. this.defaults = {
  20468. "locale_data" : {
  20469. "messages" : {
  20470. "" : {
  20471. "domain" : "messages",
  20472. "lang" : "en",
  20473. "plural_forms" : "nplurals=2; plural=(n != 1);"
  20474. }
  20475. // There are no default keys, though
  20476. }
  20477. },
  20478. // The default domain if one is missing
  20479. "domain" : "messages",
  20480. // enable debug mode to log untranslated strings to the console
  20481. "debug" : false
  20482. };
  20483. // Mix in the sent options with the default options
  20484. this.options = _.extend( {}, this.defaults, options );
  20485. this.textdomain( this.options.domain );
  20486. if ( options.domain && ! this.options.locale_data[ this.options.domain ] ) {
  20487. throw new Error('Text domain set to non-existent domain: `' + options.domain + '`');
  20488. }
  20489. };
  20490. // The gettext spec sets this character as the default
  20491. // delimiter for context lookups.
  20492. // e.g.: context\u0004key
  20493. // If your translation company uses something different,
  20494. // just change this at any time and it will use that instead.
  20495. Jed.context_delimiter = String.fromCharCode( 4 );
  20496. function getPluralFormFunc ( plural_form_string ) {
  20497. return Jed.PF.compile( plural_form_string || "nplurals=2; plural=(n != 1);");
  20498. }
  20499. function Chain( key, i18n ){
  20500. this._key = key;
  20501. this._i18n = i18n;
  20502. }
  20503. // Create a chainable api for adding args prettily
  20504. _.extend( Chain.prototype, {
  20505. onDomain : function ( domain ) {
  20506. this._domain = domain;
  20507. return this;
  20508. },
  20509. withContext : function ( context ) {
  20510. this._context = context;
  20511. return this;
  20512. },
  20513. ifPlural : function ( num, pkey ) {
  20514. this._val = num;
  20515. this._pkey = pkey;
  20516. return this;
  20517. },
  20518. fetch : function ( sArr ) {
  20519. if ( {}.toString.call( sArr ) != '[object Array]' ) {
  20520. sArr = [].slice.call(arguments, 0);
  20521. }
  20522. return ( sArr && sArr.length ? Jed.sprintf : function(x){ return x; } )(
  20523. this._i18n.dcnpgettext(this._domain, this._context, this._key, this._pkey, this._val),
  20524. sArr
  20525. );
  20526. }
  20527. });
  20528. // Add functions to the Jed prototype.
  20529. // These will be the functions on the object that's returned
  20530. // from creating a `new Jed()`
  20531. // These seem redundant, but they gzip pretty well.
  20532. _.extend( Jed.prototype, {
  20533. // The sexier api start point
  20534. translate : function ( key ) {
  20535. return new Chain( key, this );
  20536. },
  20537. textdomain : function ( domain ) {
  20538. if ( ! domain ) {
  20539. return this._textdomain;
  20540. }
  20541. this._textdomain = domain;
  20542. },
  20543. gettext : function ( key ) {
  20544. return this.dcnpgettext.call( this, undef, undef, key );
  20545. },
  20546. dgettext : function ( domain, key ) {
  20547. return this.dcnpgettext.call( this, domain, undef, key );
  20548. },
  20549. dcgettext : function ( domain , key /*, category */ ) {
  20550. // Ignores the category anyways
  20551. return this.dcnpgettext.call( this, domain, undef, key );
  20552. },
  20553. ngettext : function ( skey, pkey, val ) {
  20554. return this.dcnpgettext.call( this, undef, undef, skey, pkey, val );
  20555. },
  20556. dngettext : function ( domain, skey, pkey, val ) {
  20557. return this.dcnpgettext.call( this, domain, undef, skey, pkey, val );
  20558. },
  20559. dcngettext : function ( domain, skey, pkey, val/*, category */) {
  20560. return this.dcnpgettext.call( this, domain, undef, skey, pkey, val );
  20561. },
  20562. pgettext : function ( context, key ) {
  20563. return this.dcnpgettext.call( this, undef, context, key );
  20564. },
  20565. dpgettext : function ( domain, context, key ) {
  20566. return this.dcnpgettext.call( this, domain, context, key );
  20567. },
  20568. dcpgettext : function ( domain, context, key/*, category */) {
  20569. return this.dcnpgettext.call( this, domain, context, key );
  20570. },
  20571. npgettext : function ( context, skey, pkey, val ) {
  20572. return this.dcnpgettext.call( this, undef, context, skey, pkey, val );
  20573. },
  20574. dnpgettext : function ( domain, context, skey, pkey, val ) {
  20575. return this.dcnpgettext.call( this, domain, context, skey, pkey, val );
  20576. },
  20577. // The most fully qualified gettext function. It has every option.
  20578. // Since it has every option, we can use it from every other method.
  20579. // This is the bread and butter.
  20580. // Technically there should be one more argument in this function for 'Category',
  20581. // but since we never use it, we might as well not waste the bytes to define it.
  20582. dcnpgettext : function ( domain, context, singular_key, plural_key, val ) {
  20583. // Set some defaults
  20584. plural_key = plural_key || singular_key;
  20585. // Use the global domain default if one
  20586. // isn't explicitly passed in
  20587. domain = domain || this._textdomain;
  20588. var fallback;
  20589. // Handle special cases
  20590. // No options found
  20591. if ( ! this.options ) {
  20592. // There's likely something wrong, but we'll return the correct key for english
  20593. // We do this by instantiating a brand new Jed instance with the default set
  20594. // for everything that could be broken.
  20595. fallback = new Jed();
  20596. return fallback.dcnpgettext.call( fallback, undefined, undefined, singular_key, plural_key, val );
  20597. }
  20598. // No translation data provided
  20599. if ( ! this.options.locale_data ) {
  20600. throw new Error('No locale data provided.');
  20601. }
  20602. if ( ! this.options.locale_data[ domain ] ) {
  20603. throw new Error('Domain `' + domain + '` was not found.');
  20604. }
  20605. if ( ! this.options.locale_data[ domain ][ "" ] ) {
  20606. throw new Error('No locale meta information provided.');
  20607. }
  20608. // Make sure we have a truthy key. Otherwise we might start looking
  20609. // into the empty string key, which is the options for the locale
  20610. // data.
  20611. if ( ! singular_key ) {
  20612. throw new Error('No translation key found.');
  20613. }
  20614. var key = context ? context + Jed.context_delimiter + singular_key : singular_key,
  20615. locale_data = this.options.locale_data,
  20616. dict = locale_data[ domain ],
  20617. defaultConf = (locale_data.messages || this.defaults.locale_data.messages)[""],
  20618. pluralForms = dict[""].plural_forms || dict[""]["Plural-Forms"] || dict[""]["plural-forms"] || defaultConf.plural_forms || defaultConf["Plural-Forms"] || defaultConf["plural-forms"],
  20619. val_list,
  20620. res;
  20621. var val_idx;
  20622. if (val === undefined) {
  20623. // No value passed in; assume singular key lookup.
  20624. val_idx = 0;
  20625. } else {
  20626. // Value has been passed in; use plural-forms calculations.
  20627. // Handle invalid numbers, but try casting strings for good measure
  20628. if ( typeof val != 'number' ) {
  20629. val = parseInt( val, 10 );
  20630. if ( isNaN( val ) ) {
  20631. throw new Error('The number that was passed in is not a number.');
  20632. }
  20633. }
  20634. val_idx = getPluralFormFunc(pluralForms)(val);
  20635. }
  20636. // Throw an error if a domain isn't found
  20637. if ( ! dict ) {
  20638. throw new Error('No domain named `' + domain + '` could be found.');
  20639. }
  20640. val_list = dict[ key ];
  20641. // If there is no match, then revert back to
  20642. // english style singular/plural with the keys passed in.
  20643. if ( ! val_list || val_idx > val_list.length ) {
  20644. if (this.options.missing_key_callback) {
  20645. this.options.missing_key_callback(key, domain);
  20646. }
  20647. res = [ singular_key, plural_key ];
  20648. // collect untranslated strings
  20649. if (this.options.debug===true) {
  20650. console.log(res[ getPluralFormFunc(pluralForms)( val ) ]);
  20651. }
  20652. return res[ getPluralFormFunc()( val ) ];
  20653. }
  20654. res = val_list[ val_idx ];
  20655. // This includes empty strings on purpose
  20656. if ( ! res ) {
  20657. res = [ singular_key, plural_key ];
  20658. return res[ getPluralFormFunc()( val ) ];
  20659. }
  20660. return res;
  20661. }
  20662. });
  20663. // We add in sprintf capabilities for post translation value interolation
  20664. // This is not internally used, so you can remove it if you have this
  20665. // available somewhere else, or want to use a different system.
  20666. // We _slightly_ modify the normal sprintf behavior to more gracefully handle
  20667. // undefined values.
  20668. /**
  20669. sprintf() for JavaScript 0.7-beta1
  20670. http://www.diveintojavascript.com/projects/javascript-sprintf
  20671. Copyright (c) Alexandru Marasteanu <alexaholic [at) gmail (dot] com>
  20672. All rights reserved.
  20673. Redistribution and use in source and binary forms, with or without
  20674. modification, are permitted provided that the following conditions are met:
  20675. * Redistributions of source code must retain the above copyright
  20676. notice, this list of conditions and the following disclaimer.
  20677. * Redistributions in binary form must reproduce the above copyright
  20678. notice, this list of conditions and the following disclaimer in the
  20679. documentation and/or other materials provided with the distribution.
  20680. * Neither the name of sprintf() for JavaScript nor the
  20681. names of its contributors may be used to endorse or promote products
  20682. derived from this software without specific prior written permission.
  20683. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
  20684. ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  20685. WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  20686. DISCLAIMED. IN NO EVENT SHALL Alexandru Marasteanu BE LIABLE FOR ANY
  20687. DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  20688. (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  20689. LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  20690. ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  20691. (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  20692. SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  20693. */
  20694. var sprintf = (function() {
  20695. function get_type(variable) {
  20696. return Object.prototype.toString.call(variable).slice(8, -1).toLowerCase();
  20697. }
  20698. function str_repeat(input, multiplier) {
  20699. for (var output = []; multiplier > 0; output[--multiplier] = input) {/* do nothing */}
  20700. return output.join('');
  20701. }
  20702. var str_format = function() {
  20703. if (!str_format.cache.hasOwnProperty(arguments[0])) {
  20704. str_format.cache[arguments[0]] = str_format.parse(arguments[0]);
  20705. }
  20706. return str_format.format.call(null, str_format.cache[arguments[0]], arguments);
  20707. };
  20708. str_format.format = function(parse_tree, argv) {
  20709. var cursor = 1, tree_length = parse_tree.length, node_type = '', arg, output = [], i, k, match, pad, pad_character, pad_length;
  20710. for (i = 0; i < tree_length; i++) {
  20711. node_type = get_type(parse_tree[i]);
  20712. if (node_type === 'string') {
  20713. output.push(parse_tree[i]);
  20714. }
  20715. else if (node_type === 'array') {
  20716. match = parse_tree[i]; // convenience purposes only
  20717. if (match[2]) { // keyword argument
  20718. arg = argv[cursor];
  20719. for (k = 0; k < match[2].length; k++) {
  20720. if (!arg.hasOwnProperty(match[2][k])) {
  20721. throw(sprintf('[sprintf] property "%s" does not exist', match[2][k]));
  20722. }
  20723. arg = arg[match[2][k]];
  20724. }
  20725. }
  20726. else if (match[1]) { // positional argument (explicit)
  20727. arg = argv[match[1]];
  20728. }
  20729. else { // positional argument (implicit)
  20730. arg = argv[cursor++];
  20731. }
  20732. if (/[^s]/.test(match[8]) && (get_type(arg) != 'number')) {
  20733. throw(sprintf('[sprintf] expecting number but found %s', get_type(arg)));
  20734. }
  20735. // Jed EDIT
  20736. if ( typeof arg == 'undefined' || arg === null ) {
  20737. arg = '';
  20738. }
  20739. // Jed EDIT
  20740. switch (match[8]) {
  20741. case 'b': arg = arg.toString(2); break;
  20742. case 'c': arg = String.fromCharCode(arg); break;
  20743. case 'd': arg = parseInt(arg, 10); break;
  20744. case 'e': arg = match[7] ? arg.toExponential(match[7]) : arg.toExponential(); break;
  20745. case 'f': arg = match[7] ? parseFloat(arg).toFixed(match[7]) : parseFloat(arg); break;
  20746. case 'o': arg = arg.toString(8); break;
  20747. case 's': arg = ((arg = String(arg)) && match[7] ? arg.substring(0, match[7]) : arg); break;
  20748. case 'u': arg = Math.abs(arg); break;
  20749. case 'x': arg = arg.toString(16); break;
  20750. case 'X': arg = arg.toString(16).toUpperCase(); break;
  20751. }
  20752. arg = (/[def]/.test(match[8]) && match[3] && arg >= 0 ? '+'+ arg : arg);
  20753. pad_character = match[4] ? match[4] == '0' ? '0' : match[4].charAt(1) : ' ';
  20754. pad_length = match[6] - String(arg).length;
  20755. pad = match[6] ? str_repeat(pad_character, pad_length) : '';
  20756. output.push(match[5] ? arg + pad : pad + arg);
  20757. }
  20758. }
  20759. return output.join('');
  20760. };
  20761. str_format.cache = {};
  20762. str_format.parse = function(fmt) {
  20763. var _fmt = fmt, match = [], parse_tree = [], arg_names = 0;
  20764. while (_fmt) {
  20765. if ((match = /^[^\x25]+/.exec(_fmt)) !== null) {
  20766. parse_tree.push(match[0]);
  20767. }
  20768. else if ((match = /^\x25{2}/.exec(_fmt)) !== null) {
  20769. parse_tree.push('%');
  20770. }
  20771. else if ((match = /^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(_fmt)) !== null) {
  20772. if (match[2]) {
  20773. arg_names |= 1;
  20774. var field_list = [], replacement_field = match[2], field_match = [];
  20775. if ((field_match = /^([a-z_][a-z_\d]*)/i.exec(replacement_field)) !== null) {
  20776. field_list.push(field_match[1]);
  20777. while ((replacement_field = replacement_field.substring(field_match[0].length)) !== '') {
  20778. if ((field_match = /^\.([a-z_][a-z_\d]*)/i.exec(replacement_field)) !== null) {
  20779. field_list.push(field_match[1]);
  20780. }
  20781. else if ((field_match = /^\[(\d+)\]/.exec(replacement_field)) !== null) {
  20782. field_list.push(field_match[1]);
  20783. }
  20784. else {
  20785. throw('[sprintf] huh?');
  20786. }
  20787. }
  20788. }
  20789. else {
  20790. throw('[sprintf] huh?');
  20791. }
  20792. match[2] = field_list;
  20793. }
  20794. else {
  20795. arg_names |= 2;
  20796. }
  20797. if (arg_names === 3) {
  20798. throw('[sprintf] mixing positional and named placeholders is not (yet) supported');
  20799. }
  20800. parse_tree.push(match);
  20801. }
  20802. else {
  20803. throw('[sprintf] huh?');
  20804. }
  20805. _fmt = _fmt.substring(match[0].length);
  20806. }
  20807. return parse_tree;
  20808. };
  20809. return str_format;
  20810. })();
  20811. var vsprintf = function(fmt, argv) {
  20812. argv.unshift(fmt);
  20813. return sprintf.apply(null, argv);
  20814. };
  20815. Jed.parse_plural = function ( plural_forms, n ) {
  20816. plural_forms = plural_forms.replace(/n/g, n);
  20817. return Jed.parse_expression(plural_forms);
  20818. };
  20819. Jed.sprintf = function ( fmt, args ) {
  20820. if ( {}.toString.call( args ) == '[object Array]' ) {
  20821. return vsprintf( fmt, [].slice.call(args) );
  20822. }
  20823. return sprintf.apply(this, [].slice.call(arguments) );
  20824. };
  20825. Jed.prototype.sprintf = function () {
  20826. return Jed.sprintf.apply(this, arguments);
  20827. };
  20828. // END sprintf Implementation
  20829. // Start the Plural forms section
  20830. // This is a full plural form expression parser. It is used to avoid
  20831. // running 'eval' or 'new Function' directly against the plural
  20832. // forms.
  20833. //
  20834. // This can be important if you get translations done through a 3rd
  20835. // party vendor. I encourage you to use this instead, however, I
  20836. // also will provide a 'precompiler' that you can use at build time
  20837. // to output valid/safe function representations of the plural form
  20838. // expressions. This means you can build this code out for the most
  20839. // part.
  20840. Jed.PF = {};
  20841. Jed.PF.parse = function ( p ) {
  20842. var plural_str = Jed.PF.extractPluralExpr( p );
  20843. return Jed.PF.parser.parse.call(Jed.PF.parser, plural_str);
  20844. };
  20845. Jed.PF.compile = function ( p ) {
  20846. // Handle trues and falses as 0 and 1
  20847. function imply( val ) {
  20848. return (val === true ? 1 : val ? val : 0);
  20849. }
  20850. var ast = Jed.PF.parse( p );
  20851. return function ( n ) {
  20852. return imply( Jed.PF.interpreter( ast )( n ) );
  20853. };
  20854. };
  20855. Jed.PF.interpreter = function ( ast ) {
  20856. return function ( n ) {
  20857. var res;
  20858. switch ( ast.type ) {
  20859. case 'GROUP':
  20860. return Jed.PF.interpreter( ast.expr )( n );
  20861. case 'TERNARY':
  20862. if ( Jed.PF.interpreter( ast.expr )( n ) ) {
  20863. return Jed.PF.interpreter( ast.truthy )( n );
  20864. }
  20865. return Jed.PF.interpreter( ast.falsey )( n );
  20866. case 'OR':
  20867. return Jed.PF.interpreter( ast.left )( n ) || Jed.PF.interpreter( ast.right )( n );
  20868. case 'AND':
  20869. return Jed.PF.interpreter( ast.left )( n ) && Jed.PF.interpreter( ast.right )( n );
  20870. case 'LT':
  20871. return Jed.PF.interpreter( ast.left )( n ) < Jed.PF.interpreter( ast.right )( n );
  20872. case 'GT':
  20873. return Jed.PF.interpreter( ast.left )( n ) > Jed.PF.interpreter( ast.right )( n );
  20874. case 'LTE':
  20875. return Jed.PF.interpreter( ast.left )( n ) <= Jed.PF.interpreter( ast.right )( n );
  20876. case 'GTE':
  20877. return Jed.PF.interpreter( ast.left )( n ) >= Jed.PF.interpreter( ast.right )( n );
  20878. case 'EQ':
  20879. return Jed.PF.interpreter( ast.left )( n ) == Jed.PF.interpreter( ast.right )( n );
  20880. case 'NEQ':
  20881. return Jed.PF.interpreter( ast.left )( n ) != Jed.PF.interpreter( ast.right )( n );
  20882. case 'MOD':
  20883. return Jed.PF.interpreter( ast.left )( n ) % Jed.PF.interpreter( ast.right )( n );
  20884. case 'VAR':
  20885. return n;
  20886. case 'NUM':
  20887. return ast.val;
  20888. default:
  20889. throw new Error("Invalid Token found.");
  20890. }
  20891. };
  20892. };
  20893. Jed.PF.extractPluralExpr = function ( p ) {
  20894. // trim first
  20895. p = p.replace(/^\s\s*/, '').replace(/\s\s*$/, '');
  20896. if (! /;\s*$/.test(p)) {
  20897. p = p.concat(';');
  20898. }
  20899. var nplurals_re = /nplurals\=(\d+);/,
  20900. plural_re = /plural\=(.*);/,
  20901. nplurals_matches = p.match( nplurals_re ),
  20902. res = {},
  20903. plural_matches;
  20904. // Find the nplurals number
  20905. if ( nplurals_matches.length > 1 ) {
  20906. res.nplurals = nplurals_matches[1];
  20907. }
  20908. else {
  20909. throw new Error('nplurals not found in plural_forms string: ' + p );
  20910. }
  20911. // remove that data to get to the formula
  20912. p = p.replace( nplurals_re, "" );
  20913. plural_matches = p.match( plural_re );
  20914. if (!( plural_matches && plural_matches.length > 1 ) ) {
  20915. throw new Error('`plural` expression not found: ' + p);
  20916. }
  20917. return plural_matches[ 1 ];
  20918. };
  20919. /* Jison generated parser */
  20920. Jed.PF.parser = (function(){
  20921. var parser = {trace: function trace() { },
  20922. yy: {},
  20923. symbols_: {"error":2,"expressions":3,"e":4,"EOF":5,"?":6,":":7,"||":8,"&&":9,"<":10,"<=":11,">":12,">=":13,"!=":14,"==":15,"%":16,"(":17,")":18,"n":19,"NUMBER":20,"$accept":0,"$end":1},
  20924. terminals_: {2:"error",5:"EOF",6:"?",7:":",8:"||",9:"&&",10:"<",11:"<=",12:">",13:">=",14:"!=",15:"==",16:"%",17:"(",18:")",19:"n",20:"NUMBER"},
  20925. productions_: [0,[3,2],[4,5],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,1],[4,1]],
  20926. performAction: function anonymous(yytext,yyleng,yylineno,yy,yystate,$$,_$) {
  20927. var $0 = $$.length - 1;
  20928. switch (yystate) {
  20929. case 1: return { type : 'GROUP', expr: $$[$0-1] };
  20930. break;
  20931. case 2:this.$ = { type: 'TERNARY', expr: $$[$0-4], truthy : $$[$0-2], falsey: $$[$0] };
  20932. break;
  20933. case 3:this.$ = { type: "OR", left: $$[$0-2], right: $$[$0] };
  20934. break;
  20935. case 4:this.$ = { type: "AND", left: $$[$0-2], right: $$[$0] };
  20936. break;
  20937. case 5:this.$ = { type: 'LT', left: $$[$0-2], right: $$[$0] };
  20938. break;
  20939. case 6:this.$ = { type: 'LTE', left: $$[$0-2], right: $$[$0] };
  20940. break;
  20941. case 7:this.$ = { type: 'GT', left: $$[$0-2], right: $$[$0] };
  20942. break;
  20943. case 8:this.$ = { type: 'GTE', left: $$[$0-2], right: $$[$0] };
  20944. break;
  20945. case 9:this.$ = { type: 'NEQ', left: $$[$0-2], right: $$[$0] };
  20946. break;
  20947. case 10:this.$ = { type: 'EQ', left: $$[$0-2], right: $$[$0] };
  20948. break;
  20949. case 11:this.$ = { type: 'MOD', left: $$[$0-2], right: $$[$0] };
  20950. break;
  20951. case 12:this.$ = { type: 'GROUP', expr: $$[$0-1] };
  20952. break;
  20953. case 13:this.$ = { type: 'VAR' };
  20954. break;
  20955. case 14:this.$ = { type: 'NUM', val: Number(yytext) };
  20956. break;
  20957. }
  20958. },
  20959. table: [{3:1,4:2,17:[1,3],19:[1,4],20:[1,5]},{1:[3]},{5:[1,6],6:[1,7],8:[1,8],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16]},{4:17,17:[1,3],19:[1,4],20:[1,5]},{5:[2,13],6:[2,13],7:[2,13],8:[2,13],9:[2,13],10:[2,13],11:[2,13],12:[2,13],13:[2,13],14:[2,13],15:[2,13],16:[2,13],18:[2,13]},{5:[2,14],6:[2,14],7:[2,14],8:[2,14],9:[2,14],10:[2,14],11:[2,14],12:[2,14],13:[2,14],14:[2,14],15:[2,14],16:[2,14],18:[2,14]},{1:[2,1]},{4:18,17:[1,3],19:[1,4],20:[1,5]},{4:19,17:[1,3],19:[1,4],20:[1,5]},{4:20,17:[1,3],19:[1,4],20:[1,5]},{4:21,17:[1,3],19:[1,4],20:[1,5]},{4:22,17:[1,3],19:[1,4],20:[1,5]},{4:23,17:[1,3],19:[1,4],20:[1,5]},{4:24,17:[1,3],19:[1,4],20:[1,5]},{4:25,17:[1,3],19:[1,4],20:[1,5]},{4:26,17:[1,3],19:[1,4],20:[1,5]},{4:27,17:[1,3],19:[1,4],20:[1,5]},{6:[1,7],8:[1,8],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16],18:[1,28]},{6:[1,7],7:[1,29],8:[1,8],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16]},{5:[2,3],6:[2,3],7:[2,3],8:[2,3],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16],18:[2,3]},{5:[2,4],6:[2,4],7:[2,4],8:[2,4],9:[2,4],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16],18:[2,4]},{5:[2,5],6:[2,5],7:[2,5],8:[2,5],9:[2,5],10:[2,5],11:[2,5],12:[2,5],13:[2,5],14:[2,5],15:[2,5],16:[1,16],18:[2,5]},{5:[2,6],6:[2,6],7:[2,6],8:[2,6],9:[2,6],10:[2,6],11:[2,6],12:[2,6],13:[2,6],14:[2,6],15:[2,6],16:[1,16],18:[2,6]},{5:[2,7],6:[2,7],7:[2,7],8:[2,7],9:[2,7],10:[2,7],11:[2,7],12:[2,7],13:[2,7],14:[2,7],15:[2,7],16:[1,16],18:[2,7]},{5:[2,8],6:[2,8],7:[2,8],8:[2,8],9:[2,8],10:[2,8],11:[2,8],12:[2,8],13:[2,8],14:[2,8],15:[2,8],16:[1,16],18:[2,8]},{5:[2,9],6:[2,9],7:[2,9],8:[2,9],9:[2,9],10:[2,9],11:[2,9],12:[2,9],13:[2,9],14:[2,9],15:[2,9],16:[1,16],18:[2,9]},{5:[2,10],6:[2,10],7:[2,10],8:[2,10],9:[2,10],10:[2,10],11:[2,10],12:[2,10],13:[2,10],14:[2,10],15:[2,10],16:[1,16],18:[2,10]},{5:[2,11],6:[2,11],7:[2,11],8:[2,11],9:[2,11],10:[2,11],11:[2,11],12:[2,11],13:[2,11],14:[2,11],15:[2,11],16:[2,11],18:[2,11]},{5:[2,12],6:[2,12],7:[2,12],8:[2,12],9:[2,12],10:[2,12],11:[2,12],12:[2,12],13:[2,12],14:[2,12],15:[2,12],16:[2,12],18:[2,12]},{4:30,17:[1,3],19:[1,4],20:[1,5]},{5:[2,2],6:[1,7],7:[2,2],8:[1,8],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16],18:[2,2]}],
  20960. defaultActions: {6:[2,1]},
  20961. parseError: function parseError(str, hash) {
  20962. throw new Error(str);
  20963. },
  20964. parse: function parse(input) {
  20965. var self = this,
  20966. stack = [0],
  20967. vstack = [null], // semantic value stack
  20968. lstack = [], // location stack
  20969. table = this.table,
  20970. yytext = '',
  20971. yylineno = 0,
  20972. yyleng = 0,
  20973. recovering = 0,
  20974. TERROR = 2,
  20975. EOF = 1;
  20976. //this.reductionCount = this.shiftCount = 0;
  20977. this.lexer.setInput(input);
  20978. this.lexer.yy = this.yy;
  20979. this.yy.lexer = this.lexer;
  20980. if (typeof this.lexer.yylloc == 'undefined')
  20981. this.lexer.yylloc = {};
  20982. var yyloc = this.lexer.yylloc;
  20983. lstack.push(yyloc);
  20984. if (typeof this.yy.parseError === 'function')
  20985. this.parseError = this.yy.parseError;
  20986. function popStack (n) {
  20987. stack.length = stack.length - 2*n;
  20988. vstack.length = vstack.length - n;
  20989. lstack.length = lstack.length - n;
  20990. }
  20991. function lex() {
  20992. var token;
  20993. token = self.lexer.lex() || 1; // $end = 1
  20994. // if token isn't its numeric value, convert
  20995. if (typeof token !== 'number') {
  20996. token = self.symbols_[token] || token;
  20997. }
  20998. return token;
  20999. }
  21000. var symbol, preErrorSymbol, state, action, a, r, yyval={},p,len,newState, expected;
  21001. while (true) {
  21002. // retreive state number from top of stack
  21003. state = stack[stack.length-1];
  21004. // use default actions if available
  21005. if (this.defaultActions[state]) {
  21006. action = this.defaultActions[state];
  21007. } else {
  21008. if (symbol == null)
  21009. symbol = lex();
  21010. // read action for current state and first input
  21011. action = table[state] && table[state][symbol];
  21012. }
  21013. // handle parse error
  21014. _handle_error:
  21015. if (typeof action === 'undefined' || !action.length || !action[0]) {
  21016. if (!recovering) {
  21017. // Report error
  21018. expected = [];
  21019. for (p in table[state]) if (this.terminals_[p] && p > 2) {
  21020. expected.push("'"+this.terminals_[p]+"'");
  21021. }
  21022. var errStr = '';
  21023. if (this.lexer.showPosition) {
  21024. errStr = 'Parse error on line '+(yylineno+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+expected.join(', ') + ", got '" + this.terminals_[symbol]+ "'";
  21025. } else {
  21026. errStr = 'Parse error on line '+(yylineno+1)+": Unexpected " +
  21027. (symbol == 1 /*EOF*/ ? "end of input" :
  21028. ("'"+(this.terminals_[symbol] || symbol)+"'"));
  21029. }
  21030. this.parseError(errStr,
  21031. {text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected});
  21032. }
  21033. // just recovered from another error
  21034. if (recovering == 3) {
  21035. if (symbol == EOF) {
  21036. throw new Error(errStr || 'Parsing halted.');
  21037. }
  21038. // discard current lookahead and grab another
  21039. yyleng = this.lexer.yyleng;
  21040. yytext = this.lexer.yytext;
  21041. yylineno = this.lexer.yylineno;
  21042. yyloc = this.lexer.yylloc;
  21043. symbol = lex();
  21044. }
  21045. // try to recover from error
  21046. while (1) {
  21047. // check for error recovery rule in this state
  21048. if ((TERROR.toString()) in table[state]) {
  21049. break;
  21050. }
  21051. if (state == 0) {
  21052. throw new Error(errStr || 'Parsing halted.');
  21053. }
  21054. popStack(1);
  21055. state = stack[stack.length-1];
  21056. }
  21057. preErrorSymbol = symbol; // save the lookahead token
  21058. symbol = TERROR; // insert generic error symbol as new lookahead
  21059. state = stack[stack.length-1];
  21060. action = table[state] && table[state][TERROR];
  21061. recovering = 3; // allow 3 real symbols to be shifted before reporting a new error
  21062. }
  21063. // this shouldn't happen, unless resolve defaults are off
  21064. if (action[0] instanceof Array && action.length > 1) {
  21065. throw new Error('Parse Error: multiple actions possible at state: '+state+', token: '+symbol);
  21066. }
  21067. switch (action[0]) {
  21068. case 1: // shift
  21069. //this.shiftCount++;
  21070. stack.push(symbol);
  21071. vstack.push(this.lexer.yytext);
  21072. lstack.push(this.lexer.yylloc);
  21073. stack.push(action[1]); // push state
  21074. symbol = null;
  21075. if (!preErrorSymbol) { // normal execution/no error
  21076. yyleng = this.lexer.yyleng;
  21077. yytext = this.lexer.yytext;
  21078. yylineno = this.lexer.yylineno;
  21079. yyloc = this.lexer.yylloc;
  21080. if (recovering > 0)
  21081. recovering--;
  21082. } else { // error just occurred, resume old lookahead f/ before error
  21083. symbol = preErrorSymbol;
  21084. preErrorSymbol = null;
  21085. }
  21086. break;
  21087. case 2: // reduce
  21088. //this.reductionCount++;
  21089. len = this.productions_[action[1]][1];
  21090. // perform semantic action
  21091. yyval.$ = vstack[vstack.length-len]; // default to $$ = $1
  21092. // default location, uses first token for firsts, last for lasts
  21093. yyval._$ = {
  21094. first_line: lstack[lstack.length-(len||1)].first_line,
  21095. last_line: lstack[lstack.length-1].last_line,
  21096. first_column: lstack[lstack.length-(len||1)].first_column,
  21097. last_column: lstack[lstack.length-1].last_column
  21098. };
  21099. r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack);
  21100. if (typeof r !== 'undefined') {
  21101. return r;
  21102. }
  21103. // pop off stack
  21104. if (len) {
  21105. stack = stack.slice(0,-1*len*2);
  21106. vstack = vstack.slice(0, -1*len);
  21107. lstack = lstack.slice(0, -1*len);
  21108. }
  21109. stack.push(this.productions_[action[1]][0]); // push nonterminal (reduce)
  21110. vstack.push(yyval.$);
  21111. lstack.push(yyval._$);
  21112. // goto new state = table[STATE][NONTERMINAL]
  21113. newState = table[stack[stack.length-2]][stack[stack.length-1]];
  21114. stack.push(newState);
  21115. break;
  21116. case 3: // accept
  21117. return true;
  21118. }
  21119. }
  21120. return true;
  21121. }};/* Jison generated lexer */
  21122. var lexer = (function(){
  21123. var lexer = ({EOF:1,
  21124. parseError:function parseError(str, hash) {
  21125. if (this.yy.parseError) {
  21126. this.yy.parseError(str, hash);
  21127. } else {
  21128. throw new Error(str);
  21129. }
  21130. },
  21131. setInput:function (input) {
  21132. this._input = input;
  21133. this._more = this._less = this.done = false;
  21134. this.yylineno = this.yyleng = 0;
  21135. this.yytext = this.matched = this.match = '';
  21136. this.conditionStack = ['INITIAL'];
  21137. this.yylloc = {first_line:1,first_column:0,last_line:1,last_column:0};
  21138. return this;
  21139. },
  21140. input:function () {
  21141. var ch = this._input[0];
  21142. this.yytext+=ch;
  21143. this.yyleng++;
  21144. this.match+=ch;
  21145. this.matched+=ch;
  21146. var lines = ch.match(/\n/);
  21147. if (lines) this.yylineno++;
  21148. this._input = this._input.slice(1);
  21149. return ch;
  21150. },
  21151. unput:function (ch) {
  21152. this._input = ch + this._input;
  21153. return this;
  21154. },
  21155. more:function () {
  21156. this._more = true;
  21157. return this;
  21158. },
  21159. pastInput:function () {
  21160. var past = this.matched.substr(0, this.matched.length - this.match.length);
  21161. return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, "");
  21162. },
  21163. upcomingInput:function () {
  21164. var next = this.match;
  21165. if (next.length < 20) {
  21166. next += this._input.substr(0, 20-next.length);
  21167. }
  21168. return (next.substr(0,20)+(next.length > 20 ? '...':'')).replace(/\n/g, "");
  21169. },
  21170. showPosition:function () {
  21171. var pre = this.pastInput();
  21172. var c = new Array(pre.length + 1).join("-");
  21173. return pre + this.upcomingInput() + "\n" + c+"^";
  21174. },
  21175. next:function () {
  21176. if (this.done) {
  21177. return this.EOF;
  21178. }
  21179. if (!this._input) this.done = true;
  21180. var token,
  21181. match,
  21182. col,
  21183. lines;
  21184. if (!this._more) {
  21185. this.yytext = '';
  21186. this.match = '';
  21187. }
  21188. var rules = this._currentRules();
  21189. for (var i=0;i < rules.length; i++) {
  21190. match = this._input.match(this.rules[rules[i]]);
  21191. if (match) {
  21192. lines = match[0].match(/\n.*/g);
  21193. if (lines) this.yylineno += lines.length;
  21194. this.yylloc = {first_line: this.yylloc.last_line,
  21195. last_line: this.yylineno+1,
  21196. first_column: this.yylloc.last_column,
  21197. last_column: lines ? lines[lines.length-1].length-1 : this.yylloc.last_column + match[0].length}
  21198. this.yytext += match[0];
  21199. this.match += match[0];
  21200. this.matches = match;
  21201. this.yyleng = this.yytext.length;
  21202. this._more = false;
  21203. this._input = this._input.slice(match[0].length);
  21204. this.matched += match[0];
  21205. token = this.performAction.call(this, this.yy, this, rules[i],this.conditionStack[this.conditionStack.length-1]);
  21206. if (token) return token;
  21207. else return;
  21208. }
  21209. }
  21210. if (this._input === "") {
  21211. return this.EOF;
  21212. } else {
  21213. this.parseError('Lexical error on line '+(this.yylineno+1)+'. Unrecognized text.\n'+this.showPosition(),
  21214. {text: "", token: null, line: this.yylineno});
  21215. }
  21216. },
  21217. lex:function lex() {
  21218. var r = this.next();
  21219. if (typeof r !== 'undefined') {
  21220. return r;
  21221. } else {
  21222. return this.lex();
  21223. }
  21224. },
  21225. begin:function begin(condition) {
  21226. this.conditionStack.push(condition);
  21227. },
  21228. popState:function popState() {
  21229. return this.conditionStack.pop();
  21230. },
  21231. _currentRules:function _currentRules() {
  21232. return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;
  21233. },
  21234. topState:function () {
  21235. return this.conditionStack[this.conditionStack.length-2];
  21236. },
  21237. pushState:function begin(condition) {
  21238. this.begin(condition);
  21239. }});
  21240. lexer.performAction = function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {
  21241. var YYSTATE=YY_START;
  21242. switch($avoiding_name_collisions) {
  21243. case 0:/* skip whitespace */
  21244. break;
  21245. case 1:return 20
  21246. break;
  21247. case 2:return 19
  21248. break;
  21249. case 3:return 8
  21250. break;
  21251. case 4:return 9
  21252. break;
  21253. case 5:return 6
  21254. break;
  21255. case 6:return 7
  21256. break;
  21257. case 7:return 11
  21258. break;
  21259. case 8:return 13
  21260. break;
  21261. case 9:return 10
  21262. break;
  21263. case 10:return 12
  21264. break;
  21265. case 11:return 14
  21266. break;
  21267. case 12:return 15
  21268. break;
  21269. case 13:return 16
  21270. break;
  21271. case 14:return 17
  21272. break;
  21273. case 15:return 18
  21274. break;
  21275. case 16:return 5
  21276. break;
  21277. case 17:return 'INVALID'
  21278. break;
  21279. }
  21280. };
  21281. lexer.rules = [/^\s+/,/^[0-9]+(\.[0-9]+)?\b/,/^n\b/,/^\|\|/,/^&&/,/^\?/,/^:/,/^<=/,/^>=/,/^</,/^>/,/^!=/,/^==/,/^%/,/^\(/,/^\)/,/^$/,/^./];
  21282. lexer.conditions = {"INITIAL":{"rules":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17],"inclusive":true}};return lexer;})()
  21283. parser.lexer = lexer;
  21284. return parser;
  21285. })();
  21286. // End parser
  21287. // Handle node, amd, and global systems
  21288. if (typeof exports !== 'undefined') {
  21289. if (typeof module !== 'undefined' && module.exports) {
  21290. exports = module.exports = Jed;
  21291. }
  21292. exports.Jed = Jed;
  21293. }
  21294. else {
  21295. if (typeof define === 'function' && define.amd) {
  21296. define('jed',[],function() {
  21297. return Jed;
  21298. });
  21299. }
  21300. // Leak a global regardless of module system
  21301. root['Jed'] = Jed;
  21302. }
  21303. })(this);
  21304. //! moment.js
  21305. //! version : 2.19.4
  21306. //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
  21307. //! license : MIT
  21308. //! momentjs.com
  21309. ;(function (global, factory) {
  21310. typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
  21311. typeof define === 'function' && define.amd ? define('moment/moment',factory) :
  21312. global.moment = factory()
  21313. }(this, (function () { 'use strict';
  21314. var hookCallback;
  21315. function hooks () {
  21316. return hookCallback.apply(null, arguments);
  21317. }
  21318. // This is done to register the method called with moment()
  21319. // without creating circular dependencies.
  21320. function setHookCallback (callback) {
  21321. hookCallback = callback;
  21322. }
  21323. function isArray(input) {
  21324. return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]';
  21325. }
  21326. function isObject(input) {
  21327. // IE8 will treat undefined and null as object if it wasn't for
  21328. // input != null
  21329. return input != null && Object.prototype.toString.call(input) === '[object Object]';
  21330. }
  21331. function isObjectEmpty(obj) {
  21332. if (Object.getOwnPropertyNames) {
  21333. return (Object.getOwnPropertyNames(obj).length === 0);
  21334. } else {
  21335. var k;
  21336. for (k in obj) {
  21337. if (obj.hasOwnProperty(k)) {
  21338. return false;
  21339. }
  21340. }
  21341. return true;
  21342. }
  21343. }
  21344. function isUndefined(input) {
  21345. return input === void 0;
  21346. }
  21347. function isNumber(input) {
  21348. return typeof input === 'number' || Object.prototype.toString.call(input) === '[object Number]';
  21349. }
  21350. function isDate(input) {
  21351. return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]';
  21352. }
  21353. function map(arr, fn) {
  21354. var res = [], i;
  21355. for (i = 0; i < arr.length; ++i) {
  21356. res.push(fn(arr[i], i));
  21357. }
  21358. return res;
  21359. }
  21360. function hasOwnProp(a, b) {
  21361. return Object.prototype.hasOwnProperty.call(a, b);
  21362. }
  21363. function extend(a, b) {
  21364. for (var i in b) {
  21365. if (hasOwnProp(b, i)) {
  21366. a[i] = b[i];
  21367. }
  21368. }
  21369. if (hasOwnProp(b, 'toString')) {
  21370. a.toString = b.toString;
  21371. }
  21372. if (hasOwnProp(b, 'valueOf')) {
  21373. a.valueOf = b.valueOf;
  21374. }
  21375. return a;
  21376. }
  21377. function createUTC (input, format, locale, strict) {
  21378. return createLocalOrUTC(input, format, locale, strict, true).utc();
  21379. }
  21380. function defaultParsingFlags() {
  21381. // We need to deep clone this object.
  21382. return {
  21383. empty : false,
  21384. unusedTokens : [],
  21385. unusedInput : [],
  21386. overflow : -2,
  21387. charsLeftOver : 0,
  21388. nullInput : false,
  21389. invalidMonth : null,
  21390. invalidFormat : false,
  21391. userInvalidated : false,
  21392. iso : false,
  21393. parsedDateParts : [],
  21394. meridiem : null,
  21395. rfc2822 : false,
  21396. weekdayMismatch : false
  21397. };
  21398. }
  21399. function getParsingFlags(m) {
  21400. if (m._pf == null) {
  21401. m._pf = defaultParsingFlags();
  21402. }
  21403. return m._pf;
  21404. }
  21405. var some;
  21406. if (Array.prototype.some) {
  21407. some = Array.prototype.some;
  21408. } else {
  21409. some = function (fun) {
  21410. var t = Object(this);
  21411. var len = t.length >>> 0;
  21412. for (var i = 0; i < len; i++) {
  21413. if (i in t && fun.call(this, t[i], i, t)) {
  21414. return true;
  21415. }
  21416. }
  21417. return false;
  21418. };
  21419. }
  21420. function isValid(m) {
  21421. if (m._isValid == null) {
  21422. var flags = getParsingFlags(m);
  21423. var parsedParts = some.call(flags.parsedDateParts, function (i) {
  21424. return i != null;
  21425. });
  21426. var isNowValid = !isNaN(m._d.getTime()) &&
  21427. flags.overflow < 0 &&
  21428. !flags.empty &&
  21429. !flags.invalidMonth &&
  21430. !flags.invalidWeekday &&
  21431. !flags.weekdayMismatch &&
  21432. !flags.nullInput &&
  21433. !flags.invalidFormat &&
  21434. !flags.userInvalidated &&
  21435. (!flags.meridiem || (flags.meridiem && parsedParts));
  21436. if (m._strict) {
  21437. isNowValid = isNowValid &&
  21438. flags.charsLeftOver === 0 &&
  21439. flags.unusedTokens.length === 0 &&
  21440. flags.bigHour === undefined;
  21441. }
  21442. if (Object.isFrozen == null || !Object.isFrozen(m)) {
  21443. m._isValid = isNowValid;
  21444. }
  21445. else {
  21446. return isNowValid;
  21447. }
  21448. }
  21449. return m._isValid;
  21450. }
  21451. function createInvalid (flags) {
  21452. var m = createUTC(NaN);
  21453. if (flags != null) {
  21454. extend(getParsingFlags(m), flags);
  21455. }
  21456. else {
  21457. getParsingFlags(m).userInvalidated = true;
  21458. }
  21459. return m;
  21460. }
  21461. // Plugins that add properties should also add the key here (null value),
  21462. // so we can properly clone ourselves.
  21463. var momentProperties = hooks.momentProperties = [];
  21464. function copyConfig(to, from) {
  21465. var i, prop, val;
  21466. if (!isUndefined(from._isAMomentObject)) {
  21467. to._isAMomentObject = from._isAMomentObject;
  21468. }
  21469. if (!isUndefined(from._i)) {
  21470. to._i = from._i;
  21471. }
  21472. if (!isUndefined(from._f)) {
  21473. to._f = from._f;
  21474. }
  21475. if (!isUndefined(from._l)) {
  21476. to._l = from._l;
  21477. }
  21478. if (!isUndefined(from._strict)) {
  21479. to._strict = from._strict;
  21480. }
  21481. if (!isUndefined(from._tzm)) {
  21482. to._tzm = from._tzm;
  21483. }
  21484. if (!isUndefined(from._isUTC)) {
  21485. to._isUTC = from._isUTC;
  21486. }
  21487. if (!isUndefined(from._offset)) {
  21488. to._offset = from._offset;
  21489. }
  21490. if (!isUndefined(from._pf)) {
  21491. to._pf = getParsingFlags(from);
  21492. }
  21493. if (!isUndefined(from._locale)) {
  21494. to._locale = from._locale;
  21495. }
  21496. if (momentProperties.length > 0) {
  21497. for (i = 0; i < momentProperties.length; i++) {
  21498. prop = momentProperties[i];
  21499. val = from[prop];
  21500. if (!isUndefined(val)) {
  21501. to[prop] = val;
  21502. }
  21503. }
  21504. }
  21505. return to;
  21506. }
  21507. var updateInProgress = false;
  21508. // Moment prototype object
  21509. function Moment(config) {
  21510. copyConfig(this, config);
  21511. this._d = new Date(config._d != null ? config._d.getTime() : NaN);
  21512. if (!this.isValid()) {
  21513. this._d = new Date(NaN);
  21514. }
  21515. // Prevent infinite loop in case updateOffset creates new moment
  21516. // objects.
  21517. if (updateInProgress === false) {
  21518. updateInProgress = true;
  21519. hooks.updateOffset(this);
  21520. updateInProgress = false;
  21521. }
  21522. }
  21523. function isMoment (obj) {
  21524. return obj instanceof Moment || (obj != null && obj._isAMomentObject != null);
  21525. }
  21526. function absFloor (number) {
  21527. if (number < 0) {
  21528. // -0 -> 0
  21529. return Math.ceil(number) || 0;
  21530. } else {
  21531. return Math.floor(number);
  21532. }
  21533. }
  21534. function toInt(argumentForCoercion) {
  21535. var coercedNumber = +argumentForCoercion,
  21536. value = 0;
  21537. if (coercedNumber !== 0 && isFinite(coercedNumber)) {
  21538. value = absFloor(coercedNumber);
  21539. }
  21540. return value;
  21541. }
  21542. // compare two arrays, return the number of differences
  21543. function compareArrays(array1, array2, dontConvert) {
  21544. var len = Math.min(array1.length, array2.length),
  21545. lengthDiff = Math.abs(array1.length - array2.length),
  21546. diffs = 0,
  21547. i;
  21548. for (i = 0; i < len; i++) {
  21549. if ((dontConvert && array1[i] !== array2[i]) ||
  21550. (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {
  21551. diffs++;
  21552. }
  21553. }
  21554. return diffs + lengthDiff;
  21555. }
  21556. function warn(msg) {
  21557. if (hooks.suppressDeprecationWarnings === false &&
  21558. (typeof console !== 'undefined') && console.warn) {
  21559. console.warn('Deprecation warning: ' + msg);
  21560. }
  21561. }
  21562. function deprecate(msg, fn) {
  21563. var firstTime = true;
  21564. return extend(function () {
  21565. if (hooks.deprecationHandler != null) {
  21566. hooks.deprecationHandler(null, msg);
  21567. }
  21568. if (firstTime) {
  21569. var args = [];
  21570. var arg;
  21571. for (var i = 0; i < arguments.length; i++) {
  21572. arg = '';
  21573. if (typeof arguments[i] === 'object') {
  21574. arg += '\n[' + i + '] ';
  21575. for (var key in arguments[0]) {
  21576. arg += key + ': ' + arguments[0][key] + ', ';
  21577. }
  21578. arg = arg.slice(0, -2); // Remove trailing comma and space
  21579. } else {
  21580. arg = arguments[i];
  21581. }
  21582. args.push(arg);
  21583. }
  21584. warn(msg + '\nArguments: ' + Array.prototype.slice.call(args).join('') + '\n' + (new Error()).stack);
  21585. firstTime = false;
  21586. }
  21587. return fn.apply(this, arguments);
  21588. }, fn);
  21589. }
  21590. var deprecations = {};
  21591. function deprecateSimple(name, msg) {
  21592. if (hooks.deprecationHandler != null) {
  21593. hooks.deprecationHandler(name, msg);
  21594. }
  21595. if (!deprecations[name]) {
  21596. warn(msg);
  21597. deprecations[name] = true;
  21598. }
  21599. }
  21600. hooks.suppressDeprecationWarnings = false;
  21601. hooks.deprecationHandler = null;
  21602. function isFunction(input) {
  21603. return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]';
  21604. }
  21605. function set (config) {
  21606. var prop, i;
  21607. for (i in config) {
  21608. prop = config[i];
  21609. if (isFunction(prop)) {
  21610. this[i] = prop;
  21611. } else {
  21612. this['_' + i] = prop;
  21613. }
  21614. }
  21615. this._config = config;
  21616. // Lenient ordinal parsing accepts just a number in addition to
  21617. // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.
  21618. // TODO: Remove "ordinalParse" fallback in next major release.
  21619. this._dayOfMonthOrdinalParseLenient = new RegExp(
  21620. (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +
  21621. '|' + (/\d{1,2}/).source);
  21622. }
  21623. function mergeConfigs(parentConfig, childConfig) {
  21624. var res = extend({}, parentConfig), prop;
  21625. for (prop in childConfig) {
  21626. if (hasOwnProp(childConfig, prop)) {
  21627. if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {
  21628. res[prop] = {};
  21629. extend(res[prop], parentConfig[prop]);
  21630. extend(res[prop], childConfig[prop]);
  21631. } else if (childConfig[prop] != null) {
  21632. res[prop] = childConfig[prop];
  21633. } else {
  21634. delete res[prop];
  21635. }
  21636. }
  21637. }
  21638. for (prop in parentConfig) {
  21639. if (hasOwnProp(parentConfig, prop) &&
  21640. !hasOwnProp(childConfig, prop) &&
  21641. isObject(parentConfig[prop])) {
  21642. // make sure changes to properties don't modify parent config
  21643. res[prop] = extend({}, res[prop]);
  21644. }
  21645. }
  21646. return res;
  21647. }
  21648. function Locale(config) {
  21649. if (config != null) {
  21650. this.set(config);
  21651. }
  21652. }
  21653. var keys;
  21654. if (Object.keys) {
  21655. keys = Object.keys;
  21656. } else {
  21657. keys = function (obj) {
  21658. var i, res = [];
  21659. for (i in obj) {
  21660. if (hasOwnProp(obj, i)) {
  21661. res.push(i);
  21662. }
  21663. }
  21664. return res;
  21665. };
  21666. }
  21667. var defaultCalendar = {
  21668. sameDay : '[Today at] LT',
  21669. nextDay : '[Tomorrow at] LT',
  21670. nextWeek : 'dddd [at] LT',
  21671. lastDay : '[Yesterday at] LT',
  21672. lastWeek : '[Last] dddd [at] LT',
  21673. sameElse : 'L'
  21674. };
  21675. function calendar (key, mom, now) {
  21676. var output = this._calendar[key] || this._calendar['sameElse'];
  21677. return isFunction(output) ? output.call(mom, now) : output;
  21678. }
  21679. var defaultLongDateFormat = {
  21680. LTS : 'h:mm:ss A',
  21681. LT : 'h:mm A',
  21682. L : 'MM/DD/YYYY',
  21683. LL : 'MMMM D, YYYY',
  21684. LLL : 'MMMM D, YYYY h:mm A',
  21685. LLLL : 'dddd, MMMM D, YYYY h:mm A'
  21686. };
  21687. function longDateFormat (key) {
  21688. var format = this._longDateFormat[key],
  21689. formatUpper = this._longDateFormat[key.toUpperCase()];
  21690. if (format || !formatUpper) {
  21691. return format;
  21692. }
  21693. this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) {
  21694. return val.slice(1);
  21695. });
  21696. return this._longDateFormat[key];
  21697. }
  21698. var defaultInvalidDate = 'Invalid date';
  21699. function invalidDate () {
  21700. return this._invalidDate;
  21701. }
  21702. var defaultOrdinal = '%d';
  21703. var defaultDayOfMonthOrdinalParse = /\d{1,2}/;
  21704. function ordinal (number) {
  21705. return this._ordinal.replace('%d', number);
  21706. }
  21707. var defaultRelativeTime = {
  21708. future : 'in %s',
  21709. past : '%s ago',
  21710. s : 'a few seconds',
  21711. ss : '%d seconds',
  21712. m : 'a minute',
  21713. mm : '%d minutes',
  21714. h : 'an hour',
  21715. hh : '%d hours',
  21716. d : 'a day',
  21717. dd : '%d days',
  21718. M : 'a month',
  21719. MM : '%d months',
  21720. y : 'a year',
  21721. yy : '%d years'
  21722. };
  21723. function relativeTime (number, withoutSuffix, string, isFuture) {
  21724. var output = this._relativeTime[string];
  21725. return (isFunction(output)) ?
  21726. output(number, withoutSuffix, string, isFuture) :
  21727. output.replace(/%d/i, number);
  21728. }
  21729. function pastFuture (diff, output) {
  21730. var format = this._relativeTime[diff > 0 ? 'future' : 'past'];
  21731. return isFunction(format) ? format(output) : format.replace(/%s/i, output);
  21732. }
  21733. var aliases = {};
  21734. function addUnitAlias (unit, shorthand) {
  21735. var lowerCase = unit.toLowerCase();
  21736. aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;
  21737. }
  21738. function normalizeUnits(units) {
  21739. return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined;
  21740. }
  21741. function normalizeObjectUnits(inputObject) {
  21742. var normalizedInput = {},
  21743. normalizedProp,
  21744. prop;
  21745. for (prop in inputObject) {
  21746. if (hasOwnProp(inputObject, prop)) {
  21747. normalizedProp = normalizeUnits(prop);
  21748. if (normalizedProp) {
  21749. normalizedInput[normalizedProp] = inputObject[prop];
  21750. }
  21751. }
  21752. }
  21753. return normalizedInput;
  21754. }
  21755. var priorities = {};
  21756. function addUnitPriority(unit, priority) {
  21757. priorities[unit] = priority;
  21758. }
  21759. function getPrioritizedUnits(unitsObj) {
  21760. var units = [];
  21761. for (var u in unitsObj) {
  21762. units.push({unit: u, priority: priorities[u]});
  21763. }
  21764. units.sort(function (a, b) {
  21765. return a.priority - b.priority;
  21766. });
  21767. return units;
  21768. }
  21769. function zeroFill(number, targetLength, forceSign) {
  21770. var absNumber = '' + Math.abs(number),
  21771. zerosToFill = targetLength - absNumber.length,
  21772. sign = number >= 0;
  21773. return (sign ? (forceSign ? '+' : '') : '-') +
  21774. Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber;
  21775. }
  21776. var formattingTokens = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;
  21777. var localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g;
  21778. var formatFunctions = {};
  21779. var formatTokenFunctions = {};
  21780. // token: 'M'
  21781. // padded: ['MM', 2]
  21782. // ordinal: 'Mo'
  21783. // callback: function () { this.month() + 1 }
  21784. function addFormatToken (token, padded, ordinal, callback) {
  21785. var func = callback;
  21786. if (typeof callback === 'string') {
  21787. func = function () {
  21788. return this[callback]();
  21789. };
  21790. }
  21791. if (token) {
  21792. formatTokenFunctions[token] = func;
  21793. }
  21794. if (padded) {
  21795. formatTokenFunctions[padded[0]] = function () {
  21796. return zeroFill(func.apply(this, arguments), padded[1], padded[2]);
  21797. };
  21798. }
  21799. if (ordinal) {
  21800. formatTokenFunctions[ordinal] = function () {
  21801. return this.localeData().ordinal(func.apply(this, arguments), token);
  21802. };
  21803. }
  21804. }
  21805. function removeFormattingTokens(input) {
  21806. if (input.match(/\[[\s\S]/)) {
  21807. return input.replace(/^\[|\]$/g, '');
  21808. }
  21809. return input.replace(/\\/g, '');
  21810. }
  21811. function makeFormatFunction(format) {
  21812. var array = format.match(formattingTokens), i, length;
  21813. for (i = 0, length = array.length; i < length; i++) {
  21814. if (formatTokenFunctions[array[i]]) {
  21815. array[i] = formatTokenFunctions[array[i]];
  21816. } else {
  21817. array[i] = removeFormattingTokens(array[i]);
  21818. }
  21819. }
  21820. return function (mom) {
  21821. var output = '', i;
  21822. for (i = 0; i < length; i++) {
  21823. output += isFunction(array[i]) ? array[i].call(mom, format) : array[i];
  21824. }
  21825. return output;
  21826. };
  21827. }
  21828. // format date using native date object
  21829. function formatMoment(m, format) {
  21830. if (!m.isValid()) {
  21831. return m.localeData().invalidDate();
  21832. }
  21833. format = expandFormat(format, m.localeData());
  21834. formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format);
  21835. return formatFunctions[format](m);
  21836. }
  21837. function expandFormat(format, locale) {
  21838. var i = 5;
  21839. function replaceLongDateFormatTokens(input) {
  21840. return locale.longDateFormat(input) || input;
  21841. }
  21842. localFormattingTokens.lastIndex = 0;
  21843. while (i >= 0 && localFormattingTokens.test(format)) {
  21844. format = format.replace(localFormattingTokens, replaceLongDateFormatTokens);
  21845. localFormattingTokens.lastIndex = 0;
  21846. i -= 1;
  21847. }
  21848. return format;
  21849. }
  21850. var match1 = /\d/; // 0 - 9
  21851. var match2 = /\d\d/; // 00 - 99
  21852. var match3 = /\d{3}/; // 000 - 999
  21853. var match4 = /\d{4}/; // 0000 - 9999
  21854. var match6 = /[+-]?\d{6}/; // -999999 - 999999
  21855. var match1to2 = /\d\d?/; // 0 - 99
  21856. var match3to4 = /\d\d\d\d?/; // 999 - 9999
  21857. var match5to6 = /\d\d\d\d\d\d?/; // 99999 - 999999
  21858. var match1to3 = /\d{1,3}/; // 0 - 999
  21859. var match1to4 = /\d{1,4}/; // 0 - 9999
  21860. var match1to6 = /[+-]?\d{1,6}/; // -999999 - 999999
  21861. var matchUnsigned = /\d+/; // 0 - inf
  21862. var matchSigned = /[+-]?\d+/; // -inf - inf
  21863. var matchOffset = /Z|[+-]\d\d:?\d\d/gi; // +00:00 -00:00 +0000 -0000 or Z
  21864. var matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi; // +00 -00 +00:00 -00:00 +0000 -0000 or Z
  21865. var matchTimestamp = /[+-]?\d+(\.\d{1,3})?/; // 123456789 123456789.123
  21866. // any word (or two) characters or numbers including two/three word month in arabic.
  21867. // includes scottish gaelic two word and hyphenated months
  21868. var matchWord = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;
  21869. var regexes = {};
  21870. function addRegexToken (token, regex, strictRegex) {
  21871. regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) {
  21872. return (isStrict && strictRegex) ? strictRegex : regex;
  21873. };
  21874. }
  21875. function getParseRegexForToken (token, config) {
  21876. if (!hasOwnProp(regexes, token)) {
  21877. return new RegExp(unescapeFormat(token));
  21878. }
  21879. return regexes[token](config._strict, config._locale);
  21880. }
  21881. // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
  21882. function unescapeFormat(s) {
  21883. return regexEscape(s.replace('\\', '').replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) {
  21884. return p1 || p2 || p3 || p4;
  21885. }));
  21886. }
  21887. function regexEscape(s) {
  21888. return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
  21889. }
  21890. var tokens = {};
  21891. function addParseToken (token, callback) {
  21892. var i, func = callback;
  21893. if (typeof token === 'string') {
  21894. token = [token];
  21895. }
  21896. if (isNumber(callback)) {
  21897. func = function (input, array) {
  21898. array[callback] = toInt(input);
  21899. };
  21900. }
  21901. for (i = 0; i < token.length; i++) {
  21902. tokens[token[i]] = func;
  21903. }
  21904. }
  21905. function addWeekParseToken (token, callback) {
  21906. addParseToken(token, function (input, array, config, token) {
  21907. config._w = config._w || {};
  21908. callback(input, config._w, config, token);
  21909. });
  21910. }
  21911. function addTimeToArrayFromToken(token, input, config) {
  21912. if (input != null && hasOwnProp(tokens, token)) {
  21913. tokens[token](input, config._a, config, token);
  21914. }
  21915. }
  21916. var YEAR = 0;
  21917. var MONTH = 1;
  21918. var DATE = 2;
  21919. var HOUR = 3;
  21920. var MINUTE = 4;
  21921. var SECOND = 5;
  21922. var MILLISECOND = 6;
  21923. var WEEK = 7;
  21924. var WEEKDAY = 8;
  21925. // FORMATTING
  21926. addFormatToken('Y', 0, 0, function () {
  21927. var y = this.year();
  21928. return y <= 9999 ? '' + y : '+' + y;
  21929. });
  21930. addFormatToken(0, ['YY', 2], 0, function () {
  21931. return this.year() % 100;
  21932. });
  21933. addFormatToken(0, ['YYYY', 4], 0, 'year');
  21934. addFormatToken(0, ['YYYYY', 5], 0, 'year');
  21935. addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');
  21936. // ALIASES
  21937. addUnitAlias('year', 'y');
  21938. // PRIORITIES
  21939. addUnitPriority('year', 1);
  21940. // PARSING
  21941. addRegexToken('Y', matchSigned);
  21942. addRegexToken('YY', match1to2, match2);
  21943. addRegexToken('YYYY', match1to4, match4);
  21944. addRegexToken('YYYYY', match1to6, match6);
  21945. addRegexToken('YYYYYY', match1to6, match6);
  21946. addParseToken(['YYYYY', 'YYYYYY'], YEAR);
  21947. addParseToken('YYYY', function (input, array) {
  21948. array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);
  21949. });
  21950. addParseToken('YY', function (input, array) {
  21951. array[YEAR] = hooks.parseTwoDigitYear(input);
  21952. });
  21953. addParseToken('Y', function (input, array) {
  21954. array[YEAR] = parseInt(input, 10);
  21955. });
  21956. // HELPERS
  21957. function daysInYear(year) {
  21958. return isLeapYear(year) ? 366 : 365;
  21959. }
  21960. function isLeapYear(year) {
  21961. return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
  21962. }
  21963. // HOOKS
  21964. hooks.parseTwoDigitYear = function (input) {
  21965. return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);
  21966. };
  21967. // MOMENTS
  21968. var getSetYear = makeGetSet('FullYear', true);
  21969. function getIsLeapYear () {
  21970. return isLeapYear(this.year());
  21971. }
  21972. function makeGetSet (unit, keepTime) {
  21973. return function (value) {
  21974. if (value != null) {
  21975. set$1(this, unit, value);
  21976. hooks.updateOffset(this, keepTime);
  21977. return this;
  21978. } else {
  21979. return get(this, unit);
  21980. }
  21981. };
  21982. }
  21983. function get (mom, unit) {
  21984. return mom.isValid() ?
  21985. mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN;
  21986. }
  21987. function set$1 (mom, unit, value) {
  21988. if (mom.isValid() && !isNaN(value)) {
  21989. if (unit === 'FullYear' && isLeapYear(mom.year()) && mom.month() === 1 && mom.date() === 29) {
  21990. mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value, mom.month(), daysInMonth(value, mom.month()));
  21991. }
  21992. else {
  21993. mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);
  21994. }
  21995. }
  21996. }
  21997. // MOMENTS
  21998. function stringGet (units) {
  21999. units = normalizeUnits(units);
  22000. if (isFunction(this[units])) {
  22001. return this[units]();
  22002. }
  22003. return this;
  22004. }
  22005. function stringSet (units, value) {
  22006. if (typeof units === 'object') {
  22007. units = normalizeObjectUnits(units);
  22008. var prioritized = getPrioritizedUnits(units);
  22009. for (var i = 0; i < prioritized.length; i++) {
  22010. this[prioritized[i].unit](units[prioritized[i].unit]);
  22011. }
  22012. } else {
  22013. units = normalizeUnits(units);
  22014. if (isFunction(this[units])) {
  22015. return this[units](value);
  22016. }
  22017. }
  22018. return this;
  22019. }
  22020. function mod(n, x) {
  22021. return ((n % x) + x) % x;
  22022. }
  22023. var indexOf;
  22024. if (Array.prototype.indexOf) {
  22025. indexOf = Array.prototype.indexOf;
  22026. } else {
  22027. indexOf = function (o) {
  22028. // I know
  22029. var i;
  22030. for (i = 0; i < this.length; ++i) {
  22031. if (this[i] === o) {
  22032. return i;
  22033. }
  22034. }
  22035. return -1;
  22036. };
  22037. }
  22038. function daysInMonth(year, month) {
  22039. if (isNaN(year) || isNaN(month)) {
  22040. return NaN;
  22041. }
  22042. var modMonth = mod(month, 12);
  22043. year += (month - modMonth) / 12;
  22044. return modMonth === 1 ? (isLeapYear(year) ? 29 : 28) : (31 - modMonth % 7 % 2);
  22045. }
  22046. // FORMATTING
  22047. addFormatToken('M', ['MM', 2], 'Mo', function () {
  22048. return this.month() + 1;
  22049. });
  22050. addFormatToken('MMM', 0, 0, function (format) {
  22051. return this.localeData().monthsShort(this, format);
  22052. });
  22053. addFormatToken('MMMM', 0, 0, function (format) {
  22054. return this.localeData().months(this, format);
  22055. });
  22056. // ALIASES
  22057. addUnitAlias('month', 'M');
  22058. // PRIORITY
  22059. addUnitPriority('month', 8);
  22060. // PARSING
  22061. addRegexToken('M', match1to2);
  22062. addRegexToken('MM', match1to2, match2);
  22063. addRegexToken('MMM', function (isStrict, locale) {
  22064. return locale.monthsShortRegex(isStrict);
  22065. });
  22066. addRegexToken('MMMM', function (isStrict, locale) {
  22067. return locale.monthsRegex(isStrict);
  22068. });
  22069. addParseToken(['M', 'MM'], function (input, array) {
  22070. array[MONTH] = toInt(input) - 1;
  22071. });
  22072. addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {
  22073. var month = config._locale.monthsParse(input, token, config._strict);
  22074. // if we didn't find a month name, mark the date as invalid.
  22075. if (month != null) {
  22076. array[MONTH] = month;
  22077. } else {
  22078. getParsingFlags(config).invalidMonth = input;
  22079. }
  22080. });
  22081. // LOCALES
  22082. var MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/;
  22083. var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_');
  22084. function localeMonths (m, format) {
  22085. if (!m) {
  22086. return isArray(this._months) ? this._months :
  22087. this._months['standalone'];
  22088. }
  22089. return isArray(this._months) ? this._months[m.month()] :
  22090. this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()];
  22091. }
  22092. var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_');
  22093. function localeMonthsShort (m, format) {
  22094. if (!m) {
  22095. return isArray(this._monthsShort) ? this._monthsShort :
  22096. this._monthsShort['standalone'];
  22097. }
  22098. return isArray(this._monthsShort) ? this._monthsShort[m.month()] :
  22099. this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()];
  22100. }
  22101. function handleStrictParse(monthName, format, strict) {
  22102. var i, ii, mom, llc = monthName.toLocaleLowerCase();
  22103. if (!this._monthsParse) {
  22104. // this is not used
  22105. this._monthsParse = [];
  22106. this._longMonthsParse = [];
  22107. this._shortMonthsParse = [];
  22108. for (i = 0; i < 12; ++i) {
  22109. mom = createUTC([2000, i]);
  22110. this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase();
  22111. this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();
  22112. }
  22113. }
  22114. if (strict) {
  22115. if (format === 'MMM') {
  22116. ii = indexOf.call(this._shortMonthsParse, llc);
  22117. return ii !== -1 ? ii : null;
  22118. } else {
  22119. ii = indexOf.call(this._longMonthsParse, llc);
  22120. return ii !== -1 ? ii : null;
  22121. }
  22122. } else {
  22123. if (format === 'MMM') {
  22124. ii = indexOf.call(this._shortMonthsParse, llc);
  22125. if (ii !== -1) {
  22126. return ii;
  22127. }
  22128. ii = indexOf.call(this._longMonthsParse, llc);
  22129. return ii !== -1 ? ii : null;
  22130. } else {
  22131. ii = indexOf.call(this._longMonthsParse, llc);
  22132. if (ii !== -1) {
  22133. return ii;
  22134. }
  22135. ii = indexOf.call(this._shortMonthsParse, llc);
  22136. return ii !== -1 ? ii : null;
  22137. }
  22138. }
  22139. }
  22140. function localeMonthsParse (monthName, format, strict) {
  22141. var i, mom, regex;
  22142. if (this._monthsParseExact) {
  22143. return handleStrictParse.call(this, monthName, format, strict);
  22144. }
  22145. if (!this._monthsParse) {
  22146. this._monthsParse = [];
  22147. this._longMonthsParse = [];
  22148. this._shortMonthsParse = [];
  22149. }
  22150. // TODO: add sorting
  22151. // Sorting makes sure if one month (or abbr) is a prefix of another
  22152. // see sorting in computeMonthsParse
  22153. for (i = 0; i < 12; i++) {
  22154. // make the regex if we don't have it already
  22155. mom = createUTC([2000, i]);
  22156. if (strict && !this._longMonthsParse[i]) {
  22157. this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i');
  22158. this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i');
  22159. }
  22160. if (!strict && !this._monthsParse[i]) {
  22161. regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');
  22162. this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');
  22163. }
  22164. // test the regex
  22165. if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) {
  22166. return i;
  22167. } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) {
  22168. return i;
  22169. } else if (!strict && this._monthsParse[i].test(monthName)) {
  22170. return i;
  22171. }
  22172. }
  22173. }
  22174. // MOMENTS
  22175. function setMonth (mom, value) {
  22176. var dayOfMonth;
  22177. if (!mom.isValid()) {
  22178. // No op
  22179. return mom;
  22180. }
  22181. if (typeof value === 'string') {
  22182. if (/^\d+$/.test(value)) {
  22183. value = toInt(value);
  22184. } else {
  22185. value = mom.localeData().monthsParse(value);
  22186. // TODO: Another silent failure?
  22187. if (!isNumber(value)) {
  22188. return mom;
  22189. }
  22190. }
  22191. }
  22192. dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));
  22193. mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);
  22194. return mom;
  22195. }
  22196. function getSetMonth (value) {
  22197. if (value != null) {
  22198. setMonth(this, value);
  22199. hooks.updateOffset(this, true);
  22200. return this;
  22201. } else {
  22202. return get(this, 'Month');
  22203. }
  22204. }
  22205. function getDaysInMonth () {
  22206. return daysInMonth(this.year(), this.month());
  22207. }
  22208. var defaultMonthsShortRegex = matchWord;
  22209. function monthsShortRegex (isStrict) {
  22210. if (this._monthsParseExact) {
  22211. if (!hasOwnProp(this, '_monthsRegex')) {
  22212. computeMonthsParse.call(this);
  22213. }
  22214. if (isStrict) {
  22215. return this._monthsShortStrictRegex;
  22216. } else {
  22217. return this._monthsShortRegex;
  22218. }
  22219. } else {
  22220. if (!hasOwnProp(this, '_monthsShortRegex')) {
  22221. this._monthsShortRegex = defaultMonthsShortRegex;
  22222. }
  22223. return this._monthsShortStrictRegex && isStrict ?
  22224. this._monthsShortStrictRegex : this._monthsShortRegex;
  22225. }
  22226. }
  22227. var defaultMonthsRegex = matchWord;
  22228. function monthsRegex (isStrict) {
  22229. if (this._monthsParseExact) {
  22230. if (!hasOwnProp(this, '_monthsRegex')) {
  22231. computeMonthsParse.call(this);
  22232. }
  22233. if (isStrict) {
  22234. return this._monthsStrictRegex;
  22235. } else {
  22236. return this._monthsRegex;
  22237. }
  22238. } else {
  22239. if (!hasOwnProp(this, '_monthsRegex')) {
  22240. this._monthsRegex = defaultMonthsRegex;
  22241. }
  22242. return this._monthsStrictRegex && isStrict ?
  22243. this._monthsStrictRegex : this._monthsRegex;
  22244. }
  22245. }
  22246. function computeMonthsParse () {
  22247. function cmpLenRev(a, b) {
  22248. return b.length - a.length;
  22249. }
  22250. var shortPieces = [], longPieces = [], mixedPieces = [],
  22251. i, mom;
  22252. for (i = 0; i < 12; i++) {
  22253. // make the regex if we don't have it already
  22254. mom = createUTC([2000, i]);
  22255. shortPieces.push(this.monthsShort(mom, ''));
  22256. longPieces.push(this.months(mom, ''));
  22257. mixedPieces.push(this.months(mom, ''));
  22258. mixedPieces.push(this.monthsShort(mom, ''));
  22259. }
  22260. // Sorting makes sure if one month (or abbr) is a prefix of another it
  22261. // will match the longer piece.
  22262. shortPieces.sort(cmpLenRev);
  22263. longPieces.sort(cmpLenRev);
  22264. mixedPieces.sort(cmpLenRev);
  22265. for (i = 0; i < 12; i++) {
  22266. shortPieces[i] = regexEscape(shortPieces[i]);
  22267. longPieces[i] = regexEscape(longPieces[i]);
  22268. }
  22269. for (i = 0; i < 24; i++) {
  22270. mixedPieces[i] = regexEscape(mixedPieces[i]);
  22271. }
  22272. this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
  22273. this._monthsShortRegex = this._monthsRegex;
  22274. this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');
  22275. this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');
  22276. }
  22277. function createDate (y, m, d, h, M, s, ms) {
  22278. // can't just apply() to create a date:
  22279. // https://stackoverflow.com/q/181348
  22280. var date = new Date(y, m, d, h, M, s, ms);
  22281. // the date constructor remaps years 0-99 to 1900-1999
  22282. if (y < 100 && y >= 0 && isFinite(date.getFullYear())) {
  22283. date.setFullYear(y);
  22284. }
  22285. return date;
  22286. }
  22287. function createUTCDate (y) {
  22288. var date = new Date(Date.UTC.apply(null, arguments));
  22289. // the Date.UTC function remaps years 0-99 to 1900-1999
  22290. if (y < 100 && y >= 0 && isFinite(date.getUTCFullYear())) {
  22291. date.setUTCFullYear(y);
  22292. }
  22293. return date;
  22294. }
  22295. // start-of-first-week - start-of-year
  22296. function firstWeekOffset(year, dow, doy) {
  22297. var // first-week day -- which january is always in the first week (4 for iso, 1 for other)
  22298. fwd = 7 + dow - doy,
  22299. // first-week day local weekday -- which local weekday is fwd
  22300. fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;
  22301. return -fwdlw + fwd - 1;
  22302. }
  22303. // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday
  22304. function dayOfYearFromWeeks(year, week, weekday, dow, doy) {
  22305. var localWeekday = (7 + weekday - dow) % 7,
  22306. weekOffset = firstWeekOffset(year, dow, doy),
  22307. dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,
  22308. resYear, resDayOfYear;
  22309. if (dayOfYear <= 0) {
  22310. resYear = year - 1;
  22311. resDayOfYear = daysInYear(resYear) + dayOfYear;
  22312. } else if (dayOfYear > daysInYear(year)) {
  22313. resYear = year + 1;
  22314. resDayOfYear = dayOfYear - daysInYear(year);
  22315. } else {
  22316. resYear = year;
  22317. resDayOfYear = dayOfYear;
  22318. }
  22319. return {
  22320. year: resYear,
  22321. dayOfYear: resDayOfYear
  22322. };
  22323. }
  22324. function weekOfYear(mom, dow, doy) {
  22325. var weekOffset = firstWeekOffset(mom.year(), dow, doy),
  22326. week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,
  22327. resWeek, resYear;
  22328. if (week < 1) {
  22329. resYear = mom.year() - 1;
  22330. resWeek = week + weeksInYear(resYear, dow, doy);
  22331. } else if (week > weeksInYear(mom.year(), dow, doy)) {
  22332. resWeek = week - weeksInYear(mom.year(), dow, doy);
  22333. resYear = mom.year() + 1;
  22334. } else {
  22335. resYear = mom.year();
  22336. resWeek = week;
  22337. }
  22338. return {
  22339. week: resWeek,
  22340. year: resYear
  22341. };
  22342. }
  22343. function weeksInYear(year, dow, doy) {
  22344. var weekOffset = firstWeekOffset(year, dow, doy),
  22345. weekOffsetNext = firstWeekOffset(year + 1, dow, doy);
  22346. return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;
  22347. }
  22348. // FORMATTING
  22349. addFormatToken('w', ['ww', 2], 'wo', 'week');
  22350. addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');
  22351. // ALIASES
  22352. addUnitAlias('week', 'w');
  22353. addUnitAlias('isoWeek', 'W');
  22354. // PRIORITIES
  22355. addUnitPriority('week', 5);
  22356. addUnitPriority('isoWeek', 5);
  22357. // PARSING
  22358. addRegexToken('w', match1to2);
  22359. addRegexToken('ww', match1to2, match2);
  22360. addRegexToken('W', match1to2);
  22361. addRegexToken('WW', match1to2, match2);
  22362. addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) {
  22363. week[token.substr(0, 1)] = toInt(input);
  22364. });
  22365. // HELPERS
  22366. // LOCALES
  22367. function localeWeek (mom) {
  22368. return weekOfYear(mom, this._week.dow, this._week.doy).week;
  22369. }
  22370. var defaultLocaleWeek = {
  22371. dow : 0, // Sunday is the first day of the week.
  22372. doy : 6 // The week that contains Jan 1st is the first week of the year.
  22373. };
  22374. function localeFirstDayOfWeek () {
  22375. return this._week.dow;
  22376. }
  22377. function localeFirstDayOfYear () {
  22378. return this._week.doy;
  22379. }
  22380. // MOMENTS
  22381. function getSetWeek (input) {
  22382. var week = this.localeData().week(this);
  22383. return input == null ? week : this.add((input - week) * 7, 'd');
  22384. }
  22385. function getSetISOWeek (input) {
  22386. var week = weekOfYear(this, 1, 4).week;
  22387. return input == null ? week : this.add((input - week) * 7, 'd');
  22388. }
  22389. // FORMATTING
  22390. addFormatToken('d', 0, 'do', 'day');
  22391. addFormatToken('dd', 0, 0, function (format) {
  22392. return this.localeData().weekdaysMin(this, format);
  22393. });
  22394. addFormatToken('ddd', 0, 0, function (format) {
  22395. return this.localeData().weekdaysShort(this, format);
  22396. });
  22397. addFormatToken('dddd', 0, 0, function (format) {
  22398. return this.localeData().weekdays(this, format);
  22399. });
  22400. addFormatToken('e', 0, 0, 'weekday');
  22401. addFormatToken('E', 0, 0, 'isoWeekday');
  22402. // ALIASES
  22403. addUnitAlias('day', 'd');
  22404. addUnitAlias('weekday', 'e');
  22405. addUnitAlias('isoWeekday', 'E');
  22406. // PRIORITY
  22407. addUnitPriority('day', 11);
  22408. addUnitPriority('weekday', 11);
  22409. addUnitPriority('isoWeekday', 11);
  22410. // PARSING
  22411. addRegexToken('d', match1to2);
  22412. addRegexToken('e', match1to2);
  22413. addRegexToken('E', match1to2);
  22414. addRegexToken('dd', function (isStrict, locale) {
  22415. return locale.weekdaysMinRegex(isStrict);
  22416. });
  22417. addRegexToken('ddd', function (isStrict, locale) {
  22418. return locale.weekdaysShortRegex(isStrict);
  22419. });
  22420. addRegexToken('dddd', function (isStrict, locale) {
  22421. return locale.weekdaysRegex(isStrict);
  22422. });
  22423. addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {
  22424. var weekday = config._locale.weekdaysParse(input, token, config._strict);
  22425. // if we didn't get a weekday name, mark the date as invalid
  22426. if (weekday != null) {
  22427. week.d = weekday;
  22428. } else {
  22429. getParsingFlags(config).invalidWeekday = input;
  22430. }
  22431. });
  22432. addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {
  22433. week[token] = toInt(input);
  22434. });
  22435. // HELPERS
  22436. function parseWeekday(input, locale) {
  22437. if (typeof input !== 'string') {
  22438. return input;
  22439. }
  22440. if (!isNaN(input)) {
  22441. return parseInt(input, 10);
  22442. }
  22443. input = locale.weekdaysParse(input);
  22444. if (typeof input === 'number') {
  22445. return input;
  22446. }
  22447. return null;
  22448. }
  22449. function parseIsoWeekday(input, locale) {
  22450. if (typeof input === 'string') {
  22451. return locale.weekdaysParse(input) % 7 || 7;
  22452. }
  22453. return isNaN(input) ? null : input;
  22454. }
  22455. // LOCALES
  22456. var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_');
  22457. function localeWeekdays (m, format) {
  22458. if (!m) {
  22459. return isArray(this._weekdays) ? this._weekdays :
  22460. this._weekdays['standalone'];
  22461. }
  22462. return isArray(this._weekdays) ? this._weekdays[m.day()] :
  22463. this._weekdays[this._weekdays.isFormat.test(format) ? 'format' : 'standalone'][m.day()];
  22464. }
  22465. var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_');
  22466. function localeWeekdaysShort (m) {
  22467. return (m) ? this._weekdaysShort[m.day()] : this._weekdaysShort;
  22468. }
  22469. var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_');
  22470. function localeWeekdaysMin (m) {
  22471. return (m) ? this._weekdaysMin[m.day()] : this._weekdaysMin;
  22472. }
  22473. function handleStrictParse$1(weekdayName, format, strict) {
  22474. var i, ii, mom, llc = weekdayName.toLocaleLowerCase();
  22475. if (!this._weekdaysParse) {
  22476. this._weekdaysParse = [];
  22477. this._shortWeekdaysParse = [];
  22478. this._minWeekdaysParse = [];
  22479. for (i = 0; i < 7; ++i) {
  22480. mom = createUTC([2000, 1]).day(i);
  22481. this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase();
  22482. this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase();
  22483. this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();
  22484. }
  22485. }
  22486. if (strict) {
  22487. if (format === 'dddd') {
  22488. ii = indexOf.call(this._weekdaysParse, llc);
  22489. return ii !== -1 ? ii : null;
  22490. } else if (format === 'ddd') {
  22491. ii = indexOf.call(this._shortWeekdaysParse, llc);
  22492. return ii !== -1 ? ii : null;
  22493. } else {
  22494. ii = indexOf.call(this._minWeekdaysParse, llc);
  22495. return ii !== -1 ? ii : null;
  22496. }
  22497. } else {
  22498. if (format === 'dddd') {
  22499. ii = indexOf.call(this._weekdaysParse, llc);
  22500. if (ii !== -1) {
  22501. return ii;
  22502. }
  22503. ii = indexOf.call(this._shortWeekdaysParse, llc);
  22504. if (ii !== -1) {
  22505. return ii;
  22506. }
  22507. ii = indexOf.call(this._minWeekdaysParse, llc);
  22508. return ii !== -1 ? ii : null;
  22509. } else if (format === 'ddd') {
  22510. ii = indexOf.call(this._shortWeekdaysParse, llc);
  22511. if (ii !== -1) {
  22512. return ii;
  22513. }
  22514. ii = indexOf.call(this._weekdaysParse, llc);
  22515. if (ii !== -1) {
  22516. return ii;
  22517. }
  22518. ii = indexOf.call(this._minWeekdaysParse, llc);
  22519. return ii !== -1 ? ii : null;
  22520. } else {
  22521. ii = indexOf.call(this._minWeekdaysParse, llc);
  22522. if (ii !== -1) {
  22523. return ii;
  22524. }
  22525. ii = indexOf.call(this._weekdaysParse, llc);
  22526. if (ii !== -1) {
  22527. return ii;
  22528. }
  22529. ii = indexOf.call(this._shortWeekdaysParse, llc);
  22530. return ii !== -1 ? ii : null;
  22531. }
  22532. }
  22533. }
  22534. function localeWeekdaysParse (weekdayName, format, strict) {
  22535. var i, mom, regex;
  22536. if (this._weekdaysParseExact) {
  22537. return handleStrictParse$1.call(this, weekdayName, format, strict);
  22538. }
  22539. if (!this._weekdaysParse) {
  22540. this._weekdaysParse = [];
  22541. this._minWeekdaysParse = [];
  22542. this._shortWeekdaysParse = [];
  22543. this._fullWeekdaysParse = [];
  22544. }
  22545. for (i = 0; i < 7; i++) {
  22546. // make the regex if we don't have it already
  22547. mom = createUTC([2000, 1]).day(i);
  22548. if (strict && !this._fullWeekdaysParse[i]) {
  22549. this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\.?') + '$', 'i');
  22550. this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\.?') + '$', 'i');
  22551. this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\.?') + '$', 'i');
  22552. }
  22553. if (!this._weekdaysParse[i]) {
  22554. regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, '');
  22555. this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');
  22556. }
  22557. // test the regex
  22558. if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) {
  22559. return i;
  22560. } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) {
  22561. return i;
  22562. } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) {
  22563. return i;
  22564. } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {
  22565. return i;
  22566. }
  22567. }
  22568. }
  22569. // MOMENTS
  22570. function getSetDayOfWeek (input) {
  22571. if (!this.isValid()) {
  22572. return input != null ? this : NaN;
  22573. }
  22574. var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();
  22575. if (input != null) {
  22576. input = parseWeekday(input, this.localeData());
  22577. return this.add(input - day, 'd');
  22578. } else {
  22579. return day;
  22580. }
  22581. }
  22582. function getSetLocaleDayOfWeek (input) {
  22583. if (!this.isValid()) {
  22584. return input != null ? this : NaN;
  22585. }
  22586. var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;
  22587. return input == null ? weekday : this.add(input - weekday, 'd');
  22588. }
  22589. function getSetISODayOfWeek (input) {
  22590. if (!this.isValid()) {
  22591. return input != null ? this : NaN;
  22592. }
  22593. // behaves the same as moment#day except
  22594. // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)
  22595. // as a setter, sunday should belong to the previous week.
  22596. if (input != null) {
  22597. var weekday = parseIsoWeekday(input, this.localeData());
  22598. return this.day(this.day() % 7 ? weekday : weekday - 7);
  22599. } else {
  22600. return this.day() || 7;
  22601. }
  22602. }
  22603. var defaultWeekdaysRegex = matchWord;
  22604. function weekdaysRegex (isStrict) {
  22605. if (this._weekdaysParseExact) {
  22606. if (!hasOwnProp(this, '_weekdaysRegex')) {
  22607. computeWeekdaysParse.call(this);
  22608. }
  22609. if (isStrict) {
  22610. return this._weekdaysStrictRegex;
  22611. } else {
  22612. return this._weekdaysRegex;
  22613. }
  22614. } else {
  22615. if (!hasOwnProp(this, '_weekdaysRegex')) {
  22616. this._weekdaysRegex = defaultWeekdaysRegex;
  22617. }
  22618. return this._weekdaysStrictRegex && isStrict ?
  22619. this._weekdaysStrictRegex : this._weekdaysRegex;
  22620. }
  22621. }
  22622. var defaultWeekdaysShortRegex = matchWord;
  22623. function weekdaysShortRegex (isStrict) {
  22624. if (this._weekdaysParseExact) {
  22625. if (!hasOwnProp(this, '_weekdaysRegex')) {
  22626. computeWeekdaysParse.call(this);
  22627. }
  22628. if (isStrict) {
  22629. return this._weekdaysShortStrictRegex;
  22630. } else {
  22631. return this._weekdaysShortRegex;
  22632. }
  22633. } else {
  22634. if (!hasOwnProp(this, '_weekdaysShortRegex')) {
  22635. this._weekdaysShortRegex = defaultWeekdaysShortRegex;
  22636. }
  22637. return this._weekdaysShortStrictRegex && isStrict ?
  22638. this._weekdaysShortStrictRegex : this._weekdaysShortRegex;
  22639. }
  22640. }
  22641. var defaultWeekdaysMinRegex = matchWord;
  22642. function weekdaysMinRegex (isStrict) {
  22643. if (this._weekdaysParseExact) {
  22644. if (!hasOwnProp(this, '_weekdaysRegex')) {
  22645. computeWeekdaysParse.call(this);
  22646. }
  22647. if (isStrict) {
  22648. return this._weekdaysMinStrictRegex;
  22649. } else {
  22650. return this._weekdaysMinRegex;
  22651. }
  22652. } else {
  22653. if (!hasOwnProp(this, '_weekdaysMinRegex')) {
  22654. this._weekdaysMinRegex = defaultWeekdaysMinRegex;
  22655. }
  22656. return this._weekdaysMinStrictRegex && isStrict ?
  22657. this._weekdaysMinStrictRegex : this._weekdaysMinRegex;
  22658. }
  22659. }
  22660. function computeWeekdaysParse () {
  22661. function cmpLenRev(a, b) {
  22662. return b.length - a.length;
  22663. }
  22664. var minPieces = [], shortPieces = [], longPieces = [], mixedPieces = [],
  22665. i, mom, minp, shortp, longp;
  22666. for (i = 0; i < 7; i++) {
  22667. // make the regex if we don't have it already
  22668. mom = createUTC([2000, 1]).day(i);
  22669. minp = this.weekdaysMin(mom, '');
  22670. shortp = this.weekdaysShort(mom, '');
  22671. longp = this.weekdays(mom, '');
  22672. minPieces.push(minp);
  22673. shortPieces.push(shortp);
  22674. longPieces.push(longp);
  22675. mixedPieces.push(minp);
  22676. mixedPieces.push(shortp);
  22677. mixedPieces.push(longp);
  22678. }
  22679. // Sorting makes sure if one weekday (or abbr) is a prefix of another it
  22680. // will match the longer piece.
  22681. minPieces.sort(cmpLenRev);
  22682. shortPieces.sort(cmpLenRev);
  22683. longPieces.sort(cmpLenRev);
  22684. mixedPieces.sort(cmpLenRev);
  22685. for (i = 0; i < 7; i++) {
  22686. shortPieces[i] = regexEscape(shortPieces[i]);
  22687. longPieces[i] = regexEscape(longPieces[i]);
  22688. mixedPieces[i] = regexEscape(mixedPieces[i]);
  22689. }
  22690. this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
  22691. this._weekdaysShortRegex = this._weekdaysRegex;
  22692. this._weekdaysMinRegex = this._weekdaysRegex;
  22693. this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');
  22694. this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');
  22695. this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i');
  22696. }
  22697. // FORMATTING
  22698. function hFormat() {
  22699. return this.hours() % 12 || 12;
  22700. }
  22701. function kFormat() {
  22702. return this.hours() || 24;
  22703. }
  22704. addFormatToken('H', ['HH', 2], 0, 'hour');
  22705. addFormatToken('h', ['hh', 2], 0, hFormat);
  22706. addFormatToken('k', ['kk', 2], 0, kFormat);
  22707. addFormatToken('hmm', 0, 0, function () {
  22708. return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);
  22709. });
  22710. addFormatToken('hmmss', 0, 0, function () {
  22711. return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) +
  22712. zeroFill(this.seconds(), 2);
  22713. });
  22714. addFormatToken('Hmm', 0, 0, function () {
  22715. return '' + this.hours() + zeroFill(this.minutes(), 2);
  22716. });
  22717. addFormatToken('Hmmss', 0, 0, function () {
  22718. return '' + this.hours() + zeroFill(this.minutes(), 2) +
  22719. zeroFill(this.seconds(), 2);
  22720. });
  22721. function meridiem (token, lowercase) {
  22722. addFormatToken(token, 0, 0, function () {
  22723. return this.localeData().meridiem(this.hours(), this.minutes(), lowercase);
  22724. });
  22725. }
  22726. meridiem('a', true);
  22727. meridiem('A', false);
  22728. // ALIASES
  22729. addUnitAlias('hour', 'h');
  22730. // PRIORITY
  22731. addUnitPriority('hour', 13);
  22732. // PARSING
  22733. function matchMeridiem (isStrict, locale) {
  22734. return locale._meridiemParse;
  22735. }
  22736. addRegexToken('a', matchMeridiem);
  22737. addRegexToken('A', matchMeridiem);
  22738. addRegexToken('H', match1to2);
  22739. addRegexToken('h', match1to2);
  22740. addRegexToken('k', match1to2);
  22741. addRegexToken('HH', match1to2, match2);
  22742. addRegexToken('hh', match1to2, match2);
  22743. addRegexToken('kk', match1to2, match2);
  22744. addRegexToken('hmm', match3to4);
  22745. addRegexToken('hmmss', match5to6);
  22746. addRegexToken('Hmm', match3to4);
  22747. addRegexToken('Hmmss', match5to6);
  22748. addParseToken(['H', 'HH'], HOUR);
  22749. addParseToken(['k', 'kk'], function (input, array, config) {
  22750. var kInput = toInt(input);
  22751. array[HOUR] = kInput === 24 ? 0 : kInput;
  22752. });
  22753. addParseToken(['a', 'A'], function (input, array, config) {
  22754. config._isPm = config._locale.isPM(input);
  22755. config._meridiem = input;
  22756. });
  22757. addParseToken(['h', 'hh'], function (input, array, config) {
  22758. array[HOUR] = toInt(input);
  22759. getParsingFlags(config).bigHour = true;
  22760. });
  22761. addParseToken('hmm', function (input, array, config) {
  22762. var pos = input.length - 2;
  22763. array[HOUR] = toInt(input.substr(0, pos));
  22764. array[MINUTE] = toInt(input.substr(pos));
  22765. getParsingFlags(config).bigHour = true;
  22766. });
  22767. addParseToken('hmmss', function (input, array, config) {
  22768. var pos1 = input.length - 4;
  22769. var pos2 = input.length - 2;
  22770. array[HOUR] = toInt(input.substr(0, pos1));
  22771. array[MINUTE] = toInt(input.substr(pos1, 2));
  22772. array[SECOND] = toInt(input.substr(pos2));
  22773. getParsingFlags(config).bigHour = true;
  22774. });
  22775. addParseToken('Hmm', function (input, array, config) {
  22776. var pos = input.length - 2;
  22777. array[HOUR] = toInt(input.substr(0, pos));
  22778. array[MINUTE] = toInt(input.substr(pos));
  22779. });
  22780. addParseToken('Hmmss', function (input, array, config) {
  22781. var pos1 = input.length - 4;
  22782. var pos2 = input.length - 2;
  22783. array[HOUR] = toInt(input.substr(0, pos1));
  22784. array[MINUTE] = toInt(input.substr(pos1, 2));
  22785. array[SECOND] = toInt(input.substr(pos2));
  22786. });
  22787. // LOCALES
  22788. function localeIsPM (input) {
  22789. // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays
  22790. // Using charAt should be more compatible.
  22791. return ((input + '').toLowerCase().charAt(0) === 'p');
  22792. }
  22793. var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i;
  22794. function localeMeridiem (hours, minutes, isLower) {
  22795. if (hours > 11) {
  22796. return isLower ? 'pm' : 'PM';
  22797. } else {
  22798. return isLower ? 'am' : 'AM';
  22799. }
  22800. }
  22801. // MOMENTS
  22802. // Setting the hour should keep the time, because the user explicitly
  22803. // specified which hour he wants. So trying to maintain the same hour (in
  22804. // a new timezone) makes sense. Adding/subtracting hours does not follow
  22805. // this rule.
  22806. var getSetHour = makeGetSet('Hours', true);
  22807. // months
  22808. // week
  22809. // weekdays
  22810. // meridiem
  22811. var baseConfig = {
  22812. calendar: defaultCalendar,
  22813. longDateFormat: defaultLongDateFormat,
  22814. invalidDate: defaultInvalidDate,
  22815. ordinal: defaultOrdinal,
  22816. dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,
  22817. relativeTime: defaultRelativeTime,
  22818. months: defaultLocaleMonths,
  22819. monthsShort: defaultLocaleMonthsShort,
  22820. week: defaultLocaleWeek,
  22821. weekdays: defaultLocaleWeekdays,
  22822. weekdaysMin: defaultLocaleWeekdaysMin,
  22823. weekdaysShort: defaultLocaleWeekdaysShort,
  22824. meridiemParse: defaultLocaleMeridiemParse
  22825. };
  22826. // internal storage for locale config files
  22827. var locales = {};
  22828. var localeFamilies = {};
  22829. var globalLocale;
  22830. function normalizeLocale(key) {
  22831. return key ? key.toLowerCase().replace('_', '-') : key;
  22832. }
  22833. // pick the locale from the array
  22834. // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each
  22835. // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root
  22836. function chooseLocale(names) {
  22837. var i = 0, j, next, locale, split;
  22838. while (i < names.length) {
  22839. split = normalizeLocale(names[i]).split('-');
  22840. j = split.length;
  22841. next = normalizeLocale(names[i + 1]);
  22842. next = next ? next.split('-') : null;
  22843. while (j > 0) {
  22844. locale = loadLocale(split.slice(0, j).join('-'));
  22845. if (locale) {
  22846. return locale;
  22847. }
  22848. if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {
  22849. //the next array item is better than a shallower substring of this one
  22850. break;
  22851. }
  22852. j--;
  22853. }
  22854. i++;
  22855. }
  22856. return null;
  22857. }
  22858. function loadLocale(name) {
  22859. var oldLocale = null;
  22860. // TODO: Find a better way to register and load all the locales in Node
  22861. if (!locales[name] && (typeof module !== 'undefined') &&
  22862. module && module.exports) {
  22863. try {
  22864. oldLocale = globalLocale._abbr;
  22865. var aliasedRequire = require;
  22866. aliasedRequire('./locale/' + name);
  22867. getSetGlobalLocale(oldLocale);
  22868. } catch (e) {}
  22869. }
  22870. return locales[name];
  22871. }
  22872. // This function will load locale and then set the global locale. If
  22873. // no arguments are passed in, it will simply return the current global
  22874. // locale key.
  22875. function getSetGlobalLocale (key, values) {
  22876. var data;
  22877. if (key) {
  22878. if (isUndefined(values)) {
  22879. data = getLocale(key);
  22880. }
  22881. else {
  22882. data = defineLocale(key, values);
  22883. }
  22884. if (data) {
  22885. // moment.duration._locale = moment._locale = data;
  22886. globalLocale = data;
  22887. }
  22888. }
  22889. return globalLocale._abbr;
  22890. }
  22891. function defineLocale (name, config) {
  22892. if (config !== null) {
  22893. var parentConfig = baseConfig;
  22894. config.abbr = name;
  22895. if (locales[name] != null) {
  22896. deprecateSimple('defineLocaleOverride',
  22897. 'use moment.updateLocale(localeName, config) to change ' +
  22898. 'an existing locale. moment.defineLocale(localeName, ' +
  22899. 'config) should only be used for creating a new locale ' +
  22900. 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.');
  22901. parentConfig = locales[name]._config;
  22902. } else if (config.parentLocale != null) {
  22903. if (locales[config.parentLocale] != null) {
  22904. parentConfig = locales[config.parentLocale]._config;
  22905. } else {
  22906. if (!localeFamilies[config.parentLocale]) {
  22907. localeFamilies[config.parentLocale] = [];
  22908. }
  22909. localeFamilies[config.parentLocale].push({
  22910. name: name,
  22911. config: config
  22912. });
  22913. return null;
  22914. }
  22915. }
  22916. locales[name] = new Locale(mergeConfigs(parentConfig, config));
  22917. if (localeFamilies[name]) {
  22918. localeFamilies[name].forEach(function (x) {
  22919. defineLocale(x.name, x.config);
  22920. });
  22921. }
  22922. // backwards compat for now: also set the locale
  22923. // make sure we set the locale AFTER all child locales have been
  22924. // created, so we won't end up with the child locale set.
  22925. getSetGlobalLocale(name);
  22926. return locales[name];
  22927. } else {
  22928. // useful for testing
  22929. delete locales[name];
  22930. return null;
  22931. }
  22932. }
  22933. function updateLocale(name, config) {
  22934. if (config != null) {
  22935. var locale, tmpLocale, parentConfig = baseConfig;
  22936. // MERGE
  22937. tmpLocale = loadLocale(name);
  22938. if (tmpLocale != null) {
  22939. parentConfig = tmpLocale._config;
  22940. }
  22941. config = mergeConfigs(parentConfig, config);
  22942. locale = new Locale(config);
  22943. locale.parentLocale = locales[name];
  22944. locales[name] = locale;
  22945. // backwards compat for now: also set the locale
  22946. getSetGlobalLocale(name);
  22947. } else {
  22948. // pass null for config to unupdate, useful for tests
  22949. if (locales[name] != null) {
  22950. if (locales[name].parentLocale != null) {
  22951. locales[name] = locales[name].parentLocale;
  22952. } else if (locales[name] != null) {
  22953. delete locales[name];
  22954. }
  22955. }
  22956. }
  22957. return locales[name];
  22958. }
  22959. // returns locale data
  22960. function getLocale (key) {
  22961. var locale;
  22962. if (key && key._locale && key._locale._abbr) {
  22963. key = key._locale._abbr;
  22964. }
  22965. if (!key) {
  22966. return globalLocale;
  22967. }
  22968. if (!isArray(key)) {
  22969. //short-circuit everything else
  22970. locale = loadLocale(key);
  22971. if (locale) {
  22972. return locale;
  22973. }
  22974. key = [key];
  22975. }
  22976. return chooseLocale(key);
  22977. }
  22978. function listLocales() {
  22979. return keys(locales);
  22980. }
  22981. function checkOverflow (m) {
  22982. var overflow;
  22983. var a = m._a;
  22984. if (a && getParsingFlags(m).overflow === -2) {
  22985. overflow =
  22986. a[MONTH] < 0 || a[MONTH] > 11 ? MONTH :
  22987. a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE :
  22988. a[HOUR] < 0 || a[HOUR] > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR :
  22989. a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE :
  22990. a[SECOND] < 0 || a[SECOND] > 59 ? SECOND :
  22991. a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND :
  22992. -1;
  22993. if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {
  22994. overflow = DATE;
  22995. }
  22996. if (getParsingFlags(m)._overflowWeeks && overflow === -1) {
  22997. overflow = WEEK;
  22998. }
  22999. if (getParsingFlags(m)._overflowWeekday && overflow === -1) {
  23000. overflow = WEEKDAY;
  23001. }
  23002. getParsingFlags(m).overflow = overflow;
  23003. }
  23004. return m;
  23005. }
  23006. // Pick the first defined of two or three arguments.
  23007. function defaults(a, b, c) {
  23008. if (a != null) {
  23009. return a;
  23010. }
  23011. if (b != null) {
  23012. return b;
  23013. }
  23014. return c;
  23015. }
  23016. function currentDateArray(config) {
  23017. // hooks is actually the exported moment object
  23018. var nowValue = new Date(hooks.now());
  23019. if (config._useUTC) {
  23020. return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()];
  23021. }
  23022. return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];
  23023. }
  23024. // convert an array to a date.
  23025. // the array should mirror the parameters below
  23026. // note: all values past the year are optional and will default to the lowest possible value.
  23027. // [year, month, day , hour, minute, second, millisecond]
  23028. function configFromArray (config) {
  23029. var i, date, input = [], currentDate, expectedWeekday, yearToUse;
  23030. if (config._d) {
  23031. return;
  23032. }
  23033. currentDate = currentDateArray(config);
  23034. //compute day of the year from weeks and weekdays
  23035. if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {
  23036. dayOfYearFromWeekInfo(config);
  23037. }
  23038. //if the day of the year is set, figure out what it is
  23039. if (config._dayOfYear != null) {
  23040. yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);
  23041. if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) {
  23042. getParsingFlags(config)._overflowDayOfYear = true;
  23043. }
  23044. date = createUTCDate(yearToUse, 0, config._dayOfYear);
  23045. config._a[MONTH] = date.getUTCMonth();
  23046. config._a[DATE] = date.getUTCDate();
  23047. }
  23048. // Default to current date.
  23049. // * if no year, month, day of month are given, default to today
  23050. // * if day of month is given, default month and year
  23051. // * if month is given, default only year
  23052. // * if year is given, don't default anything
  23053. for (i = 0; i < 3 && config._a[i] == null; ++i) {
  23054. config._a[i] = input[i] = currentDate[i];
  23055. }
  23056. // Zero out whatever was not defaulted, including time
  23057. for (; i < 7; i++) {
  23058. config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];
  23059. }
  23060. // Check for 24:00:00.000
  23061. if (config._a[HOUR] === 24 &&
  23062. config._a[MINUTE] === 0 &&
  23063. config._a[SECOND] === 0 &&
  23064. config._a[MILLISECOND] === 0) {
  23065. config._nextDay = true;
  23066. config._a[HOUR] = 0;
  23067. }
  23068. config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);
  23069. expectedWeekday = config._useUTC ? config._d.getUTCDay() : config._d.getDay();
  23070. // Apply timezone offset from input. The actual utcOffset can be changed
  23071. // with parseZone.
  23072. if (config._tzm != null) {
  23073. config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
  23074. }
  23075. if (config._nextDay) {
  23076. config._a[HOUR] = 24;
  23077. }
  23078. // check for mismatching day of week
  23079. if (config._w && typeof config._w.d !== 'undefined' && config._w.d !== expectedWeekday) {
  23080. getParsingFlags(config).weekdayMismatch = true;
  23081. }
  23082. }
  23083. function dayOfYearFromWeekInfo(config) {
  23084. var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow;
  23085. w = config._w;
  23086. if (w.GG != null || w.W != null || w.E != null) {
  23087. dow = 1;
  23088. doy = 4;
  23089. // TODO: We need to take the current isoWeekYear, but that depends on
  23090. // how we interpret now (local, utc, fixed offset). So create
  23091. // a now version of current config (take local/utc/offset flags, and
  23092. // create now).
  23093. weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(createLocal(), 1, 4).year);
  23094. week = defaults(w.W, 1);
  23095. weekday = defaults(w.E, 1);
  23096. if (weekday < 1 || weekday > 7) {
  23097. weekdayOverflow = true;
  23098. }
  23099. } else {
  23100. dow = config._locale._week.dow;
  23101. doy = config._locale._week.doy;
  23102. var curWeek = weekOfYear(createLocal(), dow, doy);
  23103. weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);
  23104. // Default to current week.
  23105. week = defaults(w.w, curWeek.week);
  23106. if (w.d != null) {
  23107. // weekday -- low day numbers are considered next week
  23108. weekday = w.d;
  23109. if (weekday < 0 || weekday > 6) {
  23110. weekdayOverflow = true;
  23111. }
  23112. } else if (w.e != null) {
  23113. // local weekday -- counting starts from begining of week
  23114. weekday = w.e + dow;
  23115. if (w.e < 0 || w.e > 6) {
  23116. weekdayOverflow = true;
  23117. }
  23118. } else {
  23119. // default to begining of week
  23120. weekday = dow;
  23121. }
  23122. }
  23123. if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {
  23124. getParsingFlags(config)._overflowWeeks = true;
  23125. } else if (weekdayOverflow != null) {
  23126. getParsingFlags(config)._overflowWeekday = true;
  23127. } else {
  23128. temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);
  23129. config._a[YEAR] = temp.year;
  23130. config._dayOfYear = temp.dayOfYear;
  23131. }
  23132. }
  23133. // iso 8601 regex
  23134. // 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)
  23135. 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)?)?$/;
  23136. var 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)?)?$/;
  23137. var tzRegex = /Z|[+-]\d\d(?::?\d\d)?/;
  23138. var isoDates = [
  23139. ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/],
  23140. ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/],
  23141. ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/],
  23142. ['GGGG-[W]WW', /\d{4}-W\d\d/, false],
  23143. ['YYYY-DDD', /\d{4}-\d{3}/],
  23144. ['YYYY-MM', /\d{4}-\d\d/, false],
  23145. ['YYYYYYMMDD', /[+-]\d{10}/],
  23146. ['YYYYMMDD', /\d{8}/],
  23147. // YYYYMM is NOT allowed by the standard
  23148. ['GGGG[W]WWE', /\d{4}W\d{3}/],
  23149. ['GGGG[W]WW', /\d{4}W\d{2}/, false],
  23150. ['YYYYDDD', /\d{7}/]
  23151. ];
  23152. // iso time formats and regexes
  23153. var isoTimes = [
  23154. ['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/],
  23155. ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/],
  23156. ['HH:mm:ss', /\d\d:\d\d:\d\d/],
  23157. ['HH:mm', /\d\d:\d\d/],
  23158. ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/],
  23159. ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/],
  23160. ['HHmmss', /\d\d\d\d\d\d/],
  23161. ['HHmm', /\d\d\d\d/],
  23162. ['HH', /\d\d/]
  23163. ];
  23164. var aspNetJsonRegex = /^\/?Date\((\-?\d+)/i;
  23165. // date from iso format
  23166. function configFromISO(config) {
  23167. var i, l,
  23168. string = config._i,
  23169. match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),
  23170. allowTime, dateFormat, timeFormat, tzFormat;
  23171. if (match) {
  23172. getParsingFlags(config).iso = true;
  23173. for (i = 0, l = isoDates.length; i < l; i++) {
  23174. if (isoDates[i][1].exec(match[1])) {
  23175. dateFormat = isoDates[i][0];
  23176. allowTime = isoDates[i][2] !== false;
  23177. break;
  23178. }
  23179. }
  23180. if (dateFormat == null) {
  23181. config._isValid = false;
  23182. return;
  23183. }
  23184. if (match[3]) {
  23185. for (i = 0, l = isoTimes.length; i < l; i++) {
  23186. if (isoTimes[i][1].exec(match[3])) {
  23187. // match[2] should be 'T' or space
  23188. timeFormat = (match[2] || ' ') + isoTimes[i][0];
  23189. break;
  23190. }
  23191. }
  23192. if (timeFormat == null) {
  23193. config._isValid = false;
  23194. return;
  23195. }
  23196. }
  23197. if (!allowTime && timeFormat != null) {
  23198. config._isValid = false;
  23199. return;
  23200. }
  23201. if (match[4]) {
  23202. if (tzRegex.exec(match[4])) {
  23203. tzFormat = 'Z';
  23204. } else {
  23205. config._isValid = false;
  23206. return;
  23207. }
  23208. }
  23209. config._f = dateFormat + (timeFormat || '') + (tzFormat || '');
  23210. configFromStringAndFormat(config);
  23211. } else {
  23212. config._isValid = false;
  23213. }
  23214. }
  23215. // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3
  23216. var 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}))$/;
  23217. function extractFromRFC2822Strings(yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) {
  23218. var result = [
  23219. untruncateYear(yearStr),
  23220. defaultLocaleMonthsShort.indexOf(monthStr),
  23221. parseInt(dayStr, 10),
  23222. parseInt(hourStr, 10),
  23223. parseInt(minuteStr, 10)
  23224. ];
  23225. if (secondStr) {
  23226. result.push(parseInt(secondStr, 10));
  23227. }
  23228. return result;
  23229. }
  23230. function untruncateYear(yearStr) {
  23231. var year = parseInt(yearStr, 10);
  23232. if (year <= 49) {
  23233. return 2000 + year;
  23234. } else if (year <= 999) {
  23235. return 1900 + year;
  23236. }
  23237. return year;
  23238. }
  23239. function preprocessRFC2822(s) {
  23240. // Remove comments and folding whitespace and replace multiple-spaces with a single space
  23241. return s.replace(/\([^)]*\)|[\n\t]/g, ' ').replace(/(\s\s+)/g, ' ').trim();
  23242. }
  23243. function checkWeekday(weekdayStr, parsedInput, config) {
  23244. if (weekdayStr) {
  23245. // TODO: Replace the vanilla JS Date object with an indepentent day-of-week check.
  23246. var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),
  23247. weekdayActual = new Date(parsedInput[0], parsedInput[1], parsedInput[2]).getDay();
  23248. if (weekdayProvided !== weekdayActual) {
  23249. getParsingFlags(config).weekdayMismatch = true;
  23250. config._isValid = false;
  23251. return false;
  23252. }
  23253. }
  23254. return true;
  23255. }
  23256. var obsOffsets = {
  23257. UT: 0,
  23258. GMT: 0,
  23259. EDT: -4 * 60,
  23260. EST: -5 * 60,
  23261. CDT: -5 * 60,
  23262. CST: -6 * 60,
  23263. MDT: -6 * 60,
  23264. MST: -7 * 60,
  23265. PDT: -7 * 60,
  23266. PST: -8 * 60
  23267. };
  23268. function calculateOffset(obsOffset, militaryOffset, numOffset) {
  23269. if (obsOffset) {
  23270. return obsOffsets[obsOffset];
  23271. } else if (militaryOffset) {
  23272. // the only allowed military tz is Z
  23273. return 0;
  23274. } else {
  23275. var hm = parseInt(numOffset, 10);
  23276. var m = hm % 100, h = (hm - m) / 100;
  23277. return h * 60 + m;
  23278. }
  23279. }
  23280. // date and time from ref 2822 format
  23281. function configFromRFC2822(config) {
  23282. var match = rfc2822.exec(preprocessRFC2822(config._i));
  23283. if (match) {
  23284. var parsedArray = extractFromRFC2822Strings(match[4], match[3], match[2], match[5], match[6], match[7]);
  23285. if (!checkWeekday(match[1], parsedArray, config)) {
  23286. return;
  23287. }
  23288. config._a = parsedArray;
  23289. config._tzm = calculateOffset(match[8], match[9], match[10]);
  23290. config._d = createUTCDate.apply(null, config._a);
  23291. config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
  23292. getParsingFlags(config).rfc2822 = true;
  23293. } else {
  23294. config._isValid = false;
  23295. }
  23296. }
  23297. // date from iso format or fallback
  23298. function configFromString(config) {
  23299. var matched = aspNetJsonRegex.exec(config._i);
  23300. if (matched !== null) {
  23301. config._d = new Date(+matched[1]);
  23302. return;
  23303. }
  23304. configFromISO(config);
  23305. if (config._isValid === false) {
  23306. delete config._isValid;
  23307. } else {
  23308. return;
  23309. }
  23310. configFromRFC2822(config);
  23311. if (config._isValid === false) {
  23312. delete config._isValid;
  23313. } else {
  23314. return;
  23315. }
  23316. // Final attempt, use Input Fallback
  23317. hooks.createFromInputFallback(config);
  23318. }
  23319. hooks.createFromInputFallback = deprecate(
  23320. 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +
  23321. 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +
  23322. 'discouraged and will be removed in an upcoming major release. Please refer to ' +
  23323. 'http://momentjs.com/guides/#/warnings/js-date/ for more info.',
  23324. function (config) {
  23325. config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));
  23326. }
  23327. );
  23328. // constant that refers to the ISO standard
  23329. hooks.ISO_8601 = function () {};
  23330. // constant that refers to the RFC 2822 form
  23331. hooks.RFC_2822 = function () {};
  23332. // date from string and format string
  23333. function configFromStringAndFormat(config) {
  23334. // TODO: Move this to another part of the creation flow to prevent circular deps
  23335. if (config._f === hooks.ISO_8601) {
  23336. configFromISO(config);
  23337. return;
  23338. }
  23339. if (config._f === hooks.RFC_2822) {
  23340. configFromRFC2822(config);
  23341. return;
  23342. }
  23343. config._a = [];
  23344. getParsingFlags(config).empty = true;
  23345. // This array is used to make a Date, either with `new Date` or `Date.UTC`
  23346. var string = '' + config._i,
  23347. i, parsedInput, tokens, token, skipped,
  23348. stringLength = string.length,
  23349. totalParsedInputLength = 0;
  23350. tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];
  23351. for (i = 0; i < tokens.length; i++) {
  23352. token = tokens[i];
  23353. parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];
  23354. // console.log('token', token, 'parsedInput', parsedInput,
  23355. // 'regex', getParseRegexForToken(token, config));
  23356. if (parsedInput) {
  23357. skipped = string.substr(0, string.indexOf(parsedInput));
  23358. if (skipped.length > 0) {
  23359. getParsingFlags(config).unusedInput.push(skipped);
  23360. }
  23361. string = string.slice(string.indexOf(parsedInput) + parsedInput.length);
  23362. totalParsedInputLength += parsedInput.length;
  23363. }
  23364. // don't parse if it's not a known token
  23365. if (formatTokenFunctions[token]) {
  23366. if (parsedInput) {
  23367. getParsingFlags(config).empty = false;
  23368. }
  23369. else {
  23370. getParsingFlags(config).unusedTokens.push(token);
  23371. }
  23372. addTimeToArrayFromToken(token, parsedInput, config);
  23373. }
  23374. else if (config._strict && !parsedInput) {
  23375. getParsingFlags(config).unusedTokens.push(token);
  23376. }
  23377. }
  23378. // add remaining unparsed input length to the string
  23379. getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength;
  23380. if (string.length > 0) {
  23381. getParsingFlags(config).unusedInput.push(string);
  23382. }
  23383. // clear _12h flag if hour is <= 12
  23384. if (config._a[HOUR] <= 12 &&
  23385. getParsingFlags(config).bigHour === true &&
  23386. config._a[HOUR] > 0) {
  23387. getParsingFlags(config).bigHour = undefined;
  23388. }
  23389. getParsingFlags(config).parsedDateParts = config._a.slice(0);
  23390. getParsingFlags(config).meridiem = config._meridiem;
  23391. // handle meridiem
  23392. config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem);
  23393. configFromArray(config);
  23394. checkOverflow(config);
  23395. }
  23396. function meridiemFixWrap (locale, hour, meridiem) {
  23397. var isPm;
  23398. if (meridiem == null) {
  23399. // nothing to do
  23400. return hour;
  23401. }
  23402. if (locale.meridiemHour != null) {
  23403. return locale.meridiemHour(hour, meridiem);
  23404. } else if (locale.isPM != null) {
  23405. // Fallback
  23406. isPm = locale.isPM(meridiem);
  23407. if (isPm && hour < 12) {
  23408. hour += 12;
  23409. }
  23410. if (!isPm && hour === 12) {
  23411. hour = 0;
  23412. }
  23413. return hour;
  23414. } else {
  23415. // this is not supposed to happen
  23416. return hour;
  23417. }
  23418. }
  23419. // date from string and array of format strings
  23420. function configFromStringAndArray(config) {
  23421. var tempConfig,
  23422. bestMoment,
  23423. scoreToBeat,
  23424. i,
  23425. currentScore;
  23426. if (config._f.length === 0) {
  23427. getParsingFlags(config).invalidFormat = true;
  23428. config._d = new Date(NaN);
  23429. return;
  23430. }
  23431. for (i = 0; i < config._f.length; i++) {
  23432. currentScore = 0;
  23433. tempConfig = copyConfig({}, config);
  23434. if (config._useUTC != null) {
  23435. tempConfig._useUTC = config._useUTC;
  23436. }
  23437. tempConfig._f = config._f[i];
  23438. configFromStringAndFormat(tempConfig);
  23439. if (!isValid(tempConfig)) {
  23440. continue;
  23441. }
  23442. // if there is any input that was not parsed add a penalty for that format
  23443. currentScore += getParsingFlags(tempConfig).charsLeftOver;
  23444. //or tokens
  23445. currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;
  23446. getParsingFlags(tempConfig).score = currentScore;
  23447. if (scoreToBeat == null || currentScore < scoreToBeat) {
  23448. scoreToBeat = currentScore;
  23449. bestMoment = tempConfig;
  23450. }
  23451. }
  23452. extend(config, bestMoment || tempConfig);
  23453. }
  23454. function configFromObject(config) {
  23455. if (config._d) {
  23456. return;
  23457. }
  23458. var i = normalizeObjectUnits(config._i);
  23459. config._a = map([i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], function (obj) {
  23460. return obj && parseInt(obj, 10);
  23461. });
  23462. configFromArray(config);
  23463. }
  23464. function createFromConfig (config) {
  23465. var res = new Moment(checkOverflow(prepareConfig(config)));
  23466. if (res._nextDay) {
  23467. // Adding is smart enough around DST
  23468. res.add(1, 'd');
  23469. res._nextDay = undefined;
  23470. }
  23471. return res;
  23472. }
  23473. function prepareConfig (config) {
  23474. var input = config._i,
  23475. format = config._f;
  23476. config._locale = config._locale || getLocale(config._l);
  23477. if (input === null || (format === undefined && input === '')) {
  23478. return createInvalid({nullInput: true});
  23479. }
  23480. if (typeof input === 'string') {
  23481. config._i = input = config._locale.preparse(input);
  23482. }
  23483. if (isMoment(input)) {
  23484. return new Moment(checkOverflow(input));
  23485. } else if (isDate(input)) {
  23486. config._d = input;
  23487. } else if (isArray(format)) {
  23488. configFromStringAndArray(config);
  23489. } else if (format) {
  23490. configFromStringAndFormat(config);
  23491. } else {
  23492. configFromInput(config);
  23493. }
  23494. if (!isValid(config)) {
  23495. config._d = null;
  23496. }
  23497. return config;
  23498. }
  23499. function configFromInput(config) {
  23500. var input = config._i;
  23501. if (isUndefined(input)) {
  23502. config._d = new Date(hooks.now());
  23503. } else if (isDate(input)) {
  23504. config._d = new Date(input.valueOf());
  23505. } else if (typeof input === 'string') {
  23506. configFromString(config);
  23507. } else if (isArray(input)) {
  23508. config._a = map(input.slice(0), function (obj) {
  23509. return parseInt(obj, 10);
  23510. });
  23511. configFromArray(config);
  23512. } else if (isObject(input)) {
  23513. configFromObject(config);
  23514. } else if (isNumber(input)) {
  23515. // from milliseconds
  23516. config._d = new Date(input);
  23517. } else {
  23518. hooks.createFromInputFallback(config);
  23519. }
  23520. }
  23521. function createLocalOrUTC (input, format, locale, strict, isUTC) {
  23522. var c = {};
  23523. if (locale === true || locale === false) {
  23524. strict = locale;
  23525. locale = undefined;
  23526. }
  23527. if ((isObject(input) && isObjectEmpty(input)) ||
  23528. (isArray(input) && input.length === 0)) {
  23529. input = undefined;
  23530. }
  23531. // object construction must be done this way.
  23532. // https://github.com/moment/moment/issues/1423
  23533. c._isAMomentObject = true;
  23534. c._useUTC = c._isUTC = isUTC;
  23535. c._l = locale;
  23536. c._i = input;
  23537. c._f = format;
  23538. c._strict = strict;
  23539. return createFromConfig(c);
  23540. }
  23541. function createLocal (input, format, locale, strict) {
  23542. return createLocalOrUTC(input, format, locale, strict, false);
  23543. }
  23544. var prototypeMin = deprecate(
  23545. 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',
  23546. function () {
  23547. var other = createLocal.apply(null, arguments);
  23548. if (this.isValid() && other.isValid()) {
  23549. return other < this ? this : other;
  23550. } else {
  23551. return createInvalid();
  23552. }
  23553. }
  23554. );
  23555. var prototypeMax = deprecate(
  23556. 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',
  23557. function () {
  23558. var other = createLocal.apply(null, arguments);
  23559. if (this.isValid() && other.isValid()) {
  23560. return other > this ? this : other;
  23561. } else {
  23562. return createInvalid();
  23563. }
  23564. }
  23565. );
  23566. // Pick a moment m from moments so that m[fn](other) is true for all
  23567. // other. This relies on the function fn to be transitive.
  23568. //
  23569. // moments should either be an array of moment objects or an array, whose
  23570. // first element is an array of moment objects.
  23571. function pickBy(fn, moments) {
  23572. var res, i;
  23573. if (moments.length === 1 && isArray(moments[0])) {
  23574. moments = moments[0];
  23575. }
  23576. if (!moments.length) {
  23577. return createLocal();
  23578. }
  23579. res = moments[0];
  23580. for (i = 1; i < moments.length; ++i) {
  23581. if (!moments[i].isValid() || moments[i][fn](res)) {
  23582. res = moments[i];
  23583. }
  23584. }
  23585. return res;
  23586. }
  23587. // TODO: Use [].sort instead?
  23588. function min () {
  23589. var args = [].slice.call(arguments, 0);
  23590. return pickBy('isBefore', args);
  23591. }
  23592. function max () {
  23593. var args = [].slice.call(arguments, 0);
  23594. return pickBy('isAfter', args);
  23595. }
  23596. var now = function () {
  23597. return Date.now ? Date.now() : +(new Date());
  23598. };
  23599. var ordering = ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond'];
  23600. function isDurationValid(m) {
  23601. for (var key in m) {
  23602. if (!(indexOf.call(ordering, key) !== -1 && (m[key] == null || !isNaN(m[key])))) {
  23603. return false;
  23604. }
  23605. }
  23606. var unitHasDecimal = false;
  23607. for (var i = 0; i < ordering.length; ++i) {
  23608. if (m[ordering[i]]) {
  23609. if (unitHasDecimal) {
  23610. return false; // only allow non-integers for smallest unit
  23611. }
  23612. if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {
  23613. unitHasDecimal = true;
  23614. }
  23615. }
  23616. }
  23617. return true;
  23618. }
  23619. function isValid$1() {
  23620. return this._isValid;
  23621. }
  23622. function createInvalid$1() {
  23623. return createDuration(NaN);
  23624. }
  23625. function Duration (duration) {
  23626. var normalizedInput = normalizeObjectUnits(duration),
  23627. years = normalizedInput.year || 0,
  23628. quarters = normalizedInput.quarter || 0,
  23629. months = normalizedInput.month || 0,
  23630. weeks = normalizedInput.week || 0,
  23631. days = normalizedInput.day || 0,
  23632. hours = normalizedInput.hour || 0,
  23633. minutes = normalizedInput.minute || 0,
  23634. seconds = normalizedInput.second || 0,
  23635. milliseconds = normalizedInput.millisecond || 0;
  23636. this._isValid = isDurationValid(normalizedInput);
  23637. // representation for dateAddRemove
  23638. this._milliseconds = +milliseconds +
  23639. seconds * 1e3 + // 1000
  23640. minutes * 6e4 + // 1000 * 60
  23641. hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978
  23642. // Because of dateAddRemove treats 24 hours as different from a
  23643. // day when working around DST, we need to store them separately
  23644. this._days = +days +
  23645. weeks * 7;
  23646. // It is impossible to translate months into days without knowing
  23647. // which months you are are talking about, so we have to store
  23648. // it separately.
  23649. this._months = +months +
  23650. quarters * 3 +
  23651. years * 12;
  23652. this._data = {};
  23653. this._locale = getLocale();
  23654. this._bubble();
  23655. }
  23656. function isDuration (obj) {
  23657. return obj instanceof Duration;
  23658. }
  23659. function absRound (number) {
  23660. if (number < 0) {
  23661. return Math.round(-1 * number) * -1;
  23662. } else {
  23663. return Math.round(number);
  23664. }
  23665. }
  23666. // FORMATTING
  23667. function offset (token, separator) {
  23668. addFormatToken(token, 0, 0, function () {
  23669. var offset = this.utcOffset();
  23670. var sign = '+';
  23671. if (offset < 0) {
  23672. offset = -offset;
  23673. sign = '-';
  23674. }
  23675. return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~(offset) % 60, 2);
  23676. });
  23677. }
  23678. offset('Z', ':');
  23679. offset('ZZ', '');
  23680. // PARSING
  23681. addRegexToken('Z', matchShortOffset);
  23682. addRegexToken('ZZ', matchShortOffset);
  23683. addParseToken(['Z', 'ZZ'], function (input, array, config) {
  23684. config._useUTC = true;
  23685. config._tzm = offsetFromString(matchShortOffset, input);
  23686. });
  23687. // HELPERS
  23688. // timezone chunker
  23689. // '+10:00' > ['10', '00']
  23690. // '-1530' > ['-15', '30']
  23691. var chunkOffset = /([\+\-]|\d\d)/gi;
  23692. function offsetFromString(matcher, string) {
  23693. var matches = (string || '').match(matcher);
  23694. if (matches === null) {
  23695. return null;
  23696. }
  23697. var chunk = matches[matches.length - 1] || [];
  23698. var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];
  23699. var minutes = +(parts[1] * 60) + toInt(parts[2]);
  23700. return minutes === 0 ?
  23701. 0 :
  23702. parts[0] === '+' ? minutes : -minutes;
  23703. }
  23704. // Return a moment from input, that is local/utc/zone equivalent to model.
  23705. function cloneWithOffset(input, model) {
  23706. var res, diff;
  23707. if (model._isUTC) {
  23708. res = model.clone();
  23709. diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();
  23710. // Use low-level api, because this fn is low-level api.
  23711. res._d.setTime(res._d.valueOf() + diff);
  23712. hooks.updateOffset(res, false);
  23713. return res;
  23714. } else {
  23715. return createLocal(input).local();
  23716. }
  23717. }
  23718. function getDateOffset (m) {
  23719. // On Firefox.24 Date#getTimezoneOffset returns a floating point.
  23720. // https://github.com/moment/moment/pull/1871
  23721. return -Math.round(m._d.getTimezoneOffset() / 15) * 15;
  23722. }
  23723. // HOOKS
  23724. // This function will be called whenever a moment is mutated.
  23725. // It is intended to keep the offset in sync with the timezone.
  23726. hooks.updateOffset = function () {};
  23727. // MOMENTS
  23728. // keepLocalTime = true means only change the timezone, without
  23729. // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->
  23730. // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset
  23731. // +0200, so we adjust the time as needed, to be valid.
  23732. //
  23733. // Keeping the time actually adds/subtracts (one hour)
  23734. // from the actual represented time. That is why we call updateOffset
  23735. // a second time. In case it wants us to change the offset again
  23736. // _changeInProgress == true case, then we have to adjust, because
  23737. // there is no such time in the given timezone.
  23738. function getSetOffset (input, keepLocalTime, keepMinutes) {
  23739. var offset = this._offset || 0,
  23740. localAdjust;
  23741. if (!this.isValid()) {
  23742. return input != null ? this : NaN;
  23743. }
  23744. if (input != null) {
  23745. if (typeof input === 'string') {
  23746. input = offsetFromString(matchShortOffset, input);
  23747. if (input === null) {
  23748. return this;
  23749. }
  23750. } else if (Math.abs(input) < 16 && !keepMinutes) {
  23751. input = input * 60;
  23752. }
  23753. if (!this._isUTC && keepLocalTime) {
  23754. localAdjust = getDateOffset(this);
  23755. }
  23756. this._offset = input;
  23757. this._isUTC = true;
  23758. if (localAdjust != null) {
  23759. this.add(localAdjust, 'm');
  23760. }
  23761. if (offset !== input) {
  23762. if (!keepLocalTime || this._changeInProgress) {
  23763. addSubtract(this, createDuration(input - offset, 'm'), 1, false);
  23764. } else if (!this._changeInProgress) {
  23765. this._changeInProgress = true;
  23766. hooks.updateOffset(this, true);
  23767. this._changeInProgress = null;
  23768. }
  23769. }
  23770. return this;
  23771. } else {
  23772. return this._isUTC ? offset : getDateOffset(this);
  23773. }
  23774. }
  23775. function getSetZone (input, keepLocalTime) {
  23776. if (input != null) {
  23777. if (typeof input !== 'string') {
  23778. input = -input;
  23779. }
  23780. this.utcOffset(input, keepLocalTime);
  23781. return this;
  23782. } else {
  23783. return -this.utcOffset();
  23784. }
  23785. }
  23786. function setOffsetToUTC (keepLocalTime) {
  23787. return this.utcOffset(0, keepLocalTime);
  23788. }
  23789. function setOffsetToLocal (keepLocalTime) {
  23790. if (this._isUTC) {
  23791. this.utcOffset(0, keepLocalTime);
  23792. this._isUTC = false;
  23793. if (keepLocalTime) {
  23794. this.subtract(getDateOffset(this), 'm');
  23795. }
  23796. }
  23797. return this;
  23798. }
  23799. function setOffsetToParsedOffset () {
  23800. if (this._tzm != null) {
  23801. this.utcOffset(this._tzm, false, true);
  23802. } else if (typeof this._i === 'string') {
  23803. var tZone = offsetFromString(matchOffset, this._i);
  23804. if (tZone != null) {
  23805. this.utcOffset(tZone);
  23806. }
  23807. else {
  23808. this.utcOffset(0, true);
  23809. }
  23810. }
  23811. return this;
  23812. }
  23813. function hasAlignedHourOffset (input) {
  23814. if (!this.isValid()) {
  23815. return false;
  23816. }
  23817. input = input ? createLocal(input).utcOffset() : 0;
  23818. return (this.utcOffset() - input) % 60 === 0;
  23819. }
  23820. function isDaylightSavingTime () {
  23821. return (
  23822. this.utcOffset() > this.clone().month(0).utcOffset() ||
  23823. this.utcOffset() > this.clone().month(5).utcOffset()
  23824. );
  23825. }
  23826. function isDaylightSavingTimeShifted () {
  23827. if (!isUndefined(this._isDSTShifted)) {
  23828. return this._isDSTShifted;
  23829. }
  23830. var c = {};
  23831. copyConfig(c, this);
  23832. c = prepareConfig(c);
  23833. if (c._a) {
  23834. var other = c._isUTC ? createUTC(c._a) : createLocal(c._a);
  23835. this._isDSTShifted = this.isValid() &&
  23836. compareArrays(c._a, other.toArray()) > 0;
  23837. } else {
  23838. this._isDSTShifted = false;
  23839. }
  23840. return this._isDSTShifted;
  23841. }
  23842. function isLocal () {
  23843. return this.isValid() ? !this._isUTC : false;
  23844. }
  23845. function isUtcOffset () {
  23846. return this.isValid() ? this._isUTC : false;
  23847. }
  23848. function isUtc () {
  23849. return this.isValid() ? this._isUTC && this._offset === 0 : false;
  23850. }
  23851. // ASP.NET json date format regex
  23852. var aspNetRegex = /^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/;
  23853. // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html
  23854. // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere
  23855. // and further modified to allow for strings containing both week and day
  23856. var isoRegex = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;
  23857. function createDuration (input, key) {
  23858. var duration = input,
  23859. // matching against regexp is expensive, do it on demand
  23860. match = null,
  23861. sign,
  23862. ret,
  23863. diffRes;
  23864. if (isDuration(input)) {
  23865. duration = {
  23866. ms : input._milliseconds,
  23867. d : input._days,
  23868. M : input._months
  23869. };
  23870. } else if (isNumber(input)) {
  23871. duration = {};
  23872. if (key) {
  23873. duration[key] = input;
  23874. } else {
  23875. duration.milliseconds = input;
  23876. }
  23877. } else if (!!(match = aspNetRegex.exec(input))) {
  23878. sign = (match[1] === '-') ? -1 : 1;
  23879. duration = {
  23880. y : 0,
  23881. d : toInt(match[DATE]) * sign,
  23882. h : toInt(match[HOUR]) * sign,
  23883. m : toInt(match[MINUTE]) * sign,
  23884. s : toInt(match[SECOND]) * sign,
  23885. ms : toInt(absRound(match[MILLISECOND] * 1000)) * sign // the millisecond decimal point is included in the match
  23886. };
  23887. } else if (!!(match = isoRegex.exec(input))) {
  23888. sign = (match[1] === '-') ? -1 : (match[1] === '+') ? 1 : 1;
  23889. duration = {
  23890. y : parseIso(match[2], sign),
  23891. M : parseIso(match[3], sign),
  23892. w : parseIso(match[4], sign),
  23893. d : parseIso(match[5], sign),
  23894. h : parseIso(match[6], sign),
  23895. m : parseIso(match[7], sign),
  23896. s : parseIso(match[8], sign)
  23897. };
  23898. } else if (duration == null) {// checks for null or undefined
  23899. duration = {};
  23900. } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) {
  23901. diffRes = momentsDifference(createLocal(duration.from), createLocal(duration.to));
  23902. duration = {};
  23903. duration.ms = diffRes.milliseconds;
  23904. duration.M = diffRes.months;
  23905. }
  23906. ret = new Duration(duration);
  23907. if (isDuration(input) && hasOwnProp(input, '_locale')) {
  23908. ret._locale = input._locale;
  23909. }
  23910. return ret;
  23911. }
  23912. createDuration.fn = Duration.prototype;
  23913. createDuration.invalid = createInvalid$1;
  23914. function parseIso (inp, sign) {
  23915. // We'd normally use ~~inp for this, but unfortunately it also
  23916. // converts floats to ints.
  23917. // inp may be undefined, so careful calling replace on it.
  23918. var res = inp && parseFloat(inp.replace(',', '.'));
  23919. // apply sign while we're at it
  23920. return (isNaN(res) ? 0 : res) * sign;
  23921. }
  23922. function positiveMomentsDifference(base, other) {
  23923. var res = {milliseconds: 0, months: 0};
  23924. res.months = other.month() - base.month() +
  23925. (other.year() - base.year()) * 12;
  23926. if (base.clone().add(res.months, 'M').isAfter(other)) {
  23927. --res.months;
  23928. }
  23929. res.milliseconds = +other - +(base.clone().add(res.months, 'M'));
  23930. return res;
  23931. }
  23932. function momentsDifference(base, other) {
  23933. var res;
  23934. if (!(base.isValid() && other.isValid())) {
  23935. return {milliseconds: 0, months: 0};
  23936. }
  23937. other = cloneWithOffset(other, base);
  23938. if (base.isBefore(other)) {
  23939. res = positiveMomentsDifference(base, other);
  23940. } else {
  23941. res = positiveMomentsDifference(other, base);
  23942. res.milliseconds = -res.milliseconds;
  23943. res.months = -res.months;
  23944. }
  23945. return res;
  23946. }
  23947. // TODO: remove 'name' arg after deprecation is removed
  23948. function createAdder(direction, name) {
  23949. return function (val, period) {
  23950. var dur, tmp;
  23951. //invert the arguments, but complain about it
  23952. if (period !== null && !isNaN(+period)) {
  23953. deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +
  23954. 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');
  23955. tmp = val; val = period; period = tmp;
  23956. }
  23957. val = typeof val === 'string' ? +val : val;
  23958. dur = createDuration(val, period);
  23959. addSubtract(this, dur, direction);
  23960. return this;
  23961. };
  23962. }
  23963. function addSubtract (mom, duration, isAdding, updateOffset) {
  23964. var milliseconds = duration._milliseconds,
  23965. days = absRound(duration._days),
  23966. months = absRound(duration._months);
  23967. if (!mom.isValid()) {
  23968. // No op
  23969. return;
  23970. }
  23971. updateOffset = updateOffset == null ? true : updateOffset;
  23972. if (months) {
  23973. setMonth(mom, get(mom, 'Month') + months * isAdding);
  23974. }
  23975. if (days) {
  23976. set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);
  23977. }
  23978. if (milliseconds) {
  23979. mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);
  23980. }
  23981. if (updateOffset) {
  23982. hooks.updateOffset(mom, days || months);
  23983. }
  23984. }
  23985. var add = createAdder(1, 'add');
  23986. var subtract = createAdder(-1, 'subtract');
  23987. function getCalendarFormat(myMoment, now) {
  23988. var diff = myMoment.diff(now, 'days', true);
  23989. return diff < -6 ? 'sameElse' :
  23990. diff < -1 ? 'lastWeek' :
  23991. diff < 0 ? 'lastDay' :
  23992. diff < 1 ? 'sameDay' :
  23993. diff < 2 ? 'nextDay' :
  23994. diff < 7 ? 'nextWeek' : 'sameElse';
  23995. }
  23996. function calendar$1 (time, formats) {
  23997. // We want to compare the start of today, vs this.
  23998. // Getting start-of-today depends on whether we're local/utc/offset or not.
  23999. var now = time || createLocal(),
  24000. sod = cloneWithOffset(now, this).startOf('day'),
  24001. format = hooks.calendarFormat(this, sod) || 'sameElse';
  24002. var output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]);
  24003. return this.format(output || this.localeData().calendar(format, this, createLocal(now)));
  24004. }
  24005. function clone () {
  24006. return new Moment(this);
  24007. }
  24008. function isAfter (input, units) {
  24009. var localInput = isMoment(input) ? input : createLocal(input);
  24010. if (!(this.isValid() && localInput.isValid())) {
  24011. return false;
  24012. }
  24013. units = normalizeUnits(!isUndefined(units) ? units : 'millisecond');
  24014. if (units === 'millisecond') {
  24015. return this.valueOf() > localInput.valueOf();
  24016. } else {
  24017. return localInput.valueOf() < this.clone().startOf(units).valueOf();
  24018. }
  24019. }
  24020. function isBefore (input, units) {
  24021. var localInput = isMoment(input) ? input : createLocal(input);
  24022. if (!(this.isValid() && localInput.isValid())) {
  24023. return false;
  24024. }
  24025. units = normalizeUnits(!isUndefined(units) ? units : 'millisecond');
  24026. if (units === 'millisecond') {
  24027. return this.valueOf() < localInput.valueOf();
  24028. } else {
  24029. return this.clone().endOf(units).valueOf() < localInput.valueOf();
  24030. }
  24031. }
  24032. function isBetween (from, to, units, inclusivity) {
  24033. inclusivity = inclusivity || '()';
  24034. return (inclusivity[0] === '(' ? this.isAfter(from, units) : !this.isBefore(from, units)) &&
  24035. (inclusivity[1] === ')' ? this.isBefore(to, units) : !this.isAfter(to, units));
  24036. }
  24037. function isSame (input, units) {
  24038. var localInput = isMoment(input) ? input : createLocal(input),
  24039. inputMs;
  24040. if (!(this.isValid() && localInput.isValid())) {
  24041. return false;
  24042. }
  24043. units = normalizeUnits(units || 'millisecond');
  24044. if (units === 'millisecond') {
  24045. return this.valueOf() === localInput.valueOf();
  24046. } else {
  24047. inputMs = localInput.valueOf();
  24048. return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf();
  24049. }
  24050. }
  24051. function isSameOrAfter (input, units) {
  24052. return this.isSame(input, units) || this.isAfter(input,units);
  24053. }
  24054. function isSameOrBefore (input, units) {
  24055. return this.isSame(input, units) || this.isBefore(input,units);
  24056. }
  24057. function diff (input, units, asFloat) {
  24058. var that,
  24059. zoneDelta,
  24060. delta, output;
  24061. if (!this.isValid()) {
  24062. return NaN;
  24063. }
  24064. that = cloneWithOffset(input, this);
  24065. if (!that.isValid()) {
  24066. return NaN;
  24067. }
  24068. zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;
  24069. units = normalizeUnits(units);
  24070. switch (units) {
  24071. case 'year': output = monthDiff(this, that) / 12; break;
  24072. case 'month': output = monthDiff(this, that); break;
  24073. case 'quarter': output = monthDiff(this, that) / 3; break;
  24074. case 'second': output = (this - that) / 1e3; break; // 1000
  24075. case 'minute': output = (this - that) / 6e4; break; // 1000 * 60
  24076. case 'hour': output = (this - that) / 36e5; break; // 1000 * 60 * 60
  24077. case 'day': output = (this - that - zoneDelta) / 864e5; break; // 1000 * 60 * 60 * 24, negate dst
  24078. case 'week': output = (this - that - zoneDelta) / 6048e5; break; // 1000 * 60 * 60 * 24 * 7, negate dst
  24079. default: output = this - that;
  24080. }
  24081. return asFloat ? output : absFloor(output);
  24082. }
  24083. function monthDiff (a, b) {
  24084. // difference in months
  24085. var wholeMonthDiff = ((b.year() - a.year()) * 12) + (b.month() - a.month()),
  24086. // b is in (anchor - 1 month, anchor + 1 month)
  24087. anchor = a.clone().add(wholeMonthDiff, 'months'),
  24088. anchor2, adjust;
  24089. if (b - anchor < 0) {
  24090. anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');
  24091. // linear across the month
  24092. adjust = (b - anchor) / (anchor - anchor2);
  24093. } else {
  24094. anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');
  24095. // linear across the month
  24096. adjust = (b - anchor) / (anchor2 - anchor);
  24097. }
  24098. //check for negative zero, return zero if negative zero
  24099. return -(wholeMonthDiff + adjust) || 0;
  24100. }
  24101. hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';
  24102. hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';
  24103. function toString () {
  24104. return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');
  24105. }
  24106. function toISOString() {
  24107. if (!this.isValid()) {
  24108. return null;
  24109. }
  24110. var m = this.clone().utc();
  24111. if (m.year() < 0 || m.year() > 9999) {
  24112. return formatMoment(m, 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]');
  24113. }
  24114. if (isFunction(Date.prototype.toISOString)) {
  24115. // native implementation is ~50x faster, use it when we can
  24116. return this.toDate().toISOString();
  24117. }
  24118. return formatMoment(m, 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]');
  24119. }
  24120. /**
  24121. * Return a human readable representation of a moment that can
  24122. * also be evaluated to get a new moment which is the same
  24123. *
  24124. * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects
  24125. */
  24126. function inspect () {
  24127. if (!this.isValid()) {
  24128. return 'moment.invalid(/* ' + this._i + ' */)';
  24129. }
  24130. var func = 'moment';
  24131. var zone = '';
  24132. if (!this.isLocal()) {
  24133. func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';
  24134. zone = 'Z';
  24135. }
  24136. var prefix = '[' + func + '("]';
  24137. var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';
  24138. var datetime = '-MM-DD[T]HH:mm:ss.SSS';
  24139. var suffix = zone + '[")]';
  24140. return this.format(prefix + year + datetime + suffix);
  24141. }
  24142. function format (inputString) {
  24143. if (!inputString) {
  24144. inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat;
  24145. }
  24146. var output = formatMoment(this, inputString);
  24147. return this.localeData().postformat(output);
  24148. }
  24149. function from (time, withoutSuffix) {
  24150. if (this.isValid() &&
  24151. ((isMoment(time) && time.isValid()) ||
  24152. createLocal(time).isValid())) {
  24153. return createDuration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix);
  24154. } else {
  24155. return this.localeData().invalidDate();
  24156. }
  24157. }
  24158. function fromNow (withoutSuffix) {
  24159. return this.from(createLocal(), withoutSuffix);
  24160. }
  24161. function to (time, withoutSuffix) {
  24162. if (this.isValid() &&
  24163. ((isMoment(time) && time.isValid()) ||
  24164. createLocal(time).isValid())) {
  24165. return createDuration({from: this, to: time}).locale(this.locale()).humanize(!withoutSuffix);
  24166. } else {
  24167. return this.localeData().invalidDate();
  24168. }
  24169. }
  24170. function toNow (withoutSuffix) {
  24171. return this.to(createLocal(), withoutSuffix);
  24172. }
  24173. // If passed a locale key, it will set the locale for this
  24174. // instance. Otherwise, it will return the locale configuration
  24175. // variables for this instance.
  24176. function locale (key) {
  24177. var newLocaleData;
  24178. if (key === undefined) {
  24179. return this._locale._abbr;
  24180. } else {
  24181. newLocaleData = getLocale(key);
  24182. if (newLocaleData != null) {
  24183. this._locale = newLocaleData;
  24184. }
  24185. return this;
  24186. }
  24187. }
  24188. var lang = deprecate(
  24189. 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',
  24190. function (key) {
  24191. if (key === undefined) {
  24192. return this.localeData();
  24193. } else {
  24194. return this.locale(key);
  24195. }
  24196. }
  24197. );
  24198. function localeData () {
  24199. return this._locale;
  24200. }
  24201. function startOf (units) {
  24202. units = normalizeUnits(units);
  24203. // the following switch intentionally omits break keywords
  24204. // to utilize falling through the cases.
  24205. switch (units) {
  24206. case 'year':
  24207. this.month(0);
  24208. /* falls through */
  24209. case 'quarter':
  24210. case 'month':
  24211. this.date(1);
  24212. /* falls through */
  24213. case 'week':
  24214. case 'isoWeek':
  24215. case 'day':
  24216. case 'date':
  24217. this.hours(0);
  24218. /* falls through */
  24219. case 'hour':
  24220. this.minutes(0);
  24221. /* falls through */
  24222. case 'minute':
  24223. this.seconds(0);
  24224. /* falls through */
  24225. case 'second':
  24226. this.milliseconds(0);
  24227. }
  24228. // weeks are a special case
  24229. if (units === 'week') {
  24230. this.weekday(0);
  24231. }
  24232. if (units === 'isoWeek') {
  24233. this.isoWeekday(1);
  24234. }
  24235. // quarters are also special
  24236. if (units === 'quarter') {
  24237. this.month(Math.floor(this.month() / 3) * 3);
  24238. }
  24239. return this;
  24240. }
  24241. function endOf (units) {
  24242. units = normalizeUnits(units);
  24243. if (units === undefined || units === 'millisecond') {
  24244. return this;
  24245. }
  24246. // 'date' is an alias for 'day', so it should be considered as such.
  24247. if (units === 'date') {
  24248. units = 'day';
  24249. }
  24250. return this.startOf(units).add(1, (units === 'isoWeek' ? 'week' : units)).subtract(1, 'ms');
  24251. }
  24252. function valueOf () {
  24253. return this._d.valueOf() - ((this._offset || 0) * 60000);
  24254. }
  24255. function unix () {
  24256. return Math.floor(this.valueOf() / 1000);
  24257. }
  24258. function toDate () {
  24259. return new Date(this.valueOf());
  24260. }
  24261. function toArray () {
  24262. var m = this;
  24263. return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()];
  24264. }
  24265. function toObject () {
  24266. var m = this;
  24267. return {
  24268. years: m.year(),
  24269. months: m.month(),
  24270. date: m.date(),
  24271. hours: m.hours(),
  24272. minutes: m.minutes(),
  24273. seconds: m.seconds(),
  24274. milliseconds: m.milliseconds()
  24275. };
  24276. }
  24277. function toJSON () {
  24278. // new Date(NaN).toJSON() === null
  24279. return this.isValid() ? this.toISOString() : null;
  24280. }
  24281. function isValid$2 () {
  24282. return isValid(this);
  24283. }
  24284. function parsingFlags () {
  24285. return extend({}, getParsingFlags(this));
  24286. }
  24287. function invalidAt () {
  24288. return getParsingFlags(this).overflow;
  24289. }
  24290. function creationData() {
  24291. return {
  24292. input: this._i,
  24293. format: this._f,
  24294. locale: this._locale,
  24295. isUTC: this._isUTC,
  24296. strict: this._strict
  24297. };
  24298. }
  24299. // FORMATTING
  24300. addFormatToken(0, ['gg', 2], 0, function () {
  24301. return this.weekYear() % 100;
  24302. });
  24303. addFormatToken(0, ['GG', 2], 0, function () {
  24304. return this.isoWeekYear() % 100;
  24305. });
  24306. function addWeekYearFormatToken (token, getter) {
  24307. addFormatToken(0, [token, token.length], 0, getter);
  24308. }
  24309. addWeekYearFormatToken('gggg', 'weekYear');
  24310. addWeekYearFormatToken('ggggg', 'weekYear');
  24311. addWeekYearFormatToken('GGGG', 'isoWeekYear');
  24312. addWeekYearFormatToken('GGGGG', 'isoWeekYear');
  24313. // ALIASES
  24314. addUnitAlias('weekYear', 'gg');
  24315. addUnitAlias('isoWeekYear', 'GG');
  24316. // PRIORITY
  24317. addUnitPriority('weekYear', 1);
  24318. addUnitPriority('isoWeekYear', 1);
  24319. // PARSING
  24320. addRegexToken('G', matchSigned);
  24321. addRegexToken('g', matchSigned);
  24322. addRegexToken('GG', match1to2, match2);
  24323. addRegexToken('gg', match1to2, match2);
  24324. addRegexToken('GGGG', match1to4, match4);
  24325. addRegexToken('gggg', match1to4, match4);
  24326. addRegexToken('GGGGG', match1to6, match6);
  24327. addRegexToken('ggggg', match1to6, match6);
  24328. addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) {
  24329. week[token.substr(0, 2)] = toInt(input);
  24330. });
  24331. addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {
  24332. week[token] = hooks.parseTwoDigitYear(input);
  24333. });
  24334. // MOMENTS
  24335. function getSetWeekYear (input) {
  24336. return getSetWeekYearHelper.call(this,
  24337. input,
  24338. this.week(),
  24339. this.weekday(),
  24340. this.localeData()._week.dow,
  24341. this.localeData()._week.doy);
  24342. }
  24343. function getSetISOWeekYear (input) {
  24344. return getSetWeekYearHelper.call(this,
  24345. input, this.isoWeek(), this.isoWeekday(), 1, 4);
  24346. }
  24347. function getISOWeeksInYear () {
  24348. return weeksInYear(this.year(), 1, 4);
  24349. }
  24350. function getWeeksInYear () {
  24351. var weekInfo = this.localeData()._week;
  24352. return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);
  24353. }
  24354. function getSetWeekYearHelper(input, week, weekday, dow, doy) {
  24355. var weeksTarget;
  24356. if (input == null) {
  24357. return weekOfYear(this, dow, doy).year;
  24358. } else {
  24359. weeksTarget = weeksInYear(input, dow, doy);
  24360. if (week > weeksTarget) {
  24361. week = weeksTarget;
  24362. }
  24363. return setWeekAll.call(this, input, week, weekday, dow, doy);
  24364. }
  24365. }
  24366. function setWeekAll(weekYear, week, weekday, dow, doy) {
  24367. var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),
  24368. date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);
  24369. this.year(date.getUTCFullYear());
  24370. this.month(date.getUTCMonth());
  24371. this.date(date.getUTCDate());
  24372. return this;
  24373. }
  24374. // FORMATTING
  24375. addFormatToken('Q', 0, 'Qo', 'quarter');
  24376. // ALIASES
  24377. addUnitAlias('quarter', 'Q');
  24378. // PRIORITY
  24379. addUnitPriority('quarter', 7);
  24380. // PARSING
  24381. addRegexToken('Q', match1);
  24382. addParseToken('Q', function (input, array) {
  24383. array[MONTH] = (toInt(input) - 1) * 3;
  24384. });
  24385. // MOMENTS
  24386. function getSetQuarter (input) {
  24387. return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3);
  24388. }
  24389. // FORMATTING
  24390. addFormatToken('D', ['DD', 2], 'Do', 'date');
  24391. // ALIASES
  24392. addUnitAlias('date', 'D');
  24393. // PRIOROITY
  24394. addUnitPriority('date', 9);
  24395. // PARSING
  24396. addRegexToken('D', match1to2);
  24397. addRegexToken('DD', match1to2, match2);
  24398. addRegexToken('Do', function (isStrict, locale) {
  24399. // TODO: Remove "ordinalParse" fallback in next major release.
  24400. return isStrict ?
  24401. (locale._dayOfMonthOrdinalParse || locale._ordinalParse) :
  24402. locale._dayOfMonthOrdinalParseLenient;
  24403. });
  24404. addParseToken(['D', 'DD'], DATE);
  24405. addParseToken('Do', function (input, array) {
  24406. array[DATE] = toInt(input.match(match1to2)[0]);
  24407. });
  24408. // MOMENTS
  24409. var getSetDayOfMonth = makeGetSet('Date', true);
  24410. // FORMATTING
  24411. addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');
  24412. // ALIASES
  24413. addUnitAlias('dayOfYear', 'DDD');
  24414. // PRIORITY
  24415. addUnitPriority('dayOfYear', 4);
  24416. // PARSING
  24417. addRegexToken('DDD', match1to3);
  24418. addRegexToken('DDDD', match3);
  24419. addParseToken(['DDD', 'DDDD'], function (input, array, config) {
  24420. config._dayOfYear = toInt(input);
  24421. });
  24422. // HELPERS
  24423. // MOMENTS
  24424. function getSetDayOfYear (input) {
  24425. var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1;
  24426. return input == null ? dayOfYear : this.add((input - dayOfYear), 'd');
  24427. }
  24428. // FORMATTING
  24429. addFormatToken('m', ['mm', 2], 0, 'minute');
  24430. // ALIASES
  24431. addUnitAlias('minute', 'm');
  24432. // PRIORITY
  24433. addUnitPriority('minute', 14);
  24434. // PARSING
  24435. addRegexToken('m', match1to2);
  24436. addRegexToken('mm', match1to2, match2);
  24437. addParseToken(['m', 'mm'], MINUTE);
  24438. // MOMENTS
  24439. var getSetMinute = makeGetSet('Minutes', false);
  24440. // FORMATTING
  24441. addFormatToken('s', ['ss', 2], 0, 'second');
  24442. // ALIASES
  24443. addUnitAlias('second', 's');
  24444. // PRIORITY
  24445. addUnitPriority('second', 15);
  24446. // PARSING
  24447. addRegexToken('s', match1to2);
  24448. addRegexToken('ss', match1to2, match2);
  24449. addParseToken(['s', 'ss'], SECOND);
  24450. // MOMENTS
  24451. var getSetSecond = makeGetSet('Seconds', false);
  24452. // FORMATTING
  24453. addFormatToken('S', 0, 0, function () {
  24454. return ~~(this.millisecond() / 100);
  24455. });
  24456. addFormatToken(0, ['SS', 2], 0, function () {
  24457. return ~~(this.millisecond() / 10);
  24458. });
  24459. addFormatToken(0, ['SSS', 3], 0, 'millisecond');
  24460. addFormatToken(0, ['SSSS', 4], 0, function () {
  24461. return this.millisecond() * 10;
  24462. });
  24463. addFormatToken(0, ['SSSSS', 5], 0, function () {
  24464. return this.millisecond() * 100;
  24465. });
  24466. addFormatToken(0, ['SSSSSS', 6], 0, function () {
  24467. return this.millisecond() * 1000;
  24468. });
  24469. addFormatToken(0, ['SSSSSSS', 7], 0, function () {
  24470. return this.millisecond() * 10000;
  24471. });
  24472. addFormatToken(0, ['SSSSSSSS', 8], 0, function () {
  24473. return this.millisecond() * 100000;
  24474. });
  24475. addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {
  24476. return this.millisecond() * 1000000;
  24477. });
  24478. // ALIASES
  24479. addUnitAlias('millisecond', 'ms');
  24480. // PRIORITY
  24481. addUnitPriority('millisecond', 16);
  24482. // PARSING
  24483. addRegexToken('S', match1to3, match1);
  24484. addRegexToken('SS', match1to3, match2);
  24485. addRegexToken('SSS', match1to3, match3);
  24486. var token;
  24487. for (token = 'SSSS'; token.length <= 9; token += 'S') {
  24488. addRegexToken(token, matchUnsigned);
  24489. }
  24490. function parseMs(input, array) {
  24491. array[MILLISECOND] = toInt(('0.' + input) * 1000);
  24492. }
  24493. for (token = 'S'; token.length <= 9; token += 'S') {
  24494. addParseToken(token, parseMs);
  24495. }
  24496. // MOMENTS
  24497. var getSetMillisecond = makeGetSet('Milliseconds', false);
  24498. // FORMATTING
  24499. addFormatToken('z', 0, 0, 'zoneAbbr');
  24500. addFormatToken('zz', 0, 0, 'zoneName');
  24501. // MOMENTS
  24502. function getZoneAbbr () {
  24503. return this._isUTC ? 'UTC' : '';
  24504. }
  24505. function getZoneName () {
  24506. return this._isUTC ? 'Coordinated Universal Time' : '';
  24507. }
  24508. var proto = Moment.prototype;
  24509. proto.add = add;
  24510. proto.calendar = calendar$1;
  24511. proto.clone = clone;
  24512. proto.diff = diff;
  24513. proto.endOf = endOf;
  24514. proto.format = format;
  24515. proto.from = from;
  24516. proto.fromNow = fromNow;
  24517. proto.to = to;
  24518. proto.toNow = toNow;
  24519. proto.get = stringGet;
  24520. proto.invalidAt = invalidAt;
  24521. proto.isAfter = isAfter;
  24522. proto.isBefore = isBefore;
  24523. proto.isBetween = isBetween;
  24524. proto.isSame = isSame;
  24525. proto.isSameOrAfter = isSameOrAfter;
  24526. proto.isSameOrBefore = isSameOrBefore;
  24527. proto.isValid = isValid$2;
  24528. proto.lang = lang;
  24529. proto.locale = locale;
  24530. proto.localeData = localeData;
  24531. proto.max = prototypeMax;
  24532. proto.min = prototypeMin;
  24533. proto.parsingFlags = parsingFlags;
  24534. proto.set = stringSet;
  24535. proto.startOf = startOf;
  24536. proto.subtract = subtract;
  24537. proto.toArray = toArray;
  24538. proto.toObject = toObject;
  24539. proto.toDate = toDate;
  24540. proto.toISOString = toISOString;
  24541. proto.inspect = inspect;
  24542. proto.toJSON = toJSON;
  24543. proto.toString = toString;
  24544. proto.unix = unix;
  24545. proto.valueOf = valueOf;
  24546. proto.creationData = creationData;
  24547. // Year
  24548. proto.year = getSetYear;
  24549. proto.isLeapYear = getIsLeapYear;
  24550. // Week Year
  24551. proto.weekYear = getSetWeekYear;
  24552. proto.isoWeekYear = getSetISOWeekYear;
  24553. // Quarter
  24554. proto.quarter = proto.quarters = getSetQuarter;
  24555. // Month
  24556. proto.month = getSetMonth;
  24557. proto.daysInMonth = getDaysInMonth;
  24558. // Week
  24559. proto.week = proto.weeks = getSetWeek;
  24560. proto.isoWeek = proto.isoWeeks = getSetISOWeek;
  24561. proto.weeksInYear = getWeeksInYear;
  24562. proto.isoWeeksInYear = getISOWeeksInYear;
  24563. // Day
  24564. proto.date = getSetDayOfMonth;
  24565. proto.day = proto.days = getSetDayOfWeek;
  24566. proto.weekday = getSetLocaleDayOfWeek;
  24567. proto.isoWeekday = getSetISODayOfWeek;
  24568. proto.dayOfYear = getSetDayOfYear;
  24569. // Hour
  24570. proto.hour = proto.hours = getSetHour;
  24571. // Minute
  24572. proto.minute = proto.minutes = getSetMinute;
  24573. // Second
  24574. proto.second = proto.seconds = getSetSecond;
  24575. // Millisecond
  24576. proto.millisecond = proto.milliseconds = getSetMillisecond;
  24577. // Offset
  24578. proto.utcOffset = getSetOffset;
  24579. proto.utc = setOffsetToUTC;
  24580. proto.local = setOffsetToLocal;
  24581. proto.parseZone = setOffsetToParsedOffset;
  24582. proto.hasAlignedHourOffset = hasAlignedHourOffset;
  24583. proto.isDST = isDaylightSavingTime;
  24584. proto.isLocal = isLocal;
  24585. proto.isUtcOffset = isUtcOffset;
  24586. proto.isUtc = isUtc;
  24587. proto.isUTC = isUtc;
  24588. // Timezone
  24589. proto.zoneAbbr = getZoneAbbr;
  24590. proto.zoneName = getZoneName;
  24591. // Deprecations
  24592. proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth);
  24593. proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth);
  24594. proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear);
  24595. proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone);
  24596. proto.isDSTShifted = deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', isDaylightSavingTimeShifted);
  24597. function createUnix (input) {
  24598. return createLocal(input * 1000);
  24599. }
  24600. function createInZone () {
  24601. return createLocal.apply(null, arguments).parseZone();
  24602. }
  24603. function preParsePostFormat (string) {
  24604. return string;
  24605. }
  24606. var proto$1 = Locale.prototype;
  24607. proto$1.calendar = calendar;
  24608. proto$1.longDateFormat = longDateFormat;
  24609. proto$1.invalidDate = invalidDate;
  24610. proto$1.ordinal = ordinal;
  24611. proto$1.preparse = preParsePostFormat;
  24612. proto$1.postformat = preParsePostFormat;
  24613. proto$1.relativeTime = relativeTime;
  24614. proto$1.pastFuture = pastFuture;
  24615. proto$1.set = set;
  24616. // Month
  24617. proto$1.months = localeMonths;
  24618. proto$1.monthsShort = localeMonthsShort;
  24619. proto$1.monthsParse = localeMonthsParse;
  24620. proto$1.monthsRegex = monthsRegex;
  24621. proto$1.monthsShortRegex = monthsShortRegex;
  24622. // Week
  24623. proto$1.week = localeWeek;
  24624. proto$1.firstDayOfYear = localeFirstDayOfYear;
  24625. proto$1.firstDayOfWeek = localeFirstDayOfWeek;
  24626. // Day of Week
  24627. proto$1.weekdays = localeWeekdays;
  24628. proto$1.weekdaysMin = localeWeekdaysMin;
  24629. proto$1.weekdaysShort = localeWeekdaysShort;
  24630. proto$1.weekdaysParse = localeWeekdaysParse;
  24631. proto$1.weekdaysRegex = weekdaysRegex;
  24632. proto$1.weekdaysShortRegex = weekdaysShortRegex;
  24633. proto$1.weekdaysMinRegex = weekdaysMinRegex;
  24634. // Hours
  24635. proto$1.isPM = localeIsPM;
  24636. proto$1.meridiem = localeMeridiem;
  24637. function get$1 (format, index, field, setter) {
  24638. var locale = getLocale();
  24639. var utc = createUTC().set(setter, index);
  24640. return locale[field](utc, format);
  24641. }
  24642. function listMonthsImpl (format, index, field) {
  24643. if (isNumber(format)) {
  24644. index = format;
  24645. format = undefined;
  24646. }
  24647. format = format || '';
  24648. if (index != null) {
  24649. return get$1(format, index, field, 'month');
  24650. }
  24651. var i;
  24652. var out = [];
  24653. for (i = 0; i < 12; i++) {
  24654. out[i] = get$1(format, i, field, 'month');
  24655. }
  24656. return out;
  24657. }
  24658. // ()
  24659. // (5)
  24660. // (fmt, 5)
  24661. // (fmt)
  24662. // (true)
  24663. // (true, 5)
  24664. // (true, fmt, 5)
  24665. // (true, fmt)
  24666. function listWeekdaysImpl (localeSorted, format, index, field) {
  24667. if (typeof localeSorted === 'boolean') {
  24668. if (isNumber(format)) {
  24669. index = format;
  24670. format = undefined;
  24671. }
  24672. format = format || '';
  24673. } else {
  24674. format = localeSorted;
  24675. index = format;
  24676. localeSorted = false;
  24677. if (isNumber(format)) {
  24678. index = format;
  24679. format = undefined;
  24680. }
  24681. format = format || '';
  24682. }
  24683. var locale = getLocale(),
  24684. shift = localeSorted ? locale._week.dow : 0;
  24685. if (index != null) {
  24686. return get$1(format, (index + shift) % 7, field, 'day');
  24687. }
  24688. var i;
  24689. var out = [];
  24690. for (i = 0; i < 7; i++) {
  24691. out[i] = get$1(format, (i + shift) % 7, field, 'day');
  24692. }
  24693. return out;
  24694. }
  24695. function listMonths (format, index) {
  24696. return listMonthsImpl(format, index, 'months');
  24697. }
  24698. function listMonthsShort (format, index) {
  24699. return listMonthsImpl(format, index, 'monthsShort');
  24700. }
  24701. function listWeekdays (localeSorted, format, index) {
  24702. return listWeekdaysImpl(localeSorted, format, index, 'weekdays');
  24703. }
  24704. function listWeekdaysShort (localeSorted, format, index) {
  24705. return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');
  24706. }
  24707. function listWeekdaysMin (localeSorted, format, index) {
  24708. return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');
  24709. }
  24710. getSetGlobalLocale('en', {
  24711. dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
  24712. ordinal : function (number) {
  24713. var b = number % 10,
  24714. output = (toInt(number % 100 / 10) === 1) ? 'th' :
  24715. (b === 1) ? 'st' :
  24716. (b === 2) ? 'nd' :
  24717. (b === 3) ? 'rd' : 'th';
  24718. return number + output;
  24719. }
  24720. });
  24721. // Side effect imports
  24722. hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', getSetGlobalLocale);
  24723. hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', getLocale);
  24724. var mathAbs = Math.abs;
  24725. function abs () {
  24726. var data = this._data;
  24727. this._milliseconds = mathAbs(this._milliseconds);
  24728. this._days = mathAbs(this._days);
  24729. this._months = mathAbs(this._months);
  24730. data.milliseconds = mathAbs(data.milliseconds);
  24731. data.seconds = mathAbs(data.seconds);
  24732. data.minutes = mathAbs(data.minutes);
  24733. data.hours = mathAbs(data.hours);
  24734. data.months = mathAbs(data.months);
  24735. data.years = mathAbs(data.years);
  24736. return this;
  24737. }
  24738. function addSubtract$1 (duration, input, value, direction) {
  24739. var other = createDuration(input, value);
  24740. duration._milliseconds += direction * other._milliseconds;
  24741. duration._days += direction * other._days;
  24742. duration._months += direction * other._months;
  24743. return duration._bubble();
  24744. }
  24745. // supports only 2.0-style add(1, 's') or add(duration)
  24746. function add$1 (input, value) {
  24747. return addSubtract$1(this, input, value, 1);
  24748. }
  24749. // supports only 2.0-style subtract(1, 's') or subtract(duration)
  24750. function subtract$1 (input, value) {
  24751. return addSubtract$1(this, input, value, -1);
  24752. }
  24753. function absCeil (number) {
  24754. if (number < 0) {
  24755. return Math.floor(number);
  24756. } else {
  24757. return Math.ceil(number);
  24758. }
  24759. }
  24760. function bubble () {
  24761. var milliseconds = this._milliseconds;
  24762. var days = this._days;
  24763. var months = this._months;
  24764. var data = this._data;
  24765. var seconds, minutes, hours, years, monthsFromDays;
  24766. // if we have a mix of positive and negative values, bubble down first
  24767. // check: https://github.com/moment/moment/issues/2166
  24768. if (!((milliseconds >= 0 && days >= 0 && months >= 0) ||
  24769. (milliseconds <= 0 && days <= 0 && months <= 0))) {
  24770. milliseconds += absCeil(monthsToDays(months) + days) * 864e5;
  24771. days = 0;
  24772. months = 0;
  24773. }
  24774. // The following code bubbles up values, see the tests for
  24775. // examples of what that means.
  24776. data.milliseconds = milliseconds % 1000;
  24777. seconds = absFloor(milliseconds / 1000);
  24778. data.seconds = seconds % 60;
  24779. minutes = absFloor(seconds / 60);
  24780. data.minutes = minutes % 60;
  24781. hours = absFloor(minutes / 60);
  24782. data.hours = hours % 24;
  24783. days += absFloor(hours / 24);
  24784. // convert days to months
  24785. monthsFromDays = absFloor(daysToMonths(days));
  24786. months += monthsFromDays;
  24787. days -= absCeil(monthsToDays(monthsFromDays));
  24788. // 12 months -> 1 year
  24789. years = absFloor(months / 12);
  24790. months %= 12;
  24791. data.days = days;
  24792. data.months = months;
  24793. data.years = years;
  24794. return this;
  24795. }
  24796. function daysToMonths (days) {
  24797. // 400 years have 146097 days (taking into account leap year rules)
  24798. // 400 years have 12 months === 4800
  24799. return days * 4800 / 146097;
  24800. }
  24801. function monthsToDays (months) {
  24802. // the reverse of daysToMonths
  24803. return months * 146097 / 4800;
  24804. }
  24805. function as (units) {
  24806. if (!this.isValid()) {
  24807. return NaN;
  24808. }
  24809. var days;
  24810. var months;
  24811. var milliseconds = this._milliseconds;
  24812. units = normalizeUnits(units);
  24813. if (units === 'month' || units === 'year') {
  24814. days = this._days + milliseconds / 864e5;
  24815. months = this._months + daysToMonths(days);
  24816. return units === 'month' ? months : months / 12;
  24817. } else {
  24818. // handle milliseconds separately because of floating point math errors (issue #1867)
  24819. days = this._days + Math.round(monthsToDays(this._months));
  24820. switch (units) {
  24821. case 'week' : return days / 7 + milliseconds / 6048e5;
  24822. case 'day' : return days + milliseconds / 864e5;
  24823. case 'hour' : return days * 24 + milliseconds / 36e5;
  24824. case 'minute' : return days * 1440 + milliseconds / 6e4;
  24825. case 'second' : return days * 86400 + milliseconds / 1000;
  24826. // Math.floor prevents floating point math errors here
  24827. case 'millisecond': return Math.floor(days * 864e5) + milliseconds;
  24828. default: throw new Error('Unknown unit ' + units);
  24829. }
  24830. }
  24831. }
  24832. // TODO: Use this.as('ms')?
  24833. function valueOf$1 () {
  24834. if (!this.isValid()) {
  24835. return NaN;
  24836. }
  24837. return (
  24838. this._milliseconds +
  24839. this._days * 864e5 +
  24840. (this._months % 12) * 2592e6 +
  24841. toInt(this._months / 12) * 31536e6
  24842. );
  24843. }
  24844. function makeAs (alias) {
  24845. return function () {
  24846. return this.as(alias);
  24847. };
  24848. }
  24849. var asMilliseconds = makeAs('ms');
  24850. var asSeconds = makeAs('s');
  24851. var asMinutes = makeAs('m');
  24852. var asHours = makeAs('h');
  24853. var asDays = makeAs('d');
  24854. var asWeeks = makeAs('w');
  24855. var asMonths = makeAs('M');
  24856. var asYears = makeAs('y');
  24857. function clone$1 () {
  24858. return createDuration(this);
  24859. }
  24860. function get$2 (units) {
  24861. units = normalizeUnits(units);
  24862. return this.isValid() ? this[units + 's']() : NaN;
  24863. }
  24864. function makeGetter(name) {
  24865. return function () {
  24866. return this.isValid() ? this._data[name] : NaN;
  24867. };
  24868. }
  24869. var milliseconds = makeGetter('milliseconds');
  24870. var seconds = makeGetter('seconds');
  24871. var minutes = makeGetter('minutes');
  24872. var hours = makeGetter('hours');
  24873. var days = makeGetter('days');
  24874. var months = makeGetter('months');
  24875. var years = makeGetter('years');
  24876. function weeks () {
  24877. return absFloor(this.days() / 7);
  24878. }
  24879. var round = Math.round;
  24880. var thresholds = {
  24881. ss: 44, // a few seconds to seconds
  24882. s : 45, // seconds to minute
  24883. m : 45, // minutes to hour
  24884. h : 22, // hours to day
  24885. d : 26, // days to month
  24886. M : 11 // months to year
  24887. };
  24888. // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize
  24889. function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {
  24890. return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);
  24891. }
  24892. function relativeTime$1 (posNegDuration, withoutSuffix, locale) {
  24893. var duration = createDuration(posNegDuration).abs();
  24894. var seconds = round(duration.as('s'));
  24895. var minutes = round(duration.as('m'));
  24896. var hours = round(duration.as('h'));
  24897. var days = round(duration.as('d'));
  24898. var months = round(duration.as('M'));
  24899. var years = round(duration.as('y'));
  24900. var a = seconds <= thresholds.ss && ['s', seconds] ||
  24901. seconds < thresholds.s && ['ss', seconds] ||
  24902. minutes <= 1 && ['m'] ||
  24903. minutes < thresholds.m && ['mm', minutes] ||
  24904. hours <= 1 && ['h'] ||
  24905. hours < thresholds.h && ['hh', hours] ||
  24906. days <= 1 && ['d'] ||
  24907. days < thresholds.d && ['dd', days] ||
  24908. months <= 1 && ['M'] ||
  24909. months < thresholds.M && ['MM', months] ||
  24910. years <= 1 && ['y'] || ['yy', years];
  24911. a[2] = withoutSuffix;
  24912. a[3] = +posNegDuration > 0;
  24913. a[4] = locale;
  24914. return substituteTimeAgo.apply(null, a);
  24915. }
  24916. // This function allows you to set the rounding function for relative time strings
  24917. function getSetRelativeTimeRounding (roundingFunction) {
  24918. if (roundingFunction === undefined) {
  24919. return round;
  24920. }
  24921. if (typeof(roundingFunction) === 'function') {
  24922. round = roundingFunction;
  24923. return true;
  24924. }
  24925. return false;
  24926. }
  24927. // This function allows you to set a threshold for relative time strings
  24928. function getSetRelativeTimeThreshold (threshold, limit) {
  24929. if (thresholds[threshold] === undefined) {
  24930. return false;
  24931. }
  24932. if (limit === undefined) {
  24933. return thresholds[threshold];
  24934. }
  24935. thresholds[threshold] = limit;
  24936. if (threshold === 's') {
  24937. thresholds.ss = limit - 1;
  24938. }
  24939. return true;
  24940. }
  24941. function humanize (withSuffix) {
  24942. if (!this.isValid()) {
  24943. return this.localeData().invalidDate();
  24944. }
  24945. var locale = this.localeData();
  24946. var output = relativeTime$1(this, !withSuffix, locale);
  24947. if (withSuffix) {
  24948. output = locale.pastFuture(+this, output);
  24949. }
  24950. return locale.postformat(output);
  24951. }
  24952. var abs$1 = Math.abs;
  24953. function sign(x) {
  24954. return ((x > 0) - (x < 0)) || +x;
  24955. }
  24956. function toISOString$1() {
  24957. // for ISO strings we do not use the normal bubbling rules:
  24958. // * milliseconds bubble up until they become hours
  24959. // * days do not bubble at all
  24960. // * months bubble up until they become years
  24961. // This is because there is no context-free conversion between hours and days
  24962. // (think of clock changes)
  24963. // and also not between days and months (28-31 days per month)
  24964. if (!this.isValid()) {
  24965. return this.localeData().invalidDate();
  24966. }
  24967. var seconds = abs$1(this._milliseconds) / 1000;
  24968. var days = abs$1(this._days);
  24969. var months = abs$1(this._months);
  24970. var minutes, hours, years;
  24971. // 3600 seconds -> 60 minutes -> 1 hour
  24972. minutes = absFloor(seconds / 60);
  24973. hours = absFloor(minutes / 60);
  24974. seconds %= 60;
  24975. minutes %= 60;
  24976. // 12 months -> 1 year
  24977. years = absFloor(months / 12);
  24978. months %= 12;
  24979. // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js
  24980. var Y = years;
  24981. var M = months;
  24982. var D = days;
  24983. var h = hours;
  24984. var m = minutes;
  24985. var s = seconds ? seconds.toFixed(3).replace(/\.?0+$/, '') : '';
  24986. var total = this.asSeconds();
  24987. if (!total) {
  24988. // this is the same as C#'s (Noda) and python (isodate)...
  24989. // but not other JS (goog.date)
  24990. return 'P0D';
  24991. }
  24992. var totalSign = total < 0 ? '-' : '';
  24993. var ymSign = sign(this._months) !== sign(total) ? '-' : '';
  24994. var daysSign = sign(this._days) !== sign(total) ? '-' : '';
  24995. var hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';
  24996. return totalSign + 'P' +
  24997. (Y ? ymSign + Y + 'Y' : '') +
  24998. (M ? ymSign + M + 'M' : '') +
  24999. (D ? daysSign + D + 'D' : '') +
  25000. ((h || m || s) ? 'T' : '') +
  25001. (h ? hmsSign + h + 'H' : '') +
  25002. (m ? hmsSign + m + 'M' : '') +
  25003. (s ? hmsSign + s + 'S' : '');
  25004. }
  25005. var proto$2 = Duration.prototype;
  25006. proto$2.isValid = isValid$1;
  25007. proto$2.abs = abs;
  25008. proto$2.add = add$1;
  25009. proto$2.subtract = subtract$1;
  25010. proto$2.as = as;
  25011. proto$2.asMilliseconds = asMilliseconds;
  25012. proto$2.asSeconds = asSeconds;
  25013. proto$2.asMinutes = asMinutes;
  25014. proto$2.asHours = asHours;
  25015. proto$2.asDays = asDays;
  25016. proto$2.asWeeks = asWeeks;
  25017. proto$2.asMonths = asMonths;
  25018. proto$2.asYears = asYears;
  25019. proto$2.valueOf = valueOf$1;
  25020. proto$2._bubble = bubble;
  25021. proto$2.clone = clone$1;
  25022. proto$2.get = get$2;
  25023. proto$2.milliseconds = milliseconds;
  25024. proto$2.seconds = seconds;
  25025. proto$2.minutes = minutes;
  25026. proto$2.hours = hours;
  25027. proto$2.days = days;
  25028. proto$2.weeks = weeks;
  25029. proto$2.months = months;
  25030. proto$2.years = years;
  25031. proto$2.humanize = humanize;
  25032. proto$2.toISOString = toISOString$1;
  25033. proto$2.toString = toISOString$1;
  25034. proto$2.toJSON = toISOString$1;
  25035. proto$2.locale = locale;
  25036. proto$2.localeData = localeData;
  25037. // Deprecations
  25038. proto$2.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', toISOString$1);
  25039. proto$2.lang = lang;
  25040. // Side effect imports
  25041. // FORMATTING
  25042. addFormatToken('X', 0, 0, 'unix');
  25043. addFormatToken('x', 0, 0, 'valueOf');
  25044. // PARSING
  25045. addRegexToken('x', matchSigned);
  25046. addRegexToken('X', matchTimestamp);
  25047. addParseToken('X', function (input, array, config) {
  25048. config._d = new Date(parseFloat(input, 10) * 1000);
  25049. });
  25050. addParseToken('x', function (input, array, config) {
  25051. config._d = new Date(toInt(input));
  25052. });
  25053. // Side effect imports
  25054. hooks.version = '2.19.4';
  25055. setHookCallback(createLocal);
  25056. hooks.fn = proto;
  25057. hooks.min = min;
  25058. hooks.max = max;
  25059. hooks.now = now;
  25060. hooks.utc = createUTC;
  25061. hooks.unix = createUnix;
  25062. hooks.months = listMonths;
  25063. hooks.isDate = isDate;
  25064. hooks.locale = getSetGlobalLocale;
  25065. hooks.invalid = createInvalid;
  25066. hooks.duration = createDuration;
  25067. hooks.isMoment = isMoment;
  25068. hooks.weekdays = listWeekdays;
  25069. hooks.parseZone = createInZone;
  25070. hooks.localeData = getLocale;
  25071. hooks.isDuration = isDuration;
  25072. hooks.monthsShort = listMonthsShort;
  25073. hooks.weekdaysMin = listWeekdaysMin;
  25074. hooks.defineLocale = defineLocale;
  25075. hooks.updateLocale = updateLocale;
  25076. hooks.locales = listLocales;
  25077. hooks.weekdaysShort = listWeekdaysShort;
  25078. hooks.normalizeUnits = normalizeUnits;
  25079. hooks.relativeTimeRounding = getSetRelativeTimeRounding;
  25080. hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;
  25081. hooks.calendarFormat = getCalendarFormat;
  25082. hooks.prototype = proto;
  25083. return hooks;
  25084. })));
  25085. define('moment', ['moment/moment'], function (main) { return main; });
  25086. //! moment.js locale configuration
  25087. //! locale : Afrikaans [af]
  25088. //! author : Werner Mollentze : https://github.com/wernerm
  25089. ;(function (global, factory) {
  25090. typeof exports === 'object' && typeof module !== 'undefined'
  25091. && typeof require === 'function' ? factory(require('../moment')) :
  25092. typeof define === 'function' && define.amd ? define('moment/locale/af',['../moment'], factory) :
  25093. factory(global.moment)
  25094. }(this, (function (moment) { 'use strict';
  25095. var af = moment.defineLocale('af', {
  25096. months : 'Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember'.split('_'),
  25097. monthsShort : 'Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des'.split('_'),
  25098. weekdays : 'Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag'.split('_'),
  25099. weekdaysShort : 'Son_Maa_Din_Woe_Don_Vry_Sat'.split('_'),
  25100. weekdaysMin : 'So_Ma_Di_Wo_Do_Vr_Sa'.split('_'),
  25101. meridiemParse: /vm|nm/i,
  25102. isPM : function (input) {
  25103. return /^nm$/i.test(input);
  25104. },
  25105. meridiem : function (hours, minutes, isLower) {
  25106. if (hours < 12) {
  25107. return isLower ? 'vm' : 'VM';
  25108. } else {
  25109. return isLower ? 'nm' : 'NM';
  25110. }
  25111. },
  25112. longDateFormat : {
  25113. LT : 'HH:mm',
  25114. LTS : 'HH:mm:ss',
  25115. L : 'DD/MM/YYYY',
  25116. LL : 'D MMMM YYYY',
  25117. LLL : 'D MMMM YYYY HH:mm',
  25118. LLLL : 'dddd, D MMMM YYYY HH:mm'
  25119. },
  25120. calendar : {
  25121. sameDay : '[Vandag om] LT',
  25122. nextDay : '[Môre om] LT',
  25123. nextWeek : 'dddd [om] LT',
  25124. lastDay : '[Gister om] LT',
  25125. lastWeek : '[Laas] dddd [om] LT',
  25126. sameElse : 'L'
  25127. },
  25128. relativeTime : {
  25129. future : 'oor %s',
  25130. past : '%s gelede',
  25131. s : '\'n paar sekondes',
  25132. m : '\'n minuut',
  25133. mm : '%d minute',
  25134. h : '\'n uur',
  25135. hh : '%d ure',
  25136. d : '\'n dag',
  25137. dd : '%d dae',
  25138. M : '\'n maand',
  25139. MM : '%d maande',
  25140. y : '\'n jaar',
  25141. yy : '%d jaar'
  25142. },
  25143. dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
  25144. ordinal : function (number) {
  25145. return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de'); // Thanks to Joris Röling : https://github.com/jjupiter
  25146. },
  25147. week : {
  25148. dow : 1, // Maandag is die eerste dag van die week.
  25149. doy : 4 // Die week wat die 4de Januarie bevat is die eerste week van die jaar.
  25150. }
  25151. });
  25152. return af;
  25153. })));
  25154. //! moment.js locale configuration
  25155. //! locale : Arabic [ar]
  25156. //! author : Abdel Said: https://github.com/abdelsaid
  25157. //! author : Ahmed Elkhatib
  25158. //! author : forabi https://github.com/forabi
  25159. ;(function (global, factory) {
  25160. typeof exports === 'object' && typeof module !== 'undefined'
  25161. && typeof require === 'function' ? factory(require('../moment')) :
  25162. typeof define === 'function' && define.amd ? define('moment/locale/ar',['../moment'], factory) :
  25163. factory(global.moment)
  25164. }(this, (function (moment) { 'use strict';
  25165. var symbolMap = {
  25166. '1': '١',
  25167. '2': '٢',
  25168. '3': '٣',
  25169. '4': '٤',
  25170. '5': '٥',
  25171. '6': '٦',
  25172. '7': '٧',
  25173. '8': '٨',
  25174. '9': '٩',
  25175. '0': '٠'
  25176. };
  25177. var numberMap = {
  25178. '١': '1',
  25179. '٢': '2',
  25180. '٣': '3',
  25181. '٤': '4',
  25182. '٥': '5',
  25183. '٦': '6',
  25184. '٧': '7',
  25185. '٨': '8',
  25186. '٩': '9',
  25187. '٠': '0'
  25188. };
  25189. var pluralForm = function (n) {
  25190. return n === 0 ? 0 : n === 1 ? 1 : n === 2 ? 2 : n % 100 >= 3 && n % 100 <= 10 ? 3 : n % 100 >= 11 ? 4 : 5;
  25191. };
  25192. var plurals = {
  25193. s : ['أقل من ثانية', 'ثانية واحدة', ['ثانيتان', 'ثانيتين'], '%d ثوان', '%d ثانية', '%d ثانية'],
  25194. m : ['أقل من دقيقة', 'دقيقة واحدة', ['دقيقتان', 'دقيقتين'], '%d دقائق', '%d دقيقة', '%d دقيقة'],
  25195. h : ['أقل من ساعة', 'ساعة واحدة', ['ساعتان', 'ساعتين'], '%d ساعات', '%d ساعة', '%d ساعة'],
  25196. d : ['أقل من يوم', 'يوم واحد', ['يومان', 'يومين'], '%d أيام', '%d يومًا', '%d يوم'],
  25197. M : ['أقل من شهر', 'شهر واحد', ['شهران', 'شهرين'], '%d أشهر', '%d شهرا', '%d شهر'],
  25198. y : ['أقل من عام', 'عام واحد', ['عامان', 'عامين'], '%d أعوام', '%d عامًا', '%d عام']
  25199. };
  25200. var pluralize = function (u) {
  25201. return function (number, withoutSuffix, string, isFuture) {
  25202. var f = pluralForm(number),
  25203. str = plurals[u][pluralForm(number)];
  25204. if (f === 2) {
  25205. str = str[withoutSuffix ? 0 : 1];
  25206. }
  25207. return str.replace(/%d/i, number);
  25208. };
  25209. };
  25210. var months = [
  25211. 'كانون الثاني يناير',
  25212. 'شباط فبراير',
  25213. 'آذار مارس',
  25214. 'نيسان أبريل',
  25215. 'أيار مايو',
  25216. 'حزيران يونيو',
  25217. 'تموز يوليو',
  25218. 'آب أغسطس',
  25219. 'أيلول سبتمبر',
  25220. 'تشرين الأول أكتوبر',
  25221. 'تشرين الثاني نوفمبر',
  25222. 'كانون الأول ديسمبر'
  25223. ];
  25224. var ar = moment.defineLocale('ar', {
  25225. months : months,
  25226. monthsShort : months,
  25227. weekdays : 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
  25228. weekdaysShort : 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
  25229. weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'),
  25230. weekdaysParseExact : true,
  25231. longDateFormat : {
  25232. LT : 'HH:mm',
  25233. LTS : 'HH:mm:ss',
  25234. L : 'D/\u200FM/\u200FYYYY',
  25235. LL : 'D MMMM YYYY',
  25236. LLL : 'D MMMM YYYY HH:mm',
  25237. LLLL : 'dddd D MMMM YYYY HH:mm'
  25238. },
  25239. meridiemParse: /ص|م/,
  25240. isPM : function (input) {
  25241. return 'م' === input;
  25242. },
  25243. meridiem : function (hour, minute, isLower) {
  25244. if (hour < 12) {
  25245. return 'ص';
  25246. } else {
  25247. return 'م';
  25248. }
  25249. },
  25250. calendar : {
  25251. sameDay: '[اليوم عند الساعة] LT',
  25252. nextDay: '[غدًا عند الساعة] LT',
  25253. nextWeek: 'dddd [عند الساعة] LT',
  25254. lastDay: '[أمس عند الساعة] LT',
  25255. lastWeek: 'dddd [عند الساعة] LT',
  25256. sameElse: 'L'
  25257. },
  25258. relativeTime : {
  25259. future : 'بعد %s',
  25260. past : 'منذ %s',
  25261. s : pluralize('s'),
  25262. m : pluralize('m'),
  25263. mm : pluralize('m'),
  25264. h : pluralize('h'),
  25265. hh : pluralize('h'),
  25266. d : pluralize('d'),
  25267. dd : pluralize('d'),
  25268. M : pluralize('M'),
  25269. MM : pluralize('M'),
  25270. y : pluralize('y'),
  25271. yy : pluralize('y')
  25272. },
  25273. preparse: function (string) {
  25274. return string.replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {
  25275. return numberMap[match];
  25276. }).replace(/،/g, ',');
  25277. },
  25278. postformat: function (string) {
  25279. return string.replace(/\d/g, function (match) {
  25280. return symbolMap[match];
  25281. }).replace(/,/g, '،');
  25282. },
  25283. week : {
  25284. dow : 6, // Saturday is the first day of the week.
  25285. doy : 12 // The week that contains Jan 1st is the first week of the year.
  25286. }
  25287. });
  25288. return ar;
  25289. })));
  25290. //! moment.js locale configuration
  25291. //! locale : Bulgarian [bg]
  25292. //! author : Krasen Borisov : https://github.com/kraz
  25293. ;(function (global, factory) {
  25294. typeof exports === 'object' && typeof module !== 'undefined'
  25295. && typeof require === 'function' ? factory(require('../moment')) :
  25296. typeof define === 'function' && define.amd ? define('moment/locale/bg',['../moment'], factory) :
  25297. factory(global.moment)
  25298. }(this, (function (moment) { 'use strict';
  25299. var bg = moment.defineLocale('bg', {
  25300. months : 'януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември'.split('_'),
  25301. monthsShort : 'янр_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек'.split('_'),
  25302. weekdays : 'неделя_понеделник_вторник_сряда_четвъртък_петък_събота'.split('_'),
  25303. weekdaysShort : 'нед_пон_вто_сря_чет_пет_съб'.split('_'),
  25304. weekdaysMin : 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
  25305. longDateFormat : {
  25306. LT : 'H:mm',
  25307. LTS : 'H:mm:ss',
  25308. L : 'D.MM.YYYY',
  25309. LL : 'D MMMM YYYY',
  25310. LLL : 'D MMMM YYYY H:mm',
  25311. LLLL : 'dddd, D MMMM YYYY H:mm'
  25312. },
  25313. calendar : {
  25314. sameDay : '[Днес в] LT',
  25315. nextDay : '[Утре в] LT',
  25316. nextWeek : 'dddd [в] LT',
  25317. lastDay : '[Вчера в] LT',
  25318. lastWeek : function () {
  25319. switch (this.day()) {
  25320. case 0:
  25321. case 3:
  25322. case 6:
  25323. return '[В изминалата] dddd [в] LT';
  25324. case 1:
  25325. case 2:
  25326. case 4:
  25327. case 5:
  25328. return '[В изминалия] dddd [в] LT';
  25329. }
  25330. },
  25331. sameElse : 'L'
  25332. },
  25333. relativeTime : {
  25334. future : 'след %s',
  25335. past : 'преди %s',
  25336. s : 'няколко секунди',
  25337. m : 'минута',
  25338. mm : '%d минути',
  25339. h : 'час',
  25340. hh : '%d часа',
  25341. d : 'ден',
  25342. dd : '%d дни',
  25343. M : 'месец',
  25344. MM : '%d месеца',
  25345. y : 'година',
  25346. yy : '%d години'
  25347. },
  25348. dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/,
  25349. ordinal : function (number) {
  25350. var lastDigit = number % 10,
  25351. last2Digits = number % 100;
  25352. if (number === 0) {
  25353. return number + '-ев';
  25354. } else if (last2Digits === 0) {
  25355. return number + '-ен';
  25356. } else if (last2Digits > 10 && last2Digits < 20) {
  25357. return number + '-ти';
  25358. } else if (lastDigit === 1) {
  25359. return number + '-ви';
  25360. } else if (lastDigit === 2) {
  25361. return number + '-ри';
  25362. } else if (lastDigit === 7 || lastDigit === 8) {
  25363. return number + '-ми';
  25364. } else {
  25365. return number + '-ти';
  25366. }
  25367. },
  25368. week : {
  25369. dow : 1, // Monday is the first day of the week.
  25370. doy : 7 // The week that contains Jan 1st is the first week of the year.
  25371. }
  25372. });
  25373. return bg;
  25374. })));
  25375. //! moment.js locale configuration
  25376. //! locale : Catalan [ca]
  25377. //! author : Juan G. Hurtado : https://github.com/juanghurtado
  25378. ;(function (global, factory) {
  25379. typeof exports === 'object' && typeof module !== 'undefined'
  25380. && typeof require === 'function' ? factory(require('../moment')) :
  25381. typeof define === 'function' && define.amd ? define('moment/locale/ca',['../moment'], factory) :
  25382. factory(global.moment)
  25383. }(this, (function (moment) { 'use strict';
  25384. var ca = moment.defineLocale('ca', {
  25385. months : {
  25386. standalone: 'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split('_'),
  25387. 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('_'),
  25388. isFormat: /D[oD]?(\s)+MMMM/
  25389. },
  25390. monthsShort : 'gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.'.split('_'),
  25391. monthsParseExact : true,
  25392. weekdays : 'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split('_'),
  25393. weekdaysShort : 'dg._dl._dt._dc._dj._dv._ds.'.split('_'),
  25394. weekdaysMin : 'dg_dl_dt_dc_dj_dv_ds'.split('_'),
  25395. weekdaysParseExact : true,
  25396. longDateFormat : {
  25397. LT : 'H:mm',
  25398. LTS : 'H:mm:ss',
  25399. L : 'DD/MM/YYYY',
  25400. LL : 'D MMMM [de] YYYY',
  25401. ll : 'D MMM YYYY',
  25402. LLL : 'D MMMM [de] YYYY [a les] H:mm',
  25403. lll : 'D MMM YYYY, H:mm',
  25404. LLLL : 'dddd D MMMM [de] YYYY [a les] H:mm',
  25405. llll : 'ddd D MMM YYYY, H:mm'
  25406. },
  25407. calendar : {
  25408. sameDay : function () {
  25409. return '[avui a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
  25410. },
  25411. nextDay : function () {
  25412. return '[demà a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
  25413. },
  25414. nextWeek : function () {
  25415. return 'dddd [a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
  25416. },
  25417. lastDay : function () {
  25418. return '[ahir a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
  25419. },
  25420. lastWeek : function () {
  25421. return '[el] dddd [passat a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
  25422. },
  25423. sameElse : 'L'
  25424. },
  25425. relativeTime : {
  25426. future : 'd\'aquí %s',
  25427. past : 'fa %s',
  25428. s : 'uns segons',
  25429. m : 'un minut',
  25430. mm : '%d minuts',
  25431. h : 'una hora',
  25432. hh : '%d hores',
  25433. d : 'un dia',
  25434. dd : '%d dies',
  25435. M : 'un mes',
  25436. MM : '%d mesos',
  25437. y : 'un any',
  25438. yy : '%d anys'
  25439. },
  25440. dayOfMonthOrdinalParse: /\d{1,2}(r|n|t|è|a)/,
  25441. ordinal : function (number, period) {
  25442. var output = (number === 1) ? 'r' :
  25443. (number === 2) ? 'n' :
  25444. (number === 3) ? 'r' :
  25445. (number === 4) ? 't' : 'è';
  25446. if (period === 'w' || period === 'W') {
  25447. output = 'a';
  25448. }
  25449. return number + output;
  25450. },
  25451. week : {
  25452. dow : 1, // Monday is the first day of the week.
  25453. doy : 4 // The week that contains Jan 4th is the first week of the year.
  25454. }
  25455. });
  25456. return ca;
  25457. })));
  25458. //! moment.js locale configuration
  25459. //! locale : German [de]
  25460. //! author : lluchs : https://github.com/lluchs
  25461. //! author: Menelion Elensúle: https://github.com/Oire
  25462. //! author : Mikolaj Dadela : https://github.com/mik01aj
  25463. ;(function (global, factory) {
  25464. typeof exports === 'object' && typeof module !== 'undefined'
  25465. && typeof require === 'function' ? factory(require('../moment')) :
  25466. typeof define === 'function' && define.amd ? define('moment/locale/de',['../moment'], factory) :
  25467. factory(global.moment)
  25468. }(this, (function (moment) { 'use strict';
  25469. function processRelativeTime(number, withoutSuffix, key, isFuture) {
  25470. var format = {
  25471. 'm': ['eine Minute', 'einer Minute'],
  25472. 'h': ['eine Stunde', 'einer Stunde'],
  25473. 'd': ['ein Tag', 'einem Tag'],
  25474. 'dd': [number + ' Tage', number + ' Tagen'],
  25475. 'M': ['ein Monat', 'einem Monat'],
  25476. 'MM': [number + ' Monate', number + ' Monaten'],
  25477. 'y': ['ein Jahr', 'einem Jahr'],
  25478. 'yy': [number + ' Jahre', number + ' Jahren']
  25479. };
  25480. return withoutSuffix ? format[key][0] : format[key][1];
  25481. }
  25482. var de = moment.defineLocale('de', {
  25483. months : 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'),
  25484. monthsShort : 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),
  25485. monthsParseExact : true,
  25486. weekdays : 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'),
  25487. weekdaysShort : 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),
  25488. weekdaysMin : 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
  25489. weekdaysParseExact : true,
  25490. longDateFormat : {
  25491. LT: 'HH:mm',
  25492. LTS: 'HH:mm:ss',
  25493. L : 'DD.MM.YYYY',
  25494. LL : 'D. MMMM YYYY',
  25495. LLL : 'D. MMMM YYYY HH:mm',
  25496. LLLL : 'dddd, D. MMMM YYYY HH:mm'
  25497. },
  25498. calendar : {
  25499. sameDay: '[heute um] LT [Uhr]',
  25500. sameElse: 'L',
  25501. nextDay: '[morgen um] LT [Uhr]',
  25502. nextWeek: 'dddd [um] LT [Uhr]',
  25503. lastDay: '[gestern um] LT [Uhr]',
  25504. lastWeek: '[letzten] dddd [um] LT [Uhr]'
  25505. },
  25506. relativeTime : {
  25507. future : 'in %s',
  25508. past : 'vor %s',
  25509. s : 'ein paar Sekunden',
  25510. m : processRelativeTime,
  25511. mm : '%d Minuten',
  25512. h : processRelativeTime,
  25513. hh : '%d Stunden',
  25514. d : processRelativeTime,
  25515. dd : processRelativeTime,
  25516. M : processRelativeTime,
  25517. MM : processRelativeTime,
  25518. y : processRelativeTime,
  25519. yy : processRelativeTime
  25520. },
  25521. dayOfMonthOrdinalParse: /\d{1,2}\./,
  25522. ordinal : '%d.',
  25523. week : {
  25524. dow : 1, // Monday is the first day of the week.
  25525. doy : 4 // The week that contains Jan 4th is the first week of the year.
  25526. }
  25527. });
  25528. return de;
  25529. })));
  25530. //! moment.js locale configuration
  25531. //! locale : Spanish [es]
  25532. //! author : Julio Napurí : https://github.com/julionc
  25533. ;(function (global, factory) {
  25534. typeof exports === 'object' && typeof module !== 'undefined'
  25535. && typeof require === 'function' ? factory(require('../moment')) :
  25536. typeof define === 'function' && define.amd ? define('moment/locale/es',['../moment'], factory) :
  25537. factory(global.moment)
  25538. }(this, (function (moment) { 'use strict';
  25539. var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_');
  25540. var monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_');
  25541. var 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];
  25542. var 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;
  25543. var es = moment.defineLocale('es', {
  25544. months : 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),
  25545. monthsShort : function (m, format) {
  25546. if (!m) {
  25547. return monthsShortDot;
  25548. } else if (/-MMM-/.test(format)) {
  25549. return monthsShort[m.month()];
  25550. } else {
  25551. return monthsShortDot[m.month()];
  25552. }
  25553. },
  25554. monthsRegex : monthsRegex,
  25555. monthsShortRegex : monthsRegex,
  25556. monthsStrictRegex : /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
  25557. monthsShortStrictRegex : /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
  25558. monthsParse : monthsParse,
  25559. longMonthsParse : monthsParse,
  25560. shortMonthsParse : monthsParse,
  25561. weekdays : 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
  25562. weekdaysShort : 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
  25563. weekdaysMin : 'do_lu_ma_mi_ju_vi_sá'.split('_'),
  25564. weekdaysParseExact : true,
  25565. longDateFormat : {
  25566. LT : 'H:mm',
  25567. LTS : 'H:mm:ss',
  25568. L : 'DD/MM/YYYY',
  25569. LL : 'D [de] MMMM [de] YYYY',
  25570. LLL : 'D [de] MMMM [de] YYYY H:mm',
  25571. LLLL : 'dddd, D [de] MMMM [de] YYYY H:mm'
  25572. },
  25573. calendar : {
  25574. sameDay : function () {
  25575. return '[hoy a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
  25576. },
  25577. nextDay : function () {
  25578. return '[mañana a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
  25579. },
  25580. nextWeek : function () {
  25581. return 'dddd [a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
  25582. },
  25583. lastDay : function () {
  25584. return '[ayer a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
  25585. },
  25586. lastWeek : function () {
  25587. return '[el] dddd [pasado a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
  25588. },
  25589. sameElse : 'L'
  25590. },
  25591. relativeTime : {
  25592. future : 'en %s',
  25593. past : 'hace %s',
  25594. s : 'unos segundos',
  25595. m : 'un minuto',
  25596. mm : '%d minutos',
  25597. h : 'una hora',
  25598. hh : '%d horas',
  25599. d : 'un día',
  25600. dd : '%d días',
  25601. M : 'un mes',
  25602. MM : '%d meses',
  25603. y : 'un año',
  25604. yy : '%d años'
  25605. },
  25606. dayOfMonthOrdinalParse : /\d{1,2}º/,
  25607. ordinal : '%dº',
  25608. week : {
  25609. dow : 1, // Monday is the first day of the week.
  25610. doy : 4 // The week that contains Jan 4th is the first week of the year.
  25611. }
  25612. });
  25613. return es;
  25614. })));
  25615. //! moment.js locale configuration
  25616. //! locale : French [fr]
  25617. //! author : John Fischer : https://github.com/jfroffice
  25618. ;(function (global, factory) {
  25619. typeof exports === 'object' && typeof module !== 'undefined'
  25620. && typeof require === 'function' ? factory(require('../moment')) :
  25621. typeof define === 'function' && define.amd ? define('moment/locale/fr',['../moment'], factory) :
  25622. factory(global.moment)
  25623. }(this, (function (moment) { 'use strict';
  25624. var fr = moment.defineLocale('fr', {
  25625. months : 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'),
  25626. monthsShort : 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'),
  25627. monthsParseExact : true,
  25628. weekdays : 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),
  25629. weekdaysShort : 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),
  25630. weekdaysMin : 'Di_Lu_Ma_Me_Je_Ve_Sa'.split('_'),
  25631. weekdaysParseExact : true,
  25632. longDateFormat : {
  25633. LT : 'HH:mm',
  25634. LTS : 'HH:mm:ss',
  25635. L : 'DD/MM/YYYY',
  25636. LL : 'D MMMM YYYY',
  25637. LLL : 'D MMMM YYYY HH:mm',
  25638. LLLL : 'dddd D MMMM YYYY HH:mm'
  25639. },
  25640. calendar : {
  25641. sameDay : '[Aujourd’hui à] LT',
  25642. nextDay : '[Demain à] LT',
  25643. nextWeek : 'dddd [à] LT',
  25644. lastDay : '[Hier à] LT',
  25645. lastWeek : 'dddd [dernier à] LT',
  25646. sameElse : 'L'
  25647. },
  25648. relativeTime : {
  25649. future : 'dans %s',
  25650. past : 'il y a %s',
  25651. s : 'quelques secondes',
  25652. m : 'une minute',
  25653. mm : '%d minutes',
  25654. h : 'une heure',
  25655. hh : '%d heures',
  25656. d : 'un jour',
  25657. dd : '%d jours',
  25658. M : 'un mois',
  25659. MM : '%d mois',
  25660. y : 'un an',
  25661. yy : '%d ans'
  25662. },
  25663. dayOfMonthOrdinalParse: /\d{1,2}(er|)/,
  25664. ordinal : function (number, period) {
  25665. switch (period) {
  25666. // TODO: Return 'e' when day of month > 1. Move this case inside
  25667. // block for masculine words below.
  25668. // See https://github.com/moment/moment/issues/3375
  25669. case 'D':
  25670. return number + (number === 1 ? 'er' : '');
  25671. // Words with masculine grammatical gender: mois, trimestre, jour
  25672. default:
  25673. case 'M':
  25674. case 'Q':
  25675. case 'DDD':
  25676. case 'd':
  25677. return number + (number === 1 ? 'er' : 'e');
  25678. // Words with feminine grammatical gender: semaine
  25679. case 'w':
  25680. case 'W':
  25681. return number + (number === 1 ? 're' : 'e');
  25682. }
  25683. },
  25684. week : {
  25685. dow : 1, // Monday is the first day of the week.
  25686. doy : 4 // The week that contains Jan 4th is the first week of the year.
  25687. }
  25688. });
  25689. return fr;
  25690. })));
  25691. //! moment.js locale configuration
  25692. //! locale : Hebrew [he]
  25693. //! author : Tomer Cohen : https://github.com/tomer
  25694. //! author : Moshe Simantov : https://github.com/DevelopmentIL
  25695. //! author : Tal Ater : https://github.com/TalAter
  25696. ;(function (global, factory) {
  25697. typeof exports === 'object' && typeof module !== 'undefined'
  25698. && typeof require === 'function' ? factory(require('../moment')) :
  25699. typeof define === 'function' && define.amd ? define('moment/locale/he',['../moment'], factory) :
  25700. factory(global.moment)
  25701. }(this, (function (moment) { 'use strict';
  25702. var he = moment.defineLocale('he', {
  25703. months : 'ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר'.split('_'),
  25704. monthsShort : 'ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳'.split('_'),
  25705. weekdays : 'ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת'.split('_'),
  25706. weekdaysShort : 'א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳'.split('_'),
  25707. weekdaysMin : 'א_ב_ג_ד_ה_ו_ש'.split('_'),
  25708. longDateFormat : {
  25709. LT : 'HH:mm',
  25710. LTS : 'HH:mm:ss',
  25711. L : 'DD/MM/YYYY',
  25712. LL : 'D [ב]MMMM YYYY',
  25713. LLL : 'D [ב]MMMM YYYY HH:mm',
  25714. LLLL : 'dddd, D [ב]MMMM YYYY HH:mm',
  25715. l : 'D/M/YYYY',
  25716. ll : 'D MMM YYYY',
  25717. lll : 'D MMM YYYY HH:mm',
  25718. llll : 'ddd, D MMM YYYY HH:mm'
  25719. },
  25720. calendar : {
  25721. sameDay : '[היום ב־]LT',
  25722. nextDay : '[מחר ב־]LT',
  25723. nextWeek : 'dddd [בשעה] LT',
  25724. lastDay : '[אתמול ב־]LT',
  25725. lastWeek : '[ביום] dddd [האחרון בשעה] LT',
  25726. sameElse : 'L'
  25727. },
  25728. relativeTime : {
  25729. future : 'בעוד %s',
  25730. past : 'לפני %s',
  25731. s : 'מספר שניות',
  25732. m : 'דקה',
  25733. mm : '%d דקות',
  25734. h : 'שעה',
  25735. hh : function (number) {
  25736. if (number === 2) {
  25737. return 'שעתיים';
  25738. }
  25739. return number + ' שעות';
  25740. },
  25741. d : 'יום',
  25742. dd : function (number) {
  25743. if (number === 2) {
  25744. return 'יומיים';
  25745. }
  25746. return number + ' ימים';
  25747. },
  25748. M : 'חודש',
  25749. MM : function (number) {
  25750. if (number === 2) {
  25751. return 'חודשיים';
  25752. }
  25753. return number + ' חודשים';
  25754. },
  25755. y : 'שנה',
  25756. yy : function (number) {
  25757. if (number === 2) {
  25758. return 'שנתיים';
  25759. } else if (number % 10 === 0 && number !== 10) {
  25760. return number + ' שנה';
  25761. }
  25762. return number + ' שנים';
  25763. }
  25764. },
  25765. meridiemParse: /אחה"צ|לפנה"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,
  25766. isPM : function (input) {
  25767. return /^(אחה"צ|אחרי הצהריים|בערב)$/.test(input);
  25768. },
  25769. meridiem : function (hour, minute, isLower) {
  25770. if (hour < 5) {
  25771. return 'לפנות בוקר';
  25772. } else if (hour < 10) {
  25773. return 'בבוקר';
  25774. } else if (hour < 12) {
  25775. return isLower ? 'לפנה"צ' : 'לפני הצהריים';
  25776. } else if (hour < 18) {
  25777. return isLower ? 'אחה"צ' : 'אחרי הצהריים';
  25778. } else {
  25779. return 'בערב';
  25780. }
  25781. }
  25782. });
  25783. return he;
  25784. })));
  25785. //! moment.js locale configuration
  25786. //! locale : Hungarian [hu]
  25787. //! author : Adam Brunner : https://github.com/adambrunner
  25788. ;(function (global, factory) {
  25789. typeof exports === 'object' && typeof module !== 'undefined'
  25790. && typeof require === 'function' ? factory(require('../moment')) :
  25791. typeof define === 'function' && define.amd ? define('moment/locale/hu',['../moment'], factory) :
  25792. factory(global.moment)
  25793. }(this, (function (moment) { 'use strict';
  25794. var weekEndings = 'vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton'.split(' ');
  25795. function translate(number, withoutSuffix, key, isFuture) {
  25796. var num = number;
  25797. switch (key) {
  25798. case 's':
  25799. return (isFuture || withoutSuffix) ? 'néhány másodperc' : 'néhány másodperce';
  25800. case 'm':
  25801. return 'egy' + (isFuture || withoutSuffix ? ' perc' : ' perce');
  25802. case 'mm':
  25803. return num + (isFuture || withoutSuffix ? ' perc' : ' perce');
  25804. case 'h':
  25805. return 'egy' + (isFuture || withoutSuffix ? ' óra' : ' órája');
  25806. case 'hh':
  25807. return num + (isFuture || withoutSuffix ? ' óra' : ' órája');
  25808. case 'd':
  25809. return 'egy' + (isFuture || withoutSuffix ? ' nap' : ' napja');
  25810. case 'dd':
  25811. return num + (isFuture || withoutSuffix ? ' nap' : ' napja');
  25812. case 'M':
  25813. return 'egy' + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');
  25814. case 'MM':
  25815. return num + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');
  25816. case 'y':
  25817. return 'egy' + (isFuture || withoutSuffix ? ' év' : ' éve');
  25818. case 'yy':
  25819. return num + (isFuture || withoutSuffix ? ' év' : ' éve');
  25820. }
  25821. return '';
  25822. }
  25823. function week(isFuture) {
  25824. return (isFuture ? '' : '[múlt] ') + '[' + weekEndings[this.day()] + '] LT[-kor]';
  25825. }
  25826. var hu = moment.defineLocale('hu', {
  25827. months : 'január_február_március_április_május_június_július_augusztus_szeptember_október_november_december'.split('_'),
  25828. monthsShort : 'jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec'.split('_'),
  25829. weekdays : 'vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat'.split('_'),
  25830. weekdaysShort : 'vas_hét_kedd_sze_csüt_pén_szo'.split('_'),
  25831. weekdaysMin : 'v_h_k_sze_cs_p_szo'.split('_'),
  25832. longDateFormat : {
  25833. LT : 'H:mm',
  25834. LTS : 'H:mm:ss',
  25835. L : 'YYYY.MM.DD.',
  25836. LL : 'YYYY. MMMM D.',
  25837. LLL : 'YYYY. MMMM D. H:mm',
  25838. LLLL : 'YYYY. MMMM D., dddd H:mm'
  25839. },
  25840. meridiemParse: /de|du/i,
  25841. isPM: function (input) {
  25842. return input.charAt(1).toLowerCase() === 'u';
  25843. },
  25844. meridiem : function (hours, minutes, isLower) {
  25845. if (hours < 12) {
  25846. return isLower === true ? 'de' : 'DE';
  25847. } else {
  25848. return isLower === true ? 'du' : 'DU';
  25849. }
  25850. },
  25851. calendar : {
  25852. sameDay : '[ma] LT[-kor]',
  25853. nextDay : '[holnap] LT[-kor]',
  25854. nextWeek : function () {
  25855. return week.call(this, true);
  25856. },
  25857. lastDay : '[tegnap] LT[-kor]',
  25858. lastWeek : function () {
  25859. return week.call(this, false);
  25860. },
  25861. sameElse : 'L'
  25862. },
  25863. relativeTime : {
  25864. future : '%s múlva',
  25865. past : '%s',
  25866. s : translate,
  25867. m : translate,
  25868. mm : translate,
  25869. h : translate,
  25870. hh : translate,
  25871. d : translate,
  25872. dd : translate,
  25873. M : translate,
  25874. MM : translate,
  25875. y : translate,
  25876. yy : translate
  25877. },
  25878. dayOfMonthOrdinalParse: /\d{1,2}\./,
  25879. ordinal : '%d.',
  25880. week : {
  25881. dow : 1, // Monday is the first day of the week.
  25882. doy : 4 // The week that contains Jan 4th is the first week of the year.
  25883. }
  25884. });
  25885. return hu;
  25886. })));
  25887. //! moment.js locale configuration
  25888. //! locale : Indonesian [id]
  25889. //! author : Mohammad Satrio Utomo : https://github.com/tyok
  25890. //! reference: http://id.wikisource.org/wiki/Pedoman_Umum_Ejaan_Bahasa_Indonesia_yang_Disempurnakan
  25891. ;(function (global, factory) {
  25892. typeof exports === 'object' && typeof module !== 'undefined'
  25893. && typeof require === 'function' ? factory(require('../moment')) :
  25894. typeof define === 'function' && define.amd ? define('moment/locale/id',['../moment'], factory) :
  25895. factory(global.moment)
  25896. }(this, (function (moment) { 'use strict';
  25897. var id = moment.defineLocale('id', {
  25898. months : 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember'.split('_'),
  25899. monthsShort : 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nov_Des'.split('_'),
  25900. weekdays : 'Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu'.split('_'),
  25901. weekdaysShort : 'Min_Sen_Sel_Rab_Kam_Jum_Sab'.split('_'),
  25902. weekdaysMin : 'Mg_Sn_Sl_Rb_Km_Jm_Sb'.split('_'),
  25903. longDateFormat : {
  25904. LT : 'HH.mm',
  25905. LTS : 'HH.mm.ss',
  25906. L : 'DD/MM/YYYY',
  25907. LL : 'D MMMM YYYY',
  25908. LLL : 'D MMMM YYYY [pukul] HH.mm',
  25909. LLLL : 'dddd, D MMMM YYYY [pukul] HH.mm'
  25910. },
  25911. meridiemParse: /pagi|siang|sore|malam/,
  25912. meridiemHour : function (hour, meridiem) {
  25913. if (hour === 12) {
  25914. hour = 0;
  25915. }
  25916. if (meridiem === 'pagi') {
  25917. return hour;
  25918. } else if (meridiem === 'siang') {
  25919. return hour >= 11 ? hour : hour + 12;
  25920. } else if (meridiem === 'sore' || meridiem === 'malam') {
  25921. return hour + 12;
  25922. }
  25923. },
  25924. meridiem : function (hours, minutes, isLower) {
  25925. if (hours < 11) {
  25926. return 'pagi';
  25927. } else if (hours < 15) {
  25928. return 'siang';
  25929. } else if (hours < 19) {
  25930. return 'sore';
  25931. } else {
  25932. return 'malam';
  25933. }
  25934. },
  25935. calendar : {
  25936. sameDay : '[Hari ini pukul] LT',
  25937. nextDay : '[Besok pukul] LT',
  25938. nextWeek : 'dddd [pukul] LT',
  25939. lastDay : '[Kemarin pukul] LT',
  25940. lastWeek : 'dddd [lalu pukul] LT',
  25941. sameElse : 'L'
  25942. },
  25943. relativeTime : {
  25944. future : 'dalam %s',
  25945. past : '%s yang lalu',
  25946. s : 'beberapa detik',
  25947. m : 'semenit',
  25948. mm : '%d menit',
  25949. h : 'sejam',
  25950. hh : '%d jam',
  25951. d : 'sehari',
  25952. dd : '%d hari',
  25953. M : 'sebulan',
  25954. MM : '%d bulan',
  25955. y : 'setahun',
  25956. yy : '%d tahun'
  25957. },
  25958. week : {
  25959. dow : 1, // Monday is the first day of the week.
  25960. doy : 7 // The week that contains Jan 1st is the first week of the year.
  25961. }
  25962. });
  25963. return id;
  25964. })));
  25965. //! moment.js locale configuration
  25966. //! locale : Italian [it]
  25967. //! author : Lorenzo : https://github.com/aliem
  25968. //! author: Mattia Larentis: https://github.com/nostalgiaz
  25969. ;(function (global, factory) {
  25970. typeof exports === 'object' && typeof module !== 'undefined'
  25971. && typeof require === 'function' ? factory(require('../moment')) :
  25972. typeof define === 'function' && define.amd ? define('moment/locale/it',['../moment'], factory) :
  25973. factory(global.moment)
  25974. }(this, (function (moment) { 'use strict';
  25975. var it = moment.defineLocale('it', {
  25976. months : 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split('_'),
  25977. monthsShort : 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),
  25978. weekdays : 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split('_'),
  25979. weekdaysShort : 'dom_lun_mar_mer_gio_ven_sab'.split('_'),
  25980. weekdaysMin : 'do_lu_ma_me_gi_ve_sa'.split('_'),
  25981. longDateFormat : {
  25982. LT : 'HH:mm',
  25983. LTS : 'HH:mm:ss',
  25984. L : 'DD/MM/YYYY',
  25985. LL : 'D MMMM YYYY',
  25986. LLL : 'D MMMM YYYY HH:mm',
  25987. LLLL : 'dddd, D MMMM YYYY HH:mm'
  25988. },
  25989. calendar : {
  25990. sameDay: '[Oggi alle] LT',
  25991. nextDay: '[Domani alle] LT',
  25992. nextWeek: 'dddd [alle] LT',
  25993. lastDay: '[Ieri alle] LT',
  25994. lastWeek: function () {
  25995. switch (this.day()) {
  25996. case 0:
  25997. return '[la scorsa] dddd [alle] LT';
  25998. default:
  25999. return '[lo scorso] dddd [alle] LT';
  26000. }
  26001. },
  26002. sameElse: 'L'
  26003. },
  26004. relativeTime : {
  26005. future : function (s) {
  26006. return ((/^[0-9].+$/).test(s) ? 'tra' : 'in') + ' ' + s;
  26007. },
  26008. past : '%s fa',
  26009. s : 'alcuni secondi',
  26010. m : 'un minuto',
  26011. mm : '%d minuti',
  26012. h : 'un\'ora',
  26013. hh : '%d ore',
  26014. d : 'un giorno',
  26015. dd : '%d giorni',
  26016. M : 'un mese',
  26017. MM : '%d mesi',
  26018. y : 'un anno',
  26019. yy : '%d anni'
  26020. },
  26021. dayOfMonthOrdinalParse : /\d{1,2}º/,
  26022. ordinal: '%dº',
  26023. week : {
  26024. dow : 1, // Monday is the first day of the week.
  26025. doy : 4 // The week that contains Jan 4th is the first week of the year.
  26026. }
  26027. });
  26028. return it;
  26029. })));
  26030. //! moment.js locale configuration
  26031. //! locale : Japanese [ja]
  26032. //! author : LI Long : https://github.com/baryon
  26033. ;(function (global, factory) {
  26034. typeof exports === 'object' && typeof module !== 'undefined'
  26035. && typeof require === 'function' ? factory(require('../moment')) :
  26036. typeof define === 'function' && define.amd ? define('moment/locale/ja',['../moment'], factory) :
  26037. factory(global.moment)
  26038. }(this, (function (moment) { 'use strict';
  26039. var ja = moment.defineLocale('ja', {
  26040. months : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
  26041. monthsShort : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
  26042. weekdays : '日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日'.split('_'),
  26043. weekdaysShort : '日_月_火_水_木_金_土'.split('_'),
  26044. weekdaysMin : '日_月_火_水_木_金_土'.split('_'),
  26045. longDateFormat : {
  26046. LT : 'HH:mm',
  26047. LTS : 'HH:mm:ss',
  26048. L : 'YYYY/MM/DD',
  26049. LL : 'YYYY年M月D日',
  26050. LLL : 'YYYY年M月D日 HH:mm',
  26051. LLLL : 'YYYY年M月D日 HH:mm dddd',
  26052. l : 'YYYY/MM/DD',
  26053. ll : 'YYYY年M月D日',
  26054. lll : 'YYYY年M月D日 HH:mm',
  26055. llll : 'YYYY年M月D日 HH:mm dddd'
  26056. },
  26057. meridiemParse: /午前|午後/i,
  26058. isPM : function (input) {
  26059. return input === '午後';
  26060. },
  26061. meridiem : function (hour, minute, isLower) {
  26062. if (hour < 12) {
  26063. return '午前';
  26064. } else {
  26065. return '午後';
  26066. }
  26067. },
  26068. calendar : {
  26069. sameDay : '[今日] LT',
  26070. nextDay : '[明日] LT',
  26071. nextWeek : '[来週]dddd LT',
  26072. lastDay : '[昨日] LT',
  26073. lastWeek : '[前週]dddd LT',
  26074. sameElse : 'L'
  26075. },
  26076. dayOfMonthOrdinalParse : /\d{1,2}日/,
  26077. ordinal : function (number, period) {
  26078. switch (period) {
  26079. case 'd':
  26080. case 'D':
  26081. case 'DDD':
  26082. return number + '日';
  26083. default:
  26084. return number;
  26085. }
  26086. },
  26087. relativeTime : {
  26088. future : '%s後',
  26089. past : '%s前',
  26090. s : '数秒',
  26091. m : '1分',
  26092. mm : '%d分',
  26093. h : '1時間',
  26094. hh : '%d時間',
  26095. d : '1日',
  26096. dd : '%d日',
  26097. M : '1ヶ月',
  26098. MM : '%dヶ月',
  26099. y : '1年',
  26100. yy : '%d年'
  26101. }
  26102. });
  26103. return ja;
  26104. })));
  26105. //! moment.js locale configuration
  26106. //! locale : Norwegian Bokmål [nb]
  26107. //! authors : Espen Hovlandsdal : https://github.com/rexxars
  26108. //! Sigurd Gartmann : https://github.com/sigurdga
  26109. ;(function (global, factory) {
  26110. typeof exports === 'object' && typeof module !== 'undefined'
  26111. && typeof require === 'function' ? factory(require('../moment')) :
  26112. typeof define === 'function' && define.amd ? define('moment/locale/nb',['../moment'], factory) :
  26113. factory(global.moment)
  26114. }(this, (function (moment) { 'use strict';
  26115. var nb = moment.defineLocale('nb', {
  26116. months : 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split('_'),
  26117. monthsShort : 'jan._feb._mars_april_mai_juni_juli_aug._sep._okt._nov._des.'.split('_'),
  26118. monthsParseExact : true,
  26119. weekdays : 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),
  26120. weekdaysShort : 'sø._ma._ti._on._to._fr._lø.'.split('_'),
  26121. weekdaysMin : 'sø_ma_ti_on_to_fr_lø'.split('_'),
  26122. weekdaysParseExact : true,
  26123. longDateFormat : {
  26124. LT : 'HH:mm',
  26125. LTS : 'HH:mm:ss',
  26126. L : 'DD.MM.YYYY',
  26127. LL : 'D. MMMM YYYY',
  26128. LLL : 'D. MMMM YYYY [kl.] HH:mm',
  26129. LLLL : 'dddd D. MMMM YYYY [kl.] HH:mm'
  26130. },
  26131. calendar : {
  26132. sameDay: '[i dag kl.] LT',
  26133. nextDay: '[i morgen kl.] LT',
  26134. nextWeek: 'dddd [kl.] LT',
  26135. lastDay: '[i går kl.] LT',
  26136. lastWeek: '[forrige] dddd [kl.] LT',
  26137. sameElse: 'L'
  26138. },
  26139. relativeTime : {
  26140. future : 'om %s',
  26141. past : '%s siden',
  26142. s : 'noen sekunder',
  26143. m : 'ett minutt',
  26144. mm : '%d minutter',
  26145. h : 'en time',
  26146. hh : '%d timer',
  26147. d : 'en dag',
  26148. dd : '%d dager',
  26149. M : 'en måned',
  26150. MM : '%d måneder',
  26151. y : 'ett år',
  26152. yy : '%d år'
  26153. },
  26154. dayOfMonthOrdinalParse: /\d{1,2}\./,
  26155. ordinal : '%d.',
  26156. week : {
  26157. dow : 1, // Monday is the first day of the week.
  26158. doy : 4 // The week that contains Jan 4th is the first week of the year.
  26159. }
  26160. });
  26161. return nb;
  26162. })));
  26163. //! moment.js locale configuration
  26164. //! locale : Dutch [nl]
  26165. //! author : Joris Röling : https://github.com/jorisroling
  26166. //! author : Jacob Middag : https://github.com/middagj
  26167. ;(function (global, factory) {
  26168. typeof exports === 'object' && typeof module !== 'undefined'
  26169. && typeof require === 'function' ? factory(require('../moment')) :
  26170. typeof define === 'function' && define.amd ? define('moment/locale/nl',['../moment'], factory) :
  26171. factory(global.moment)
  26172. }(this, (function (moment) { 'use strict';
  26173. var monthsShortWithDots = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_');
  26174. var monthsShortWithoutDots = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_');
  26175. var 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];
  26176. var monthsRegex = /^(januari|februari|maart|april|mei|april|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;
  26177. var nl = moment.defineLocale('nl', {
  26178. months : 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split('_'),
  26179. monthsShort : function (m, format) {
  26180. if (!m) {
  26181. return monthsShortWithDots;
  26182. } else if (/-MMM-/.test(format)) {
  26183. return monthsShortWithoutDots[m.month()];
  26184. } else {
  26185. return monthsShortWithDots[m.month()];
  26186. }
  26187. },
  26188. monthsRegex: monthsRegex,
  26189. monthsShortRegex: monthsRegex,
  26190. monthsStrictRegex: /^(januari|februari|maart|mei|ju[nl]i|april|augustus|september|oktober|november|december)/i,
  26191. monthsShortStrictRegex: /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,
  26192. monthsParse : monthsParse,
  26193. longMonthsParse : monthsParse,
  26194. shortMonthsParse : monthsParse,
  26195. weekdays : 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),
  26196. weekdaysShort : 'zo._ma._di._wo._do._vr._za.'.split('_'),
  26197. weekdaysMin : 'zo_ma_di_wo_do_vr_za'.split('_'),
  26198. weekdaysParseExact : true,
  26199. longDateFormat : {
  26200. LT : 'HH:mm',
  26201. LTS : 'HH:mm:ss',
  26202. L : 'DD-MM-YYYY',
  26203. LL : 'D MMMM YYYY',
  26204. LLL : 'D MMMM YYYY HH:mm',
  26205. LLLL : 'dddd D MMMM YYYY HH:mm'
  26206. },
  26207. calendar : {
  26208. sameDay: '[vandaag om] LT',
  26209. nextDay: '[morgen om] LT',
  26210. nextWeek: 'dddd [om] LT',
  26211. lastDay: '[gisteren om] LT',
  26212. lastWeek: '[afgelopen] dddd [om] LT',
  26213. sameElse: 'L'
  26214. },
  26215. relativeTime : {
  26216. future : 'over %s',
  26217. past : '%s geleden',
  26218. s : 'een paar seconden',
  26219. m : 'één minuut',
  26220. mm : '%d minuten',
  26221. h : 'één uur',
  26222. hh : '%d uur',
  26223. d : 'één dag',
  26224. dd : '%d dagen',
  26225. M : 'één maand',
  26226. MM : '%d maanden',
  26227. y : 'één jaar',
  26228. yy : '%d jaar'
  26229. },
  26230. dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
  26231. ordinal : function (number) {
  26232. return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de');
  26233. },
  26234. week : {
  26235. dow : 1, // Monday is the first day of the week.
  26236. doy : 4 // The week that contains Jan 4th is the first week of the year.
  26237. }
  26238. });
  26239. return nl;
  26240. })));
  26241. //! moment.js locale configuration
  26242. //! locale : Polish [pl]
  26243. //! author : Rafal Hirsz : https://github.com/evoL
  26244. ;(function (global, factory) {
  26245. typeof exports === 'object' && typeof module !== 'undefined'
  26246. && typeof require === 'function' ? factory(require('../moment')) :
  26247. typeof define === 'function' && define.amd ? define('moment/locale/pl',['../moment'], factory) :
  26248. factory(global.moment)
  26249. }(this, (function (moment) { 'use strict';
  26250. var monthsNominative = 'styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień'.split('_');
  26251. var monthsSubjective = 'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia'.split('_');
  26252. function plural(n) {
  26253. return (n % 10 < 5) && (n % 10 > 1) && ((~~(n / 10) % 10) !== 1);
  26254. }
  26255. function translate(number, withoutSuffix, key) {
  26256. var result = number + ' ';
  26257. switch (key) {
  26258. case 'm':
  26259. return withoutSuffix ? 'minuta' : 'minutę';
  26260. case 'mm':
  26261. return result + (plural(number) ? 'minuty' : 'minut');
  26262. case 'h':
  26263. return withoutSuffix ? 'godzina' : 'godzinę';
  26264. case 'hh':
  26265. return result + (plural(number) ? 'godziny' : 'godzin');
  26266. case 'MM':
  26267. return result + (plural(number) ? 'miesiące' : 'miesięcy');
  26268. case 'yy':
  26269. return result + (plural(number) ? 'lata' : 'lat');
  26270. }
  26271. }
  26272. var pl = moment.defineLocale('pl', {
  26273. months : function (momentToFormat, format) {
  26274. if (!momentToFormat) {
  26275. return monthsNominative;
  26276. } else if (format === '') {
  26277. // Hack: if format empty we know this is used to generate
  26278. // RegExp by moment. Give then back both valid forms of months
  26279. // in RegExp ready format.
  26280. return '(' + monthsSubjective[momentToFormat.month()] + '|' + monthsNominative[momentToFormat.month()] + ')';
  26281. } else if (/D MMMM/.test(format)) {
  26282. return monthsSubjective[momentToFormat.month()];
  26283. } else {
  26284. return monthsNominative[momentToFormat.month()];
  26285. }
  26286. },
  26287. monthsShort : 'sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru'.split('_'),
  26288. weekdays : 'niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota'.split('_'),
  26289. weekdaysShort : 'ndz_pon_wt_śr_czw_pt_sob'.split('_'),
  26290. weekdaysMin : 'Nd_Pn_Wt_Śr_Cz_Pt_So'.split('_'),
  26291. longDateFormat : {
  26292. LT : 'HH:mm',
  26293. LTS : 'HH:mm:ss',
  26294. L : 'DD.MM.YYYY',
  26295. LL : 'D MMMM YYYY',
  26296. LLL : 'D MMMM YYYY HH:mm',
  26297. LLLL : 'dddd, D MMMM YYYY HH:mm'
  26298. },
  26299. calendar : {
  26300. sameDay: '[Dziś o] LT',
  26301. nextDay: '[Jutro o] LT',
  26302. nextWeek: function () {
  26303. switch (this.day()) {
  26304. case 0:
  26305. return '[W niedzielę o] LT';
  26306. case 2:
  26307. return '[We wtorek o] LT';
  26308. case 3:
  26309. return '[W środę o] LT';
  26310. case 6:
  26311. return '[W sobotę o] LT';
  26312. default:
  26313. return '[W] dddd [o] LT';
  26314. }
  26315. },
  26316. lastDay: '[Wczoraj o] LT',
  26317. lastWeek: function () {
  26318. switch (this.day()) {
  26319. case 0:
  26320. return '[W zeszłą niedzielę o] LT';
  26321. case 3:
  26322. return '[W zeszłą środę o] LT';
  26323. case 6:
  26324. return '[W zeszłą sobotę o] LT';
  26325. default:
  26326. return '[W zeszły] dddd [o] LT';
  26327. }
  26328. },
  26329. sameElse: 'L'
  26330. },
  26331. relativeTime : {
  26332. future : 'za %s',
  26333. past : '%s temu',
  26334. s : 'kilka sekund',
  26335. m : translate,
  26336. mm : translate,
  26337. h : translate,
  26338. hh : translate,
  26339. d : '1 dzień',
  26340. dd : '%d dni',
  26341. M : 'miesiąc',
  26342. MM : translate,
  26343. y : 'rok',
  26344. yy : translate
  26345. },
  26346. dayOfMonthOrdinalParse: /\d{1,2}\./,
  26347. ordinal : '%d.',
  26348. week : {
  26349. dow : 1, // Monday is the first day of the week.
  26350. doy : 4 // The week that contains Jan 4th is the first week of the year.
  26351. }
  26352. });
  26353. return pl;
  26354. })));
  26355. //! moment.js locale configuration
  26356. //! locale : Portuguese (Brazil) [pt-br]
  26357. //! author : Caio Ribeiro Pereira : https://github.com/caio-ribeiro-pereira
  26358. ;(function (global, factory) {
  26359. typeof exports === 'object' && typeof module !== 'undefined'
  26360. && typeof require === 'function' ? factory(require('../moment')) :
  26361. typeof define === 'function' && define.amd ? define('moment/locale/pt-br',['../moment'], factory) :
  26362. factory(global.moment)
  26363. }(this, (function (moment) { 'use strict';
  26364. var ptBr = moment.defineLocale('pt-br', {
  26365. months : 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split('_'),
  26366. monthsShort : 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'),
  26367. weekdays : 'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split('_'),
  26368. weekdaysShort : 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'),
  26369. weekdaysMin : 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'),
  26370. weekdaysParseExact : true,
  26371. longDateFormat : {
  26372. LT : 'HH:mm',
  26373. LTS : 'HH:mm:ss',
  26374. L : 'DD/MM/YYYY',
  26375. LL : 'D [de] MMMM [de] YYYY',
  26376. LLL : 'D [de] MMMM [de] YYYY [às] HH:mm',
  26377. LLLL : 'dddd, D [de] MMMM [de] YYYY [às] HH:mm'
  26378. },
  26379. calendar : {
  26380. sameDay: '[Hoje às] LT',
  26381. nextDay: '[Amanhã às] LT',
  26382. nextWeek: 'dddd [às] LT',
  26383. lastDay: '[Ontem às] LT',
  26384. lastWeek: function () {
  26385. return (this.day() === 0 || this.day() === 6) ?
  26386. '[Último] dddd [às] LT' : // Saturday + Sunday
  26387. '[Última] dddd [às] LT'; // Monday - Friday
  26388. },
  26389. sameElse: 'L'
  26390. },
  26391. relativeTime : {
  26392. future : 'em %s',
  26393. past : '%s atrás',
  26394. s : 'poucos segundos',
  26395. ss : '%d segundos',
  26396. m : 'um minuto',
  26397. mm : '%d minutos',
  26398. h : 'uma hora',
  26399. hh : '%d horas',
  26400. d : 'um dia',
  26401. dd : '%d dias',
  26402. M : 'um mês',
  26403. MM : '%d meses',
  26404. y : 'um ano',
  26405. yy : '%d anos'
  26406. },
  26407. dayOfMonthOrdinalParse: /\d{1,2}º/,
  26408. ordinal : '%dº'
  26409. });
  26410. return ptBr;
  26411. })));
  26412. //! moment.js locale configuration
  26413. //! locale : Russian [ru]
  26414. //! author : Viktorminator : https://github.com/Viktorminator
  26415. //! Author : Menelion Elensúle : https://github.com/Oire
  26416. //! author : Коренберг Марк : https://github.com/socketpair
  26417. ;(function (global, factory) {
  26418. typeof exports === 'object' && typeof module !== 'undefined'
  26419. && typeof require === 'function' ? factory(require('../moment')) :
  26420. typeof define === 'function' && define.amd ? define('moment/locale/ru',['../moment'], factory) :
  26421. factory(global.moment)
  26422. }(this, (function (moment) { 'use strict';
  26423. function plural(word, num) {
  26424. var forms = word.split('_');
  26425. 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]);
  26426. }
  26427. function relativeTimeWithPlural(number, withoutSuffix, key) {
  26428. var format = {
  26429. 'mm': withoutSuffix ? 'минута_минуты_минут' : 'минуту_минуты_минут',
  26430. 'hh': 'час_часа_часов',
  26431. 'dd': 'день_дня_дней',
  26432. 'MM': 'месяц_месяца_месяцев',
  26433. 'yy': 'год_года_лет'
  26434. };
  26435. if (key === 'm') {
  26436. return withoutSuffix ? 'минута' : 'минуту';
  26437. }
  26438. else {
  26439. return number + ' ' + plural(format[key], +number);
  26440. }
  26441. }
  26442. var monthsParse = [/^янв/i, /^фев/i, /^мар/i, /^апр/i, /^ма[йя]/i, /^июн/i, /^июл/i, /^авг/i, /^сен/i, /^окт/i, /^ноя/i, /^дек/i];
  26443. // http://new.gramota.ru/spravka/rules/139-prop : § 103
  26444. // Сокращения месяцев: http://new.gramota.ru/spravka/buro/search-answer?s=242637
  26445. // CLDR data: http://www.unicode.org/cldr/charts/28/summary/ru.html#1753
  26446. var ru = moment.defineLocale('ru', {
  26447. months : {
  26448. format: 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split('_'),
  26449. standalone: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split('_')
  26450. },
  26451. monthsShort : {
  26452. // по CLDR именно "июл." и "июн.", но какой смысл менять букву на точку ?
  26453. format: 'янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.'.split('_'),
  26454. standalone: 'янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.'.split('_')
  26455. },
  26456. weekdays : {
  26457. standalone: 'воскресенье_понедельник_вторник_среда_четверг_пятница_суббота'.split('_'),
  26458. format: 'воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу'.split('_'),
  26459. isFormat: /\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?\] ?dddd/
  26460. },
  26461. weekdaysShort : 'вс_пн_вт_ср_чт_пт_сб'.split('_'),
  26462. weekdaysMin : 'вс_пн_вт_ср_чт_пт_сб'.split('_'),
  26463. monthsParse : monthsParse,
  26464. longMonthsParse : monthsParse,
  26465. shortMonthsParse : monthsParse,
  26466. // полные названия с падежами, по три буквы, для некоторых, по 4 буквы, сокращения с точкой и без точки
  26467. monthsRegex: /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,
  26468. // копия предыдущего
  26469. monthsShortRegex: /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,
  26470. // полные названия с падежами
  26471. monthsStrictRegex: /^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,
  26472. // Выражение, которое соотвествует только сокращённым формам
  26473. monthsShortStrictRegex: /^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i,
  26474. longDateFormat : {
  26475. LT : 'HH:mm',
  26476. LTS : 'HH:mm:ss',
  26477. L : 'DD.MM.YYYY',
  26478. LL : 'D MMMM YYYY г.',
  26479. LLL : 'D MMMM YYYY г., HH:mm',
  26480. LLLL : 'dddd, D MMMM YYYY г., HH:mm'
  26481. },
  26482. calendar : {
  26483. sameDay: '[Сегодня в] LT',
  26484. nextDay: '[Завтра в] LT',
  26485. lastDay: '[Вчера в] LT',
  26486. nextWeek: function (now) {
  26487. if (now.week() !== this.week()) {
  26488. switch (this.day()) {
  26489. case 0:
  26490. return '[В следующее] dddd [в] LT';
  26491. case 1:
  26492. case 2:
  26493. case 4:
  26494. return '[В следующий] dddd [в] LT';
  26495. case 3:
  26496. case 5:
  26497. case 6:
  26498. return '[В следующую] dddd [в] LT';
  26499. }
  26500. } else {
  26501. if (this.day() === 2) {
  26502. return '[Во] dddd [в] LT';
  26503. } else {
  26504. return '[В] dddd [в] LT';
  26505. }
  26506. }
  26507. },
  26508. lastWeek: function (now) {
  26509. if (now.week() !== this.week()) {
  26510. switch (this.day()) {
  26511. case 0:
  26512. return '[В прошлое] dddd [в] LT';
  26513. case 1:
  26514. case 2:
  26515. case 4:
  26516. return '[В прошлый] dddd [в] LT';
  26517. case 3:
  26518. case 5:
  26519. case 6:
  26520. return '[В прошлую] dddd [в] LT';
  26521. }
  26522. } else {
  26523. if (this.day() === 2) {
  26524. return '[Во] dddd [в] LT';
  26525. } else {
  26526. return '[В] dddd [в] LT';
  26527. }
  26528. }
  26529. },
  26530. sameElse: 'L'
  26531. },
  26532. relativeTime : {
  26533. future : 'через %s',
  26534. past : '%s назад',
  26535. s : 'несколько секунд',
  26536. m : relativeTimeWithPlural,
  26537. mm : relativeTimeWithPlural,
  26538. h : 'час',
  26539. hh : relativeTimeWithPlural,
  26540. d : 'день',
  26541. dd : relativeTimeWithPlural,
  26542. M : 'месяц',
  26543. MM : relativeTimeWithPlural,
  26544. y : 'год',
  26545. yy : relativeTimeWithPlural
  26546. },
  26547. meridiemParse: /ночи|утра|дня|вечера/i,
  26548. isPM : function (input) {
  26549. return /^(дня|вечера)$/.test(input);
  26550. },
  26551. meridiem : function (hour, minute, isLower) {
  26552. if (hour < 4) {
  26553. return 'ночи';
  26554. } else if (hour < 12) {
  26555. return 'утра';
  26556. } else if (hour < 17) {
  26557. return 'дня';
  26558. } else {
  26559. return 'вечера';
  26560. }
  26561. },
  26562. dayOfMonthOrdinalParse: /\d{1,2}-(й|го|я)/,
  26563. ordinal: function (number, period) {
  26564. switch (period) {
  26565. case 'M':
  26566. case 'd':
  26567. case 'DDD':
  26568. return number + '-й';
  26569. case 'D':
  26570. return number + '-го';
  26571. case 'w':
  26572. case 'W':
  26573. return number + '-я';
  26574. default:
  26575. return number;
  26576. }
  26577. },
  26578. week : {
  26579. dow : 1, // Monday is the first day of the week.
  26580. doy : 4 // The week that contains Jan 4th is the first week of the year.
  26581. }
  26582. });
  26583. return ru;
  26584. })));
  26585. //! moment.js locale configuration
  26586. //! locale : Turkish [tr]
  26587. //! authors : Erhan Gundogan : https://github.com/erhangundogan,
  26588. //! Burak Yiğit Kaya: https://github.com/BYK
  26589. ;(function (global, factory) {
  26590. typeof exports === 'object' && typeof module !== 'undefined'
  26591. && typeof require === 'function' ? factory(require('../moment')) :
  26592. typeof define === 'function' && define.amd ? define('moment/locale/tr',['../moment'], factory) :
  26593. factory(global.moment)
  26594. }(this, (function (moment) { 'use strict';
  26595. var suffixes = {
  26596. 1: '\'inci',
  26597. 5: '\'inci',
  26598. 8: '\'inci',
  26599. 70: '\'inci',
  26600. 80: '\'inci',
  26601. 2: '\'nci',
  26602. 7: '\'nci',
  26603. 20: '\'nci',
  26604. 50: '\'nci',
  26605. 3: '\'üncü',
  26606. 4: '\'üncü',
  26607. 100: '\'üncü',
  26608. 6: '\'ncı',
  26609. 9: '\'uncu',
  26610. 10: '\'uncu',
  26611. 30: '\'uncu',
  26612. 60: '\'ıncı',
  26613. 90: '\'ıncı'
  26614. };
  26615. var tr = moment.defineLocale('tr', {
  26616. months : 'Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık'.split('_'),
  26617. monthsShort : 'Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara'.split('_'),
  26618. weekdays : 'Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi'.split('_'),
  26619. weekdaysShort : 'Paz_Pts_Sal_Çar_Per_Cum_Cts'.split('_'),
  26620. weekdaysMin : 'Pz_Pt_Sa_Ça_Pe_Cu_Ct'.split('_'),
  26621. longDateFormat : {
  26622. LT : 'HH:mm',
  26623. LTS : 'HH:mm:ss',
  26624. L : 'DD.MM.YYYY',
  26625. LL : 'D MMMM YYYY',
  26626. LLL : 'D MMMM YYYY HH:mm',
  26627. LLLL : 'dddd, D MMMM YYYY HH:mm'
  26628. },
  26629. calendar : {
  26630. sameDay : '[bugün saat] LT',
  26631. nextDay : '[yarın saat] LT',
  26632. nextWeek : '[gelecek] dddd [saat] LT',
  26633. lastDay : '[dün] LT',
  26634. lastWeek : '[geçen] dddd [saat] LT',
  26635. sameElse : 'L'
  26636. },
  26637. relativeTime : {
  26638. future : '%s sonra',
  26639. past : '%s önce',
  26640. s : 'birkaç saniye',
  26641. m : 'bir dakika',
  26642. mm : '%d dakika',
  26643. h : 'bir saat',
  26644. hh : '%d saat',
  26645. d : 'bir gün',
  26646. dd : '%d gün',
  26647. M : 'bir ay',
  26648. MM : '%d ay',
  26649. y : 'bir yıl',
  26650. yy : '%d yıl'
  26651. },
  26652. dayOfMonthOrdinalParse: /\d{1,2}'(inci|nci|üncü|ncı|uncu|ıncı)/,
  26653. ordinal : function (number) {
  26654. if (number === 0) { // special case for zero
  26655. return number + '\'ıncı';
  26656. }
  26657. var a = number % 10,
  26658. b = number % 100 - a,
  26659. c = number >= 100 ? 100 : null;
  26660. return number + (suffixes[a] || suffixes[b] || suffixes[c]);
  26661. },
  26662. week : {
  26663. dow : 1, // Monday is the first day of the week.
  26664. doy : 7 // The week that contains Jan 1st is the first week of the year.
  26665. }
  26666. });
  26667. return tr;
  26668. })));
  26669. //! moment.js locale configuration
  26670. //! locale : Ukrainian [uk]
  26671. //! author : zemlanin : https://github.com/zemlanin
  26672. //! Author : Menelion Elensúle : https://github.com/Oire
  26673. ;(function (global, factory) {
  26674. typeof exports === 'object' && typeof module !== 'undefined'
  26675. && typeof require === 'function' ? factory(require('../moment')) :
  26676. typeof define === 'function' && define.amd ? define('moment/locale/uk',['../moment'], factory) :
  26677. factory(global.moment)
  26678. }(this, (function (moment) { 'use strict';
  26679. function plural(word, num) {
  26680. var forms = word.split('_');
  26681. 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]);
  26682. }
  26683. function relativeTimeWithPlural(number, withoutSuffix, key) {
  26684. var format = {
  26685. 'mm': withoutSuffix ? 'хвилина_хвилини_хвилин' : 'хвилину_хвилини_хвилин',
  26686. 'hh': withoutSuffix ? 'година_години_годин' : 'годину_години_годин',
  26687. 'dd': 'день_дні_днів',
  26688. 'MM': 'місяць_місяці_місяців',
  26689. 'yy': 'рік_роки_років'
  26690. };
  26691. if (key === 'm') {
  26692. return withoutSuffix ? 'хвилина' : 'хвилину';
  26693. }
  26694. else if (key === 'h') {
  26695. return withoutSuffix ? 'година' : 'годину';
  26696. }
  26697. else {
  26698. return number + ' ' + plural(format[key], +number);
  26699. }
  26700. }
  26701. function weekdaysCaseReplace(m, format) {
  26702. var weekdays = {
  26703. 'nominative': 'неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота'.split('_'),
  26704. 'accusative': 'неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу'.split('_'),
  26705. 'genitive': 'неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи'.split('_')
  26706. };
  26707. if (!m) {
  26708. return weekdays['nominative'];
  26709. }
  26710. var nounCase = (/(\[[ВвУу]\]) ?dddd/).test(format) ?
  26711. 'accusative' :
  26712. ((/\[?(?:минулої|наступної)? ?\] ?dddd/).test(format) ?
  26713. 'genitive' :
  26714. 'nominative');
  26715. return weekdays[nounCase][m.day()];
  26716. }
  26717. function processHoursFunction(str) {
  26718. return function () {
  26719. return str + 'о' + (this.hours() === 11 ? 'б' : '') + '] LT';
  26720. };
  26721. }
  26722. var uk = moment.defineLocale('uk', {
  26723. months : {
  26724. 'format': 'січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня'.split('_'),
  26725. 'standalone': 'січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень'.split('_')
  26726. },
  26727. monthsShort : 'січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд'.split('_'),
  26728. weekdays : weekdaysCaseReplace,
  26729. weekdaysShort : 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
  26730. weekdaysMin : 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
  26731. longDateFormat : {
  26732. LT : 'HH:mm',
  26733. LTS : 'HH:mm:ss',
  26734. L : 'DD.MM.YYYY',
  26735. LL : 'D MMMM YYYY р.',
  26736. LLL : 'D MMMM YYYY р., HH:mm',
  26737. LLLL : 'dddd, D MMMM YYYY р., HH:mm'
  26738. },
  26739. calendar : {
  26740. sameDay: processHoursFunction('[Сьогодні '),
  26741. nextDay: processHoursFunction('[Завтра '),
  26742. lastDay: processHoursFunction('[Вчора '),
  26743. nextWeek: processHoursFunction('[У] dddd ['),
  26744. lastWeek: function () {
  26745. switch (this.day()) {
  26746. case 0:
  26747. case 3:
  26748. case 5:
  26749. case 6:
  26750. return processHoursFunction('[Минулої] dddd [').call(this);
  26751. case 1:
  26752. case 2:
  26753. case 4:
  26754. return processHoursFunction('[Минулого] dddd [').call(this);
  26755. }
  26756. },
  26757. sameElse: 'L'
  26758. },
  26759. relativeTime : {
  26760. future : 'за %s',
  26761. past : '%s тому',
  26762. s : 'декілька секунд',
  26763. m : relativeTimeWithPlural,
  26764. mm : relativeTimeWithPlural,
  26765. h : 'годину',
  26766. hh : relativeTimeWithPlural,
  26767. d : 'день',
  26768. dd : relativeTimeWithPlural,
  26769. M : 'місяць',
  26770. MM : relativeTimeWithPlural,
  26771. y : 'рік',
  26772. yy : relativeTimeWithPlural
  26773. },
  26774. // M. E.: those two are virtually unused but a user might want to implement them for his/her website for some reason
  26775. meridiemParse: /ночі|ранку|дня|вечора/,
  26776. isPM: function (input) {
  26777. return /^(дня|вечора)$/.test(input);
  26778. },
  26779. meridiem : function (hour, minute, isLower) {
  26780. if (hour < 4) {
  26781. return 'ночі';
  26782. } else if (hour < 12) {
  26783. return 'ранку';
  26784. } else if (hour < 17) {
  26785. return 'дня';
  26786. } else {
  26787. return 'вечора';
  26788. }
  26789. },
  26790. dayOfMonthOrdinalParse: /\d{1,2}-(й|го)/,
  26791. ordinal: function (number, period) {
  26792. switch (period) {
  26793. case 'M':
  26794. case 'd':
  26795. case 'DDD':
  26796. case 'w':
  26797. case 'W':
  26798. return number + '-й';
  26799. case 'D':
  26800. return number + '-го';
  26801. default:
  26802. return number;
  26803. }
  26804. },
  26805. week : {
  26806. dow : 1, // Monday is the first day of the week.
  26807. doy : 7 // The week that contains Jan 1st is the first week of the year.
  26808. }
  26809. });
  26810. return uk;
  26811. })));
  26812. //! moment.js locale configuration
  26813. //! locale : Chinese (China) [zh-cn]
  26814. //! author : suupic : https://github.com/suupic
  26815. //! author : Zeno Zeng : https://github.com/zenozeng
  26816. ;(function (global, factory) {
  26817. typeof exports === 'object' && typeof module !== 'undefined'
  26818. && typeof require === 'function' ? factory(require('../moment')) :
  26819. typeof define === 'function' && define.amd ? define('moment/locale/zh-cn',['../moment'], factory) :
  26820. factory(global.moment)
  26821. }(this, (function (moment) { 'use strict';
  26822. var zhCn = moment.defineLocale('zh-cn', {
  26823. months : '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'),
  26824. monthsShort : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
  26825. weekdays : '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
  26826. weekdaysShort : '周日_周一_周二_周三_周四_周五_周六'.split('_'),
  26827. weekdaysMin : '日_一_二_三_四_五_六'.split('_'),
  26828. longDateFormat : {
  26829. LT : 'HH:mm',
  26830. LTS : 'HH:mm:ss',
  26831. L : 'YYYY年MMMD日',
  26832. LL : 'YYYY年MMMD日',
  26833. LLL : 'YYYY年MMMD日Ah点mm分',
  26834. LLLL : 'YYYY年MMMD日ddddAh点mm分',
  26835. l : 'YYYY年MMMD日',
  26836. ll : 'YYYY年MMMD日',
  26837. lll : 'YYYY年MMMD日 HH:mm',
  26838. llll : 'YYYY年MMMD日dddd HH:mm'
  26839. },
  26840. meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
  26841. meridiemHour: function (hour, meridiem) {
  26842. if (hour === 12) {
  26843. hour = 0;
  26844. }
  26845. if (meridiem === '凌晨' || meridiem === '早上' ||
  26846. meridiem === '上午') {
  26847. return hour;
  26848. } else if (meridiem === '下午' || meridiem === '晚上') {
  26849. return hour + 12;
  26850. } else {
  26851. // '中午'
  26852. return hour >= 11 ? hour : hour + 12;
  26853. }
  26854. },
  26855. meridiem : function (hour, minute, isLower) {
  26856. var hm = hour * 100 + minute;
  26857. if (hm < 600) {
  26858. return '凌晨';
  26859. } else if (hm < 900) {
  26860. return '早上';
  26861. } else if (hm < 1130) {
  26862. return '上午';
  26863. } else if (hm < 1230) {
  26864. return '中午';
  26865. } else if (hm < 1800) {
  26866. return '下午';
  26867. } else {
  26868. return '晚上';
  26869. }
  26870. },
  26871. calendar : {
  26872. sameDay : '[今天]LT',
  26873. nextDay : '[明天]LT',
  26874. nextWeek : '[下]ddddLT',
  26875. lastDay : '[昨天]LT',
  26876. lastWeek : '[上]ddddLT',
  26877. sameElse : 'L'
  26878. },
  26879. dayOfMonthOrdinalParse: /\d{1,2}(日|月|周)/,
  26880. ordinal : function (number, period) {
  26881. switch (period) {
  26882. case 'd':
  26883. case 'D':
  26884. case 'DDD':
  26885. return number + '日';
  26886. case 'M':
  26887. return number + '月';
  26888. case 'w':
  26889. case 'W':
  26890. return number + '周';
  26891. default:
  26892. return number;
  26893. }
  26894. },
  26895. relativeTime : {
  26896. future : '%s内',
  26897. past : '%s前',
  26898. s : '几秒',
  26899. m : '1 分钟',
  26900. mm : '%d 分钟',
  26901. h : '1 小时',
  26902. hh : '%d 小时',
  26903. d : '1 天',
  26904. dd : '%d 天',
  26905. M : '1 个月',
  26906. MM : '%d 个月',
  26907. y : '1 年',
  26908. yy : '%d 年'
  26909. },
  26910. week : {
  26911. // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效
  26912. dow : 1, // Monday is the first day of the week.
  26913. doy : 4 // The week that contains Jan 4th is the first week of the year.
  26914. }
  26915. });
  26916. return zhCn;
  26917. })));
  26918. //! moment.js locale configuration
  26919. //! locale : Chinese (Taiwan) [zh-tw]
  26920. //! author : Ben : https://github.com/ben-lin
  26921. //! author : Chris Lam : https://github.com/hehachris
  26922. ;(function (global, factory) {
  26923. typeof exports === 'object' && typeof module !== 'undefined'
  26924. && typeof require === 'function' ? factory(require('../moment')) :
  26925. typeof define === 'function' && define.amd ? define('moment/locale/zh-tw',['../moment'], factory) :
  26926. factory(global.moment)
  26927. }(this, (function (moment) { 'use strict';
  26928. var zhTw = moment.defineLocale('zh-tw', {
  26929. months : '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'),
  26930. monthsShort : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
  26931. weekdays : '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
  26932. weekdaysShort : '週日_週一_週二_週三_週四_週五_週六'.split('_'),
  26933. weekdaysMin : '日_一_二_三_四_五_六'.split('_'),
  26934. longDateFormat : {
  26935. LT : 'HH:mm',
  26936. LTS : 'HH:mm:ss',
  26937. L : 'YYYY年MMMD日',
  26938. LL : 'YYYY年MMMD日',
  26939. LLL : 'YYYY年MMMD日 HH:mm',
  26940. LLLL : 'YYYY年MMMD日dddd HH:mm',
  26941. l : 'YYYY年MMMD日',
  26942. ll : 'YYYY年MMMD日',
  26943. lll : 'YYYY年MMMD日 HH:mm',
  26944. llll : 'YYYY年MMMD日dddd HH:mm'
  26945. },
  26946. meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
  26947. meridiemHour : function (hour, meridiem) {
  26948. if (hour === 12) {
  26949. hour = 0;
  26950. }
  26951. if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {
  26952. return hour;
  26953. } else if (meridiem === '中午') {
  26954. return hour >= 11 ? hour : hour + 12;
  26955. } else if (meridiem === '下午' || meridiem === '晚上') {
  26956. return hour + 12;
  26957. }
  26958. },
  26959. meridiem : function (hour, minute, isLower) {
  26960. var hm = hour * 100 + minute;
  26961. if (hm < 600) {
  26962. return '凌晨';
  26963. } else if (hm < 900) {
  26964. return '早上';
  26965. } else if (hm < 1130) {
  26966. return '上午';
  26967. } else if (hm < 1230) {
  26968. return '中午';
  26969. } else if (hm < 1800) {
  26970. return '下午';
  26971. } else {
  26972. return '晚上';
  26973. }
  26974. },
  26975. calendar : {
  26976. sameDay : '[今天]LT',
  26977. nextDay : '[明天]LT',
  26978. nextWeek : '[下]ddddLT',
  26979. lastDay : '[昨天]LT',
  26980. lastWeek : '[上]ddddLT',
  26981. sameElse : 'L'
  26982. },
  26983. dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/,
  26984. ordinal : function (number, period) {
  26985. switch (period) {
  26986. case 'd' :
  26987. case 'D' :
  26988. case 'DDD' :
  26989. return number + '日';
  26990. case 'M' :
  26991. return number + '月';
  26992. case 'w' :
  26993. case 'W' :
  26994. return number + '週';
  26995. default :
  26996. return number;
  26997. }
  26998. },
  26999. relativeTime : {
  27000. future : '%s內',
  27001. past : '%s前',
  27002. s : '幾秒',
  27003. m : '1 分鐘',
  27004. mm : '%d 分鐘',
  27005. h : '1 小時',
  27006. hh : '%d 小時',
  27007. d : '1 天',
  27008. dd : '%d 天',
  27009. M : '1 個月',
  27010. MM : '%d 個月',
  27011. y : '1 年',
  27012. yy : '%d 年'
  27013. }
  27014. });
  27015. return zhTw;
  27016. })));
  27017. // Converse.js (A browser based XMPP chat client)
  27018. // http://conversejs.org
  27019. //
  27020. // This is the internationalization module.
  27021. //
  27022. // Copyright (c) 2012-2017, Jan-Carel Brand <jc@opkode.com>
  27023. // Licensed under the Mozilla Public License (MPLv2)
  27024. //
  27025. /*global define */
  27026. (function (root, factory) {
  27027. define('i18n',["es6-promise", "jed", "lodash.noconflict", "moment", 'moment/locale/af', 'moment/locale/ar', 'moment/locale/bg', 'moment/locale/ca', 'moment/locale/de', 'moment/locale/es', 'moment/locale/fr', 'moment/locale/he', 'moment/locale/hu', 'moment/locale/id', 'moment/locale/it', 'moment/locale/ja', 'moment/locale/nb', 'moment/locale/nl', 'moment/locale/pl', 'moment/locale/pt-br', 'moment/locale/ru', 'moment/locale/tr', 'moment/locale/uk', 'moment/locale/zh-cn', 'moment/locale/zh-tw'], factory);
  27028. })(void 0, function (Promise, Jed, _, moment) {
  27029. 'use strict';
  27030. function detectLocale(library_check) {
  27031. /* Determine which locale is supported by the user's system as well
  27032. * as by the relevant library (e.g. converse.js or moment.js).
  27033. *
  27034. * Parameters:
  27035. * (Function) library_check - Returns a boolean indicating whether
  27036. * the locale is supported.
  27037. */
  27038. var locale, i;
  27039. if (window.navigator.userLanguage) {
  27040. locale = isLocaleAvailable(window.navigator.userLanguage, library_check);
  27041. }
  27042. if (window.navigator.languages && !locale) {
  27043. for (i = 0; i < window.navigator.languages.length && !locale; i++) {
  27044. locale = isLocaleAvailable(window.navigator.languages[i], library_check);
  27045. }
  27046. }
  27047. if (window.navigator.browserLanguage && !locale) {
  27048. locale = isLocaleAvailable(window.navigator.browserLanguage, library_check);
  27049. }
  27050. if (window.navigator.language && !locale) {
  27051. locale = isLocaleAvailable(window.navigator.language, library_check);
  27052. }
  27053. if (window.navigator.systemLanguage && !locale) {
  27054. locale = isLocaleAvailable(window.navigator.systemLanguage, library_check);
  27055. }
  27056. return locale || 'en';
  27057. }
  27058. function isMomentLocale(locale) {
  27059. return _.isString(locale) && moment.locale() === moment.locale(locale);
  27060. }
  27061. function isConverseLocale(locale, supported_locales) {
  27062. return _.isString(locale) && _.includes(supported_locales, locale);
  27063. }
  27064. function getLocale(preferred_locale, isSupportedByLibrary) {
  27065. if (_.isString(preferred_locale)) {
  27066. if (preferred_locale === 'en' || isSupportedByLibrary(preferred_locale)) {
  27067. return preferred_locale;
  27068. }
  27069. }
  27070. return detectLocale(isSupportedByLibrary) || 'en';
  27071. }
  27072. function isLocaleAvailable(locale, available) {
  27073. /* Check whether the locale or sub locale (e.g. en-US, en) is supported.
  27074. *
  27075. * Parameters:
  27076. * (String) locale - The locale to check for
  27077. * (Function) available - returns a boolean indicating whether the locale is supported
  27078. */
  27079. if (available(locale)) {
  27080. return locale;
  27081. } else {
  27082. var sublocale = locale.split("-")[0];
  27083. if (sublocale !== locale && available(sublocale)) {
  27084. return sublocale;
  27085. }
  27086. }
  27087. }
  27088. var jed_instance;
  27089. return {
  27090. setLocales: function setLocales(preferred_locale, _converse) {
  27091. _converse.locale = getLocale(preferred_locale, _.partial(isConverseLocale, _, _converse.locales));
  27092. moment.locale(getLocale(preferred_locale, isMomentLocale));
  27093. },
  27094. translate: function translate(str) {
  27095. if (_.isNil(jed_instance)) {
  27096. return Jed.sprintf.apply(Jed, arguments);
  27097. }
  27098. var t = jed_instance.translate(str);
  27099. if (arguments.length > 1) {
  27100. return t.fetch.apply(t, [].slice.call(arguments, 1));
  27101. } else {
  27102. return t.fetch();
  27103. }
  27104. },
  27105. fetchTranslations: function fetchTranslations(locale, supported_locales, locale_url) {
  27106. /* Fetch the translations for the given local at the given URL.
  27107. *
  27108. * Parameters:
  27109. * (String) locale: The given i18n locale
  27110. * (Array) supported_locales: List of locales supported
  27111. * (String) locale_url: The URL from which the translations
  27112. * should be fetched.
  27113. */
  27114. return new Promise(function (resolve, reject) {
  27115. if (!isConverseLocale(locale, supported_locales) || locale === 'en') {
  27116. return resolve();
  27117. }
  27118. var xhr = new XMLHttpRequest();
  27119. xhr.open('GET', locale_url, true);
  27120. xhr.setRequestHeader('Accept', "application/json, text/javascript");
  27121. xhr.onload = function () {
  27122. if (xhr.status >= 200 && xhr.status < 400) {
  27123. jed_instance = new Jed(window.JSON.parse(xhr.responseText));
  27124. resolve();
  27125. } else {
  27126. xhr.onerror();
  27127. }
  27128. };
  27129. xhr.onerror = function () {
  27130. reject(xhr.statusText);
  27131. };
  27132. xhr.send();
  27133. });
  27134. }
  27135. };
  27136. });
  27137. //# sourceMappingURL=i18n.js.map;
  27138. /** File: strophe.js
  27139. * A JavaScript library for writing XMPP clients.
  27140. *
  27141. * This library uses either Bidirectional-streams Over Synchronous HTTP (BOSH)
  27142. * to emulate a persistent, stateful, two-way connection to an XMPP server or
  27143. * alternatively WebSockets.
  27144. *
  27145. * More information on BOSH can be found in XEP 124.
  27146. * For more information on XMPP-over WebSocket see this RFC:
  27147. * http://tools.ietf.org/html/rfc7395
  27148. */
  27149. /* All of the Strophe globals are defined in this special function below so
  27150. * that references to the globals become closures. This will ensure that
  27151. * on page reload, these references will still be available to callbacks
  27152. * that are still executing.
  27153. */
  27154. /* jshint ignore:start */
  27155. (function (root, factory) {
  27156. if (typeof define === 'function' && define.amd) {
  27157. //Allow using this built library as an AMD module
  27158. //in another project. That other project will only
  27159. //see this AMD call, not the internal modules in
  27160. //the closure below.
  27161. define('strophe',[], factory);
  27162. } else {
  27163. //Browser globals case.
  27164. var wrapper = factory();
  27165. root.Strophe = wrapper.Strophe;
  27166. root.$build = wrapper.$build;
  27167. root.$iq = wrapper.$iq;
  27168. root.$msg = wrapper.$msg;
  27169. root.$pres = wrapper.$pres;
  27170. root.SHA1 = wrapper.SHA1;
  27171. root.MD5 = wrapper.MD5;
  27172. root.b64_hmac_sha1 = wrapper.b64_hmac_sha1;
  27173. root.b64_sha1 = wrapper.b64_sha1;
  27174. root.str_hmac_sha1 = wrapper.str_hmac_sha1;
  27175. root.str_sha1 = wrapper.str_sha1;
  27176. }
  27177. }(this, function () {
  27178. //almond, and your modules will be inlined here
  27179. /* jshint ignore:end */
  27180. /**
  27181. * @license almond 0.3.3 Copyright jQuery Foundation and other contributors.
  27182. * Released under MIT license, http://github.com/requirejs/almond/LICENSE
  27183. */
  27184. //Going sloppy to avoid 'use strict' string cost, but strict practices should
  27185. //be followed.
  27186. /*global setTimeout: false */
  27187. var requirejs, require, define;
  27188. (function (undef) {
  27189. var main, req, makeMap, handlers,
  27190. defined = {},
  27191. waiting = {},
  27192. config = {},
  27193. defining = {},
  27194. hasOwn = Object.prototype.hasOwnProperty,
  27195. aps = [].slice,
  27196. jsSuffixRegExp = /\.js$/;
  27197. function hasProp(obj, prop) {
  27198. return hasOwn.call(obj, prop);
  27199. }
  27200. /**
  27201. * Given a relative module name, like ./something, normalize it to
  27202. * a real name that can be mapped to a path.
  27203. * @param {String} name the relative name
  27204. * @param {String} baseName a real name that the name arg is relative
  27205. * to.
  27206. * @returns {String} normalized name
  27207. */
  27208. function normalize(name, baseName) {
  27209. var nameParts, nameSegment, mapValue, foundMap, lastIndex,
  27210. foundI, foundStarMap, starI, i, j, part, normalizedBaseParts,
  27211. baseParts = baseName && baseName.split("/"),
  27212. map = config.map,
  27213. starMap = (map && map['*']) || {};
  27214. //Adjust any relative paths.
  27215. if (name) {
  27216. name = name.split('/');
  27217. lastIndex = name.length - 1;
  27218. // If wanting node ID compatibility, strip .js from end
  27219. // of IDs. Have to do this here, and not in nameToUrl
  27220. // because node allows either .js or non .js to map
  27221. // to same file.
  27222. if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) {
  27223. name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, '');
  27224. }
  27225. // Starts with a '.' so need the baseName
  27226. if (name[0].charAt(0) === '.' && baseParts) {
  27227. //Convert baseName to array, and lop off the last part,
  27228. //so that . matches that 'directory' and not name of the baseName's
  27229. //module. For instance, baseName of 'one/two/three', maps to
  27230. //'one/two/three.js', but we want the directory, 'one/two' for
  27231. //this normalization.
  27232. normalizedBaseParts = baseParts.slice(0, baseParts.length - 1);
  27233. name = normalizedBaseParts.concat(name);
  27234. }
  27235. //start trimDots
  27236. for (i = 0; i < name.length; i++) {
  27237. part = name[i];
  27238. if (part === '.') {
  27239. name.splice(i, 1);
  27240. i -= 1;
  27241. } else if (part === '..') {
  27242. // If at the start, or previous value is still ..,
  27243. // keep them so that when converted to a path it may
  27244. // still work when converted to a path, even though
  27245. // as an ID it is less than ideal. In larger point
  27246. // releases, may be better to just kick out an error.
  27247. if (i === 0 || (i === 1 && name[2] === '..') || name[i - 1] === '..') {
  27248. continue;
  27249. } else if (i > 0) {
  27250. name.splice(i - 1, 2);
  27251. i -= 2;
  27252. }
  27253. }
  27254. }
  27255. //end trimDots
  27256. name = name.join('/');
  27257. }
  27258. //Apply map config if available.
  27259. if ((baseParts || starMap) && map) {
  27260. nameParts = name.split('/');
  27261. for (i = nameParts.length; i > 0; i -= 1) {
  27262. nameSegment = nameParts.slice(0, i).join("/");
  27263. if (baseParts) {
  27264. //Find the longest baseName segment match in the config.
  27265. //So, do joins on the biggest to smallest lengths of baseParts.
  27266. for (j = baseParts.length; j > 0; j -= 1) {
  27267. mapValue = map[baseParts.slice(0, j).join('/')];
  27268. //baseName segment has config, find if it has one for
  27269. //this name.
  27270. if (mapValue) {
  27271. mapValue = mapValue[nameSegment];
  27272. if (mapValue) {
  27273. //Match, update name to the new value.
  27274. foundMap = mapValue;
  27275. foundI = i;
  27276. break;
  27277. }
  27278. }
  27279. }
  27280. }
  27281. if (foundMap) {
  27282. break;
  27283. }
  27284. //Check for a star map match, but just hold on to it,
  27285. //if there is a shorter segment match later in a matching
  27286. //config, then favor over this star map.
  27287. if (!foundStarMap && starMap && starMap[nameSegment]) {
  27288. foundStarMap = starMap[nameSegment];
  27289. starI = i;
  27290. }
  27291. }
  27292. if (!foundMap && foundStarMap) {
  27293. foundMap = foundStarMap;
  27294. foundI = starI;
  27295. }
  27296. if (foundMap) {
  27297. nameParts.splice(0, foundI, foundMap);
  27298. name = nameParts.join('/');
  27299. }
  27300. }
  27301. return name;
  27302. }
  27303. function makeRequire(relName, forceSync) {
  27304. return function () {
  27305. //A version of a require function that passes a moduleName
  27306. //value for items that may need to
  27307. //look up paths relative to the moduleName
  27308. var args = aps.call(arguments, 0);
  27309. //If first arg is not require('string'), and there is only
  27310. //one arg, it is the array form without a callback. Insert
  27311. //a null so that the following concat is correct.
  27312. if (typeof args[0] !== 'string' && args.length === 1) {
  27313. args.push(null);
  27314. }
  27315. return req.apply(undef, args.concat([relName, forceSync]));
  27316. };
  27317. }
  27318. function makeNormalize(relName) {
  27319. return function (name) {
  27320. return normalize(name, relName);
  27321. };
  27322. }
  27323. function makeLoad(depName) {
  27324. return function (value) {
  27325. defined[depName] = value;
  27326. };
  27327. }
  27328. function callDep(name) {
  27329. if (hasProp(waiting, name)) {
  27330. var args = waiting[name];
  27331. delete waiting[name];
  27332. defining[name] = true;
  27333. main.apply(undef, args);
  27334. }
  27335. if (!hasProp(defined, name) && !hasProp(defining, name)) {
  27336. throw new Error('No ' + name);
  27337. }
  27338. return defined[name];
  27339. }
  27340. //Turns a plugin!resource to [plugin, resource]
  27341. //with the plugin being undefined if the name
  27342. //did not have a plugin prefix.
  27343. function splitPrefix(name) {
  27344. var prefix,
  27345. index = name ? name.indexOf('!') : -1;
  27346. if (index > -1) {
  27347. prefix = name.substring(0, index);
  27348. name = name.substring(index + 1, name.length);
  27349. }
  27350. return [prefix, name];
  27351. }
  27352. //Creates a parts array for a relName where first part is plugin ID,
  27353. //second part is resource ID. Assumes relName has already been normalized.
  27354. function makeRelParts(relName) {
  27355. return relName ? splitPrefix(relName) : [];
  27356. }
  27357. /**
  27358. * Makes a name map, normalizing the name, and using a plugin
  27359. * for normalization if necessary. Grabs a ref to plugin
  27360. * too, as an optimization.
  27361. */
  27362. makeMap = function (name, relParts) {
  27363. var plugin,
  27364. parts = splitPrefix(name),
  27365. prefix = parts[0],
  27366. relResourceName = relParts[1];
  27367. name = parts[1];
  27368. if (prefix) {
  27369. prefix = normalize(prefix, relResourceName);
  27370. plugin = callDep(prefix);
  27371. }
  27372. //Normalize according
  27373. if (prefix) {
  27374. if (plugin && plugin.normalize) {
  27375. name = plugin.normalize(name, makeNormalize(relResourceName));
  27376. } else {
  27377. name = normalize(name, relResourceName);
  27378. }
  27379. } else {
  27380. name = normalize(name, relResourceName);
  27381. parts = splitPrefix(name);
  27382. prefix = parts[0];
  27383. name = parts[1];
  27384. if (prefix) {
  27385. plugin = callDep(prefix);
  27386. }
  27387. }
  27388. //Using ridiculous property names for space reasons
  27389. return {
  27390. f: prefix ? prefix + '!' + name : name, //fullName
  27391. n: name,
  27392. pr: prefix,
  27393. p: plugin
  27394. };
  27395. };
  27396. function makeConfig(name) {
  27397. return function () {
  27398. return (config && config.config && config.config[name]) || {};
  27399. };
  27400. }
  27401. handlers = {
  27402. require: function (name) {
  27403. return makeRequire(name);
  27404. },
  27405. exports: function (name) {
  27406. var e = defined[name];
  27407. if (typeof e !== 'undefined') {
  27408. return e;
  27409. } else {
  27410. return (defined[name] = {});
  27411. }
  27412. },
  27413. module: function (name) {
  27414. return {
  27415. id: name,
  27416. uri: '',
  27417. exports: defined[name],
  27418. config: makeConfig(name)
  27419. };
  27420. }
  27421. };
  27422. main = function (name, deps, callback, relName) {
  27423. var cjsModule, depName, ret, map, i, relParts,
  27424. args = [],
  27425. callbackType = typeof callback,
  27426. usingExports;
  27427. //Use name if no relName
  27428. relName = relName || name;
  27429. relParts = makeRelParts(relName);
  27430. //Call the callback to define the module, if necessary.
  27431. if (callbackType === 'undefined' || callbackType === 'function') {
  27432. //Pull out the defined dependencies and pass the ordered
  27433. //values to the callback.
  27434. //Default to [require, exports, module] if no deps
  27435. deps = !deps.length && callback.length ? ['require', 'exports', 'module'] : deps;
  27436. for (i = 0; i < deps.length; i += 1) {
  27437. map = makeMap(deps[i], relParts);
  27438. depName = map.f;
  27439. //Fast path CommonJS standard dependencies.
  27440. if (depName === "require") {
  27441. args[i] = handlers.require(name);
  27442. } else if (depName === "exports") {
  27443. //CommonJS module spec 1.1
  27444. args[i] = handlers.exports(name);
  27445. usingExports = true;
  27446. } else if (depName === "module") {
  27447. //CommonJS module spec 1.1
  27448. cjsModule = args[i] = handlers.module(name);
  27449. } else if (hasProp(defined, depName) ||
  27450. hasProp(waiting, depName) ||
  27451. hasProp(defining, depName)) {
  27452. args[i] = callDep(depName);
  27453. } else if (map.p) {
  27454. map.p.load(map.n, makeRequire(relName, true), makeLoad(depName), {});
  27455. args[i] = defined[depName];
  27456. } else {
  27457. throw new Error(name + ' missing ' + depName);
  27458. }
  27459. }
  27460. ret = callback ? callback.apply(defined[name], args) : undefined;
  27461. if (name) {
  27462. //If setting exports via "module" is in play,
  27463. //favor that over return value and exports. After that,
  27464. //favor a non-undefined return value over exports use.
  27465. if (cjsModule && cjsModule.exports !== undef &&
  27466. cjsModule.exports !== defined[name]) {
  27467. defined[name] = cjsModule.exports;
  27468. } else if (ret !== undef || !usingExports) {
  27469. //Use the return value from the function.
  27470. defined[name] = ret;
  27471. }
  27472. }
  27473. } else if (name) {
  27474. //May just be an object definition for the module. Only
  27475. //worry about defining if have a module name.
  27476. defined[name] = callback;
  27477. }
  27478. };
  27479. requirejs = require = req = function (deps, callback, relName, forceSync, alt) {
  27480. if (typeof deps === "string") {
  27481. if (handlers[deps]) {
  27482. //callback in this case is really relName
  27483. return handlers[deps](callback);
  27484. }
  27485. //Just return the module wanted. In this scenario, the
  27486. //deps arg is the module name, and second arg (if passed)
  27487. //is just the relName.
  27488. //Normalize module name, if it contains . or ..
  27489. return callDep(makeMap(deps, makeRelParts(callback)).f);
  27490. } else if (!deps.splice) {
  27491. //deps is a config object, not an array.
  27492. config = deps;
  27493. if (config.deps) {
  27494. req(config.deps, config.callback);
  27495. }
  27496. if (!callback) {
  27497. return;
  27498. }
  27499. if (callback.splice) {
  27500. //callback is an array, which means it is a dependency list.
  27501. //Adjust args if there are dependencies
  27502. deps = callback;
  27503. callback = relName;
  27504. relName = null;
  27505. } else {
  27506. deps = undef;
  27507. }
  27508. }
  27509. //Support require(['a'])
  27510. callback = callback || function () {};
  27511. //If relName is a function, it is an errback handler,
  27512. //so remove it.
  27513. if (typeof relName === 'function') {
  27514. relName = forceSync;
  27515. forceSync = alt;
  27516. }
  27517. //Simulate async callback;
  27518. if (forceSync) {
  27519. main(undef, deps, callback, relName);
  27520. } else {
  27521. //Using a non-zero value because of concern for what old browsers
  27522. //do, and latest browsers "upgrade" to 4 if lower value is used:
  27523. //http://www.whatwg.org/specs/web-apps/current-work/multipage/timers.html#dom-windowtimers-settimeout:
  27524. //If want a value immediately, use require('id') instead -- something
  27525. //that works in almond on the global level, but not guaranteed and
  27526. //unlikely to work in other AMD implementations.
  27527. setTimeout(function () {
  27528. main(undef, deps, callback, relName);
  27529. }, 4);
  27530. }
  27531. return req;
  27532. };
  27533. /**
  27534. * Just drops the config on the floor, but returns req in case
  27535. * the config return value is used.
  27536. */
  27537. req.config = function (cfg) {
  27538. return req(cfg);
  27539. };
  27540. /**
  27541. * Expose module registry for debugging and tooling
  27542. */
  27543. requirejs._defined = defined;
  27544. define = function (name, deps, callback) {
  27545. if (typeof name !== 'string') {
  27546. throw new Error('See almond README: incorrect module build, no module name');
  27547. }
  27548. //This module may not have dependencies
  27549. if (!deps.splice) {
  27550. //deps is not an array, so probably means
  27551. //an object literal or factory function for
  27552. //the value. Adjust args.
  27553. callback = deps;
  27554. deps = [];
  27555. }
  27556. if (!hasProp(defined, name) && !hasProp(waiting, name)) {
  27557. waiting[name] = [name, deps, callback];
  27558. }
  27559. };
  27560. define.amd = {
  27561. jQuery: true
  27562. };
  27563. }());
  27564. define("node_modules/almond/almond.js", function(){});
  27565. /*
  27566. This program is distributed under the terms of the MIT license.
  27567. Please see the LICENSE file for details.
  27568. Copyright 2006-2008, OGG, LLC
  27569. */
  27570. /* jshint undef: true, unused: true:, noarg: true, latedef: true */
  27571. /* global define */
  27572. (function (root, factory) {
  27573. if (typeof define === 'function' && define.amd) {
  27574. define('strophe-polyfill',[], function () {
  27575. return factory(root);
  27576. });
  27577. } else {
  27578. // Browser globals
  27579. return factory(root);
  27580. }
  27581. }(this, function (root) {
  27582. /** Function: Function.prototype.bind
  27583. * Bind a function to an instance.
  27584. *
  27585. * This Function object extension method creates a bound method similar
  27586. * to those in Python. This means that the 'this' object will point
  27587. * to the instance you want. See <MDC's bind() documentation at https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function/bind>
  27588. * and <Bound Functions and Function Imports in JavaScript at http://benjamin.smedbergs.us/blog/2007-01-03/bound-functions-and-function-imports-in-javascript/>
  27589. * for a complete explanation.
  27590. *
  27591. * This extension already exists in some browsers (namely, Firefox 3), but
  27592. * we provide it to support those that don't.
  27593. *
  27594. * Parameters:
  27595. * (Object) obj - The object that will become 'this' in the bound function.
  27596. * (Object) argN - An option argument that will be prepended to the
  27597. * arguments given for the function call
  27598. *
  27599. * Returns:
  27600. * The bound function.
  27601. */
  27602. if (!Function.prototype.bind) {
  27603. Function.prototype.bind = function (obj /*, arg1, arg2, ... */) {
  27604. var func = this;
  27605. var _slice = Array.prototype.slice;
  27606. var _concat = Array.prototype.concat;
  27607. var _args = _slice.call(arguments, 1);
  27608. return function () {
  27609. return func.apply(obj ? obj : this, _concat.call(_args, _slice.call(arguments, 0)));
  27610. };
  27611. };
  27612. }
  27613. /** Function: Array.isArray
  27614. * This is a polyfill for the ES5 Array.isArray method.
  27615. */
  27616. if (!Array.isArray) {
  27617. Array.isArray = function(arg) {
  27618. return Object.prototype.toString.call(arg) === '[object Array]';
  27619. };
  27620. }
  27621. /** Function: Array.prototype.indexOf
  27622. * Return the index of an object in an array.
  27623. *
  27624. * This function is not supplied by some JavaScript implementations, so
  27625. * we provide it if it is missing. This code is from:
  27626. * http://developer.mozilla.org/En/Core_JavaScript_1.5_Reference:Objects:Array:indexOf
  27627. *
  27628. * Parameters:
  27629. * (Object) elt - The object to look for.
  27630. * (Integer) from - The index from which to start looking. (optional).
  27631. *
  27632. * Returns:
  27633. * The index of elt in the array or -1 if not found.
  27634. */
  27635. if (!Array.prototype.indexOf) {
  27636. Array.prototype.indexOf = function(elt /*, from*/) {
  27637. var len = this.length;
  27638. var from = Number(arguments[1]) || 0;
  27639. from = (from < 0) ? Math.ceil(from) : Math.floor(from);
  27640. if (from < 0) {
  27641. from += len;
  27642. }
  27643. for (; from < len; from++) {
  27644. if (from in this && this[from] === elt) {
  27645. return from;
  27646. }
  27647. }
  27648. return -1;
  27649. };
  27650. }
  27651. /** Function: Array.prototype.forEach
  27652. *
  27653. * This function is not available in IE < 9
  27654. *
  27655. * See <forEach on developer.mozilla.org at https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach>
  27656. */
  27657. if (!Array.prototype.forEach) {
  27658. Array.prototype.forEach = function(callback, thisArg) {
  27659. var T, k;
  27660. if (this === null) {
  27661. throw new TypeError(' this is null or not defined');
  27662. }
  27663. // 1. Let O be the result of calling toObject() passing the
  27664. // |this| value as the argument.
  27665. var O = Object(this);
  27666. // 2. Let lenValue be the result of calling the Get() internal
  27667. // method of O with the argument "length".
  27668. // 3. Let len be toUint32(lenValue).
  27669. var len = O.length >>> 0;
  27670. // 4. If isCallable(callback) is false, throw a TypeError exception.
  27671. // See: http://es5.github.com/#x9.11
  27672. if (typeof callback !== "function") {
  27673. throw new TypeError(callback + ' is not a function');
  27674. }
  27675. // 5. If thisArg was supplied, let T be thisArg; else let
  27676. // T be undefined.
  27677. if (arguments.length > 1) {
  27678. T = thisArg;
  27679. }
  27680. // 6. Let k be 0
  27681. k = 0;
  27682. // 7. Repeat, while k < len
  27683. while (k < len) {
  27684. var kValue;
  27685. // a. Let Pk be ToString(k).
  27686. // This is implicit for LHS operands of the in operator
  27687. // b. Let kPresent be the result of calling the HasProperty
  27688. // internal method of O with argument Pk.
  27689. // This step can be combined with c
  27690. // c. If kPresent is true, then
  27691. if (k in O) {
  27692. // i. Let kValue be the result of calling the Get internal
  27693. // method of O with argument Pk.
  27694. kValue = O[k];
  27695. // ii. Call the Call internal method of callback with T as
  27696. // the this value and argument list containing kValue, k, and O.
  27697. callback.call(T, kValue, k, O);
  27698. }
  27699. // d. Increase k by 1.
  27700. k++;
  27701. }
  27702. // 8. return undefined
  27703. };
  27704. }
  27705. // This code was written by Tyler Akins and has been placed in the
  27706. // public domain. It would be nice if you left this header intact.
  27707. // Base64 code from Tyler Akins -- http://rumkin.com
  27708. var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
  27709. if (!root.btoa) {
  27710. root.btoa = function (input) {
  27711. /**
  27712. * Encodes a string in base64
  27713. * @param {String} input The string to encode in base64.
  27714. */
  27715. var output = "";
  27716. var chr1, chr2, chr3;
  27717. var enc1, enc2, enc3, enc4;
  27718. var i = 0;
  27719. do {
  27720. chr1 = input.charCodeAt(i++);
  27721. chr2 = input.charCodeAt(i++);
  27722. chr3 = input.charCodeAt(i++);
  27723. enc1 = chr1 >> 2;
  27724. enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
  27725. enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
  27726. enc4 = chr3 & 63;
  27727. if (isNaN(chr2)) {
  27728. enc2 = ((chr1 & 3) << 4);
  27729. enc3 = enc4 = 64;
  27730. } else if (isNaN(chr3)) {
  27731. enc4 = 64;
  27732. }
  27733. output = output + keyStr.charAt(enc1) + keyStr.charAt(enc2) +
  27734. keyStr.charAt(enc3) + keyStr.charAt(enc4);
  27735. } while (i < input.length);
  27736. return output;
  27737. };
  27738. }
  27739. if (!root.atob) {
  27740. root.atob = function (input) {
  27741. /**
  27742. * Decodes a base64 string.
  27743. * @param {String} input The string to decode.
  27744. */
  27745. var output = "";
  27746. var chr1, chr2, chr3;
  27747. var enc1, enc2, enc3, enc4;
  27748. var i = 0;
  27749. // remove all characters that are not A-Z, a-z, 0-9, +, /, or =
  27750. input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
  27751. do {
  27752. enc1 = keyStr.indexOf(input.charAt(i++));
  27753. enc2 = keyStr.indexOf(input.charAt(i++));
  27754. enc3 = keyStr.indexOf(input.charAt(i++));
  27755. enc4 = keyStr.indexOf(input.charAt(i++));
  27756. chr1 = (enc1 << 2) | (enc2 >> 4);
  27757. chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
  27758. chr3 = ((enc3 & 3) << 6) | enc4;
  27759. output = output + String.fromCharCode(chr1);
  27760. if (enc3 !== 64) {
  27761. output = output + String.fromCharCode(chr2);
  27762. }
  27763. if (enc4 !== 64) {
  27764. output = output + String.fromCharCode(chr3);
  27765. }
  27766. } while (i < input.length);
  27767. return output;
  27768. };
  27769. }
  27770. }));
  27771. /*
  27772. * A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined
  27773. * in FIPS PUB 180-1
  27774. * Version 2.1a Copyright Paul Johnston 2000 - 2002.
  27775. * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
  27776. * Distributed under the BSD License
  27777. * See http://pajhome.org.uk/crypt/md5 for details.
  27778. */
  27779. /* jshint undef: true, unused: true:, noarg: true, latedef: false */
  27780. /* global define */
  27781. /* Some functions and variables have been stripped for use with Strophe */
  27782. (function (root, factory) {
  27783. if (typeof define === 'function' && define.amd) {
  27784. define('strophe-sha1', [],function () {
  27785. return factory();
  27786. });
  27787. } else {
  27788. // Browser globals
  27789. root.SHA1 = factory();
  27790. }
  27791. }(this, function () {
  27792. /*
  27793. * Calculate the SHA-1 of an array of big-endian words, and a bit length
  27794. */
  27795. function core_sha1(x, len)
  27796. {
  27797. /* append padding */
  27798. x[len >> 5] |= 0x80 << (24 - len % 32);
  27799. x[((len + 64 >> 9) << 4) + 15] = len;
  27800. var w = new Array(80);
  27801. var a = 1732584193;
  27802. var b = -271733879;
  27803. var c = -1732584194;
  27804. var d = 271733878;
  27805. var e = -1009589776;
  27806. var i, j, t, olda, oldb, oldc, oldd, olde;
  27807. for (i = 0; i < x.length; i += 16)
  27808. {
  27809. olda = a;
  27810. oldb = b;
  27811. oldc = c;
  27812. oldd = d;
  27813. olde = e;
  27814. for (j = 0; j < 80; j++)
  27815. {
  27816. if (j < 16) { w[j] = x[i + j]; }
  27817. else { w[j] = rol(w[j-3] ^ w[j-8] ^ w[j-14] ^ w[j-16], 1); }
  27818. t = safe_add(safe_add(rol(a, 5), sha1_ft(j, b, c, d)),
  27819. safe_add(safe_add(e, w[j]), sha1_kt(j)));
  27820. e = d;
  27821. d = c;
  27822. c = rol(b, 30);
  27823. b = a;
  27824. a = t;
  27825. }
  27826. a = safe_add(a, olda);
  27827. b = safe_add(b, oldb);
  27828. c = safe_add(c, oldc);
  27829. d = safe_add(d, oldd);
  27830. e = safe_add(e, olde);
  27831. }
  27832. return [a, b, c, d, e];
  27833. }
  27834. /*
  27835. * Perform the appropriate triplet combination function for the current
  27836. * iteration
  27837. */
  27838. function sha1_ft(t, b, c, d)
  27839. {
  27840. if (t < 20) { return (b & c) | ((~b) & d); }
  27841. if (t < 40) { return b ^ c ^ d; }
  27842. if (t < 60) { return (b & c) | (b & d) | (c & d); }
  27843. return b ^ c ^ d;
  27844. }
  27845. /*
  27846. * Determine the appropriate additive constant for the current iteration
  27847. */
  27848. function sha1_kt(t)
  27849. {
  27850. return (t < 20) ? 1518500249 : (t < 40) ? 1859775393 :
  27851. (t < 60) ? -1894007588 : -899497514;
  27852. }
  27853. /*
  27854. * Calculate the HMAC-SHA1 of a key and some data
  27855. */
  27856. function core_hmac_sha1(key, data)
  27857. {
  27858. var bkey = str2binb(key);
  27859. if (bkey.length > 16) { bkey = core_sha1(bkey, key.length * 8); }
  27860. var ipad = new Array(16), opad = new Array(16);
  27861. for (var i = 0; i < 16; i++)
  27862. {
  27863. ipad[i] = bkey[i] ^ 0x36363636;
  27864. opad[i] = bkey[i] ^ 0x5C5C5C5C;
  27865. }
  27866. var hash = core_sha1(ipad.concat(str2binb(data)), 512 + data.length * 8);
  27867. return core_sha1(opad.concat(hash), 512 + 160);
  27868. }
  27869. /*
  27870. * Add integers, wrapping at 2^32. This uses 16-bit operations internally
  27871. * to work around bugs in some JS interpreters.
  27872. */
  27873. function safe_add(x, y)
  27874. {
  27875. var lsw = (x & 0xFFFF) + (y & 0xFFFF);
  27876. var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
  27877. return (msw << 16) | (lsw & 0xFFFF);
  27878. }
  27879. /*
  27880. * Bitwise rotate a 32-bit number to the left.
  27881. */
  27882. function rol(num, cnt)
  27883. {
  27884. return (num << cnt) | (num >>> (32 - cnt));
  27885. }
  27886. /*
  27887. * Convert an 8-bit or 16-bit string to an array of big-endian words
  27888. * In 8-bit function, characters >255 have their hi-byte silently ignored.
  27889. */
  27890. function str2binb(str)
  27891. {
  27892. var bin = [];
  27893. var mask = 255;
  27894. for (var i = 0; i < str.length * 8; i += 8)
  27895. {
  27896. bin[i>>5] |= (str.charCodeAt(i / 8) & mask) << (24 - i%32);
  27897. }
  27898. return bin;
  27899. }
  27900. /*
  27901. * Convert an array of big-endian words to a string
  27902. */
  27903. function binb2str(bin)
  27904. {
  27905. var str = "";
  27906. var mask = 255;
  27907. for (var i = 0; i < bin.length * 32; i += 8)
  27908. {
  27909. str += String.fromCharCode((bin[i>>5] >>> (24 - i%32)) & mask);
  27910. }
  27911. return str;
  27912. }
  27913. /*
  27914. * Convert an array of big-endian words to a base-64 string
  27915. */
  27916. function binb2b64(binarray)
  27917. {
  27918. var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
  27919. var str = "";
  27920. var triplet, j;
  27921. for (var i = 0; i < binarray.length * 4; i += 3)
  27922. {
  27923. triplet = (((binarray[i >> 2] >> 8 * (3 - i %4)) & 0xFF) << 16) |
  27924. (((binarray[i+1 >> 2] >> 8 * (3 - (i+1)%4)) & 0xFF) << 8 ) |
  27925. ((binarray[i+2 >> 2] >> 8 * (3 - (i+2)%4)) & 0xFF);
  27926. for (j = 0; j < 4; j++)
  27927. {
  27928. if (i * 8 + j * 6 > binarray.length * 32) { str += "="; }
  27929. else { str += tab.charAt((triplet >> 6*(3-j)) & 0x3F); }
  27930. }
  27931. }
  27932. return str;
  27933. }
  27934. /*
  27935. * These are the functions you'll usually want to call
  27936. * They take string arguments and return either hex or base-64 encoded strings
  27937. */
  27938. return {
  27939. b64_hmac_sha1: function (key, data){ return binb2b64(core_hmac_sha1(key, data)); },
  27940. b64_sha1: function (s) { return binb2b64(core_sha1(str2binb(s),s.length * 8)); },
  27941. binb2str: binb2str,
  27942. core_hmac_sha1: core_hmac_sha1,
  27943. str_hmac_sha1: function (key, data){ return binb2str(core_hmac_sha1(key, data)); },
  27944. str_sha1: function (s) { return binb2str(core_sha1(str2binb(s),s.length * 8)); },
  27945. };
  27946. }));
  27947. /*
  27948. * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
  27949. * Digest Algorithm, as defined in RFC 1321.
  27950. * Version 2.1 Copyright (C) Paul Johnston 1999 - 2002.
  27951. * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
  27952. * Distributed under the BSD License
  27953. * See http://pajhome.org.uk/crypt/md5 for more info.
  27954. */
  27955. /*
  27956. * Everything that isn't used by Strophe has been stripped here!
  27957. */
  27958. (function (root, factory) {
  27959. if (typeof define === 'function' && define.amd) {
  27960. define('strophe-md5',[], function () {
  27961. return factory();
  27962. });
  27963. } else {
  27964. // Browser globals
  27965. root.MD5 = factory();
  27966. }
  27967. }(this, function () {
  27968. /*
  27969. * Add integers, wrapping at 2^32. This uses 16-bit operations internally
  27970. * to work around bugs in some JS interpreters.
  27971. */
  27972. var safe_add = function (x, y) {
  27973. var lsw = (x & 0xFFFF) + (y & 0xFFFF);
  27974. var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
  27975. return (msw << 16) | (lsw & 0xFFFF);
  27976. };
  27977. /*
  27978. * Bitwise rotate a 32-bit number to the left.
  27979. */
  27980. var bit_rol = function (num, cnt) {
  27981. return (num << cnt) | (num >>> (32 - cnt));
  27982. };
  27983. /*
  27984. * Convert a string to an array of little-endian words
  27985. */
  27986. var str2binl = function (str) {
  27987. var bin = [];
  27988. for(var i = 0; i < str.length * 8; i += 8)
  27989. {
  27990. bin[i>>5] |= (str.charCodeAt(i / 8) & 255) << (i%32);
  27991. }
  27992. return bin;
  27993. };
  27994. /*
  27995. * Convert an array of little-endian words to a string
  27996. */
  27997. var binl2str = function (bin) {
  27998. var str = "";
  27999. for(var i = 0; i < bin.length * 32; i += 8)
  28000. {
  28001. str += String.fromCharCode((bin[i>>5] >>> (i % 32)) & 255);
  28002. }
  28003. return str;
  28004. };
  28005. /*
  28006. * Convert an array of little-endian words to a hex string.
  28007. */
  28008. var binl2hex = function (binarray) {
  28009. var hex_tab = "0123456789abcdef";
  28010. var str = "";
  28011. for(var i = 0; i < binarray.length * 4; i++)
  28012. {
  28013. str += hex_tab.charAt((binarray[i>>2] >> ((i%4)*8+4)) & 0xF) +
  28014. hex_tab.charAt((binarray[i>>2] >> ((i%4)*8 )) & 0xF);
  28015. }
  28016. return str;
  28017. };
  28018. /*
  28019. * These functions implement the four basic operations the algorithm uses.
  28020. */
  28021. var md5_cmn = function (q, a, b, x, s, t) {
  28022. return safe_add(bit_rol(safe_add(safe_add(a, q),safe_add(x, t)), s),b);
  28023. };
  28024. var md5_ff = function (a, b, c, d, x, s, t) {
  28025. return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t);
  28026. };
  28027. var md5_gg = function (a, b, c, d, x, s, t) {
  28028. return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t);
  28029. };
  28030. var md5_hh = function (a, b, c, d, x, s, t) {
  28031. return md5_cmn(b ^ c ^ d, a, b, x, s, t);
  28032. };
  28033. var md5_ii = function (a, b, c, d, x, s, t) {
  28034. return md5_cmn(c ^ (b | (~d)), a, b, x, s, t);
  28035. };
  28036. /*
  28037. * Calculate the MD5 of an array of little-endian words, and a bit length
  28038. */
  28039. var core_md5 = function (x, len) {
  28040. /* append padding */
  28041. x[len >> 5] |= 0x80 << ((len) % 32);
  28042. x[(((len + 64) >>> 9) << 4) + 14] = len;
  28043. var a = 1732584193;
  28044. var b = -271733879;
  28045. var c = -1732584194;
  28046. var d = 271733878;
  28047. var olda, oldb, oldc, oldd;
  28048. for (var i = 0; i < x.length; i += 16)
  28049. {
  28050. olda = a;
  28051. oldb = b;
  28052. oldc = c;
  28053. oldd = d;
  28054. a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);
  28055. d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);
  28056. c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819);
  28057. b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);
  28058. a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);
  28059. d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426);
  28060. c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);
  28061. b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);
  28062. a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416);
  28063. d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);
  28064. c = md5_ff(c, d, a, b, x[i+10], 17, -42063);
  28065. b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);
  28066. a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682);
  28067. d = md5_ff(d, a, b, c, x[i+13], 12, -40341101);
  28068. c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);
  28069. b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329);
  28070. a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);
  28071. d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);
  28072. c = md5_gg(c, d, a, b, x[i+11], 14, 643717713);
  28073. b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);
  28074. a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);
  28075. d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083);
  28076. c = md5_gg(c, d, a, b, x[i+15], 14, -660478335);
  28077. b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);
  28078. a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438);
  28079. d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);
  28080. c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);
  28081. b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501);
  28082. a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);
  28083. d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);
  28084. c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473);
  28085. b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);
  28086. a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);
  28087. d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);
  28088. c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562);
  28089. b = md5_hh(b, c, d, a, x[i+14], 23, -35309556);
  28090. a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);
  28091. d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353);
  28092. c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);
  28093. b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);
  28094. a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174);
  28095. d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);
  28096. c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);
  28097. b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189);
  28098. a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);
  28099. d = md5_hh(d, a, b, c, x[i+12], 11, -421815835);
  28100. c = md5_hh(c, d, a, b, x[i+15], 16, 530742520);
  28101. b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);
  28102. a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);
  28103. d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415);
  28104. c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);
  28105. b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);
  28106. a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571);
  28107. d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);
  28108. c = md5_ii(c, d, a, b, x[i+10], 15, -1051523);
  28109. b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);
  28110. a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359);
  28111. d = md5_ii(d, a, b, c, x[i+15], 10, -30611744);
  28112. c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);
  28113. b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649);
  28114. a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);
  28115. d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);
  28116. c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259);
  28117. b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);
  28118. a = safe_add(a, olda);
  28119. b = safe_add(b, oldb);
  28120. c = safe_add(c, oldc);
  28121. d = safe_add(d, oldd);
  28122. }
  28123. return [a, b, c, d];
  28124. };
  28125. var obj = {
  28126. /*
  28127. * These are the functions you'll usually want to call.
  28128. * They take string arguments and return either hex or base-64 encoded
  28129. * strings.
  28130. */
  28131. hexdigest: function (s) {
  28132. return binl2hex(core_md5(str2binl(s), s.length * 8));
  28133. },
  28134. hash: function (s) {
  28135. return binl2str(core_md5(str2binl(s), s.length * 8));
  28136. }
  28137. };
  28138. return obj;
  28139. }));
  28140. (function (root, factory) {
  28141. if (typeof define === 'function' && define.amd) {
  28142. define('strophe-utils',[], function () {
  28143. return factory();
  28144. });
  28145. } else {
  28146. // Browser globals
  28147. root.stropheUtils = factory();
  28148. }
  28149. }(this, function () {
  28150. var utils = {
  28151. utf16to8: function (str) {
  28152. var i, c;
  28153. var out = "";
  28154. var len = str.length;
  28155. for (i = 0; i < len; i++) {
  28156. c = str.charCodeAt(i);
  28157. if ((c >= 0x0000) && (c <= 0x007F)) {
  28158. out += str.charAt(i);
  28159. } else if (c > 0x07FF) {
  28160. out += String.fromCharCode(0xE0 | ((c >> 12) & 0x0F));
  28161. out += String.fromCharCode(0x80 | ((c >> 6) & 0x3F));
  28162. out += String.fromCharCode(0x80 | ((c >> 0) & 0x3F));
  28163. } else {
  28164. out += String.fromCharCode(0xC0 | ((c >> 6) & 0x1F));
  28165. out += String.fromCharCode(0x80 | ((c >> 0) & 0x3F));
  28166. }
  28167. }
  28168. return out;
  28169. },
  28170. addCookies: function (cookies) {
  28171. /* Parameters:
  28172. * (Object) cookies - either a map of cookie names
  28173. * to string values or to maps of cookie values.
  28174. *
  28175. * For example:
  28176. * { "myCookie": "1234" }
  28177. *
  28178. * or:
  28179. * { "myCookie": {
  28180. * "value": "1234",
  28181. * "domain": ".example.org",
  28182. * "path": "/",
  28183. * "expires": expirationDate
  28184. * }
  28185. * }
  28186. *
  28187. * These values get passed to Strophe.Connection via
  28188. * options.cookies
  28189. */
  28190. var cookieName, cookieObj, isObj, cookieValue, expires, domain, path;
  28191. for (cookieName in (cookies || {})) {
  28192. expires = '';
  28193. domain = '';
  28194. path = '';
  28195. cookieObj = cookies[cookieName];
  28196. isObj = typeof cookieObj === "object";
  28197. cookieValue = escape(unescape(isObj ? cookieObj.value : cookieObj));
  28198. if (isObj) {
  28199. expires = cookieObj.expires ? ";expires="+cookieObj.expires : '';
  28200. domain = cookieObj.domain ? ";domain="+cookieObj.domain : '';
  28201. path = cookieObj.path ? ";path="+cookieObj.path : '';
  28202. }
  28203. document.cookie =
  28204. cookieName+'='+cookieValue + expires + domain + path;
  28205. }
  28206. }
  28207. };
  28208. return utils;
  28209. }));
  28210. /*
  28211. This program is distributed under the terms of the MIT license.
  28212. Please see the LICENSE file for details.
  28213. Copyright 2006-2008, OGG, LLC
  28214. */
  28215. /* jshint undef: true, unused: true:, noarg: true, latedef: true */
  28216. /*global define, document, sessionStorage, setTimeout, clearTimeout, ActiveXObject, DOMParser, btoa, atob */
  28217. (function (root, factory) {
  28218. if (typeof define === 'function' && define.amd) {
  28219. define('strophe-core',[
  28220. 'strophe-sha1',
  28221. 'strophe-md5',
  28222. 'strophe-utils'
  28223. ], function () {
  28224. return factory.apply(this, arguments);
  28225. });
  28226. } else {
  28227. // Browser globals
  28228. var o = factory(root.SHA1, root.MD5, root.stropheUtils);
  28229. root.Strophe = o.Strophe;
  28230. root.$build = o.$build;
  28231. root.$iq = o.$iq;
  28232. root.$msg = o.$msg;
  28233. root.$pres = o.$pres;
  28234. root.SHA1 = o.SHA1;
  28235. root.MD5 = o.MD5;
  28236. root.b64_hmac_sha1 = o.SHA1.b64_hmac_sha1;
  28237. root.b64_sha1 = o.SHA1.b64_sha1;
  28238. root.str_hmac_sha1 = o.SHA1.str_hmac_sha1;
  28239. root.str_sha1 = o.SHA1.str_sha1;
  28240. }
  28241. }(this, function (SHA1, MD5, utils) {
  28242. var Strophe;
  28243. /** Function: $build
  28244. * Create a Strophe.Builder.
  28245. * This is an alias for 'new Strophe.Builder(name, attrs)'.
  28246. *
  28247. * Parameters:
  28248. * (String) name - The root element name.
  28249. * (Object) attrs - The attributes for the root element in object notation.
  28250. *
  28251. * Returns:
  28252. * A new Strophe.Builder object.
  28253. */
  28254. function $build(name, attrs) { return new Strophe.Builder(name, attrs); }
  28255. /** Function: $msg
  28256. * Create a Strophe.Builder with a <message/> element as the root.
  28257. *
  28258. * Parameters:
  28259. * (Object) attrs - The <message/> element attributes in object notation.
  28260. *
  28261. * Returns:
  28262. * A new Strophe.Builder object.
  28263. */
  28264. function $msg(attrs) { return new Strophe.Builder("message", attrs); }
  28265. /** Function: $iq
  28266. * Create a Strophe.Builder with an <iq/> element as the root.
  28267. *
  28268. * Parameters:
  28269. * (Object) attrs - The <iq/> element attributes in object notation.
  28270. *
  28271. * Returns:
  28272. * A new Strophe.Builder object.
  28273. */
  28274. function $iq(attrs) { return new Strophe.Builder("iq", attrs); }
  28275. /** Function: $pres
  28276. * Create a Strophe.Builder with a <presence/> element as the root.
  28277. *
  28278. * Parameters:
  28279. * (Object) attrs - The <presence/> element attributes in object notation.
  28280. *
  28281. * Returns:
  28282. * A new Strophe.Builder object.
  28283. */
  28284. function $pres(attrs) { return new Strophe.Builder("presence", attrs); }
  28285. /** Class: Strophe
  28286. * An object container for all Strophe library functions.
  28287. *
  28288. * This class is just a container for all the objects and constants
  28289. * used in the library. It is not meant to be instantiated, but to
  28290. * provide a namespace for library objects, constants, and functions.
  28291. */
  28292. Strophe = {
  28293. /** Constant: VERSION */
  28294. VERSION: "1.2.14",
  28295. /** Constants: XMPP Namespace Constants
  28296. * Common namespace constants from the XMPP RFCs and XEPs.
  28297. *
  28298. * NS.HTTPBIND - HTTP BIND namespace from XEP 124.
  28299. * NS.BOSH - BOSH namespace from XEP 206.
  28300. * NS.CLIENT - Main XMPP client namespace.
  28301. * NS.AUTH - Legacy authentication namespace.
  28302. * NS.ROSTER - Roster operations namespace.
  28303. * NS.PROFILE - Profile namespace.
  28304. * NS.DISCO_INFO - Service discovery info namespace from XEP 30.
  28305. * NS.DISCO_ITEMS - Service discovery items namespace from XEP 30.
  28306. * NS.MUC - Multi-User Chat namespace from XEP 45.
  28307. * NS.SASL - XMPP SASL namespace from RFC 3920.
  28308. * NS.STREAM - XMPP Streams namespace from RFC 3920.
  28309. * NS.BIND - XMPP Binding namespace from RFC 3920.
  28310. * NS.SESSION - XMPP Session namespace from RFC 3920.
  28311. * NS.XHTML_IM - XHTML-IM namespace from XEP 71.
  28312. * NS.XHTML - XHTML body namespace from XEP 71.
  28313. */
  28314. NS: {
  28315. HTTPBIND: "http://jabber.org/protocol/httpbind",
  28316. BOSH: "urn:xmpp:xbosh",
  28317. CLIENT: "jabber:client",
  28318. AUTH: "jabber:iq:auth",
  28319. ROSTER: "jabber:iq:roster",
  28320. PROFILE: "jabber:iq:profile",
  28321. DISCO_INFO: "http://jabber.org/protocol/disco#info",
  28322. DISCO_ITEMS: "http://jabber.org/protocol/disco#items",
  28323. MUC: "http://jabber.org/protocol/muc",
  28324. SASL: "urn:ietf:params:xml:ns:xmpp-sasl",
  28325. STREAM: "http://etherx.jabber.org/streams",
  28326. FRAMING: "urn:ietf:params:xml:ns:xmpp-framing",
  28327. BIND: "urn:ietf:params:xml:ns:xmpp-bind",
  28328. SESSION: "urn:ietf:params:xml:ns:xmpp-session",
  28329. VERSION: "jabber:iq:version",
  28330. STANZAS: "urn:ietf:params:xml:ns:xmpp-stanzas",
  28331. XHTML_IM: "http://jabber.org/protocol/xhtml-im",
  28332. XHTML: "http://www.w3.org/1999/xhtml"
  28333. },
  28334. /** Constants: XHTML_IM Namespace
  28335. * contains allowed tags, tag attributes, and css properties.
  28336. * Used in the createHtml function to filter incoming html into the allowed XHTML-IM subset.
  28337. * See http://xmpp.org/extensions/xep-0071.html#profile-summary for the list of recommended
  28338. * allowed tags and their attributes.
  28339. */
  28340. XHTML: {
  28341. tags: ['a','blockquote','br','cite','em','img','li','ol','p','span','strong','ul','body'],
  28342. attributes: {
  28343. 'a': ['href'],
  28344. 'blockquote': ['style'],
  28345. 'br': [],
  28346. 'cite': ['style'],
  28347. 'em': [],
  28348. 'img': ['src', 'alt', 'style', 'height', 'width'],
  28349. 'li': ['style'],
  28350. 'ol': ['style'],
  28351. 'p': ['style'],
  28352. 'span': ['style'],
  28353. 'strong': [],
  28354. 'ul': ['style'],
  28355. 'body': []
  28356. },
  28357. css: ['background-color','color','font-family','font-size','font-style','font-weight','margin-left','margin-right','text-align','text-decoration'],
  28358. /** Function: XHTML.validTag
  28359. *
  28360. * Utility method to determine whether a tag is allowed
  28361. * in the XHTML_IM namespace.
  28362. *
  28363. * XHTML tag names are case sensitive and must be lower case.
  28364. */
  28365. validTag: function(tag) {
  28366. for (var i = 0; i < Strophe.XHTML.tags.length; i++) {
  28367. if (tag === Strophe.XHTML.tags[i]) {
  28368. return true;
  28369. }
  28370. }
  28371. return false;
  28372. },
  28373. /** Function: XHTML.validAttribute
  28374. *
  28375. * Utility method to determine whether an attribute is allowed
  28376. * as recommended per XEP-0071
  28377. *
  28378. * XHTML attribute names are case sensitive and must be lower case.
  28379. */
  28380. validAttribute: function(tag, attribute) {
  28381. if (typeof Strophe.XHTML.attributes[tag] !== 'undefined' && Strophe.XHTML.attributes[tag].length > 0) {
  28382. for (var i = 0; i < Strophe.XHTML.attributes[tag].length; i++) {
  28383. if (attribute === Strophe.XHTML.attributes[tag][i]) {
  28384. return true;
  28385. }
  28386. }
  28387. }
  28388. return false;
  28389. },
  28390. validCSS: function(style) {
  28391. for (var i = 0; i < Strophe.XHTML.css.length; i++) {
  28392. if (style === Strophe.XHTML.css[i]) {
  28393. return true;
  28394. }
  28395. }
  28396. return false;
  28397. }
  28398. },
  28399. /** Constants: Connection Status Constants
  28400. * Connection status constants for use by the connection handler
  28401. * callback.
  28402. *
  28403. * Status.ERROR - An error has occurred
  28404. * Status.CONNECTING - The connection is currently being made
  28405. * Status.CONNFAIL - The connection attempt failed
  28406. * Status.AUTHENTICATING - The connection is authenticating
  28407. * Status.AUTHFAIL - The authentication attempt failed
  28408. * Status.CONNECTED - The connection has succeeded
  28409. * Status.DISCONNECTED - The connection has been terminated
  28410. * Status.DISCONNECTING - The connection is currently being terminated
  28411. * Status.ATTACHED - The connection has been attached
  28412. * Status.REDIRECT - The connection has been redirected
  28413. * Status.CONNTIMEOUT - The connection has timed out
  28414. */
  28415. Status: {
  28416. ERROR: 0,
  28417. CONNECTING: 1,
  28418. CONNFAIL: 2,
  28419. AUTHENTICATING: 3,
  28420. AUTHFAIL: 4,
  28421. CONNECTED: 5,
  28422. DISCONNECTED: 6,
  28423. DISCONNECTING: 7,
  28424. ATTACHED: 8,
  28425. REDIRECT: 9,
  28426. CONNTIMEOUT: 10
  28427. },
  28428. /** Constants: Log Level Constants
  28429. * Logging level indicators.
  28430. *
  28431. * LogLevel.DEBUG - Debug output
  28432. * LogLevel.INFO - Informational output
  28433. * LogLevel.WARN - Warnings
  28434. * LogLevel.ERROR - Errors
  28435. * LogLevel.FATAL - Fatal errors
  28436. */
  28437. LogLevel: {
  28438. DEBUG: 0,
  28439. INFO: 1,
  28440. WARN: 2,
  28441. ERROR: 3,
  28442. FATAL: 4
  28443. },
  28444. /** PrivateConstants: DOM Element Type Constants
  28445. * DOM element types.
  28446. *
  28447. * ElementType.NORMAL - Normal element.
  28448. * ElementType.TEXT - Text data element.
  28449. * ElementType.FRAGMENT - XHTML fragment element.
  28450. */
  28451. ElementType: {
  28452. NORMAL: 1,
  28453. TEXT: 3,
  28454. CDATA: 4,
  28455. FRAGMENT: 11
  28456. },
  28457. /** PrivateConstants: Timeout Values
  28458. * Timeout values for error states. These values are in seconds.
  28459. * These should not be changed unless you know exactly what you are
  28460. * doing.
  28461. *
  28462. * TIMEOUT - Timeout multiplier. A waiting request will be considered
  28463. * failed after Math.floor(TIMEOUT * wait) seconds have elapsed.
  28464. * This defaults to 1.1, and with default wait, 66 seconds.
  28465. * SECONDARY_TIMEOUT - Secondary timeout multiplier. In cases where
  28466. * Strophe can detect early failure, it will consider the request
  28467. * failed if it doesn't return after
  28468. * Math.floor(SECONDARY_TIMEOUT * wait) seconds have elapsed.
  28469. * This defaults to 0.1, and with default wait, 6 seconds.
  28470. */
  28471. TIMEOUT: 1.1,
  28472. SECONDARY_TIMEOUT: 0.1,
  28473. /** Function: addNamespace
  28474. * This function is used to extend the current namespaces in
  28475. * Strophe.NS. It takes a key and a value with the key being the
  28476. * name of the new namespace, with its actual value.
  28477. * For example:
  28478. * Strophe.addNamespace('PUBSUB', "http://jabber.org/protocol/pubsub");
  28479. *
  28480. * Parameters:
  28481. * (String) name - The name under which the namespace will be
  28482. * referenced under Strophe.NS
  28483. * (String) value - The actual namespace.
  28484. */
  28485. addNamespace: function (name, value) {
  28486. Strophe.NS[name] = value;
  28487. },
  28488. /** Function: forEachChild
  28489. * Map a function over some or all child elements of a given element.
  28490. *
  28491. * This is a small convenience function for mapping a function over
  28492. * some or all of the children of an element. If elemName is null, all
  28493. * children will be passed to the function, otherwise only children
  28494. * whose tag names match elemName will be passed.
  28495. *
  28496. * Parameters:
  28497. * (XMLElement) elem - The element to operate on.
  28498. * (String) elemName - The child element tag name filter.
  28499. * (Function) func - The function to apply to each child. This
  28500. * function should take a single argument, a DOM element.
  28501. */
  28502. forEachChild: function (elem, elemName, func) {
  28503. var i, childNode;
  28504. for (i = 0; i < elem.childNodes.length; i++) {
  28505. childNode = elem.childNodes[i];
  28506. if (childNode.nodeType === Strophe.ElementType.NORMAL &&
  28507. (!elemName || this.isTagEqual(childNode, elemName))) {
  28508. func(childNode);
  28509. }
  28510. }
  28511. },
  28512. /** Function: isTagEqual
  28513. * Compare an element's tag name with a string.
  28514. *
  28515. * This function is case sensitive.
  28516. *
  28517. * Parameters:
  28518. * (XMLElement) el - A DOM element.
  28519. * (String) name - The element name.
  28520. *
  28521. * Returns:
  28522. * true if the element's tag name matches _el_, and false
  28523. * otherwise.
  28524. */
  28525. isTagEqual: function (el, name) {
  28526. return el.tagName === name;
  28527. },
  28528. /** PrivateVariable: _xmlGenerator
  28529. * _Private_ variable that caches a DOM document to
  28530. * generate elements.
  28531. */
  28532. _xmlGenerator: null,
  28533. /** PrivateFunction: _makeGenerator
  28534. * _Private_ function that creates a dummy XML DOM document to serve as
  28535. * an element and text node generator.
  28536. */
  28537. _makeGenerator: function () {
  28538. var doc;
  28539. // IE9 does implement createDocument(); however, using it will cause the browser to leak memory on page unload.
  28540. // Here, we test for presence of createDocument() plus IE's proprietary documentMode attribute, which would be
  28541. // less than 10 in the case of IE9 and below.
  28542. if (document.implementation.createDocument === undefined ||
  28543. document.implementation.createDocument && document.documentMode && document.documentMode < 10) {
  28544. doc = this._getIEXmlDom();
  28545. doc.appendChild(doc.createElement('strophe'));
  28546. } else {
  28547. doc = document.implementation
  28548. .createDocument('jabber:client', 'strophe', null);
  28549. }
  28550. return doc;
  28551. },
  28552. /** Function: xmlGenerator
  28553. * Get the DOM document to generate elements.
  28554. *
  28555. * Returns:
  28556. * The currently used DOM document.
  28557. */
  28558. xmlGenerator: function () {
  28559. if (!Strophe._xmlGenerator) {
  28560. Strophe._xmlGenerator = Strophe._makeGenerator();
  28561. }
  28562. return Strophe._xmlGenerator;
  28563. },
  28564. /** PrivateFunction: _getIEXmlDom
  28565. * Gets IE xml doc object
  28566. *
  28567. * Returns:
  28568. * A Microsoft XML DOM Object
  28569. * See Also:
  28570. * http://msdn.microsoft.com/en-us/library/ms757837%28VS.85%29.aspx
  28571. */
  28572. _getIEXmlDom : function() {
  28573. var doc = null;
  28574. var docStrings = [
  28575. "Msxml2.DOMDocument.6.0",
  28576. "Msxml2.DOMDocument.5.0",
  28577. "Msxml2.DOMDocument.4.0",
  28578. "MSXML2.DOMDocument.3.0",
  28579. "MSXML2.DOMDocument",
  28580. "MSXML.DOMDocument",
  28581. "Microsoft.XMLDOM"
  28582. ];
  28583. for (var d = 0; d < docStrings.length; d++) {
  28584. if (doc === null) {
  28585. try {
  28586. doc = new ActiveXObject(docStrings[d]);
  28587. } catch (e) {
  28588. doc = null;
  28589. }
  28590. } else {
  28591. break;
  28592. }
  28593. }
  28594. return doc;
  28595. },
  28596. /** Function: xmlElement
  28597. * Create an XML DOM element.
  28598. *
  28599. * This function creates an XML DOM element correctly across all
  28600. * implementations. Note that these are not HTML DOM elements, which
  28601. * aren't appropriate for XMPP stanzas.
  28602. *
  28603. * Parameters:
  28604. * (String) name - The name for the element.
  28605. * (Array|Object) attrs - An optional array or object containing
  28606. * key/value pairs to use as element attributes. The object should
  28607. * be in the format {'key': 'value'} or {key: 'value'}. The array
  28608. * should have the format [['key1', 'value1'], ['key2', 'value2']].
  28609. * (String) text - The text child data for the element.
  28610. *
  28611. * Returns:
  28612. * A new XML DOM element.
  28613. */
  28614. xmlElement: function (name) {
  28615. if (!name) { return null; }
  28616. var node = Strophe.xmlGenerator().createElement(name);
  28617. // FIXME: this should throw errors if args are the wrong type or
  28618. // there are more than two optional args
  28619. var a, i, k;
  28620. for (a = 1; a < arguments.length; a++) {
  28621. var arg = arguments[a];
  28622. if (!arg) { continue; }
  28623. if (typeof(arg) === "string" ||
  28624. typeof(arg) === "number") {
  28625. node.appendChild(Strophe.xmlTextNode(arg));
  28626. } else if (typeof(arg) === "object" &&
  28627. typeof(arg.sort) === "function") {
  28628. for (i = 0; i < arg.length; i++) {
  28629. var attr = arg[i];
  28630. if (typeof(attr) === "object" &&
  28631. typeof(attr.sort) === "function" &&
  28632. attr[1] !== undefined &&
  28633. attr[1] !== null) {
  28634. node.setAttribute(attr[0], attr[1]);
  28635. }
  28636. }
  28637. } else if (typeof(arg) === "object") {
  28638. for (k in arg) {
  28639. if (arg.hasOwnProperty(k)) {
  28640. if (arg[k] !== undefined &&
  28641. arg[k] !== null) {
  28642. node.setAttribute(k, arg[k]);
  28643. }
  28644. }
  28645. }
  28646. }
  28647. }
  28648. return node;
  28649. },
  28650. /* Function: xmlescape
  28651. * Excapes invalid xml characters.
  28652. *
  28653. * Parameters:
  28654. * (String) text - text to escape.
  28655. *
  28656. * Returns:
  28657. * Escaped text.
  28658. */
  28659. xmlescape: function(text) {
  28660. text = text.replace(/\&/g, "&amp;");
  28661. text = text.replace(/</g, "&lt;");
  28662. text = text.replace(/>/g, "&gt;");
  28663. text = text.replace(/'/g, "&apos;");
  28664. text = text.replace(/"/g, "&quot;");
  28665. return text;
  28666. },
  28667. /* Function: xmlunescape
  28668. * Unexcapes invalid xml characters.
  28669. *
  28670. * Parameters:
  28671. * (String) text - text to unescape.
  28672. *
  28673. * Returns:
  28674. * Unescaped text.
  28675. */
  28676. xmlunescape: function(text) {
  28677. text = text.replace(/\&amp;/g, "&");
  28678. text = text.replace(/&lt;/g, "<");
  28679. text = text.replace(/&gt;/g, ">");
  28680. text = text.replace(/&apos;/g, "'");
  28681. text = text.replace(/&quot;/g, "\"");
  28682. return text;
  28683. },
  28684. /** Function: xmlTextNode
  28685. * Creates an XML DOM text node.
  28686. *
  28687. * Provides a cross implementation version of document.createTextNode.
  28688. *
  28689. * Parameters:
  28690. * (String) text - The content of the text node.
  28691. *
  28692. * Returns:
  28693. * A new XML DOM text node.
  28694. */
  28695. xmlTextNode: function (text) {
  28696. return Strophe.xmlGenerator().createTextNode(text);
  28697. },
  28698. /** Function: xmlHtmlNode
  28699. * Creates an XML DOM html node.
  28700. *
  28701. * Parameters:
  28702. * (String) html - The content of the html node.
  28703. *
  28704. * Returns:
  28705. * A new XML DOM text node.
  28706. */
  28707. xmlHtmlNode: function (html) {
  28708. var node;
  28709. //ensure text is escaped
  28710. if (DOMParser) {
  28711. var parser = new DOMParser();
  28712. node = parser.parseFromString(html, "text/xml");
  28713. } else {
  28714. node = new ActiveXObject("Microsoft.XMLDOM");
  28715. node.async="false";
  28716. node.loadXML(html);
  28717. }
  28718. return node;
  28719. },
  28720. /** Function: getText
  28721. * Get the concatenation of all text children of an element.
  28722. *
  28723. * Parameters:
  28724. * (XMLElement) elem - A DOM element.
  28725. *
  28726. * Returns:
  28727. * A String with the concatenated text of all text element children.
  28728. */
  28729. getText: function (elem) {
  28730. if (!elem) { return null; }
  28731. var str = "";
  28732. if (elem.childNodes.length === 0 && elem.nodeType === Strophe.ElementType.TEXT) {
  28733. str += elem.nodeValue;
  28734. }
  28735. for (var i = 0; i < elem.childNodes.length; i++) {
  28736. if (elem.childNodes[i].nodeType === Strophe.ElementType.TEXT) {
  28737. str += elem.childNodes[i].nodeValue;
  28738. }
  28739. }
  28740. return Strophe.xmlescape(str);
  28741. },
  28742. /** Function: copyElement
  28743. * Copy an XML DOM element.
  28744. *
  28745. * This function copies a DOM element and all its descendants and returns
  28746. * the new copy.
  28747. *
  28748. * Parameters:
  28749. * (XMLElement) elem - A DOM element.
  28750. *
  28751. * Returns:
  28752. * A new, copied DOM element tree.
  28753. */
  28754. copyElement: function (elem) {
  28755. var i, el;
  28756. if (elem.nodeType === Strophe.ElementType.NORMAL) {
  28757. el = Strophe.xmlElement(elem.tagName);
  28758. for (i = 0; i < elem.attributes.length; i++) {
  28759. el.setAttribute(elem.attributes[i].nodeName,
  28760. elem.attributes[i].value);
  28761. }
  28762. for (i = 0; i < elem.childNodes.length; i++) {
  28763. el.appendChild(Strophe.copyElement(elem.childNodes[i]));
  28764. }
  28765. } else if (elem.nodeType === Strophe.ElementType.TEXT) {
  28766. el = Strophe.xmlGenerator().createTextNode(elem.nodeValue);
  28767. }
  28768. return el;
  28769. },
  28770. /** Function: createHtml
  28771. * Copy an HTML DOM element into an XML DOM.
  28772. *
  28773. * This function copies a DOM element and all its descendants and returns
  28774. * the new copy.
  28775. *
  28776. * Parameters:
  28777. * (HTMLElement) elem - A DOM element.
  28778. *
  28779. * Returns:
  28780. * A new, copied DOM element tree.
  28781. */
  28782. createHtml: function (elem) {
  28783. var i, el, j, tag, attribute, value, css, cssAttrs, attr, cssName, cssValue;
  28784. if (elem.nodeType === Strophe.ElementType.NORMAL) {
  28785. tag = elem.nodeName.toLowerCase(); // XHTML tags must be lower case.
  28786. if(Strophe.XHTML.validTag(tag)) {
  28787. try {
  28788. el = Strophe.xmlElement(tag);
  28789. for(i = 0; i < Strophe.XHTML.attributes[tag].length; i++) {
  28790. attribute = Strophe.XHTML.attributes[tag][i];
  28791. value = elem.getAttribute(attribute);
  28792. if(typeof value === 'undefined' || value === null || value === '' || value === false || value === 0) {
  28793. continue;
  28794. }
  28795. if(attribute === 'style' && typeof value === 'object') {
  28796. if(typeof value.cssText !== 'undefined') {
  28797. value = value.cssText; // we're dealing with IE, need to get CSS out
  28798. }
  28799. }
  28800. // filter out invalid css styles
  28801. if(attribute === 'style') {
  28802. css = [];
  28803. cssAttrs = value.split(';');
  28804. for(j = 0; j < cssAttrs.length; j++) {
  28805. attr = cssAttrs[j].split(':');
  28806. cssName = attr[0].replace(/^\s*/, "").replace(/\s*$/, "").toLowerCase();
  28807. if(Strophe.XHTML.validCSS(cssName)) {
  28808. cssValue = attr[1].replace(/^\s*/, "").replace(/\s*$/, "");
  28809. css.push(cssName + ': ' + cssValue);
  28810. }
  28811. }
  28812. if(css.length > 0) {
  28813. value = css.join('; ');
  28814. el.setAttribute(attribute, value);
  28815. }
  28816. } else {
  28817. el.setAttribute(attribute, value);
  28818. }
  28819. }
  28820. for (i = 0; i < elem.childNodes.length; i++) {
  28821. el.appendChild(Strophe.createHtml(elem.childNodes[i]));
  28822. }
  28823. } catch(e) { // invalid elements
  28824. el = Strophe.xmlTextNode('');
  28825. }
  28826. } else {
  28827. el = Strophe.xmlGenerator().createDocumentFragment();
  28828. for (i = 0; i < elem.childNodes.length; i++) {
  28829. el.appendChild(Strophe.createHtml(elem.childNodes[i]));
  28830. }
  28831. }
  28832. } else if (elem.nodeType === Strophe.ElementType.FRAGMENT) {
  28833. el = Strophe.xmlGenerator().createDocumentFragment();
  28834. for (i = 0; i < elem.childNodes.length; i++) {
  28835. el.appendChild(Strophe.createHtml(elem.childNodes[i]));
  28836. }
  28837. } else if (elem.nodeType === Strophe.ElementType.TEXT) {
  28838. el = Strophe.xmlTextNode(elem.nodeValue);
  28839. }
  28840. return el;
  28841. },
  28842. /** Function: escapeNode
  28843. * Escape the node part (also called local part) of a JID.
  28844. *
  28845. * Parameters:
  28846. * (String) node - A node (or local part).
  28847. *
  28848. * Returns:
  28849. * An escaped node (or local part).
  28850. */
  28851. escapeNode: function (node) {
  28852. if (typeof node !== "string") { return node; }
  28853. return node.replace(/^\s+|\s+$/g, '')
  28854. .replace(/\\/g, "\\5c")
  28855. .replace(/ /g, "\\20")
  28856. .replace(/\"/g, "\\22")
  28857. .replace(/\&/g, "\\26")
  28858. .replace(/\'/g, "\\27")
  28859. .replace(/\//g, "\\2f")
  28860. .replace(/:/g, "\\3a")
  28861. .replace(/</g, "\\3c")
  28862. .replace(/>/g, "\\3e")
  28863. .replace(/@/g, "\\40");
  28864. },
  28865. /** Function: unescapeNode
  28866. * Unescape a node part (also called local part) of a JID.
  28867. *
  28868. * Parameters:
  28869. * (String) node - A node (or local part).
  28870. *
  28871. * Returns:
  28872. * An unescaped node (or local part).
  28873. */
  28874. unescapeNode: function (node) {
  28875. if (typeof node !== "string") { return node; }
  28876. return node.replace(/\\20/g, " ")
  28877. .replace(/\\22/g, '"')
  28878. .replace(/\\26/g, "&")
  28879. .replace(/\\27/g, "'")
  28880. .replace(/\\2f/g, "/")
  28881. .replace(/\\3a/g, ":")
  28882. .replace(/\\3c/g, "<")
  28883. .replace(/\\3e/g, ">")
  28884. .replace(/\\40/g, "@")
  28885. .replace(/\\5c/g, "\\");
  28886. },
  28887. /** Function: getNodeFromJid
  28888. * Get the node portion of a JID String.
  28889. *
  28890. * Parameters:
  28891. * (String) jid - A JID.
  28892. *
  28893. * Returns:
  28894. * A String containing the node.
  28895. */
  28896. getNodeFromJid: function (jid) {
  28897. if (jid.indexOf("@") < 0) { return null; }
  28898. return jid.split("@")[0];
  28899. },
  28900. /** Function: getDomainFromJid
  28901. * Get the domain portion of a JID String.
  28902. *
  28903. * Parameters:
  28904. * (String) jid - A JID.
  28905. *
  28906. * Returns:
  28907. * A String containing the domain.
  28908. */
  28909. getDomainFromJid: function (jid) {
  28910. var bare = Strophe.getBareJidFromJid(jid);
  28911. if (bare.indexOf("@") < 0) {
  28912. return bare;
  28913. } else {
  28914. var parts = bare.split("@");
  28915. parts.splice(0, 1);
  28916. return parts.join('@');
  28917. }
  28918. },
  28919. /** Function: getResourceFromJid
  28920. * Get the resource portion of a JID String.
  28921. *
  28922. * Parameters:
  28923. * (String) jid - A JID.
  28924. *
  28925. * Returns:
  28926. * A String containing the resource.
  28927. */
  28928. getResourceFromJid: function (jid) {
  28929. var s = jid.split("/");
  28930. if (s.length < 2) { return null; }
  28931. s.splice(0, 1);
  28932. return s.join('/');
  28933. },
  28934. /** Function: getBareJidFromJid
  28935. * Get the bare JID from a JID String.
  28936. *
  28937. * Parameters:
  28938. * (String) jid - A JID.
  28939. *
  28940. * Returns:
  28941. * A String containing the bare JID.
  28942. */
  28943. getBareJidFromJid: function (jid) {
  28944. return jid ? jid.split("/")[0] : null;
  28945. },
  28946. /** PrivateFunction: _handleError
  28947. * _Private_ function that properly logs an error to the console
  28948. */
  28949. _handleError: function (e) {
  28950. if (typeof e.stack !== "undefined") {
  28951. Strophe.fatal(e.stack);
  28952. }
  28953. if (e.sourceURL) {
  28954. Strophe.fatal("error: " + this.handler + " " + e.sourceURL + ":" +
  28955. e.line + " - " + e.name + ": " + e.message);
  28956. } else if (e.fileName) {
  28957. Strophe.fatal("error: " + this.handler + " " +
  28958. e.fileName + ":" + e.lineNumber + " - " +
  28959. e.name + ": " + e.message);
  28960. } else {
  28961. Strophe.fatal("error: " + e.message);
  28962. }
  28963. },
  28964. /** Function: log
  28965. * User overrideable logging function.
  28966. *
  28967. * This function is called whenever the Strophe library calls any
  28968. * of the logging functions. The default implementation of this
  28969. * function does nothing. If client code wishes to handle the logging
  28970. * messages, it should override this with
  28971. * > Strophe.log = function (level, msg) {
  28972. * > (user code here)
  28973. * > };
  28974. *
  28975. * Please note that data sent and received over the wire is logged
  28976. * via Strophe.Connection.rawInput() and Strophe.Connection.rawOutput().
  28977. *
  28978. * The different levels and their meanings are
  28979. *
  28980. * DEBUG - Messages useful for debugging purposes.
  28981. * INFO - Informational messages. This is mostly information like
  28982. * 'disconnect was called' or 'SASL auth succeeded'.
  28983. * WARN - Warnings about potential problems. This is mostly used
  28984. * to report transient connection errors like request timeouts.
  28985. * ERROR - Some error occurred.
  28986. * FATAL - A non-recoverable fatal error occurred.
  28987. *
  28988. * Parameters:
  28989. * (Integer) level - The log level of the log message. This will
  28990. * be one of the values in Strophe.LogLevel.
  28991. * (String) msg - The log message.
  28992. */
  28993. /* jshint ignore:start */
  28994. log: function (level, msg) {
  28995. return;
  28996. },
  28997. /* jshint ignore:end */
  28998. /** Function: debug
  28999. * Log a message at the Strophe.LogLevel.DEBUG level.
  29000. *
  29001. * Parameters:
  29002. * (String) msg - The log message.
  29003. */
  29004. debug: function(msg) {
  29005. this.log(this.LogLevel.DEBUG, msg);
  29006. },
  29007. /** Function: info
  29008. * Log a message at the Strophe.LogLevel.INFO level.
  29009. *
  29010. * Parameters:
  29011. * (String) msg - The log message.
  29012. */
  29013. info: function (msg) {
  29014. this.log(this.LogLevel.INFO, msg);
  29015. },
  29016. /** Function: warn
  29017. * Log a message at the Strophe.LogLevel.WARN level.
  29018. *
  29019. * Parameters:
  29020. * (String) msg - The log message.
  29021. */
  29022. warn: function (msg) {
  29023. this.log(this.LogLevel.WARN, msg);
  29024. },
  29025. /** Function: error
  29026. * Log a message at the Strophe.LogLevel.ERROR level.
  29027. *
  29028. * Parameters:
  29029. * (String) msg - The log message.
  29030. */
  29031. error: function (msg) {
  29032. this.log(this.LogLevel.ERROR, msg);
  29033. },
  29034. /** Function: fatal
  29035. * Log a message at the Strophe.LogLevel.FATAL level.
  29036. *
  29037. * Parameters:
  29038. * (String) msg - The log message.
  29039. */
  29040. fatal: function (msg) {
  29041. this.log(this.LogLevel.FATAL, msg);
  29042. },
  29043. /** Function: serialize
  29044. * Render a DOM element and all descendants to a String.
  29045. *
  29046. * Parameters:
  29047. * (XMLElement) elem - A DOM element.
  29048. *
  29049. * Returns:
  29050. * The serialized element tree as a String.
  29051. */
  29052. serialize: function (elem) {
  29053. var result;
  29054. if (!elem) { return null; }
  29055. if (typeof(elem.tree) === "function") {
  29056. elem = elem.tree();
  29057. }
  29058. var nodeName = elem.nodeName;
  29059. var i, child;
  29060. if (elem.getAttribute("_realname")) {
  29061. nodeName = elem.getAttribute("_realname");
  29062. }
  29063. result = "<" + nodeName;
  29064. for (i = 0; i < elem.attributes.length; i++) {
  29065. if(elem.attributes[i].nodeName !== "_realname") {
  29066. result += " " + elem.attributes[i].nodeName +
  29067. "='" + Strophe.xmlescape(elem.attributes[i].value) + "'";
  29068. }
  29069. }
  29070. if (elem.childNodes.length > 0) {
  29071. result += ">";
  29072. for (i = 0; i < elem.childNodes.length; i++) {
  29073. child = elem.childNodes[i];
  29074. switch( child.nodeType ){
  29075. case Strophe.ElementType.NORMAL:
  29076. // normal element, so recurse
  29077. result += Strophe.serialize(child);
  29078. break;
  29079. case Strophe.ElementType.TEXT:
  29080. // text element to escape values
  29081. result += Strophe.xmlescape(child.nodeValue);
  29082. break;
  29083. case Strophe.ElementType.CDATA:
  29084. // cdata section so don't escape values
  29085. result += "<![CDATA["+child.nodeValue+"]]>";
  29086. }
  29087. }
  29088. result += "</" + nodeName + ">";
  29089. } else {
  29090. result += "/>";
  29091. }
  29092. return result;
  29093. },
  29094. /** PrivateVariable: _requestId
  29095. * _Private_ variable that keeps track of the request ids for
  29096. * connections.
  29097. */
  29098. _requestId: 0,
  29099. /** PrivateVariable: Strophe.connectionPlugins
  29100. * _Private_ variable Used to store plugin names that need
  29101. * initialization on Strophe.Connection construction.
  29102. */
  29103. _connectionPlugins: {},
  29104. /** Function: addConnectionPlugin
  29105. * Extends the Strophe.Connection object with the given plugin.
  29106. *
  29107. * Parameters:
  29108. * (String) name - The name of the extension.
  29109. * (Object) ptype - The plugin's prototype.
  29110. */
  29111. addConnectionPlugin: function (name, ptype) {
  29112. Strophe._connectionPlugins[name] = ptype;
  29113. }
  29114. };
  29115. /** Class: Strophe.Builder
  29116. * XML DOM builder.
  29117. *
  29118. * This object provides an interface similar to JQuery but for building
  29119. * DOM elements easily and rapidly. All the functions except for toString()
  29120. * and tree() return the object, so calls can be chained. Here's an
  29121. * example using the $iq() builder helper.
  29122. * > $iq({to: 'you', from: 'me', type: 'get', id: '1'})
  29123. * > .c('query', {xmlns: 'strophe:example'})
  29124. * > .c('example')
  29125. * > .toString()
  29126. *
  29127. * The above generates this XML fragment
  29128. * > <iq to='you' from='me' type='get' id='1'>
  29129. * > <query xmlns='strophe:example'>
  29130. * > <example/>
  29131. * > </query>
  29132. * > </iq>
  29133. * The corresponding DOM manipulations to get a similar fragment would be
  29134. * a lot more tedious and probably involve several helper variables.
  29135. *
  29136. * Since adding children makes new operations operate on the child, up()
  29137. * is provided to traverse up the tree. To add two children, do
  29138. * > builder.c('child1', ...).up().c('child2', ...)
  29139. * The next operation on the Builder will be relative to the second child.
  29140. */
  29141. /** Constructor: Strophe.Builder
  29142. * Create a Strophe.Builder object.
  29143. *
  29144. * The attributes should be passed in object notation. For example
  29145. * > var b = new Builder('message', {to: 'you', from: 'me'});
  29146. * or
  29147. * > var b = new Builder('messsage', {'xml:lang': 'en'});
  29148. *
  29149. * Parameters:
  29150. * (String) name - The name of the root element.
  29151. * (Object) attrs - The attributes for the root element in object notation.
  29152. *
  29153. * Returns:
  29154. * A new Strophe.Builder.
  29155. */
  29156. Strophe.Builder = function (name, attrs) {
  29157. // Set correct namespace for jabber:client elements
  29158. if (name === "presence" || name === "message" || name === "iq") {
  29159. if (attrs && !attrs.xmlns) {
  29160. attrs.xmlns = Strophe.NS.CLIENT;
  29161. } else if (!attrs) {
  29162. attrs = {xmlns: Strophe.NS.CLIENT};
  29163. }
  29164. }
  29165. // Holds the tree being built.
  29166. this.nodeTree = Strophe.xmlElement(name, attrs);
  29167. // Points to the current operation node.
  29168. this.node = this.nodeTree;
  29169. };
  29170. Strophe.Builder.prototype = {
  29171. /** Function: tree
  29172. * Return the DOM tree.
  29173. *
  29174. * This function returns the current DOM tree as an element object. This
  29175. * is suitable for passing to functions like Strophe.Connection.send().
  29176. *
  29177. * Returns:
  29178. * The DOM tree as a element object.
  29179. */
  29180. tree: function () {
  29181. return this.nodeTree;
  29182. },
  29183. /** Function: toString
  29184. * Serialize the DOM tree to a String.
  29185. *
  29186. * This function returns a string serialization of the current DOM
  29187. * tree. It is often used internally to pass data to a
  29188. * Strophe.Request object.
  29189. *
  29190. * Returns:
  29191. * The serialized DOM tree in a String.
  29192. */
  29193. toString: function () {
  29194. return Strophe.serialize(this.nodeTree);
  29195. },
  29196. /** Function: up
  29197. * Make the current parent element the new current element.
  29198. *
  29199. * This function is often used after c() to traverse back up the tree.
  29200. * For example, to add two children to the same element
  29201. * > builder.c('child1', {}).up().c('child2', {});
  29202. *
  29203. * Returns:
  29204. * The Stophe.Builder object.
  29205. */
  29206. up: function () {
  29207. this.node = this.node.parentNode;
  29208. return this;
  29209. },
  29210. /** Function: root
  29211. * Make the root element the new current element.
  29212. *
  29213. * When at a deeply nested element in the tree, this function can be used
  29214. * to jump back to the root of the tree, instead of having to repeatedly
  29215. * call up().
  29216. *
  29217. * Returns:
  29218. * The Stophe.Builder object.
  29219. */
  29220. root: function () {
  29221. this.node = this.nodeTree;
  29222. return this;
  29223. },
  29224. /** Function: attrs
  29225. * Add or modify attributes of the current element.
  29226. *
  29227. * The attributes should be passed in object notation. This function
  29228. * does not move the current element pointer.
  29229. *
  29230. * Parameters:
  29231. * (Object) moreattrs - The attributes to add/modify in object notation.
  29232. *
  29233. * Returns:
  29234. * The Strophe.Builder object.
  29235. */
  29236. attrs: function (moreattrs) {
  29237. for (var k in moreattrs) {
  29238. if (moreattrs.hasOwnProperty(k)) {
  29239. if (moreattrs[k] === undefined) {
  29240. this.node.removeAttribute(k);
  29241. } else {
  29242. this.node.setAttribute(k, moreattrs[k]);
  29243. }
  29244. }
  29245. }
  29246. return this;
  29247. },
  29248. /** Function: c
  29249. * Add a child to the current element and make it the new current
  29250. * element.
  29251. *
  29252. * This function moves the current element pointer to the child,
  29253. * unless text is provided. If you need to add another child, it
  29254. * is necessary to use up() to go back to the parent in the tree.
  29255. *
  29256. * Parameters:
  29257. * (String) name - The name of the child.
  29258. * (Object) attrs - The attributes of the child in object notation.
  29259. * (String) text - The text to add to the child.
  29260. *
  29261. * Returns:
  29262. * The Strophe.Builder object.
  29263. */
  29264. c: function (name, attrs, text) {
  29265. var child = Strophe.xmlElement(name, attrs, text);
  29266. this.node.appendChild(child);
  29267. if (typeof text !== "string" && typeof text !=="number") {
  29268. this.node = child;
  29269. }
  29270. return this;
  29271. },
  29272. /** Function: cnode
  29273. * Add a child to the current element and make it the new current
  29274. * element.
  29275. *
  29276. * This function is the same as c() except that instead of using a
  29277. * name and an attributes object to create the child it uses an
  29278. * existing DOM element object.
  29279. *
  29280. * Parameters:
  29281. * (XMLElement) elem - A DOM element.
  29282. *
  29283. * Returns:
  29284. * The Strophe.Builder object.
  29285. */
  29286. cnode: function (elem) {
  29287. var impNode;
  29288. var xmlGen = Strophe.xmlGenerator();
  29289. try {
  29290. impNode = (xmlGen.importNode !== undefined);
  29291. } catch (e) {
  29292. impNode = false;
  29293. }
  29294. var newElem = impNode ?
  29295. xmlGen.importNode(elem, true) :
  29296. Strophe.copyElement(elem);
  29297. this.node.appendChild(newElem);
  29298. this.node = newElem;
  29299. return this;
  29300. },
  29301. /** Function: t
  29302. * Add a child text element.
  29303. *
  29304. * This *does not* make the child the new current element since there
  29305. * are no children of text elements.
  29306. *
  29307. * Parameters:
  29308. * (String) text - The text data to append to the current element.
  29309. *
  29310. * Returns:
  29311. * The Strophe.Builder object.
  29312. */
  29313. t: function (text) {
  29314. var child = Strophe.xmlTextNode(text);
  29315. this.node.appendChild(child);
  29316. return this;
  29317. },
  29318. /** Function: h
  29319. * Replace current element contents with the HTML passed in.
  29320. *
  29321. * This *does not* make the child the new current element
  29322. *
  29323. * Parameters:
  29324. * (String) html - The html to insert as contents of current element.
  29325. *
  29326. * Returns:
  29327. * The Strophe.Builder object.
  29328. */
  29329. h: function (html) {
  29330. var fragment = document.createElement('body');
  29331. // force the browser to try and fix any invalid HTML tags
  29332. fragment.innerHTML = html;
  29333. // copy cleaned html into an xml dom
  29334. var xhtml = Strophe.createHtml(fragment);
  29335. while(xhtml.childNodes.length > 0) {
  29336. this.node.appendChild(xhtml.childNodes[0]);
  29337. }
  29338. return this;
  29339. }
  29340. };
  29341. /** PrivateClass: Strophe.Handler
  29342. * _Private_ helper class for managing stanza handlers.
  29343. *
  29344. * A Strophe.Handler encapsulates a user provided callback function to be
  29345. * executed when matching stanzas are received by the connection.
  29346. * Handlers can be either one-off or persistant depending on their
  29347. * return value. Returning true will cause a Handler to remain active, and
  29348. * returning false will remove the Handler.
  29349. *
  29350. * Users will not use Strophe.Handler objects directly, but instead they
  29351. * will use Strophe.Connection.addHandler() and
  29352. * Strophe.Connection.deleteHandler().
  29353. */
  29354. /** PrivateConstructor: Strophe.Handler
  29355. * Create and initialize a new Strophe.Handler.
  29356. *
  29357. * Parameters:
  29358. * (Function) handler - A function to be executed when the handler is run.
  29359. * (String) ns - The namespace to match.
  29360. * (String) name - The element name to match.
  29361. * (String) type - The element type to match.
  29362. * (String) id - The element id attribute to match.
  29363. * (String) from - The element from attribute to match.
  29364. * (Object) options - Handler options
  29365. *
  29366. * Returns:
  29367. * A new Strophe.Handler object.
  29368. */
  29369. Strophe.Handler = function (handler, ns, name, type, id, from, options) {
  29370. this.handler = handler;
  29371. this.ns = ns;
  29372. this.name = name;
  29373. this.type = type;
  29374. this.id = id;
  29375. this.options = options || {'matchBareFromJid': false, 'ignoreNamespaceFragment': false};
  29376. // BBB: Maintain backward compatibility with old `matchBare` option
  29377. if (this.options.matchBare) {
  29378. Strophe.warn('The "matchBare" option is deprecated, use "matchBareFromJid" instead.');
  29379. this.options.matchBareFromJid = this.options.matchBare;
  29380. delete this.options.matchBare;
  29381. }
  29382. if (this.options.matchBareFromJid) {
  29383. this.from = from ? Strophe.getBareJidFromJid(from) : null;
  29384. } else {
  29385. this.from = from;
  29386. }
  29387. // whether the handler is a user handler or a system handler
  29388. this.user = true;
  29389. };
  29390. Strophe.Handler.prototype = {
  29391. /** PrivateFunction: getNamespace
  29392. * Returns the XML namespace attribute on an element.
  29393. * If `ignoreNamespaceFragment` was passed in for this handler, then the
  29394. * URL fragment will be stripped.
  29395. *
  29396. * Parameters:
  29397. * (XMLElement) elem - The XML element with the namespace.
  29398. *
  29399. * Returns:
  29400. * The namespace, with optionally the fragment stripped.
  29401. */
  29402. getNamespace: function (elem) {
  29403. var elNamespace = elem.getAttribute("xmlns");
  29404. if (elNamespace && this.options.ignoreNamespaceFragment) {
  29405. elNamespace = elNamespace.split('#')[0];
  29406. }
  29407. return elNamespace;
  29408. },
  29409. /** PrivateFunction: namespaceMatch
  29410. * Tests if a stanza matches the namespace set for this Strophe.Handler.
  29411. *
  29412. * Parameters:
  29413. * (XMLElement) elem - The XML element to test.
  29414. *
  29415. * Returns:
  29416. * true if the stanza matches and false otherwise.
  29417. */
  29418. namespaceMatch: function (elem) {
  29419. var nsMatch = false;
  29420. if (!this.ns) {
  29421. return true;
  29422. } else {
  29423. var that = this;
  29424. Strophe.forEachChild(elem, null, function (elem) {
  29425. if (that.getNamespace(elem) === that.ns) {
  29426. nsMatch = true;
  29427. }
  29428. });
  29429. nsMatch = nsMatch || this.getNamespace(elem) === this.ns;
  29430. }
  29431. return nsMatch;
  29432. },
  29433. /** PrivateFunction: isMatch
  29434. * Tests if a stanza matches the Strophe.Handler.
  29435. *
  29436. * Parameters:
  29437. * (XMLElement) elem - The XML element to test.
  29438. *
  29439. * Returns:
  29440. * true if the stanza matches and false otherwise.
  29441. */
  29442. isMatch: function (elem) {
  29443. var from = elem.getAttribute('from');
  29444. if (this.options.matchBareFromJid) {
  29445. from = Strophe.getBareJidFromJid(from);
  29446. }
  29447. var elem_type = elem.getAttribute("type");
  29448. if (this.namespaceMatch(elem) &&
  29449. (!this.name || Strophe.isTagEqual(elem, this.name)) &&
  29450. (!this.type || (Array.isArray(this.type) ? this.type.indexOf(elem_type) !== -1 : elem_type === this.type)) &&
  29451. (!this.id || elem.getAttribute("id") === this.id) &&
  29452. (!this.from || from === this.from)) {
  29453. return true;
  29454. }
  29455. return false;
  29456. },
  29457. /** PrivateFunction: run
  29458. * Run the callback on a matching stanza.
  29459. *
  29460. * Parameters:
  29461. * (XMLElement) elem - The DOM element that triggered the
  29462. * Strophe.Handler.
  29463. *
  29464. * Returns:
  29465. * A boolean indicating if the handler should remain active.
  29466. */
  29467. run: function (elem) {
  29468. var result = null;
  29469. try {
  29470. result = this.handler(elem);
  29471. } catch (e) {
  29472. Strophe._handleError(e);
  29473. throw e;
  29474. }
  29475. return result;
  29476. },
  29477. /** PrivateFunction: toString
  29478. * Get a String representation of the Strophe.Handler object.
  29479. *
  29480. * Returns:
  29481. * A String.
  29482. */
  29483. toString: function () {
  29484. return "{Handler: " + this.handler + "(" + this.name + "," +
  29485. this.id + "," + this.ns + ")}";
  29486. }
  29487. };
  29488. /** PrivateClass: Strophe.TimedHandler
  29489. * _Private_ helper class for managing timed handlers.
  29490. *
  29491. * A Strophe.TimedHandler encapsulates a user provided callback that
  29492. * should be called after a certain period of time or at regular
  29493. * intervals. The return value of the callback determines whether the
  29494. * Strophe.TimedHandler will continue to fire.
  29495. *
  29496. * Users will not use Strophe.TimedHandler objects directly, but instead
  29497. * they will use Strophe.Connection.addTimedHandler() and
  29498. * Strophe.Connection.deleteTimedHandler().
  29499. */
  29500. /** PrivateConstructor: Strophe.TimedHandler
  29501. * Create and initialize a new Strophe.TimedHandler object.
  29502. *
  29503. * Parameters:
  29504. * (Integer) period - The number of milliseconds to wait before the
  29505. * handler is called.
  29506. * (Function) handler - The callback to run when the handler fires. This
  29507. * function should take no arguments.
  29508. *
  29509. * Returns:
  29510. * A new Strophe.TimedHandler object.
  29511. */
  29512. Strophe.TimedHandler = function (period, handler) {
  29513. this.period = period;
  29514. this.handler = handler;
  29515. this.lastCalled = new Date().getTime();
  29516. this.user = true;
  29517. };
  29518. Strophe.TimedHandler.prototype = {
  29519. /** PrivateFunction: run
  29520. * Run the callback for the Strophe.TimedHandler.
  29521. *
  29522. * Returns:
  29523. * true if the Strophe.TimedHandler should be called again, and false
  29524. * otherwise.
  29525. */
  29526. run: function () {
  29527. this.lastCalled = new Date().getTime();
  29528. return this.handler();
  29529. },
  29530. /** PrivateFunction: reset
  29531. * Reset the last called time for the Strophe.TimedHandler.
  29532. */
  29533. reset: function () {
  29534. this.lastCalled = new Date().getTime();
  29535. },
  29536. /** PrivateFunction: toString
  29537. * Get a string representation of the Strophe.TimedHandler object.
  29538. *
  29539. * Returns:
  29540. * The string representation.
  29541. */
  29542. toString: function () {
  29543. return "{TimedHandler: " + this.handler + "(" + this.period +")}";
  29544. }
  29545. };
  29546. /** Class: Strophe.Connection
  29547. * XMPP Connection manager.
  29548. *
  29549. * This class is the main part of Strophe. It manages a BOSH or websocket
  29550. * connection to an XMPP server and dispatches events to the user callbacks
  29551. * as data arrives. It supports SASL PLAIN, SASL DIGEST-MD5, SASL SCRAM-SHA1
  29552. * and legacy authentication.
  29553. *
  29554. * After creating a Strophe.Connection object, the user will typically
  29555. * call connect() with a user supplied callback to handle connection level
  29556. * events like authentication failure, disconnection, or connection
  29557. * complete.
  29558. *
  29559. * The user will also have several event handlers defined by using
  29560. * addHandler() and addTimedHandler(). These will allow the user code to
  29561. * respond to interesting stanzas or do something periodically with the
  29562. * connection. These handlers will be active once authentication is
  29563. * finished.
  29564. *
  29565. * To send data to the connection, use send().
  29566. */
  29567. /** Constructor: Strophe.Connection
  29568. * Create and initialize a Strophe.Connection object.
  29569. *
  29570. * The transport-protocol for this connection will be chosen automatically
  29571. * based on the given service parameter. URLs starting with "ws://" or
  29572. * "wss://" will use WebSockets, URLs starting with "http://", "https://"
  29573. * or without a protocol will use BOSH.
  29574. *
  29575. * To make Strophe connect to the current host you can leave out the protocol
  29576. * and host part and just pass the path, e.g.
  29577. *
  29578. * > var conn = new Strophe.Connection("/http-bind/");
  29579. *
  29580. * Options common to both Websocket and BOSH:
  29581. * ------------------------------------------
  29582. *
  29583. * cookies:
  29584. *
  29585. * The *cookies* option allows you to pass in cookies to be added to the
  29586. * document. These cookies will then be included in the BOSH XMLHttpRequest
  29587. * or in the websocket connection.
  29588. *
  29589. * The passed in value must be a map of cookie names and string values.
  29590. *
  29591. * > { "myCookie": {
  29592. * > "value": "1234",
  29593. * > "domain": ".example.org",
  29594. * > "path": "/",
  29595. * > "expires": expirationDate
  29596. * > }
  29597. * > }
  29598. *
  29599. * Note that cookies can't be set in this way for other domains (i.e. cross-domain).
  29600. * Those cookies need to be set under those domains, for example they can be
  29601. * set server-side by making a XHR call to that domain to ask it to set any
  29602. * necessary cookies.
  29603. *
  29604. * mechanisms:
  29605. *
  29606. * The *mechanisms* option allows you to specify the SASL mechanisms that this
  29607. * instance of Strophe.Connection (and therefore your XMPP client) will
  29608. * support.
  29609. *
  29610. * The value must be an array of objects with Strophe.SASLMechanism
  29611. * prototypes.
  29612. *
  29613. * If nothing is specified, then the following mechanisms (and their
  29614. * priorities) are registered:
  29615. *
  29616. * OAUTHBEARER - 60
  29617. * SCRAM-SHA1 - 50
  29618. * DIGEST-MD5 - 40
  29619. * PLAIN - 30
  29620. * ANONYMOUS - 20
  29621. * EXTERNAL - 10
  29622. *
  29623. * WebSocket options:
  29624. * ------------------
  29625. *
  29626. * If you want to connect to the current host with a WebSocket connection you
  29627. * can tell Strophe to use WebSockets through a "protocol" attribute in the
  29628. * optional options parameter. Valid values are "ws" for WebSocket and "wss"
  29629. * for Secure WebSocket.
  29630. * So to connect to "wss://CURRENT_HOSTNAME/xmpp-websocket" you would call
  29631. *
  29632. * > var conn = new Strophe.Connection("/xmpp-websocket/", {protocol: "wss"});
  29633. *
  29634. * Note that relative URLs _NOT_ starting with a "/" will also include the path
  29635. * of the current site.
  29636. *
  29637. * Also because downgrading security is not permitted by browsers, when using
  29638. * relative URLs both BOSH and WebSocket connections will use their secure
  29639. * variants if the current connection to the site is also secure (https).
  29640. *
  29641. * BOSH options:
  29642. * -------------
  29643. *
  29644. * By adding "sync" to the options, you can control if requests will
  29645. * be made synchronously or not. The default behaviour is asynchronous.
  29646. * If you want to make requests synchronous, make "sync" evaluate to true.
  29647. * > var conn = new Strophe.Connection("/http-bind/", {sync: true});
  29648. *
  29649. * You can also toggle this on an already established connection.
  29650. * > conn.options.sync = true;
  29651. *
  29652. * The *customHeaders* option can be used to provide custom HTTP headers to be
  29653. * included in the XMLHttpRequests made.
  29654. *
  29655. * The *keepalive* option can be used to instruct Strophe to maintain the
  29656. * current BOSH session across interruptions such as webpage reloads.
  29657. *
  29658. * It will do this by caching the sessions tokens in sessionStorage, and when
  29659. * "restore" is called it will check whether there are cached tokens with
  29660. * which it can resume an existing session.
  29661. *
  29662. * The *withCredentials* option should receive a Boolean value and is used to
  29663. * indicate wether cookies should be included in ajax requests (by default
  29664. * they're not).
  29665. * Set this value to true if you are connecting to a BOSH service
  29666. * and for some reason need to send cookies to it.
  29667. * In order for this to work cross-domain, the server must also enable
  29668. * credentials by setting the Access-Control-Allow-Credentials response header
  29669. * to "true". For most usecases however this setting should be false (which
  29670. * is the default).
  29671. * Additionally, when using Access-Control-Allow-Credentials, the
  29672. * Access-Control-Allow-Origin header can't be set to the wildcard "*", but
  29673. * instead must be restricted to actual domains.
  29674. *
  29675. * The *contentType* option can be set to change the default Content-Type
  29676. * of "text/xml; charset=utf-8", which can be useful to reduce the amount of
  29677. * CORS preflight requests that are sent to the server.
  29678. *
  29679. * Parameters:
  29680. * (String) service - The BOSH or WebSocket service URL.
  29681. * (Object) options - A hash of configuration options
  29682. *
  29683. * Returns:
  29684. * A new Strophe.Connection object.
  29685. */
  29686. Strophe.Connection = function (service, options) {
  29687. // The service URL
  29688. this.service = service;
  29689. // Configuration options
  29690. this.options = options || {};
  29691. var proto = this.options.protocol || "";
  29692. // Select protocal based on service or options
  29693. if (service.indexOf("ws:") === 0 || service.indexOf("wss:") === 0 ||
  29694. proto.indexOf("ws") === 0) {
  29695. this._proto = new Strophe.Websocket(this);
  29696. } else {
  29697. this._proto = new Strophe.Bosh(this);
  29698. }
  29699. /* The connected JID. */
  29700. this.jid = "";
  29701. /* the JIDs domain */
  29702. this.domain = null;
  29703. /* stream:features */
  29704. this.features = null;
  29705. // SASL
  29706. this._sasl_data = {};
  29707. this.do_session = false;
  29708. this.do_bind = false;
  29709. // handler lists
  29710. this.timedHandlers = [];
  29711. this.handlers = [];
  29712. this.removeTimeds = [];
  29713. this.removeHandlers = [];
  29714. this.addTimeds = [];
  29715. this.addHandlers = [];
  29716. this.protocolErrorHandlers = {
  29717. 'HTTP': {},
  29718. 'websocket': {}
  29719. };
  29720. this._idleTimeout = null;
  29721. this._disconnectTimeout = null;
  29722. this.authenticated = false;
  29723. this.connected = false;
  29724. this.disconnecting = false;
  29725. this.do_authentication = true;
  29726. this.paused = false;
  29727. this.restored = false;
  29728. this._data = [];
  29729. this._uniqueId = 0;
  29730. this._sasl_success_handler = null;
  29731. this._sasl_failure_handler = null;
  29732. this._sasl_challenge_handler = null;
  29733. // Max retries before disconnecting
  29734. this.maxRetries = 5;
  29735. // Call onIdle callback every 1/10th of a second
  29736. // XXX: setTimeout should be called only with function expressions (23974bc1)
  29737. this._idleTimeout = setTimeout(function() {
  29738. this._onIdle();
  29739. }.bind(this), 100);
  29740. utils.addCookies(this.options.cookies);
  29741. this.registerSASLMechanisms(this.options.mechanisms);
  29742. // initialize plugins
  29743. for (var k in Strophe._connectionPlugins) {
  29744. if (Strophe._connectionPlugins.hasOwnProperty(k)) {
  29745. var ptype = Strophe._connectionPlugins[k];
  29746. // jslint complaints about the below line, but this is fine
  29747. var F = function () {}; // jshint ignore:line
  29748. F.prototype = ptype;
  29749. this[k] = new F();
  29750. this[k].init(this);
  29751. }
  29752. }
  29753. };
  29754. Strophe.Connection.prototype = {
  29755. /** Function: reset
  29756. * Reset the connection.
  29757. *
  29758. * This function should be called after a connection is disconnected
  29759. * before that connection is reused.
  29760. */
  29761. reset: function () {
  29762. this._proto._reset();
  29763. // SASL
  29764. this.do_session = false;
  29765. this.do_bind = false;
  29766. // handler lists
  29767. this.timedHandlers = [];
  29768. this.handlers = [];
  29769. this.removeTimeds = [];
  29770. this.removeHandlers = [];
  29771. this.addTimeds = [];
  29772. this.addHandlers = [];
  29773. this.authenticated = false;
  29774. this.connected = false;
  29775. this.disconnecting = false;
  29776. this.restored = false;
  29777. this._data = [];
  29778. this._requests = [];
  29779. this._uniqueId = 0;
  29780. },
  29781. /** Function: pause
  29782. * Pause the request manager.
  29783. *
  29784. * This will prevent Strophe from sending any more requests to the
  29785. * server. This is very useful for temporarily pausing
  29786. * BOSH-Connections while a lot of send() calls are happening quickly.
  29787. * This causes Strophe to send the data in a single request, saving
  29788. * many request trips.
  29789. */
  29790. pause: function () {
  29791. this.paused = true;
  29792. },
  29793. /** Function: resume
  29794. * Resume the request manager.
  29795. *
  29796. * This resumes after pause() has been called.
  29797. */
  29798. resume: function () {
  29799. this.paused = false;
  29800. },
  29801. /** Function: getUniqueId
  29802. * Generate a unique ID for use in <iq/> elements.
  29803. *
  29804. * All <iq/> stanzas are required to have unique id attributes. This
  29805. * function makes creating these easy. Each connection instance has
  29806. * a counter which starts from zero, and the value of this counter
  29807. * plus a colon followed by the suffix becomes the unique id. If no
  29808. * suffix is supplied, the counter is used as the unique id.
  29809. *
  29810. * Suffixes are used to make debugging easier when reading the stream
  29811. * data, and their use is recommended. The counter resets to 0 for
  29812. * every new connection for the same reason. For connections to the
  29813. * same server that authenticate the same way, all the ids should be
  29814. * the same, which makes it easy to see changes. This is useful for
  29815. * automated testing as well.
  29816. *
  29817. * Parameters:
  29818. * (String) suffix - A optional suffix to append to the id.
  29819. *
  29820. * Returns:
  29821. * A unique string to be used for the id attribute.
  29822. */
  29823. getUniqueId: function(suffix) {
  29824. var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
  29825. var r = Math.random() * 16 | 0,
  29826. v = c === 'x' ? r : r & 0x3 | 0x8;
  29827. return v.toString(16);
  29828. });
  29829. if (typeof(suffix) === "string" || typeof(suffix) === "number") {
  29830. return uuid + ":" + suffix;
  29831. } else {
  29832. return uuid + "";
  29833. }
  29834. },
  29835. /** Function: addProtocolErrorHandler
  29836. * Register a handler function for when a protocol (websocker or HTTP)
  29837. * error occurs.
  29838. *
  29839. * NOTE: Currently only HTTP errors for BOSH requests are handled.
  29840. * Patches that handle websocket errors would be very welcome.
  29841. *
  29842. * Parameters:
  29843. * (String) protocol - 'HTTP' or 'websocket'
  29844. * (Integer) status_code - Error status code (e.g 500, 400 or 404)
  29845. * (Function) callback - Function that will fire on Http error
  29846. *
  29847. * Example:
  29848. * function onError(err_code){
  29849. * //do stuff
  29850. * }
  29851. *
  29852. * var conn = Strophe.connect('http://example.com/http-bind');
  29853. * conn.addProtocolErrorHandler('HTTP', 500, onError);
  29854. * // Triggers HTTP 500 error and onError handler will be called
  29855. * conn.connect('user_jid@incorrect_jabber_host', 'secret', onConnect);
  29856. */
  29857. addProtocolErrorHandler: function(protocol, status_code, callback){
  29858. this.protocolErrorHandlers[protocol][status_code] = callback;
  29859. },
  29860. /** Function: connect
  29861. * Starts the connection process.
  29862. *
  29863. * As the connection process proceeds, the user supplied callback will
  29864. * be triggered multiple times with status updates. The callback
  29865. * should take two arguments - the status code and the error condition.
  29866. *
  29867. * The status code will be one of the values in the Strophe.Status
  29868. * constants. The error condition will be one of the conditions
  29869. * defined in RFC 3920 or the condition 'strophe-parsererror'.
  29870. *
  29871. * The Parameters _wait_, _hold_ and _route_ are optional and only relevant
  29872. * for BOSH connections. Please see XEP 124 for a more detailed explanation
  29873. * of the optional parameters.
  29874. *
  29875. * Parameters:
  29876. * (String) jid - The user's JID. This may be a bare JID,
  29877. * or a full JID. If a node is not supplied, SASL OAUTHBEARER or
  29878. * SASL ANONYMOUS authentication will be attempted (OAUTHBEARER will
  29879. * process the provided password value as an access token).
  29880. * (String) pass - The user's password.
  29881. * (Function) callback - The connect callback function.
  29882. * (Integer) wait - The optional HTTPBIND wait value. This is the
  29883. * time the server will wait before returning an empty result for
  29884. * a request. The default setting of 60 seconds is recommended.
  29885. * (Integer) hold - The optional HTTPBIND hold value. This is the
  29886. * number of connections the server will hold at one time. This
  29887. * should almost always be set to 1 (the default).
  29888. * (String) route - The optional route value.
  29889. * (String) authcid - The optional alternative authentication identity
  29890. * (username) if intending to impersonate another user.
  29891. * When using the SASL-EXTERNAL authentication mechanism, for example
  29892. * with client certificates, then the authcid value is used to
  29893. * determine whether an authorization JID (authzid) should be sent to
  29894. * the server. The authzid should not be sent to the server if the
  29895. * authzid and authcid are the same. So to prevent it from being sent
  29896. * (for example when the JID is already contained in the client
  29897. * certificate), set authcid to that same JID. See XEP-178 for more
  29898. * details.
  29899. */
  29900. connect: function (jid, pass, callback, wait, hold, route, authcid) {
  29901. this.jid = jid;
  29902. /** Variable: authzid
  29903. * Authorization identity.
  29904. */
  29905. this.authzid = Strophe.getBareJidFromJid(this.jid);
  29906. /** Variable: authcid
  29907. * Authentication identity (User name).
  29908. */
  29909. this.authcid = authcid || Strophe.getNodeFromJid(this.jid);
  29910. /** Variable: pass
  29911. * Authentication identity (User password).
  29912. */
  29913. this.pass = pass;
  29914. /** Variable: servtype
  29915. * Digest MD5 compatibility.
  29916. */
  29917. this.servtype = "xmpp";
  29918. this.connect_callback = callback;
  29919. this.disconnecting = false;
  29920. this.connected = false;
  29921. this.authenticated = false;
  29922. this.restored = false;
  29923. // parse jid for domain
  29924. this.domain = Strophe.getDomainFromJid(this.jid);
  29925. this._changeConnectStatus(Strophe.Status.CONNECTING, null);
  29926. this._proto._connect(wait, hold, route);
  29927. },
  29928. /** Function: attach
  29929. * Attach to an already created and authenticated BOSH session.
  29930. *
  29931. * This function is provided to allow Strophe to attach to BOSH
  29932. * sessions which have been created externally, perhaps by a Web
  29933. * application. This is often used to support auto-login type features
  29934. * without putting user credentials into the page.
  29935. *
  29936. * Parameters:
  29937. * (String) jid - The full JID that is bound by the session.
  29938. * (String) sid - The SID of the BOSH session.
  29939. * (String) rid - The current RID of the BOSH session. This RID
  29940. * will be used by the next request.
  29941. * (Function) callback The connect callback function.
  29942. * (Integer) wait - The optional HTTPBIND wait value. This is the
  29943. * time the server will wait before returning an empty result for
  29944. * a request. The default setting of 60 seconds is recommended.
  29945. * Other settings will require tweaks to the Strophe.TIMEOUT value.
  29946. * (Integer) hold - The optional HTTPBIND hold value. This is the
  29947. * number of connections the server will hold at one time. This
  29948. * should almost always be set to 1 (the default).
  29949. * (Integer) wind - The optional HTTBIND window value. This is the
  29950. * allowed range of request ids that are valid. The default is 5.
  29951. */
  29952. attach: function (jid, sid, rid, callback, wait, hold, wind) {
  29953. if (this._proto instanceof Strophe.Bosh) {
  29954. this._proto._attach(jid, sid, rid, callback, wait, hold, wind);
  29955. } else {
  29956. throw {
  29957. name: 'StropheSessionError',
  29958. message: 'The "attach" method can only be used with a BOSH connection.'
  29959. };
  29960. }
  29961. },
  29962. /** Function: restore
  29963. * Attempt to restore a cached BOSH session.
  29964. *
  29965. * This function is only useful in conjunction with providing the
  29966. * "keepalive":true option when instantiating a new Strophe.Connection.
  29967. *
  29968. * When "keepalive" is set to true, Strophe will cache the BOSH tokens
  29969. * RID (Request ID) and SID (Session ID) and then when this function is
  29970. * called, it will attempt to restore the session from those cached
  29971. * tokens.
  29972. *
  29973. * This function must therefore be called instead of connect or attach.
  29974. *
  29975. * For an example on how to use it, please see examples/restore.js
  29976. *
  29977. * Parameters:
  29978. * (String) jid - The user's JID. This may be a bare JID or a full JID.
  29979. * (Function) callback - The connect callback function.
  29980. * (Integer) wait - The optional HTTPBIND wait value. This is the
  29981. * time the server will wait before returning an empty result for
  29982. * a request. The default setting of 60 seconds is recommended.
  29983. * (Integer) hold - The optional HTTPBIND hold value. This is the
  29984. * number of connections the server will hold at one time. This
  29985. * should almost always be set to 1 (the default).
  29986. * (Integer) wind - The optional HTTBIND window value. This is the
  29987. * allowed range of request ids that are valid. The default is 5.
  29988. */
  29989. restore: function (jid, callback, wait, hold, wind) {
  29990. if (this._sessionCachingSupported()) {
  29991. this._proto._restore(jid, callback, wait, hold, wind);
  29992. } else {
  29993. throw {
  29994. name: 'StropheSessionError',
  29995. message: 'The "restore" method can only be used with a BOSH connection.'
  29996. };
  29997. }
  29998. },
  29999. /** PrivateFunction: _sessionCachingSupported
  30000. * Checks whether sessionStorage and JSON are supported and whether we're
  30001. * using BOSH.
  30002. */
  30003. _sessionCachingSupported: function () {
  30004. if (this._proto instanceof Strophe.Bosh) {
  30005. if (!JSON) { return false; }
  30006. try {
  30007. sessionStorage.setItem('_strophe_', '_strophe_');
  30008. sessionStorage.removeItem('_strophe_');
  30009. } catch (e) {
  30010. return false;
  30011. }
  30012. return true;
  30013. }
  30014. return false;
  30015. },
  30016. /** Function: xmlInput
  30017. * User overrideable function that receives XML data coming into the
  30018. * connection.
  30019. *
  30020. * The default function does nothing. User code can override this with
  30021. * > Strophe.Connection.xmlInput = function (elem) {
  30022. * > (user code)
  30023. * > };
  30024. *
  30025. * Due to limitations of current Browsers' XML-Parsers the opening and closing
  30026. * <stream> tag for WebSocket-Connoctions will be passed as selfclosing here.
  30027. *
  30028. * BOSH-Connections will have all stanzas wrapped in a <body> tag. See
  30029. * <Strophe.Bosh.strip> if you want to strip this tag.
  30030. *
  30031. * Parameters:
  30032. * (XMLElement) elem - The XML data received by the connection.
  30033. */
  30034. /* jshint unused:false */
  30035. xmlInput: function (elem) {
  30036. return;
  30037. },
  30038. /* jshint unused:true */
  30039. /** Function: xmlOutput
  30040. * User overrideable function that receives XML data sent to the
  30041. * connection.
  30042. *
  30043. * The default function does nothing. User code can override this with
  30044. * > Strophe.Connection.xmlOutput = function (elem) {
  30045. * > (user code)
  30046. * > };
  30047. *
  30048. * Due to limitations of current Browsers' XML-Parsers the opening and closing
  30049. * <stream> tag for WebSocket-Connoctions will be passed as selfclosing here.
  30050. *
  30051. * BOSH-Connections will have all stanzas wrapped in a <body> tag. See
  30052. * <Strophe.Bosh.strip> if you want to strip this tag.
  30053. *
  30054. * Parameters:
  30055. * (XMLElement) elem - The XMLdata sent by the connection.
  30056. */
  30057. /* jshint unused:false */
  30058. xmlOutput: function (elem) {
  30059. return;
  30060. },
  30061. /* jshint unused:true */
  30062. /** Function: rawInput
  30063. * User overrideable function that receives raw data coming into the
  30064. * connection.
  30065. *
  30066. * The default function does nothing. User code can override this with
  30067. * > Strophe.Connection.rawInput = function (data) {
  30068. * > (user code)
  30069. * > };
  30070. *
  30071. * Parameters:
  30072. * (String) data - The data received by the connection.
  30073. */
  30074. /* jshint unused:false */
  30075. rawInput: function (data) {
  30076. return;
  30077. },
  30078. /* jshint unused:true */
  30079. /** Function: rawOutput
  30080. * User overrideable function that receives raw data sent to the
  30081. * connection.
  30082. *
  30083. * The default function does nothing. User code can override this with
  30084. * > Strophe.Connection.rawOutput = function (data) {
  30085. * > (user code)
  30086. * > };
  30087. *
  30088. * Parameters:
  30089. * (String) data - The data sent by the connection.
  30090. */
  30091. /* jshint unused:false */
  30092. rawOutput: function (data) {
  30093. return;
  30094. },
  30095. /* jshint unused:true */
  30096. /** Function: nextValidRid
  30097. * User overrideable function that receives the new valid rid.
  30098. *
  30099. * The default function does nothing. User code can override this with
  30100. * > Strophe.Connection.nextValidRid = function (rid) {
  30101. * > (user code)
  30102. * > };
  30103. *
  30104. * Parameters:
  30105. * (Number) rid - The next valid rid
  30106. */
  30107. /* jshint unused:false */
  30108. nextValidRid: function (rid) {
  30109. return;
  30110. },
  30111. /* jshint unused:true */
  30112. /** Function: send
  30113. * Send a stanza.
  30114. *
  30115. * This function is called to push data onto the send queue to
  30116. * go out over the wire. Whenever a request is sent to the BOSH
  30117. * server, all pending data is sent and the queue is flushed.
  30118. *
  30119. * Parameters:
  30120. * (XMLElement |
  30121. * [XMLElement] |
  30122. * Strophe.Builder) elem - The stanza to send.
  30123. */
  30124. send: function (elem) {
  30125. if (elem === null) { return ; }
  30126. if (typeof(elem.sort) === "function") {
  30127. for (var i = 0; i < elem.length; i++) {
  30128. this._queueData(elem[i]);
  30129. }
  30130. } else if (typeof(elem.tree) === "function") {
  30131. this._queueData(elem.tree());
  30132. } else {
  30133. this._queueData(elem);
  30134. }
  30135. this._proto._send();
  30136. },
  30137. /** Function: flush
  30138. * Immediately send any pending outgoing data.
  30139. *
  30140. * Normally send() queues outgoing data until the next idle period
  30141. * (100ms), which optimizes network use in the common cases when
  30142. * several send()s are called in succession. flush() can be used to
  30143. * immediately send all pending data.
  30144. */
  30145. flush: function () {
  30146. // cancel the pending idle period and run the idle function
  30147. // immediately
  30148. clearTimeout(this._idleTimeout);
  30149. this._onIdle();
  30150. },
  30151. /** Function: sendPresence
  30152. * Helper function to send presence stanzas. The main benefit is for
  30153. * sending presence stanzas for which you expect a responding presence
  30154. * stanza with the same id (for example when leaving a chat room).
  30155. *
  30156. * Parameters:
  30157. * (XMLElement) elem - The stanza to send.
  30158. * (Function) callback - The callback function for a successful request.
  30159. * (Function) errback - The callback function for a failed or timed
  30160. * out request. On timeout, the stanza will be null.
  30161. * (Integer) timeout - The time specified in milliseconds for a
  30162. * timeout to occur.
  30163. *
  30164. * Returns:
  30165. * The id used to send the presence.
  30166. */
  30167. sendPresence: function(elem, callback, errback, timeout) {
  30168. var timeoutHandler = null;
  30169. var that = this;
  30170. if (typeof(elem.tree) === "function") {
  30171. elem = elem.tree();
  30172. }
  30173. var id = elem.getAttribute('id');
  30174. if (!id) { // inject id if not found
  30175. id = this.getUniqueId("sendPresence");
  30176. elem.setAttribute("id", id);
  30177. }
  30178. if (typeof callback === "function" || typeof errback === "function") {
  30179. var handler = this.addHandler(function (stanza) {
  30180. // remove timeout handler if there is one
  30181. if (timeoutHandler) {
  30182. that.deleteTimedHandler(timeoutHandler);
  30183. }
  30184. var type = stanza.getAttribute('type');
  30185. if (type === 'error') {
  30186. if (errback) {
  30187. errback(stanza);
  30188. }
  30189. } else if (callback) {
  30190. callback(stanza);
  30191. }
  30192. }, null, 'presence', null, id);
  30193. // if timeout specified, set up a timeout handler.
  30194. if (timeout) {
  30195. timeoutHandler = this.addTimedHandler(timeout, function () {
  30196. // get rid of normal handler
  30197. that.deleteHandler(handler);
  30198. // call errback on timeout with null stanza
  30199. if (errback) {
  30200. errback(null);
  30201. }
  30202. return false;
  30203. });
  30204. }
  30205. }
  30206. this.send(elem);
  30207. return id;
  30208. },
  30209. /** Function: sendIQ
  30210. * Helper function to send IQ stanzas.
  30211. *
  30212. * Parameters:
  30213. * (XMLElement) elem - The stanza to send.
  30214. * (Function) callback - The callback function for a successful request.
  30215. * (Function) errback - The callback function for a failed or timed
  30216. * out request. On timeout, the stanza will be null.
  30217. * (Integer) timeout - The time specified in milliseconds for a
  30218. * timeout to occur.
  30219. *
  30220. * Returns:
  30221. * The id used to send the IQ.
  30222. */
  30223. sendIQ: function(elem, callback, errback, timeout) {
  30224. var timeoutHandler = null;
  30225. var that = this;
  30226. if (typeof(elem.tree) === "function") {
  30227. elem = elem.tree();
  30228. }
  30229. var id = elem.getAttribute('id');
  30230. if (!id) { // inject id if not found
  30231. id = this.getUniqueId("sendIQ");
  30232. elem.setAttribute("id", id);
  30233. }
  30234. if (typeof callback === "function" || typeof errback === "function") {
  30235. var handler = this.addHandler(function (stanza) {
  30236. // remove timeout handler if there is one
  30237. if (timeoutHandler) {
  30238. that.deleteTimedHandler(timeoutHandler);
  30239. }
  30240. var iqtype = stanza.getAttribute('type');
  30241. if (iqtype === 'result') {
  30242. if (callback) {
  30243. callback(stanza);
  30244. }
  30245. } else if (iqtype === 'error') {
  30246. if (errback) {
  30247. errback(stanza);
  30248. }
  30249. } else {
  30250. throw {
  30251. name: "StropheError",
  30252. message: "Got bad IQ type of " + iqtype
  30253. };
  30254. }
  30255. }, null, 'iq', ['error', 'result'], id);
  30256. // if timeout specified, set up a timeout handler.
  30257. if (timeout) {
  30258. timeoutHandler = this.addTimedHandler(timeout, function () {
  30259. // get rid of normal handler
  30260. that.deleteHandler(handler);
  30261. // call errback on timeout with null stanza
  30262. if (errback) {
  30263. errback(null);
  30264. }
  30265. return false;
  30266. });
  30267. }
  30268. }
  30269. this.send(elem);
  30270. return id;
  30271. },
  30272. /** PrivateFunction: _queueData
  30273. * Queue outgoing data for later sending. Also ensures that the data
  30274. * is a DOMElement.
  30275. */
  30276. _queueData: function (element) {
  30277. if (element === null ||
  30278. !element.tagName ||
  30279. !element.childNodes) {
  30280. throw {
  30281. name: "StropheError",
  30282. message: "Cannot queue non-DOMElement."
  30283. };
  30284. }
  30285. this._data.push(element);
  30286. },
  30287. /** PrivateFunction: _sendRestart
  30288. * Send an xmpp:restart stanza.
  30289. */
  30290. _sendRestart: function () {
  30291. this._data.push("restart");
  30292. this._proto._sendRestart();
  30293. // XXX: setTimeout should be called only with function expressions (23974bc1)
  30294. this._idleTimeout = setTimeout(function() {
  30295. this._onIdle();
  30296. }.bind(this), 100);
  30297. },
  30298. /** Function: addTimedHandler
  30299. * Add a timed handler to the connection.
  30300. *
  30301. * This function adds a timed handler. The provided handler will
  30302. * be called every period milliseconds until it returns false,
  30303. * the connection is terminated, or the handler is removed. Handlers
  30304. * that wish to continue being invoked should return true.
  30305. *
  30306. * Because of method binding it is necessary to save the result of
  30307. * this function if you wish to remove a handler with
  30308. * deleteTimedHandler().
  30309. *
  30310. * Note that user handlers are not active until authentication is
  30311. * successful.
  30312. *
  30313. * Parameters:
  30314. * (Integer) period - The period of the handler.
  30315. * (Function) handler - The callback function.
  30316. *
  30317. * Returns:
  30318. * A reference to the handler that can be used to remove it.
  30319. */
  30320. addTimedHandler: function (period, handler) {
  30321. var thand = new Strophe.TimedHandler(period, handler);
  30322. this.addTimeds.push(thand);
  30323. return thand;
  30324. },
  30325. /** Function: deleteTimedHandler
  30326. * Delete a timed handler for a connection.
  30327. *
  30328. * This function removes a timed handler from the connection. The
  30329. * handRef parameter is *not* the function passed to addTimedHandler(),
  30330. * but is the reference returned from addTimedHandler().
  30331. *
  30332. * Parameters:
  30333. * (Strophe.TimedHandler) handRef - The handler reference.
  30334. */
  30335. deleteTimedHandler: function (handRef) {
  30336. // this must be done in the Idle loop so that we don't change
  30337. // the handlers during iteration
  30338. this.removeTimeds.push(handRef);
  30339. },
  30340. /** Function: addHandler
  30341. * Add a stanza handler for the connection.
  30342. *
  30343. * This function adds a stanza handler to the connection. The
  30344. * handler callback will be called for any stanza that matches
  30345. * the parameters. Note that if multiple parameters are supplied,
  30346. * they must all match for the handler to be invoked.
  30347. *
  30348. * The handler will receive the stanza that triggered it as its argument.
  30349. * *The handler should return true if it is to be invoked again;
  30350. * returning false will remove the handler after it returns.*
  30351. *
  30352. * As a convenience, the ns parameters applies to the top level element
  30353. * and also any of its immediate children. This is primarily to make
  30354. * matching /iq/query elements easy.
  30355. *
  30356. * Options
  30357. * ~~~~~~~
  30358. * With the options argument, you can specify boolean flags that affect how
  30359. * matches are being done.
  30360. *
  30361. * Currently two flags exist:
  30362. *
  30363. * - matchBareFromJid:
  30364. * When set to true, the from parameter and the
  30365. * from attribute on the stanza will be matched as bare JIDs instead
  30366. * of full JIDs. To use this, pass {matchBareFromJid: true} as the
  30367. * value of options. The default value for matchBareFromJid is false.
  30368. *
  30369. * - ignoreNamespaceFragment:
  30370. * When set to true, a fragment specified on the stanza's namespace
  30371. * URL will be ignored when it's matched with the one configured for
  30372. * the handler.
  30373. *
  30374. * This means that if you register like this:
  30375. * > connection.addHandler(
  30376. * > handler,
  30377. * > 'http://jabber.org/protocol/muc',
  30378. * > null, null, null, null,
  30379. * > {'ignoreNamespaceFragment': true}
  30380. * > );
  30381. *
  30382. * Then a stanza with XML namespace of
  30383. * 'http://jabber.org/protocol/muc#user' will also be matched. If
  30384. * 'ignoreNamespaceFragment' is false, then only stanzas with
  30385. * 'http://jabber.org/protocol/muc' will be matched.
  30386. *
  30387. * Deleting the handler
  30388. * ~~~~~~~~~~~~~~~~~~~~
  30389. * The return value should be saved if you wish to remove the handler
  30390. * with deleteHandler().
  30391. *
  30392. * Parameters:
  30393. * (Function) handler - The user callback.
  30394. * (String) ns - The namespace to match.
  30395. * (String) name - The stanza name to match.
  30396. * (String|Array) type - The stanza type (or types if an array) to match.
  30397. * (String) id - The stanza id attribute to match.
  30398. * (String) from - The stanza from attribute to match.
  30399. * (String) options - The handler options
  30400. *
  30401. * Returns:
  30402. * A reference to the handler that can be used to remove it.
  30403. */
  30404. addHandler: function (handler, ns, name, type, id, from, options) {
  30405. var hand = new Strophe.Handler(handler, ns, name, type, id, from, options);
  30406. this.addHandlers.push(hand);
  30407. return hand;
  30408. },
  30409. /** Function: deleteHandler
  30410. * Delete a stanza handler for a connection.
  30411. *
  30412. * This function removes a stanza handler from the connection. The
  30413. * handRef parameter is *not* the function passed to addHandler(),
  30414. * but is the reference returned from addHandler().
  30415. *
  30416. * Parameters:
  30417. * (Strophe.Handler) handRef - The handler reference.
  30418. */
  30419. deleteHandler: function (handRef) {
  30420. // this must be done in the Idle loop so that we don't change
  30421. // the handlers during iteration
  30422. this.removeHandlers.push(handRef);
  30423. // If a handler is being deleted while it is being added,
  30424. // prevent it from getting added
  30425. var i = this.addHandlers.indexOf(handRef);
  30426. if (i >= 0) {
  30427. this.addHandlers.splice(i, 1);
  30428. }
  30429. },
  30430. /** Function: registerSASLMechanisms
  30431. *
  30432. * Register the SASL mechanisms which will be supported by this instance of
  30433. * Strophe.Connection (i.e. which this XMPP client will support).
  30434. *
  30435. * Parameters:
  30436. * (Array) mechanisms - Array of objects with Strophe.SASLMechanism prototypes
  30437. *
  30438. */
  30439. registerSASLMechanisms: function (mechanisms) {
  30440. this.mechanisms = {};
  30441. mechanisms = mechanisms || [
  30442. Strophe.SASLAnonymous,
  30443. Strophe.SASLExternal,
  30444. Strophe.SASLMD5,
  30445. Strophe.SASLOAuthBearer,
  30446. Strophe.SASLPlain,
  30447. Strophe.SASLSHA1
  30448. ];
  30449. mechanisms.forEach(this.registerSASLMechanism.bind(this));
  30450. },
  30451. /** Function: registerSASLMechanism
  30452. *
  30453. * Register a single SASL mechanism, to be supported by this client.
  30454. *
  30455. * Parameters:
  30456. * (Object) mechanism - Object with a Strophe.SASLMechanism prototype
  30457. *
  30458. */
  30459. registerSASLMechanism: function (mechanism) {
  30460. this.mechanisms[mechanism.prototype.name] = mechanism;
  30461. },
  30462. /** Function: disconnect
  30463. * Start the graceful disconnection process.
  30464. *
  30465. * This function starts the disconnection process. This process starts
  30466. * by sending unavailable presence and sending BOSH body of type
  30467. * terminate. A timeout handler makes sure that disconnection happens
  30468. * even if the BOSH server does not respond.
  30469. * If the Connection object isn't connected, at least tries to abort all pending requests
  30470. * so the connection object won't generate successful requests (which were already opened).
  30471. *
  30472. * The user supplied connection callback will be notified of the
  30473. * progress as this process happens.
  30474. *
  30475. * Parameters:
  30476. * (String) reason - The reason the disconnect is occuring.
  30477. */
  30478. disconnect: function (reason) {
  30479. this._changeConnectStatus(Strophe.Status.DISCONNECTING, reason);
  30480. Strophe.info("Disconnect was called because: " + reason);
  30481. if (this.connected) {
  30482. var pres = false;
  30483. this.disconnecting = true;
  30484. if (this.authenticated) {
  30485. pres = $pres({
  30486. xmlns: Strophe.NS.CLIENT,
  30487. type: 'unavailable'
  30488. });
  30489. }
  30490. // setup timeout handler
  30491. this._disconnectTimeout = this._addSysTimedHandler(
  30492. 3000, this._onDisconnectTimeout.bind(this));
  30493. this._proto._disconnect(pres);
  30494. } else {
  30495. Strophe.info("Disconnect was called before Strophe connected to the server");
  30496. this._proto._abortAllRequests();
  30497. this._doDisconnect();
  30498. }
  30499. },
  30500. /** PrivateFunction: _changeConnectStatus
  30501. * _Private_ helper function that makes sure plugins and the user's
  30502. * callback are notified of connection status changes.
  30503. *
  30504. * Parameters:
  30505. * (Integer) status - the new connection status, one of the values
  30506. * in Strophe.Status
  30507. * (String) condition - the error condition or null
  30508. */
  30509. _changeConnectStatus: function (status, condition) {
  30510. // notify all plugins listening for status changes
  30511. for (var k in Strophe._connectionPlugins) {
  30512. if (Strophe._connectionPlugins.hasOwnProperty(k)) {
  30513. var plugin = this[k];
  30514. if (plugin.statusChanged) {
  30515. try {
  30516. plugin.statusChanged(status, condition);
  30517. } catch (err) {
  30518. Strophe.error("" + k + " plugin caused an exception " +
  30519. "changing status: " + err);
  30520. }
  30521. }
  30522. }
  30523. }
  30524. // notify the user's callback
  30525. if (this.connect_callback) {
  30526. try {
  30527. this.connect_callback(status, condition);
  30528. } catch (e) {
  30529. Strophe._handleError(e);
  30530. Strophe.error(
  30531. "User connection callback caused an "+"exception: "+e);
  30532. }
  30533. }
  30534. },
  30535. /** PrivateFunction: _doDisconnect
  30536. * _Private_ function to disconnect.
  30537. *
  30538. * This is the last piece of the disconnection logic. This resets the
  30539. * connection and alerts the user's connection callback.
  30540. */
  30541. _doDisconnect: function (condition) {
  30542. if (typeof this._idleTimeout === "number") {
  30543. clearTimeout(this._idleTimeout);
  30544. }
  30545. // Cancel Disconnect Timeout
  30546. if (this._disconnectTimeout !== null) {
  30547. this.deleteTimedHandler(this._disconnectTimeout);
  30548. this._disconnectTimeout = null;
  30549. }
  30550. Strophe.info("_doDisconnect was called");
  30551. this._proto._doDisconnect();
  30552. this.authenticated = false;
  30553. this.disconnecting = false;
  30554. this.restored = false;
  30555. // delete handlers
  30556. this.handlers = [];
  30557. this.timedHandlers = [];
  30558. this.removeTimeds = [];
  30559. this.removeHandlers = [];
  30560. this.addTimeds = [];
  30561. this.addHandlers = [];
  30562. // tell the parent we disconnected
  30563. this._changeConnectStatus(Strophe.Status.DISCONNECTED, condition);
  30564. this.connected = false;
  30565. },
  30566. /** PrivateFunction: _dataRecv
  30567. * _Private_ handler to processes incoming data from the the connection.
  30568. *
  30569. * Except for _connect_cb handling the initial connection request,
  30570. * this function handles the incoming data for all requests. This
  30571. * function also fires stanza handlers that match each incoming
  30572. * stanza.
  30573. *
  30574. * Parameters:
  30575. * (Strophe.Request) req - The request that has data ready.
  30576. * (string) req - The stanza a raw string (optiona).
  30577. */
  30578. _dataRecv: function (req, raw) {
  30579. Strophe.info("_dataRecv called");
  30580. var elem = this._proto._reqToData(req);
  30581. if (elem === null) { return; }
  30582. if (this.xmlInput !== Strophe.Connection.prototype.xmlInput) {
  30583. if (elem.nodeName === this._proto.strip && elem.childNodes.length) {
  30584. this.xmlInput(elem.childNodes[0]);
  30585. } else {
  30586. this.xmlInput(elem);
  30587. }
  30588. }
  30589. if (this.rawInput !== Strophe.Connection.prototype.rawInput) {
  30590. if (raw) {
  30591. this.rawInput(raw);
  30592. } else {
  30593. this.rawInput(Strophe.serialize(elem));
  30594. }
  30595. }
  30596. // remove handlers scheduled for deletion
  30597. var i, hand;
  30598. while (this.removeHandlers.length > 0) {
  30599. hand = this.removeHandlers.pop();
  30600. i = this.handlers.indexOf(hand);
  30601. if (i >= 0) {
  30602. this.handlers.splice(i, 1);
  30603. }
  30604. }
  30605. // add handlers scheduled for addition
  30606. while (this.addHandlers.length > 0) {
  30607. this.handlers.push(this.addHandlers.pop());
  30608. }
  30609. // handle graceful disconnect
  30610. if (this.disconnecting && this._proto._emptyQueue()) {
  30611. this._doDisconnect();
  30612. return;
  30613. }
  30614. var type = elem.getAttribute("type");
  30615. var cond, conflict;
  30616. if (type !== null && type === "terminate") {
  30617. // Don't process stanzas that come in after disconnect
  30618. if (this.disconnecting) {
  30619. return;
  30620. }
  30621. // an error occurred
  30622. cond = elem.getAttribute("condition");
  30623. conflict = elem.getElementsByTagName("conflict");
  30624. if (cond !== null) {
  30625. if (cond === "remote-stream-error" && conflict.length > 0) {
  30626. cond = "conflict";
  30627. }
  30628. this._changeConnectStatus(Strophe.Status.CONNFAIL, cond);
  30629. } else {
  30630. this._changeConnectStatus(Strophe.Status.CONNFAIL, "unknown");
  30631. }
  30632. this._doDisconnect(cond);
  30633. return;
  30634. }
  30635. // send each incoming stanza through the handler chain
  30636. var that = this;
  30637. Strophe.forEachChild(elem, null, function (child) {
  30638. var i, newList;
  30639. // process handlers
  30640. newList = that.handlers;
  30641. that.handlers = [];
  30642. for (i = 0; i < newList.length; i++) {
  30643. var hand = newList[i];
  30644. // encapsulate 'handler.run' not to lose the whole handler list if
  30645. // one of the handlers throws an exception
  30646. try {
  30647. if (hand.isMatch(child) &&
  30648. (that.authenticated || !hand.user)) {
  30649. if (hand.run(child)) {
  30650. that.handlers.push(hand);
  30651. }
  30652. } else {
  30653. that.handlers.push(hand);
  30654. }
  30655. } catch(e) {
  30656. // if the handler throws an exception, we consider it as false
  30657. Strophe.warn('Removing Strophe handlers due to uncaught exception: '+e.message);
  30658. }
  30659. }
  30660. });
  30661. },
  30662. /** Attribute: mechanisms
  30663. * SASL Mechanisms available for Connection.
  30664. */
  30665. mechanisms: {},
  30666. /** PrivateFunction: _connect_cb
  30667. * _Private_ handler for initial connection request.
  30668. *
  30669. * This handler is used to process the initial connection request
  30670. * response from the BOSH server. It is used to set up authentication
  30671. * handlers and start the authentication process.
  30672. *
  30673. * SASL authentication will be attempted if available, otherwise
  30674. * the code will fall back to legacy authentication.
  30675. *
  30676. * Parameters:
  30677. * (Strophe.Request) req - The current request.
  30678. * (Function) _callback - low level (xmpp) connect callback function.
  30679. * Useful for plugins with their own xmpp connect callback (when their)
  30680. * want to do something special).
  30681. */
  30682. _connect_cb: function (req, _callback, raw) {
  30683. Strophe.info("_connect_cb was called");
  30684. this.connected = true;
  30685. var bodyWrap;
  30686. try {
  30687. bodyWrap = this._proto._reqToData(req);
  30688. } catch (e) {
  30689. if (e !== "badformat") { throw e; }
  30690. this._changeConnectStatus(Strophe.Status.CONNFAIL, 'bad-format');
  30691. this._doDisconnect('bad-format');
  30692. }
  30693. if (!bodyWrap) { return; }
  30694. if (this.xmlInput !== Strophe.Connection.prototype.xmlInput) {
  30695. if (bodyWrap.nodeName === this._proto.strip && bodyWrap.childNodes.length) {
  30696. this.xmlInput(bodyWrap.childNodes[0]);
  30697. } else {
  30698. this.xmlInput(bodyWrap);
  30699. }
  30700. }
  30701. if (this.rawInput !== Strophe.Connection.prototype.rawInput) {
  30702. if (raw) {
  30703. this.rawInput(raw);
  30704. } else {
  30705. this.rawInput(Strophe.serialize(bodyWrap));
  30706. }
  30707. }
  30708. var conncheck = this._proto._connect_cb(bodyWrap);
  30709. if (conncheck === Strophe.Status.CONNFAIL) {
  30710. return;
  30711. }
  30712. // Check for the stream:features tag
  30713. var hasFeatures;
  30714. if (bodyWrap.getElementsByTagNameNS) {
  30715. hasFeatures = bodyWrap.getElementsByTagNameNS(Strophe.NS.STREAM, "features").length > 0;
  30716. } else {
  30717. hasFeatures = bodyWrap.getElementsByTagName("stream:features").length > 0 ||
  30718. bodyWrap.getElementsByTagName("features").length > 0;
  30719. }
  30720. if (!hasFeatures) {
  30721. this._proto._no_auth_received(_callback);
  30722. return;
  30723. }
  30724. var matched = [], i, mech;
  30725. var mechanisms = bodyWrap.getElementsByTagName("mechanism");
  30726. if (mechanisms.length > 0) {
  30727. for (i = 0; i < mechanisms.length; i++) {
  30728. mech = Strophe.getText(mechanisms[i]);
  30729. if (this.mechanisms[mech]) matched.push(this.mechanisms[mech]);
  30730. }
  30731. }
  30732. if (matched.length === 0) {
  30733. if (bodyWrap.getElementsByTagName("auth").length === 0) {
  30734. // There are no matching SASL mechanisms and also no legacy
  30735. // auth available.
  30736. this._proto._no_auth_received(_callback);
  30737. return;
  30738. }
  30739. }
  30740. if (this.do_authentication !== false) {
  30741. this.authenticate(matched);
  30742. }
  30743. },
  30744. /** Function: sortMechanismsByPriority
  30745. *
  30746. * Sorts an array of objects with prototype SASLMechanism according to
  30747. * their priorities.
  30748. *
  30749. * Parameters:
  30750. * (Array) mechanisms - Array of SASL mechanisms.
  30751. *
  30752. */
  30753. sortMechanismsByPriority: function (mechanisms) {
  30754. // Sorting mechanisms according to priority.
  30755. var i, j, higher, swap;
  30756. for (i = 0; i < mechanisms.length - 1; ++i) {
  30757. higher = i;
  30758. for (j = i + 1; j < mechanisms.length; ++j) {
  30759. if (mechanisms[j].prototype.priority > mechanisms[higher].prototype.priority) {
  30760. higher = j;
  30761. }
  30762. }
  30763. if (higher !== i) {
  30764. swap = mechanisms[i];
  30765. mechanisms[i] = mechanisms[higher];
  30766. mechanisms[higher] = swap;
  30767. }
  30768. }
  30769. return mechanisms;
  30770. },
  30771. /** PrivateFunction: _attemptSASLAuth
  30772. *
  30773. * Iterate through an array of SASL mechanisms and attempt authentication
  30774. * with the highest priority (enabled) mechanism.
  30775. *
  30776. * Parameters:
  30777. * (Array) mechanisms - Array of SASL mechanisms.
  30778. *
  30779. * Returns:
  30780. * (Boolean) mechanism_found - true or false, depending on whether a
  30781. * valid SASL mechanism was found with which authentication could be
  30782. * started.
  30783. */
  30784. _attemptSASLAuth: function (mechanisms) {
  30785. mechanisms = this.sortMechanismsByPriority(mechanisms || []);
  30786. var i = 0, mechanism_found = false;
  30787. for (i = 0; i < mechanisms.length; ++i) {
  30788. if (!mechanisms[i].prototype.test(this)) {
  30789. continue;
  30790. }
  30791. this._sasl_success_handler = this._addSysHandler(
  30792. this._sasl_success_cb.bind(this), null,
  30793. "success", null, null);
  30794. this._sasl_failure_handler = this._addSysHandler(
  30795. this._sasl_failure_cb.bind(this), null,
  30796. "failure", null, null);
  30797. this._sasl_challenge_handler = this._addSysHandler(
  30798. this._sasl_challenge_cb.bind(this), null,
  30799. "challenge", null, null);
  30800. this._sasl_mechanism = new mechanisms[i]();
  30801. this._sasl_mechanism.onStart(this);
  30802. var request_auth_exchange = $build("auth", {
  30803. xmlns: Strophe.NS.SASL,
  30804. mechanism: this._sasl_mechanism.name
  30805. });
  30806. if (this._sasl_mechanism.isClientFirst) {
  30807. var response = this._sasl_mechanism.onChallenge(this, null);
  30808. request_auth_exchange.t(btoa(response));
  30809. }
  30810. this.send(request_auth_exchange.tree());
  30811. mechanism_found = true;
  30812. break;
  30813. }
  30814. return mechanism_found;
  30815. },
  30816. /** PrivateFunction: _attemptLegacyAuth
  30817. *
  30818. * Attempt legacy (i.e. non-SASL) authentication.
  30819. *
  30820. */
  30821. _attemptLegacyAuth: function () {
  30822. if (Strophe.getNodeFromJid(this.jid) === null) {
  30823. // we don't have a node, which is required for non-anonymous
  30824. // client connections
  30825. this._changeConnectStatus(
  30826. Strophe.Status.CONNFAIL,
  30827. 'x-strophe-bad-non-anon-jid'
  30828. );
  30829. this.disconnect('x-strophe-bad-non-anon-jid');
  30830. } else {
  30831. // Fall back to legacy authentication
  30832. this._changeConnectStatus(Strophe.Status.AUTHENTICATING, null);
  30833. this._addSysHandler(
  30834. this._auth1_cb.bind(this),
  30835. null, null, null, "_auth_1"
  30836. );
  30837. this.send($iq({
  30838. 'type': "get",
  30839. 'to': this.domain,
  30840. 'id': "_auth_1"
  30841. }).c("query", {xmlns: Strophe.NS.AUTH})
  30842. .c("username", {}).t(Strophe.getNodeFromJid(this.jid))
  30843. .tree());
  30844. }
  30845. },
  30846. /** Function: authenticate
  30847. * Set up authentication
  30848. *
  30849. * Continues the initial connection request by setting up authentication
  30850. * handlers and starting the authentication process.
  30851. *
  30852. * SASL authentication will be attempted if available, otherwise
  30853. * the code will fall back to legacy authentication.
  30854. *
  30855. * Parameters:
  30856. * (Array) matched - Array of SASL mechanisms supported.
  30857. *
  30858. */
  30859. authenticate: function (matched) {
  30860. if (!this._attemptSASLAuth(matched)) {
  30861. this._attemptLegacyAuth();
  30862. }
  30863. },
  30864. /** PrivateFunction: _sasl_challenge_cb
  30865. * _Private_ handler for the SASL challenge
  30866. *
  30867. */
  30868. _sasl_challenge_cb: function(elem) {
  30869. var challenge = atob(Strophe.getText(elem));
  30870. var response = this._sasl_mechanism.onChallenge(this, challenge);
  30871. var stanza = $build('response', {
  30872. 'xmlns': Strophe.NS.SASL
  30873. });
  30874. if (response !== "") {
  30875. stanza.t(btoa(response));
  30876. }
  30877. this.send(stanza.tree());
  30878. return true;
  30879. },
  30880. /** PrivateFunction: _auth1_cb
  30881. * _Private_ handler for legacy authentication.
  30882. *
  30883. * This handler is called in response to the initial <iq type='get'/>
  30884. * for legacy authentication. It builds an authentication <iq/> and
  30885. * sends it, creating a handler (calling back to _auth2_cb()) to
  30886. * handle the result
  30887. *
  30888. * Parameters:
  30889. * (XMLElement) elem - The stanza that triggered the callback.
  30890. *
  30891. * Returns:
  30892. * false to remove the handler.
  30893. */
  30894. /* jshint unused:false */
  30895. _auth1_cb: function (elem) {
  30896. // build plaintext auth iq
  30897. var iq = $iq({type: "set", id: "_auth_2"})
  30898. .c('query', {xmlns: Strophe.NS.AUTH})
  30899. .c('username', {}).t(Strophe.getNodeFromJid(this.jid))
  30900. .up()
  30901. .c('password').t(this.pass);
  30902. if (!Strophe.getResourceFromJid(this.jid)) {
  30903. // since the user has not supplied a resource, we pick
  30904. // a default one here. unlike other auth methods, the server
  30905. // cannot do this for us.
  30906. this.jid = Strophe.getBareJidFromJid(this.jid) + '/strophe';
  30907. }
  30908. iq.up().c('resource', {}).t(Strophe.getResourceFromJid(this.jid));
  30909. this._addSysHandler(this._auth2_cb.bind(this), null,
  30910. null, null, "_auth_2");
  30911. this.send(iq.tree());
  30912. return false;
  30913. },
  30914. /* jshint unused:true */
  30915. /** PrivateFunction: _sasl_success_cb
  30916. * _Private_ handler for succesful SASL authentication.
  30917. *
  30918. * Parameters:
  30919. * (XMLElement) elem - The matching stanza.
  30920. *
  30921. * Returns:
  30922. * false to remove the handler.
  30923. */
  30924. _sasl_success_cb: function (elem) {
  30925. if (this._sasl_data["server-signature"]) {
  30926. var serverSignature;
  30927. var success = atob(Strophe.getText(elem));
  30928. var attribMatch = /([a-z]+)=([^,]+)(,|$)/;
  30929. var matches = success.match(attribMatch);
  30930. if (matches[1] === "v") {
  30931. serverSignature = matches[2];
  30932. }
  30933. if (serverSignature !== this._sasl_data["server-signature"]) {
  30934. // remove old handlers
  30935. this.deleteHandler(this._sasl_failure_handler);
  30936. this._sasl_failure_handler = null;
  30937. if (this._sasl_challenge_handler) {
  30938. this.deleteHandler(this._sasl_challenge_handler);
  30939. this._sasl_challenge_handler = null;
  30940. }
  30941. this._sasl_data = {};
  30942. return this._sasl_failure_cb(null);
  30943. }
  30944. }
  30945. Strophe.info("SASL authentication succeeded.");
  30946. if (this._sasl_mechanism) {
  30947. this._sasl_mechanism.onSuccess();
  30948. }
  30949. // remove old handlers
  30950. this.deleteHandler(this._sasl_failure_handler);
  30951. this._sasl_failure_handler = null;
  30952. if (this._sasl_challenge_handler) {
  30953. this.deleteHandler(this._sasl_challenge_handler);
  30954. this._sasl_challenge_handler = null;
  30955. }
  30956. var streamfeature_handlers = [];
  30957. var wrapper = function(handlers, elem) {
  30958. while (handlers.length) {
  30959. this.deleteHandler(handlers.pop());
  30960. }
  30961. this._sasl_auth1_cb.bind(this)(elem);
  30962. return false;
  30963. };
  30964. streamfeature_handlers.push(this._addSysHandler(function(elem) {
  30965. wrapper.bind(this)(streamfeature_handlers, elem);
  30966. }.bind(this), null, "stream:features", null, null));
  30967. streamfeature_handlers.push(this._addSysHandler(function(elem) {
  30968. wrapper.bind(this)(streamfeature_handlers, elem);
  30969. }.bind(this), Strophe.NS.STREAM, "features", null, null));
  30970. // we must send an xmpp:restart now
  30971. this._sendRestart();
  30972. return false;
  30973. },
  30974. /** PrivateFunction: _sasl_auth1_cb
  30975. * _Private_ handler to start stream binding.
  30976. *
  30977. * Parameters:
  30978. * (XMLElement) elem - The matching stanza.
  30979. *
  30980. * Returns:
  30981. * false to remove the handler.
  30982. */
  30983. _sasl_auth1_cb: function (elem) {
  30984. // save stream:features for future usage
  30985. this.features = elem;
  30986. var i, child;
  30987. for (i = 0; i < elem.childNodes.length; i++) {
  30988. child = elem.childNodes[i];
  30989. if (child.nodeName === 'bind') {
  30990. this.do_bind = true;
  30991. }
  30992. if (child.nodeName === 'session') {
  30993. this.do_session = true;
  30994. }
  30995. }
  30996. if (!this.do_bind) {
  30997. this._changeConnectStatus(Strophe.Status.AUTHFAIL, null);
  30998. return false;
  30999. } else {
  31000. this._addSysHandler(this._sasl_bind_cb.bind(this), null, null,
  31001. null, "_bind_auth_2");
  31002. var resource = Strophe.getResourceFromJid(this.jid);
  31003. if (resource) {
  31004. this.send($iq({type: "set", id: "_bind_auth_2"})
  31005. .c('bind', {xmlns: Strophe.NS.BIND})
  31006. .c('resource', {}).t(resource).tree());
  31007. } else {
  31008. this.send($iq({type: "set", id: "_bind_auth_2"})
  31009. .c('bind', {xmlns: Strophe.NS.BIND})
  31010. .tree());
  31011. }
  31012. }
  31013. return false;
  31014. },
  31015. /** PrivateFunction: _sasl_bind_cb
  31016. * _Private_ handler for binding result and session start.
  31017. *
  31018. * Parameters:
  31019. * (XMLElement) elem - The matching stanza.
  31020. *
  31021. * Returns:
  31022. * false to remove the handler.
  31023. */
  31024. _sasl_bind_cb: function (elem) {
  31025. if (elem.getAttribute("type") === "error") {
  31026. Strophe.info("SASL binding failed.");
  31027. var conflict = elem.getElementsByTagName("conflict"), condition;
  31028. if (conflict.length > 0) {
  31029. condition = 'conflict';
  31030. }
  31031. this._changeConnectStatus(Strophe.Status.AUTHFAIL, condition);
  31032. return false;
  31033. }
  31034. // TODO - need to grab errors
  31035. var bind = elem.getElementsByTagName("bind");
  31036. var jidNode;
  31037. if (bind.length > 0) {
  31038. // Grab jid
  31039. jidNode = bind[0].getElementsByTagName("jid");
  31040. if (jidNode.length > 0) {
  31041. this.jid = Strophe.getText(jidNode[0]);
  31042. if (this.do_session) {
  31043. this._addSysHandler(this._sasl_session_cb.bind(this),
  31044. null, null, null, "_session_auth_2");
  31045. this.send($iq({type: "set", id: "_session_auth_2"})
  31046. .c('session', {xmlns: Strophe.NS.SESSION})
  31047. .tree());
  31048. } else {
  31049. this.authenticated = true;
  31050. this._changeConnectStatus(Strophe.Status.CONNECTED, null);
  31051. }
  31052. }
  31053. } else {
  31054. Strophe.info("SASL binding failed.");
  31055. this._changeConnectStatus(Strophe.Status.AUTHFAIL, null);
  31056. return false;
  31057. }
  31058. },
  31059. /** PrivateFunction: _sasl_session_cb
  31060. * _Private_ handler to finish successful SASL connection.
  31061. *
  31062. * This sets Connection.authenticated to true on success, which
  31063. * starts the processing of user handlers.
  31064. *
  31065. * Parameters:
  31066. * (XMLElement) elem - The matching stanza.
  31067. *
  31068. * Returns:
  31069. * false to remove the handler.
  31070. */
  31071. _sasl_session_cb: function (elem) {
  31072. if (elem.getAttribute("type") === "result") {
  31073. this.authenticated = true;
  31074. this._changeConnectStatus(Strophe.Status.CONNECTED, null);
  31075. } else if (elem.getAttribute("type") === "error") {
  31076. Strophe.info("Session creation failed.");
  31077. this._changeConnectStatus(Strophe.Status.AUTHFAIL, null);
  31078. return false;
  31079. }
  31080. return false;
  31081. },
  31082. /** PrivateFunction: _sasl_failure_cb
  31083. * _Private_ handler for SASL authentication failure.
  31084. *
  31085. * Parameters:
  31086. * (XMLElement) elem - The matching stanza.
  31087. *
  31088. * Returns:
  31089. * false to remove the handler.
  31090. */
  31091. /* jshint unused:false */
  31092. _sasl_failure_cb: function (elem) {
  31093. // delete unneeded handlers
  31094. if (this._sasl_success_handler) {
  31095. this.deleteHandler(this._sasl_success_handler);
  31096. this._sasl_success_handler = null;
  31097. }
  31098. if (this._sasl_challenge_handler) {
  31099. this.deleteHandler(this._sasl_challenge_handler);
  31100. this._sasl_challenge_handler = null;
  31101. }
  31102. if(this._sasl_mechanism)
  31103. this._sasl_mechanism.onFailure();
  31104. this._changeConnectStatus(Strophe.Status.AUTHFAIL, null);
  31105. return false;
  31106. },
  31107. /* jshint unused:true */
  31108. /** PrivateFunction: _auth2_cb
  31109. * _Private_ handler to finish legacy authentication.
  31110. *
  31111. * This handler is called when the result from the jabber:iq:auth
  31112. * <iq/> stanza is returned.
  31113. *
  31114. * Parameters:
  31115. * (XMLElement) elem - The stanza that triggered the callback.
  31116. *
  31117. * Returns:
  31118. * false to remove the handler.
  31119. */
  31120. _auth2_cb: function (elem) {
  31121. if (elem.getAttribute("type") === "result") {
  31122. this.authenticated = true;
  31123. this._changeConnectStatus(Strophe.Status.CONNECTED, null);
  31124. } else if (elem.getAttribute("type") === "error") {
  31125. this._changeConnectStatus(Strophe.Status.AUTHFAIL, null);
  31126. this.disconnect('authentication failed');
  31127. }
  31128. return false;
  31129. },
  31130. /** PrivateFunction: _addSysTimedHandler
  31131. * _Private_ function to add a system level timed handler.
  31132. *
  31133. * This function is used to add a Strophe.TimedHandler for the
  31134. * library code. System timed handlers are allowed to run before
  31135. * authentication is complete.
  31136. *
  31137. * Parameters:
  31138. * (Integer) period - The period of the handler.
  31139. * (Function) handler - The callback function.
  31140. */
  31141. _addSysTimedHandler: function (period, handler) {
  31142. var thand = new Strophe.TimedHandler(period, handler);
  31143. thand.user = false;
  31144. this.addTimeds.push(thand);
  31145. return thand;
  31146. },
  31147. /** PrivateFunction: _addSysHandler
  31148. * _Private_ function to add a system level stanza handler.
  31149. *
  31150. * This function is used to add a Strophe.Handler for the
  31151. * library code. System stanza handlers are allowed to run before
  31152. * authentication is complete.
  31153. *
  31154. * Parameters:
  31155. * (Function) handler - The callback function.
  31156. * (String) ns - The namespace to match.
  31157. * (String) name - The stanza name to match.
  31158. * (String) type - The stanza type attribute to match.
  31159. * (String) id - The stanza id attribute to match.
  31160. */
  31161. _addSysHandler: function (handler, ns, name, type, id) {
  31162. var hand = new Strophe.Handler(handler, ns, name, type, id);
  31163. hand.user = false;
  31164. this.addHandlers.push(hand);
  31165. return hand;
  31166. },
  31167. /** PrivateFunction: _onDisconnectTimeout
  31168. * _Private_ timeout handler for handling non-graceful disconnection.
  31169. *
  31170. * If the graceful disconnect process does not complete within the
  31171. * time allotted, this handler finishes the disconnect anyway.
  31172. *
  31173. * Returns:
  31174. * false to remove the handler.
  31175. */
  31176. _onDisconnectTimeout: function () {
  31177. Strophe.info("_onDisconnectTimeout was called");
  31178. this._changeConnectStatus(Strophe.Status.CONNTIMEOUT, null);
  31179. this._proto._onDisconnectTimeout();
  31180. // actually disconnect
  31181. this._doDisconnect();
  31182. return false;
  31183. },
  31184. /** PrivateFunction: _onIdle
  31185. * _Private_ handler to process events during idle cycle.
  31186. *
  31187. * This handler is called every 100ms to fire timed handlers that
  31188. * are ready and keep poll requests going.
  31189. */
  31190. _onIdle: function () {
  31191. var i, thand, since, newList;
  31192. // add timed handlers scheduled for addition
  31193. // NOTE: we add before remove in the case a timed handler is
  31194. // added and then deleted before the next _onIdle() call.
  31195. while (this.addTimeds.length > 0) {
  31196. this.timedHandlers.push(this.addTimeds.pop());
  31197. }
  31198. // remove timed handlers that have been scheduled for deletion
  31199. while (this.removeTimeds.length > 0) {
  31200. thand = this.removeTimeds.pop();
  31201. i = this.timedHandlers.indexOf(thand);
  31202. if (i >= 0) {
  31203. this.timedHandlers.splice(i, 1);
  31204. }
  31205. }
  31206. // call ready timed handlers
  31207. var now = new Date().getTime();
  31208. newList = [];
  31209. for (i = 0; i < this.timedHandlers.length; i++) {
  31210. thand = this.timedHandlers[i];
  31211. if (this.authenticated || !thand.user) {
  31212. since = thand.lastCalled + thand.period;
  31213. if (since - now <= 0) {
  31214. if (thand.run()) {
  31215. newList.push(thand);
  31216. }
  31217. } else {
  31218. newList.push(thand);
  31219. }
  31220. }
  31221. }
  31222. this.timedHandlers = newList;
  31223. clearTimeout(this._idleTimeout);
  31224. this._proto._onIdle();
  31225. // reactivate the timer only if connected
  31226. if (this.connected) {
  31227. // XXX: setTimeout should be called only with function expressions (23974bc1)
  31228. this._idleTimeout = setTimeout(function() {
  31229. this._onIdle();
  31230. }.bind(this), 100);
  31231. }
  31232. }
  31233. };
  31234. /** Class: Strophe.SASLMechanism
  31235. *
  31236. * encapsulates SASL authentication mechanisms.
  31237. *
  31238. * User code may override the priority for each mechanism or disable it completely.
  31239. * See <priority> for information about changing priority and <test> for informatian on
  31240. * how to disable a mechanism.
  31241. *
  31242. * By default, all mechanisms are enabled and the priorities are
  31243. *
  31244. * OAUTHBEARER - 60
  31245. * SCRAM-SHA1 - 50
  31246. * DIGEST-MD5 - 40
  31247. * PLAIN - 30
  31248. * ANONYMOUS - 20
  31249. * EXTERNAL - 10
  31250. *
  31251. * See: Strophe.Connection.addSupportedSASLMechanisms
  31252. */
  31253. /**
  31254. * PrivateConstructor: Strophe.SASLMechanism
  31255. * SASL auth mechanism abstraction.
  31256. *
  31257. * Parameters:
  31258. * (String) name - SASL Mechanism name.
  31259. * (Boolean) isClientFirst - If client should send response first without challenge.
  31260. * (Number) priority - Priority.
  31261. *
  31262. * Returns:
  31263. * A new Strophe.SASLMechanism object.
  31264. */
  31265. Strophe.SASLMechanism = function(name, isClientFirst, priority) {
  31266. /** PrivateVariable: name
  31267. * Mechanism name.
  31268. */
  31269. this.name = name;
  31270. /** PrivateVariable: isClientFirst
  31271. * If client sends response without initial server challenge.
  31272. */
  31273. this.isClientFirst = isClientFirst;
  31274. /** Variable: priority
  31275. * Determines which <SASLMechanism> is chosen for authentication (Higher is better).
  31276. * Users may override this to prioritize mechanisms differently.
  31277. *
  31278. * In the default configuration the priorities are
  31279. *
  31280. * SCRAM-SHA1 - 40
  31281. * DIGEST-MD5 - 30
  31282. * Plain - 20
  31283. *
  31284. * Example: (This will cause Strophe to choose the mechanism that the server sent first)
  31285. *
  31286. * > Strophe.SASLMD5.priority = Strophe.SASLSHA1.priority;
  31287. *
  31288. * See <SASL mechanisms> for a list of available mechanisms.
  31289. *
  31290. */
  31291. this.priority = priority;
  31292. };
  31293. Strophe.SASLMechanism.prototype = {
  31294. /**
  31295. * Function: test
  31296. * Checks if mechanism able to run.
  31297. * To disable a mechanism, make this return false;
  31298. *
  31299. * To disable plain authentication run
  31300. * > Strophe.SASLPlain.test = function() {
  31301. * > return false;
  31302. * > }
  31303. *
  31304. * See <SASL mechanisms> for a list of available mechanisms.
  31305. *
  31306. * Parameters:
  31307. * (Strophe.Connection) connection - Target Connection.
  31308. *
  31309. * Returns:
  31310. * (Boolean) If mechanism was able to run.
  31311. */
  31312. /* jshint unused:false */
  31313. test: function(connection) {
  31314. return true;
  31315. },
  31316. /* jshint unused:true */
  31317. /** PrivateFunction: onStart
  31318. * Called before starting mechanism on some connection.
  31319. *
  31320. * Parameters:
  31321. * (Strophe.Connection) connection - Target Connection.
  31322. */
  31323. onStart: function(connection) {
  31324. this._connection = connection;
  31325. },
  31326. /** PrivateFunction: onChallenge
  31327. * Called by protocol implementation on incoming challenge. If client is
  31328. * first (isClientFirst === true) challenge will be null on the first call.
  31329. *
  31330. * Parameters:
  31331. * (Strophe.Connection) connection - Target Connection.
  31332. * (String) challenge - current challenge to handle.
  31333. *
  31334. * Returns:
  31335. * (String) Mechanism response.
  31336. */
  31337. /* jshint unused:false */
  31338. onChallenge: function(connection, challenge) {
  31339. throw new Error("You should implement challenge handling!");
  31340. },
  31341. /* jshint unused:true */
  31342. /** PrivateFunction: onFailure
  31343. * Protocol informs mechanism implementation about SASL failure.
  31344. */
  31345. onFailure: function() {
  31346. this._connection = null;
  31347. },
  31348. /** PrivateFunction: onSuccess
  31349. * Protocol informs mechanism implementation about SASL success.
  31350. */
  31351. onSuccess: function() {
  31352. this._connection = null;
  31353. }
  31354. };
  31355. /** Constants: SASL mechanisms
  31356. * Available authentication mechanisms
  31357. *
  31358. * Strophe.SASLAnonymous - SASL ANONYMOUS authentication.
  31359. * Strophe.SASLPlain - SASL PLAIN authentication.
  31360. * Strophe.SASLMD5 - SASL DIGEST-MD5 authentication
  31361. * Strophe.SASLSHA1 - SASL SCRAM-SHA1 authentication
  31362. * Strophe.SASLOAuthBearer - SASL OAuth Bearer authentication
  31363. * Strophe.SASLExternal - SASL EXTERNAL authentication
  31364. */
  31365. // Building SASL callbacks
  31366. /** PrivateConstructor: SASLAnonymous
  31367. * SASL ANONYMOUS authentication.
  31368. */
  31369. Strophe.SASLAnonymous = function() {};
  31370. Strophe.SASLAnonymous.prototype = new Strophe.SASLMechanism("ANONYMOUS", false, 20);
  31371. Strophe.SASLAnonymous.prototype.test = function(connection) {
  31372. return connection.authcid === null;
  31373. };
  31374. /** PrivateConstructor: SASLPlain
  31375. * SASL PLAIN authentication.
  31376. */
  31377. Strophe.SASLPlain = function() {};
  31378. Strophe.SASLPlain.prototype = new Strophe.SASLMechanism("PLAIN", true, 30);
  31379. Strophe.SASLPlain.prototype.test = function(connection) {
  31380. return connection.authcid !== null;
  31381. };
  31382. Strophe.SASLPlain.prototype.onChallenge = function(connection) {
  31383. var auth_str = connection.authzid;
  31384. auth_str = auth_str + "\u0000";
  31385. auth_str = auth_str + connection.authcid;
  31386. auth_str = auth_str + "\u0000";
  31387. auth_str = auth_str + connection.pass;
  31388. return utils.utf16to8(auth_str);
  31389. };
  31390. /** PrivateConstructor: SASLSHA1
  31391. * SASL SCRAM SHA 1 authentication.
  31392. */
  31393. Strophe.SASLSHA1 = function() {};
  31394. Strophe.SASLSHA1.prototype = new Strophe.SASLMechanism("SCRAM-SHA-1", true, 50);
  31395. Strophe.SASLSHA1.prototype.test = function(connection) {
  31396. return connection.authcid !== null;
  31397. };
  31398. Strophe.SASLSHA1.prototype.onChallenge = function(connection, challenge, test_cnonce) {
  31399. var cnonce = test_cnonce || MD5.hexdigest(Math.random() * 1234567890);
  31400. var auth_str = "n=" + utils.utf16to8(connection.authcid);
  31401. auth_str += ",r=";
  31402. auth_str += cnonce;
  31403. connection._sasl_data.cnonce = cnonce;
  31404. connection._sasl_data["client-first-message-bare"] = auth_str;
  31405. auth_str = "n,," + auth_str;
  31406. this.onChallenge = function (connection, challenge) {
  31407. var nonce, salt, iter, Hi, U, U_old, i, k, pass;
  31408. var clientKey, serverKey, clientSignature;
  31409. var responseText = "c=biws,";
  31410. var authMessage = connection._sasl_data["client-first-message-bare"] + "," +
  31411. challenge + ",";
  31412. var cnonce = connection._sasl_data.cnonce;
  31413. var attribMatch = /([a-z]+)=([^,]+)(,|$)/;
  31414. while (challenge.match(attribMatch)) {
  31415. var matches = challenge.match(attribMatch);
  31416. challenge = challenge.replace(matches[0], "");
  31417. switch (matches[1]) {
  31418. case "r":
  31419. nonce = matches[2];
  31420. break;
  31421. case "s":
  31422. salt = matches[2];
  31423. break;
  31424. case "i":
  31425. iter = matches[2];
  31426. break;
  31427. }
  31428. }
  31429. if (nonce.substr(0, cnonce.length) !== cnonce) {
  31430. connection._sasl_data = {};
  31431. return connection._sasl_failure_cb();
  31432. }
  31433. responseText += "r=" + nonce;
  31434. authMessage += responseText;
  31435. salt = atob(salt);
  31436. salt += "\x00\x00\x00\x01";
  31437. pass = utils.utf16to8(connection.pass);
  31438. Hi = U_old = SHA1.core_hmac_sha1(pass, salt);
  31439. for (i = 1; i < iter; i++) {
  31440. U = SHA1.core_hmac_sha1(pass, SHA1.binb2str(U_old));
  31441. for (k = 0; k < 5; k++) {
  31442. Hi[k] ^= U[k];
  31443. }
  31444. U_old = U;
  31445. }
  31446. Hi = SHA1.binb2str(Hi);
  31447. clientKey = SHA1.core_hmac_sha1(Hi, "Client Key");
  31448. serverKey = SHA1.str_hmac_sha1(Hi, "Server Key");
  31449. clientSignature = SHA1.core_hmac_sha1(SHA1.str_sha1(SHA1.binb2str(clientKey)), authMessage);
  31450. connection._sasl_data["server-signature"] = SHA1.b64_hmac_sha1(serverKey, authMessage);
  31451. for (k = 0; k < 5; k++) {
  31452. clientKey[k] ^= clientSignature[k];
  31453. }
  31454. responseText += ",p=" + btoa(SHA1.binb2str(clientKey));
  31455. return responseText;
  31456. }.bind(this);
  31457. return auth_str;
  31458. };
  31459. /** PrivateConstructor: SASLMD5
  31460. * SASL DIGEST MD5 authentication.
  31461. */
  31462. Strophe.SASLMD5 = function() {};
  31463. Strophe.SASLMD5.prototype = new Strophe.SASLMechanism("DIGEST-MD5", false, 40);
  31464. Strophe.SASLMD5.prototype.test = function(connection) {
  31465. return connection.authcid !== null;
  31466. };
  31467. /** PrivateFunction: _quote
  31468. * _Private_ utility function to backslash escape and quote strings.
  31469. *
  31470. * Parameters:
  31471. * (String) str - The string to be quoted.
  31472. *
  31473. * Returns:
  31474. * quoted string
  31475. */
  31476. Strophe.SASLMD5.prototype._quote = function (str) {
  31477. return '"' + str.replace(/\\/g, "\\\\").replace(/"/g, '\\"') + '"';
  31478. //" end string workaround for emacs
  31479. };
  31480. Strophe.SASLMD5.prototype.onChallenge = function(connection, challenge, test_cnonce) {
  31481. var attribMatch = /([a-z]+)=("[^"]+"|[^,"]+)(?:,|$)/;
  31482. var cnonce = test_cnonce || MD5.hexdigest("" + (Math.random() * 1234567890));
  31483. var realm = "";
  31484. var host = null;
  31485. var nonce = "";
  31486. var qop = "";
  31487. var matches;
  31488. while (challenge.match(attribMatch)) {
  31489. matches = challenge.match(attribMatch);
  31490. challenge = challenge.replace(matches[0], "");
  31491. matches[2] = matches[2].replace(/^"(.+)"$/, "$1");
  31492. switch (matches[1]) {
  31493. case "realm":
  31494. realm = matches[2];
  31495. break;
  31496. case "nonce":
  31497. nonce = matches[2];
  31498. break;
  31499. case "qop":
  31500. qop = matches[2];
  31501. break;
  31502. case "host":
  31503. host = matches[2];
  31504. break;
  31505. }
  31506. }
  31507. var digest_uri = connection.servtype + "/" + connection.domain;
  31508. if (host !== null) {
  31509. digest_uri = digest_uri + "/" + host;
  31510. }
  31511. var cred = utils.utf16to8(connection.authcid + ":" + realm + ":" + this._connection.pass);
  31512. var A1 = MD5.hash(cred) + ":" + nonce + ":" + cnonce;
  31513. var A2 = 'AUTHENTICATE:' + digest_uri;
  31514. var responseText = "";
  31515. responseText += 'charset=utf-8,';
  31516. responseText += 'username=' + this._quote(utils.utf16to8(connection.authcid)) + ',';
  31517. responseText += 'realm=' + this._quote(realm) + ',';
  31518. responseText += 'nonce=' + this._quote(nonce) + ',';
  31519. responseText += 'nc=00000001,';
  31520. responseText += 'cnonce=' + this._quote(cnonce) + ',';
  31521. responseText += 'digest-uri=' + this._quote(digest_uri) + ',';
  31522. responseText += 'response=' + MD5.hexdigest(MD5.hexdigest(A1) + ":" +
  31523. nonce + ":00000001:" +
  31524. cnonce + ":auth:" +
  31525. MD5.hexdigest(A2)) + ",";
  31526. responseText += 'qop=auth';
  31527. this.onChallenge = function () {
  31528. return "";
  31529. };
  31530. return responseText;
  31531. };
  31532. /** PrivateConstructor: SASLOAuthBearer
  31533. * SASL OAuth Bearer authentication.
  31534. */
  31535. Strophe.SASLOAuthBearer = function() {};
  31536. Strophe.SASLOAuthBearer.prototype = new Strophe.SASLMechanism("OAUTHBEARER", true, 60);
  31537. Strophe.SASLOAuthBearer.prototype.test = function(connection) {
  31538. return connection.pass !== null;
  31539. };
  31540. Strophe.SASLOAuthBearer.prototype.onChallenge = function(connection) {
  31541. var auth_str = 'n,';
  31542. if (connection.authcid !== null) {
  31543. auth_str = auth_str + 'a=' + connection.authzid;
  31544. }
  31545. auth_str = auth_str + ',';
  31546. auth_str = auth_str + "\u0001";
  31547. auth_str = auth_str + 'auth=Bearer ';
  31548. auth_str = auth_str + connection.pass;
  31549. auth_str = auth_str + "\u0001";
  31550. auth_str = auth_str + "\u0001";
  31551. return utils.utf16to8(auth_str);
  31552. };
  31553. /** PrivateConstructor: SASLExternal
  31554. * SASL EXTERNAL authentication.
  31555. *
  31556. * The EXTERNAL mechanism allows a client to request the server to use
  31557. * credentials established by means external to the mechanism to
  31558. * authenticate the client. The external means may be, for instance,
  31559. * TLS services.
  31560. */
  31561. Strophe.SASLExternal = function() {};
  31562. Strophe.SASLExternal.prototype = new Strophe.SASLMechanism("EXTERNAL", true, 10);
  31563. Strophe.SASLExternal.prototype.onChallenge = function(connection) {
  31564. /** According to XEP-178, an authzid SHOULD NOT be presented when the
  31565. * authcid contained or implied in the client certificate is the JID (i.e.
  31566. * authzid) with which the user wants to log in as.
  31567. *
  31568. * To NOT send the authzid, the user should therefore set the authcid equal
  31569. * to the JID when instantiating a new Strophe.Connection object.
  31570. */
  31571. return connection.authcid === connection.authzid ? '' : connection.authzid;
  31572. };
  31573. return {
  31574. 'Strophe': Strophe,
  31575. '$build': $build,
  31576. '$iq': $iq,
  31577. '$msg': $msg,
  31578. '$pres': $pres,
  31579. 'SHA1': SHA1,
  31580. 'MD5': MD5,
  31581. 'b64_hmac_sha1': SHA1.b64_hmac_sha1,
  31582. 'b64_sha1': SHA1.b64_sha1,
  31583. 'str_hmac_sha1': SHA1.str_hmac_sha1,
  31584. 'str_sha1': SHA1.str_sha1
  31585. };
  31586. }));
  31587. /*
  31588. This program is distributed under the terms of the MIT license.
  31589. Please see the LICENSE file for details.
  31590. Copyright 2006-2008, OGG, LLC
  31591. */
  31592. /* jshint undef: true, unused: true:, noarg: true, latedef: true */
  31593. /* global define, window, setTimeout, clearTimeout, XMLHttpRequest, ActiveXObject, Strophe, $build */
  31594. (function (root, factory) {
  31595. if (typeof define === 'function' && define.amd) {
  31596. define('strophe-bosh',['strophe-core'], function (core) {
  31597. return factory(
  31598. core.Strophe,
  31599. core.$build
  31600. );
  31601. });
  31602. } else {
  31603. // Browser globals
  31604. return factory(Strophe, $build);
  31605. }
  31606. }(this, function (Strophe, $build) {
  31607. /** PrivateClass: Strophe.Request
  31608. * _Private_ helper class that provides a cross implementation abstraction
  31609. * for a BOSH related XMLHttpRequest.
  31610. *
  31611. * The Strophe.Request class is used internally to encapsulate BOSH request
  31612. * information. It is not meant to be used from user's code.
  31613. */
  31614. /** PrivateConstructor: Strophe.Request
  31615. * Create and initialize a new Strophe.Request object.
  31616. *
  31617. * Parameters:
  31618. * (XMLElement) elem - The XML data to be sent in the request.
  31619. * (Function) func - The function that will be called when the
  31620. * XMLHttpRequest readyState changes.
  31621. * (Integer) rid - The BOSH rid attribute associated with this request.
  31622. * (Integer) sends - The number of times this same request has been sent.
  31623. */
  31624. Strophe.Request = function (elem, func, rid, sends) {
  31625. this.id = ++Strophe._requestId;
  31626. this.xmlData = elem;
  31627. this.data = Strophe.serialize(elem);
  31628. // save original function in case we need to make a new request
  31629. // from this one.
  31630. this.origFunc = func;
  31631. this.func = func;
  31632. this.rid = rid;
  31633. this.date = NaN;
  31634. this.sends = sends || 0;
  31635. this.abort = false;
  31636. this.dead = null;
  31637. this.age = function () {
  31638. if (!this.date) { return 0; }
  31639. var now = new Date();
  31640. return (now - this.date) / 1000;
  31641. };
  31642. this.timeDead = function () {
  31643. if (!this.dead) { return 0; }
  31644. var now = new Date();
  31645. return (now - this.dead) / 1000;
  31646. };
  31647. this.xhr = this._newXHR();
  31648. };
  31649. Strophe.Request.prototype = {
  31650. /** PrivateFunction: getResponse
  31651. * Get a response from the underlying XMLHttpRequest.
  31652. *
  31653. * This function attempts to get a response from the request and checks
  31654. * for errors.
  31655. *
  31656. * Throws:
  31657. * "parsererror" - A parser error occured.
  31658. * "badformat" - The entity has sent XML that cannot be processed.
  31659. *
  31660. * Returns:
  31661. * The DOM element tree of the response.
  31662. */
  31663. getResponse: function () {
  31664. var node = null;
  31665. if (this.xhr.responseXML && this.xhr.responseXML.documentElement) {
  31666. node = this.xhr.responseXML.documentElement;
  31667. if (node.tagName === "parsererror") {
  31668. Strophe.error("invalid response received");
  31669. Strophe.error("responseText: " + this.xhr.responseText);
  31670. Strophe.error("responseXML: " +
  31671. Strophe.serialize(this.xhr.responseXML));
  31672. throw "parsererror";
  31673. }
  31674. } else if (this.xhr.responseText) {
  31675. Strophe.error("invalid response received");
  31676. Strophe.error("responseText: " + this.xhr.responseText);
  31677. throw "badformat";
  31678. }
  31679. return node;
  31680. },
  31681. /** PrivateFunction: _newXHR
  31682. * _Private_ helper function to create XMLHttpRequests.
  31683. *
  31684. * This function creates XMLHttpRequests across all implementations.
  31685. *
  31686. * Returns:
  31687. * A new XMLHttpRequest.
  31688. */
  31689. _newXHR: function () {
  31690. var xhr = null;
  31691. if (window.XMLHttpRequest) {
  31692. xhr = new XMLHttpRequest();
  31693. if (xhr.overrideMimeType) {
  31694. xhr.overrideMimeType("text/xml; charset=utf-8");
  31695. }
  31696. } else if (window.ActiveXObject) {
  31697. xhr = new ActiveXObject("Microsoft.XMLHTTP");
  31698. }
  31699. // use Function.bind() to prepend ourselves as an argument
  31700. xhr.onreadystatechange = this.func.bind(null, this);
  31701. return xhr;
  31702. }
  31703. };
  31704. /** Class: Strophe.Bosh
  31705. * _Private_ helper class that handles BOSH Connections
  31706. *
  31707. * The Strophe.Bosh class is used internally by Strophe.Connection
  31708. * to encapsulate BOSH sessions. It is not meant to be used from user's code.
  31709. */
  31710. /** File: bosh.js
  31711. * A JavaScript library to enable BOSH in Strophejs.
  31712. *
  31713. * this library uses Bidirectional-streams Over Synchronous HTTP (BOSH)
  31714. * to emulate a persistent, stateful, two-way connection to an XMPP server.
  31715. * More information on BOSH can be found in XEP 124.
  31716. */
  31717. /** PrivateConstructor: Strophe.Bosh
  31718. * Create and initialize a Strophe.Bosh object.
  31719. *
  31720. * Parameters:
  31721. * (Strophe.Connection) connection - The Strophe.Connection that will use BOSH.
  31722. *
  31723. * Returns:
  31724. * A new Strophe.Bosh object.
  31725. */
  31726. Strophe.Bosh = function(connection) {
  31727. this._conn = connection;
  31728. /* request id for body tags */
  31729. this.rid = Math.floor(Math.random() * 4294967295);
  31730. /* The current session ID. */
  31731. this.sid = null;
  31732. // default BOSH values
  31733. this.hold = 1;
  31734. this.wait = 60;
  31735. this.window = 5;
  31736. this.errors = 0;
  31737. this.inactivity = null;
  31738. this._requests = [];
  31739. };
  31740. Strophe.Bosh.prototype = {
  31741. /** Variable: strip
  31742. *
  31743. * BOSH-Connections will have all stanzas wrapped in a <body> tag when
  31744. * passed to <Strophe.Connection.xmlInput> or <Strophe.Connection.xmlOutput>.
  31745. * To strip this tag, User code can set <Strophe.Bosh.strip> to "body":
  31746. *
  31747. * > Strophe.Bosh.prototype.strip = "body";
  31748. *
  31749. * This will enable stripping of the body tag in both
  31750. * <Strophe.Connection.xmlInput> and <Strophe.Connection.xmlOutput>.
  31751. */
  31752. strip: null,
  31753. /** PrivateFunction: _buildBody
  31754. * _Private_ helper function to generate the <body/> wrapper for BOSH.
  31755. *
  31756. * Returns:
  31757. * A Strophe.Builder with a <body/> element.
  31758. */
  31759. _buildBody: function () {
  31760. var bodyWrap = $build('body', {
  31761. rid: this.rid++,
  31762. xmlns: Strophe.NS.HTTPBIND
  31763. });
  31764. if (this.sid !== null) {
  31765. bodyWrap.attrs({sid: this.sid});
  31766. }
  31767. if (this._conn.options.keepalive && this._conn._sessionCachingSupported()) {
  31768. this._cacheSession();
  31769. }
  31770. return bodyWrap;
  31771. },
  31772. /** PrivateFunction: _reset
  31773. * Reset the connection.
  31774. *
  31775. * This function is called by the reset function of the Strophe Connection
  31776. */
  31777. _reset: function () {
  31778. this.rid = Math.floor(Math.random() * 4294967295);
  31779. this.sid = null;
  31780. this.errors = 0;
  31781. if (this._conn._sessionCachingSupported()) {
  31782. window.sessionStorage.removeItem('strophe-bosh-session');
  31783. }
  31784. this._conn.nextValidRid(this.rid);
  31785. },
  31786. /** PrivateFunction: _connect
  31787. * _Private_ function that initializes the BOSH connection.
  31788. *
  31789. * Creates and sends the Request that initializes the BOSH connection.
  31790. */
  31791. _connect: function (wait, hold, route) {
  31792. this.wait = wait || this.wait;
  31793. this.hold = hold || this.hold;
  31794. this.errors = 0;
  31795. // build the body tag
  31796. var body = this._buildBody().attrs({
  31797. to: this._conn.domain,
  31798. "xml:lang": "en",
  31799. wait: this.wait,
  31800. hold: this.hold,
  31801. content: "text/xml; charset=utf-8",
  31802. ver: "1.6",
  31803. "xmpp:version": "1.0",
  31804. "xmlns:xmpp": Strophe.NS.BOSH
  31805. });
  31806. if(route){
  31807. body.attrs({
  31808. route: route
  31809. });
  31810. }
  31811. var _connect_cb = this._conn._connect_cb;
  31812. this._requests.push(
  31813. new Strophe.Request(body.tree(),
  31814. this._onRequestStateChange.bind(
  31815. this, _connect_cb.bind(this._conn)),
  31816. body.tree().getAttribute("rid")));
  31817. this._throttledRequestHandler();
  31818. },
  31819. /** PrivateFunction: _attach
  31820. * Attach to an already created and authenticated BOSH session.
  31821. *
  31822. * This function is provided to allow Strophe to attach to BOSH
  31823. * sessions which have been created externally, perhaps by a Web
  31824. * application. This is often used to support auto-login type features
  31825. * without putting user credentials into the page.
  31826. *
  31827. * Parameters:
  31828. * (String) jid - The full JID that is bound by the session.
  31829. * (String) sid - The SID of the BOSH session.
  31830. * (String) rid - The current RID of the BOSH session. This RID
  31831. * will be used by the next request.
  31832. * (Function) callback The connect callback function.
  31833. * (Integer) wait - The optional HTTPBIND wait value. This is the
  31834. * time the server will wait before returning an empty result for
  31835. * a request. The default setting of 60 seconds is recommended.
  31836. * Other settings will require tweaks to the Strophe.TIMEOUT value.
  31837. * (Integer) hold - The optional HTTPBIND hold value. This is the
  31838. * number of connections the server will hold at one time. This
  31839. * should almost always be set to 1 (the default).
  31840. * (Integer) wind - The optional HTTBIND window value. This is the
  31841. * allowed range of request ids that are valid. The default is 5.
  31842. */
  31843. _attach: function (jid, sid, rid, callback, wait, hold, wind) {
  31844. this._conn.jid = jid;
  31845. this.sid = sid;
  31846. this.rid = rid;
  31847. this._conn.connect_callback = callback;
  31848. this._conn.domain = Strophe.getDomainFromJid(this._conn.jid);
  31849. this._conn.authenticated = true;
  31850. this._conn.connected = true;
  31851. this.wait = wait || this.wait;
  31852. this.hold = hold || this.hold;
  31853. this.window = wind || this.window;
  31854. this._conn._changeConnectStatus(Strophe.Status.ATTACHED, null);
  31855. },
  31856. /** PrivateFunction: _restore
  31857. * Attempt to restore a cached BOSH session
  31858. *
  31859. * Parameters:
  31860. * (String) jid - The full JID that is bound by the session.
  31861. * This parameter is optional but recommended, specifically in cases
  31862. * where prebinded BOSH sessions are used where it's important to know
  31863. * that the right session is being restored.
  31864. * (Function) callback The connect callback function.
  31865. * (Integer) wait - The optional HTTPBIND wait value. This is the
  31866. * time the server will wait before returning an empty result for
  31867. * a request. The default setting of 60 seconds is recommended.
  31868. * Other settings will require tweaks to the Strophe.TIMEOUT value.
  31869. * (Integer) hold - The optional HTTPBIND hold value. This is the
  31870. * number of connections the server will hold at one time. This
  31871. * should almost always be set to 1 (the default).
  31872. * (Integer) wind - The optional HTTBIND window value. This is the
  31873. * allowed range of request ids that are valid. The default is 5.
  31874. */
  31875. _restore: function (jid, callback, wait, hold, wind) {
  31876. var session = JSON.parse(window.sessionStorage.getItem('strophe-bosh-session'));
  31877. if (typeof session !== "undefined" &&
  31878. session !== null &&
  31879. session.rid &&
  31880. session.sid &&
  31881. session.jid &&
  31882. ( typeof jid === "undefined" ||
  31883. jid === null ||
  31884. Strophe.getBareJidFromJid(session.jid) === Strophe.getBareJidFromJid(jid) ||
  31885. // If authcid is null, then it's an anonymous login, so
  31886. // we compare only the domains:
  31887. ((Strophe.getNodeFromJid(jid) === null) && (Strophe.getDomainFromJid(session.jid) === jid))
  31888. )
  31889. ) {
  31890. this._conn.restored = true;
  31891. this._attach(session.jid, session.sid, session.rid, callback, wait, hold, wind);
  31892. } else {
  31893. throw { name: "StropheSessionError", message: "_restore: no restoreable session." };
  31894. }
  31895. },
  31896. /** PrivateFunction: _cacheSession
  31897. * _Private_ handler for the beforeunload event.
  31898. *
  31899. * This handler is used to process the Bosh-part of the initial request.
  31900. * Parameters:
  31901. * (Strophe.Request) bodyWrap - The received stanza.
  31902. */
  31903. _cacheSession: function () {
  31904. if (this._conn.authenticated) {
  31905. if (this._conn.jid && this.rid && this.sid) {
  31906. window.sessionStorage.setItem('strophe-bosh-session', JSON.stringify({
  31907. 'jid': this._conn.jid,
  31908. 'rid': this.rid,
  31909. 'sid': this.sid
  31910. }));
  31911. }
  31912. } else {
  31913. window.sessionStorage.removeItem('strophe-bosh-session');
  31914. }
  31915. },
  31916. /** PrivateFunction: _connect_cb
  31917. * _Private_ handler for initial connection request.
  31918. *
  31919. * This handler is used to process the Bosh-part of the initial request.
  31920. * Parameters:
  31921. * (Strophe.Request) bodyWrap - The received stanza.
  31922. */
  31923. _connect_cb: function (bodyWrap) {
  31924. var typ = bodyWrap.getAttribute("type");
  31925. var cond, conflict;
  31926. if (typ !== null && typ === "terminate") {
  31927. // an error occurred
  31928. cond = bodyWrap.getAttribute("condition");
  31929. Strophe.error("BOSH-Connection failed: " + cond);
  31930. conflict = bodyWrap.getElementsByTagName("conflict");
  31931. if (cond !== null) {
  31932. if (cond === "remote-stream-error" && conflict.length > 0) {
  31933. cond = "conflict";
  31934. }
  31935. this._conn._changeConnectStatus(Strophe.Status.CONNFAIL, cond);
  31936. } else {
  31937. this._conn._changeConnectStatus(Strophe.Status.CONNFAIL, "unknown");
  31938. }
  31939. this._conn._doDisconnect(cond);
  31940. return Strophe.Status.CONNFAIL;
  31941. }
  31942. // check to make sure we don't overwrite these if _connect_cb is
  31943. // called multiple times in the case of missing stream:features
  31944. if (!this.sid) {
  31945. this.sid = bodyWrap.getAttribute("sid");
  31946. }
  31947. var wind = bodyWrap.getAttribute('requests');
  31948. if (wind) { this.window = parseInt(wind, 10); }
  31949. var hold = bodyWrap.getAttribute('hold');
  31950. if (hold) { this.hold = parseInt(hold, 10); }
  31951. var wait = bodyWrap.getAttribute('wait');
  31952. if (wait) { this.wait = parseInt(wait, 10); }
  31953. var inactivity = bodyWrap.getAttribute('inactivity');
  31954. if (inactivity) { this.inactivity = parseInt(inactivity, 10); }
  31955. },
  31956. /** PrivateFunction: _disconnect
  31957. * _Private_ part of Connection.disconnect for Bosh
  31958. *
  31959. * Parameters:
  31960. * (Request) pres - This stanza will be sent before disconnecting.
  31961. */
  31962. _disconnect: function (pres) {
  31963. this._sendTerminate(pres);
  31964. },
  31965. /** PrivateFunction: _doDisconnect
  31966. * _Private_ function to disconnect.
  31967. *
  31968. * Resets the SID and RID.
  31969. */
  31970. _doDisconnect: function () {
  31971. this.sid = null;
  31972. this.rid = Math.floor(Math.random() * 4294967295);
  31973. if (this._conn._sessionCachingSupported()) {
  31974. window.sessionStorage.removeItem('strophe-bosh-session');
  31975. }
  31976. this._conn.nextValidRid(this.rid);
  31977. },
  31978. /** PrivateFunction: _emptyQueue
  31979. * _Private_ function to check if the Request queue is empty.
  31980. *
  31981. * Returns:
  31982. * True, if there are no Requests queued, False otherwise.
  31983. */
  31984. _emptyQueue: function () {
  31985. return this._requests.length === 0;
  31986. },
  31987. /** PrivateFunction: _callProtocolErrorHandlers
  31988. * _Private_ function to call error handlers registered for HTTP errors.
  31989. *
  31990. * Parameters:
  31991. * (Strophe.Request) req - The request that is changing readyState.
  31992. */
  31993. _callProtocolErrorHandlers: function (req) {
  31994. var reqStatus = this._getRequestStatus(req),
  31995. err_callback;
  31996. err_callback = this._conn.protocolErrorHandlers.HTTP[reqStatus];
  31997. if (err_callback) {
  31998. err_callback.call(this, reqStatus);
  31999. }
  32000. },
  32001. /** PrivateFunction: _hitError
  32002. * _Private_ function to handle the error count.
  32003. *
  32004. * Requests are resent automatically until their error count reaches
  32005. * 5. Each time an error is encountered, this function is called to
  32006. * increment the count and disconnect if the count is too high.
  32007. *
  32008. * Parameters:
  32009. * (Integer) reqStatus - The request status.
  32010. */
  32011. _hitError: function (reqStatus) {
  32012. this.errors++;
  32013. Strophe.warn("request errored, status: " + reqStatus +
  32014. ", number of errors: " + this.errors);
  32015. if (this.errors > 4) {
  32016. this._conn._onDisconnectTimeout();
  32017. }
  32018. },
  32019. /** PrivateFunction: _no_auth_received
  32020. *
  32021. * Called on stream start/restart when no stream:features
  32022. * has been received and sends a blank poll request.
  32023. */
  32024. _no_auth_received: function (_callback) {
  32025. if (_callback) {
  32026. _callback = _callback.bind(this._conn);
  32027. } else {
  32028. _callback = this._conn._connect_cb.bind(this._conn);
  32029. }
  32030. var body = this._buildBody();
  32031. this._requests.push(
  32032. new Strophe.Request(body.tree(),
  32033. this._onRequestStateChange.bind(
  32034. this, _callback.bind(this._conn)),
  32035. body.tree().getAttribute("rid")));
  32036. this._throttledRequestHandler();
  32037. },
  32038. /** PrivateFunction: _onDisconnectTimeout
  32039. * _Private_ timeout handler for handling non-graceful disconnection.
  32040. *
  32041. * Cancels all remaining Requests and clears the queue.
  32042. */
  32043. _onDisconnectTimeout: function () {
  32044. this._abortAllRequests();
  32045. },
  32046. /** PrivateFunction: _abortAllRequests
  32047. * _Private_ helper function that makes sure all pending requests are aborted.
  32048. */
  32049. _abortAllRequests: function _abortAllRequests() {
  32050. var req;
  32051. while (this._requests.length > 0) {
  32052. req = this._requests.pop();
  32053. req.abort = true;
  32054. req.xhr.abort();
  32055. // jslint complains, but this is fine. setting to empty func
  32056. // is necessary for IE6
  32057. req.xhr.onreadystatechange = function () {}; // jshint ignore:line
  32058. }
  32059. },
  32060. /** PrivateFunction: _onIdle
  32061. * _Private_ handler called by Strophe.Connection._onIdle
  32062. *
  32063. * Sends all queued Requests or polls with empty Request if there are none.
  32064. */
  32065. _onIdle: function () {
  32066. var data = this._conn._data;
  32067. // if no requests are in progress, poll
  32068. if (this._conn.authenticated && this._requests.length === 0 &&
  32069. data.length === 0 && !this._conn.disconnecting) {
  32070. Strophe.info("no requests during idle cycle, sending " +
  32071. "blank request");
  32072. data.push(null);
  32073. }
  32074. if (this._conn.paused) {
  32075. return;
  32076. }
  32077. if (this._requests.length < 2 && data.length > 0) {
  32078. var body = this._buildBody();
  32079. for (var i = 0; i < data.length; i++) {
  32080. if (data[i] !== null) {
  32081. if (data[i] === "restart") {
  32082. body.attrs({
  32083. to: this._conn.domain,
  32084. "xml:lang": "en",
  32085. "xmpp:restart": "true",
  32086. "xmlns:xmpp": Strophe.NS.BOSH
  32087. });
  32088. } else {
  32089. body.cnode(data[i]).up();
  32090. }
  32091. }
  32092. }
  32093. delete this._conn._data;
  32094. this._conn._data = [];
  32095. this._requests.push(
  32096. new Strophe.Request(body.tree(),
  32097. this._onRequestStateChange.bind(
  32098. this, this._conn._dataRecv.bind(this._conn)),
  32099. body.tree().getAttribute("rid")));
  32100. this._throttledRequestHandler();
  32101. }
  32102. if (this._requests.length > 0) {
  32103. var time_elapsed = this._requests[0].age();
  32104. if (this._requests[0].dead !== null) {
  32105. if (this._requests[0].timeDead() >
  32106. Math.floor(Strophe.SECONDARY_TIMEOUT * this.wait)) {
  32107. this._throttledRequestHandler();
  32108. }
  32109. }
  32110. if (time_elapsed > Math.floor(Strophe.TIMEOUT * this.wait)) {
  32111. Strophe.warn("Request " +
  32112. this._requests[0].id +
  32113. " timed out, over " + Math.floor(Strophe.TIMEOUT * this.wait) +
  32114. " seconds since last activity");
  32115. this._throttledRequestHandler();
  32116. }
  32117. }
  32118. },
  32119. /** PrivateFunction: _getRequestStatus
  32120. *
  32121. * Returns the HTTP status code from a Strophe.Request
  32122. *
  32123. * Parameters:
  32124. * (Strophe.Request) req - The Strophe.Request instance.
  32125. * (Integer) def - The default value that should be returned if no
  32126. * status value was found.
  32127. */
  32128. _getRequestStatus: function (req, def) {
  32129. var reqStatus;
  32130. if (req.xhr.readyState === 4) {
  32131. try {
  32132. reqStatus = req.xhr.status;
  32133. } catch (e) {
  32134. // ignore errors from undefined status attribute. Works
  32135. // around a browser bug
  32136. Strophe.error(
  32137. "Caught an error while retrieving a request's status, " +
  32138. "reqStatus: " + reqStatus);
  32139. }
  32140. }
  32141. if (typeof(reqStatus) === "undefined") {
  32142. reqStatus = typeof def === 'number' ? def : 0;
  32143. }
  32144. return reqStatus;
  32145. },
  32146. /** PrivateFunction: _onRequestStateChange
  32147. * _Private_ handler for Strophe.Request state changes.
  32148. *
  32149. * This function is called when the XMLHttpRequest readyState changes.
  32150. * It contains a lot of error handling logic for the many ways that
  32151. * requests can fail, and calls the request callback when requests
  32152. * succeed.
  32153. *
  32154. * Parameters:
  32155. * (Function) func - The handler for the request.
  32156. * (Strophe.Request) req - The request that is changing readyState.
  32157. */
  32158. _onRequestStateChange: function (func, req) {
  32159. Strophe.debug("request id "+req.id+"."+req.sends+
  32160. " state changed to "+req.xhr.readyState);
  32161. if (req.abort) {
  32162. req.abort = false;
  32163. return;
  32164. }
  32165. if (req.xhr.readyState !== 4) {
  32166. // The request is not yet complete
  32167. return;
  32168. }
  32169. var reqStatus = this._getRequestStatus(req);
  32170. if (this.disconnecting && reqStatus >= 400) {
  32171. this._hitError(reqStatus);
  32172. this._callProtocolErrorHandlers(req);
  32173. return;
  32174. }
  32175. var valid_request = reqStatus > 0 && reqStatus < 500;
  32176. var too_many_retries = req.sends > this._conn.maxRetries;
  32177. if (valid_request || too_many_retries) {
  32178. // remove from internal queue
  32179. this._removeRequest(req);
  32180. Strophe.debug("request id "+req.id+" should now be removed");
  32181. }
  32182. if (reqStatus === 200) {
  32183. // request succeeded
  32184. var reqIs0 = (this._requests[0] === req);
  32185. var reqIs1 = (this._requests[1] === req);
  32186. // if request 1 finished, or request 0 finished and request
  32187. // 1 is over Strophe.SECONDARY_TIMEOUT seconds old, we need to
  32188. // restart the other - both will be in the first spot, as the
  32189. // completed request has been removed from the queue already
  32190. if (reqIs1 ||
  32191. (reqIs0 && this._requests.length > 0 &&
  32192. this._requests[0].age() > Math.floor(Strophe.SECONDARY_TIMEOUT * this.wait))) {
  32193. this._restartRequest(0);
  32194. }
  32195. this._conn.nextValidRid(Number(req.rid) + 1);
  32196. Strophe.debug("request id "+req.id+"."+req.sends+" got 200");
  32197. func(req); // call handler
  32198. this.errors = 0;
  32199. } else if (reqStatus === 0 ||
  32200. (reqStatus >= 400 && reqStatus < 600) ||
  32201. reqStatus >= 12000) {
  32202. // request failed
  32203. Strophe.error("request id "+req.id+"."+req.sends+" error "+reqStatus+" happened");
  32204. this._hitError(reqStatus);
  32205. this._callProtocolErrorHandlers(req);
  32206. if (reqStatus >= 400 && reqStatus < 500) {
  32207. this._conn._changeConnectStatus(Strophe.Status.DISCONNECTING, null);
  32208. this._conn._doDisconnect();
  32209. }
  32210. } else {
  32211. Strophe.error("request id "+req.id+"."+req.sends+" error "+reqStatus+" happened");
  32212. }
  32213. if (!valid_request && !too_many_retries) {
  32214. this._throttledRequestHandler();
  32215. } else if (too_many_retries && !this._conn.connected) {
  32216. this._conn._changeConnectStatus(Strophe.Status.CONNFAIL, "giving-up");
  32217. }
  32218. },
  32219. /** PrivateFunction: _processRequest
  32220. * _Private_ function to process a request in the queue.
  32221. *
  32222. * This function takes requests off the queue and sends them and
  32223. * restarts dead requests.
  32224. *
  32225. * Parameters:
  32226. * (Integer) i - The index of the request in the queue.
  32227. */
  32228. _processRequest: function (i) {
  32229. var self = this;
  32230. var req = this._requests[i];
  32231. var reqStatus = this._getRequestStatus(req, -1);
  32232. // make sure we limit the number of retries
  32233. if (req.sends > this._conn.maxRetries) {
  32234. this._conn._onDisconnectTimeout();
  32235. return;
  32236. }
  32237. var time_elapsed = req.age();
  32238. var primaryTimeout = (!isNaN(time_elapsed) &&
  32239. time_elapsed > Math.floor(Strophe.TIMEOUT * this.wait));
  32240. var secondaryTimeout = (req.dead !== null &&
  32241. req.timeDead() > Math.floor(Strophe.SECONDARY_TIMEOUT * this.wait));
  32242. var requestCompletedWithServerError = (req.xhr.readyState === 4 &&
  32243. (reqStatus < 1 || reqStatus >= 500));
  32244. if (primaryTimeout || secondaryTimeout ||
  32245. requestCompletedWithServerError) {
  32246. if (secondaryTimeout) {
  32247. Strophe.error("Request " + this._requests[i].id +
  32248. " timed out (secondary), restarting");
  32249. }
  32250. req.abort = true;
  32251. req.xhr.abort();
  32252. // setting to null fails on IE6, so set to empty function
  32253. req.xhr.onreadystatechange = function () {};
  32254. this._requests[i] = new Strophe.Request(req.xmlData,
  32255. req.origFunc,
  32256. req.rid,
  32257. req.sends);
  32258. req = this._requests[i];
  32259. }
  32260. if (req.xhr.readyState === 0) {
  32261. Strophe.debug("request id "+req.id+"."+req.sends+" posting");
  32262. try {
  32263. var contentType = this._conn.options.contentType || "text/xml; charset=utf-8";
  32264. req.xhr.open("POST", this._conn.service, this._conn.options.sync ? false : true);
  32265. if (typeof req.xhr.setRequestHeader !== 'undefined') {
  32266. // IE9 doesn't have setRequestHeader
  32267. req.xhr.setRequestHeader("Content-Type", contentType);
  32268. }
  32269. if (this._conn.options.withCredentials) {
  32270. req.xhr.withCredentials = true;
  32271. }
  32272. } catch (e2) {
  32273. Strophe.error("XHR open failed: " + e2.toString());
  32274. if (!this._conn.connected) {
  32275. this._conn._changeConnectStatus(
  32276. Strophe.Status.CONNFAIL, "bad-service");
  32277. }
  32278. this._conn.disconnect();
  32279. return;
  32280. }
  32281. // Fires the XHR request -- may be invoked immediately
  32282. // or on a gradually expanding retry window for reconnects
  32283. var sendFunc = function () {
  32284. req.date = new Date();
  32285. if (self._conn.options.customHeaders){
  32286. var headers = self._conn.options.customHeaders;
  32287. for (var header in headers) {
  32288. if (headers.hasOwnProperty(header)) {
  32289. req.xhr.setRequestHeader(header, headers[header]);
  32290. }
  32291. }
  32292. }
  32293. req.xhr.send(req.data);
  32294. };
  32295. // Implement progressive backoff for reconnects --
  32296. // First retry (send === 1) should also be instantaneous
  32297. if (req.sends > 1) {
  32298. // Using a cube of the retry number creates a nicely
  32299. // expanding retry window
  32300. var backoff = Math.min(Math.floor(Strophe.TIMEOUT * this.wait),
  32301. Math.pow(req.sends, 3)) * 1000;
  32302. setTimeout(function() {
  32303. // XXX: setTimeout should be called only with function expressions (23974bc1)
  32304. sendFunc();
  32305. }, backoff);
  32306. } else {
  32307. sendFunc();
  32308. }
  32309. req.sends++;
  32310. if (this._conn.xmlOutput !== Strophe.Connection.prototype.xmlOutput) {
  32311. if (req.xmlData.nodeName === this.strip && req.xmlData.childNodes.length) {
  32312. this._conn.xmlOutput(req.xmlData.childNodes[0]);
  32313. } else {
  32314. this._conn.xmlOutput(req.xmlData);
  32315. }
  32316. }
  32317. if (this._conn.rawOutput !== Strophe.Connection.prototype.rawOutput) {
  32318. this._conn.rawOutput(req.data);
  32319. }
  32320. } else {
  32321. Strophe.debug("_processRequest: " +
  32322. (i === 0 ? "first" : "second") +
  32323. " request has readyState of " +
  32324. req.xhr.readyState);
  32325. }
  32326. },
  32327. /** PrivateFunction: _removeRequest
  32328. * _Private_ function to remove a request from the queue.
  32329. *
  32330. * Parameters:
  32331. * (Strophe.Request) req - The request to remove.
  32332. */
  32333. _removeRequest: function (req) {
  32334. Strophe.debug("removing request");
  32335. var i;
  32336. for (i = this._requests.length - 1; i >= 0; i--) {
  32337. if (req === this._requests[i]) {
  32338. this._requests.splice(i, 1);
  32339. }
  32340. }
  32341. // IE6 fails on setting to null, so set to empty function
  32342. req.xhr.onreadystatechange = function () {};
  32343. this._throttledRequestHandler();
  32344. },
  32345. /** PrivateFunction: _restartRequest
  32346. * _Private_ function to restart a request that is presumed dead.
  32347. *
  32348. * Parameters:
  32349. * (Integer) i - The index of the request in the queue.
  32350. */
  32351. _restartRequest: function (i) {
  32352. var req = this._requests[i];
  32353. if (req.dead === null) {
  32354. req.dead = new Date();
  32355. }
  32356. this._processRequest(i);
  32357. },
  32358. /** PrivateFunction: _reqToData
  32359. * _Private_ function to get a stanza out of a request.
  32360. *
  32361. * Tries to extract a stanza out of a Request Object.
  32362. * When this fails the current connection will be disconnected.
  32363. *
  32364. * Parameters:
  32365. * (Object) req - The Request.
  32366. *
  32367. * Returns:
  32368. * The stanza that was passed.
  32369. */
  32370. _reqToData: function (req) {
  32371. try {
  32372. return req.getResponse();
  32373. } catch (e) {
  32374. if (e !== "parsererror") { throw e; }
  32375. this._conn.disconnect("strophe-parsererror");
  32376. }
  32377. },
  32378. /** PrivateFunction: _sendTerminate
  32379. * _Private_ function to send initial disconnect sequence.
  32380. *
  32381. * This is the first step in a graceful disconnect. It sends
  32382. * the BOSH server a terminate body and includes an unavailable
  32383. * presence if authentication has completed.
  32384. */
  32385. _sendTerminate: function (pres) {
  32386. Strophe.info("_sendTerminate was called");
  32387. var body = this._buildBody().attrs({type: "terminate"});
  32388. if (pres) {
  32389. body.cnode(pres.tree());
  32390. }
  32391. var req = new Strophe.Request(
  32392. body.tree(),
  32393. this._onRequestStateChange.bind(
  32394. this, this._conn._dataRecv.bind(this._conn)),
  32395. body.tree().getAttribute("rid")
  32396. );
  32397. this._requests.push(req);
  32398. this._throttledRequestHandler();
  32399. },
  32400. /** PrivateFunction: _send
  32401. * _Private_ part of the Connection.send function for BOSH
  32402. *
  32403. * Just triggers the RequestHandler to send the messages that are in the queue
  32404. */
  32405. _send: function () {
  32406. clearTimeout(this._conn._idleTimeout);
  32407. this._throttledRequestHandler();
  32408. // XXX: setTimeout should be called only with function expressions (23974bc1)
  32409. this._conn._idleTimeout = setTimeout(function() {
  32410. this._onIdle();
  32411. }.bind(this._conn), 100);
  32412. },
  32413. /** PrivateFunction: _sendRestart
  32414. *
  32415. * Send an xmpp:restart stanza.
  32416. */
  32417. _sendRestart: function () {
  32418. this._throttledRequestHandler();
  32419. clearTimeout(this._conn._idleTimeout);
  32420. },
  32421. /** PrivateFunction: _throttledRequestHandler
  32422. * _Private_ function to throttle requests to the connection window.
  32423. *
  32424. * This function makes sure we don't send requests so fast that the
  32425. * request ids overflow the connection window in the case that one
  32426. * request died.
  32427. */
  32428. _throttledRequestHandler: function () {
  32429. if (!this._requests) {
  32430. Strophe.debug("_throttledRequestHandler called with " +
  32431. "undefined requests");
  32432. } else {
  32433. Strophe.debug("_throttledRequestHandler called with " +
  32434. this._requests.length + " requests");
  32435. }
  32436. if (!this._requests || this._requests.length === 0) {
  32437. return;
  32438. }
  32439. if (this._requests.length > 0) {
  32440. this._processRequest(0);
  32441. }
  32442. if (this._requests.length > 1 &&
  32443. Math.abs(this._requests[0].rid -
  32444. this._requests[1].rid) < this.window) {
  32445. this._processRequest(1);
  32446. }
  32447. }
  32448. };
  32449. return Strophe;
  32450. }));
  32451. /*
  32452. This program is distributed under the terms of the MIT license.
  32453. Please see the LICENSE file for details.
  32454. Copyright 2006-2008, OGG, LLC
  32455. */
  32456. /* jshint undef: true, unused: true:, noarg: true, latedef: true */
  32457. /* global define, window, clearTimeout, WebSocket, DOMParser, Strophe, $build */
  32458. (function (root, factory) {
  32459. if (typeof define === 'function' && define.amd) {
  32460. define('strophe-websocket',['strophe-core'], function (core) {
  32461. return factory(
  32462. core.Strophe,
  32463. core.$build
  32464. );
  32465. });
  32466. } else {
  32467. // Browser globals
  32468. return factory(Strophe, $build);
  32469. }
  32470. }(this, function (Strophe, $build) {
  32471. /** Class: Strophe.WebSocket
  32472. * _Private_ helper class that handles WebSocket Connections
  32473. *
  32474. * The Strophe.WebSocket class is used internally by Strophe.Connection
  32475. * to encapsulate WebSocket sessions. It is not meant to be used from user's code.
  32476. */
  32477. /** File: websocket.js
  32478. * A JavaScript library to enable XMPP over Websocket in Strophejs.
  32479. *
  32480. * This file implements XMPP over WebSockets for Strophejs.
  32481. * If a Connection is established with a Websocket url (ws://...)
  32482. * Strophe will use WebSockets.
  32483. * For more information on XMPP-over-WebSocket see RFC 7395:
  32484. * http://tools.ietf.org/html/rfc7395
  32485. *
  32486. * WebSocket support implemented by Andreas Guth (andreas.guth@rwth-aachen.de)
  32487. */
  32488. /** PrivateConstructor: Strophe.Websocket
  32489. * Create and initialize a Strophe.WebSocket object.
  32490. * Currently only sets the connection Object.
  32491. *
  32492. * Parameters:
  32493. * (Strophe.Connection) connection - The Strophe.Connection that will use WebSockets.
  32494. *
  32495. * Returns:
  32496. * A new Strophe.WebSocket object.
  32497. */
  32498. Strophe.Websocket = function(connection) {
  32499. this._conn = connection;
  32500. this.strip = "wrapper";
  32501. var service = connection.service;
  32502. if (service.indexOf("ws:") !== 0 && service.indexOf("wss:") !== 0) {
  32503. // If the service is not an absolute URL, assume it is a path and put the absolute
  32504. // URL together from options, current URL and the path.
  32505. var new_service = "";
  32506. if (connection.options.protocol === "ws" && window.location.protocol !== "https:") {
  32507. new_service += "ws";
  32508. } else {
  32509. new_service += "wss";
  32510. }
  32511. new_service += "://" + window.location.host;
  32512. if (service.indexOf("/") !== 0) {
  32513. new_service += window.location.pathname + service;
  32514. } else {
  32515. new_service += service;
  32516. }
  32517. connection.service = new_service;
  32518. }
  32519. };
  32520. Strophe.Websocket.prototype = {
  32521. /** PrivateFunction: _buildStream
  32522. * _Private_ helper function to generate the <stream> start tag for WebSockets
  32523. *
  32524. * Returns:
  32525. * A Strophe.Builder with a <stream> element.
  32526. */
  32527. _buildStream: function () {
  32528. return $build("open", {
  32529. "xmlns": Strophe.NS.FRAMING,
  32530. "to": this._conn.domain,
  32531. "version": '1.0'
  32532. });
  32533. },
  32534. /** PrivateFunction: _check_streamerror
  32535. * _Private_ checks a message for stream:error
  32536. *
  32537. * Parameters:
  32538. * (Strophe.Request) bodyWrap - The received stanza.
  32539. * connectstatus - The ConnectStatus that will be set on error.
  32540. * Returns:
  32541. * true if there was a streamerror, false otherwise.
  32542. */
  32543. _check_streamerror: function (bodyWrap, connectstatus) {
  32544. var errors;
  32545. if (bodyWrap.getElementsByTagNameNS) {
  32546. errors = bodyWrap.getElementsByTagNameNS(Strophe.NS.STREAM, "error");
  32547. } else {
  32548. errors = bodyWrap.getElementsByTagName("stream:error");
  32549. }
  32550. if (errors.length === 0) {
  32551. return false;
  32552. }
  32553. var error = errors[0];
  32554. var condition = "";
  32555. var text = "";
  32556. var ns = "urn:ietf:params:xml:ns:xmpp-streams";
  32557. for (var i = 0; i < error.childNodes.length; i++) {
  32558. var e = error.childNodes[i];
  32559. if (e.getAttribute("xmlns") !== ns) {
  32560. break;
  32561. } if (e.nodeName === "text") {
  32562. text = e.textContent;
  32563. } else {
  32564. condition = e.nodeName;
  32565. }
  32566. }
  32567. var errorString = "WebSocket stream error: ";
  32568. if (condition) {
  32569. errorString += condition;
  32570. } else {
  32571. errorString += "unknown";
  32572. }
  32573. if (text) {
  32574. errorString += " - " + text;
  32575. }
  32576. Strophe.error(errorString);
  32577. // close the connection on stream_error
  32578. this._conn._changeConnectStatus(connectstatus, condition);
  32579. this._conn._doDisconnect();
  32580. return true;
  32581. },
  32582. /** PrivateFunction: _reset
  32583. * Reset the connection.
  32584. *
  32585. * This function is called by the reset function of the Strophe Connection.
  32586. * Is not needed by WebSockets.
  32587. */
  32588. _reset: function () {
  32589. return;
  32590. },
  32591. /** PrivateFunction: _connect
  32592. * _Private_ function called by Strophe.Connection.connect
  32593. *
  32594. * Creates a WebSocket for a connection and assigns Callbacks to it.
  32595. * Does nothing if there already is a WebSocket.
  32596. */
  32597. _connect: function () {
  32598. // Ensure that there is no open WebSocket from a previous Connection.
  32599. this._closeSocket();
  32600. // Create the new WobSocket
  32601. this.socket = new WebSocket(this._conn.service, "xmpp");
  32602. this.socket.onopen = this._onOpen.bind(this);
  32603. this.socket.onerror = this._onError.bind(this);
  32604. this.socket.onclose = this._onClose.bind(this);
  32605. this.socket.onmessage = this._connect_cb_wrapper.bind(this);
  32606. },
  32607. /** PrivateFunction: _connect_cb
  32608. * _Private_ function called by Strophe.Connection._connect_cb
  32609. *
  32610. * checks for stream:error
  32611. *
  32612. * Parameters:
  32613. * (Strophe.Request) bodyWrap - The received stanza.
  32614. */
  32615. _connect_cb: function(bodyWrap) {
  32616. var error = this._check_streamerror(bodyWrap, Strophe.Status.CONNFAIL);
  32617. if (error) {
  32618. return Strophe.Status.CONNFAIL;
  32619. }
  32620. },
  32621. /** PrivateFunction: _handleStreamStart
  32622. * _Private_ function that checks the opening <open /> tag for errors.
  32623. *
  32624. * Disconnects if there is an error and returns false, true otherwise.
  32625. *
  32626. * Parameters:
  32627. * (Node) message - Stanza containing the <open /> tag.
  32628. */
  32629. _handleStreamStart: function(message) {
  32630. var error = false;
  32631. // Check for errors in the <open /> tag
  32632. var ns = message.getAttribute("xmlns");
  32633. if (typeof ns !== "string") {
  32634. error = "Missing xmlns in <open />";
  32635. } else if (ns !== Strophe.NS.FRAMING) {
  32636. error = "Wrong xmlns in <open />: " + ns;
  32637. }
  32638. var ver = message.getAttribute("version");
  32639. if (typeof ver !== "string") {
  32640. error = "Missing version in <open />";
  32641. } else if (ver !== "1.0") {
  32642. error = "Wrong version in <open />: " + ver;
  32643. }
  32644. if (error) {
  32645. this._conn._changeConnectStatus(Strophe.Status.CONNFAIL, error);
  32646. this._conn._doDisconnect();
  32647. return false;
  32648. }
  32649. return true;
  32650. },
  32651. /** PrivateFunction: _connect_cb_wrapper
  32652. * _Private_ function that handles the first connection messages.
  32653. *
  32654. * On receiving an opening stream tag this callback replaces itself with the real
  32655. * message handler. On receiving a stream error the connection is terminated.
  32656. */
  32657. _connect_cb_wrapper: function(message) {
  32658. if (message.data.indexOf("<open ") === 0 || message.data.indexOf("<?xml") === 0) {
  32659. // Strip the XML Declaration, if there is one
  32660. var data = message.data.replace(/^(<\?.*?\?>\s*)*/, "");
  32661. if (data === '') return;
  32662. var streamStart = new DOMParser().parseFromString(data, "text/xml").documentElement;
  32663. this._conn.xmlInput(streamStart);
  32664. this._conn.rawInput(message.data);
  32665. //_handleStreamSteart will check for XML errors and disconnect on error
  32666. if (this._handleStreamStart(streamStart)) {
  32667. //_connect_cb will check for stream:error and disconnect on error
  32668. this._connect_cb(streamStart);
  32669. }
  32670. } else if (message.data.indexOf("<close ") === 0) { // <close xmlns="urn:ietf:params:xml:ns:xmpp-framing />
  32671. this._conn.rawInput(message.data);
  32672. this._conn.xmlInput(message);
  32673. var see_uri = message.getAttribute("see-other-uri");
  32674. if (see_uri) {
  32675. this._conn._changeConnectStatus(
  32676. Strophe.Status.REDIRECT,
  32677. "Received see-other-uri, resetting connection"
  32678. );
  32679. this._conn.reset();
  32680. this._conn.service = see_uri;
  32681. this._connect();
  32682. } else {
  32683. this._conn._changeConnectStatus(
  32684. Strophe.Status.CONNFAIL,
  32685. "Received closing stream"
  32686. );
  32687. this._conn._doDisconnect();
  32688. }
  32689. } else {
  32690. var string = this._streamWrap(message.data);
  32691. var elem = new DOMParser().parseFromString(string, "text/xml").documentElement;
  32692. this.socket.onmessage = this._onMessage.bind(this);
  32693. this._conn._connect_cb(elem, null, message.data);
  32694. }
  32695. },
  32696. /** PrivateFunction: _disconnect
  32697. * _Private_ function called by Strophe.Connection.disconnect
  32698. *
  32699. * Disconnects and sends a last stanza if one is given
  32700. *
  32701. * Parameters:
  32702. * (Request) pres - This stanza will be sent before disconnecting.
  32703. */
  32704. _disconnect: function (pres) {
  32705. if (this.socket && this.socket.readyState !== WebSocket.CLOSED) {
  32706. if (pres) {
  32707. this._conn.send(pres);
  32708. }
  32709. var close = $build("close", { "xmlns": Strophe.NS.FRAMING });
  32710. this._conn.xmlOutput(close);
  32711. var closeString = Strophe.serialize(close);
  32712. this._conn.rawOutput(closeString);
  32713. try {
  32714. this.socket.send(closeString);
  32715. } catch (e) {
  32716. Strophe.info("Couldn't send <close /> tag.");
  32717. }
  32718. }
  32719. this._conn._doDisconnect();
  32720. },
  32721. /** PrivateFunction: _doDisconnect
  32722. * _Private_ function to disconnect.
  32723. *
  32724. * Just closes the Socket for WebSockets
  32725. */
  32726. _doDisconnect: function () {
  32727. Strophe.info("WebSockets _doDisconnect was called");
  32728. this._closeSocket();
  32729. },
  32730. /** PrivateFunction _streamWrap
  32731. * _Private_ helper function to wrap a stanza in a <stream> tag.
  32732. * This is used so Strophe can process stanzas from WebSockets like BOSH
  32733. */
  32734. _streamWrap: function (stanza) {
  32735. return "<wrapper>" + stanza + '</wrapper>';
  32736. },
  32737. /** PrivateFunction: _closeSocket
  32738. * _Private_ function to close the WebSocket.
  32739. *
  32740. * Closes the socket if it is still open and deletes it
  32741. */
  32742. _closeSocket: function () {
  32743. if (this.socket) { try {
  32744. this.socket.close();
  32745. } catch (e) {} }
  32746. this.socket = null;
  32747. },
  32748. /** PrivateFunction: _emptyQueue
  32749. * _Private_ function to check if the message queue is empty.
  32750. *
  32751. * Returns:
  32752. * True, because WebSocket messages are send immediately after queueing.
  32753. */
  32754. _emptyQueue: function () {
  32755. return true;
  32756. },
  32757. /** PrivateFunction: _onClose
  32758. * _Private_ function to handle websockets closing.
  32759. *
  32760. * Nothing to do here for WebSockets
  32761. */
  32762. _onClose: function(e) {
  32763. if(this._conn.connected && !this._conn.disconnecting) {
  32764. Strophe.error("Websocket closed unexpectedly");
  32765. this._conn._doDisconnect();
  32766. } else if (e && e.code === 1006 && !this._conn.connected && this.socket) {
  32767. // in case the onError callback was not called (Safari 10 does not
  32768. // call onerror when the initial connection fails) we need to
  32769. // dispatch a CONNFAIL status update to be consistent with the
  32770. // behavior on other browsers.
  32771. Strophe.error("Websocket closed unexcectedly");
  32772. this._conn._changeConnectStatus(
  32773. Strophe.Status.CONNFAIL,
  32774. "The WebSocket connection could not be established or was disconnected."
  32775. );
  32776. this._conn._doDisconnect();
  32777. } else {
  32778. Strophe.info("Websocket closed");
  32779. }
  32780. },
  32781. /** PrivateFunction: _no_auth_received
  32782. *
  32783. * Called on stream start/restart when no stream:features
  32784. * has been received.
  32785. */
  32786. _no_auth_received: function (_callback) {
  32787. Strophe.error("Server did not send any auth methods");
  32788. this._conn._changeConnectStatus(
  32789. Strophe.Status.CONNFAIL,
  32790. "Server did not send any auth methods"
  32791. );
  32792. if (_callback) {
  32793. _callback = _callback.bind(this._conn);
  32794. _callback();
  32795. }
  32796. this._conn._doDisconnect();
  32797. },
  32798. /** PrivateFunction: _onDisconnectTimeout
  32799. * _Private_ timeout handler for handling non-graceful disconnection.
  32800. *
  32801. * This does nothing for WebSockets
  32802. */
  32803. _onDisconnectTimeout: function () {},
  32804. /** PrivateFunction: _abortAllRequests
  32805. * _Private_ helper function that makes sure all pending requests are aborted.
  32806. */
  32807. _abortAllRequests: function () {},
  32808. /** PrivateFunction: _onError
  32809. * _Private_ function to handle websockets errors.
  32810. *
  32811. * Parameters:
  32812. * (Object) error - The websocket error.
  32813. */
  32814. _onError: function(error) {
  32815. Strophe.error("Websocket error " + error);
  32816. this._conn._changeConnectStatus(
  32817. Strophe.Status.CONNFAIL,
  32818. "The WebSocket connection could not be established or was disconnected."
  32819. );
  32820. this._disconnect();
  32821. },
  32822. /** PrivateFunction: _onIdle
  32823. * _Private_ function called by Strophe.Connection._onIdle
  32824. *
  32825. * sends all queued stanzas
  32826. */
  32827. _onIdle: function () {
  32828. var data = this._conn._data;
  32829. if (data.length > 0 && !this._conn.paused) {
  32830. for (var i = 0; i < data.length; i++) {
  32831. if (data[i] !== null) {
  32832. var stanza, rawStanza;
  32833. if (data[i] === "restart") {
  32834. stanza = this._buildStream().tree();
  32835. } else {
  32836. stanza = data[i];
  32837. }
  32838. rawStanza = Strophe.serialize(stanza);
  32839. this._conn.xmlOutput(stanza);
  32840. this._conn.rawOutput(rawStanza);
  32841. this.socket.send(rawStanza);
  32842. }
  32843. }
  32844. this._conn._data = [];
  32845. }
  32846. },
  32847. /** PrivateFunction: _onMessage
  32848. * _Private_ function to handle websockets messages.
  32849. *
  32850. * This function parses each of the messages as if they are full documents.
  32851. * [TODO : We may actually want to use a SAX Push parser].
  32852. *
  32853. * Since all XMPP traffic starts with
  32854. * <stream:stream version='1.0'
  32855. * xml:lang='en'
  32856. * xmlns='jabber:client'
  32857. * xmlns:stream='http://etherx.jabber.org/streams'
  32858. * id='3697395463'
  32859. * from='SERVER'>
  32860. *
  32861. * The first stanza will always fail to be parsed.
  32862. *
  32863. * Additionally, the seconds stanza will always be <stream:features> with
  32864. * the stream NS defined in the previous stanza, so we need to 'force'
  32865. * the inclusion of the NS in this stanza.
  32866. *
  32867. * Parameters:
  32868. * (string) message - The websocket message.
  32869. */
  32870. _onMessage: function(message) {
  32871. var elem, data;
  32872. // check for closing stream
  32873. var close = '<close xmlns="urn:ietf:params:xml:ns:xmpp-framing" />';
  32874. if (message.data === close) {
  32875. this._conn.rawInput(close);
  32876. this._conn.xmlInput(message);
  32877. if (!this._conn.disconnecting) {
  32878. this._conn._doDisconnect();
  32879. }
  32880. return;
  32881. } else if (message.data.search("<open ") === 0) {
  32882. // This handles stream restarts
  32883. elem = new DOMParser().parseFromString(message.data, "text/xml").documentElement;
  32884. if (!this._handleStreamStart(elem)) {
  32885. return;
  32886. }
  32887. } else {
  32888. data = this._streamWrap(message.data);
  32889. elem = new DOMParser().parseFromString(data, "text/xml").documentElement;
  32890. }
  32891. if (this._check_streamerror(elem, Strophe.Status.ERROR)) {
  32892. return;
  32893. }
  32894. //handle unavailable presence stanza before disconnecting
  32895. if (this._conn.disconnecting &&
  32896. elem.firstChild.nodeName === "presence" &&
  32897. elem.firstChild.getAttribute("type") === "unavailable") {
  32898. this._conn.xmlInput(elem);
  32899. this._conn.rawInput(Strophe.serialize(elem));
  32900. // if we are already disconnecting we will ignore the unavailable stanza and
  32901. // wait for the </stream:stream> tag before we close the connection
  32902. return;
  32903. }
  32904. this._conn._dataRecv(elem, message.data);
  32905. },
  32906. /** PrivateFunction: _onOpen
  32907. * _Private_ function to handle websockets connection setup.
  32908. *
  32909. * The opening stream tag is sent here.
  32910. */
  32911. _onOpen: function() {
  32912. Strophe.info("Websocket open");
  32913. var start = this._buildStream();
  32914. this._conn.xmlOutput(start.tree());
  32915. var startString = Strophe.serialize(start);
  32916. this._conn.rawOutput(startString);
  32917. this.socket.send(startString);
  32918. },
  32919. /** PrivateFunction: _reqToData
  32920. * _Private_ function to get a stanza out of a request.
  32921. *
  32922. * WebSockets don't use requests, so the passed argument is just returned.
  32923. *
  32924. * Parameters:
  32925. * (Object) stanza - The stanza.
  32926. *
  32927. * Returns:
  32928. * The stanza that was passed.
  32929. */
  32930. _reqToData: function (stanza) {
  32931. return stanza;
  32932. },
  32933. /** PrivateFunction: _send
  32934. * _Private_ part of the Connection.send function for WebSocket
  32935. *
  32936. * Just flushes the messages that are in the queue
  32937. */
  32938. _send: function () {
  32939. this._conn.flush();
  32940. },
  32941. /** PrivateFunction: _sendRestart
  32942. *
  32943. * Send an xmpp:restart stanza.
  32944. */
  32945. _sendRestart: function () {
  32946. clearTimeout(this._conn._idleTimeout);
  32947. this._conn._onIdle.bind(this._conn)();
  32948. }
  32949. };
  32950. return Strophe;
  32951. }));
  32952. (function(root){
  32953. if(typeof define === 'function' && define.amd){
  32954. define('strophe',[
  32955. "strophe-core",
  32956. "strophe-bosh",
  32957. "strophe-websocket"
  32958. ], function (wrapper) {
  32959. return wrapper;
  32960. });
  32961. }
  32962. })(this);
  32963. require(["strophe-polyfill"]);
  32964. /* jshint ignore:start */
  32965. //The modules for your project will be inlined above
  32966. //this snippet. Ask almond to synchronously require the
  32967. //module value for 'main' here and return it as the
  32968. //value to use for the public API for the built file.
  32969. return require('strophe');
  32970. }));
  32971. /* jshint ignore:end */
  32972. ;
  32973. function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
  32974. // Converse.js (A browser based XMPP chat client)
  32975. // http://conversejs.org
  32976. //
  32977. // This is the utilities module.
  32978. //
  32979. // Copyright (c) 2012-2017, Jan-Carel Brand <jc@opkode.com>
  32980. // Licensed under the Mozilla Public License (MPLv2)
  32981. //
  32982. /*global define, escape, window */
  32983. (function (root, factory) {
  32984. define('utils',["sizzle", "es6-promise", "lodash.noconflict", "strophe"], factory);
  32985. })(void 0, function (sizzle, Promise, _, Strophe) {
  32986. "use strict";
  32987. var b64_sha1 = Strophe.SHA1.b64_sha1;
  32988. Strophe = Strophe.Strophe;
  32989. var URL_REGEX = /\b(https?:\/\/|www\.|https?:\/\/www\.)[^\s<>]{2,200}\b\/?/g;
  32990. var logger = _.assign({
  32991. 'debug': _.get(console, 'log') ? console.log.bind(console) : _.noop,
  32992. 'error': _.get(console, 'log') ? console.log.bind(console) : _.noop,
  32993. 'info': _.get(console, 'log') ? console.log.bind(console) : _.noop,
  32994. 'warn': _.get(console, 'log') ? console.log.bind(console) : _.noop
  32995. }, console);
  32996. var unescapeHTML = function unescapeHTML(htmlEscapedText) {
  32997. /* Helper method that replace HTML-escaped symbols with equivalent characters
  32998. * (e.g. transform occurrences of '&amp;' to '&')
  32999. *
  33000. * Parameters:
  33001. * (String) htmlEscapedText: a String containing the HTML-escaped symbols.
  33002. */
  33003. var div = document.createElement('div');
  33004. div.innerHTML = htmlEscapedText;
  33005. return div.innerText;
  33006. };
  33007. var isImage = function isImage(url) {
  33008. return new Promise(function (resolve, reject) {
  33009. var img = new Image();
  33010. var timer = window.setTimeout(function () {
  33011. reject(new Error("Could not determine whether it's an image"));
  33012. img = null;
  33013. }, 3000);
  33014. img.onerror = img.onabort = function () {
  33015. clearTimeout(timer);
  33016. reject(new Error("Could not determine whether it's an image"));
  33017. };
  33018. img.onload = function () {
  33019. clearTimeout(timer);
  33020. resolve(img);
  33021. };
  33022. img.src = url;
  33023. });
  33024. };
  33025. function slideOutWrapup(el) {
  33026. /* Wrapup function for slideOut. */
  33027. el.removeAttribute('data-slider-marker');
  33028. el.classList.remove('collapsed');
  33029. el.style.overflow = "";
  33030. el.style.height = "";
  33031. }
  33032. var u = {};
  33033. u.getNextElement = function (el) {
  33034. var selector = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '*';
  33035. var next_el = el.nextElementSibling;
  33036. while (!_.isNull(next_el) && !sizzle.matchesSelector(next_el, selector)) {
  33037. next_el = next_el.nextElementSibling;
  33038. }
  33039. return next_el;
  33040. };
  33041. u.getPreviousElement = function (el) {
  33042. var selector = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '*';
  33043. var prev_el = el.previousSibling;
  33044. while (!_.isNull(prev_el) && !sizzle.matchesSelector(prev_el, selector)) {
  33045. prev_el = prev_el.previousSibling;
  33046. }
  33047. return prev_el;
  33048. };
  33049. u.getFirstChildElement = function (el) {
  33050. var selector = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '*';
  33051. var first_el = el.firstElementChild;
  33052. while (!_.isNull(first_el) && !sizzle.matchesSelector(first_el, selector)) {
  33053. first_el = first_el.nextSibling;
  33054. }
  33055. return first_el;
  33056. };
  33057. u.getLastChildElement = function (el) {
  33058. var selector = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '*';
  33059. var last_el = el.lastElementChild;
  33060. while (!_.isNull(last_el) && !sizzle.matchesSelector(last_el, selector)) {
  33061. last_el = last_el.previousSibling;
  33062. }
  33063. return last_el;
  33064. };
  33065. u.calculateElementHeight = function (el) {
  33066. /* Return the height of the passed in DOM element,
  33067. * based on the heights of its children.
  33068. */
  33069. return _.reduce(el.children, function (result, child) {
  33070. return result + child.offsetHeight;
  33071. }, 0);
  33072. };
  33073. u.addClass = function (className, el) {
  33074. if (el instanceof Element) {
  33075. el.classList.add(className);
  33076. }
  33077. };
  33078. u.removeClass = function (className, el) {
  33079. if (el instanceof Element) {
  33080. el.classList.remove(className);
  33081. }
  33082. return el;
  33083. };
  33084. u.removeElement = function (el) {
  33085. if (!_.isNil(el) && !_.isNil(el.parentNode)) {
  33086. el.parentNode.removeChild(el);
  33087. }
  33088. };
  33089. u.showElement = _.flow(_.partial(u.removeClass, 'collapsed'), _.partial(u.removeClass, 'hidden'));
  33090. u.hideElement = function (el) {
  33091. if (!_.isNil(el)) {
  33092. el.classList.add('hidden');
  33093. }
  33094. return el;
  33095. };
  33096. u.ancestor = function (el, selector) {
  33097. var parent = el;
  33098. while (!_.isNil(parent) && !sizzle.matchesSelector(parent, selector)) {
  33099. parent = parent.parentElement;
  33100. }
  33101. return parent;
  33102. };
  33103. u.nextUntil = function (el, selector) {
  33104. var include_self = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  33105. /* Return the element's siblings until one matches the selector. */
  33106. var matches = [];
  33107. var sibling_el = el.nextElementSibling;
  33108. while (!_.isNil(sibling_el) && !sibling_el.matches(selector)) {
  33109. matches.push(sibling_el);
  33110. sibling_el = sibling_el.nextElementSibling;
  33111. }
  33112. return matches;
  33113. };
  33114. u.addHyperlinks = function (text) {
  33115. var list = text.match(URL_REGEX) || [];
  33116. var links = [];
  33117. _.each(list, function (match) {
  33118. var prot = match.indexOf('http://') === 0 || match.indexOf('https://') === 0 ? '' : 'http://';
  33119. var url = prot + encodeURI(decodeURI(match)).replace(/[!'()]/g, escape).replace(/\*/g, "%2A");
  33120. var a = '<a target="_blank" rel="noopener" href="' + url + '">' + _.escape(match) + '</a>'; // We first insert a hash of the code that will be inserted, and
  33121. // then later replace that with the code itself. That way we avoid
  33122. // issues when some matches are substrings of others.
  33123. links.push(a);
  33124. text = text.replace(match, b64_sha1(a));
  33125. });
  33126. while (links.length) {
  33127. var a = links.pop();
  33128. text = text.replace(b64_sha1(a), a);
  33129. }
  33130. return text;
  33131. };
  33132. u.renderImageURLs = function (obj) {
  33133. /* Returns a Promise which resolves once all images have been loaded.
  33134. */
  33135. var list = obj.textContent.match(URL_REGEX) || [];
  33136. return Promise.all(_.map(list, function (url) {
  33137. return new Promise(function (resolve, reject) {
  33138. return isImage(url).then(function (img) {
  33139. // XXX: need to create a new image, otherwise the event
  33140. // listener doesn't fire
  33141. var i = new Image();
  33142. i.className = 'chat-image';
  33143. i.src = img.src;
  33144. i.addEventListener('load', resolve); // We also resolve for non-images, otherwise the
  33145. // Promise.all resolves prematurely.
  33146. i.addEventListener('error', resolve);
  33147. var anchors = sizzle("a[href=\"".concat(url, "\"]"), obj);
  33148. _.each(anchors, function (a) {
  33149. a.replaceChild(i, a.firstChild);
  33150. });
  33151. }).catch(resolve);
  33152. });
  33153. }));
  33154. };
  33155. u.slideInAllElements = function (elements) {
  33156. var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 300;
  33157. return Promise.all(_.map(elements, _.partial(u.slideIn, _, duration)));
  33158. };
  33159. u.slideToggleElement = function (el, duration) {
  33160. if (_.includes(el.classList, 'collapsed') || _.includes(el.classList, 'hidden')) {
  33161. return u.slideOut(el, duration);
  33162. } else {
  33163. return u.slideIn(el, duration);
  33164. }
  33165. };
  33166. u.hasClass = function (className, el) {
  33167. return _.includes(el.classList, className);
  33168. };
  33169. u.slideOut = function (el) {
  33170. var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 200;
  33171. /* Shows/expands an element by sliding it out of itself
  33172. *
  33173. * Parameters:
  33174. * (HTMLElement) el - The HTML string
  33175. * (Number) duration - The duration amount in milliseconds
  33176. */
  33177. return new Promise(function (resolve, reject) {
  33178. if (_.isNil(el)) {
  33179. var err = "Undefined or null element passed into slideOut";
  33180. logger.warn(err);
  33181. reject(new Error(err));
  33182. return;
  33183. }
  33184. var marker = el.getAttribute('data-slider-marker');
  33185. if (marker) {
  33186. el.removeAttribute('data-slider-marker');
  33187. window.cancelAnimationFrame(marker);
  33188. }
  33189. var end_height = u.calculateElementHeight(el);
  33190. if (window.converse_disable_effects) {
  33191. // Effects are disabled (for tests)
  33192. el.style.height = end_height + 'px';
  33193. slideOutWrapup(el);
  33194. resolve();
  33195. return;
  33196. }
  33197. if (!u.hasClass('collapsed', el) && !u.hasClass('hidden', el)) {
  33198. resolve();
  33199. return;
  33200. }
  33201. var steps = duration / 17; // We assume 17ms per animation which is ~60FPS
  33202. var height = 0;
  33203. function draw() {
  33204. height += end_height / steps;
  33205. if (height < end_height) {
  33206. el.style.height = height + 'px';
  33207. el.setAttribute('data-slider-marker', window.requestAnimationFrame(draw));
  33208. } else {
  33209. // We recalculate the height to work around an apparent
  33210. // browser bug where browsers don't know the correct
  33211. // offsetHeight beforehand.
  33212. el.removeAttribute('data-slider-marker');
  33213. el.style.height = u.calculateElementHeight(el) + 'px';
  33214. el.style.overflow = "";
  33215. el.style.height = "";
  33216. resolve();
  33217. }
  33218. }
  33219. el.style.height = '0';
  33220. el.style.overflow = 'hidden';
  33221. el.classList.remove('hidden');
  33222. el.classList.remove('collapsed');
  33223. el.setAttribute('data-slider-marker', window.requestAnimationFrame(draw));
  33224. });
  33225. };
  33226. u.slideIn = function (el) {
  33227. var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 200;
  33228. /* Hides/collapses an element by sliding it into itself. */
  33229. return new Promise(function (resolve, reject) {
  33230. if (_.isNil(el)) {
  33231. var err = "Undefined or null element passed into slideIn";
  33232. logger.warn(err);
  33233. return reject(new Error(err));
  33234. } else if (_.includes(el.classList, 'collapsed')) {
  33235. return resolve(el);
  33236. } else if (window.converse_disable_effects) {
  33237. // Effects are disabled (for tests)
  33238. el.classList.add('collapsed');
  33239. el.style.height = "";
  33240. return resolve(el);
  33241. }
  33242. var marker = el.getAttribute('data-slider-marker');
  33243. if (marker) {
  33244. el.removeAttribute('data-slider-marker');
  33245. window.cancelAnimationFrame(marker);
  33246. }
  33247. var original_height = el.offsetHeight,
  33248. steps = duration / 17; // We assume 17ms per animation which is ~60FPS
  33249. var height = original_height;
  33250. el.style.overflow = 'hidden';
  33251. function draw() {
  33252. height -= original_height / steps;
  33253. if (height > 0) {
  33254. el.style.height = height + 'px';
  33255. el.setAttribute('data-slider-marker', window.requestAnimationFrame(draw));
  33256. } else {
  33257. el.removeAttribute('data-slider-marker');
  33258. el.classList.add('collapsed');
  33259. el.style.height = "";
  33260. resolve(el);
  33261. }
  33262. }
  33263. el.setAttribute('data-slider-marker', window.requestAnimationFrame(draw));
  33264. });
  33265. };
  33266. function afterAnimationEnds(el, callback) {
  33267. el.classList.remove('visible');
  33268. if (_.isFunction(callback)) {
  33269. callback();
  33270. }
  33271. }
  33272. u.fadeIn = function (el, callback) {
  33273. if (_.isNil(el)) {
  33274. logger.warn("Undefined or null element passed into fadeIn");
  33275. }
  33276. if (window.converse_disable_effects) {
  33277. el.classList.remove('hidden');
  33278. return afterAnimationEnds(el, callback);
  33279. }
  33280. if (_.includes(el.classList, 'hidden')) {
  33281. el.classList.add('visible');
  33282. el.classList.remove('hidden');
  33283. el.addEventListener("webkitAnimationEnd", _.partial(afterAnimationEnds, el, callback));
  33284. el.addEventListener("animationend", _.partial(afterAnimationEnds, el, callback));
  33285. el.addEventListener("oanimationend", _.partial(afterAnimationEnds, el, callback));
  33286. } else {
  33287. afterAnimationEnds(el, callback);
  33288. }
  33289. };
  33290. u.isValidJID = function (jid) {
  33291. return _.compact(jid.split('@')).length === 2 && !jid.startsWith('@') && !jid.endsWith('@');
  33292. };
  33293. u.isValidMUCJID = function (jid) {
  33294. return !jid.startsWith('@') && !jid.endsWith('@');
  33295. };
  33296. u.isSameBareJID = function (jid1, jid2) {
  33297. return Strophe.getBareJidFromJid(jid1).toLowerCase() === Strophe.getBareJidFromJid(jid2).toLowerCase();
  33298. };
  33299. u.getMostRecentMessage = function (model) {
  33300. var messages = model.messages.filter('message');
  33301. return messages[messages.length - 1];
  33302. };
  33303. u.isNewMessage = function (message) {
  33304. /* Given a stanza, determine whether it's a new
  33305. * message, i.e. not a MAM archived one.
  33306. */
  33307. if (message instanceof Element) {
  33308. return !sizzle('result[xmlns="' + Strophe.NS.MAM + '"]', message).length && !sizzle('delay[xmlns="' + Strophe.NS.DELAY + '"]', message).length;
  33309. } else {
  33310. return !message.get('delayed');
  33311. }
  33312. };
  33313. u.isOTRMessage = function (message) {
  33314. var body = message.querySelector('body'),
  33315. text = !_.isNull(body) ? body.textContent : undefined;
  33316. return text && !!text.match(/^\?OTR/);
  33317. };
  33318. u.isHeadlineMessage = function (_converse, message) {
  33319. var from_jid = message.getAttribute('from');
  33320. if (message.getAttribute('type') === 'headline') {
  33321. return true;
  33322. }
  33323. var chatbox = _converse.chatboxes.get(Strophe.getBareJidFromJid(from_jid));
  33324. if (chatbox && chatbox.get('type') === 'chatroom') {
  33325. return false;
  33326. }
  33327. if (message.getAttribute('type') !== 'error' && !_.isNil(from_jid) && !_.includes(from_jid, '@')) {
  33328. // Some servers (I'm looking at you Prosody) don't set the message
  33329. // type to "headline" when sending server messages. For now we
  33330. // check if an @ signal is included, and if not, we assume it's
  33331. // a headline message.
  33332. return true;
  33333. }
  33334. return false;
  33335. };
  33336. u.merge = function merge(first, second) {
  33337. /* Merge the second object into the first one.
  33338. */
  33339. for (var k in second) {
  33340. if (_.isObject(first[k])) {
  33341. merge(first[k], second[k]);
  33342. } else {
  33343. first[k] = second[k];
  33344. }
  33345. }
  33346. };
  33347. u.applyUserSettings = function applyUserSettings(context, settings, user_settings) {
  33348. /* Configuration settings might be nested objects. We only want to
  33349. * add settings which are whitelisted.
  33350. */
  33351. for (var k in settings) {
  33352. if (_.isUndefined(user_settings[k])) {
  33353. continue;
  33354. }
  33355. if (_.isObject(settings[k]) && !_.isArray(settings[k])) {
  33356. applyUserSettings(context[k], settings[k], user_settings[k]);
  33357. } else {
  33358. context[k] = user_settings[k];
  33359. }
  33360. }
  33361. };
  33362. u.stringToNode = function (s) {
  33363. /* Converts an HTML string into a DOM Node.
  33364. * Expects that the HTML string has only one top-level element,
  33365. * i.e. not multiple ones.
  33366. *
  33367. * Parameters:
  33368. * (String) s - The HTML string
  33369. */
  33370. var div = document.createElement('div');
  33371. div.innerHTML = s;
  33372. return div.firstChild;
  33373. };
  33374. u.getOuterWidth = function (el) {
  33375. var include_margin = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  33376. var width = el.offsetWidth;
  33377. if (!include_margin) {
  33378. return width;
  33379. }
  33380. var style = window.getComputedStyle(el);
  33381. width += parseInt(style.marginLeft, 10) + parseInt(style.marginRight, 10);
  33382. return width;
  33383. };
  33384. u.stringToElement = function (s) {
  33385. /* Converts an HTML string into a DOM element.
  33386. * Expects that the HTML string has only one top-level element,
  33387. * i.e. not multiple ones.
  33388. *
  33389. * Parameters:
  33390. * (String) s - The HTML string
  33391. */
  33392. var div = document.createElement('div');
  33393. div.innerHTML = s;
  33394. return div.firstElementChild;
  33395. };
  33396. u.matchesSelector = function (el, selector) {
  33397. /* Checks whether the DOM element matches the given selector.
  33398. *
  33399. * Parameters:
  33400. * (DOMElement) el - The DOM element
  33401. * (String) selector - The selector
  33402. */
  33403. return (el.matches || el.matchesSelector || el.msMatchesSelector || el.mozMatchesSelector || el.webkitMatchesSelector || el.oMatchesSelector).call(el, selector);
  33404. };
  33405. u.queryChildren = function (el, selector) {
  33406. /* Returns a list of children of the DOM element that match the
  33407. * selector.
  33408. *
  33409. * Parameters:
  33410. * (DOMElement) el - the DOM element
  33411. * (String) selector - the selector they should be matched
  33412. * against.
  33413. */
  33414. return _.filter(el.children, _.partial(u.matchesSelector, _, selector));
  33415. };
  33416. u.contains = function (attr, query) {
  33417. return function (item) {
  33418. if (_typeof(attr) === 'object') {
  33419. var value = false;
  33420. _.forEach(attr, function (a) {
  33421. value = value || _.includes(item.get(a).toLowerCase(), query.toLowerCase());
  33422. });
  33423. return value;
  33424. } else if (typeof attr === 'string') {
  33425. return _.includes(item.get(attr).toLowerCase(), query.toLowerCase());
  33426. } else {
  33427. throw new TypeError('contains: wrong attribute type. Must be string or array.');
  33428. }
  33429. };
  33430. };
  33431. u.isOfType = function (type, item) {
  33432. return item.get('type') == type;
  33433. };
  33434. u.isInstance = function (type, item) {
  33435. return item instanceof type;
  33436. };
  33437. u.getAttribute = function (key, item) {
  33438. return item.get(key);
  33439. };
  33440. u.contains.not = function (attr, query) {
  33441. return function (item) {
  33442. return !u.contains(attr, query)(item);
  33443. };
  33444. };
  33445. u.createFragmentFromText = function (markup) {
  33446. /* Returns a DocumentFragment containing DOM nodes based on the
  33447. * passed-in markup text.
  33448. */
  33449. // http://stackoverflow.com/questions/9334645/create-node-from-markup-string
  33450. var frag = document.createDocumentFragment(),
  33451. tmp = document.createElement('body'),
  33452. child;
  33453. tmp.innerHTML = markup; // Append elements in a loop to a DocumentFragment, so that the
  33454. // browser does not re-render the document for each node.
  33455. while (child = tmp.firstChild) {
  33456. // eslint-disable-line no-cond-assign
  33457. frag.appendChild(child);
  33458. }
  33459. return frag;
  33460. };
  33461. u.addEmoji = function (_converse, emojione, text) {
  33462. if (_converse.use_emojione) {
  33463. return emojione.toImage(text);
  33464. } else {
  33465. return emojione.shortnameToUnicode(text);
  33466. }
  33467. };
  33468. u.getEmojisByCategory = function (_converse, emojione) {
  33469. /* Return a dict of emojis with the categories as keys and
  33470. * lists of emojis in that category as values.
  33471. */
  33472. if (_.isUndefined(_converse.emojis_by_category)) {
  33473. var emojis = _.values(_.mapValues(emojione.emojioneList, function (value, key, o) {
  33474. value._shortname = key;
  33475. return value;
  33476. }));
  33477. var tones = [':tone1:', ':tone2:', ':tone3:', ':tone4:', ':tone5:'];
  33478. var excluded = [':kiss_ww:', ':kiss_mm:', ':kiss_woman_man:'];
  33479. var excluded_substrings = [':woman', ':man', ':women_', ':men_', '_man_', '_woman_', '_woman:', '_man:'];
  33480. var excluded_categories = ['modifier', 'regional'];
  33481. var categories = _.difference(_.uniq(_.map(emojis, _.partial(_.get, _, 'category'))), excluded_categories);
  33482. var emojis_by_category = {};
  33483. _.forEach(categories, function (cat) {
  33484. var list = _.sortBy(_.filter(emojis, ['category', cat]), ['uc_base']);
  33485. list = _.filter(list, function (item) {
  33486. return !_.includes(_.concat(tones, excluded), item._shortname) && !_.some(excluded_substrings, _.partial(_.includes, item._shortname));
  33487. });
  33488. if (cat === 'people') {
  33489. var idx = _.findIndex(list, ['uc_base', '1f600']);
  33490. list = _.union(_.slice(list, idx), _.slice(list, 0, idx + 1));
  33491. } else if (cat === 'activity') {
  33492. list = _.union(_.slice(list, 27 - 1), _.slice(list, 0, 27));
  33493. } else if (cat === 'objects') {
  33494. list = _.union(_.slice(list, 24 - 1), _.slice(list, 0, 24));
  33495. } else if (cat === 'travel') {
  33496. list = _.union(_.slice(list, 17 - 1), _.slice(list, 0, 17));
  33497. } else if (cat === 'symbols') {
  33498. list = _.union(_.slice(list, 60 - 1), _.slice(list, 0, 60));
  33499. }
  33500. emojis_by_category[cat] = list;
  33501. });
  33502. _converse.emojis_by_category = emojis_by_category;
  33503. }
  33504. return _converse.emojis_by_category;
  33505. };
  33506. u.getTonedEmojis = function (_converse) {
  33507. _converse.toned_emojis = _.uniq(_.map(_.filter(u.getEmojisByCategory(_converse).people, function (person) {
  33508. return _.includes(person._shortname, '_tone');
  33509. }), function (person) {
  33510. return person._shortname.replace(/_tone[1-5]/, '');
  33511. }));
  33512. return _converse.toned_emojis;
  33513. };
  33514. u.isPersistableModel = function (model) {
  33515. return model.collection && model.collection.browserStorage;
  33516. };
  33517. u.getResolveablePromise = function () {
  33518. /* Returns a promise object on which `resolve` or `reject` can be
  33519. * called.
  33520. */
  33521. var wrapper = {};
  33522. var promise = new Promise(function (resolve, reject) {
  33523. wrapper.resolve = resolve;
  33524. wrapper.reject = reject;
  33525. });
  33526. _.assign(promise, wrapper);
  33527. return promise;
  33528. };
  33529. u.interpolate = function (string, o) {
  33530. return string.replace(/{{{([^{}]*)}}}/g, function (a, b) {
  33531. var r = o[b];
  33532. return typeof r === 'string' || typeof r === 'number' ? r : a;
  33533. });
  33534. };
  33535. u.onMultipleEvents = function () {
  33536. var events = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  33537. var callback = arguments.length > 1 ? arguments[1] : undefined;
  33538. /* Call the callback once all the events have been triggered
  33539. *
  33540. * Parameters:
  33541. * (Array) events: An array of objects, with keys `object` and
  33542. * `event`, representing the event name and the object it's
  33543. * triggered upon.
  33544. * (Function) callback: The function to call once all events have
  33545. * been triggered.
  33546. */
  33547. var triggered = [];
  33548. function handler(result) {
  33549. triggered.push(result);
  33550. if (events.length === triggered.length) {
  33551. callback(triggered);
  33552. triggered = [];
  33553. }
  33554. }
  33555. _.each(events, function (map) {
  33556. return map.object.on(map.event, handler);
  33557. });
  33558. };
  33559. u.safeSave = function (model, attributes) {
  33560. if (u.isPersistableModel(model)) {
  33561. model.save(attributes);
  33562. } else {
  33563. model.set(attributes);
  33564. }
  33565. };
  33566. u.isVisible = function (el) {
  33567. if (u.hasClass('hidden', el)) {
  33568. return false;
  33569. } // XXX: Taken from jQuery's "visible" implementation
  33570. return el.offsetWidth > 0 || el.offsetHeight > 0 || el.getClientRects().length > 0;
  33571. };
  33572. u.triggerEvent = function (el, name) {
  33573. var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "Event";
  33574. var bubbles = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
  33575. var cancelable = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;
  33576. var evt = document.createEvent(type);
  33577. evt.initEvent(name, bubbles, cancelable);
  33578. el.dispatchEvent(evt);
  33579. };
  33580. return u;
  33581. });
  33582. //# sourceMappingURL=utils.js.map;
  33583. (function (global, factory) {
  33584. if (typeof define === "function" && define.amd) {
  33585. define('pluggable',['exports', 'lodash'], factory);
  33586. } else if (typeof exports !== "undefined") {
  33587. factory(exports, require('lodash'));
  33588. } else {
  33589. var mod = {
  33590. exports: {}
  33591. };
  33592. factory(mod.exports, global._);
  33593. global.pluggable = mod.exports;
  33594. }
  33595. })(this, function (exports, _lodash) {
  33596. 'use strict';
  33597. Object.defineProperty(exports, "__esModule", {
  33598. value: true
  33599. });
  33600. exports.enable = undefined;
  33601. var _ = _interopRequireWildcard(_lodash);
  33602. function _interopRequireWildcard(obj) {
  33603. if (obj && obj.__esModule) {
  33604. return obj;
  33605. } else {
  33606. var newObj = {};
  33607. if (obj != null) {
  33608. for (var key in obj) {
  33609. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  33610. }
  33611. }
  33612. newObj.default = obj;
  33613. return newObj;
  33614. }
  33615. }
  33616. var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
  33617. return typeof obj;
  33618. } : function (obj) {
  33619. return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
  33620. };
  33621. // The `PluginSocket` class contains the plugin architecture, and gets
  33622. // created whenever `pluggable.enable(obj);` is called on the object
  33623. // that you want to make pluggable.
  33624. // You can also see it as the thing into which the plugins are plugged.
  33625. // It takes two parameters, first, the object being made pluggable, and
  33626. // then the name by which the pluggable object may be referenced on the
  33627. // __super__ object (inside overrides).
  33628. function PluginSocket(plugged, name) {
  33629. this.name = name;
  33630. this.plugged = plugged;
  33631. if (typeof this.plugged.__super__ === 'undefined') {
  33632. this.plugged.__super__ = {};
  33633. } else if (typeof this.plugged.__super__ === 'string') {
  33634. this.plugged.__super__ = { '__string__': this.plugged.__super__ };
  33635. }
  33636. this.plugged.__super__[name] = this.plugged;
  33637. this.plugins = {};
  33638. this.initialized_plugins = [];
  33639. }
  33640. // Now we add methods to the PluginSocket by adding them to its
  33641. // prototype.
  33642. _.extend(PluginSocket.prototype, {
  33643. // `wrappedOverride` creates a partially applied wrapper function
  33644. // that makes sure to set the proper super method when the
  33645. // overriding method is called. This is done to enable
  33646. // chaining of plugin methods, all the way up to the
  33647. // original method.
  33648. wrappedOverride: function wrappedOverride(key, value, super_method, default_super) {
  33649. if (typeof super_method === "function") {
  33650. if (typeof this.__super__ === "undefined") {
  33651. /* We're not on the context of the plugged object.
  33652. * This can happen when the overridden method is called via
  33653. * an event handler or when it's a constructor.
  33654. *
  33655. * In this case, we simply tack on the __super__ obj.
  33656. */
  33657. this.__super__ = default_super;
  33658. }
  33659. this.__super__[key] = super_method.bind(this);
  33660. }
  33661. return value.apply(this, _.drop(arguments, 4));
  33662. },
  33663. // `_overrideAttribute` overrides an attribute on the original object
  33664. // (the thing being plugged into).
  33665. //
  33666. // If the attribute being overridden is a function, then the original
  33667. // function will still be available via the `__super__` attribute.
  33668. //
  33669. // If the same function is being overridden multiple times, then
  33670. // the original function will be available at the end of a chain of
  33671. // functions, starting from the most recent override, all the way
  33672. // back to the original function, each being referenced by the
  33673. // previous' __super__ attribute.
  33674. //
  33675. // For example:
  33676. //
  33677. // `plugin2.MyFunc.__super__.myFunc => plugin1.MyFunc.__super__.myFunc => original.myFunc`
  33678. _overrideAttribute: function _overrideAttribute(key, plugin) {
  33679. var value = plugin.overrides[key];
  33680. if (typeof value === "function") {
  33681. var default_super = {};
  33682. default_super[this.name] = this.plugged;
  33683. var wrapped_function = _.partial(this.wrappedOverride, key, value, this.plugged[key], default_super);
  33684. this.plugged[key] = wrapped_function;
  33685. } else {
  33686. this.plugged[key] = value;
  33687. }
  33688. },
  33689. _extendObject: function _extendObject(obj, attributes) {
  33690. if (!obj.prototype.__super__) {
  33691. obj.prototype.__super__ = {};
  33692. obj.prototype.__super__[this.name] = this.plugged;
  33693. }
  33694. var that = this;
  33695. _.each(attributes, function (value, key) {
  33696. if (key === 'events') {
  33697. obj.prototype[key] = _.extend(value, obj.prototype[key]);
  33698. } else if (typeof value === 'function') {
  33699. // We create a partially applied wrapper function, that
  33700. // makes sure to set the proper super method when the
  33701. // overriding method is called. This is done to enable
  33702. // chaining of plugin methods, all the way up to the
  33703. // original method.
  33704. var default_super = {};
  33705. default_super[that.name] = that.plugged;
  33706. var wrapped_function = _.partial(that.wrappedOverride, key, value, obj.prototype[key], default_super);
  33707. obj.prototype[key] = wrapped_function;
  33708. } else {
  33709. obj.prototype[key] = value;
  33710. }
  33711. });
  33712. },
  33713. // Plugins can specify dependencies (by means of the
  33714. // `dependencies` list attribute) which refers to dependencies
  33715. // which will be initialized first, before the plugin itself gets initialized.
  33716. //
  33717. // If `strict_plugin_dependencies` is set to `false` (on the object being
  33718. // made pluggable), then no error will be thrown if any of these plugins aren't
  33719. // available.
  33720. loadPluginDependencies: function loadPluginDependencies(plugin) {
  33721. var _this = this;
  33722. _.each(plugin.dependencies, function (name) {
  33723. var dep = _this.plugins[name];
  33724. if (dep) {
  33725. if (_.includes(dep.dependencies, plugin.__name__)) {
  33726. /* FIXME: circular dependency checking is only one level deep. */
  33727. throw "Found a circular dependency between the plugins \"" + plugin.__name__ + "\" and \"" + name + "\"";
  33728. }
  33729. _this.initializePlugin(dep);
  33730. } else {
  33731. _this.throwUndefinedDependencyError("Could not find dependency \"" + name + "\" " + "for the plugin \"" + plugin.__name__ + "\". " + "If it's needed, make sure it's loaded by require.js");
  33732. }
  33733. });
  33734. },
  33735. throwUndefinedDependencyError: function throwUndefinedDependencyError(msg) {
  33736. if (this.plugged.strict_plugin_dependencies) {
  33737. throw msg;
  33738. } else {
  33739. console.log(msg);
  33740. return;
  33741. }
  33742. },
  33743. // `applyOverrides` is called by initializePlugin. It applies any
  33744. // and all overrides of methods or Backbone views and models that
  33745. // are defined on any of the plugins.
  33746. applyOverrides: function applyOverrides(plugin) {
  33747. var _this2 = this;
  33748. _.each(Object.keys(plugin.overrides || {}), function (key) {
  33749. var override = plugin.overrides[key];
  33750. if ((typeof override === 'undefined' ? 'undefined' : _typeof(override)) === "object") {
  33751. if (typeof _this2.plugged[key] === 'undefined') {
  33752. _this2.throwUndefinedDependencyError("Error: Plugin \"" + plugin.__name__ + "\" tried to override " + key + " but it's not found.");
  33753. } else {
  33754. _this2._extendObject(_this2.plugged[key], override);
  33755. }
  33756. } else {
  33757. _this2._overrideAttribute(key, plugin);
  33758. }
  33759. });
  33760. },
  33761. // `initializePlugin` applies the overrides (if any) defined on all
  33762. // the registered plugins and then calls the initialize method of the plugin
  33763. initializePlugin: function initializePlugin(plugin) {
  33764. if (!_.includes(_.keys(this.allowed_plugins), plugin.__name__)) {
  33765. /* Don't initialize disallowed plugins. */
  33766. return;
  33767. }
  33768. if (_.includes(this.initialized_plugins, plugin.__name__)) {
  33769. /* Don't initialize plugins twice, otherwise we get
  33770. * infinite recursion in overridden methods.
  33771. */
  33772. return;
  33773. }
  33774. if (_.isBoolean(plugin.enabled) && plugin.enabled || _.isFunction(plugin.enabled) && plugin.enabled(this.plugged) || _.isNil(plugin.enabled)) {
  33775. _.extend(plugin, this.properties);
  33776. if (plugin.dependencies) {
  33777. this.loadPluginDependencies(plugin);
  33778. }
  33779. this.applyOverrides(plugin);
  33780. if (typeof plugin.initialize === "function") {
  33781. plugin.initialize.bind(plugin)(this);
  33782. }
  33783. this.initialized_plugins.push(plugin.__name__);
  33784. }
  33785. },
  33786. // `registerPlugin` registers (or inserts, if you'd like) a plugin,
  33787. // by adding it to the `plugins` map on the PluginSocket instance.
  33788. registerPlugin: function registerPlugin(name, plugin) {
  33789. if (name in this.plugins) {
  33790. throw new Error('Error: Plugin name ' + name + ' is already taken');
  33791. }
  33792. plugin.__name__ = name;
  33793. this.plugins[name] = plugin;
  33794. },
  33795. // `initializePlugins` should get called once all plugins have been
  33796. // registered. It will then iterate through all the plugins, calling
  33797. // `initializePlugin` for each.
  33798. // The passed in properties variable is an object with attributes and methods
  33799. // which will be attached to the plugins.
  33800. initializePlugins: function initializePlugins() {
  33801. var properties = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  33802. var whitelist = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
  33803. var blacklist = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
  33804. if (!_.size(this.plugins)) {
  33805. return;
  33806. }
  33807. this.properties = properties;
  33808. this.allowed_plugins = _.pickBy(this.plugins, function (plugin, key) {
  33809. return (!whitelist.length || whitelist.length && _.includes(whitelist, key)) && !_.includes(blacklist, key);
  33810. });
  33811. _.each(_.values(this.allowed_plugins), this.initializePlugin.bind(this));
  33812. }
  33813. });
  33814. function enable(object, name, attrname) {
  33815. // Call the `enable` method to make an object pluggable
  33816. //
  33817. // It takes three parameters:
  33818. // - `object`: The object that gets made pluggable.
  33819. // - `name`: The string name by which the now pluggable object
  33820. // may be referenced on the __super__ obj (in overrides).
  33821. // The default value is "plugged".
  33822. // - `attrname`: The string name of the attribute on the now
  33823. // pluggable object, which refers to the PluginSocket instance
  33824. // that gets created.
  33825. if (typeof attrname === "undefined") {
  33826. attrname = "pluginSocket";
  33827. }
  33828. if (typeof name === 'undefined') {
  33829. name = 'plugged';
  33830. }
  33831. var ref = {};
  33832. ref[attrname] = new PluginSocket(object, name);
  33833. return _.extend(object, ref);
  33834. }
  33835. exports.enable = enable;
  33836. exports.default = {
  33837. enable: enable
  33838. };
  33839. });
  33840. //# sourceMappingURL=pluggable.js.map;
  33841. /*global define */
  33842. define('underscore',['lodash'], function (_) {
  33843. return _.noConflict();
  33844. });
  33845. /*global define */
  33846. define('jquery',[], function () {
  33847. return Object;
  33848. });
  33849. // Backbone.js 1.3.3
  33850. // (c) 2010-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  33851. // Backbone may be freely distributed under the MIT license.
  33852. // For all details and documentation:
  33853. // http://backbonejs.org
  33854. (function(factory) {
  33855. // Establish the root object, `window` (`self`) in the browser, or `global` on the server.
  33856. // We use `self` instead of `window` for `WebWorker` support.
  33857. var root = (typeof self == 'object' && self.self === self && self) ||
  33858. (typeof global == 'object' && global.global === global && global);
  33859. // Set up Backbone appropriately for the environment. Start with AMD.
  33860. if (typeof define === 'function' && define.amd) {
  33861. define('backbone',['underscore', 'jquery', 'exports'], function(_, $, exports) {
  33862. // Export global even in AMD case in case this script is loaded with
  33863. // others that may still expect a global Backbone.
  33864. root.Backbone = factory(root, exports, _, $);
  33865. });
  33866. // Next for Node.js or CommonJS. jQuery may not be needed as a module.
  33867. } else if (typeof exports !== 'undefined') {
  33868. var _ = require('underscore'), $;
  33869. try { $ = require('jquery'); } catch (e) {}
  33870. factory(root, exports, _, $);
  33871. // Finally, as a browser global.
  33872. } else {
  33873. root.Backbone = factory(root, {}, root._, (root.jQuery || root.Zepto || root.ender || root.$));
  33874. }
  33875. })(function(root, Backbone, _, $) {
  33876. // Initial Setup
  33877. // -------------
  33878. // Save the previous value of the `Backbone` variable, so that it can be
  33879. // restored later on, if `noConflict` is used.
  33880. var previousBackbone = root.Backbone;
  33881. // Create a local reference to a common array method we'll want to use later.
  33882. var slice = Array.prototype.slice;
  33883. // Current version of the library. Keep in sync with `package.json`.
  33884. Backbone.VERSION = '1.3.3';
  33885. // For Backbone's purposes, jQuery, Zepto, Ender, or My Library (kidding) owns
  33886. // the `$` variable.
  33887. Backbone.$ = $;
  33888. // Runs Backbone.js in *noConflict* mode, returning the `Backbone` variable
  33889. // to its previous owner. Returns a reference to this Backbone object.
  33890. Backbone.noConflict = function() {
  33891. root.Backbone = previousBackbone;
  33892. return this;
  33893. };
  33894. // Turn on `emulateHTTP` to support legacy HTTP servers. Setting this option
  33895. // will fake `"PATCH"`, `"PUT"` and `"DELETE"` requests via the `_method` parameter and
  33896. // set a `X-Http-Method-Override` header.
  33897. Backbone.emulateHTTP = false;
  33898. // Turn on `emulateJSON` to support legacy servers that can't deal with direct
  33899. // `application/json` requests ... this will encode the body as
  33900. // `application/x-www-form-urlencoded` instead and will send the model in a
  33901. // form param named `model`.
  33902. Backbone.emulateJSON = false;
  33903. // Proxy Backbone class methods to Underscore functions, wrapping the model's
  33904. // `attributes` object or collection's `models` array behind the scenes.
  33905. //
  33906. // collection.filter(function(model) { return model.get('age') > 10 });
  33907. // collection.each(this.addView);
  33908. //
  33909. // `Function#apply` can be slow so we use the method's arg count, if we know it.
  33910. var addMethod = function(length, method, attribute) {
  33911. switch (length) {
  33912. case 1: return function() {
  33913. return _[method](this[attribute]);
  33914. };
  33915. case 2: return function(value) {
  33916. return _[method](this[attribute], value);
  33917. };
  33918. case 3: return function(iteratee, context) {
  33919. return _[method](this[attribute], cb(iteratee, this), context);
  33920. };
  33921. case 4: return function(iteratee, defaultVal, context) {
  33922. return _[method](this[attribute], cb(iteratee, this), defaultVal, context);
  33923. };
  33924. default: return function() {
  33925. var args = slice.call(arguments);
  33926. args.unshift(this[attribute]);
  33927. return _[method].apply(_, args);
  33928. };
  33929. }
  33930. };
  33931. var addUnderscoreMethods = function(Class, methods, attribute) {
  33932. _.each(methods, function(length, method) {
  33933. if (_[method]) Class.prototype[method] = addMethod(length, method, attribute);
  33934. });
  33935. };
  33936. // Support `collection.sortBy('attr')` and `collection.findWhere({id: 1})`.
  33937. var cb = function(iteratee, instance) {
  33938. if (_.isFunction(iteratee)) return iteratee;
  33939. if (_.isObject(iteratee) && !instance._isModel(iteratee)) return modelMatcher(iteratee);
  33940. if (_.isString(iteratee)) return function(model) { return model.get(iteratee); };
  33941. return iteratee;
  33942. };
  33943. var modelMatcher = function(attrs) {
  33944. var matcher = _.matches(attrs);
  33945. return function(model) {
  33946. return matcher(model.attributes);
  33947. };
  33948. };
  33949. // Backbone.Events
  33950. // ---------------
  33951. // A module that can be mixed in to *any object* in order to provide it with
  33952. // a custom event channel. You may bind a callback to an event with `on` or
  33953. // remove with `off`; `trigger`-ing an event fires all callbacks in
  33954. // succession.
  33955. //
  33956. // var object = {};
  33957. // _.extend(object, Backbone.Events);
  33958. // object.on('expand', function(){ alert('expanded'); });
  33959. // object.trigger('expand');
  33960. //
  33961. var Events = Backbone.Events = {};
  33962. // Regular expression used to split event strings.
  33963. var eventSplitter = /\s+/;
  33964. // Iterates over the standard `event, callback` (as well as the fancy multiple
  33965. // space-separated events `"change blur", callback` and jQuery-style event
  33966. // maps `{event: callback}`).
  33967. var eventsApi = function(iteratee, events, name, callback, opts) {
  33968. var i = 0, names;
  33969. if (name && typeof name === 'object') {
  33970. // Handle event maps.
  33971. if (callback !== void 0 && 'context' in opts && opts.context === void 0) opts.context = callback;
  33972. for (names = _.keys(name); i < names.length ; i++) {
  33973. events = eventsApi(iteratee, events, names[i], name[names[i]], opts);
  33974. }
  33975. } else if (name && eventSplitter.test(name)) {
  33976. // Handle space-separated event names by delegating them individually.
  33977. for (names = name.split(eventSplitter); i < names.length; i++) {
  33978. events = iteratee(events, names[i], callback, opts);
  33979. }
  33980. } else {
  33981. // Finally, standard events.
  33982. events = iteratee(events, name, callback, opts);
  33983. }
  33984. return events;
  33985. };
  33986. // Bind an event to a `callback` function. Passing `"all"` will bind
  33987. // the callback to all events fired.
  33988. Events.on = function(name, callback, context) {
  33989. return internalOn(this, name, callback, context);
  33990. };
  33991. // Guard the `listening` argument from the public API.
  33992. var internalOn = function(obj, name, callback, context, listening) {
  33993. obj._events = eventsApi(onApi, obj._events || {}, name, callback, {
  33994. context: context,
  33995. ctx: obj,
  33996. listening: listening
  33997. });
  33998. if (listening) {
  33999. var listeners = obj._listeners || (obj._listeners = {});
  34000. listeners[listening.id] = listening;
  34001. }
  34002. return obj;
  34003. };
  34004. // Inversion-of-control versions of `on`. Tell *this* object to listen to
  34005. // an event in another object... keeping track of what it's listening to
  34006. // for easier unbinding later.
  34007. Events.listenTo = function(obj, name, callback) {
  34008. if (!obj) return this;
  34009. var id = obj._listenId || (obj._listenId = _.uniqueId('l'));
  34010. var listeningTo = this._listeningTo || (this._listeningTo = {});
  34011. var listening = listeningTo[id];
  34012. // This object is not listening to any other events on `obj` yet.
  34013. // Setup the necessary references to track the listening callbacks.
  34014. if (!listening) {
  34015. var thisId = this._listenId || (this._listenId = _.uniqueId('l'));
  34016. listening = listeningTo[id] = {obj: obj, objId: id, id: thisId, listeningTo: listeningTo, count: 0};
  34017. }
  34018. // Bind callbacks on obj, and keep track of them on listening.
  34019. internalOn(obj, name, callback, this, listening);
  34020. return this;
  34021. };
  34022. // The reducing API that adds a callback to the `events` object.
  34023. var onApi = function(events, name, callback, options) {
  34024. if (callback) {
  34025. var handlers = events[name] || (events[name] = []);
  34026. var context = options.context, ctx = options.ctx, listening = options.listening;
  34027. if (listening) listening.count++;
  34028. handlers.push({callback: callback, context: context, ctx: context || ctx, listening: listening});
  34029. }
  34030. return events;
  34031. };
  34032. // Remove one or many callbacks. If `context` is null, removes all
  34033. // callbacks with that function. If `callback` is null, removes all
  34034. // callbacks for the event. If `name` is null, removes all bound
  34035. // callbacks for all events.
  34036. Events.off = function(name, callback, context) {
  34037. if (!this._events) return this;
  34038. this._events = eventsApi(offApi, this._events, name, callback, {
  34039. context: context,
  34040. listeners: this._listeners
  34041. });
  34042. return this;
  34043. };
  34044. // Tell this object to stop listening to either specific events ... or
  34045. // to every object it's currently listening to.
  34046. Events.stopListening = function(obj, name, callback) {
  34047. var listeningTo = this._listeningTo;
  34048. if (!listeningTo) return this;
  34049. var ids = obj ? [obj._listenId] : _.keys(listeningTo);
  34050. for (var i = 0; i < ids.length; i++) {
  34051. var listening = listeningTo[ids[i]];
  34052. // If listening doesn't exist, this object is not currently
  34053. // listening to obj. Break out early.
  34054. if (!listening) break;
  34055. listening.obj.off(name, callback, this);
  34056. }
  34057. return this;
  34058. };
  34059. // The reducing API that removes a callback from the `events` object.
  34060. var offApi = function(events, name, callback, options) {
  34061. if (!events) return;
  34062. var i = 0, listening;
  34063. var context = options.context, listeners = options.listeners;
  34064. // Delete all events listeners and "drop" events.
  34065. if (!name && !callback && !context) {
  34066. var ids = _.keys(listeners);
  34067. for (; i < ids.length; i++) {
  34068. listening = listeners[ids[i]];
  34069. delete listeners[listening.id];
  34070. delete listening.listeningTo[listening.objId];
  34071. }
  34072. return;
  34073. }
  34074. var names = name ? [name] : _.keys(events);
  34075. for (; i < names.length; i++) {
  34076. name = names[i];
  34077. var handlers = events[name];
  34078. // Bail out if there are no events stored.
  34079. if (!handlers) break;
  34080. // Replace events if there are any remaining. Otherwise, clean up.
  34081. var remaining = [];
  34082. for (var j = 0; j < handlers.length; j++) {
  34083. var handler = handlers[j];
  34084. if (
  34085. callback && callback !== handler.callback &&
  34086. callback !== handler.callback._callback ||
  34087. context && context !== handler.context
  34088. ) {
  34089. remaining.push(handler);
  34090. } else {
  34091. listening = handler.listening;
  34092. if (listening && --listening.count === 0) {
  34093. delete listeners[listening.id];
  34094. delete listening.listeningTo[listening.objId];
  34095. }
  34096. }
  34097. }
  34098. // Update tail event if the list has any events. Otherwise, clean up.
  34099. if (remaining.length) {
  34100. events[name] = remaining;
  34101. } else {
  34102. delete events[name];
  34103. }
  34104. }
  34105. return events;
  34106. };
  34107. // Bind an event to only be triggered a single time. After the first time
  34108. // the callback is invoked, its listener will be removed. If multiple events
  34109. // are passed in using the space-separated syntax, the handler will fire
  34110. // once for each event, not once for a combination of all events.
  34111. Events.once = function(name, callback, context) {
  34112. // Map the event into a `{event: once}` object.
  34113. var events = eventsApi(onceMap, {}, name, callback, _.bind(this.off, this));
  34114. if (typeof name === 'string' && context == null) callback = void 0;
  34115. return this.on(events, callback, context);
  34116. };
  34117. // Inversion-of-control versions of `once`.
  34118. Events.listenToOnce = function(obj, name, callback) {
  34119. // Map the event into a `{event: once}` object.
  34120. var events = eventsApi(onceMap, {}, name, callback, _.bind(this.stopListening, this, obj));
  34121. return this.listenTo(obj, events);
  34122. };
  34123. // Reduces the event callbacks into a map of `{event: onceWrapper}`.
  34124. // `offer` unbinds the `onceWrapper` after it has been called.
  34125. var onceMap = function(map, name, callback, offer) {
  34126. if (callback) {
  34127. var once = map[name] = _.once(function() {
  34128. offer(name, once);
  34129. callback.apply(this, arguments);
  34130. });
  34131. once._callback = callback;
  34132. }
  34133. return map;
  34134. };
  34135. // Trigger one or many events, firing all bound callbacks. Callbacks are
  34136. // passed the same arguments as `trigger` is, apart from the event name
  34137. // (unless you're listening on `"all"`, which will cause your callback to
  34138. // receive the true name of the event as the first argument).
  34139. Events.trigger = function(name) {
  34140. if (!this._events) return this;
  34141. var length = Math.max(0, arguments.length - 1);
  34142. var args = Array(length);
  34143. for (var i = 0; i < length; i++) args[i] = arguments[i + 1];
  34144. eventsApi(triggerApi, this._events, name, void 0, args);
  34145. return this;
  34146. };
  34147. // Handles triggering the appropriate event callbacks.
  34148. var triggerApi = function(objEvents, name, callback, args) {
  34149. if (objEvents) {
  34150. var events = objEvents[name];
  34151. var allEvents = objEvents.all;
  34152. if (events && allEvents) allEvents = allEvents.slice();
  34153. if (events) triggerEvents(events, args);
  34154. if (allEvents) triggerEvents(allEvents, [name].concat(args));
  34155. }
  34156. return objEvents;
  34157. };
  34158. // A difficult-to-believe, but optimized internal dispatch function for
  34159. // triggering events. Tries to keep the usual cases speedy (most internal
  34160. // Backbone events have 3 arguments).
  34161. var triggerEvents = function(events, args) {
  34162. var ev, i = -1, l = events.length, a1 = args[0], a2 = args[1], a3 = args[2];
  34163. switch (args.length) {
  34164. case 0: while (++i < l) (ev = events[i]).callback.call(ev.ctx); return;
  34165. case 1: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1); return;
  34166. case 2: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1, a2); return;
  34167. case 3: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1, a2, a3); return;
  34168. default: while (++i < l) (ev = events[i]).callback.apply(ev.ctx, args); return;
  34169. }
  34170. };
  34171. // Aliases for backwards compatibility.
  34172. Events.bind = Events.on;
  34173. Events.unbind = Events.off;
  34174. // Allow the `Backbone` object to serve as a global event bus, for folks who
  34175. // want global "pubsub" in a convenient place.
  34176. _.extend(Backbone, Events);
  34177. // Backbone.Model
  34178. // --------------
  34179. // Backbone **Models** are the basic data object in the framework --
  34180. // frequently representing a row in a table in a database on your server.
  34181. // A discrete chunk of data and a bunch of useful, related methods for
  34182. // performing computations and transformations on that data.
  34183. // Create a new model with the specified attributes. A client id (`cid`)
  34184. // is automatically generated and assigned for you.
  34185. var Model = Backbone.Model = function(attributes, options) {
  34186. var attrs = attributes || {};
  34187. options || (options = {});
  34188. this.cid = _.uniqueId(this.cidPrefix);
  34189. this.attributes = {};
  34190. if (options.collection) this.collection = options.collection;
  34191. if (options.parse) attrs = this.parse(attrs, options) || {};
  34192. var defaults = _.result(this, 'defaults');
  34193. attrs = _.defaults(_.extend({}, defaults, attrs), defaults);
  34194. this.set(attrs, options);
  34195. this.changed = {};
  34196. this.initialize.apply(this, arguments);
  34197. };
  34198. // Attach all inheritable methods to the Model prototype.
  34199. _.extend(Model.prototype, Events, {
  34200. // A hash of attributes whose current and previous value differ.
  34201. changed: null,
  34202. // The value returned during the last failed validation.
  34203. validationError: null,
  34204. // The default name for the JSON `id` attribute is `"id"`. MongoDB and
  34205. // CouchDB users may want to set this to `"_id"`.
  34206. idAttribute: 'id',
  34207. // The prefix is used to create the client id which is used to identify models locally.
  34208. // You may want to override this if you're experiencing name clashes with model ids.
  34209. cidPrefix: 'c',
  34210. // Initialize is an empty function by default. Override it with your own
  34211. // initialization logic.
  34212. initialize: function(){},
  34213. // Return a copy of the model's `attributes` object.
  34214. toJSON: function(options) {
  34215. return _.clone(this.attributes);
  34216. },
  34217. // Proxy `Backbone.sync` by default -- but override this if you need
  34218. // custom syncing semantics for *this* particular model.
  34219. sync: function() {
  34220. return Backbone.sync.apply(this, arguments);
  34221. },
  34222. // Get the value of an attribute.
  34223. get: function(attr) {
  34224. return this.attributes[attr];
  34225. },
  34226. // Get the HTML-escaped value of an attribute.
  34227. escape: function(attr) {
  34228. return _.escape(this.get(attr));
  34229. },
  34230. // Returns `true` if the attribute contains a value that is not null
  34231. // or undefined.
  34232. has: function(attr) {
  34233. return this.get(attr) != null;
  34234. },
  34235. // Special-cased proxy to underscore's `_.matches` method.
  34236. matches: function(attrs) {
  34237. return !!_.iteratee(attrs, this)(this.attributes);
  34238. },
  34239. // Set a hash of model attributes on the object, firing `"change"`. This is
  34240. // the core primitive operation of a model, updating the data and notifying
  34241. // anyone who needs to know about the change in state. The heart of the beast.
  34242. set: function(key, val, options) {
  34243. if (key == null) return this;
  34244. // Handle both `"key", value` and `{key: value}` -style arguments.
  34245. var attrs;
  34246. if (typeof key === 'object') {
  34247. attrs = key;
  34248. options = val;
  34249. } else {
  34250. (attrs = {})[key] = val;
  34251. }
  34252. options || (options = {});
  34253. // Run validation.
  34254. if (!this._validate(attrs, options)) return false;
  34255. // Extract attributes and options.
  34256. var unset = options.unset;
  34257. var silent = options.silent;
  34258. var changes = [];
  34259. var changing = this._changing;
  34260. this._changing = true;
  34261. if (!changing) {
  34262. this._previousAttributes = _.clone(this.attributes);
  34263. this.changed = {};
  34264. }
  34265. var current = this.attributes;
  34266. var changed = this.changed;
  34267. var prev = this._previousAttributes;
  34268. // For each `set` attribute, update or delete the current value.
  34269. for (var attr in attrs) {
  34270. val = attrs[attr];
  34271. if (!_.isEqual(current[attr], val)) changes.push(attr);
  34272. if (!_.isEqual(prev[attr], val)) {
  34273. changed[attr] = val;
  34274. } else {
  34275. delete changed[attr];
  34276. }
  34277. unset ? delete current[attr] : current[attr] = val;
  34278. }
  34279. // Update the `id`.
  34280. if (this.idAttribute in attrs) this.id = this.get(this.idAttribute);
  34281. // Trigger all relevant attribute changes.
  34282. if (!silent) {
  34283. if (changes.length) this._pending = options;
  34284. for (var i = 0; i < changes.length; i++) {
  34285. this.trigger('change:' + changes[i], this, current[changes[i]], options);
  34286. }
  34287. }
  34288. // You might be wondering why there's a `while` loop here. Changes can
  34289. // be recursively nested within `"change"` events.
  34290. if (changing) return this;
  34291. if (!silent) {
  34292. while (this._pending) {
  34293. options = this._pending;
  34294. this._pending = false;
  34295. this.trigger('change', this, options);
  34296. }
  34297. }
  34298. this._pending = false;
  34299. this._changing = false;
  34300. return this;
  34301. },
  34302. // Remove an attribute from the model, firing `"change"`. `unset` is a noop
  34303. // if the attribute doesn't exist.
  34304. unset: function(attr, options) {
  34305. return this.set(attr, void 0, _.extend({}, options, {unset: true}));
  34306. },
  34307. // Clear all attributes on the model, firing `"change"`.
  34308. clear: function(options) {
  34309. var attrs = {};
  34310. for (var key in this.attributes) attrs[key] = void 0;
  34311. return this.set(attrs, _.extend({}, options, {unset: true}));
  34312. },
  34313. // Determine if the model has changed since the last `"change"` event.
  34314. // If you specify an attribute name, determine if that attribute has changed.
  34315. hasChanged: function(attr) {
  34316. if (attr == null) return !_.isEmpty(this.changed);
  34317. return _.has(this.changed, attr);
  34318. },
  34319. // Return an object containing all the attributes that have changed, or
  34320. // false if there are no changed attributes. Useful for determining what
  34321. // parts of a view need to be updated and/or what attributes need to be
  34322. // persisted to the server. Unset attributes will be set to undefined.
  34323. // You can also pass an attributes object to diff against the model,
  34324. // determining if there *would be* a change.
  34325. changedAttributes: function(diff) {
  34326. if (!diff) return this.hasChanged() ? _.clone(this.changed) : false;
  34327. var old = this._changing ? this._previousAttributes : this.attributes;
  34328. var changed = {};
  34329. for (var attr in diff) {
  34330. var val = diff[attr];
  34331. if (_.isEqual(old[attr], val)) continue;
  34332. changed[attr] = val;
  34333. }
  34334. return _.size(changed) ? changed : false;
  34335. },
  34336. // Get the previous value of an attribute, recorded at the time the last
  34337. // `"change"` event was fired.
  34338. previous: function(attr) {
  34339. if (attr == null || !this._previousAttributes) return null;
  34340. return this._previousAttributes[attr];
  34341. },
  34342. // Get all of the attributes of the model at the time of the previous
  34343. // `"change"` event.
  34344. previousAttributes: function() {
  34345. return _.clone(this._previousAttributes);
  34346. },
  34347. // Fetch the model from the server, merging the response with the model's
  34348. // local attributes. Any changed attributes will trigger a "change" event.
  34349. fetch: function(options) {
  34350. options = _.extend({parse: true}, options);
  34351. var model = this;
  34352. var success = options.success;
  34353. options.success = function(resp) {
  34354. var serverAttrs = options.parse ? model.parse(resp, options) : resp;
  34355. if (!model.set(serverAttrs, options)) return false;
  34356. if (success) success.call(options.context, model, resp, options);
  34357. model.trigger('sync', model, resp, options);
  34358. };
  34359. wrapError(this, options);
  34360. return this.sync('read', this, options);
  34361. },
  34362. // Set a hash of model attributes, and sync the model to the server.
  34363. // If the server returns an attributes hash that differs, the model's
  34364. // state will be `set` again.
  34365. save: function(key, val, options) {
  34366. // Handle both `"key", value` and `{key: value}` -style arguments.
  34367. var attrs;
  34368. if (key == null || typeof key === 'object') {
  34369. attrs = key;
  34370. options = val;
  34371. } else {
  34372. (attrs = {})[key] = val;
  34373. }
  34374. options = _.extend({validate: true, parse: true}, options);
  34375. var wait = options.wait;
  34376. // If we're not waiting and attributes exist, save acts as
  34377. // `set(attr).save(null, opts)` with validation. Otherwise, check if
  34378. // the model will be valid when the attributes, if any, are set.
  34379. if (attrs && !wait) {
  34380. if (!this.set(attrs, options)) return false;
  34381. } else if (!this._validate(attrs, options)) {
  34382. return false;
  34383. }
  34384. // After a successful server-side save, the client is (optionally)
  34385. // updated with the server-side state.
  34386. var model = this;
  34387. var success = options.success;
  34388. var attributes = this.attributes;
  34389. options.success = function(resp) {
  34390. // Ensure attributes are restored during synchronous saves.
  34391. model.attributes = attributes;
  34392. var serverAttrs = options.parse ? model.parse(resp, options) : resp;
  34393. if (wait) serverAttrs = _.extend({}, attrs, serverAttrs);
  34394. if (serverAttrs && !model.set(serverAttrs, options)) return false;
  34395. if (success) success.call(options.context, model, resp, options);
  34396. model.trigger('sync', model, resp, options);
  34397. };
  34398. wrapError(this, options);
  34399. // Set temporary attributes if `{wait: true}` to properly find new ids.
  34400. if (attrs && wait) this.attributes = _.extend({}, attributes, attrs);
  34401. var method = this.isNew() ? 'create' : (options.patch ? 'patch' : 'update');
  34402. if (method === 'patch' && !options.attrs) options.attrs = attrs;
  34403. var xhr = this.sync(method, this, options);
  34404. // Restore attributes.
  34405. this.attributes = attributes;
  34406. return xhr;
  34407. },
  34408. // Destroy this model on the server if it was already persisted.
  34409. // Optimistically removes the model from its collection, if it has one.
  34410. // If `wait: true` is passed, waits for the server to respond before removal.
  34411. destroy: function(options) {
  34412. options = options ? _.clone(options) : {};
  34413. var model = this;
  34414. var success = options.success;
  34415. var wait = options.wait;
  34416. var destroy = function() {
  34417. model.stopListening();
  34418. model.trigger('destroy', model, model.collection, options);
  34419. };
  34420. options.success = function(resp) {
  34421. if (wait) destroy();
  34422. if (success) success.call(options.context, model, resp, options);
  34423. if (!model.isNew()) model.trigger('sync', model, resp, options);
  34424. };
  34425. var xhr = false;
  34426. if (this.isNew()) {
  34427. _.defer(options.success);
  34428. } else {
  34429. wrapError(this, options);
  34430. xhr = this.sync('delete', this, options);
  34431. }
  34432. if (!wait) destroy();
  34433. return xhr;
  34434. },
  34435. // Default URL for the model's representation on the server -- if you're
  34436. // using Backbone's restful methods, override this to change the endpoint
  34437. // that will be called.
  34438. url: function() {
  34439. var base =
  34440. _.result(this, 'urlRoot') ||
  34441. _.result(this.collection, 'url') ||
  34442. urlError();
  34443. if (this.isNew()) return base;
  34444. var id = this.get(this.idAttribute);
  34445. return base.replace(/[^\/]$/, '$&/') + encodeURIComponent(id);
  34446. },
  34447. // **parse** converts a response into the hash of attributes to be `set` on
  34448. // the model. The default implementation is just to pass the response along.
  34449. parse: function(resp, options) {
  34450. return resp;
  34451. },
  34452. // Create a new model with identical attributes to this one.
  34453. clone: function() {
  34454. return new this.constructor(this.attributes);
  34455. },
  34456. // A model is new if it has never been saved to the server, and lacks an id.
  34457. isNew: function() {
  34458. return !this.has(this.idAttribute);
  34459. },
  34460. // Check if the model is currently in a valid state.
  34461. isValid: function(options) {
  34462. return this._validate({}, _.extend({}, options, {validate: true}));
  34463. },
  34464. // Run validation against the next complete set of model attributes,
  34465. // returning `true` if all is well. Otherwise, fire an `"invalid"` event.
  34466. _validate: function(attrs, options) {
  34467. if (!options.validate || !this.validate) return true;
  34468. attrs = _.extend({}, this.attributes, attrs);
  34469. var error = this.validationError = this.validate(attrs, options) || null;
  34470. if (!error) return true;
  34471. this.trigger('invalid', this, error, _.extend(options, {validationError: error}));
  34472. return false;
  34473. }
  34474. });
  34475. // Underscore methods that we want to implement on the Model, mapped to the
  34476. // number of arguments they take.
  34477. var modelMethods = {keys: 1, values: 1, pairs: 1, invert: 1, pick: 0,
  34478. omit: 0, chain: 1, isEmpty: 1};
  34479. // Mix in each Underscore method as a proxy to `Model#attributes`.
  34480. addUnderscoreMethods(Model, modelMethods, 'attributes');
  34481. // Backbone.Collection
  34482. // -------------------
  34483. // If models tend to represent a single row of data, a Backbone Collection is
  34484. // more analogous to a table full of data ... or a small slice or page of that
  34485. // table, or a collection of rows that belong together for a particular reason
  34486. // -- all of the messages in this particular folder, all of the documents
  34487. // belonging to this particular author, and so on. Collections maintain
  34488. // indexes of their models, both in order, and for lookup by `id`.
  34489. // Create a new **Collection**, perhaps to contain a specific type of `model`.
  34490. // If a `comparator` is specified, the Collection will maintain
  34491. // its models in sort order, as they're added and removed.
  34492. var Collection = Backbone.Collection = function(models, options) {
  34493. options || (options = {});
  34494. if (options.model) this.model = options.model;
  34495. if (options.comparator !== void 0) this.comparator = options.comparator;
  34496. this._reset();
  34497. this.initialize.apply(this, arguments);
  34498. if (models) this.reset(models, _.extend({silent: true}, options));
  34499. };
  34500. // Default options for `Collection#set`.
  34501. var setOptions = {add: true, remove: true, merge: true};
  34502. var addOptions = {add: true, remove: false};
  34503. // Splices `insert` into `array` at index `at`.
  34504. var splice = function(array, insert, at) {
  34505. at = Math.min(Math.max(at, 0), array.length);
  34506. var tail = Array(array.length - at);
  34507. var length = insert.length;
  34508. var i;
  34509. for (i = 0; i < tail.length; i++) tail[i] = array[i + at];
  34510. for (i = 0; i < length; i++) array[i + at] = insert[i];
  34511. for (i = 0; i < tail.length; i++) array[i + length + at] = tail[i];
  34512. };
  34513. // Define the Collection's inheritable methods.
  34514. _.extend(Collection.prototype, Events, {
  34515. // The default model for a collection is just a **Backbone.Model**.
  34516. // This should be overridden in most cases.
  34517. model: Model,
  34518. // Initialize is an empty function by default. Override it with your own
  34519. // initialization logic.
  34520. initialize: function(){},
  34521. // The JSON representation of a Collection is an array of the
  34522. // models' attributes.
  34523. toJSON: function(options) {
  34524. return this.map(function(model) { return model.toJSON(options); });
  34525. },
  34526. // Proxy `Backbone.sync` by default.
  34527. sync: function() {
  34528. return Backbone.sync.apply(this, arguments);
  34529. },
  34530. // Add a model, or list of models to the set. `models` may be Backbone
  34531. // Models or raw JavaScript objects to be converted to Models, or any
  34532. // combination of the two.
  34533. add: function(models, options) {
  34534. return this.set(models, _.extend({merge: false}, options, addOptions));
  34535. },
  34536. // Remove a model, or a list of models from the set.
  34537. remove: function(models, options) {
  34538. options = _.extend({}, options);
  34539. var singular = !_.isArray(models);
  34540. models = singular ? [models] : models.slice();
  34541. var removed = this._removeModels(models, options);
  34542. if (!options.silent && removed.length) {
  34543. options.changes = {added: [], merged: [], removed: removed};
  34544. this.trigger('update', this, options);
  34545. }
  34546. return singular ? removed[0] : removed;
  34547. },
  34548. // Update a collection by `set`-ing a new list of models, adding new ones,
  34549. // removing models that are no longer present, and merging models that
  34550. // already exist in the collection, as necessary. Similar to **Model#set**,
  34551. // the core operation for updating the data contained by the collection.
  34552. set: function(models, options) {
  34553. if (models == null) return;
  34554. options = _.extend({}, setOptions, options);
  34555. if (options.parse && !this._isModel(models)) {
  34556. models = this.parse(models, options) || [];
  34557. }
  34558. var singular = !_.isArray(models);
  34559. models = singular ? [models] : models.slice();
  34560. var at = options.at;
  34561. if (at != null) at = +at;
  34562. if (at > this.length) at = this.length;
  34563. if (at < 0) at += this.length + 1;
  34564. var set = [];
  34565. var toAdd = [];
  34566. var toMerge = [];
  34567. var toRemove = [];
  34568. var modelMap = {};
  34569. var add = options.add;
  34570. var merge = options.merge;
  34571. var remove = options.remove;
  34572. var sort = false;
  34573. var sortable = this.comparator && at == null && options.sort !== false;
  34574. var sortAttr = _.isString(this.comparator) ? this.comparator : null;
  34575. // Turn bare objects into model references, and prevent invalid models
  34576. // from being added.
  34577. var model, i;
  34578. for (i = 0; i < models.length; i++) {
  34579. model = models[i];
  34580. // If a duplicate is found, prevent it from being added and
  34581. // optionally merge it into the existing model.
  34582. var existing = this.get(model);
  34583. if (existing) {
  34584. if (merge && model !== existing) {
  34585. var attrs = this._isModel(model) ? model.attributes : model;
  34586. if (options.parse) attrs = existing.parse(attrs, options);
  34587. existing.set(attrs, options);
  34588. toMerge.push(existing);
  34589. if (sortable && !sort) sort = existing.hasChanged(sortAttr);
  34590. }
  34591. if (!modelMap[existing.cid]) {
  34592. modelMap[existing.cid] = true;
  34593. set.push(existing);
  34594. }
  34595. models[i] = existing;
  34596. // If this is a new, valid model, push it to the `toAdd` list.
  34597. } else if (add) {
  34598. model = models[i] = this._prepareModel(model, options);
  34599. if (model) {
  34600. toAdd.push(model);
  34601. this._addReference(model, options);
  34602. modelMap[model.cid] = true;
  34603. set.push(model);
  34604. }
  34605. }
  34606. }
  34607. // Remove stale models.
  34608. if (remove) {
  34609. for (i = 0; i < this.length; i++) {
  34610. model = this.models[i];
  34611. if (!modelMap[model.cid]) toRemove.push(model);
  34612. }
  34613. if (toRemove.length) this._removeModels(toRemove, options);
  34614. }
  34615. // See if sorting is needed, update `length` and splice in new models.
  34616. var orderChanged = false;
  34617. var replace = !sortable && add && remove;
  34618. if (set.length && replace) {
  34619. orderChanged = this.length !== set.length || _.some(this.models, function(m, index) {
  34620. return m !== set[index];
  34621. });
  34622. this.models.length = 0;
  34623. splice(this.models, set, 0);
  34624. this.length = this.models.length;
  34625. } else if (toAdd.length) {
  34626. if (sortable) sort = true;
  34627. splice(this.models, toAdd, at == null ? this.length : at);
  34628. this.length = this.models.length;
  34629. }
  34630. // Silently sort the collection if appropriate.
  34631. if (sort) this.sort({silent: true});
  34632. // Unless silenced, it's time to fire all appropriate add/sort/update events.
  34633. if (!options.silent) {
  34634. for (i = 0; i < toAdd.length; i++) {
  34635. if (at != null) options.index = at + i;
  34636. model = toAdd[i];
  34637. model.trigger('add', model, this, options);
  34638. }
  34639. if (sort || orderChanged) this.trigger('sort', this, options);
  34640. if (toAdd.length || toRemove.length || toMerge.length) {
  34641. options.changes = {
  34642. added: toAdd,
  34643. removed: toRemove,
  34644. merged: toMerge
  34645. };
  34646. this.trigger('update', this, options);
  34647. }
  34648. }
  34649. // Return the added (or merged) model (or models).
  34650. return singular ? models[0] : models;
  34651. },
  34652. // When you have more items than you want to add or remove individually,
  34653. // you can reset the entire set with a new list of models, without firing
  34654. // any granular `add` or `remove` events. Fires `reset` when finished.
  34655. // Useful for bulk operations and optimizations.
  34656. reset: function(models, options) {
  34657. options = options ? _.clone(options) : {};
  34658. for (var i = 0; i < this.models.length; i++) {
  34659. this._removeReference(this.models[i], options);
  34660. }
  34661. options.previousModels = this.models;
  34662. this._reset();
  34663. models = this.add(models, _.extend({silent: true}, options));
  34664. if (!options.silent) this.trigger('reset', this, options);
  34665. return models;
  34666. },
  34667. // Add a model to the end of the collection.
  34668. push: function(model, options) {
  34669. return this.add(model, _.extend({at: this.length}, options));
  34670. },
  34671. // Remove a model from the end of the collection.
  34672. pop: function(options) {
  34673. var model = this.at(this.length - 1);
  34674. return this.remove(model, options);
  34675. },
  34676. // Add a model to the beginning of the collection.
  34677. unshift: function(model, options) {
  34678. return this.add(model, _.extend({at: 0}, options));
  34679. },
  34680. // Remove a model from the beginning of the collection.
  34681. shift: function(options) {
  34682. var model = this.at(0);
  34683. return this.remove(model, options);
  34684. },
  34685. // Slice out a sub-array of models from the collection.
  34686. slice: function() {
  34687. return slice.apply(this.models, arguments);
  34688. },
  34689. // Get a model from the set by id, cid, model object with id or cid
  34690. // properties, or an attributes object that is transformed through modelId.
  34691. get: function(obj) {
  34692. if (obj == null) return void 0;
  34693. return this._byId[obj] ||
  34694. this._byId[this.modelId(obj.attributes || obj)] ||
  34695. obj.cid && this._byId[obj.cid];
  34696. },
  34697. // Returns `true` if the model is in the collection.
  34698. has: function(obj) {
  34699. return this.get(obj) != null;
  34700. },
  34701. // Get the model at the given index.
  34702. at: function(index) {
  34703. if (index < 0) index += this.length;
  34704. return this.models[index];
  34705. },
  34706. // Return models with matching attributes. Useful for simple cases of
  34707. // `filter`.
  34708. where: function(attrs, first) {
  34709. return this[first ? 'find' : 'filter'](attrs);
  34710. },
  34711. // Return the first model with matching attributes. Useful for simple cases
  34712. // of `find`.
  34713. findWhere: function(attrs) {
  34714. return this.where(attrs, true);
  34715. },
  34716. // Force the collection to re-sort itself. You don't need to call this under
  34717. // normal circumstances, as the set will maintain sort order as each item
  34718. // is added.
  34719. sort: function(options) {
  34720. var comparator = this.comparator;
  34721. if (!comparator) throw new Error('Cannot sort a set without a comparator');
  34722. options || (options = {});
  34723. var length = comparator.length;
  34724. if (_.isFunction(comparator)) comparator = _.bind(comparator, this);
  34725. // Run sort based on type of `comparator`.
  34726. if (length === 1 || _.isString(comparator)) {
  34727. this.models = this.sortBy(comparator);
  34728. } else {
  34729. this.models.sort(comparator);
  34730. }
  34731. if (!options.silent) this.trigger('sort', this, options);
  34732. return this;
  34733. },
  34734. // Pluck an attribute from each model in the collection.
  34735. pluck: function(attr) {
  34736. return this.map(attr + '');
  34737. },
  34738. // Fetch the default set of models for this collection, resetting the
  34739. // collection when they arrive. If `reset: true` is passed, the response
  34740. // data will be passed through the `reset` method instead of `set`.
  34741. fetch: function(options) {
  34742. options = _.extend({parse: true}, options);
  34743. var success = options.success;
  34744. var collection = this;
  34745. options.success = function(resp) {
  34746. var method = options.reset ? 'reset' : 'set';
  34747. collection[method](resp, options);
  34748. if (success) success.call(options.context, collection, resp, options);
  34749. collection.trigger('sync', collection, resp, options);
  34750. };
  34751. wrapError(this, options);
  34752. return this.sync('read', this, options);
  34753. },
  34754. // Create a new instance of a model in this collection. Add the model to the
  34755. // collection immediately, unless `wait: true` is passed, in which case we
  34756. // wait for the server to agree.
  34757. create: function(model, options) {
  34758. options = options ? _.clone(options) : {};
  34759. var wait = options.wait;
  34760. model = this._prepareModel(model, options);
  34761. if (!model) return false;
  34762. if (!wait) this.add(model, options);
  34763. var collection = this;
  34764. var success = options.success;
  34765. options.success = function(m, resp, callbackOpts) {
  34766. if (wait) collection.add(m, callbackOpts);
  34767. if (success) success.call(callbackOpts.context, m, resp, callbackOpts);
  34768. };
  34769. model.save(null, options);
  34770. return model;
  34771. },
  34772. // **parse** converts a response into a list of models to be added to the
  34773. // collection. The default implementation is just to pass it through.
  34774. parse: function(resp, options) {
  34775. return resp;
  34776. },
  34777. // Create a new collection with an identical list of models as this one.
  34778. clone: function() {
  34779. return new this.constructor(this.models, {
  34780. model: this.model,
  34781. comparator: this.comparator
  34782. });
  34783. },
  34784. // Define how to uniquely identify models in the collection.
  34785. modelId: function(attrs) {
  34786. return attrs[this.model.prototype.idAttribute || 'id'];
  34787. },
  34788. // Private method to reset all internal state. Called when the collection
  34789. // is first initialized or reset.
  34790. _reset: function() {
  34791. this.length = 0;
  34792. this.models = [];
  34793. this._byId = {};
  34794. },
  34795. // Prepare a hash of attributes (or other model) to be added to this
  34796. // collection.
  34797. _prepareModel: function(attrs, options) {
  34798. if (this._isModel(attrs)) {
  34799. if (!attrs.collection) attrs.collection = this;
  34800. return attrs;
  34801. }
  34802. options = options ? _.clone(options) : {};
  34803. options.collection = this;
  34804. var model = new this.model(attrs, options);
  34805. if (!model.validationError) return model;
  34806. this.trigger('invalid', this, model.validationError, options);
  34807. return false;
  34808. },
  34809. // Internal method called by both remove and set.
  34810. _removeModels: function(models, options) {
  34811. var removed = [];
  34812. for (var i = 0; i < models.length; i++) {
  34813. var model = this.get(models[i]);
  34814. if (!model) continue;
  34815. var index = this.indexOf(model);
  34816. this.models.splice(index, 1);
  34817. this.length--;
  34818. // Remove references before triggering 'remove' event to prevent an
  34819. // infinite loop. #3693
  34820. delete this._byId[model.cid];
  34821. var id = this.modelId(model.attributes);
  34822. if (id != null) delete this._byId[id];
  34823. if (!options.silent) {
  34824. options.index = index;
  34825. model.trigger('remove', model, this, options);
  34826. }
  34827. removed.push(model);
  34828. this._removeReference(model, options);
  34829. }
  34830. return removed;
  34831. },
  34832. // Method for checking whether an object should be considered a model for
  34833. // the purposes of adding to the collection.
  34834. _isModel: function(model) {
  34835. return model instanceof Model;
  34836. },
  34837. // Internal method to create a model's ties to a collection.
  34838. _addReference: function(model, options) {
  34839. this._byId[model.cid] = model;
  34840. var id = this.modelId(model.attributes);
  34841. if (id != null) this._byId[id] = model;
  34842. model.on('all', this._onModelEvent, this);
  34843. },
  34844. // Internal method to sever a model's ties to a collection.
  34845. _removeReference: function(model, options) {
  34846. delete this._byId[model.cid];
  34847. var id = this.modelId(model.attributes);
  34848. if (id != null) delete this._byId[id];
  34849. if (this === model.collection) delete model.collection;
  34850. model.off('all', this._onModelEvent, this);
  34851. },
  34852. // Internal method called every time a model in the set fires an event.
  34853. // Sets need to update their indexes when models change ids. All other
  34854. // events simply proxy through. "add" and "remove" events that originate
  34855. // in other collections are ignored.
  34856. _onModelEvent: function(event, model, collection, options) {
  34857. if (model) {
  34858. if ((event === 'add' || event === 'remove') && collection !== this) return;
  34859. if (event === 'destroy') this.remove(model, options);
  34860. if (event === 'change') {
  34861. var prevId = this.modelId(model.previousAttributes());
  34862. var id = this.modelId(model.attributes);
  34863. if (prevId !== id) {
  34864. if (prevId != null) delete this._byId[prevId];
  34865. if (id != null) this._byId[id] = model;
  34866. }
  34867. }
  34868. }
  34869. this.trigger.apply(this, arguments);
  34870. }
  34871. });
  34872. // Underscore methods that we want to implement on the Collection.
  34873. // 90% of the core usefulness of Backbone Collections is actually implemented
  34874. // right here:
  34875. var collectionMethods = {forEach: 3, each: 3, map: 3, collect: 3, reduce: 0,
  34876. foldl: 0, inject: 0, reduceRight: 0, foldr: 0, find: 3, detect: 3, filter: 3,
  34877. select: 3, reject: 3, every: 3, all: 3, some: 3, any: 3, include: 3, includes: 3,
  34878. contains: 3, invoke: 0, max: 3, min: 3, toArray: 1, size: 1, first: 3,
  34879. head: 3, take: 3, initial: 3, rest: 3, tail: 3, drop: 3, last: 3,
  34880. without: 0, difference: 0, indexOf: 3, shuffle: 1, lastIndexOf: 3,
  34881. isEmpty: 1, chain: 1, sample: 3, partition: 3, groupBy: 3, countBy: 3,
  34882. sortBy: 3, indexBy: 3, findIndex: 3, findLastIndex: 3};
  34883. // Mix in each Underscore method as a proxy to `Collection#models`.
  34884. addUnderscoreMethods(Collection, collectionMethods, 'models');
  34885. // Backbone.View
  34886. // -------------
  34887. // Backbone Views are almost more convention than they are actual code. A View
  34888. // is simply a JavaScript object that represents a logical chunk of UI in the
  34889. // DOM. This might be a single item, an entire list, a sidebar or panel, or
  34890. // even the surrounding frame which wraps your whole app. Defining a chunk of
  34891. // UI as a **View** allows you to define your DOM events declaratively, without
  34892. // having to worry about render order ... and makes it easy for the view to
  34893. // react to specific changes in the state of your models.
  34894. // Creating a Backbone.View creates its initial element outside of the DOM,
  34895. // if an existing element is not provided...
  34896. var View = Backbone.View = function(options) {
  34897. this.cid = _.uniqueId('view');
  34898. _.extend(this, _.pick(options, viewOptions));
  34899. this._ensureElement();
  34900. this.initialize.apply(this, arguments);
  34901. };
  34902. // Cached regex to split keys for `delegate`.
  34903. var delegateEventSplitter = /^(\S+)\s*(.*)$/;
  34904. // List of view options to be set as properties.
  34905. var viewOptions = ['model', 'collection', 'el', 'id', 'attributes', 'className', 'tagName', 'events'];
  34906. // Set up all inheritable **Backbone.View** properties and methods.
  34907. _.extend(View.prototype, Events, {
  34908. // The default `tagName` of a View's element is `"div"`.
  34909. tagName: 'div',
  34910. // jQuery delegate for element lookup, scoped to DOM elements within the
  34911. // current view. This should be preferred to global lookups where possible.
  34912. $: function(selector) {
  34913. return this.$el.find(selector);
  34914. },
  34915. // Initialize is an empty function by default. Override it with your own
  34916. // initialization logic.
  34917. initialize: function(){},
  34918. // **render** is the core function that your view should override, in order
  34919. // to populate its element (`this.el`), with the appropriate HTML. The
  34920. // convention is for **render** to always return `this`.
  34921. render: function() {
  34922. return this;
  34923. },
  34924. // Remove this view by taking the element out of the DOM, and removing any
  34925. // applicable Backbone.Events listeners.
  34926. remove: function() {
  34927. this._removeElement();
  34928. this.stopListening();
  34929. return this;
  34930. },
  34931. // Remove this view's element from the document and all event listeners
  34932. // attached to it. Exposed for subclasses using an alternative DOM
  34933. // manipulation API.
  34934. _removeElement: function() {
  34935. this.$el.remove();
  34936. },
  34937. // Change the view's element (`this.el` property) and re-delegate the
  34938. // view's events on the new element.
  34939. setElement: function(element) {
  34940. this.undelegateEvents();
  34941. this._setElement(element);
  34942. this.delegateEvents();
  34943. return this;
  34944. },
  34945. // Creates the `this.el` and `this.$el` references for this view using the
  34946. // given `el`. `el` can be a CSS selector or an HTML string, a jQuery
  34947. // context or an element. Subclasses can override this to utilize an
  34948. // alternative DOM manipulation API and are only required to set the
  34949. // `this.el` property.
  34950. _setElement: function(el) {
  34951. this.$el = el instanceof Backbone.$ ? el : Backbone.$(el);
  34952. this.el = this.$el[0];
  34953. },
  34954. // Set callbacks, where `this.events` is a hash of
  34955. //
  34956. // *{"event selector": "callback"}*
  34957. //
  34958. // {
  34959. // 'mousedown .title': 'edit',
  34960. // 'click .button': 'save',
  34961. // 'click .open': function(e) { ... }
  34962. // }
  34963. //
  34964. // pairs. Callbacks will be bound to the view, with `this` set properly.
  34965. // Uses event delegation for efficiency.
  34966. // Omitting the selector binds the event to `this.el`.
  34967. delegateEvents: function(events) {
  34968. events || (events = _.result(this, 'events'));
  34969. if (!events) return this;
  34970. this.undelegateEvents();
  34971. for (var key in events) {
  34972. var method = events[key];
  34973. if (!_.isFunction(method)) method = this[method];
  34974. if (!method) continue;
  34975. var match = key.match(delegateEventSplitter);
  34976. this.delegate(match[1], match[2], _.bind(method, this));
  34977. }
  34978. return this;
  34979. },
  34980. // Add a single event listener to the view's element (or a child element
  34981. // using `selector`). This only works for delegate-able events: not `focus`,
  34982. // `blur`, and not `change`, `submit`, and `reset` in Internet Explorer.
  34983. delegate: function(eventName, selector, listener) {
  34984. this.$el.on(eventName + '.delegateEvents' + this.cid, selector, listener);
  34985. return this;
  34986. },
  34987. // Clears all callbacks previously bound to the view by `delegateEvents`.
  34988. // You usually don't need to use this, but may wish to if you have multiple
  34989. // Backbone views attached to the same DOM element.
  34990. undelegateEvents: function() {
  34991. if (this.$el) this.$el.off('.delegateEvents' + this.cid);
  34992. return this;
  34993. },
  34994. // A finer-grained `undelegateEvents` for removing a single delegated event.
  34995. // `selector` and `listener` are both optional.
  34996. undelegate: function(eventName, selector, listener) {
  34997. this.$el.off(eventName + '.delegateEvents' + this.cid, selector, listener);
  34998. return this;
  34999. },
  35000. // Produces a DOM element to be assigned to your view. Exposed for
  35001. // subclasses using an alternative DOM manipulation API.
  35002. _createElement: function(tagName) {
  35003. return document.createElement(tagName);
  35004. },
  35005. // Ensure that the View has a DOM element to render into.
  35006. // If `this.el` is a string, pass it through `$()`, take the first
  35007. // matching element, and re-assign it to `el`. Otherwise, create
  35008. // an element from the `id`, `className` and `tagName` properties.
  35009. _ensureElement: function() {
  35010. if (!this.el) {
  35011. var attrs = _.extend({}, _.result(this, 'attributes'));
  35012. if (this.id) attrs.id = _.result(this, 'id');
  35013. if (this.className) attrs['class'] = _.result(this, 'className');
  35014. this.setElement(this._createElement(_.result(this, 'tagName')));
  35015. this._setAttributes(attrs);
  35016. } else {
  35017. this.setElement(_.result(this, 'el'));
  35018. }
  35019. },
  35020. // Set attributes from a hash on this view's element. Exposed for
  35021. // subclasses using an alternative DOM manipulation API.
  35022. _setAttributes: function(attributes) {
  35023. this.$el.attr(attributes);
  35024. }
  35025. });
  35026. // Backbone.sync
  35027. // -------------
  35028. // Override this function to change the manner in which Backbone persists
  35029. // models to the server. You will be passed the type of request, and the
  35030. // model in question. By default, makes a RESTful Ajax request
  35031. // to the model's `url()`. Some possible customizations could be:
  35032. //
  35033. // * Use `setTimeout` to batch rapid-fire updates into a single request.
  35034. // * Send up the models as XML instead of JSON.
  35035. // * Persist models via WebSockets instead of Ajax.
  35036. //
  35037. // Turn on `Backbone.emulateHTTP` in order to send `PUT` and `DELETE` requests
  35038. // as `POST`, with a `_method` parameter containing the true HTTP method,
  35039. // as well as all requests with the body as `application/x-www-form-urlencoded`
  35040. // instead of `application/json` with the model in a param named `model`.
  35041. // Useful when interfacing with server-side languages like **PHP** that make
  35042. // it difficult to read the body of `PUT` requests.
  35043. Backbone.sync = function(method, model, options) {
  35044. var type = methodMap[method];
  35045. // Default options, unless specified.
  35046. _.defaults(options || (options = {}), {
  35047. emulateHTTP: Backbone.emulateHTTP,
  35048. emulateJSON: Backbone.emulateJSON
  35049. });
  35050. // Default JSON-request options.
  35051. var params = {type: type, dataType: 'json'};
  35052. // Ensure that we have a URL.
  35053. if (!options.url) {
  35054. params.url = _.result(model, 'url') || urlError();
  35055. }
  35056. // Ensure that we have the appropriate request data.
  35057. if (options.data == null && model && (method === 'create' || method === 'update' || method === 'patch')) {
  35058. params.contentType = 'application/json';
  35059. params.data = JSON.stringify(options.attrs || model.toJSON(options));
  35060. }
  35061. // For older servers, emulate JSON by encoding the request into an HTML-form.
  35062. if (options.emulateJSON) {
  35063. params.contentType = 'application/x-www-form-urlencoded';
  35064. params.data = params.data ? {model: params.data} : {};
  35065. }
  35066. // For older servers, emulate HTTP by mimicking the HTTP method with `_method`
  35067. // And an `X-HTTP-Method-Override` header.
  35068. if (options.emulateHTTP && (type === 'PUT' || type === 'DELETE' || type === 'PATCH')) {
  35069. params.type = 'POST';
  35070. if (options.emulateJSON) params.data._method = type;
  35071. var beforeSend = options.beforeSend;
  35072. options.beforeSend = function(xhr) {
  35073. xhr.setRequestHeader('X-HTTP-Method-Override', type);
  35074. if (beforeSend) return beforeSend.apply(this, arguments);
  35075. };
  35076. }
  35077. // Don't process data on a non-GET request.
  35078. if (params.type !== 'GET' && !options.emulateJSON) {
  35079. params.processData = false;
  35080. }
  35081. // Pass along `textStatus` and `errorThrown` from jQuery.
  35082. var error = options.error;
  35083. options.error = function(xhr, textStatus, errorThrown) {
  35084. options.textStatus = textStatus;
  35085. options.errorThrown = errorThrown;
  35086. if (error) error.call(options.context, xhr, textStatus, errorThrown);
  35087. };
  35088. // Make the request, allowing the user to override any Ajax options.
  35089. var xhr = options.xhr = Backbone.ajax(_.extend(params, options));
  35090. model.trigger('request', model, xhr, options);
  35091. return xhr;
  35092. };
  35093. // Map from CRUD to HTTP for our default `Backbone.sync` implementation.
  35094. var methodMap = {
  35095. 'create': 'POST',
  35096. 'update': 'PUT',
  35097. 'patch': 'PATCH',
  35098. 'delete': 'DELETE',
  35099. 'read': 'GET'
  35100. };
  35101. // Set the default implementation of `Backbone.ajax` to proxy through to `$`.
  35102. // Override this if you'd like to use a different library.
  35103. Backbone.ajax = function() {
  35104. return Backbone.$.ajax.apply(Backbone.$, arguments);
  35105. };
  35106. // Backbone.Router
  35107. // ---------------
  35108. // Routers map faux-URLs to actions, and fire events when routes are
  35109. // matched. Creating a new one sets its `routes` hash, if not set statically.
  35110. var Router = Backbone.Router = function(options) {
  35111. options || (options = {});
  35112. if (options.routes) this.routes = options.routes;
  35113. this._bindRoutes();
  35114. this.initialize.apply(this, arguments);
  35115. };
  35116. // Cached regular expressions for matching named param parts and splatted
  35117. // parts of route strings.
  35118. var optionalParam = /\((.*?)\)/g;
  35119. var namedParam = /(\(\?)?:\w+/g;
  35120. var splatParam = /\*\w+/g;
  35121. var escapeRegExp = /[\-{}\[\]+?.,\\\^$|#\s]/g;
  35122. // Set up all inheritable **Backbone.Router** properties and methods.
  35123. _.extend(Router.prototype, Events, {
  35124. // Initialize is an empty function by default. Override it with your own
  35125. // initialization logic.
  35126. initialize: function(){},
  35127. // Manually bind a single named route to a callback. For example:
  35128. //
  35129. // this.route('search/:query/p:num', 'search', function(query, num) {
  35130. // ...
  35131. // });
  35132. //
  35133. route: function(route, name, callback) {
  35134. if (!_.isRegExp(route)) route = this._routeToRegExp(route);
  35135. if (_.isFunction(name)) {
  35136. callback = name;
  35137. name = '';
  35138. }
  35139. if (!callback) callback = this[name];
  35140. var router = this;
  35141. Backbone.history.route(route, function(fragment) {
  35142. var args = router._extractParameters(route, fragment);
  35143. if (router.execute(callback, args, name) !== false) {
  35144. router.trigger.apply(router, ['route:' + name].concat(args));
  35145. router.trigger('route', name, args);
  35146. Backbone.history.trigger('route', router, name, args);
  35147. }
  35148. });
  35149. return this;
  35150. },
  35151. // Execute a route handler with the provided parameters. This is an
  35152. // excellent place to do pre-route setup or post-route cleanup.
  35153. execute: function(callback, args, name) {
  35154. if (callback) callback.apply(this, args);
  35155. },
  35156. // Simple proxy to `Backbone.history` to save a fragment into the history.
  35157. navigate: function(fragment, options) {
  35158. Backbone.history.navigate(fragment, options);
  35159. return this;
  35160. },
  35161. // Bind all defined routes to `Backbone.history`. We have to reverse the
  35162. // order of the routes here to support behavior where the most general
  35163. // routes can be defined at the bottom of the route map.
  35164. _bindRoutes: function() {
  35165. if (!this.routes) return;
  35166. this.routes = _.result(this, 'routes');
  35167. var route, routes = _.keys(this.routes);
  35168. while ((route = routes.pop()) != null) {
  35169. this.route(route, this.routes[route]);
  35170. }
  35171. },
  35172. // Convert a route string into a regular expression, suitable for matching
  35173. // against the current location hash.
  35174. _routeToRegExp: function(route) {
  35175. route = route.replace(escapeRegExp, '\\$&')
  35176. .replace(optionalParam, '(?:$1)?')
  35177. .replace(namedParam, function(match, optional) {
  35178. return optional ? match : '([^/?]+)';
  35179. })
  35180. .replace(splatParam, '([^?]*?)');
  35181. return new RegExp('^' + route + '(?:\\?([\\s\\S]*))?$');
  35182. },
  35183. // Given a route, and a URL fragment that it matches, return the array of
  35184. // extracted decoded parameters. Empty or unmatched parameters will be
  35185. // treated as `null` to normalize cross-browser behavior.
  35186. _extractParameters: function(route, fragment) {
  35187. var params = route.exec(fragment).slice(1);
  35188. return _.map(params, function(param, i) {
  35189. // Don't decode the search params.
  35190. if (i === params.length - 1) return param || null;
  35191. return param ? decodeURIComponent(param) : null;
  35192. });
  35193. }
  35194. });
  35195. // Backbone.History
  35196. // ----------------
  35197. // Handles cross-browser history management, based on either
  35198. // [pushState](http://diveintohtml5.info/history.html) and real URLs, or
  35199. // [onhashchange](https://developer.mozilla.org/en-US/docs/DOM/window.onhashchange)
  35200. // and URL fragments. If the browser supports neither (old IE, natch),
  35201. // falls back to polling.
  35202. var History = Backbone.History = function() {
  35203. this.handlers = [];
  35204. this.checkUrl = _.bind(this.checkUrl, this);
  35205. // Ensure that `History` can be used outside of the browser.
  35206. if (typeof window !== 'undefined') {
  35207. this.location = window.location;
  35208. this.history = window.history;
  35209. }
  35210. };
  35211. // Cached regex for stripping a leading hash/slash and trailing space.
  35212. var routeStripper = /^[#\/]|\s+$/g;
  35213. // Cached regex for stripping leading and trailing slashes.
  35214. var rootStripper = /^\/+|\/+$/g;
  35215. // Cached regex for stripping urls of hash.
  35216. var pathStripper = /#.*$/;
  35217. // Has the history handling already been started?
  35218. History.started = false;
  35219. // Set up all inheritable **Backbone.History** properties and methods.
  35220. _.extend(History.prototype, Events, {
  35221. // The default interval to poll for hash changes, if necessary, is
  35222. // twenty times a second.
  35223. interval: 50,
  35224. // Are we at the app root?
  35225. atRoot: function() {
  35226. var path = this.location.pathname.replace(/[^\/]$/, '$&/');
  35227. return path === this.root && !this.getSearch();
  35228. },
  35229. // Does the pathname match the root?
  35230. matchRoot: function() {
  35231. var path = this.decodeFragment(this.location.pathname);
  35232. var rootPath = path.slice(0, this.root.length - 1) + '/';
  35233. return rootPath === this.root;
  35234. },
  35235. // Unicode characters in `location.pathname` are percent encoded so they're
  35236. // decoded for comparison. `%25` should not be decoded since it may be part
  35237. // of an encoded parameter.
  35238. decodeFragment: function(fragment) {
  35239. return decodeURI(fragment.replace(/%25/g, '%2525'));
  35240. },
  35241. // In IE6, the hash fragment and search params are incorrect if the
  35242. // fragment contains `?`.
  35243. getSearch: function() {
  35244. var match = this.location.href.replace(/#.*/, '').match(/\?.+/);
  35245. return match ? match[0] : '';
  35246. },
  35247. // Gets the true hash value. Cannot use location.hash directly due to bug
  35248. // in Firefox where location.hash will always be decoded.
  35249. getHash: function(window) {
  35250. var match = (window || this).location.href.match(/#(.*)$/);
  35251. return match ? match[1] : '';
  35252. },
  35253. // Get the pathname and search params, without the root.
  35254. getPath: function() {
  35255. var path = this.decodeFragment(
  35256. this.location.pathname + this.getSearch()
  35257. ).slice(this.root.length - 1);
  35258. return path.charAt(0) === '/' ? path.slice(1) : path;
  35259. },
  35260. // Get the cross-browser normalized URL fragment from the path or hash.
  35261. getFragment: function(fragment) {
  35262. if (fragment == null) {
  35263. if (this._usePushState || !this._wantsHashChange) {
  35264. fragment = this.getPath();
  35265. } else {
  35266. fragment = this.getHash();
  35267. }
  35268. }
  35269. return fragment.replace(routeStripper, '');
  35270. },
  35271. // Start the hash change handling, returning `true` if the current URL matches
  35272. // an existing route, and `false` otherwise.
  35273. start: function(options) {
  35274. if (History.started) throw new Error('Backbone.history has already been started');
  35275. History.started = true;
  35276. // Figure out the initial configuration. Do we need an iframe?
  35277. // Is pushState desired ... is it available?
  35278. this.options = _.extend({root: '/'}, this.options, options);
  35279. this.root = this.options.root;
  35280. this._wantsHashChange = this.options.hashChange !== false;
  35281. this._hasHashChange = 'onhashchange' in window && (document.documentMode === void 0 || document.documentMode > 7);
  35282. this._useHashChange = this._wantsHashChange && this._hasHashChange;
  35283. this._wantsPushState = !!this.options.pushState;
  35284. this._hasPushState = !!(this.history && this.history.pushState);
  35285. this._usePushState = this._wantsPushState && this._hasPushState;
  35286. this.fragment = this.getFragment();
  35287. // Normalize root to always include a leading and trailing slash.
  35288. this.root = ('/' + this.root + '/').replace(rootStripper, '/');
  35289. // Transition from hashChange to pushState or vice versa if both are
  35290. // requested.
  35291. if (this._wantsHashChange && this._wantsPushState) {
  35292. // If we've started off with a route from a `pushState`-enabled
  35293. // browser, but we're currently in a browser that doesn't support it...
  35294. if (!this._hasPushState && !this.atRoot()) {
  35295. var rootPath = this.root.slice(0, -1) || '/';
  35296. this.location.replace(rootPath + '#' + this.getPath());
  35297. // Return immediately as browser will do redirect to new url
  35298. return true;
  35299. // Or if we've started out with a hash-based route, but we're currently
  35300. // in a browser where it could be `pushState`-based instead...
  35301. } else if (this._hasPushState && this.atRoot()) {
  35302. this.navigate(this.getHash(), {replace: true});
  35303. }
  35304. }
  35305. // Proxy an iframe to handle location events if the browser doesn't
  35306. // support the `hashchange` event, HTML5 history, or the user wants
  35307. // `hashChange` but not `pushState`.
  35308. if (!this._hasHashChange && this._wantsHashChange && !this._usePushState) {
  35309. this.iframe = document.createElement('iframe');
  35310. this.iframe.src = 'javascript:0';
  35311. this.iframe.style.display = 'none';
  35312. this.iframe.tabIndex = -1;
  35313. var body = document.body;
  35314. // Using `appendChild` will throw on IE < 9 if the document is not ready.
  35315. var iWindow = body.insertBefore(this.iframe, body.firstChild).contentWindow;
  35316. iWindow.document.open();
  35317. iWindow.document.close();
  35318. iWindow.location.hash = '#' + this.fragment;
  35319. }
  35320. // Add a cross-platform `addEventListener` shim for older browsers.
  35321. var addEventListener = window.addEventListener || function(eventName, listener) {
  35322. return attachEvent('on' + eventName, listener);
  35323. };
  35324. // Depending on whether we're using pushState or hashes, and whether
  35325. // 'onhashchange' is supported, determine how we check the URL state.
  35326. if (this._usePushState) {
  35327. addEventListener('popstate', this.checkUrl, false);
  35328. } else if (this._useHashChange && !this.iframe) {
  35329. addEventListener('hashchange', this.checkUrl, false);
  35330. } else if (this._wantsHashChange) {
  35331. this._checkUrlInterval = setInterval(this.checkUrl, this.interval);
  35332. }
  35333. if (!this.options.silent) return this.loadUrl();
  35334. },
  35335. // Disable Backbone.history, perhaps temporarily. Not useful in a real app,
  35336. // but possibly useful for unit testing Routers.
  35337. stop: function() {
  35338. // Add a cross-platform `removeEventListener` shim for older browsers.
  35339. var removeEventListener = window.removeEventListener || function(eventName, listener) {
  35340. return detachEvent('on' + eventName, listener);
  35341. };
  35342. // Remove window listeners.
  35343. if (this._usePushState) {
  35344. removeEventListener('popstate', this.checkUrl, false);
  35345. } else if (this._useHashChange && !this.iframe) {
  35346. removeEventListener('hashchange', this.checkUrl, false);
  35347. }
  35348. // Clean up the iframe if necessary.
  35349. if (this.iframe) {
  35350. document.body.removeChild(this.iframe);
  35351. this.iframe = null;
  35352. }
  35353. // Some environments will throw when clearing an undefined interval.
  35354. if (this._checkUrlInterval) clearInterval(this._checkUrlInterval);
  35355. History.started = false;
  35356. },
  35357. // Add a route to be tested when the fragment changes. Routes added later
  35358. // may override previous routes.
  35359. route: function(route, callback) {
  35360. this.handlers.unshift({route: route, callback: callback});
  35361. },
  35362. // Checks the current URL to see if it has changed, and if it has,
  35363. // calls `loadUrl`, normalizing across the hidden iframe.
  35364. checkUrl: function(e) {
  35365. var current = this.getFragment();
  35366. // If the user pressed the back button, the iframe's hash will have
  35367. // changed and we should use that for comparison.
  35368. if (current === this.fragment && this.iframe) {
  35369. current = this.getHash(this.iframe.contentWindow);
  35370. }
  35371. if (current === this.fragment) return false;
  35372. if (this.iframe) this.navigate(current);
  35373. this.loadUrl();
  35374. },
  35375. // Attempt to load the current URL fragment. If a route succeeds with a
  35376. // match, returns `true`. If no defined routes matches the fragment,
  35377. // returns `false`.
  35378. loadUrl: function(fragment) {
  35379. // If the root doesn't match, no routes can match either.
  35380. if (!this.matchRoot()) return false;
  35381. fragment = this.fragment = this.getFragment(fragment);
  35382. return _.some(this.handlers, function(handler) {
  35383. if (handler.route.test(fragment)) {
  35384. handler.callback(fragment);
  35385. return true;
  35386. }
  35387. });
  35388. },
  35389. // Save a fragment into the hash history, or replace the URL state if the
  35390. // 'replace' option is passed. You are responsible for properly URL-encoding
  35391. // the fragment in advance.
  35392. //
  35393. // The options object can contain `trigger: true` if you wish to have the
  35394. // route callback be fired (not usually desirable), or `replace: true`, if
  35395. // you wish to modify the current URL without adding an entry to the history.
  35396. navigate: function(fragment, options) {
  35397. if (!History.started) return false;
  35398. if (!options || options === true) options = {trigger: !!options};
  35399. // Normalize the fragment.
  35400. fragment = this.getFragment(fragment || '');
  35401. // Don't include a trailing slash on the root.
  35402. var rootPath = this.root;
  35403. if (fragment === '' || fragment.charAt(0) === '?') {
  35404. rootPath = rootPath.slice(0, -1) || '/';
  35405. }
  35406. var url = rootPath + fragment;
  35407. // Strip the hash and decode for matching.
  35408. fragment = this.decodeFragment(fragment.replace(pathStripper, ''));
  35409. if (this.fragment === fragment) return;
  35410. this.fragment = fragment;
  35411. // If pushState is available, we use it to set the fragment as a real URL.
  35412. if (this._usePushState) {
  35413. this.history[options.replace ? 'replaceState' : 'pushState']({}, document.title, url);
  35414. // If hash changes haven't been explicitly disabled, update the hash
  35415. // fragment to store history.
  35416. } else if (this._wantsHashChange) {
  35417. this._updateHash(this.location, fragment, options.replace);
  35418. if (this.iframe && fragment !== this.getHash(this.iframe.contentWindow)) {
  35419. var iWindow = this.iframe.contentWindow;
  35420. // Opening and closing the iframe tricks IE7 and earlier to push a
  35421. // history entry on hash-tag change. When replace is true, we don't
  35422. // want this.
  35423. if (!options.replace) {
  35424. iWindow.document.open();
  35425. iWindow.document.close();
  35426. }
  35427. this._updateHash(iWindow.location, fragment, options.replace);
  35428. }
  35429. // If you've told us that you explicitly don't want fallback hashchange-
  35430. // based history, then `navigate` becomes a page refresh.
  35431. } else {
  35432. return this.location.assign(url);
  35433. }
  35434. if (options.trigger) return this.loadUrl(fragment);
  35435. },
  35436. // Update the hash location, either replacing the current entry, or adding
  35437. // a new one to the browser history.
  35438. _updateHash: function(location, fragment, replace) {
  35439. if (replace) {
  35440. var href = location.href.replace(/(javascript:|#).*$/, '');
  35441. location.replace(href + '#' + fragment);
  35442. } else {
  35443. // Some browsers require that `hash` contains a leading #.
  35444. location.hash = '#' + fragment;
  35445. }
  35446. }
  35447. });
  35448. // Create the default Backbone.history.
  35449. Backbone.history = new History;
  35450. // Helpers
  35451. // -------
  35452. // Helper function to correctly set up the prototype chain for subclasses.
  35453. // Similar to `goog.inherits`, but uses a hash of prototype properties and
  35454. // class properties to be extended.
  35455. var extend = function(protoProps, staticProps) {
  35456. var parent = this;
  35457. var child;
  35458. // The constructor function for the new subclass is either defined by you
  35459. // (the "constructor" property in your `extend` definition), or defaulted
  35460. // by us to simply call the parent constructor.
  35461. if (protoProps && _.has(protoProps, 'constructor')) {
  35462. child = protoProps.constructor;
  35463. } else {
  35464. child = function(){ return parent.apply(this, arguments); };
  35465. }
  35466. // Add static properties to the constructor function, if supplied.
  35467. _.extend(child, parent, staticProps);
  35468. // Set the prototype chain to inherit from `parent`, without calling
  35469. // `parent`'s constructor function and add the prototype properties.
  35470. child.prototype = _.create(parent.prototype, protoProps);
  35471. child.prototype.constructor = child;
  35472. // Set a convenience property in case the parent's prototype is needed
  35473. // later.
  35474. child.__super__ = parent.prototype;
  35475. return child;
  35476. };
  35477. // Set up inheritance for the model, collection, router, view and history.
  35478. Model.extend = Collection.extend = Router.extend = View.extend = History.extend = extend;
  35479. // Throw an error when a URL is needed, and none is supplied.
  35480. var urlError = function() {
  35481. throw new Error('A "url" property or function must be specified');
  35482. };
  35483. // Wrap an optional error callback with a fallback error event.
  35484. var wrapError = function(model, options) {
  35485. var error = options.error;
  35486. options.error = function(resp) {
  35487. if (error) error.call(options.context, model, resp, options);
  35488. model.trigger('error', model, resp, options);
  35489. };
  35490. };
  35491. return Backbone;
  35492. });
  35493. /*global define */
  35494. define('backbone.noconflict',['backbone'], function (Backbone) {
  35495. return Backbone.noConflict();
  35496. });
  35497. // Backbone.NativeView.js 0.3.3
  35498. // ---------------
  35499. // (c) 2015 Adam Krebs, Jimmy Yuen Ho Wong
  35500. // Backbone.NativeView may be freely distributed under the MIT license.
  35501. // For all details and documentation:
  35502. // https://github.com/akre54/Backbone.NativeView
  35503. (function (factory) {
  35504. if (typeof define === 'function' && define.amd) { define('backbone.nativeview',['backbone'], factory);
  35505. } else if (typeof module === 'object') { module.exports = factory(require('backbone'));
  35506. } else { factory(Backbone); }
  35507. }(function (Backbone) {
  35508. // Cached regex to match an opening '<' of an HTML tag, possibly left-padded
  35509. // with whitespace.
  35510. var paddedLt = /^\s*</;
  35511. // Caches a local reference to `Element.prototype` for faster access.
  35512. var ElementProto = (typeof Element !== 'undefined' && Element.prototype) || {};
  35513. // Cross-browser event listener shims
  35514. var elementAddEventListener = ElementProto.addEventListener || function(eventName, listener) {
  35515. return this.attachEvent('on' + eventName, listener);
  35516. }
  35517. var elementRemoveEventListener = ElementProto.removeEventListener || function(eventName, listener) {
  35518. return this.detachEvent('on' + eventName, listener);
  35519. }
  35520. var indexOf = function(array, item) {
  35521. for (var i = 0, len = array.length; i < len; i++) if (array[i] === item) return i;
  35522. return -1;
  35523. }
  35524. // Find the right `Element#matches` for IE>=9 and modern browsers.
  35525. var matchesSelector = ElementProto.matches ||
  35526. ElementProto.webkitMatchesSelector ||
  35527. ElementProto.mozMatchesSelector ||
  35528. ElementProto.msMatchesSelector ||
  35529. ElementProto.oMatchesSelector ||
  35530. // Make our own `Element#matches` for IE8
  35531. function(selector) {
  35532. // Use querySelectorAll to find all elements matching the selector,
  35533. // then check if the given element is included in that list.
  35534. // Executing the query on the parentNode reduces the resulting nodeList,
  35535. // (document doesn't have a parentNode).
  35536. var nodeList = (this.parentNode || document).querySelectorAll(selector) || [];
  35537. return ~indexOf(nodeList, this);
  35538. };
  35539. // Cache Backbone.View for later access in constructor
  35540. var BBView = Backbone.View;
  35541. // To extend an existing view to use native methods, extend the View prototype
  35542. // with the mixin: _.extend(MyView.prototype, Backbone.NativeViewMixin);
  35543. Backbone.NativeViewMixin = {
  35544. _domEvents: null,
  35545. constructor: function() {
  35546. this._domEvents = [];
  35547. return BBView.apply(this, arguments);
  35548. },
  35549. $: function(selector) {
  35550. return this.el.querySelectorAll(selector);
  35551. },
  35552. _removeElement: function() {
  35553. this.undelegateEvents();
  35554. if (this.el.parentNode) this.el.parentNode.removeChild(this.el);
  35555. },
  35556. // Apply the `element` to the view. `element` can be a CSS selector,
  35557. // a string of HTML, or an Element node.
  35558. _setElement: function(element) {
  35559. if (typeof element == 'string') {
  35560. if (paddedLt.test(element)) {
  35561. var el = document.createElement('div');
  35562. el.innerHTML = element;
  35563. this.el = el.firstChild;
  35564. } else {
  35565. this.el = document.querySelector(element);
  35566. }
  35567. } else {
  35568. this.el = element;
  35569. }
  35570. },
  35571. // Set a hash of attributes to the view's `el`. We use the "prop" version
  35572. // if available, falling back to `setAttribute` for the catch-all.
  35573. _setAttributes: function(attrs) {
  35574. for (var attr in attrs) {
  35575. attr in this.el ? this.el[attr] = attrs[attr] : this.el.setAttribute(attr, attrs[attr]);
  35576. }
  35577. },
  35578. // Make a event delegation handler for the given `eventName` and `selector`
  35579. // and attach it to `this.el`.
  35580. // If selector is empty, the listener will be bound to `this.el`. If not, a
  35581. // new handler that will recursively traverse up the event target's DOM
  35582. // hierarchy looking for a node that matches the selector. If one is found,
  35583. // the event's `delegateTarget` property is set to it and the return the
  35584. // result of calling bound `listener` with the parameters given to the
  35585. // handler.
  35586. delegate: function(eventName, selector, listener) {
  35587. if (typeof selector === 'function') {
  35588. listener = selector;
  35589. selector = null;
  35590. }
  35591. var root = this.el;
  35592. var handler = selector ? function (e) {
  35593. var node = e.target || e.srcElement;
  35594. for (; node && node != root; node = node.parentNode) {
  35595. if (matchesSelector.call(node, selector)) {
  35596. e.delegateTarget = node;
  35597. listener(e);
  35598. }
  35599. }
  35600. } : listener;
  35601. elementAddEventListener.call(this.el, eventName, handler, false);
  35602. this._domEvents.push({eventName: eventName, handler: handler, listener: listener, selector: selector});
  35603. return handler;
  35604. },
  35605. // Remove a single delegated event. Either `eventName` or `selector` must
  35606. // be included, `selector` and `listener` are optional.
  35607. undelegate: function(eventName, selector, listener) {
  35608. if (typeof selector === 'function') {
  35609. listener = selector;
  35610. selector = null;
  35611. }
  35612. if (this.el) {
  35613. var handlers = this._domEvents.slice();
  35614. for (var i = 0, len = handlers.length; i < len; i++) {
  35615. var item = handlers[i];
  35616. var match = item.eventName === eventName &&
  35617. (listener ? item.listener === listener : true) &&
  35618. (selector ? item.selector === selector : true);
  35619. if (!match) continue;
  35620. elementRemoveEventListener.call(this.el, item.eventName, item.handler, false);
  35621. this._domEvents.splice(indexOf(handlers, item), 1);
  35622. }
  35623. }
  35624. return this;
  35625. },
  35626. // Remove all events created with `delegate` from `el`
  35627. undelegateEvents: function() {
  35628. if (this.el) {
  35629. for (var i = 0, len = this._domEvents.length; i < len; i++) {
  35630. var item = this._domEvents[i];
  35631. elementRemoveEventListener.call(this.el, item.eventName, item.handler, false);
  35632. };
  35633. this._domEvents.length = 0;
  35634. }
  35635. return this;
  35636. }
  35637. };
  35638. Backbone.NativeView = Backbone.View.extend(Backbone.NativeViewMixin);
  35639. return Backbone.NativeView;
  35640. }));
  35641. /**
  35642. * Backbone localStorage and sessionStorage Adapter
  35643. * Version 0.0.3
  35644. *
  35645. * https://github.com/jcbrand/Backbone.browserStorage
  35646. */
  35647. (function (root, factory) {
  35648. if (typeof exports === 'object' && typeof require === 'function') {
  35649. module.exports = factory(require("backbone"), require('underscore'));
  35650. } else if (typeof define === "function" && define.amd) {
  35651. // AMD. Register as an anonymous module.
  35652. define('backbone.browserStorage',["backbone", "underscore"], function(Backbone, _) {
  35653. // Use global variables if the locals are undefined.
  35654. return factory(Backbone || root.Backbone, _ || root._);
  35655. });
  35656. } else {
  35657. factory(Backbone, _);
  35658. }
  35659. }(this, function(Backbone, _) {
  35660. // A simple module to replace `Backbone.sync` with *browser storage*-based
  35661. // persistence. Models are given GUIDS, and saved into a JSON object. Simple
  35662. // as that.
  35663. // Hold reference to Underscore.js and Backbone.js in the closure in order
  35664. // to make things work even if they are removed from the global namespace
  35665. // Generate four random hex digits.
  35666. function S4() {
  35667. return (((1+Math.random())*0x10000)|0).toString(16).substring(1);
  35668. }
  35669. // Generate a pseudo-GUID by concatenating random hexadecimal.
  35670. function guid() {
  35671. return (S4()+S4()+"-"+S4()+"-"+S4()+"-"+S4()+"-"+S4()+S4()+S4());
  35672. }
  35673. function contains(array, item) {
  35674. var i = array.length;
  35675. while (i--) if (array[i] === item) return true;
  35676. return false;
  35677. }
  35678. function extend(obj, props) {
  35679. for (var key in props) { obj[key] = props[key]; }
  35680. return obj;
  35681. }
  35682. function _browserStorage (name, serializer, type) {
  35683. var _store;
  35684. if (type === 'local' && !window.localStorage ) {
  35685. throw "Backbone.browserStorage: Environment does not support localStorage.";
  35686. } else if (type === 'session' && !window.sessionStorage ) {
  35687. throw "Backbone.browserStorage: Environment does not support sessionStorage.";
  35688. }
  35689. this.name = name;
  35690. this.serializer = serializer || {
  35691. serialize: function(item) {
  35692. return _.isObject(item) ? JSON.stringify(item) : item;
  35693. },
  35694. // fix for "illegal access" error on Android when JSON.parse is passed null
  35695. deserialize: function (data) {
  35696. return data && JSON.parse(data);
  35697. }
  35698. };
  35699. if (type === 'session') {
  35700. this.store = window.sessionStorage;
  35701. } else if (type === 'local') {
  35702. this.store = window.localStorage;
  35703. } else {
  35704. throw "Backbone.browserStorage: No storage type was specified";
  35705. }
  35706. _store = this.store.getItem(this.name);
  35707. this.records = (_store && _store.split(",")) || [];
  35708. }
  35709. // Our Store is represented by a single JS object in *localStorage* or *sessionStorage*.
  35710. // Create it with a meaningful name, like the name you'd give a table.
  35711. Backbone.BrowserStorage = {
  35712. local: function (name, serializer) {
  35713. return _browserStorage.bind(this, name, serializer, 'local')();
  35714. },
  35715. session: function (name, serializer) {
  35716. return _browserStorage.bind(this, name, serializer, 'session')();
  35717. }
  35718. };
  35719. // The browser's local and session stores will be extended with this obj.
  35720. var _extension = {
  35721. // Save the current state of the **Store**
  35722. save: function() {
  35723. this.store.setItem(this.name, this.records.join(","));
  35724. },
  35725. // Add a model, giving it a (hopefully)-unique GUID, if it doesn't already
  35726. // have an id of it's own.
  35727. create: function(model) {
  35728. if (!model.id) {
  35729. model.id = guid();
  35730. model.set(model.idAttribute, model.id);
  35731. }
  35732. this.store.setItem(this._itemName(model.id), this.serializer.serialize(model));
  35733. this.records.push(model.id.toString());
  35734. this.save();
  35735. return this.find(model) !== false;
  35736. },
  35737. // Update a model by replacing its copy in `this.data`.
  35738. update: function(model) {
  35739. this.store.setItem(this._itemName(model.id), this.serializer.serialize(model));
  35740. var modelId = model.id.toString();
  35741. if (!contains(this.records, modelId)) {
  35742. this.records.push(modelId);
  35743. this.save();
  35744. }
  35745. return this.find(model) !== false;
  35746. },
  35747. // Retrieve a model from `this.data` by id.
  35748. find: function(model) {
  35749. return this.serializer.deserialize(this.store.getItem(this._itemName(model.id)));
  35750. },
  35751. // Return the array of all models currently in storage.
  35752. findAll: function() {
  35753. var result = [];
  35754. for (var i = 0, id, data; i < this.records.length; i++) {
  35755. id = this.records[i];
  35756. data = this.serializer.deserialize(this.store.getItem(this._itemName(id)));
  35757. if (data !== null) result.push(data);
  35758. }
  35759. return result;
  35760. },
  35761. // Delete a model from `this.data`, returning it.
  35762. destroy: function(model) {
  35763. this.store.removeItem(this._itemName(model.id));
  35764. var modelId = model.id.toString();
  35765. for (var i = 0, id; i < this.records.length; i++) {
  35766. if (this.records[i] === modelId) {
  35767. this.records.splice(i, 1);
  35768. }
  35769. }
  35770. this.save();
  35771. return model;
  35772. },
  35773. browserStorage: function() {
  35774. return {
  35775. session: sessionStorage,
  35776. local: localStorage
  35777. };
  35778. },
  35779. // Clear browserStorage for specific collection.
  35780. _clear: function() {
  35781. var local = this.store, itemRe;
  35782. // Escape special regex characters in id.
  35783. itemRe = new RegExp("^" + this.name.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&") + "-");
  35784. // Remove id-tracking item (e.g., "foo").
  35785. local.removeItem(this.name);
  35786. // Match all data items (e.g., "foo-ID") and remove.
  35787. for (var k in local) {
  35788. if (itemRe.test(k)) {
  35789. local.removeItem(k);
  35790. }
  35791. }
  35792. this.records.length = 0;
  35793. },
  35794. // Size of browserStorage.
  35795. _storageSize: function() {
  35796. return this.store.length;
  35797. },
  35798. _itemName: function(id) {
  35799. return this.name+"-"+id;
  35800. }
  35801. };
  35802. extend(Backbone.BrowserStorage.session.prototype, _extension);
  35803. extend(Backbone.BrowserStorage.local.prototype, _extension);
  35804. // localSync delegate to the model or collection's
  35805. // *browserStorage* property, which should be an instance of `Store`.
  35806. // window.Store.sync and Backbone.localSync is deprecated, use Backbone.BrowserStorage.sync instead
  35807. Backbone.BrowserStorage.sync = Backbone.localSync = function(method, model, options) {
  35808. var store = model.browserStorage || model.collection.browserStorage;
  35809. var resp, errorMessage;
  35810. //If $ is having Deferred - use it.
  35811. var syncDfd = Backbone.$ ?
  35812. (Backbone.$.Deferred && Backbone.$.Deferred()) :
  35813. (Backbone.Deferred && Backbone.Deferred());
  35814. try {
  35815. switch (method) {
  35816. case "read":
  35817. resp = model.id !== undefined ? store.find(model) : store.findAll();
  35818. break;
  35819. case "create":
  35820. resp = store.create(model);
  35821. break;
  35822. case "update":
  35823. resp = store.update(model);
  35824. break;
  35825. case "delete":
  35826. resp = store.destroy(model);
  35827. break;
  35828. }
  35829. } catch(error) {
  35830. if (error.code === 22 && store._storageSize() === 0)
  35831. errorMessage = "Private browsing is unsupported";
  35832. else
  35833. errorMessage = error.message;
  35834. }
  35835. if (resp) {
  35836. if (options && options.success) {
  35837. if (Backbone.VERSION === "0.9.10") {
  35838. options.success(model, resp, options);
  35839. } else {
  35840. options.success(resp);
  35841. }
  35842. }
  35843. if (syncDfd) {
  35844. syncDfd.resolve(resp);
  35845. }
  35846. } else {
  35847. errorMessage = errorMessage ? errorMessage
  35848. : "Record Not Found";
  35849. if (options && options.error)
  35850. if (Backbone.VERSION === "0.9.10") {
  35851. options.error(model, errorMessage, options);
  35852. } else {
  35853. options.error(errorMessage);
  35854. }
  35855. if (syncDfd)
  35856. syncDfd.reject(errorMessage);
  35857. }
  35858. // add compatibility with $.ajax
  35859. // always execute callback for success and error
  35860. if (options && options.complete) options.complete(resp);
  35861. return syncDfd && syncDfd.promise();
  35862. };
  35863. Backbone.ajaxSync = Backbone.sync;
  35864. Backbone.getSyncMethod = function(model) {
  35865. if(model.browserStorage || (model.collection && model.collection.browserStorage)) {
  35866. return Backbone.localSync;
  35867. }
  35868. return Backbone.ajaxSync;
  35869. };
  35870. // Override 'Backbone.sync' to default to localSync,
  35871. // the original 'Backbone.sync' is still available in 'Backbone.ajaxSync'
  35872. Backbone.sync = function(method, model, options) {
  35873. return Backbone.getSyncMethod(model).apply(this, [method, model, options]);
  35874. };
  35875. return Backbone.BrowserStorage;
  35876. }));
  35877. // Converse.js (A browser based XMPP chat client)
  35878. // http://conversejs.org
  35879. //
  35880. // Copyright (c) 2012-2017, Jan-Carel Brand <jc@opkode.com>
  35881. // Licensed under the Mozilla Public License (MPLv2)
  35882. //
  35883. /*global Backbone, define, window, JSON */
  35884. (function (root, factory) {
  35885. define('converse-core',["sizzle", "es6-promise", "lodash.noconflict", "lodash.fp", "polyfill", "i18n", "utils", "moment", "strophe", "pluggable", "backbone.noconflict", "backbone.nativeview", "backbone.browserStorage"], factory);
  35886. })(void 0, function (sizzle, Promise, _, f, polyfill, i18n, u, moment, Strophe, pluggable, Backbone) {
  35887. /* Cannot use this due to Safari bug.
  35888. * See https://github.com/jcbrand/converse.js/issues/196
  35889. */
  35890. // "use strict";
  35891. // Strophe globals
  35892. var _Strophe = Strophe,
  35893. $build = _Strophe.$build,
  35894. $iq = _Strophe.$iq,
  35895. $msg = _Strophe.$msg,
  35896. $pres = _Strophe.$pres;
  35897. var b64_sha1 = Strophe.SHA1.b64_sha1;
  35898. Strophe = Strophe.Strophe; // Add Strophe Namespaces
  35899. Strophe.addNamespace('CARBONS', 'urn:xmpp:carbons:2');
  35900. Strophe.addNamespace('CHATSTATES', 'http://jabber.org/protocol/chatstates');
  35901. Strophe.addNamespace('CSI', 'urn:xmpp:csi:0');
  35902. Strophe.addNamespace('DELAY', 'urn:xmpp:delay');
  35903. Strophe.addNamespace('FORWARD', 'urn:xmpp:forward:0');
  35904. Strophe.addNamespace('HINTS', 'urn:xmpp:hints');
  35905. Strophe.addNamespace('MAM', 'urn:xmpp:mam:2');
  35906. Strophe.addNamespace('NICK', 'http://jabber.org/protocol/nick');
  35907. Strophe.addNamespace('PUBSUB', 'http://jabber.org/protocol/pubsub');
  35908. Strophe.addNamespace('ROSTERX', 'http://jabber.org/protocol/rosterx');
  35909. Strophe.addNamespace('RSM', 'http://jabber.org/protocol/rsm');
  35910. Strophe.addNamespace('SID', 'urn:xmpp:sid:0');
  35911. Strophe.addNamespace('SPOILER', 'urn:xmpp:spoiler:0');
  35912. Strophe.addNamespace('XFORM', 'jabber:x:data'); // Use Mustache style syntax for variable interpolation
  35913. /* Configuration of Lodash templates (this config is distinct to the
  35914. * config of requirejs-tpl in main.js). This one is for normal inline templates.
  35915. */
  35916. _.templateSettings = {
  35917. 'escape': /\{\{\{([\s\S]+?)\}\}\}/g,
  35918. 'evaluate': /\{\[([\s\S]+?)\]\}/g,
  35919. 'interpolate': /\{\{([\s\S]+?)\}\}/g,
  35920. 'imports': {
  35921. '_': _
  35922. }
  35923. };
  35924. var _converse = {
  35925. 'templates': {},
  35926. 'promises': {}
  35927. };
  35928. _.extend(_converse, Backbone.Events); // Core plugins are whitelisted automatically
  35929. _converse.core_plugins = ['converse-bookmarks', 'converse-chatboxes', 'converse-chatview', 'converse-controlbox', 'converse-core', 'converse-disco', 'converse-dragresize', 'converse-dropdown', 'converse-fullscreen', 'converse-headline', 'converse-mam', 'converse-minimize', 'converse-modal', 'converse-muc', 'converse-muc-embedded', 'converse-muc-views', 'converse-notification', 'converse-otr', 'converse-ping', 'converse-profile', 'converse-register', 'converse-roomslist', 'converse-rosterview', 'converse-singleton', 'converse-spoilers', 'converse-vcard']; // Make converse pluggable
  35930. pluggable.enable(_converse, '_converse', 'pluggable'); // Module-level constants
  35931. _converse.STATUS_WEIGHTS = {
  35932. 'offline': 6,
  35933. 'unavailable': 5,
  35934. 'xa': 4,
  35935. 'away': 3,
  35936. 'dnd': 2,
  35937. 'chat': 1,
  35938. // We currently don't differentiate between "chat" and "online"
  35939. 'online': 1
  35940. };
  35941. _converse.PRETTY_CHAT_STATUS = {
  35942. 'offline': 'Offline',
  35943. 'unavailable': 'Unavailable',
  35944. 'xa': 'Extended Away',
  35945. 'away': 'Away',
  35946. 'dnd': 'Do not disturb',
  35947. 'chat': 'Chattty',
  35948. 'online': 'Online'
  35949. };
  35950. _converse.ANONYMOUS = "anonymous";
  35951. _converse.CLOSED = 'closed';
  35952. _converse.EXTERNAL = "external";
  35953. _converse.LOGIN = "login";
  35954. _converse.LOGOUT = "logout";
  35955. _converse.OPENED = 'opened';
  35956. _converse.PREBIND = "prebind";
  35957. _converse.CONNECTION_STATUS = {
  35958. 0: 'ERROR',
  35959. 1: 'CONNECTING',
  35960. 2: 'CONNFAIL',
  35961. 3: 'AUTHENTICATING',
  35962. 4: 'AUTHFAIL',
  35963. 5: 'CONNECTED',
  35964. 6: 'DISCONNECTED',
  35965. 7: 'DISCONNECTING',
  35966. 8: 'ATTACHED',
  35967. 9: 'REDIRECT',
  35968. 10: 'RECONNECTING'
  35969. };
  35970. _converse.DEFAULT_IMAGE_TYPE = 'image/png';
  35971. _converse.DEFAULT_IMAGE = "iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAIAAABt+uBvAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gwHCy455JBsggAABkJJREFUeNrtnM1PE1sUwHvvTD8otWLHST/Gimi1CEgr6M6FEWuIBo2pujDVsNDEP8GN/4MbN7oxrlipG2OCgZgYlxAbkRYw1KqkIDRCSkM7nXvvW8x7vjyNeQ9m7p1p3z1LQk/v/Dhz7vkEXL161cHl9wI5Ag6IA+KAOCAOiAPigDggLhwQB2S+iNZ+PcYY/SWEEP2HAAAIoSAIoihCCP+ngDDGtVotGAz29/cfOXJEUZSOjg6n06lp2sbGRqlUWlhYyGazS0tLbrdbEASrzgksyeYJId3d3el0uqenRxRFAAAA4KdfIIRgjD9+/Pj8+fOpqSndslofEIQwHA6Pjo4mEon//qmFhYXHjx8vLi4ihBgDEnp7e9l8E0Jo165dQ0NDd+/eDYVC2/qsJElDQ0OEkKWlpa2tLZamxAhQo9EIBoOjo6MXL17csZLe3l5FUT59+lQul5l5JRaAVFWNRqN37tw5ceKEQVWRSOTw4cOFQuHbt2+iKLYCIISQLMu3b99OJpOmKAwEAgcPHszn8+vr6wzsiG6UQQhxuVyXLl0aGBgwUW0sFstkMl6v90fo1KyAMMYDAwPnzp0zXfPg4GAqlWo0Gk0MiBAiy/L58+edTqf5Aa4onj59OhaLYYybFRCEMBaL0fNxBw4cSCQStN0QRUBut3t4eJjq6U+dOiVJElVPRBFQIBDo6+ujCqirqyscDlONGykC2lYyYSR6pBoQQapHZwAoHo/TuARYAOrs7GQASFEUqn6aIiBJkhgA6ujooFpUo6iaTa7koFwnaoWadLNe81tbWwzoaJrWrICWl5cZAFpbW6OabVAEtLi4yABQsVjUNK0pAWWzWQaAcrlcswKanZ1VVZUqHYRQEwOq1Wpv3ryhCmh6erpcLjdrNl+v1ycnJ+l5UELI27dvv3//3qxxEADgy5cvExMT9Mznw4cPtFtAdAPFarU6Pj5eKpVM17yxsfHy5cvV1VXazXu62gVBKBQKT58+rdVqJqrFGL948eLdu3dU8/g/H4FBUaJYLAqC0NPTY9brMD4+PjY25mDSracOCABACJmZmXE6nUePHjWu8NWrV48ePSKEsGlAs7Agfd5nenq6Wq0mk0kjDzY2NvbkyRMIIbP2PLvhBUEQ8vl8NpuNx+M+n29bzhVjvLKycv/+/YmJCcazQuwA6YzW1tYmJyf1SY+2trZ/rRk1Go1SqfT69esHDx4UCgVmNaa/zZ/9ABUhRFXVYDB48uTJeDweiUQkSfL7/T9MA2NcqVTK5fLy8vL8/PzU1FSxWHS5XJaM4wGr9sUwxqqqer3eUCgkSZJuUBBCfTRvc3OzXC6vrKxUKhWn02nhCJ5lM4oQQo/HgxD6+vXr58+fHf8sDOp+HQDg8XgclorFU676dKLlo6yWRdItIBwQB8QBcUCtfosRQjRNQwhhjPUC4w46WXryBSHU1zgEQWBz99EFhDGu1+t+v//48ePxeFxRlD179ng8nh0Efgiher2+vr6ur3HMzMysrq7uTJVdACGEurq6Ll++nEgkPB7Pj9jPoDHqOxyqqubz+WfPnuVyuV9XPeyeagAAAoHArVu3BgcHab8CuVzu4cOHpVKJUnfA5GweY+xyuc6cOXPv3r1IJMLAR8iyPDw8XK/Xi8Wiqqqmm5KZgBBC7e3tN27cuHbtGuPVpf7+/lAoNDs7W61WzfVKpgHSSzw3b95MpVKW3MfRaDQSiczNzVUqFRMZmQOIEOL1eq9fv3727FlL1t50URRFluX5+flqtWpWEGAOIFEUU6nUlStXLKSjy759+xwOx9zcnKZpphzGHMzhcDiTydgk9r1w4YIp7RPTAAmCkMlk2FeLf/tIEKbTab/fbwtAhJBoNGrutpNx6e7uPnTokC1eMU3T0um0DZPMkZER6wERQnw+n/FFSxpy7Nix3bt3WwwIIcRgIWnHkkwmjecfRgGx7DtuV/r6+iwGhDHev3+/bQF1dnYaH6E2CkiWZdsC2rt3r8WAHA5HW1ubbQGZcjajgOwTH/4qNko1Wlg4IA6IA+KAOKBWBUQIsfNojyliKIoRRfH9+/dut9umf3wzpoUNNQ4BAJubmwz+ic+OxefzWWlBhJD29nbug7iT5sIBcUAcEAfEAXFAHBAHxOVn+QMrmWpuPZx12gAAAABJRU5ErkJggg==";
  35972. _converse.log = function (message, level) {
  35973. var style = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
  35974. /* Logs messages to the browser's developer console.
  35975. *
  35976. * Parameters:
  35977. * (String) message - The message to be logged.
  35978. * (Integer) level - The loglevel which allows for filtering of log
  35979. * messages.
  35980. *
  35981. * Available loglevels are 0 for 'debug', 1 for 'info', 2 for 'warn',
  35982. * 3 for 'error' and 4 for 'fatal'.
  35983. *
  35984. * When using the 'error' or 'warn' loglevels, a full stacktrace will be
  35985. * logged as well.
  35986. */
  35987. if (level === Strophe.LogLevel.ERROR || level === Strophe.LogLevel.FATAL) {
  35988. style = style || 'color: maroon';
  35989. }
  35990. if (message instanceof Error) {
  35991. message = message.stack;
  35992. }
  35993. var prefix = style ? '%c' : '';
  35994. var logger = _.assign({
  35995. 'debug': _.get(console, 'log') ? console.log.bind(console) : _.noop,
  35996. 'error': _.get(console, 'log') ? console.log.bind(console) : _.noop,
  35997. 'info': _.get(console, 'log') ? console.log.bind(console) : _.noop,
  35998. 'warn': _.get(console, 'log') ? console.log.bind(console) : _.noop
  35999. }, console);
  36000. if (level === Strophe.LogLevel.ERROR) {
  36001. logger.error("".concat(prefix, " ERROR: ").concat(message), style);
  36002. } else if (level === Strophe.LogLevel.WARN) {
  36003. if (_converse.debug) {
  36004. logger.warn("".concat(prefix, " ").concat(moment().format(), " WARNING: ").concat(message), style);
  36005. }
  36006. } else if (level === Strophe.LogLevel.FATAL) {
  36007. logger.error("".concat(prefix, " FATAL: ").concat(message), style);
  36008. } else if (_converse.debug) {
  36009. if (level === Strophe.LogLevel.DEBUG) {
  36010. logger.debug("".concat(prefix, " ").concat(moment().format(), " DEBUG: ").concat(message), style);
  36011. } else {
  36012. logger.info("".concat(prefix, " ").concat(moment().format(), " INFO: ").concat(message), style);
  36013. }
  36014. }
  36015. };
  36016. Strophe.log = function (level, msg) {
  36017. _converse.log(level + ' ' + msg, level);
  36018. };
  36019. Strophe.error = function (msg) {
  36020. _converse.log(msg, Strophe.LogLevel.ERROR);
  36021. };
  36022. _converse.__ = function (str) {
  36023. /* Translate the given string based on the current locale.
  36024. *
  36025. * Parameters:
  36026. * (String) str - The string to translate.
  36027. */
  36028. if (_.isUndefined(i18n)) {
  36029. return str;
  36030. }
  36031. return i18n.translate.apply(i18n, arguments);
  36032. };
  36033. var __ = _converse.__;
  36034. var PROMISES = ['initialized', 'cachedRoster', 'connectionInitialized', 'pluginsInitialized', 'roster', 'rosterContactsFetched', 'rosterGroupsFetched', 'rosterInitialized', 'statusInitialized'];
  36035. function addPromise(promise) {
  36036. /* Private function, used to add a new promise to the ones already
  36037. * available via the `waitUntil` api method.
  36038. */
  36039. _converse.promises[promise] = u.getResolveablePromise();
  36040. }
  36041. _converse.emit = function (name) {
  36042. /* Event emitter and promise resolver */
  36043. _converse.trigger.apply(this, arguments);
  36044. var promise = _converse.promises[name];
  36045. if (!_.isUndefined(promise)) {
  36046. promise.resolve();
  36047. }
  36048. };
  36049. _converse.router = new Backbone.Router();
  36050. _converse.initialize = function (settings, callback) {
  36051. "use strict";
  36052. var _this = this;
  36053. settings = !_.isUndefined(settings) ? settings : {};
  36054. var init_promise = u.getResolveablePromise();
  36055. _.each(PROMISES, addPromise);
  36056. if (!_.isUndefined(_converse.connection)) {
  36057. // Looks like _converse.initialized was called again without logging
  36058. // out or disconnecting in the previous session.
  36059. // This happens in tests. We therefore first clean up.
  36060. Backbone.history.stop();
  36061. _converse.chatboxviews.closeAllChatBoxes();
  36062. delete _converse.controlboxtoggle;
  36063. delete _converse.chatboxviews;
  36064. _converse.connection.reset();
  36065. _converse.off();
  36066. _converse.stopListening();
  36067. _converse._tearDown();
  36068. }
  36069. var unloadevent;
  36070. if ('onpagehide' in window) {
  36071. // Pagehide gets thrown in more cases than unload. Specifically it
  36072. // gets thrown when the page is cached and not just
  36073. // closed/destroyed. It's the only viable event on mobile Safari.
  36074. // https://www.webkit.org/blog/516/webkit-page-cache-ii-the-unload-event/
  36075. unloadevent = 'pagehide';
  36076. } else if ('onbeforeunload' in window) {
  36077. unloadevent = 'beforeunload';
  36078. } else if ('onunload' in window) {
  36079. unloadevent = 'unload';
  36080. } // Instance level constants
  36081. this.TIMEOUTS = {
  36082. // Set as module attr so that we can override in tests.
  36083. 'PAUSED': 10000,
  36084. 'INACTIVE': 90000
  36085. }; // XEP-0085 Chat states
  36086. // http://xmpp.org/extensions/xep-0085.html
  36087. this.INACTIVE = 'inactive';
  36088. this.ACTIVE = 'active';
  36089. this.COMPOSING = 'composing';
  36090. this.PAUSED = 'paused';
  36091. this.GONE = 'gone'; // Default configuration values
  36092. // ----------------------------
  36093. this.default_settings = {
  36094. allow_contact_requests: true,
  36095. allow_non_roster_messaging: false,
  36096. animate: true,
  36097. authentication: 'login',
  36098. // Available values are "login", "prebind", "anonymous" and "external".
  36099. auto_away: 0,
  36100. // Seconds after which user status is set to 'away'
  36101. auto_login: false,
  36102. // Currently only used in connection with anonymous login
  36103. auto_reconnect: true,
  36104. auto_subscribe: false,
  36105. auto_xa: 0,
  36106. // Seconds after which user status is set to 'xa'
  36107. blacklisted_plugins: [],
  36108. bosh_service_url: undefined,
  36109. connection_options: {},
  36110. credentials_url: null,
  36111. // URL from where login credentials can be fetched
  36112. csi_waiting_time: 0,
  36113. // Support for XEP-0352. Seconds before client is considered idle and CSI is sent out.
  36114. debug: false,
  36115. default_state: 'online',
  36116. expose_rid_and_sid: false,
  36117. filter_by_resource: false,
  36118. forward_messages: false,
  36119. hide_offline_users: false,
  36120. include_offline_state: false,
  36121. jid: undefined,
  36122. keepalive: true,
  36123. locales_url: 'locale/{{{locale}}}/LC_MESSAGES/converse.json',
  36124. locales: ['af', 'ar', 'bg', 'ca', 'de', 'es', 'en', 'fr', 'he', 'hu', 'id', 'it', 'ja', 'nb', 'nl', 'pl', 'pt_BR', 'ru', 'tr', 'uk', 'zh_CN', 'zh_TW'],
  36125. message_carbons: true,
  36126. message_storage: 'session',
  36127. password: undefined,
  36128. prebind_url: null,
  36129. priority: 0,
  36130. registration_domain: '',
  36131. rid: undefined,
  36132. root: window.document,
  36133. roster_groups: true,
  36134. show_only_online_users: false,
  36135. show_send_button: false,
  36136. sid: undefined,
  36137. storage: 'session',
  36138. strict_plugin_dependencies: false,
  36139. synchronize_availability: true,
  36140. view_mode: 'overlayed',
  36141. // Choices are 'overlayed', 'fullscreen', 'mobile'
  36142. websocket_url: undefined,
  36143. whitelisted_plugins: []
  36144. };
  36145. _.assignIn(this, this.default_settings); // Allow only whitelisted configuration attributes to be overwritten
  36146. _.assignIn(this, _.pick(settings, _.keys(this.default_settings)));
  36147. if (this.authentication === _converse.ANONYMOUS) {
  36148. if (this.auto_login && !this.jid) {
  36149. throw new Error("Config Error: you need to provide the server's " + "domain via the 'jid' option when using anonymous " + "authentication with auto_login.");
  36150. }
  36151. }
  36152. /* Localisation */
  36153. if (!_.isUndefined(i18n)) {
  36154. i18n.setLocales(settings.i18n, _converse);
  36155. } else {
  36156. _converse.locale = 'en';
  36157. } // Module-level variables
  36158. // ----------------------
  36159. this.callback = callback || _.noop;
  36160. /* When reloading the page:
  36161. * For new sessions, we need to send out a presence stanza to notify
  36162. * the server/network that we're online.
  36163. * When re-attaching to an existing session (e.g. via the keepalive
  36164. * option), we don't need to again send out a presence stanza, because
  36165. * it's as if "we never left" (see onConnectStatusChanged).
  36166. * https://github.com/jcbrand/converse.js/issues/521
  36167. */
  36168. this.send_initial_presence = true;
  36169. this.msg_counter = 0;
  36170. this.user_settings = settings; // Save the user settings so that they can be used by plugins
  36171. // Module-level functions
  36172. // ----------------------
  36173. this.generateResource = function () {
  36174. return "/converse.js-".concat(Math.floor(Math.random() * 139749528).toString());
  36175. };
  36176. this.sendCSI = function (stat) {
  36177. /* Send out a Chat Status Notification (XEP-0352)
  36178. *
  36179. * Parameters:
  36180. * (String) stat: The user's chat status
  36181. */
  36182. /* Send out a Chat Status Notification (XEP-0352) */
  36183. // XXX if (converse.features[Strophe.NS.CSI] || true) {
  36184. _converse.connection.send($build(stat, {
  36185. xmlns: Strophe.NS.CSI
  36186. }));
  36187. _converse.inactive = stat === _converse.INACTIVE ? true : false;
  36188. };
  36189. this.onUserActivity = function () {
  36190. /* Resets counters and flags relating to CSI and auto_away/auto_xa */
  36191. if (_converse.idle_seconds > 0) {
  36192. _converse.idle_seconds = 0;
  36193. }
  36194. if (!_converse.connection.authenticated) {
  36195. // We can't send out any stanzas when there's no authenticated connection.
  36196. // converse can happen when the connection reconnects.
  36197. return;
  36198. }
  36199. if (_converse.inactive) {
  36200. _converse.sendCSI(_converse.ACTIVE);
  36201. }
  36202. if (_converse.auto_changed_status === true) {
  36203. _converse.auto_changed_status = false; // XXX: we should really remember the original state here, and
  36204. // then set it back to that...
  36205. _converse.xmppstatus.set('status', _converse.default_state);
  36206. }
  36207. };
  36208. this.onEverySecond = function () {
  36209. /* An interval handler running every second.
  36210. * Used for CSI and the auto_away and auto_xa features.
  36211. */
  36212. if (!_converse.connection.authenticated) {
  36213. // We can't send out any stanzas when there's no authenticated connection.
  36214. // This can happen when the connection reconnects.
  36215. return;
  36216. }
  36217. var stat = _converse.xmppstatus.get('status');
  36218. _converse.idle_seconds++;
  36219. if (_converse.csi_waiting_time > 0 && _converse.idle_seconds > _converse.csi_waiting_time && !_converse.inactive) {
  36220. _converse.sendCSI(_converse.INACTIVE);
  36221. }
  36222. if (_converse.auto_away > 0 && _converse.idle_seconds > _converse.auto_away && stat !== 'away' && stat !== 'xa' && stat !== 'dnd') {
  36223. _converse.auto_changed_status = true;
  36224. _converse.xmppstatus.set('status', 'away');
  36225. } else if (_converse.auto_xa > 0 && _converse.idle_seconds > _converse.auto_xa && stat !== 'xa' && stat !== 'dnd') {
  36226. _converse.auto_changed_status = true;
  36227. _converse.xmppstatus.set('status', 'xa');
  36228. }
  36229. };
  36230. this.registerIntervalHandler = function () {
  36231. /* Set an interval of one second and register a handler for it.
  36232. * Required for the auto_away, auto_xa and csi_waiting_time features.
  36233. */
  36234. if (_converse.auto_away < 1 && _converse.auto_xa < 1 && _converse.csi_waiting_time < 1) {
  36235. // Waiting time of less then one second means features aren't used.
  36236. return;
  36237. }
  36238. _converse.idle_seconds = 0;
  36239. _converse.auto_changed_status = false; // Was the user's status changed by _converse.js?
  36240. window.addEventListener('click', _converse.onUserActivity);
  36241. window.addEventListener('focus', _converse.onUserActivity);
  36242. window.addEventListener('keypress', _converse.onUserActivity);
  36243. window.addEventListener('mousemove', _converse.onUserActivity);
  36244. window.addEventListener(unloadevent, _converse.onUserActivity);
  36245. _converse.everySecondTrigger = window.setInterval(_converse.onEverySecond, 1000);
  36246. };
  36247. this.setConnectionStatus = function (connection_status, message) {
  36248. _converse.connfeedback.set({
  36249. 'connection_status': connection_status,
  36250. 'message': message
  36251. });
  36252. };
  36253. this.rejectPresenceSubscription = function (jid, message) {
  36254. /* Reject or cancel another user's subscription to our presence updates.
  36255. *
  36256. * Parameters:
  36257. * (String) jid - The Jabber ID of the user whose subscription
  36258. * is being canceled.
  36259. * (String) message - An optional message to the user
  36260. */
  36261. var pres = $pres({
  36262. to: jid,
  36263. type: "unsubscribed"
  36264. });
  36265. if (message && message !== "") {
  36266. pres.c("status").t(message);
  36267. }
  36268. _converse.connection.send(pres);
  36269. };
  36270. this.reconnect = _.debounce(function () {
  36271. _converse.log('RECONNECTING');
  36272. _converse.log('The connection has dropped, attempting to reconnect.');
  36273. _converse.setConnectionStatus(Strophe.Status.RECONNECTING, __('The connection has dropped, attempting to reconnect.'));
  36274. _converse.connection.reconnecting = true;
  36275. _converse._tearDown();
  36276. _converse.logIn(null, true);
  36277. }, 3000, {
  36278. 'leading': true
  36279. });
  36280. this.disconnect = function () {
  36281. _converse.log('DISCONNECTED');
  36282. delete _converse.connection.reconnecting;
  36283. _converse.connection.reset();
  36284. _converse._tearDown();
  36285. _converse.emit('disconnected');
  36286. };
  36287. this.onDisconnected = function () {
  36288. /* Gets called once strophe's status reaches Strophe.Status.DISCONNECTED.
  36289. * Will either start a teardown process for converse.js or attempt
  36290. * to reconnect.
  36291. */
  36292. var reason = _converse.disconnection_reason;
  36293. if (_converse.disconnection_cause === Strophe.Status.AUTHFAIL) {
  36294. if (_converse.credentials_url && _converse.auto_reconnect) {
  36295. /* In this case, we reconnect, because we might be receiving
  36296. * expirable tokens from the credentials_url.
  36297. */
  36298. _converse.emit('will-reconnect');
  36299. return _converse.reconnect();
  36300. } else {
  36301. return _converse.disconnect();
  36302. }
  36303. } else if (_converse.disconnection_cause === _converse.LOGOUT || !_.isUndefined(reason) && reason === _.get(Strophe, 'ErrorCondition.NO_AUTH_MECH') || reason === "host-unknown" || reason === "remote-connection-failed" || !_converse.auto_reconnect) {
  36304. return _converse.disconnect();
  36305. }
  36306. _converse.emit('will-reconnect');
  36307. _converse.reconnect();
  36308. };
  36309. this.setDisconnectionCause = function (cause, reason, override) {
  36310. /* Used to keep track of why we got disconnected, so that we can
  36311. * decide on what the next appropriate action is (in onDisconnected)
  36312. */
  36313. if (_.isUndefined(cause)) {
  36314. delete _converse.disconnection_cause;
  36315. delete _converse.disconnection_reason;
  36316. } else if (_.isUndefined(_converse.disconnection_cause) || override) {
  36317. _converse.disconnection_cause = cause;
  36318. _converse.disconnection_reason = reason;
  36319. }
  36320. };
  36321. this.onConnectStatusChanged = function (status, message) {
  36322. /* Callback method called by Strophe as the Strophe.Connection goes
  36323. * through various states while establishing or tearing down a
  36324. * connection.
  36325. */
  36326. _converse.log("Status changed to: ".concat(_converse.CONNECTION_STATUS[status]));
  36327. if (status === Strophe.Status.CONNECTED || status === Strophe.Status.ATTACHED) {
  36328. _converse.setConnectionStatus(status); // By default we always want to send out an initial presence stanza.
  36329. _converse.send_initial_presence = true;
  36330. _converse.setDisconnectionCause();
  36331. if (_converse.connection.reconnecting) {
  36332. _converse.log(status === Strophe.Status.CONNECTED ? 'Reconnected' : 'Reattached');
  36333. _converse.onConnected(true);
  36334. } else {
  36335. _converse.log(status === Strophe.Status.CONNECTED ? 'Connected' : 'Attached');
  36336. if (_converse.connection.restored) {
  36337. // No need to send an initial presence stanza when
  36338. // we're restoring an existing session.
  36339. _converse.send_initial_presence = false;
  36340. }
  36341. _converse.onConnected();
  36342. }
  36343. } else if (status === Strophe.Status.DISCONNECTED) {
  36344. _converse.setDisconnectionCause(status, message);
  36345. _converse.onDisconnected();
  36346. } else if (status === Strophe.Status.ERROR) {
  36347. _converse.setConnectionStatus(status, __('An error occurred while connecting to the chat server.'));
  36348. } else if (status === Strophe.Status.CONNECTING) {
  36349. _converse.setConnectionStatus(status);
  36350. } else if (status === Strophe.Status.AUTHENTICATING) {
  36351. _converse.setConnectionStatus(status);
  36352. } else if (status === Strophe.Status.AUTHFAIL) {
  36353. if (!message) {
  36354. message = __('Your Jabber ID and/or password is incorrect. Please try again.');
  36355. }
  36356. _converse.setConnectionStatus(status, message);
  36357. _converse.setDisconnectionCause(status, message, true);
  36358. _converse.onDisconnected();
  36359. } else if (status === Strophe.Status.CONNFAIL) {
  36360. var feedback = message;
  36361. if (message === "host-unknown" || message == "remote-connection-failed") {
  36362. feedback = __("Sorry, we could not connect to the XMPP host with domain: %1$s", "\"".concat(Strophe.getDomainFromJid(_converse.connection.jid), "\""));
  36363. } else if (!_.isUndefined(message) && message === _.get(Strophe, 'ErrorCondition.NO_AUTH_MECH')) {
  36364. feedback = __("The XMPP server did not offer a supported authentication mechanism");
  36365. }
  36366. _converse.setConnectionStatus(status, feedback);
  36367. _converse.setDisconnectionCause(status, message);
  36368. } else if (status === Strophe.Status.DISCONNECTING) {
  36369. _converse.setDisconnectionCause(status, message);
  36370. }
  36371. };
  36372. this.incrementMsgCounter = function () {
  36373. this.msg_counter += 1;
  36374. var unreadMsgCount = this.msg_counter;
  36375. var title = document.title;
  36376. if (_.isNil(title)) {
  36377. return;
  36378. }
  36379. if (title.search(/^Messages \(\d+\) /) === -1) {
  36380. title = "Messages (".concat(unreadMsgCount, ") ").concat(title);
  36381. } else {
  36382. title = title.replace(/^Messages \(\d+\) /, "Messages (".concat(unreadMsgCount, ")"));
  36383. }
  36384. };
  36385. this.clearMsgCounter = function () {
  36386. this.msg_counter = 0;
  36387. var title = document.title;
  36388. if (_.isNil(title)) {
  36389. return;
  36390. }
  36391. if (title.search(/^Messages \(\d+\) /) !== -1) {
  36392. title = title.replace(/^Messages \(\d+\) /, "");
  36393. }
  36394. };
  36395. this.initStatus = function (reconnecting) {
  36396. // If there's no xmppstatus obj, then we were never connected to
  36397. // begin with, so we set reconnecting to false.
  36398. reconnecting = _.isUndefined(_converse.xmppstatus) ? false : reconnecting;
  36399. if (reconnecting) {
  36400. _converse.onStatusInitialized(reconnecting);
  36401. } else {
  36402. _this.xmppstatus = new _this.XMPPStatus();
  36403. var id = b64_sha1("converse.xmppstatus-".concat(_converse.bare_jid));
  36404. _this.xmppstatus.id = id; // Appears to be necessary for backbone.browserStorage
  36405. _this.xmppstatus.browserStorage = new Backbone.BrowserStorage[_converse.storage](id);
  36406. _this.xmppstatus.fetch({
  36407. success: _.partial(_converse.onStatusInitialized, reconnecting),
  36408. error: _.partial(_converse.onStatusInitialized, reconnecting)
  36409. });
  36410. }
  36411. };
  36412. this.initSession = function () {
  36413. _converse.session = new Backbone.Model();
  36414. var id = b64_sha1('converse.bosh-session');
  36415. _converse.session.id = id; // Appears to be necessary for backbone.browserStorage
  36416. _converse.session.browserStorage = new Backbone.BrowserStorage[_converse.storage](id);
  36417. _converse.session.fetch();
  36418. };
  36419. this.clearSession = function () {
  36420. if (!_.isUndefined(this.roster)) {
  36421. this.roster.browserStorage._clear();
  36422. }
  36423. if (!_.isUndefined(this.session) && this.session.browserStorage) {
  36424. this.session.browserStorage._clear();
  36425. }
  36426. };
  36427. this.logOut = function () {
  36428. _converse.clearSession();
  36429. _converse.setDisconnectionCause(_converse.LOGOUT, undefined, true);
  36430. if (!_.isUndefined(_converse.connection)) {
  36431. _converse.connection.disconnect();
  36432. } else {
  36433. _converse._tearDown();
  36434. } // Recreate all the promises
  36435. _.each(_.keys(_converse.promises), addPromise);
  36436. _converse.emit('logout');
  36437. };
  36438. this.saveWindowState = function (ev, hidden) {
  36439. // XXX: eventually we should be able to just use
  36440. // document.visibilityState (when we drop support for older
  36441. // browsers).
  36442. var state;
  36443. var event_map = {
  36444. 'focus': "visible",
  36445. 'focusin': "visible",
  36446. 'pageshow': "visible",
  36447. 'blur': "hidden",
  36448. 'focusout': "hidden",
  36449. 'pagehide': "hidden"
  36450. };
  36451. ev = ev || document.createEvent('Events');
  36452. if (ev.type in event_map) {
  36453. state = event_map[ev.type];
  36454. } else {
  36455. state = document[hidden] ? "hidden" : "visible";
  36456. }
  36457. if (state === 'visible') {
  36458. _converse.clearMsgCounter();
  36459. }
  36460. _converse.windowState = state;
  36461. _converse.emit('windowStateChanged', {
  36462. state: state
  36463. });
  36464. };
  36465. this.registerGlobalEventHandlers = function () {
  36466. // Taken from:
  36467. // http://stackoverflow.com/questions/1060008/is-there-a-way-to-detect-if-a-browser-window-is-not-currently-active
  36468. var hidden = "hidden"; // Standards:
  36469. if (hidden in document) {
  36470. document.addEventListener("visibilitychange", _.partial(_converse.saveWindowState, _, hidden));
  36471. } else if ((hidden = "mozHidden") in document) {
  36472. document.addEventListener("mozvisibilitychange", _.partial(_converse.saveWindowState, _, hidden));
  36473. } else if ((hidden = "webkitHidden") in document) {
  36474. document.addEventListener("webkitvisibilitychange", _.partial(_converse.saveWindowState, _, hidden));
  36475. } else if ((hidden = "msHidden") in document) {
  36476. document.addEventListener("msvisibilitychange", _.partial(_converse.saveWindowState, _, hidden));
  36477. } else if ("onfocusin" in document) {
  36478. // IE 9 and lower:
  36479. document.onfocusin = document.onfocusout = _.partial(_converse.saveWindowState, _, hidden);
  36480. } else {
  36481. // All others:
  36482. window.onpageshow = window.onpagehide = window.onfocus = window.onblur = _.partial(_converse.saveWindowState, _, hidden);
  36483. } // set the initial state (but only if browser supports the Page Visibility API)
  36484. if (document[hidden] !== undefined) {
  36485. _.partial(_converse.saveWindowState, _, hidden)({
  36486. type: document[hidden] ? "blur" : "focus"
  36487. });
  36488. }
  36489. };
  36490. this.enableCarbons = function () {
  36491. var _this2 = this;
  36492. /* Ask the XMPP server to enable Message Carbons
  36493. * See XEP-0280 https://xmpp.org/extensions/xep-0280.html#enabling
  36494. */
  36495. if (!this.message_carbons || this.session.get('carbons_enabled')) {
  36496. return;
  36497. }
  36498. var carbons_iq = new Strophe.Builder('iq', {
  36499. from: this.connection.jid,
  36500. id: 'enablecarbons',
  36501. type: 'set'
  36502. }).c('enable', {
  36503. xmlns: Strophe.NS.CARBONS
  36504. });
  36505. this.connection.addHandler(function (iq) {
  36506. if (iq.querySelectorAll('error').length > 0) {
  36507. _converse.log('An error occured while trying to enable message carbons.', Strophe.LogLevel.ERROR);
  36508. } else {
  36509. _this2.session.save({
  36510. carbons_enabled: true
  36511. });
  36512. _converse.log('Message carbons have been enabled.');
  36513. }
  36514. }, null, "iq", null, "enablecarbons");
  36515. this.connection.send(carbons_iq);
  36516. };
  36517. this.initRoster = function () {
  36518. /* Initialize the Bakcbone collections that represent the contats
  36519. * roster and the roster groups.
  36520. */
  36521. _converse.roster = new _converse.RosterContacts();
  36522. _converse.roster.browserStorage = new Backbone.BrowserStorage.session(b64_sha1("converse.contacts-".concat(_converse.bare_jid)));
  36523. _converse.rostergroups = new _converse.RosterGroups();
  36524. _converse.rostergroups.browserStorage = new Backbone.BrowserStorage.session(b64_sha1("converse.roster.groups".concat(_converse.bare_jid)));
  36525. _converse.emit('rosterInitialized');
  36526. };
  36527. this.populateRoster = function () {
  36528. var ignore_cache = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
  36529. /* Fetch all the roster groups, and then the roster contacts.
  36530. * Emit an event after fetching is done in each case.
  36531. *
  36532. * Parameters:
  36533. * (Bool) ignore_cache - If set to to true, the local cache
  36534. * will be ignored it's guaranteed that the XMPP server
  36535. * will be queried for the roster.
  36536. */
  36537. if (ignore_cache) {
  36538. _converse.send_initial_presence = true;
  36539. _converse.roster.fetchFromServer().then(function () {
  36540. _converse.emit('rosterContactsFetched');
  36541. _converse.sendInitialPresence();
  36542. }).catch(function (reason) {
  36543. _converse.log(reason, Strophe.LogLevel.ERROR);
  36544. _converse.sendInitialPresence();
  36545. });
  36546. } else {
  36547. _converse.rostergroups.fetchRosterGroups().then(function () {
  36548. _converse.emit('rosterGroupsFetched');
  36549. return _converse.roster.fetchRosterContacts();
  36550. }).then(function () {
  36551. _converse.emit('rosterContactsFetched');
  36552. _converse.sendInitialPresence();
  36553. }).catch(function (reason) {
  36554. _converse.log(reason, Strophe.LogLevel.ERROR);
  36555. _converse.sendInitialPresence();
  36556. });
  36557. }
  36558. };
  36559. this.unregisterPresenceHandler = function () {
  36560. if (!_.isUndefined(_converse.presence_ref)) {
  36561. _converse.connection.deleteHandler(_converse.presence_ref);
  36562. delete _converse.presence_ref;
  36563. }
  36564. };
  36565. this.registerPresenceHandler = function () {
  36566. _converse.unregisterPresenceHandler();
  36567. _converse.presence_ref = _converse.connection.addHandler(function (presence) {
  36568. _converse.roster.presenceHandler(presence);
  36569. return true;
  36570. }, null, 'presence', null);
  36571. };
  36572. this.sendInitialPresence = function () {
  36573. if (_converse.send_initial_presence) {
  36574. _converse.xmppstatus.sendPresence();
  36575. }
  36576. };
  36577. this.onStatusInitialized = function (reconnecting) {
  36578. /* Continue with session establishment (e.g. fetching chat boxes,
  36579. * populating the roster etc.) necessary once the connection has
  36580. * been established.
  36581. */
  36582. _converse.emit('statusInitialized');
  36583. if (reconnecting) {
  36584. // No need to recreate the roster, otherwise we lose our
  36585. // cached data. However we still emit an event, to give
  36586. // event handlers a chance to register views for the
  36587. // roster and its groups, before we start populating.
  36588. _converse.emit('rosterReadyAfterReconnection');
  36589. } else {
  36590. _converse.registerIntervalHandler();
  36591. _converse.initRoster();
  36592. }
  36593. _converse.roster.onConnected();
  36594. _converse.populateRoster(reconnecting);
  36595. _converse.registerPresenceHandler();
  36596. if (reconnecting) {
  36597. _converse.emit('reconnected');
  36598. } else {
  36599. init_promise.resolve();
  36600. _converse.emit('initialized');
  36601. _converse.emit('connected');
  36602. }
  36603. };
  36604. this.setUserJid = function () {
  36605. _converse.jid = _converse.connection.jid;
  36606. _converse.bare_jid = Strophe.getBareJidFromJid(_converse.connection.jid);
  36607. _converse.resource = Strophe.getResourceFromJid(_converse.connection.jid);
  36608. _converse.domain = Strophe.getDomainFromJid(_converse.connection.jid);
  36609. };
  36610. this.onConnected = function (reconnecting) {
  36611. /* Called as soon as a new connection has been established, either
  36612. * by logging in or by attaching to an existing BOSH session.
  36613. */
  36614. _converse.connection.flush(); // Solves problem of returned PubSub BOSH response not received by browser
  36615. _converse.setUserJid();
  36616. _converse.initSession();
  36617. _converse.enableCarbons();
  36618. _converse.initStatus(reconnecting);
  36619. };
  36620. this.RosterContact = Backbone.Model.extend({
  36621. defaults: {
  36622. 'chat_state': undefined,
  36623. 'chat_status': 'offline',
  36624. 'image': _converse.DEFAULT_IMAGE,
  36625. 'image_type': _converse.DEFAULT_IMAGE_TYPE,
  36626. 'num_unread': 0,
  36627. 'status': ''
  36628. },
  36629. initialize: function initialize(attributes) {
  36630. var _this3 = this;
  36631. var jid = attributes.jid,
  36632. bare_jid = Strophe.getBareJidFromJid(jid).toLowerCase(),
  36633. resource = Strophe.getResourceFromJid(jid);
  36634. attributes.jid = bare_jid;
  36635. this.set(_.assignIn({
  36636. 'fullname': bare_jid,
  36637. 'groups': [],
  36638. 'id': bare_jid,
  36639. 'jid': bare_jid,
  36640. 'resources': {},
  36641. 'user_id': Strophe.getNodeFromJid(jid)
  36642. }, attributes));
  36643. this.on('destroy', function () {
  36644. _this3.removeFromRoster();
  36645. });
  36646. this.on('change:chat_status', function (item) {
  36647. _converse.emit('contactStatusChanged', item.attributes);
  36648. });
  36649. },
  36650. subscribe: function subscribe(message) {
  36651. /* Send a presence subscription request to this roster contact
  36652. *
  36653. * Parameters:
  36654. * (String) message - An optional message to explain the
  36655. * reason for the subscription request.
  36656. */
  36657. this.save('ask', "subscribe"); // ask === 'subscribe' Means we have ask to subscribe to them.
  36658. var pres = $pres({
  36659. to: this.get('jid'),
  36660. type: "subscribe"
  36661. });
  36662. if (message && message !== "") {
  36663. pres.c("status").t(message).up();
  36664. }
  36665. var nick = _converse.xmppstatus.get('fullname');
  36666. if (nick && nick !== "") {
  36667. pres.c('nick', {
  36668. 'xmlns': Strophe.NS.NICK
  36669. }).t(nick).up();
  36670. }
  36671. _converse.connection.send(pres);
  36672. return this;
  36673. },
  36674. ackSubscribe: function ackSubscribe() {
  36675. /* Upon receiving the presence stanza of type "subscribed",
  36676. * the user SHOULD acknowledge receipt of that subscription
  36677. * state notification by sending a presence stanza of type
  36678. * "subscribe" to the contact
  36679. */
  36680. _converse.connection.send($pres({
  36681. 'type': 'subscribe',
  36682. 'to': this.get('jid')
  36683. }));
  36684. },
  36685. ackUnsubscribe: function ackUnsubscribe() {
  36686. /* Upon receiving the presence stanza of type "unsubscribed",
  36687. * the user SHOULD acknowledge receipt of that subscription state
  36688. * notification by sending a presence stanza of type "unsubscribe"
  36689. * this step lets the user's server know that it MUST no longer
  36690. * send notification of the subscription state change to the user.
  36691. * Parameters:
  36692. * (String) jid - The Jabber ID of the user who is unsubscribing
  36693. */
  36694. _converse.connection.send($pres({
  36695. 'type': 'unsubscribe',
  36696. 'to': this.get('jid')
  36697. }));
  36698. this.destroy(); // Will cause removeFromRoster to be called.
  36699. },
  36700. unauthorize: function unauthorize(message) {
  36701. /* Unauthorize this contact's presence subscription
  36702. * Parameters:
  36703. * (String) message - Optional message to send to the person being unauthorized
  36704. */
  36705. _converse.rejectPresenceSubscription(this.get('jid'), message);
  36706. return this;
  36707. },
  36708. authorize: function authorize(message) {
  36709. /* Authorize presence subscription
  36710. * Parameters:
  36711. * (String) message - Optional message to send to the person being authorized
  36712. */
  36713. var pres = $pres({
  36714. to: this.get('jid'),
  36715. type: "subscribed"
  36716. });
  36717. if (message && message !== "") {
  36718. pres.c("status").t(message);
  36719. }
  36720. _converse.connection.send(pres);
  36721. return this;
  36722. },
  36723. addResource: function addResource(presence) {
  36724. /* Adds a new resource and it's associated attributes as taken
  36725. * from the passed in presence stanza.
  36726. *
  36727. * Also updates the contact's chat_status if the presence has
  36728. * higher priority (and is newer).
  36729. */
  36730. var jid = presence.getAttribute('from'),
  36731. chat_status = _.propertyOf(presence.querySelector('show'))('textContent') || 'online',
  36732. resource = Strophe.getResourceFromJid(jid),
  36733. delay = presence.querySelector("delay[xmlns=\"".concat(Strophe.NS.DELAY, "\"]")),
  36734. timestamp = _.isNull(delay) ? moment().format() : moment(delay.getAttribute('stamp')).format();
  36735. var priority = _.propertyOf(presence.querySelector('priority'))('textContent') || 0;
  36736. priority = _.isNaN(parseInt(priority, 10)) ? 0 : parseInt(priority, 10);
  36737. var resources = _.isObject(this.get('resources')) ? this.get('resources') : {};
  36738. resources[resource] = {
  36739. 'name': resource,
  36740. 'priority': priority,
  36741. 'status': chat_status,
  36742. 'timestamp': timestamp
  36743. };
  36744. var changed = {
  36745. 'resources': resources
  36746. };
  36747. var hpr = this.getHighestPriorityResource();
  36748. if (priority == hpr.priority && timestamp == hpr.timestamp) {
  36749. // Only set the chat status if this is the newest resource
  36750. // with the highest priority
  36751. changed.chat_status = chat_status;
  36752. }
  36753. this.save(changed);
  36754. return resources;
  36755. },
  36756. removeResource: function removeResource(resource) {
  36757. /* Remove the passed in resource from the contact's resources map.
  36758. *
  36759. * Also recomputes the chat_status given that there's one less
  36760. * resource.
  36761. */
  36762. var resources = this.get('resources');
  36763. if (!_.isObject(resources)) {
  36764. resources = {};
  36765. } else {
  36766. delete resources[resource];
  36767. }
  36768. this.save({
  36769. 'resources': resources,
  36770. 'chat_status': _.propertyOf(this.getHighestPriorityResource())('status') || 'offline'
  36771. });
  36772. },
  36773. getHighestPriorityResource: function getHighestPriorityResource() {
  36774. /* Return the resource with the highest priority.
  36775. *
  36776. * If multiple resources have the same priority, take the
  36777. * newest one.
  36778. */
  36779. var resources = this.get('resources');
  36780. if (_.isObject(resources) && _.size(resources)) {
  36781. var val = _.flow(_.values, _.partial(_.sortBy, _, ['priority', 'timestamp']), _.reverse)(resources)[0];
  36782. if (!_.isUndefined(val)) {
  36783. return val;
  36784. }
  36785. }
  36786. },
  36787. removeFromRoster: function removeFromRoster(callback) {
  36788. /* Instruct the XMPP server to remove this contact from our roster
  36789. * Parameters:
  36790. * (Function) callback
  36791. */
  36792. var iq = $iq({
  36793. type: 'set'
  36794. }).c('query', {
  36795. xmlns: Strophe.NS.ROSTER
  36796. }).c('item', {
  36797. jid: this.get('jid'),
  36798. subscription: "remove"
  36799. });
  36800. _converse.connection.sendIQ(iq, callback, callback);
  36801. return this;
  36802. }
  36803. });
  36804. this.RosterContacts = Backbone.Collection.extend({
  36805. model: _converse.RosterContact,
  36806. comparator: function comparator(contact1, contact2) {
  36807. var status1 = contact1.get('chat_status') || 'offline';
  36808. var status2 = contact2.get('chat_status') || 'offline';
  36809. if (_converse.STATUS_WEIGHTS[status1] === _converse.STATUS_WEIGHTS[status2]) {
  36810. var name1 = contact1.get('fullname').toLowerCase();
  36811. var name2 = contact2.get('fullname').toLowerCase();
  36812. return name1 < name2 ? -1 : name1 > name2 ? 1 : 0;
  36813. } else {
  36814. return _converse.STATUS_WEIGHTS[status1] < _converse.STATUS_WEIGHTS[status2] ? -1 : 1;
  36815. }
  36816. },
  36817. onConnected: function onConnected() {
  36818. /* Called as soon as the connection has been established
  36819. * (either after initial login, or after reconnection).
  36820. *
  36821. * Use the opportunity to register stanza handlers.
  36822. */
  36823. this.registerRosterHandler();
  36824. this.registerRosterXHandler();
  36825. },
  36826. registerRosterHandler: function registerRosterHandler() {
  36827. /* Register a handler for roster IQ "set" stanzas, which update
  36828. * roster contacts.
  36829. */
  36830. _converse.connection.addHandler(_converse.roster.onRosterPush.bind(_converse.roster), Strophe.NS.ROSTER, 'iq', "set");
  36831. },
  36832. registerRosterXHandler: function registerRosterXHandler() {
  36833. /* Register a handler for RosterX message stanzas, which are
  36834. * used to suggest roster contacts to a user.
  36835. */
  36836. var t = 0;
  36837. _converse.connection.addHandler(function (msg) {
  36838. window.setTimeout(function () {
  36839. _converse.connection.flush();
  36840. _converse.roster.subscribeToSuggestedItems.bind(_converse.roster)(msg);
  36841. }, t);
  36842. t += msg.querySelectorAll('item').length * 250;
  36843. return true;
  36844. }, Strophe.NS.ROSTERX, 'message', null);
  36845. },
  36846. fetchRosterContacts: function fetchRosterContacts() {
  36847. var _this4 = this;
  36848. /* Fetches the roster contacts, first by trying the
  36849. * sessionStorage cache, and if that's empty, then by querying
  36850. * the XMPP server.
  36851. *
  36852. * Returns a promise which resolves once the contacts have been
  36853. * fetched.
  36854. */
  36855. return new Promise(function (resolve, reject) {
  36856. _this4.fetch({
  36857. 'add': true,
  36858. 'silent': true,
  36859. success: function success(collection) {
  36860. if (collection.length === 0) {
  36861. _converse.send_initial_presence = true;
  36862. _converse.roster.fetchFromServer().then(resolve).catch(reject);
  36863. } else {
  36864. _converse.emit('cachedRoster', collection);
  36865. resolve();
  36866. }
  36867. }
  36868. });
  36869. });
  36870. },
  36871. subscribeToSuggestedItems: function subscribeToSuggestedItems(msg) {
  36872. _.each(msg.querySelectorAll('item'), function (item) {
  36873. if (item.getAttribute('action') === 'add') {
  36874. _converse.roster.addAndSubscribe(item.getAttribute('jid'), null, _converse.xmppstatus.get('fullname'));
  36875. }
  36876. });
  36877. return true;
  36878. },
  36879. isSelf: function isSelf(jid) {
  36880. return u.isSameBareJID(jid, _converse.connection.jid);
  36881. },
  36882. addAndSubscribe: function addAndSubscribe(jid, name, groups, message, attributes) {
  36883. /* Add a roster contact and then once we have confirmation from
  36884. * the XMPP server we subscribe to that contact's presence updates.
  36885. * Parameters:
  36886. * (String) jid - The Jabber ID of the user being added and subscribed to.
  36887. * (String) name - The name of that user
  36888. * (Array of Strings) groups - Any roster groups the user might belong to
  36889. * (String) message - An optional message to explain the
  36890. * reason for the subscription request.
  36891. * (Object) attributes - Any additional attributes to be stored on the user's model.
  36892. */
  36893. var handler = function handler(contact) {
  36894. if (contact instanceof _converse.RosterContact) {
  36895. contact.subscribe(message);
  36896. }
  36897. };
  36898. this.addContact(jid, name, groups, attributes).then(handler, handler);
  36899. },
  36900. sendContactAddIQ: function sendContactAddIQ(jid, name, groups, callback, errback) {
  36901. /* Send an IQ stanza to the XMPP server to add a new roster contact.
  36902. *
  36903. * Parameters:
  36904. * (String) jid - The Jabber ID of the user being added
  36905. * (String) name - The name of that user
  36906. * (Array of Strings) groups - Any roster groups the user might belong to
  36907. * (Function) callback - A function to call once the IQ is returned
  36908. * (Function) errback - A function to call if an error occured
  36909. */
  36910. name = _.isEmpty(name) ? jid : name;
  36911. var iq = $iq({
  36912. type: 'set'
  36913. }).c('query', {
  36914. xmlns: Strophe.NS.ROSTER
  36915. }).c('item', {
  36916. jid: jid,
  36917. name: name
  36918. });
  36919. _.each(groups, function (group) {
  36920. iq.c('group').t(group).up();
  36921. });
  36922. _converse.connection.sendIQ(iq, callback, errback);
  36923. },
  36924. addContact: function addContact(jid, name, groups, attributes) {
  36925. var _this5 = this;
  36926. /* Adds a RosterContact instance to _converse.roster and
  36927. * registers the contact on the XMPP server.
  36928. * Returns a promise which is resolved once the XMPP server has
  36929. * responded.
  36930. *
  36931. * Parameters:
  36932. * (String) jid - The Jabber ID of the user being added and subscribed to.
  36933. * (String) name - The name of that user
  36934. * (Array of Strings) groups - Any roster groups the user might belong to
  36935. * (Object) attributes - Any additional attributes to be stored on the user's model.
  36936. */
  36937. return new Promise(function (resolve, reject) {
  36938. groups = groups || [];
  36939. name = _.isEmpty(name) ? jid : name;
  36940. _this5.sendContactAddIQ(jid, name, groups, function () {
  36941. var contact = _this5.create(_.assignIn({
  36942. ask: undefined,
  36943. fullname: name,
  36944. groups: groups,
  36945. jid: jid,
  36946. requesting: false,
  36947. subscription: 'none'
  36948. }, attributes), {
  36949. sort: false
  36950. });
  36951. resolve(contact);
  36952. }, function (err) {
  36953. alert(__('Sorry, there was an error while trying to add %1$s as a contact.', name));
  36954. _converse.log(err, Strophe.LogLevel.ERROR);
  36955. resolve(err);
  36956. });
  36957. });
  36958. },
  36959. subscribeBack: function subscribeBack(bare_jid) {
  36960. var contact = this.get(bare_jid);
  36961. if (contact instanceof _converse.RosterContact) {
  36962. contact.authorize().subscribe();
  36963. } else {
  36964. // Can happen when a subscription is retried or roster was deleted
  36965. var handler = function handler(contact) {
  36966. if (contact instanceof _converse.RosterContact) {
  36967. contact.authorize().subscribe();
  36968. }
  36969. };
  36970. this.addContact(bare_jid, '', [], {
  36971. 'subscription': 'from'
  36972. }).then(handler, handler);
  36973. }
  36974. },
  36975. getNumOnlineContacts: function getNumOnlineContacts() {
  36976. var ignored = ['offline', 'unavailable'];
  36977. if (_converse.show_only_online_users) {
  36978. ignored = _.union(ignored, ['dnd', 'xa', 'away']);
  36979. }
  36980. return _.sum(this.models.filter(function (model) {
  36981. return !_.includes(ignored, model.get('chat_status'));
  36982. }));
  36983. },
  36984. onRosterPush: function onRosterPush(iq) {
  36985. /* Handle roster updates from the XMPP server.
  36986. * See: https://xmpp.org/rfcs/rfc6121.html#roster-syntax-actions-push
  36987. *
  36988. * Parameters:
  36989. * (XMLElement) IQ - The IQ stanza received from the XMPP server.
  36990. */
  36991. var id = iq.getAttribute('id');
  36992. var from = iq.getAttribute('from');
  36993. if (from && from !== "" && Strophe.getBareJidFromJid(from) !== _converse.bare_jid) {
  36994. // Receiving client MUST ignore stanza unless it has no from or from = user's bare JID.
  36995. // XXX: Some naughty servers apparently send from a full
  36996. // JID so we need to explicitly compare bare jids here.
  36997. // https://github.com/jcbrand/converse.js/issues/493
  36998. _converse.connection.send($iq({
  36999. type: 'error',
  37000. id: id,
  37001. from: _converse.connection.jid
  37002. }).c('error', {
  37003. 'type': 'cancel'
  37004. }).c('service-unavailable', {
  37005. 'xmlns': Strophe.NS.ROSTER
  37006. }));
  37007. return true;
  37008. }
  37009. _converse.connection.send($iq({
  37010. type: 'result',
  37011. id: id,
  37012. from: _converse.connection.jid
  37013. }));
  37014. var items = sizzle("query[xmlns=\"".concat(Strophe.NS.ROSTER, "\"] item"), iq);
  37015. _.each(items, this.updateContact.bind(this));
  37016. _converse.emit('rosterPush', iq);
  37017. return true;
  37018. },
  37019. fetchFromServer: function fetchFromServer() {
  37020. var _this6 = this;
  37021. /* Fetch the roster from the XMPP server */
  37022. return new Promise(function (resolve, reject) {
  37023. var iq = $iq({
  37024. 'type': 'get',
  37025. 'id': _converse.connection.getUniqueId('roster')
  37026. }).c('query', {
  37027. xmlns: Strophe.NS.ROSTER
  37028. });
  37029. var callback = _.flow(_this6.onReceivedFromServer.bind(_this6), resolve);
  37030. var errback = function errback(iq) {
  37031. var errmsg = "Error while trying to fetch roster from the server";
  37032. _converse.log(errmsg, Strophe.LogLevel.ERROR);
  37033. reject(new Error(errmsg));
  37034. };
  37035. return _converse.connection.sendIQ(iq, callback, errback);
  37036. });
  37037. },
  37038. onReceivedFromServer: function onReceivedFromServer(iq) {
  37039. /* An IQ stanza containing the roster has been received from
  37040. * the XMPP server.
  37041. */
  37042. var items = sizzle("query[xmlns=\"".concat(Strophe.NS.ROSTER, "\"] item"), iq);
  37043. _.each(items, this.updateContact.bind(this));
  37044. _converse.emit('roster', iq);
  37045. },
  37046. updateContact: function updateContact(item) {
  37047. /* Update or create RosterContact models based on items
  37048. * received in the IQ from the server.
  37049. */
  37050. var jid = item.getAttribute('jid');
  37051. if (this.isSelf(jid)) {
  37052. return;
  37053. }
  37054. var contact = this.get(jid),
  37055. subscription = item.getAttribute("subscription"),
  37056. ask = item.getAttribute("ask"),
  37057. groups = _.map(item.getElementsByTagName('group'), Strophe.getText);
  37058. if (!contact) {
  37059. if (subscription === "none" && ask === null || subscription === "remove") {
  37060. return; // We're lazy when adding contacts.
  37061. }
  37062. this.create({
  37063. ask: ask,
  37064. fullname: item.getAttribute("name") || jid,
  37065. groups: groups,
  37066. jid: jid,
  37067. subscription: subscription
  37068. }, {
  37069. sort: false
  37070. });
  37071. } else {
  37072. if (subscription === "remove") {
  37073. return contact.destroy(); // will trigger removeFromRoster
  37074. } // We only find out about requesting contacts via the
  37075. // presence handler, so if we receive a contact
  37076. // here, we know they aren't requesting anymore.
  37077. // see docs/DEVELOPER.rst
  37078. contact.save({
  37079. subscription: subscription,
  37080. ask: ask,
  37081. requesting: null,
  37082. groups: groups
  37083. });
  37084. }
  37085. },
  37086. createRequestingContact: function createRequestingContact(presence) {
  37087. /* Creates a Requesting Contact.
  37088. *
  37089. * Note: this method gets completely overridden by converse-vcard.js
  37090. */
  37091. var bare_jid = Strophe.getBareJidFromJid(presence.getAttribute('from')),
  37092. nick_el = presence.querySelector("nick[xmlns=\"".concat(Strophe.NS.NICK, "\"]"));
  37093. var user_data = {
  37094. jid: bare_jid,
  37095. subscription: 'none',
  37096. ask: null,
  37097. requesting: true,
  37098. fullname: nick_el && nick_el.textContent || bare_jid
  37099. };
  37100. this.create(user_data);
  37101. _converse.emit('contactRequest', user_data);
  37102. },
  37103. handleIncomingSubscription: function handleIncomingSubscription(presence) {
  37104. var jid = presence.getAttribute('from'),
  37105. bare_jid = Strophe.getBareJidFromJid(jid),
  37106. contact = this.get(bare_jid);
  37107. if (!_converse.allow_contact_requests) {
  37108. _converse.rejectPresenceSubscription(jid, __("This client does not allow presence subscriptions"));
  37109. }
  37110. if (_converse.auto_subscribe) {
  37111. if (!contact || contact.get('subscription') !== 'to') {
  37112. this.subscribeBack(bare_jid);
  37113. } else {
  37114. contact.authorize();
  37115. }
  37116. } else {
  37117. if (contact) {
  37118. if (contact.get('subscription') !== 'none') {
  37119. contact.authorize();
  37120. } else if (contact.get('ask') === "subscribe") {
  37121. contact.authorize();
  37122. }
  37123. } else {
  37124. this.createRequestingContact(presence);
  37125. }
  37126. }
  37127. },
  37128. presenceHandler: function presenceHandler(presence) {
  37129. var presence_type = presence.getAttribute('type');
  37130. if (presence_type === 'error') {
  37131. return true;
  37132. }
  37133. var jid = presence.getAttribute('from'),
  37134. bare_jid = Strophe.getBareJidFromJid(jid),
  37135. resource = Strophe.getResourceFromJid(jid),
  37136. chat_status = _.propertyOf(presence.querySelector('show'))('textContent') || 'online',
  37137. status_message = _.propertyOf(presence.querySelector('status'))('textContent'),
  37138. contact = this.get(bare_jid);
  37139. if (this.isSelf(bare_jid)) {
  37140. if (_converse.connection.jid !== jid && presence_type !== 'unavailable' && (_converse.synchronize_availability === true || _converse.synchronize_availability === resource)) {
  37141. // Another resource has changed its status and
  37142. // synchronize_availability option set to update,
  37143. // we'll update ours as well.
  37144. _converse.xmppstatus.save({
  37145. 'status': chat_status
  37146. });
  37147. if (status_message) {
  37148. _converse.xmppstatus.save({
  37149. 'status_message': status_message
  37150. });
  37151. }
  37152. }
  37153. return;
  37154. } else if (sizzle("query[xmlns=\"".concat(Strophe.NS.MUC, "\"]"), presence).length) {
  37155. return; // Ignore MUC
  37156. }
  37157. if (contact && status_message !== contact.get('status')) {
  37158. contact.save({
  37159. 'status': status_message
  37160. });
  37161. }
  37162. if (presence_type === 'subscribed' && contact) {
  37163. contact.ackSubscribe();
  37164. } else if (presence_type === 'unsubscribed' && contact) {
  37165. contact.ackUnsubscribe();
  37166. } else if (presence_type === 'unsubscribe') {
  37167. return;
  37168. } else if (presence_type === 'subscribe') {
  37169. this.handleIncomingSubscription(presence);
  37170. } else if (presence_type === 'unavailable' && contact) {
  37171. contact.removeResource(resource);
  37172. } else if (contact) {
  37173. // presence_type is undefined
  37174. contact.addResource(presence);
  37175. }
  37176. }
  37177. });
  37178. this.RosterGroup = Backbone.Model.extend({
  37179. initialize: function initialize(attributes) {
  37180. this.set(_.assignIn({
  37181. description: __('Click to hide these contacts'),
  37182. state: _converse.OPENED
  37183. }, attributes)); // Collection of contacts belonging to this group.
  37184. this.contacts = new _converse.RosterContacts();
  37185. }
  37186. });
  37187. this.RosterGroups = Backbone.Collection.extend({
  37188. model: _converse.RosterGroup,
  37189. fetchRosterGroups: function fetchRosterGroups() {
  37190. var _this7 = this;
  37191. /* Fetches all the roster groups from sessionStorage.
  37192. *
  37193. * Returns a promise which resolves once the groups have been
  37194. * returned.
  37195. */
  37196. return new Promise(function (resolve, reject) {
  37197. _this7.fetch({
  37198. silent: true,
  37199. // We need to first have all groups before
  37200. // we can start positioning them, so we set
  37201. // 'silent' to true.
  37202. success: resolve
  37203. });
  37204. });
  37205. }
  37206. });
  37207. this.ConnectionFeedback = Backbone.Model.extend({
  37208. defaults: {
  37209. 'connection_status': Strophe.Status.DISCONNECTED,
  37210. 'message': ''
  37211. },
  37212. initialize: function initialize() {
  37213. this.on('change', function () {
  37214. _converse.emit('connfeedback', _converse.connfeedback);
  37215. });
  37216. }
  37217. });
  37218. this.connfeedback = new this.ConnectionFeedback();
  37219. this.XMPPStatus = Backbone.Model.extend({
  37220. defaults: function defaults() {
  37221. return {
  37222. "status": _converse.default_state,
  37223. "jid": _converse.bare_jid,
  37224. "vcard_updated": null
  37225. };
  37226. },
  37227. initialize: function initialize() {
  37228. var _this8 = this;
  37229. this.on('change:status', function (item) {
  37230. var status = _this8.get('status');
  37231. _this8.sendPresence(status);
  37232. _converse.emit('statusChanged', status);
  37233. });
  37234. this.on('change:status_message', function () {
  37235. var status_message = _this8.get('status_message');
  37236. _this8.sendPresence(_this8.get('status'), status_message);
  37237. _converse.emit('statusMessageChanged', status_message);
  37238. });
  37239. },
  37240. constructPresence: function constructPresence(type, status_message) {
  37241. var presence;
  37242. type = _.isString(type) ? type : this.get('status') || _converse.default_state;
  37243. status_message = _.isString(status_message) ? status_message : this.get('status_message'); // Most of these presence types are actually not explicitly sent,
  37244. // but I add all of them here for reference and future proofing.
  37245. if (type === 'unavailable' || type === 'probe' || type === 'error' || type === 'unsubscribe' || type === 'unsubscribed' || type === 'subscribe' || type === 'subscribed') {
  37246. presence = $pres({
  37247. 'type': type
  37248. });
  37249. } else if (type === 'offline') {
  37250. presence = $pres({
  37251. 'type': 'unavailable'
  37252. });
  37253. } else if (type === 'online') {
  37254. presence = $pres();
  37255. } else {
  37256. presence = $pres().c('show').t(type).up();
  37257. }
  37258. if (status_message) {
  37259. presence.c('status').t(status_message).up();
  37260. }
  37261. presence.c('priority').t(_.isNaN(Number(_converse.priority)) ? 0 : _converse.priority);
  37262. return presence;
  37263. },
  37264. sendPresence: function sendPresence(type, status_message) {
  37265. _converse.connection.send(this.constructPresence(type, status_message));
  37266. }
  37267. });
  37268. this.setUpXMLLogging = function () {
  37269. Strophe.log = function (level, msg) {
  37270. _converse.log(msg, level);
  37271. };
  37272. if (this.debug) {
  37273. this.connection.xmlInput = function (body) {
  37274. _converse.log(body.outerHTML, Strophe.LogLevel.DEBUG, 'color: darkgoldenrod');
  37275. };
  37276. this.connection.xmlOutput = function (body) {
  37277. _converse.log(body.outerHTML, Strophe.LogLevel.DEBUG, 'color: darkcyan');
  37278. };
  37279. }
  37280. };
  37281. this.fetchLoginCredentials = function () {
  37282. return new Promise(function (resolve, reject) {
  37283. var xhr = new XMLHttpRequest();
  37284. xhr.open('GET', _converse.credentials_url, true);
  37285. xhr.setRequestHeader('Accept', "application/json, text/javascript");
  37286. xhr.onload = function () {
  37287. if (xhr.status >= 200 && xhr.status < 400) {
  37288. var data = JSON.parse(xhr.responseText);
  37289. resolve({
  37290. 'jid': data.jid,
  37291. 'password': data.password
  37292. });
  37293. } else {
  37294. xhr.onerror();
  37295. }
  37296. };
  37297. xhr.onerror = function () {
  37298. delete _converse.connection;
  37299. _converse.emit('noResumeableSession', this);
  37300. reject(xhr.responseText);
  37301. };
  37302. xhr.send();
  37303. });
  37304. };
  37305. this.startNewBOSHSession = function () {
  37306. var xhr = new XMLHttpRequest();
  37307. xhr.open('GET', _converse.prebind_url, true);
  37308. xhr.setRequestHeader('Accept', "application/json, text/javascript");
  37309. xhr.onload = function () {
  37310. if (xhr.status >= 200 && xhr.status < 400) {
  37311. var data = JSON.parse(xhr.responseText);
  37312. _converse.connection.attach(data.jid, data.sid, data.rid, _converse.onConnectStatusChanged);
  37313. } else {
  37314. xhr.onerror();
  37315. }
  37316. };
  37317. xhr.onerror = function () {
  37318. delete _converse.connection;
  37319. _converse.emit('noResumeableSession', this);
  37320. };
  37321. xhr.send();
  37322. };
  37323. this.restoreBOSHSession = function (jid_is_required) {
  37324. /* Tries to restore a cached BOSH session. */
  37325. if (!this.jid) {
  37326. var msg = "restoreBOSHSession: tried to restore a \"keepalive\" session " + "but we don't have the JID for the user!";
  37327. if (jid_is_required) {
  37328. throw new Error(msg);
  37329. } else {
  37330. _converse.log(msg);
  37331. }
  37332. }
  37333. try {
  37334. this.connection.restore(this.jid, this.onConnectStatusChanged);
  37335. return true;
  37336. } catch (e) {
  37337. _converse.log("Could not restore session for jid: " + this.jid + " Error message: " + e.message, Strophe.LogLevel.WARN);
  37338. this.clearSession(); // If there's a roster, we want to clear it (see #555)
  37339. return false;
  37340. }
  37341. };
  37342. this.attemptPreboundSession = function (reconnecting) {
  37343. /* Handle session resumption or initialization when prebind is
  37344. * being used.
  37345. */
  37346. if (!reconnecting) {
  37347. if (this.keepalive && this.restoreBOSHSession(true)) {
  37348. return;
  37349. } // No keepalive, or session resumption has failed.
  37350. if (this.jid && this.sid && this.rid) {
  37351. return this.connection.attach(this.jid, this.sid, this.rid, this.onConnectStatusChanged);
  37352. }
  37353. }
  37354. if (this.prebind_url) {
  37355. return this.startNewBOSHSession();
  37356. } else {
  37357. throw new Error("attemptPreboundSession: If you use prebind and not keepalive, " + "then you MUST supply JID, RID and SID values or a prebind_url.");
  37358. }
  37359. };
  37360. this.attemptNonPreboundSession = function (credentials, reconnecting) {
  37361. /* Handle session resumption or initialization when prebind is not being used.
  37362. *
  37363. * Two potential options exist and are handled in this method:
  37364. * 1. keepalive
  37365. * 2. auto_login
  37366. */
  37367. if (!reconnecting && this.keepalive && this.restoreBOSHSession()) {
  37368. return;
  37369. }
  37370. if (credentials) {
  37371. // When credentials are passed in, they override prebinding
  37372. // or credentials fetching via HTTP
  37373. this.autoLogin(credentials);
  37374. } else if (this.auto_login) {
  37375. if (this.credentials_url) {
  37376. this.fetchLoginCredentials().then(this.autoLogin.bind(this), this.autoLogin.bind(this));
  37377. } else if (!this.jid) {
  37378. throw new Error("attemptNonPreboundSession: If you use auto_login, " + "you also need to give either a jid value (and if " + "applicable a password) or you need to pass in a URL " + "from where the username and password can be fetched " + "(via credentials_url).");
  37379. } else {
  37380. this.autoLogin(); // Probably ANONYMOUS login
  37381. }
  37382. } else if (reconnecting) {
  37383. this.autoLogin();
  37384. }
  37385. };
  37386. this.autoLogin = function (credentials) {
  37387. if (credentials) {
  37388. // If passed in, the credentials come from credentials_url,
  37389. // so we set them on the converse object.
  37390. this.jid = credentials.jid;
  37391. }
  37392. if (this.authentication === _converse.ANONYMOUS) {
  37393. if (!this.jid) {
  37394. throw new Error("Config Error: when using anonymous login " + "you need to provide the server's domain via the 'jid' option. " + "Either when calling converse.initialize, or when calling " + "_converse.api.user.login.");
  37395. }
  37396. if (!this.connection.reconnecting) {
  37397. this.connection.reset();
  37398. }
  37399. this.connection.connect(this.jid.toLowerCase(), null, this.onConnectStatusChanged);
  37400. } else if (this.authentication === _converse.LOGIN) {
  37401. var password = _.isNil(credentials) ? _converse.connection.pass || this.password : credentials.password;
  37402. if (!password) {
  37403. if (this.auto_login) {
  37404. throw new Error("initConnection: If you use auto_login and " + "authentication='login' then you also need to provide a password.");
  37405. }
  37406. _converse.setDisconnectionCause(Strophe.Status.AUTHFAIL, undefined, true);
  37407. _converse.disconnect();
  37408. return;
  37409. }
  37410. var resource = Strophe.getResourceFromJid(this.jid);
  37411. if (!resource) {
  37412. this.jid = this.jid.toLowerCase() + _converse.generateResource();
  37413. } else {
  37414. this.jid = Strophe.getBareJidFromJid(this.jid).toLowerCase() + '/' + resource;
  37415. }
  37416. if (!this.connection.reconnecting) {
  37417. this.connection.reset();
  37418. }
  37419. this.connection.connect(this.jid, password, this.onConnectStatusChanged);
  37420. }
  37421. };
  37422. this.logIn = function (credentials, reconnecting) {
  37423. // We now try to resume or automatically set up a new session.
  37424. // Otherwise the user will be shown a login form.
  37425. if (this.authentication === _converse.PREBIND) {
  37426. this.attemptPreboundSession(reconnecting);
  37427. } else {
  37428. this.attemptNonPreboundSession(credentials, reconnecting);
  37429. }
  37430. };
  37431. this.initConnection = function () {
  37432. if (!this.connection) {
  37433. if (!this.bosh_service_url && !this.websocket_url) {
  37434. throw new Error("initConnection: you must supply a value for either the bosh_service_url or websocket_url or both.");
  37435. }
  37436. if (('WebSocket' in window || 'MozWebSocket' in window) && this.websocket_url) {
  37437. this.connection = new Strophe.Connection(this.websocket_url, this.connection_options);
  37438. } else if (this.bosh_service_url) {
  37439. this.connection = new Strophe.Connection(this.bosh_service_url, _.assignIn(this.connection_options, {
  37440. 'keepalive': this.keepalive
  37441. }));
  37442. } else {
  37443. throw new Error("initConnection: this browser does not support websockets and bosh_service_url wasn't specified.");
  37444. }
  37445. }
  37446. _converse.emit('connectionInitialized');
  37447. };
  37448. this._tearDown = function () {
  37449. /* Remove those views which are only allowed with a valid
  37450. * connection.
  37451. */
  37452. _converse.emit('beforeTearDown');
  37453. _converse.unregisterPresenceHandler();
  37454. if (_converse.roster) {
  37455. _converse.roster.off().reset(); // Removes roster contacts
  37456. }
  37457. if (!_.isUndefined(_converse.session)) {
  37458. _converse.session.destroy();
  37459. }
  37460. window.removeEventListener('click', _converse.onUserActivity);
  37461. window.removeEventListener('focus', _converse.onUserActivity);
  37462. window.removeEventListener('keypress', _converse.onUserActivity);
  37463. window.removeEventListener('mousemove', _converse.onUserActivity);
  37464. window.removeEventListener(unloadevent, _converse.onUserActivity);
  37465. window.clearInterval(_converse.everySecondTrigger);
  37466. _converse.emit('afterTearDown');
  37467. return _converse;
  37468. };
  37469. this.initPlugins = function () {
  37470. // If initialize gets called a second time (e.g. during tests), then we
  37471. // need to re-apply all plugins (for a new converse instance), and we
  37472. // therefore need to clear this array that prevents plugins from being
  37473. // initialized twice.
  37474. // If initialize is called for the first time, then this array is empty
  37475. // in any case.
  37476. _converse.pluggable.initialized_plugins = [];
  37477. var whitelist = _converse.core_plugins.concat(_converse.whitelisted_plugins);
  37478. if (_converse.view_mode === 'embedded') {
  37479. _.forEach([// eslint-disable-line lodash/prefer-map
  37480. "converse-bookmarks", "converse-controlbox", "converse-dragresize", "converse-headline", "converse-minimize", "converse-otr", "converse-register", "converse-vcard"], function (name) {
  37481. _converse.blacklisted_plugins.push(name);
  37482. });
  37483. }
  37484. _converse.pluggable.initializePlugins({
  37485. 'updateSettings': function updateSettings() {
  37486. _converse.log("(DEPRECATION) " + "The `updateSettings` method has been deprecated. " + "Please use `_converse.api.settings.update` instead.", Strophe.LogLevel.WARN);
  37487. _converse.api.settings.update.apply(_converse, arguments);
  37488. },
  37489. '_converse': _converse
  37490. }, whitelist, _converse.blacklisted_plugins);
  37491. _converse.emit('pluginsInitialized');
  37492. }; // Initialization
  37493. // --------------
  37494. // This is the end of the initialize method.
  37495. if (settings.connection) {
  37496. this.connection = settings.connection;
  37497. }
  37498. function finishInitialization() {
  37499. _converse.initPlugins();
  37500. _converse.initConnection();
  37501. _converse.setUpXMLLogging();
  37502. _converse.logIn();
  37503. _converse.registerGlobalEventHandlers();
  37504. if (!Backbone.history.started) {
  37505. Backbone.history.start();
  37506. }
  37507. }
  37508. if (!_.isUndefined(_converse.connection) && _converse.connection.service === 'jasmine tests') {
  37509. finishInitialization();
  37510. return _converse;
  37511. } else if (_.isUndefined(i18n)) {
  37512. finishInitialization();
  37513. } else {
  37514. i18n.fetchTranslations(_converse.locale, _converse.locales, u.interpolate(_converse.locales_url, {
  37515. 'locale': _converse.locale
  37516. })).catch(_.partial(_converse.log, _, Strophe.LogLevel.FATAL)).then(finishInitialization).catch(_.partial(_converse.log, _, Strophe.LogLevel.FATAL));
  37517. }
  37518. return init_promise;
  37519. }; // API methods only available to plugins
  37520. _converse.api = {
  37521. 'connection': {
  37522. 'connected': function connected() {
  37523. return _converse.connection && _converse.connection.connected || false;
  37524. },
  37525. 'disconnect': function disconnect() {
  37526. _converse.connection.disconnect();
  37527. }
  37528. },
  37529. 'emit': function emit() {
  37530. _converse.emit.apply(_converse, arguments);
  37531. },
  37532. 'user': {
  37533. 'jid': function jid() {
  37534. return _converse.connection.jid;
  37535. },
  37536. 'login': function login(credentials) {
  37537. _converse.initConnection();
  37538. _converse.logIn(credentials);
  37539. },
  37540. 'logout': function logout() {
  37541. _converse.logOut();
  37542. },
  37543. 'status': {
  37544. 'get': function get() {
  37545. return _converse.xmppstatus.get('status');
  37546. },
  37547. 'set': function set(value, message) {
  37548. var data = {
  37549. 'status': value
  37550. };
  37551. if (!_.includes(_.keys(_converse.STATUS_WEIGHTS), value)) {
  37552. throw new Error('Invalid availability value. See https://xmpp.org/rfcs/rfc3921.html#rfc.section.2.2.2.1');
  37553. }
  37554. if (_.isString(message)) {
  37555. data.status_message = message;
  37556. }
  37557. _converse.xmppstatus.sendPresence(value);
  37558. _converse.xmppstatus.save(data);
  37559. },
  37560. 'message': {
  37561. 'get': function get() {
  37562. return _converse.xmppstatus.get('status_message');
  37563. },
  37564. 'set': function set(stat) {
  37565. _converse.xmppstatus.save({
  37566. 'status_message': stat
  37567. });
  37568. }
  37569. }
  37570. }
  37571. },
  37572. 'settings': {
  37573. 'update': function update(settings) {
  37574. u.merge(_converse.default_settings, settings);
  37575. u.merge(_converse, settings);
  37576. u.applyUserSettings(_converse, settings, _converse.user_settings);
  37577. },
  37578. 'get': function get(key) {
  37579. if (_.includes(_.keys(_converse.default_settings), key)) {
  37580. return _converse[key];
  37581. }
  37582. },
  37583. 'set': function set(key, val) {
  37584. var o = {};
  37585. if (_.isObject(key)) {
  37586. _.assignIn(_converse, _.pick(key, _.keys(_converse.default_settings)));
  37587. } else if (_.isString("string")) {
  37588. o[key] = val;
  37589. _.assignIn(_converse, _.pick(o, _.keys(_converse.default_settings)));
  37590. }
  37591. }
  37592. },
  37593. 'promises': {
  37594. 'add': function add(promises) {
  37595. promises = _.isArray(promises) ? promises : [promises];
  37596. _.each(promises, addPromise);
  37597. }
  37598. },
  37599. 'contacts': {
  37600. 'get': function get(jids) {
  37601. var _getter = function _getter(jid) {
  37602. return _converse.roster.get(Strophe.getBareJidFromJid(jid)) || null;
  37603. };
  37604. if (_.isUndefined(jids)) {
  37605. jids = _converse.roster.pluck('jid');
  37606. } else if (_.isString(jids)) {
  37607. return _getter(jids);
  37608. }
  37609. return _.map(jids, _getter);
  37610. },
  37611. 'add': function add(jid, name) {
  37612. if (!_.isString(jid) || !_.includes(jid, '@')) {
  37613. throw new TypeError('contacts.add: invalid jid');
  37614. }
  37615. _converse.roster.addAndSubscribe(jid, _.isEmpty(name) ? jid : name);
  37616. }
  37617. },
  37618. 'tokens': {
  37619. 'get': function get(id) {
  37620. if (!_converse.expose_rid_and_sid || _.isUndefined(_converse.connection)) {
  37621. return null;
  37622. }
  37623. if (id.toLowerCase() === 'rid') {
  37624. return _converse.connection.rid || _converse.connection._proto.rid;
  37625. } else if (id.toLowerCase() === 'sid') {
  37626. return _converse.connection.sid || _converse.connection._proto.sid;
  37627. }
  37628. }
  37629. },
  37630. 'listen': {
  37631. 'once': _converse.once.bind(_converse),
  37632. 'on': _converse.on.bind(_converse),
  37633. 'not': _converse.off.bind(_converse),
  37634. 'stanza': function stanza(name, options, handler) {
  37635. if (_.isFunction(options)) {
  37636. handler = options;
  37637. options = {};
  37638. } else {
  37639. options = options || {};
  37640. }
  37641. _converse.connection.addHandler(handler, options.ns, name, options.type, options.id, options.from, options);
  37642. }
  37643. },
  37644. 'waitUntil': function waitUntil(name) {
  37645. var promise = _converse.promises[name];
  37646. if (_.isUndefined(promise)) {
  37647. return null;
  37648. }
  37649. return promise;
  37650. },
  37651. 'send': function send(stanza) {
  37652. _converse.connection.send(stanza);
  37653. }
  37654. }; // The public API
  37655. window.converse = {
  37656. 'initialize': function initialize(settings, callback) {
  37657. return _converse.initialize(settings, callback);
  37658. },
  37659. 'plugins': {
  37660. 'add': function add(name, plugin) {
  37661. plugin.__name__ = name;
  37662. if (!_.isUndefined(_converse.pluggable.plugins[name])) {
  37663. throw new TypeError("Error: plugin with name \"".concat(name, "\" has already been ") + 'registered!');
  37664. } else {
  37665. _converse.pluggable.plugins[name] = plugin;
  37666. }
  37667. }
  37668. },
  37669. 'env': {
  37670. '$build': $build,
  37671. '$iq': $iq,
  37672. '$msg': $msg,
  37673. '$pres': $pres,
  37674. 'Backbone': Backbone,
  37675. 'Promise': Promise,
  37676. 'Strophe': Strophe,
  37677. '_': _,
  37678. 'f': f,
  37679. 'b64_sha1': b64_sha1,
  37680. 'moment': moment,
  37681. 'sizzle': sizzle,
  37682. 'utils': u
  37683. }
  37684. };
  37685. window.dispatchEvent(new CustomEvent('converse-loaded'));
  37686. return window.converse;
  37687. });
  37688. //# sourceMappingURL=converse-core.js.map;
  37689. // Native Javascript for Bootstrap 4 v2.0.21 | © dnp_theme | MIT-License
  37690. (function (root, factory) {
  37691. if (typeof define === 'function' && define.amd) {
  37692. // AMD support:
  37693. define('bootstrap',[], factory);
  37694. } else if (typeof module === 'object' && module.exports) {
  37695. // CommonJS-like:
  37696. module.exports = factory();
  37697. } else {
  37698. // Browser globals (root is window)
  37699. var bsn = factory();
  37700. root.Alert = bsn.Alert;
  37701. root.Button = bsn.Button;
  37702. root.Carousel = bsn.Carousel;
  37703. root.Collapse = bsn.Collapse;
  37704. root.Dropdown = bsn.Dropdown;
  37705. root.Modal = bsn.Modal;
  37706. root.Popover = bsn.Popover;
  37707. root.ScrollSpy = bsn.ScrollSpy;
  37708. root.Tab = bsn.Tab;
  37709. root.Tooltip = bsn.Tooltip;
  37710. }
  37711. }(this, function () {
  37712. /* Native Javascript for Bootstrap 4 | Internal Utility Functions
  37713. ----------------------------------------------------------------*/
  37714. "use strict";
  37715. // globals
  37716. var globalObject = typeof global !== 'undefined' ? global : this||window,
  37717. DOC = document, HTML = DOC.documentElement, body = 'body', // allow the library to be used in <head>
  37718. // Native Javascript for Bootstrap Global Object
  37719. BSN = globalObject.BSN = {},
  37720. supports = BSN.supports = [],
  37721. // function toggle attributes
  37722. dataToggle = 'data-toggle',
  37723. dataDismiss = 'data-dismiss',
  37724. dataSpy = 'data-spy',
  37725. dataRide = 'data-ride',
  37726. // components
  37727. stringAlert = 'Alert',
  37728. stringButton = 'Button',
  37729. stringCarousel = 'Carousel',
  37730. stringCollapse = 'Collapse',
  37731. stringDropdown = 'Dropdown',
  37732. stringModal = 'Modal',
  37733. stringPopover = 'Popover',
  37734. stringScrollSpy = 'ScrollSpy',
  37735. stringTab = 'Tab',
  37736. stringTooltip = 'Tooltip',
  37737. // options DATA API
  37738. databackdrop = 'data-backdrop',
  37739. dataKeyboard = 'data-keyboard',
  37740. dataTarget = 'data-target',
  37741. dataInterval = 'data-interval',
  37742. dataHeight = 'data-height',
  37743. dataPause = 'data-pause',
  37744. dataTitle = 'data-title',
  37745. dataOriginalTitle = 'data-original-title',
  37746. dataOriginalText = 'data-original-text',
  37747. dataDismissible = 'data-dismissible',
  37748. dataTrigger = 'data-trigger',
  37749. dataAnimation = 'data-animation',
  37750. dataContainer = 'data-container',
  37751. dataPlacement = 'data-placement',
  37752. dataDelay = 'data-delay',
  37753. dataOffsetTop = 'data-offset-top',
  37754. dataOffsetBottom = 'data-offset-bottom',
  37755. // option keys
  37756. backdrop = 'backdrop', keyboard = 'keyboard', delay = 'delay',
  37757. content = 'content', target = 'target',
  37758. interval = 'interval', pause = 'pause', animation = 'animation',
  37759. placement = 'placement', container = 'container',
  37760. // box model
  37761. offsetTop = 'offsetTop', offsetBottom = 'offsetBottom',
  37762. offsetLeft = 'offsetLeft',
  37763. scrollTop = 'scrollTop', scrollLeft = 'scrollLeft',
  37764. clientWidth = 'clientWidth', clientHeight = 'clientHeight',
  37765. offsetWidth = 'offsetWidth', offsetHeight = 'offsetHeight',
  37766. innerWidth = 'innerWidth', innerHeight = 'innerHeight',
  37767. scrollHeight = 'scrollHeight', height = 'height',
  37768. // aria
  37769. ariaExpanded = 'aria-expanded',
  37770. ariaHidden = 'aria-hidden',
  37771. // event names
  37772. clickEvent = 'click',
  37773. hoverEvent = 'hover',
  37774. keydownEvent = 'keydown',
  37775. keyupEvent = 'keyup',
  37776. resizeEvent = 'resize',
  37777. scrollEvent = 'scroll',
  37778. // originalEvents
  37779. showEvent = 'show',
  37780. shownEvent = 'shown',
  37781. hideEvent = 'hide',
  37782. hiddenEvent = 'hidden',
  37783. closeEvent = 'close',
  37784. closedEvent = 'closed',
  37785. slidEvent = 'slid',
  37786. slideEvent = 'slide',
  37787. changeEvent = 'change',
  37788. // other
  37789. getAttribute = 'getAttribute',
  37790. setAttribute = 'setAttribute',
  37791. hasAttribute = 'hasAttribute',
  37792. createElement = 'createElement',
  37793. appendChild = 'appendChild',
  37794. innerHTML = 'innerHTML',
  37795. getElementsByTagName = 'getElementsByTagName',
  37796. preventDefault = 'preventDefault',
  37797. getBoundingClientRect = 'getBoundingClientRect',
  37798. querySelectorAll = 'querySelectorAll',
  37799. getElementsByCLASSNAME = 'getElementsByClassName',
  37800. indexOf = 'indexOf',
  37801. parentNode = 'parentNode',
  37802. length = 'length',
  37803. toLowerCase = 'toLowerCase',
  37804. Transition = 'Transition',
  37805. Webkit = 'Webkit',
  37806. style = 'style',
  37807. push = 'push',
  37808. tabindex = 'tabindex',
  37809. contains = 'contains',
  37810. active = 'active',
  37811. showClass = 'show',
  37812. collapsing = 'collapsing',
  37813. disabled = 'disabled',
  37814. loading = 'loading',
  37815. left = 'left',
  37816. right = 'right',
  37817. top = 'top',
  37818. bottom = 'bottom',
  37819. // tooltip / popover
  37820. mouseHover = ('onmouseleave' in DOC) ? [ 'mouseenter', 'mouseleave'] : [ 'mouseover', 'mouseout' ],
  37821. tipPositions = /\b(top|bottom|left|right)+/,
  37822. // modal
  37823. modalOverlay = 0,
  37824. fixedTop = 'fixed-top',
  37825. fixedBottom = 'fixed-bottom',
  37826. // transitionEnd since 2.0.4
  37827. supportTransitions = Webkit+Transition in HTML[style] || Transition[toLowerCase]() in HTML[style],
  37828. transitionEndEvent = Webkit+Transition in HTML[style] ? Webkit[toLowerCase]()+Transition+'End' : Transition[toLowerCase]()+'end',
  37829. // set new focus element since 2.0.3
  37830. setFocus = function(element){
  37831. element.focus ? element.focus() : element.setActive();
  37832. },
  37833. // class manipulation, since 2.0.0 requires polyfill.js
  37834. addClass = function(element,classNAME) {
  37835. element.classList.add(classNAME);
  37836. },
  37837. removeClass = function(element,classNAME) {
  37838. element.classList.remove(classNAME);
  37839. },
  37840. hasClass = function(element,classNAME){ // since 2.0.0
  37841. return element.classList[contains](classNAME);
  37842. },
  37843. // selection methods
  37844. getElementsByClassName = function(element,classNAME) { // returns Array
  37845. return [].slice.call(element[getElementsByCLASSNAME]( classNAME ));
  37846. },
  37847. queryElement = function (selector, parent) {
  37848. var lookUp = parent ? parent : DOC;
  37849. return typeof selector === 'object' ? selector : lookUp.querySelector(selector);
  37850. },
  37851. getClosest = function (element, selector) { //element is the element and selector is for the closest parent element to find
  37852. // source http://gomakethings.com/climbing-up-and-down-the-dom-tree-with-vanilla-javascript/
  37853. var firstChar = selector.charAt(0), selectorSubstring = selector.substr(1);
  37854. if ( firstChar === '.' ) {// If selector is a class
  37855. for ( ; element && element !== DOC; element = element[parentNode] ) { // Get closest match
  37856. if ( queryElement(selector,element[parentNode]) !== null && hasClass(element,selectorSubstring) ) { return element; }
  37857. }
  37858. } else if ( firstChar === '#' ) { // If selector is an ID
  37859. for ( ; element && element !== DOC; element = element[parentNode] ) { // Get closest match
  37860. if ( element.id === selectorSubstring ) { return element; }
  37861. }
  37862. }
  37863. return false;
  37864. },
  37865. // event attach jQuery style / trigger since 1.2.0
  37866. on = function (element, event, handler) {
  37867. element.addEventListener(event, handler, false);
  37868. },
  37869. off = function(element, event, handler) {
  37870. element.removeEventListener(event, handler, false);
  37871. },
  37872. one = function (element, event, handler) { // one since 2.0.4
  37873. on(element, event, function handlerWrapper(e){
  37874. handler(e);
  37875. off(element, event, handlerWrapper);
  37876. });
  37877. },
  37878. emulateTransitionEnd = function(element,handler){ // emulateTransitionEnd since 2.0.4
  37879. if (supportTransitions) { one(element, transitionEndEvent, function(e){ handler(e); }); }
  37880. else { handler(); }
  37881. },
  37882. bootstrapCustomEvent = function (eventName, componentName, related) {
  37883. var OriginalCustomEvent = new CustomEvent( eventName + '.bs.' + componentName);
  37884. OriginalCustomEvent.relatedTarget = related;
  37885. this.dispatchEvent(OriginalCustomEvent);
  37886. },
  37887. // tooltip / popover stuff
  37888. getScroll = function() { // also Affix and ScrollSpy uses it
  37889. return {
  37890. y : globalObject.pageYOffset || HTML[scrollTop],
  37891. x : globalObject.pageXOffset || HTML[scrollLeft]
  37892. }
  37893. },
  37894. styleTip = function(link,element,position,parent) { // both popovers and tooltips (target,tooltip,placement,elementToAppendTo)
  37895. var elementDimensions = { w : element[offsetWidth], h: element[offsetHeight] },
  37896. windowWidth = (HTML[clientWidth] || DOC[body][clientWidth]),
  37897. windowHeight = (HTML[clientHeight] || DOC[body][clientHeight]),
  37898. rect = link[getBoundingClientRect](),
  37899. scroll = parent === DOC[body] ? getScroll() : { x: parent[offsetLeft] + parent[scrollLeft], y: parent[offsetTop] + parent[scrollTop] },
  37900. linkDimensions = { w: rect[right] - rect[left], h: rect[bottom] - rect[top] },
  37901. arrow = queryElement('.arrow',element),
  37902. arrowWidth = arrow[offsetWidth], isPopover = hasClass(element,'popover'),
  37903. topPosition, leftPosition, arrowTop, arrowLeft,
  37904. halfTopExceed = rect[top] + linkDimensions.h/2 - elementDimensions.h/2 < 0,
  37905. halfLeftExceed = rect[left] + linkDimensions.w/2 - elementDimensions.w/2 < 0,
  37906. halfRightExceed = rect[left] + elementDimensions.w/2 + linkDimensions.w/2 >= windowWidth,
  37907. halfBottomExceed = rect[top] + elementDimensions.h/2 + linkDimensions.h/2 >= windowHeight,
  37908. topExceed = rect[top] - elementDimensions.h < 0,
  37909. leftExceed = rect[left] - elementDimensions.w < 0,
  37910. bottomExceed = rect[top] + elementDimensions.h + linkDimensions.h >= windowHeight,
  37911. rightExceed = rect[left] + elementDimensions.w + linkDimensions.w >= windowWidth;
  37912. // recompute position
  37913. position = (position === left || position === right) && leftExceed && rightExceed ? top : position; // first, when both left and right limits are exceeded, we fall back to top|bottom
  37914. position = position === top && topExceed ? bottom : position;
  37915. position = position === bottom && bottomExceed ? top : position;
  37916. position = position === left && leftExceed ? right : position;
  37917. position = position === right && rightExceed ? left : position;
  37918. // apply styling to tooltip or popover
  37919. if ( position === left || position === right ) { // secondary|side positions
  37920. if ( position === left ) { // LEFT
  37921. leftPosition = rect[left] + scroll.x - elementDimensions.w;
  37922. } else { // RIGHT
  37923. leftPosition = rect[left] + scroll.x + linkDimensions.w;
  37924. }
  37925. // adjust top and arrow
  37926. if (halfTopExceed) {
  37927. topPosition = rect[top] + scroll.y;
  37928. arrowTop = linkDimensions.h/2;
  37929. } else if (halfBottomExceed) {
  37930. topPosition = rect[top] + scroll.y - elementDimensions.h + linkDimensions.h;
  37931. arrowTop = elementDimensions.h - linkDimensions.h/2;
  37932. } else {
  37933. topPosition = rect[top] + scroll.y - elementDimensions.h/2 + linkDimensions.h/2;
  37934. arrowTop = elementDimensions.h/2;
  37935. }
  37936. } else if ( position === top || position === bottom ) { // primary|vertical positions
  37937. if ( position === top) { // TOP
  37938. topPosition = rect[top] + scroll.y - elementDimensions.h;
  37939. } else { // BOTTOM
  37940. topPosition = rect[top] + scroll.y + linkDimensions.h;
  37941. }
  37942. // adjust left | right and also the arrow
  37943. if (halfLeftExceed) {
  37944. leftPosition = 0;
  37945. arrowLeft = rect[left] + linkDimensions.w/2;
  37946. } else if (halfRightExceed) {
  37947. leftPosition = windowWidth - elementDimensions.w*1.01;
  37948. arrowLeft = elementDimensions.w - ( windowWidth - rect[left] ) + linkDimensions.w/2;
  37949. } else {
  37950. leftPosition = rect[left] + scroll.x - elementDimensions.w/2 + linkDimensions.w/2;
  37951. arrowLeft = elementDimensions.w/2;
  37952. }
  37953. }
  37954. // fixing some CSS bug with Bootstrap 4 alpha
  37955. topPosition = position === top && isPopover ? topPosition - arrowWidth : topPosition;
  37956. leftPosition = position === left && isPopover ? leftPosition - arrowWidth : leftPosition;
  37957. // apply style to tooltip/popover and it's arrow
  37958. element[style][top] = topPosition + 'px';
  37959. element[style][left] = leftPosition + 'px';
  37960. arrowTop && (arrow[style][top] = arrowTop + 'px');
  37961. arrowLeft && (arrow[style][left] = arrowLeft + 'px');
  37962. element.className[indexOf](position) === -1 && (element.className = element.className.replace(tipPositions,position));
  37963. };
  37964. BSN.version = '2.0.21';
  37965. /* Native Javascript for Bootstrap 4 | Alert
  37966. -------------------------------------------*/
  37967. // ALERT DEFINITION
  37968. // ================
  37969. var Alert = function( element ) {
  37970. // initialization element
  37971. element = queryElement(element);
  37972. // bind, target alert, duration and stuff
  37973. var self = this, component = 'alert',
  37974. alert = getClosest(element,'.'+component),
  37975. triggerHandler = function(){ hasClass(alert,'fade') ? emulateTransitionEnd(alert,transitionEndHandler) : transitionEndHandler(); },
  37976. // handlers
  37977. clickHandler = function(e){
  37978. alert = getClosest(e[target],'.'+component);
  37979. element = queryElement('['+dataDismiss+'="'+component+'"]',alert);
  37980. element && alert && (element === e[target] || element[contains](e[target])) && self.close();
  37981. },
  37982. transitionEndHandler = function(){
  37983. bootstrapCustomEvent.call(alert, closedEvent, component);
  37984. off(element, clickEvent, clickHandler); // detach it's listener
  37985. alert[parentNode].removeChild(alert);
  37986. };
  37987. // public method
  37988. this.close = function() {
  37989. if ( alert && element && hasClass(alert,showClass) ) {
  37990. bootstrapCustomEvent.call(alert, closeEvent, component);
  37991. removeClass(alert,showClass);
  37992. alert && triggerHandler();
  37993. }
  37994. };
  37995. // init
  37996. if ( !(stringAlert in element ) ) { // prevent adding event handlers twice
  37997. on(element, clickEvent, clickHandler);
  37998. }
  37999. element[stringAlert] = self;
  38000. };
  38001. // ALERT DATA API
  38002. // ==============
  38003. supports[push]([stringAlert, Alert, '['+dataDismiss+'="alert"]']);
  38004. /* Native Javascript for Bootstrap 4 | Button
  38005. ---------------------------------------------*/
  38006. // BUTTON DEFINITION
  38007. // ===================
  38008. var Button = function( element ) {
  38009. // initialization element
  38010. element = queryElement(element);
  38011. // constant
  38012. var toggled = false, // toggled makes sure to prevent triggering twice the change.bs.button events
  38013. // strings
  38014. component = 'button',
  38015. checked = 'checked',
  38016. reset = 'reset',
  38017. LABEL = 'LABEL',
  38018. INPUT = 'INPUT',
  38019. // private methods
  38020. keyHandler = function(e){
  38021. var key = e.which || e.keyCode;
  38022. key === 32 && e[target] === DOC.activeElement && toggle(e);
  38023. },
  38024. preventScroll = function(e){
  38025. var key = e.which || e.keyCode;
  38026. key === 32 && e[preventDefault]();
  38027. },
  38028. toggle = function(e) {
  38029. var label = e[target].tagName === LABEL ? e[target] : e[target][parentNode].tagName === LABEL ? e[target][parentNode] : null; // the .btn label
  38030. if ( !label ) return; //react if a label or its immediate child is clicked
  38031. var eventTarget = e[target], // the button itself, the target of the handler function
  38032. labels = getElementsByClassName(eventTarget[parentNode],'btn'), // all the button group buttons
  38033. input = label[getElementsByTagName](INPUT)[0];
  38034. if ( !input ) return; //return if no input found
  38035. // manage the dom manipulation
  38036. if ( input.type === 'checkbox' ) { //checkboxes
  38037. if ( !input[checked] ) {
  38038. addClass(label,active);
  38039. input[getAttribute](checked);
  38040. input[setAttribute](checked,checked);
  38041. input[checked] = true;
  38042. } else {
  38043. removeClass(label,active);
  38044. input[getAttribute](checked);
  38045. input.removeAttribute(checked);
  38046. input[checked] = false;
  38047. }
  38048. if (!toggled) { // prevent triggering the event twice
  38049. toggled = true;
  38050. bootstrapCustomEvent.call(input, changeEvent, component); //trigger the change for the input
  38051. bootstrapCustomEvent.call(element, changeEvent, component); //trigger the change for the btn-group
  38052. }
  38053. }
  38054. if ( input.type === 'radio' && !toggled ) { // radio buttons
  38055. if ( !input[checked] ) { // don't trigger if already active
  38056. addClass(label,active);
  38057. input[setAttribute](checked,checked);
  38058. input[checked] = true;
  38059. bootstrapCustomEvent.call(input, changeEvent, component); //trigger the change for the input
  38060. bootstrapCustomEvent.call(element, changeEvent, component); //trigger the change for the btn-group
  38061. toggled = true;
  38062. for (var i = 0, ll = labels[length]; i<ll; i++) {
  38063. var otherLabel = labels[i], otherInput = otherLabel[getElementsByTagName](INPUT)[0];
  38064. if ( otherLabel !== label && hasClass(otherLabel,active) ) {
  38065. removeClass(otherLabel,active);
  38066. otherInput.removeAttribute(checked);
  38067. otherInput[checked] = false;
  38068. bootstrapCustomEvent.call(otherInput, changeEvent, component); // trigger the change
  38069. }
  38070. }
  38071. }
  38072. }
  38073. setTimeout( function() { toggled = false; }, 50 );
  38074. };
  38075. // init
  38076. if ( !( stringButton in element ) ) { // prevent adding event handlers twice
  38077. on( element, clickEvent, toggle );
  38078. queryElement('['+tabindex+']',element) && on( element, keyupEvent, keyHandler ),
  38079. on( element, keydownEvent, preventScroll );
  38080. }
  38081. // activate items on load
  38082. var labelsToACtivate = getElementsByClassName(element, 'btn'), lbll = labelsToACtivate[length];
  38083. for (var i=0; i<lbll; i++) {
  38084. !hasClass(labelsToACtivate[i],active) && queryElement('input:checked',labelsToACtivate[i])
  38085. && addClass(labelsToACtivate[i],active);
  38086. }
  38087. element[stringButton] = this;
  38088. };
  38089. // BUTTON DATA API
  38090. // =================
  38091. supports[push]( [ stringButton, Button, '['+dataToggle+'="buttons"]' ] );
  38092. /* Native Javascript for Bootstrap 4 | Carousel
  38093. ----------------------------------------------*/
  38094. // CAROUSEL DEFINITION
  38095. // ===================
  38096. var Carousel = function( element, options ) {
  38097. // initialization element
  38098. element = queryElement( element );
  38099. // set options
  38100. options = options || {};
  38101. // DATA API
  38102. var intervalAttribute = element[getAttribute](dataInterval),
  38103. intervalOption = options[interval],
  38104. intervalData = intervalAttribute === 'false' ? 0 : parseInt(intervalAttribute) || 5000, // bootstrap carousel default interval
  38105. pauseData = element[getAttribute](dataPause) === hoverEvent || false,
  38106. keyboardData = element[getAttribute](dataKeyboard) === 'true' || false,
  38107. // strings
  38108. component = 'carousel',
  38109. paused = 'paused',
  38110. direction = 'direction',
  38111. carouselItem = 'carousel-item',
  38112. dataSlideTo = 'data-slide-to';
  38113. this[keyboard] = options[keyboard] === true || keyboardData;
  38114. this[pause] = (options[pause] === hoverEvent || pauseData) ? hoverEvent : false; // false / hover
  38115. this[interval] = typeof intervalOption === 'number' ? intervalOption
  38116. : intervalData === 0 ? 0
  38117. : intervalData;
  38118. // bind, event targets
  38119. var self = this, index = element.index = 0, timer = element.timer = 0,
  38120. isSliding = false, // isSliding prevents click event handlers when animation is running
  38121. slides = getElementsByClassName(element,carouselItem), total = slides[length],
  38122. slideDirection = this[direction] = left,
  38123. leftArrow = getElementsByClassName(element,component+'-control-prev')[0],
  38124. rightArrow = getElementsByClassName(element,component+'-control-next')[0],
  38125. indicator = queryElement( '.'+component+'-indicators', element ),
  38126. indicators = indicator && indicator[getElementsByTagName]( "LI" ) || [];
  38127. // handlers
  38128. var pauseHandler = function () {
  38129. if ( self[interval] !==false && !hasClass(element,paused) ) {
  38130. addClass(element,paused);
  38131. !isSliding && clearInterval( timer );
  38132. }
  38133. },
  38134. resumeHandler = function() {
  38135. if ( self[interval] !== false && hasClass(element,paused) ) {
  38136. removeClass(element,paused);
  38137. !isSliding && clearInterval( timer );
  38138. !isSliding && self.cycle();
  38139. }
  38140. },
  38141. indicatorHandler = function(e) {
  38142. e[preventDefault]();
  38143. if (isSliding) return;
  38144. var eventTarget = e[target]; // event target | the current active item
  38145. if ( eventTarget && !hasClass(eventTarget,active) && eventTarget[getAttribute](dataSlideTo) ) {
  38146. index = parseInt( eventTarget[getAttribute](dataSlideTo), 10 );
  38147. } else { return false; }
  38148. self.slideTo( index ); //Do the slide
  38149. },
  38150. controlsHandler = function (e) {
  38151. e[preventDefault]();
  38152. if (isSliding) return;
  38153. var eventTarget = e.currentTarget || e.srcElement;
  38154. if ( eventTarget === rightArrow ) {
  38155. index++;
  38156. } else if ( eventTarget === leftArrow ) {
  38157. index--;
  38158. }
  38159. self.slideTo( index ); //Do the slide
  38160. },
  38161. keyHandler = function (e) {
  38162. if (isSliding) return;
  38163. switch (e.which) {
  38164. case 39:
  38165. index++;
  38166. break;
  38167. case 37:
  38168. index--;
  38169. break;
  38170. default: return;
  38171. }
  38172. self.slideTo( index ); //Do the slide
  38173. },
  38174. // private methods
  38175. isElementInScrollRange = function () {
  38176. var rect = element[getBoundingClientRect](),
  38177. viewportHeight = globalObject[innerHeight] || HTML[clientHeight]
  38178. return rect[top] <= viewportHeight && rect[bottom] >= 0; // bottom && top
  38179. },
  38180. setActivePage = function( pageIndex ) { //indicators
  38181. for ( var i = 0, icl = indicators[length]; i < icl; i++ ) {
  38182. removeClass(indicators[i],active);
  38183. }
  38184. if (indicators[pageIndex]) addClass(indicators[pageIndex], active);
  38185. };
  38186. // public methods
  38187. this.cycle = function() {
  38188. timer = setInterval(function() {
  38189. isElementInScrollRange() && (index++, self.slideTo( index ) );
  38190. }, this[interval]);
  38191. };
  38192. this.slideTo = function( next ) {
  38193. if (isSliding) return; // when controled via methods, make sure to check again
  38194. var activeItem = this.getActiveIndex(), // the current active
  38195. orientation;
  38196. // determine slideDirection first
  38197. if ( (activeItem < next ) || (activeItem === 0 && next === total -1 ) ) {
  38198. slideDirection = self[direction] = left; // next
  38199. } else if ( (activeItem > next) || (activeItem === total - 1 && next === 0 ) ) {
  38200. slideDirection = self[direction] = right; // prev
  38201. }
  38202. // find the right next index
  38203. if ( next < 0 ) { next = total - 1; }
  38204. else if ( next === total ){ next = 0; }
  38205. // update index
  38206. index = next;
  38207. orientation = slideDirection === left ? 'next' : 'prev'; //determine type
  38208. bootstrapCustomEvent.call(element, slideEvent, component, slides[next]); // here we go with the slide
  38209. isSliding = true;
  38210. clearInterval(timer);
  38211. setActivePage( next );
  38212. if ( supportTransitions && hasClass(element,'slide') ) {
  38213. addClass(slides[next],carouselItem +'-'+ orientation);
  38214. slides[next][offsetWidth];
  38215. addClass(slides[next],carouselItem +'-'+ slideDirection);
  38216. addClass(slides[activeItem],carouselItem +'-'+ slideDirection);
  38217. one(slides[activeItem], transitionEndEvent, function(e) {
  38218. var timeout = e[target] !== slides[activeItem] ? e.elapsedTime*1000 : 0;
  38219. setTimeout(function(){
  38220. isSliding = false;
  38221. addClass(slides[next],active);
  38222. removeClass(slides[activeItem],active);
  38223. removeClass(slides[next],carouselItem +'-'+ orientation);
  38224. removeClass(slides[next],carouselItem +'-'+ slideDirection);
  38225. removeClass(slides[activeItem],carouselItem +'-'+ slideDirection);
  38226. bootstrapCustomEvent.call(element, slidEvent, component, slides[next]);
  38227. if ( !DOC.hidden && self[interval] && !hasClass(element,paused) ) {
  38228. self.cycle();
  38229. }
  38230. },timeout+100);
  38231. });
  38232. } else {
  38233. addClass(slides[next],active);
  38234. slides[next][offsetWidth];
  38235. removeClass(slides[activeItem],active);
  38236. setTimeout(function() {
  38237. isSliding = false;
  38238. if ( self[interval] && !hasClass(element,paused) ) {
  38239. self.cycle();
  38240. }
  38241. bootstrapCustomEvent.call(element, slidEvent, component, slides[next]);
  38242. }, 100 );
  38243. }
  38244. };
  38245. this.getActiveIndex = function () {
  38246. return slides[indexOf](getElementsByClassName(element,carouselItem+' active')[0]) || 0;
  38247. };
  38248. // init
  38249. if ( !(stringCarousel in element ) ) { // prevent adding event handlers twice
  38250. if ( self[pause] && self[interval] ) {
  38251. on( element, mouseHover[0], pauseHandler );
  38252. on( element, mouseHover[1], resumeHandler );
  38253. on( element, 'touchstart', pauseHandler );
  38254. on( element, 'touchend', resumeHandler );
  38255. }
  38256. rightArrow && on( rightArrow, clickEvent, controlsHandler );
  38257. leftArrow && on( leftArrow, clickEvent, controlsHandler );
  38258. indicator && on( indicator, clickEvent, indicatorHandler );
  38259. self[keyboard] === true && on( globalObject, keydownEvent, keyHandler );
  38260. }
  38261. if (self.getActiveIndex()<0) {
  38262. slides[length] && addClass(slides[0],active);
  38263. indicators[length] && setActivePage(0);
  38264. }
  38265. if ( self[interval] ){ self.cycle(); }
  38266. element[stringCarousel] = self;
  38267. };
  38268. // CAROUSEL DATA API
  38269. // =================
  38270. supports[push]( [ stringCarousel, Carousel, '['+dataRide+'="carousel"]' ] );
  38271. /* Native Javascript for Bootstrap 4 | Collapse
  38272. -----------------------------------------------*/
  38273. // COLLAPSE DEFINITION
  38274. // ===================
  38275. var Collapse = function( element, options ) {
  38276. // initialization element
  38277. element = queryElement(element);
  38278. // set options
  38279. options = options || {};
  38280. // event targets and constants
  38281. var accordion = null, collapse = null, self = this,
  38282. isAnimating = false, // when true it will prevent click handlers
  38283. accordionData = element[getAttribute]('data-parent'),
  38284. // component strings
  38285. component = 'collapse',
  38286. collapsed = 'collapsed',
  38287. // private methods
  38288. openAction = function(collapseElement) {
  38289. bootstrapCustomEvent.call(collapseElement, showEvent, component);
  38290. isAnimating = true;
  38291. addClass(collapseElement,collapsing);
  38292. removeClass(collapseElement,component);
  38293. collapseElement[style][height] = collapseElement[scrollHeight] + 'px';
  38294. emulateTransitionEnd(collapseElement, function() {
  38295. isAnimating = false;
  38296. collapseElement[setAttribute](ariaExpanded,'true');
  38297. removeClass(collapseElement,collapsing);
  38298. addClass(collapseElement, component);
  38299. addClass(collapseElement,showClass);
  38300. collapseElement[style][height] = '';
  38301. bootstrapCustomEvent.call(collapseElement, shownEvent, component);
  38302. });
  38303. },
  38304. closeAction = function(collapseElement) {
  38305. bootstrapCustomEvent.call(collapseElement, hideEvent, component);
  38306. isAnimating = true;
  38307. collapseElement[style][height] = collapseElement[scrollHeight] + 'px'; // set height first
  38308. removeClass(collapseElement,component);
  38309. removeClass(collapseElement,showClass);
  38310. addClass(collapseElement,collapsing);
  38311. collapseElement[offsetWidth]; // force reflow to enable transition
  38312. collapseElement[style][height] = '0px';
  38313. emulateTransitionEnd(collapseElement, function() {
  38314. isAnimating = false;
  38315. collapseElement[setAttribute](ariaExpanded,'false');
  38316. removeClass(collapseElement,collapsing);
  38317. addClass(collapseElement,component);
  38318. collapseElement[style][height] = '';
  38319. bootstrapCustomEvent.call(collapseElement, hiddenEvent, component);
  38320. });
  38321. },
  38322. getTarget = function() {
  38323. var href = element.href && element[getAttribute]('href'),
  38324. parent = element[getAttribute](dataTarget),
  38325. id = href || ( parent && parent.charAt(0) === '#' ) && parent;
  38326. return id && queryElement(id);
  38327. };
  38328. // public methods
  38329. this.toggle = function(e) {
  38330. e[preventDefault]();
  38331. if (isAnimating) return;
  38332. if (!hasClass(collapse,showClass)) { self.show(); }
  38333. else { self.hide(); }
  38334. };
  38335. this.hide = function() {
  38336. closeAction(collapse);
  38337. addClass(element,collapsed);
  38338. };
  38339. this.show = function() {
  38340. if ( accordion ) {
  38341. var activeCollapse = queryElement('.'+component+'.'+showClass,accordion),
  38342. toggle = activeCollapse && (queryElement('['+dataToggle+'="'+component+'"]['+dataTarget+'="#'+activeCollapse.id+'"]',accordion)
  38343. || queryElement('['+dataToggle+'="'+component+'"][href="#'+activeCollapse.id+'"]',accordion) ),
  38344. correspondingCollapse = toggle && (toggle[getAttribute](dataTarget) || toggle.href);
  38345. if ( activeCollapse && toggle && activeCollapse !== collapse ) {
  38346. closeAction(activeCollapse);
  38347. if ( correspondingCollapse.split('#')[1] !== collapse.id ) { addClass(toggle,collapsed); }
  38348. else { removeClass(toggle,collapsed); }
  38349. }
  38350. }
  38351. openAction(collapse);
  38352. removeClass(element,collapsed);
  38353. };
  38354. // init
  38355. if ( !(stringCollapse in element ) ) { // prevent adding event handlers twice
  38356. on(element, clickEvent, self.toggle);
  38357. }
  38358. collapse = getTarget();
  38359. accordion = queryElement(options.parent) || accordionData && getClosest(element, accordionData);
  38360. element[stringCollapse] = self;
  38361. };
  38362. // COLLAPSE DATA API
  38363. // =================
  38364. supports[push]( [ stringCollapse, Collapse, '['+dataToggle+'="collapse"]' ] );
  38365. /* Native Javascript for Bootstrap 4 | Dropdown
  38366. ----------------------------------------------*/
  38367. // DROPDOWN DEFINITION
  38368. // ===================
  38369. var Dropdown = function( element, option ) {
  38370. // initialization element
  38371. element = queryElement(element);
  38372. // set option
  38373. this.persist = option === true || element[getAttribute]('data-persist') === 'true' || false;
  38374. // constants, event targets, strings
  38375. var self = this, children = 'children',
  38376. parent = element[parentNode],
  38377. component = 'dropdown', open = 'open',
  38378. relatedTarget = null,
  38379. menu = queryElement('.dropdown-menu', parent),
  38380. menuItems = (function(){
  38381. var set = menu[children], newSet = [];
  38382. for ( var i=0; i<set[length]; i++ ){
  38383. set[i][children][length] && (set[i][children][0].tagName === 'A' && newSet[push](set[i][children][0]));
  38384. set[i].tagName === 'A' && newSet[push](set[i]);
  38385. }
  38386. return newSet;
  38387. })(),
  38388. // preventDefault on empty anchor links
  38389. preventEmptyAnchor = function(anchor){
  38390. (anchor.href && anchor.href.slice(-1) === '#' || anchor[parentNode] && anchor[parentNode].href
  38391. && anchor[parentNode].href.slice(-1) === '#') && this[preventDefault]();
  38392. },
  38393. // toggle dismissible events
  38394. toggleDismiss = function(){
  38395. var type = element[open] ? on : off;
  38396. type(DOC, clickEvent, dismissHandler);
  38397. type(DOC, keydownEvent, preventScroll);
  38398. type(DOC, keyupEvent, keyHandler);
  38399. },
  38400. // handlers
  38401. dismissHandler = function(e) {
  38402. var eventTarget = e[target], hasData = eventTarget && (stringDropdown in eventTarget || stringDropdown in eventTarget[parentNode]);
  38403. if ( (eventTarget === menu || menu[contains](eventTarget)) && (self.persist || hasData) ) { return; }
  38404. else {
  38405. relatedTarget = eventTarget === element || element[contains](eventTarget) ? element : null;
  38406. hide();
  38407. }
  38408. preventEmptyAnchor.call(e,eventTarget);
  38409. },
  38410. clickHandler = function(e) {
  38411. relatedTarget = element;
  38412. show();
  38413. preventEmptyAnchor.call(e,e[target]);
  38414. },
  38415. preventScroll = function(e){
  38416. var key = e.which || e.keyCode;
  38417. if( key === 38 || key === 40 ) { e[preventDefault](); }
  38418. },
  38419. keyHandler = function(e){
  38420. var key = e.which || e.keyCode,
  38421. activeItem = DOC.activeElement,
  38422. idx = menuItems[indexOf](activeItem),
  38423. isSameElement = activeItem === element,
  38424. isInsideMenu = menu[contains](activeItem),
  38425. isMenuItem = activeItem[parentNode] === menu || activeItem[parentNode][parentNode] === menu;
  38426. if ( isMenuItem || isSameElement ) { // navigate up | down
  38427. idx = isSameElement ? 0
  38428. : key === 38 ? (idx>1?idx-1:0)
  38429. : key === 40 ? (idx<menuItems[length]-1?idx+1:idx) : idx;
  38430. menuItems[idx] && setFocus(menuItems[idx]);
  38431. }
  38432. if ( (menuItems[length] && isMenuItem // menu has items
  38433. || !menuItems[length] && (isInsideMenu || isSameElement) // menu might be a form
  38434. || !isInsideMenu ) // or the focused element is not in the menu at all
  38435. && element[open] && key === 27 // menu must be open
  38436. ) {
  38437. self.toggle();
  38438. relatedTarget = null;
  38439. }
  38440. },
  38441. // private methods
  38442. show = function() {
  38443. bootstrapCustomEvent.call(parent, showEvent, component, relatedTarget);
  38444. addClass(menu,showClass);
  38445. addClass(parent,showClass);
  38446. menu[setAttribute](ariaExpanded,true);
  38447. bootstrapCustomEvent.call(parent, shownEvent, component, relatedTarget);
  38448. element[open] = true;
  38449. off(element, clickEvent, clickHandler);
  38450. setTimeout(function(){
  38451. setFocus( menu[getElementsByTagName]('INPUT')[0] || element ); // focus the first input item | element
  38452. toggleDismiss();
  38453. },1);
  38454. },
  38455. hide = function() {
  38456. bootstrapCustomEvent.call(parent, hideEvent, component, relatedTarget);
  38457. removeClass(menu,showClass);
  38458. removeClass(parent,showClass);
  38459. menu[setAttribute](ariaExpanded,false);
  38460. bootstrapCustomEvent.call(parent, hiddenEvent, component, relatedTarget);
  38461. element[open] = false;
  38462. toggleDismiss();
  38463. setFocus(element);
  38464. setTimeout(function(){ on(element, clickEvent, clickHandler); },1);
  38465. };
  38466. // set initial state to closed
  38467. element[open] = false;
  38468. // public methods
  38469. this.toggle = function() {
  38470. if (hasClass(parent,showClass) && element[open]) { hide(); }
  38471. else { show(); }
  38472. };
  38473. // init
  38474. if ( !(stringDropdown in element) ) { // prevent adding event handlers twice
  38475. !tabindex in menu && menu[setAttribute](tabindex, '0'); // Fix onblur on Chrome | Safari
  38476. on(element, clickEvent, clickHandler);
  38477. }
  38478. element[stringDropdown] = self;
  38479. };
  38480. // DROPDOWN DATA API
  38481. // =================
  38482. supports[push]( [stringDropdown, Dropdown, '['+dataToggle+'="dropdown"]'] );
  38483. /* Native Javascript for Bootstrap 4 | Modal
  38484. -------------------------------------------*/
  38485. // MODAL DEFINITION
  38486. // ===============
  38487. var Modal = function(element, options) { // element can be the modal/triggering button
  38488. // the modal (both JavaScript / DATA API init) / triggering button element (DATA API)
  38489. element = queryElement(element);
  38490. // determine modal, triggering element
  38491. var btnCheck = element[getAttribute](dataTarget)||element[getAttribute]('href'),
  38492. checkModal = queryElement( btnCheck ),
  38493. modal = hasClass(element,'modal') ? element : checkModal,
  38494. // strings
  38495. component = 'modal',
  38496. staticString = 'static',
  38497. paddingLeft = 'paddingLeft',
  38498. paddingRight = 'paddingRight',
  38499. modalBackdropString = 'modal-backdrop';
  38500. if ( hasClass(element,'modal') ) { element = null; } // modal is now independent of it's triggering element
  38501. if ( !modal ) { return; } // invalidate
  38502. // set options
  38503. options = options || {};
  38504. this[keyboard] = options[keyboard] === false || modal[getAttribute](dataKeyboard) === 'false' ? false : true;
  38505. this[backdrop] = options[backdrop] === staticString || modal[getAttribute](databackdrop) === staticString ? staticString : true;
  38506. this[backdrop] = options[backdrop] === false || modal[getAttribute](databackdrop) === 'false' ? false : this[backdrop];
  38507. this[content] = options[content]; // JavaScript only
  38508. // bind, constants, event targets and other vars
  38509. var self = this, relatedTarget = null,
  38510. bodyIsOverflowing, modalIsOverflowing, scrollbarWidth, overlay,
  38511. // also find fixed-top / fixed-bottom items
  38512. fixedItems = getElementsByClassName(HTML,fixedTop).concat(getElementsByClassName(HTML,fixedBottom)),
  38513. // private methods
  38514. getWindowWidth = function() {
  38515. var htmlRect = HTML[getBoundingClientRect]();
  38516. return globalObject[innerWidth] || (htmlRect[right] - Math.abs(htmlRect[left]));
  38517. },
  38518. setScrollbar = function () {
  38519. var bodyStyle = globalObject.getComputedStyle(DOC[body]),
  38520. bodyPad = parseInt((bodyStyle[paddingRight]), 10), itemPad;
  38521. if (bodyIsOverflowing) {
  38522. DOC[body][style][paddingRight] = (bodyPad + scrollbarWidth) + 'px';
  38523. if (fixedItems[length]){
  38524. for (var i = 0; i < fixedItems[length]; i++) {
  38525. itemPad = globalObject.getComputedStyle(fixedItems[i])[paddingRight];
  38526. fixedItems[i][style][paddingRight] = ( parseInt(itemPad) + scrollbarWidth) + 'px';
  38527. }
  38528. }
  38529. }
  38530. },
  38531. resetScrollbar = function () {
  38532. DOC[body][style][paddingRight] = '';
  38533. if (fixedItems[length]){
  38534. for (var i = 0; i < fixedItems[length]; i++) {
  38535. fixedItems[i][style][paddingRight] = '';
  38536. }
  38537. }
  38538. },
  38539. measureScrollbar = function () { // thx walsh
  38540. var scrollDiv = DOC[createElement]('div'), scrollBarWidth;
  38541. scrollDiv.className = component+'-scrollbar-measure'; // this is here to stay
  38542. DOC[body][appendChild](scrollDiv);
  38543. scrollBarWidth = scrollDiv[offsetWidth] - scrollDiv[clientWidth];
  38544. DOC[body].removeChild(scrollDiv);
  38545. return scrollBarWidth;
  38546. },
  38547. checkScrollbar = function () {
  38548. bodyIsOverflowing = DOC[body][clientWidth] < getWindowWidth();
  38549. modalIsOverflowing = modal[scrollHeight] > HTML[clientHeight];
  38550. scrollbarWidth = measureScrollbar();
  38551. },
  38552. adjustDialog = function () {
  38553. modal[style][paddingLeft] = !bodyIsOverflowing && modalIsOverflowing ? scrollbarWidth + 'px' : '';
  38554. modal[style][paddingRight] = bodyIsOverflowing && !modalIsOverflowing ? scrollbarWidth + 'px' : '';
  38555. },
  38556. resetAdjustments = function () {
  38557. modal[style][paddingLeft] = '';
  38558. modal[style][paddingRight] = '';
  38559. },
  38560. createOverlay = function() {
  38561. modalOverlay = 1;
  38562. var newOverlay = DOC[createElement]('div');
  38563. overlay = queryElement('.'+modalBackdropString);
  38564. if ( overlay === null ) {
  38565. newOverlay[setAttribute]('class',modalBackdropString+' fade');
  38566. overlay = newOverlay;
  38567. DOC[body][appendChild](overlay);
  38568. }
  38569. },
  38570. removeOverlay = function() {
  38571. overlay = queryElement('.'+modalBackdropString);
  38572. if ( overlay && overlay !== null && typeof overlay === 'object' ) {
  38573. modalOverlay = 0;
  38574. DOC[body].removeChild(overlay); overlay = null;
  38575. }
  38576. bootstrapCustomEvent.call(modal, hiddenEvent, component);
  38577. },
  38578. keydownHandlerToggle = function() {
  38579. if (hasClass(modal,showClass)) {
  38580. on(DOC, keydownEvent, keyHandler);
  38581. } else {
  38582. off(DOC, keydownEvent, keyHandler);
  38583. }
  38584. },
  38585. resizeHandlerToggle = function() {
  38586. if (hasClass(modal,showClass)) {
  38587. on(globalObject, resizeEvent, self.update);
  38588. } else {
  38589. off(globalObject, resizeEvent, self.update);
  38590. }
  38591. },
  38592. dismissHandlerToggle = function() {
  38593. if (hasClass(modal,showClass)) {
  38594. on(modal, clickEvent, dismissHandler);
  38595. } else {
  38596. off(modal, clickEvent, dismissHandler);
  38597. }
  38598. },
  38599. // triggers
  38600. triggerShow = function() {
  38601. setFocus(modal);
  38602. bootstrapCustomEvent.call(modal, shownEvent, component, relatedTarget);
  38603. },
  38604. triggerHide = function() {
  38605. modal[style].display = '';
  38606. element && (setFocus(element));
  38607. setTimeout(function(){
  38608. if (!getElementsByClassName(DOC,component+' '+showClass)[0]) {
  38609. resetAdjustments();
  38610. resetScrollbar();
  38611. removeClass(DOC[body],component+'-open');
  38612. overlay && hasClass(overlay,'fade') ? (removeClass(overlay,showClass), emulateTransitionEnd(overlay,removeOverlay))
  38613. : removeOverlay();
  38614. resizeHandlerToggle();
  38615. dismissHandlerToggle();
  38616. keydownHandlerToggle();
  38617. }
  38618. }, 50);
  38619. },
  38620. // handlers
  38621. clickHandler = function(e) {
  38622. var clickTarget = e[target];
  38623. clickTarget = clickTarget[hasAttribute](dataTarget) || clickTarget[hasAttribute]('href') ? clickTarget : clickTarget[parentNode];
  38624. if ( clickTarget === element && !hasClass(modal,showClass) ) {
  38625. modal.modalTrigger = element;
  38626. relatedTarget = element;
  38627. self.show();
  38628. e[preventDefault]();
  38629. }
  38630. },
  38631. keyHandler = function(e) {
  38632. if (self[keyboard] && e.which == 27 && hasClass(modal,showClass)) {
  38633. self.hide();
  38634. }
  38635. },
  38636. dismissHandler = function(e) {
  38637. var clickTarget = e[target];
  38638. if ( hasClass(modal,showClass) && (clickTarget[parentNode][getAttribute](dataDismiss) === component
  38639. || clickTarget[getAttribute](dataDismiss) === component
  38640. || (clickTarget === modal && self[backdrop] !== staticString) ) ) {
  38641. self.hide(); relatedTarget = null;
  38642. e[preventDefault]();
  38643. }
  38644. };
  38645. // public methods
  38646. this.toggle = function() {
  38647. if ( hasClass(modal,showClass) ) {this.hide();} else {this.show();}
  38648. };
  38649. this.show = function() {
  38650. bootstrapCustomEvent.call(modal, showEvent, component, relatedTarget);
  38651. // we elegantly hide any opened modal
  38652. var currentOpen = getElementsByClassName(DOC,component+' '+showClass)[0];
  38653. currentOpen && currentOpen !== modal && currentOpen.modalTrigger[stringModal].hide();
  38654. if ( this[backdrop] ) {
  38655. !modalOverlay && createOverlay();
  38656. }
  38657. if ( overlay && modalOverlay && !hasClass(overlay,showClass)) {
  38658. overlay[offsetWidth]; // force reflow to enable trasition
  38659. addClass(overlay, showClass);
  38660. }
  38661. setTimeout( function() {
  38662. modal[style].display = 'block';
  38663. checkScrollbar();
  38664. setScrollbar();
  38665. adjustDialog();
  38666. addClass(DOC[body],component+'-open');
  38667. addClass(modal,showClass);
  38668. modal[setAttribute](ariaHidden, false);
  38669. resizeHandlerToggle();
  38670. dismissHandlerToggle();
  38671. keydownHandlerToggle();
  38672. hasClass(modal,'fade') ? emulateTransitionEnd(modal, triggerShow) : triggerShow();
  38673. }, supportTransitions ? 150 : 0);
  38674. };
  38675. this.hide = function() {
  38676. bootstrapCustomEvent.call(modal, hideEvent, component);
  38677. overlay = queryElement('.'+modalBackdropString);
  38678. removeClass(modal,showClass);
  38679. modal[setAttribute](ariaHidden, true);
  38680. setTimeout(function(){
  38681. hasClass(modal,'fade') ? emulateTransitionEnd(modal, triggerHide) : triggerHide();
  38682. }, supportTransitions ? 150 : 0);
  38683. };
  38684. this.setContent = function( content ) {
  38685. queryElement('.'+component+'-content',modal)[innerHTML] = content;
  38686. };
  38687. this.update = function() {
  38688. if (hasClass(modal,showClass)) {
  38689. checkScrollbar();
  38690. setScrollbar();
  38691. adjustDialog();
  38692. }
  38693. };
  38694. // init
  38695. // prevent adding event handlers over and over
  38696. // modal is independent of a triggering element
  38697. if ( !!element && !(stringModal in element) ) {
  38698. on(element, clickEvent, clickHandler);
  38699. }
  38700. if ( !!self[content] ) { self.setContent( self[content] ); }
  38701. !!element && (element[stringModal] = self);
  38702. };
  38703. // DATA API
  38704. supports[push]( [ stringModal, Modal, '['+dataToggle+'="modal"]' ] );
  38705. /* Native Javascript for Bootstrap 4 | Popover
  38706. ----------------------------------------------*/
  38707. // POPOVER DEFINITION
  38708. // ==================
  38709. var Popover = function( element, options ) {
  38710. // initialization element
  38711. element = queryElement(element);
  38712. // set options
  38713. options = options || {};
  38714. // DATA API
  38715. var triggerData = element[getAttribute](dataTrigger), // click / hover / focus
  38716. animationData = element[getAttribute](dataAnimation), // true / false
  38717. placementData = element[getAttribute](dataPlacement),
  38718. dismissibleData = element[getAttribute](dataDismissible),
  38719. delayData = element[getAttribute](dataDelay),
  38720. containerData = element[getAttribute](dataContainer),
  38721. // internal strings
  38722. component = 'popover',
  38723. template = 'template',
  38724. trigger = 'trigger',
  38725. classString = 'class',
  38726. div = 'div',
  38727. fade = 'fade',
  38728. content = 'content',
  38729. dataContent = 'data-content',
  38730. dismissible = 'dismissible',
  38731. closeBtn = '<button type="button" class="close">×</button>',
  38732. // check container
  38733. containerElement = queryElement(options[container]),
  38734. containerDataElement = queryElement(containerData),
  38735. // maybe the element is inside a modal
  38736. modal = getClosest(element,'.modal'),
  38737. // maybe the element is inside a fixed navbar
  38738. navbarFixedTop = getClosest(element,'.'+fixedTop),
  38739. navbarFixedBottom = getClosest(element,'.'+fixedBottom);
  38740. // set instance options
  38741. this[template] = options[template] ? options[template] : null; // JavaScript only
  38742. this[trigger] = options[trigger] ? options[trigger] : triggerData || hoverEvent;
  38743. this[animation] = options[animation] && options[animation] !== fade ? options[animation] : animationData || fade;
  38744. this[placement] = options[placement] ? options[placement] : placementData || top;
  38745. this[delay] = parseInt(options[delay] || delayData) || 200;
  38746. this[dismissible] = options[dismissible] || dismissibleData === 'true' ? true : false;
  38747. this[container] = containerElement ? containerElement
  38748. : containerDataElement ? containerDataElement
  38749. : navbarFixedTop ? navbarFixedTop
  38750. : navbarFixedBottom ? navbarFixedBottom
  38751. : modal ? modal : DOC[body];
  38752. // bind, content
  38753. var self = this,
  38754. titleString = element[getAttribute](dataTitle) || null,
  38755. contentString = element[getAttribute](dataContent) || null;
  38756. if ( !contentString && !this[template] ) return; // invalidate
  38757. // constants, vars
  38758. var popover = null, timer = 0, placementSetting = this[placement],
  38759. // handlers
  38760. dismissibleHandler = function(e) {
  38761. if (popover !== null && e[target] === queryElement('.close',popover)) {
  38762. self.hide();
  38763. }
  38764. },
  38765. // private methods
  38766. removePopover = function() {
  38767. self[container].removeChild(popover);
  38768. timer = null; popover = null;
  38769. },
  38770. createPopover = function() {
  38771. titleString = element[getAttribute](dataTitle); // check content again
  38772. contentString = element[getAttribute](dataContent);
  38773. popover = DOC[createElement](div);
  38774. // popover arrow
  38775. var popoverArrow = DOC[createElement](div);
  38776. popoverArrow[setAttribute](classString,'arrow');
  38777. popover[appendChild](popoverArrow);
  38778. if ( contentString !== null && self[template] === null ) { //create the popover from data attributes
  38779. popover[setAttribute]('role','tooltip');
  38780. if (titleString !== null) {
  38781. var popoverTitle = DOC[createElement]('h3');
  38782. popoverTitle[setAttribute](classString,component+'-header');
  38783. popoverTitle[innerHTML] = self[dismissible] ? titleString + closeBtn : titleString;
  38784. popover[appendChild](popoverTitle);
  38785. }
  38786. //set popover content
  38787. var popoverContent = DOC[createElement](div);
  38788. popoverContent[setAttribute](classString,component+'-body');
  38789. popoverContent[innerHTML] = self[dismissible] && titleString === null ? contentString + closeBtn : contentString;
  38790. popover[appendChild](popoverContent);
  38791. } else { // or create the popover from template
  38792. var popoverTemplate = DOC[createElement](div);
  38793. popoverTemplate[innerHTML] = self[template];
  38794. popover[innerHTML] = popoverTemplate.firstChild[innerHTML];
  38795. }
  38796. //append to the container
  38797. self[container][appendChild](popover);
  38798. popover[style].display = 'block';
  38799. popover[setAttribute](classString, component+ ' bs-' + component+'-'+placementSetting + ' ' + self[animation]);
  38800. },
  38801. showPopover = function () {
  38802. !hasClass(popover,showClass) && ( addClass(popover,showClass) );
  38803. },
  38804. updatePopover = function() {
  38805. styleTip(element,popover,placementSetting,self[container]);
  38806. },
  38807. // event toggle
  38808. dismissHandlerToggle = function(type){
  38809. if (clickEvent == self[trigger] || 'focus' == self[trigger]) {
  38810. !self[dismissible] && type( element, 'blur', self.hide );
  38811. }
  38812. self[dismissible] && type( DOC, clickEvent, dismissibleHandler );
  38813. type( globalObject, resizeEvent, self.hide );
  38814. },
  38815. // triggers
  38816. showTrigger = function() {
  38817. dismissHandlerToggle(on);
  38818. bootstrapCustomEvent.call(element, shownEvent, component);
  38819. },
  38820. hideTrigger = function() {
  38821. dismissHandlerToggle(off);
  38822. removePopover();
  38823. bootstrapCustomEvent.call(element, hiddenEvent, component);
  38824. };
  38825. // public methods / handlers
  38826. this.toggle = function() {
  38827. if (popover === null) { self.show(); }
  38828. else { self.hide(); }
  38829. };
  38830. this.show = function() {
  38831. clearTimeout(timer);
  38832. timer = setTimeout( function() {
  38833. if (popover === null) {
  38834. placementSetting = self[placement]; // we reset placement in all cases
  38835. createPopover();
  38836. updatePopover();
  38837. showPopover();
  38838. bootstrapCustomEvent.call(element, showEvent, component);
  38839. !!self[animation] ? emulateTransitionEnd(popover, showTrigger) : showTrigger();
  38840. }
  38841. }, 20 );
  38842. };
  38843. this.hide = function() {
  38844. clearTimeout(timer);
  38845. timer = setTimeout( function() {
  38846. if (popover && popover !== null && hasClass(popover,showClass)) {
  38847. bootstrapCustomEvent.call(element, hideEvent, component);
  38848. removeClass(popover,showClass);
  38849. !!self[animation] ? emulateTransitionEnd(popover, hideTrigger) : hideTrigger();
  38850. }
  38851. }, self[delay] );
  38852. };
  38853. // init
  38854. if ( !(stringPopover in element) ) { // prevent adding event handlers twice
  38855. if (self[trigger] === hoverEvent) {
  38856. on( element, mouseHover[0], self.show );
  38857. if (!self[dismissible]) { on( element, mouseHover[1], self.hide ); }
  38858. } else if (clickEvent == self[trigger] || 'focus' == self[trigger]) {
  38859. on( element, self[trigger], self.toggle );
  38860. }
  38861. }
  38862. element[stringPopover] = self;
  38863. };
  38864. // POPOVER DATA API
  38865. // ================
  38866. supports[push]( [ stringPopover, Popover, '['+dataToggle+'="popover"]' ] );
  38867. /* Native Javascript for Bootstrap 4 | ScrollSpy
  38868. -----------------------------------------------*/
  38869. // SCROLLSPY DEFINITION
  38870. // ====================
  38871. var ScrollSpy = function(element, options) {
  38872. // initialization element, the element we spy on
  38873. element = queryElement(element);
  38874. // DATA API
  38875. var targetData = queryElement(element[getAttribute](dataTarget)),
  38876. offsetData = element[getAttribute]('data-offset');
  38877. // set options
  38878. options = options || {};
  38879. if ( !options[target] && !targetData ) { return; } // invalidate
  38880. // event targets, constants
  38881. var self = this, spyTarget = options[target] && queryElement(options[target]) || targetData,
  38882. links = spyTarget && spyTarget[getElementsByTagName]('A'),
  38883. offset = parseInt(offsetData || options['offset']) || 10,
  38884. items = [], targetItems = [], scrollOffset,
  38885. scrollTarget = element[offsetHeight] < element[scrollHeight] ? element : globalObject, // determine which is the real scrollTarget
  38886. isWindow = scrollTarget === globalObject;
  38887. // populate items and targets
  38888. for (var i=0, il=links[length]; i<il; i++) {
  38889. var href = links[i][getAttribute]('href'),
  38890. targetItem = href && href.charAt(0) === '#' && href.slice(-1) !== '#' && queryElement(href);
  38891. if ( !!targetItem ) {
  38892. items[push](links[i]);
  38893. targetItems[push](targetItem);
  38894. }
  38895. }
  38896. // private methods
  38897. var updateItem = function(index) {
  38898. var item = items[index],
  38899. targetItem = targetItems[index], // the menu item targets this element
  38900. dropdown = item[parentNode][parentNode],
  38901. dropdownLink = hasClass(dropdown,'dropdown') && dropdown[getElementsByTagName]('A')[0],
  38902. targetRect = isWindow && targetItem[getBoundingClientRect](),
  38903. isActive = hasClass(item,active) || false,
  38904. topEdge = (isWindow ? targetRect[top] + scrollOffset : targetItem[offsetTop]) - offset,
  38905. bottomEdge = isWindow ? targetRect[bottom] + scrollOffset - offset : targetItems[index+1] ? targetItems[index+1][offsetTop] - offset : element[scrollHeight],
  38906. inside = scrollOffset >= topEdge && bottomEdge > scrollOffset;
  38907. if ( !isActive && inside ) {
  38908. if ( !hasClass(item,active) ) {
  38909. addClass(item,active);
  38910. if (dropdownLink && !hasClass(dropdownLink,active) ) {
  38911. addClass(dropdownLink,active);
  38912. }
  38913. bootstrapCustomEvent.call(element, 'activate', 'scrollspy', items[index]);
  38914. }
  38915. } else if ( !inside ) {
  38916. if ( hasClass(item,active) ) {
  38917. removeClass(item,active);
  38918. if (dropdownLink && hasClass(dropdownLink,active) && !getElementsByClassName(item[parentNode],active).length ) {
  38919. removeClass(dropdownLink,active);
  38920. }
  38921. }
  38922. } else if ( !inside && !isActive || isActive && inside ) {
  38923. return;
  38924. }
  38925. },
  38926. updateItems = function(){
  38927. scrollOffset = isWindow ? getScroll().y : element[scrollTop];
  38928. for (var index=0, itl=items[length]; index<itl; index++) {
  38929. updateItem(index)
  38930. }
  38931. };
  38932. // public method
  38933. this.refresh = function () {
  38934. updateItems();
  38935. }
  38936. // init
  38937. if ( !(stringScrollSpy in element) ) { // prevent adding event handlers twice
  38938. on( scrollTarget, scrollEvent, self.refresh );
  38939. on( globalObject, resizeEvent, self.refresh );
  38940. }
  38941. self.refresh();
  38942. element[stringScrollSpy] = self;
  38943. };
  38944. // SCROLLSPY DATA API
  38945. // ==================
  38946. supports[push]( [ stringScrollSpy, ScrollSpy, '['+dataSpy+'="scroll"]' ] );
  38947. /* Native Javascript for Bootstrap 4 | Tab
  38948. -----------------------------------------*/
  38949. // TAB DEFINITION
  38950. // ==============
  38951. var Tab = function( element, options ) {
  38952. // initialization element
  38953. element = queryElement(element);
  38954. // DATA API
  38955. var heightData = element[getAttribute](dataHeight),
  38956. // strings
  38957. component = 'tab', height = 'height', float = 'float', isAnimating = 'isAnimating';
  38958. // set options
  38959. options = options || {};
  38960. this[height] = supportTransitions ? (options[height] || heightData === 'true') : false;
  38961. // bind, event targets
  38962. var self = this, next,
  38963. tabs = getClosest(element,'.nav'),
  38964. tabsContentContainer = false,
  38965. dropdown = tabs && queryElement('.dropdown-toggle',tabs),
  38966. activeTab, activeContent, nextContent, containerHeight, equalContents, nextHeight,
  38967. // trigger
  38968. triggerEnd = function(){
  38969. tabsContentContainer[style][height] = '';
  38970. removeClass(tabsContentContainer,collapsing);
  38971. tabs[isAnimating] = false;
  38972. },
  38973. triggerShow = function() {
  38974. if (tabsContentContainer) { // height animation
  38975. if ( equalContents ) {
  38976. triggerEnd();
  38977. } else {
  38978. setTimeout(function(){ // enables height animation
  38979. tabsContentContainer[style][height] = nextHeight + 'px'; // height animation
  38980. tabsContentContainer[offsetWidth];
  38981. emulateTransitionEnd(tabsContentContainer, triggerEnd);
  38982. },1);
  38983. }
  38984. } else {
  38985. tabs[isAnimating] = false;
  38986. }
  38987. bootstrapCustomEvent.call(next, shownEvent, component, activeTab);
  38988. },
  38989. triggerHide = function() {
  38990. if (tabsContentContainer) {
  38991. activeContent[style][float] = left;
  38992. nextContent[style][float] = left;
  38993. containerHeight = activeContent[scrollHeight];
  38994. }
  38995. addClass(nextContent,active);
  38996. bootstrapCustomEvent.call(next, showEvent, component, activeTab);
  38997. removeClass(activeContent,active);
  38998. bootstrapCustomEvent.call(activeTab, hiddenEvent, component, next);
  38999. if (tabsContentContainer) {
  39000. nextHeight = nextContent[scrollHeight];
  39001. equalContents = nextHeight === containerHeight;
  39002. addClass(tabsContentContainer,collapsing);
  39003. tabsContentContainer[style][height] = containerHeight + 'px'; // height animation
  39004. tabsContentContainer[offsetHeight];
  39005. activeContent[style][float] = '';
  39006. nextContent[style][float] = '';
  39007. }
  39008. if ( hasClass(nextContent, 'fade') ) {
  39009. setTimeout(function(){
  39010. addClass(nextContent,showClass);
  39011. emulateTransitionEnd(nextContent,triggerShow);
  39012. },20);
  39013. } else { triggerShow(); }
  39014. };
  39015. if (!tabs) return; // invalidate
  39016. // set default animation state
  39017. tabs[isAnimating] = false;
  39018. // private methods
  39019. var getActiveTab = function() {
  39020. var activeTabs = getElementsByClassName(tabs,active), activeTab;
  39021. if ( activeTabs[length] === 1 && !hasClass(activeTabs[0][parentNode],'dropdown') ) {
  39022. activeTab = activeTabs[0];
  39023. } else if ( activeTabs[length] > 1 ) {
  39024. activeTab = activeTabs[activeTabs[length]-1];
  39025. }
  39026. return activeTab;
  39027. },
  39028. getActiveContent = function() {
  39029. return queryElement(getActiveTab()[getAttribute]('href'));
  39030. },
  39031. // handler
  39032. clickHandler = function(e) {
  39033. var href = e[target][getAttribute]('href');
  39034. e[preventDefault]();
  39035. next = e[target][getAttribute](dataToggle) === component || (href && href.charAt(0) === '#')
  39036. ? e[target] : e[target][parentNode]; // allow for child elements like icons to use the handler
  39037. !tabs[isAnimating] && !hasClass(next[parentNode],active) && self.show();
  39038. };
  39039. // public method
  39040. this.show = function() { // the tab we clicked is now the next tab
  39041. next = next || element;
  39042. nextContent = queryElement(next[getAttribute]('href')); //this is the actual object, the next tab content to activate
  39043. activeTab = getActiveTab();
  39044. activeContent = getActiveContent();
  39045. tabs[isAnimating] = true;
  39046. removeClass(activeTab,active);
  39047. addClass(next,active);
  39048. if ( dropdown ) {
  39049. if ( !hasClass(element[parentNode],'dropdown-menu') ) {
  39050. if (hasClass(dropdown,active)) removeClass(dropdown,active);
  39051. } else {
  39052. if (!hasClass(dropdown,active)) addClass(dropdown,active);
  39053. }
  39054. }
  39055. bootstrapCustomEvent.call(activeTab, hideEvent, component, next);
  39056. if (hasClass(activeContent, 'fade')) {
  39057. removeClass(activeContent,showClass);
  39058. emulateTransitionEnd(activeContent, triggerHide);
  39059. } else { triggerHide(); }
  39060. };
  39061. // init
  39062. if ( !(stringTab in element) ) { // prevent adding event handlers twice
  39063. on(element, clickEvent, clickHandler);
  39064. }
  39065. if (self[height]) { tabsContentContainer = getActiveContent()[parentNode]; }
  39066. element[stringTab] = self;
  39067. };
  39068. // TAB DATA API
  39069. // ============
  39070. supports[push]( [ stringTab, Tab, '['+dataToggle+'="tab"]' ] );
  39071. /* Native Javascript for Bootstrap 4 | Tooltip
  39072. ---------------------------------------------*/
  39073. // TOOLTIP DEFINITION
  39074. // ==================
  39075. var Tooltip = function( element,options ) {
  39076. // initialization element
  39077. element = queryElement(element);
  39078. // set options
  39079. options = options || {};
  39080. // DATA API
  39081. var animationData = element[getAttribute](dataAnimation),
  39082. placementData = element[getAttribute](dataPlacement),
  39083. delayData = element[getAttribute](dataDelay),
  39084. containerData = element[getAttribute](dataContainer),
  39085. // strings
  39086. component = 'tooltip',
  39087. classString = 'class',
  39088. title = 'title',
  39089. fade = 'fade',
  39090. div = 'div',
  39091. // check container
  39092. containerElement = queryElement(options[container]),
  39093. containerDataElement = queryElement(containerData),
  39094. // maybe the element is inside a modal
  39095. modal = getClosest(element,'.modal'),
  39096. // maybe the element is inside a fixed navbar
  39097. navbarFixedTop = getClosest(element,'.'+fixedTop),
  39098. navbarFixedBottom = getClosest(element,'.'+fixedBottom);
  39099. // set instance options
  39100. this[animation] = options[animation] && options[animation] !== fade ? options[animation] : animationData || fade;
  39101. this[placement] = options[placement] ? options[placement] : placementData || top;
  39102. this[delay] = parseInt(options[delay] || delayData) || 200;
  39103. this[container] = containerElement ? containerElement
  39104. : containerDataElement ? containerDataElement
  39105. : navbarFixedTop ? navbarFixedTop
  39106. : navbarFixedBottom ? navbarFixedBottom
  39107. : modal ? modal : DOC[body];
  39108. // bind, event targets, title and constants
  39109. var self = this, timer = 0, placementSetting = this[placement], tooltip = null,
  39110. titleString = element[getAttribute](title) || element[getAttribute](dataTitle) || element[getAttribute](dataOriginalTitle);
  39111. if ( !titleString || titleString == "" ) return; // invalidate
  39112. // private methods
  39113. var removeToolTip = function() {
  39114. self[container].removeChild(tooltip);
  39115. tooltip = null; timer = null;
  39116. },
  39117. createToolTip = function() {
  39118. titleString = element[getAttribute](title) || element[getAttribute](dataTitle) || element[getAttribute](dataOriginalTitle); // read the title again
  39119. if ( !titleString || titleString == "" ) return false; // invalidate
  39120. tooltip = DOC[createElement](div);
  39121. tooltip[setAttribute]('role',component);
  39122. // tooltip arrow
  39123. var tooltipArrow = DOC[createElement](div);
  39124. tooltipArrow[setAttribute](classString,'arrow');
  39125. tooltip[appendChild](tooltipArrow);
  39126. var tooltipInner = DOC[createElement](div);
  39127. tooltipInner[setAttribute](classString,component+'-inner');
  39128. tooltip[appendChild](tooltipInner);
  39129. tooltipInner[innerHTML] = titleString;
  39130. self[container][appendChild](tooltip);
  39131. tooltip[setAttribute](classString, component + ' bs-' + component+'-'+placementSetting + ' ' + self[animation]);
  39132. },
  39133. updateTooltip = function () {
  39134. styleTip(element,tooltip,placementSetting,self[container]);
  39135. },
  39136. showTooltip = function () {
  39137. !hasClass(tooltip,showClass) && ( addClass(tooltip,showClass) );
  39138. },
  39139. // triggers
  39140. showTrigger = function() {
  39141. on( globalObject, resizeEvent, self.hide );
  39142. bootstrapCustomEvent.call(element, shownEvent, component);
  39143. },
  39144. hideTrigger = function() {
  39145. off( globalObject, resizeEvent, self.hide );
  39146. removeToolTip();
  39147. bootstrapCustomEvent.call(element, hiddenEvent, component);
  39148. };
  39149. // public methods
  39150. this.show = function() {
  39151. clearTimeout(timer);
  39152. timer = setTimeout( function() {
  39153. if (tooltip === null) {
  39154. placementSetting = self[placement]; // we reset placement in all cases
  39155. if(createToolTip() == false) return;
  39156. updateTooltip();
  39157. showTooltip();
  39158. bootstrapCustomEvent.call(element, showEvent, component);
  39159. !!self[animation] ? emulateTransitionEnd(tooltip, showTrigger) : showTrigger();
  39160. }
  39161. }, 20 );
  39162. };
  39163. this.hide = function() {
  39164. clearTimeout(timer);
  39165. timer = setTimeout( function() {
  39166. if (tooltip && hasClass(tooltip,showClass)) {
  39167. bootstrapCustomEvent.call(element, hideEvent, component);
  39168. removeClass(tooltip,showClass);
  39169. !!self[animation] ? emulateTransitionEnd(tooltip, hideTrigger) : hideTrigger();
  39170. }
  39171. }, self[delay]);
  39172. };
  39173. this.toggle = function() {
  39174. if (!tooltip) { self.show(); }
  39175. else { self.hide(); }
  39176. };
  39177. // init
  39178. if ( !(stringTooltip in element) ) { // prevent adding event handlers twice
  39179. element[setAttribute](dataOriginalTitle,titleString);
  39180. element.removeAttribute(title);
  39181. on(element, mouseHover[0], self.show);
  39182. on(element, mouseHover[1], self.hide);
  39183. }
  39184. element[stringTooltip] = self;
  39185. };
  39186. // TOOLTIP DATA API
  39187. // =================
  39188. supports[push]( [ stringTooltip, Tooltip, '['+dataToggle+'="tooltip"]' ] );
  39189. /* Native Javascript for Bootstrap 4 | Initialize Data API
  39190. --------------------------------------------------------*/
  39191. var initializeDataAPI = function( constructor, collection ){
  39192. for (var i=0, l=collection[length]; i<l; i++) {
  39193. new constructor(collection[i]);
  39194. }
  39195. },
  39196. initCallback = BSN.initCallback = function(lookUp){
  39197. lookUp = lookUp || DOC;
  39198. for (var i=0, l=supports[length]; i<l; i++) {
  39199. initializeDataAPI( supports[i][1], lookUp[querySelectorAll] (supports[i][2]) );
  39200. }
  39201. };
  39202. // bulk initialize all components
  39203. DOC[body] ? initCallback() : on( DOC, 'DOMContentLoaded', function(){ initCallback(); } );
  39204. return {
  39205. Alert: Alert,
  39206. Button: Button,
  39207. Carousel: Carousel,
  39208. Collapse: Collapse,
  39209. Dropdown: Dropdown,
  39210. Modal: Modal,
  39211. Popover: Popover,
  39212. ScrollSpy: ScrollSpy,
  39213. Tab: Tab,
  39214. Tooltip: Tooltip
  39215. };
  39216. }));
  39217. /* jshint maxerr: 10000 */
  39218. /* jslint unused: true */
  39219. /* jshint shadow: true */
  39220. /* jshint -W075 */
  39221. (function(ns){
  39222. // this list must be ordered from largest length of the value array, index 0, to the shortest
  39223. ns.emojioneList = {":kiss_mm:":{"uc_base":"1f468-2764-1f48b-1f468","uc_output":"1f468-200d-2764-fe0f-200d-1f48b-200d-1f468","uc_match":"1f468-2764-fe0f-1f48b-1f468","uc_greedy":"1f468-2764-1f48b-1f468","shortnames":[":couplekiss_mm:"],"category":"people"},":kiss_woman_man:":{"uc_base":"1f469-2764-1f48b-1f468","uc_output":"1f469-200d-2764-fe0f-200d-1f48b-200d-1f468","uc_match":"1f469-2764-fe0f-1f48b-1f468","uc_greedy":"1f469-2764-1f48b-1f468","shortnames":[],"category":"people"},":kiss_ww:":{"uc_base":"1f469-2764-1f48b-1f469","uc_output":"1f469-200d-2764-fe0f-200d-1f48b-200d-1f469","uc_match":"1f469-2764-fe0f-1f48b-1f469","uc_greedy":"1f469-2764-1f48b-1f469","shortnames":[":couplekiss_ww:"],"category":"people"},":england:":{"uc_base":"1f3f4-e0067-e0062-e0065-e006e-e0067-e007f","uc_output":"1f3f4-e0067-e0062-e0065-e006e-e0067-e007f","uc_match":"1f3f4-e0067-e0062-e0065-e006e-e0067-e007f","uc_greedy":"1f3f4-e0067-e0062-e0065-e006e-e0067-e007f","shortnames":[],"category":"flags"},":scotland:":{"uc_base":"1f3f4-e0067-e0062-e0073-e0063-e0074-e007f","uc_output":"1f3f4-e0067-e0062-e0073-e0063-e0074-e007f","uc_match":"1f3f4-e0067-e0062-e0073-e0063-e0074-e007f","uc_greedy":"1f3f4-e0067-e0062-e0073-e0063-e0074-e007f","shortnames":[],"category":"flags"},":wales:":{"uc_base":"1f3f4-e0067-e0062-e0077-e006c-e0073-e007f","uc_output":"1f3f4-e0067-e0062-e0077-e006c-e0073-e007f","uc_match":"1f3f4-e0067-e0062-e0077-e006c-e0073-e007f","uc_greedy":"1f3f4-e0067-e0062-e0077-e006c-e0073-e007f","shortnames":[],"category":"flags"},":family_mmbb:":{"uc_base":"1f468-1f468-1f466-1f466","uc_output":"1f468-200d-1f468-200d-1f466-200d-1f466","uc_match":"1f468-1f468-1f466-1f466","uc_greedy":"1f468-1f468-1f466-1f466","shortnames":[],"category":"people"},":family_mmgb:":{"uc_base":"1f468-1f468-1f467-1f466","uc_output":"1f468-200d-1f468-200d-1f467-200d-1f466","uc_match":"1f468-1f468-1f467-1f466","uc_greedy":"1f468-1f468-1f467-1f466","shortnames":[],"category":"people"},":family_mmgg:":{"uc_base":"1f468-1f468-1f467-1f467","uc_output":"1f468-200d-1f468-200d-1f467-200d-1f467","uc_match":"1f468-1f468-1f467-1f467","uc_greedy":"1f468-1f468-1f467-1f467","shortnames":[],"category":"people"},":family_mwbb:":{"uc_base":"1f468-1f469-1f466-1f466","uc_output":"1f468-200d-1f469-200d-1f466-200d-1f466","uc_match":"1f468-1f469-1f466-1f466","uc_greedy":"1f468-1f469-1f466-1f466","shortnames":[],"category":"people"},":family_mwgb:":{"uc_base":"1f468-1f469-1f467-1f466","uc_output":"1f468-200d-1f469-200d-1f467-200d-1f466","uc_match":"1f468-1f469-1f467-1f466","uc_greedy":"1f468-1f469-1f467-1f466","shortnames":[],"category":"people"},":family_mwgg:":{"uc_base":"1f468-1f469-1f467-1f467","uc_output":"1f468-200d-1f469-200d-1f467-200d-1f467","uc_match":"1f468-1f469-1f467-1f467","uc_greedy":"1f468-1f469-1f467-1f467","shortnames":[],"category":"people"},":family_wwbb:":{"uc_base":"1f469-1f469-1f466-1f466","uc_output":"1f469-200d-1f469-200d-1f466-200d-1f466","uc_match":"1f469-1f469-1f466-1f466","uc_greedy":"1f469-1f469-1f466-1f466","shortnames":[],"category":"people"},":family_wwgb:":{"uc_base":"1f469-1f469-1f467-1f466","uc_output":"1f469-200d-1f469-200d-1f467-200d-1f466","uc_match":"1f469-1f469-1f467-1f466","uc_greedy":"1f469-1f469-1f467-1f466","shortnames":[],"category":"people"},":family_wwgg:":{"uc_base":"1f469-1f469-1f467-1f467","uc_output":"1f469-200d-1f469-200d-1f467-200d-1f467","uc_match":"1f469-1f469-1f467-1f467","uc_greedy":"1f469-1f469-1f467-1f467","shortnames":[],"category":"people"},":couple_mm:":{"uc_base":"1f468-2764-1f468","uc_output":"1f468-200d-2764-fe0f-200d-1f468","uc_match":"1f468-2764-fe0f-1f468","uc_greedy":"1f468-2764-1f468","shortnames":[":couple_with_heart_mm:"],"category":"people"},":couple_with_heart_woman_man:":{"uc_base":"1f469-2764-1f468","uc_output":"1f469-200d-2764-fe0f-200d-1f468","uc_match":"1f469-2764-fe0f-1f468","uc_greedy":"1f469-2764-1f468","shortnames":[],"category":"people"},":couple_ww:":{"uc_base":"1f469-2764-1f469","uc_output":"1f469-200d-2764-fe0f-200d-1f469","uc_match":"1f469-2764-fe0f-1f469","uc_greedy":"1f469-2764-1f469","shortnames":[":couple_with_heart_ww:"],"category":"people"},":family_man_boy_boy:":{"uc_base":"1f468-1f466-1f466","uc_output":"1f468-200d-1f466-200d-1f466","uc_match":"1f468-1f466-1f466","uc_greedy":"1f468-1f466-1f466","shortnames":[],"category":"people"},":family_man_girl_boy:":{"uc_base":"1f468-1f467-1f466","uc_output":"1f468-200d-1f467-200d-1f466","uc_match":"1f468-1f467-1f466","uc_greedy":"1f468-1f467-1f466","shortnames":[],"category":"people"},":family_man_girl_girl:":{"uc_base":"1f468-1f467-1f467","uc_output":"1f468-200d-1f467-200d-1f467","uc_match":"1f468-1f467-1f467","uc_greedy":"1f468-1f467-1f467","shortnames":[],"category":"people"},":family_man_woman_boy:":{"uc_base":"1f468-1f469-1f466","uc_output":"1f468-200d-1f469-200d-1f466","uc_match":"1f468-1f469-1f466","uc_greedy":"1f468-1f469-1f466","shortnames":[],"category":"people"},":family_mmb:":{"uc_base":"1f468-1f468-1f466","uc_output":"1f468-200d-1f468-200d-1f466","uc_match":"1f468-1f468-1f466","uc_greedy":"1f468-1f468-1f466","shortnames":[],"category":"people"},":family_mmg:":{"uc_base":"1f468-1f468-1f467","uc_output":"1f468-200d-1f468-200d-1f467","uc_match":"1f468-1f468-1f467","uc_greedy":"1f468-1f468-1f467","shortnames":[],"category":"people"},":family_mwg:":{"uc_base":"1f468-1f469-1f467","uc_output":"1f468-200d-1f469-200d-1f467","uc_match":"1f468-1f469-1f467","uc_greedy":"1f468-1f469-1f467","shortnames":[],"category":"people"},":family_woman_boy_boy:":{"uc_base":"1f469-1f466-1f466","uc_output":"1f469-200d-1f466-200d-1f466","uc_match":"1f469-1f466-1f466","uc_greedy":"1f469-1f466-1f466","shortnames":[],"category":"people"},":family_woman_girl_boy:":{"uc_base":"1f469-1f467-1f466","uc_output":"1f469-200d-1f467-200d-1f466","uc_match":"1f469-1f467-1f466","uc_greedy":"1f469-1f467-1f466","shortnames":[],"category":"people"},":family_woman_girl_girl:":{"uc_base":"1f469-1f467-1f467","uc_output":"1f469-200d-1f467-200d-1f467","uc_match":"1f469-1f467-1f467","uc_greedy":"1f469-1f467-1f467","shortnames":[],"category":"people"},":family_wwb:":{"uc_base":"1f469-1f469-1f466","uc_output":"1f469-200d-1f469-200d-1f466","uc_match":"1f469-1f469-1f466","uc_greedy":"1f469-1f469-1f466","shortnames":[],"category":"people"},":family_wwg:":{"uc_base":"1f469-1f469-1f467","uc_output":"1f469-200d-1f469-200d-1f467","uc_match":"1f469-1f469-1f467","uc_greedy":"1f469-1f469-1f467","shortnames":[],"category":"people"},":blond-haired_man_tone1:":{"uc_base":"1f471-1f3fb-2642","uc_output":"1f471-1f3fb-200d-2642-fe0f","uc_match":"1f471-1f3fb-2642-fe0f","uc_greedy":"1f471-1f3fb-2642","shortnames":[":blond-haired_man_light_skin_tone:"],"category":"people"},":blond-haired_man_tone2:":{"uc_base":"1f471-1f3fc-2642","uc_output":"1f471-1f3fc-200d-2642-fe0f","uc_match":"1f471-1f3fc-2642-fe0f","uc_greedy":"1f471-1f3fc-2642","shortnames":[":blond-haired_man_medium_light_skin_tone:"],"category":"people"},":blond-haired_man_tone3:":{"uc_base":"1f471-1f3fd-2642","uc_output":"1f471-1f3fd-200d-2642-fe0f","uc_match":"1f471-1f3fd-2642-fe0f","uc_greedy":"1f471-1f3fd-2642","shortnames":[":blond-haired_man_medium_skin_tone:"],"category":"people"},":blond-haired_man_tone4:":{"uc_base":"1f471-1f3fe-2642","uc_output":"1f471-1f3fe-200d-2642-fe0f","uc_match":"1f471-1f3fe-2642-fe0f","uc_greedy":"1f471-1f3fe-2642","shortnames":[":blond-haired_man_medium_dark_skin_tone:"],"category":"people"},":blond-haired_man_tone5:":{"uc_base":"1f471-1f3ff-2642","uc_output":"1f471-1f3ff-200d-2642-fe0f","uc_match":"1f471-1f3ff-2642-fe0f","uc_greedy":"1f471-1f3ff-2642","shortnames":[":blond-haired_man_dark_skin_tone:"],"category":"people"},":blond-haired_woman_tone1:":{"uc_base":"1f471-1f3fb-2640","uc_output":"1f471-1f3fb-200d-2640-fe0f","uc_match":"1f471-1f3fb-2640-fe0f","uc_greedy":"1f471-1f3fb-2640","shortnames":[":blond-haired_woman_light_skin_tone:"],"category":"people"},":blond-haired_woman_tone2:":{"uc_base":"1f471-1f3fc-2640","uc_output":"1f471-1f3fc-200d-2640-fe0f","uc_match":"1f471-1f3fc-2640-fe0f","uc_greedy":"1f471-1f3fc-2640","shortnames":[":blond-haired_woman_medium_light_skin_tone:"],"category":"people"},":blond-haired_woman_tone3:":{"uc_base":"1f471-1f3fd-2640","uc_output":"1f471-1f3fd-200d-2640-fe0f","uc_match":"1f471-1f3fd-2640-fe0f","uc_greedy":"1f471-1f3fd-2640","shortnames":[":blond-haired_woman_medium_skin_tone:"],"category":"people"},":blond-haired_woman_tone4:":{"uc_base":"1f471-1f3fe-2640","uc_output":"1f471-1f3fe-200d-2640-fe0f","uc_match":"1f471-1f3fe-2640-fe0f","uc_greedy":"1f471-1f3fe-2640","shortnames":[":blond-haired_woman_medium_dark_skin_tone:"],"category":"people"},":blond-haired_woman_tone5:":{"uc_base":"1f471-1f3ff-2640","uc_output":"1f471-1f3ff-200d-2640-fe0f","uc_match":"1f471-1f3ff-2640-fe0f","uc_greedy":"1f471-1f3ff-2640","shortnames":[":blond-haired_woman_dark_skin_tone:"],"category":"people"},":eye_in_speech_bubble:":{"uc_base":"1f441-1f5e8","uc_output":"1f441-fe0f-200d-1f5e8-fe0f","uc_match":"1f441-fe0f-1f5e8-fe0f","uc_greedy":"1f441-1f5e8","shortnames":[],"category":"symbols"},":man_biking_tone1:":{"uc_base":"1f6b4-1f3fb-2642","uc_output":"1f6b4-1f3fb-200d-2642-fe0f","uc_match":"1f6b4-1f3fb-2642-fe0f","uc_greedy":"1f6b4-1f3fb-2642","shortnames":[":man_biking_light_skin_tone:"],"category":"activity"},":man_biking_tone2:":{"uc_base":"1f6b4-1f3fc-2642","uc_output":"1f6b4-1f3fc-200d-2642-fe0f","uc_match":"1f6b4-1f3fc-2642-fe0f","uc_greedy":"1f6b4-1f3fc-2642","shortnames":[":man_biking_medium_light_skin_tone:"],"category":"activity"},":man_biking_tone3:":{"uc_base":"1f6b4-1f3fd-2642","uc_output":"1f6b4-1f3fd-200d-2642-fe0f","uc_match":"1f6b4-1f3fd-2642-fe0f","uc_greedy":"1f6b4-1f3fd-2642","shortnames":[":man_biking_medium_skin_tone:"],"category":"activity"},":man_biking_tone4:":{"uc_base":"1f6b4-1f3fe-2642","uc_output":"1f6b4-1f3fe-200d-2642-fe0f","uc_match":"1f6b4-1f3fe-2642-fe0f","uc_greedy":"1f6b4-1f3fe-2642","shortnames":[":man_biking_medium_dark_skin_tone:"],"category":"activity"},":man_biking_tone5:":{"uc_base":"1f6b4-1f3ff-2642","uc_output":"1f6b4-1f3ff-200d-2642-fe0f","uc_match":"1f6b4-1f3ff-2642-fe0f","uc_greedy":"1f6b4-1f3ff-2642","shortnames":[":man_biking_dark_skin_tone:"],"category":"activity"},":man_bowing_tone1:":{"uc_base":"1f647-1f3fb-2642","uc_output":"1f647-1f3fb-200d-2642-fe0f","uc_match":"1f647-1f3fb-2642-fe0f","uc_greedy":"1f647-1f3fb-2642","shortnames":[":man_bowing_light_skin_tone:"],"category":"people"},":man_bowing_tone2:":{"uc_base":"1f647-1f3fc-2642","uc_output":"1f647-1f3fc-200d-2642-fe0f","uc_match":"1f647-1f3fc-2642-fe0f","uc_greedy":"1f647-1f3fc-2642","shortnames":[":man_bowing_medium_light_skin_tone:"],"category":"people"},":man_bowing_tone3:":{"uc_base":"1f647-1f3fd-2642","uc_output":"1f647-1f3fd-200d-2642-fe0f","uc_match":"1f647-1f3fd-2642-fe0f","uc_greedy":"1f647-1f3fd-2642","shortnames":[":man_bowing_medium_skin_tone:"],"category":"people"},":man_bowing_tone4:":{"uc_base":"1f647-1f3fe-2642","uc_output":"1f647-1f3fe-200d-2642-fe0f","uc_match":"1f647-1f3fe-2642-fe0f","uc_greedy":"1f647-1f3fe-2642","shortnames":[":man_bowing_medium_dark_skin_tone:"],"category":"people"},":man_bowing_tone5:":{"uc_base":"1f647-1f3ff-2642","uc_output":"1f647-1f3ff-200d-2642-fe0f","uc_match":"1f647-1f3ff-2642-fe0f","uc_greedy":"1f647-1f3ff-2642","shortnames":[":man_bowing_dark_skin_tone:"],"category":"people"},":man_cartwheeling_tone1:":{"uc_base":"1f938-1f3fb-2642","uc_output":"1f938-1f3fb-200d-2642-fe0f","uc_match":"1f938-1f3fb-2642-fe0f","uc_greedy":"1f938-1f3fb-2642","shortnames":[":man_cartwheeling_light_skin_tone:"],"category":"activity"},":man_cartwheeling_tone2:":{"uc_base":"1f938-1f3fc-2642","uc_output":"1f938-1f3fc-200d-2642-fe0f","uc_match":"1f938-1f3fc-2642-fe0f","uc_greedy":"1f938-1f3fc-2642","shortnames":[":man_cartwheeling_medium_light_skin_tone:"],"category":"activity"},":man_cartwheeling_tone3:":{"uc_base":"1f938-1f3fd-2642","uc_output":"1f938-1f3fd-200d-2642-fe0f","uc_match":"1f938-1f3fd-2642-fe0f","uc_greedy":"1f938-1f3fd-2642","shortnames":[":man_cartwheeling_medium_skin_tone:"],"category":"activity"},":man_cartwheeling_tone4:":{"uc_base":"1f938-1f3fe-2642","uc_output":"1f938-1f3fe-200d-2642-fe0f","uc_match":"1f938-1f3fe-2642-fe0f","uc_greedy":"1f938-1f3fe-2642","shortnames":[":man_cartwheeling_medium_dark_skin_tone:"],"category":"activity"},":man_cartwheeling_tone5:":{"uc_base":"1f938-1f3ff-2642","uc_output":"1f938-1f3ff-200d-2642-fe0f","uc_match":"1f938-1f3ff-2642-fe0f","uc_greedy":"1f938-1f3ff-2642","shortnames":[":man_cartwheeling_dark_skin_tone:"],"category":"activity"},":man_climbing_tone1:":{"uc_base":"1f9d7-1f3fb-2642","uc_output":"1f9d7-1f3fb-200d-2642-fe0f","uc_match":"1f9d7-1f3fb-2642-fe0f","uc_greedy":"1f9d7-1f3fb-2642","shortnames":[":man_climbing_light_skin_tone:"],"category":"activity"},":man_climbing_tone2:":{"uc_base":"1f9d7-1f3fc-2642","uc_output":"1f9d7-1f3fc-200d-2642-fe0f","uc_match":"1f9d7-1f3fc-2642-fe0f","uc_greedy":"1f9d7-1f3fc-2642","shortnames":[":man_climbing_medium_light_skin_tone:"],"category":"activity"},":man_climbing_tone3:":{"uc_base":"1f9d7-1f3fd-2642","uc_output":"1f9d7-1f3fd-200d-2642-fe0f","uc_match":"1f9d7-1f3fd-2642-fe0f","uc_greedy":"1f9d7-1f3fd-2642","shortnames":[":man_climbing_medium_skin_tone:"],"category":"activity"},":man_climbing_tone4:":{"uc_base":"1f9d7-1f3fe-2642","uc_output":"1f9d7-1f3fe-200d-2642-fe0f","uc_match":"1f9d7-1f3fe-2642-fe0f","uc_greedy":"1f9d7-1f3fe-2642","shortnames":[":man_climbing_medium_dark_skin_tone:"],"category":"activity"},":man_climbing_tone5:":{"uc_base":"1f9d7-1f3ff-2642","uc_output":"1f9d7-1f3ff-200d-2642-fe0f","uc_match":"1f9d7-1f3ff-2642-fe0f","uc_greedy":"1f9d7-1f3ff-2642","shortnames":[":man_climbing_dark_skin_tone:"],"category":"activity"},":man_construction_worker_tone1:":{"uc_base":"1f477-1f3fb-2642","uc_output":"1f477-1f3fb-200d-2642-fe0f","uc_match":"1f477-1f3fb-2642-fe0f","uc_greedy":"1f477-1f3fb-2642","shortnames":[":man_construction_worker_light_skin_tone:"],"category":"people"},":man_construction_worker_tone2:":{"uc_base":"1f477-1f3fc-2642","uc_output":"1f477-1f3fc-200d-2642-fe0f","uc_match":"1f477-1f3fc-2642-fe0f","uc_greedy":"1f477-1f3fc-2642","shortnames":[":man_construction_worker_medium_light_skin_tone:"],"category":"people"},":man_construction_worker_tone3:":{"uc_base":"1f477-1f3fd-2642","uc_output":"1f477-1f3fd-200d-2642-fe0f","uc_match":"1f477-1f3fd-2642-fe0f","uc_greedy":"1f477-1f3fd-2642","shortnames":[":man_construction_worker_medium_skin_tone:"],"category":"people"},":man_construction_worker_tone4:":{"uc_base":"1f477-1f3fe-2642","uc_output":"1f477-1f3fe-200d-2642-fe0f","uc_match":"1f477-1f3fe-2642-fe0f","uc_greedy":"1f477-1f3fe-2642","shortnames":[":man_construction_worker_medium_dark_skin_tone:"],"category":"people"},":man_construction_worker_tone5:":{"uc_base":"1f477-1f3ff-2642","uc_output":"1f477-1f3ff-200d-2642-fe0f","uc_match":"1f477-1f3ff-2642-fe0f","uc_greedy":"1f477-1f3ff-2642","shortnames":[":man_construction_worker_dark_skin_tone:"],"category":"people"},":man_detective_tone1:":{"uc_base":"1f575-1f3fb-2642","uc_output":"1f575-1f3fb-200d-2642-fe0f","uc_match":"1f575-fe0f-1f3fb-2642-fe0f","uc_greedy":"1f575-1f3fb-2642","shortnames":[":man_detective_light_skin_tone:"],"category":"people"},":man_detective_tone2:":{"uc_base":"1f575-1f3fc-2642","uc_output":"1f575-1f3fc-200d-2642-fe0f","uc_match":"1f575-fe0f-1f3fc-2642-fe0f","uc_greedy":"1f575-1f3fc-2642","shortnames":[":man_detective_medium_light_skin_tone:"],"category":"people"},":man_detective_tone3:":{"uc_base":"1f575-1f3fd-2642","uc_output":"1f575-1f3fd-200d-2642-fe0f","uc_match":"1f575-fe0f-1f3fd-2642-fe0f","uc_greedy":"1f575-1f3fd-2642","shortnames":[":man_detective_medium_skin_tone:"],"category":"people"},":man_detective_tone4:":{"uc_base":"1f575-1f3fe-2642","uc_output":"1f575-1f3fe-200d-2642-fe0f","uc_match":"1f575-fe0f-1f3fe-2642-fe0f","uc_greedy":"1f575-1f3fe-2642","shortnames":[":man_detective_medium_dark_skin_tone:"],"category":"people"},":man_detective_tone5:":{"uc_base":"1f575-1f3ff-2642","uc_output":"1f575-1f3ff-200d-2642-fe0f","uc_match":"1f575-fe0f-1f3ff-2642-fe0f","uc_greedy":"1f575-1f3ff-2642","shortnames":[":man_detective_dark_skin_tone:"],"category":"people"},":man_elf_tone1:":{"uc_base":"1f9dd-1f3fb-2642","uc_output":"1f9dd-1f3fb-200d-2642-fe0f","uc_match":"1f9dd-1f3fb-2642-fe0f","uc_greedy":"1f9dd-1f3fb-2642","shortnames":[":man_elf_light_skin_tone:"],"category":"people"},":man_elf_tone2:":{"uc_base":"1f9dd-1f3fc-2642","uc_output":"1f9dd-1f3fc-200d-2642-fe0f","uc_match":"1f9dd-1f3fc-2642-fe0f","uc_greedy":"1f9dd-1f3fc-2642","shortnames":[":man_elf_medium_light_skin_tone:"],"category":"people"},":man_elf_tone3:":{"uc_base":"1f9dd-1f3fd-2642","uc_output":"1f9dd-1f3fd-200d-2642-fe0f","uc_match":"1f9dd-1f3fd-2642-fe0f","uc_greedy":"1f9dd-1f3fd-2642","shortnames":[":man_elf_medium_skin_tone:"],"category":"people"},":man_elf_tone4:":{"uc_base":"1f9dd-1f3fe-2642","uc_output":"1f9dd-1f3fe-200d-2642-fe0f","uc_match":"1f9dd-1f3fe-2642-fe0f","uc_greedy":"1f9dd-1f3fe-2642","shortnames":[":man_elf_medium_dark_skin_tone:"],"category":"people"},":man_elf_tone5:":{"uc_base":"1f9dd-1f3ff-2642","uc_output":"1f9dd-1f3ff-200d-2642-fe0f","uc_match":"1f9dd-1f3ff-2642-fe0f","uc_greedy":"1f9dd-1f3ff-2642","shortnames":[":man_elf_dark_skin_tone:"],"category":"people"},":man_facepalming_tone1:":{"uc_base":"1f926-1f3fb-2642","uc_output":"1f926-1f3fb-200d-2642-fe0f","uc_match":"1f926-1f3fb-2642-fe0f","uc_greedy":"1f926-1f3fb-2642","shortnames":[":man_facepalming_light_skin_tone:"],"category":"people"},":man_facepalming_tone2:":{"uc_base":"1f926-1f3fc-2642","uc_output":"1f926-1f3fc-200d-2642-fe0f","uc_match":"1f926-1f3fc-2642-fe0f","uc_greedy":"1f926-1f3fc-2642","shortnames":[":man_facepalming_medium_light_skin_tone:"],"category":"people"},":man_facepalming_tone3:":{"uc_base":"1f926-1f3fd-2642","uc_output":"1f926-1f3fd-200d-2642-fe0f","uc_match":"1f926-1f3fd-2642-fe0f","uc_greedy":"1f926-1f3fd-2642","shortnames":[":man_facepalming_medium_skin_tone:"],"category":"people"},":man_facepalming_tone4:":{"uc_base":"1f926-1f3fe-2642","uc_output":"1f926-1f3fe-200d-2642-fe0f","uc_match":"1f926-1f3fe-2642-fe0f","uc_greedy":"1f926-1f3fe-2642","shortnames":[":man_facepalming_medium_dark_skin_tone:"],"category":"people"},":man_facepalming_tone5:":{"uc_base":"1f926-1f3ff-2642","uc_output":"1f926-1f3ff-200d-2642-fe0f","uc_match":"1f926-1f3ff-2642-fe0f","uc_greedy":"1f926-1f3ff-2642","shortnames":[":man_facepalming_dark_skin_tone:"],"category":"people"},":man_fairy_tone1:":{"uc_base":"1f9da-1f3fb-2642","uc_output":"1f9da-1f3fb-200d-2642-fe0f","uc_match":"1f9da-1f3fb-2642-fe0f","uc_greedy":"1f9da-1f3fb-2642","shortnames":[":man_fairy_light_skin_tone:"],"category":"people"},":man_fairy_tone2:":{"uc_base":"1f9da-1f3fc-2642","uc_output":"1f9da-1f3fc-200d-2642-fe0f","uc_match":"1f9da-1f3fc-2642-fe0f","uc_greedy":"1f9da-1f3fc-2642","shortnames":[":man_fairy_medium_light_skin_tone:"],"category":"people"},":man_fairy_tone3:":{"uc_base":"1f9da-1f3fd-2642","uc_output":"1f9da-1f3fd-200d-2642-fe0f","uc_match":"1f9da-1f3fd-2642-fe0f","uc_greedy":"1f9da-1f3fd-2642","shortnames":[":man_fairy_medium_skin_tone:"],"category":"people"},":man_fairy_tone4:":{"uc_base":"1f9da-1f3fe-2642","uc_output":"1f9da-1f3fe-200d-2642-fe0f","uc_match":"1f9da-1f3fe-2642-fe0f","uc_greedy":"1f9da-1f3fe-2642","shortnames":[":man_fairy_medium_dark_skin_tone:"],"category":"people"},":man_fairy_tone5:":{"uc_base":"1f9da-1f3ff-2642","uc_output":"1f9da-1f3ff-200d-2642-fe0f","uc_match":"1f9da-1f3ff-2642-fe0f","uc_greedy":"1f9da-1f3ff-2642","shortnames":[":man_fairy_dark_skin_tone:"],"category":"people"},":man_frowning_tone1:":{"uc_base":"1f64d-1f3fb-2642","uc_output":"1f64d-1f3fb-200d-2642-fe0f","uc_match":"1f64d-1f3fb-2642-fe0f","uc_greedy":"1f64d-1f3fb-2642","shortnames":[":man_frowning_light_skin_tone:"],"category":"people"},":man_frowning_tone2:":{"uc_base":"1f64d-1f3fc-2642","uc_output":"1f64d-1f3fc-200d-2642-fe0f","uc_match":"1f64d-1f3fc-2642-fe0f","uc_greedy":"1f64d-1f3fc-2642","shortnames":[":man_frowning_medium_light_skin_tone:"],"category":"people"},":man_frowning_tone3:":{"uc_base":"1f64d-1f3fd-2642","uc_output":"1f64d-1f3fd-200d-2642-fe0f","uc_match":"1f64d-1f3fd-2642-fe0f","uc_greedy":"1f64d-1f3fd-2642","shortnames":[":man_frowning_medium_skin_tone:"],"category":"people"},":man_frowning_tone4:":{"uc_base":"1f64d-1f3fe-2642","uc_output":"1f64d-1f3fe-200d-2642-fe0f","uc_match":"1f64d-1f3fe-2642-fe0f","uc_greedy":"1f64d-1f3fe-2642","shortnames":[":man_frowning_medium_dark_skin_tone:"],"category":"people"},":man_frowning_tone5:":{"uc_base":"1f64d-1f3ff-2642","uc_output":"1f64d-1f3ff-200d-2642-fe0f","uc_match":"1f64d-1f3ff-2642-fe0f","uc_greedy":"1f64d-1f3ff-2642","shortnames":[":man_frowning_dark_skin_tone:"],"category":"people"},":man_gesturing_no_tone1:":{"uc_base":"1f645-1f3fb-2642","uc_output":"1f645-1f3fb-200d-2642-fe0f","uc_match":"1f645-1f3fb-2642-fe0f","uc_greedy":"1f645-1f3fb-2642","shortnames":[":man_gesturing_no_light_skin_tone:"],"category":"people"},":man_gesturing_no_tone2:":{"uc_base":"1f645-1f3fc-2642","uc_output":"1f645-1f3fc-200d-2642-fe0f","uc_match":"1f645-1f3fc-2642-fe0f","uc_greedy":"1f645-1f3fc-2642","shortnames":[":man_gesturing_no_medium_light_skin_tone:"],"category":"people"},":man_gesturing_no_tone3:":{"uc_base":"1f645-1f3fd-2642","uc_output":"1f645-1f3fd-200d-2642-fe0f","uc_match":"1f645-1f3fd-2642-fe0f","uc_greedy":"1f645-1f3fd-2642","shortnames":[":man_gesturing_no_medium_skin_tone:"],"category":"people"},":man_gesturing_no_tone4:":{"uc_base":"1f645-1f3fe-2642","uc_output":"1f645-1f3fe-200d-2642-fe0f","uc_match":"1f645-1f3fe-2642-fe0f","uc_greedy":"1f645-1f3fe-2642","shortnames":[":man_gesturing_no_medium_dark_skin_tone:"],"category":"people"},":man_gesturing_no_tone5:":{"uc_base":"1f645-1f3ff-2642","uc_output":"1f645-1f3ff-200d-2642-fe0f","uc_match":"1f645-1f3ff-2642-fe0f","uc_greedy":"1f645-1f3ff-2642","shortnames":[":man_gesturing_no_dark_skin_tone:"],"category":"people"},":man_gesturing_ok_tone1:":{"uc_base":"1f646-1f3fb-2642","uc_output":"1f646-1f3fb-200d-2642-fe0f","uc_match":"1f646-1f3fb-2642-fe0f","uc_greedy":"1f646-1f3fb-2642","shortnames":[":man_gesturing_ok_light_skin_tone:"],"category":"people"},":man_gesturing_ok_tone2:":{"uc_base":"1f646-1f3fc-2642","uc_output":"1f646-1f3fc-200d-2642-fe0f","uc_match":"1f646-1f3fc-2642-fe0f","uc_greedy":"1f646-1f3fc-2642","shortnames":[":man_gesturing_ok_medium_light_skin_tone:"],"category":"people"},":man_gesturing_ok_tone3:":{"uc_base":"1f646-1f3fd-2642","uc_output":"1f646-1f3fd-200d-2642-fe0f","uc_match":"1f646-1f3fd-2642-fe0f","uc_greedy":"1f646-1f3fd-2642","shortnames":[":man_gesturing_ok_medium_skin_tone:"],"category":"people"},":man_gesturing_ok_tone4:":{"uc_base":"1f646-1f3fe-2642","uc_output":"1f646-1f3fe-200d-2642-fe0f","uc_match":"1f646-1f3fe-2642-fe0f","uc_greedy":"1f646-1f3fe-2642","shortnames":[":man_gesturing_ok_medium_dark_skin_tone:"],"category":"people"},":man_gesturing_ok_tone5:":{"uc_base":"1f646-1f3ff-2642","uc_output":"1f646-1f3ff-200d-2642-fe0f","uc_match":"1f646-1f3ff-2642-fe0f","uc_greedy":"1f646-1f3ff-2642","shortnames":[":man_gesturing_ok_dark_skin_tone:"],"category":"people"},":man_getting_face_massage_tone1:":{"uc_base":"1f486-1f3fb-2642","uc_output":"1f486-1f3fb-200d-2642-fe0f","uc_match":"1f486-1f3fb-2642-fe0f","uc_greedy":"1f486-1f3fb-2642","shortnames":[":man_getting_face_massage_light_skin_tone:"],"category":"people"},":man_getting_face_massage_tone2:":{"uc_base":"1f486-1f3fc-2642","uc_output":"1f486-1f3fc-200d-2642-fe0f","uc_match":"1f486-1f3fc-2642-fe0f","uc_greedy":"1f486-1f3fc-2642","shortnames":[":man_getting_face_massage_medium_light_skin_tone:"],"category":"people"},":man_getting_face_massage_tone3:":{"uc_base":"1f486-1f3fd-2642","uc_output":"1f486-1f3fd-200d-2642-fe0f","uc_match":"1f486-1f3fd-2642-fe0f","uc_greedy":"1f486-1f3fd-2642","shortnames":[":man_getting_face_massage_medium_skin_tone:"],"category":"people"},":man_getting_face_massage_tone4:":{"uc_base":"1f486-1f3fe-2642","uc_output":"1f486-1f3fe-200d-2642-fe0f","uc_match":"1f486-1f3fe-2642-fe0f","uc_greedy":"1f486-1f3fe-2642","shortnames":[":man_getting_face_massage_medium_dark_skin_tone:"],"category":"people"},":man_getting_face_massage_tone5:":{"uc_base":"1f486-1f3ff-2642","uc_output":"1f486-1f3ff-200d-2642-fe0f","uc_match":"1f486-1f3ff-2642-fe0f","uc_greedy":"1f486-1f3ff-2642","shortnames":[":man_getting_face_massage_dark_skin_tone:"],"category":"people"},":man_getting_haircut_tone1:":{"uc_base":"1f487-1f3fb-2642","uc_output":"1f487-1f3fb-200d-2642-fe0f","uc_match":"1f487-1f3fb-2642-fe0f","uc_greedy":"1f487-1f3fb-2642","shortnames":[":man_getting_haircut_light_skin_tone:"],"category":"people"},":man_getting_haircut_tone2:":{"uc_base":"1f487-1f3fc-2642","uc_output":"1f487-1f3fc-200d-2642-fe0f","uc_match":"1f487-1f3fc-2642-fe0f","uc_greedy":"1f487-1f3fc-2642","shortnames":[":man_getting_haircut_medium_light_skin_tone:"],"category":"people"},":man_getting_haircut_tone3:":{"uc_base":"1f487-1f3fd-2642","uc_output":"1f487-1f3fd-200d-2642-fe0f","uc_match":"1f487-1f3fd-2642-fe0f","uc_greedy":"1f487-1f3fd-2642","shortnames":[":man_getting_haircut_medium_skin_tone:"],"category":"people"},":man_getting_haircut_tone4:":{"uc_base":"1f487-1f3fe-2642","uc_output":"1f487-1f3fe-200d-2642-fe0f","uc_match":"1f487-1f3fe-2642-fe0f","uc_greedy":"1f487-1f3fe-2642","shortnames":[":man_getting_haircut_medium_dark_skin_tone:"],"category":"people"},":man_getting_haircut_tone5:":{"uc_base":"1f487-1f3ff-2642","uc_output":"1f487-1f3ff-200d-2642-fe0f","uc_match":"1f487-1f3ff-2642-fe0f","uc_greedy":"1f487-1f3ff-2642","shortnames":[":man_getting_haircut_dark_skin_tone:"],"category":"people"},":man_golfing_tone1:":{"uc_base":"1f3cc-1f3fb-2642","uc_output":"1f3cc-1f3fb-200d-2642-fe0f","uc_match":"1f3cc-fe0f-1f3fb-2642-fe0f","uc_greedy":"1f3cc-1f3fb-2642","shortnames":[":man_golfing_light_skin_tone:"],"category":"activity"},":man_golfing_tone2:":{"uc_base":"1f3cc-1f3fc-2642","uc_output":"1f3cc-1f3fc-200d-2642-fe0f","uc_match":"1f3cc-fe0f-1f3fc-2642-fe0f","uc_greedy":"1f3cc-1f3fc-2642","shortnames":[":man_golfing_medium_light_skin_tone:"],"category":"activity"},":man_golfing_tone3:":{"uc_base":"1f3cc-1f3fd-2642","uc_output":"1f3cc-1f3fd-200d-2642-fe0f","uc_match":"1f3cc-fe0f-1f3fd-2642-fe0f","uc_greedy":"1f3cc-1f3fd-2642","shortnames":[":man_golfing_medium_skin_tone:"],"category":"activity"},":man_golfing_tone4:":{"uc_base":"1f3cc-1f3fe-2642","uc_output":"1f3cc-1f3fe-200d-2642-fe0f","uc_match":"1f3cc-fe0f-1f3fe-2642-fe0f","uc_greedy":"1f3cc-1f3fe-2642","shortnames":[":man_golfing_medium_dark_skin_tone:"],"category":"activity"},":man_golfing_tone5:":{"uc_base":"1f3cc-1f3ff-2642","uc_output":"1f3cc-1f3ff-200d-2642-fe0f","uc_match":"1f3cc-fe0f-1f3ff-2642-fe0f","uc_greedy":"1f3cc-1f3ff-2642","shortnames":[":man_golfing_dark_skin_tone:"],"category":"activity"},":man_guard_tone1:":{"uc_base":"1f482-1f3fb-2642","uc_output":"1f482-1f3fb-200d-2642-fe0f","uc_match":"1f482-1f3fb-2642-fe0f","uc_greedy":"1f482-1f3fb-2642","shortnames":[":man_guard_light_skin_tone:"],"category":"people"},":man_guard_tone2:":{"uc_base":"1f482-1f3fc-2642","uc_output":"1f482-1f3fc-200d-2642-fe0f","uc_match":"1f482-1f3fc-2642-fe0f","uc_greedy":"1f482-1f3fc-2642","shortnames":[":man_guard_medium_light_skin_tone:"],"category":"people"},":man_guard_tone3:":{"uc_base":"1f482-1f3fd-2642","uc_output":"1f482-1f3fd-200d-2642-fe0f","uc_match":"1f482-1f3fd-2642-fe0f","uc_greedy":"1f482-1f3fd-2642","shortnames":[":man_guard_medium_skin_tone:"],"category":"people"},":man_guard_tone4:":{"uc_base":"1f482-1f3fe-2642","uc_output":"1f482-1f3fe-200d-2642-fe0f","uc_match":"1f482-1f3fe-2642-fe0f","uc_greedy":"1f482-1f3fe-2642","shortnames":[":man_guard_medium_dark_skin_tone:"],"category":"people"},":man_guard_tone5:":{"uc_base":"1f482-1f3ff-2642","uc_output":"1f482-1f3ff-200d-2642-fe0f","uc_match":"1f482-1f3ff-2642-fe0f","uc_greedy":"1f482-1f3ff-2642","shortnames":[":man_guard_dark_skin_tone:"],"category":"people"},":man_health_worker_tone1:":{"uc_base":"1f468-1f3fb-2695","uc_output":"1f468-1f3fb-200d-2695-fe0f","uc_match":"1f468-1f3fb-2695-fe0f","uc_greedy":"1f468-1f3fb-2695","shortnames":[":man_health_worker_light_skin_tone:"],"category":"people"},":man_health_worker_tone2:":{"uc_base":"1f468-1f3fc-2695","uc_output":"1f468-1f3fc-200d-2695-fe0f","uc_match":"1f468-1f3fc-2695-fe0f","uc_greedy":"1f468-1f3fc-2695","shortnames":[":man_health_worker_medium_light_skin_tone:"],"category":"people"},":man_health_worker_tone3:":{"uc_base":"1f468-1f3fd-2695","uc_output":"1f468-1f3fd-200d-2695-fe0f","uc_match":"1f468-1f3fd-2695-fe0f","uc_greedy":"1f468-1f3fd-2695","shortnames":[":man_health_worker_medium_skin_tone:"],"category":"people"},":man_health_worker_tone4:":{"uc_base":"1f468-1f3fe-2695","uc_output":"1f468-1f3fe-200d-2695-fe0f","uc_match":"1f468-1f3fe-2695-fe0f","uc_greedy":"1f468-1f3fe-2695","shortnames":[":man_health_worker_medium_dark_skin_tone:"],"category":"people"},":man_health_worker_tone5:":{"uc_base":"1f468-1f3ff-2695","uc_output":"1f468-1f3ff-200d-2695-fe0f","uc_match":"1f468-1f3ff-2695-fe0f","uc_greedy":"1f468-1f3ff-2695","shortnames":[":man_health_worker_dark_skin_tone:"],"category":"people"},":man_in_lotus_position_tone1:":{"uc_base":"1f9d8-1f3fb-2642","uc_output":"1f9d8-1f3fb-200d-2642-fe0f","uc_match":"1f9d8-1f3fb-2642-fe0f","uc_greedy":"1f9d8-1f3fb-2642","shortnames":[":man_in_lotus_position_light_skin_tone:"],"category":"activity"},":man_in_lotus_position_tone2:":{"uc_base":"1f9d8-1f3fc-2642","uc_output":"1f9d8-1f3fc-200d-2642-fe0f","uc_match":"1f9d8-1f3fc-2642-fe0f","uc_greedy":"1f9d8-1f3fc-2642","shortnames":[":man_in_lotus_position_medium_light_skin_tone:"],"category":"activity"},":man_in_lotus_position_tone3:":{"uc_base":"1f9d8-1f3fd-2642","uc_output":"1f9d8-1f3fd-200d-2642-fe0f","uc_match":"1f9d8-1f3fd-2642-fe0f","uc_greedy":"1f9d8-1f3fd-2642","shortnames":[":man_in_lotus_position_medium_skin_tone:"],"category":"activity"},":man_in_lotus_position_tone4:":{"uc_base":"1f9d8-1f3fe-2642","uc_output":"1f9d8-1f3fe-200d-2642-fe0f","uc_match":"1f9d8-1f3fe-2642-fe0f","uc_greedy":"1f9d8-1f3fe-2642","shortnames":[":man_in_lotus_position_medium_dark_skin_tone:"],"category":"activity"},":man_in_lotus_position_tone5:":{"uc_base":"1f9d8-1f3ff-2642","uc_output":"1f9d8-1f3ff-200d-2642-fe0f","uc_match":"1f9d8-1f3ff-2642-fe0f","uc_greedy":"1f9d8-1f3ff-2642","shortnames":[":man_in_lotus_position_dark_skin_tone:"],"category":"activity"},":man_in_steamy_room_tone1:":{"uc_base":"1f9d6-1f3fb-2642","uc_output":"1f9d6-1f3fb-200d-2642-fe0f","uc_match":"1f9d6-1f3fb-2642-fe0f","uc_greedy":"1f9d6-1f3fb-2642","shortnames":[":man_in_steamy_room_light_skin_tone:"],"category":"activity"},":man_in_steamy_room_tone2:":{"uc_base":"1f9d6-1f3fc-2642","uc_output":"1f9d6-1f3fc-200d-2642-fe0f","uc_match":"1f9d6-1f3fc-2642-fe0f","uc_greedy":"1f9d6-1f3fc-2642","shortnames":[":man_in_steamy_room_medium_light_skin_tone:"],"category":"activity"},":man_in_steamy_room_tone3:":{"uc_base":"1f9d6-1f3fd-2642","uc_output":"1f9d6-1f3fd-200d-2642-fe0f","uc_match":"1f9d6-1f3fd-2642-fe0f","uc_greedy":"1f9d6-1f3fd-2642","shortnames":[":man_in_steamy_room_medium_skin_tone:"],"category":"activity"},":man_in_steamy_room_tone4:":{"uc_base":"1f9d6-1f3fe-2642","uc_output":"1f9d6-1f3fe-200d-2642-fe0f","uc_match":"1f9d6-1f3fe-2642-fe0f","uc_greedy":"1f9d6-1f3fe-2642","shortnames":[":man_in_steamy_room_medium_dark_skin_tone:"],"category":"activity"},":man_in_steamy_room_tone5:":{"uc_base":"1f9d6-1f3ff-2642","uc_output":"1f9d6-1f3ff-200d-2642-fe0f","uc_match":"1f9d6-1f3ff-2642-fe0f","uc_greedy":"1f9d6-1f3ff-2642","shortnames":[":man_in_steamy_room_dark_skin_tone:"],"category":"activity"},":man_judge_tone1:":{"uc_base":"1f468-1f3fb-2696","uc_output":"1f468-1f3fb-200d-2696-fe0f","uc_match":"1f468-1f3fb-2696-fe0f","uc_greedy":"1f468-1f3fb-2696","shortnames":[":man_judge_light_skin_tone:"],"category":"people"},":man_judge_tone2:":{"uc_base":"1f468-1f3fc-2696","uc_output":"1f468-1f3fc-200d-2696-fe0f","uc_match":"1f468-1f3fc-2696-fe0f","uc_greedy":"1f468-1f3fc-2696","shortnames":[":man_judge_medium_light_skin_tone:"],"category":"people"},":man_judge_tone3:":{"uc_base":"1f468-1f3fd-2696","uc_output":"1f468-1f3fd-200d-2696-fe0f","uc_match":"1f468-1f3fd-2696-fe0f","uc_greedy":"1f468-1f3fd-2696","shortnames":[":man_judge_medium_skin_tone:"],"category":"people"},":man_judge_tone4:":{"uc_base":"1f468-1f3fe-2696","uc_output":"1f468-1f3fe-200d-2696-fe0f","uc_match":"1f468-1f3fe-2696-fe0f","uc_greedy":"1f468-1f3fe-2696","shortnames":[":man_judge_medium_dark_skin_tone:"],"category":"people"},":man_judge_tone5:":{"uc_base":"1f468-1f3ff-2696","uc_output":"1f468-1f3ff-200d-2696-fe0f","uc_match":"1f468-1f3ff-2696-fe0f","uc_greedy":"1f468-1f3ff-2696","shortnames":[":man_judge_dark_skin_tone:"],"category":"people"},":man_juggling_tone1:":{"uc_base":"1f939-1f3fb-2642","uc_output":"1f939-1f3fb-200d-2642-fe0f","uc_match":"1f939-1f3fb-2642-fe0f","uc_greedy":"1f939-1f3fb-2642","shortnames":[":man_juggling_light_skin_tone:"],"category":"activity"},":man_juggling_tone2:":{"uc_base":"1f939-1f3fc-2642","uc_output":"1f939-1f3fc-200d-2642-fe0f","uc_match":"1f939-1f3fc-2642-fe0f","uc_greedy":"1f939-1f3fc-2642","shortnames":[":man_juggling_medium_light_skin_tone:"],"category":"activity"},":man_juggling_tone3:":{"uc_base":"1f939-1f3fd-2642","uc_output":"1f939-1f3fd-200d-2642-fe0f","uc_match":"1f939-1f3fd-2642-fe0f","uc_greedy":"1f939-1f3fd-2642","shortnames":[":man_juggling_medium_skin_tone:"],"category":"activity"},":man_juggling_tone4:":{"uc_base":"1f939-1f3fe-2642","uc_output":"1f939-1f3fe-200d-2642-fe0f","uc_match":"1f939-1f3fe-2642-fe0f","uc_greedy":"1f939-1f3fe-2642","shortnames":[":man_juggling_medium_dark_skin_tone:"],"category":"activity"},":man_juggling_tone5:":{"uc_base":"1f939-1f3ff-2642","uc_output":"1f939-1f3ff-200d-2642-fe0f","uc_match":"1f939-1f3ff-2642-fe0f","uc_greedy":"1f939-1f3ff-2642","shortnames":[":man_juggling_dark_skin_tone:"],"category":"activity"},":man_lifting_weights_tone1:":{"uc_base":"1f3cb-1f3fb-2642","uc_output":"1f3cb-1f3fb-200d-2642-fe0f","uc_match":"1f3cb-fe0f-1f3fb-2642-fe0f","uc_greedy":"1f3cb-1f3fb-2642","shortnames":[":man_lifting_weights_light_skin_tone:"],"category":"activity"},":man_lifting_weights_tone2:":{"uc_base":"1f3cb-1f3fc-2642","uc_output":"1f3cb-1f3fc-200d-2642-fe0f","uc_match":"1f3cb-fe0f-1f3fc-2642-fe0f","uc_greedy":"1f3cb-1f3fc-2642","shortnames":[":man_lifting_weights_medium_light_skin_tone:"],"category":"activity"},":man_lifting_weights_tone3:":{"uc_base":"1f3cb-1f3fd-2642","uc_output":"1f3cb-1f3fd-200d-2642-fe0f","uc_match":"1f3cb-fe0f-1f3fd-2642-fe0f","uc_greedy":"1f3cb-1f3fd-2642","shortnames":[":man_lifting_weights_medium_skin_tone:"],"category":"activity"},":man_lifting_weights_tone4:":{"uc_base":"1f3cb-1f3fe-2642","uc_output":"1f3cb-1f3fe-200d-2642-fe0f","uc_match":"1f3cb-fe0f-1f3fe-2642-fe0f","uc_greedy":"1f3cb-1f3fe-2642","shortnames":[":man_lifting_weights_medium_dark_skin_tone:"],"category":"activity"},":man_lifting_weights_tone5:":{"uc_base":"1f3cb-1f3ff-2642","uc_output":"1f3cb-1f3ff-200d-2642-fe0f","uc_match":"1f3cb-fe0f-1f3ff-2642-fe0f","uc_greedy":"1f3cb-1f3ff-2642","shortnames":[":man_lifting_weights_dark_skin_tone:"],"category":"activity"},":man_mage_tone1:":{"uc_base":"1f9d9-1f3fb-2642","uc_output":"1f9d9-1f3fb-200d-2642-fe0f","uc_match":"1f9d9-1f3fb-2642-fe0f","uc_greedy":"1f9d9-1f3fb-2642","shortnames":[":man_mage_light_skin_tone:"],"category":"people"},":man_mage_tone2:":{"uc_base":"1f9d9-1f3fc-2642","uc_output":"1f9d9-1f3fc-200d-2642-fe0f","uc_match":"1f9d9-1f3fc-2642-fe0f","uc_greedy":"1f9d9-1f3fc-2642","shortnames":[":man_mage_medium_light_skin_tone:"],"category":"people"},":man_mage_tone3:":{"uc_base":"1f9d9-1f3fd-2642","uc_output":"1f9d9-1f3fd-200d-2642-fe0f","uc_match":"1f9d9-1f3fd-2642-fe0f","uc_greedy":"1f9d9-1f3fd-2642","shortnames":[":man_mage_medium_skin_tone:"],"category":"people"},":man_mage_tone4:":{"uc_base":"1f9d9-1f3fe-2642","uc_output":"1f9d9-1f3fe-200d-2642-fe0f","uc_match":"1f9d9-1f3fe-2642-fe0f","uc_greedy":"1f9d9-1f3fe-2642","shortnames":[":man_mage_medium_dark_skin_tone:"],"category":"people"},":man_mage_tone5:":{"uc_base":"1f9d9-1f3ff-2642","uc_output":"1f9d9-1f3ff-200d-2642-fe0f","uc_match":"1f9d9-1f3ff-2642-fe0f","uc_greedy":"1f9d9-1f3ff-2642","shortnames":[":man_mage_dark_skin_tone:"],"category":"people"},":man_mountain_biking_tone1:":{"uc_base":"1f6b5-1f3fb-2642","uc_output":"1f6b5-1f3fb-200d-2642-fe0f","uc_match":"1f6b5-1f3fb-2642-fe0f","uc_greedy":"1f6b5-1f3fb-2642","shortnames":[":man_mountain_biking_light_skin_tone:"],"category":"activity"},":man_mountain_biking_tone2:":{"uc_base":"1f6b5-1f3fc-2642","uc_output":"1f6b5-1f3fc-200d-2642-fe0f","uc_match":"1f6b5-1f3fc-2642-fe0f","uc_greedy":"1f6b5-1f3fc-2642","shortnames":[":man_mountain_biking_medium_light_skin_tone:"],"category":"activity"},":man_mountain_biking_tone3:":{"uc_base":"1f6b5-1f3fd-2642","uc_output":"1f6b5-1f3fd-200d-2642-fe0f","uc_match":"1f6b5-1f3fd-2642-fe0f","uc_greedy":"1f6b5-1f3fd-2642","shortnames":[":man_mountain_biking_medium_skin_tone:"],"category":"activity"},":man_mountain_biking_tone4:":{"uc_base":"1f6b5-1f3fe-2642","uc_output":"1f6b5-1f3fe-200d-2642-fe0f","uc_match":"1f6b5-1f3fe-2642-fe0f","uc_greedy":"1f6b5-1f3fe-2642","shortnames":[":man_mountain_biking_medium_dark_skin_tone:"],"category":"activity"},":man_mountain_biking_tone5:":{"uc_base":"1f6b5-1f3ff-2642","uc_output":"1f6b5-1f3ff-200d-2642-fe0f","uc_match":"1f6b5-1f3ff-2642-fe0f","uc_greedy":"1f6b5-1f3ff-2642","shortnames":[":man_mountain_biking_dark_skin_tone:"],"category":"activity"},":man_pilot_tone1:":{"uc_base":"1f468-1f3fb-2708","uc_output":"1f468-1f3fb-200d-2708-fe0f","uc_match":"1f468-1f3fb-2708-fe0f","uc_greedy":"1f468-1f3fb-2708","shortnames":[":man_pilot_light_skin_tone:"],"category":"people"},":man_pilot_tone2:":{"uc_base":"1f468-1f3fc-2708","uc_output":"1f468-1f3fc-200d-2708-fe0f","uc_match":"1f468-1f3fc-2708-fe0f","uc_greedy":"1f468-1f3fc-2708","shortnames":[":man_pilot_medium_light_skin_tone:"],"category":"people"},":man_pilot_tone3:":{"uc_base":"1f468-1f3fd-2708","uc_output":"1f468-1f3fd-200d-2708-fe0f","uc_match":"1f468-1f3fd-2708-fe0f","uc_greedy":"1f468-1f3fd-2708","shortnames":[":man_pilot_medium_skin_tone:"],"category":"people"},":man_pilot_tone4:":{"uc_base":"1f468-1f3fe-2708","uc_output":"1f468-1f3fe-200d-2708-fe0f","uc_match":"1f468-1f3fe-2708-fe0f","uc_greedy":"1f468-1f3fe-2708","shortnames":[":man_pilot_medium_dark_skin_tone:"],"category":"people"},":man_pilot_tone5:":{"uc_base":"1f468-1f3ff-2708","uc_output":"1f468-1f3ff-200d-2708-fe0f","uc_match":"1f468-1f3ff-2708-fe0f","uc_greedy":"1f468-1f3ff-2708","shortnames":[":man_pilot_dark_skin_tone:"],"category":"people"},":man_playing_handball_tone1:":{"uc_base":"1f93e-1f3fb-2642","uc_output":"1f93e-1f3fb-200d-2642-fe0f","uc_match":"1f93e-1f3fb-2642-fe0f","uc_greedy":"1f93e-1f3fb-2642","shortnames":[":man_playing_handball_light_skin_tone:"],"category":"activity"},":man_playing_handball_tone2:":{"uc_base":"1f93e-1f3fc-2642","uc_output":"1f93e-1f3fc-200d-2642-fe0f","uc_match":"1f93e-1f3fc-2642-fe0f","uc_greedy":"1f93e-1f3fc-2642","shortnames":[":man_playing_handball_medium_light_skin_tone:"],"category":"activity"},":man_playing_handball_tone3:":{"uc_base":"1f93e-1f3fd-2642","uc_output":"1f93e-1f3fd-200d-2642-fe0f","uc_match":"1f93e-1f3fd-2642-fe0f","uc_greedy":"1f93e-1f3fd-2642","shortnames":[":man_playing_handball_medium_skin_tone:"],"category":"activity"},":man_playing_handball_tone4:":{"uc_base":"1f93e-1f3fe-2642","uc_output":"1f93e-1f3fe-200d-2642-fe0f","uc_match":"1f93e-1f3fe-2642-fe0f","uc_greedy":"1f93e-1f3fe-2642","shortnames":[":man_playing_handball_medium_dark_skin_tone:"],"category":"activity"},":man_playing_handball_tone5:":{"uc_base":"1f93e-1f3ff-2642","uc_output":"1f93e-1f3ff-200d-2642-fe0f","uc_match":"1f93e-1f3ff-2642-fe0f","uc_greedy":"1f93e-1f3ff-2642","shortnames":[":man_playing_handball_dark_skin_tone:"],"category":"activity"},":man_playing_water_polo_tone1:":{"uc_base":"1f93d-1f3fb-2642","uc_output":"1f93d-1f3fb-200d-2642-fe0f","uc_match":"1f93d-1f3fb-2642-fe0f","uc_greedy":"1f93d-1f3fb-2642","shortnames":[":man_playing_water_polo_light_skin_tone:"],"category":"activity"},":man_playing_water_polo_tone2:":{"uc_base":"1f93d-1f3fc-2642","uc_output":"1f93d-1f3fc-200d-2642-fe0f","uc_match":"1f93d-1f3fc-2642-fe0f","uc_greedy":"1f93d-1f3fc-2642","shortnames":[":man_playing_water_polo_medium_light_skin_tone:"],"category":"activity"},":man_playing_water_polo_tone3:":{"uc_base":"1f93d-1f3fd-2642","uc_output":"1f93d-1f3fd-200d-2642-fe0f","uc_match":"1f93d-1f3fd-2642-fe0f","uc_greedy":"1f93d-1f3fd-2642","shortnames":[":man_playing_water_polo_medium_skin_tone:"],"category":"activity"},":man_playing_water_polo_tone4:":{"uc_base":"1f93d-1f3fe-2642","uc_output":"1f93d-1f3fe-200d-2642-fe0f","uc_match":"1f93d-1f3fe-2642-fe0f","uc_greedy":"1f93d-1f3fe-2642","shortnames":[":man_playing_water_polo_medium_dark_skin_tone:"],"category":"activity"},":man_playing_water_polo_tone5:":{"uc_base":"1f93d-1f3ff-2642","uc_output":"1f93d-1f3ff-200d-2642-fe0f","uc_match":"1f93d-1f3ff-2642-fe0f","uc_greedy":"1f93d-1f3ff-2642","shortnames":[":man_playing_water_polo_dark_skin_tone:"],"category":"activity"},":man_police_officer_tone1:":{"uc_base":"1f46e-1f3fb-2642","uc_output":"1f46e-1f3fb-200d-2642-fe0f","uc_match":"1f46e-1f3fb-2642-fe0f","uc_greedy":"1f46e-1f3fb-2642","shortnames":[":man_police_officer_light_skin_tone:"],"category":"people"},":man_police_officer_tone2:":{"uc_base":"1f46e-1f3fc-2642","uc_output":"1f46e-1f3fc-200d-2642-fe0f","uc_match":"1f46e-1f3fc-2642-fe0f","uc_greedy":"1f46e-1f3fc-2642","shortnames":[":man_police_officer_medium_light_skin_tone:"],"category":"people"},":man_police_officer_tone3:":{"uc_base":"1f46e-1f3fd-2642","uc_output":"1f46e-1f3fd-200d-2642-fe0f","uc_match":"1f46e-1f3fd-2642-fe0f","uc_greedy":"1f46e-1f3fd-2642","shortnames":[":man_police_officer_medium_skin_tone:"],"category":"people"},":man_police_officer_tone4:":{"uc_base":"1f46e-1f3fe-2642","uc_output":"1f46e-1f3fe-200d-2642-fe0f","uc_match":"1f46e-1f3fe-2642-fe0f","uc_greedy":"1f46e-1f3fe-2642","shortnames":[":man_police_officer_medium_dark_skin_tone:"],"category":"people"},":man_police_officer_tone5:":{"uc_base":"1f46e-1f3ff-2642","uc_output":"1f46e-1f3ff-200d-2642-fe0f","uc_match":"1f46e-1f3ff-2642-fe0f","uc_greedy":"1f46e-1f3ff-2642","shortnames":[":man_police_officer_dark_skin_tone:"],"category":"people"},":man_pouting_tone1:":{"uc_base":"1f64e-1f3fb-2642","uc_output":"1f64e-1f3fb-200d-2642-fe0f","uc_match":"1f64e-1f3fb-2642-fe0f","uc_greedy":"1f64e-1f3fb-2642","shortnames":[":man_pouting_light_skin_tone:"],"category":"people"},":man_pouting_tone2:":{"uc_base":"1f64e-1f3fc-2642","uc_output":"1f64e-1f3fc-200d-2642-fe0f","uc_match":"1f64e-1f3fc-2642-fe0f","uc_greedy":"1f64e-1f3fc-2642","shortnames":[":man_pouting_medium_light_skin_tone:"],"category":"people"},":man_pouting_tone3:":{"uc_base":"1f64e-1f3fd-2642","uc_output":"1f64e-1f3fd-200d-2642-fe0f","uc_match":"1f64e-1f3fd-2642-fe0f","uc_greedy":"1f64e-1f3fd-2642","shortnames":[":man_pouting_medium_skin_tone:"],"category":"people"},":man_pouting_tone4:":{"uc_base":"1f64e-1f3fe-2642","uc_output":"1f64e-1f3fe-200d-2642-fe0f","uc_match":"1f64e-1f3fe-2642-fe0f","uc_greedy":"1f64e-1f3fe-2642","shortnames":[":man_pouting_medium_dark_skin_tone:"],"category":"people"},":man_pouting_tone5:":{"uc_base":"1f64e-1f3ff-2642","uc_output":"1f64e-1f3ff-200d-2642-fe0f","uc_match":"1f64e-1f3ff-2642-fe0f","uc_greedy":"1f64e-1f3ff-2642","shortnames":[":man_pouting_dark_skin_tone:"],"category":"people"},":man_raising_hand_tone1:":{"uc_base":"1f64b-1f3fb-2642","uc_output":"1f64b-1f3fb-200d-2642-fe0f","uc_match":"1f64b-1f3fb-2642-fe0f","uc_greedy":"1f64b-1f3fb-2642","shortnames":[":man_raising_hand_light_skin_tone:"],"category":"people"},":man_raising_hand_tone2:":{"uc_base":"1f64b-1f3fc-2642","uc_output":"1f64b-1f3fc-200d-2642-fe0f","uc_match":"1f64b-1f3fc-2642-fe0f","uc_greedy":"1f64b-1f3fc-2642","shortnames":[":man_raising_hand_medium_light_skin_tone:"],"category":"people"},":man_raising_hand_tone3:":{"uc_base":"1f64b-1f3fd-2642","uc_output":"1f64b-1f3fd-200d-2642-fe0f","uc_match":"1f64b-1f3fd-2642-fe0f","uc_greedy":"1f64b-1f3fd-2642","shortnames":[":man_raising_hand_medium_skin_tone:"],"category":"people"},":man_raising_hand_tone4:":{"uc_base":"1f64b-1f3fe-2642","uc_output":"1f64b-1f3fe-200d-2642-fe0f","uc_match":"1f64b-1f3fe-2642-fe0f","uc_greedy":"1f64b-1f3fe-2642","shortnames":[":man_raising_hand_medium_dark_skin_tone:"],"category":"people"},":man_raising_hand_tone5:":{"uc_base":"1f64b-1f3ff-2642","uc_output":"1f64b-1f3ff-200d-2642-fe0f","uc_match":"1f64b-1f3ff-2642-fe0f","uc_greedy":"1f64b-1f3ff-2642","shortnames":[":man_raising_hand_dark_skin_tone:"],"category":"people"},":man_rowing_boat_tone1:":{"uc_base":"1f6a3-1f3fb-2642","uc_output":"1f6a3-1f3fb-200d-2642-fe0f","uc_match":"1f6a3-1f3fb-2642-fe0f","uc_greedy":"1f6a3-1f3fb-2642","shortnames":[":man_rowing_boat_light_skin_tone:"],"category":"activity"},":man_rowing_boat_tone2:":{"uc_base":"1f6a3-1f3fc-2642","uc_output":"1f6a3-1f3fc-200d-2642-fe0f","uc_match":"1f6a3-1f3fc-2642-fe0f","uc_greedy":"1f6a3-1f3fc-2642","shortnames":[":man_rowing_boat_medium_light_skin_tone:"],"category":"activity"},":man_rowing_boat_tone3:":{"uc_base":"1f6a3-1f3fd-2642","uc_output":"1f6a3-1f3fd-200d-2642-fe0f","uc_match":"1f6a3-1f3fd-2642-fe0f","uc_greedy":"1f6a3-1f3fd-2642","shortnames":[":man_rowing_boat_medium_skin_tone:"],"category":"activity"},":man_rowing_boat_tone4:":{"uc_base":"1f6a3-1f3fe-2642","uc_output":"1f6a3-1f3fe-200d-2642-fe0f","uc_match":"1f6a3-1f3fe-2642-fe0f","uc_greedy":"1f6a3-1f3fe-2642","shortnames":[":man_rowing_boat_medium_dark_skin_tone:"],"category":"activity"},":man_rowing_boat_tone5:":{"uc_base":"1f6a3-1f3ff-2642","uc_output":"1f6a3-1f3ff-200d-2642-fe0f","uc_match":"1f6a3-1f3ff-2642-fe0f","uc_greedy":"1f6a3-1f3ff-2642","shortnames":[":man_rowing_boat_dark_skin_tone:"],"category":"activity"},":man_running_tone1:":{"uc_base":"1f3c3-1f3fb-2642","uc_output":"1f3c3-1f3fb-200d-2642-fe0f","uc_match":"1f3c3-1f3fb-2642-fe0f","uc_greedy":"1f3c3-1f3fb-2642","shortnames":[":man_running_light_skin_tone:"],"category":"people"},":man_running_tone2:":{"uc_base":"1f3c3-1f3fc-2642","uc_output":"1f3c3-1f3fc-200d-2642-fe0f","uc_match":"1f3c3-1f3fc-2642-fe0f","uc_greedy":"1f3c3-1f3fc-2642","shortnames":[":man_running_medium_light_skin_tone:"],"category":"people"},":man_running_tone3:":{"uc_base":"1f3c3-1f3fd-2642","uc_output":"1f3c3-1f3fd-200d-2642-fe0f","uc_match":"1f3c3-1f3fd-2642-fe0f","uc_greedy":"1f3c3-1f3fd-2642","shortnames":[":man_running_medium_skin_tone:"],"category":"people"},":man_running_tone4:":{"uc_base":"1f3c3-1f3fe-2642","uc_output":"1f3c3-1f3fe-200d-2642-fe0f","uc_match":"1f3c3-1f3fe-2642-fe0f","uc_greedy":"1f3c3-1f3fe-2642","shortnames":[":man_running_medium_dark_skin_tone:"],"category":"people"},":man_running_tone5:":{"uc_base":"1f3c3-1f3ff-2642","uc_output":"1f3c3-1f3ff-200d-2642-fe0f","uc_match":"1f3c3-1f3ff-2642-fe0f","uc_greedy":"1f3c3-1f3ff-2642","shortnames":[":man_running_dark_skin_tone:"],"category":"people"},":man_shrugging_tone1:":{"uc_base":"1f937-1f3fb-2642","uc_output":"1f937-1f3fb-200d-2642-fe0f","uc_match":"1f937-1f3fb-2642-fe0f","uc_greedy":"1f937-1f3fb-2642","shortnames":[":man_shrugging_light_skin_tone:"],"category":"people"},":man_shrugging_tone2:":{"uc_base":"1f937-1f3fc-2642","uc_output":"1f937-1f3fc-200d-2642-fe0f","uc_match":"1f937-1f3fc-2642-fe0f","uc_greedy":"1f937-1f3fc-2642","shortnames":[":man_shrugging_medium_light_skin_tone:"],"category":"people"},":man_shrugging_tone3:":{"uc_base":"1f937-1f3fd-2642","uc_output":"1f937-1f3fd-200d-2642-fe0f","uc_match":"1f937-1f3fd-2642-fe0f","uc_greedy":"1f937-1f3fd-2642","shortnames":[":man_shrugging_medium_skin_tone:"],"category":"people"},":man_shrugging_tone4:":{"uc_base":"1f937-1f3fe-2642","uc_output":"1f937-1f3fe-200d-2642-fe0f","uc_match":"1f937-1f3fe-2642-fe0f","uc_greedy":"1f937-1f3fe-2642","shortnames":[":man_shrugging_medium_dark_skin_tone:"],"category":"people"},":man_shrugging_tone5:":{"uc_base":"1f937-1f3ff-2642","uc_output":"1f937-1f3ff-200d-2642-fe0f","uc_match":"1f937-1f3ff-2642-fe0f","uc_greedy":"1f937-1f3ff-2642","shortnames":[":man_shrugging_dark_skin_tone:"],"category":"people"},":man_surfing_tone1:":{"uc_base":"1f3c4-1f3fb-2642","uc_output":"1f3c4-1f3fb-200d-2642-fe0f","uc_match":"1f3c4-1f3fb-2642-fe0f","uc_greedy":"1f3c4-1f3fb-2642","shortnames":[":man_surfing_light_skin_tone:"],"category":"activity"},":man_surfing_tone2:":{"uc_base":"1f3c4-1f3fc-2642","uc_output":"1f3c4-1f3fc-200d-2642-fe0f","uc_match":"1f3c4-1f3fc-2642-fe0f","uc_greedy":"1f3c4-1f3fc-2642","shortnames":[":man_surfing_medium_light_skin_tone:"],"category":"activity"},":man_surfing_tone3:":{"uc_base":"1f3c4-1f3fd-2642","uc_output":"1f3c4-1f3fd-200d-2642-fe0f","uc_match":"1f3c4-1f3fd-2642-fe0f","uc_greedy":"1f3c4-1f3fd-2642","shortnames":[":man_surfing_medium_skin_tone:"],"category":"activity"},":man_surfing_tone4:":{"uc_base":"1f3c4-1f3fe-2642","uc_output":"1f3c4-1f3fe-200d-2642-fe0f","uc_match":"1f3c4-1f3fe-2642-fe0f","uc_greedy":"1f3c4-1f3fe-2642","shortnames":[":man_surfing_medium_dark_skin_tone:"],"category":"activity"},":man_surfing_tone5:":{"uc_base":"1f3c4-1f3ff-2642","uc_output":"1f3c4-1f3ff-200d-2642-fe0f","uc_match":"1f3c4-1f3ff-2642-fe0f","uc_greedy":"1f3c4-1f3ff-2642","shortnames":[":man_surfing_dark_skin_tone:"],"category":"activity"},":man_swimming_tone1:":{"uc_base":"1f3ca-1f3fb-2642","uc_output":"1f3ca-1f3fb-200d-2642-fe0f","uc_match":"1f3ca-1f3fb-2642-fe0f","uc_greedy":"1f3ca-1f3fb-2642","shortnames":[":man_swimming_light_skin_tone:"],"category":"activity"},":man_swimming_tone2:":{"uc_base":"1f3ca-1f3fc-2642","uc_output":"1f3ca-1f3fc-200d-2642-fe0f","uc_match":"1f3ca-1f3fc-2642-fe0f","uc_greedy":"1f3ca-1f3fc-2642","shortnames":[":man_swimming_medium_light_skin_tone:"],"category":"activity"},":man_swimming_tone3:":{"uc_base":"1f3ca-1f3fd-2642","uc_output":"1f3ca-1f3fd-200d-2642-fe0f","uc_match":"1f3ca-1f3fd-2642-fe0f","uc_greedy":"1f3ca-1f3fd-2642","shortnames":[":man_swimming_medium_skin_tone:"],"category":"activity"},":man_swimming_tone4:":{"uc_base":"1f3ca-1f3fe-2642","uc_output":"1f3ca-1f3fe-200d-2642-fe0f","uc_match":"1f3ca-1f3fe-2642-fe0f","uc_greedy":"1f3ca-1f3fe-2642","shortnames":[":man_swimming_medium_dark_skin_tone:"],"category":"activity"},":man_swimming_tone5:":{"uc_base":"1f3ca-1f3ff-2642","uc_output":"1f3ca-1f3ff-200d-2642-fe0f","uc_match":"1f3ca-1f3ff-2642-fe0f","uc_greedy":"1f3ca-1f3ff-2642","shortnames":[":man_swimming_dark_skin_tone:"],"category":"activity"},":man_tipping_hand_tone1:":{"uc_base":"1f481-1f3fb-2642","uc_output":"1f481-1f3fb-200d-2642-fe0f","uc_match":"1f481-1f3fb-2642-fe0f","uc_greedy":"1f481-1f3fb-2642","shortnames":[":man_tipping_hand_light_skin_tone:"],"category":"people"},":man_tipping_hand_tone2:":{"uc_base":"1f481-1f3fc-2642","uc_output":"1f481-1f3fc-200d-2642-fe0f","uc_match":"1f481-1f3fc-2642-fe0f","uc_greedy":"1f481-1f3fc-2642","shortnames":[":man_tipping_hand_medium_light_skin_tone:"],"category":"people"},":man_tipping_hand_tone3:":{"uc_base":"1f481-1f3fd-2642","uc_output":"1f481-1f3fd-200d-2642-fe0f","uc_match":"1f481-1f3fd-2642-fe0f","uc_greedy":"1f481-1f3fd-2642","shortnames":[":man_tipping_hand_medium_skin_tone:"],"category":"people"},":man_tipping_hand_tone4:":{"uc_base":"1f481-1f3fe-2642","uc_output":"1f481-1f3fe-200d-2642-fe0f","uc_match":"1f481-1f3fe-2642-fe0f","uc_greedy":"1f481-1f3fe-2642","shortnames":[":man_tipping_hand_medium_dark_skin_tone:"],"category":"people"},":man_tipping_hand_tone5:":{"uc_base":"1f481-1f3ff-2642","uc_output":"1f481-1f3ff-200d-2642-fe0f","uc_match":"1f481-1f3ff-2642-fe0f","uc_greedy":"1f481-1f3ff-2642","shortnames":[":man_tipping_hand_dark_skin_tone:"],"category":"people"},":man_vampire_tone1:":{"uc_base":"1f9db-1f3fb-2642","uc_output":"1f9db-1f3fb-200d-2642-fe0f","uc_match":"1f9db-1f3fb-2642-fe0f","uc_greedy":"1f9db-1f3fb-2642","shortnames":[":man_vampire_light_skin_tone:"],"category":"people"},":man_vampire_tone2:":{"uc_base":"1f9db-1f3fc-2642","uc_output":"1f9db-1f3fc-200d-2642-fe0f","uc_match":"1f9db-1f3fc-2642-fe0f","uc_greedy":"1f9db-1f3fc-2642","shortnames":[":man_vampire_medium_light_skin_tone:"],"category":"people"},":man_vampire_tone3:":{"uc_base":"1f9db-1f3fd-2642","uc_output":"1f9db-1f3fd-200d-2642-fe0f","uc_match":"1f9db-1f3fd-2642-fe0f","uc_greedy":"1f9db-1f3fd-2642","shortnames":[":man_vampire_medium_skin_tone:"],"category":"people"},":man_vampire_tone4:":{"uc_base":"1f9db-1f3fe-2642","uc_output":"1f9db-1f3fe-200d-2642-fe0f","uc_match":"1f9db-1f3fe-2642-fe0f","uc_greedy":"1f9db-1f3fe-2642","shortnames":[":man_vampire_medium_dark_skin_tone:"],"category":"people"},":man_vampire_tone5:":{"uc_base":"1f9db-1f3ff-2642","uc_output":"1f9db-1f3ff-200d-2642-fe0f","uc_match":"1f9db-1f3ff-2642-fe0f","uc_greedy":"1f9db-1f3ff-2642","shortnames":[":man_vampire_dark_skin_tone:"],"category":"people"},":man_walking_tone1:":{"uc_base":"1f6b6-1f3fb-2642","uc_output":"1f6b6-1f3fb-200d-2642-fe0f","uc_match":"1f6b6-1f3fb-2642-fe0f","uc_greedy":"1f6b6-1f3fb-2642","shortnames":[":man_walking_light_skin_tone:"],"category":"people"},":man_walking_tone2:":{"uc_base":"1f6b6-1f3fc-2642","uc_output":"1f6b6-1f3fc-200d-2642-fe0f","uc_match":"1f6b6-1f3fc-2642-fe0f","uc_greedy":"1f6b6-1f3fc-2642","shortnames":[":man_walking_medium_light_skin_tone:"],"category":"people"},":man_walking_tone3:":{"uc_base":"1f6b6-1f3fd-2642","uc_output":"1f6b6-1f3fd-200d-2642-fe0f","uc_match":"1f6b6-1f3fd-2642-fe0f","uc_greedy":"1f6b6-1f3fd-2642","shortnames":[":man_walking_medium_skin_tone:"],"category":"people"},":man_walking_tone4:":{"uc_base":"1f6b6-1f3fe-2642","uc_output":"1f6b6-1f3fe-200d-2642-fe0f","uc_match":"1f6b6-1f3fe-2642-fe0f","uc_greedy":"1f6b6-1f3fe-2642","shortnames":[":man_walking_medium_dark_skin_tone:"],"category":"people"},":man_walking_tone5:":{"uc_base":"1f6b6-1f3ff-2642","uc_output":"1f6b6-1f3ff-200d-2642-fe0f","uc_match":"1f6b6-1f3ff-2642-fe0f","uc_greedy":"1f6b6-1f3ff-2642","shortnames":[":man_walking_dark_skin_tone:"],"category":"people"},":man_wearing_turban_tone1:":{"uc_base":"1f473-1f3fb-2642","uc_output":"1f473-1f3fb-200d-2642-fe0f","uc_match":"1f473-1f3fb-2642-fe0f","uc_greedy":"1f473-1f3fb-2642","shortnames":[":man_wearing_turban_light_skin_tone:"],"category":"people"},":man_wearing_turban_tone2:":{"uc_base":"1f473-1f3fc-2642","uc_output":"1f473-1f3fc-200d-2642-fe0f","uc_match":"1f473-1f3fc-2642-fe0f","uc_greedy":"1f473-1f3fc-2642","shortnames":[":man_wearing_turban_medium_light_skin_tone:"],"category":"people"},":man_wearing_turban_tone3:":{"uc_base":"1f473-1f3fd-2642","uc_output":"1f473-1f3fd-200d-2642-fe0f","uc_match":"1f473-1f3fd-2642-fe0f","uc_greedy":"1f473-1f3fd-2642","shortnames":[":man_wearing_turban_medium_skin_tone:"],"category":"people"},":man_wearing_turban_tone4:":{"uc_base":"1f473-1f3fe-2642","uc_output":"1f473-1f3fe-200d-2642-fe0f","uc_match":"1f473-1f3fe-2642-fe0f","uc_greedy":"1f473-1f3fe-2642","shortnames":[":man_wearing_turban_medium_dark_skin_tone:"],"category":"people"},":man_wearing_turban_tone5:":{"uc_base":"1f473-1f3ff-2642","uc_output":"1f473-1f3ff-200d-2642-fe0f","uc_match":"1f473-1f3ff-2642-fe0f","uc_greedy":"1f473-1f3ff-2642","shortnames":[":man_wearing_turban_dark_skin_tone:"],"category":"people"},":mermaid_tone1:":{"uc_base":"1f9dc-1f3fb-2640","uc_output":"1f9dc-1f3fb-200d-2640-fe0f","uc_match":"1f9dc-1f3fb-2640-fe0f","uc_greedy":"1f9dc-1f3fb-2640","shortnames":[":mermaid_light_skin_tone:"],"category":"people"},":mermaid_tone2:":{"uc_base":"1f9dc-1f3fc-2640","uc_output":"1f9dc-1f3fc-200d-2640-fe0f","uc_match":"1f9dc-1f3fc-2640-fe0f","uc_greedy":"1f9dc-1f3fc-2640","shortnames":[":mermaid_medium_light_skin_tone:"],"category":"people"},":mermaid_tone3:":{"uc_base":"1f9dc-1f3fd-2640","uc_output":"1f9dc-1f3fd-200d-2640-fe0f","uc_match":"1f9dc-1f3fd-2640-fe0f","uc_greedy":"1f9dc-1f3fd-2640","shortnames":[":mermaid_medium_skin_tone:"],"category":"people"},":mermaid_tone4:":{"uc_base":"1f9dc-1f3fe-2640","uc_output":"1f9dc-1f3fe-200d-2640-fe0f","uc_match":"1f9dc-1f3fe-2640-fe0f","uc_greedy":"1f9dc-1f3fe-2640","shortnames":[":mermaid_medium_dark_skin_tone:"],"category":"people"},":mermaid_tone5:":{"uc_base":"1f9dc-1f3ff-2640","uc_output":"1f9dc-1f3ff-200d-2640-fe0f","uc_match":"1f9dc-1f3ff-2640-fe0f","uc_greedy":"1f9dc-1f3ff-2640","shortnames":[":mermaid_dark_skin_tone:"],"category":"people"},":merman_tone1:":{"uc_base":"1f9dc-1f3fb-2642","uc_output":"1f9dc-1f3fb-200d-2642-fe0f","uc_match":"1f9dc-1f3fb-2642-fe0f","uc_greedy":"1f9dc-1f3fb-2642","shortnames":[":merman_light_skin_tone:"],"category":"people"},":merman_tone2:":{"uc_base":"1f9dc-1f3fc-2642","uc_output":"1f9dc-1f3fc-200d-2642-fe0f","uc_match":"1f9dc-1f3fc-2642-fe0f","uc_greedy":"1f9dc-1f3fc-2642","shortnames":[":merman_medium_light_skin_tone:"],"category":"people"},":merman_tone3:":{"uc_base":"1f9dc-1f3fd-2642","uc_output":"1f9dc-1f3fd-200d-2642-fe0f","uc_match":"1f9dc-1f3fd-2642-fe0f","uc_greedy":"1f9dc-1f3fd-2642","shortnames":[":merman_medium_skin_tone:"],"category":"people"},":merman_tone4:":{"uc_base":"1f9dc-1f3fe-2642","uc_output":"1f9dc-1f3fe-200d-2642-fe0f","uc_match":"1f9dc-1f3fe-2642-fe0f","uc_greedy":"1f9dc-1f3fe-2642","shortnames":[":merman_medium_dark_skin_tone:"],"category":"people"},":merman_tone5:":{"uc_base":"1f9dc-1f3ff-2642","uc_output":"1f9dc-1f3ff-200d-2642-fe0f","uc_match":"1f9dc-1f3ff-2642-fe0f","uc_greedy":"1f9dc-1f3ff-2642","shortnames":[":merman_dark_skin_tone:"],"category":"people"},":woman_biking_tone1:":{"uc_base":"1f6b4-1f3fb-2640","uc_output":"1f6b4-1f3fb-200d-2640-fe0f","uc_match":"1f6b4-1f3fb-2640-fe0f","uc_greedy":"1f6b4-1f3fb-2640","shortnames":[":woman_biking_light_skin_tone:"],"category":"activity"},":woman_biking_tone2:":{"uc_base":"1f6b4-1f3fc-2640","uc_output":"1f6b4-1f3fc-200d-2640-fe0f","uc_match":"1f6b4-1f3fc-2640-fe0f","uc_greedy":"1f6b4-1f3fc-2640","shortnames":[":woman_biking_medium_light_skin_tone:"],"category":"activity"},":woman_biking_tone3:":{"uc_base":"1f6b4-1f3fd-2640","uc_output":"1f6b4-1f3fd-200d-2640-fe0f","uc_match":"1f6b4-1f3fd-2640-fe0f","uc_greedy":"1f6b4-1f3fd-2640","shortnames":[":woman_biking_medium_skin_tone:"],"category":"activity"},":woman_biking_tone4:":{"uc_base":"1f6b4-1f3fe-2640","uc_output":"1f6b4-1f3fe-200d-2640-fe0f","uc_match":"1f6b4-1f3fe-2640-fe0f","uc_greedy":"1f6b4-1f3fe-2640","shortnames":[":woman_biking_medium_dark_skin_tone:"],"category":"activity"},":woman_biking_tone5:":{"uc_base":"1f6b4-1f3ff-2640","uc_output":"1f6b4-1f3ff-200d-2640-fe0f","uc_match":"1f6b4-1f3ff-2640-fe0f","uc_greedy":"1f6b4-1f3ff-2640","shortnames":[":woman_biking_dark_skin_tone:"],"category":"activity"},":woman_bowing_tone1:":{"uc_base":"1f647-1f3fb-2640","uc_output":"1f647-1f3fb-200d-2640-fe0f","uc_match":"1f647-1f3fb-2640-fe0f","uc_greedy":"1f647-1f3fb-2640","shortnames":[":woman_bowing_light_skin_tone:"],"category":"people"},":woman_bowing_tone2:":{"uc_base":"1f647-1f3fc-2640","uc_output":"1f647-1f3fc-200d-2640-fe0f","uc_match":"1f647-1f3fc-2640-fe0f","uc_greedy":"1f647-1f3fc-2640","shortnames":[":woman_bowing_medium_light_skin_tone:"],"category":"people"},":woman_bowing_tone3:":{"uc_base":"1f647-1f3fd-2640","uc_output":"1f647-1f3fd-200d-2640-fe0f","uc_match":"1f647-1f3fd-2640-fe0f","uc_greedy":"1f647-1f3fd-2640","shortnames":[":woman_bowing_medium_skin_tone:"],"category":"people"},":woman_bowing_tone4:":{"uc_base":"1f647-1f3fe-2640","uc_output":"1f647-1f3fe-200d-2640-fe0f","uc_match":"1f647-1f3fe-2640-fe0f","uc_greedy":"1f647-1f3fe-2640","shortnames":[":woman_bowing_medium_dark_skin_tone:"],"category":"people"},":woman_bowing_tone5:":{"uc_base":"1f647-1f3ff-2640","uc_output":"1f647-1f3ff-200d-2640-fe0f","uc_match":"1f647-1f3ff-2640-fe0f","uc_greedy":"1f647-1f3ff-2640","shortnames":[":woman_bowing_dark_skin_tone:"],"category":"people"},":woman_cartwheeling_tone1:":{"uc_base":"1f938-1f3fb-2640","uc_output":"1f938-1f3fb-200d-2640-fe0f","uc_match":"1f938-1f3fb-2640-fe0f","uc_greedy":"1f938-1f3fb-2640","shortnames":[":woman_cartwheeling_light_skin_tone:"],"category":"activity"},":woman_cartwheeling_tone2:":{"uc_base":"1f938-1f3fc-2640","uc_output":"1f938-1f3fc-200d-2640-fe0f","uc_match":"1f938-1f3fc-2640-fe0f","uc_greedy":"1f938-1f3fc-2640","shortnames":[":woman_cartwheeling_medium_light_skin_tone:"],"category":"activity"},":woman_cartwheeling_tone3:":{"uc_base":"1f938-1f3fd-2640","uc_output":"1f938-1f3fd-200d-2640-fe0f","uc_match":"1f938-1f3fd-2640-fe0f","uc_greedy":"1f938-1f3fd-2640","shortnames":[":woman_cartwheeling_medium_skin_tone:"],"category":"activity"},":woman_cartwheeling_tone4:":{"uc_base":"1f938-1f3fe-2640","uc_output":"1f938-1f3fe-200d-2640-fe0f","uc_match":"1f938-1f3fe-2640-fe0f","uc_greedy":"1f938-1f3fe-2640","shortnames":[":woman_cartwheeling_medium_dark_skin_tone:"],"category":"activity"},":woman_cartwheeling_tone5:":{"uc_base":"1f938-1f3ff-2640","uc_output":"1f938-1f3ff-200d-2640-fe0f","uc_match":"1f938-1f3ff-2640-fe0f","uc_greedy":"1f938-1f3ff-2640","shortnames":[":woman_cartwheeling_dark_skin_tone:"],"category":"activity"},":woman_climbing_tone1:":{"uc_base":"1f9d7-1f3fb-2640","uc_output":"1f9d7-1f3fb-200d-2640-fe0f","uc_match":"1f9d7-1f3fb-2640-fe0f","uc_greedy":"1f9d7-1f3fb-2640","shortnames":[":woman_climbing_light_skin_tone:"],"category":"activity"},":woman_climbing_tone2:":{"uc_base":"1f9d7-1f3fc-2640","uc_output":"1f9d7-1f3fc-200d-2640-fe0f","uc_match":"1f9d7-1f3fc-2640-fe0f","uc_greedy":"1f9d7-1f3fc-2640","shortnames":[":woman_climbing_medium_light_skin_tone:"],"category":"activity"},":woman_climbing_tone3:":{"uc_base":"1f9d7-1f3fd-2640","uc_output":"1f9d7-1f3fd-200d-2640-fe0f","uc_match":"1f9d7-1f3fd-2640-fe0f","uc_greedy":"1f9d7-1f3fd-2640","shortnames":[":woman_climbing_medium_skin_tone:"],"category":"activity"},":woman_climbing_tone4:":{"uc_base":"1f9d7-1f3fe-2640","uc_output":"1f9d7-1f3fe-200d-2640-fe0f","uc_match":"1f9d7-1f3fe-2640-fe0f","uc_greedy":"1f9d7-1f3fe-2640","shortnames":[":woman_climbing_medium_dark_skin_tone:"],"category":"activity"},":woman_climbing_tone5:":{"uc_base":"1f9d7-1f3ff-2640","uc_output":"1f9d7-1f3ff-200d-2640-fe0f","uc_match":"1f9d7-1f3ff-2640-fe0f","uc_greedy":"1f9d7-1f3ff-2640","shortnames":[":woman_climbing_dark_skin_tone:"],"category":"activity"},":woman_construction_worker_tone1:":{"uc_base":"1f477-1f3fb-2640","uc_output":"1f477-1f3fb-200d-2640-fe0f","uc_match":"1f477-1f3fb-2640-fe0f","uc_greedy":"1f477-1f3fb-2640","shortnames":[":woman_construction_worker_light_skin_tone:"],"category":"people"},":woman_construction_worker_tone2:":{"uc_base":"1f477-1f3fc-2640","uc_output":"1f477-1f3fc-200d-2640-fe0f","uc_match":"1f477-1f3fc-2640-fe0f","uc_greedy":"1f477-1f3fc-2640","shortnames":[":woman_construction_worker_medium_light_skin_tone:"],"category":"people"},":woman_construction_worker_tone3:":{"uc_base":"1f477-1f3fd-2640","uc_output":"1f477-1f3fd-200d-2640-fe0f","uc_match":"1f477-1f3fd-2640-fe0f","uc_greedy":"1f477-1f3fd-2640","shortnames":[":woman_construction_worker_medium_skin_tone:"],"category":"people"},":woman_construction_worker_tone4:":{"uc_base":"1f477-1f3fe-2640","uc_output":"1f477-1f3fe-200d-2640-fe0f","uc_match":"1f477-1f3fe-2640-fe0f","uc_greedy":"1f477-1f3fe-2640","shortnames":[":woman_construction_worker_medium_dark_skin_tone:"],"category":"people"},":woman_construction_worker_tone5:":{"uc_base":"1f477-1f3ff-2640","uc_output":"1f477-1f3ff-200d-2640-fe0f","uc_match":"1f477-1f3ff-2640-fe0f","uc_greedy":"1f477-1f3ff-2640","shortnames":[":woman_construction_worker_dark_skin_tone:"],"category":"people"},":woman_detective_tone1:":{"uc_base":"1f575-1f3fb-2640","uc_output":"1f575-1f3fb-200d-2640-fe0f","uc_match":"1f575-fe0f-1f3fb-2640-fe0f","uc_greedy":"1f575-1f3fb-2640","shortnames":[":woman_detective_light_skin_tone:"],"category":"people"},":woman_detective_tone2:":{"uc_base":"1f575-1f3fc-2640","uc_output":"1f575-1f3fc-200d-2640-fe0f","uc_match":"1f575-fe0f-1f3fc-2640-fe0f","uc_greedy":"1f575-1f3fc-2640","shortnames":[":woman_detective_medium_light_skin_tone:"],"category":"people"},":woman_detective_tone3:":{"uc_base":"1f575-1f3fd-2640","uc_output":"1f575-1f3fd-200d-2640-fe0f","uc_match":"1f575-fe0f-1f3fd-2640-fe0f","uc_greedy":"1f575-1f3fd-2640","shortnames":[":woman_detective_medium_skin_tone:"],"category":"people"},":woman_detective_tone4:":{"uc_base":"1f575-1f3fe-2640","uc_output":"1f575-1f3fe-200d-2640-fe0f","uc_match":"1f575-fe0f-1f3fe-2640-fe0f","uc_greedy":"1f575-1f3fe-2640","shortnames":[":woman_detective_medium_dark_skin_tone:"],"category":"people"},":woman_detective_tone5:":{"uc_base":"1f575-1f3ff-2640","uc_output":"1f575-1f3ff-200d-2640-fe0f","uc_match":"1f575-fe0f-1f3ff-2640-fe0f","uc_greedy":"1f575-1f3ff-2640","shortnames":[":woman_detective_dark_skin_tone:"],"category":"people"},":woman_elf_tone1:":{"uc_base":"1f9dd-1f3fb-2640","uc_output":"1f9dd-1f3fb-200d-2640-fe0f","uc_match":"1f9dd-1f3fb-2640-fe0f","uc_greedy":"1f9dd-1f3fb-2640","shortnames":[":woman_elf_light_skin_tone:"],"category":"people"},":woman_elf_tone2:":{"uc_base":"1f9dd-1f3fc-2640","uc_output":"1f9dd-1f3fc-200d-2640-fe0f","uc_match":"1f9dd-1f3fc-2640-fe0f","uc_greedy":"1f9dd-1f3fc-2640","shortnames":[":woman_elf_medium_light_skin_tone:"],"category":"people"},":woman_elf_tone3:":{"uc_base":"1f9dd-1f3fd-2640","uc_output":"1f9dd-1f3fd-200d-2640-fe0f","uc_match":"1f9dd-1f3fd-2640-fe0f","uc_greedy":"1f9dd-1f3fd-2640","shortnames":[":woman_elf_medium_skin_tone:"],"category":"people"},":woman_elf_tone4:":{"uc_base":"1f9dd-1f3fe-2640","uc_output":"1f9dd-1f3fe-200d-2640-fe0f","uc_match":"1f9dd-1f3fe-2640-fe0f","uc_greedy":"1f9dd-1f3fe-2640","shortnames":[":woman_elf_medium_dark_skin_tone:"],"category":"people"},":woman_elf_tone5:":{"uc_base":"1f9dd-1f3ff-2640","uc_output":"1f9dd-1f3ff-200d-2640-fe0f","uc_match":"1f9dd-1f3ff-2640-fe0f","uc_greedy":"1f9dd-1f3ff-2640","shortnames":[":woman_elf_dark_skin_tone:"],"category":"people"},":woman_facepalming_tone1:":{"uc_base":"1f926-1f3fb-2640","uc_output":"1f926-1f3fb-200d-2640-fe0f","uc_match":"1f926-1f3fb-2640-fe0f","uc_greedy":"1f926-1f3fb-2640","shortnames":[":woman_facepalming_light_skin_tone:"],"category":"people"},":woman_facepalming_tone2:":{"uc_base":"1f926-1f3fc-2640","uc_output":"1f926-1f3fc-200d-2640-fe0f","uc_match":"1f926-1f3fc-2640-fe0f","uc_greedy":"1f926-1f3fc-2640","shortnames":[":woman_facepalming_medium_light_skin_tone:"],"category":"people"},":woman_facepalming_tone3:":{"uc_base":"1f926-1f3fd-2640","uc_output":"1f926-1f3fd-200d-2640-fe0f","uc_match":"1f926-1f3fd-2640-fe0f","uc_greedy":"1f926-1f3fd-2640","shortnames":[":woman_facepalming_medium_skin_tone:"],"category":"people"},":woman_facepalming_tone4:":{"uc_base":"1f926-1f3fe-2640","uc_output":"1f926-1f3fe-200d-2640-fe0f","uc_match":"1f926-1f3fe-2640-fe0f","uc_greedy":"1f926-1f3fe-2640","shortnames":[":woman_facepalming_medium_dark_skin_tone:"],"category":"people"},":woman_facepalming_tone5:":{"uc_base":"1f926-1f3ff-2640","uc_output":"1f926-1f3ff-200d-2640-fe0f","uc_match":"1f926-1f3ff-2640-fe0f","uc_greedy":"1f926-1f3ff-2640","shortnames":[":woman_facepalming_dark_skin_tone:"],"category":"people"},":woman_fairy_tone1:":{"uc_base":"1f9da-1f3fb-2640","uc_output":"1f9da-1f3fb-200d-2640-fe0f","uc_match":"1f9da-1f3fb-2640-fe0f","uc_greedy":"1f9da-1f3fb-2640","shortnames":[":woman_fairy_light_skin_tone:"],"category":"people"},":woman_fairy_tone2:":{"uc_base":"1f9da-1f3fc-2640","uc_output":"1f9da-1f3fc-200d-2640-fe0f","uc_match":"1f9da-1f3fc-2640-fe0f","uc_greedy":"1f9da-1f3fc-2640","shortnames":[":woman_fairy_medium_light_skin_tone:"],"category":"people"},":woman_fairy_tone3:":{"uc_base":"1f9da-1f3fd-2640","uc_output":"1f9da-1f3fd-200d-2640-fe0f","uc_match":"1f9da-1f3fd-2640-fe0f","uc_greedy":"1f9da-1f3fd-2640","shortnames":[":woman_fairy_medium_skin_tone:"],"category":"people"},":woman_fairy_tone4:":{"uc_base":"1f9da-1f3fe-2640","uc_output":"1f9da-1f3fe-200d-2640-fe0f","uc_match":"1f9da-1f3fe-2640-fe0f","uc_greedy":"1f9da-1f3fe-2640","shortnames":[":woman_fairy_medium_dark_skin_tone:"],"category":"people"},":woman_fairy_tone5:":{"uc_base":"1f9da-1f3ff-2640","uc_output":"1f9da-1f3ff-200d-2640-fe0f","uc_match":"1f9da-1f3ff-2640-fe0f","uc_greedy":"1f9da-1f3ff-2640","shortnames":[":woman_fairy_dark_skin_tone:"],"category":"people"},":woman_frowning_tone1:":{"uc_base":"1f64d-1f3fb-2640","uc_output":"1f64d-1f3fb-200d-2640-fe0f","uc_match":"1f64d-1f3fb-2640-fe0f","uc_greedy":"1f64d-1f3fb-2640","shortnames":[":woman_frowning_light_skin_tone:"],"category":"people"},":woman_frowning_tone2:":{"uc_base":"1f64d-1f3fc-2640","uc_output":"1f64d-1f3fc-200d-2640-fe0f","uc_match":"1f64d-1f3fc-2640-fe0f","uc_greedy":"1f64d-1f3fc-2640","shortnames":[":woman_frowning_medium_light_skin_tone:"],"category":"people"},":woman_frowning_tone3:":{"uc_base":"1f64d-1f3fd-2640","uc_output":"1f64d-1f3fd-200d-2640-fe0f","uc_match":"1f64d-1f3fd-2640-fe0f","uc_greedy":"1f64d-1f3fd-2640","shortnames":[":woman_frowning_medium_skin_tone:"],"category":"people"},":woman_frowning_tone4:":{"uc_base":"1f64d-1f3fe-2640","uc_output":"1f64d-1f3fe-200d-2640-fe0f","uc_match":"1f64d-1f3fe-2640-fe0f","uc_greedy":"1f64d-1f3fe-2640","shortnames":[":woman_frowning_medium_dark_skin_tone:"],"category":"people"},":woman_frowning_tone5:":{"uc_base":"1f64d-1f3ff-2640","uc_output":"1f64d-1f3ff-200d-2640-fe0f","uc_match":"1f64d-1f3ff-2640-fe0f","uc_greedy":"1f64d-1f3ff-2640","shortnames":[":woman_frowning_dark_skin_tone:"],"category":"people"},":woman_gesturing_no_tone1:":{"uc_base":"1f645-1f3fb-2640","uc_output":"1f645-1f3fb-200d-2640-fe0f","uc_match":"1f645-1f3fb-2640-fe0f","uc_greedy":"1f645-1f3fb-2640","shortnames":[":woman_gesturing_no_light_skin_tone:"],"category":"people"},":woman_gesturing_no_tone2:":{"uc_base":"1f645-1f3fc-2640","uc_output":"1f645-1f3fc-200d-2640-fe0f","uc_match":"1f645-1f3fc-2640-fe0f","uc_greedy":"1f645-1f3fc-2640","shortnames":[":woman_gesturing_no_medium_light_skin_tone:"],"category":"people"},":woman_gesturing_no_tone3:":{"uc_base":"1f645-1f3fd-2640","uc_output":"1f645-1f3fd-200d-2640-fe0f","uc_match":"1f645-1f3fd-2640-fe0f","uc_greedy":"1f645-1f3fd-2640","shortnames":[":woman_gesturing_no_medium_skin_tone:"],"category":"people"},":woman_gesturing_no_tone4:":{"uc_base":"1f645-1f3fe-2640","uc_output":"1f645-1f3fe-200d-2640-fe0f","uc_match":"1f645-1f3fe-2640-fe0f","uc_greedy":"1f645-1f3fe-2640","shortnames":[":woman_gesturing_no_medium_dark_skin_tone:"],"category":"people"},":woman_gesturing_no_tone5:":{"uc_base":"1f645-1f3ff-2640","uc_output":"1f645-1f3ff-200d-2640-fe0f","uc_match":"1f645-1f3ff-2640-fe0f","uc_greedy":"1f645-1f3ff-2640","shortnames":[":woman_gesturing_no_dark_skin_tone:"],"category":"people"},":woman_gesturing_ok_tone1:":{"uc_base":"1f646-1f3fb-2640","uc_output":"1f646-1f3fb-200d-2640-fe0f","uc_match":"1f646-1f3fb-2640-fe0f","uc_greedy":"1f646-1f3fb-2640","shortnames":[":woman_gesturing_ok_light_skin_tone:"],"category":"people"},":woman_gesturing_ok_tone2:":{"uc_base":"1f646-1f3fc-2640","uc_output":"1f646-1f3fc-200d-2640-fe0f","uc_match":"1f646-1f3fc-2640-fe0f","uc_greedy":"1f646-1f3fc-2640","shortnames":[":woman_gesturing_ok_medium_light_skin_tone:"],"category":"people"},":woman_gesturing_ok_tone3:":{"uc_base":"1f646-1f3fd-2640","uc_output":"1f646-1f3fd-200d-2640-fe0f","uc_match":"1f646-1f3fd-2640-fe0f","uc_greedy":"1f646-1f3fd-2640","shortnames":[":woman_gesturing_ok_medium_skin_tone:"],"category":"people"},":woman_gesturing_ok_tone4:":{"uc_base":"1f646-1f3fe-2640","uc_output":"1f646-1f3fe-200d-2640-fe0f","uc_match":"1f646-1f3fe-2640-fe0f","uc_greedy":"1f646-1f3fe-2640","shortnames":[":woman_gesturing_ok_medium_dark_skin_tone:"],"category":"people"},":woman_gesturing_ok_tone5:":{"uc_base":"1f646-1f3ff-2640","uc_output":"1f646-1f3ff-200d-2640-fe0f","uc_match":"1f646-1f3ff-2640-fe0f","uc_greedy":"1f646-1f3ff-2640","shortnames":[":woman_gesturing_ok_dark_skin_tone:"],"category":"people"},":woman_getting_face_massage_tone1:":{"uc_base":"1f486-1f3fb-2640","uc_output":"1f486-1f3fb-200d-2640-fe0f","uc_match":"1f486-1f3fb-2640-fe0f","uc_greedy":"1f486-1f3fb-2640","shortnames":[":woman_getting_face_massage_light_skin_tone:"],"category":"people"},":woman_getting_face_massage_tone2:":{"uc_base":"1f486-1f3fc-2640","uc_output":"1f486-1f3fc-200d-2640-fe0f","uc_match":"1f486-1f3fc-2640-fe0f","uc_greedy":"1f486-1f3fc-2640","shortnames":[":woman_getting_face_massage_medium_light_skin_tone:"],"category":"people"},":woman_getting_face_massage_tone3:":{"uc_base":"1f486-1f3fd-2640","uc_output":"1f486-1f3fd-200d-2640-fe0f","uc_match":"1f486-1f3fd-2640-fe0f","uc_greedy":"1f486-1f3fd-2640","shortnames":[":woman_getting_face_massage_medium_skin_tone:"],"category":"people"},":woman_getting_face_massage_tone4:":{"uc_base":"1f486-1f3fe-2640","uc_output":"1f486-1f3fe-200d-2640-fe0f","uc_match":"1f486-1f3fe-2640-fe0f","uc_greedy":"1f486-1f3fe-2640","shortnames":[":woman_getting_face_massage_medium_dark_skin_tone:"],"category":"people"},":woman_getting_face_massage_tone5:":{"uc_base":"1f486-1f3ff-2640","uc_output":"1f486-1f3ff-200d-2640-fe0f","uc_match":"1f486-1f3ff-2640-fe0f","uc_greedy":"1f486-1f3ff-2640","shortnames":[":woman_getting_face_massage_dark_skin_tone:"],"category":"people"},":woman_getting_haircut_tone1:":{"uc_base":"1f487-1f3fb-2640","uc_output":"1f487-1f3fb-200d-2640-fe0f","uc_match":"1f487-1f3fb-2640-fe0f","uc_greedy":"1f487-1f3fb-2640","shortnames":[":woman_getting_haircut_light_skin_tone:"],"category":"people"},":woman_getting_haircut_tone2:":{"uc_base":"1f487-1f3fc-2640","uc_output":"1f487-1f3fc-200d-2640-fe0f","uc_match":"1f487-1f3fc-2640-fe0f","uc_greedy":"1f487-1f3fc-2640","shortnames":[":woman_getting_haircut_medium_light_skin_tone:"],"category":"people"},":woman_getting_haircut_tone3:":{"uc_base":"1f487-1f3fd-2640","uc_output":"1f487-1f3fd-200d-2640-fe0f","uc_match":"1f487-1f3fd-2640-fe0f","uc_greedy":"1f487-1f3fd-2640","shortnames":[":woman_getting_haircut_medium_skin_tone:"],"category":"people"},":woman_getting_haircut_tone4:":{"uc_base":"1f487-1f3fe-2640","uc_output":"1f487-1f3fe-200d-2640-fe0f","uc_match":"1f487-1f3fe-2640-fe0f","uc_greedy":"1f487-1f3fe-2640","shortnames":[":woman_getting_haircut_medium_dark_skin_tone:"],"category":"people"},":woman_getting_haircut_tone5:":{"uc_base":"1f487-1f3ff-2640","uc_output":"1f487-1f3ff-200d-2640-fe0f","uc_match":"1f487-1f3ff-2640-fe0f","uc_greedy":"1f487-1f3ff-2640","shortnames":[":woman_getting_haircut_dark_skin_tone:"],"category":"people"},":woman_golfing_tone1:":{"uc_base":"1f3cc-1f3fb-2640","uc_output":"1f3cc-1f3fb-200d-2640-fe0f","uc_match":"1f3cc-fe0f-1f3fb-2640-fe0f","uc_greedy":"1f3cc-1f3fb-2640","shortnames":[":woman_golfing_light_skin_tone:"],"category":"activity"},":woman_golfing_tone2:":{"uc_base":"1f3cc-1f3fc-2640","uc_output":"1f3cc-1f3fc-200d-2640-fe0f","uc_match":"1f3cc-fe0f-1f3fc-2640-fe0f","uc_greedy":"1f3cc-1f3fc-2640","shortnames":[":woman_golfing_medium_light_skin_tone:"],"category":"activity"},":woman_golfing_tone3:":{"uc_base":"1f3cc-1f3fd-2640","uc_output":"1f3cc-1f3fd-200d-2640-fe0f","uc_match":"1f3cc-fe0f-1f3fd-2640-fe0f","uc_greedy":"1f3cc-1f3fd-2640","shortnames":[":woman_golfing_medium_skin_tone:"],"category":"activity"},":woman_golfing_tone4:":{"uc_base":"1f3cc-1f3fe-2640","uc_output":"1f3cc-1f3fe-200d-2640-fe0f","uc_match":"1f3cc-fe0f-1f3fe-2640-fe0f","uc_greedy":"1f3cc-1f3fe-2640","shortnames":[":woman_golfing_medium_dark_skin_tone:"],"category":"activity"},":woman_golfing_tone5:":{"uc_base":"1f3cc-1f3ff-2640","uc_output":"1f3cc-1f3ff-200d-2640-fe0f","uc_match":"1f3cc-fe0f-1f3ff-2640-fe0f","uc_greedy":"1f3cc-1f3ff-2640","shortnames":[":woman_golfing_dark_skin_tone:"],"category":"activity"},":woman_guard_tone1:":{"uc_base":"1f482-1f3fb-2640","uc_output":"1f482-1f3fb-200d-2640-fe0f","uc_match":"1f482-1f3fb-2640-fe0f","uc_greedy":"1f482-1f3fb-2640","shortnames":[":woman_guard_light_skin_tone:"],"category":"people"},":woman_guard_tone2:":{"uc_base":"1f482-1f3fc-2640","uc_output":"1f482-1f3fc-200d-2640-fe0f","uc_match":"1f482-1f3fc-2640-fe0f","uc_greedy":"1f482-1f3fc-2640","shortnames":[":woman_guard_medium_light_skin_tone:"],"category":"people"},":woman_guard_tone3:":{"uc_base":"1f482-1f3fd-2640","uc_output":"1f482-1f3fd-200d-2640-fe0f","uc_match":"1f482-1f3fd-2640-fe0f","uc_greedy":"1f482-1f3fd-2640","shortnames":[":woman_guard_medium_skin_tone:"],"category":"people"},":woman_guard_tone4:":{"uc_base":"1f482-1f3fe-2640","uc_output":"1f482-1f3fe-200d-2640-fe0f","uc_match":"1f482-1f3fe-2640-fe0f","uc_greedy":"1f482-1f3fe-2640","shortnames":[":woman_guard_medium_dark_skin_tone:"],"category":"people"},":woman_guard_tone5:":{"uc_base":"1f482-1f3ff-2640","uc_output":"1f482-1f3ff-200d-2640-fe0f","uc_match":"1f482-1f3ff-2640-fe0f","uc_greedy":"1f482-1f3ff-2640","shortnames":[":woman_guard_dark_skin_tone:"],"category":"people"},":woman_health_worker_tone1:":{"uc_base":"1f469-1f3fb-2695","uc_output":"1f469-1f3fb-200d-2695-fe0f","uc_match":"1f469-1f3fb-2695-fe0f","uc_greedy":"1f469-1f3fb-2695","shortnames":[":woman_health_worker_light_skin_tone:"],"category":"people"},":woman_health_worker_tone2:":{"uc_base":"1f469-1f3fc-2695","uc_output":"1f469-1f3fc-200d-2695-fe0f","uc_match":"1f469-1f3fc-2695-fe0f","uc_greedy":"1f469-1f3fc-2695","shortnames":[":woman_health_worker_medium_light_skin_tone:"],"category":"people"},":woman_health_worker_tone3:":{"uc_base":"1f469-1f3fd-2695","uc_output":"1f469-1f3fd-200d-2695-fe0f","uc_match":"1f469-1f3fd-2695-fe0f","uc_greedy":"1f469-1f3fd-2695","shortnames":[":woman_health_worker_medium_skin_tone:"],"category":"people"},":woman_health_worker_tone4:":{"uc_base":"1f469-1f3fe-2695","uc_output":"1f469-1f3fe-200d-2695-fe0f","uc_match":"1f469-1f3fe-2695-fe0f","uc_greedy":"1f469-1f3fe-2695","shortnames":[":woman_health_worker_medium_dark_skin_tone:"],"category":"people"},":woman_health_worker_tone5:":{"uc_base":"1f469-1f3ff-2695","uc_output":"1f469-1f3ff-200d-2695-fe0f","uc_match":"1f469-1f3ff-2695-fe0f","uc_greedy":"1f469-1f3ff-2695","shortnames":[":woman_health_worker_dark_skin_tone:"],"category":"people"},":woman_in_lotus_position_tone1:":{"uc_base":"1f9d8-1f3fb-2640","uc_output":"1f9d8-1f3fb-200d-2640-fe0f","uc_match":"1f9d8-1f3fb-2640-fe0f","uc_greedy":"1f9d8-1f3fb-2640","shortnames":[":woman_in_lotus_position_light_skin_tone:"],"category":"activity"},":woman_in_lotus_position_tone2:":{"uc_base":"1f9d8-1f3fc-2640","uc_output":"1f9d8-1f3fc-200d-2640-fe0f","uc_match":"1f9d8-1f3fc-2640-fe0f","uc_greedy":"1f9d8-1f3fc-2640","shortnames":[":woman_in_lotus_position_medium_light_skin_tone:"],"category":"activity"},":woman_in_lotus_position_tone3:":{"uc_base":"1f9d8-1f3fd-2640","uc_output":"1f9d8-1f3fd-200d-2640-fe0f","uc_match":"1f9d8-1f3fd-2640-fe0f","uc_greedy":"1f9d8-1f3fd-2640","shortnames":[":woman_in_lotus_position_medium_skin_tone:"],"category":"activity"},":woman_in_lotus_position_tone4:":{"uc_base":"1f9d8-1f3fe-2640","uc_output":"1f9d8-1f3fe-200d-2640-fe0f","uc_match":"1f9d8-1f3fe-2640-fe0f","uc_greedy":"1f9d8-1f3fe-2640","shortnames":[":woman_in_lotus_position_medium_dark_skin_tone:"],"category":"activity"},":woman_in_lotus_position_tone5:":{"uc_base":"1f9d8-1f3ff-2640","uc_output":"1f9d8-1f3ff-200d-2640-fe0f","uc_match":"1f9d8-1f3ff-2640-fe0f","uc_greedy":"1f9d8-1f3ff-2640","shortnames":[":woman_in_lotus_position_dark_skin_tone:"],"category":"activity"},":woman_in_steamy_room_tone1:":{"uc_base":"1f9d6-1f3fb-2640","uc_output":"1f9d6-1f3fb-200d-2640-fe0f","uc_match":"1f9d6-1f3fb-2640-fe0f","uc_greedy":"1f9d6-1f3fb-2640","shortnames":[":woman_in_steamy_room_light_skin_tone:"],"category":"activity"},":woman_in_steamy_room_tone2:":{"uc_base":"1f9d6-1f3fc-2640","uc_output":"1f9d6-1f3fc-200d-2640-fe0f","uc_match":"1f9d6-1f3fc-2640-fe0f","uc_greedy":"1f9d6-1f3fc-2640","shortnames":[":woman_in_steamy_room_medium_light_skin_tone:"],"category":"activity"},":woman_in_steamy_room_tone3:":{"uc_base":"1f9d6-1f3fd-2640","uc_output":"1f9d6-1f3fd-200d-2640-fe0f","uc_match":"1f9d6-1f3fd-2640-fe0f","uc_greedy":"1f9d6-1f3fd-2640","shortnames":[":woman_in_steamy_room_medium_skin_tone:"],"category":"activity"},":woman_in_steamy_room_tone4:":{"uc_base":"1f9d6-1f3fe-2640","uc_output":"1f9d6-1f3fe-200d-2640-fe0f","uc_match":"1f9d6-1f3fe-2640-fe0f","uc_greedy":"1f9d6-1f3fe-2640","shortnames":[":woman_in_steamy_room_medium_dark_skin_tone:"],"category":"activity"},":woman_in_steamy_room_tone5:":{"uc_base":"1f9d6-1f3ff-2640","uc_output":"1f9d6-1f3ff-200d-2640-fe0f","uc_match":"1f9d6-1f3ff-2640-fe0f","uc_greedy":"1f9d6-1f3ff-2640","shortnames":[":woman_in_steamy_room_dark_skin_tone:"],"category":"activity"},":woman_judge_tone1:":{"uc_base":"1f469-1f3fb-2696","uc_output":"1f469-1f3fb-200d-2696-fe0f","uc_match":"1f469-1f3fb-2696-fe0f","uc_greedy":"1f469-1f3fb-2696","shortnames":[":woman_judge_light_skin_tone:"],"category":"people"},":woman_judge_tone2:":{"uc_base":"1f469-1f3fc-2696","uc_output":"1f469-1f3fc-200d-2696-fe0f","uc_match":"1f469-1f3fc-2696-fe0f","uc_greedy":"1f469-1f3fc-2696","shortnames":[":woman_judge_medium_light_skin_tone:"],"category":"people"},":woman_judge_tone3:":{"uc_base":"1f469-1f3fd-2696","uc_output":"1f469-1f3fd-200d-2696-fe0f","uc_match":"1f469-1f3fd-2696-fe0f","uc_greedy":"1f469-1f3fd-2696","shortnames":[":woman_judge_medium_skin_tone:"],"category":"people"},":woman_judge_tone4:":{"uc_base":"1f469-1f3fe-2696","uc_output":"1f469-1f3fe-200d-2696-fe0f","uc_match":"1f469-1f3fe-2696-fe0f","uc_greedy":"1f469-1f3fe-2696","shortnames":[":woman_judge_medium_dark_skin_tone:"],"category":"people"},":woman_judge_tone5:":{"uc_base":"1f469-1f3ff-2696","uc_output":"1f469-1f3ff-200d-2696-fe0f","uc_match":"1f469-1f3ff-2696-fe0f","uc_greedy":"1f469-1f3ff-2696","shortnames":[":woman_judge_dark_skin_tone:"],"category":"people"},":woman_juggling_tone1:":{"uc_base":"1f939-1f3fb-2640","uc_output":"1f939-1f3fb-200d-2640-fe0f","uc_match":"1f939-1f3fb-2640-fe0f","uc_greedy":"1f939-1f3fb-2640","shortnames":[":woman_juggling_light_skin_tone:"],"category":"activity"},":woman_juggling_tone2:":{"uc_base":"1f939-1f3fc-2640","uc_output":"1f939-1f3fc-200d-2640-fe0f","uc_match":"1f939-1f3fc-2640-fe0f","uc_greedy":"1f939-1f3fc-2640","shortnames":[":woman_juggling_medium_light_skin_tone:"],"category":"activity"},":woman_juggling_tone3:":{"uc_base":"1f939-1f3fd-2640","uc_output":"1f939-1f3fd-200d-2640-fe0f","uc_match":"1f939-1f3fd-2640-fe0f","uc_greedy":"1f939-1f3fd-2640","shortnames":[":woman_juggling_medium_skin_tone:"],"category":"activity"},":woman_juggling_tone4:":{"uc_base":"1f939-1f3fe-2640","uc_output":"1f939-1f3fe-200d-2640-fe0f","uc_match":"1f939-1f3fe-2640-fe0f","uc_greedy":"1f939-1f3fe-2640","shortnames":[":woman_juggling_medium_dark_skin_tone:"],"category":"activity"},":woman_juggling_tone5:":{"uc_base":"1f939-1f3ff-2640","uc_output":"1f939-1f3ff-200d-2640-fe0f","uc_match":"1f939-1f3ff-2640-fe0f","uc_greedy":"1f939-1f3ff-2640","shortnames":[":woman_juggling_dark_skin_tone:"],"category":"activity"},":woman_lifting_weights_tone1:":{"uc_base":"1f3cb-1f3fb-2640","uc_output":"1f3cb-1f3fb-200d-2640-fe0f","uc_match":"1f3cb-fe0f-1f3fb-2640-fe0f","uc_greedy":"1f3cb-1f3fb-2640","shortnames":[":woman_lifting_weights_light_skin_tone:"],"category":"activity"},":woman_lifting_weights_tone2:":{"uc_base":"1f3cb-1f3fc-2640","uc_output":"1f3cb-1f3fc-200d-2640-fe0f","uc_match":"1f3cb-fe0f-1f3fc-2640-fe0f","uc_greedy":"1f3cb-1f3fc-2640","shortnames":[":woman_lifting_weights_medium_light_skin_tone:"],"category":"activity"},":woman_lifting_weights_tone3:":{"uc_base":"1f3cb-1f3fd-2640","uc_output":"1f3cb-1f3fd-200d-2640-fe0f","uc_match":"1f3cb-fe0f-1f3fd-2640-fe0f","uc_greedy":"1f3cb-1f3fd-2640","shortnames":[":woman_lifting_weights_medium_skin_tone:"],"category":"activity"},":woman_lifting_weights_tone4:":{"uc_base":"1f3cb-1f3fe-2640","uc_output":"1f3cb-1f3fe-200d-2640-fe0f","uc_match":"1f3cb-fe0f-1f3fe-2640-fe0f","uc_greedy":"1f3cb-1f3fe-2640","shortnames":[":woman_lifting_weights_medium_dark_skin_tone:"],"category":"activity"},":woman_lifting_weights_tone5:":{"uc_base":"1f3cb-1f3ff-2640","uc_output":"1f3cb-1f3ff-200d-2640-fe0f","uc_match":"1f3cb-fe0f-1f3ff-2640-fe0f","uc_greedy":"1f3cb-1f3ff-2640","shortnames":[":woman_lifting_weights_dark_skin_tone:"],"category":"activity"},":woman_mage_tone1:":{"uc_base":"1f9d9-1f3fb-2640","uc_output":"1f9d9-1f3fb-200d-2640-fe0f","uc_match":"1f9d9-1f3fb-2640-fe0f","uc_greedy":"1f9d9-1f3fb-2640","shortnames":[":woman_mage_light_skin_tone:"],"category":"people"},":woman_mage_tone2:":{"uc_base":"1f9d9-1f3fc-2640","uc_output":"1f9d9-1f3fc-200d-2640-fe0f","uc_match":"1f9d9-1f3fc-2640-fe0f","uc_greedy":"1f9d9-1f3fc-2640","shortnames":[":woman_mage_medium_light_skin_tone:"],"category":"people"},":woman_mage_tone3:":{"uc_base":"1f9d9-1f3fd-2640","uc_output":"1f9d9-1f3fd-200d-2640-fe0f","uc_match":"1f9d9-1f3fd-2640-fe0f","uc_greedy":"1f9d9-1f3fd-2640","shortnames":[":woman_mage_medium_skin_tone:"],"category":"people"},":woman_mage_tone4:":{"uc_base":"1f9d9-1f3fe-2640","uc_output":"1f9d9-1f3fe-200d-2640-fe0f","uc_match":"1f9d9-1f3fe-2640-fe0f","uc_greedy":"1f9d9-1f3fe-2640","shortnames":[":woman_mage_medium_dark_skin_tone:"],"category":"people"},":woman_mage_tone5:":{"uc_base":"1f9d9-1f3ff-2640","uc_output":"1f9d9-1f3ff-200d-2640-fe0f","uc_match":"1f9d9-1f3ff-2640-fe0f","uc_greedy":"1f9d9-1f3ff-2640","shortnames":[":woman_mage_dark_skin_tone:"],"category":"people"},":woman_mountain_biking_tone1:":{"uc_base":"1f6b5-1f3fb-2640","uc_output":"1f6b5-1f3fb-200d-2640-fe0f","uc_match":"1f6b5-1f3fb-2640-fe0f","uc_greedy":"1f6b5-1f3fb-2640","shortnames":[":woman_mountain_biking_light_skin_tone:"],"category":"activity"},":woman_mountain_biking_tone2:":{"uc_base":"1f6b5-1f3fc-2640","uc_output":"1f6b5-1f3fc-200d-2640-fe0f","uc_match":"1f6b5-1f3fc-2640-fe0f","uc_greedy":"1f6b5-1f3fc-2640","shortnames":[":woman_mountain_biking_medium_light_skin_tone:"],"category":"activity"},":woman_mountain_biking_tone3:":{"uc_base":"1f6b5-1f3fd-2640","uc_output":"1f6b5-1f3fd-200d-2640-fe0f","uc_match":"1f6b5-1f3fd-2640-fe0f","uc_greedy":"1f6b5-1f3fd-2640","shortnames":[":woman_mountain_biking_medium_skin_tone:"],"category":"activity"},":woman_mountain_biking_tone4:":{"uc_base":"1f6b5-1f3fe-2640","uc_output":"1f6b5-1f3fe-200d-2640-fe0f","uc_match":"1f6b5-1f3fe-2640-fe0f","uc_greedy":"1f6b5-1f3fe-2640","shortnames":[":woman_mountain_biking_medium_dark_skin_tone:"],"category":"activity"},":woman_mountain_biking_tone5:":{"uc_base":"1f6b5-1f3ff-2640","uc_output":"1f6b5-1f3ff-200d-2640-fe0f","uc_match":"1f6b5-1f3ff-2640-fe0f","uc_greedy":"1f6b5-1f3ff-2640","shortnames":[":woman_mountain_biking_dark_skin_tone:"],"category":"activity"},":woman_pilot_tone1:":{"uc_base":"1f469-1f3fb-2708","uc_output":"1f469-1f3fb-200d-2708-fe0f","uc_match":"1f469-1f3fb-2708-fe0f","uc_greedy":"1f469-1f3fb-2708","shortnames":[":woman_pilot_light_skin_tone:"],"category":"people"},":woman_pilot_tone2:":{"uc_base":"1f469-1f3fc-2708","uc_output":"1f469-1f3fc-200d-2708-fe0f","uc_match":"1f469-1f3fc-2708-fe0f","uc_greedy":"1f469-1f3fc-2708","shortnames":[":woman_pilot_medium_light_skin_tone:"],"category":"people"},":woman_pilot_tone3:":{"uc_base":"1f469-1f3fd-2708","uc_output":"1f469-1f3fd-200d-2708-fe0f","uc_match":"1f469-1f3fd-2708-fe0f","uc_greedy":"1f469-1f3fd-2708","shortnames":[":woman_pilot_medium_skin_tone:"],"category":"people"},":woman_pilot_tone4:":{"uc_base":"1f469-1f3fe-2708","uc_output":"1f469-1f3fe-200d-2708-fe0f","uc_match":"1f469-1f3fe-2708-fe0f","uc_greedy":"1f469-1f3fe-2708","shortnames":[":woman_pilot_medium_dark_skin_tone:"],"category":"people"},":woman_pilot_tone5:":{"uc_base":"1f469-1f3ff-2708","uc_output":"1f469-1f3ff-200d-2708-fe0f","uc_match":"1f469-1f3ff-2708-fe0f","uc_greedy":"1f469-1f3ff-2708","shortnames":[":woman_pilot_dark_skin_tone:"],"category":"people"},":woman_playing_handball_tone1:":{"uc_base":"1f93e-1f3fb-2640","uc_output":"1f93e-1f3fb-200d-2640-fe0f","uc_match":"1f93e-1f3fb-2640-fe0f","uc_greedy":"1f93e-1f3fb-2640","shortnames":[":woman_playing_handball_light_skin_tone:"],"category":"activity"},":woman_playing_handball_tone2:":{"uc_base":"1f93e-1f3fc-2640","uc_output":"1f93e-1f3fc-200d-2640-fe0f","uc_match":"1f93e-1f3fc-2640-fe0f","uc_greedy":"1f93e-1f3fc-2640","shortnames":[":woman_playing_handball_medium_light_skin_tone:"],"category":"activity"},":woman_playing_handball_tone3:":{"uc_base":"1f93e-1f3fd-2640","uc_output":"1f93e-1f3fd-200d-2640-fe0f","uc_match":"1f93e-1f3fd-2640-fe0f","uc_greedy":"1f93e-1f3fd-2640","shortnames":[":woman_playing_handball_medium_skin_tone:"],"category":"activity"},":woman_playing_handball_tone4:":{"uc_base":"1f93e-1f3fe-2640","uc_output":"1f93e-1f3fe-200d-2640-fe0f","uc_match":"1f93e-1f3fe-2640-fe0f","uc_greedy":"1f93e-1f3fe-2640","shortnames":[":woman_playing_handball_medium_dark_skin_tone:"],"category":"activity"},":woman_playing_handball_tone5:":{"uc_base":"1f93e-1f3ff-2640","uc_output":"1f93e-1f3ff-200d-2640-fe0f","uc_match":"1f93e-1f3ff-2640-fe0f","uc_greedy":"1f93e-1f3ff-2640","shortnames":[":woman_playing_handball_dark_skin_tone:"],"category":"activity"},":woman_playing_water_polo_tone1:":{"uc_base":"1f93d-1f3fb-2640","uc_output":"1f93d-1f3fb-200d-2640-fe0f","uc_match":"1f93d-1f3fb-2640-fe0f","uc_greedy":"1f93d-1f3fb-2640","shortnames":[":woman_playing_water_polo_light_skin_tone:"],"category":"activity"},":woman_playing_water_polo_tone2:":{"uc_base":"1f93d-1f3fc-2640","uc_output":"1f93d-1f3fc-200d-2640-fe0f","uc_match":"1f93d-1f3fc-2640-fe0f","uc_greedy":"1f93d-1f3fc-2640","shortnames":[":woman_playing_water_polo_medium_light_skin_tone:"],"category":"activity"},":woman_playing_water_polo_tone3:":{"uc_base":"1f93d-1f3fd-2640","uc_output":"1f93d-1f3fd-200d-2640-fe0f","uc_match":"1f93d-1f3fd-2640-fe0f","uc_greedy":"1f93d-1f3fd-2640","shortnames":[":woman_playing_water_polo_medium_skin_tone:"],"category":"activity"},":woman_playing_water_polo_tone4:":{"uc_base":"1f93d-1f3fe-2640","uc_output":"1f93d-1f3fe-200d-2640-fe0f","uc_match":"1f93d-1f3fe-2640-fe0f","uc_greedy":"1f93d-1f3fe-2640","shortnames":[":woman_playing_water_polo_medium_dark_skin_tone:"],"category":"activity"},":woman_playing_water_polo_tone5:":{"uc_base":"1f93d-1f3ff-2640","uc_output":"1f93d-1f3ff-200d-2640-fe0f","uc_match":"1f93d-1f3ff-2640-fe0f","uc_greedy":"1f93d-1f3ff-2640","shortnames":[":woman_playing_water_polo_dark_skin_tone:"],"category":"activity"},":woman_police_officer_tone1:":{"uc_base":"1f46e-1f3fb-2640","uc_output":"1f46e-1f3fb-200d-2640-fe0f","uc_match":"1f46e-1f3fb-2640-fe0f","uc_greedy":"1f46e-1f3fb-2640","shortnames":[":woman_police_officer_light_skin_tone:"],"category":"people"},":woman_police_officer_tone2:":{"uc_base":"1f46e-1f3fc-2640","uc_output":"1f46e-1f3fc-200d-2640-fe0f","uc_match":"1f46e-1f3fc-2640-fe0f","uc_greedy":"1f46e-1f3fc-2640","shortnames":[":woman_police_officer_medium_light_skin_tone:"],"category":"people"},":woman_police_officer_tone3:":{"uc_base":"1f46e-1f3fd-2640","uc_output":"1f46e-1f3fd-200d-2640-fe0f","uc_match":"1f46e-1f3fd-2640-fe0f","uc_greedy":"1f46e-1f3fd-2640","shortnames":[":woman_police_officer_medium_skin_tone:"],"category":"people"},":woman_police_officer_tone4:":{"uc_base":"1f46e-1f3fe-2640","uc_output":"1f46e-1f3fe-200d-2640-fe0f","uc_match":"1f46e-1f3fe-2640-fe0f","uc_greedy":"1f46e-1f3fe-2640","shortnames":[":woman_police_officer_medium_dark_skin_tone:"],"category":"people"},":woman_police_officer_tone5:":{"uc_base":"1f46e-1f3ff-2640","uc_output":"1f46e-1f3ff-200d-2640-fe0f","uc_match":"1f46e-1f3ff-2640-fe0f","uc_greedy":"1f46e-1f3ff-2640","shortnames":[":woman_police_officer_dark_skin_tone:"],"category":"people"},":woman_pouting_tone1:":{"uc_base":"1f64e-1f3fb-2640","uc_output":"1f64e-1f3fb-200d-2640-fe0f","uc_match":"1f64e-1f3fb-2640-fe0f","uc_greedy":"1f64e-1f3fb-2640","shortnames":[":woman_pouting_light_skin_tone:"],"category":"people"},":woman_pouting_tone2:":{"uc_base":"1f64e-1f3fc-2640","uc_output":"1f64e-1f3fc-200d-2640-fe0f","uc_match":"1f64e-1f3fc-2640-fe0f","uc_greedy":"1f64e-1f3fc-2640","shortnames":[":woman_pouting_medium_light_skin_tone:"],"category":"people"},":woman_pouting_tone3:":{"uc_base":"1f64e-1f3fd-2640","uc_output":"1f64e-1f3fd-200d-2640-fe0f","uc_match":"1f64e-1f3fd-2640-fe0f","uc_greedy":"1f64e-1f3fd-2640","shortnames":[":woman_pouting_medium_skin_tone:"],"category":"people"},":woman_pouting_tone4:":{"uc_base":"1f64e-1f3fe-2640","uc_output":"1f64e-1f3fe-200d-2640-fe0f","uc_match":"1f64e-1f3fe-2640-fe0f","uc_greedy":"1f64e-1f3fe-2640","shortnames":[":woman_pouting_medium_dark_skin_tone:"],"category":"people"},":woman_pouting_tone5:":{"uc_base":"1f64e-1f3ff-2640","uc_output":"1f64e-1f3ff-200d-2640-fe0f","uc_match":"1f64e-1f3ff-2640-fe0f","uc_greedy":"1f64e-1f3ff-2640","shortnames":[":woman_pouting_dark_skin_tone:"],"category":"people"},":woman_raising_hand_tone1:":{"uc_base":"1f64b-1f3fb-2640","uc_output":"1f64b-1f3fb-200d-2640-fe0f","uc_match":"1f64b-1f3fb-2640-fe0f","uc_greedy":"1f64b-1f3fb-2640","shortnames":[":woman_raising_hand_light_skin_tone:"],"category":"people"},":woman_raising_hand_tone2:":{"uc_base":"1f64b-1f3fc-2640","uc_output":"1f64b-1f3fc-200d-2640-fe0f","uc_match":"1f64b-1f3fc-2640-fe0f","uc_greedy":"1f64b-1f3fc-2640","shortnames":[":woman_raising_hand_medium_light_skin_tone:"],"category":"people"},":woman_raising_hand_tone3:":{"uc_base":"1f64b-1f3fd-2640","uc_output":"1f64b-1f3fd-200d-2640-fe0f","uc_match":"1f64b-1f3fd-2640-fe0f","uc_greedy":"1f64b-1f3fd-2640","shortnames":[":woman_raising_hand_medium_skin_tone:"],"category":"people"},":woman_raising_hand_tone4:":{"uc_base":"1f64b-1f3fe-2640","uc_output":"1f64b-1f3fe-200d-2640-fe0f","uc_match":"1f64b-1f3fe-2640-fe0f","uc_greedy":"1f64b-1f3fe-2640","shortnames":[":woman_raising_hand_medium_dark_skin_tone:"],"category":"people"},":woman_raising_hand_tone5:":{"uc_base":"1f64b-1f3ff-2640","uc_output":"1f64b-1f3ff-200d-2640-fe0f","uc_match":"1f64b-1f3ff-2640-fe0f","uc_greedy":"1f64b-1f3ff-2640","shortnames":[":woman_raising_hand_dark_skin_tone:"],"category":"people"},":woman_rowing_boat_tone1:":{"uc_base":"1f6a3-1f3fb-2640","uc_output":"1f6a3-1f3fb-200d-2640-fe0f","uc_match":"1f6a3-1f3fb-2640-fe0f","uc_greedy":"1f6a3-1f3fb-2640","shortnames":[":woman_rowing_boat_light_skin_tone:"],"category":"activity"},":woman_rowing_boat_tone2:":{"uc_base":"1f6a3-1f3fc-2640","uc_output":"1f6a3-1f3fc-200d-2640-fe0f","uc_match":"1f6a3-1f3fc-2640-fe0f","uc_greedy":"1f6a3-1f3fc-2640","shortnames":[":woman_rowing_boat_medium_light_skin_tone:"],"category":"activity"},":woman_rowing_boat_tone3:":{"uc_base":"1f6a3-1f3fd-2640","uc_output":"1f6a3-1f3fd-200d-2640-fe0f","uc_match":"1f6a3-1f3fd-2640-fe0f","uc_greedy":"1f6a3-1f3fd-2640","shortnames":[":woman_rowing_boat_medium_skin_tone:"],"category":"activity"},":woman_rowing_boat_tone4:":{"uc_base":"1f6a3-1f3fe-2640","uc_output":"1f6a3-1f3fe-200d-2640-fe0f","uc_match":"1f6a3-1f3fe-2640-fe0f","uc_greedy":"1f6a3-1f3fe-2640","shortnames":[":woman_rowing_boat_medium_dark_skin_tone:"],"category":"activity"},":woman_rowing_boat_tone5:":{"uc_base":"1f6a3-1f3ff-2640","uc_output":"1f6a3-1f3ff-200d-2640-fe0f","uc_match":"1f6a3-1f3ff-2640-fe0f","uc_greedy":"1f6a3-1f3ff-2640","shortnames":[":woman_rowing_boat_dark_skin_tone:"],"category":"activity"},":woman_running_tone1:":{"uc_base":"1f3c3-1f3fb-2640","uc_output":"1f3c3-1f3fb-200d-2640-fe0f","uc_match":"1f3c3-1f3fb-2640-fe0f","uc_greedy":"1f3c3-1f3fb-2640","shortnames":[":woman_running_light_skin_tone:"],"category":"people"},":woman_running_tone2:":{"uc_base":"1f3c3-1f3fc-2640","uc_output":"1f3c3-1f3fc-200d-2640-fe0f","uc_match":"1f3c3-1f3fc-2640-fe0f","uc_greedy":"1f3c3-1f3fc-2640","shortnames":[":woman_running_medium_light_skin_tone:"],"category":"people"},":woman_running_tone3:":{"uc_base":"1f3c3-1f3fd-2640","uc_output":"1f3c3-1f3fd-200d-2640-fe0f","uc_match":"1f3c3-1f3fd-2640-fe0f","uc_greedy":"1f3c3-1f3fd-2640","shortnames":[":woman_running_medium_skin_tone:"],"category":"people"},":woman_running_tone4:":{"uc_base":"1f3c3-1f3fe-2640","uc_output":"1f3c3-1f3fe-200d-2640-fe0f","uc_match":"1f3c3-1f3fe-2640-fe0f","uc_greedy":"1f3c3-1f3fe-2640","shortnames":[":woman_running_medium_dark_skin_tone:"],"category":"people"},":woman_running_tone5:":{"uc_base":"1f3c3-1f3ff-2640","uc_output":"1f3c3-1f3ff-200d-2640-fe0f","uc_match":"1f3c3-1f3ff-2640-fe0f","uc_greedy":"1f3c3-1f3ff-2640","shortnames":[":woman_running_dark_skin_tone:"],"category":"people"},":woman_shrugging_tone1:":{"uc_base":"1f937-1f3fb-2640","uc_output":"1f937-1f3fb-200d-2640-fe0f","uc_match":"1f937-1f3fb-2640-fe0f","uc_greedy":"1f937-1f3fb-2640","shortnames":[":woman_shrugging_light_skin_tone:"],"category":"people"},":woman_shrugging_tone2:":{"uc_base":"1f937-1f3fc-2640","uc_output":"1f937-1f3fc-200d-2640-fe0f","uc_match":"1f937-1f3fc-2640-fe0f","uc_greedy":"1f937-1f3fc-2640","shortnames":[":woman_shrugging_medium_light_skin_tone:"],"category":"people"},":woman_shrugging_tone3:":{"uc_base":"1f937-1f3fd-2640","uc_output":"1f937-1f3fd-200d-2640-fe0f","uc_match":"1f937-1f3fd-2640-fe0f","uc_greedy":"1f937-1f3fd-2640","shortnames":[":woman_shrugging_medium_skin_tone:"],"category":"people"},":woman_shrugging_tone4:":{"uc_base":"1f937-1f3fe-2640","uc_output":"1f937-1f3fe-200d-2640-fe0f","uc_match":"1f937-1f3fe-2640-fe0f","uc_greedy":"1f937-1f3fe-2640","shortnames":[":woman_shrugging_medium_dark_skin_tone:"],"category":"people"},":woman_shrugging_tone5:":{"uc_base":"1f937-1f3ff-2640","uc_output":"1f937-1f3ff-200d-2640-fe0f","uc_match":"1f937-1f3ff-2640-fe0f","uc_greedy":"1f937-1f3ff-2640","shortnames":[":woman_shrugging_dark_skin_tone:"],"category":"people"},":woman_surfing_tone1:":{"uc_base":"1f3c4-1f3fb-2640","uc_output":"1f3c4-1f3fb-200d-2640-fe0f","uc_match":"1f3c4-1f3fb-2640-fe0f","uc_greedy":"1f3c4-1f3fb-2640","shortnames":[":woman_surfing_light_skin_tone:"],"category":"activity"},":woman_surfing_tone2:":{"uc_base":"1f3c4-1f3fc-2640","uc_output":"1f3c4-1f3fc-200d-2640-fe0f","uc_match":"1f3c4-1f3fc-2640-fe0f","uc_greedy":"1f3c4-1f3fc-2640","shortnames":[":woman_surfing_medium_light_skin_tone:"],"category":"activity"},":woman_surfing_tone3:":{"uc_base":"1f3c4-1f3fd-2640","uc_output":"1f3c4-1f3fd-200d-2640-fe0f","uc_match":"1f3c4-1f3fd-2640-fe0f","uc_greedy":"1f3c4-1f3fd-2640","shortnames":[":woman_surfing_medium_skin_tone:"],"category":"activity"},":woman_surfing_tone4:":{"uc_base":"1f3c4-1f3fe-2640","uc_output":"1f3c4-1f3fe-200d-2640-fe0f","uc_match":"1f3c4-1f3fe-2640-fe0f","uc_greedy":"1f3c4-1f3fe-2640","shortnames":[":woman_surfing_medium_dark_skin_tone:"],"category":"activity"},":woman_surfing_tone5:":{"uc_base":"1f3c4-1f3ff-2640","uc_output":"1f3c4-1f3ff-200d-2640-fe0f","uc_match":"1f3c4-1f3ff-2640-fe0f","uc_greedy":"1f3c4-1f3ff-2640","shortnames":[":woman_surfing_dark_skin_tone:"],"category":"activity"},":woman_swimming_tone1:":{"uc_base":"1f3ca-1f3fb-2640","uc_output":"1f3ca-1f3fb-200d-2640-fe0f","uc_match":"1f3ca-1f3fb-2640-fe0f","uc_greedy":"1f3ca-1f3fb-2640","shortnames":[":woman_swimming_light_skin_tone:"],"category":"activity"},":woman_swimming_tone2:":{"uc_base":"1f3ca-1f3fc-2640","uc_output":"1f3ca-1f3fc-200d-2640-fe0f","uc_match":"1f3ca-1f3fc-2640-fe0f","uc_greedy":"1f3ca-1f3fc-2640","shortnames":[":woman_swimming_medium_light_skin_tone:"],"category":"activity"},":woman_swimming_tone3:":{"uc_base":"1f3ca-1f3fd-2640","uc_output":"1f3ca-1f3fd-200d-2640-fe0f","uc_match":"1f3ca-1f3fd-2640-fe0f","uc_greedy":"1f3ca-1f3fd-2640","shortnames":[":woman_swimming_medium_skin_tone:"],"category":"activity"},":woman_swimming_tone4:":{"uc_base":"1f3ca-1f3fe-2640","uc_output":"1f3ca-1f3fe-200d-2640-fe0f","uc_match":"1f3ca-1f3fe-2640-fe0f","uc_greedy":"1f3ca-1f3fe-2640","shortnames":[":woman_swimming_medium_dark_skin_tone:"],"category":"activity"},":woman_swimming_tone5:":{"uc_base":"1f3ca-1f3ff-2640","uc_output":"1f3ca-1f3ff-200d-2640-fe0f","uc_match":"1f3ca-1f3ff-2640-fe0f","uc_greedy":"1f3ca-1f3ff-2640","shortnames":[":woman_swimming_dark_skin_tone:"],"category":"activity"},":woman_tipping_hand_tone1:":{"uc_base":"1f481-1f3fb-2640","uc_output":"1f481-1f3fb-200d-2640-fe0f","uc_match":"1f481-1f3fb-2640-fe0f","uc_greedy":"1f481-1f3fb-2640","shortnames":[":woman_tipping_hand_light_skin_tone:"],"category":"people"},":woman_tipping_hand_tone2:":{"uc_base":"1f481-1f3fc-2640","uc_output":"1f481-1f3fc-200d-2640-fe0f","uc_match":"1f481-1f3fc-2640-fe0f","uc_greedy":"1f481-1f3fc-2640","shortnames":[":woman_tipping_hand_medium_light_skin_tone:"],"category":"people"},":woman_tipping_hand_tone3:":{"uc_base":"1f481-1f3fd-2640","uc_output":"1f481-1f3fd-200d-2640-fe0f","uc_match":"1f481-1f3fd-2640-fe0f","uc_greedy":"1f481-1f3fd-2640","shortnames":[":woman_tipping_hand_medium_skin_tone:"],"category":"people"},":woman_tipping_hand_tone4:":{"uc_base":"1f481-1f3fe-2640","uc_output":"1f481-1f3fe-200d-2640-fe0f","uc_match":"1f481-1f3fe-2640-fe0f","uc_greedy":"1f481-1f3fe-2640","shortnames":[":woman_tipping_hand_medium_dark_skin_tone:"],"category":"people"},":woman_tipping_hand_tone5:":{"uc_base":"1f481-1f3ff-2640","uc_output":"1f481-1f3ff-200d-2640-fe0f","uc_match":"1f481-1f3ff-2640-fe0f","uc_greedy":"1f481-1f3ff-2640","shortnames":[":woman_tipping_hand_dark_skin_tone:"],"category":"people"},":woman_vampire_tone1:":{"uc_base":"1f9db-1f3fb-2640","uc_output":"1f9db-1f3fb-200d-2640-fe0f","uc_match":"1f9db-1f3fb-2640-fe0f","uc_greedy":"1f9db-1f3fb-2640","shortnames":[":woman_vampire_light_skin_tone:"],"category":"people"},":woman_vampire_tone2:":{"uc_base":"1f9db-1f3fc-2640","uc_output":"1f9db-1f3fc-200d-2640-fe0f","uc_match":"1f9db-1f3fc-2640-fe0f","uc_greedy":"1f9db-1f3fc-2640","shortnames":[":woman_vampire_medium_light_skin_tone:"],"category":"people"},":woman_vampire_tone3:":{"uc_base":"1f9db-1f3fd-2640","uc_output":"1f9db-1f3fd-200d-2640-fe0f","uc_match":"1f9db-1f3fd-2640-fe0f","uc_greedy":"1f9db-1f3fd-2640","shortnames":[":woman_vampire_medium_skin_tone:"],"category":"people"},":woman_vampire_tone4:":{"uc_base":"1f9db-1f3fe-2640","uc_output":"1f9db-1f3fe-200d-2640-fe0f","uc_match":"1f9db-1f3fe-2640-fe0f","uc_greedy":"1f9db-1f3fe-2640","shortnames":[":woman_vampire_medium_dark_skin_tone:"],"category":"people"},":woman_vampire_tone5:":{"uc_base":"1f9db-1f3ff-2640","uc_output":"1f9db-1f3ff-200d-2640-fe0f","uc_match":"1f9db-1f3ff-2640-fe0f","uc_greedy":"1f9db-1f3ff-2640","shortnames":[":woman_vampire_dark_skin_tone:"],"category":"people"},":woman_walking_tone1:":{"uc_base":"1f6b6-1f3fb-2640","uc_output":"1f6b6-1f3fb-200d-2640-fe0f","uc_match":"1f6b6-1f3fb-2640-fe0f","uc_greedy":"1f6b6-1f3fb-2640","shortnames":[":woman_walking_light_skin_tone:"],"category":"people"},":woman_walking_tone2:":{"uc_base":"1f6b6-1f3fc-2640","uc_output":"1f6b6-1f3fc-200d-2640-fe0f","uc_match":"1f6b6-1f3fc-2640-fe0f","uc_greedy":"1f6b6-1f3fc-2640","shortnames":[":woman_walking_medium_light_skin_tone:"],"category":"people"},":woman_walking_tone3:":{"uc_base":"1f6b6-1f3fd-2640","uc_output":"1f6b6-1f3fd-200d-2640-fe0f","uc_match":"1f6b6-1f3fd-2640-fe0f","uc_greedy":"1f6b6-1f3fd-2640","shortnames":[":woman_walking_medium_skin_tone:"],"category":"people"},":woman_walking_tone4:":{"uc_base":"1f6b6-1f3fe-2640","uc_output":"1f6b6-1f3fe-200d-2640-fe0f","uc_match":"1f6b6-1f3fe-2640-fe0f","uc_greedy":"1f6b6-1f3fe-2640","shortnames":[":woman_walking_medium_dark_skin_tone:"],"category":"people"},":woman_walking_tone5:":{"uc_base":"1f6b6-1f3ff-2640","uc_output":"1f6b6-1f3ff-200d-2640-fe0f","uc_match":"1f6b6-1f3ff-2640-fe0f","uc_greedy":"1f6b6-1f3ff-2640","shortnames":[":woman_walking_dark_skin_tone:"],"category":"people"},":woman_wearing_turban_tone1:":{"uc_base":"1f473-1f3fb-2640","uc_output":"1f473-1f3fb-200d-2640-fe0f","uc_match":"1f473-1f3fb-2640-fe0f","uc_greedy":"1f473-1f3fb-2640","shortnames":[":woman_wearing_turban_light_skin_tone:"],"category":"people"},":woman_wearing_turban_tone2:":{"uc_base":"1f473-1f3fc-2640","uc_output":"1f473-1f3fc-200d-2640-fe0f","uc_match":"1f473-1f3fc-2640-fe0f","uc_greedy":"1f473-1f3fc-2640","shortnames":[":woman_wearing_turban_medium_light_skin_tone:"],"category":"people"},":woman_wearing_turban_tone3:":{"uc_base":"1f473-1f3fd-2640","uc_output":"1f473-1f3fd-200d-2640-fe0f","uc_match":"1f473-1f3fd-2640-fe0f","uc_greedy":"1f473-1f3fd-2640","shortnames":[":woman_wearing_turban_medium_skin_tone:"],"category":"people"},":woman_wearing_turban_tone4:":{"uc_base":"1f473-1f3fe-2640","uc_output":"1f473-1f3fe-200d-2640-fe0f","uc_match":"1f473-1f3fe-2640-fe0f","uc_greedy":"1f473-1f3fe-2640","shortnames":[":woman_wearing_turban_medium_dark_skin_tone:"],"category":"people"},":woman_wearing_turban_tone5:":{"uc_base":"1f473-1f3ff-2640","uc_output":"1f473-1f3ff-200d-2640-fe0f","uc_match":"1f473-1f3ff-2640-fe0f","uc_greedy":"1f473-1f3ff-2640","shortnames":[":woman_wearing_turban_dark_skin_tone:"],"category":"people"},":man_bouncing_ball_tone1:":{"uc_base":"26f9-1f3fb-2642","uc_output":"26f9-1f3fb-200d-2642-fe0f","uc_match":"26f9-fe0f-1f3fb-2642-fe0f","uc_greedy":"26f9-1f3fb-2642","shortnames":[":man_bouncing_ball_light_skin_tone:"],"category":"activity"},":man_bouncing_ball_tone2:":{"uc_base":"26f9-1f3fc-2642","uc_output":"26f9-1f3fc-200d-2642-fe0f","uc_match":"26f9-fe0f-1f3fc-2642-fe0f","uc_greedy":"26f9-1f3fc-2642","shortnames":[":man_bouncing_ball_medium_light_skin_tone:"],"category":"activity"},":man_bouncing_ball_tone3:":{"uc_base":"26f9-1f3fd-2642","uc_output":"26f9-1f3fd-200d-2642-fe0f","uc_match":"26f9-fe0f-1f3fd-2642-fe0f","uc_greedy":"26f9-1f3fd-2642","shortnames":[":man_bouncing_ball_medium_skin_tone:"],"category":"activity"},":man_bouncing_ball_tone4:":{"uc_base":"26f9-1f3fe-2642","uc_output":"26f9-1f3fe-200d-2642-fe0f","uc_match":"26f9-fe0f-1f3fe-2642-fe0f","uc_greedy":"26f9-1f3fe-2642","shortnames":[":man_bouncing_ball_medium_dark_skin_tone:"],"category":"activity"},":man_bouncing_ball_tone5:":{"uc_base":"26f9-1f3ff-2642","uc_output":"26f9-1f3ff-200d-2642-fe0f","uc_match":"26f9-fe0f-1f3ff-2642-fe0f","uc_greedy":"26f9-1f3ff-2642","shortnames":[":man_bouncing_ball_dark_skin_tone:"],"category":"activity"},":man_detective:":{"uc_base":"1f575-2642","uc_output":"1f575-fe0f-200d-2642-fe0f","uc_match":"1f575-fe0f-2642-fe0f","uc_greedy":"1f575-2642","shortnames":[],"category":"people"},":man_golfing:":{"uc_base":"1f3cc-2642","uc_output":"1f3cc-fe0f-200d-2642-fe0f","uc_match":"1f3cc-fe0f-2642-fe0f","uc_greedy":"1f3cc-2642","shortnames":[],"category":"activity"},":man_lifting_weights:":{"uc_base":"1f3cb-2642","uc_output":"1f3cb-fe0f-200d-2642-fe0f","uc_match":"1f3cb-fe0f-2642-fe0f","uc_greedy":"1f3cb-2642","shortnames":[],"category":"activity"},":woman_bouncing_ball_tone1:":{"uc_base":"26f9-1f3fb-2640","uc_output":"26f9-1f3fb-200d-2640-fe0f","uc_match":"26f9-fe0f-1f3fb-2640-fe0f","uc_greedy":"26f9-1f3fb-2640","shortnames":[":woman_bouncing_ball_light_skin_tone:"],"category":"activity"},":woman_bouncing_ball_tone2:":{"uc_base":"26f9-1f3fc-2640","uc_output":"26f9-1f3fc-200d-2640-fe0f","uc_match":"26f9-fe0f-1f3fc-2640-fe0f","uc_greedy":"26f9-1f3fc-2640","shortnames":[":woman_bouncing_ball_medium_light_skin_tone:"],"category":"activity"},":woman_bouncing_ball_tone3:":{"uc_base":"26f9-1f3fd-2640","uc_output":"26f9-1f3fd-200d-2640-fe0f","uc_match":"26f9-fe0f-1f3fd-2640-fe0f","uc_greedy":"26f9-1f3fd-2640","shortnames":[":woman_bouncing_ball_medium_skin_tone:"],"category":"activity"},":woman_bouncing_ball_tone4:":{"uc_base":"26f9-1f3fe-2640","uc_output":"26f9-1f3fe-200d-2640-fe0f","uc_match":"26f9-fe0f-1f3fe-2640-fe0f","uc_greedy":"26f9-1f3fe-2640","shortnames":[":woman_bouncing_ball_medium_dark_skin_tone:"],"category":"activity"},":woman_bouncing_ball_tone5:":{"uc_base":"26f9-1f3ff-2640","uc_output":"26f9-1f3ff-200d-2640-fe0f","uc_match":"26f9-fe0f-1f3ff-2640-fe0f","uc_greedy":"26f9-1f3ff-2640","shortnames":[":woman_bouncing_ball_dark_skin_tone:"],"category":"activity"},":woman_detective:":{"uc_base":"1f575-2640","uc_output":"1f575-fe0f-200d-2640-fe0f","uc_match":"1f575-fe0f-2640-fe0f","uc_greedy":"1f575-2640","shortnames":[],"category":"people"},":woman_golfing:":{"uc_base":"1f3cc-2640","uc_output":"1f3cc-fe0f-200d-2640-fe0f","uc_match":"1f3cc-fe0f-2640-fe0f","uc_greedy":"1f3cc-2640","shortnames":[],"category":"activity"},":woman_lifting_weights:":{"uc_base":"1f3cb-2640","uc_output":"1f3cb-fe0f-200d-2640-fe0f","uc_match":"1f3cb-fe0f-2640-fe0f","uc_greedy":"1f3cb-2640","shortnames":[],"category":"activity"},":man_bouncing_ball:":{"uc_base":"26f9-2642","uc_output":"26f9-fe0f-200d-2642-fe0f","uc_match":"26f9-fe0f-2642-fe0f","uc_greedy":"26f9-2642","shortnames":[],"category":"activity"},":woman_bouncing_ball:":{"uc_base":"26f9-2640","uc_output":"26f9-fe0f-200d-2640-fe0f","uc_match":"26f9-fe0f-2640-fe0f","uc_greedy":"26f9-2640","shortnames":[],"category":"activity"},":man_artist_tone1:":{"uc_base":"1f468-1f3fb-1f3a8","uc_output":"1f468-1f3fb-200d-1f3a8","uc_match":"1f468-1f3fb-1f3a8","uc_greedy":"1f468-1f3fb-1f3a8","shortnames":[":man_artist_light_skin_tone:"],"category":"people"},":man_artist_tone2:":{"uc_base":"1f468-1f3fc-1f3a8","uc_output":"1f468-1f3fc-200d-1f3a8","uc_match":"1f468-1f3fc-1f3a8","uc_greedy":"1f468-1f3fc-1f3a8","shortnames":[":man_artist_medium_light_skin_tone:"],"category":"people"},":man_artist_tone3:":{"uc_base":"1f468-1f3fd-1f3a8","uc_output":"1f468-1f3fd-200d-1f3a8","uc_match":"1f468-1f3fd-1f3a8","uc_greedy":"1f468-1f3fd-1f3a8","shortnames":[":man_artist_medium_skin_tone:"],"category":"people"},":man_artist_tone4:":{"uc_base":"1f468-1f3fe-1f3a8","uc_output":"1f468-1f3fe-200d-1f3a8","uc_match":"1f468-1f3fe-1f3a8","uc_greedy":"1f468-1f3fe-1f3a8","shortnames":[":man_artist_medium_dark_skin_tone:"],"category":"people"},":man_artist_tone5:":{"uc_base":"1f468-1f3ff-1f3a8","uc_output":"1f468-1f3ff-200d-1f3a8","uc_match":"1f468-1f3ff-1f3a8","uc_greedy":"1f468-1f3ff-1f3a8","shortnames":[":man_artist_dark_skin_tone:"],"category":"people"},":man_astronaut_tone1:":{"uc_base":"1f468-1f3fb-1f680","uc_output":"1f468-1f3fb-200d-1f680","uc_match":"1f468-1f3fb-1f680","uc_greedy":"1f468-1f3fb-1f680","shortnames":[":man_astronaut_light_skin_tone:"],"category":"people"},":man_astronaut_tone2:":{"uc_base":"1f468-1f3fc-1f680","uc_output":"1f468-1f3fc-200d-1f680","uc_match":"1f468-1f3fc-1f680","uc_greedy":"1f468-1f3fc-1f680","shortnames":[":man_astronaut_medium_light_skin_tone:"],"category":"people"},":man_astronaut_tone3:":{"uc_base":"1f468-1f3fd-1f680","uc_output":"1f468-1f3fd-200d-1f680","uc_match":"1f468-1f3fd-1f680","uc_greedy":"1f468-1f3fd-1f680","shortnames":[":man_astronaut_medium_skin_tone:"],"category":"people"},":man_astronaut_tone4:":{"uc_base":"1f468-1f3fe-1f680","uc_output":"1f468-1f3fe-200d-1f680","uc_match":"1f468-1f3fe-1f680","uc_greedy":"1f468-1f3fe-1f680","shortnames":[":man_astronaut_medium_dark_skin_tone:"],"category":"people"},":man_astronaut_tone5:":{"uc_base":"1f468-1f3ff-1f680","uc_output":"1f468-1f3ff-200d-1f680","uc_match":"1f468-1f3ff-1f680","uc_greedy":"1f468-1f3ff-1f680","shortnames":[":man_astronaut_dark_skin_tone:"],"category":"people"},":man_cook_tone1:":{"uc_base":"1f468-1f3fb-1f373","uc_output":"1f468-1f3fb-200d-1f373","uc_match":"1f468-1f3fb-1f373","uc_greedy":"1f468-1f3fb-1f373","shortnames":[":man_cook_light_skin_tone:"],"category":"people"},":man_cook_tone2:":{"uc_base":"1f468-1f3fc-1f373","uc_output":"1f468-1f3fc-200d-1f373","uc_match":"1f468-1f3fc-1f373","uc_greedy":"1f468-1f3fc-1f373","shortnames":[":man_cook_medium_light_skin_tone:"],"category":"people"},":man_cook_tone3:":{"uc_base":"1f468-1f3fd-1f373","uc_output":"1f468-1f3fd-200d-1f373","uc_match":"1f468-1f3fd-1f373","uc_greedy":"1f468-1f3fd-1f373","shortnames":[":man_cook_medium_skin_tone:"],"category":"people"},":man_cook_tone4:":{"uc_base":"1f468-1f3fe-1f373","uc_output":"1f468-1f3fe-200d-1f373","uc_match":"1f468-1f3fe-1f373","uc_greedy":"1f468-1f3fe-1f373","shortnames":[":man_cook_medium_dark_skin_tone:"],"category":"people"},":man_cook_tone5:":{"uc_base":"1f468-1f3ff-1f373","uc_output":"1f468-1f3ff-200d-1f373","uc_match":"1f468-1f3ff-1f373","uc_greedy":"1f468-1f3ff-1f373","shortnames":[":man_cook_dark_skin_tone:"],"category":"people"},":man_factory_worker_tone1:":{"uc_base":"1f468-1f3fb-1f3ed","uc_output":"1f468-1f3fb-200d-1f3ed","uc_match":"1f468-1f3fb-1f3ed","uc_greedy":"1f468-1f3fb-1f3ed","shortnames":[":man_factory_worker_light_skin_tone:"],"category":"people"},":man_factory_worker_tone2:":{"uc_base":"1f468-1f3fc-1f3ed","uc_output":"1f468-1f3fc-200d-1f3ed","uc_match":"1f468-1f3fc-1f3ed","uc_greedy":"1f468-1f3fc-1f3ed","shortnames":[":man_factory_worker_medium_light_skin_tone:"],"category":"people"},":man_factory_worker_tone3:":{"uc_base":"1f468-1f3fd-1f3ed","uc_output":"1f468-1f3fd-200d-1f3ed","uc_match":"1f468-1f3fd-1f3ed","uc_greedy":"1f468-1f3fd-1f3ed","shortnames":[":man_factory_worker_medium_skin_tone:"],"category":"people"},":man_factory_worker_tone4:":{"uc_base":"1f468-1f3fe-1f3ed","uc_output":"1f468-1f3fe-200d-1f3ed","uc_match":"1f468-1f3fe-1f3ed","uc_greedy":"1f468-1f3fe-1f3ed","shortnames":[":man_factory_worker_medium_dark_skin_tone:"],"category":"people"},":man_factory_worker_tone5:":{"uc_base":"1f468-1f3ff-1f3ed","uc_output":"1f468-1f3ff-200d-1f3ed","uc_match":"1f468-1f3ff-1f3ed","uc_greedy":"1f468-1f3ff-1f3ed","shortnames":[":man_factory_worker_dark_skin_tone:"],"category":"people"},":man_farmer_tone1:":{"uc_base":"1f468-1f3fb-1f33e","uc_output":"1f468-1f3fb-200d-1f33e","uc_match":"1f468-1f3fb-1f33e","uc_greedy":"1f468-1f3fb-1f33e","shortnames":[":man_farmer_light_skin_tone:"],"category":"people"},":man_farmer_tone2:":{"uc_base":"1f468-1f3fc-1f33e","uc_output":"1f468-1f3fc-200d-1f33e","uc_match":"1f468-1f3fc-1f33e","uc_greedy":"1f468-1f3fc-1f33e","shortnames":[":man_farmer_medium_light_skin_tone:"],"category":"people"},":man_farmer_tone3:":{"uc_base":"1f468-1f3fd-1f33e","uc_output":"1f468-1f3fd-200d-1f33e","uc_match":"1f468-1f3fd-1f33e","uc_greedy":"1f468-1f3fd-1f33e","shortnames":[":man_farmer_medium_skin_tone:"],"category":"people"},":man_farmer_tone4:":{"uc_base":"1f468-1f3fe-1f33e","uc_output":"1f468-1f3fe-200d-1f33e","uc_match":"1f468-1f3fe-1f33e","uc_greedy":"1f468-1f3fe-1f33e","shortnames":[":man_farmer_medium_dark_skin_tone:"],"category":"people"},":man_farmer_tone5:":{"uc_base":"1f468-1f3ff-1f33e","uc_output":"1f468-1f3ff-200d-1f33e","uc_match":"1f468-1f3ff-1f33e","uc_greedy":"1f468-1f3ff-1f33e","shortnames":[":man_farmer_dark_skin_tone:"],"category":"people"},":man_firefighter_tone1:":{"uc_base":"1f468-1f3fb-1f692","uc_output":"1f468-1f3fb-200d-1f692","uc_match":"1f468-1f3fb-1f692","uc_greedy":"1f468-1f3fb-1f692","shortnames":[":man_firefighter_light_skin_tone:"],"category":"people"},":man_firefighter_tone2:":{"uc_base":"1f468-1f3fc-1f692","uc_output":"1f468-1f3fc-200d-1f692","uc_match":"1f468-1f3fc-1f692","uc_greedy":"1f468-1f3fc-1f692","shortnames":[":man_firefighter_medium_light_skin_tone:"],"category":"people"},":man_firefighter_tone3:":{"uc_base":"1f468-1f3fd-1f692","uc_output":"1f468-1f3fd-200d-1f692","uc_match":"1f468-1f3fd-1f692","uc_greedy":"1f468-1f3fd-1f692","shortnames":[":man_firefighter_medium_skin_tone:"],"category":"people"},":man_firefighter_tone4:":{"uc_base":"1f468-1f3fe-1f692","uc_output":"1f468-1f3fe-200d-1f692","uc_match":"1f468-1f3fe-1f692","uc_greedy":"1f468-1f3fe-1f692","shortnames":[":man_firefighter_medium_dark_skin_tone:"],"category":"people"},":man_firefighter_tone5:":{"uc_base":"1f468-1f3ff-1f692","uc_output":"1f468-1f3ff-200d-1f692","uc_match":"1f468-1f3ff-1f692","uc_greedy":"1f468-1f3ff-1f692","shortnames":[":man_firefighter_dark_skin_tone:"],"category":"people"},":man_mechanic_tone1:":{"uc_base":"1f468-1f3fb-1f527","uc_output":"1f468-1f3fb-200d-1f527","uc_match":"1f468-1f3fb-1f527","uc_greedy":"1f468-1f3fb-1f527","shortnames":[":man_mechanic_light_skin_tone:"],"category":"people"},":man_mechanic_tone2:":{"uc_base":"1f468-1f3fc-1f527","uc_output":"1f468-1f3fc-200d-1f527","uc_match":"1f468-1f3fc-1f527","uc_greedy":"1f468-1f3fc-1f527","shortnames":[":man_mechanic_medium_light_skin_tone:"],"category":"people"},":man_mechanic_tone3:":{"uc_base":"1f468-1f3fd-1f527","uc_output":"1f468-1f3fd-200d-1f527","uc_match":"1f468-1f3fd-1f527","uc_greedy":"1f468-1f3fd-1f527","shortnames":[":man_mechanic_medium_skin_tone:"],"category":"people"},":man_mechanic_tone4:":{"uc_base":"1f468-1f3fe-1f527","uc_output":"1f468-1f3fe-200d-1f527","uc_match":"1f468-1f3fe-1f527","uc_greedy":"1f468-1f3fe-1f527","shortnames":[":man_mechanic_medium_dark_skin_tone:"],"category":"people"},":man_mechanic_tone5:":{"uc_base":"1f468-1f3ff-1f527","uc_output":"1f468-1f3ff-200d-1f527","uc_match":"1f468-1f3ff-1f527","uc_greedy":"1f468-1f3ff-1f527","shortnames":[":man_mechanic_dark_skin_tone:"],"category":"people"},":man_office_worker_tone1:":{"uc_base":"1f468-1f3fb-1f4bc","uc_output":"1f468-1f3fb-200d-1f4bc","uc_match":"1f468-1f3fb-1f4bc","uc_greedy":"1f468-1f3fb-1f4bc","shortnames":[":man_office_worker_light_skin_tone:"],"category":"people"},":man_office_worker_tone2:":{"uc_base":"1f468-1f3fc-1f4bc","uc_output":"1f468-1f3fc-200d-1f4bc","uc_match":"1f468-1f3fc-1f4bc","uc_greedy":"1f468-1f3fc-1f4bc","shortnames":[":man_office_worker_medium_light_skin_tone:"],"category":"people"},":man_office_worker_tone3:":{"uc_base":"1f468-1f3fd-1f4bc","uc_output":"1f468-1f3fd-200d-1f4bc","uc_match":"1f468-1f3fd-1f4bc","uc_greedy":"1f468-1f3fd-1f4bc","shortnames":[":man_office_worker_medium_skin_tone:"],"category":"people"},":man_office_worker_tone4:":{"uc_base":"1f468-1f3fe-1f4bc","uc_output":"1f468-1f3fe-200d-1f4bc","uc_match":"1f468-1f3fe-1f4bc","uc_greedy":"1f468-1f3fe-1f4bc","shortnames":[":man_office_worker_medium_dark_skin_tone:"],"category":"people"},":man_office_worker_tone5:":{"uc_base":"1f468-1f3ff-1f4bc","uc_output":"1f468-1f3ff-200d-1f4bc","uc_match":"1f468-1f3ff-1f4bc","uc_greedy":"1f468-1f3ff-1f4bc","shortnames":[":man_office_worker_dark_skin_tone:"],"category":"people"},":man_scientist_tone1:":{"uc_base":"1f468-1f3fb-1f52c","uc_output":"1f468-1f3fb-200d-1f52c","uc_match":"1f468-1f3fb-1f52c","uc_greedy":"1f468-1f3fb-1f52c","shortnames":[":man_scientist_light_skin_tone:"],"category":"people"},":man_scientist_tone2:":{"uc_base":"1f468-1f3fc-1f52c","uc_output":"1f468-1f3fc-200d-1f52c","uc_match":"1f468-1f3fc-1f52c","uc_greedy":"1f468-1f3fc-1f52c","shortnames":[":man_scientist_medium_light_skin_tone:"],"category":"people"},":man_scientist_tone3:":{"uc_base":"1f468-1f3fd-1f52c","uc_output":"1f468-1f3fd-200d-1f52c","uc_match":"1f468-1f3fd-1f52c","uc_greedy":"1f468-1f3fd-1f52c","shortnames":[":man_scientist_medium_skin_tone:"],"category":"people"},":man_scientist_tone4:":{"uc_base":"1f468-1f3fe-1f52c","uc_output":"1f468-1f3fe-200d-1f52c","uc_match":"1f468-1f3fe-1f52c","uc_greedy":"1f468-1f3fe-1f52c","shortnames":[":man_scientist_medium_dark_skin_tone:"],"category":"people"},":man_scientist_tone5:":{"uc_base":"1f468-1f3ff-1f52c","uc_output":"1f468-1f3ff-200d-1f52c","uc_match":"1f468-1f3ff-1f52c","uc_greedy":"1f468-1f3ff-1f52c","shortnames":[":man_scientist_dark_skin_tone:"],"category":"people"},":man_singer_tone1:":{"uc_base":"1f468-1f3fb-1f3a4","uc_output":"1f468-1f3fb-200d-1f3a4","uc_match":"1f468-1f3fb-1f3a4","uc_greedy":"1f468-1f3fb-1f3a4","shortnames":[":man_singer_light_skin_tone:"],"category":"people"},":man_singer_tone2:":{"uc_base":"1f468-1f3fc-1f3a4","uc_output":"1f468-1f3fc-200d-1f3a4","uc_match":"1f468-1f3fc-1f3a4","uc_greedy":"1f468-1f3fc-1f3a4","shortnames":[":man_singer_medium_light_skin_tone:"],"category":"people"},":man_singer_tone3:":{"uc_base":"1f468-1f3fd-1f3a4","uc_output":"1f468-1f3fd-200d-1f3a4","uc_match":"1f468-1f3fd-1f3a4","uc_greedy":"1f468-1f3fd-1f3a4","shortnames":[":man_singer_medium_skin_tone:"],"category":"people"},":man_singer_tone4:":{"uc_base":"1f468-1f3fe-1f3a4","uc_output":"1f468-1f3fe-200d-1f3a4","uc_match":"1f468-1f3fe-1f3a4","uc_greedy":"1f468-1f3fe-1f3a4","shortnames":[":man_singer_medium_dark_skin_tone:"],"category":"people"},":man_singer_tone5:":{"uc_base":"1f468-1f3ff-1f3a4","uc_output":"1f468-1f3ff-200d-1f3a4","uc_match":"1f468-1f3ff-1f3a4","uc_greedy":"1f468-1f3ff-1f3a4","shortnames":[":man_singer_dark_skin_tone:"],"category":"people"},":man_student_tone1:":{"uc_base":"1f468-1f3fb-1f393","uc_output":"1f468-1f3fb-200d-1f393","uc_match":"1f468-1f3fb-1f393","uc_greedy":"1f468-1f3fb-1f393","shortnames":[":man_student_light_skin_tone:"],"category":"people"},":man_student_tone2:":{"uc_base":"1f468-1f3fc-1f393","uc_output":"1f468-1f3fc-200d-1f393","uc_match":"1f468-1f3fc-1f393","uc_greedy":"1f468-1f3fc-1f393","shortnames":[":man_student_medium_light_skin_tone:"],"category":"people"},":man_student_tone3:":{"uc_base":"1f468-1f3fd-1f393","uc_output":"1f468-1f3fd-200d-1f393","uc_match":"1f468-1f3fd-1f393","uc_greedy":"1f468-1f3fd-1f393","shortnames":[":man_student_medium_skin_tone:"],"category":"people"},":man_student_tone4:":{"uc_base":"1f468-1f3fe-1f393","uc_output":"1f468-1f3fe-200d-1f393","uc_match":"1f468-1f3fe-1f393","uc_greedy":"1f468-1f3fe-1f393","shortnames":[":man_student_medium_dark_skin_tone:"],"category":"people"},":man_student_tone5:":{"uc_base":"1f468-1f3ff-1f393","uc_output":"1f468-1f3ff-200d-1f393","uc_match":"1f468-1f3ff-1f393","uc_greedy":"1f468-1f3ff-1f393","shortnames":[":man_student_dark_skin_tone:"],"category":"people"},":man_teacher_tone1:":{"uc_base":"1f468-1f3fb-1f3eb","uc_output":"1f468-1f3fb-200d-1f3eb","uc_match":"1f468-1f3fb-1f3eb","uc_greedy":"1f468-1f3fb-1f3eb","shortnames":[":man_teacher_light_skin_tone:"],"category":"people"},":man_teacher_tone2:":{"uc_base":"1f468-1f3fc-1f3eb","uc_output":"1f468-1f3fc-200d-1f3eb","uc_match":"1f468-1f3fc-1f3eb","uc_greedy":"1f468-1f3fc-1f3eb","shortnames":[":man_teacher_medium_light_skin_tone:"],"category":"people"},":man_teacher_tone3:":{"uc_base":"1f468-1f3fd-1f3eb","uc_output":"1f468-1f3fd-200d-1f3eb","uc_match":"1f468-1f3fd-1f3eb","uc_greedy":"1f468-1f3fd-1f3eb","shortnames":[":man_teacher_medium_skin_tone:"],"category":"people"},":man_teacher_tone4:":{"uc_base":"1f468-1f3fe-1f3eb","uc_output":"1f468-1f3fe-200d-1f3eb","uc_match":"1f468-1f3fe-1f3eb","uc_greedy":"1f468-1f3fe-1f3eb","shortnames":[":man_teacher_medium_dark_skin_tone:"],"category":"people"},":man_teacher_tone5:":{"uc_base":"1f468-1f3ff-1f3eb","uc_output":"1f468-1f3ff-200d-1f3eb","uc_match":"1f468-1f3ff-1f3eb","uc_greedy":"1f468-1f3ff-1f3eb","shortnames":[":man_teacher_dark_skin_tone:"],"category":"people"},":man_technologist_tone1:":{"uc_base":"1f468-1f3fb-1f4bb","uc_output":"1f468-1f3fb-200d-1f4bb","uc_match":"1f468-1f3fb-1f4bb","uc_greedy":"1f468-1f3fb-1f4bb","shortnames":[":man_technologist_light_skin_tone:"],"category":"people"},":man_technologist_tone2:":{"uc_base":"1f468-1f3fc-1f4bb","uc_output":"1f468-1f3fc-200d-1f4bb","uc_match":"1f468-1f3fc-1f4bb","uc_greedy":"1f468-1f3fc-1f4bb","shortnames":[":man_technologist_medium_light_skin_tone:"],"category":"people"},":man_technologist_tone3:":{"uc_base":"1f468-1f3fd-1f4bb","uc_output":"1f468-1f3fd-200d-1f4bb","uc_match":"1f468-1f3fd-1f4bb","uc_greedy":"1f468-1f3fd-1f4bb","shortnames":[":man_technologist_medium_skin_tone:"],"category":"people"},":man_technologist_tone4:":{"uc_base":"1f468-1f3fe-1f4bb","uc_output":"1f468-1f3fe-200d-1f4bb","uc_match":"1f468-1f3fe-1f4bb","uc_greedy":"1f468-1f3fe-1f4bb","shortnames":[":man_technologist_medium_dark_skin_tone:"],"category":"people"},":man_technologist_tone5:":{"uc_base":"1f468-1f3ff-1f4bb","uc_output":"1f468-1f3ff-200d-1f4bb","uc_match":"1f468-1f3ff-1f4bb","uc_greedy":"1f468-1f3ff-1f4bb","shortnames":[":man_technologist_dark_skin_tone:"],"category":"people"},":woman_artist_tone1:":{"uc_base":"1f469-1f3fb-1f3a8","uc_output":"1f469-1f3fb-200d-1f3a8","uc_match":"1f469-1f3fb-1f3a8","uc_greedy":"1f469-1f3fb-1f3a8","shortnames":[":woman_artist_light_skin_tone:"],"category":"people"},":woman_artist_tone2:":{"uc_base":"1f469-1f3fc-1f3a8","uc_output":"1f469-1f3fc-200d-1f3a8","uc_match":"1f469-1f3fc-1f3a8","uc_greedy":"1f469-1f3fc-1f3a8","shortnames":[":woman_artist_medium_light_skin_tone:"],"category":"people"},":woman_artist_tone3:":{"uc_base":"1f469-1f3fd-1f3a8","uc_output":"1f469-1f3fd-200d-1f3a8","uc_match":"1f469-1f3fd-1f3a8","uc_greedy":"1f469-1f3fd-1f3a8","shortnames":[":woman_artist_medium_skin_tone:"],"category":"people"},":woman_artist_tone4:":{"uc_base":"1f469-1f3fe-1f3a8","uc_output":"1f469-1f3fe-200d-1f3a8","uc_match":"1f469-1f3fe-1f3a8","uc_greedy":"1f469-1f3fe-1f3a8","shortnames":[":woman_artist_medium_dark_skin_tone:"],"category":"people"},":woman_artist_tone5:":{"uc_base":"1f469-1f3ff-1f3a8","uc_output":"1f469-1f3ff-200d-1f3a8","uc_match":"1f469-1f3ff-1f3a8","uc_greedy":"1f469-1f3ff-1f3a8","shortnames":[":woman_artist_dark_skin_tone:"],"category":"people"},":woman_astronaut_tone1:":{"uc_base":"1f469-1f3fb-1f680","uc_output":"1f469-1f3fb-200d-1f680","uc_match":"1f469-1f3fb-1f680","uc_greedy":"1f469-1f3fb-1f680","shortnames":[":woman_astronaut_light_skin_tone:"],"category":"people"},":woman_astronaut_tone2:":{"uc_base":"1f469-1f3fc-1f680","uc_output":"1f469-1f3fc-200d-1f680","uc_match":"1f469-1f3fc-1f680","uc_greedy":"1f469-1f3fc-1f680","shortnames":[":woman_astronaut_medium_light_skin_tone:"],"category":"people"},":woman_astronaut_tone3:":{"uc_base":"1f469-1f3fd-1f680","uc_output":"1f469-1f3fd-200d-1f680","uc_match":"1f469-1f3fd-1f680","uc_greedy":"1f469-1f3fd-1f680","shortnames":[":woman_astronaut_medium_skin_tone:"],"category":"people"},":woman_astronaut_tone4:":{"uc_base":"1f469-1f3fe-1f680","uc_output":"1f469-1f3fe-200d-1f680","uc_match":"1f469-1f3fe-1f680","uc_greedy":"1f469-1f3fe-1f680","shortnames":[":woman_astronaut_medium_dark_skin_tone:"],"category":"people"},":woman_astronaut_tone5:":{"uc_base":"1f469-1f3ff-1f680","uc_output":"1f469-1f3ff-200d-1f680","uc_match":"1f469-1f3ff-1f680","uc_greedy":"1f469-1f3ff-1f680","shortnames":[":woman_astronaut_dark_skin_tone:"],"category":"people"},":woman_cook_tone1:":{"uc_base":"1f469-1f3fb-1f373","uc_output":"1f469-1f3fb-200d-1f373","uc_match":"1f469-1f3fb-1f373","uc_greedy":"1f469-1f3fb-1f373","shortnames":[":woman_cook_light_skin_tone:"],"category":"people"},":woman_cook_tone2:":{"uc_base":"1f469-1f3fc-1f373","uc_output":"1f469-1f3fc-200d-1f373","uc_match":"1f469-1f3fc-1f373","uc_greedy":"1f469-1f3fc-1f373","shortnames":[":woman_cook_medium_light_skin_tone:"],"category":"people"},":woman_cook_tone3:":{"uc_base":"1f469-1f3fd-1f373","uc_output":"1f469-1f3fd-200d-1f373","uc_match":"1f469-1f3fd-1f373","uc_greedy":"1f469-1f3fd-1f373","shortnames":[":woman_cook_medium_skin_tone:"],"category":"people"},":woman_cook_tone4:":{"uc_base":"1f469-1f3fe-1f373","uc_output":"1f469-1f3fe-200d-1f373","uc_match":"1f469-1f3fe-1f373","uc_greedy":"1f469-1f3fe-1f373","shortnames":[":woman_cook_medium_dark_skin_tone:"],"category":"people"},":woman_cook_tone5:":{"uc_base":"1f469-1f3ff-1f373","uc_output":"1f469-1f3ff-200d-1f373","uc_match":"1f469-1f3ff-1f373","uc_greedy":"1f469-1f3ff-1f373","shortnames":[":woman_cook_dark_skin_tone:"],"category":"people"},":woman_factory_worker_tone1:":{"uc_base":"1f469-1f3fb-1f3ed","uc_output":"1f469-1f3fb-200d-1f3ed","uc_match":"1f469-1f3fb-1f3ed","uc_greedy":"1f469-1f3fb-1f3ed","shortnames":[":woman_factory_worker_light_skin_tone:"],"category":"people"},":woman_factory_worker_tone2:":{"uc_base":"1f469-1f3fc-1f3ed","uc_output":"1f469-1f3fc-200d-1f3ed","uc_match":"1f469-1f3fc-1f3ed","uc_greedy":"1f469-1f3fc-1f3ed","shortnames":[":woman_factory_worker_medium_light_skin_tone:"],"category":"people"},":woman_factory_worker_tone3:":{"uc_base":"1f469-1f3fd-1f3ed","uc_output":"1f469-1f3fd-200d-1f3ed","uc_match":"1f469-1f3fd-1f3ed","uc_greedy":"1f469-1f3fd-1f3ed","shortnames":[":woman_factory_worker_medium_skin_tone:"],"category":"people"},":woman_factory_worker_tone4:":{"uc_base":"1f469-1f3fe-1f3ed","uc_output":"1f469-1f3fe-200d-1f3ed","uc_match":"1f469-1f3fe-1f3ed","uc_greedy":"1f469-1f3fe-1f3ed","shortnames":[":woman_factory_worker_medium_dark_skin_tone:"],"category":"people"},":woman_factory_worker_tone5:":{"uc_base":"1f469-1f3ff-1f3ed","uc_output":"1f469-1f3ff-200d-1f3ed","uc_match":"1f469-1f3ff-1f3ed","uc_greedy":"1f469-1f3ff-1f3ed","shortnames":[":woman_factory_worker_dark_skin_tone:"],"category":"people"},":woman_farmer_tone1:":{"uc_base":"1f469-1f3fb-1f33e","uc_output":"1f469-1f3fb-200d-1f33e","uc_match":"1f469-1f3fb-1f33e","uc_greedy":"1f469-1f3fb-1f33e","shortnames":[":woman_farmer_light_skin_tone:"],"category":"people"},":woman_farmer_tone2:":{"uc_base":"1f469-1f3fc-1f33e","uc_output":"1f469-1f3fc-200d-1f33e","uc_match":"1f469-1f3fc-1f33e","uc_greedy":"1f469-1f3fc-1f33e","shortnames":[":woman_farmer_medium_light_skin_tone:"],"category":"people"},":woman_farmer_tone3:":{"uc_base":"1f469-1f3fd-1f33e","uc_output":"1f469-1f3fd-200d-1f33e","uc_match":"1f469-1f3fd-1f33e","uc_greedy":"1f469-1f3fd-1f33e","shortnames":[":woman_farmer_medium_skin_tone:"],"category":"people"},":woman_farmer_tone4:":{"uc_base":"1f469-1f3fe-1f33e","uc_output":"1f469-1f3fe-200d-1f33e","uc_match":"1f469-1f3fe-1f33e","uc_greedy":"1f469-1f3fe-1f33e","shortnames":[":woman_farmer_medium_dark_skin_tone:"],"category":"people"},":woman_farmer_tone5:":{"uc_base":"1f469-1f3ff-1f33e","uc_output":"1f469-1f3ff-200d-1f33e","uc_match":"1f469-1f3ff-1f33e","uc_greedy":"1f469-1f3ff-1f33e","shortnames":[":woman_farmer_dark_skin_tone:"],"category":"people"},":woman_firefighter_tone1:":{"uc_base":"1f469-1f3fb-1f692","uc_output":"1f469-1f3fb-200d-1f692","uc_match":"1f469-1f3fb-1f692","uc_greedy":"1f469-1f3fb-1f692","shortnames":[":woman_firefighter_light_skin_tone:"],"category":"people"},":woman_firefighter_tone2:":{"uc_base":"1f469-1f3fc-1f692","uc_output":"1f469-1f3fc-200d-1f692","uc_match":"1f469-1f3fc-1f692","uc_greedy":"1f469-1f3fc-1f692","shortnames":[":woman_firefighter_medium_light_skin_tone:"],"category":"people"},":woman_firefighter_tone3:":{"uc_base":"1f469-1f3fd-1f692","uc_output":"1f469-1f3fd-200d-1f692","uc_match":"1f469-1f3fd-1f692","uc_greedy":"1f469-1f3fd-1f692","shortnames":[":woman_firefighter_medium_skin_tone:"],"category":"people"},":woman_firefighter_tone4:":{"uc_base":"1f469-1f3fe-1f692","uc_output":"1f469-1f3fe-200d-1f692","uc_match":"1f469-1f3fe-1f692","uc_greedy":"1f469-1f3fe-1f692","shortnames":[":woman_firefighter_medium_dark_skin_tone:"],"category":"people"},":woman_firefighter_tone5:":{"uc_base":"1f469-1f3ff-1f692","uc_output":"1f469-1f3ff-200d-1f692","uc_match":"1f469-1f3ff-1f692","uc_greedy":"1f469-1f3ff-1f692","shortnames":[":woman_firefighter_dark_skin_tone:"],"category":"people"},":woman_mechanic_tone1:":{"uc_base":"1f469-1f3fb-1f527","uc_output":"1f469-1f3fb-200d-1f527","uc_match":"1f469-1f3fb-1f527","uc_greedy":"1f469-1f3fb-1f527","shortnames":[":woman_mechanic_light_skin_tone:"],"category":"people"},":woman_mechanic_tone2:":{"uc_base":"1f469-1f3fc-1f527","uc_output":"1f469-1f3fc-200d-1f527","uc_match":"1f469-1f3fc-1f527","uc_greedy":"1f469-1f3fc-1f527","shortnames":[":woman_mechanic_medium_light_skin_tone:"],"category":"people"},":woman_mechanic_tone3:":{"uc_base":"1f469-1f3fd-1f527","uc_output":"1f469-1f3fd-200d-1f527","uc_match":"1f469-1f3fd-1f527","uc_greedy":"1f469-1f3fd-1f527","shortnames":[":woman_mechanic_medium_skin_tone:"],"category":"people"},":woman_mechanic_tone4:":{"uc_base":"1f469-1f3fe-1f527","uc_output":"1f469-1f3fe-200d-1f527","uc_match":"1f469-1f3fe-1f527","uc_greedy":"1f469-1f3fe-1f527","shortnames":[":woman_mechanic_medium_dark_skin_tone:"],"category":"people"},":woman_mechanic_tone5:":{"uc_base":"1f469-1f3ff-1f527","uc_output":"1f469-1f3ff-200d-1f527","uc_match":"1f469-1f3ff-1f527","uc_greedy":"1f469-1f3ff-1f527","shortnames":[":woman_mechanic_dark_skin_tone:"],"category":"people"},":woman_office_worker_tone1:":{"uc_base":"1f469-1f3fb-1f4bc","uc_output":"1f469-1f3fb-200d-1f4bc","uc_match":"1f469-1f3fb-1f4bc","uc_greedy":"1f469-1f3fb-1f4bc","shortnames":[":woman_office_worker_light_skin_tone:"],"category":"people"},":woman_office_worker_tone2:":{"uc_base":"1f469-1f3fc-1f4bc","uc_output":"1f469-1f3fc-200d-1f4bc","uc_match":"1f469-1f3fc-1f4bc","uc_greedy":"1f469-1f3fc-1f4bc","shortnames":[":woman_office_worker_medium_light_skin_tone:"],"category":"people"},":woman_office_worker_tone3:":{"uc_base":"1f469-1f3fd-1f4bc","uc_output":"1f469-1f3fd-200d-1f4bc","uc_match":"1f469-1f3fd-1f4bc","uc_greedy":"1f469-1f3fd-1f4bc","shortnames":[":woman_office_worker_medium_skin_tone:"],"category":"people"},":woman_office_worker_tone4:":{"uc_base":"1f469-1f3fe-1f4bc","uc_output":"1f469-1f3fe-200d-1f4bc","uc_match":"1f469-1f3fe-1f4bc","uc_greedy":"1f469-1f3fe-1f4bc","shortnames":[":woman_office_worker_medium_dark_skin_tone:"],"category":"people"},":woman_office_worker_tone5:":{"uc_base":"1f469-1f3ff-1f4bc","uc_output":"1f469-1f3ff-200d-1f4bc","uc_match":"1f469-1f3ff-1f4bc","uc_greedy":"1f469-1f3ff-1f4bc","shortnames":[":woman_office_worker_dark_skin_tone:"],"category":"people"},":woman_scientist_tone1:":{"uc_base":"1f469-1f3fb-1f52c","uc_output":"1f469-1f3fb-200d-1f52c","uc_match":"1f469-1f3fb-1f52c","uc_greedy":"1f469-1f3fb-1f52c","shortnames":[":woman_scientist_light_skin_tone:"],"category":"people"},":woman_scientist_tone2:":{"uc_base":"1f469-1f3fc-1f52c","uc_output":"1f469-1f3fc-200d-1f52c","uc_match":"1f469-1f3fc-1f52c","uc_greedy":"1f469-1f3fc-1f52c","shortnames":[":woman_scientist_medium_light_skin_tone:"],"category":"people"},":woman_scientist_tone3:":{"uc_base":"1f469-1f3fd-1f52c","uc_output":"1f469-1f3fd-200d-1f52c","uc_match":"1f469-1f3fd-1f52c","uc_greedy":"1f469-1f3fd-1f52c","shortnames":[":woman_scientist_medium_skin_tone:"],"category":"people"},":woman_scientist_tone4:":{"uc_base":"1f469-1f3fe-1f52c","uc_output":"1f469-1f3fe-200d-1f52c","uc_match":"1f469-1f3fe-1f52c","uc_greedy":"1f469-1f3fe-1f52c","shortnames":[":woman_scientist_medium_dark_skin_tone:"],"category":"people"},":woman_scientist_tone5:":{"uc_base":"1f469-1f3ff-1f52c","uc_output":"1f469-1f3ff-200d-1f52c","uc_match":"1f469-1f3ff-1f52c","uc_greedy":"1f469-1f3ff-1f52c","shortnames":[":woman_scientist_dark_skin_tone:"],"category":"people"},":woman_singer_tone1:":{"uc_base":"1f469-1f3fb-1f3a4","uc_output":"1f469-1f3fb-200d-1f3a4","uc_match":"1f469-1f3fb-1f3a4","uc_greedy":"1f469-1f3fb-1f3a4","shortnames":[":woman_singer_light_skin_tone:"],"category":"people"},":woman_singer_tone2:":{"uc_base":"1f469-1f3fc-1f3a4","uc_output":"1f469-1f3fc-200d-1f3a4","uc_match":"1f469-1f3fc-1f3a4","uc_greedy":"1f469-1f3fc-1f3a4","shortnames":[":woman_singer_medium_light_skin_tone:"],"category":"people"},":woman_singer_tone3:":{"uc_base":"1f469-1f3fd-1f3a4","uc_output":"1f469-1f3fd-200d-1f3a4","uc_match":"1f469-1f3fd-1f3a4","uc_greedy":"1f469-1f3fd-1f3a4","shortnames":[":woman_singer_medium_skin_tone:"],"category":"people"},":woman_singer_tone4:":{"uc_base":"1f469-1f3fe-1f3a4","uc_output":"1f469-1f3fe-200d-1f3a4","uc_match":"1f469-1f3fe-1f3a4","uc_greedy":"1f469-1f3fe-1f3a4","shortnames":[":woman_singer_medium_dark_skin_tone:"],"category":"people"},":woman_singer_tone5:":{"uc_base":"1f469-1f3ff-1f3a4","uc_output":"1f469-1f3ff-200d-1f3a4","uc_match":"1f469-1f3ff-1f3a4","uc_greedy":"1f469-1f3ff-1f3a4","shortnames":[":woman_singer_dark_skin_tone:"],"category":"people"},":woman_student_tone1:":{"uc_base":"1f469-1f3fb-1f393","uc_output":"1f469-1f3fb-200d-1f393","uc_match":"1f469-1f3fb-1f393","uc_greedy":"1f469-1f3fb-1f393","shortnames":[":woman_student_light_skin_tone:"],"category":"people"},":woman_student_tone2:":{"uc_base":"1f469-1f3fc-1f393","uc_output":"1f469-1f3fc-200d-1f393","uc_match":"1f469-1f3fc-1f393","uc_greedy":"1f469-1f3fc-1f393","shortnames":[":woman_student_medium_light_skin_tone:"],"category":"people"},":woman_student_tone3:":{"uc_base":"1f469-1f3fd-1f393","uc_output":"1f469-1f3fd-200d-1f393","uc_match":"1f469-1f3fd-1f393","uc_greedy":"1f469-1f3fd-1f393","shortnames":[":woman_student_medium_skin_tone:"],"category":"people"},":woman_student_tone4:":{"uc_base":"1f469-1f3fe-1f393","uc_output":"1f469-1f3fe-200d-1f393","uc_match":"1f469-1f3fe-1f393","uc_greedy":"1f469-1f3fe-1f393","shortnames":[":woman_student_medium_dark_skin_tone:"],"category":"people"},":woman_student_tone5:":{"uc_base":"1f469-1f3ff-1f393","uc_output":"1f469-1f3ff-200d-1f393","uc_match":"1f469-1f3ff-1f393","uc_greedy":"1f469-1f3ff-1f393","shortnames":[":woman_student_dark_skin_tone:"],"category":"people"},":woman_teacher_tone1:":{"uc_base":"1f469-1f3fb-1f3eb","uc_output":"1f469-1f3fb-200d-1f3eb","uc_match":"1f469-1f3fb-1f3eb","uc_greedy":"1f469-1f3fb-1f3eb","shortnames":[":woman_teacher_light_skin_tone:"],"category":"people"},":woman_teacher_tone2:":{"uc_base":"1f469-1f3fc-1f3eb","uc_output":"1f469-1f3fc-200d-1f3eb","uc_match":"1f469-1f3fc-1f3eb","uc_greedy":"1f469-1f3fc-1f3eb","shortnames":[":woman_teacher_medium_light_skin_tone:"],"category":"people"},":woman_teacher_tone3:":{"uc_base":"1f469-1f3fd-1f3eb","uc_output":"1f469-1f3fd-200d-1f3eb","uc_match":"1f469-1f3fd-1f3eb","uc_greedy":"1f469-1f3fd-1f3eb","shortnames":[":woman_teacher_medium_skin_tone:"],"category":"people"},":woman_teacher_tone4:":{"uc_base":"1f469-1f3fe-1f3eb","uc_output":"1f469-1f3fe-200d-1f3eb","uc_match":"1f469-1f3fe-1f3eb","uc_greedy":"1f469-1f3fe-1f3eb","shortnames":[":woman_teacher_medium_dark_skin_tone:"],"category":"people"},":woman_teacher_tone5:":{"uc_base":"1f469-1f3ff-1f3eb","uc_output":"1f469-1f3ff-200d-1f3eb","uc_match":"1f469-1f3ff-1f3eb","uc_greedy":"1f469-1f3ff-1f3eb","shortnames":[":woman_teacher_dark_skin_tone:"],"category":"people"},":woman_technologist_tone1:":{"uc_base":"1f469-1f3fb-1f4bb","uc_output":"1f469-1f3fb-200d-1f4bb","uc_match":"1f469-1f3fb-1f4bb","uc_greedy":"1f469-1f3fb-1f4bb","shortnames":[":woman_technologist_light_skin_tone:"],"category":"people"},":woman_technologist_tone2:":{"uc_base":"1f469-1f3fc-1f4bb","uc_output":"1f469-1f3fc-200d-1f4bb","uc_match":"1f469-1f3fc-1f4bb","uc_greedy":"1f469-1f3fc-1f4bb","shortnames":[":woman_technologist_medium_light_skin_tone:"],"category":"people"},":woman_technologist_tone3:":{"uc_base":"1f469-1f3fd-1f4bb","uc_output":"1f469-1f3fd-200d-1f4bb","uc_match":"1f469-1f3fd-1f4bb","uc_greedy":"1f469-1f3fd-1f4bb","shortnames":[":woman_technologist_medium_skin_tone:"],"category":"people"},":woman_technologist_tone4:":{"uc_base":"1f469-1f3fe-1f4bb","uc_output":"1f469-1f3fe-200d-1f4bb","uc_match":"1f469-1f3fe-1f4bb","uc_greedy":"1f469-1f3fe-1f4bb","shortnames":[":woman_technologist_medium_dark_skin_tone:"],"category":"people"},":woman_technologist_tone5:":{"uc_base":"1f469-1f3ff-1f4bb","uc_output":"1f469-1f3ff-200d-1f4bb","uc_match":"1f469-1f3ff-1f4bb","uc_greedy":"1f469-1f3ff-1f4bb","shortnames":[":woman_technologist_dark_skin_tone:"],"category":"people"},":rainbow_flag:":{"uc_base":"1f3f3-1f308","uc_output":"1f3f3-fe0f-200d-1f308","uc_match":"1f3f3-fe0f-1f308","uc_greedy":"1f3f3-1f308","shortnames":[":gay_pride_flag:"],"category":"flags"},":blond-haired_man:":{"uc_base":"1f471-2642","uc_output":"1f471-200d-2642-fe0f","uc_match":"1f471-2642-fe0f","uc_greedy":"1f471-2642","shortnames":[],"category":"people"},":blond-haired_woman:":{"uc_base":"1f471-2640","uc_output":"1f471-200d-2640-fe0f","uc_match":"1f471-2640-fe0f","uc_greedy":"1f471-2640","shortnames":[],"category":"people"},":man_biking:":{"uc_base":"1f6b4-2642","uc_output":"1f6b4-200d-2642-fe0f","uc_match":"1f6b4-2642-fe0f","uc_greedy":"1f6b4-2642","shortnames":[],"category":"activity"},":man_bowing:":{"uc_base":"1f647-2642","uc_output":"1f647-200d-2642-fe0f","uc_match":"1f647-2642-fe0f","uc_greedy":"1f647-2642","shortnames":[],"category":"people"},":man_cartwheeling:":{"uc_base":"1f938-2642","uc_output":"1f938-200d-2642-fe0f","uc_match":"1f938-2642-fe0f","uc_greedy":"1f938-2642","shortnames":[],"category":"activity"},":man_climbing:":{"uc_base":"1f9d7-2642","uc_output":"1f9d7-200d-2642-fe0f","uc_match":"1f9d7-2642-fe0f","uc_greedy":"1f9d7-2642","shortnames":[],"category":"activity"},":man_construction_worker:":{"uc_base":"1f477-2642","uc_output":"1f477-200d-2642-fe0f","uc_match":"1f477-2642-fe0f","uc_greedy":"1f477-2642","shortnames":[],"category":"people"},":man_elf:":{"uc_base":"1f9dd-2642","uc_output":"1f9dd-200d-2642-fe0f","uc_match":"1f9dd-2642-fe0f","uc_greedy":"1f9dd-2642","shortnames":[],"category":"people"},":man_facepalming:":{"uc_base":"1f926-2642","uc_output":"1f926-200d-2642-fe0f","uc_match":"1f926-2642-fe0f","uc_greedy":"1f926-2642","shortnames":[],"category":"people"},":man_fairy:":{"uc_base":"1f9da-2642","uc_output":"1f9da-200d-2642-fe0f","uc_match":"1f9da-2642-fe0f","uc_greedy":"1f9da-2642","shortnames":[],"category":"people"},":man_frowning:":{"uc_base":"1f64d-2642","uc_output":"1f64d-200d-2642-fe0f","uc_match":"1f64d-2642-fe0f","uc_greedy":"1f64d-2642","shortnames":[],"category":"people"},":man_genie:":{"uc_base":"1f9de-2642","uc_output":"1f9de-200d-2642-fe0f","uc_match":"1f9de-2642-fe0f","uc_greedy":"1f9de-2642","shortnames":[],"category":"people"},":man_gesturing_no:":{"uc_base":"1f645-2642","uc_output":"1f645-200d-2642-fe0f","uc_match":"1f645-2642-fe0f","uc_greedy":"1f645-2642","shortnames":[],"category":"people"},":man_gesturing_ok:":{"uc_base":"1f646-2642","uc_output":"1f646-200d-2642-fe0f","uc_match":"1f646-2642-fe0f","uc_greedy":"1f646-2642","shortnames":[],"category":"people"},":man_getting_face_massage:":{"uc_base":"1f486-2642","uc_output":"1f486-200d-2642-fe0f","uc_match":"1f486-2642-fe0f","uc_greedy":"1f486-2642","shortnames":[],"category":"people"},":man_getting_haircut:":{"uc_base":"1f487-2642","uc_output":"1f487-200d-2642-fe0f","uc_match":"1f487-2642-fe0f","uc_greedy":"1f487-2642","shortnames":[],"category":"people"},":man_guard:":{"uc_base":"1f482-2642","uc_output":"1f482-200d-2642-fe0f","uc_match":"1f482-2642-fe0f","uc_greedy":"1f482-2642","shortnames":[],"category":"people"},":man_health_worker:":{"uc_base":"1f468-2695","uc_output":"1f468-200d-2695-fe0f","uc_match":"1f468-2695-fe0f","uc_greedy":"1f468-2695","shortnames":[],"category":"people"},":man_in_lotus_position:":{"uc_base":"1f9d8-2642","uc_output":"1f9d8-200d-2642-fe0f","uc_match":"1f9d8-2642-fe0f","uc_greedy":"1f9d8-2642","shortnames":[],"category":"activity"},":man_in_steamy_room:":{"uc_base":"1f9d6-2642","uc_output":"1f9d6-200d-2642-fe0f","uc_match":"1f9d6-2642-fe0f","uc_greedy":"1f9d6-2642","shortnames":[],"category":"activity"},":man_judge:":{"uc_base":"1f468-2696","uc_output":"1f468-200d-2696-fe0f","uc_match":"1f468-2696-fe0f","uc_greedy":"1f468-2696","shortnames":[],"category":"people"},":man_juggling:":{"uc_base":"1f939-2642","uc_output":"1f939-200d-2642-fe0f","uc_match":"1f939-2642-fe0f","uc_greedy":"1f939-2642","shortnames":[],"category":"activity"},":man_mage:":{"uc_base":"1f9d9-2642","uc_output":"1f9d9-200d-2642-fe0f","uc_match":"1f9d9-2642-fe0f","uc_greedy":"1f9d9-2642","shortnames":[],"category":"people"},":man_mountain_biking:":{"uc_base":"1f6b5-2642","uc_output":"1f6b5-200d-2642-fe0f","uc_match":"1f6b5-2642-fe0f","uc_greedy":"1f6b5-2642","shortnames":[],"category":"activity"},":man_pilot:":{"uc_base":"1f468-2708","uc_output":"1f468-200d-2708-fe0f","uc_match":"1f468-2708-fe0f","uc_greedy":"1f468-2708","shortnames":[],"category":"people"},":man_playing_handball:":{"uc_base":"1f93e-2642","uc_output":"1f93e-200d-2642-fe0f","uc_match":"1f93e-2642-fe0f","uc_greedy":"1f93e-2642","shortnames":[],"category":"activity"},":man_playing_water_polo:":{"uc_base":"1f93d-2642","uc_output":"1f93d-200d-2642-fe0f","uc_match":"1f93d-2642-fe0f","uc_greedy":"1f93d-2642","shortnames":[],"category":"activity"},":man_police_officer:":{"uc_base":"1f46e-2642","uc_output":"1f46e-200d-2642-fe0f","uc_match":"1f46e-2642-fe0f","uc_greedy":"1f46e-2642","shortnames":[],"category":"people"},":man_pouting:":{"uc_base":"1f64e-2642","uc_output":"1f64e-200d-2642-fe0f","uc_match":"1f64e-2642-fe0f","uc_greedy":"1f64e-2642","shortnames":[],"category":"people"},":man_raising_hand:":{"uc_base":"1f64b-2642","uc_output":"1f64b-200d-2642-fe0f","uc_match":"1f64b-2642-fe0f","uc_greedy":"1f64b-2642","shortnames":[],"category":"people"},":man_rowing_boat:":{"uc_base":"1f6a3-2642","uc_output":"1f6a3-200d-2642-fe0f","uc_match":"1f6a3-2642-fe0f","uc_greedy":"1f6a3-2642","shortnames":[],"category":"activity"},":man_running:":{"uc_base":"1f3c3-2642","uc_output":"1f3c3-200d-2642-fe0f","uc_match":"1f3c3-2642-fe0f","uc_greedy":"1f3c3-2642","shortnames":[],"category":"people"},":man_shrugging:":{"uc_base":"1f937-2642","uc_output":"1f937-200d-2642-fe0f","uc_match":"1f937-2642-fe0f","uc_greedy":"1f937-2642","shortnames":[],"category":"people"},":man_surfing:":{"uc_base":"1f3c4-2642","uc_output":"1f3c4-200d-2642-fe0f","uc_match":"1f3c4-2642-fe0f","uc_greedy":"1f3c4-2642","shortnames":[],"category":"activity"},":man_swimming:":{"uc_base":"1f3ca-2642","uc_output":"1f3ca-200d-2642-fe0f","uc_match":"1f3ca-2642-fe0f","uc_greedy":"1f3ca-2642","shortnames":[],"category":"activity"},":man_tipping_hand:":{"uc_base":"1f481-2642","uc_output":"1f481-200d-2642-fe0f","uc_match":"1f481-2642-fe0f","uc_greedy":"1f481-2642","shortnames":[],"category":"people"},":man_vampire:":{"uc_base":"1f9db-2642","uc_output":"1f9db-200d-2642-fe0f","uc_match":"1f9db-2642-fe0f","uc_greedy":"1f9db-2642","shortnames":[],"category":"people"},":man_walking:":{"uc_base":"1f6b6-2642","uc_output":"1f6b6-200d-2642-fe0f","uc_match":"1f6b6-2642-fe0f","uc_greedy":"1f6b6-2642","shortnames":[],"category":"people"},":man_wearing_turban:":{"uc_base":"1f473-2642","uc_output":"1f473-200d-2642-fe0f","uc_match":"1f473-2642-fe0f","uc_greedy":"1f473-2642","shortnames":[],"category":"people"},":man_zombie:":{"uc_base":"1f9df-2642","uc_output":"1f9df-200d-2642-fe0f","uc_match":"1f9df-2642-fe0f","uc_greedy":"1f9df-2642","shortnames":[],"category":"people"},":men_with_bunny_ears_partying:":{"uc_base":"1f46f-2642","uc_output":"1f46f-200d-2642-fe0f","uc_match":"1f46f-2642-fe0f","uc_greedy":"1f46f-2642","shortnames":[],"category":"people"},":men_wrestling:":{"uc_base":"1f93c-2642","uc_output":"1f93c-200d-2642-fe0f","uc_match":"1f93c-2642-fe0f","uc_greedy":"1f93c-2642","shortnames":[],"category":"activity"},":mermaid:":{"uc_base":"1f9dc-2640","uc_output":"1f9dc-200d-2640-fe0f","uc_match":"1f9dc-2640-fe0f","uc_greedy":"1f9dc-2640","shortnames":[],"category":"people"},":merman:":{"uc_base":"1f9dc-2642","uc_output":"1f9dc-200d-2642-fe0f","uc_match":"1f9dc-2642-fe0f","uc_greedy":"1f9dc-2642","shortnames":[],"category":"people"},":woman_biking:":{"uc_base":"1f6b4-2640","uc_output":"1f6b4-200d-2640-fe0f","uc_match":"1f6b4-2640-fe0f","uc_greedy":"1f6b4-2640","shortnames":[],"category":"activity"},":woman_bowing:":{"uc_base":"1f647-2640","uc_output":"1f647-200d-2640-fe0f","uc_match":"1f647-2640-fe0f","uc_greedy":"1f647-2640","shortnames":[],"category":"people"},":woman_cartwheeling:":{"uc_base":"1f938-2640","uc_output":"1f938-200d-2640-fe0f","uc_match":"1f938-2640-fe0f","uc_greedy":"1f938-2640","shortnames":[],"category":"activity"},":woman_climbing:":{"uc_base":"1f9d7-2640","uc_output":"1f9d7-200d-2640-fe0f","uc_match":"1f9d7-2640-fe0f","uc_greedy":"1f9d7-2640","shortnames":[],"category":"activity"},":woman_construction_worker:":{"uc_base":"1f477-2640","uc_output":"1f477-200d-2640-fe0f","uc_match":"1f477-2640-fe0f","uc_greedy":"1f477-2640","shortnames":[],"category":"people"},":woman_elf:":{"uc_base":"1f9dd-2640","uc_output":"1f9dd-200d-2640-fe0f","uc_match":"1f9dd-2640-fe0f","uc_greedy":"1f9dd-2640","shortnames":[],"category":"people"},":woman_facepalming:":{"uc_base":"1f926-2640","uc_output":"1f926-200d-2640-fe0f","uc_match":"1f926-2640-fe0f","uc_greedy":"1f926-2640","shortnames":[],"category":"people"},":woman_fairy:":{"uc_base":"1f9da-2640","uc_output":"1f9da-200d-2640-fe0f","uc_match":"1f9da-2640-fe0f","uc_greedy":"1f9da-2640","shortnames":[],"category":"people"},":woman_frowning:":{"uc_base":"1f64d-2640","uc_output":"1f64d-200d-2640-fe0f","uc_match":"1f64d-2640-fe0f","uc_greedy":"1f64d-2640","shortnames":[],"category":"people"},":woman_genie:":{"uc_base":"1f9de-2640","uc_output":"1f9de-200d-2640-fe0f","uc_match":"1f9de-2640-fe0f","uc_greedy":"1f9de-2640","shortnames":[],"category":"people"},":woman_gesturing_no:":{"uc_base":"1f645-2640","uc_output":"1f645-200d-2640-fe0f","uc_match":"1f645-2640-fe0f","uc_greedy":"1f645-2640","shortnames":[],"category":"people"},":woman_gesturing_ok:":{"uc_base":"1f646-2640","uc_output":"1f646-200d-2640-fe0f","uc_match":"1f646-2640-fe0f","uc_greedy":"1f646-2640","shortnames":[],"category":"people"},":woman_getting_face_massage:":{"uc_base":"1f486-2640","uc_output":"1f486-200d-2640-fe0f","uc_match":"1f486-2640-fe0f","uc_greedy":"1f486-2640","shortnames":[],"category":"people"},":woman_getting_haircut:":{"uc_base":"1f487-2640","uc_output":"1f487-200d-2640-fe0f","uc_match":"1f487-2640-fe0f","uc_greedy":"1f487-2640","shortnames":[],"category":"people"},":woman_guard:":{"uc_base":"1f482-2640","uc_output":"1f482-200d-2640-fe0f","uc_match":"1f482-2640-fe0f","uc_greedy":"1f482-2640","shortnames":[],"category":"people"},":woman_health_worker:":{"uc_base":"1f469-2695","uc_output":"1f469-200d-2695-fe0f","uc_match":"1f469-2695-fe0f","uc_greedy":"1f469-2695","shortnames":[],"category":"people"},":woman_in_lotus_position:":{"uc_base":"1f9d8-2640","uc_output":"1f9d8-200d-2640-fe0f","uc_match":"1f9d8-2640-fe0f","uc_greedy":"1f9d8-2640","shortnames":[],"category":"activity"},":woman_in_steamy_room:":{"uc_base":"1f9d6-2640","uc_output":"1f9d6-200d-2640-fe0f","uc_match":"1f9d6-2640-fe0f","uc_greedy":"1f9d6-2640","shortnames":[],"category":"activity"},":woman_judge:":{"uc_base":"1f469-2696","uc_output":"1f469-200d-2696-fe0f","uc_match":"1f469-2696-fe0f","uc_greedy":"1f469-2696","shortnames":[],"category":"people"},":woman_juggling:":{"uc_base":"1f939-2640","uc_output":"1f939-200d-2640-fe0f","uc_match":"1f939-2640-fe0f","uc_greedy":"1f939-2640","shortnames":[],"category":"activity"},":woman_mage:":{"uc_base":"1f9d9-2640","uc_output":"1f9d9-200d-2640-fe0f","uc_match":"1f9d9-2640-fe0f","uc_greedy":"1f9d9-2640","shortnames":[],"category":"people"},":woman_mountain_biking:":{"uc_base":"1f6b5-2640","uc_output":"1f6b5-200d-2640-fe0f","uc_match":"1f6b5-2640-fe0f","uc_greedy":"1f6b5-2640","shortnames":[],"category":"activity"},":woman_pilot:":{"uc_base":"1f469-2708","uc_output":"1f469-200d-2708-fe0f","uc_match":"1f469-2708-fe0f","uc_greedy":"1f469-2708","shortnames":[],"category":"people"},":woman_playing_handball:":{"uc_base":"1f93e-2640","uc_output":"1f93e-200d-2640-fe0f","uc_match":"1f93e-2640-fe0f","uc_greedy":"1f93e-2640","shortnames":[],"category":"activity"},":woman_playing_water_polo:":{"uc_base":"1f93d-2640","uc_output":"1f93d-200d-2640-fe0f","uc_match":"1f93d-2640-fe0f","uc_greedy":"1f93d-2640","shortnames":[],"category":"activity"},":woman_police_officer:":{"uc_base":"1f46e-2640","uc_output":"1f46e-200d-2640-fe0f","uc_match":"1f46e-2640-fe0f","uc_greedy":"1f46e-2640","shortnames":[],"category":"people"},":woman_pouting:":{"uc_base":"1f64e-2640","uc_output":"1f64e-200d-2640-fe0f","uc_match":"1f64e-2640-fe0f","uc_greedy":"1f64e-2640","shortnames":[],"category":"people"},":woman_raising_hand:":{"uc_base":"1f64b-2640","uc_output":"1f64b-200d-2640-fe0f","uc_match":"1f64b-2640-fe0f","uc_greedy":"1f64b-2640","shortnames":[],"category":"people"},":woman_rowing_boat:":{"uc_base":"1f6a3-2640","uc_output":"1f6a3-200d-2640-fe0f","uc_match":"1f6a3-2640-fe0f","uc_greedy":"1f6a3-2640","shortnames":[],"category":"activity"},":woman_running:":{"uc_base":"1f3c3-2640","uc_output":"1f3c3-200d-2640-fe0f","uc_match":"1f3c3-2640-fe0f","uc_greedy":"1f3c3-2640","shortnames":[],"category":"people"},":woman_shrugging:":{"uc_base":"1f937-2640","uc_output":"1f937-200d-2640-fe0f","uc_match":"1f937-2640-fe0f","uc_greedy":"1f937-2640","shortnames":[],"category":"people"},":woman_surfing:":{"uc_base":"1f3c4-2640","uc_output":"1f3c4-200d-2640-fe0f","uc_match":"1f3c4-2640-fe0f","uc_greedy":"1f3c4-2640","shortnames":[],"category":"activity"},":woman_swimming:":{"uc_base":"1f3ca-2640","uc_output":"1f3ca-200d-2640-fe0f","uc_match":"1f3ca-2640-fe0f","uc_greedy":"1f3ca-2640","shortnames":[],"category":"activity"},":woman_tipping_hand:":{"uc_base":"1f481-2640","uc_output":"1f481-200d-2640-fe0f","uc_match":"1f481-2640-fe0f","uc_greedy":"1f481-2640","shortnames":[],"category":"people"},":woman_vampire:":{"uc_base":"1f9db-2640","uc_output":"1f9db-200d-2640-fe0f","uc_match":"1f9db-2640-fe0f","uc_greedy":"1f9db-2640","shortnames":[],"category":"people"},":woman_walking:":{"uc_base":"1f6b6-2640","uc_output":"1f6b6-200d-2640-fe0f","uc_match":"1f6b6-2640-fe0f","uc_greedy":"1f6b6-2640","shortnames":[],"category":"people"},":woman_wearing_turban:":{"uc_base":"1f473-2640","uc_output":"1f473-200d-2640-fe0f","uc_match":"1f473-2640-fe0f","uc_greedy":"1f473-2640","shortnames":[],"category":"people"},":woman_zombie:":{"uc_base":"1f9df-2640","uc_output":"1f9df-200d-2640-fe0f","uc_match":"1f9df-2640-fe0f","uc_greedy":"1f9df-2640","shortnames":[],"category":"people"},":women_with_bunny_ears_partying:":{"uc_base":"1f46f-2640","uc_output":"1f46f-200d-2640-fe0f","uc_match":"1f46f-2640-fe0f","uc_greedy":"1f46f-2640","shortnames":[],"category":"people"},":women_wrestling:":{"uc_base":"1f93c-2640","uc_output":"1f93c-200d-2640-fe0f","uc_match":"1f93c-2640-fe0f","uc_greedy":"1f93c-2640","shortnames":[],"category":"activity"},":family_man_boy:":{"uc_base":"1f468-1f466","uc_output":"1f468-200d-1f466","uc_match":"1f468-1f466","uc_greedy":"1f468-1f466","shortnames":[],"category":"people"},":family_man_girl:":{"uc_base":"1f468-1f467","uc_output":"1f468-200d-1f467","uc_match":"1f468-1f467","uc_greedy":"1f468-1f467","shortnames":[],"category":"people"},":family_woman_boy:":{"uc_base":"1f469-1f466","uc_output":"1f469-200d-1f466","uc_match":"1f469-1f466","uc_greedy":"1f469-1f466","shortnames":[],"category":"people"},":family_woman_girl:":{"uc_base":"1f469-1f467","uc_output":"1f469-200d-1f467","uc_match":"1f469-1f467","uc_greedy":"1f469-1f467","shortnames":[],"category":"people"},":man_artist:":{"uc_base":"1f468-1f3a8","uc_output":"1f468-200d-1f3a8","uc_match":"1f468-1f3a8","uc_greedy":"1f468-1f3a8","shortnames":[],"category":"people"},":man_astronaut:":{"uc_base":"1f468-1f680","uc_output":"1f468-200d-1f680","uc_match":"1f468-1f680","uc_greedy":"1f468-1f680","shortnames":[],"category":"people"},":man_cook:":{"uc_base":"1f468-1f373","uc_output":"1f468-200d-1f373","uc_match":"1f468-1f373","uc_greedy":"1f468-1f373","shortnames":[],"category":"people"},":man_factory_worker:":{"uc_base":"1f468-1f3ed","uc_output":"1f468-200d-1f3ed","uc_match":"1f468-1f3ed","uc_greedy":"1f468-1f3ed","shortnames":[],"category":"people"},":man_farmer:":{"uc_base":"1f468-1f33e","uc_output":"1f468-200d-1f33e","uc_match":"1f468-1f33e","uc_greedy":"1f468-1f33e","shortnames":[],"category":"people"},":man_firefighter:":{"uc_base":"1f468-1f692","uc_output":"1f468-200d-1f692","uc_match":"1f468-1f692","uc_greedy":"1f468-1f692","shortnames":[],"category":"people"},":man_mechanic:":{"uc_base":"1f468-1f527","uc_output":"1f468-200d-1f527","uc_match":"1f468-1f527","uc_greedy":"1f468-1f527","shortnames":[],"category":"people"},":man_office_worker:":{"uc_base":"1f468-1f4bc","uc_output":"1f468-200d-1f4bc","uc_match":"1f468-1f4bc","uc_greedy":"1f468-1f4bc","shortnames":[],"category":"people"},":man_scientist:":{"uc_base":"1f468-1f52c","uc_output":"1f468-200d-1f52c","uc_match":"1f468-1f52c","uc_greedy":"1f468-1f52c","shortnames":[],"category":"people"},":man_singer:":{"uc_base":"1f468-1f3a4","uc_output":"1f468-200d-1f3a4","uc_match":"1f468-1f3a4","uc_greedy":"1f468-1f3a4","shortnames":[],"category":"people"},":man_student:":{"uc_base":"1f468-1f393","uc_output":"1f468-200d-1f393","uc_match":"1f468-1f393","uc_greedy":"1f468-1f393","shortnames":[],"category":"people"},":man_teacher:":{"uc_base":"1f468-1f3eb","uc_output":"1f468-200d-1f3eb","uc_match":"1f468-1f3eb","uc_greedy":"1f468-1f3eb","shortnames":[],"category":"people"},":man_technologist:":{"uc_base":"1f468-1f4bb","uc_output":"1f468-200d-1f4bb","uc_match":"1f468-1f4bb","uc_greedy":"1f468-1f4bb","shortnames":[],"category":"people"},":woman_artist:":{"uc_base":"1f469-1f3a8","uc_output":"1f469-200d-1f3a8","uc_match":"1f469-1f3a8","uc_greedy":"1f469-1f3a8","shortnames":[],"category":"people"},":woman_astronaut:":{"uc_base":"1f469-1f680","uc_output":"1f469-200d-1f680","uc_match":"1f469-1f680","uc_greedy":"1f469-1f680","shortnames":[],"category":"people"},":woman_cook:":{"uc_base":"1f469-1f373","uc_output":"1f469-200d-1f373","uc_match":"1f469-1f373","uc_greedy":"1f469-1f373","shortnames":[],"category":"people"},":woman_factory_worker:":{"uc_base":"1f469-1f3ed","uc_output":"1f469-200d-1f3ed","uc_match":"1f469-1f3ed","uc_greedy":"1f469-1f3ed","shortnames":[],"category":"people"},":woman_farmer:":{"uc_base":"1f469-1f33e","uc_output":"1f469-200d-1f33e","uc_match":"1f469-1f33e","uc_greedy":"1f469-1f33e","shortnames":[],"category":"people"},":woman_firefighter:":{"uc_base":"1f469-1f692","uc_output":"1f469-200d-1f692","uc_match":"1f469-1f692","uc_greedy":"1f469-1f692","shortnames":[],"category":"people"},":woman_mechanic:":{"uc_base":"1f469-1f527","uc_output":"1f469-200d-1f527","uc_match":"1f469-1f527","uc_greedy":"1f469-1f527","shortnames":[],"category":"people"},":woman_office_worker:":{"uc_base":"1f469-1f4bc","uc_output":"1f469-200d-1f4bc","uc_match":"1f469-1f4bc","uc_greedy":"1f469-1f4bc","shortnames":[],"category":"people"},":woman_scientist:":{"uc_base":"1f469-1f52c","uc_output":"1f469-200d-1f52c","uc_match":"1f469-1f52c","uc_greedy":"1f469-1f52c","shortnames":[],"category":"people"},":woman_singer:":{"uc_base":"1f469-1f3a4","uc_output":"1f469-200d-1f3a4","uc_match":"1f469-1f3a4","uc_greedy":"1f469-1f3a4","shortnames":[],"category":"people"},":woman_student:":{"uc_base":"1f469-1f393","uc_output":"1f469-200d-1f393","uc_match":"1f469-1f393","uc_greedy":"1f469-1f393","shortnames":[],"category":"people"},":woman_teacher:":{"uc_base":"1f469-1f3eb","uc_output":"1f469-200d-1f3eb","uc_match":"1f469-1f3eb","uc_greedy":"1f469-1f3eb","shortnames":[],"category":"people"},":woman_technologist:":{"uc_base":"1f469-1f4bb","uc_output":"1f469-200d-1f4bb","uc_match":"1f469-1f4bb","uc_greedy":"1f469-1f4bb","shortnames":[],"category":"people"},":asterisk:":{"uc_base":"002a-20e3","uc_output":"002a-fe0f-20e3","uc_match":"002a-20e3","uc_greedy":"002a-20e3","shortnames":[":keycap_asterisk:"],"category":"symbols"},":eight:":{"uc_base":"0038-20e3","uc_output":"0038-fe0f-20e3","uc_match":"0038-20e3","uc_greedy":"0038-20e3","shortnames":[],"category":"symbols"},":five:":{"uc_base":"0035-20e3","uc_output":"0035-fe0f-20e3","uc_match":"0035-20e3","uc_greedy":"0035-20e3","shortnames":[],"category":"symbols"},":four:":{"uc_base":"0034-20e3","uc_output":"0034-fe0f-20e3","uc_match":"0034-20e3","uc_greedy":"0034-20e3","shortnames":[],"category":"symbols"},":hash:":{"uc_base":"0023-20e3","uc_output":"0023-fe0f-20e3","uc_match":"0023-20e3","uc_greedy":"0023-20e3","shortnames":[],"category":"symbols"},":nine:":{"uc_base":"0039-20e3","uc_output":"0039-fe0f-20e3","uc_match":"0039-20e3","uc_greedy":"0039-20e3","shortnames":[],"category":"symbols"},":one:":{"uc_base":"0031-20e3","uc_output":"0031-fe0f-20e3","uc_match":"0031-20e3","uc_greedy":"0031-20e3","shortnames":[],"category":"symbols"},":seven:":{"uc_base":"0037-20e3","uc_output":"0037-fe0f-20e3","uc_match":"0037-20e3","uc_greedy":"0037-20e3","shortnames":[],"category":"symbols"},":six:":{"uc_base":"0036-20e3","uc_output":"0036-fe0f-20e3","uc_match":"0036-20e3","uc_greedy":"0036-20e3","shortnames":[],"category":"symbols"},":three:":{"uc_base":"0033-20e3","uc_output":"0033-fe0f-20e3","uc_match":"0033-20e3","uc_greedy":"0033-20e3","shortnames":[],"category":"symbols"},":two:":{"uc_base":"0032-20e3","uc_output":"0032-fe0f-20e3","uc_match":"0032-20e3","uc_greedy":"0032-20e3","shortnames":[],"category":"symbols"},":zero:":{"uc_base":"0030-20e3","uc_output":"0030-fe0f-20e3","uc_match":"0030-20e3","uc_greedy":"0030-20e3","shortnames":[],"category":"symbols"},":adult_tone1:":{"uc_base":"1f9d1-1f3fb","uc_output":"1f9d1-1f3fb","uc_match":"1f9d1-1f3fb","uc_greedy":"1f9d1-1f3fb","shortnames":[":adult_light_skin_tone:"],"category":"people"},":adult_tone2:":{"uc_base":"1f9d1-1f3fc","uc_output":"1f9d1-1f3fc","uc_match":"1f9d1-1f3fc","uc_greedy":"1f9d1-1f3fc","shortnames":[":adult_medium_light_skin_tone:"],"category":"people"},":adult_tone3:":{"uc_base":"1f9d1-1f3fd","uc_output":"1f9d1-1f3fd","uc_match":"1f9d1-1f3fd","uc_greedy":"1f9d1-1f3fd","shortnames":[":adult_medium_skin_tone:"],"category":"people"},":adult_tone4:":{"uc_base":"1f9d1-1f3fe","uc_output":"1f9d1-1f3fe","uc_match":"1f9d1-1f3fe","uc_greedy":"1f9d1-1f3fe","shortnames":[":adult_medium_dark_skin_tone:"],"category":"people"},":adult_tone5:":{"uc_base":"1f9d1-1f3ff","uc_output":"1f9d1-1f3ff","uc_match":"1f9d1-1f3ff","uc_greedy":"1f9d1-1f3ff","shortnames":[":adult_dark_skin_tone:"],"category":"people"},":angel_tone1:":{"uc_base":"1f47c-1f3fb","uc_output":"1f47c-1f3fb","uc_match":"1f47c-1f3fb","uc_greedy":"1f47c-1f3fb","shortnames":[],"category":"people"},":angel_tone2:":{"uc_base":"1f47c-1f3fc","uc_output":"1f47c-1f3fc","uc_match":"1f47c-1f3fc","uc_greedy":"1f47c-1f3fc","shortnames":[],"category":"people"},":angel_tone3:":{"uc_base":"1f47c-1f3fd","uc_output":"1f47c-1f3fd","uc_match":"1f47c-1f3fd","uc_greedy":"1f47c-1f3fd","shortnames":[],"category":"people"},":angel_tone4:":{"uc_base":"1f47c-1f3fe","uc_output":"1f47c-1f3fe","uc_match":"1f47c-1f3fe","uc_greedy":"1f47c-1f3fe","shortnames":[],"category":"people"},":angel_tone5:":{"uc_base":"1f47c-1f3ff","uc_output":"1f47c-1f3ff","uc_match":"1f47c-1f3ff","uc_greedy":"1f47c-1f3ff","shortnames":[],"category":"people"},":baby_tone1:":{"uc_base":"1f476-1f3fb","uc_output":"1f476-1f3fb","uc_match":"1f476-1f3fb","uc_greedy":"1f476-1f3fb","shortnames":[],"category":"people"},":baby_tone2:":{"uc_base":"1f476-1f3fc","uc_output":"1f476-1f3fc","uc_match":"1f476-1f3fc","uc_greedy":"1f476-1f3fc","shortnames":[],"category":"people"},":baby_tone3:":{"uc_base":"1f476-1f3fd","uc_output":"1f476-1f3fd","uc_match":"1f476-1f3fd","uc_greedy":"1f476-1f3fd","shortnames":[],"category":"people"},":baby_tone4:":{"uc_base":"1f476-1f3fe","uc_output":"1f476-1f3fe","uc_match":"1f476-1f3fe","uc_greedy":"1f476-1f3fe","shortnames":[],"category":"people"},":baby_tone5:":{"uc_base":"1f476-1f3ff","uc_output":"1f476-1f3ff","uc_match":"1f476-1f3ff","uc_greedy":"1f476-1f3ff","shortnames":[],"category":"people"},":bath_tone1:":{"uc_base":"1f6c0-1f3fb","uc_output":"1f6c0-1f3fb","uc_match":"1f6c0-1f3fb","uc_greedy":"1f6c0-1f3fb","shortnames":[],"category":"objects"},":bath_tone2:":{"uc_base":"1f6c0-1f3fc","uc_output":"1f6c0-1f3fc","uc_match":"1f6c0-1f3fc","uc_greedy":"1f6c0-1f3fc","shortnames":[],"category":"objects"},":bath_tone3:":{"uc_base":"1f6c0-1f3fd","uc_output":"1f6c0-1f3fd","uc_match":"1f6c0-1f3fd","uc_greedy":"1f6c0-1f3fd","shortnames":[],"category":"objects"},":bath_tone4:":{"uc_base":"1f6c0-1f3fe","uc_output":"1f6c0-1f3fe","uc_match":"1f6c0-1f3fe","uc_greedy":"1f6c0-1f3fe","shortnames":[],"category":"objects"},":bath_tone5:":{"uc_base":"1f6c0-1f3ff","uc_output":"1f6c0-1f3ff","uc_match":"1f6c0-1f3ff","uc_greedy":"1f6c0-1f3ff","shortnames":[],"category":"objects"},":bearded_person_tone1:":{"uc_base":"1f9d4-1f3fb","uc_output":"1f9d4-1f3fb","uc_match":"1f9d4-1f3fb","uc_greedy":"1f9d4-1f3fb","shortnames":[":bearded_person_light_skin_tone:"],"category":"people"},":bearded_person_tone2:":{"uc_base":"1f9d4-1f3fc","uc_output":"1f9d4-1f3fc","uc_match":"1f9d4-1f3fc","uc_greedy":"1f9d4-1f3fc","shortnames":[":bearded_person_medium_light_skin_tone:"],"category":"people"},":bearded_person_tone3:":{"uc_base":"1f9d4-1f3fd","uc_output":"1f9d4-1f3fd","uc_match":"1f9d4-1f3fd","uc_greedy":"1f9d4-1f3fd","shortnames":[":bearded_person_medium_skin_tone:"],"category":"people"},":bearded_person_tone4:":{"uc_base":"1f9d4-1f3fe","uc_output":"1f9d4-1f3fe","uc_match":"1f9d4-1f3fe","uc_greedy":"1f9d4-1f3fe","shortnames":[":bearded_person_medium_dark_skin_tone:"],"category":"people"},":bearded_person_tone5:":{"uc_base":"1f9d4-1f3ff","uc_output":"1f9d4-1f3ff","uc_match":"1f9d4-1f3ff","uc_greedy":"1f9d4-1f3ff","shortnames":[":bearded_person_dark_skin_tone:"],"category":"people"},":blond_haired_person_tone1:":{"uc_base":"1f471-1f3fb","uc_output":"1f471-1f3fb","uc_match":"1f471-1f3fb","uc_greedy":"1f471-1f3fb","shortnames":[":person_with_blond_hair_tone1:"],"category":"people"},":blond_haired_person_tone2:":{"uc_base":"1f471-1f3fc","uc_output":"1f471-1f3fc","uc_match":"1f471-1f3fc","uc_greedy":"1f471-1f3fc","shortnames":[":person_with_blond_hair_tone2:"],"category":"people"},":blond_haired_person_tone3:":{"uc_base":"1f471-1f3fd","uc_output":"1f471-1f3fd","uc_match":"1f471-1f3fd","uc_greedy":"1f471-1f3fd","shortnames":[":person_with_blond_hair_tone3:"],"category":"people"},":blond_haired_person_tone4:":{"uc_base":"1f471-1f3fe","uc_output":"1f471-1f3fe","uc_match":"1f471-1f3fe","uc_greedy":"1f471-1f3fe","shortnames":[":person_with_blond_hair_tone4:"],"category":"people"},":blond_haired_person_tone5:":{"uc_base":"1f471-1f3ff","uc_output":"1f471-1f3ff","uc_match":"1f471-1f3ff","uc_greedy":"1f471-1f3ff","shortnames":[":person_with_blond_hair_tone5:"],"category":"people"},":boy_tone1:":{"uc_base":"1f466-1f3fb","uc_output":"1f466-1f3fb","uc_match":"1f466-1f3fb","uc_greedy":"1f466-1f3fb","shortnames":[],"category":"people"},":boy_tone2:":{"uc_base":"1f466-1f3fc","uc_output":"1f466-1f3fc","uc_match":"1f466-1f3fc","uc_greedy":"1f466-1f3fc","shortnames":[],"category":"people"},":boy_tone3:":{"uc_base":"1f466-1f3fd","uc_output":"1f466-1f3fd","uc_match":"1f466-1f3fd","uc_greedy":"1f466-1f3fd","shortnames":[],"category":"people"},":boy_tone4:":{"uc_base":"1f466-1f3fe","uc_output":"1f466-1f3fe","uc_match":"1f466-1f3fe","uc_greedy":"1f466-1f3fe","shortnames":[],"category":"people"},":boy_tone5:":{"uc_base":"1f466-1f3ff","uc_output":"1f466-1f3ff","uc_match":"1f466-1f3ff","uc_greedy":"1f466-1f3ff","shortnames":[],"category":"people"},":breast_feeding_tone1:":{"uc_base":"1f931-1f3fb","uc_output":"1f931-1f3fb","uc_match":"1f931-1f3fb","uc_greedy":"1f931-1f3fb","shortnames":[":breast_feeding_light_skin_tone:"],"category":"activity"},":breast_feeding_tone2:":{"uc_base":"1f931-1f3fc","uc_output":"1f931-1f3fc","uc_match":"1f931-1f3fc","uc_greedy":"1f931-1f3fc","shortnames":[":breast_feeding_medium_light_skin_tone:"],"category":"activity"},":breast_feeding_tone3:":{"uc_base":"1f931-1f3fd","uc_output":"1f931-1f3fd","uc_match":"1f931-1f3fd","uc_greedy":"1f931-1f3fd","shortnames":[":breast_feeding_medium_skin_tone:"],"category":"activity"},":breast_feeding_tone4:":{"uc_base":"1f931-1f3fe","uc_output":"1f931-1f3fe","uc_match":"1f931-1f3fe","uc_greedy":"1f931-1f3fe","shortnames":[":breast_feeding_medium_dark_skin_tone:"],"category":"activity"},":breast_feeding_tone5:":{"uc_base":"1f931-1f3ff","uc_output":"1f931-1f3ff","uc_match":"1f931-1f3ff","uc_greedy":"1f931-1f3ff","shortnames":[":breast_feeding_dark_skin_tone:"],"category":"activity"},":bride_with_veil_tone1:":{"uc_base":"1f470-1f3fb","uc_output":"1f470-1f3fb","uc_match":"1f470-1f3fb","uc_greedy":"1f470-1f3fb","shortnames":[],"category":"people"},":bride_with_veil_tone2:":{"uc_base":"1f470-1f3fc","uc_output":"1f470-1f3fc","uc_match":"1f470-1f3fc","uc_greedy":"1f470-1f3fc","shortnames":[],"category":"people"},":bride_with_veil_tone3:":{"uc_base":"1f470-1f3fd","uc_output":"1f470-1f3fd","uc_match":"1f470-1f3fd","uc_greedy":"1f470-1f3fd","shortnames":[],"category":"people"},":bride_with_veil_tone4:":{"uc_base":"1f470-1f3fe","uc_output":"1f470-1f3fe","uc_match":"1f470-1f3fe","uc_greedy":"1f470-1f3fe","shortnames":[],"category":"people"},":bride_with_veil_tone5:":{"uc_base":"1f470-1f3ff","uc_output":"1f470-1f3ff","uc_match":"1f470-1f3ff","uc_greedy":"1f470-1f3ff","shortnames":[],"category":"people"},":call_me_tone1:":{"uc_base":"1f919-1f3fb","uc_output":"1f919-1f3fb","uc_match":"1f919-1f3fb","uc_greedy":"1f919-1f3fb","shortnames":[":call_me_hand_tone1:"],"category":"people"},":call_me_tone2:":{"uc_base":"1f919-1f3fc","uc_output":"1f919-1f3fc","uc_match":"1f919-1f3fc","uc_greedy":"1f919-1f3fc","shortnames":[":call_me_hand_tone2:"],"category":"people"},":call_me_tone3:":{"uc_base":"1f919-1f3fd","uc_output":"1f919-1f3fd","uc_match":"1f919-1f3fd","uc_greedy":"1f919-1f3fd","shortnames":[":call_me_hand_tone3:"],"category":"people"},":call_me_tone4:":{"uc_base":"1f919-1f3fe","uc_output":"1f919-1f3fe","uc_match":"1f919-1f3fe","uc_greedy":"1f919-1f3fe","shortnames":[":call_me_hand_tone4:"],"category":"people"},":call_me_tone5:":{"uc_base":"1f919-1f3ff","uc_output":"1f919-1f3ff","uc_match":"1f919-1f3ff","uc_greedy":"1f919-1f3ff","shortnames":[":call_me_hand_tone5:"],"category":"people"},":child_tone1:":{"uc_base":"1f9d2-1f3fb","uc_output":"1f9d2-1f3fb","uc_match":"1f9d2-1f3fb","uc_greedy":"1f9d2-1f3fb","shortnames":[":child_light_skin_tone:"],"category":"people"},":child_tone2:":{"uc_base":"1f9d2-1f3fc","uc_output":"1f9d2-1f3fc","uc_match":"1f9d2-1f3fc","uc_greedy":"1f9d2-1f3fc","shortnames":[":child_medium_light_skin_tone:"],"category":"people"},":child_tone3:":{"uc_base":"1f9d2-1f3fd","uc_output":"1f9d2-1f3fd","uc_match":"1f9d2-1f3fd","uc_greedy":"1f9d2-1f3fd","shortnames":[":child_medium_skin_tone:"],"category":"people"},":child_tone4:":{"uc_base":"1f9d2-1f3fe","uc_output":"1f9d2-1f3fe","uc_match":"1f9d2-1f3fe","uc_greedy":"1f9d2-1f3fe","shortnames":[":child_medium_dark_skin_tone:"],"category":"people"},":child_tone5:":{"uc_base":"1f9d2-1f3ff","uc_output":"1f9d2-1f3ff","uc_match":"1f9d2-1f3ff","uc_greedy":"1f9d2-1f3ff","shortnames":[":child_dark_skin_tone:"],"category":"people"},":clap_tone1:":{"uc_base":"1f44f-1f3fb","uc_output":"1f44f-1f3fb","uc_match":"1f44f-1f3fb","uc_greedy":"1f44f-1f3fb","shortnames":[],"category":"people"},":clap_tone2:":{"uc_base":"1f44f-1f3fc","uc_output":"1f44f-1f3fc","uc_match":"1f44f-1f3fc","uc_greedy":"1f44f-1f3fc","shortnames":[],"category":"people"},":clap_tone3:":{"uc_base":"1f44f-1f3fd","uc_output":"1f44f-1f3fd","uc_match":"1f44f-1f3fd","uc_greedy":"1f44f-1f3fd","shortnames":[],"category":"people"},":clap_tone4:":{"uc_base":"1f44f-1f3fe","uc_output":"1f44f-1f3fe","uc_match":"1f44f-1f3fe","uc_greedy":"1f44f-1f3fe","shortnames":[],"category":"people"},":clap_tone5:":{"uc_base":"1f44f-1f3ff","uc_output":"1f44f-1f3ff","uc_match":"1f44f-1f3ff","uc_greedy":"1f44f-1f3ff","shortnames":[],"category":"people"},":construction_worker_tone1:":{"uc_base":"1f477-1f3fb","uc_output":"1f477-1f3fb","uc_match":"1f477-1f3fb","uc_greedy":"1f477-1f3fb","shortnames":[],"category":"people"},":construction_worker_tone2:":{"uc_base":"1f477-1f3fc","uc_output":"1f477-1f3fc","uc_match":"1f477-1f3fc","uc_greedy":"1f477-1f3fc","shortnames":[],"category":"people"},":construction_worker_tone3:":{"uc_base":"1f477-1f3fd","uc_output":"1f477-1f3fd","uc_match":"1f477-1f3fd","uc_greedy":"1f477-1f3fd","shortnames":[],"category":"people"},":construction_worker_tone4:":{"uc_base":"1f477-1f3fe","uc_output":"1f477-1f3fe","uc_match":"1f477-1f3fe","uc_greedy":"1f477-1f3fe","shortnames":[],"category":"people"},":construction_worker_tone5:":{"uc_base":"1f477-1f3ff","uc_output":"1f477-1f3ff","uc_match":"1f477-1f3ff","uc_greedy":"1f477-1f3ff","shortnames":[],"category":"people"},":dancer_tone1:":{"uc_base":"1f483-1f3fb","uc_output":"1f483-1f3fb","uc_match":"1f483-1f3fb","uc_greedy":"1f483-1f3fb","shortnames":[],"category":"people"},":dancer_tone2:":{"uc_base":"1f483-1f3fc","uc_output":"1f483-1f3fc","uc_match":"1f483-1f3fc","uc_greedy":"1f483-1f3fc","shortnames":[],"category":"people"},":dancer_tone3:":{"uc_base":"1f483-1f3fd","uc_output":"1f483-1f3fd","uc_match":"1f483-1f3fd","uc_greedy":"1f483-1f3fd","shortnames":[],"category":"people"},":dancer_tone4:":{"uc_base":"1f483-1f3fe","uc_output":"1f483-1f3fe","uc_match":"1f483-1f3fe","uc_greedy":"1f483-1f3fe","shortnames":[],"category":"people"},":dancer_tone5:":{"uc_base":"1f483-1f3ff","uc_output":"1f483-1f3ff","uc_match":"1f483-1f3ff","uc_greedy":"1f483-1f3ff","shortnames":[],"category":"people"},":detective_tone1:":{"uc_base":"1f575-1f3fb","uc_output":"1f575-1f3fb","uc_match":"1f575-fe0f-1f3fb","uc_greedy":"1f575-fe0f-1f3fb","shortnames":[":spy_tone1:",":sleuth_or_spy_tone1:"],"category":"people"},":detective_tone2:":{"uc_base":"1f575-1f3fc","uc_output":"1f575-1f3fc","uc_match":"1f575-fe0f-1f3fc","uc_greedy":"1f575-fe0f-1f3fc","shortnames":[":spy_tone2:",":sleuth_or_spy_tone2:"],"category":"people"},":detective_tone3:":{"uc_base":"1f575-1f3fd","uc_output":"1f575-1f3fd","uc_match":"1f575-fe0f-1f3fd","uc_greedy":"1f575-fe0f-1f3fd","shortnames":[":spy_tone3:",":sleuth_or_spy_tone3:"],"category":"people"},":detective_tone4:":{"uc_base":"1f575-1f3fe","uc_output":"1f575-1f3fe","uc_match":"1f575-fe0f-1f3fe","uc_greedy":"1f575-fe0f-1f3fe","shortnames":[":spy_tone4:",":sleuth_or_spy_tone4:"],"category":"people"},":detective_tone5:":{"uc_base":"1f575-1f3ff","uc_output":"1f575-1f3ff","uc_match":"1f575-fe0f-1f3ff","uc_greedy":"1f575-fe0f-1f3ff","shortnames":[":spy_tone5:",":sleuth_or_spy_tone5:"],"category":"people"},":ear_tone1:":{"uc_base":"1f442-1f3fb","uc_output":"1f442-1f3fb","uc_match":"1f442-1f3fb","uc_greedy":"1f442-1f3fb","shortnames":[],"category":"people"},":ear_tone2:":{"uc_base":"1f442-1f3fc","uc_output":"1f442-1f3fc","uc_match":"1f442-1f3fc","uc_greedy":"1f442-1f3fc","shortnames":[],"category":"people"},":ear_tone3:":{"uc_base":"1f442-1f3fd","uc_output":"1f442-1f3fd","uc_match":"1f442-1f3fd","uc_greedy":"1f442-1f3fd","shortnames":[],"category":"people"},":ear_tone4:":{"uc_base":"1f442-1f3fe","uc_output":"1f442-1f3fe","uc_match":"1f442-1f3fe","uc_greedy":"1f442-1f3fe","shortnames":[],"category":"people"},":ear_tone5:":{"uc_base":"1f442-1f3ff","uc_output":"1f442-1f3ff","uc_match":"1f442-1f3ff","uc_greedy":"1f442-1f3ff","shortnames":[],"category":"people"},":elf_tone1:":{"uc_base":"1f9dd-1f3fb","uc_output":"1f9dd-1f3fb","uc_match":"1f9dd-1f3fb","uc_greedy":"1f9dd-1f3fb","shortnames":[":elf_light_skin_tone:"],"category":"people"},":elf_tone2:":{"uc_base":"1f9dd-1f3fc","uc_output":"1f9dd-1f3fc","uc_match":"1f9dd-1f3fc","uc_greedy":"1f9dd-1f3fc","shortnames":[":elf_medium_light_skin_tone:"],"category":"people"},":elf_tone3:":{"uc_base":"1f9dd-1f3fd","uc_output":"1f9dd-1f3fd","uc_match":"1f9dd-1f3fd","uc_greedy":"1f9dd-1f3fd","shortnames":[":elf_medium_skin_tone:"],"category":"people"},":elf_tone4:":{"uc_base":"1f9dd-1f3fe","uc_output":"1f9dd-1f3fe","uc_match":"1f9dd-1f3fe","uc_greedy":"1f9dd-1f3fe","shortnames":[":elf_medium_dark_skin_tone:"],"category":"people"},":elf_tone5:":{"uc_base":"1f9dd-1f3ff","uc_output":"1f9dd-1f3ff","uc_match":"1f9dd-1f3ff","uc_greedy":"1f9dd-1f3ff","shortnames":[":elf_dark_skin_tone:"],"category":"people"},":fairy_tone1:":{"uc_base":"1f9da-1f3fb","uc_output":"1f9da-1f3fb","uc_match":"1f9da-1f3fb","uc_greedy":"1f9da-1f3fb","shortnames":[":fairy_light_skin_tone:"],"category":"people"},":fairy_tone2:":{"uc_base":"1f9da-1f3fc","uc_output":"1f9da-1f3fc","uc_match":"1f9da-1f3fc","uc_greedy":"1f9da-1f3fc","shortnames":[":fairy_medium_light_skin_tone:"],"category":"people"},":fairy_tone3:":{"uc_base":"1f9da-1f3fd","uc_output":"1f9da-1f3fd","uc_match":"1f9da-1f3fd","uc_greedy":"1f9da-1f3fd","shortnames":[":fairy_medium_skin_tone:"],"category":"people"},":fairy_tone4:":{"uc_base":"1f9da-1f3fe","uc_output":"1f9da-1f3fe","uc_match":"1f9da-1f3fe","uc_greedy":"1f9da-1f3fe","shortnames":[":fairy_medium_dark_skin_tone:"],"category":"people"},":fairy_tone5:":{"uc_base":"1f9da-1f3ff","uc_output":"1f9da-1f3ff","uc_match":"1f9da-1f3ff","uc_greedy":"1f9da-1f3ff","shortnames":[":fairy_dark_skin_tone:"],"category":"people"},":fingers_crossed_tone1:":{"uc_base":"1f91e-1f3fb","uc_output":"1f91e-1f3fb","uc_match":"1f91e-1f3fb","uc_greedy":"1f91e-1f3fb","shortnames":[":hand_with_index_and_middle_fingers_crossed_tone1:"],"category":"people"},":fingers_crossed_tone2:":{"uc_base":"1f91e-1f3fc","uc_output":"1f91e-1f3fc","uc_match":"1f91e-1f3fc","uc_greedy":"1f91e-1f3fc","shortnames":[":hand_with_index_and_middle_fingers_crossed_tone2:"],"category":"people"},":fingers_crossed_tone3:":{"uc_base":"1f91e-1f3fd","uc_output":"1f91e-1f3fd","uc_match":"1f91e-1f3fd","uc_greedy":"1f91e-1f3fd","shortnames":[":hand_with_index_and_middle_fingers_crossed_tone3:"],"category":"people"},":fingers_crossed_tone4:":{"uc_base":"1f91e-1f3fe","uc_output":"1f91e-1f3fe","uc_match":"1f91e-1f3fe","uc_greedy":"1f91e-1f3fe","shortnames":[":hand_with_index_and_middle_fingers_crossed_tone4:"],"category":"people"},":fingers_crossed_tone5:":{"uc_base":"1f91e-1f3ff","uc_output":"1f91e-1f3ff","uc_match":"1f91e-1f3ff","uc_greedy":"1f91e-1f3ff","shortnames":[":hand_with_index_and_middle_fingers_crossed_tone5:"],"category":"people"},":flag_ac:":{"uc_base":"1f1e6-1f1e8","uc_output":"1f1e6-1f1e8","uc_match":"1f1e6-1f1e8","uc_greedy":"1f1e6-1f1e8","shortnames":[":ac:"],"category":"flags"},":flag_ad:":{"uc_base":"1f1e6-1f1e9","uc_output":"1f1e6-1f1e9","uc_match":"1f1e6-1f1e9","uc_greedy":"1f1e6-1f1e9","shortnames":[":ad:"],"category":"flags"},":flag_ae:":{"uc_base":"1f1e6-1f1ea","uc_output":"1f1e6-1f1ea","uc_match":"1f1e6-1f1ea","uc_greedy":"1f1e6-1f1ea","shortnames":[":ae:"],"category":"flags"},":flag_af:":{"uc_base":"1f1e6-1f1eb","uc_output":"1f1e6-1f1eb","uc_match":"1f1e6-1f1eb","uc_greedy":"1f1e6-1f1eb","shortnames":[":af:"],"category":"flags"},":flag_ag:":{"uc_base":"1f1e6-1f1ec","uc_output":"1f1e6-1f1ec","uc_match":"1f1e6-1f1ec","uc_greedy":"1f1e6-1f1ec","shortnames":[":ag:"],"category":"flags"},":flag_ai:":{"uc_base":"1f1e6-1f1ee","uc_output":"1f1e6-1f1ee","uc_match":"1f1e6-1f1ee","uc_greedy":"1f1e6-1f1ee","shortnames":[":ai:"],"category":"flags"},":flag_al:":{"uc_base":"1f1e6-1f1f1","uc_output":"1f1e6-1f1f1","uc_match":"1f1e6-1f1f1","uc_greedy":"1f1e6-1f1f1","shortnames":[":al:"],"category":"flags"},":flag_am:":{"uc_base":"1f1e6-1f1f2","uc_output":"1f1e6-1f1f2","uc_match":"1f1e6-1f1f2","uc_greedy":"1f1e6-1f1f2","shortnames":[":am:"],"category":"flags"},":flag_ao:":{"uc_base":"1f1e6-1f1f4","uc_output":"1f1e6-1f1f4","uc_match":"1f1e6-1f1f4","uc_greedy":"1f1e6-1f1f4","shortnames":[":ao:"],"category":"flags"},":flag_aq:":{"uc_base":"1f1e6-1f1f6","uc_output":"1f1e6-1f1f6","uc_match":"1f1e6-1f1f6","uc_greedy":"1f1e6-1f1f6","shortnames":[":aq:"],"category":"flags"},":flag_ar:":{"uc_base":"1f1e6-1f1f7","uc_output":"1f1e6-1f1f7","uc_match":"1f1e6-1f1f7","uc_greedy":"1f1e6-1f1f7","shortnames":[":ar:"],"category":"flags"},":flag_as:":{"uc_base":"1f1e6-1f1f8","uc_output":"1f1e6-1f1f8","uc_match":"1f1e6-1f1f8","uc_greedy":"1f1e6-1f1f8","shortnames":[":as:"],"category":"flags"},":flag_at:":{"uc_base":"1f1e6-1f1f9","uc_output":"1f1e6-1f1f9","uc_match":"1f1e6-1f1f9","uc_greedy":"1f1e6-1f1f9","shortnames":[":at:"],"category":"flags"},":flag_au:":{"uc_base":"1f1e6-1f1fa","uc_output":"1f1e6-1f1fa","uc_match":"1f1e6-1f1fa","uc_greedy":"1f1e6-1f1fa","shortnames":[":au:"],"category":"flags"},":flag_aw:":{"uc_base":"1f1e6-1f1fc","uc_output":"1f1e6-1f1fc","uc_match":"1f1e6-1f1fc","uc_greedy":"1f1e6-1f1fc","shortnames":[":aw:"],"category":"flags"},":flag_ax:":{"uc_base":"1f1e6-1f1fd","uc_output":"1f1e6-1f1fd","uc_match":"1f1e6-1f1fd","uc_greedy":"1f1e6-1f1fd","shortnames":[":ax:"],"category":"flags"},":flag_az:":{"uc_base":"1f1e6-1f1ff","uc_output":"1f1e6-1f1ff","uc_match":"1f1e6-1f1ff","uc_greedy":"1f1e6-1f1ff","shortnames":[":az:"],"category":"flags"},":flag_ba:":{"uc_base":"1f1e7-1f1e6","uc_output":"1f1e7-1f1e6","uc_match":"1f1e7-1f1e6","uc_greedy":"1f1e7-1f1e6","shortnames":[":ba:"],"category":"flags"},":flag_bb:":{"uc_base":"1f1e7-1f1e7","uc_output":"1f1e7-1f1e7","uc_match":"1f1e7-1f1e7","uc_greedy":"1f1e7-1f1e7","shortnames":[":bb:"],"category":"flags"},":flag_bd:":{"uc_base":"1f1e7-1f1e9","uc_output":"1f1e7-1f1e9","uc_match":"1f1e7-1f1e9","uc_greedy":"1f1e7-1f1e9","shortnames":[":bd:"],"category":"flags"},":flag_be:":{"uc_base":"1f1e7-1f1ea","uc_output":"1f1e7-1f1ea","uc_match":"1f1e7-1f1ea","uc_greedy":"1f1e7-1f1ea","shortnames":[":be:"],"category":"flags"},":flag_bf:":{"uc_base":"1f1e7-1f1eb","uc_output":"1f1e7-1f1eb","uc_match":"1f1e7-1f1eb","uc_greedy":"1f1e7-1f1eb","shortnames":[":bf:"],"category":"flags"},":flag_bg:":{"uc_base":"1f1e7-1f1ec","uc_output":"1f1e7-1f1ec","uc_match":"1f1e7-1f1ec","uc_greedy":"1f1e7-1f1ec","shortnames":[":bg:"],"category":"flags"},":flag_bh:":{"uc_base":"1f1e7-1f1ed","uc_output":"1f1e7-1f1ed","uc_match":"1f1e7-1f1ed","uc_greedy":"1f1e7-1f1ed","shortnames":[":bh:"],"category":"flags"},":flag_bi:":{"uc_base":"1f1e7-1f1ee","uc_output":"1f1e7-1f1ee","uc_match":"1f1e7-1f1ee","uc_greedy":"1f1e7-1f1ee","shortnames":[":bi:"],"category":"flags"},":flag_bj:":{"uc_base":"1f1e7-1f1ef","uc_output":"1f1e7-1f1ef","uc_match":"1f1e7-1f1ef","uc_greedy":"1f1e7-1f1ef","shortnames":[":bj:"],"category":"flags"},":flag_bl:":{"uc_base":"1f1e7-1f1f1","uc_output":"1f1e7-1f1f1","uc_match":"1f1e7-1f1f1","uc_greedy":"1f1e7-1f1f1","shortnames":[":bl:"],"category":"flags"},":flag_bm:":{"uc_base":"1f1e7-1f1f2","uc_output":"1f1e7-1f1f2","uc_match":"1f1e7-1f1f2","uc_greedy":"1f1e7-1f1f2","shortnames":[":bm:"],"category":"flags"},":flag_bn:":{"uc_base":"1f1e7-1f1f3","uc_output":"1f1e7-1f1f3","uc_match":"1f1e7-1f1f3","uc_greedy":"1f1e7-1f1f3","shortnames":[":bn:"],"category":"flags"},":flag_bo:":{"uc_base":"1f1e7-1f1f4","uc_output":"1f1e7-1f1f4","uc_match":"1f1e7-1f1f4","uc_greedy":"1f1e7-1f1f4","shortnames":[":bo:"],"category":"flags"},":flag_bq:":{"uc_base":"1f1e7-1f1f6","uc_output":"1f1e7-1f1f6","uc_match":"1f1e7-1f1f6","uc_greedy":"1f1e7-1f1f6","shortnames":[":bq:"],"category":"flags"},":flag_br:":{"uc_base":"1f1e7-1f1f7","uc_output":"1f1e7-1f1f7","uc_match":"1f1e7-1f1f7","uc_greedy":"1f1e7-1f1f7","shortnames":[":br:"],"category":"flags"},":flag_bs:":{"uc_base":"1f1e7-1f1f8","uc_output":"1f1e7-1f1f8","uc_match":"1f1e7-1f1f8","uc_greedy":"1f1e7-1f1f8","shortnames":[":bs:"],"category":"flags"},":flag_bt:":{"uc_base":"1f1e7-1f1f9","uc_output":"1f1e7-1f1f9","uc_match":"1f1e7-1f1f9","uc_greedy":"1f1e7-1f1f9","shortnames":[":bt:"],"category":"flags"},":flag_bv:":{"uc_base":"1f1e7-1f1fb","uc_output":"1f1e7-1f1fb","uc_match":"1f1e7-1f1fb","uc_greedy":"1f1e7-1f1fb","shortnames":[":bv:"],"category":"flags"},":flag_bw:":{"uc_base":"1f1e7-1f1fc","uc_output":"1f1e7-1f1fc","uc_match":"1f1e7-1f1fc","uc_greedy":"1f1e7-1f1fc","shortnames":[":bw:"],"category":"flags"},":flag_by:":{"uc_base":"1f1e7-1f1fe","uc_output":"1f1e7-1f1fe","uc_match":"1f1e7-1f1fe","uc_greedy":"1f1e7-1f1fe","shortnames":[":by:"],"category":"flags"},":flag_bz:":{"uc_base":"1f1e7-1f1ff","uc_output":"1f1e7-1f1ff","uc_match":"1f1e7-1f1ff","uc_greedy":"1f1e7-1f1ff","shortnames":[":bz:"],"category":"flags"},":flag_ca:":{"uc_base":"1f1e8-1f1e6","uc_output":"1f1e8-1f1e6","uc_match":"1f1e8-1f1e6","uc_greedy":"1f1e8-1f1e6","shortnames":[":ca:"],"category":"flags"},":flag_cc:":{"uc_base":"1f1e8-1f1e8","uc_output":"1f1e8-1f1e8","uc_match":"1f1e8-1f1e8","uc_greedy":"1f1e8-1f1e8","shortnames":[":cc:"],"category":"flags"},":flag_cd:":{"uc_base":"1f1e8-1f1e9","uc_output":"1f1e8-1f1e9","uc_match":"1f1e8-1f1e9","uc_greedy":"1f1e8-1f1e9","shortnames":[":congo:"],"category":"flags"},":flag_cf:":{"uc_base":"1f1e8-1f1eb","uc_output":"1f1e8-1f1eb","uc_match":"1f1e8-1f1eb","uc_greedy":"1f1e8-1f1eb","shortnames":[":cf:"],"category":"flags"},":flag_cg:":{"uc_base":"1f1e8-1f1ec","uc_output":"1f1e8-1f1ec","uc_match":"1f1e8-1f1ec","uc_greedy":"1f1e8-1f1ec","shortnames":[":cg:"],"category":"flags"},":flag_ch:":{"uc_base":"1f1e8-1f1ed","uc_output":"1f1e8-1f1ed","uc_match":"1f1e8-1f1ed","uc_greedy":"1f1e8-1f1ed","shortnames":[":ch:"],"category":"flags"},":flag_ci:":{"uc_base":"1f1e8-1f1ee","uc_output":"1f1e8-1f1ee","uc_match":"1f1e8-1f1ee","uc_greedy":"1f1e8-1f1ee","shortnames":[":ci:"],"category":"flags"},":flag_ck:":{"uc_base":"1f1e8-1f1f0","uc_output":"1f1e8-1f1f0","uc_match":"1f1e8-1f1f0","uc_greedy":"1f1e8-1f1f0","shortnames":[":ck:"],"category":"flags"},":flag_cl:":{"uc_base":"1f1e8-1f1f1","uc_output":"1f1e8-1f1f1","uc_match":"1f1e8-1f1f1","uc_greedy":"1f1e8-1f1f1","shortnames":[":chile:"],"category":"flags"},":flag_cm:":{"uc_base":"1f1e8-1f1f2","uc_output":"1f1e8-1f1f2","uc_match":"1f1e8-1f1f2","uc_greedy":"1f1e8-1f1f2","shortnames":[":cm:"],"category":"flags"},":flag_cn:":{"uc_base":"1f1e8-1f1f3","uc_output":"1f1e8-1f1f3","uc_match":"1f1e8-1f1f3","uc_greedy":"1f1e8-1f1f3","shortnames":[":cn:"],"category":"flags"},":flag_co:":{"uc_base":"1f1e8-1f1f4","uc_output":"1f1e8-1f1f4","uc_match":"1f1e8-1f1f4","uc_greedy":"1f1e8-1f1f4","shortnames":[":co:"],"category":"flags"},":flag_cp:":{"uc_base":"1f1e8-1f1f5","uc_output":"1f1e8-1f1f5","uc_match":"1f1e8-1f1f5","uc_greedy":"1f1e8-1f1f5","shortnames":[":cp:"],"category":"flags"},":flag_cr:":{"uc_base":"1f1e8-1f1f7","uc_output":"1f1e8-1f1f7","uc_match":"1f1e8-1f1f7","uc_greedy":"1f1e8-1f1f7","shortnames":[":cr:"],"category":"flags"},":flag_cu:":{"uc_base":"1f1e8-1f1fa","uc_output":"1f1e8-1f1fa","uc_match":"1f1e8-1f1fa","uc_greedy":"1f1e8-1f1fa","shortnames":[":cu:"],"category":"flags"},":flag_cv:":{"uc_base":"1f1e8-1f1fb","uc_output":"1f1e8-1f1fb","uc_match":"1f1e8-1f1fb","uc_greedy":"1f1e8-1f1fb","shortnames":[":cv:"],"category":"flags"},":flag_cw:":{"uc_base":"1f1e8-1f1fc","uc_output":"1f1e8-1f1fc","uc_match":"1f1e8-1f1fc","uc_greedy":"1f1e8-1f1fc","shortnames":[":cw:"],"category":"flags"},":flag_cx:":{"uc_base":"1f1e8-1f1fd","uc_output":"1f1e8-1f1fd","uc_match":"1f1e8-1f1fd","uc_greedy":"1f1e8-1f1fd","shortnames":[":cx:"],"category":"flags"},":flag_cy:":{"uc_base":"1f1e8-1f1fe","uc_output":"1f1e8-1f1fe","uc_match":"1f1e8-1f1fe","uc_greedy":"1f1e8-1f1fe","shortnames":[":cy:"],"category":"flags"},":flag_cz:":{"uc_base":"1f1e8-1f1ff","uc_output":"1f1e8-1f1ff","uc_match":"1f1e8-1f1ff","uc_greedy":"1f1e8-1f1ff","shortnames":[":cz:"],"category":"flags"},":flag_de:":{"uc_base":"1f1e9-1f1ea","uc_output":"1f1e9-1f1ea","uc_match":"1f1e9-1f1ea","uc_greedy":"1f1e9-1f1ea","shortnames":[":de:"],"category":"flags"},":flag_dg:":{"uc_base":"1f1e9-1f1ec","uc_output":"1f1e9-1f1ec","uc_match":"1f1e9-1f1ec","uc_greedy":"1f1e9-1f1ec","shortnames":[":dg:"],"category":"flags"},":flag_dj:":{"uc_base":"1f1e9-1f1ef","uc_output":"1f1e9-1f1ef","uc_match":"1f1e9-1f1ef","uc_greedy":"1f1e9-1f1ef","shortnames":[":dj:"],"category":"flags"},":flag_dk:":{"uc_base":"1f1e9-1f1f0","uc_output":"1f1e9-1f1f0","uc_match":"1f1e9-1f1f0","uc_greedy":"1f1e9-1f1f0","shortnames":[":dk:"],"category":"flags"},":flag_dm:":{"uc_base":"1f1e9-1f1f2","uc_output":"1f1e9-1f1f2","uc_match":"1f1e9-1f1f2","uc_greedy":"1f1e9-1f1f2","shortnames":[":dm:"],"category":"flags"},":flag_do:":{"uc_base":"1f1e9-1f1f4","uc_output":"1f1e9-1f1f4","uc_match":"1f1e9-1f1f4","uc_greedy":"1f1e9-1f1f4","shortnames":[":do:"],"category":"flags"},":flag_dz:":{"uc_base":"1f1e9-1f1ff","uc_output":"1f1e9-1f1ff","uc_match":"1f1e9-1f1ff","uc_greedy":"1f1e9-1f1ff","shortnames":[":dz:"],"category":"flags"},":flag_ea:":{"uc_base":"1f1ea-1f1e6","uc_output":"1f1ea-1f1e6","uc_match":"1f1ea-1f1e6","uc_greedy":"1f1ea-1f1e6","shortnames":[":ea:"],"category":"flags"},":flag_ec:":{"uc_base":"1f1ea-1f1e8","uc_output":"1f1ea-1f1e8","uc_match":"1f1ea-1f1e8","uc_greedy":"1f1ea-1f1e8","shortnames":[":ec:"],"category":"flags"},":flag_ee:":{"uc_base":"1f1ea-1f1ea","uc_output":"1f1ea-1f1ea","uc_match":"1f1ea-1f1ea","uc_greedy":"1f1ea-1f1ea","shortnames":[":ee:"],"category":"flags"},":flag_eg:":{"uc_base":"1f1ea-1f1ec","uc_output":"1f1ea-1f1ec","uc_match":"1f1ea-1f1ec","uc_greedy":"1f1ea-1f1ec","shortnames":[":eg:"],"category":"flags"},":flag_eh:":{"uc_base":"1f1ea-1f1ed","uc_output":"1f1ea-1f1ed","uc_match":"1f1ea-1f1ed","uc_greedy":"1f1ea-1f1ed","shortnames":[":eh:"],"category":"flags"},":flag_er:":{"uc_base":"1f1ea-1f1f7","uc_output":"1f1ea-1f1f7","uc_match":"1f1ea-1f1f7","uc_greedy":"1f1ea-1f1f7","shortnames":[":er:"],"category":"flags"},":flag_es:":{"uc_base":"1f1ea-1f1f8","uc_output":"1f1ea-1f1f8","uc_match":"1f1ea-1f1f8","uc_greedy":"1f1ea-1f1f8","shortnames":[":es:"],"category":"flags"},":flag_et:":{"uc_base":"1f1ea-1f1f9","uc_output":"1f1ea-1f1f9","uc_match":"1f1ea-1f1f9","uc_greedy":"1f1ea-1f1f9","shortnames":[":et:"],"category":"flags"},":flag_eu:":{"uc_base":"1f1ea-1f1fa","uc_output":"1f1ea-1f1fa","uc_match":"1f1ea-1f1fa","uc_greedy":"1f1ea-1f1fa","shortnames":[":eu:"],"category":"flags"},":flag_fi:":{"uc_base":"1f1eb-1f1ee","uc_output":"1f1eb-1f1ee","uc_match":"1f1eb-1f1ee","uc_greedy":"1f1eb-1f1ee","shortnames":[":fi:"],"category":"flags"},":flag_fj:":{"uc_base":"1f1eb-1f1ef","uc_output":"1f1eb-1f1ef","uc_match":"1f1eb-1f1ef","uc_greedy":"1f1eb-1f1ef","shortnames":[":fj:"],"category":"flags"},":flag_fk:":{"uc_base":"1f1eb-1f1f0","uc_output":"1f1eb-1f1f0","uc_match":"1f1eb-1f1f0","uc_greedy":"1f1eb-1f1f0","shortnames":[":fk:"],"category":"flags"},":flag_fm:":{"uc_base":"1f1eb-1f1f2","uc_output":"1f1eb-1f1f2","uc_match":"1f1eb-1f1f2","uc_greedy":"1f1eb-1f1f2","shortnames":[":fm:"],"category":"flags"},":flag_fo:":{"uc_base":"1f1eb-1f1f4","uc_output":"1f1eb-1f1f4","uc_match":"1f1eb-1f1f4","uc_greedy":"1f1eb-1f1f4","shortnames":[":fo:"],"category":"flags"},":flag_fr:":{"uc_base":"1f1eb-1f1f7","uc_output":"1f1eb-1f1f7","uc_match":"1f1eb-1f1f7","uc_greedy":"1f1eb-1f1f7","shortnames":[":fr:"],"category":"flags"},":flag_ga:":{"uc_base":"1f1ec-1f1e6","uc_output":"1f1ec-1f1e6","uc_match":"1f1ec-1f1e6","uc_greedy":"1f1ec-1f1e6","shortnames":[":ga:"],"category":"flags"},":flag_gb:":{"uc_base":"1f1ec-1f1e7","uc_output":"1f1ec-1f1e7","uc_match":"1f1ec-1f1e7","uc_greedy":"1f1ec-1f1e7","shortnames":[":gb:"],"category":"flags"},":flag_gd:":{"uc_base":"1f1ec-1f1e9","uc_output":"1f1ec-1f1e9","uc_match":"1f1ec-1f1e9","uc_greedy":"1f1ec-1f1e9","shortnames":[":gd:"],"category":"flags"},":flag_ge:":{"uc_base":"1f1ec-1f1ea","uc_output":"1f1ec-1f1ea","uc_match":"1f1ec-1f1ea","uc_greedy":"1f1ec-1f1ea","shortnames":[":ge:"],"category":"flags"},":flag_gf:":{"uc_base":"1f1ec-1f1eb","uc_output":"1f1ec-1f1eb","uc_match":"1f1ec-1f1eb","uc_greedy":"1f1ec-1f1eb","shortnames":[":gf:"],"category":"flags"},":flag_gg:":{"uc_base":"1f1ec-1f1ec","uc_output":"1f1ec-1f1ec","uc_match":"1f1ec-1f1ec","uc_greedy":"1f1ec-1f1ec","shortnames":[":gg:"],"category":"flags"},":flag_gh:":{"uc_base":"1f1ec-1f1ed","uc_output":"1f1ec-1f1ed","uc_match":"1f1ec-1f1ed","uc_greedy":"1f1ec-1f1ed","shortnames":[":gh:"],"category":"flags"},":flag_gi:":{"uc_base":"1f1ec-1f1ee","uc_output":"1f1ec-1f1ee","uc_match":"1f1ec-1f1ee","uc_greedy":"1f1ec-1f1ee","shortnames":[":gi:"],"category":"flags"},":flag_gl:":{"uc_base":"1f1ec-1f1f1","uc_output":"1f1ec-1f1f1","uc_match":"1f1ec-1f1f1","uc_greedy":"1f1ec-1f1f1","shortnames":[":gl:"],"category":"flags"},":flag_gm:":{"uc_base":"1f1ec-1f1f2","uc_output":"1f1ec-1f1f2","uc_match":"1f1ec-1f1f2","uc_greedy":"1f1ec-1f1f2","shortnames":[":gm:"],"category":"flags"},":flag_gn:":{"uc_base":"1f1ec-1f1f3","uc_output":"1f1ec-1f1f3","uc_match":"1f1ec-1f1f3","uc_greedy":"1f1ec-1f1f3","shortnames":[":gn:"],"category":"flags"},":flag_gp:":{"uc_base":"1f1ec-1f1f5","uc_output":"1f1ec-1f1f5","uc_match":"1f1ec-1f1f5","uc_greedy":"1f1ec-1f1f5","shortnames":[":gp:"],"category":"flags"},":flag_gq:":{"uc_base":"1f1ec-1f1f6","uc_output":"1f1ec-1f1f6","uc_match":"1f1ec-1f1f6","uc_greedy":"1f1ec-1f1f6","shortnames":[":gq:"],"category":"flags"},":flag_gr:":{"uc_base":"1f1ec-1f1f7","uc_output":"1f1ec-1f1f7","uc_match":"1f1ec-1f1f7","uc_greedy":"1f1ec-1f1f7","shortnames":[":gr:"],"category":"flags"},":flag_gs:":{"uc_base":"1f1ec-1f1f8","uc_output":"1f1ec-1f1f8","uc_match":"1f1ec-1f1f8","uc_greedy":"1f1ec-1f1f8","shortnames":[":gs:"],"category":"flags"},":flag_gt:":{"uc_base":"1f1ec-1f1f9","uc_output":"1f1ec-1f1f9","uc_match":"1f1ec-1f1f9","uc_greedy":"1f1ec-1f1f9","shortnames":[":gt:"],"category":"flags"},":flag_gu:":{"uc_base":"1f1ec-1f1fa","uc_output":"1f1ec-1f1fa","uc_match":"1f1ec-1f1fa","uc_greedy":"1f1ec-1f1fa","shortnames":[":gu:"],"category":"flags"},":flag_gw:":{"uc_base":"1f1ec-1f1fc","uc_output":"1f1ec-1f1fc","uc_match":"1f1ec-1f1fc","uc_greedy":"1f1ec-1f1fc","shortnames":[":gw:"],"category":"flags"},":flag_gy:":{"uc_base":"1f1ec-1f1fe","uc_output":"1f1ec-1f1fe","uc_match":"1f1ec-1f1fe","uc_greedy":"1f1ec-1f1fe","shortnames":[":gy:"],"category":"flags"},":flag_hk:":{"uc_base":"1f1ed-1f1f0","uc_output":"1f1ed-1f1f0","uc_match":"1f1ed-1f1f0","uc_greedy":"1f1ed-1f1f0","shortnames":[":hk:"],"category":"flags"},":flag_hm:":{"uc_base":"1f1ed-1f1f2","uc_output":"1f1ed-1f1f2","uc_match":"1f1ed-1f1f2","uc_greedy":"1f1ed-1f1f2","shortnames":[":hm:"],"category":"flags"},":flag_hn:":{"uc_base":"1f1ed-1f1f3","uc_output":"1f1ed-1f1f3","uc_match":"1f1ed-1f1f3","uc_greedy":"1f1ed-1f1f3","shortnames":[":hn:"],"category":"flags"},":flag_hr:":{"uc_base":"1f1ed-1f1f7","uc_output":"1f1ed-1f1f7","uc_match":"1f1ed-1f1f7","uc_greedy":"1f1ed-1f1f7","shortnames":[":hr:"],"category":"flags"},":flag_ht:":{"uc_base":"1f1ed-1f1f9","uc_output":"1f1ed-1f1f9","uc_match":"1f1ed-1f1f9","uc_greedy":"1f1ed-1f1f9","shortnames":[":ht:"],"category":"flags"},":flag_hu:":{"uc_base":"1f1ed-1f1fa","uc_output":"1f1ed-1f1fa","uc_match":"1f1ed-1f1fa","uc_greedy":"1f1ed-1f1fa","shortnames":[":hu:"],"category":"flags"},":flag_ic:":{"uc_base":"1f1ee-1f1e8","uc_output":"1f1ee-1f1e8","uc_match":"1f1ee-1f1e8","uc_greedy":"1f1ee-1f1e8","shortnames":[":ic:"],"category":"flags"},":flag_id:":{"uc_base":"1f1ee-1f1e9","uc_output":"1f1ee-1f1e9","uc_match":"1f1ee-1f1e9","uc_greedy":"1f1ee-1f1e9","shortnames":[":indonesia:"],"category":"flags"},":flag_ie:":{"uc_base":"1f1ee-1f1ea","uc_output":"1f1ee-1f1ea","uc_match":"1f1ee-1f1ea","uc_greedy":"1f1ee-1f1ea","shortnames":[":ie:"],"category":"flags"},":flag_il:":{"uc_base":"1f1ee-1f1f1","uc_output":"1f1ee-1f1f1","uc_match":"1f1ee-1f1f1","uc_greedy":"1f1ee-1f1f1","shortnames":[":il:"],"category":"flags"},":flag_im:":{"uc_base":"1f1ee-1f1f2","uc_output":"1f1ee-1f1f2","uc_match":"1f1ee-1f1f2","uc_greedy":"1f1ee-1f1f2","shortnames":[":im:"],"category":"flags"},":flag_in:":{"uc_base":"1f1ee-1f1f3","uc_output":"1f1ee-1f1f3","uc_match":"1f1ee-1f1f3","uc_greedy":"1f1ee-1f1f3","shortnames":[":in:"],"category":"flags"},":flag_io:":{"uc_base":"1f1ee-1f1f4","uc_output":"1f1ee-1f1f4","uc_match":"1f1ee-1f1f4","uc_greedy":"1f1ee-1f1f4","shortnames":[":io:"],"category":"flags"},":flag_iq:":{"uc_base":"1f1ee-1f1f6","uc_output":"1f1ee-1f1f6","uc_match":"1f1ee-1f1f6","uc_greedy":"1f1ee-1f1f6","shortnames":[":iq:"],"category":"flags"},":flag_ir:":{"uc_base":"1f1ee-1f1f7","uc_output":"1f1ee-1f1f7","uc_match":"1f1ee-1f1f7","uc_greedy":"1f1ee-1f1f7","shortnames":[":ir:"],"category":"flags"},":flag_is:":{"uc_base":"1f1ee-1f1f8","uc_output":"1f1ee-1f1f8","uc_match":"1f1ee-1f1f8","uc_greedy":"1f1ee-1f1f8","shortnames":[":is:"],"category":"flags"},":flag_it:":{"uc_base":"1f1ee-1f1f9","uc_output":"1f1ee-1f1f9","uc_match":"1f1ee-1f1f9","uc_greedy":"1f1ee-1f1f9","shortnames":[":it:"],"category":"flags"},":flag_je:":{"uc_base":"1f1ef-1f1ea","uc_output":"1f1ef-1f1ea","uc_match":"1f1ef-1f1ea","uc_greedy":"1f1ef-1f1ea","shortnames":[":je:"],"category":"flags"},":flag_jm:":{"uc_base":"1f1ef-1f1f2","uc_output":"1f1ef-1f1f2","uc_match":"1f1ef-1f1f2","uc_greedy":"1f1ef-1f1f2","shortnames":[":jm:"],"category":"flags"},":flag_jo:":{"uc_base":"1f1ef-1f1f4","uc_output":"1f1ef-1f1f4","uc_match":"1f1ef-1f1f4","uc_greedy":"1f1ef-1f1f4","shortnames":[":jo:"],"category":"flags"},":flag_jp:":{"uc_base":"1f1ef-1f1f5","uc_output":"1f1ef-1f1f5","uc_match":"1f1ef-1f1f5","uc_greedy":"1f1ef-1f1f5","shortnames":[":jp:"],"category":"flags"},":flag_ke:":{"uc_base":"1f1f0-1f1ea","uc_output":"1f1f0-1f1ea","uc_match":"1f1f0-1f1ea","uc_greedy":"1f1f0-1f1ea","shortnames":[":ke:"],"category":"flags"},":flag_kg:":{"uc_base":"1f1f0-1f1ec","uc_output":"1f1f0-1f1ec","uc_match":"1f1f0-1f1ec","uc_greedy":"1f1f0-1f1ec","shortnames":[":kg:"],"category":"flags"},":flag_kh:":{"uc_base":"1f1f0-1f1ed","uc_output":"1f1f0-1f1ed","uc_match":"1f1f0-1f1ed","uc_greedy":"1f1f0-1f1ed","shortnames":[":kh:"],"category":"flags"},":flag_ki:":{"uc_base":"1f1f0-1f1ee","uc_output":"1f1f0-1f1ee","uc_match":"1f1f0-1f1ee","uc_greedy":"1f1f0-1f1ee","shortnames":[":ki:"],"category":"flags"},":flag_km:":{"uc_base":"1f1f0-1f1f2","uc_output":"1f1f0-1f1f2","uc_match":"1f1f0-1f1f2","uc_greedy":"1f1f0-1f1f2","shortnames":[":km:"],"category":"flags"},":flag_kn:":{"uc_base":"1f1f0-1f1f3","uc_output":"1f1f0-1f1f3","uc_match":"1f1f0-1f1f3","uc_greedy":"1f1f0-1f1f3","shortnames":[":kn:"],"category":"flags"},":flag_kp:":{"uc_base":"1f1f0-1f1f5","uc_output":"1f1f0-1f1f5","uc_match":"1f1f0-1f1f5","uc_greedy":"1f1f0-1f1f5","shortnames":[":kp:"],"category":"flags"},":flag_kr:":{"uc_base":"1f1f0-1f1f7","uc_output":"1f1f0-1f1f7","uc_match":"1f1f0-1f1f7","uc_greedy":"1f1f0-1f1f7","shortnames":[":kr:"],"category":"flags"},":flag_kw:":{"uc_base":"1f1f0-1f1fc","uc_output":"1f1f0-1f1fc","uc_match":"1f1f0-1f1fc","uc_greedy":"1f1f0-1f1fc","shortnames":[":kw:"],"category":"flags"},":flag_ky:":{"uc_base":"1f1f0-1f1fe","uc_output":"1f1f0-1f1fe","uc_match":"1f1f0-1f1fe","uc_greedy":"1f1f0-1f1fe","shortnames":[":ky:"],"category":"flags"},":flag_kz:":{"uc_base":"1f1f0-1f1ff","uc_output":"1f1f0-1f1ff","uc_match":"1f1f0-1f1ff","uc_greedy":"1f1f0-1f1ff","shortnames":[":kz:"],"category":"flags"},":flag_la:":{"uc_base":"1f1f1-1f1e6","uc_output":"1f1f1-1f1e6","uc_match":"1f1f1-1f1e6","uc_greedy":"1f1f1-1f1e6","shortnames":[":la:"],"category":"flags"},":flag_lb:":{"uc_base":"1f1f1-1f1e7","uc_output":"1f1f1-1f1e7","uc_match":"1f1f1-1f1e7","uc_greedy":"1f1f1-1f1e7","shortnames":[":lb:"],"category":"flags"},":flag_lc:":{"uc_base":"1f1f1-1f1e8","uc_output":"1f1f1-1f1e8","uc_match":"1f1f1-1f1e8","uc_greedy":"1f1f1-1f1e8","shortnames":[":lc:"],"category":"flags"},":flag_li:":{"uc_base":"1f1f1-1f1ee","uc_output":"1f1f1-1f1ee","uc_match":"1f1f1-1f1ee","uc_greedy":"1f1f1-1f1ee","shortnames":[":li:"],"category":"flags"},":flag_lk:":{"uc_base":"1f1f1-1f1f0","uc_output":"1f1f1-1f1f0","uc_match":"1f1f1-1f1f0","uc_greedy":"1f1f1-1f1f0","shortnames":[":lk:"],"category":"flags"},":flag_lr:":{"uc_base":"1f1f1-1f1f7","uc_output":"1f1f1-1f1f7","uc_match":"1f1f1-1f1f7","uc_greedy":"1f1f1-1f1f7","shortnames":[":lr:"],"category":"flags"},":flag_ls:":{"uc_base":"1f1f1-1f1f8","uc_output":"1f1f1-1f1f8","uc_match":"1f1f1-1f1f8","uc_greedy":"1f1f1-1f1f8","shortnames":[":ls:"],"category":"flags"},":flag_lt:":{"uc_base":"1f1f1-1f1f9","uc_output":"1f1f1-1f1f9","uc_match":"1f1f1-1f1f9","uc_greedy":"1f1f1-1f1f9","shortnames":[":lt:"],"category":"flags"},":flag_lu:":{"uc_base":"1f1f1-1f1fa","uc_output":"1f1f1-1f1fa","uc_match":"1f1f1-1f1fa","uc_greedy":"1f1f1-1f1fa","shortnames":[":lu:"],"category":"flags"},":flag_lv:":{"uc_base":"1f1f1-1f1fb","uc_output":"1f1f1-1f1fb","uc_match":"1f1f1-1f1fb","uc_greedy":"1f1f1-1f1fb","shortnames":[":lv:"],"category":"flags"},":flag_ly:":{"uc_base":"1f1f1-1f1fe","uc_output":"1f1f1-1f1fe","uc_match":"1f1f1-1f1fe","uc_greedy":"1f1f1-1f1fe","shortnames":[":ly:"],"category":"flags"},":flag_ma:":{"uc_base":"1f1f2-1f1e6","uc_output":"1f1f2-1f1e6","uc_match":"1f1f2-1f1e6","uc_greedy":"1f1f2-1f1e6","shortnames":[":ma:"],"category":"flags"},":flag_mc:":{"uc_base":"1f1f2-1f1e8","uc_output":"1f1f2-1f1e8","uc_match":"1f1f2-1f1e8","uc_greedy":"1f1f2-1f1e8","shortnames":[":mc:"],"category":"flags"},":flag_md:":{"uc_base":"1f1f2-1f1e9","uc_output":"1f1f2-1f1e9","uc_match":"1f1f2-1f1e9","uc_greedy":"1f1f2-1f1e9","shortnames":[":md:"],"category":"flags"},":flag_me:":{"uc_base":"1f1f2-1f1ea","uc_output":"1f1f2-1f1ea","uc_match":"1f1f2-1f1ea","uc_greedy":"1f1f2-1f1ea","shortnames":[":me:"],"category":"flags"},":flag_mf:":{"uc_base":"1f1f2-1f1eb","uc_output":"1f1f2-1f1eb","uc_match":"1f1f2-1f1eb","uc_greedy":"1f1f2-1f1eb","shortnames":[":mf:"],"category":"flags"},":flag_mg:":{"uc_base":"1f1f2-1f1ec","uc_output":"1f1f2-1f1ec","uc_match":"1f1f2-1f1ec","uc_greedy":"1f1f2-1f1ec","shortnames":[":mg:"],"category":"flags"},":flag_mh:":{"uc_base":"1f1f2-1f1ed","uc_output":"1f1f2-1f1ed","uc_match":"1f1f2-1f1ed","uc_greedy":"1f1f2-1f1ed","shortnames":[":mh:"],"category":"flags"},":flag_mk:":{"uc_base":"1f1f2-1f1f0","uc_output":"1f1f2-1f1f0","uc_match":"1f1f2-1f1f0","uc_greedy":"1f1f2-1f1f0","shortnames":[":mk:"],"category":"flags"},":flag_ml:":{"uc_base":"1f1f2-1f1f1","uc_output":"1f1f2-1f1f1","uc_match":"1f1f2-1f1f1","uc_greedy":"1f1f2-1f1f1","shortnames":[":ml:"],"category":"flags"},":flag_mm:":{"uc_base":"1f1f2-1f1f2","uc_output":"1f1f2-1f1f2","uc_match":"1f1f2-1f1f2","uc_greedy":"1f1f2-1f1f2","shortnames":[":mm:"],"category":"flags"},":flag_mn:":{"uc_base":"1f1f2-1f1f3","uc_output":"1f1f2-1f1f3","uc_match":"1f1f2-1f1f3","uc_greedy":"1f1f2-1f1f3","shortnames":[":mn:"],"category":"flags"},":flag_mo:":{"uc_base":"1f1f2-1f1f4","uc_output":"1f1f2-1f1f4","uc_match":"1f1f2-1f1f4","uc_greedy":"1f1f2-1f1f4","shortnames":[":mo:"],"category":"flags"},":flag_mp:":{"uc_base":"1f1f2-1f1f5","uc_output":"1f1f2-1f1f5","uc_match":"1f1f2-1f1f5","uc_greedy":"1f1f2-1f1f5","shortnames":[":mp:"],"category":"flags"},":flag_mq:":{"uc_base":"1f1f2-1f1f6","uc_output":"1f1f2-1f1f6","uc_match":"1f1f2-1f1f6","uc_greedy":"1f1f2-1f1f6","shortnames":[":mq:"],"category":"flags"},":flag_mr:":{"uc_base":"1f1f2-1f1f7","uc_output":"1f1f2-1f1f7","uc_match":"1f1f2-1f1f7","uc_greedy":"1f1f2-1f1f7","shortnames":[":mr:"],"category":"flags"},":flag_ms:":{"uc_base":"1f1f2-1f1f8","uc_output":"1f1f2-1f1f8","uc_match":"1f1f2-1f1f8","uc_greedy":"1f1f2-1f1f8","shortnames":[":ms:"],"category":"flags"},":flag_mt:":{"uc_base":"1f1f2-1f1f9","uc_output":"1f1f2-1f1f9","uc_match":"1f1f2-1f1f9","uc_greedy":"1f1f2-1f1f9","shortnames":[":mt:"],"category":"flags"},":flag_mu:":{"uc_base":"1f1f2-1f1fa","uc_output":"1f1f2-1f1fa","uc_match":"1f1f2-1f1fa","uc_greedy":"1f1f2-1f1fa","shortnames":[":mu:"],"category":"flags"},":flag_mv:":{"uc_base":"1f1f2-1f1fb","uc_output":"1f1f2-1f1fb","uc_match":"1f1f2-1f1fb","uc_greedy":"1f1f2-1f1fb","shortnames":[":mv:"],"category":"flags"},":flag_mw:":{"uc_base":"1f1f2-1f1fc","uc_output":"1f1f2-1f1fc","uc_match":"1f1f2-1f1fc","uc_greedy":"1f1f2-1f1fc","shortnames":[":mw:"],"category":"flags"},":flag_mx:":{"uc_base":"1f1f2-1f1fd","uc_output":"1f1f2-1f1fd","uc_match":"1f1f2-1f1fd","uc_greedy":"1f1f2-1f1fd","shortnames":[":mx:"],"category":"flags"},":flag_my:":{"uc_base":"1f1f2-1f1fe","uc_output":"1f1f2-1f1fe","uc_match":"1f1f2-1f1fe","uc_greedy":"1f1f2-1f1fe","shortnames":[":my:"],"category":"flags"},":flag_mz:":{"uc_base":"1f1f2-1f1ff","uc_output":"1f1f2-1f1ff","uc_match":"1f1f2-1f1ff","uc_greedy":"1f1f2-1f1ff","shortnames":[":mz:"],"category":"flags"},":flag_na:":{"uc_base":"1f1f3-1f1e6","uc_output":"1f1f3-1f1e6","uc_match":"1f1f3-1f1e6","uc_greedy":"1f1f3-1f1e6","shortnames":[":na:"],"category":"flags"},":flag_nc:":{"uc_base":"1f1f3-1f1e8","uc_output":"1f1f3-1f1e8","uc_match":"1f1f3-1f1e8","uc_greedy":"1f1f3-1f1e8","shortnames":[":nc:"],"category":"flags"},":flag_ne:":{"uc_base":"1f1f3-1f1ea","uc_output":"1f1f3-1f1ea","uc_match":"1f1f3-1f1ea","uc_greedy":"1f1f3-1f1ea","shortnames":[":ne:"],"category":"flags"},":flag_nf:":{"uc_base":"1f1f3-1f1eb","uc_output":"1f1f3-1f1eb","uc_match":"1f1f3-1f1eb","uc_greedy":"1f1f3-1f1eb","shortnames":[":nf:"],"category":"flags"},":flag_ng:":{"uc_base":"1f1f3-1f1ec","uc_output":"1f1f3-1f1ec","uc_match":"1f1f3-1f1ec","uc_greedy":"1f1f3-1f1ec","shortnames":[":nigeria:"],"category":"flags"},":flag_ni:":{"uc_base":"1f1f3-1f1ee","uc_output":"1f1f3-1f1ee","uc_match":"1f1f3-1f1ee","uc_greedy":"1f1f3-1f1ee","shortnames":[":ni:"],"category":"flags"},":flag_nl:":{"uc_base":"1f1f3-1f1f1","uc_output":"1f1f3-1f1f1","uc_match":"1f1f3-1f1f1","uc_greedy":"1f1f3-1f1f1","shortnames":[":nl:"],"category":"flags"},":flag_no:":{"uc_base":"1f1f3-1f1f4","uc_output":"1f1f3-1f1f4","uc_match":"1f1f3-1f1f4","uc_greedy":"1f1f3-1f1f4","shortnames":[":no:"],"category":"flags"},":flag_np:":{"uc_base":"1f1f3-1f1f5","uc_output":"1f1f3-1f1f5","uc_match":"1f1f3-1f1f5","uc_greedy":"1f1f3-1f1f5","shortnames":[":np:"],"category":"flags"},":flag_nr:":{"uc_base":"1f1f3-1f1f7","uc_output":"1f1f3-1f1f7","uc_match":"1f1f3-1f1f7","uc_greedy":"1f1f3-1f1f7","shortnames":[":nr:"],"category":"flags"},":flag_nu:":{"uc_base":"1f1f3-1f1fa","uc_output":"1f1f3-1f1fa","uc_match":"1f1f3-1f1fa","uc_greedy":"1f1f3-1f1fa","shortnames":[":nu:"],"category":"flags"},":flag_nz:":{"uc_base":"1f1f3-1f1ff","uc_output":"1f1f3-1f1ff","uc_match":"1f1f3-1f1ff","uc_greedy":"1f1f3-1f1ff","shortnames":[":nz:"],"category":"flags"},":flag_om:":{"uc_base":"1f1f4-1f1f2","uc_output":"1f1f4-1f1f2","uc_match":"1f1f4-1f1f2","uc_greedy":"1f1f4-1f1f2","shortnames":[":om:"],"category":"flags"},":flag_pa:":{"uc_base":"1f1f5-1f1e6","uc_output":"1f1f5-1f1e6","uc_match":"1f1f5-1f1e6","uc_greedy":"1f1f5-1f1e6","shortnames":[":pa:"],"category":"flags"},":flag_pe:":{"uc_base":"1f1f5-1f1ea","uc_output":"1f1f5-1f1ea","uc_match":"1f1f5-1f1ea","uc_greedy":"1f1f5-1f1ea","shortnames":[":pe:"],"category":"flags"},":flag_pf:":{"uc_base":"1f1f5-1f1eb","uc_output":"1f1f5-1f1eb","uc_match":"1f1f5-1f1eb","uc_greedy":"1f1f5-1f1eb","shortnames":[":pf:"],"category":"flags"},":flag_pg:":{"uc_base":"1f1f5-1f1ec","uc_output":"1f1f5-1f1ec","uc_match":"1f1f5-1f1ec","uc_greedy":"1f1f5-1f1ec","shortnames":[":pg:"],"category":"flags"},":flag_ph:":{"uc_base":"1f1f5-1f1ed","uc_output":"1f1f5-1f1ed","uc_match":"1f1f5-1f1ed","uc_greedy":"1f1f5-1f1ed","shortnames":[":ph:"],"category":"flags"},":flag_pk:":{"uc_base":"1f1f5-1f1f0","uc_output":"1f1f5-1f1f0","uc_match":"1f1f5-1f1f0","uc_greedy":"1f1f5-1f1f0","shortnames":[":pk:"],"category":"flags"},":flag_pl:":{"uc_base":"1f1f5-1f1f1","uc_output":"1f1f5-1f1f1","uc_match":"1f1f5-1f1f1","uc_greedy":"1f1f5-1f1f1","shortnames":[":pl:"],"category":"flags"},":flag_pm:":{"uc_base":"1f1f5-1f1f2","uc_output":"1f1f5-1f1f2","uc_match":"1f1f5-1f1f2","uc_greedy":"1f1f5-1f1f2","shortnames":[":pm:"],"category":"flags"},":flag_pn:":{"uc_base":"1f1f5-1f1f3","uc_output":"1f1f5-1f1f3","uc_match":"1f1f5-1f1f3","uc_greedy":"1f1f5-1f1f3","shortnames":[":pn:"],"category":"flags"},":flag_pr:":{"uc_base":"1f1f5-1f1f7","uc_output":"1f1f5-1f1f7","uc_match":"1f1f5-1f1f7","uc_greedy":"1f1f5-1f1f7","shortnames":[":pr:"],"category":"flags"},":flag_ps:":{"uc_base":"1f1f5-1f1f8","uc_output":"1f1f5-1f1f8","uc_match":"1f1f5-1f1f8","uc_greedy":"1f1f5-1f1f8","shortnames":[":ps:"],"category":"flags"},":flag_pt:":{"uc_base":"1f1f5-1f1f9","uc_output":"1f1f5-1f1f9","uc_match":"1f1f5-1f1f9","uc_greedy":"1f1f5-1f1f9","shortnames":[":pt:"],"category":"flags"},":flag_pw:":{"uc_base":"1f1f5-1f1fc","uc_output":"1f1f5-1f1fc","uc_match":"1f1f5-1f1fc","uc_greedy":"1f1f5-1f1fc","shortnames":[":pw:"],"category":"flags"},":flag_py:":{"uc_base":"1f1f5-1f1fe","uc_output":"1f1f5-1f1fe","uc_match":"1f1f5-1f1fe","uc_greedy":"1f1f5-1f1fe","shortnames":[":py:"],"category":"flags"},":flag_qa:":{"uc_base":"1f1f6-1f1e6","uc_output":"1f1f6-1f1e6","uc_match":"1f1f6-1f1e6","uc_greedy":"1f1f6-1f1e6","shortnames":[":qa:"],"category":"flags"},":flag_re:":{"uc_base":"1f1f7-1f1ea","uc_output":"1f1f7-1f1ea","uc_match":"1f1f7-1f1ea","uc_greedy":"1f1f7-1f1ea","shortnames":[":re:"],"category":"flags"},":flag_ro:":{"uc_base":"1f1f7-1f1f4","uc_output":"1f1f7-1f1f4","uc_match":"1f1f7-1f1f4","uc_greedy":"1f1f7-1f1f4","shortnames":[":ro:"],"category":"flags"},":flag_rs:":{"uc_base":"1f1f7-1f1f8","uc_output":"1f1f7-1f1f8","uc_match":"1f1f7-1f1f8","uc_greedy":"1f1f7-1f1f8","shortnames":[":rs:"],"category":"flags"},":flag_ru:":{"uc_base":"1f1f7-1f1fa","uc_output":"1f1f7-1f1fa","uc_match":"1f1f7-1f1fa","uc_greedy":"1f1f7-1f1fa","shortnames":[":ru:"],"category":"flags"},":flag_rw:":{"uc_base":"1f1f7-1f1fc","uc_output":"1f1f7-1f1fc","uc_match":"1f1f7-1f1fc","uc_greedy":"1f1f7-1f1fc","shortnames":[":rw:"],"category":"flags"},":flag_sa:":{"uc_base":"1f1f8-1f1e6","uc_output":"1f1f8-1f1e6","uc_match":"1f1f8-1f1e6","uc_greedy":"1f1f8-1f1e6","shortnames":[":saudiarabia:",":saudi:"],"category":"flags"},":flag_sb:":{"uc_base":"1f1f8-1f1e7","uc_output":"1f1f8-1f1e7","uc_match":"1f1f8-1f1e7","uc_greedy":"1f1f8-1f1e7","shortnames":[":sb:"],"category":"flags"},":flag_sc:":{"uc_base":"1f1f8-1f1e8","uc_output":"1f1f8-1f1e8","uc_match":"1f1f8-1f1e8","uc_greedy":"1f1f8-1f1e8","shortnames":[":sc:"],"category":"flags"},":flag_sd:":{"uc_base":"1f1f8-1f1e9","uc_output":"1f1f8-1f1e9","uc_match":"1f1f8-1f1e9","uc_greedy":"1f1f8-1f1e9","shortnames":[":sd:"],"category":"flags"},":flag_se:":{"uc_base":"1f1f8-1f1ea","uc_output":"1f1f8-1f1ea","uc_match":"1f1f8-1f1ea","uc_greedy":"1f1f8-1f1ea","shortnames":[":se:"],"category":"flags"},":flag_sg:":{"uc_base":"1f1f8-1f1ec","uc_output":"1f1f8-1f1ec","uc_match":"1f1f8-1f1ec","uc_greedy":"1f1f8-1f1ec","shortnames":[":sg:"],"category":"flags"},":flag_sh:":{"uc_base":"1f1f8-1f1ed","uc_output":"1f1f8-1f1ed","uc_match":"1f1f8-1f1ed","uc_greedy":"1f1f8-1f1ed","shortnames":[":sh:"],"category":"flags"},":flag_si:":{"uc_base":"1f1f8-1f1ee","uc_output":"1f1f8-1f1ee","uc_match":"1f1f8-1f1ee","uc_greedy":"1f1f8-1f1ee","shortnames":[":si:"],"category":"flags"},":flag_sj:":{"uc_base":"1f1f8-1f1ef","uc_output":"1f1f8-1f1ef","uc_match":"1f1f8-1f1ef","uc_greedy":"1f1f8-1f1ef","shortnames":[":sj:"],"category":"flags"},":flag_sk:":{"uc_base":"1f1f8-1f1f0","uc_output":"1f1f8-1f1f0","uc_match":"1f1f8-1f1f0","uc_greedy":"1f1f8-1f1f0","shortnames":[":sk:"],"category":"flags"},":flag_sl:":{"uc_base":"1f1f8-1f1f1","uc_output":"1f1f8-1f1f1","uc_match":"1f1f8-1f1f1","uc_greedy":"1f1f8-1f1f1","shortnames":[":sl:"],"category":"flags"},":flag_sm:":{"uc_base":"1f1f8-1f1f2","uc_output":"1f1f8-1f1f2","uc_match":"1f1f8-1f1f2","uc_greedy":"1f1f8-1f1f2","shortnames":[":sm:"],"category":"flags"},":flag_sn:":{"uc_base":"1f1f8-1f1f3","uc_output":"1f1f8-1f1f3","uc_match":"1f1f8-1f1f3","uc_greedy":"1f1f8-1f1f3","shortnames":[":sn:"],"category":"flags"},":flag_so:":{"uc_base":"1f1f8-1f1f4","uc_output":"1f1f8-1f1f4","uc_match":"1f1f8-1f1f4","uc_greedy":"1f1f8-1f1f4","shortnames":[":so:"],"category":"flags"},":flag_sr:":{"uc_base":"1f1f8-1f1f7","uc_output":"1f1f8-1f1f7","uc_match":"1f1f8-1f1f7","uc_greedy":"1f1f8-1f1f7","shortnames":[":sr:"],"category":"flags"},":flag_ss:":{"uc_base":"1f1f8-1f1f8","uc_output":"1f1f8-1f1f8","uc_match":"1f1f8-1f1f8","uc_greedy":"1f1f8-1f1f8","shortnames":[":ss:"],"category":"flags"},":flag_st:":{"uc_base":"1f1f8-1f1f9","uc_output":"1f1f8-1f1f9","uc_match":"1f1f8-1f1f9","uc_greedy":"1f1f8-1f1f9","shortnames":[":st:"],"category":"flags"},":flag_sv:":{"uc_base":"1f1f8-1f1fb","uc_output":"1f1f8-1f1fb","uc_match":"1f1f8-1f1fb","uc_greedy":"1f1f8-1f1fb","shortnames":[":sv:"],"category":"flags"},":flag_sx:":{"uc_base":"1f1f8-1f1fd","uc_output":"1f1f8-1f1fd","uc_match":"1f1f8-1f1fd","uc_greedy":"1f1f8-1f1fd","shortnames":[":sx:"],"category":"flags"},":flag_sy:":{"uc_base":"1f1f8-1f1fe","uc_output":"1f1f8-1f1fe","uc_match":"1f1f8-1f1fe","uc_greedy":"1f1f8-1f1fe","shortnames":[":sy:"],"category":"flags"},":flag_sz:":{"uc_base":"1f1f8-1f1ff","uc_output":"1f1f8-1f1ff","uc_match":"1f1f8-1f1ff","uc_greedy":"1f1f8-1f1ff","shortnames":[":sz:"],"category":"flags"},":flag_ta:":{"uc_base":"1f1f9-1f1e6","uc_output":"1f1f9-1f1e6","uc_match":"1f1f9-1f1e6","uc_greedy":"1f1f9-1f1e6","shortnames":[":ta:"],"category":"flags"},":flag_tc:":{"uc_base":"1f1f9-1f1e8","uc_output":"1f1f9-1f1e8","uc_match":"1f1f9-1f1e8","uc_greedy":"1f1f9-1f1e8","shortnames":[":tc:"],"category":"flags"},":flag_td:":{"uc_base":"1f1f9-1f1e9","uc_output":"1f1f9-1f1e9","uc_match":"1f1f9-1f1e9","uc_greedy":"1f1f9-1f1e9","shortnames":[":td:"],"category":"flags"},":flag_tf:":{"uc_base":"1f1f9-1f1eb","uc_output":"1f1f9-1f1eb","uc_match":"1f1f9-1f1eb","uc_greedy":"1f1f9-1f1eb","shortnames":[":tf:"],"category":"flags"},":flag_tg:":{"uc_base":"1f1f9-1f1ec","uc_output":"1f1f9-1f1ec","uc_match":"1f1f9-1f1ec","uc_greedy":"1f1f9-1f1ec","shortnames":[":tg:"],"category":"flags"},":flag_th:":{"uc_base":"1f1f9-1f1ed","uc_output":"1f1f9-1f1ed","uc_match":"1f1f9-1f1ed","uc_greedy":"1f1f9-1f1ed","shortnames":[":th:"],"category":"flags"},":flag_tj:":{"uc_base":"1f1f9-1f1ef","uc_output":"1f1f9-1f1ef","uc_match":"1f1f9-1f1ef","uc_greedy":"1f1f9-1f1ef","shortnames":[":tj:"],"category":"flags"},":flag_tk:":{"uc_base":"1f1f9-1f1f0","uc_output":"1f1f9-1f1f0","uc_match":"1f1f9-1f1f0","uc_greedy":"1f1f9-1f1f0","shortnames":[":tk:"],"category":"flags"},":flag_tl:":{"uc_base":"1f1f9-1f1f1","uc_output":"1f1f9-1f1f1","uc_match":"1f1f9-1f1f1","uc_greedy":"1f1f9-1f1f1","shortnames":[":tl:"],"category":"flags"},":flag_tm:":{"uc_base":"1f1f9-1f1f2","uc_output":"1f1f9-1f1f2","uc_match":"1f1f9-1f1f2","uc_greedy":"1f1f9-1f1f2","shortnames":[":turkmenistan:"],"category":"flags"},":flag_tn:":{"uc_base":"1f1f9-1f1f3","uc_output":"1f1f9-1f1f3","uc_match":"1f1f9-1f1f3","uc_greedy":"1f1f9-1f1f3","shortnames":[":tn:"],"category":"flags"},":flag_to:":{"uc_base":"1f1f9-1f1f4","uc_output":"1f1f9-1f1f4","uc_match":"1f1f9-1f1f4","uc_greedy":"1f1f9-1f1f4","shortnames":[":to:"],"category":"flags"},":flag_tr:":{"uc_base":"1f1f9-1f1f7","uc_output":"1f1f9-1f1f7","uc_match":"1f1f9-1f1f7","uc_greedy":"1f1f9-1f1f7","shortnames":[":tr:"],"category":"flags"},":flag_tt:":{"uc_base":"1f1f9-1f1f9","uc_output":"1f1f9-1f1f9","uc_match":"1f1f9-1f1f9","uc_greedy":"1f1f9-1f1f9","shortnames":[":tt:"],"category":"flags"},":flag_tv:":{"uc_base":"1f1f9-1f1fb","uc_output":"1f1f9-1f1fb","uc_match":"1f1f9-1f1fb","uc_greedy":"1f1f9-1f1fb","shortnames":[":tuvalu:"],"category":"flags"},":flag_tw:":{"uc_base":"1f1f9-1f1fc","uc_output":"1f1f9-1f1fc","uc_match":"1f1f9-1f1fc","uc_greedy":"1f1f9-1f1fc","shortnames":[":tw:"],"category":"flags"},":flag_tz:":{"uc_base":"1f1f9-1f1ff","uc_output":"1f1f9-1f1ff","uc_match":"1f1f9-1f1ff","uc_greedy":"1f1f9-1f1ff","shortnames":[":tz:"],"category":"flags"},":flag_ua:":{"uc_base":"1f1fa-1f1e6","uc_output":"1f1fa-1f1e6","uc_match":"1f1fa-1f1e6","uc_greedy":"1f1fa-1f1e6","shortnames":[":ua:"],"category":"flags"},":flag_ug:":{"uc_base":"1f1fa-1f1ec","uc_output":"1f1fa-1f1ec","uc_match":"1f1fa-1f1ec","uc_greedy":"1f1fa-1f1ec","shortnames":[":ug:"],"category":"flags"},":flag_um:":{"uc_base":"1f1fa-1f1f2","uc_output":"1f1fa-1f1f2","uc_match":"1f1fa-1f1f2","uc_greedy":"1f1fa-1f1f2","shortnames":[":um:"],"category":"flags"},":flag_us:":{"uc_base":"1f1fa-1f1f8","uc_output":"1f1fa-1f1f8","uc_match":"1f1fa-1f1f8","uc_greedy":"1f1fa-1f1f8","shortnames":[":us:"],"category":"flags"},":flag_uy:":{"uc_base":"1f1fa-1f1fe","uc_output":"1f1fa-1f1fe","uc_match":"1f1fa-1f1fe","uc_greedy":"1f1fa-1f1fe","shortnames":[":uy:"],"category":"flags"},":flag_uz:":{"uc_base":"1f1fa-1f1ff","uc_output":"1f1fa-1f1ff","uc_match":"1f1fa-1f1ff","uc_greedy":"1f1fa-1f1ff","shortnames":[":uz:"],"category":"flags"},":flag_va:":{"uc_base":"1f1fb-1f1e6","uc_output":"1f1fb-1f1e6","uc_match":"1f1fb-1f1e6","uc_greedy":"1f1fb-1f1e6","shortnames":[":va:"],"category":"flags"},":flag_vc:":{"uc_base":"1f1fb-1f1e8","uc_output":"1f1fb-1f1e8","uc_match":"1f1fb-1f1e8","uc_greedy":"1f1fb-1f1e8","shortnames":[":vc:"],"category":"flags"},":flag_ve:":{"uc_base":"1f1fb-1f1ea","uc_output":"1f1fb-1f1ea","uc_match":"1f1fb-1f1ea","uc_greedy":"1f1fb-1f1ea","shortnames":[":ve:"],"category":"flags"},":flag_vg:":{"uc_base":"1f1fb-1f1ec","uc_output":"1f1fb-1f1ec","uc_match":"1f1fb-1f1ec","uc_greedy":"1f1fb-1f1ec","shortnames":[":vg:"],"category":"flags"},":flag_vi:":{"uc_base":"1f1fb-1f1ee","uc_output":"1f1fb-1f1ee","uc_match":"1f1fb-1f1ee","uc_greedy":"1f1fb-1f1ee","shortnames":[":vi:"],"category":"flags"},":flag_vn:":{"uc_base":"1f1fb-1f1f3","uc_output":"1f1fb-1f1f3","uc_match":"1f1fb-1f1f3","uc_greedy":"1f1fb-1f1f3","shortnames":[":vn:"],"category":"flags"},":flag_vu:":{"uc_base":"1f1fb-1f1fa","uc_output":"1f1fb-1f1fa","uc_match":"1f1fb-1f1fa","uc_greedy":"1f1fb-1f1fa","shortnames":[":vu:"],"category":"flags"},":flag_wf:":{"uc_base":"1f1fc-1f1eb","uc_output":"1f1fc-1f1eb","uc_match":"1f1fc-1f1eb","uc_greedy":"1f1fc-1f1eb","shortnames":[":wf:"],"category":"flags"},":flag_ws:":{"uc_base":"1f1fc-1f1f8","uc_output":"1f1fc-1f1f8","uc_match":"1f1fc-1f1f8","uc_greedy":"1f1fc-1f1f8","shortnames":[":ws:"],"category":"flags"},":flag_xk:":{"uc_base":"1f1fd-1f1f0","uc_output":"1f1fd-1f1f0","uc_match":"1f1fd-1f1f0","uc_greedy":"1f1fd-1f1f0","shortnames":[":xk:"],"category":"flags"},":flag_ye:":{"uc_base":"1f1fe-1f1ea","uc_output":"1f1fe-1f1ea","uc_match":"1f1fe-1f1ea","uc_greedy":"1f1fe-1f1ea","shortnames":[":ye:"],"category":"flags"},":flag_yt:":{"uc_base":"1f1fe-1f1f9","uc_output":"1f1fe-1f1f9","uc_match":"1f1fe-1f1f9","uc_greedy":"1f1fe-1f1f9","shortnames":[":yt:"],"category":"flags"},":flag_za:":{"uc_base":"1f1ff-1f1e6","uc_output":"1f1ff-1f1e6","uc_match":"1f1ff-1f1e6","uc_greedy":"1f1ff-1f1e6","shortnames":[":za:"],"category":"flags"},":flag_zm:":{"uc_base":"1f1ff-1f1f2","uc_output":"1f1ff-1f1f2","uc_match":"1f1ff-1f1f2","uc_greedy":"1f1ff-1f1f2","shortnames":[":zm:"],"category":"flags"},":flag_zw:":{"uc_base":"1f1ff-1f1fc","uc_output":"1f1ff-1f1fc","uc_match":"1f1ff-1f1fc","uc_greedy":"1f1ff-1f1fc","shortnames":[":zw:"],"category":"flags"},":girl_tone1:":{"uc_base":"1f467-1f3fb","uc_output":"1f467-1f3fb","uc_match":"1f467-1f3fb","uc_greedy":"1f467-1f3fb","shortnames":[],"category":"people"},":girl_tone2:":{"uc_base":"1f467-1f3fc","uc_output":"1f467-1f3fc","uc_match":"1f467-1f3fc","uc_greedy":"1f467-1f3fc","shortnames":[],"category":"people"},":girl_tone3:":{"uc_base":"1f467-1f3fd","uc_output":"1f467-1f3fd","uc_match":"1f467-1f3fd","uc_greedy":"1f467-1f3fd","shortnames":[],"category":"people"},":girl_tone4:":{"uc_base":"1f467-1f3fe","uc_output":"1f467-1f3fe","uc_match":"1f467-1f3fe","uc_greedy":"1f467-1f3fe","shortnames":[],"category":"people"},":girl_tone5:":{"uc_base":"1f467-1f3ff","uc_output":"1f467-1f3ff","uc_match":"1f467-1f3ff","uc_greedy":"1f467-1f3ff","shortnames":[],"category":"people"},":guard_tone1:":{"uc_base":"1f482-1f3fb","uc_output":"1f482-1f3fb","uc_match":"1f482-1f3fb","uc_greedy":"1f482-1f3fb","shortnames":[":guardsman_tone1:"],"category":"people"},":guard_tone2:":{"uc_base":"1f482-1f3fc","uc_output":"1f482-1f3fc","uc_match":"1f482-1f3fc","uc_greedy":"1f482-1f3fc","shortnames":[":guardsman_tone2:"],"category":"people"},":guard_tone3:":{"uc_base":"1f482-1f3fd","uc_output":"1f482-1f3fd","uc_match":"1f482-1f3fd","uc_greedy":"1f482-1f3fd","shortnames":[":guardsman_tone3:"],"category":"people"},":guard_tone4:":{"uc_base":"1f482-1f3fe","uc_output":"1f482-1f3fe","uc_match":"1f482-1f3fe","uc_greedy":"1f482-1f3fe","shortnames":[":guardsman_tone4:"],"category":"people"},":guard_tone5:":{"uc_base":"1f482-1f3ff","uc_output":"1f482-1f3ff","uc_match":"1f482-1f3ff","uc_greedy":"1f482-1f3ff","shortnames":[":guardsman_tone5:"],"category":"people"},":hand_splayed_tone1:":{"uc_base":"1f590-1f3fb","uc_output":"1f590-1f3fb","uc_match":"1f590-fe0f-1f3fb","uc_greedy":"1f590-fe0f-1f3fb","shortnames":[":raised_hand_with_fingers_splayed_tone1:"],"category":"people"},":hand_splayed_tone2:":{"uc_base":"1f590-1f3fc","uc_output":"1f590-1f3fc","uc_match":"1f590-fe0f-1f3fc","uc_greedy":"1f590-fe0f-1f3fc","shortnames":[":raised_hand_with_fingers_splayed_tone2:"],"category":"people"},":hand_splayed_tone3:":{"uc_base":"1f590-1f3fd","uc_output":"1f590-1f3fd","uc_match":"1f590-fe0f-1f3fd","uc_greedy":"1f590-fe0f-1f3fd","shortnames":[":raised_hand_with_fingers_splayed_tone3:"],"category":"people"},":hand_splayed_tone4:":{"uc_base":"1f590-1f3fe","uc_output":"1f590-1f3fe","uc_match":"1f590-fe0f-1f3fe","uc_greedy":"1f590-fe0f-1f3fe","shortnames":[":raised_hand_with_fingers_splayed_tone4:"],"category":"people"},":hand_splayed_tone5:":{"uc_base":"1f590-1f3ff","uc_output":"1f590-1f3ff","uc_match":"1f590-fe0f-1f3ff","uc_greedy":"1f590-fe0f-1f3ff","shortnames":[":raised_hand_with_fingers_splayed_tone5:"],"category":"people"},":horse_racing_tone1:":{"uc_base":"1f3c7-1f3fb","uc_output":"1f3c7-1f3fb","uc_match":"1f3c7-1f3fb","uc_greedy":"1f3c7-1f3fb","shortnames":[],"category":"activity"},":horse_racing_tone2:":{"uc_base":"1f3c7-1f3fc","uc_output":"1f3c7-1f3fc","uc_match":"1f3c7-1f3fc","uc_greedy":"1f3c7-1f3fc","shortnames":[],"category":"activity"},":horse_racing_tone3:":{"uc_base":"1f3c7-1f3fd","uc_output":"1f3c7-1f3fd","uc_match":"1f3c7-1f3fd","uc_greedy":"1f3c7-1f3fd","shortnames":[],"category":"activity"},":horse_racing_tone4:":{"uc_base":"1f3c7-1f3fe","uc_output":"1f3c7-1f3fe","uc_match":"1f3c7-1f3fe","uc_greedy":"1f3c7-1f3fe","shortnames":[],"category":"activity"},":horse_racing_tone5:":{"uc_base":"1f3c7-1f3ff","uc_output":"1f3c7-1f3ff","uc_match":"1f3c7-1f3ff","uc_greedy":"1f3c7-1f3ff","shortnames":[],"category":"activity"},":left_facing_fist_tone1:":{"uc_base":"1f91b-1f3fb","uc_output":"1f91b-1f3fb","uc_match":"1f91b-1f3fb","uc_greedy":"1f91b-1f3fb","shortnames":[":left_fist_tone1:"],"category":"people"},":left_facing_fist_tone2:":{"uc_base":"1f91b-1f3fc","uc_output":"1f91b-1f3fc","uc_match":"1f91b-1f3fc","uc_greedy":"1f91b-1f3fc","shortnames":[":left_fist_tone2:"],"category":"people"},":left_facing_fist_tone3:":{"uc_base":"1f91b-1f3fd","uc_output":"1f91b-1f3fd","uc_match":"1f91b-1f3fd","uc_greedy":"1f91b-1f3fd","shortnames":[":left_fist_tone3:"],"category":"people"},":left_facing_fist_tone4:":{"uc_base":"1f91b-1f3fe","uc_output":"1f91b-1f3fe","uc_match":"1f91b-1f3fe","uc_greedy":"1f91b-1f3fe","shortnames":[":left_fist_tone4:"],"category":"people"},":left_facing_fist_tone5:":{"uc_base":"1f91b-1f3ff","uc_output":"1f91b-1f3ff","uc_match":"1f91b-1f3ff","uc_greedy":"1f91b-1f3ff","shortnames":[":left_fist_tone5:"],"category":"people"},":love_you_gesture_tone1:":{"uc_base":"1f91f-1f3fb","uc_output":"1f91f-1f3fb","uc_match":"1f91f-1f3fb","uc_greedy":"1f91f-1f3fb","shortnames":[":love_you_gesture_light_skin_tone:"],"category":"people"},":love_you_gesture_tone2:":{"uc_base":"1f91f-1f3fc","uc_output":"1f91f-1f3fc","uc_match":"1f91f-1f3fc","uc_greedy":"1f91f-1f3fc","shortnames":[":love_you_gesture_medium_light_skin_tone:"],"category":"people"},":love_you_gesture_tone3:":{"uc_base":"1f91f-1f3fd","uc_output":"1f91f-1f3fd","uc_match":"1f91f-1f3fd","uc_greedy":"1f91f-1f3fd","shortnames":[":love_you_gesture_medium_skin_tone:"],"category":"people"},":love_you_gesture_tone4:":{"uc_base":"1f91f-1f3fe","uc_output":"1f91f-1f3fe","uc_match":"1f91f-1f3fe","uc_greedy":"1f91f-1f3fe","shortnames":[":love_you_gesture_medium_dark_skin_tone:"],"category":"people"},":love_you_gesture_tone5:":{"uc_base":"1f91f-1f3ff","uc_output":"1f91f-1f3ff","uc_match":"1f91f-1f3ff","uc_greedy":"1f91f-1f3ff","shortnames":[":love_you_gesture_dark_skin_tone:"],"category":"people"},":mage_tone1:":{"uc_base":"1f9d9-1f3fb","uc_output":"1f9d9-1f3fb","uc_match":"1f9d9-1f3fb","uc_greedy":"1f9d9-1f3fb","shortnames":[":mage_light_skin_tone:"],"category":"people"},":mage_tone2:":{"uc_base":"1f9d9-1f3fc","uc_output":"1f9d9-1f3fc","uc_match":"1f9d9-1f3fc","uc_greedy":"1f9d9-1f3fc","shortnames":[":mage_medium_light_skin_tone:"],"category":"people"},":mage_tone3:":{"uc_base":"1f9d9-1f3fd","uc_output":"1f9d9-1f3fd","uc_match":"1f9d9-1f3fd","uc_greedy":"1f9d9-1f3fd","shortnames":[":mage_medium_skin_tone:"],"category":"people"},":mage_tone4:":{"uc_base":"1f9d9-1f3fe","uc_output":"1f9d9-1f3fe","uc_match":"1f9d9-1f3fe","uc_greedy":"1f9d9-1f3fe","shortnames":[":mage_medium_dark_skin_tone:"],"category":"people"},":mage_tone5:":{"uc_base":"1f9d9-1f3ff","uc_output":"1f9d9-1f3ff","uc_match":"1f9d9-1f3ff","uc_greedy":"1f9d9-1f3ff","shortnames":[":mage_dark_skin_tone:"],"category":"people"},":man_dancing_tone1:":{"uc_base":"1f57a-1f3fb","uc_output":"1f57a-1f3fb","uc_match":"1f57a-1f3fb","uc_greedy":"1f57a-1f3fb","shortnames":[":male_dancer_tone1:"],"category":"people"},":man_dancing_tone2:":{"uc_base":"1f57a-1f3fc","uc_output":"1f57a-1f3fc","uc_match":"1f57a-1f3fc","uc_greedy":"1f57a-1f3fc","shortnames":[":male_dancer_tone2:"],"category":"people"},":man_dancing_tone3:":{"uc_base":"1f57a-1f3fd","uc_output":"1f57a-1f3fd","uc_match":"1f57a-1f3fd","uc_greedy":"1f57a-1f3fd","shortnames":[":male_dancer_tone3:"],"category":"people"},":man_dancing_tone4:":{"uc_base":"1f57a-1f3fe","uc_output":"1f57a-1f3fe","uc_match":"1f57a-1f3fe","uc_greedy":"1f57a-1f3fe","shortnames":[":male_dancer_tone4:"],"category":"people"},":man_dancing_tone5:":{"uc_base":"1f57a-1f3ff","uc_output":"1f57a-1f3ff","uc_match":"1f57a-1f3ff","uc_greedy":"1f57a-1f3ff","shortnames":[":male_dancer_tone5:"],"category":"people"},":man_in_business_suit_levitating_tone1:":{"uc_base":"1f574-1f3fb","uc_output":"1f574-1f3fb","uc_match":"1f574-fe0f-1f3fb","uc_greedy":"1f574-fe0f-1f3fb","shortnames":[":man_in_business_suit_levitating_light_skin_tone:"],"category":"people"},":man_in_business_suit_levitating_tone2:":{"uc_base":"1f574-1f3fc","uc_output":"1f574-1f3fc","uc_match":"1f574-fe0f-1f3fc","uc_greedy":"1f574-fe0f-1f3fc","shortnames":[":man_in_business_suit_levitating_medium_light_skin_tone:"],"category":"people"},":man_in_business_suit_levitating_tone3:":{"uc_base":"1f574-1f3fd","uc_output":"1f574-1f3fd","uc_match":"1f574-fe0f-1f3fd","uc_greedy":"1f574-fe0f-1f3fd","shortnames":[":man_in_business_suit_levitating_medium_skin_tone:"],"category":"people"},":man_in_business_suit_levitating_tone4:":{"uc_base":"1f574-1f3fe","uc_output":"1f574-1f3fe","uc_match":"1f574-fe0f-1f3fe","uc_greedy":"1f574-fe0f-1f3fe","shortnames":[":man_in_business_suit_levitating_medium_dark_skin_tone:"],"category":"people"},":man_in_business_suit_levitating_tone5:":{"uc_base":"1f574-1f3ff","uc_output":"1f574-1f3ff","uc_match":"1f574-fe0f-1f3ff","uc_greedy":"1f574-fe0f-1f3ff","shortnames":[":man_in_business_suit_levitating_dark_skin_tone:"],"category":"people"},":man_in_tuxedo_tone1:":{"uc_base":"1f935-1f3fb","uc_output":"1f935-1f3fb","uc_match":"1f935-1f3fb","uc_greedy":"1f935-1f3fb","shortnames":[":tuxedo_tone1:"],"category":"people"},":man_in_tuxedo_tone2:":{"uc_base":"1f935-1f3fc","uc_output":"1f935-1f3fc","uc_match":"1f935-1f3fc","uc_greedy":"1f935-1f3fc","shortnames":[":tuxedo_tone2:"],"category":"people"},":man_in_tuxedo_tone3:":{"uc_base":"1f935-1f3fd","uc_output":"1f935-1f3fd","uc_match":"1f935-1f3fd","uc_greedy":"1f935-1f3fd","shortnames":[":tuxedo_tone3:"],"category":"people"},":man_in_tuxedo_tone4:":{"uc_base":"1f935-1f3fe","uc_output":"1f935-1f3fe","uc_match":"1f935-1f3fe","uc_greedy":"1f935-1f3fe","shortnames":[":tuxedo_tone4:"],"category":"people"},":man_in_tuxedo_tone5:":{"uc_base":"1f935-1f3ff","uc_output":"1f935-1f3ff","uc_match":"1f935-1f3ff","uc_greedy":"1f935-1f3ff","shortnames":[":tuxedo_tone5:"],"category":"people"},":man_tone1:":{"uc_base":"1f468-1f3fb","uc_output":"1f468-1f3fb","uc_match":"1f468-1f3fb","uc_greedy":"1f468-1f3fb","shortnames":[],"category":"people"},":man_tone2:":{"uc_base":"1f468-1f3fc","uc_output":"1f468-1f3fc","uc_match":"1f468-1f3fc","uc_greedy":"1f468-1f3fc","shortnames":[],"category":"people"},":man_tone3:":{"uc_base":"1f468-1f3fd","uc_output":"1f468-1f3fd","uc_match":"1f468-1f3fd","uc_greedy":"1f468-1f3fd","shortnames":[],"category":"people"},":man_tone4:":{"uc_base":"1f468-1f3fe","uc_output":"1f468-1f3fe","uc_match":"1f468-1f3fe","uc_greedy":"1f468-1f3fe","shortnames":[],"category":"people"},":man_tone5:":{"uc_base":"1f468-1f3ff","uc_output":"1f468-1f3ff","uc_match":"1f468-1f3ff","uc_greedy":"1f468-1f3ff","shortnames":[],"category":"people"},":man_with_chinese_cap_tone1:":{"uc_base":"1f472-1f3fb","uc_output":"1f472-1f3fb","uc_match":"1f472-1f3fb","uc_greedy":"1f472-1f3fb","shortnames":[":man_with_gua_pi_mao_tone1:"],"category":"people"},":man_with_chinese_cap_tone2:":{"uc_base":"1f472-1f3fc","uc_output":"1f472-1f3fc","uc_match":"1f472-1f3fc","uc_greedy":"1f472-1f3fc","shortnames":[":man_with_gua_pi_mao_tone2:"],"category":"people"},":man_with_chinese_cap_tone3:":{"uc_base":"1f472-1f3fd","uc_output":"1f472-1f3fd","uc_match":"1f472-1f3fd","uc_greedy":"1f472-1f3fd","shortnames":[":man_with_gua_pi_mao_tone3:"],"category":"people"},":man_with_chinese_cap_tone4:":{"uc_base":"1f472-1f3fe","uc_output":"1f472-1f3fe","uc_match":"1f472-1f3fe","uc_greedy":"1f472-1f3fe","shortnames":[":man_with_gua_pi_mao_tone4:"],"category":"people"},":man_with_chinese_cap_tone5:":{"uc_base":"1f472-1f3ff","uc_output":"1f472-1f3ff","uc_match":"1f472-1f3ff","uc_greedy":"1f472-1f3ff","shortnames":[":man_with_gua_pi_mao_tone5:"],"category":"people"},":merperson_tone1:":{"uc_base":"1f9dc-1f3fb","uc_output":"1f9dc-1f3fb","uc_match":"1f9dc-1f3fb","uc_greedy":"1f9dc-1f3fb","shortnames":[":merperson_light_skin_tone:"],"category":"people"},":merperson_tone2:":{"uc_base":"1f9dc-1f3fc","uc_output":"1f9dc-1f3fc","uc_match":"1f9dc-1f3fc","uc_greedy":"1f9dc-1f3fc","shortnames":[":merperson_medium_light_skin_tone:"],"category":"people"},":merperson_tone3:":{"uc_base":"1f9dc-1f3fd","uc_output":"1f9dc-1f3fd","uc_match":"1f9dc-1f3fd","uc_greedy":"1f9dc-1f3fd","shortnames":[":merperson_medium_skin_tone:"],"category":"people"},":merperson_tone4:":{"uc_base":"1f9dc-1f3fe","uc_output":"1f9dc-1f3fe","uc_match":"1f9dc-1f3fe","uc_greedy":"1f9dc-1f3fe","shortnames":[":merperson_medium_dark_skin_tone:"],"category":"people"},":merperson_tone5:":{"uc_base":"1f9dc-1f3ff","uc_output":"1f9dc-1f3ff","uc_match":"1f9dc-1f3ff","uc_greedy":"1f9dc-1f3ff","shortnames":[":merperson_dark_skin_tone:"],"category":"people"},":metal_tone1:":{"uc_base":"1f918-1f3fb","uc_output":"1f918-1f3fb","uc_match":"1f918-1f3fb","uc_greedy":"1f918-1f3fb","shortnames":[":sign_of_the_horns_tone1:"],"category":"people"},":metal_tone2:":{"uc_base":"1f918-1f3fc","uc_output":"1f918-1f3fc","uc_match":"1f918-1f3fc","uc_greedy":"1f918-1f3fc","shortnames":[":sign_of_the_horns_tone2:"],"category":"people"},":metal_tone3:":{"uc_base":"1f918-1f3fd","uc_output":"1f918-1f3fd","uc_match":"1f918-1f3fd","uc_greedy":"1f918-1f3fd","shortnames":[":sign_of_the_horns_tone3:"],"category":"people"},":metal_tone4:":{"uc_base":"1f918-1f3fe","uc_output":"1f918-1f3fe","uc_match":"1f918-1f3fe","uc_greedy":"1f918-1f3fe","shortnames":[":sign_of_the_horns_tone4:"],"category":"people"},":metal_tone5:":{"uc_base":"1f918-1f3ff","uc_output":"1f918-1f3ff","uc_match":"1f918-1f3ff","uc_greedy":"1f918-1f3ff","shortnames":[":sign_of_the_horns_tone5:"],"category":"people"},":middle_finger_tone1:":{"uc_base":"1f595-1f3fb","uc_output":"1f595-1f3fb","uc_match":"1f595-1f3fb","uc_greedy":"1f595-1f3fb","shortnames":[":reversed_hand_with_middle_finger_extended_tone1:"],"category":"people"},":middle_finger_tone2:":{"uc_base":"1f595-1f3fc","uc_output":"1f595-1f3fc","uc_match":"1f595-1f3fc","uc_greedy":"1f595-1f3fc","shortnames":[":reversed_hand_with_middle_finger_extended_tone2:"],"category":"people"},":middle_finger_tone3:":{"uc_base":"1f595-1f3fd","uc_output":"1f595-1f3fd","uc_match":"1f595-1f3fd","uc_greedy":"1f595-1f3fd","shortnames":[":reversed_hand_with_middle_finger_extended_tone3:"],"category":"people"},":middle_finger_tone4:":{"uc_base":"1f595-1f3fe","uc_output":"1f595-1f3fe","uc_match":"1f595-1f3fe","uc_greedy":"1f595-1f3fe","shortnames":[":reversed_hand_with_middle_finger_extended_tone4:"],"category":"people"},":middle_finger_tone5:":{"uc_base":"1f595-1f3ff","uc_output":"1f595-1f3ff","uc_match":"1f595-1f3ff","uc_greedy":"1f595-1f3ff","shortnames":[":reversed_hand_with_middle_finger_extended_tone5:"],"category":"people"},":mrs_claus_tone1:":{"uc_base":"1f936-1f3fb","uc_output":"1f936-1f3fb","uc_match":"1f936-1f3fb","uc_greedy":"1f936-1f3fb","shortnames":[":mother_christmas_tone1:"],"category":"people"},":mrs_claus_tone2:":{"uc_base":"1f936-1f3fc","uc_output":"1f936-1f3fc","uc_match":"1f936-1f3fc","uc_greedy":"1f936-1f3fc","shortnames":[":mother_christmas_tone2:"],"category":"people"},":mrs_claus_tone3:":{"uc_base":"1f936-1f3fd","uc_output":"1f936-1f3fd","uc_match":"1f936-1f3fd","uc_greedy":"1f936-1f3fd","shortnames":[":mother_christmas_tone3:"],"category":"people"},":mrs_claus_tone4:":{"uc_base":"1f936-1f3fe","uc_output":"1f936-1f3fe","uc_match":"1f936-1f3fe","uc_greedy":"1f936-1f3fe","shortnames":[":mother_christmas_tone4:"],"category":"people"},":mrs_claus_tone5:":{"uc_base":"1f936-1f3ff","uc_output":"1f936-1f3ff","uc_match":"1f936-1f3ff","uc_greedy":"1f936-1f3ff","shortnames":[":mother_christmas_tone5:"],"category":"people"},":muscle_tone1:":{"uc_base":"1f4aa-1f3fb","uc_output":"1f4aa-1f3fb","uc_match":"1f4aa-1f3fb","uc_greedy":"1f4aa-1f3fb","shortnames":[],"category":"people"},":muscle_tone2:":{"uc_base":"1f4aa-1f3fc","uc_output":"1f4aa-1f3fc","uc_match":"1f4aa-1f3fc","uc_greedy":"1f4aa-1f3fc","shortnames":[],"category":"people"},":muscle_tone3:":{"uc_base":"1f4aa-1f3fd","uc_output":"1f4aa-1f3fd","uc_match":"1f4aa-1f3fd","uc_greedy":"1f4aa-1f3fd","shortnames":[],"category":"people"},":muscle_tone4:":{"uc_base":"1f4aa-1f3fe","uc_output":"1f4aa-1f3fe","uc_match":"1f4aa-1f3fe","uc_greedy":"1f4aa-1f3fe","shortnames":[],"category":"people"},":muscle_tone5:":{"uc_base":"1f4aa-1f3ff","uc_output":"1f4aa-1f3ff","uc_match":"1f4aa-1f3ff","uc_greedy":"1f4aa-1f3ff","shortnames":[],"category":"people"},":nail_care_tone1:":{"uc_base":"1f485-1f3fb","uc_output":"1f485-1f3fb","uc_match":"1f485-1f3fb","uc_greedy":"1f485-1f3fb","shortnames":[],"category":"people"},":nail_care_tone2:":{"uc_base":"1f485-1f3fc","uc_output":"1f485-1f3fc","uc_match":"1f485-1f3fc","uc_greedy":"1f485-1f3fc","shortnames":[],"category":"people"},":nail_care_tone3:":{"uc_base":"1f485-1f3fd","uc_output":"1f485-1f3fd","uc_match":"1f485-1f3fd","uc_greedy":"1f485-1f3fd","shortnames":[],"category":"people"},":nail_care_tone4:":{"uc_base":"1f485-1f3fe","uc_output":"1f485-1f3fe","uc_match":"1f485-1f3fe","uc_greedy":"1f485-1f3fe","shortnames":[],"category":"people"},":nail_care_tone5:":{"uc_base":"1f485-1f3ff","uc_output":"1f485-1f3ff","uc_match":"1f485-1f3ff","uc_greedy":"1f485-1f3ff","shortnames":[],"category":"people"},":nose_tone1:":{"uc_base":"1f443-1f3fb","uc_output":"1f443-1f3fb","uc_match":"1f443-1f3fb","uc_greedy":"1f443-1f3fb","shortnames":[],"category":"people"},":nose_tone2:":{"uc_base":"1f443-1f3fc","uc_output":"1f443-1f3fc","uc_match":"1f443-1f3fc","uc_greedy":"1f443-1f3fc","shortnames":[],"category":"people"},":nose_tone3:":{"uc_base":"1f443-1f3fd","uc_output":"1f443-1f3fd","uc_match":"1f443-1f3fd","uc_greedy":"1f443-1f3fd","shortnames":[],"category":"people"},":nose_tone4:":{"uc_base":"1f443-1f3fe","uc_output":"1f443-1f3fe","uc_match":"1f443-1f3fe","uc_greedy":"1f443-1f3fe","shortnames":[],"category":"people"},":nose_tone5:":{"uc_base":"1f443-1f3ff","uc_output":"1f443-1f3ff","uc_match":"1f443-1f3ff","uc_greedy":"1f443-1f3ff","shortnames":[],"category":"people"},":ok_hand_tone1:":{"uc_base":"1f44c-1f3fb","uc_output":"1f44c-1f3fb","uc_match":"1f44c-1f3fb","uc_greedy":"1f44c-1f3fb","shortnames":[],"category":"people"},":ok_hand_tone2:":{"uc_base":"1f44c-1f3fc","uc_output":"1f44c-1f3fc","uc_match":"1f44c-1f3fc","uc_greedy":"1f44c-1f3fc","shortnames":[],"category":"people"},":ok_hand_tone3:":{"uc_base":"1f44c-1f3fd","uc_output":"1f44c-1f3fd","uc_match":"1f44c-1f3fd","uc_greedy":"1f44c-1f3fd","shortnames":[],"category":"people"},":ok_hand_tone4:":{"uc_base":"1f44c-1f3fe","uc_output":"1f44c-1f3fe","uc_match":"1f44c-1f3fe","uc_greedy":"1f44c-1f3fe","shortnames":[],"category":"people"},":ok_hand_tone5:":{"uc_base":"1f44c-1f3ff","uc_output":"1f44c-1f3ff","uc_match":"1f44c-1f3ff","uc_greedy":"1f44c-1f3ff","shortnames":[],"category":"people"},":older_adult_tone1:":{"uc_base":"1f9d3-1f3fb","uc_output":"1f9d3-1f3fb","uc_match":"1f9d3-1f3fb","uc_greedy":"1f9d3-1f3fb","shortnames":[":older_adult_light_skin_tone:"],"category":"people"},":older_adult_tone2:":{"uc_base":"1f9d3-1f3fc","uc_output":"1f9d3-1f3fc","uc_match":"1f9d3-1f3fc","uc_greedy":"1f9d3-1f3fc","shortnames":[":older_adult_medium_light_skin_tone:"],"category":"people"},":older_adult_tone3:":{"uc_base":"1f9d3-1f3fd","uc_output":"1f9d3-1f3fd","uc_match":"1f9d3-1f3fd","uc_greedy":"1f9d3-1f3fd","shortnames":[":older_adult_medium_skin_tone:"],"category":"people"},":older_adult_tone4:":{"uc_base":"1f9d3-1f3fe","uc_output":"1f9d3-1f3fe","uc_match":"1f9d3-1f3fe","uc_greedy":"1f9d3-1f3fe","shortnames":[":older_adult_medium_dark_skin_tone:"],"category":"people"},":older_adult_tone5:":{"uc_base":"1f9d3-1f3ff","uc_output":"1f9d3-1f3ff","uc_match":"1f9d3-1f3ff","uc_greedy":"1f9d3-1f3ff","shortnames":[":older_adult_dark_skin_tone:"],"category":"people"},":older_man_tone1:":{"uc_base":"1f474-1f3fb","uc_output":"1f474-1f3fb","uc_match":"1f474-1f3fb","uc_greedy":"1f474-1f3fb","shortnames":[],"category":"people"},":older_man_tone2:":{"uc_base":"1f474-1f3fc","uc_output":"1f474-1f3fc","uc_match":"1f474-1f3fc","uc_greedy":"1f474-1f3fc","shortnames":[],"category":"people"},":older_man_tone3:":{"uc_base":"1f474-1f3fd","uc_output":"1f474-1f3fd","uc_match":"1f474-1f3fd","uc_greedy":"1f474-1f3fd","shortnames":[],"category":"people"},":older_man_tone4:":{"uc_base":"1f474-1f3fe","uc_output":"1f474-1f3fe","uc_match":"1f474-1f3fe","uc_greedy":"1f474-1f3fe","shortnames":[],"category":"people"},":older_man_tone5:":{"uc_base":"1f474-1f3ff","uc_output":"1f474-1f3ff","uc_match":"1f474-1f3ff","uc_greedy":"1f474-1f3ff","shortnames":[],"category":"people"},":older_woman_tone1:":{"uc_base":"1f475-1f3fb","uc_output":"1f475-1f3fb","uc_match":"1f475-1f3fb","uc_greedy":"1f475-1f3fb","shortnames":[":grandma_tone1:"],"category":"people"},":older_woman_tone2:":{"uc_base":"1f475-1f3fc","uc_output":"1f475-1f3fc","uc_match":"1f475-1f3fc","uc_greedy":"1f475-1f3fc","shortnames":[":grandma_tone2:"],"category":"people"},":older_woman_tone3:":{"uc_base":"1f475-1f3fd","uc_output":"1f475-1f3fd","uc_match":"1f475-1f3fd","uc_greedy":"1f475-1f3fd","shortnames":[":grandma_tone3:"],"category":"people"},":older_woman_tone4:":{"uc_base":"1f475-1f3fe","uc_output":"1f475-1f3fe","uc_match":"1f475-1f3fe","uc_greedy":"1f475-1f3fe","shortnames":[":grandma_tone4:"],"category":"people"},":older_woman_tone5:":{"uc_base":"1f475-1f3ff","uc_output":"1f475-1f3ff","uc_match":"1f475-1f3ff","uc_greedy":"1f475-1f3ff","shortnames":[":grandma_tone5:"],"category":"people"},":open_hands_tone1:":{"uc_base":"1f450-1f3fb","uc_output":"1f450-1f3fb","uc_match":"1f450-1f3fb","uc_greedy":"1f450-1f3fb","shortnames":[],"category":"people"},":open_hands_tone2:":{"uc_base":"1f450-1f3fc","uc_output":"1f450-1f3fc","uc_match":"1f450-1f3fc","uc_greedy":"1f450-1f3fc","shortnames":[],"category":"people"},":open_hands_tone3:":{"uc_base":"1f450-1f3fd","uc_output":"1f450-1f3fd","uc_match":"1f450-1f3fd","uc_greedy":"1f450-1f3fd","shortnames":[],"category":"people"},":open_hands_tone4:":{"uc_base":"1f450-1f3fe","uc_output":"1f450-1f3fe","uc_match":"1f450-1f3fe","uc_greedy":"1f450-1f3fe","shortnames":[],"category":"people"},":open_hands_tone5:":{"uc_base":"1f450-1f3ff","uc_output":"1f450-1f3ff","uc_match":"1f450-1f3ff","uc_greedy":"1f450-1f3ff","shortnames":[],"category":"people"},":palms_up_together_tone1:":{"uc_base":"1f932-1f3fb","uc_output":"1f932-1f3fb","uc_match":"1f932-1f3fb","uc_greedy":"1f932-1f3fb","shortnames":[":palms_up_together_light_skin_tone:"],"category":"people"},":palms_up_together_tone2:":{"uc_base":"1f932-1f3fc","uc_output":"1f932-1f3fc","uc_match":"1f932-1f3fc","uc_greedy":"1f932-1f3fc","shortnames":[":palms_up_together_medium_light_skin_tone:"],"category":"people"},":palms_up_together_tone3:":{"uc_base":"1f932-1f3fd","uc_output":"1f932-1f3fd","uc_match":"1f932-1f3fd","uc_greedy":"1f932-1f3fd","shortnames":[":palms_up_together_medium_skin_tone:"],"category":"people"},":palms_up_together_tone4:":{"uc_base":"1f932-1f3fe","uc_output":"1f932-1f3fe","uc_match":"1f932-1f3fe","uc_greedy":"1f932-1f3fe","shortnames":[":palms_up_together_medium_dark_skin_tone:"],"category":"people"},":palms_up_together_tone5:":{"uc_base":"1f932-1f3ff","uc_output":"1f932-1f3ff","uc_match":"1f932-1f3ff","uc_greedy":"1f932-1f3ff","shortnames":[":palms_up_together_dark_skin_tone:"],"category":"people"},":person_biking_tone1:":{"uc_base":"1f6b4-1f3fb","uc_output":"1f6b4-1f3fb","uc_match":"1f6b4-1f3fb","uc_greedy":"1f6b4-1f3fb","shortnames":[":bicyclist_tone1:"],"category":"activity"},":person_biking_tone2:":{"uc_base":"1f6b4-1f3fc","uc_output":"1f6b4-1f3fc","uc_match":"1f6b4-1f3fc","uc_greedy":"1f6b4-1f3fc","shortnames":[":bicyclist_tone2:"],"category":"activity"},":person_biking_tone3:":{"uc_base":"1f6b4-1f3fd","uc_output":"1f6b4-1f3fd","uc_match":"1f6b4-1f3fd","uc_greedy":"1f6b4-1f3fd","shortnames":[":bicyclist_tone3:"],"category":"activity"},":person_biking_tone4:":{"uc_base":"1f6b4-1f3fe","uc_output":"1f6b4-1f3fe","uc_match":"1f6b4-1f3fe","uc_greedy":"1f6b4-1f3fe","shortnames":[":bicyclist_tone4:"],"category":"activity"},":person_biking_tone5:":{"uc_base":"1f6b4-1f3ff","uc_output":"1f6b4-1f3ff","uc_match":"1f6b4-1f3ff","uc_greedy":"1f6b4-1f3ff","shortnames":[":bicyclist_tone5:"],"category":"activity"},":person_bowing_tone1:":{"uc_base":"1f647-1f3fb","uc_output":"1f647-1f3fb","uc_match":"1f647-1f3fb","uc_greedy":"1f647-1f3fb","shortnames":[":bow_tone1:"],"category":"people"},":person_bowing_tone2:":{"uc_base":"1f647-1f3fc","uc_output":"1f647-1f3fc","uc_match":"1f647-1f3fc","uc_greedy":"1f647-1f3fc","shortnames":[":bow_tone2:"],"category":"people"},":person_bowing_tone3:":{"uc_base":"1f647-1f3fd","uc_output":"1f647-1f3fd","uc_match":"1f647-1f3fd","uc_greedy":"1f647-1f3fd","shortnames":[":bow_tone3:"],"category":"people"},":person_bowing_tone4:":{"uc_base":"1f647-1f3fe","uc_output":"1f647-1f3fe","uc_match":"1f647-1f3fe","uc_greedy":"1f647-1f3fe","shortnames":[":bow_tone4:"],"category":"people"},":person_bowing_tone5:":{"uc_base":"1f647-1f3ff","uc_output":"1f647-1f3ff","uc_match":"1f647-1f3ff","uc_greedy":"1f647-1f3ff","shortnames":[":bow_tone5:"],"category":"people"},":person_climbing_tone1:":{"uc_base":"1f9d7-1f3fb","uc_output":"1f9d7-1f3fb","uc_match":"1f9d7-1f3fb","uc_greedy":"1f9d7-1f3fb","shortnames":[":person_climbing_light_skin_tone:"],"category":"activity"},":person_climbing_tone2:":{"uc_base":"1f9d7-1f3fc","uc_output":"1f9d7-1f3fc","uc_match":"1f9d7-1f3fc","uc_greedy":"1f9d7-1f3fc","shortnames":[":person_climbing_medium_light_skin_tone:"],"category":"activity"},":person_climbing_tone3:":{"uc_base":"1f9d7-1f3fd","uc_output":"1f9d7-1f3fd","uc_match":"1f9d7-1f3fd","uc_greedy":"1f9d7-1f3fd","shortnames":[":person_climbing_medium_skin_tone:"],"category":"activity"},":person_climbing_tone4:":{"uc_base":"1f9d7-1f3fe","uc_output":"1f9d7-1f3fe","uc_match":"1f9d7-1f3fe","uc_greedy":"1f9d7-1f3fe","shortnames":[":person_climbing_medium_dark_skin_tone:"],"category":"activity"},":person_climbing_tone5:":{"uc_base":"1f9d7-1f3ff","uc_output":"1f9d7-1f3ff","uc_match":"1f9d7-1f3ff","uc_greedy":"1f9d7-1f3ff","shortnames":[":person_climbing_dark_skin_tone:"],"category":"activity"},":person_doing_cartwheel_tone1:":{"uc_base":"1f938-1f3fb","uc_output":"1f938-1f3fb","uc_match":"1f938-1f3fb","uc_greedy":"1f938-1f3fb","shortnames":[":cartwheel_tone1:"],"category":"activity"},":person_doing_cartwheel_tone2:":{"uc_base":"1f938-1f3fc","uc_output":"1f938-1f3fc","uc_match":"1f938-1f3fc","uc_greedy":"1f938-1f3fc","shortnames":[":cartwheel_tone2:"],"category":"activity"},":person_doing_cartwheel_tone3:":{"uc_base":"1f938-1f3fd","uc_output":"1f938-1f3fd","uc_match":"1f938-1f3fd","uc_greedy":"1f938-1f3fd","shortnames":[":cartwheel_tone3:"],"category":"activity"},":person_doing_cartwheel_tone4:":{"uc_base":"1f938-1f3fe","uc_output":"1f938-1f3fe","uc_match":"1f938-1f3fe","uc_greedy":"1f938-1f3fe","shortnames":[":cartwheel_tone4:"],"category":"activity"},":person_doing_cartwheel_tone5:":{"uc_base":"1f938-1f3ff","uc_output":"1f938-1f3ff","uc_match":"1f938-1f3ff","uc_greedy":"1f938-1f3ff","shortnames":[":cartwheel_tone5:"],"category":"activity"},":person_facepalming_tone1:":{"uc_base":"1f926-1f3fb","uc_output":"1f926-1f3fb","uc_match":"1f926-1f3fb","uc_greedy":"1f926-1f3fb","shortnames":[":face_palm_tone1:",":facepalm_tone1:"],"category":"people"},":person_facepalming_tone2:":{"uc_base":"1f926-1f3fc","uc_output":"1f926-1f3fc","uc_match":"1f926-1f3fc","uc_greedy":"1f926-1f3fc","shortnames":[":face_palm_tone2:",":facepalm_tone2:"],"category":"people"},":person_facepalming_tone3:":{"uc_base":"1f926-1f3fd","uc_output":"1f926-1f3fd","uc_match":"1f926-1f3fd","uc_greedy":"1f926-1f3fd","shortnames":[":face_palm_tone3:",":facepalm_tone3:"],"category":"people"},":person_facepalming_tone4:":{"uc_base":"1f926-1f3fe","uc_output":"1f926-1f3fe","uc_match":"1f926-1f3fe","uc_greedy":"1f926-1f3fe","shortnames":[":face_palm_tone4:",":facepalm_tone4:"],"category":"people"},":person_facepalming_tone5:":{"uc_base":"1f926-1f3ff","uc_output":"1f926-1f3ff","uc_match":"1f926-1f3ff","uc_greedy":"1f926-1f3ff","shortnames":[":face_palm_tone5:",":facepalm_tone5:"],"category":"people"},":person_frowning_tone1:":{"uc_base":"1f64d-1f3fb","uc_output":"1f64d-1f3fb","uc_match":"1f64d-1f3fb","uc_greedy":"1f64d-1f3fb","shortnames":[],"category":"people"},":person_frowning_tone2:":{"uc_base":"1f64d-1f3fc","uc_output":"1f64d-1f3fc","uc_match":"1f64d-1f3fc","uc_greedy":"1f64d-1f3fc","shortnames":[],"category":"people"},":person_frowning_tone3:":{"uc_base":"1f64d-1f3fd","uc_output":"1f64d-1f3fd","uc_match":"1f64d-1f3fd","uc_greedy":"1f64d-1f3fd","shortnames":[],"category":"people"},":person_frowning_tone4:":{"uc_base":"1f64d-1f3fe","uc_output":"1f64d-1f3fe","uc_match":"1f64d-1f3fe","uc_greedy":"1f64d-1f3fe","shortnames":[],"category":"people"},":person_frowning_tone5:":{"uc_base":"1f64d-1f3ff","uc_output":"1f64d-1f3ff","uc_match":"1f64d-1f3ff","uc_greedy":"1f64d-1f3ff","shortnames":[],"category":"people"},":person_gesturing_no_tone1:":{"uc_base":"1f645-1f3fb","uc_output":"1f645-1f3fb","uc_match":"1f645-1f3fb","uc_greedy":"1f645-1f3fb","shortnames":[":no_good_tone1:"],"category":"people"},":person_gesturing_no_tone2:":{"uc_base":"1f645-1f3fc","uc_output":"1f645-1f3fc","uc_match":"1f645-1f3fc","uc_greedy":"1f645-1f3fc","shortnames":[":no_good_tone2:"],"category":"people"},":person_gesturing_no_tone3:":{"uc_base":"1f645-1f3fd","uc_output":"1f645-1f3fd","uc_match":"1f645-1f3fd","uc_greedy":"1f645-1f3fd","shortnames":[":no_good_tone3:"],"category":"people"},":person_gesturing_no_tone4:":{"uc_base":"1f645-1f3fe","uc_output":"1f645-1f3fe","uc_match":"1f645-1f3fe","uc_greedy":"1f645-1f3fe","shortnames":[":no_good_tone4:"],"category":"people"},":person_gesturing_no_tone5:":{"uc_base":"1f645-1f3ff","uc_output":"1f645-1f3ff","uc_match":"1f645-1f3ff","uc_greedy":"1f645-1f3ff","shortnames":[":no_good_tone5:"],"category":"people"},":person_gesturing_ok_tone1:":{"uc_base":"1f646-1f3fb","uc_output":"1f646-1f3fb","uc_match":"1f646-1f3fb","uc_greedy":"1f646-1f3fb","shortnames":[":ok_woman_tone1:"],"category":"people"},":person_gesturing_ok_tone2:":{"uc_base":"1f646-1f3fc","uc_output":"1f646-1f3fc","uc_match":"1f646-1f3fc","uc_greedy":"1f646-1f3fc","shortnames":[":ok_woman_tone2:"],"category":"people"},":person_gesturing_ok_tone3:":{"uc_base":"1f646-1f3fd","uc_output":"1f646-1f3fd","uc_match":"1f646-1f3fd","uc_greedy":"1f646-1f3fd","shortnames":[":ok_woman_tone3:"],"category":"people"},":person_gesturing_ok_tone4:":{"uc_base":"1f646-1f3fe","uc_output":"1f646-1f3fe","uc_match":"1f646-1f3fe","uc_greedy":"1f646-1f3fe","shortnames":[":ok_woman_tone4:"],"category":"people"},":person_gesturing_ok_tone5:":{"uc_base":"1f646-1f3ff","uc_output":"1f646-1f3ff","uc_match":"1f646-1f3ff","uc_greedy":"1f646-1f3ff","shortnames":[":ok_woman_tone5:"],"category":"people"},":person_getting_haircut_tone1:":{"uc_base":"1f487-1f3fb","uc_output":"1f487-1f3fb","uc_match":"1f487-1f3fb","uc_greedy":"1f487-1f3fb","shortnames":[":haircut_tone1:"],"category":"people"},":person_getting_haircut_tone2:":{"uc_base":"1f487-1f3fc","uc_output":"1f487-1f3fc","uc_match":"1f487-1f3fc","uc_greedy":"1f487-1f3fc","shortnames":[":haircut_tone2:"],"category":"people"},":person_getting_haircut_tone3:":{"uc_base":"1f487-1f3fd","uc_output":"1f487-1f3fd","uc_match":"1f487-1f3fd","uc_greedy":"1f487-1f3fd","shortnames":[":haircut_tone3:"],"category":"people"},":person_getting_haircut_tone4:":{"uc_base":"1f487-1f3fe","uc_output":"1f487-1f3fe","uc_match":"1f487-1f3fe","uc_greedy":"1f487-1f3fe","shortnames":[":haircut_tone4:"],"category":"people"},":person_getting_haircut_tone5:":{"uc_base":"1f487-1f3ff","uc_output":"1f487-1f3ff","uc_match":"1f487-1f3ff","uc_greedy":"1f487-1f3ff","shortnames":[":haircut_tone5:"],"category":"people"},":person_getting_massage_tone1:":{"uc_base":"1f486-1f3fb","uc_output":"1f486-1f3fb","uc_match":"1f486-1f3fb","uc_greedy":"1f486-1f3fb","shortnames":[":massage_tone1:"],"category":"people"},":person_getting_massage_tone2:":{"uc_base":"1f486-1f3fc","uc_output":"1f486-1f3fc","uc_match":"1f486-1f3fc","uc_greedy":"1f486-1f3fc","shortnames":[":massage_tone2:"],"category":"people"},":person_getting_massage_tone3:":{"uc_base":"1f486-1f3fd","uc_output":"1f486-1f3fd","uc_match":"1f486-1f3fd","uc_greedy":"1f486-1f3fd","shortnames":[":massage_tone3:"],"category":"people"},":person_getting_massage_tone4:":{"uc_base":"1f486-1f3fe","uc_output":"1f486-1f3fe","uc_match":"1f486-1f3fe","uc_greedy":"1f486-1f3fe","shortnames":[":massage_tone4:"],"category":"people"},":person_getting_massage_tone5:":{"uc_base":"1f486-1f3ff","uc_output":"1f486-1f3ff","uc_match":"1f486-1f3ff","uc_greedy":"1f486-1f3ff","shortnames":[":massage_tone5:"],"category":"people"},":person_golfing_tone1:":{"uc_base":"1f3cc-1f3fb","uc_output":"1f3cc-1f3fb","uc_match":"1f3cc-fe0f-1f3fb","uc_greedy":"1f3cc-fe0f-1f3fb","shortnames":[":person_golfing_light_skin_tone:"],"category":"activity"},":person_golfing_tone2:":{"uc_base":"1f3cc-1f3fc","uc_output":"1f3cc-1f3fc","uc_match":"1f3cc-fe0f-1f3fc","uc_greedy":"1f3cc-fe0f-1f3fc","shortnames":[":person_golfing_medium_light_skin_tone:"],"category":"activity"},":person_golfing_tone3:":{"uc_base":"1f3cc-1f3fd","uc_output":"1f3cc-1f3fd","uc_match":"1f3cc-fe0f-1f3fd","uc_greedy":"1f3cc-fe0f-1f3fd","shortnames":[":person_golfing_medium_skin_tone:"],"category":"activity"},":person_golfing_tone4:":{"uc_base":"1f3cc-1f3fe","uc_output":"1f3cc-1f3fe","uc_match":"1f3cc-fe0f-1f3fe","uc_greedy":"1f3cc-fe0f-1f3fe","shortnames":[":person_golfing_medium_dark_skin_tone:"],"category":"activity"},":person_golfing_tone5:":{"uc_base":"1f3cc-1f3ff","uc_output":"1f3cc-1f3ff","uc_match":"1f3cc-fe0f-1f3ff","uc_greedy":"1f3cc-fe0f-1f3ff","shortnames":[":person_golfing_dark_skin_tone:"],"category":"activity"},":person_in_bed_tone1:":{"uc_base":"1f6cc-1f3fb","uc_output":"1f6cc-1f3fb","uc_match":"1f6cc-1f3fb","uc_greedy":"1f6cc-1f3fb","shortnames":[":person_in_bed_light_skin_tone:"],"category":"objects"},":person_in_bed_tone2:":{"uc_base":"1f6cc-1f3fc","uc_output":"1f6cc-1f3fc","uc_match":"1f6cc-1f3fc","uc_greedy":"1f6cc-1f3fc","shortnames":[":person_in_bed_medium_light_skin_tone:"],"category":"objects"},":person_in_bed_tone3:":{"uc_base":"1f6cc-1f3fd","uc_output":"1f6cc-1f3fd","uc_match":"1f6cc-1f3fd","uc_greedy":"1f6cc-1f3fd","shortnames":[":person_in_bed_medium_skin_tone:"],"category":"objects"},":person_in_bed_tone4:":{"uc_base":"1f6cc-1f3fe","uc_output":"1f6cc-1f3fe","uc_match":"1f6cc-1f3fe","uc_greedy":"1f6cc-1f3fe","shortnames":[":person_in_bed_medium_dark_skin_tone:"],"category":"objects"},":person_in_bed_tone5:":{"uc_base":"1f6cc-1f3ff","uc_output":"1f6cc-1f3ff","uc_match":"1f6cc-1f3ff","uc_greedy":"1f6cc-1f3ff","shortnames":[":person_in_bed_dark_skin_tone:"],"category":"objects"},":person_in_lotus_position_tone1:":{"uc_base":"1f9d8-1f3fb","uc_output":"1f9d8-1f3fb","uc_match":"1f9d8-1f3fb","uc_greedy":"1f9d8-1f3fb","shortnames":[":person_in_lotus_position_light_skin_tone:"],"category":"activity"},":person_in_lotus_position_tone2:":{"uc_base":"1f9d8-1f3fc","uc_output":"1f9d8-1f3fc","uc_match":"1f9d8-1f3fc","uc_greedy":"1f9d8-1f3fc","shortnames":[":person_in_lotus_position_medium_light_skin_tone:"],"category":"activity"},":person_in_lotus_position_tone3:":{"uc_base":"1f9d8-1f3fd","uc_output":"1f9d8-1f3fd","uc_match":"1f9d8-1f3fd","uc_greedy":"1f9d8-1f3fd","shortnames":[":person_in_lotus_position_medium_skin_tone:"],"category":"activity"},":person_in_lotus_position_tone4:":{"uc_base":"1f9d8-1f3fe","uc_output":"1f9d8-1f3fe","uc_match":"1f9d8-1f3fe","uc_greedy":"1f9d8-1f3fe","shortnames":[":person_in_lotus_position_medium_dark_skin_tone:"],"category":"activity"},":person_in_lotus_position_tone5:":{"uc_base":"1f9d8-1f3ff","uc_output":"1f9d8-1f3ff","uc_match":"1f9d8-1f3ff","uc_greedy":"1f9d8-1f3ff","shortnames":[":person_in_lotus_position_dark_skin_tone:"],"category":"activity"},":person_in_steamy_room_tone1:":{"uc_base":"1f9d6-1f3fb","uc_output":"1f9d6-1f3fb","uc_match":"1f9d6-1f3fb","uc_greedy":"1f9d6-1f3fb","shortnames":[":person_in_steamy_room_light_skin_tone:"],"category":"activity"},":person_in_steamy_room_tone2:":{"uc_base":"1f9d6-1f3fc","uc_output":"1f9d6-1f3fc","uc_match":"1f9d6-1f3fc","uc_greedy":"1f9d6-1f3fc","shortnames":[":person_in_steamy_room_medium_light_skin_tone:"],"category":"activity"},":person_in_steamy_room_tone3:":{"uc_base":"1f9d6-1f3fd","uc_output":"1f9d6-1f3fd","uc_match":"1f9d6-1f3fd","uc_greedy":"1f9d6-1f3fd","shortnames":[":person_in_steamy_room_medium_skin_tone:"],"category":"activity"},":person_in_steamy_room_tone4:":{"uc_base":"1f9d6-1f3fe","uc_output":"1f9d6-1f3fe","uc_match":"1f9d6-1f3fe","uc_greedy":"1f9d6-1f3fe","shortnames":[":person_in_steamy_room_medium_dark_skin_tone:"],"category":"activity"},":person_in_steamy_room_tone5:":{"uc_base":"1f9d6-1f3ff","uc_output":"1f9d6-1f3ff","uc_match":"1f9d6-1f3ff","uc_greedy":"1f9d6-1f3ff","shortnames":[":person_in_steamy_room_dark_skin_tone:"],"category":"activity"},":person_juggling_tone1:":{"uc_base":"1f939-1f3fb","uc_output":"1f939-1f3fb","uc_match":"1f939-1f3fb","uc_greedy":"1f939-1f3fb","shortnames":[":juggling_tone1:",":juggler_tone1:"],"category":"activity"},":person_juggling_tone2:":{"uc_base":"1f939-1f3fc","uc_output":"1f939-1f3fc","uc_match":"1f939-1f3fc","uc_greedy":"1f939-1f3fc","shortnames":[":juggling_tone2:",":juggler_tone2:"],"category":"activity"},":person_juggling_tone3:":{"uc_base":"1f939-1f3fd","uc_output":"1f939-1f3fd","uc_match":"1f939-1f3fd","uc_greedy":"1f939-1f3fd","shortnames":[":juggling_tone3:",":juggler_tone3:"],"category":"activity"},":person_juggling_tone4:":{"uc_base":"1f939-1f3fe","uc_output":"1f939-1f3fe","uc_match":"1f939-1f3fe","uc_greedy":"1f939-1f3fe","shortnames":[":juggling_tone4:",":juggler_tone4:"],"category":"activity"},":person_juggling_tone5:":{"uc_base":"1f939-1f3ff","uc_output":"1f939-1f3ff","uc_match":"1f939-1f3ff","uc_greedy":"1f939-1f3ff","shortnames":[":juggling_tone5:",":juggler_tone5:"],"category":"activity"},":person_lifting_weights_tone1:":{"uc_base":"1f3cb-1f3fb","uc_output":"1f3cb-1f3fb","uc_match":"1f3cb-fe0f-1f3fb","uc_greedy":"1f3cb-fe0f-1f3fb","shortnames":[":lifter_tone1:",":weight_lifter_tone1:"],"category":"activity"},":person_lifting_weights_tone2:":{"uc_base":"1f3cb-1f3fc","uc_output":"1f3cb-1f3fc","uc_match":"1f3cb-fe0f-1f3fc","uc_greedy":"1f3cb-fe0f-1f3fc","shortnames":[":lifter_tone2:",":weight_lifter_tone2:"],"category":"activity"},":person_lifting_weights_tone3:":{"uc_base":"1f3cb-1f3fd","uc_output":"1f3cb-1f3fd","uc_match":"1f3cb-fe0f-1f3fd","uc_greedy":"1f3cb-fe0f-1f3fd","shortnames":[":lifter_tone3:",":weight_lifter_tone3:"],"category":"activity"},":person_lifting_weights_tone4:":{"uc_base":"1f3cb-1f3fe","uc_output":"1f3cb-1f3fe","uc_match":"1f3cb-fe0f-1f3fe","uc_greedy":"1f3cb-fe0f-1f3fe","shortnames":[":lifter_tone4:",":weight_lifter_tone4:"],"category":"activity"},":person_lifting_weights_tone5:":{"uc_base":"1f3cb-1f3ff","uc_output":"1f3cb-1f3ff","uc_match":"1f3cb-fe0f-1f3ff","uc_greedy":"1f3cb-fe0f-1f3ff","shortnames":[":lifter_tone5:",":weight_lifter_tone5:"],"category":"activity"},":person_mountain_biking_tone1:":{"uc_base":"1f6b5-1f3fb","uc_output":"1f6b5-1f3fb","uc_match":"1f6b5-1f3fb","uc_greedy":"1f6b5-1f3fb","shortnames":[":mountain_bicyclist_tone1:"],"category":"activity"},":person_mountain_biking_tone2:":{"uc_base":"1f6b5-1f3fc","uc_output":"1f6b5-1f3fc","uc_match":"1f6b5-1f3fc","uc_greedy":"1f6b5-1f3fc","shortnames":[":mountain_bicyclist_tone2:"],"category":"activity"},":person_mountain_biking_tone3:":{"uc_base":"1f6b5-1f3fd","uc_output":"1f6b5-1f3fd","uc_match":"1f6b5-1f3fd","uc_greedy":"1f6b5-1f3fd","shortnames":[":mountain_bicyclist_tone3:"],"category":"activity"},":person_mountain_biking_tone4:":{"uc_base":"1f6b5-1f3fe","uc_output":"1f6b5-1f3fe","uc_match":"1f6b5-1f3fe","uc_greedy":"1f6b5-1f3fe","shortnames":[":mountain_bicyclist_tone4:"],"category":"activity"},":person_mountain_biking_tone5:":{"uc_base":"1f6b5-1f3ff","uc_output":"1f6b5-1f3ff","uc_match":"1f6b5-1f3ff","uc_greedy":"1f6b5-1f3ff","shortnames":[":mountain_bicyclist_tone5:"],"category":"activity"},":person_playing_handball_tone1:":{"uc_base":"1f93e-1f3fb","uc_output":"1f93e-1f3fb","uc_match":"1f93e-1f3fb","uc_greedy":"1f93e-1f3fb","shortnames":[":handball_tone1:"],"category":"activity"},":person_playing_handball_tone2:":{"uc_base":"1f93e-1f3fc","uc_output":"1f93e-1f3fc","uc_match":"1f93e-1f3fc","uc_greedy":"1f93e-1f3fc","shortnames":[":handball_tone2:"],"category":"activity"},":person_playing_handball_tone3:":{"uc_base":"1f93e-1f3fd","uc_output":"1f93e-1f3fd","uc_match":"1f93e-1f3fd","uc_greedy":"1f93e-1f3fd","shortnames":[":handball_tone3:"],"category":"activity"},":person_playing_handball_tone4:":{"uc_base":"1f93e-1f3fe","uc_output":"1f93e-1f3fe","uc_match":"1f93e-1f3fe","uc_greedy":"1f93e-1f3fe","shortnames":[":handball_tone4:"],"category":"activity"},":person_playing_handball_tone5:":{"uc_base":"1f93e-1f3ff","uc_output":"1f93e-1f3ff","uc_match":"1f93e-1f3ff","uc_greedy":"1f93e-1f3ff","shortnames":[":handball_tone5:"],"category":"activity"},":person_playing_water_polo_tone1:":{"uc_base":"1f93d-1f3fb","uc_output":"1f93d-1f3fb","uc_match":"1f93d-1f3fb","uc_greedy":"1f93d-1f3fb","shortnames":[":water_polo_tone1:"],"category":"activity"},":person_playing_water_polo_tone2:":{"uc_base":"1f93d-1f3fc","uc_output":"1f93d-1f3fc","uc_match":"1f93d-1f3fc","uc_greedy":"1f93d-1f3fc","shortnames":[":water_polo_tone2:"],"category":"activity"},":person_playing_water_polo_tone3:":{"uc_base":"1f93d-1f3fd","uc_output":"1f93d-1f3fd","uc_match":"1f93d-1f3fd","uc_greedy":"1f93d-1f3fd","shortnames":[":water_polo_tone3:"],"category":"activity"},":person_playing_water_polo_tone4:":{"uc_base":"1f93d-1f3fe","uc_output":"1f93d-1f3fe","uc_match":"1f93d-1f3fe","uc_greedy":"1f93d-1f3fe","shortnames":[":water_polo_tone4:"],"category":"activity"},":person_playing_water_polo_tone5:":{"uc_base":"1f93d-1f3ff","uc_output":"1f93d-1f3ff","uc_match":"1f93d-1f3ff","uc_greedy":"1f93d-1f3ff","shortnames":[":water_polo_tone5:"],"category":"activity"},":person_pouting_tone1:":{"uc_base":"1f64e-1f3fb","uc_output":"1f64e-1f3fb","uc_match":"1f64e-1f3fb","uc_greedy":"1f64e-1f3fb","shortnames":[":person_with_pouting_face_tone1:"],"category":"people"},":person_pouting_tone2:":{"uc_base":"1f64e-1f3fc","uc_output":"1f64e-1f3fc","uc_match":"1f64e-1f3fc","uc_greedy":"1f64e-1f3fc","shortnames":[":person_with_pouting_face_tone2:"],"category":"people"},":person_pouting_tone3:":{"uc_base":"1f64e-1f3fd","uc_output":"1f64e-1f3fd","uc_match":"1f64e-1f3fd","uc_greedy":"1f64e-1f3fd","shortnames":[":person_with_pouting_face_tone3:"],"category":"people"},":person_pouting_tone4:":{"uc_base":"1f64e-1f3fe","uc_output":"1f64e-1f3fe","uc_match":"1f64e-1f3fe","uc_greedy":"1f64e-1f3fe","shortnames":[":person_with_pouting_face_tone4:"],"category":"people"},":person_pouting_tone5:":{"uc_base":"1f64e-1f3ff","uc_output":"1f64e-1f3ff","uc_match":"1f64e-1f3ff","uc_greedy":"1f64e-1f3ff","shortnames":[":person_with_pouting_face_tone5:"],"category":"people"},":person_raising_hand_tone1:":{"uc_base":"1f64b-1f3fb","uc_output":"1f64b-1f3fb","uc_match":"1f64b-1f3fb","uc_greedy":"1f64b-1f3fb","shortnames":[":raising_hand_tone1:"],"category":"people"},":person_raising_hand_tone2:":{"uc_base":"1f64b-1f3fc","uc_output":"1f64b-1f3fc","uc_match":"1f64b-1f3fc","uc_greedy":"1f64b-1f3fc","shortnames":[":raising_hand_tone2:"],"category":"people"},":person_raising_hand_tone3:":{"uc_base":"1f64b-1f3fd","uc_output":"1f64b-1f3fd","uc_match":"1f64b-1f3fd","uc_greedy":"1f64b-1f3fd","shortnames":[":raising_hand_tone3:"],"category":"people"},":person_raising_hand_tone4:":{"uc_base":"1f64b-1f3fe","uc_output":"1f64b-1f3fe","uc_match":"1f64b-1f3fe","uc_greedy":"1f64b-1f3fe","shortnames":[":raising_hand_tone4:"],"category":"people"},":person_raising_hand_tone5:":{"uc_base":"1f64b-1f3ff","uc_output":"1f64b-1f3ff","uc_match":"1f64b-1f3ff","uc_greedy":"1f64b-1f3ff","shortnames":[":raising_hand_tone5:"],"category":"people"},":person_rowing_boat_tone1:":{"uc_base":"1f6a3-1f3fb","uc_output":"1f6a3-1f3fb","uc_match":"1f6a3-1f3fb","uc_greedy":"1f6a3-1f3fb","shortnames":[":rowboat_tone1:"],"category":"activity"},":person_rowing_boat_tone2:":{"uc_base":"1f6a3-1f3fc","uc_output":"1f6a3-1f3fc","uc_match":"1f6a3-1f3fc","uc_greedy":"1f6a3-1f3fc","shortnames":[":rowboat_tone2:"],"category":"activity"},":person_rowing_boat_tone3:":{"uc_base":"1f6a3-1f3fd","uc_output":"1f6a3-1f3fd","uc_match":"1f6a3-1f3fd","uc_greedy":"1f6a3-1f3fd","shortnames":[":rowboat_tone3:"],"category":"activity"},":person_rowing_boat_tone4:":{"uc_base":"1f6a3-1f3fe","uc_output":"1f6a3-1f3fe","uc_match":"1f6a3-1f3fe","uc_greedy":"1f6a3-1f3fe","shortnames":[":rowboat_tone4:"],"category":"activity"},":person_rowing_boat_tone5:":{"uc_base":"1f6a3-1f3ff","uc_output":"1f6a3-1f3ff","uc_match":"1f6a3-1f3ff","uc_greedy":"1f6a3-1f3ff","shortnames":[":rowboat_tone5:"],"category":"activity"},":person_running_tone1:":{"uc_base":"1f3c3-1f3fb","uc_output":"1f3c3-1f3fb","uc_match":"1f3c3-1f3fb","uc_greedy":"1f3c3-1f3fb","shortnames":[":runner_tone1:"],"category":"people"},":person_running_tone2:":{"uc_base":"1f3c3-1f3fc","uc_output":"1f3c3-1f3fc","uc_match":"1f3c3-1f3fc","uc_greedy":"1f3c3-1f3fc","shortnames":[":runner_tone2:"],"category":"people"},":person_running_tone3:":{"uc_base":"1f3c3-1f3fd","uc_output":"1f3c3-1f3fd","uc_match":"1f3c3-1f3fd","uc_greedy":"1f3c3-1f3fd","shortnames":[":runner_tone3:"],"category":"people"},":person_running_tone4:":{"uc_base":"1f3c3-1f3fe","uc_output":"1f3c3-1f3fe","uc_match":"1f3c3-1f3fe","uc_greedy":"1f3c3-1f3fe","shortnames":[":runner_tone4:"],"category":"people"},":person_running_tone5:":{"uc_base":"1f3c3-1f3ff","uc_output":"1f3c3-1f3ff","uc_match":"1f3c3-1f3ff","uc_greedy":"1f3c3-1f3ff","shortnames":[":runner_tone5:"],"category":"people"},":person_shrugging_tone1:":{"uc_base":"1f937-1f3fb","uc_output":"1f937-1f3fb","uc_match":"1f937-1f3fb","uc_greedy":"1f937-1f3fb","shortnames":[":shrug_tone1:"],"category":"people"},":person_shrugging_tone2:":{"uc_base":"1f937-1f3fc","uc_output":"1f937-1f3fc","uc_match":"1f937-1f3fc","uc_greedy":"1f937-1f3fc","shortnames":[":shrug_tone2:"],"category":"people"},":person_shrugging_tone3:":{"uc_base":"1f937-1f3fd","uc_output":"1f937-1f3fd","uc_match":"1f937-1f3fd","uc_greedy":"1f937-1f3fd","shortnames":[":shrug_tone3:"],"category":"people"},":person_shrugging_tone4:":{"uc_base":"1f937-1f3fe","uc_output":"1f937-1f3fe","uc_match":"1f937-1f3fe","uc_greedy":"1f937-1f3fe","shortnames":[":shrug_tone4:"],"category":"people"},":person_shrugging_tone5:":{"uc_base":"1f937-1f3ff","uc_output":"1f937-1f3ff","uc_match":"1f937-1f3ff","uc_greedy":"1f937-1f3ff","shortnames":[":shrug_tone5:"],"category":"people"},":person_surfing_tone1:":{"uc_base":"1f3c4-1f3fb","uc_output":"1f3c4-1f3fb","uc_match":"1f3c4-1f3fb","uc_greedy":"1f3c4-1f3fb","shortnames":[":surfer_tone1:"],"category":"activity"},":person_surfing_tone2:":{"uc_base":"1f3c4-1f3fc","uc_output":"1f3c4-1f3fc","uc_match":"1f3c4-1f3fc","uc_greedy":"1f3c4-1f3fc","shortnames":[":surfer_tone2:"],"category":"activity"},":person_surfing_tone3:":{"uc_base":"1f3c4-1f3fd","uc_output":"1f3c4-1f3fd","uc_match":"1f3c4-1f3fd","uc_greedy":"1f3c4-1f3fd","shortnames":[":surfer_tone3:"],"category":"activity"},":person_surfing_tone4:":{"uc_base":"1f3c4-1f3fe","uc_output":"1f3c4-1f3fe","uc_match":"1f3c4-1f3fe","uc_greedy":"1f3c4-1f3fe","shortnames":[":surfer_tone4:"],"category":"activity"},":person_surfing_tone5:":{"uc_base":"1f3c4-1f3ff","uc_output":"1f3c4-1f3ff","uc_match":"1f3c4-1f3ff","uc_greedy":"1f3c4-1f3ff","shortnames":[":surfer_tone5:"],"category":"activity"},":person_swimming_tone1:":{"uc_base":"1f3ca-1f3fb","uc_output":"1f3ca-1f3fb","uc_match":"1f3ca-1f3fb","uc_greedy":"1f3ca-1f3fb","shortnames":[":swimmer_tone1:"],"category":"activity"},":person_swimming_tone2:":{"uc_base":"1f3ca-1f3fc","uc_output":"1f3ca-1f3fc","uc_match":"1f3ca-1f3fc","uc_greedy":"1f3ca-1f3fc","shortnames":[":swimmer_tone2:"],"category":"activity"},":person_swimming_tone3:":{"uc_base":"1f3ca-1f3fd","uc_output":"1f3ca-1f3fd","uc_match":"1f3ca-1f3fd","uc_greedy":"1f3ca-1f3fd","shortnames":[":swimmer_tone3:"],"category":"activity"},":person_swimming_tone4:":{"uc_base":"1f3ca-1f3fe","uc_output":"1f3ca-1f3fe","uc_match":"1f3ca-1f3fe","uc_greedy":"1f3ca-1f3fe","shortnames":[":swimmer_tone4:"],"category":"activity"},":person_swimming_tone5:":{"uc_base":"1f3ca-1f3ff","uc_output":"1f3ca-1f3ff","uc_match":"1f3ca-1f3ff","uc_greedy":"1f3ca-1f3ff","shortnames":[":swimmer_tone5:"],"category":"activity"},":person_tipping_hand_tone1:":{"uc_base":"1f481-1f3fb","uc_output":"1f481-1f3fb","uc_match":"1f481-1f3fb","uc_greedy":"1f481-1f3fb","shortnames":[":information_desk_person_tone1:"],"category":"people"},":person_tipping_hand_tone2:":{"uc_base":"1f481-1f3fc","uc_output":"1f481-1f3fc","uc_match":"1f481-1f3fc","uc_greedy":"1f481-1f3fc","shortnames":[":information_desk_person_tone2:"],"category":"people"},":person_tipping_hand_tone3:":{"uc_base":"1f481-1f3fd","uc_output":"1f481-1f3fd","uc_match":"1f481-1f3fd","uc_greedy":"1f481-1f3fd","shortnames":[":information_desk_person_tone3:"],"category":"people"},":person_tipping_hand_tone4:":{"uc_base":"1f481-1f3fe","uc_output":"1f481-1f3fe","uc_match":"1f481-1f3fe","uc_greedy":"1f481-1f3fe","shortnames":[":information_desk_person_tone4:"],"category":"people"},":person_tipping_hand_tone5:":{"uc_base":"1f481-1f3ff","uc_output":"1f481-1f3ff","uc_match":"1f481-1f3ff","uc_greedy":"1f481-1f3ff","shortnames":[":information_desk_person_tone5:"],"category":"people"},":person_walking_tone1:":{"uc_base":"1f6b6-1f3fb","uc_output":"1f6b6-1f3fb","uc_match":"1f6b6-1f3fb","uc_greedy":"1f6b6-1f3fb","shortnames":[":walking_tone1:"],"category":"people"},":person_walking_tone2:":{"uc_base":"1f6b6-1f3fc","uc_output":"1f6b6-1f3fc","uc_match":"1f6b6-1f3fc","uc_greedy":"1f6b6-1f3fc","shortnames":[":walking_tone2:"],"category":"people"},":person_walking_tone3:":{"uc_base":"1f6b6-1f3fd","uc_output":"1f6b6-1f3fd","uc_match":"1f6b6-1f3fd","uc_greedy":"1f6b6-1f3fd","shortnames":[":walking_tone3:"],"category":"people"},":person_walking_tone4:":{"uc_base":"1f6b6-1f3fe","uc_output":"1f6b6-1f3fe","uc_match":"1f6b6-1f3fe","uc_greedy":"1f6b6-1f3fe","shortnames":[":walking_tone4:"],"category":"people"},":person_walking_tone5:":{"uc_base":"1f6b6-1f3ff","uc_output":"1f6b6-1f3ff","uc_match":"1f6b6-1f3ff","uc_greedy":"1f6b6-1f3ff","shortnames":[":walking_tone5:"],"category":"people"},":person_wearing_turban_tone1:":{"uc_base":"1f473-1f3fb","uc_output":"1f473-1f3fb","uc_match":"1f473-1f3fb","uc_greedy":"1f473-1f3fb","shortnames":[":man_with_turban_tone1:"],"category":"people"},":person_wearing_turban_tone2:":{"uc_base":"1f473-1f3fc","uc_output":"1f473-1f3fc","uc_match":"1f473-1f3fc","uc_greedy":"1f473-1f3fc","shortnames":[":man_with_turban_tone2:"],"category":"people"},":person_wearing_turban_tone3:":{"uc_base":"1f473-1f3fd","uc_output":"1f473-1f3fd","uc_match":"1f473-1f3fd","uc_greedy":"1f473-1f3fd","shortnames":[":man_with_turban_tone3:"],"category":"people"},":person_wearing_turban_tone4:":{"uc_base":"1f473-1f3fe","uc_output":"1f473-1f3fe","uc_match":"1f473-1f3fe","uc_greedy":"1f473-1f3fe","shortnames":[":man_with_turban_tone4:"],"category":"people"},":person_wearing_turban_tone5:":{"uc_base":"1f473-1f3ff","uc_output":"1f473-1f3ff","uc_match":"1f473-1f3ff","uc_greedy":"1f473-1f3ff","shortnames":[":man_with_turban_tone5:"],"category":"people"},":point_down_tone1:":{"uc_base":"1f447-1f3fb","uc_output":"1f447-1f3fb","uc_match":"1f447-1f3fb","uc_greedy":"1f447-1f3fb","shortnames":[],"category":"people"},":point_down_tone2:":{"uc_base":"1f447-1f3fc","uc_output":"1f447-1f3fc","uc_match":"1f447-1f3fc","uc_greedy":"1f447-1f3fc","shortnames":[],"category":"people"},":point_down_tone3:":{"uc_base":"1f447-1f3fd","uc_output":"1f447-1f3fd","uc_match":"1f447-1f3fd","uc_greedy":"1f447-1f3fd","shortnames":[],"category":"people"},":point_down_tone4:":{"uc_base":"1f447-1f3fe","uc_output":"1f447-1f3fe","uc_match":"1f447-1f3fe","uc_greedy":"1f447-1f3fe","shortnames":[],"category":"people"},":point_down_tone5:":{"uc_base":"1f447-1f3ff","uc_output":"1f447-1f3ff","uc_match":"1f447-1f3ff","uc_greedy":"1f447-1f3ff","shortnames":[],"category":"people"},":point_left_tone1:":{"uc_base":"1f448-1f3fb","uc_output":"1f448-1f3fb","uc_match":"1f448-1f3fb","uc_greedy":"1f448-1f3fb","shortnames":[],"category":"people"},":point_left_tone2:":{"uc_base":"1f448-1f3fc","uc_output":"1f448-1f3fc","uc_match":"1f448-1f3fc","uc_greedy":"1f448-1f3fc","shortnames":[],"category":"people"},":point_left_tone3:":{"uc_base":"1f448-1f3fd","uc_output":"1f448-1f3fd","uc_match":"1f448-1f3fd","uc_greedy":"1f448-1f3fd","shortnames":[],"category":"people"},":point_left_tone4:":{"uc_base":"1f448-1f3fe","uc_output":"1f448-1f3fe","uc_match":"1f448-1f3fe","uc_greedy":"1f448-1f3fe","shortnames":[],"category":"people"},":point_left_tone5:":{"uc_base":"1f448-1f3ff","uc_output":"1f448-1f3ff","uc_match":"1f448-1f3ff","uc_greedy":"1f448-1f3ff","shortnames":[],"category":"people"},":point_right_tone1:":{"uc_base":"1f449-1f3fb","uc_output":"1f449-1f3fb","uc_match":"1f449-1f3fb","uc_greedy":"1f449-1f3fb","shortnames":[],"category":"people"},":point_right_tone2:":{"uc_base":"1f449-1f3fc","uc_output":"1f449-1f3fc","uc_match":"1f449-1f3fc","uc_greedy":"1f449-1f3fc","shortnames":[],"category":"people"},":point_right_tone3:":{"uc_base":"1f449-1f3fd","uc_output":"1f449-1f3fd","uc_match":"1f449-1f3fd","uc_greedy":"1f449-1f3fd","shortnames":[],"category":"people"},":point_right_tone4:":{"uc_base":"1f449-1f3fe","uc_output":"1f449-1f3fe","uc_match":"1f449-1f3fe","uc_greedy":"1f449-1f3fe","shortnames":[],"category":"people"},":point_right_tone5:":{"uc_base":"1f449-1f3ff","uc_output":"1f449-1f3ff","uc_match":"1f449-1f3ff","uc_greedy":"1f449-1f3ff","shortnames":[],"category":"people"},":point_up_2_tone1:":{"uc_base":"1f446-1f3fb","uc_output":"1f446-1f3fb","uc_match":"1f446-1f3fb","uc_greedy":"1f446-1f3fb","shortnames":[],"category":"people"},":point_up_2_tone2:":{"uc_base":"1f446-1f3fc","uc_output":"1f446-1f3fc","uc_match":"1f446-1f3fc","uc_greedy":"1f446-1f3fc","shortnames":[],"category":"people"},":point_up_2_tone3:":{"uc_base":"1f446-1f3fd","uc_output":"1f446-1f3fd","uc_match":"1f446-1f3fd","uc_greedy":"1f446-1f3fd","shortnames":[],"category":"people"},":point_up_2_tone4:":{"uc_base":"1f446-1f3fe","uc_output":"1f446-1f3fe","uc_match":"1f446-1f3fe","uc_greedy":"1f446-1f3fe","shortnames":[],"category":"people"},":point_up_2_tone5:":{"uc_base":"1f446-1f3ff","uc_output":"1f446-1f3ff","uc_match":"1f446-1f3ff","uc_greedy":"1f446-1f3ff","shortnames":[],"category":"people"},":police_officer_tone1:":{"uc_base":"1f46e-1f3fb","uc_output":"1f46e-1f3fb","uc_match":"1f46e-1f3fb","uc_greedy":"1f46e-1f3fb","shortnames":[":cop_tone1:"],"category":"people"},":police_officer_tone2:":{"uc_base":"1f46e-1f3fc","uc_output":"1f46e-1f3fc","uc_match":"1f46e-1f3fc","uc_greedy":"1f46e-1f3fc","shortnames":[":cop_tone2:"],"category":"people"},":police_officer_tone3:":{"uc_base":"1f46e-1f3fd","uc_output":"1f46e-1f3fd","uc_match":"1f46e-1f3fd","uc_greedy":"1f46e-1f3fd","shortnames":[":cop_tone3:"],"category":"people"},":police_officer_tone4:":{"uc_base":"1f46e-1f3fe","uc_output":"1f46e-1f3fe","uc_match":"1f46e-1f3fe","uc_greedy":"1f46e-1f3fe","shortnames":[":cop_tone4:"],"category":"people"},":police_officer_tone5:":{"uc_base":"1f46e-1f3ff","uc_output":"1f46e-1f3ff","uc_match":"1f46e-1f3ff","uc_greedy":"1f46e-1f3ff","shortnames":[":cop_tone5:"],"category":"people"},":pray_tone1:":{"uc_base":"1f64f-1f3fb","uc_output":"1f64f-1f3fb","uc_match":"1f64f-1f3fb","uc_greedy":"1f64f-1f3fb","shortnames":[],"category":"people"},":pray_tone2:":{"uc_base":"1f64f-1f3fc","uc_output":"1f64f-1f3fc","uc_match":"1f64f-1f3fc","uc_greedy":"1f64f-1f3fc","shortnames":[],"category":"people"},":pray_tone3:":{"uc_base":"1f64f-1f3fd","uc_output":"1f64f-1f3fd","uc_match":"1f64f-1f3fd","uc_greedy":"1f64f-1f3fd","shortnames":[],"category":"people"},":pray_tone4:":{"uc_base":"1f64f-1f3fe","uc_output":"1f64f-1f3fe","uc_match":"1f64f-1f3fe","uc_greedy":"1f64f-1f3fe","shortnames":[],"category":"people"},":pray_tone5:":{"uc_base":"1f64f-1f3ff","uc_output":"1f64f-1f3ff","uc_match":"1f64f-1f3ff","uc_greedy":"1f64f-1f3ff","shortnames":[],"category":"people"},":pregnant_woman_tone1:":{"uc_base":"1f930-1f3fb","uc_output":"1f930-1f3fb","uc_match":"1f930-1f3fb","uc_greedy":"1f930-1f3fb","shortnames":[":expecting_woman_tone1:"],"category":"people"},":pregnant_woman_tone2:":{"uc_base":"1f930-1f3fc","uc_output":"1f930-1f3fc","uc_match":"1f930-1f3fc","uc_greedy":"1f930-1f3fc","shortnames":[":expecting_woman_tone2:"],"category":"people"},":pregnant_woman_tone3:":{"uc_base":"1f930-1f3fd","uc_output":"1f930-1f3fd","uc_match":"1f930-1f3fd","uc_greedy":"1f930-1f3fd","shortnames":[":expecting_woman_tone3:"],"category":"people"},":pregnant_woman_tone4:":{"uc_base":"1f930-1f3fe","uc_output":"1f930-1f3fe","uc_match":"1f930-1f3fe","uc_greedy":"1f930-1f3fe","shortnames":[":expecting_woman_tone4:"],"category":"people"},":pregnant_woman_tone5:":{"uc_base":"1f930-1f3ff","uc_output":"1f930-1f3ff","uc_match":"1f930-1f3ff","uc_greedy":"1f930-1f3ff","shortnames":[":expecting_woman_tone5:"],"category":"people"},":prince_tone1:":{"uc_base":"1f934-1f3fb","uc_output":"1f934-1f3fb","uc_match":"1f934-1f3fb","uc_greedy":"1f934-1f3fb","shortnames":[],"category":"people"},":prince_tone2:":{"uc_base":"1f934-1f3fc","uc_output":"1f934-1f3fc","uc_match":"1f934-1f3fc","uc_greedy":"1f934-1f3fc","shortnames":[],"category":"people"},":prince_tone3:":{"uc_base":"1f934-1f3fd","uc_output":"1f934-1f3fd","uc_match":"1f934-1f3fd","uc_greedy":"1f934-1f3fd","shortnames":[],"category":"people"},":prince_tone4:":{"uc_base":"1f934-1f3fe","uc_output":"1f934-1f3fe","uc_match":"1f934-1f3fe","uc_greedy":"1f934-1f3fe","shortnames":[],"category":"people"},":prince_tone5:":{"uc_base":"1f934-1f3ff","uc_output":"1f934-1f3ff","uc_match":"1f934-1f3ff","uc_greedy":"1f934-1f3ff","shortnames":[],"category":"people"},":princess_tone1:":{"uc_base":"1f478-1f3fb","uc_output":"1f478-1f3fb","uc_match":"1f478-1f3fb","uc_greedy":"1f478-1f3fb","shortnames":[],"category":"people"},":princess_tone2:":{"uc_base":"1f478-1f3fc","uc_output":"1f478-1f3fc","uc_match":"1f478-1f3fc","uc_greedy":"1f478-1f3fc","shortnames":[],"category":"people"},":princess_tone3:":{"uc_base":"1f478-1f3fd","uc_output":"1f478-1f3fd","uc_match":"1f478-1f3fd","uc_greedy":"1f478-1f3fd","shortnames":[],"category":"people"},":princess_tone4:":{"uc_base":"1f478-1f3fe","uc_output":"1f478-1f3fe","uc_match":"1f478-1f3fe","uc_greedy":"1f478-1f3fe","shortnames":[],"category":"people"},":princess_tone5:":{"uc_base":"1f478-1f3ff","uc_output":"1f478-1f3ff","uc_match":"1f478-1f3ff","uc_greedy":"1f478-1f3ff","shortnames":[],"category":"people"},":punch_tone1:":{"uc_base":"1f44a-1f3fb","uc_output":"1f44a-1f3fb","uc_match":"1f44a-1f3fb","uc_greedy":"1f44a-1f3fb","shortnames":[],"category":"people"},":punch_tone2:":{"uc_base":"1f44a-1f3fc","uc_output":"1f44a-1f3fc","uc_match":"1f44a-1f3fc","uc_greedy":"1f44a-1f3fc","shortnames":[],"category":"people"},":punch_tone3:":{"uc_base":"1f44a-1f3fd","uc_output":"1f44a-1f3fd","uc_match":"1f44a-1f3fd","uc_greedy":"1f44a-1f3fd","shortnames":[],"category":"people"},":punch_tone4:":{"uc_base":"1f44a-1f3fe","uc_output":"1f44a-1f3fe","uc_match":"1f44a-1f3fe","uc_greedy":"1f44a-1f3fe","shortnames":[],"category":"people"},":punch_tone5:":{"uc_base":"1f44a-1f3ff","uc_output":"1f44a-1f3ff","uc_match":"1f44a-1f3ff","uc_greedy":"1f44a-1f3ff","shortnames":[],"category":"people"},":raised_back_of_hand_tone1:":{"uc_base":"1f91a-1f3fb","uc_output":"1f91a-1f3fb","uc_match":"1f91a-1f3fb","uc_greedy":"1f91a-1f3fb","shortnames":[":back_of_hand_tone1:"],"category":"people"},":raised_back_of_hand_tone2:":{"uc_base":"1f91a-1f3fc","uc_output":"1f91a-1f3fc","uc_match":"1f91a-1f3fc","uc_greedy":"1f91a-1f3fc","shortnames":[":back_of_hand_tone2:"],"category":"people"},":raised_back_of_hand_tone3:":{"uc_base":"1f91a-1f3fd","uc_output":"1f91a-1f3fd","uc_match":"1f91a-1f3fd","uc_greedy":"1f91a-1f3fd","shortnames":[":back_of_hand_tone3:"],"category":"people"},":raised_back_of_hand_tone4:":{"uc_base":"1f91a-1f3fe","uc_output":"1f91a-1f3fe","uc_match":"1f91a-1f3fe","uc_greedy":"1f91a-1f3fe","shortnames":[":back_of_hand_tone4:"],"category":"people"},":raised_back_of_hand_tone5:":{"uc_base":"1f91a-1f3ff","uc_output":"1f91a-1f3ff","uc_match":"1f91a-1f3ff","uc_greedy":"1f91a-1f3ff","shortnames":[":back_of_hand_tone5:"],"category":"people"},":raised_hands_tone1:":{"uc_base":"1f64c-1f3fb","uc_output":"1f64c-1f3fb","uc_match":"1f64c-1f3fb","uc_greedy":"1f64c-1f3fb","shortnames":[],"category":"people"},":raised_hands_tone2:":{"uc_base":"1f64c-1f3fc","uc_output":"1f64c-1f3fc","uc_match":"1f64c-1f3fc","uc_greedy":"1f64c-1f3fc","shortnames":[],"category":"people"},":raised_hands_tone3:":{"uc_base":"1f64c-1f3fd","uc_output":"1f64c-1f3fd","uc_match":"1f64c-1f3fd","uc_greedy":"1f64c-1f3fd","shortnames":[],"category":"people"},":raised_hands_tone4:":{"uc_base":"1f64c-1f3fe","uc_output":"1f64c-1f3fe","uc_match":"1f64c-1f3fe","uc_greedy":"1f64c-1f3fe","shortnames":[],"category":"people"},":raised_hands_tone5:":{"uc_base":"1f64c-1f3ff","uc_output":"1f64c-1f3ff","uc_match":"1f64c-1f3ff","uc_greedy":"1f64c-1f3ff","shortnames":[],"category":"people"},":right_facing_fist_tone1:":{"uc_base":"1f91c-1f3fb","uc_output":"1f91c-1f3fb","uc_match":"1f91c-1f3fb","uc_greedy":"1f91c-1f3fb","shortnames":[":right_fist_tone1:"],"category":"people"},":right_facing_fist_tone2:":{"uc_base":"1f91c-1f3fc","uc_output":"1f91c-1f3fc","uc_match":"1f91c-1f3fc","uc_greedy":"1f91c-1f3fc","shortnames":[":right_fist_tone2:"],"category":"people"},":right_facing_fist_tone3:":{"uc_base":"1f91c-1f3fd","uc_output":"1f91c-1f3fd","uc_match":"1f91c-1f3fd","uc_greedy":"1f91c-1f3fd","shortnames":[":right_fist_tone3:"],"category":"people"},":right_facing_fist_tone4:":{"uc_base":"1f91c-1f3fe","uc_output":"1f91c-1f3fe","uc_match":"1f91c-1f3fe","uc_greedy":"1f91c-1f3fe","shortnames":[":right_fist_tone4:"],"category":"people"},":right_facing_fist_tone5:":{"uc_base":"1f91c-1f3ff","uc_output":"1f91c-1f3ff","uc_match":"1f91c-1f3ff","uc_greedy":"1f91c-1f3ff","shortnames":[":right_fist_tone5:"],"category":"people"},":santa_tone1:":{"uc_base":"1f385-1f3fb","uc_output":"1f385-1f3fb","uc_match":"1f385-1f3fb","uc_greedy":"1f385-1f3fb","shortnames":[],"category":"people"},":santa_tone2:":{"uc_base":"1f385-1f3fc","uc_output":"1f385-1f3fc","uc_match":"1f385-1f3fc","uc_greedy":"1f385-1f3fc","shortnames":[],"category":"people"},":santa_tone3:":{"uc_base":"1f385-1f3fd","uc_output":"1f385-1f3fd","uc_match":"1f385-1f3fd","uc_greedy":"1f385-1f3fd","shortnames":[],"category":"people"},":santa_tone4:":{"uc_base":"1f385-1f3fe","uc_output":"1f385-1f3fe","uc_match":"1f385-1f3fe","uc_greedy":"1f385-1f3fe","shortnames":[],"category":"people"},":santa_tone5:":{"uc_base":"1f385-1f3ff","uc_output":"1f385-1f3ff","uc_match":"1f385-1f3ff","uc_greedy":"1f385-1f3ff","shortnames":[],"category":"people"},":selfie_tone1:":{"uc_base":"1f933-1f3fb","uc_output":"1f933-1f3fb","uc_match":"1f933-1f3fb","uc_greedy":"1f933-1f3fb","shortnames":[],"category":"people"},":selfie_tone2:":{"uc_base":"1f933-1f3fc","uc_output":"1f933-1f3fc","uc_match":"1f933-1f3fc","uc_greedy":"1f933-1f3fc","shortnames":[],"category":"people"},":selfie_tone3:":{"uc_base":"1f933-1f3fd","uc_output":"1f933-1f3fd","uc_match":"1f933-1f3fd","uc_greedy":"1f933-1f3fd","shortnames":[],"category":"people"},":selfie_tone4:":{"uc_base":"1f933-1f3fe","uc_output":"1f933-1f3fe","uc_match":"1f933-1f3fe","uc_greedy":"1f933-1f3fe","shortnames":[],"category":"people"},":selfie_tone5:":{"uc_base":"1f933-1f3ff","uc_output":"1f933-1f3ff","uc_match":"1f933-1f3ff","uc_greedy":"1f933-1f3ff","shortnames":[],"category":"people"},":snowboarder_tone1:":{"uc_base":"1f3c2-1f3fb","uc_output":"1f3c2-1f3fb","uc_match":"1f3c2-1f3fb","uc_greedy":"1f3c2-1f3fb","shortnames":[":snowboarder_light_skin_tone:"],"category":"activity"},":snowboarder_tone2:":{"uc_base":"1f3c2-1f3fc","uc_output":"1f3c2-1f3fc","uc_match":"1f3c2-1f3fc","uc_greedy":"1f3c2-1f3fc","shortnames":[":snowboarder_medium_light_skin_tone:"],"category":"activity"},":snowboarder_tone3:":{"uc_base":"1f3c2-1f3fd","uc_output":"1f3c2-1f3fd","uc_match":"1f3c2-1f3fd","uc_greedy":"1f3c2-1f3fd","shortnames":[":snowboarder_medium_skin_tone:"],"category":"activity"},":snowboarder_tone4:":{"uc_base":"1f3c2-1f3fe","uc_output":"1f3c2-1f3fe","uc_match":"1f3c2-1f3fe","uc_greedy":"1f3c2-1f3fe","shortnames":[":snowboarder_medium_dark_skin_tone:"],"category":"activity"},":snowboarder_tone5:":{"uc_base":"1f3c2-1f3ff","uc_output":"1f3c2-1f3ff","uc_match":"1f3c2-1f3ff","uc_greedy":"1f3c2-1f3ff","shortnames":[":snowboarder_dark_skin_tone:"],"category":"activity"},":thumbsdown_tone1:":{"uc_base":"1f44e-1f3fb","uc_output":"1f44e-1f3fb","uc_match":"1f44e-1f3fb","uc_greedy":"1f44e-1f3fb","shortnames":[":-1_tone1:",":thumbdown_tone1:"],"category":"people"},":thumbsdown_tone2:":{"uc_base":"1f44e-1f3fc","uc_output":"1f44e-1f3fc","uc_match":"1f44e-1f3fc","uc_greedy":"1f44e-1f3fc","shortnames":[":-1_tone2:",":thumbdown_tone2:"],"category":"people"},":thumbsdown_tone3:":{"uc_base":"1f44e-1f3fd","uc_output":"1f44e-1f3fd","uc_match":"1f44e-1f3fd","uc_greedy":"1f44e-1f3fd","shortnames":[":-1_tone3:",":thumbdown_tone3:"],"category":"people"},":thumbsdown_tone4:":{"uc_base":"1f44e-1f3fe","uc_output":"1f44e-1f3fe","uc_match":"1f44e-1f3fe","uc_greedy":"1f44e-1f3fe","shortnames":[":-1_tone4:",":thumbdown_tone4:"],"category":"people"},":thumbsdown_tone5:":{"uc_base":"1f44e-1f3ff","uc_output":"1f44e-1f3ff","uc_match":"1f44e-1f3ff","uc_greedy":"1f44e-1f3ff","shortnames":[":-1_tone5:",":thumbdown_tone5:"],"category":"people"},":thumbsup_tone1:":{"uc_base":"1f44d-1f3fb","uc_output":"1f44d-1f3fb","uc_match":"1f44d-1f3fb","uc_greedy":"1f44d-1f3fb","shortnames":[":+1_tone1:",":thumbup_tone1:"],"category":"people"},":thumbsup_tone2:":{"uc_base":"1f44d-1f3fc","uc_output":"1f44d-1f3fc","uc_match":"1f44d-1f3fc","uc_greedy":"1f44d-1f3fc","shortnames":[":+1_tone2:",":thumbup_tone2:"],"category":"people"},":thumbsup_tone3:":{"uc_base":"1f44d-1f3fd","uc_output":"1f44d-1f3fd","uc_match":"1f44d-1f3fd","uc_greedy":"1f44d-1f3fd","shortnames":[":+1_tone3:",":thumbup_tone3:"],"category":"people"},":thumbsup_tone4:":{"uc_base":"1f44d-1f3fe","uc_output":"1f44d-1f3fe","uc_match":"1f44d-1f3fe","uc_greedy":"1f44d-1f3fe","shortnames":[":+1_tone4:",":thumbup_tone4:"],"category":"people"},":thumbsup_tone5:":{"uc_base":"1f44d-1f3ff","uc_output":"1f44d-1f3ff","uc_match":"1f44d-1f3ff","uc_greedy":"1f44d-1f3ff","shortnames":[":+1_tone5:",":thumbup_tone5:"],"category":"people"},":united_nations:":{"uc_base":"1f1fa-1f1f3","uc_output":"1f1fa-1f1f3","uc_match":"1f1fa-1f1f3","uc_greedy":"1f1fa-1f1f3","shortnames":[],"category":"flags"},":vampire_tone1:":{"uc_base":"1f9db-1f3fb","uc_output":"1f9db-1f3fb","uc_match":"1f9db-1f3fb","uc_greedy":"1f9db-1f3fb","shortnames":[":vampire_light_skin_tone:"],"category":"people"},":vampire_tone2:":{"uc_base":"1f9db-1f3fc","uc_output":"1f9db-1f3fc","uc_match":"1f9db-1f3fc","uc_greedy":"1f9db-1f3fc","shortnames":[":vampire_medium_light_skin_tone:"],"category":"people"},":vampire_tone3:":{"uc_base":"1f9db-1f3fd","uc_output":"1f9db-1f3fd","uc_match":"1f9db-1f3fd","uc_greedy":"1f9db-1f3fd","shortnames":[":vampire_medium_skin_tone:"],"category":"people"},":vampire_tone4:":{"uc_base":"1f9db-1f3fe","uc_output":"1f9db-1f3fe","uc_match":"1f9db-1f3fe","uc_greedy":"1f9db-1f3fe","shortnames":[":vampire_medium_dark_skin_tone:"],"category":"people"},":vampire_tone5:":{"uc_base":"1f9db-1f3ff","uc_output":"1f9db-1f3ff","uc_match":"1f9db-1f3ff","uc_greedy":"1f9db-1f3ff","shortnames":[":vampire_dark_skin_tone:"],"category":"people"},":vulcan_tone1:":{"uc_base":"1f596-1f3fb","uc_output":"1f596-1f3fb","uc_match":"1f596-1f3fb","uc_greedy":"1f596-1f3fb","shortnames":[":raised_hand_with_part_between_middle_and_ring_fingers_tone1:"],"category":"people"},":vulcan_tone2:":{"uc_base":"1f596-1f3fc","uc_output":"1f596-1f3fc","uc_match":"1f596-1f3fc","uc_greedy":"1f596-1f3fc","shortnames":[":raised_hand_with_part_between_middle_and_ring_fingers_tone2:"],"category":"people"},":vulcan_tone3:":{"uc_base":"1f596-1f3fd","uc_output":"1f596-1f3fd","uc_match":"1f596-1f3fd","uc_greedy":"1f596-1f3fd","shortnames":[":raised_hand_with_part_between_middle_and_ring_fingers_tone3:"],"category":"people"},":vulcan_tone4:":{"uc_base":"1f596-1f3fe","uc_output":"1f596-1f3fe","uc_match":"1f596-1f3fe","uc_greedy":"1f596-1f3fe","shortnames":[":raised_hand_with_part_between_middle_and_ring_fingers_tone4:"],"category":"people"},":vulcan_tone5:":{"uc_base":"1f596-1f3ff","uc_output":"1f596-1f3ff","uc_match":"1f596-1f3ff","uc_greedy":"1f596-1f3ff","shortnames":[":raised_hand_with_part_between_middle_and_ring_fingers_tone5:"],"category":"people"},":wave_tone1:":{"uc_base":"1f44b-1f3fb","uc_output":"1f44b-1f3fb","uc_match":"1f44b-1f3fb","uc_greedy":"1f44b-1f3fb","shortnames":[],"category":"people"},":wave_tone2:":{"uc_base":"1f44b-1f3fc","uc_output":"1f44b-1f3fc","uc_match":"1f44b-1f3fc","uc_greedy":"1f44b-1f3fc","shortnames":[],"category":"people"},":wave_tone3:":{"uc_base":"1f44b-1f3fd","uc_output":"1f44b-1f3fd","uc_match":"1f44b-1f3fd","uc_greedy":"1f44b-1f3fd","shortnames":[],"category":"people"},":wave_tone4:":{"uc_base":"1f44b-1f3fe","uc_output":"1f44b-1f3fe","uc_match":"1f44b-1f3fe","uc_greedy":"1f44b-1f3fe","shortnames":[],"category":"people"},":wave_tone5:":{"uc_base":"1f44b-1f3ff","uc_output":"1f44b-1f3ff","uc_match":"1f44b-1f3ff","uc_greedy":"1f44b-1f3ff","shortnames":[],"category":"people"},":woman_tone1:":{"uc_base":"1f469-1f3fb","uc_output":"1f469-1f3fb","uc_match":"1f469-1f3fb","uc_greedy":"1f469-1f3fb","shortnames":[],"category":"people"},":woman_tone2:":{"uc_base":"1f469-1f3fc","uc_output":"1f469-1f3fc","uc_match":"1f469-1f3fc","uc_greedy":"1f469-1f3fc","shortnames":[],"category":"people"},":woman_tone3:":{"uc_base":"1f469-1f3fd","uc_output":"1f469-1f3fd","uc_match":"1f469-1f3fd","uc_greedy":"1f469-1f3fd","shortnames":[],"category":"people"},":woman_tone4:":{"uc_base":"1f469-1f3fe","uc_output":"1f469-1f3fe","uc_match":"1f469-1f3fe","uc_greedy":"1f469-1f3fe","shortnames":[],"category":"people"},":woman_tone5:":{"uc_base":"1f469-1f3ff","uc_output":"1f469-1f3ff","uc_match":"1f469-1f3ff","uc_greedy":"1f469-1f3ff","shortnames":[],"category":"people"},":woman_with_headscarf_tone1:":{"uc_base":"1f9d5-1f3fb","uc_output":"1f9d5-1f3fb","uc_match":"1f9d5-1f3fb","uc_greedy":"1f9d5-1f3fb","shortnames":[":woman_with_headscarf_light_skin_tone:"],"category":"people"},":woman_with_headscarf_tone2:":{"uc_base":"1f9d5-1f3fc","uc_output":"1f9d5-1f3fc","uc_match":"1f9d5-1f3fc","uc_greedy":"1f9d5-1f3fc","shortnames":[":woman_with_headscarf_medium_light_skin_tone:"],"category":"people"},":woman_with_headscarf_tone3:":{"uc_base":"1f9d5-1f3fd","uc_output":"1f9d5-1f3fd","uc_match":"1f9d5-1f3fd","uc_greedy":"1f9d5-1f3fd","shortnames":[":woman_with_headscarf_medium_skin_tone:"],"category":"people"},":woman_with_headscarf_tone4:":{"uc_base":"1f9d5-1f3fe","uc_output":"1f9d5-1f3fe","uc_match":"1f9d5-1f3fe","uc_greedy":"1f9d5-1f3fe","shortnames":[":woman_with_headscarf_medium_dark_skin_tone:"],"category":"people"},":woman_with_headscarf_tone5:":{"uc_base":"1f9d5-1f3ff","uc_output":"1f9d5-1f3ff","uc_match":"1f9d5-1f3ff","uc_greedy":"1f9d5-1f3ff","shortnames":[":woman_with_headscarf_dark_skin_tone:"],"category":"people"},":a:":{"uc_base":"1f170","uc_output":"1f170-fe0f","uc_match":"1f170-fe0f","uc_greedy":"1f170","shortnames":[],"category":"symbols"},":airplane_small:":{"uc_base":"1f6e9","uc_output":"1f6e9-fe0f","uc_match":"1f6e9-fe0f","uc_greedy":"1f6e9","shortnames":[":small_airplane:"],"category":"travel"},":anger_right:":{"uc_base":"1f5ef","uc_output":"1f5ef-fe0f","uc_match":"1f5ef-fe0f","uc_greedy":"1f5ef","shortnames":[":right_anger_bubble:"],"category":"symbols"},":b:":{"uc_base":"1f171","uc_output":"1f171-fe0f","uc_match":"1f171-fe0f","uc_greedy":"1f171","shortnames":[],"category":"symbols"},":ballot_box:":{"uc_base":"1f5f3","uc_output":"1f5f3-fe0f","uc_match":"1f5f3-fe0f","uc_greedy":"1f5f3","shortnames":[":ballot_box_with_ballot:"],"category":"objects"},":beach:":{"uc_base":"1f3d6","uc_output":"1f3d6-fe0f","uc_match":"1f3d6-fe0f","uc_greedy":"1f3d6","shortnames":[":beach_with_umbrella:"],"category":"travel"},":bed:":{"uc_base":"1f6cf","uc_output":"1f6cf-fe0f","uc_match":"1f6cf-fe0f","uc_greedy":"1f6cf","shortnames":[],"category":"objects"},":bellhop:":{"uc_base":"1f6ce","uc_output":"1f6ce-fe0f","uc_match":"1f6ce-fe0f","uc_greedy":"1f6ce","shortnames":[":bellhop_bell:"],"category":"objects"},":calendar_spiral:":{"uc_base":"1f5d3","uc_output":"1f5d3-fe0f","uc_match":"1f5d3-fe0f","uc_greedy":"1f5d3","shortnames":[":spiral_calendar_pad:"],"category":"objects"},":camping:":{"uc_base":"1f3d5","uc_output":"1f3d5-fe0f","uc_match":"1f3d5-fe0f","uc_greedy":"1f3d5","shortnames":[],"category":"travel"},":candle:":{"uc_base":"1f56f","uc_output":"1f56f-fe0f","uc_match":"1f56f-fe0f","uc_greedy":"1f56f","shortnames":[],"category":"objects"},":card_box:":{"uc_base":"1f5c3","uc_output":"1f5c3-fe0f","uc_match":"1f5c3-fe0f","uc_greedy":"1f5c3","shortnames":[":card_file_box:"],"category":"objects"},":chipmunk:":{"uc_base":"1f43f","uc_output":"1f43f-fe0f","uc_match":"1f43f-fe0f","uc_greedy":"1f43f","shortnames":[],"category":"nature"},":cityscape:":{"uc_base":"1f3d9","uc_output":"1f3d9-fe0f","uc_match":"1f3d9-fe0f","uc_greedy":"1f3d9","shortnames":[],"category":"travel"},":classical_building:":{"uc_base":"1f3db","uc_output":"1f3db-fe0f","uc_match":"1f3db-fe0f","uc_greedy":"1f3db","shortnames":[],"category":"travel"},":clock:":{"uc_base":"1f570","uc_output":"1f570-fe0f","uc_match":"1f570-fe0f","uc_greedy":"1f570","shortnames":[":mantlepiece_clock:"],"category":"objects"},":cloud_lightning:":{"uc_base":"1f329","uc_output":"1f329-fe0f","uc_match":"1f329-fe0f","uc_greedy":"1f329","shortnames":[":cloud_with_lightning:"],"category":"nature"},":cloud_rain:":{"uc_base":"1f327","uc_output":"1f327-fe0f","uc_match":"1f327-fe0f","uc_greedy":"1f327","shortnames":[":cloud_with_rain:"],"category":"nature"},":cloud_snow:":{"uc_base":"1f328","uc_output":"1f328-fe0f","uc_match":"1f328-fe0f","uc_greedy":"1f328","shortnames":[":cloud_with_snow:"],"category":"nature"},":cloud_tornado:":{"uc_base":"1f32a","uc_output":"1f32a-fe0f","uc_match":"1f32a-fe0f","uc_greedy":"1f32a","shortnames":[":cloud_with_tornado:"],"category":"nature"},":compression:":{"uc_base":"1f5dc","uc_output":"1f5dc-fe0f","uc_match":"1f5dc-fe0f","uc_greedy":"1f5dc","shortnames":[],"category":"objects"},":construction_site:":{"uc_base":"1f3d7","uc_output":"1f3d7-fe0f","uc_match":"1f3d7-fe0f","uc_greedy":"1f3d7","shortnames":[":building_construction:"],"category":"travel"},":control_knobs:":{"uc_base":"1f39b","uc_output":"1f39b-fe0f","uc_match":"1f39b-fe0f","uc_greedy":"1f39b","shortnames":[],"category":"objects"},":couch:":{"uc_base":"1f6cb","uc_output":"1f6cb-fe0f","uc_match":"1f6cb-fe0f","uc_greedy":"1f6cb","shortnames":[":couch_and_lamp:"],"category":"objects"},":crayon:":{"uc_base":"1f58d","uc_output":"1f58d-fe0f","uc_match":"1f58d-fe0f","uc_greedy":"1f58d","shortnames":[":lower_left_crayon:"],"category":"objects"},":cruise_ship:":{"uc_base":"1f6f3","uc_output":"1f6f3-fe0f","uc_match":"1f6f3-fe0f","uc_greedy":"1f6f3","shortnames":[":passenger_ship:"],"category":"travel"},":dagger:":{"uc_base":"1f5e1","uc_output":"1f5e1-fe0f","uc_match":"1f5e1-fe0f","uc_greedy":"1f5e1","shortnames":[":dagger_knife:"],"category":"objects"},":dark_sunglasses:":{"uc_base":"1f576","uc_output":"1f576-fe0f","uc_match":"1f576-fe0f","uc_greedy":"1f576","shortnames":[],"category":"people"},":desert:":{"uc_base":"1f3dc","uc_output":"1f3dc-fe0f","uc_match":"1f3dc-fe0f","uc_greedy":"1f3dc","shortnames":[],"category":"travel"},":desktop:":{"uc_base":"1f5a5","uc_output":"1f5a5-fe0f","uc_match":"1f5a5-fe0f","uc_greedy":"1f5a5","shortnames":[":desktop_computer:"],"category":"objects"},":detective:":{"uc_base":"1f575","uc_output":"1f575-fe0f","uc_match":"1f575-fe0f","uc_greedy":"1f575","shortnames":[":spy:",":sleuth_or_spy:"],"category":"people"},":dividers:":{"uc_base":"1f5c2","uc_output":"1f5c2-fe0f","uc_match":"1f5c2-fe0f","uc_greedy":"1f5c2","shortnames":[":card_index_dividers:"],"category":"objects"},":dove:":{"uc_base":"1f54a","uc_output":"1f54a-fe0f","uc_match":"1f54a-fe0f","uc_greedy":"1f54a","shortnames":[":dove_of_peace:"],"category":"nature"},":eye:":{"uc_base":"1f441","uc_output":"1f441-fe0f","uc_match":"1f441-fe0f","uc_greedy":"1f441","shortnames":[],"category":"people"},":file_cabinet:":{"uc_base":"1f5c4","uc_output":"1f5c4-fe0f","uc_match":"1f5c4-fe0f","uc_greedy":"1f5c4","shortnames":[],"category":"objects"},":film_frames:":{"uc_base":"1f39e","uc_output":"1f39e-fe0f","uc_match":"1f39e-fe0f","uc_greedy":"1f39e","shortnames":[],"category":"objects"},":fist_tone1:":{"uc_base":"270a-1f3fb","uc_output":"270a-1f3fb","uc_match":"270a-1f3fb","uc_greedy":"270a-1f3fb","shortnames":[],"category":"people"},":fist_tone2:":{"uc_base":"270a-1f3fc","uc_output":"270a-1f3fc","uc_match":"270a-1f3fc","uc_greedy":"270a-1f3fc","shortnames":[],"category":"people"},":fist_tone3:":{"uc_base":"270a-1f3fd","uc_output":"270a-1f3fd","uc_match":"270a-1f3fd","uc_greedy":"270a-1f3fd","shortnames":[],"category":"people"},":fist_tone4:":{"uc_base":"270a-1f3fe","uc_output":"270a-1f3fe","uc_match":"270a-1f3fe","uc_greedy":"270a-1f3fe","shortnames":[],"category":"people"},":fist_tone5:":{"uc_base":"270a-1f3ff","uc_output":"270a-1f3ff","uc_match":"270a-1f3ff","uc_greedy":"270a-1f3ff","shortnames":[],"category":"people"},":flag_white:":{"uc_base":"1f3f3","uc_output":"1f3f3-fe0f","uc_match":"1f3f3-fe0f","uc_greedy":"1f3f3","shortnames":[":waving_white_flag:"],"category":"flags"},":fog:":{"uc_base":"1f32b","uc_output":"1f32b-fe0f","uc_match":"1f32b-fe0f","uc_greedy":"1f32b","shortnames":[],"category":"nature"},":fork_knife_plate:":{"uc_base":"1f37d","uc_output":"1f37d-fe0f","uc_match":"1f37d-fe0f","uc_greedy":"1f37d","shortnames":[":fork_and_knife_with_plate:"],"category":"food"},":frame_photo:":{"uc_base":"1f5bc","uc_output":"1f5bc-fe0f","uc_match":"1f5bc-fe0f","uc_greedy":"1f5bc","shortnames":[":frame_with_picture:"],"category":"objects"},":hand_splayed:":{"uc_base":"1f590","uc_output":"1f590-fe0f","uc_match":"1f590-fe0f","uc_greedy":"1f590","shortnames":[":raised_hand_with_fingers_splayed:"],"category":"people"},":hole:":{"uc_base":"1f573","uc_output":"1f573-fe0f","uc_match":"1f573-fe0f","uc_greedy":"1f573","shortnames":[],"category":"objects"},":homes:":{"uc_base":"1f3d8","uc_output":"1f3d8-fe0f","uc_match":"1f3d8-fe0f","uc_greedy":"1f3d8","shortnames":[":house_buildings:"],"category":"travel"},":hot_pepper:":{"uc_base":"1f336","uc_output":"1f336-fe0f","uc_match":"1f336-fe0f","uc_greedy":"1f336","shortnames":[],"category":"food"},":house_abandoned:":{"uc_base":"1f3da","uc_output":"1f3da-fe0f","uc_match":"1f3da-fe0f","uc_greedy":"1f3da","shortnames":[":derelict_house_building:"],"category":"travel"},":island:":{"uc_base":"1f3dd","uc_output":"1f3dd-fe0f","uc_match":"1f3dd-fe0f","uc_greedy":"1f3dd","shortnames":[":desert_island:"],"category":"travel"},":joystick:":{"uc_base":"1f579","uc_output":"1f579-fe0f","uc_match":"1f579-fe0f","uc_greedy":"1f579","shortnames":[],"category":"objects"},":key2:":{"uc_base":"1f5dd","uc_output":"1f5dd-fe0f","uc_match":"1f5dd-fe0f","uc_greedy":"1f5dd","shortnames":[":old_key:"],"category":"objects"},":label:":{"uc_base":"1f3f7","uc_output":"1f3f7-fe0f","uc_match":"1f3f7-fe0f","uc_greedy":"1f3f7","shortnames":[],"category":"objects"},":level_slider:":{"uc_base":"1f39a","uc_output":"1f39a-fe0f","uc_match":"1f39a-fe0f","uc_greedy":"1f39a","shortnames":[],"category":"objects"},":man_in_business_suit_levitating:":{"uc_base":"1f574","uc_output":"1f574-fe0f","uc_match":"1f574-fe0f","uc_greedy":"1f574","shortnames":[],"category":"people"},":map:":{"uc_base":"1f5fa","uc_output":"1f5fa-fe0f","uc_match":"1f5fa-fe0f","uc_greedy":"1f5fa","shortnames":[":world_map:"],"category":"travel"},":microphone2:":{"uc_base":"1f399","uc_output":"1f399-fe0f","uc_match":"1f399-fe0f","uc_greedy":"1f399","shortnames":[":studio_microphone:"],"category":"objects"},":military_medal:":{"uc_base":"1f396","uc_output":"1f396-fe0f","uc_match":"1f396-fe0f","uc_greedy":"1f396","shortnames":[],"category":"activity"},":motorboat:":{"uc_base":"1f6e5","uc_output":"1f6e5-fe0f","uc_match":"1f6e5-fe0f","uc_greedy":"1f6e5","shortnames":[],"category":"travel"},":motorcycle:":{"uc_base":"1f3cd","uc_output":"1f3cd-fe0f","uc_match":"1f3cd-fe0f","uc_greedy":"1f3cd","shortnames":[":racing_motorcycle:"],"category":"travel"},":motorway:":{"uc_base":"1f6e3","uc_output":"1f6e3-fe0f","uc_match":"1f6e3-fe0f","uc_greedy":"1f6e3","shortnames":[],"category":"travel"},":mountain_snow:":{"uc_base":"1f3d4","uc_output":"1f3d4-fe0f","uc_match":"1f3d4-fe0f","uc_greedy":"1f3d4","shortnames":[":snow_capped_mountain:"],"category":"travel"},":mouse_three_button:":{"uc_base":"1f5b1","uc_output":"1f5b1-fe0f","uc_match":"1f5b1-fe0f","uc_greedy":"1f5b1","shortnames":[":three_button_mouse:"],"category":"objects"},":newspaper2:":{"uc_base":"1f5de","uc_output":"1f5de-fe0f","uc_match":"1f5de-fe0f","uc_greedy":"1f5de","shortnames":[":rolled_up_newspaper:"],"category":"objects"},":notepad_spiral:":{"uc_base":"1f5d2","uc_output":"1f5d2-fe0f","uc_match":"1f5d2-fe0f","uc_greedy":"1f5d2","shortnames":[":spiral_note_pad:"],"category":"objects"},":o2:":{"uc_base":"1f17e","uc_output":"1f17e-fe0f","uc_match":"1f17e-fe0f","uc_greedy":"1f17e","shortnames":[],"category":"symbols"},":oil:":{"uc_base":"1f6e2","uc_output":"1f6e2-fe0f","uc_match":"1f6e2-fe0f","uc_greedy":"1f6e2","shortnames":[":oil_drum:"],"category":"objects"},":om_symbol:":{"uc_base":"1f549","uc_output":"1f549-fe0f","uc_match":"1f549-fe0f","uc_greedy":"1f549","shortnames":[],"category":"symbols"},":paintbrush:":{"uc_base":"1f58c","uc_output":"1f58c-fe0f","uc_match":"1f58c-fe0f","uc_greedy":"1f58c","shortnames":[":lower_left_paintbrush:"],"category":"objects"},":paperclips:":{"uc_base":"1f587","uc_output":"1f587-fe0f","uc_match":"1f587-fe0f","uc_greedy":"1f587","shortnames":[":linked_paperclips:"],"category":"objects"},":park:":{"uc_base":"1f3de","uc_output":"1f3de-fe0f","uc_match":"1f3de-fe0f","uc_greedy":"1f3de","shortnames":[":national_park:"],"category":"travel"},":parking:":{"uc_base":"1f17f","uc_output":"1f17f-fe0f","uc_match":"1f17f-fe0f","uc_greedy":"1f17f","shortnames":[],"category":"symbols"},":pen_ballpoint:":{"uc_base":"1f58a","uc_output":"1f58a-fe0f","uc_match":"1f58a-fe0f","uc_greedy":"1f58a","shortnames":[":lower_left_ballpoint_pen:"],"category":"objects"},":pen_fountain:":{"uc_base":"1f58b","uc_output":"1f58b-fe0f","uc_match":"1f58b-fe0f","uc_greedy":"1f58b","shortnames":[":lower_left_fountain_pen:"],"category":"objects"},":person_bouncing_ball_tone1:":{"uc_base":"26f9-1f3fb","uc_output":"26f9-1f3fb","uc_match":"26f9-fe0f-1f3fb","uc_greedy":"26f9-fe0f-1f3fb","shortnames":[":basketball_player_tone1:",":person_with_ball_tone1:"],"category":"activity"},":person_bouncing_ball_tone2:":{"uc_base":"26f9-1f3fc","uc_output":"26f9-1f3fc","uc_match":"26f9-fe0f-1f3fc","uc_greedy":"26f9-fe0f-1f3fc","shortnames":[":basketball_player_tone2:",":person_with_ball_tone2:"],"category":"activity"},":person_bouncing_ball_tone3:":{"uc_base":"26f9-1f3fd","uc_output":"26f9-1f3fd","uc_match":"26f9-fe0f-1f3fd","uc_greedy":"26f9-fe0f-1f3fd","shortnames":[":basketball_player_tone3:",":person_with_ball_tone3:"],"category":"activity"},":person_bouncing_ball_tone4:":{"uc_base":"26f9-1f3fe","uc_output":"26f9-1f3fe","uc_match":"26f9-fe0f-1f3fe","uc_greedy":"26f9-fe0f-1f3fe","shortnames":[":basketball_player_tone4:",":person_with_ball_tone4:"],"category":"activity"},":person_bouncing_ball_tone5:":{"uc_base":"26f9-1f3ff","uc_output":"26f9-1f3ff","uc_match":"26f9-fe0f-1f3ff","uc_greedy":"26f9-fe0f-1f3ff","shortnames":[":basketball_player_tone5:",":person_with_ball_tone5:"],"category":"activity"},":person_golfing:":{"uc_base":"1f3cc","uc_output":"1f3cc-fe0f","uc_match":"1f3cc-fe0f","uc_greedy":"1f3cc","shortnames":[":golfer:"],"category":"activity"},":person_lifting_weights:":{"uc_base":"1f3cb","uc_output":"1f3cb-fe0f","uc_match":"1f3cb-fe0f","uc_greedy":"1f3cb","shortnames":[":lifter:",":weight_lifter:"],"category":"activity"},":point_up_tone1:":{"uc_base":"261d-1f3fb","uc_output":"261d-1f3fb","uc_match":"261d-fe0f-1f3fb","uc_greedy":"261d-fe0f-1f3fb","shortnames":[],"category":"people"},":point_up_tone2:":{"uc_base":"261d-1f3fc","uc_output":"261d-1f3fc","uc_match":"261d-fe0f-1f3fc","uc_greedy":"261d-fe0f-1f3fc","shortnames":[],"category":"people"},":point_up_tone3:":{"uc_base":"261d-1f3fd","uc_output":"261d-1f3fd","uc_match":"261d-fe0f-1f3fd","uc_greedy":"261d-fe0f-1f3fd","shortnames":[],"category":"people"},":point_up_tone4:":{"uc_base":"261d-1f3fe","uc_output":"261d-1f3fe","uc_match":"261d-fe0f-1f3fe","uc_greedy":"261d-fe0f-1f3fe","shortnames":[],"category":"people"},":point_up_tone5:":{"uc_base":"261d-1f3ff","uc_output":"261d-1f3ff","uc_match":"261d-fe0f-1f3ff","uc_greedy":"261d-fe0f-1f3ff","shortnames":[],"category":"people"},":printer:":{"uc_base":"1f5a8","uc_output":"1f5a8-fe0f","uc_match":"1f5a8-fe0f","uc_greedy":"1f5a8","shortnames":[],"category":"objects"},":projector:":{"uc_base":"1f4fd","uc_output":"1f4fd-fe0f","uc_match":"1f4fd-fe0f","uc_greedy":"1f4fd","shortnames":[":film_projector:"],"category":"objects"},":race_car:":{"uc_base":"1f3ce","uc_output":"1f3ce-fe0f","uc_match":"1f3ce-fe0f","uc_greedy":"1f3ce","shortnames":[":racing_car:"],"category":"travel"},":railway_track:":{"uc_base":"1f6e4","uc_output":"1f6e4-fe0f","uc_match":"1f6e4-fe0f","uc_greedy":"1f6e4","shortnames":[":railroad_track:"],"category":"travel"},":raised_hand_tone1:":{"uc_base":"270b-1f3fb","uc_output":"270b-1f3fb","uc_match":"270b-1f3fb","uc_greedy":"270b-1f3fb","shortnames":[],"category":"people"},":raised_hand_tone2:":{"uc_base":"270b-1f3fc","uc_output":"270b-1f3fc","uc_match":"270b-1f3fc","uc_greedy":"270b-1f3fc","shortnames":[],"category":"people"},":raised_hand_tone3:":{"uc_base":"270b-1f3fd","uc_output":"270b-1f3fd","uc_match":"270b-1f3fd","uc_greedy":"270b-1f3fd","shortnames":[],"category":"people"},":raised_hand_tone4:":{"uc_base":"270b-1f3fe","uc_output":"270b-1f3fe","uc_match":"270b-1f3fe","uc_greedy":"270b-1f3fe","shortnames":[],"category":"people"},":raised_hand_tone5:":{"uc_base":"270b-1f3ff","uc_output":"270b-1f3ff","uc_match":"270b-1f3ff","uc_greedy":"270b-1f3ff","shortnames":[],"category":"people"},":reminder_ribbon:":{"uc_base":"1f397","uc_output":"1f397-fe0f","uc_match":"1f397-fe0f","uc_greedy":"1f397","shortnames":[],"category":"activity"},":rosette:":{"uc_base":"1f3f5","uc_output":"1f3f5-fe0f","uc_match":"1f3f5-fe0f","uc_greedy":"1f3f5","shortnames":[],"category":"activity"},":sa:":{"uc_base":"1f202","uc_output":"1f202-fe0f","uc_match":"1f202-fe0f","uc_greedy":"1f202","shortnames":[],"category":"symbols"},":satellite_orbital:":{"uc_base":"1f6f0","uc_output":"1f6f0-fe0f","uc_match":"1f6f0-fe0f","uc_greedy":"1f6f0","shortnames":[],"category":"travel"},":shield:":{"uc_base":"1f6e1","uc_output":"1f6e1-fe0f","uc_match":"1f6e1-fe0f","uc_greedy":"1f6e1","shortnames":[],"category":"objects"},":shopping_bags:":{"uc_base":"1f6cd","uc_output":"1f6cd-fe0f","uc_match":"1f6cd-fe0f","uc_greedy":"1f6cd","shortnames":[],"category":"objects"},":speaking_head:":{"uc_base":"1f5e3","uc_output":"1f5e3-fe0f","uc_match":"1f5e3-fe0f","uc_greedy":"1f5e3","shortnames":[":speaking_head_in_silhouette:"],"category":"people"},":speech_left:":{"uc_base":"1f5e8","uc_output":"1f5e8-fe0f","uc_match":"1f5e8-fe0f","uc_greedy":"1f5e8","shortnames":[":left_speech_bubble:"],"category":"symbols"},":spider:":{"uc_base":"1f577","uc_output":"1f577-fe0f","uc_match":"1f577-fe0f","uc_greedy":"1f577","shortnames":[],"category":"nature"},":spider_web:":{"uc_base":"1f578","uc_output":"1f578-fe0f","uc_match":"1f578-fe0f","uc_greedy":"1f578","shortnames":[],"category":"nature"},":stadium:":{"uc_base":"1f3df","uc_output":"1f3df-fe0f","uc_match":"1f3df-fe0f","uc_greedy":"1f3df","shortnames":[],"category":"travel"},":thermometer:":{"uc_base":"1f321","uc_output":"1f321-fe0f","uc_match":"1f321-fe0f","uc_greedy":"1f321","shortnames":[],"category":"objects"},":tickets:":{"uc_base":"1f39f","uc_output":"1f39f-fe0f","uc_match":"1f39f-fe0f","uc_greedy":"1f39f","shortnames":[":admission_tickets:"],"category":"activity"},":tools:":{"uc_base":"1f6e0","uc_output":"1f6e0-fe0f","uc_match":"1f6e0-fe0f","uc_greedy":"1f6e0","shortnames":[":hammer_and_wrench:"],"category":"objects"},":trackball:":{"uc_base":"1f5b2","uc_output":"1f5b2-fe0f","uc_match":"1f5b2-fe0f","uc_greedy":"1f5b2","shortnames":[],"category":"objects"},":u6708:":{"uc_base":"1f237","uc_output":"1f237-fe0f","uc_match":"1f237-fe0f","uc_greedy":"1f237","shortnames":[],"category":"symbols"},":v_tone1:":{"uc_base":"270c-1f3fb","uc_output":"270c-1f3fb","uc_match":"270c-fe0f-1f3fb","uc_greedy":"270c-fe0f-1f3fb","shortnames":[],"category":"people"},":v_tone2:":{"uc_base":"270c-1f3fc","uc_output":"270c-1f3fc","uc_match":"270c-fe0f-1f3fc","uc_greedy":"270c-fe0f-1f3fc","shortnames":[],"category":"people"},":v_tone3:":{"uc_base":"270c-1f3fd","uc_output":"270c-1f3fd","uc_match":"270c-fe0f-1f3fd","uc_greedy":"270c-fe0f-1f3fd","shortnames":[],"category":"people"},":v_tone4:":{"uc_base":"270c-1f3fe","uc_output":"270c-1f3fe","uc_match":"270c-fe0f-1f3fe","uc_greedy":"270c-fe0f-1f3fe","shortnames":[],"category":"people"},":v_tone5:":{"uc_base":"270c-1f3ff","uc_output":"270c-1f3ff","uc_match":"270c-fe0f-1f3ff","uc_greedy":"270c-fe0f-1f3ff","shortnames":[],"category":"people"},":wastebasket:":{"uc_base":"1f5d1","uc_output":"1f5d1-fe0f","uc_match":"1f5d1-fe0f","uc_greedy":"1f5d1","shortnames":[],"category":"objects"},":white_sun_cloud:":{"uc_base":"1f325","uc_output":"1f325-fe0f","uc_match":"1f325-fe0f","uc_greedy":"1f325","shortnames":[":white_sun_behind_cloud:"],"category":"nature"},":white_sun_rain_cloud:":{"uc_base":"1f326","uc_output":"1f326-fe0f","uc_match":"1f326-fe0f","uc_greedy":"1f326","shortnames":[":white_sun_behind_cloud_with_rain:"],"category":"nature"},":white_sun_small_cloud:":{"uc_base":"1f324","uc_output":"1f324-fe0f","uc_match":"1f324-fe0f","uc_greedy":"1f324","shortnames":[":white_sun_with_small_cloud:"],"category":"nature"},":wind_blowing_face:":{"uc_base":"1f32c","uc_output":"1f32c-fe0f","uc_match":"1f32c-fe0f","uc_greedy":"1f32c","shortnames":[],"category":"nature"},":writing_hand_tone1:":{"uc_base":"270d-1f3fb","uc_output":"270d-1f3fb","uc_match":"270d-fe0f-1f3fb","uc_greedy":"270d-fe0f-1f3fb","shortnames":[],"category":"people"},":writing_hand_tone2:":{"uc_base":"270d-1f3fc","uc_output":"270d-1f3fc","uc_match":"270d-fe0f-1f3fc","uc_greedy":"270d-fe0f-1f3fc","shortnames":[],"category":"people"},":writing_hand_tone3:":{"uc_base":"270d-1f3fd","uc_output":"270d-1f3fd","uc_match":"270d-fe0f-1f3fd","uc_greedy":"270d-fe0f-1f3fd","shortnames":[],"category":"people"},":writing_hand_tone4:":{"uc_base":"270d-1f3fe","uc_output":"270d-1f3fe","uc_match":"270d-fe0f-1f3fe","uc_greedy":"270d-fe0f-1f3fe","shortnames":[],"category":"people"},":writing_hand_tone5:":{"uc_base":"270d-1f3ff","uc_output":"270d-1f3ff","uc_match":"270d-fe0f-1f3ff","uc_greedy":"270d-fe0f-1f3ff","shortnames":[],"category":"people"},":airplane:":{"uc_base":"2708","uc_output":"2708-fe0f","uc_match":"2708-fe0f","uc_greedy":"2708","shortnames":[],"category":"travel"},":alembic:":{"uc_base":"2697","uc_output":"2697-fe0f","uc_match":"2697-fe0f","uc_greedy":"2697","shortnames":[],"category":"objects"},":arrow_backward:":{"uc_base":"25c0","uc_output":"25c0-fe0f","uc_match":"25c0-fe0f","uc_greedy":"25c0","shortnames":[],"category":"symbols"},":arrow_down:":{"uc_base":"2b07","uc_output":"2b07-fe0f","uc_match":"2b07-fe0f","uc_greedy":"2b07","shortnames":[],"category":"symbols"},":arrow_forward:":{"uc_base":"25b6","uc_output":"25b6-fe0f","uc_match":"25b6-fe0f","uc_greedy":"25b6","shortnames":[],"category":"symbols"},":arrow_heading_down:":{"uc_base":"2935","uc_output":"2935-fe0f","uc_match":"2935-fe0f","uc_greedy":"2935","shortnames":[],"category":"symbols"},":arrow_heading_up:":{"uc_base":"2934","uc_output":"2934-fe0f","uc_match":"2934-fe0f","uc_greedy":"2934","shortnames":[],"category":"symbols"},":arrow_left:":{"uc_base":"2b05","uc_output":"2b05-fe0f","uc_match":"2b05-fe0f","uc_greedy":"2b05","shortnames":[],"category":"symbols"},":arrow_lower_left:":{"uc_base":"2199","uc_output":"2199-fe0f","uc_match":"2199-fe0f","uc_greedy":"2199","shortnames":[],"category":"symbols"},":arrow_lower_right:":{"uc_base":"2198","uc_output":"2198-fe0f","uc_match":"2198-fe0f","uc_greedy":"2198","shortnames":[],"category":"symbols"},":arrow_right:":{"uc_base":"27a1","uc_output":"27a1-fe0f","uc_match":"27a1-fe0f","uc_greedy":"27a1","shortnames":[],"category":"symbols"},":arrow_right_hook:":{"uc_base":"21aa","uc_output":"21aa-fe0f","uc_match":"21aa-fe0f","uc_greedy":"21aa","shortnames":[],"category":"symbols"},":arrow_up:":{"uc_base":"2b06","uc_output":"2b06-fe0f","uc_match":"2b06-fe0f","uc_greedy":"2b06","shortnames":[],"category":"symbols"},":arrow_up_down:":{"uc_base":"2195","uc_output":"2195-fe0f","uc_match":"2195-fe0f","uc_greedy":"2195","shortnames":[],"category":"symbols"},":arrow_upper_left:":{"uc_base":"2196","uc_output":"2196-fe0f","uc_match":"2196-fe0f","uc_greedy":"2196","shortnames":[],"category":"symbols"},":arrow_upper_right:":{"uc_base":"2197","uc_output":"2197-fe0f","uc_match":"2197-fe0f","uc_greedy":"2197","shortnames":[],"category":"symbols"},":asterisk_symbol:":{"uc_base":"002a","uc_output":"002a-fe0f","uc_match":"002a-fe0f","uc_greedy":"002a","shortnames":[],"category":"symbols"},":atom:":{"uc_base":"269b","uc_output":"269b-fe0f","uc_match":"269b-fe0f","uc_greedy":"269b","shortnames":[":atom_symbol:"],"category":"symbols"},":ballot_box_with_check:":{"uc_base":"2611","uc_output":"2611-fe0f","uc_match":"2611-fe0f","uc_greedy":"2611","shortnames":[],"category":"symbols"},":bangbang:":{"uc_base":"203c","uc_output":"203c-fe0f","uc_match":"203c-fe0f","uc_greedy":"203c","shortnames":[],"category":"symbols"},":beach_umbrella:":{"uc_base":"26f1","uc_output":"26f1-fe0f","uc_match":"26f1-fe0f","uc_greedy":"26f1","shortnames":[":umbrella_on_ground:"],"category":"travel"},":biohazard:":{"uc_base":"2623","uc_output":"2623-fe0f","uc_match":"2623-fe0f","uc_greedy":"2623","shortnames":[":biohazard_sign:"],"category":"symbols"},":black_medium_square:":{"uc_base":"25fc","uc_output":"25fc-fe0f","uc_match":"25fc-fe0f","uc_greedy":"25fc","shortnames":[],"category":"symbols"},":black_nib:":{"uc_base":"2712","uc_output":"2712-fe0f","uc_match":"2712-fe0f","uc_greedy":"2712","shortnames":[],"category":"objects"},":black_small_square:":{"uc_base":"25aa","uc_output":"25aa-fe0f","uc_match":"25aa-fe0f","uc_greedy":"25aa","shortnames":[],"category":"symbols"},":chains:":{"uc_base":"26d3","uc_output":"26d3-fe0f","uc_match":"26d3-fe0f","uc_greedy":"26d3","shortnames":[],"category":"objects"},":cloud:":{"uc_base":"2601","uc_output":"2601-fe0f","uc_match":"2601-fe0f","uc_greedy":"2601","shortnames":[],"category":"nature"},":clubs:":{"uc_base":"2663","uc_output":"2663-fe0f","uc_match":"2663-fe0f","uc_greedy":"2663","shortnames":[],"category":"symbols"},":coffin:":{"uc_base":"26b0","uc_output":"26b0-fe0f","uc_match":"26b0-fe0f","uc_greedy":"26b0","shortnames":[],"category":"objects"},":comet:":{"uc_base":"2604","uc_output":"2604-fe0f","uc_match":"2604-fe0f","uc_greedy":"2604","shortnames":[],"category":"nature"},":congratulations:":{"uc_base":"3297","uc_output":"3297-fe0f","uc_match":"3297-fe0f","uc_greedy":"3297","shortnames":[],"category":"symbols"},":copyright:":{"uc_base":"00a9","uc_output":"00a9-fe0f","uc_match":"00a9-fe0f","uc_greedy":"00a9","shortnames":[],"category":"symbols"},":cross:":{"uc_base":"271d","uc_output":"271d-fe0f","uc_match":"271d-fe0f","uc_greedy":"271d","shortnames":[":latin_cross:"],"category":"symbols"},":crossed_swords:":{"uc_base":"2694","uc_output":"2694-fe0f","uc_match":"2694-fe0f","uc_greedy":"2694","shortnames":[],"category":"objects"},":diamonds:":{"uc_base":"2666","uc_output":"2666-fe0f","uc_match":"2666-fe0f","uc_greedy":"2666","shortnames":[],"category":"symbols"},":digit_eight:":{"uc_base":"0038","uc_output":"0038-fe0f","uc_match":"0038-fe0f","uc_greedy":"0038","shortnames":[],"category":"symbols"},":digit_five:":{"uc_base":"0035","uc_output":"0035-fe0f","uc_match":"0035-fe0f","uc_greedy":"0035","shortnames":[],"category":"symbols"},":digit_four:":{"uc_base":"0034","uc_output":"0034-fe0f","uc_match":"0034-fe0f","uc_greedy":"0034","shortnames":[],"category":"symbols"},":digit_nine:":{"uc_base":"0039","uc_output":"0039-fe0f","uc_match":"0039-fe0f","uc_greedy":"0039","shortnames":[],"category":"symbols"},":digit_one:":{"uc_base":"0031","uc_output":"0031-fe0f","uc_match":"0031-fe0f","uc_greedy":"0031","shortnames":[],"category":"symbols"},":digit_seven:":{"uc_base":"0037","uc_output":"0037-fe0f","uc_match":"0037-fe0f","uc_greedy":"0037","shortnames":[],"category":"symbols"},":digit_six:":{"uc_base":"0036","uc_output":"0036-fe0f","uc_match":"0036-fe0f","uc_greedy":"0036","shortnames":[],"category":"symbols"},":digit_three:":{"uc_base":"0033","uc_output":"0033-fe0f","uc_match":"0033-fe0f","uc_greedy":"0033","shortnames":[],"category":"symbols"},":digit_two:":{"uc_base":"0032","uc_output":"0032-fe0f","uc_match":"0032-fe0f","uc_greedy":"0032","shortnames":[],"category":"symbols"},":digit_zero:":{"uc_base":"0030","uc_output":"0030-fe0f","uc_match":"0030-fe0f","uc_greedy":"0030","shortnames":[],"category":"symbols"},":eight_pointed_black_star:":{"uc_base":"2734","uc_output":"2734-fe0f","uc_match":"2734-fe0f","uc_greedy":"2734","shortnames":[],"category":"symbols"},":eight_spoked_asterisk:":{"uc_base":"2733","uc_output":"2733-fe0f","uc_match":"2733-fe0f","uc_greedy":"2733","shortnames":[],"category":"symbols"},":eject:":{"uc_base":"23cf","uc_output":"23cf-fe0f","uc_match":"23cf-fe0f","uc_greedy":"23cf","shortnames":[":eject_symbol:"],"category":"symbols"},":envelope:":{"uc_base":"2709","uc_output":"2709-fe0f","uc_match":"2709-fe0f","uc_greedy":"2709","shortnames":[],"category":"objects"},":female_sign:":{"uc_base":"2640","uc_output":"2640-fe0f","uc_match":"2640-fe0f","uc_greedy":"2640","shortnames":[],"category":"people"},":ferry:":{"uc_base":"26f4","uc_output":"26f4-fe0f","uc_match":"26f4-fe0f","uc_greedy":"26f4","shortnames":[],"category":"travel"},":fleur-de-lis:":{"uc_base":"269c","uc_output":"269c-fe0f","uc_match":"269c-fe0f","uc_greedy":"269c","shortnames":[],"category":"symbols"},":frowning2:":{"uc_base":"2639","uc_output":"2639-fe0f","uc_match":"2639-fe0f","uc_greedy":"2639","shortnames":[":white_frowning_face:"],"category":"people"},":gear:":{"uc_base":"2699","uc_output":"2699-fe0f","uc_match":"2699-fe0f","uc_greedy":"2699","shortnames":[],"category":"objects"},":hammer_pick:":{"uc_base":"2692","uc_output":"2692-fe0f","uc_match":"2692-fe0f","uc_greedy":"2692","shortnames":[":hammer_and_pick:"],"category":"objects"},":heart:":{"uc_base":"2764","uc_output":"2764-fe0f","uc_match":"2764-fe0f","uc_greedy":"2764","shortnames":[],"category":"symbols"},":heart_exclamation:":{"uc_base":"2763","uc_output":"2763-fe0f","uc_match":"2763-fe0f","uc_greedy":"2763","shortnames":[":heavy_heart_exclamation_mark_ornament:"],"category":"symbols"},":hearts:":{"uc_base":"2665","uc_output":"2665-fe0f","uc_match":"2665-fe0f","uc_greedy":"2665","shortnames":[],"category":"symbols"},":heavy_check_mark:":{"uc_base":"2714","uc_output":"2714-fe0f","uc_match":"2714-fe0f","uc_greedy":"2714","shortnames":[],"category":"symbols"},":heavy_multiplication_x:":{"uc_base":"2716","uc_output":"2716-fe0f","uc_match":"2716-fe0f","uc_greedy":"2716","shortnames":[],"category":"symbols"},":helmet_with_cross:":{"uc_base":"26d1","uc_output":"26d1-fe0f","uc_match":"26d1-fe0f","uc_greedy":"26d1","shortnames":[":helmet_with_white_cross:"],"category":"people"},":hotsprings:":{"uc_base":"2668","uc_output":"2668-fe0f","uc_match":"2668-fe0f","uc_greedy":"2668","shortnames":[],"category":"symbols"},":ice_skate:":{"uc_base":"26f8","uc_output":"26f8-fe0f","uc_match":"26f8-fe0f","uc_greedy":"26f8","shortnames":[],"category":"activity"},":information_source:":{"uc_base":"2139","uc_output":"2139-fe0f","uc_match":"2139-fe0f","uc_greedy":"2139","shortnames":[],"category":"symbols"},":interrobang:":{"uc_base":"2049","uc_output":"2049-fe0f","uc_match":"2049-fe0f","uc_greedy":"2049","shortnames":[],"category":"symbols"},":keyboard:":{"uc_base":"2328","uc_output":"2328-fe0f","uc_match":"2328-fe0f","uc_greedy":"2328","shortnames":[],"category":"objects"},":left_right_arrow:":{"uc_base":"2194","uc_output":"2194-fe0f","uc_match":"2194-fe0f","uc_greedy":"2194","shortnames":[],"category":"symbols"},":leftwards_arrow_with_hook:":{"uc_base":"21a9","uc_output":"21a9-fe0f","uc_match":"21a9-fe0f","uc_greedy":"21a9","shortnames":[],"category":"symbols"},":m:":{"uc_base":"24c2","uc_output":"24c2-fe0f","uc_match":"24c2-fe0f","uc_greedy":"24c2","shortnames":[],"category":"symbols"},":male_sign:":{"uc_base":"2642","uc_output":"2642-fe0f","uc_match":"2642-fe0f","uc_greedy":"2642","shortnames":[],"category":"people"},":medical_symbol:":{"uc_base":"2695","uc_output":"2695-fe0f","uc_match":"2695-fe0f","uc_greedy":"2695","shortnames":[],"category":"people"},":mountain:":{"uc_base":"26f0","uc_output":"26f0-fe0f","uc_match":"26f0-fe0f","uc_greedy":"26f0","shortnames":[],"category":"travel"},":orthodox_cross:":{"uc_base":"2626","uc_output":"2626-fe0f","uc_match":"2626-fe0f","uc_greedy":"2626","shortnames":[],"category":"symbols"},":part_alternation_mark:":{"uc_base":"303d","uc_output":"303d-fe0f","uc_match":"303d-fe0f","uc_greedy":"303d","shortnames":[],"category":"symbols"},":pause_button:":{"uc_base":"23f8","uc_output":"23f8-fe0f","uc_match":"23f8-fe0f","uc_greedy":"23f8","shortnames":[":double_vertical_bar:"],"category":"symbols"},":peace:":{"uc_base":"262e","uc_output":"262e-fe0f","uc_match":"262e-fe0f","uc_greedy":"262e","shortnames":[":peace_symbol:"],"category":"symbols"},":pencil2:":{"uc_base":"270f","uc_output":"270f-fe0f","uc_match":"270f-fe0f","uc_greedy":"270f","shortnames":[],"category":"objects"},":person_bouncing_ball:":{"uc_base":"26f9","uc_output":"26f9-fe0f","uc_match":"26f9-fe0f","uc_greedy":"26f9","shortnames":[":basketball_player:",":person_with_ball:"],"category":"activity"},":pick:":{"uc_base":"26cf","uc_output":"26cf-fe0f","uc_match":"26cf-fe0f","uc_greedy":"26cf","shortnames":[],"category":"objects"},":play_pause:":{"uc_base":"23ef","uc_output":"23ef-fe0f","uc_match":"23ef-fe0f","uc_greedy":"23ef","shortnames":[],"category":"symbols"},":point_up:":{"uc_base":"261d","uc_output":"261d-fe0f","uc_match":"261d-fe0f","uc_greedy":"261d","shortnames":[],"category":"people"},":pound_symbol:":{"uc_base":"0023","uc_output":"0023-fe0f","uc_match":"0023-fe0f","uc_greedy":"0023","shortnames":[],"category":"symbols"},":radioactive:":{"uc_base":"2622","uc_output":"2622-fe0f","uc_match":"2622-fe0f","uc_greedy":"2622","shortnames":[":radioactive_sign:"],"category":"symbols"},":record_button:":{"uc_base":"23fa","uc_output":"23fa-fe0f","uc_match":"23fa-fe0f","uc_greedy":"23fa","shortnames":[],"category":"symbols"},":recycle:":{"uc_base":"267b","uc_output":"267b-fe0f","uc_match":"267b-fe0f","uc_greedy":"267b","shortnames":[],"category":"symbols"},":registered:":{"uc_base":"00ae","uc_output":"00ae-fe0f","uc_match":"00ae-fe0f","uc_greedy":"00ae","shortnames":[],"category":"symbols"},":relaxed:":{"uc_base":"263a","uc_output":"263a-fe0f","uc_match":"263a-fe0f","uc_greedy":"263a","shortnames":[],"category":"people"},":scales:":{"uc_base":"2696","uc_output":"2696-fe0f","uc_match":"2696-fe0f","uc_greedy":"2696","shortnames":[],"category":"objects"},":scissors:":{"uc_base":"2702","uc_output":"2702-fe0f","uc_match":"2702-fe0f","uc_greedy":"2702","shortnames":[],"category":"objects"},":secret:":{"uc_base":"3299","uc_output":"3299-fe0f","uc_match":"3299-fe0f","uc_greedy":"3299","shortnames":[],"category":"symbols"},":shamrock:":{"uc_base":"2618","uc_output":"2618-fe0f","uc_match":"2618-fe0f","uc_greedy":"2618","shortnames":[],"category":"nature"},":shinto_shrine:":{"uc_base":"26e9","uc_output":"26e9-fe0f","uc_match":"26e9-fe0f","uc_greedy":"26e9","shortnames":[],"category":"travel"},":skier:":{"uc_base":"26f7","uc_output":"26f7-fe0f","uc_match":"26f7-fe0f","uc_greedy":"26f7","shortnames":[],"category":"activity"},":skull_crossbones:":{"uc_base":"2620","uc_output":"2620-fe0f","uc_match":"2620-fe0f","uc_greedy":"2620","shortnames":[":skull_and_crossbones:"],"category":"people"},":snowflake:":{"uc_base":"2744","uc_output":"2744-fe0f","uc_match":"2744-fe0f","uc_greedy":"2744","shortnames":[],"category":"nature"},":snowman2:":{"uc_base":"2603","uc_output":"2603-fe0f","uc_match":"2603-fe0f","uc_greedy":"2603","shortnames":[],"category":"nature"},":spades:":{"uc_base":"2660","uc_output":"2660-fe0f","uc_match":"2660-fe0f","uc_greedy":"2660","shortnames":[],"category":"symbols"},":sparkle:":{"uc_base":"2747","uc_output":"2747-fe0f","uc_match":"2747-fe0f","uc_greedy":"2747","shortnames":[],"category":"symbols"},":star_and_crescent:":{"uc_base":"262a","uc_output":"262a-fe0f","uc_match":"262a-fe0f","uc_greedy":"262a","shortnames":[],"category":"symbols"},":star_of_david:":{"uc_base":"2721","uc_output":"2721-fe0f","uc_match":"2721-fe0f","uc_greedy":"2721","shortnames":[],"category":"symbols"},":stop_button:":{"uc_base":"23f9","uc_output":"23f9-fe0f","uc_match":"23f9-fe0f","uc_greedy":"23f9","shortnames":[],"category":"symbols"},":stopwatch:":{"uc_base":"23f1","uc_output":"23f1-fe0f","uc_match":"23f1-fe0f","uc_greedy":"23f1","shortnames":[],"category":"objects"},":sunny:":{"uc_base":"2600","uc_output":"2600-fe0f","uc_match":"2600-fe0f","uc_greedy":"2600","shortnames":[],"category":"nature"},":telephone:":{"uc_base":"260e","uc_output":"260e-fe0f","uc_match":"260e-fe0f","uc_greedy":"260e","shortnames":[],"category":"objects"},":thunder_cloud_rain:":{"uc_base":"26c8","uc_output":"26c8-fe0f","uc_match":"26c8-fe0f","uc_greedy":"26c8","shortnames":[":thunder_cloud_and_rain:"],"category":"nature"},":timer:":{"uc_base":"23f2","uc_output":"23f2-fe0f","uc_match":"23f2-fe0f","uc_greedy":"23f2","shortnames":[":timer_clock:"],"category":"objects"},":tm:":{"uc_base":"2122","uc_output":"2122-fe0f","uc_match":"2122-fe0f","uc_greedy":"2122","shortnames":[],"category":"symbols"},":track_next:":{"uc_base":"23ed","uc_output":"23ed-fe0f","uc_match":"23ed-fe0f","uc_greedy":"23ed","shortnames":[":next_track:"],"category":"symbols"},":track_previous:":{"uc_base":"23ee","uc_output":"23ee-fe0f","uc_match":"23ee-fe0f","uc_greedy":"23ee","shortnames":[":previous_track:"],"category":"symbols"},":umbrella2:":{"uc_base":"2602","uc_output":"2602-fe0f","uc_match":"2602-fe0f","uc_greedy":"2602","shortnames":[],"category":"people"},":urn:":{"uc_base":"26b1","uc_output":"26b1-fe0f","uc_match":"26b1-fe0f","uc_greedy":"26b1","shortnames":[":funeral_urn:"],"category":"objects"},":v:":{"uc_base":"270c","uc_output":"270c-fe0f","uc_match":"270c-fe0f","uc_greedy":"270c","shortnames":[],"category":"people"},":warning:":{"uc_base":"26a0","uc_output":"26a0-fe0f","uc_match":"26a0-fe0f","uc_greedy":"26a0","shortnames":[],"category":"symbols"},":wavy_dash:":{"uc_base":"3030","uc_output":"3030-fe0f","uc_match":"3030-fe0f","uc_greedy":"3030","shortnames":[],"category":"symbols"},":wheel_of_dharma:":{"uc_base":"2638","uc_output":"2638-fe0f","uc_match":"2638-fe0f","uc_greedy":"2638","shortnames":[],"category":"symbols"},":white_medium_square:":{"uc_base":"25fb","uc_output":"25fb-fe0f","uc_match":"25fb-fe0f","uc_greedy":"25fb","shortnames":[],"category":"symbols"},":white_small_square:":{"uc_base":"25ab","uc_output":"25ab-fe0f","uc_match":"25ab-fe0f","uc_greedy":"25ab","shortnames":[],"category":"symbols"},":writing_hand:":{"uc_base":"270d","uc_output":"270d-fe0f","uc_match":"270d-fe0f","uc_greedy":"270d","shortnames":[],"category":"people"},":yin_yang:":{"uc_base":"262f","uc_output":"262f-fe0f","uc_match":"262f-fe0f","uc_greedy":"262f","shortnames":[],"category":"symbols"},":100:":{"uc_base":"1f4af","uc_output":"1f4af","uc_match":"1f4af","uc_greedy":"1f4af","shortnames":[],"category":"symbols"},":1234:":{"uc_base":"1f522","uc_output":"1f522","uc_match":"1f522","uc_greedy":"1f522","shortnames":[],"category":"symbols"},":8ball:":{"uc_base":"1f3b1","uc_output":"1f3b1","uc_match":"1f3b1","uc_greedy":"1f3b1","shortnames":[],"category":"activity"},":ab:":{"uc_base":"1f18e","uc_output":"1f18e","uc_match":"1f18e","uc_greedy":"1f18e","shortnames":[],"category":"symbols"},":abc:":{"uc_base":"1f524","uc_output":"1f524","uc_match":"1f524","uc_greedy":"1f524","shortnames":[],"category":"symbols"},":abcd:":{"uc_base":"1f521","uc_output":"1f521","uc_match":"1f521","uc_greedy":"1f521","shortnames":[],"category":"symbols"},":accept:":{"uc_base":"1f251","uc_output":"1f251","uc_match":"1f251","uc_greedy":"1f251","shortnames":[],"category":"symbols"},":adult:":{"uc_base":"1f9d1","uc_output":"1f9d1","uc_match":"1f9d1","uc_greedy":"1f9d1","shortnames":[],"category":"people"},":aerial_tramway:":{"uc_base":"1f6a1","uc_output":"1f6a1","uc_match":"1f6a1","uc_greedy":"1f6a1","shortnames":[],"category":"travel"},":airplane_arriving:":{"uc_base":"1f6ec","uc_output":"1f6ec","uc_match":"1f6ec","uc_greedy":"1f6ec","shortnames":[],"category":"travel"},":airplane_departure:":{"uc_base":"1f6eb","uc_output":"1f6eb","uc_match":"1f6eb","uc_greedy":"1f6eb","shortnames":[],"category":"travel"},":alien:":{"uc_base":"1f47d","uc_output":"1f47d","uc_match":"1f47d","uc_greedy":"1f47d","shortnames":[],"category":"people"},":ambulance:":{"uc_base":"1f691","uc_output":"1f691","uc_match":"1f691","uc_greedy":"1f691","shortnames":[],"category":"travel"},":amphora:":{"uc_base":"1f3fa","uc_output":"1f3fa","uc_match":"1f3fa","uc_greedy":"1f3fa","shortnames":[],"category":"objects"},":angel:":{"uc_base":"1f47c","uc_output":"1f47c","uc_match":"1f47c","uc_greedy":"1f47c","shortnames":[],"category":"people"},":anger:":{"uc_base":"1f4a2","uc_output":"1f4a2","uc_match":"1f4a2","uc_greedy":"1f4a2","shortnames":[],"category":"symbols"},":angry:":{"uc_base":"1f620","uc_output":"1f620","uc_match":"1f620","uc_greedy":"1f620","shortnames":[],"category":"people"},":anguished:":{"uc_base":"1f627","uc_output":"1f627","uc_match":"1f627","uc_greedy":"1f627","shortnames":[],"category":"people"},":ant:":{"uc_base":"1f41c","uc_output":"1f41c","uc_match":"1f41c","uc_greedy":"1f41c","shortnames":[],"category":"nature"},":apple:":{"uc_base":"1f34e","uc_output":"1f34e","uc_match":"1f34e","uc_greedy":"1f34e","shortnames":[],"category":"food"},":arrow_down_small:":{"uc_base":"1f53d","uc_output":"1f53d","uc_match":"1f53d","uc_greedy":"1f53d","shortnames":[],"category":"symbols"},":arrow_up_small:":{"uc_base":"1f53c","uc_output":"1f53c","uc_match":"1f53c","uc_greedy":"1f53c","shortnames":[],"category":"symbols"},":arrows_clockwise:":{"uc_base":"1f503","uc_output":"1f503","uc_match":"1f503","uc_greedy":"1f503","shortnames":[],"category":"symbols"},":arrows_counterclockwise:":{"uc_base":"1f504","uc_output":"1f504","uc_match":"1f504","uc_greedy":"1f504","shortnames":[],"category":"symbols"},":art:":{"uc_base":"1f3a8","uc_output":"1f3a8","uc_match":"1f3a8","uc_greedy":"1f3a8","shortnames":[],"category":"activity"},":articulated_lorry:":{"uc_base":"1f69b","uc_output":"1f69b","uc_match":"1f69b","uc_greedy":"1f69b","shortnames":[],"category":"travel"},":astonished:":{"uc_base":"1f632","uc_output":"1f632","uc_match":"1f632","uc_greedy":"1f632","shortnames":[],"category":"people"},":athletic_shoe:":{"uc_base":"1f45f","uc_output":"1f45f","uc_match":"1f45f","uc_greedy":"1f45f","shortnames":[],"category":"people"},":atm:":{"uc_base":"1f3e7","uc_output":"1f3e7","uc_match":"1f3e7","uc_greedy":"1f3e7","shortnames":[],"category":"symbols"},":avocado:":{"uc_base":"1f951","uc_output":"1f951","uc_match":"1f951","uc_greedy":"1f951","shortnames":[],"category":"food"},":baby:":{"uc_base":"1f476","uc_output":"1f476","uc_match":"1f476","uc_greedy":"1f476","shortnames":[],"category":"people"},":baby_bottle:":{"uc_base":"1f37c","uc_output":"1f37c","uc_match":"1f37c","uc_greedy":"1f37c","shortnames":[],"category":"food"},":baby_chick:":{"uc_base":"1f424","uc_output":"1f424","uc_match":"1f424","uc_greedy":"1f424","shortnames":[],"category":"nature"},":baby_symbol:":{"uc_base":"1f6bc","uc_output":"1f6bc","uc_match":"1f6bc","uc_greedy":"1f6bc","shortnames":[],"category":"symbols"},":back:":{"uc_base":"1f519","uc_output":"1f519","uc_match":"1f519","uc_greedy":"1f519","shortnames":[],"category":"symbols"},":bacon:":{"uc_base":"1f953","uc_output":"1f953","uc_match":"1f953","uc_greedy":"1f953","shortnames":[],"category":"food"},":badminton:":{"uc_base":"1f3f8","uc_output":"1f3f8","uc_match":"1f3f8","uc_greedy":"1f3f8","shortnames":[],"category":"activity"},":baggage_claim:":{"uc_base":"1f6c4","uc_output":"1f6c4","uc_match":"1f6c4","uc_greedy":"1f6c4","shortnames":[],"category":"symbols"},":balloon:":{"uc_base":"1f388","uc_output":"1f388","uc_match":"1f388","uc_greedy":"1f388","shortnames":[],"category":"objects"},":bamboo:":{"uc_base":"1f38d","uc_output":"1f38d","uc_match":"1f38d","uc_greedy":"1f38d","shortnames":[],"category":"nature"},":banana:":{"uc_base":"1f34c","uc_output":"1f34c","uc_match":"1f34c","uc_greedy":"1f34c","shortnames":[],"category":"food"},":bank:":{"uc_base":"1f3e6","uc_output":"1f3e6","uc_match":"1f3e6","uc_greedy":"1f3e6","shortnames":[],"category":"travel"},":bar_chart:":{"uc_base":"1f4ca","uc_output":"1f4ca","uc_match":"1f4ca","uc_greedy":"1f4ca","shortnames":[],"category":"objects"},":barber:":{"uc_base":"1f488","uc_output":"1f488","uc_match":"1f488","uc_greedy":"1f488","shortnames":[],"category":"objects"},":basketball:":{"uc_base":"1f3c0","uc_output":"1f3c0","uc_match":"1f3c0","uc_greedy":"1f3c0","shortnames":[],"category":"activity"},":bat:":{"uc_base":"1f987","uc_output":"1f987","uc_match":"1f987","uc_greedy":"1f987","shortnames":[],"category":"nature"},":bath:":{"uc_base":"1f6c0","uc_output":"1f6c0","uc_match":"1f6c0","uc_greedy":"1f6c0","shortnames":[],"category":"objects"},":bathtub:":{"uc_base":"1f6c1","uc_output":"1f6c1","uc_match":"1f6c1","uc_greedy":"1f6c1","shortnames":[],"category":"objects"},":battery:":{"uc_base":"1f50b","uc_output":"1f50b","uc_match":"1f50b","uc_greedy":"1f50b","shortnames":[],"category":"objects"},":bear:":{"uc_base":"1f43b","uc_output":"1f43b","uc_match":"1f43b","uc_greedy":"1f43b","shortnames":[],"category":"nature"},":bearded_person:":{"uc_base":"1f9d4","uc_output":"1f9d4","uc_match":"1f9d4","uc_greedy":"1f9d4","shortnames":[],"category":"people"},":bee:":{"uc_base":"1f41d","uc_output":"1f41d","uc_match":"1f41d","uc_greedy":"1f41d","shortnames":[],"category":"nature"},":beer:":{"uc_base":"1f37a","uc_output":"1f37a","uc_match":"1f37a","uc_greedy":"1f37a","shortnames":[],"category":"food"},":beers:":{"uc_base":"1f37b","uc_output":"1f37b","uc_match":"1f37b","uc_greedy":"1f37b","shortnames":[],"category":"food"},":beetle:":{"uc_base":"1f41e","uc_output":"1f41e","uc_match":"1f41e","uc_greedy":"1f41e","shortnames":[],"category":"nature"},":beginner:":{"uc_base":"1f530","uc_output":"1f530","uc_match":"1f530","uc_greedy":"1f530","shortnames":[],"category":"symbols"},":bell:":{"uc_base":"1f514","uc_output":"1f514","uc_match":"1f514","uc_greedy":"1f514","shortnames":[],"category":"symbols"},":bento:":{"uc_base":"1f371","uc_output":"1f371","uc_match":"1f371","uc_greedy":"1f371","shortnames":[],"category":"food"},":bike:":{"uc_base":"1f6b2","uc_output":"1f6b2","uc_match":"1f6b2","uc_greedy":"1f6b2","shortnames":[],"category":"travel"},":bikini:":{"uc_base":"1f459","uc_output":"1f459","uc_match":"1f459","uc_greedy":"1f459","shortnames":[],"category":"people"},":billed_cap:":{"uc_base":"1f9e2","uc_output":"1f9e2","uc_match":"1f9e2","uc_greedy":"1f9e2","shortnames":[],"category":"people"},":bird:":{"uc_base":"1f426","uc_output":"1f426","uc_match":"1f426","uc_greedy":"1f426","shortnames":[],"category":"nature"},":birthday:":{"uc_base":"1f382","uc_output":"1f382","uc_match":"1f382","uc_greedy":"1f382","shortnames":[],"category":"food"},":black_heart:":{"uc_base":"1f5a4","uc_output":"1f5a4","uc_match":"1f5a4","uc_greedy":"1f5a4","shortnames":[],"category":"symbols"},":black_joker:":{"uc_base":"1f0cf","uc_output":"1f0cf","uc_match":"1f0cf","uc_greedy":"1f0cf","shortnames":[],"category":"symbols"},":black_square_button:":{"uc_base":"1f532","uc_output":"1f532","uc_match":"1f532","uc_greedy":"1f532","shortnames":[],"category":"symbols"},":blond_haired_person:":{"uc_base":"1f471","uc_output":"1f471","uc_match":"1f471","uc_greedy":"1f471","shortnames":[":person_with_blond_hair:"],"category":"people"},":blossom:":{"uc_base":"1f33c","uc_output":"1f33c","uc_match":"1f33c","uc_greedy":"1f33c","shortnames":[],"category":"nature"},":blowfish:":{"uc_base":"1f421","uc_output":"1f421","uc_match":"1f421","uc_greedy":"1f421","shortnames":[],"category":"nature"},":blue_book:":{"uc_base":"1f4d8","uc_output":"1f4d8","uc_match":"1f4d8","uc_greedy":"1f4d8","shortnames":[],"category":"objects"},":blue_car:":{"uc_base":"1f699","uc_output":"1f699","uc_match":"1f699","uc_greedy":"1f699","shortnames":[],"category":"travel"},":blue_circle:":{"uc_base":"1f535","uc_output":"1f535","uc_match":"1f535","uc_greedy":"1f535","shortnames":[],"category":"symbols"},":blue_heart:":{"uc_base":"1f499","uc_output":"1f499","uc_match":"1f499","uc_greedy":"1f499","shortnames":[],"category":"symbols"},":blush:":{"uc_base":"1f60a","uc_output":"1f60a","uc_match":"1f60a","uc_greedy":"1f60a","shortnames":[],"category":"people"},":boar:":{"uc_base":"1f417","uc_output":"1f417","uc_match":"1f417","uc_greedy":"1f417","shortnames":[],"category":"nature"},":bomb:":{"uc_base":"1f4a3","uc_output":"1f4a3","uc_match":"1f4a3","uc_greedy":"1f4a3","shortnames":[],"category":"objects"},":book:":{"uc_base":"1f4d6","uc_output":"1f4d6","uc_match":"1f4d6","uc_greedy":"1f4d6","shortnames":[],"category":"objects"},":bookmark:":{"uc_base":"1f516","uc_output":"1f516","uc_match":"1f516","uc_greedy":"1f516","shortnames":[],"category":"objects"},":bookmark_tabs:":{"uc_base":"1f4d1","uc_output":"1f4d1","uc_match":"1f4d1","uc_greedy":"1f4d1","shortnames":[],"category":"objects"},":books:":{"uc_base":"1f4da","uc_output":"1f4da","uc_match":"1f4da","uc_greedy":"1f4da","shortnames":[],"category":"objects"},":boom:":{"uc_base":"1f4a5","uc_output":"1f4a5","uc_match":"1f4a5","uc_greedy":"1f4a5","shortnames":[],"category":"nature"},":boot:":{"uc_base":"1f462","uc_output":"1f462","uc_match":"1f462","uc_greedy":"1f462","shortnames":[],"category":"people"},":bouquet:":{"uc_base":"1f490","uc_output":"1f490","uc_match":"1f490","uc_greedy":"1f490","shortnames":[],"category":"nature"},":bow_and_arrow:":{"uc_base":"1f3f9","uc_output":"1f3f9","uc_match":"1f3f9","uc_greedy":"1f3f9","shortnames":[":archery:"],"category":"activity"},":bowl_with_spoon:":{"uc_base":"1f963","uc_output":"1f963","uc_match":"1f963","uc_greedy":"1f963","shortnames":[],"category":"food"},":bowling:":{"uc_base":"1f3b3","uc_output":"1f3b3","uc_match":"1f3b3","uc_greedy":"1f3b3","shortnames":[],"category":"activity"},":boxing_glove:":{"uc_base":"1f94a","uc_output":"1f94a","uc_match":"1f94a","uc_greedy":"1f94a","shortnames":[":boxing_gloves:"],"category":"activity"},":boy:":{"uc_base":"1f466","uc_output":"1f466","uc_match":"1f466","uc_greedy":"1f466","shortnames":[],"category":"people"},":brain:":{"uc_base":"1f9e0","uc_output":"1f9e0","uc_match":"1f9e0","uc_greedy":"1f9e0","shortnames":[],"category":"people"},":bread:":{"uc_base":"1f35e","uc_output":"1f35e","uc_match":"1f35e","uc_greedy":"1f35e","shortnames":[],"category":"food"},":breast_feeding:":{"uc_base":"1f931","uc_output":"1f931","uc_match":"1f931","uc_greedy":"1f931","shortnames":[],"category":"activity"},":bride_with_veil:":{"uc_base":"1f470","uc_output":"1f470","uc_match":"1f470","uc_greedy":"1f470","shortnames":[],"category":"people"},":bridge_at_night:":{"uc_base":"1f309","uc_output":"1f309","uc_match":"1f309","uc_greedy":"1f309","shortnames":[],"category":"travel"},":briefcase:":{"uc_base":"1f4bc","uc_output":"1f4bc","uc_match":"1f4bc","uc_greedy":"1f4bc","shortnames":[],"category":"people"},":broccoli:":{"uc_base":"1f966","uc_output":"1f966","uc_match":"1f966","uc_greedy":"1f966","shortnames":[],"category":"food"},":broken_heart:":{"uc_base":"1f494","uc_output":"1f494","uc_match":"1f494","uc_greedy":"1f494","shortnames":[],"category":"symbols"},":bug:":{"uc_base":"1f41b","uc_output":"1f41b","uc_match":"1f41b","uc_greedy":"1f41b","shortnames":[],"category":"nature"},":bulb:":{"uc_base":"1f4a1","uc_output":"1f4a1","uc_match":"1f4a1","uc_greedy":"1f4a1","shortnames":[],"category":"objects"},":bullettrain_front:":{"uc_base":"1f685","uc_output":"1f685","uc_match":"1f685","uc_greedy":"1f685","shortnames":[],"category":"travel"},":bullettrain_side:":{"uc_base":"1f684","uc_output":"1f684","uc_match":"1f684","uc_greedy":"1f684","shortnames":[],"category":"travel"},":burrito:":{"uc_base":"1f32f","uc_output":"1f32f","uc_match":"1f32f","uc_greedy":"1f32f","shortnames":[],"category":"food"},":bus:":{"uc_base":"1f68c","uc_output":"1f68c","uc_match":"1f68c","uc_greedy":"1f68c","shortnames":[],"category":"travel"},":busstop:":{"uc_base":"1f68f","uc_output":"1f68f","uc_match":"1f68f","uc_greedy":"1f68f","shortnames":[],"category":"travel"},":bust_in_silhouette:":{"uc_base":"1f464","uc_output":"1f464","uc_match":"1f464","uc_greedy":"1f464","shortnames":[],"category":"people"},":busts_in_silhouette:":{"uc_base":"1f465","uc_output":"1f465","uc_match":"1f465","uc_greedy":"1f465","shortnames":[],"category":"people"},":butterfly:":{"uc_base":"1f98b","uc_output":"1f98b","uc_match":"1f98b","uc_greedy":"1f98b","shortnames":[],"category":"nature"},":cactus:":{"uc_base":"1f335","uc_output":"1f335","uc_match":"1f335","uc_greedy":"1f335","shortnames":[],"category":"nature"},":cake:":{"uc_base":"1f370","uc_output":"1f370","uc_match":"1f370","uc_greedy":"1f370","shortnames":[],"category":"food"},":calendar:":{"uc_base":"1f4c6","uc_output":"1f4c6","uc_match":"1f4c6","uc_greedy":"1f4c6","shortnames":[],"category":"objects"},":call_me:":{"uc_base":"1f919","uc_output":"1f919","uc_match":"1f919","uc_greedy":"1f919","shortnames":[":call_me_hand:"],"category":"people"},":calling:":{"uc_base":"1f4f2","uc_output":"1f4f2","uc_match":"1f4f2","uc_greedy":"1f4f2","shortnames":[],"category":"objects"},":camel:":{"uc_base":"1f42b","uc_output":"1f42b","uc_match":"1f42b","uc_greedy":"1f42b","shortnames":[],"category":"nature"},":camera:":{"uc_base":"1f4f7","uc_output":"1f4f7","uc_match":"1f4f7","uc_greedy":"1f4f7","shortnames":[],"category":"objects"},":camera_with_flash:":{"uc_base":"1f4f8","uc_output":"1f4f8","uc_match":"1f4f8","uc_greedy":"1f4f8","shortnames":[],"category":"objects"},":candy:":{"uc_base":"1f36c","uc_output":"1f36c","uc_match":"1f36c","uc_greedy":"1f36c","shortnames":[],"category":"food"},":canned_food:":{"uc_base":"1f96b","uc_output":"1f96b","uc_match":"1f96b","uc_greedy":"1f96b","shortnames":[],"category":"food"},":canoe:":{"uc_base":"1f6f6","uc_output":"1f6f6","uc_match":"1f6f6","uc_greedy":"1f6f6","shortnames":[":kayak:"],"category":"travel"},":capital_abcd:":{"uc_base":"1f520","uc_output":"1f520","uc_match":"1f520","uc_greedy":"1f520","shortnames":[],"category":"symbols"},":card_index:":{"uc_base":"1f4c7","uc_output":"1f4c7","uc_match":"1f4c7","uc_greedy":"1f4c7","shortnames":[],"category":"objects"},":carousel_horse:":{"uc_base":"1f3a0","uc_output":"1f3a0","uc_match":"1f3a0","uc_greedy":"1f3a0","shortnames":[],"category":"travel"},":carrot:":{"uc_base":"1f955","uc_output":"1f955","uc_match":"1f955","uc_greedy":"1f955","shortnames":[],"category":"food"},":cat2:":{"uc_base":"1f408","uc_output":"1f408","uc_match":"1f408","uc_greedy":"1f408","shortnames":[],"category":"nature"},":cat:":{"uc_base":"1f431","uc_output":"1f431","uc_match":"1f431","uc_greedy":"1f431","shortnames":[],"category":"nature"},":cd:":{"uc_base":"1f4bf","uc_output":"1f4bf","uc_match":"1f4bf","uc_greedy":"1f4bf","shortnames":[],"category":"objects"},":champagne:":{"uc_base":"1f37e","uc_output":"1f37e","uc_match":"1f37e","uc_greedy":"1f37e","shortnames":[":bottle_with_popping_cork:"],"category":"food"},":champagne_glass:":{"uc_base":"1f942","uc_output":"1f942","uc_match":"1f942","uc_greedy":"1f942","shortnames":[":clinking_glass:"],"category":"food"},":chart:":{"uc_base":"1f4b9","uc_output":"1f4b9","uc_match":"1f4b9","uc_greedy":"1f4b9","shortnames":[],"category":"symbols"},":chart_with_downwards_trend:":{"uc_base":"1f4c9","uc_output":"1f4c9","uc_match":"1f4c9","uc_greedy":"1f4c9","shortnames":[],"category":"objects"},":chart_with_upwards_trend:":{"uc_base":"1f4c8","uc_output":"1f4c8","uc_match":"1f4c8","uc_greedy":"1f4c8","shortnames":[],"category":"objects"},":checkered_flag:":{"uc_base":"1f3c1","uc_output":"1f3c1","uc_match":"1f3c1","uc_greedy":"1f3c1","shortnames":[],"category":"flags"},":cheese:":{"uc_base":"1f9c0","uc_output":"1f9c0","uc_match":"1f9c0","uc_greedy":"1f9c0","shortnames":[":cheese_wedge:"],"category":"food"},":cherries:":{"uc_base":"1f352","uc_output":"1f352","uc_match":"1f352","uc_greedy":"1f352","shortnames":[],"category":"food"},":cherry_blossom:":{"uc_base":"1f338","uc_output":"1f338","uc_match":"1f338","uc_greedy":"1f338","shortnames":[],"category":"nature"},":chestnut:":{"uc_base":"1f330","uc_output":"1f330","uc_match":"1f330","uc_greedy":"1f330","shortnames":[],"category":"food"},":chicken:":{"uc_base":"1f414","uc_output":"1f414","uc_match":"1f414","uc_greedy":"1f414","shortnames":[],"category":"nature"},":child:":{"uc_base":"1f9d2","uc_output":"1f9d2","uc_match":"1f9d2","uc_greedy":"1f9d2","shortnames":[],"category":"people"},":children_crossing:":{"uc_base":"1f6b8","uc_output":"1f6b8","uc_match":"1f6b8","uc_greedy":"1f6b8","shortnames":[],"category":"symbols"},":chocolate_bar:":{"uc_base":"1f36b","uc_output":"1f36b","uc_match":"1f36b","uc_greedy":"1f36b","shortnames":[],"category":"food"},":chopsticks:":{"uc_base":"1f962","uc_output":"1f962","uc_match":"1f962","uc_greedy":"1f962","shortnames":[],"category":"food"},":christmas_tree:":{"uc_base":"1f384","uc_output":"1f384","uc_match":"1f384","uc_greedy":"1f384","shortnames":[],"category":"nature"},":cinema:":{"uc_base":"1f3a6","uc_output":"1f3a6","uc_match":"1f3a6","uc_greedy":"1f3a6","shortnames":[],"category":"symbols"},":circus_tent:":{"uc_base":"1f3aa","uc_output":"1f3aa","uc_match":"1f3aa","uc_greedy":"1f3aa","shortnames":[],"category":"activity"},":city_dusk:":{"uc_base":"1f306","uc_output":"1f306","uc_match":"1f306","uc_greedy":"1f306","shortnames":[],"category":"travel"},":city_sunset:":{"uc_base":"1f307","uc_output":"1f307","uc_match":"1f307","uc_greedy":"1f307","shortnames":[":city_sunrise:"],"category":"travel"},":cl:":{"uc_base":"1f191","uc_output":"1f191","uc_match":"1f191","uc_greedy":"1f191","shortnames":[],"category":"symbols"},":clap:":{"uc_base":"1f44f","uc_output":"1f44f","uc_match":"1f44f","uc_greedy":"1f44f","shortnames":[],"category":"people"},":clapper:":{"uc_base":"1f3ac","uc_output":"1f3ac","uc_match":"1f3ac","uc_greedy":"1f3ac","shortnames":[],"category":"activity"},":clipboard:":{"uc_base":"1f4cb","uc_output":"1f4cb","uc_match":"1f4cb","uc_greedy":"1f4cb","shortnames":[],"category":"objects"},":clock1030:":{"uc_base":"1f565","uc_output":"1f565","uc_match":"1f565","uc_greedy":"1f565","shortnames":[],"category":"symbols"},":clock10:":{"uc_base":"1f559","uc_output":"1f559","uc_match":"1f559","uc_greedy":"1f559","shortnames":[],"category":"symbols"},":clock1130:":{"uc_base":"1f566","uc_output":"1f566","uc_match":"1f566","uc_greedy":"1f566","shortnames":[],"category":"symbols"},":clock11:":{"uc_base":"1f55a","uc_output":"1f55a","uc_match":"1f55a","uc_greedy":"1f55a","shortnames":[],"category":"symbols"},":clock1230:":{"uc_base":"1f567","uc_output":"1f567","uc_match":"1f567","uc_greedy":"1f567","shortnames":[],"category":"symbols"},":clock12:":{"uc_base":"1f55b","uc_output":"1f55b","uc_match":"1f55b","uc_greedy":"1f55b","shortnames":[],"category":"symbols"},":clock130:":{"uc_base":"1f55c","uc_output":"1f55c","uc_match":"1f55c","uc_greedy":"1f55c","shortnames":[],"category":"symbols"},":clock1:":{"uc_base":"1f550","uc_output":"1f550","uc_match":"1f550","uc_greedy":"1f550","shortnames":[],"category":"symbols"},":clock230:":{"uc_base":"1f55d","uc_output":"1f55d","uc_match":"1f55d","uc_greedy":"1f55d","shortnames":[],"category":"symbols"},":clock2:":{"uc_base":"1f551","uc_output":"1f551","uc_match":"1f551","uc_greedy":"1f551","shortnames":[],"category":"symbols"},":clock330:":{"uc_base":"1f55e","uc_output":"1f55e","uc_match":"1f55e","uc_greedy":"1f55e","shortnames":[],"category":"symbols"},":clock3:":{"uc_base":"1f552","uc_output":"1f552","uc_match":"1f552","uc_greedy":"1f552","shortnames":[],"category":"symbols"},":clock430:":{"uc_base":"1f55f","uc_output":"1f55f","uc_match":"1f55f","uc_greedy":"1f55f","shortnames":[],"category":"symbols"},":clock4:":{"uc_base":"1f553","uc_output":"1f553","uc_match":"1f553","uc_greedy":"1f553","shortnames":[],"category":"symbols"},":clock530:":{"uc_base":"1f560","uc_output":"1f560","uc_match":"1f560","uc_greedy":"1f560","shortnames":[],"category":"symbols"},":clock5:":{"uc_base":"1f554","uc_output":"1f554","uc_match":"1f554","uc_greedy":"1f554","shortnames":[],"category":"symbols"},":clock630:":{"uc_base":"1f561","uc_output":"1f561","uc_match":"1f561","uc_greedy":"1f561","shortnames":[],"category":"symbols"},":clock6:":{"uc_base":"1f555","uc_output":"1f555","uc_match":"1f555","uc_greedy":"1f555","shortnames":[],"category":"symbols"},":clock730:":{"uc_base":"1f562","uc_output":"1f562","uc_match":"1f562","uc_greedy":"1f562","shortnames":[],"category":"symbols"},":clock7:":{"uc_base":"1f556","uc_output":"1f556","uc_match":"1f556","uc_greedy":"1f556","shortnames":[],"category":"symbols"},":clock830:":{"uc_base":"1f563","uc_output":"1f563","uc_match":"1f563","uc_greedy":"1f563","shortnames":[],"category":"symbols"},":clock8:":{"uc_base":"1f557","uc_output":"1f557","uc_match":"1f557","uc_greedy":"1f557","shortnames":[],"category":"symbols"},":clock930:":{"uc_base":"1f564","uc_output":"1f564","uc_match":"1f564","uc_greedy":"1f564","shortnames":[],"category":"symbols"},":clock9:":{"uc_base":"1f558","uc_output":"1f558","uc_match":"1f558","uc_greedy":"1f558","shortnames":[],"category":"symbols"},":closed_book:":{"uc_base":"1f4d5","uc_output":"1f4d5","uc_match":"1f4d5","uc_greedy":"1f4d5","shortnames":[],"category":"objects"},":closed_lock_with_key:":{"uc_base":"1f510","uc_output":"1f510","uc_match":"1f510","uc_greedy":"1f510","shortnames":[],"category":"objects"},":closed_umbrella:":{"uc_base":"1f302","uc_output":"1f302","uc_match":"1f302","uc_greedy":"1f302","shortnames":[],"category":"people"},":clown:":{"uc_base":"1f921","uc_output":"1f921","uc_match":"1f921","uc_greedy":"1f921","shortnames":[":clown_face:"],"category":"people"},":coat:":{"uc_base":"1f9e5","uc_output":"1f9e5","uc_match":"1f9e5","uc_greedy":"1f9e5","shortnames":[],"category":"people"},":cocktail:":{"uc_base":"1f378","uc_output":"1f378","uc_match":"1f378","uc_greedy":"1f378","shortnames":[],"category":"food"},":coconut:":{"uc_base":"1f965","uc_output":"1f965","uc_match":"1f965","uc_greedy":"1f965","shortnames":[],"category":"food"},":cold_sweat:":{"uc_base":"1f630","uc_output":"1f630","uc_match":"1f630","uc_greedy":"1f630","shortnames":[],"category":"people"},":computer:":{"uc_base":"1f4bb","uc_output":"1f4bb","uc_match":"1f4bb","uc_greedy":"1f4bb","shortnames":[],"category":"objects"},":confetti_ball:":{"uc_base":"1f38a","uc_output":"1f38a","uc_match":"1f38a","uc_greedy":"1f38a","shortnames":[],"category":"objects"},":confounded:":{"uc_base":"1f616","uc_output":"1f616","uc_match":"1f616","uc_greedy":"1f616","shortnames":[],"category":"people"},":confused:":{"uc_base":"1f615","uc_output":"1f615","uc_match":"1f615","uc_greedy":"1f615","shortnames":[],"category":"people"},":construction:":{"uc_base":"1f6a7","uc_output":"1f6a7","uc_match":"1f6a7","uc_greedy":"1f6a7","shortnames":[],"category":"travel"},":construction_worker:":{"uc_base":"1f477","uc_output":"1f477","uc_match":"1f477","uc_greedy":"1f477","shortnames":[],"category":"people"},":convenience_store:":{"uc_base":"1f3ea","uc_output":"1f3ea","uc_match":"1f3ea","uc_greedy":"1f3ea","shortnames":[],"category":"travel"},":cookie:":{"uc_base":"1f36a","uc_output":"1f36a","uc_match":"1f36a","uc_greedy":"1f36a","shortnames":[],"category":"food"},":cooking:":{"uc_base":"1f373","uc_output":"1f373","uc_match":"1f373","uc_greedy":"1f373","shortnames":[],"category":"food"},":cool:":{"uc_base":"1f192","uc_output":"1f192","uc_match":"1f192","uc_greedy":"1f192","shortnames":[],"category":"symbols"},":corn:":{"uc_base":"1f33d","uc_output":"1f33d","uc_match":"1f33d","uc_greedy":"1f33d","shortnames":[],"category":"food"},":couple:":{"uc_base":"1f46b","uc_output":"1f46b","uc_match":"1f46b","uc_greedy":"1f46b","shortnames":[],"category":"people"},":couple_with_heart:":{"uc_base":"1f491","uc_output":"1f491","uc_match":"1f491","uc_greedy":"1f491","shortnames":[],"category":"people"},":couplekiss:":{"uc_base":"1f48f","uc_output":"1f48f","uc_match":"1f48f","uc_greedy":"1f48f","shortnames":[],"category":"people"},":cow2:":{"uc_base":"1f404","uc_output":"1f404","uc_match":"1f404","uc_greedy":"1f404","shortnames":[],"category":"nature"},":cow:":{"uc_base":"1f42e","uc_output":"1f42e","uc_match":"1f42e","uc_greedy":"1f42e","shortnames":[],"category":"nature"},":cowboy:":{"uc_base":"1f920","uc_output":"1f920","uc_match":"1f920","uc_greedy":"1f920","shortnames":[":face_with_cowboy_hat:"],"category":"people"},":crab:":{"uc_base":"1f980","uc_output":"1f980","uc_match":"1f980","uc_greedy":"1f980","shortnames":[],"category":"nature"},":crazy_face:":{"uc_base":"1f92a","uc_output":"1f92a","uc_match":"1f92a","uc_greedy":"1f92a","shortnames":[],"category":"people"},":credit_card:":{"uc_base":"1f4b3","uc_output":"1f4b3","uc_match":"1f4b3","uc_greedy":"1f4b3","shortnames":[],"category":"objects"},":crescent_moon:":{"uc_base":"1f319","uc_output":"1f319","uc_match":"1f319","uc_greedy":"1f319","shortnames":[],"category":"nature"},":cricket:":{"uc_base":"1f997","uc_output":"1f997","uc_match":"1f997","uc_greedy":"1f997","shortnames":[],"category":"nature"},":cricket_game:":{"uc_base":"1f3cf","uc_output":"1f3cf","uc_match":"1f3cf","uc_greedy":"1f3cf","shortnames":[":cricket_bat_ball:"],"category":"activity"},":crocodile:":{"uc_base":"1f40a","uc_output":"1f40a","uc_match":"1f40a","uc_greedy":"1f40a","shortnames":[],"category":"nature"},":croissant:":{"uc_base":"1f950","uc_output":"1f950","uc_match":"1f950","uc_greedy":"1f950","shortnames":[],"category":"food"},":crossed_flags:":{"uc_base":"1f38c","uc_output":"1f38c","uc_match":"1f38c","uc_greedy":"1f38c","shortnames":[],"category":"flags"},":crown:":{"uc_base":"1f451","uc_output":"1f451","uc_match":"1f451","uc_greedy":"1f451","shortnames":[],"category":"people"},":cry:":{"uc_base":"1f622","uc_output":"1f622","uc_match":"1f622","uc_greedy":"1f622","shortnames":[],"category":"people"},":crying_cat_face:":{"uc_base":"1f63f","uc_output":"1f63f","uc_match":"1f63f","uc_greedy":"1f63f","shortnames":[],"category":"people"},":crystal_ball:":{"uc_base":"1f52e","uc_output":"1f52e","uc_match":"1f52e","uc_greedy":"1f52e","shortnames":[],"category":"objects"},":cucumber:":{"uc_base":"1f952","uc_output":"1f952","uc_match":"1f952","uc_greedy":"1f952","shortnames":[],"category":"food"},":cup_with_straw:":{"uc_base":"1f964","uc_output":"1f964","uc_match":"1f964","uc_greedy":"1f964","shortnames":[],"category":"food"},":cupid:":{"uc_base":"1f498","uc_output":"1f498","uc_match":"1f498","uc_greedy":"1f498","shortnames":[],"category":"symbols"},":curling_stone:":{"uc_base":"1f94c","uc_output":"1f94c","uc_match":"1f94c","uc_greedy":"1f94c","shortnames":[],"category":"activity"},":currency_exchange:":{"uc_base":"1f4b1","uc_output":"1f4b1","uc_match":"1f4b1","uc_greedy":"1f4b1","shortnames":[],"category":"symbols"},":curry:":{"uc_base":"1f35b","uc_output":"1f35b","uc_match":"1f35b","uc_greedy":"1f35b","shortnames":[],"category":"food"},":custard:":{"uc_base":"1f36e","uc_output":"1f36e","uc_match":"1f36e","uc_greedy":"1f36e","shortnames":[":pudding:",":flan:"],"category":"food"},":customs:":{"uc_base":"1f6c3","uc_output":"1f6c3","uc_match":"1f6c3","uc_greedy":"1f6c3","shortnames":[],"category":"symbols"},":cut_of_meat:":{"uc_base":"1f969","uc_output":"1f969","uc_match":"1f969","uc_greedy":"1f969","shortnames":[],"category":"food"},":cyclone:":{"uc_base":"1f300","uc_output":"1f300","uc_match":"1f300","uc_greedy":"1f300","shortnames":[],"category":"symbols"},":dancer:":{"uc_base":"1f483","uc_output":"1f483","uc_match":"1f483","uc_greedy":"1f483","shortnames":[],"category":"people"},":dango:":{"uc_base":"1f361","uc_output":"1f361","uc_match":"1f361","uc_greedy":"1f361","shortnames":[],"category":"food"},":dart:":{"uc_base":"1f3af","uc_output":"1f3af","uc_match":"1f3af","uc_greedy":"1f3af","shortnames":[],"category":"activity"},":dash:":{"uc_base":"1f4a8","uc_output":"1f4a8","uc_match":"1f4a8","uc_greedy":"1f4a8","shortnames":[],"category":"nature"},":date:":{"uc_base":"1f4c5","uc_output":"1f4c5","uc_match":"1f4c5","uc_greedy":"1f4c5","shortnames":[],"category":"objects"},":deciduous_tree:":{"uc_base":"1f333","uc_output":"1f333","uc_match":"1f333","uc_greedy":"1f333","shortnames":[],"category":"nature"},":deer:":{"uc_base":"1f98c","uc_output":"1f98c","uc_match":"1f98c","uc_greedy":"1f98c","shortnames":[],"category":"nature"},":department_store:":{"uc_base":"1f3ec","uc_output":"1f3ec","uc_match":"1f3ec","uc_greedy":"1f3ec","shortnames":[],"category":"travel"},":diamond_shape_with_a_dot_inside:":{"uc_base":"1f4a0","uc_output":"1f4a0","uc_match":"1f4a0","uc_greedy":"1f4a0","shortnames":[],"category":"symbols"},":disappointed:":{"uc_base":"1f61e","uc_output":"1f61e","uc_match":"1f61e","uc_greedy":"1f61e","shortnames":[],"category":"people"},":disappointed_relieved:":{"uc_base":"1f625","uc_output":"1f625","uc_match":"1f625","uc_greedy":"1f625","shortnames":[],"category":"people"},":dizzy:":{"uc_base":"1f4ab","uc_output":"1f4ab","uc_match":"1f4ab","uc_greedy":"1f4ab","shortnames":[],"category":"nature"},":dizzy_face:":{"uc_base":"1f635","uc_output":"1f635","uc_match":"1f635","uc_greedy":"1f635","shortnames":[],"category":"people"},":do_not_litter:":{"uc_base":"1f6af","uc_output":"1f6af","uc_match":"1f6af","uc_greedy":"1f6af","shortnames":[],"category":"symbols"},":dog2:":{"uc_base":"1f415","uc_output":"1f415","uc_match":"1f415","uc_greedy":"1f415","shortnames":[],"category":"nature"},":dog:":{"uc_base":"1f436","uc_output":"1f436","uc_match":"1f436","uc_greedy":"1f436","shortnames":[],"category":"nature"},":dollar:":{"uc_base":"1f4b5","uc_output":"1f4b5","uc_match":"1f4b5","uc_greedy":"1f4b5","shortnames":[],"category":"objects"},":dolls:":{"uc_base":"1f38e","uc_output":"1f38e","uc_match":"1f38e","uc_greedy":"1f38e","shortnames":[],"category":"objects"},":dolphin:":{"uc_base":"1f42c","uc_output":"1f42c","uc_match":"1f42c","uc_greedy":"1f42c","shortnames":[],"category":"nature"},":door:":{"uc_base":"1f6aa","uc_output":"1f6aa","uc_match":"1f6aa","uc_greedy":"1f6aa","shortnames":[],"category":"objects"},":doughnut:":{"uc_base":"1f369","uc_output":"1f369","uc_match":"1f369","uc_greedy":"1f369","shortnames":[],"category":"food"},":dragon:":{"uc_base":"1f409","uc_output":"1f409","uc_match":"1f409","uc_greedy":"1f409","shortnames":[],"category":"nature"},":dragon_face:":{"uc_base":"1f432","uc_output":"1f432","uc_match":"1f432","uc_greedy":"1f432","shortnames":[],"category":"nature"},":dress:":{"uc_base":"1f457","uc_output":"1f457","uc_match":"1f457","uc_greedy":"1f457","shortnames":[],"category":"people"},":dromedary_camel:":{"uc_base":"1f42a","uc_output":"1f42a","uc_match":"1f42a","uc_greedy":"1f42a","shortnames":[],"category":"nature"},":drooling_face:":{"uc_base":"1f924","uc_output":"1f924","uc_match":"1f924","uc_greedy":"1f924","shortnames":[":drool:"],"category":"people"},":droplet:":{"uc_base":"1f4a7","uc_output":"1f4a7","uc_match":"1f4a7","uc_greedy":"1f4a7","shortnames":[],"category":"nature"},":drum:":{"uc_base":"1f941","uc_output":"1f941","uc_match":"1f941","uc_greedy":"1f941","shortnames":[":drum_with_drumsticks:"],"category":"activity"},":duck:":{"uc_base":"1f986","uc_output":"1f986","uc_match":"1f986","uc_greedy":"1f986","shortnames":[],"category":"nature"},":dumpling:":{"uc_base":"1f95f","uc_output":"1f95f","uc_match":"1f95f","uc_greedy":"1f95f","shortnames":[],"category":"food"},":dvd:":{"uc_base":"1f4c0","uc_output":"1f4c0","uc_match":"1f4c0","uc_greedy":"1f4c0","shortnames":[],"category":"objects"},":e-mail:":{"uc_base":"1f4e7","uc_output":"1f4e7","uc_match":"1f4e7","uc_greedy":"1f4e7","shortnames":[":email:"],"category":"objects"},":eagle:":{"uc_base":"1f985","uc_output":"1f985","uc_match":"1f985","uc_greedy":"1f985","shortnames":[],"category":"nature"},":ear:":{"uc_base":"1f442","uc_output":"1f442","uc_match":"1f442","uc_greedy":"1f442","shortnames":[],"category":"people"},":ear_of_rice:":{"uc_base":"1f33e","uc_output":"1f33e","uc_match":"1f33e","uc_greedy":"1f33e","shortnames":[],"category":"nature"},":earth_africa:":{"uc_base":"1f30d","uc_output":"1f30d","uc_match":"1f30d","uc_greedy":"1f30d","shortnames":[],"category":"nature"},":earth_americas:":{"uc_base":"1f30e","uc_output":"1f30e","uc_match":"1f30e","uc_greedy":"1f30e","shortnames":[],"category":"nature"},":earth_asia:":{"uc_base":"1f30f","uc_output":"1f30f","uc_match":"1f30f","uc_greedy":"1f30f","shortnames":[],"category":"nature"},":egg:":{"uc_base":"1f95a","uc_output":"1f95a","uc_match":"1f95a","uc_greedy":"1f95a","shortnames":[],"category":"food"},":eggplant:":{"uc_base":"1f346","uc_output":"1f346","uc_match":"1f346","uc_greedy":"1f346","shortnames":[],"category":"food"},":electric_plug:":{"uc_base":"1f50c","uc_output":"1f50c","uc_match":"1f50c","uc_greedy":"1f50c","shortnames":[],"category":"objects"},":elephant:":{"uc_base":"1f418","uc_output":"1f418","uc_match":"1f418","uc_greedy":"1f418","shortnames":[],"category":"nature"},":elf:":{"uc_base":"1f9dd","uc_output":"1f9dd","uc_match":"1f9dd","uc_greedy":"1f9dd","shortnames":[],"category":"people"},":end:":{"uc_base":"1f51a","uc_output":"1f51a","uc_match":"1f51a","uc_greedy":"1f51a","shortnames":[],"category":"symbols"},":envelope_with_arrow:":{"uc_base":"1f4e9","uc_output":"1f4e9","uc_match":"1f4e9","uc_greedy":"1f4e9","shortnames":[],"category":"objects"},":euro:":{"uc_base":"1f4b6","uc_output":"1f4b6","uc_match":"1f4b6","uc_greedy":"1f4b6","shortnames":[],"category":"objects"},":european_castle:":{"uc_base":"1f3f0","uc_output":"1f3f0","uc_match":"1f3f0","uc_greedy":"1f3f0","shortnames":[],"category":"travel"},":european_post_office:":{"uc_base":"1f3e4","uc_output":"1f3e4","uc_match":"1f3e4","uc_greedy":"1f3e4","shortnames":[],"category":"travel"},":evergreen_tree:":{"uc_base":"1f332","uc_output":"1f332","uc_match":"1f332","uc_greedy":"1f332","shortnames":[],"category":"nature"},":exploding_head:":{"uc_base":"1f92f","uc_output":"1f92f","uc_match":"1f92f","uc_greedy":"1f92f","shortnames":[],"category":"people"},":expressionless:":{"uc_base":"1f611","uc_output":"1f611","uc_match":"1f611","uc_greedy":"1f611","shortnames":[],"category":"people"},":eyeglasses:":{"uc_base":"1f453","uc_output":"1f453","uc_match":"1f453","uc_greedy":"1f453","shortnames":[],"category":"people"},":eyes:":{"uc_base":"1f440","uc_output":"1f440","uc_match":"1f440","uc_greedy":"1f440","shortnames":[],"category":"people"},":face_vomiting:":{"uc_base":"1f92e","uc_output":"1f92e","uc_match":"1f92e","uc_greedy":"1f92e","shortnames":[],"category":"people"},":face_with_hand_over_mouth:":{"uc_base":"1f92d","uc_output":"1f92d","uc_match":"1f92d","uc_greedy":"1f92d","shortnames":[],"category":"people"},":face_with_monocle:":{"uc_base":"1f9d0","uc_output":"1f9d0","uc_match":"1f9d0","uc_greedy":"1f9d0","shortnames":[],"category":"people"},":face_with_raised_eyebrow:":{"uc_base":"1f928","uc_output":"1f928","uc_match":"1f928","uc_greedy":"1f928","shortnames":[],"category":"people"},":face_with_symbols_over_mouth:":{"uc_base":"1f92c","uc_output":"1f92c","uc_match":"1f92c","uc_greedy":"1f92c","shortnames":[],"category":"people"},":factory:":{"uc_base":"1f3ed","uc_output":"1f3ed","uc_match":"1f3ed","uc_greedy":"1f3ed","shortnames":[],"category":"travel"},":fairy:":{"uc_base":"1f9da","uc_output":"1f9da","uc_match":"1f9da","uc_greedy":"1f9da","shortnames":[],"category":"people"},":fallen_leaf:":{"uc_base":"1f342","uc_output":"1f342","uc_match":"1f342","uc_greedy":"1f342","shortnames":[],"category":"nature"},":family:":{"uc_base":"1f46a","uc_output":"1f46a","uc_match":"1f46a","uc_greedy":"1f46a","shortnames":[],"category":"people"},":fax:":{"uc_base":"1f4e0","uc_output":"1f4e0","uc_match":"1f4e0","uc_greedy":"1f4e0","shortnames":[],"category":"objects"},":fearful:":{"uc_base":"1f628","uc_output":"1f628","uc_match":"1f628","uc_greedy":"1f628","shortnames":[],"category":"people"},":feet:":{"uc_base":"1f43e","uc_output":"1f43e","uc_match":"1f43e","uc_greedy":"1f43e","shortnames":[":paw_prints:"],"category":"nature"},":ferris_wheel:":{"uc_base":"1f3a1","uc_output":"1f3a1","uc_match":"1f3a1","uc_greedy":"1f3a1","shortnames":[],"category":"travel"},":field_hockey:":{"uc_base":"1f3d1","uc_output":"1f3d1","uc_match":"1f3d1","uc_greedy":"1f3d1","shortnames":[],"category":"activity"},":file_folder:":{"uc_base":"1f4c1","uc_output":"1f4c1","uc_match":"1f4c1","uc_greedy":"1f4c1","shortnames":[],"category":"objects"},":fingers_crossed:":{"uc_base":"1f91e","uc_output":"1f91e","uc_match":"1f91e","uc_greedy":"1f91e","shortnames":[":hand_with_index_and_middle_finger_crossed:"],"category":"people"},":fire:":{"uc_base":"1f525","uc_output":"1f525","uc_match":"1f525","uc_greedy":"1f525","shortnames":[":flame:"],"category":"nature"},":fire_engine:":{"uc_base":"1f692","uc_output":"1f692","uc_match":"1f692","uc_greedy":"1f692","shortnames":[],"category":"travel"},":fireworks:":{"uc_base":"1f386","uc_output":"1f386","uc_match":"1f386","uc_greedy":"1f386","shortnames":[],"category":"travel"},":first_place:":{"uc_base":"1f947","uc_output":"1f947","uc_match":"1f947","uc_greedy":"1f947","shortnames":[":first_place_medal:"],"category":"activity"},":first_quarter_moon:":{"uc_base":"1f313","uc_output":"1f313","uc_match":"1f313","uc_greedy":"1f313","shortnames":[],"category":"nature"},":first_quarter_moon_with_face:":{"uc_base":"1f31b","uc_output":"1f31b","uc_match":"1f31b","uc_greedy":"1f31b","shortnames":[],"category":"nature"},":fish:":{"uc_base":"1f41f","uc_output":"1f41f","uc_match":"1f41f","uc_greedy":"1f41f","shortnames":[],"category":"nature"},":fish_cake:":{"uc_base":"1f365","uc_output":"1f365","uc_match":"1f365","uc_greedy":"1f365","shortnames":[],"category":"food"},":fishing_pole_and_fish:":{"uc_base":"1f3a3","uc_output":"1f3a3","uc_match":"1f3a3","uc_greedy":"1f3a3","shortnames":[],"category":"activity"},":flag_black:":{"uc_base":"1f3f4","uc_output":"1f3f4","uc_match":"1f3f4","uc_greedy":"1f3f4","shortnames":[":waving_black_flag:"],"category":"flags"},":flags:":{"uc_base":"1f38f","uc_output":"1f38f","uc_match":"1f38f","uc_greedy":"1f38f","shortnames":[],"category":"objects"},":flashlight:":{"uc_base":"1f526","uc_output":"1f526","uc_match":"1f526","uc_greedy":"1f526","shortnames":[],"category":"objects"},":floppy_disk:":{"uc_base":"1f4be","uc_output":"1f4be","uc_match":"1f4be","uc_greedy":"1f4be","shortnames":[],"category":"objects"},":flower_playing_cards:":{"uc_base":"1f3b4","uc_output":"1f3b4","uc_match":"1f3b4","uc_greedy":"1f3b4","shortnames":[],"category":"symbols"},":flushed:":{"uc_base":"1f633","uc_output":"1f633","uc_match":"1f633","uc_greedy":"1f633","shortnames":[],"category":"people"},":flying_saucer:":{"uc_base":"1f6f8","uc_output":"1f6f8","uc_match":"1f6f8","uc_greedy":"1f6f8","shortnames":[],"category":"travel"},":foggy:":{"uc_base":"1f301","uc_output":"1f301","uc_match":"1f301","uc_greedy":"1f301","shortnames":[],"category":"travel"},":football:":{"uc_base":"1f3c8","uc_output":"1f3c8","uc_match":"1f3c8","uc_greedy":"1f3c8","shortnames":[],"category":"activity"},":footprints:":{"uc_base":"1f463","uc_output":"1f463","uc_match":"1f463","uc_greedy":"1f463","shortnames":[],"category":"people"},":fork_and_knife:":{"uc_base":"1f374","uc_output":"1f374","uc_match":"1f374","uc_greedy":"1f374","shortnames":[],"category":"food"},":fortune_cookie:":{"uc_base":"1f960","uc_output":"1f960","uc_match":"1f960","uc_greedy":"1f960","shortnames":[],"category":"food"},":four_leaf_clover:":{"uc_base":"1f340","uc_output":"1f340","uc_match":"1f340","uc_greedy":"1f340","shortnames":[],"category":"nature"},":fox:":{"uc_base":"1f98a","uc_output":"1f98a","uc_match":"1f98a","uc_greedy":"1f98a","shortnames":[":fox_face:"],"category":"nature"},":free:":{"uc_base":"1f193","uc_output":"1f193","uc_match":"1f193","uc_greedy":"1f193","shortnames":[],"category":"symbols"},":french_bread:":{"uc_base":"1f956","uc_output":"1f956","uc_match":"1f956","uc_greedy":"1f956","shortnames":[":baguette_bread:"],"category":"food"},":fried_shrimp:":{"uc_base":"1f364","uc_output":"1f364","uc_match":"1f364","uc_greedy":"1f364","shortnames":[],"category":"food"},":fries:":{"uc_base":"1f35f","uc_output":"1f35f","uc_match":"1f35f","uc_greedy":"1f35f","shortnames":[],"category":"food"},":frog:":{"uc_base":"1f438","uc_output":"1f438","uc_match":"1f438","uc_greedy":"1f438","shortnames":[],"category":"nature"},":frowning:":{"uc_base":"1f626","uc_output":"1f626","uc_match":"1f626","uc_greedy":"1f626","shortnames":[],"category":"people"},":full_moon:":{"uc_base":"1f315","uc_output":"1f315","uc_match":"1f315","uc_greedy":"1f315","shortnames":[],"category":"nature"},":full_moon_with_face:":{"uc_base":"1f31d","uc_output":"1f31d","uc_match":"1f31d","uc_greedy":"1f31d","shortnames":[],"category":"nature"},":game_die:":{"uc_base":"1f3b2","uc_output":"1f3b2","uc_match":"1f3b2","uc_greedy":"1f3b2","shortnames":[],"category":"activity"},":gem:":{"uc_base":"1f48e","uc_output":"1f48e","uc_match":"1f48e","uc_greedy":"1f48e","shortnames":[],"category":"objects"},":genie:":{"uc_base":"1f9de","uc_output":"1f9de","uc_match":"1f9de","uc_greedy":"1f9de","shortnames":[],"category":"people"},":ghost:":{"uc_base":"1f47b","uc_output":"1f47b","uc_match":"1f47b","uc_greedy":"1f47b","shortnames":[],"category":"people"},":gift:":{"uc_base":"1f381","uc_output":"1f381","uc_match":"1f381","uc_greedy":"1f381","shortnames":[],"category":"objects"},":gift_heart:":{"uc_base":"1f49d","uc_output":"1f49d","uc_match":"1f49d","uc_greedy":"1f49d","shortnames":[],"category":"symbols"},":giraffe:":{"uc_base":"1f992","uc_output":"1f992","uc_match":"1f992","uc_greedy":"1f992","shortnames":[],"category":"nature"},":girl:":{"uc_base":"1f467","uc_output":"1f467","uc_match":"1f467","uc_greedy":"1f467","shortnames":[],"category":"people"},":globe_with_meridians:":{"uc_base":"1f310","uc_output":"1f310","uc_match":"1f310","uc_greedy":"1f310","shortnames":[],"category":"symbols"},":gloves:":{"uc_base":"1f9e4","uc_output":"1f9e4","uc_match":"1f9e4","uc_greedy":"1f9e4","shortnames":[],"category":"people"},":goal:":{"uc_base":"1f945","uc_output":"1f945","uc_match":"1f945","uc_greedy":"1f945","shortnames":[":goal_net:"],"category":"activity"},":goat:":{"uc_base":"1f410","uc_output":"1f410","uc_match":"1f410","uc_greedy":"1f410","shortnames":[],"category":"nature"},":gorilla:":{"uc_base":"1f98d","uc_output":"1f98d","uc_match":"1f98d","uc_greedy":"1f98d","shortnames":[],"category":"nature"},":grapes:":{"uc_base":"1f347","uc_output":"1f347","uc_match":"1f347","uc_greedy":"1f347","shortnames":[],"category":"food"},":green_apple:":{"uc_base":"1f34f","uc_output":"1f34f","uc_match":"1f34f","uc_greedy":"1f34f","shortnames":[],"category":"food"},":green_book:":{"uc_base":"1f4d7","uc_output":"1f4d7","uc_match":"1f4d7","uc_greedy":"1f4d7","shortnames":[],"category":"objects"},":green_heart:":{"uc_base":"1f49a","uc_output":"1f49a","uc_match":"1f49a","uc_greedy":"1f49a","shortnames":[],"category":"symbols"},":grimacing:":{"uc_base":"1f62c","uc_output":"1f62c","uc_match":"1f62c","uc_greedy":"1f62c","shortnames":[],"category":"people"},":grin:":{"uc_base":"1f601","uc_output":"1f601","uc_match":"1f601","uc_greedy":"1f601","shortnames":[],"category":"people"},":grinning:":{"uc_base":"1f600","uc_output":"1f600","uc_match":"1f600","uc_greedy":"1f600","shortnames":[],"category":"people"},":guard:":{"uc_base":"1f482","uc_output":"1f482","uc_match":"1f482","uc_greedy":"1f482","shortnames":[":guardsman:"],"category":"people"},":guitar:":{"uc_base":"1f3b8","uc_output":"1f3b8","uc_match":"1f3b8","uc_greedy":"1f3b8","shortnames":[],"category":"activity"},":gun:":{"uc_base":"1f52b","uc_output":"1f52b","uc_match":"1f52b","uc_greedy":"1f52b","shortnames":[],"category":"objects"},":hamburger:":{"uc_base":"1f354","uc_output":"1f354","uc_match":"1f354","uc_greedy":"1f354","shortnames":[],"category":"food"},":hammer:":{"uc_base":"1f528","uc_output":"1f528","uc_match":"1f528","uc_greedy":"1f528","shortnames":[],"category":"objects"},":hamster:":{"uc_base":"1f439","uc_output":"1f439","uc_match":"1f439","uc_greedy":"1f439","shortnames":[],"category":"nature"},":handbag:":{"uc_base":"1f45c","uc_output":"1f45c","uc_match":"1f45c","uc_greedy":"1f45c","shortnames":[],"category":"people"},":handshake:":{"uc_base":"1f91d","uc_output":"1f91d","uc_match":"1f91d","uc_greedy":"1f91d","shortnames":[":shaking_hands:"],"category":"people"},":hatched_chick:":{"uc_base":"1f425","uc_output":"1f425","uc_match":"1f425","uc_greedy":"1f425","shortnames":[],"category":"nature"},":hatching_chick:":{"uc_base":"1f423","uc_output":"1f423","uc_match":"1f423","uc_greedy":"1f423","shortnames":[],"category":"nature"},":head_bandage:":{"uc_base":"1f915","uc_output":"1f915","uc_match":"1f915","uc_greedy":"1f915","shortnames":[":face_with_head_bandage:"],"category":"people"},":headphones:":{"uc_base":"1f3a7","uc_output":"1f3a7","uc_match":"1f3a7","uc_greedy":"1f3a7","shortnames":[],"category":"activity"},":hear_no_evil:":{"uc_base":"1f649","uc_output":"1f649","uc_match":"1f649","uc_greedy":"1f649","shortnames":[],"category":"nature"},":heart_decoration:":{"uc_base":"1f49f","uc_output":"1f49f","uc_match":"1f49f","uc_greedy":"1f49f","shortnames":[],"category":"symbols"},":heart_eyes:":{"uc_base":"1f60d","uc_output":"1f60d","uc_match":"1f60d","uc_greedy":"1f60d","shortnames":[],"category":"people"},":heart_eyes_cat:":{"uc_base":"1f63b","uc_output":"1f63b","uc_match":"1f63b","uc_greedy":"1f63b","shortnames":[],"category":"people"},":heartbeat:":{"uc_base":"1f493","uc_output":"1f493","uc_match":"1f493","uc_greedy":"1f493","shortnames":[],"category":"symbols"},":heartpulse:":{"uc_base":"1f497","uc_output":"1f497","uc_match":"1f497","uc_greedy":"1f497","shortnames":[],"category":"symbols"},":heavy_dollar_sign:":{"uc_base":"1f4b2","uc_output":"1f4b2","uc_match":"1f4b2","uc_greedy":"1f4b2","shortnames":[],"category":"symbols"},":hedgehog:":{"uc_base":"1f994","uc_output":"1f994","uc_match":"1f994","uc_greedy":"1f994","shortnames":[],"category":"nature"},":helicopter:":{"uc_base":"1f681","uc_output":"1f681","uc_match":"1f681","uc_greedy":"1f681","shortnames":[],"category":"travel"},":herb:":{"uc_base":"1f33f","uc_output":"1f33f","uc_match":"1f33f","uc_greedy":"1f33f","shortnames":[],"category":"nature"},":hibiscus:":{"uc_base":"1f33a","uc_output":"1f33a","uc_match":"1f33a","uc_greedy":"1f33a","shortnames":[],"category":"nature"},":high_brightness:":{"uc_base":"1f506","uc_output":"1f506","uc_match":"1f506","uc_greedy":"1f506","shortnames":[],"category":"symbols"},":high_heel:":{"uc_base":"1f460","uc_output":"1f460","uc_match":"1f460","uc_greedy":"1f460","shortnames":[],"category":"people"},":hockey:":{"uc_base":"1f3d2","uc_output":"1f3d2","uc_match":"1f3d2","uc_greedy":"1f3d2","shortnames":[],"category":"activity"},":honey_pot:":{"uc_base":"1f36f","uc_output":"1f36f","uc_match":"1f36f","uc_greedy":"1f36f","shortnames":[],"category":"food"},":horse:":{"uc_base":"1f434","uc_output":"1f434","uc_match":"1f434","uc_greedy":"1f434","shortnames":[],"category":"nature"},":horse_racing:":{"uc_base":"1f3c7","uc_output":"1f3c7","uc_match":"1f3c7","uc_greedy":"1f3c7","shortnames":[],"category":"activity"},":hospital:":{"uc_base":"1f3e5","uc_output":"1f3e5","uc_match":"1f3e5","uc_greedy":"1f3e5","shortnames":[],"category":"travel"},":hotdog:":{"uc_base":"1f32d","uc_output":"1f32d","uc_match":"1f32d","uc_greedy":"1f32d","shortnames":[":hot_dog:"],"category":"food"},":hotel:":{"uc_base":"1f3e8","uc_output":"1f3e8","uc_match":"1f3e8","uc_greedy":"1f3e8","shortnames":[],"category":"travel"},":house:":{"uc_base":"1f3e0","uc_output":"1f3e0","uc_match":"1f3e0","uc_greedy":"1f3e0","shortnames":[],"category":"travel"},":house_with_garden:":{"uc_base":"1f3e1","uc_output":"1f3e1","uc_match":"1f3e1","uc_greedy":"1f3e1","shortnames":[],"category":"travel"},":hugging:":{"uc_base":"1f917","uc_output":"1f917","uc_match":"1f917","uc_greedy":"1f917","shortnames":[":hugging_face:"],"category":"people"},":hushed:":{"uc_base":"1f62f","uc_output":"1f62f","uc_match":"1f62f","uc_greedy":"1f62f","shortnames":[],"category":"people"},":ice_cream:":{"uc_base":"1f368","uc_output":"1f368","uc_match":"1f368","uc_greedy":"1f368","shortnames":[],"category":"food"},":icecream:":{"uc_base":"1f366","uc_output":"1f366","uc_match":"1f366","uc_greedy":"1f366","shortnames":[],"category":"food"},":id:":{"uc_base":"1f194","uc_output":"1f194","uc_match":"1f194","uc_greedy":"1f194","shortnames":[],"category":"symbols"},":ideograph_advantage:":{"uc_base":"1f250","uc_output":"1f250","uc_match":"1f250","uc_greedy":"1f250","shortnames":[],"category":"symbols"},":imp:":{"uc_base":"1f47f","uc_output":"1f47f","uc_match":"1f47f","uc_greedy":"1f47f","shortnames":[],"category":"people"},":inbox_tray:":{"uc_base":"1f4e5","uc_output":"1f4e5","uc_match":"1f4e5","uc_greedy":"1f4e5","shortnames":[],"category":"objects"},":incoming_envelope:":{"uc_base":"1f4e8","uc_output":"1f4e8","uc_match":"1f4e8","uc_greedy":"1f4e8","shortnames":[],"category":"objects"},":innocent:":{"uc_base":"1f607","uc_output":"1f607","uc_match":"1f607","uc_greedy":"1f607","shortnames":[],"category":"people"},":iphone:":{"uc_base":"1f4f1","uc_output":"1f4f1","uc_match":"1f4f1","uc_greedy":"1f4f1","shortnames":[],"category":"objects"},":izakaya_lantern:":{"uc_base":"1f3ee","uc_output":"1f3ee","uc_match":"1f3ee","uc_greedy":"1f3ee","shortnames":[],"category":"objects"},":jack_o_lantern:":{"uc_base":"1f383","uc_output":"1f383","uc_match":"1f383","uc_greedy":"1f383","shortnames":[],"category":"people"},":japan:":{"uc_base":"1f5fe","uc_output":"1f5fe","uc_match":"1f5fe","uc_greedy":"1f5fe","shortnames":[],"category":"travel"},":japanese_castle:":{"uc_base":"1f3ef","uc_output":"1f3ef","uc_match":"1f3ef","uc_greedy":"1f3ef","shortnames":[],"category":"travel"},":japanese_goblin:":{"uc_base":"1f47a","uc_output":"1f47a","uc_match":"1f47a","uc_greedy":"1f47a","shortnames":[],"category":"people"},":japanese_ogre:":{"uc_base":"1f479","uc_output":"1f479","uc_match":"1f479","uc_greedy":"1f479","shortnames":[],"category":"people"},":jeans:":{"uc_base":"1f456","uc_output":"1f456","uc_match":"1f456","uc_greedy":"1f456","shortnames":[],"category":"people"},":joy:":{"uc_base":"1f602","uc_output":"1f602","uc_match":"1f602","uc_greedy":"1f602","shortnames":[],"category":"people"},":joy_cat:":{"uc_base":"1f639","uc_output":"1f639","uc_match":"1f639","uc_greedy":"1f639","shortnames":[],"category":"people"},":kaaba:":{"uc_base":"1f54b","uc_output":"1f54b","uc_match":"1f54b","uc_greedy":"1f54b","shortnames":[],"category":"travel"},":key:":{"uc_base":"1f511","uc_output":"1f511","uc_match":"1f511","uc_greedy":"1f511","shortnames":[],"category":"objects"},":keycap_ten:":{"uc_base":"1f51f","uc_output":"1f51f","uc_match":"1f51f","uc_greedy":"1f51f","shortnames":[],"category":"symbols"},":kimono:":{"uc_base":"1f458","uc_output":"1f458","uc_match":"1f458","uc_greedy":"1f458","shortnames":[],"category":"people"},":kiss:":{"uc_base":"1f48b","uc_output":"1f48b","uc_match":"1f48b","uc_greedy":"1f48b","shortnames":[],"category":"people"},":kissing:":{"uc_base":"1f617","uc_output":"1f617","uc_match":"1f617","uc_greedy":"1f617","shortnames":[],"category":"people"},":kissing_cat:":{"uc_base":"1f63d","uc_output":"1f63d","uc_match":"1f63d","uc_greedy":"1f63d","shortnames":[],"category":"people"},":kissing_closed_eyes:":{"uc_base":"1f61a","uc_output":"1f61a","uc_match":"1f61a","uc_greedy":"1f61a","shortnames":[],"category":"people"},":kissing_heart:":{"uc_base":"1f618","uc_output":"1f618","uc_match":"1f618","uc_greedy":"1f618","shortnames":[],"category":"people"},":kissing_smiling_eyes:":{"uc_base":"1f619","uc_output":"1f619","uc_match":"1f619","uc_greedy":"1f619","shortnames":[],"category":"people"},":kiwi:":{"uc_base":"1f95d","uc_output":"1f95d","uc_match":"1f95d","uc_greedy":"1f95d","shortnames":[":kiwifruit:"],"category":"food"},":knife:":{"uc_base":"1f52a","uc_output":"1f52a","uc_match":"1f52a","uc_greedy":"1f52a","shortnames":[],"category":"objects"},":koala:":{"uc_base":"1f428","uc_output":"1f428","uc_match":"1f428","uc_greedy":"1f428","shortnames":[],"category":"nature"},":koko:":{"uc_base":"1f201","uc_output":"1f201","uc_match":"1f201","uc_greedy":"1f201","shortnames":[],"category":"symbols"},":large_blue_diamond:":{"uc_base":"1f537","uc_output":"1f537","uc_match":"1f537","uc_greedy":"1f537","shortnames":[],"category":"symbols"},":large_orange_diamond:":{"uc_base":"1f536","uc_output":"1f536","uc_match":"1f536","uc_greedy":"1f536","shortnames":[],"category":"symbols"},":last_quarter_moon:":{"uc_base":"1f317","uc_output":"1f317","uc_match":"1f317","uc_greedy":"1f317","shortnames":[],"category":"nature"},":last_quarter_moon_with_face:":{"uc_base":"1f31c","uc_output":"1f31c","uc_match":"1f31c","uc_greedy":"1f31c","shortnames":[],"category":"nature"},":laughing:":{"uc_base":"1f606","uc_output":"1f606","uc_match":"1f606","uc_greedy":"1f606","shortnames":[":satisfied:"],"category":"people"},":leaves:":{"uc_base":"1f343","uc_output":"1f343","uc_match":"1f343","uc_greedy":"1f343","shortnames":[],"category":"nature"},":ledger:":{"uc_base":"1f4d2","uc_output":"1f4d2","uc_match":"1f4d2","uc_greedy":"1f4d2","shortnames":[],"category":"objects"},":left_facing_fist:":{"uc_base":"1f91b","uc_output":"1f91b","uc_match":"1f91b","uc_greedy":"1f91b","shortnames":[":left_fist:"],"category":"people"},":left_luggage:":{"uc_base":"1f6c5","uc_output":"1f6c5","uc_match":"1f6c5","uc_greedy":"1f6c5","shortnames":[],"category":"symbols"},":lemon:":{"uc_base":"1f34b","uc_output":"1f34b","uc_match":"1f34b","uc_greedy":"1f34b","shortnames":[],"category":"food"},":leopard:":{"uc_base":"1f406","uc_output":"1f406","uc_match":"1f406","uc_greedy":"1f406","shortnames":[],"category":"nature"},":light_rail:":{"uc_base":"1f688","uc_output":"1f688","uc_match":"1f688","uc_greedy":"1f688","shortnames":[],"category":"travel"},":link:":{"uc_base":"1f517","uc_output":"1f517","uc_match":"1f517","uc_greedy":"1f517","shortnames":[],"category":"objects"},":lion_face:":{"uc_base":"1f981","uc_output":"1f981","uc_match":"1f981","uc_greedy":"1f981","shortnames":[":lion:"],"category":"nature"},":lips:":{"uc_base":"1f444","uc_output":"1f444","uc_match":"1f444","uc_greedy":"1f444","shortnames":[],"category":"people"},":lipstick:":{"uc_base":"1f484","uc_output":"1f484","uc_match":"1f484","uc_greedy":"1f484","shortnames":[],"category":"people"},":lizard:":{"uc_base":"1f98e","uc_output":"1f98e","uc_match":"1f98e","uc_greedy":"1f98e","shortnames":[],"category":"nature"},":lock:":{"uc_base":"1f512","uc_output":"1f512","uc_match":"1f512","uc_greedy":"1f512","shortnames":[],"category":"objects"},":lock_with_ink_pen:":{"uc_base":"1f50f","uc_output":"1f50f","uc_match":"1f50f","uc_greedy":"1f50f","shortnames":[],"category":"objects"},":lollipop:":{"uc_base":"1f36d","uc_output":"1f36d","uc_match":"1f36d","uc_greedy":"1f36d","shortnames":[],"category":"food"},":loud_sound:":{"uc_base":"1f50a","uc_output":"1f50a","uc_match":"1f50a","uc_greedy":"1f50a","shortnames":[],"category":"symbols"},":loudspeaker:":{"uc_base":"1f4e2","uc_output":"1f4e2","uc_match":"1f4e2","uc_greedy":"1f4e2","shortnames":[],"category":"symbols"},":love_hotel:":{"uc_base":"1f3e9","uc_output":"1f3e9","uc_match":"1f3e9","uc_greedy":"1f3e9","shortnames":[],"category":"travel"},":love_letter:":{"uc_base":"1f48c","uc_output":"1f48c","uc_match":"1f48c","uc_greedy":"1f48c","shortnames":[],"category":"objects"},":love_you_gesture:":{"uc_base":"1f91f","uc_output":"1f91f","uc_match":"1f91f","uc_greedy":"1f91f","shortnames":[],"category":"people"},":low_brightness:":{"uc_base":"1f505","uc_output":"1f505","uc_match":"1f505","uc_greedy":"1f505","shortnames":[],"category":"symbols"},":lying_face:":{"uc_base":"1f925","uc_output":"1f925","uc_match":"1f925","uc_greedy":"1f925","shortnames":[":liar:"],"category":"people"},":mag:":{"uc_base":"1f50d","uc_output":"1f50d","uc_match":"1f50d","uc_greedy":"1f50d","shortnames":[],"category":"objects"},":mag_right:":{"uc_base":"1f50e","uc_output":"1f50e","uc_match":"1f50e","uc_greedy":"1f50e","shortnames":[],"category":"objects"},":mage:":{"uc_base":"1f9d9","uc_output":"1f9d9","uc_match":"1f9d9","uc_greedy":"1f9d9","shortnames":[],"category":"people"},":mahjong:":{"uc_base":"1f004","uc_output":"1f004","uc_match":"1f004","uc_greedy":"1f004","shortnames":[],"category":"symbols"},":mailbox:":{"uc_base":"1f4eb","uc_output":"1f4eb","uc_match":"1f4eb","uc_greedy":"1f4eb","shortnames":[],"category":"objects"},":mailbox_closed:":{"uc_base":"1f4ea","uc_output":"1f4ea","uc_match":"1f4ea","uc_greedy":"1f4ea","shortnames":[],"category":"objects"},":mailbox_with_mail:":{"uc_base":"1f4ec","uc_output":"1f4ec","uc_match":"1f4ec","uc_greedy":"1f4ec","shortnames":[],"category":"objects"},":mailbox_with_no_mail:":{"uc_base":"1f4ed","uc_output":"1f4ed","uc_match":"1f4ed","uc_greedy":"1f4ed","shortnames":[],"category":"objects"},":man:":{"uc_base":"1f468","uc_output":"1f468","uc_match":"1f468","uc_greedy":"1f468","shortnames":[],"category":"people"},":man_dancing:":{"uc_base":"1f57a","uc_output":"1f57a","uc_match":"1f57a","uc_greedy":"1f57a","shortnames":[":male_dancer:"],"category":"people"},":man_in_tuxedo:":{"uc_base":"1f935","uc_output":"1f935","uc_match":"1f935","uc_greedy":"1f935","shortnames":[],"category":"people"},":man_with_chinese_cap:":{"uc_base":"1f472","uc_output":"1f472","uc_match":"1f472","uc_greedy":"1f472","shortnames":[":man_with_gua_pi_mao:"],"category":"people"},":mans_shoe:":{"uc_base":"1f45e","uc_output":"1f45e","uc_match":"1f45e","uc_greedy":"1f45e","shortnames":[],"category":"people"},":maple_leaf:":{"uc_base":"1f341","uc_output":"1f341","uc_match":"1f341","uc_greedy":"1f341","shortnames":[],"category":"nature"},":martial_arts_uniform:":{"uc_base":"1f94b","uc_output":"1f94b","uc_match":"1f94b","uc_greedy":"1f94b","shortnames":[":karate_uniform:"],"category":"activity"},":mask:":{"uc_base":"1f637","uc_output":"1f637","uc_match":"1f637","uc_greedy":"1f637","shortnames":[],"category":"people"},":meat_on_bone:":{"uc_base":"1f356","uc_output":"1f356","uc_match":"1f356","uc_greedy":"1f356","shortnames":[],"category":"food"},":medal:":{"uc_base":"1f3c5","uc_output":"1f3c5","uc_match":"1f3c5","uc_greedy":"1f3c5","shortnames":[":sports_medal:"],"category":"activity"},":mega:":{"uc_base":"1f4e3","uc_output":"1f4e3","uc_match":"1f4e3","uc_greedy":"1f4e3","shortnames":[],"category":"symbols"},":melon:":{"uc_base":"1f348","uc_output":"1f348","uc_match":"1f348","uc_greedy":"1f348","shortnames":[],"category":"food"},":menorah:":{"uc_base":"1f54e","uc_output":"1f54e","uc_match":"1f54e","uc_greedy":"1f54e","shortnames":[],"category":"symbols"},":mens:":{"uc_base":"1f6b9","uc_output":"1f6b9","uc_match":"1f6b9","uc_greedy":"1f6b9","shortnames":[],"category":"symbols"},":merperson:":{"uc_base":"1f9dc","uc_output":"1f9dc","uc_match":"1f9dc","uc_greedy":"1f9dc","shortnames":[],"category":"people"},":metal:":{"uc_base":"1f918","uc_output":"1f918","uc_match":"1f918","uc_greedy":"1f918","shortnames":[":sign_of_the_horns:"],"category":"people"},":metro:":{"uc_base":"1f687","uc_output":"1f687","uc_match":"1f687","uc_greedy":"1f687","shortnames":[],"category":"travel"},":microphone:":{"uc_base":"1f3a4","uc_output":"1f3a4","uc_match":"1f3a4","uc_greedy":"1f3a4","shortnames":[],"category":"activity"},":microscope:":{"uc_base":"1f52c","uc_output":"1f52c","uc_match":"1f52c","uc_greedy":"1f52c","shortnames":[],"category":"objects"},":middle_finger:":{"uc_base":"1f595","uc_output":"1f595","uc_match":"1f595","uc_greedy":"1f595","shortnames":[":reversed_hand_with_middle_finger_extended:"],"category":"people"},":milk:":{"uc_base":"1f95b","uc_output":"1f95b","uc_match":"1f95b","uc_greedy":"1f95b","shortnames":[":glass_of_milk:"],"category":"food"},":milky_way:":{"uc_base":"1f30c","uc_output":"1f30c","uc_match":"1f30c","uc_greedy":"1f30c","shortnames":[],"category":"travel"},":minibus:":{"uc_base":"1f690","uc_output":"1f690","uc_match":"1f690","uc_greedy":"1f690","shortnames":[],"category":"travel"},":minidisc:":{"uc_base":"1f4bd","uc_output":"1f4bd","uc_match":"1f4bd","uc_greedy":"1f4bd","shortnames":[],"category":"objects"},":mobile_phone_off:":{"uc_base":"1f4f4","uc_output":"1f4f4","uc_match":"1f4f4","uc_greedy":"1f4f4","shortnames":[],"category":"symbols"},":money_mouth:":{"uc_base":"1f911","uc_output":"1f911","uc_match":"1f911","uc_greedy":"1f911","shortnames":[":money_mouth_face:"],"category":"people"},":money_with_wings:":{"uc_base":"1f4b8","uc_output":"1f4b8","uc_match":"1f4b8","uc_greedy":"1f4b8","shortnames":[],"category":"objects"},":moneybag:":{"uc_base":"1f4b0","uc_output":"1f4b0","uc_match":"1f4b0","uc_greedy":"1f4b0","shortnames":[],"category":"objects"},":monkey:":{"uc_base":"1f412","uc_output":"1f412","uc_match":"1f412","uc_greedy":"1f412","shortnames":[],"category":"nature"},":monkey_face:":{"uc_base":"1f435","uc_output":"1f435","uc_match":"1f435","uc_greedy":"1f435","shortnames":[],"category":"nature"},":monorail:":{"uc_base":"1f69d","uc_output":"1f69d","uc_match":"1f69d","uc_greedy":"1f69d","shortnames":[],"category":"travel"},":mortar_board:":{"uc_base":"1f393","uc_output":"1f393","uc_match":"1f393","uc_greedy":"1f393","shortnames":[],"category":"people"},":mosque:":{"uc_base":"1f54c","uc_output":"1f54c","uc_match":"1f54c","uc_greedy":"1f54c","shortnames":[],"category":"travel"},":motor_scooter:":{"uc_base":"1f6f5","uc_output":"1f6f5","uc_match":"1f6f5","uc_greedy":"1f6f5","shortnames":[":motorbike:"],"category":"travel"},":mount_fuji:":{"uc_base":"1f5fb","uc_output":"1f5fb","uc_match":"1f5fb","uc_greedy":"1f5fb","shortnames":[],"category":"travel"},":mountain_cableway:":{"uc_base":"1f6a0","uc_output":"1f6a0","uc_match":"1f6a0","uc_greedy":"1f6a0","shortnames":[],"category":"travel"},":mountain_railway:":{"uc_base":"1f69e","uc_output":"1f69e","uc_match":"1f69e","uc_greedy":"1f69e","shortnames":[],"category":"travel"},":mouse2:":{"uc_base":"1f401","uc_output":"1f401","uc_match":"1f401","uc_greedy":"1f401","shortnames":[],"category":"nature"},":mouse:":{"uc_base":"1f42d","uc_output":"1f42d","uc_match":"1f42d","uc_greedy":"1f42d","shortnames":[],"category":"nature"},":movie_camera:":{"uc_base":"1f3a5","uc_output":"1f3a5","uc_match":"1f3a5","uc_greedy":"1f3a5","shortnames":[],"category":"objects"},":moyai:":{"uc_base":"1f5ff","uc_output":"1f5ff","uc_match":"1f5ff","uc_greedy":"1f5ff","shortnames":[],"category":"travel"},":mrs_claus:":{"uc_base":"1f936","uc_output":"1f936","uc_match":"1f936","uc_greedy":"1f936","shortnames":[":mother_christmas:"],"category":"people"},":muscle:":{"uc_base":"1f4aa","uc_output":"1f4aa","uc_match":"1f4aa","uc_greedy":"1f4aa","shortnames":[],"category":"people"},":mushroom:":{"uc_base":"1f344","uc_output":"1f344","uc_match":"1f344","uc_greedy":"1f344","shortnames":[],"category":"nature"},":musical_keyboard:":{"uc_base":"1f3b9","uc_output":"1f3b9","uc_match":"1f3b9","uc_greedy":"1f3b9","shortnames":[],"category":"activity"},":musical_note:":{"uc_base":"1f3b5","uc_output":"1f3b5","uc_match":"1f3b5","uc_greedy":"1f3b5","shortnames":[],"category":"symbols"},":musical_score:":{"uc_base":"1f3bc","uc_output":"1f3bc","uc_match":"1f3bc","uc_greedy":"1f3bc","shortnames":[],"category":"activity"},":mute:":{"uc_base":"1f507","uc_output":"1f507","uc_match":"1f507","uc_greedy":"1f507","shortnames":[],"category":"symbols"},":nail_care:":{"uc_base":"1f485","uc_output":"1f485","uc_match":"1f485","uc_greedy":"1f485","shortnames":[],"category":"people"},":name_badge:":{"uc_base":"1f4db","uc_output":"1f4db","uc_match":"1f4db","uc_greedy":"1f4db","shortnames":[],"category":"symbols"},":nauseated_face:":{"uc_base":"1f922","uc_output":"1f922","uc_match":"1f922","uc_greedy":"1f922","shortnames":[":sick:"],"category":"people"},":necktie:":{"uc_base":"1f454","uc_output":"1f454","uc_match":"1f454","uc_greedy":"1f454","shortnames":[],"category":"people"},":nerd:":{"uc_base":"1f913","uc_output":"1f913","uc_match":"1f913","uc_greedy":"1f913","shortnames":[":nerd_face:"],"category":"people"},":neutral_face:":{"uc_base":"1f610","uc_output":"1f610","uc_match":"1f610","uc_greedy":"1f610","shortnames":[],"category":"people"},":new:":{"uc_base":"1f195","uc_output":"1f195","uc_match":"1f195","uc_greedy":"1f195","shortnames":[],"category":"symbols"},":new_moon:":{"uc_base":"1f311","uc_output":"1f311","uc_match":"1f311","uc_greedy":"1f311","shortnames":[],"category":"nature"},":new_moon_with_face:":{"uc_base":"1f31a","uc_output":"1f31a","uc_match":"1f31a","uc_greedy":"1f31a","shortnames":[],"category":"nature"},":newspaper:":{"uc_base":"1f4f0","uc_output":"1f4f0","uc_match":"1f4f0","uc_greedy":"1f4f0","shortnames":[],"category":"objects"},":ng:":{"uc_base":"1f196","uc_output":"1f196","uc_match":"1f196","uc_greedy":"1f196","shortnames":[],"category":"symbols"},":night_with_stars:":{"uc_base":"1f303","uc_output":"1f303","uc_match":"1f303","uc_greedy":"1f303","shortnames":[],"category":"travel"},":no_bell:":{"uc_base":"1f515","uc_output":"1f515","uc_match":"1f515","uc_greedy":"1f515","shortnames":[],"category":"symbols"},":no_bicycles:":{"uc_base":"1f6b3","uc_output":"1f6b3","uc_match":"1f6b3","uc_greedy":"1f6b3","shortnames":[],"category":"symbols"},":no_entry_sign:":{"uc_base":"1f6ab","uc_output":"1f6ab","uc_match":"1f6ab","uc_greedy":"1f6ab","shortnames":[],"category":"symbols"},":no_mobile_phones:":{"uc_base":"1f4f5","uc_output":"1f4f5","uc_match":"1f4f5","uc_greedy":"1f4f5","shortnames":[],"category":"symbols"},":no_mouth:":{"uc_base":"1f636","uc_output":"1f636","uc_match":"1f636","uc_greedy":"1f636","shortnames":[],"category":"people"},":no_pedestrians:":{"uc_base":"1f6b7","uc_output":"1f6b7","uc_match":"1f6b7","uc_greedy":"1f6b7","shortnames":[],"category":"symbols"},":no_smoking:":{"uc_base":"1f6ad","uc_output":"1f6ad","uc_match":"1f6ad","uc_greedy":"1f6ad","shortnames":[],"category":"symbols"},":non-potable_water:":{"uc_base":"1f6b1","uc_output":"1f6b1","uc_match":"1f6b1","uc_greedy":"1f6b1","shortnames":[],"category":"symbols"},":nose:":{"uc_base":"1f443","uc_output":"1f443","uc_match":"1f443","uc_greedy":"1f443","shortnames":[],"category":"people"},":notebook:":{"uc_base":"1f4d3","uc_output":"1f4d3","uc_match":"1f4d3","uc_greedy":"1f4d3","shortnames":[],"category":"objects"},":notebook_with_decorative_cover:":{"uc_base":"1f4d4","uc_output":"1f4d4","uc_match":"1f4d4","uc_greedy":"1f4d4","shortnames":[],"category":"objects"},":notes:":{"uc_base":"1f3b6","uc_output":"1f3b6","uc_match":"1f3b6","uc_greedy":"1f3b6","shortnames":[],"category":"symbols"},":nut_and_bolt:":{"uc_base":"1f529","uc_output":"1f529","uc_match":"1f529","uc_greedy":"1f529","shortnames":[],"category":"objects"},":ocean:":{"uc_base":"1f30a","uc_output":"1f30a","uc_match":"1f30a","uc_greedy":"1f30a","shortnames":[],"category":"nature"},":octagonal_sign:":{"uc_base":"1f6d1","uc_output":"1f6d1","uc_match":"1f6d1","uc_greedy":"1f6d1","shortnames":[":stop_sign:"],"category":"symbols"},":octopus:":{"uc_base":"1f419","uc_output":"1f419","uc_match":"1f419","uc_greedy":"1f419","shortnames":[],"category":"nature"},":oden:":{"uc_base":"1f362","uc_output":"1f362","uc_match":"1f362","uc_greedy":"1f362","shortnames":[],"category":"food"},":office:":{"uc_base":"1f3e2","uc_output":"1f3e2","uc_match":"1f3e2","uc_greedy":"1f3e2","shortnames":[],"category":"travel"},":ok:":{"uc_base":"1f197","uc_output":"1f197","uc_match":"1f197","uc_greedy":"1f197","shortnames":[],"category":"symbols"},":ok_hand:":{"uc_base":"1f44c","uc_output":"1f44c","uc_match":"1f44c","uc_greedy":"1f44c","shortnames":[],"category":"people"},":older_adult:":{"uc_base":"1f9d3","uc_output":"1f9d3","uc_match":"1f9d3","uc_greedy":"1f9d3","shortnames":[],"category":"people"},":older_man:":{"uc_base":"1f474","uc_output":"1f474","uc_match":"1f474","uc_greedy":"1f474","shortnames":[],"category":"people"},":older_woman:":{"uc_base":"1f475","uc_output":"1f475","uc_match":"1f475","uc_greedy":"1f475","shortnames":[":grandma:"],"category":"people"},":on:":{"uc_base":"1f51b","uc_output":"1f51b","uc_match":"1f51b","uc_greedy":"1f51b","shortnames":[],"category":"symbols"},":oncoming_automobile:":{"uc_base":"1f698","uc_output":"1f698","uc_match":"1f698","uc_greedy":"1f698","shortnames":[],"category":"travel"},":oncoming_bus:":{"uc_base":"1f68d","uc_output":"1f68d","uc_match":"1f68d","uc_greedy":"1f68d","shortnames":[],"category":"travel"},":oncoming_police_car:":{"uc_base":"1f694","uc_output":"1f694","uc_match":"1f694","uc_greedy":"1f694","shortnames":[],"category":"travel"},":oncoming_taxi:":{"uc_base":"1f696","uc_output":"1f696","uc_match":"1f696","uc_greedy":"1f696","shortnames":[],"category":"travel"},":open_file_folder:":{"uc_base":"1f4c2","uc_output":"1f4c2","uc_match":"1f4c2","uc_greedy":"1f4c2","shortnames":[],"category":"objects"},":open_hands:":{"uc_base":"1f450","uc_output":"1f450","uc_match":"1f450","uc_greedy":"1f450","shortnames":[],"category":"people"},":open_mouth:":{"uc_base":"1f62e","uc_output":"1f62e","uc_match":"1f62e","uc_greedy":"1f62e","shortnames":[],"category":"people"},":orange_book:":{"uc_base":"1f4d9","uc_output":"1f4d9","uc_match":"1f4d9","uc_greedy":"1f4d9","shortnames":[],"category":"objects"},":orange_heart:":{"uc_base":"1f9e1","uc_output":"1f9e1","uc_match":"1f9e1","uc_greedy":"1f9e1","shortnames":[],"category":"objects"},":outbox_tray:":{"uc_base":"1f4e4","uc_output":"1f4e4","uc_match":"1f4e4","uc_greedy":"1f4e4","shortnames":[],"category":"objects"},":owl:":{"uc_base":"1f989","uc_output":"1f989","uc_match":"1f989","uc_greedy":"1f989","shortnames":[],"category":"nature"},":ox:":{"uc_base":"1f402","uc_output":"1f402","uc_match":"1f402","uc_greedy":"1f402","shortnames":[],"category":"nature"},":package:":{"uc_base":"1f4e6","uc_output":"1f4e6","uc_match":"1f4e6","uc_greedy":"1f4e6","shortnames":[],"category":"objects"},":page_facing_up:":{"uc_base":"1f4c4","uc_output":"1f4c4","uc_match":"1f4c4","uc_greedy":"1f4c4","shortnames":[],"category":"objects"},":page_with_curl:":{"uc_base":"1f4c3","uc_output":"1f4c3","uc_match":"1f4c3","uc_greedy":"1f4c3","shortnames":[],"category":"objects"},":pager:":{"uc_base":"1f4df","uc_output":"1f4df","uc_match":"1f4df","uc_greedy":"1f4df","shortnames":[],"category":"objects"},":palm_tree:":{"uc_base":"1f334","uc_output":"1f334","uc_match":"1f334","uc_greedy":"1f334","shortnames":[],"category":"nature"},":palms_up_together:":{"uc_base":"1f932","uc_output":"1f932","uc_match":"1f932","uc_greedy":"1f932","shortnames":[],"category":"people"},":pancakes:":{"uc_base":"1f95e","uc_output":"1f95e","uc_match":"1f95e","uc_greedy":"1f95e","shortnames":[],"category":"food"},":panda_face:":{"uc_base":"1f43c","uc_output":"1f43c","uc_match":"1f43c","uc_greedy":"1f43c","shortnames":[],"category":"nature"},":paperclip:":{"uc_base":"1f4ce","uc_output":"1f4ce","uc_match":"1f4ce","uc_greedy":"1f4ce","shortnames":[],"category":"objects"},":passport_control:":{"uc_base":"1f6c2","uc_output":"1f6c2","uc_match":"1f6c2","uc_greedy":"1f6c2","shortnames":[],"category":"symbols"},":peach:":{"uc_base":"1f351","uc_output":"1f351","uc_match":"1f351","uc_greedy":"1f351","shortnames":[],"category":"food"},":peanuts:":{"uc_base":"1f95c","uc_output":"1f95c","uc_match":"1f95c","uc_greedy":"1f95c","shortnames":[":shelled_peanut:"],"category":"food"},":pear:":{"uc_base":"1f350","uc_output":"1f350","uc_match":"1f350","uc_greedy":"1f350","shortnames":[],"category":"food"},":pencil:":{"uc_base":"1f4dd","uc_output":"1f4dd","uc_match":"1f4dd","uc_greedy":"1f4dd","shortnames":[":memo:"],"category":"objects"},":penguin:":{"uc_base":"1f427","uc_output":"1f427","uc_match":"1f427","uc_greedy":"1f427","shortnames":[],"category":"nature"},":pensive:":{"uc_base":"1f614","uc_output":"1f614","uc_match":"1f614","uc_greedy":"1f614","shortnames":[],"category":"people"},":people_with_bunny_ears_partying:":{"uc_base":"1f46f","uc_output":"1f46f","uc_match":"1f46f","uc_greedy":"1f46f","shortnames":[":dancers:"],"category":"people"},":people_wrestling:":{"uc_base":"1f93c","uc_output":"1f93c","uc_match":"1f93c","uc_greedy":"1f93c","shortnames":[":wrestlers:",":wrestling:"],"category":"activity"},":performing_arts:":{"uc_base":"1f3ad","uc_output":"1f3ad","uc_match":"1f3ad","uc_greedy":"1f3ad","shortnames":[],"category":"activity"},":persevere:":{"uc_base":"1f623","uc_output":"1f623","uc_match":"1f623","uc_greedy":"1f623","shortnames":[],"category":"people"},":person_biking:":{"uc_base":"1f6b4","uc_output":"1f6b4","uc_match":"1f6b4","uc_greedy":"1f6b4","shortnames":[":bicyclist:"],"category":"activity"},":person_bowing:":{"uc_base":"1f647","uc_output":"1f647","uc_match":"1f647","uc_greedy":"1f647","shortnames":[":bow:"],"category":"people"},":person_climbing:":{"uc_base":"1f9d7","uc_output":"1f9d7","uc_match":"1f9d7","uc_greedy":"1f9d7","shortnames":[],"category":"activity"},":person_doing_cartwheel:":{"uc_base":"1f938","uc_output":"1f938","uc_match":"1f938","uc_greedy":"1f938","shortnames":[":cartwheel:"],"category":"activity"},":person_facepalming:":{"uc_base":"1f926","uc_output":"1f926","uc_match":"1f926","uc_greedy":"1f926","shortnames":[":face_palm:",":facepalm:"],"category":"people"},":person_fencing:":{"uc_base":"1f93a","uc_output":"1f93a","uc_match":"1f93a","uc_greedy":"1f93a","shortnames":[":fencer:",":fencing:"],"category":"activity"},":person_frowning:":{"uc_base":"1f64d","uc_output":"1f64d","uc_match":"1f64d","uc_greedy":"1f64d","shortnames":[],"category":"people"},":person_gesturing_no:":{"uc_base":"1f645","uc_output":"1f645","uc_match":"1f645","uc_greedy":"1f645","shortnames":[":no_good:"],"category":"people"},":person_gesturing_ok:":{"uc_base":"1f646","uc_output":"1f646","uc_match":"1f646","uc_greedy":"1f646","shortnames":[":ok_woman:"],"category":"people"},":person_getting_haircut:":{"uc_base":"1f487","uc_output":"1f487","uc_match":"1f487","uc_greedy":"1f487","shortnames":[":haircut:"],"category":"people"},":person_getting_massage:":{"uc_base":"1f486","uc_output":"1f486","uc_match":"1f486","uc_greedy":"1f486","shortnames":[":massage:"],"category":"people"},":person_in_lotus_position:":{"uc_base":"1f9d8","uc_output":"1f9d8","uc_match":"1f9d8","uc_greedy":"1f9d8","shortnames":[],"category":"activity"},":person_in_steamy_room:":{"uc_base":"1f9d6","uc_output":"1f9d6","uc_match":"1f9d6","uc_greedy":"1f9d6","shortnames":[],"category":"activity"},":person_juggling:":{"uc_base":"1f939","uc_output":"1f939","uc_match":"1f939","uc_greedy":"1f939","shortnames":[":juggling:",":juggler:"],"category":"activity"},":person_mountain_biking:":{"uc_base":"1f6b5","uc_output":"1f6b5","uc_match":"1f6b5","uc_greedy":"1f6b5","shortnames":[":mountain_bicyclist:"],"category":"activity"},":person_playing_handball:":{"uc_base":"1f93e","uc_output":"1f93e","uc_match":"1f93e","uc_greedy":"1f93e","shortnames":[":handball:"],"category":"activity"},":person_playing_water_polo:":{"uc_base":"1f93d","uc_output":"1f93d","uc_match":"1f93d","uc_greedy":"1f93d","shortnames":[":water_polo:"],"category":"activity"},":person_pouting:":{"uc_base":"1f64e","uc_output":"1f64e","uc_match":"1f64e","uc_greedy":"1f64e","shortnames":[":person_with_pouting_face:"],"category":"people"},":person_raising_hand:":{"uc_base":"1f64b","uc_output":"1f64b","uc_match":"1f64b","uc_greedy":"1f64b","shortnames":[":raising_hand:"],"category":"people"},":person_rowing_boat:":{"uc_base":"1f6a3","uc_output":"1f6a3","uc_match":"1f6a3","uc_greedy":"1f6a3","shortnames":[":rowboat:"],"category":"activity"},":person_running:":{"uc_base":"1f3c3","uc_output":"1f3c3","uc_match":"1f3c3","uc_greedy":"1f3c3","shortnames":[":runner:"],"category":"people"},":person_shrugging:":{"uc_base":"1f937","uc_output":"1f937","uc_match":"1f937","uc_greedy":"1f937","shortnames":[":shrug:"],"category":"people"},":person_surfing:":{"uc_base":"1f3c4","uc_output":"1f3c4","uc_match":"1f3c4","uc_greedy":"1f3c4","shortnames":[":surfer:"],"category":"activity"},":person_swimming:":{"uc_base":"1f3ca","uc_output":"1f3ca","uc_match":"1f3ca","uc_greedy":"1f3ca","shortnames":[":swimmer:"],"category":"activity"},":person_tipping_hand:":{"uc_base":"1f481","uc_output":"1f481","uc_match":"1f481","uc_greedy":"1f481","shortnames":[":information_desk_person:"],"category":"people"},":person_walking:":{"uc_base":"1f6b6","uc_output":"1f6b6","uc_match":"1f6b6","uc_greedy":"1f6b6","shortnames":[":walking:"],"category":"people"},":person_wearing_turban:":{"uc_base":"1f473","uc_output":"1f473","uc_match":"1f473","uc_greedy":"1f473","shortnames":[":man_with_turban:"],"category":"people"},":pie:":{"uc_base":"1f967","uc_output":"1f967","uc_match":"1f967","uc_greedy":"1f967","shortnames":[],"category":"food"},":pig2:":{"uc_base":"1f416","uc_output":"1f416","uc_match":"1f416","uc_greedy":"1f416","shortnames":[],"category":"nature"},":pig:":{"uc_base":"1f437","uc_output":"1f437","uc_match":"1f437","uc_greedy":"1f437","shortnames":[],"category":"nature"},":pig_nose:":{"uc_base":"1f43d","uc_output":"1f43d","uc_match":"1f43d","uc_greedy":"1f43d","shortnames":[],"category":"nature"},":pill:":{"uc_base":"1f48a","uc_output":"1f48a","uc_match":"1f48a","uc_greedy":"1f48a","shortnames":[],"category":"objects"},":pineapple:":{"uc_base":"1f34d","uc_output":"1f34d","uc_match":"1f34d","uc_greedy":"1f34d","shortnames":[],"category":"food"},":ping_pong:":{"uc_base":"1f3d3","uc_output":"1f3d3","uc_match":"1f3d3","uc_greedy":"1f3d3","shortnames":[":table_tennis:"],"category":"activity"},":pizza:":{"uc_base":"1f355","uc_output":"1f355","uc_match":"1f355","uc_greedy":"1f355","shortnames":[],"category":"food"},":place_of_worship:":{"uc_base":"1f6d0","uc_output":"1f6d0","uc_match":"1f6d0","uc_greedy":"1f6d0","shortnames":[":worship_symbol:"],"category":"symbols"},":point_down:":{"uc_base":"1f447","uc_output":"1f447","uc_match":"1f447","uc_greedy":"1f447","shortnames":[],"category":"people"},":point_left:":{"uc_base":"1f448","uc_output":"1f448","uc_match":"1f448","uc_greedy":"1f448","shortnames":[],"category":"people"},":point_right:":{"uc_base":"1f449","uc_output":"1f449","uc_match":"1f449","uc_greedy":"1f449","shortnames":[],"category":"people"},":point_up_2:":{"uc_base":"1f446","uc_output":"1f446","uc_match":"1f446","uc_greedy":"1f446","shortnames":[],"category":"people"},":police_car:":{"uc_base":"1f693","uc_output":"1f693","uc_match":"1f693","uc_greedy":"1f693","shortnames":[],"category":"travel"},":police_officer:":{"uc_base":"1f46e","uc_output":"1f46e","uc_match":"1f46e","uc_greedy":"1f46e","shortnames":[":cop:"],"category":"people"},":poodle:":{"uc_base":"1f429","uc_output":"1f429","uc_match":"1f429","uc_greedy":"1f429","shortnames":[],"category":"nature"},":poop:":{"uc_base":"1f4a9","uc_output":"1f4a9","uc_match":"1f4a9","uc_greedy":"1f4a9","shortnames":[":shit:",":hankey:",":poo:"],"category":"people"},":popcorn:":{"uc_base":"1f37f","uc_output":"1f37f","uc_match":"1f37f","uc_greedy":"1f37f","shortnames":[],"category":"food"},":post_office:":{"uc_base":"1f3e3","uc_output":"1f3e3","uc_match":"1f3e3","uc_greedy":"1f3e3","shortnames":[],"category":"travel"},":postal_horn:":{"uc_base":"1f4ef","uc_output":"1f4ef","uc_match":"1f4ef","uc_greedy":"1f4ef","shortnames":[],"category":"objects"},":postbox:":{"uc_base":"1f4ee","uc_output":"1f4ee","uc_match":"1f4ee","uc_greedy":"1f4ee","shortnames":[],"category":"objects"},":potable_water:":{"uc_base":"1f6b0","uc_output":"1f6b0","uc_match":"1f6b0","uc_greedy":"1f6b0","shortnames":[],"category":"objects"},":potato:":{"uc_base":"1f954","uc_output":"1f954","uc_match":"1f954","uc_greedy":"1f954","shortnames":[],"category":"food"},":pouch:":{"uc_base":"1f45d","uc_output":"1f45d","uc_match":"1f45d","uc_greedy":"1f45d","shortnames":[],"category":"people"},":poultry_leg:":{"uc_base":"1f357","uc_output":"1f357","uc_match":"1f357","uc_greedy":"1f357","shortnames":[],"category":"food"},":pound:":{"uc_base":"1f4b7","uc_output":"1f4b7","uc_match":"1f4b7","uc_greedy":"1f4b7","shortnames":[],"category":"objects"},":pouting_cat:":{"uc_base":"1f63e","uc_output":"1f63e","uc_match":"1f63e","uc_greedy":"1f63e","shortnames":[],"category":"people"},":pray:":{"uc_base":"1f64f","uc_output":"1f64f","uc_match":"1f64f","uc_greedy":"1f64f","shortnames":[],"category":"people"},":prayer_beads:":{"uc_base":"1f4ff","uc_output":"1f4ff","uc_match":"1f4ff","uc_greedy":"1f4ff","shortnames":[],"category":"objects"},":pregnant_woman:":{"uc_base":"1f930","uc_output":"1f930","uc_match":"1f930","uc_greedy":"1f930","shortnames":[":expecting_woman:"],"category":"people"},":pretzel:":{"uc_base":"1f968","uc_output":"1f968","uc_match":"1f968","uc_greedy":"1f968","shortnames":[],"category":"food"},":prince:":{"uc_base":"1f934","uc_output":"1f934","uc_match":"1f934","uc_greedy":"1f934","shortnames":[],"category":"people"},":princess:":{"uc_base":"1f478","uc_output":"1f478","uc_match":"1f478","uc_greedy":"1f478","shortnames":[],"category":"people"},":punch:":{"uc_base":"1f44a","uc_output":"1f44a","uc_match":"1f44a","uc_greedy":"1f44a","shortnames":[],"category":"people"},":purple_heart:":{"uc_base":"1f49c","uc_output":"1f49c","uc_match":"1f49c","uc_greedy":"1f49c","shortnames":[],"category":"symbols"},":purse:":{"uc_base":"1f45b","uc_output":"1f45b","uc_match":"1f45b","uc_greedy":"1f45b","shortnames":[],"category":"people"},":pushpin:":{"uc_base":"1f4cc","uc_output":"1f4cc","uc_match":"1f4cc","uc_greedy":"1f4cc","shortnames":[],"category":"objects"},":put_litter_in_its_place:":{"uc_base":"1f6ae","uc_output":"1f6ae","uc_match":"1f6ae","uc_greedy":"1f6ae","shortnames":[],"category":"symbols"},":rabbit2:":{"uc_base":"1f407","uc_output":"1f407","uc_match":"1f407","uc_greedy":"1f407","shortnames":[],"category":"nature"},":rabbit:":{"uc_base":"1f430","uc_output":"1f430","uc_match":"1f430","uc_greedy":"1f430","shortnames":[],"category":"nature"},":racehorse:":{"uc_base":"1f40e","uc_output":"1f40e","uc_match":"1f40e","uc_greedy":"1f40e","shortnames":[],"category":"nature"},":radio:":{"uc_base":"1f4fb","uc_output":"1f4fb","uc_match":"1f4fb","uc_greedy":"1f4fb","shortnames":[],"category":"objects"},":radio_button:":{"uc_base":"1f518","uc_output":"1f518","uc_match":"1f518","uc_greedy":"1f518","shortnames":[],"category":"symbols"},":rage:":{"uc_base":"1f621","uc_output":"1f621","uc_match":"1f621","uc_greedy":"1f621","shortnames":[],"category":"people"},":railway_car:":{"uc_base":"1f683","uc_output":"1f683","uc_match":"1f683","uc_greedy":"1f683","shortnames":[],"category":"travel"},":rainbow:":{"uc_base":"1f308","uc_output":"1f308","uc_match":"1f308","uc_greedy":"1f308","shortnames":[],"category":"nature"},":raised_back_of_hand:":{"uc_base":"1f91a","uc_output":"1f91a","uc_match":"1f91a","uc_greedy":"1f91a","shortnames":[":back_of_hand:"],"category":"people"},":raised_hands:":{"uc_base":"1f64c","uc_output":"1f64c","uc_match":"1f64c","uc_greedy":"1f64c","shortnames":[],"category":"people"},":ram:":{"uc_base":"1f40f","uc_output":"1f40f","uc_match":"1f40f","uc_greedy":"1f40f","shortnames":[],"category":"nature"},":ramen:":{"uc_base":"1f35c","uc_output":"1f35c","uc_match":"1f35c","uc_greedy":"1f35c","shortnames":[],"category":"food"},":rat:":{"uc_base":"1f400","uc_output":"1f400","uc_match":"1f400","uc_greedy":"1f400","shortnames":[],"category":"nature"},":red_car:":{"uc_base":"1f697","uc_output":"1f697","uc_match":"1f697","uc_greedy":"1f697","shortnames":[],"category":"travel"},":red_circle:":{"uc_base":"1f534","uc_output":"1f534","uc_match":"1f534","uc_greedy":"1f534","shortnames":[],"category":"symbols"},":regional_indicator_a:":{"uc_base":"1f1e6","uc_output":"1f1e6","uc_match":"1f1e6","uc_greedy":"1f1e6","shortnames":[],"category":"regional"},":regional_indicator_b:":{"uc_base":"1f1e7","uc_output":"1f1e7","uc_match":"1f1e7","uc_greedy":"1f1e7","shortnames":[],"category":"regional"},":regional_indicator_c:":{"uc_base":"1f1e8","uc_output":"1f1e8","uc_match":"1f1e8","uc_greedy":"1f1e8","shortnames":[],"category":"regional"},":regional_indicator_d:":{"uc_base":"1f1e9","uc_output":"1f1e9","uc_match":"1f1e9","uc_greedy":"1f1e9","shortnames":[],"category":"regional"},":regional_indicator_e:":{"uc_base":"1f1ea","uc_output":"1f1ea","uc_match":"1f1ea","uc_greedy":"1f1ea","shortnames":[],"category":"regional"},":regional_indicator_f:":{"uc_base":"1f1eb","uc_output":"1f1eb","uc_match":"1f1eb","uc_greedy":"1f1eb","shortnames":[],"category":"regional"},":regional_indicator_g:":{"uc_base":"1f1ec","uc_output":"1f1ec","uc_match":"1f1ec","uc_greedy":"1f1ec","shortnames":[],"category":"regional"},":regional_indicator_h:":{"uc_base":"1f1ed","uc_output":"1f1ed","uc_match":"1f1ed","uc_greedy":"1f1ed","shortnames":[],"category":"regional"},":regional_indicator_i:":{"uc_base":"1f1ee","uc_output":"1f1ee","uc_match":"1f1ee","uc_greedy":"1f1ee","shortnames":[],"category":"regional"},":regional_indicator_j:":{"uc_base":"1f1ef","uc_output":"1f1ef","uc_match":"1f1ef","uc_greedy":"1f1ef","shortnames":[],"category":"regional"},":regional_indicator_k:":{"uc_base":"1f1f0","uc_output":"1f1f0","uc_match":"1f1f0","uc_greedy":"1f1f0","shortnames":[],"category":"regional"},":regional_indicator_l:":{"uc_base":"1f1f1","uc_output":"1f1f1","uc_match":"1f1f1","uc_greedy":"1f1f1","shortnames":[],"category":"regional"},":regional_indicator_m:":{"uc_base":"1f1f2","uc_output":"1f1f2","uc_match":"1f1f2","uc_greedy":"1f1f2","shortnames":[],"category":"regional"},":regional_indicator_n:":{"uc_base":"1f1f3","uc_output":"1f1f3","uc_match":"1f1f3","uc_greedy":"1f1f3","shortnames":[],"category":"regional"},":regional_indicator_o:":{"uc_base":"1f1f4","uc_output":"1f1f4","uc_match":"1f1f4","uc_greedy":"1f1f4","shortnames":[],"category":"regional"},":regional_indicator_p:":{"uc_base":"1f1f5","uc_output":"1f1f5","uc_match":"1f1f5","uc_greedy":"1f1f5","shortnames":[],"category":"regional"},":regional_indicator_q:":{"uc_base":"1f1f6","uc_output":"1f1f6","uc_match":"1f1f6","uc_greedy":"1f1f6","shortnames":[],"category":"regional"},":regional_indicator_r:":{"uc_base":"1f1f7","uc_output":"1f1f7","uc_match":"1f1f7","uc_greedy":"1f1f7","shortnames":[],"category":"regional"},":regional_indicator_s:":{"uc_base":"1f1f8","uc_output":"1f1f8","uc_match":"1f1f8","uc_greedy":"1f1f8","shortnames":[],"category":"regional"},":regional_indicator_t:":{"uc_base":"1f1f9","uc_output":"1f1f9","uc_match":"1f1f9","uc_greedy":"1f1f9","shortnames":[],"category":"regional"},":regional_indicator_u:":{"uc_base":"1f1fa","uc_output":"1f1fa","uc_match":"1f1fa","uc_greedy":"1f1fa","shortnames":[],"category":"regional"},":regional_indicator_v:":{"uc_base":"1f1fb","uc_output":"1f1fb","uc_match":"1f1fb","uc_greedy":"1f1fb","shortnames":[],"category":"regional"},":regional_indicator_w:":{"uc_base":"1f1fc","uc_output":"1f1fc","uc_match":"1f1fc","uc_greedy":"1f1fc","shortnames":[],"category":"regional"},":regional_indicator_x:":{"uc_base":"1f1fd","uc_output":"1f1fd","uc_match":"1f1fd","uc_greedy":"1f1fd","shortnames":[],"category":"regional"},":regional_indicator_y:":{"uc_base":"1f1fe","uc_output":"1f1fe","uc_match":"1f1fe","uc_greedy":"1f1fe","shortnames":[],"category":"regional"},":regional_indicator_z:":{"uc_base":"1f1ff","uc_output":"1f1ff","uc_match":"1f1ff","uc_greedy":"1f1ff","shortnames":[],"category":"regional"},":relieved:":{"uc_base":"1f60c","uc_output":"1f60c","uc_match":"1f60c","uc_greedy":"1f60c","shortnames":[],"category":"people"},":repeat:":{"uc_base":"1f501","uc_output":"1f501","uc_match":"1f501","uc_greedy":"1f501","shortnames":[],"category":"symbols"},":repeat_one:":{"uc_base":"1f502","uc_output":"1f502","uc_match":"1f502","uc_greedy":"1f502","shortnames":[],"category":"symbols"},":restroom:":{"uc_base":"1f6bb","uc_output":"1f6bb","uc_match":"1f6bb","uc_greedy":"1f6bb","shortnames":[],"category":"symbols"},":revolving_hearts:":{"uc_base":"1f49e","uc_output":"1f49e","uc_match":"1f49e","uc_greedy":"1f49e","shortnames":[],"category":"symbols"},":rhino:":{"uc_base":"1f98f","uc_output":"1f98f","uc_match":"1f98f","uc_greedy":"1f98f","shortnames":[":rhinoceros:"],"category":"nature"},":ribbon:":{"uc_base":"1f380","uc_output":"1f380","uc_match":"1f380","uc_greedy":"1f380","shortnames":[],"category":"objects"},":rice:":{"uc_base":"1f35a","uc_output":"1f35a","uc_match":"1f35a","uc_greedy":"1f35a","shortnames":[],"category":"food"},":rice_ball:":{"uc_base":"1f359","uc_output":"1f359","uc_match":"1f359","uc_greedy":"1f359","shortnames":[],"category":"food"},":rice_cracker:":{"uc_base":"1f358","uc_output":"1f358","uc_match":"1f358","uc_greedy":"1f358","shortnames":[],"category":"food"},":rice_scene:":{"uc_base":"1f391","uc_output":"1f391","uc_match":"1f391","uc_greedy":"1f391","shortnames":[],"category":"travel"},":right_facing_fist:":{"uc_base":"1f91c","uc_output":"1f91c","uc_match":"1f91c","uc_greedy":"1f91c","shortnames":[":right_fist:"],"category":"people"},":ring:":{"uc_base":"1f48d","uc_output":"1f48d","uc_match":"1f48d","uc_greedy":"1f48d","shortnames":[],"category":"people"},":robot:":{"uc_base":"1f916","uc_output":"1f916","uc_match":"1f916","uc_greedy":"1f916","shortnames":[":robot_face:"],"category":"people"},":rocket:":{"uc_base":"1f680","uc_output":"1f680","uc_match":"1f680","uc_greedy":"1f680","shortnames":[],"category":"travel"},":rofl:":{"uc_base":"1f923","uc_output":"1f923","uc_match":"1f923","uc_greedy":"1f923","shortnames":[":rolling_on_the_floor_laughing:"],"category":"people"},":roller_coaster:":{"uc_base":"1f3a2","uc_output":"1f3a2","uc_match":"1f3a2","uc_greedy":"1f3a2","shortnames":[],"category":"travel"},":rolling_eyes:":{"uc_base":"1f644","uc_output":"1f644","uc_match":"1f644","uc_greedy":"1f644","shortnames":[":face_with_rolling_eyes:"],"category":"people"},":rooster:":{"uc_base":"1f413","uc_output":"1f413","uc_match":"1f413","uc_greedy":"1f413","shortnames":[],"category":"nature"},":rose:":{"uc_base":"1f339","uc_output":"1f339","uc_match":"1f339","uc_greedy":"1f339","shortnames":[],"category":"nature"},":rotating_light:":{"uc_base":"1f6a8","uc_output":"1f6a8","uc_match":"1f6a8","uc_greedy":"1f6a8","shortnames":[],"category":"travel"},":round_pushpin:":{"uc_base":"1f4cd","uc_output":"1f4cd","uc_match":"1f4cd","uc_greedy":"1f4cd","shortnames":[],"category":"objects"},":rugby_football:":{"uc_base":"1f3c9","uc_output":"1f3c9","uc_match":"1f3c9","uc_greedy":"1f3c9","shortnames":[],"category":"activity"},":running_shirt_with_sash:":{"uc_base":"1f3bd","uc_output":"1f3bd","uc_match":"1f3bd","uc_greedy":"1f3bd","shortnames":[],"category":"activity"},":sake:":{"uc_base":"1f376","uc_output":"1f376","uc_match":"1f376","uc_greedy":"1f376","shortnames":[],"category":"food"},":salad:":{"uc_base":"1f957","uc_output":"1f957","uc_match":"1f957","uc_greedy":"1f957","shortnames":[":green_salad:"],"category":"food"},":sandal:":{"uc_base":"1f461","uc_output":"1f461","uc_match":"1f461","uc_greedy":"1f461","shortnames":[],"category":"people"},":sandwich:":{"uc_base":"1f96a","uc_output":"1f96a","uc_match":"1f96a","uc_greedy":"1f96a","shortnames":[],"category":"food"},":santa:":{"uc_base":"1f385","uc_output":"1f385","uc_match":"1f385","uc_greedy":"1f385","shortnames":[],"category":"people"},":satellite:":{"uc_base":"1f4e1","uc_output":"1f4e1","uc_match":"1f4e1","uc_greedy":"1f4e1","shortnames":[],"category":"objects"},":sauropod:":{"uc_base":"1f995","uc_output":"1f995","uc_match":"1f995","uc_greedy":"1f995","shortnames":[],"category":"nature"},":saxophone:":{"uc_base":"1f3b7","uc_output":"1f3b7","uc_match":"1f3b7","uc_greedy":"1f3b7","shortnames":[],"category":"activity"},":scarf:":{"uc_base":"1f9e3","uc_output":"1f9e3","uc_match":"1f9e3","uc_greedy":"1f9e3","shortnames":[],"category":"people"},":school:":{"uc_base":"1f3eb","uc_output":"1f3eb","uc_match":"1f3eb","uc_greedy":"1f3eb","shortnames":[],"category":"travel"},":school_satchel:":{"uc_base":"1f392","uc_output":"1f392","uc_match":"1f392","uc_greedy":"1f392","shortnames":[],"category":"people"},":scooter:":{"uc_base":"1f6f4","uc_output":"1f6f4","uc_match":"1f6f4","uc_greedy":"1f6f4","shortnames":[],"category":"travel"},":scorpion:":{"uc_base":"1f982","uc_output":"1f982","uc_match":"1f982","uc_greedy":"1f982","shortnames":[],"category":"nature"},":scream:":{"uc_base":"1f631","uc_output":"1f631","uc_match":"1f631","uc_greedy":"1f631","shortnames":[],"category":"people"},":scream_cat:":{"uc_base":"1f640","uc_output":"1f640","uc_match":"1f640","uc_greedy":"1f640","shortnames":[],"category":"people"},":scroll:":{"uc_base":"1f4dc","uc_output":"1f4dc","uc_match":"1f4dc","uc_greedy":"1f4dc","shortnames":[],"category":"objects"},":seat:":{"uc_base":"1f4ba","uc_output":"1f4ba","uc_match":"1f4ba","uc_greedy":"1f4ba","shortnames":[],"category":"travel"},":second_place:":{"uc_base":"1f948","uc_output":"1f948","uc_match":"1f948","uc_greedy":"1f948","shortnames":[":second_place_medal:"],"category":"activity"},":see_no_evil:":{"uc_base":"1f648","uc_output":"1f648","uc_match":"1f648","uc_greedy":"1f648","shortnames":[],"category":"nature"},":seedling:":{"uc_base":"1f331","uc_output":"1f331","uc_match":"1f331","uc_greedy":"1f331","shortnames":[],"category":"nature"},":selfie:":{"uc_base":"1f933","uc_output":"1f933","uc_match":"1f933","uc_greedy":"1f933","shortnames":[],"category":"people"},":shallow_pan_of_food:":{"uc_base":"1f958","uc_output":"1f958","uc_match":"1f958","uc_greedy":"1f958","shortnames":[":paella:"],"category":"food"},":shark:":{"uc_base":"1f988","uc_output":"1f988","uc_match":"1f988","uc_greedy":"1f988","shortnames":[],"category":"nature"},":shaved_ice:":{"uc_base":"1f367","uc_output":"1f367","uc_match":"1f367","uc_greedy":"1f367","shortnames":[],"category":"food"},":sheep:":{"uc_base":"1f411","uc_output":"1f411","uc_match":"1f411","uc_greedy":"1f411","shortnames":[],"category":"nature"},":shell:":{"uc_base":"1f41a","uc_output":"1f41a","uc_match":"1f41a","uc_greedy":"1f41a","shortnames":[],"category":"nature"},":ship:":{"uc_base":"1f6a2","uc_output":"1f6a2","uc_match":"1f6a2","uc_greedy":"1f6a2","shortnames":[],"category":"travel"},":shirt:":{"uc_base":"1f455","uc_output":"1f455","uc_match":"1f455","uc_greedy":"1f455","shortnames":[],"category":"people"},":shopping_cart:":{"uc_base":"1f6d2","uc_output":"1f6d2","uc_match":"1f6d2","uc_greedy":"1f6d2","shortnames":[":shopping_trolley:"],"category":"objects"},":shower:":{"uc_base":"1f6bf","uc_output":"1f6bf","uc_match":"1f6bf","uc_greedy":"1f6bf","shortnames":[],"category":"objects"},":shrimp:":{"uc_base":"1f990","uc_output":"1f990","uc_match":"1f990","uc_greedy":"1f990","shortnames":[],"category":"nature"},":shushing_face:":{"uc_base":"1f92b","uc_output":"1f92b","uc_match":"1f92b","uc_greedy":"1f92b","shortnames":[],"category":"people"},":signal_strength:":{"uc_base":"1f4f6","uc_output":"1f4f6","uc_match":"1f4f6","uc_greedy":"1f4f6","shortnames":[],"category":"symbols"},":six_pointed_star:":{"uc_base":"1f52f","uc_output":"1f52f","uc_match":"1f52f","uc_greedy":"1f52f","shortnames":[],"category":"symbols"},":ski:":{"uc_base":"1f3bf","uc_output":"1f3bf","uc_match":"1f3bf","uc_greedy":"1f3bf","shortnames":[],"category":"activity"},":skull:":{"uc_base":"1f480","uc_output":"1f480","uc_match":"1f480","uc_greedy":"1f480","shortnames":[":skeleton:"],"category":"people"},":sled:":{"uc_base":"1f6f7","uc_output":"1f6f7","uc_match":"1f6f7","uc_greedy":"1f6f7","shortnames":[],"category":"activity"},":sleeping:":{"uc_base":"1f634","uc_output":"1f634","uc_match":"1f634","uc_greedy":"1f634","shortnames":[],"category":"people"},":sleeping_accommodation:":{"uc_base":"1f6cc","uc_output":"1f6cc","uc_match":"1f6cc","uc_greedy":"1f6cc","shortnames":[],"category":"objects"},":sleepy:":{"uc_base":"1f62a","uc_output":"1f62a","uc_match":"1f62a","uc_greedy":"1f62a","shortnames":[],"category":"people"},":slight_frown:":{"uc_base":"1f641","uc_output":"1f641","uc_match":"1f641","uc_greedy":"1f641","shortnames":[":slightly_frowning_face:"],"category":"people"},":slight_smile:":{"uc_base":"1f642","uc_output":"1f642","uc_match":"1f642","uc_greedy":"1f642","shortnames":[":slightly_smiling_face:"],"category":"people"},":slot_machine:":{"uc_base":"1f3b0","uc_output":"1f3b0","uc_match":"1f3b0","uc_greedy":"1f3b0","shortnames":[],"category":"activity"},":small_blue_diamond:":{"uc_base":"1f539","uc_output":"1f539","uc_match":"1f539","uc_greedy":"1f539","shortnames":[],"category":"symbols"},":small_orange_diamond:":{"uc_base":"1f538","uc_output":"1f538","uc_match":"1f538","uc_greedy":"1f538","shortnames":[],"category":"symbols"},":small_red_triangle:":{"uc_base":"1f53a","uc_output":"1f53a","uc_match":"1f53a","uc_greedy":"1f53a","shortnames":[],"category":"symbols"},":small_red_triangle_down:":{"uc_base":"1f53b","uc_output":"1f53b","uc_match":"1f53b","uc_greedy":"1f53b","shortnames":[],"category":"symbols"},":smile:":{"uc_base":"1f604","uc_output":"1f604","uc_match":"1f604","uc_greedy":"1f604","shortnames":[],"category":"people"},":smile_cat:":{"uc_base":"1f638","uc_output":"1f638","uc_match":"1f638","uc_greedy":"1f638","shortnames":[],"category":"people"},":smiley:":{"uc_base":"1f603","uc_output":"1f603","uc_match":"1f603","uc_greedy":"1f603","shortnames":[],"category":"people"},":smiley_cat:":{"uc_base":"1f63a","uc_output":"1f63a","uc_match":"1f63a","uc_greedy":"1f63a","shortnames":[],"category":"people"},":smiling_imp:":{"uc_base":"1f608","uc_output":"1f608","uc_match":"1f608","uc_greedy":"1f608","shortnames":[],"category":"people"},":smirk:":{"uc_base":"1f60f","uc_output":"1f60f","uc_match":"1f60f","uc_greedy":"1f60f","shortnames":[],"category":"people"},":smirk_cat:":{"uc_base":"1f63c","uc_output":"1f63c","uc_match":"1f63c","uc_greedy":"1f63c","shortnames":[],"category":"people"},":smoking:":{"uc_base":"1f6ac","uc_output":"1f6ac","uc_match":"1f6ac","uc_greedy":"1f6ac","shortnames":[],"category":"objects"},":snail:":{"uc_base":"1f40c","uc_output":"1f40c","uc_match":"1f40c","uc_greedy":"1f40c","shortnames":[],"category":"nature"},":snake:":{"uc_base":"1f40d","uc_output":"1f40d","uc_match":"1f40d","uc_greedy":"1f40d","shortnames":[],"category":"nature"},":sneezing_face:":{"uc_base":"1f927","uc_output":"1f927","uc_match":"1f927","uc_greedy":"1f927","shortnames":[":sneeze:"],"category":"people"},":snowboarder:":{"uc_base":"1f3c2","uc_output":"1f3c2","uc_match":"1f3c2","uc_greedy":"1f3c2","shortnames":[],"category":"activity"},":sob:":{"uc_base":"1f62d","uc_output":"1f62d","uc_match":"1f62d","uc_greedy":"1f62d","shortnames":[],"category":"people"},":socks:":{"uc_base":"1f9e6","uc_output":"1f9e6","uc_match":"1f9e6","uc_greedy":"1f9e6","shortnames":[],"category":"people"},":soon:":{"uc_base":"1f51c","uc_output":"1f51c","uc_match":"1f51c","uc_greedy":"1f51c","shortnames":[],"category":"symbols"},":sos:":{"uc_base":"1f198","uc_output":"1f198","uc_match":"1f198","uc_greedy":"1f198","shortnames":[],"category":"symbols"},":sound:":{"uc_base":"1f509","uc_output":"1f509","uc_match":"1f509","uc_greedy":"1f509","shortnames":[],"category":"symbols"},":space_invader:":{"uc_base":"1f47e","uc_output":"1f47e","uc_match":"1f47e","uc_greedy":"1f47e","shortnames":[],"category":"people"},":spaghetti:":{"uc_base":"1f35d","uc_output":"1f35d","uc_match":"1f35d","uc_greedy":"1f35d","shortnames":[],"category":"food"},":sparkler:":{"uc_base":"1f387","uc_output":"1f387","uc_match":"1f387","uc_greedy":"1f387","shortnames":[],"category":"travel"},":sparkling_heart:":{"uc_base":"1f496","uc_output":"1f496","uc_match":"1f496","uc_greedy":"1f496","shortnames":[],"category":"symbols"},":speak_no_evil:":{"uc_base":"1f64a","uc_output":"1f64a","uc_match":"1f64a","uc_greedy":"1f64a","shortnames":[],"category":"nature"},":speaker:":{"uc_base":"1f508","uc_output":"1f508","uc_match":"1f508","uc_greedy":"1f508","shortnames":[],"category":"symbols"},":speech_balloon:":{"uc_base":"1f4ac","uc_output":"1f4ac","uc_match":"1f4ac","uc_greedy":"1f4ac","shortnames":[],"category":"symbols"},":speedboat:":{"uc_base":"1f6a4","uc_output":"1f6a4","uc_match":"1f6a4","uc_greedy":"1f6a4","shortnames":[],"category":"travel"},":spoon:":{"uc_base":"1f944","uc_output":"1f944","uc_match":"1f944","uc_greedy":"1f944","shortnames":[],"category":"food"},":squid:":{"uc_base":"1f991","uc_output":"1f991","uc_match":"1f991","uc_greedy":"1f991","shortnames":[],"category":"nature"},":star2:":{"uc_base":"1f31f","uc_output":"1f31f","uc_match":"1f31f","uc_greedy":"1f31f","shortnames":[],"category":"nature"},":star_struck:":{"uc_base":"1f929","uc_output":"1f929","uc_match":"1f929","uc_greedy":"1f929","shortnames":[],"category":"people"},":stars:":{"uc_base":"1f320","uc_output":"1f320","uc_match":"1f320","uc_greedy":"1f320","shortnames":[],"category":"travel"},":station:":{"uc_base":"1f689","uc_output":"1f689","uc_match":"1f689","uc_greedy":"1f689","shortnames":[],"category":"travel"},":statue_of_liberty:":{"uc_base":"1f5fd","uc_output":"1f5fd","uc_match":"1f5fd","uc_greedy":"1f5fd","shortnames":[],"category":"travel"},":steam_locomotive:":{"uc_base":"1f682","uc_output":"1f682","uc_match":"1f682","uc_greedy":"1f682","shortnames":[],"category":"travel"},":stew:":{"uc_base":"1f372","uc_output":"1f372","uc_match":"1f372","uc_greedy":"1f372","shortnames":[],"category":"food"},":straight_ruler:":{"uc_base":"1f4cf","uc_output":"1f4cf","uc_match":"1f4cf","uc_greedy":"1f4cf","shortnames":[],"category":"objects"},":strawberry:":{"uc_base":"1f353","uc_output":"1f353","uc_match":"1f353","uc_greedy":"1f353","shortnames":[],"category":"food"},":stuck_out_tongue:":{"uc_base":"1f61b","uc_output":"1f61b","uc_match":"1f61b","uc_greedy":"1f61b","shortnames":[],"category":"people"},":stuck_out_tongue_closed_eyes:":{"uc_base":"1f61d","uc_output":"1f61d","uc_match":"1f61d","uc_greedy":"1f61d","shortnames":[],"category":"people"},":stuck_out_tongue_winking_eye:":{"uc_base":"1f61c","uc_output":"1f61c","uc_match":"1f61c","uc_greedy":"1f61c","shortnames":[],"category":"people"},":stuffed_flatbread:":{"uc_base":"1f959","uc_output":"1f959","uc_match":"1f959","uc_greedy":"1f959","shortnames":[":stuffed_pita:"],"category":"food"},":sun_with_face:":{"uc_base":"1f31e","uc_output":"1f31e","uc_match":"1f31e","uc_greedy":"1f31e","shortnames":[],"category":"nature"},":sunflower:":{"uc_base":"1f33b","uc_output":"1f33b","uc_match":"1f33b","uc_greedy":"1f33b","shortnames":[],"category":"nature"},":sunglasses:":{"uc_base":"1f60e","uc_output":"1f60e","uc_match":"1f60e","uc_greedy":"1f60e","shortnames":[],"category":"people"},":sunrise:":{"uc_base":"1f305","uc_output":"1f305","uc_match":"1f305","uc_greedy":"1f305","shortnames":[],"category":"travel"},":sunrise_over_mountains:":{"uc_base":"1f304","uc_output":"1f304","uc_match":"1f304","uc_greedy":"1f304","shortnames":[],"category":"travel"},":sushi:":{"uc_base":"1f363","uc_output":"1f363","uc_match":"1f363","uc_greedy":"1f363","shortnames":[],"category":"food"},":suspension_railway:":{"uc_base":"1f69f","uc_output":"1f69f","uc_match":"1f69f","uc_greedy":"1f69f","shortnames":[],"category":"travel"},":sweat:":{"uc_base":"1f613","uc_output":"1f613","uc_match":"1f613","uc_greedy":"1f613","shortnames":[],"category":"people"},":sweat_drops:":{"uc_base":"1f4a6","uc_output":"1f4a6","uc_match":"1f4a6","uc_greedy":"1f4a6","shortnames":[],"category":"nature"},":sweat_smile:":{"uc_base":"1f605","uc_output":"1f605","uc_match":"1f605","uc_greedy":"1f605","shortnames":[],"category":"people"},":sweet_potato:":{"uc_base":"1f360","uc_output":"1f360","uc_match":"1f360","uc_greedy":"1f360","shortnames":[],"category":"food"},":symbols:":{"uc_base":"1f523","uc_output":"1f523","uc_match":"1f523","uc_greedy":"1f523","shortnames":[],"category":"symbols"},":synagogue:":{"uc_base":"1f54d","uc_output":"1f54d","uc_match":"1f54d","uc_greedy":"1f54d","shortnames":[],"category":"travel"},":syringe:":{"uc_base":"1f489","uc_output":"1f489","uc_match":"1f489","uc_greedy":"1f489","shortnames":[],"category":"objects"},":t_rex:":{"uc_base":"1f996","uc_output":"1f996","uc_match":"1f996","uc_greedy":"1f996","shortnames":[],"category":"nature"},":taco:":{"uc_base":"1f32e","uc_output":"1f32e","uc_match":"1f32e","uc_greedy":"1f32e","shortnames":[],"category":"food"},":tada:":{"uc_base":"1f389","uc_output":"1f389","uc_match":"1f389","uc_greedy":"1f389","shortnames":[],"category":"objects"},":takeout_box:":{"uc_base":"1f961","uc_output":"1f961","uc_match":"1f961","uc_greedy":"1f961","shortnames":[],"category":"food"},":tanabata_tree:":{"uc_base":"1f38b","uc_output":"1f38b","uc_match":"1f38b","uc_greedy":"1f38b","shortnames":[],"category":"nature"},":tangerine:":{"uc_base":"1f34a","uc_output":"1f34a","uc_match":"1f34a","uc_greedy":"1f34a","shortnames":[],"category":"food"},":taxi:":{"uc_base":"1f695","uc_output":"1f695","uc_match":"1f695","uc_greedy":"1f695","shortnames":[],"category":"travel"},":tea:":{"uc_base":"1f375","uc_output":"1f375","uc_match":"1f375","uc_greedy":"1f375","shortnames":[],"category":"food"},":telephone_receiver:":{"uc_base":"1f4de","uc_output":"1f4de","uc_match":"1f4de","uc_greedy":"1f4de","shortnames":[],"category":"objects"},":telescope:":{"uc_base":"1f52d","uc_output":"1f52d","uc_match":"1f52d","uc_greedy":"1f52d","shortnames":[],"category":"objects"},":tennis:":{"uc_base":"1f3be","uc_output":"1f3be","uc_match":"1f3be","uc_greedy":"1f3be","shortnames":[],"category":"activity"},":thermometer_face:":{"uc_base":"1f912","uc_output":"1f912","uc_match":"1f912","uc_greedy":"1f912","shortnames":[":face_with_thermometer:"],"category":"people"},":thinking:":{"uc_base":"1f914","uc_output":"1f914","uc_match":"1f914","uc_greedy":"1f914","shortnames":[":thinking_face:"],"category":"people"},":third_place:":{"uc_base":"1f949","uc_output":"1f949","uc_match":"1f949","uc_greedy":"1f949","shortnames":[":third_place_medal:"],"category":"activity"},":thought_balloon:":{"uc_base":"1f4ad","uc_output":"1f4ad","uc_match":"1f4ad","uc_greedy":"1f4ad","shortnames":[],"category":"symbols"},":thumbsdown:":{"uc_base":"1f44e","uc_output":"1f44e","uc_match":"1f44e","uc_greedy":"1f44e","shortnames":[":-1:",":thumbdown:"],"category":"people"},":thumbsup:":{"uc_base":"1f44d","uc_output":"1f44d","uc_match":"1f44d","uc_greedy":"1f44d","shortnames":[":+1:",":thumbup:"],"category":"people"},":ticket:":{"uc_base":"1f3ab","uc_output":"1f3ab","uc_match":"1f3ab","uc_greedy":"1f3ab","shortnames":[],"category":"activity"},":tiger2:":{"uc_base":"1f405","uc_output":"1f405","uc_match":"1f405","uc_greedy":"1f405","shortnames":[],"category":"nature"},":tiger:":{"uc_base":"1f42f","uc_output":"1f42f","uc_match":"1f42f","uc_greedy":"1f42f","shortnames":[],"category":"nature"},":tired_face:":{"uc_base":"1f62b","uc_output":"1f62b","uc_match":"1f62b","uc_greedy":"1f62b","shortnames":[],"category":"people"},":toilet:":{"uc_base":"1f6bd","uc_output":"1f6bd","uc_match":"1f6bd","uc_greedy":"1f6bd","shortnames":[],"category":"objects"},":tokyo_tower:":{"uc_base":"1f5fc","uc_output":"1f5fc","uc_match":"1f5fc","uc_greedy":"1f5fc","shortnames":[],"category":"travel"},":tomato:":{"uc_base":"1f345","uc_output":"1f345","uc_match":"1f345","uc_greedy":"1f345","shortnames":[],"category":"food"},":tone1:":{"uc_base":"1f3fb","uc_output":"1f3fb","uc_match":"1f3fb","uc_greedy":"1f3fb","shortnames":[],"category":"modifier"},":tone2:":{"uc_base":"1f3fc","uc_output":"1f3fc","uc_match":"1f3fc","uc_greedy":"1f3fc","shortnames":[],"category":"modifier"},":tone3:":{"uc_base":"1f3fd","uc_output":"1f3fd","uc_match":"1f3fd","uc_greedy":"1f3fd","shortnames":[],"category":"modifier"},":tone4:":{"uc_base":"1f3fe","uc_output":"1f3fe","uc_match":"1f3fe","uc_greedy":"1f3fe","shortnames":[],"category":"modifier"},":tone5:":{"uc_base":"1f3ff","uc_output":"1f3ff","uc_match":"1f3ff","uc_greedy":"1f3ff","shortnames":[],"category":"modifier"},":tongue:":{"uc_base":"1f445","uc_output":"1f445","uc_match":"1f445","uc_greedy":"1f445","shortnames":[],"category":"people"},":top:":{"uc_base":"1f51d","uc_output":"1f51d","uc_match":"1f51d","uc_greedy":"1f51d","shortnames":[],"category":"symbols"},":tophat:":{"uc_base":"1f3a9","uc_output":"1f3a9","uc_match":"1f3a9","uc_greedy":"1f3a9","shortnames":[],"category":"people"},":tractor:":{"uc_base":"1f69c","uc_output":"1f69c","uc_match":"1f69c","uc_greedy":"1f69c","shortnames":[],"category":"travel"},":traffic_light:":{"uc_base":"1f6a5","uc_output":"1f6a5","uc_match":"1f6a5","uc_greedy":"1f6a5","shortnames":[],"category":"travel"},":train2:":{"uc_base":"1f686","uc_output":"1f686","uc_match":"1f686","uc_greedy":"1f686","shortnames":[],"category":"travel"},":train:":{"uc_base":"1f68b","uc_output":"1f68b","uc_match":"1f68b","uc_greedy":"1f68b","shortnames":[],"category":"travel"},":tram:":{"uc_base":"1f68a","uc_output":"1f68a","uc_match":"1f68a","uc_greedy":"1f68a","shortnames":[],"category":"travel"},":triangular_flag_on_post:":{"uc_base":"1f6a9","uc_output":"1f6a9","uc_match":"1f6a9","uc_greedy":"1f6a9","shortnames":[],"category":"flags"},":triangular_ruler:":{"uc_base":"1f4d0","uc_output":"1f4d0","uc_match":"1f4d0","uc_greedy":"1f4d0","shortnames":[],"category":"objects"},":trident:":{"uc_base":"1f531","uc_output":"1f531","uc_match":"1f531","uc_greedy":"1f531","shortnames":[],"category":"symbols"},":triumph:":{"uc_base":"1f624","uc_output":"1f624","uc_match":"1f624","uc_greedy":"1f624","shortnames":[],"category":"people"},":trolleybus:":{"uc_base":"1f68e","uc_output":"1f68e","uc_match":"1f68e","uc_greedy":"1f68e","shortnames":[],"category":"travel"},":trophy:":{"uc_base":"1f3c6","uc_output":"1f3c6","uc_match":"1f3c6","uc_greedy":"1f3c6","shortnames":[],"category":"activity"},":tropical_drink:":{"uc_base":"1f379","uc_output":"1f379","uc_match":"1f379","uc_greedy":"1f379","shortnames":[],"category":"food"},":tropical_fish:":{"uc_base":"1f420","uc_output":"1f420","uc_match":"1f420","uc_greedy":"1f420","shortnames":[],"category":"nature"},":truck:":{"uc_base":"1f69a","uc_output":"1f69a","uc_match":"1f69a","uc_greedy":"1f69a","shortnames":[],"category":"travel"},":trumpet:":{"uc_base":"1f3ba","uc_output":"1f3ba","uc_match":"1f3ba","uc_greedy":"1f3ba","shortnames":[],"category":"activity"},":tulip:":{"uc_base":"1f337","uc_output":"1f337","uc_match":"1f337","uc_greedy":"1f337","shortnames":[],"category":"nature"},":tumbler_glass:":{"uc_base":"1f943","uc_output":"1f943","uc_match":"1f943","uc_greedy":"1f943","shortnames":[":whisky:"],"category":"food"},":turkey:":{"uc_base":"1f983","uc_output":"1f983","uc_match":"1f983","uc_greedy":"1f983","shortnames":[],"category":"nature"},":turtle:":{"uc_base":"1f422","uc_output":"1f422","uc_match":"1f422","uc_greedy":"1f422","shortnames":[],"category":"nature"},":tv:":{"uc_base":"1f4fa","uc_output":"1f4fa","uc_match":"1f4fa","uc_greedy":"1f4fa","shortnames":[],"category":"objects"},":twisted_rightwards_arrows:":{"uc_base":"1f500","uc_output":"1f500","uc_match":"1f500","uc_greedy":"1f500","shortnames":[],"category":"symbols"},":two_hearts:":{"uc_base":"1f495","uc_output":"1f495","uc_match":"1f495","uc_greedy":"1f495","shortnames":[],"category":"symbols"},":two_men_holding_hands:":{"uc_base":"1f46c","uc_output":"1f46c","uc_match":"1f46c","uc_greedy":"1f46c","shortnames":[],"category":"people"},":two_women_holding_hands:":{"uc_base":"1f46d","uc_output":"1f46d","uc_match":"1f46d","uc_greedy":"1f46d","shortnames":[],"category":"people"},":u5272:":{"uc_base":"1f239","uc_output":"1f239","uc_match":"1f239","uc_greedy":"1f239","shortnames":[],"category":"symbols"},":u5408:":{"uc_base":"1f234","uc_output":"1f234","uc_match":"1f234","uc_greedy":"1f234","shortnames":[],"category":"symbols"},":u55b6:":{"uc_base":"1f23a","uc_output":"1f23a","uc_match":"1f23a","uc_greedy":"1f23a","shortnames":[],"category":"symbols"},":u6307:":{"uc_base":"1f22f","uc_output":"1f22f","uc_match":"1f22f","uc_greedy":"1f22f","shortnames":[],"category":"symbols"},":u6709:":{"uc_base":"1f236","uc_output":"1f236","uc_match":"1f236","uc_greedy":"1f236","shortnames":[],"category":"symbols"},":u6e80:":{"uc_base":"1f235","uc_output":"1f235","uc_match":"1f235","uc_greedy":"1f235","shortnames":[],"category":"symbols"},":u7121:":{"uc_base":"1f21a","uc_output":"1f21a","uc_match":"1f21a","uc_greedy":"1f21a","shortnames":[],"category":"symbols"},":u7533:":{"uc_base":"1f238","uc_output":"1f238","uc_match":"1f238","uc_greedy":"1f238","shortnames":[],"category":"symbols"},":u7981:":{"uc_base":"1f232","uc_output":"1f232","uc_match":"1f232","uc_greedy":"1f232","shortnames":[],"category":"symbols"},":u7a7a:":{"uc_base":"1f233","uc_output":"1f233","uc_match":"1f233","uc_greedy":"1f233","shortnames":[],"category":"symbols"},":unamused:":{"uc_base":"1f612","uc_output":"1f612","uc_match":"1f612","uc_greedy":"1f612","shortnames":[],"category":"people"},":underage:":{"uc_base":"1f51e","uc_output":"1f51e","uc_match":"1f51e","uc_greedy":"1f51e","shortnames":[],"category":"symbols"},":unicorn:":{"uc_base":"1f984","uc_output":"1f984","uc_match":"1f984","uc_greedy":"1f984","shortnames":[":unicorn_face:"],"category":"nature"},":unlock:":{"uc_base":"1f513","uc_output":"1f513","uc_match":"1f513","uc_greedy":"1f513","shortnames":[],"category":"objects"},":up:":{"uc_base":"1f199","uc_output":"1f199","uc_match":"1f199","uc_greedy":"1f199","shortnames":[],"category":"symbols"},":upside_down:":{"uc_base":"1f643","uc_output":"1f643","uc_match":"1f643","uc_greedy":"1f643","shortnames":[":upside_down_face:"],"category":"people"},":vampire:":{"uc_base":"1f9db","uc_output":"1f9db","uc_match":"1f9db","uc_greedy":"1f9db","shortnames":[],"category":"people"},":vertical_traffic_light:":{"uc_base":"1f6a6","uc_output":"1f6a6","uc_match":"1f6a6","uc_greedy":"1f6a6","shortnames":[],"category":"travel"},":vhs:":{"uc_base":"1f4fc","uc_output":"1f4fc","uc_match":"1f4fc","uc_greedy":"1f4fc","shortnames":[],"category":"objects"},":vibration_mode:":{"uc_base":"1f4f3","uc_output":"1f4f3","uc_match":"1f4f3","uc_greedy":"1f4f3","shortnames":[],"category":"symbols"},":video_camera:":{"uc_base":"1f4f9","uc_output":"1f4f9","uc_match":"1f4f9","uc_greedy":"1f4f9","shortnames":[],"category":"objects"},":video_game:":{"uc_base":"1f3ae","uc_output":"1f3ae","uc_match":"1f3ae","uc_greedy":"1f3ae","shortnames":[],"category":"activity"},":violin:":{"uc_base":"1f3bb","uc_output":"1f3bb","uc_match":"1f3bb","uc_greedy":"1f3bb","shortnames":[],"category":"activity"},":volcano:":{"uc_base":"1f30b","uc_output":"1f30b","uc_match":"1f30b","uc_greedy":"1f30b","shortnames":[],"category":"travel"},":volleyball:":{"uc_base":"1f3d0","uc_output":"1f3d0","uc_match":"1f3d0","uc_greedy":"1f3d0","shortnames":[],"category":"activity"},":vs:":{"uc_base":"1f19a","uc_output":"1f19a","uc_match":"1f19a","uc_greedy":"1f19a","shortnames":[],"category":"symbols"},":vulcan:":{"uc_base":"1f596","uc_output":"1f596","uc_match":"1f596","uc_greedy":"1f596","shortnames":[":raised_hand_with_part_between_middle_and_ring_fingers:"],"category":"people"},":waning_crescent_moon:":{"uc_base":"1f318","uc_output":"1f318","uc_match":"1f318","uc_greedy":"1f318","shortnames":[],"category":"nature"},":waning_gibbous_moon:":{"uc_base":"1f316","uc_output":"1f316","uc_match":"1f316","uc_greedy":"1f316","shortnames":[],"category":"nature"},":water_buffalo:":{"uc_base":"1f403","uc_output":"1f403","uc_match":"1f403","uc_greedy":"1f403","shortnames":[],"category":"nature"},":watermelon:":{"uc_base":"1f349","uc_output":"1f349","uc_match":"1f349","uc_greedy":"1f349","shortnames":[],"category":"food"},":wave:":{"uc_base":"1f44b","uc_output":"1f44b","uc_match":"1f44b","uc_greedy":"1f44b","shortnames":[],"category":"people"},":waxing_crescent_moon:":{"uc_base":"1f312","uc_output":"1f312","uc_match":"1f312","uc_greedy":"1f312","shortnames":[],"category":"nature"},":waxing_gibbous_moon:":{"uc_base":"1f314","uc_output":"1f314","uc_match":"1f314","uc_greedy":"1f314","shortnames":[],"category":"nature"},":wc:":{"uc_base":"1f6be","uc_output":"1f6be","uc_match":"1f6be","uc_greedy":"1f6be","shortnames":[],"category":"symbols"},":weary:":{"uc_base":"1f629","uc_output":"1f629","uc_match":"1f629","uc_greedy":"1f629","shortnames":[],"category":"people"},":wedding:":{"uc_base":"1f492","uc_output":"1f492","uc_match":"1f492","uc_greedy":"1f492","shortnames":[],"category":"travel"},":whale2:":{"uc_base":"1f40b","uc_output":"1f40b","uc_match":"1f40b","uc_greedy":"1f40b","shortnames":[],"category":"nature"},":whale:":{"uc_base":"1f433","uc_output":"1f433","uc_match":"1f433","uc_greedy":"1f433","shortnames":[],"category":"nature"},":white_flower:":{"uc_base":"1f4ae","uc_output":"1f4ae","uc_match":"1f4ae","uc_greedy":"1f4ae","shortnames":[],"category":"symbols"},":white_square_button:":{"uc_base":"1f533","uc_output":"1f533","uc_match":"1f533","uc_greedy":"1f533","shortnames":[],"category":"symbols"},":wilted_rose:":{"uc_base":"1f940","uc_output":"1f940","uc_match":"1f940","uc_greedy":"1f940","shortnames":[":wilted_flower:"],"category":"nature"},":wind_chime:":{"uc_base":"1f390","uc_output":"1f390","uc_match":"1f390","uc_greedy":"1f390","shortnames":[],"category":"objects"},":wine_glass:":{"uc_base":"1f377","uc_output":"1f377","uc_match":"1f377","uc_greedy":"1f377","shortnames":[],"category":"food"},":wink:":{"uc_base":"1f609","uc_output":"1f609","uc_match":"1f609","uc_greedy":"1f609","shortnames":[],"category":"people"},":wolf:":{"uc_base":"1f43a","uc_output":"1f43a","uc_match":"1f43a","uc_greedy":"1f43a","shortnames":[],"category":"nature"},":woman:":{"uc_base":"1f469","uc_output":"1f469","uc_match":"1f469","uc_greedy":"1f469","shortnames":[],"category":"people"},":woman_with_headscarf:":{"uc_base":"1f9d5","uc_output":"1f9d5","uc_match":"1f9d5","uc_greedy":"1f9d5","shortnames":[],"category":"people"},":womans_clothes:":{"uc_base":"1f45a","uc_output":"1f45a","uc_match":"1f45a","uc_greedy":"1f45a","shortnames":[],"category":"people"},":womans_hat:":{"uc_base":"1f452","uc_output":"1f452","uc_match":"1f452","uc_greedy":"1f452","shortnames":[],"category":"people"},":womens:":{"uc_base":"1f6ba","uc_output":"1f6ba","uc_match":"1f6ba","uc_greedy":"1f6ba","shortnames":[],"category":"symbols"},":worried:":{"uc_base":"1f61f","uc_output":"1f61f","uc_match":"1f61f","uc_greedy":"1f61f","shortnames":[],"category":"people"},":wrench:":{"uc_base":"1f527","uc_output":"1f527","uc_match":"1f527","uc_greedy":"1f527","shortnames":[],"category":"objects"},":yellow_heart:":{"uc_base":"1f49b","uc_output":"1f49b","uc_match":"1f49b","uc_greedy":"1f49b","shortnames":[],"category":"symbols"},":yen:":{"uc_base":"1f4b4","uc_output":"1f4b4","uc_match":"1f4b4","uc_greedy":"1f4b4","shortnames":[],"category":"objects"},":yum:":{"uc_base":"1f60b","uc_output":"1f60b","uc_match":"1f60b","uc_greedy":"1f60b","shortnames":[],"category":"people"},":zebra:":{"uc_base":"1f993","uc_output":"1f993","uc_match":"1f993","uc_greedy":"1f993","shortnames":[],"category":"nature"},":zipper_mouth:":{"uc_base":"1f910","uc_output":"1f910","uc_match":"1f910","uc_greedy":"1f910","shortnames":[":zipper_mouth_face:"],"category":"people"},":zombie:":{"uc_base":"1f9df","uc_output":"1f9df","uc_match":"1f9df","uc_greedy":"1f9df","shortnames":[],"category":"people"},":zzz:":{"uc_base":"1f4a4","uc_output":"1f4a4","uc_match":"1f4a4","uc_greedy":"1f4a4","shortnames":[],"category":"symbols"},":alarm_clock:":{"uc_base":"23f0","uc_output":"23f0","uc_match":"23f0","uc_greedy":"23f0","shortnames":[],"category":"objects"},":anchor:":{"uc_base":"2693","uc_output":"2693","uc_match":"2693","uc_greedy":"2693","shortnames":[],"category":"travel"},":aquarius:":{"uc_base":"2652","uc_output":"2652","uc_match":"2652","uc_greedy":"2652","shortnames":[],"category":"symbols"},":aries:":{"uc_base":"2648","uc_output":"2648","uc_match":"2648","uc_greedy":"2648","shortnames":[],"category":"symbols"},":arrow_double_down:":{"uc_base":"23ec","uc_output":"23ec","uc_match":"23ec","uc_greedy":"23ec","shortnames":[],"category":"symbols"},":arrow_double_up:":{"uc_base":"23eb","uc_output":"23eb","uc_match":"23eb","uc_greedy":"23eb","shortnames":[],"category":"symbols"},":baseball:":{"uc_base":"26be","uc_output":"26be","uc_match":"26be","uc_greedy":"26be","shortnames":[],"category":"activity"},":black_circle:":{"uc_base":"26ab","uc_output":"26ab","uc_match":"26ab","uc_greedy":"26ab","shortnames":[],"category":"symbols"},":black_large_square:":{"uc_base":"2b1b","uc_output":"2b1b","uc_match":"2b1b","uc_greedy":"2b1b","shortnames":[],"category":"symbols"},":black_medium_small_square:":{"uc_base":"25fe","uc_output":"25fe","uc_match":"25fe","uc_greedy":"25fe","shortnames":[],"category":"symbols"},":cancer:":{"uc_base":"264b","uc_output":"264b","uc_match":"264b","uc_greedy":"264b","shortnames":[],"category":"symbols"},":capricorn:":{"uc_base":"2651","uc_output":"2651","uc_match":"2651","uc_greedy":"2651","shortnames":[],"category":"symbols"},":church:":{"uc_base":"26ea","uc_output":"26ea","uc_match":"26ea","uc_greedy":"26ea","shortnames":[],"category":"travel"},":coffee:":{"uc_base":"2615","uc_output":"2615","uc_match":"2615","uc_greedy":"2615","shortnames":[],"category":"food"},":curly_loop:":{"uc_base":"27b0","uc_output":"27b0","uc_match":"27b0","uc_greedy":"27b0","shortnames":[],"category":"symbols"},":exclamation:":{"uc_base":"2757","uc_output":"2757","uc_match":"2757","uc_greedy":"2757","shortnames":[],"category":"symbols"},":fast_forward:":{"uc_base":"23e9","uc_output":"23e9","uc_match":"23e9","uc_greedy":"23e9","shortnames":[],"category":"symbols"},":fist:":{"uc_base":"270a","uc_output":"270a","uc_match":"270a","uc_greedy":"270a","shortnames":[],"category":"people"},":fountain:":{"uc_base":"26f2","uc_output":"26f2","uc_match":"26f2","uc_greedy":"26f2","shortnames":[],"category":"travel"},":fuelpump:":{"uc_base":"26fd","uc_output":"26fd","uc_match":"26fd","uc_greedy":"26fd","shortnames":[],"category":"travel"},":gemini:":{"uc_base":"264a","uc_output":"264a","uc_match":"264a","uc_greedy":"264a","shortnames":[],"category":"symbols"},":golf:":{"uc_base":"26f3","uc_output":"26f3","uc_match":"26f3","uc_greedy":"26f3","shortnames":[],"category":"activity"},":grey_exclamation:":{"uc_base":"2755","uc_output":"2755","uc_match":"2755","uc_greedy":"2755","shortnames":[],"category":"symbols"},":grey_question:":{"uc_base":"2754","uc_output":"2754","uc_match":"2754","uc_greedy":"2754","shortnames":[],"category":"symbols"},":heavy_division_sign:":{"uc_base":"2797","uc_output":"2797","uc_match":"2797","uc_greedy":"2797","shortnames":[],"category":"symbols"},":heavy_minus_sign:":{"uc_base":"2796","uc_output":"2796","uc_match":"2796","uc_greedy":"2796","shortnames":[],"category":"symbols"},":heavy_plus_sign:":{"uc_base":"2795","uc_output":"2795","uc_match":"2795","uc_greedy":"2795","shortnames":[],"category":"symbols"},":hourglass:":{"uc_base":"231b","uc_output":"231b","uc_match":"231b","uc_greedy":"231b","shortnames":[],"category":"objects"},":hourglass_flowing_sand:":{"uc_base":"23f3","uc_output":"23f3","uc_match":"23f3","uc_greedy":"23f3","shortnames":[],"category":"objects"},":leo:":{"uc_base":"264c","uc_output":"264c","uc_match":"264c","uc_greedy":"264c","shortnames":[],"category":"symbols"},":libra:":{"uc_base":"264e","uc_output":"264e","uc_match":"264e","uc_greedy":"264e","shortnames":[],"category":"symbols"},":loop:":{"uc_base":"27bf","uc_output":"27bf","uc_match":"27bf","uc_greedy":"27bf","shortnames":[],"category":"symbols"},":negative_squared_cross_mark:":{"uc_base":"274e","uc_output":"274e","uc_match":"274e","uc_greedy":"274e","shortnames":[],"category":"symbols"},":no_entry:":{"uc_base":"26d4","uc_output":"26d4","uc_match":"26d4","uc_greedy":"26d4","shortnames":[],"category":"symbols"},":o:":{"uc_base":"2b55","uc_output":"2b55","uc_match":"2b55","uc_greedy":"2b55","shortnames":[],"category":"symbols"},":ophiuchus:":{"uc_base":"26ce","uc_output":"26ce","uc_match":"26ce","uc_greedy":"26ce","shortnames":[],"category":"symbols"},":partly_sunny:":{"uc_base":"26c5","uc_output":"26c5","uc_match":"26c5","uc_greedy":"26c5","shortnames":[],"category":"nature"},":pisces:":{"uc_base":"2653","uc_output":"2653","uc_match":"2653","uc_greedy":"2653","shortnames":[],"category":"symbols"},":question:":{"uc_base":"2753","uc_output":"2753","uc_match":"2753","uc_greedy":"2753","shortnames":[],"category":"symbols"},":raised_hand:":{"uc_base":"270b","uc_output":"270b","uc_match":"270b","uc_greedy":"270b","shortnames":[],"category":"people"},":rewind:":{"uc_base":"23ea","uc_output":"23ea","uc_match":"23ea","uc_greedy":"23ea","shortnames":[],"category":"symbols"},":sagittarius:":{"uc_base":"2650","uc_output":"2650","uc_match":"2650","uc_greedy":"2650","shortnames":[],"category":"symbols"},":sailboat:":{"uc_base":"26f5","uc_output":"26f5","uc_match":"26f5","uc_greedy":"26f5","shortnames":[],"category":"travel"},":scorpius:":{"uc_base":"264f","uc_output":"264f","uc_match":"264f","uc_greedy":"264f","shortnames":[],"category":"symbols"},":snowman:":{"uc_base":"26c4","uc_output":"26c4","uc_match":"26c4","uc_greedy":"26c4","shortnames":[],"category":"nature"},":soccer:":{"uc_base":"26bd","uc_output":"26bd","uc_match":"26bd","uc_greedy":"26bd","shortnames":[],"category":"activity"},":sparkles:":{"uc_base":"2728","uc_output":"2728","uc_match":"2728","uc_greedy":"2728","shortnames":[],"category":"nature"},":star:":{"uc_base":"2b50","uc_output":"2b50","uc_match":"2b50","uc_greedy":"2b50","shortnames":[],"category":"nature"},":taurus:":{"uc_base":"2649","uc_output":"2649","uc_match":"2649","uc_greedy":"2649","shortnames":[],"category":"symbols"},":tent:":{"uc_base":"26fa","uc_output":"26fa","uc_match":"26fa","uc_greedy":"26fa","shortnames":[],"category":"travel"},":umbrella:":{"uc_base":"2614","uc_output":"2614","uc_match":"2614","uc_greedy":"2614","shortnames":[],"category":"nature"},":virgo:":{"uc_base":"264d","uc_output":"264d","uc_match":"264d","uc_greedy":"264d","shortnames":[],"category":"symbols"},":watch:":{"uc_base":"231a","uc_output":"231a","uc_match":"231a","uc_greedy":"231a","shortnames":[],"category":"objects"},":wheelchair:":{"uc_base":"267f","uc_output":"267f","uc_match":"267f","uc_greedy":"267f","shortnames":[],"category":"symbols"},":white_check_mark:":{"uc_base":"2705","uc_output":"2705","uc_match":"2705","uc_greedy":"2705","shortnames":[],"category":"symbols"},":white_circle:":{"uc_base":"26aa","uc_output":"26aa","uc_match":"26aa","uc_greedy":"26aa","shortnames":[],"category":"symbols"},":white_large_square:":{"uc_base":"2b1c","uc_output":"2b1c","uc_match":"2b1c","uc_greedy":"2b1c","shortnames":[],"category":"symbols"},":white_medium_small_square:":{"uc_base":"25fd","uc_output":"25fd","uc_match":"25fd","uc_greedy":"25fd","shortnames":[],"category":"symbols"},":x:":{"uc_base":"274c","uc_output":"274c","uc_match":"274c","uc_greedy":"274c","shortnames":[],"category":"symbols"},":zap:":{"uc_base":"26a1","uc_output":"26a1","uc_match":"26a1","uc_greedy":"26a1","shortnames":[],"category":"nature"}};
  39224. var tmpShortNames = [], emoji;
  39225. for (emoji in ns.emojioneList) {
  39226. if (!ns.emojioneList.hasOwnProperty(emoji) || (emoji === '')) continue;
  39227. tmpShortNames.push(emoji.replace(/[+]/g, "\\$&"));
  39228. for (var i = 0; i < ns.emojioneList[emoji].shortnames.length; i++) {
  39229. tmpShortNames.push(ns.emojioneList[emoji].shortnames[i].replace(/[+]/g, "\\$&"));
  39230. }
  39231. }
  39232. ns.shortnames = tmpShortNames.join('|');
  39233. // javascript escapes here must be ordered from largest length to shortest
  39234. ns.jsEscapeMap = {"\uD83D\uDC69\u200D\u2764\uFE0F\u200D\uD83D\uDC8B\u200D\uD83D\uDC69":"1f469-2764-1f48b-1f469","\uD83D\uDC68\u200D\u2764\uFE0F\u200D\uD83D\uDC8B\u200D\uD83D\uDC68":"1f468-2764-1f48b-1f468","\uD83D\uDC69\u200D\u2764\uFE0F\u200D\uD83D\uDC8B\u200D\uD83D\uDC68":"1f469-2764-1f48b-1f468","\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67\uDB40\uDC7F":"1f3f4-e0067-e0062-e0065-e006e-e0067-e007f","\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74\uDB40\uDC7F":"1f3f4-e0067-e0062-e0073-e0063-e0074-e007f","\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73\uDB40\uDC7F":"1f3f4-e0067-e0062-e0077-e006c-e0073-e007f","\uD83D\uDC68\u200D\uD83D\uDC68\u200D\uD83D\uDC66\u200D\uD83D\uDC66":"1f468-1f468-1f466-1f466","\uD83D\uDC68\u200D\uD83D\uDC68\u200D\uD83D\uDC67\u200D\uD83D\uDC66":"1f468-1f468-1f467-1f466","\uD83D\uDC68\u200D\uD83D\uDC68\u200D\uD83D\uDC67\u200D\uD83D\uDC67":"1f468-1f468-1f467-1f467","\uD83D\uDC68\u200D\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66":"1f468-1f469-1f466-1f466","\uD83D\uDC68\u200D\uD83D\uDC69\u200D\uD83D\uDC67\u200D\uD83D\uDC66":"1f468-1f469-1f467-1f466","\uD83D\uDC68\u200D\uD83D\uDC69\u200D\uD83D\uDC67\u200D\uD83D\uDC67":"1f468-1f469-1f467-1f467","\uD83D\uDC69\u200D\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66":"1f469-1f469-1f466-1f466","\uD83D\uDC69\u200D\uD83D\uDC69\u200D\uD83D\uDC67\u200D\uD83D\uDC66":"1f469-1f469-1f467-1f466","\uD83D\uDC69\u200D\uD83D\uDC69\u200D\uD83D\uDC67\u200D\uD83D\uDC67":"1f469-1f469-1f467-1f467","\uD83D\uDC68\u200D\u2764\u200D\uD83D\uDC8B\u200D\uD83D\uDC68":"1f468-2764-1f48b-1f468","\uD83D\uDC69\u200D\u2764\u200D\uD83D\uDC8B\u200D\uD83D\uDC68":"1f469-2764-1f48b-1f468","\uD83D\uDC69\u200D\u2764\u200D\uD83D\uDC8B\u200D\uD83D\uDC69":"1f469-2764-1f48b-1f469","\uD83D\uDC69\u200D\u2764\uFE0F\u200D\uD83D\uDC69":"1f469-2764-1f469","\uD83D\uDC68\u200D\u2764\uFE0F\u200D\uD83D\uDC68":"1f468-2764-1f468","\uD83D\uDC69\u200D\u2764\uFE0F\u200D\uD83D\uDC68":"1f469-2764-1f468","\uD83D\uDD75\uFE0F\uD83C\uDFFB\u200D\u2640\uFE0F":"1f575-1f3fb-2640","\uD83D\uDD75\uFE0F\uD83C\uDFFB\u200D\u2642\uFE0F":"1f575-1f3fb-2642","\uD83D\uDD75\uFE0F\uD83C\uDFFC\u200D\u2640\uFE0F":"1f575-1f3fc-2640","\uD83D\uDD75\uFE0F\uD83C\uDFFC\u200D\u2642\uFE0F":"1f575-1f3fc-2642","\uD83D\uDD75\uFE0F\uD83C\uDFFD\u200D\u2640\uFE0F":"1f575-1f3fd-2640","\uD83D\uDD75\uFE0F\uD83C\uDFFD\u200D\u2642\uFE0F":"1f575-1f3fd-2642","\uD83D\uDD75\uFE0F\uD83C\uDFFE\u200D\u2640\uFE0F":"1f575-1f3fe-2640","\uD83D\uDD75\uFE0F\uD83C\uDFFE\u200D\u2642\uFE0F":"1f575-1f3fe-2642","\uD83D\uDD75\uFE0F\uD83C\uDFFF\u200D\u2640\uFE0F":"1f575-1f3ff-2640","\uD83D\uDD75\uFE0F\uD83C\uDFFF\u200D\u2642\uFE0F":"1f575-1f3ff-2642","\uD83C\uDFCB\uFE0F\uD83C\uDFFB\u200D\u2640\uFE0F":"1f3cb-1f3fb-2640","\uD83C\uDFCB\uFE0F\uD83C\uDFFB\u200D\u2642\uFE0F":"1f3cb-1f3fb-2642","\uD83C\uDFCB\uFE0F\uD83C\uDFFC\u200D\u2640\uFE0F":"1f3cb-1f3fc-2640","\uD83C\uDFCB\uFE0F\uD83C\uDFFC\u200D\u2642\uFE0F":"1f3cb-1f3fc-2642","\uD83C\uDFCB\uFE0F\uD83C\uDFFD\u200D\u2640\uFE0F":"1f3cb-1f3fd-2640","\uD83C\uDFCB\uFE0F\uD83C\uDFFD\u200D\u2642\uFE0F":"1f3cb-1f3fd-2642","\uD83C\uDFCB\uFE0F\uD83C\uDFFE\u200D\u2640\uFE0F":"1f3cb-1f3fe-2640","\uD83C\uDFCB\uFE0F\uD83C\uDFFE\u200D\u2642\uFE0F":"1f3cb-1f3fe-2642","\uD83C\uDFCB\uFE0F\uD83C\uDFFF\u200D\u2640\uFE0F":"1f3cb-1f3ff-2640","\uD83C\uDFCB\uFE0F\uD83C\uDFFF\u200D\u2642\uFE0F":"1f3cb-1f3ff-2642","\uD83C\uDFCC\uFE0F\uD83C\uDFFB\u200D\u2640\uFE0F":"1f3cc-1f3fb-2640","\uD83C\uDFCC\uFE0F\uD83C\uDFFB\u200D\u2642\uFE0F":"1f3cc-1f3fb-2642","\uD83C\uDFCC\uFE0F\uD83C\uDFFC\u200D\u2640\uFE0F":"1f3cc-1f3fc-2640","\uD83C\uDFCC\uFE0F\uD83C\uDFFC\u200D\u2642\uFE0F":"1f3cc-1f3fc-2642","\uD83C\uDFCC\uFE0F\uD83C\uDFFD\u200D\u2640\uFE0F":"1f3cc-1f3fd-2640","\uD83C\uDFCC\uFE0F\uD83C\uDFFD\u200D\u2642\uFE0F":"1f3cc-1f3fd-2642","\uD83C\uDFCC\uFE0F\uD83C\uDFFE\u200D\u2640\uFE0F":"1f3cc-1f3fe-2640","\uD83C\uDFCC\uFE0F\uD83C\uDFFE\u200D\u2642\uFE0F":"1f3cc-1f3fe-2642","\uD83C\uDFCC\uFE0F\uD83C\uDFFF\u200D\u2640\uFE0F":"1f3cc-1f3ff-2640","\uD83C\uDFCC\uFE0F\uD83C\uDFFF\u200D\u2642\uFE0F":"1f3cc-1f3ff-2642","\u26F9\uFE0F\uD83C\uDFFB\u200D\u2640\uFE0F":"26f9-1f3fb-2640","\u26F9\uFE0F\uD83C\uDFFB\u200D\u2642\uFE0F":"26f9-1f3fb-2642","\u26F9\uFE0F\uD83C\uDFFC\u200D\u2640\uFE0F":"26f9-1f3fc-2640","\u26F9\uFE0F\uD83C\uDFFC\u200D\u2642\uFE0F":"26f9-1f3fc-2642","\u26F9\uFE0F\uD83C\uDFFD\u200D\u2640\uFE0F":"26f9-1f3fd-2640","\u26F9\uFE0F\uD83C\uDFFD\u200D\u2642\uFE0F":"26f9-1f3fd-2642","\u26F9\uFE0F\uD83C\uDFFE\u200D\u2640\uFE0F":"26f9-1f3fe-2640","\u26F9\uFE0F\uD83C\uDFFE\u200D\u2642\uFE0F":"26f9-1f3fe-2642","\u26F9\uFE0F\uD83C\uDFFF\u200D\u2640\uFE0F":"26f9-1f3ff-2640","\u26F9\uFE0F\uD83C\uDFFF\u200D\u2642\uFE0F":"26f9-1f3ff-2642","\uD83D\uDC68\u200D\uD83D\uDC68\u200D\uD83D\uDC66":"1f468-1f468-1f466","\uD83D\uDC68\u200D\uD83D\uDC68\u200D\uD83D\uDC67":"1f468-1f468-1f467","\uD83D\uDC68\u200D\uD83D\uDC69\u200D\uD83D\uDC67":"1f468-1f469-1f467","\uD83D\uDC69\u200D\uD83D\uDC69\u200D\uD83D\uDC66":"1f469-1f469-1f466","\uD83D\uDC69\u200D\uD83D\uDC69\u200D\uD83D\uDC67":"1f469-1f469-1f467","\uD83D\uDC68\u200D\uD83D\uDC66\u200D\uD83D\uDC66":"1f468-1f466-1f466","\uD83D\uDC68\u200D\uD83D\uDC67\u200D\uD83D\uDC66":"1f468-1f467-1f466","\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66":"1f469-1f466-1f466","\uD83D\uDC69\u200D\uD83D\uDC67\u200D\uD83D\uDC66":"1f469-1f467-1f466","\uD83D\uDC69\u200D\uD83D\uDC67\u200D\uD83D\uDC67":"1f469-1f467-1f467","\uD83D\uDC68\u2764\uFE0F\uD83D\uDC8B\uD83D\uDC68":"1f468-2764-1f48b-1f468","\uD83D\uDC68\u200D\uD83D\uDC67\u200D\uD83D\uDC67":"1f468-1f467-1f467","\uD83D\uDC68\u200D\uD83D\uDC69\u200D\uD83D\uDC66":"1f468-1f469-1f466","\uD83D\uDC69\u2764\uFE0F\uD83D\uDC8B\uD83D\uDC68":"1f469-2764-1f48b-1f468","\uD83D\uDC69\u2764\uFE0F\uD83D\uDC8B\uD83D\uDC69":"1f469-2764-1f48b-1f469","\uD83D\uDC68\u200D\u2764\u200D\uD83D\uDC68":"1f468-2764-1f468","\uD83D\uDC69\u200D\u2764\u200D\uD83D\uDC68":"1f469-2764-1f468","\uD83D\uDC69\u200D\u2764\u200D\uD83D\uDC69":"1f469-2764-1f469","\uD83D\uDC68\uD83C\uDFFB\u200D\u2695\uFE0F":"1f468-1f3fb-2695","\uD83D\uDC68\uD83C\uDFFB\u200D\u2696\uFE0F":"1f468-1f3fb-2696","\uD83D\uDC68\uD83C\uDFFB\u200D\u2708\uFE0F":"1f468-1f3fb-2708","\uD83D\uDC68\uD83C\uDFFC\u200D\u2695\uFE0F":"1f468-1f3fc-2695","\uD83D\uDC68\uD83C\uDFFC\u200D\u2696\uFE0F":"1f468-1f3fc-2696","\uD83D\uDC68\uD83C\uDFFC\u200D\u2708\uFE0F":"1f468-1f3fc-2708","\uD83D\uDC68\uD83C\uDFFD\u200D\u2695\uFE0F":"1f468-1f3fd-2695","\uD83D\uDC68\uD83C\uDFFD\u200D\u2696\uFE0F":"1f468-1f3fd-2696","\uD83D\uDC68\uD83C\uDFFD\u200D\u2708\uFE0F":"1f468-1f3fd-2708","\uD83D\uDC68\uD83C\uDFFE\u200D\u2695\uFE0F":"1f468-1f3fe-2695","\uD83D\uDC68\uD83C\uDFFE\u200D\u2696\uFE0F":"1f468-1f3fe-2696","\uD83D\uDC68\uD83C\uDFFE\u200D\u2708\uFE0F":"1f468-1f3fe-2708","\uD83D\uDC68\uD83C\uDFFF\u200D\u2695\uFE0F":"1f468-1f3ff-2695","\uD83D\uDC68\uD83C\uDFFF\u200D\u2696\uFE0F":"1f468-1f3ff-2696","\uD83D\uDC68\uD83C\uDFFF\u200D\u2708\uFE0F":"1f468-1f3ff-2708","\uD83D\uDC69\uD83C\uDFFB\u200D\u2695\uFE0F":"1f469-1f3fb-2695","\uD83D\uDC69\uD83C\uDFFB\u200D\u2696\uFE0F":"1f469-1f3fb-2696","\uD83D\uDC69\uD83C\uDFFB\u200D\u2708\uFE0F":"1f469-1f3fb-2708","\uD83D\uDC69\uD83C\uDFFC\u200D\u2695\uFE0F":"1f469-1f3fc-2695","\uD83D\uDC69\uD83C\uDFFC\u200D\u2696\uFE0F":"1f469-1f3fc-2696","\uD83D\uDC69\uD83C\uDFFC\u200D\u2708\uFE0F":"1f469-1f3fc-2708","\uD83D\uDC69\uD83C\uDFFD\u200D\u2695\uFE0F":"1f469-1f3fd-2695","\uD83D\uDC69\uD83C\uDFFD\u200D\u2696\uFE0F":"1f469-1f3fd-2696","\uD83D\uDC69\uD83C\uDFFD\u200D\u2708\uFE0F":"1f469-1f3fd-2708","\uD83D\uDC69\uD83C\uDFFE\u200D\u2695\uFE0F":"1f469-1f3fe-2695","\uD83D\uDC69\uD83C\uDFFE\u200D\u2696\uFE0F":"1f469-1f3fe-2696","\uD83D\uDC69\uD83C\uDFFE\u200D\u2708\uFE0F":"1f469-1f3fe-2708","\uD83D\uDC69\uD83C\uDFFF\u200D\u2695\uFE0F":"1f469-1f3ff-2695","\uD83D\uDC69\uD83C\uDFFF\u200D\u2696\uFE0F":"1f469-1f3ff-2696","\uD83D\uDC69\uD83C\uDFFF\u200D\u2708\uFE0F":"1f469-1f3ff-2708","\uD83D\uDC6E\uD83C\uDFFB\u200D\u2640\uFE0F":"1f46e-1f3fb-2640","\uD83D\uDC6E\uD83C\uDFFB\u200D\u2642\uFE0F":"1f46e-1f3fb-2642","\uD83D\uDC6E\uD83C\uDFFC\u200D\u2640\uFE0F":"1f46e-1f3fc-2640","\uD83D\uDC6E\uD83C\uDFFC\u200D\u2642\uFE0F":"1f46e-1f3fc-2642","\uD83D\uDC6E\uD83C\uDFFD\u200D\u2640\uFE0F":"1f46e-1f3fd-2640","\uD83D\uDC6E\uD83C\uDFFD\u200D\u2642\uFE0F":"1f46e-1f3fd-2642","\uD83D\uDC6E\uD83C\uDFFE\u200D\u2640\uFE0F":"1f46e-1f3fe-2640","\uD83D\uDC6E\uD83C\uDFFE\u200D\u2642\uFE0F":"1f46e-1f3fe-2642","\uD83D\uDC6E\uD83C\uDFFF\u200D\u2640\uFE0F":"1f46e-1f3ff-2640","\uD83D\uDC6E\uD83C\uDFFF\u200D\u2642\uFE0F":"1f46e-1f3ff-2642","\uD83D\uDC71\uD83C\uDFFB\u200D\u2640\uFE0F":"1f471-1f3fb-2640","\uD83D\uDC71\uD83C\uDFFB\u200D\u2642\uFE0F":"1f471-1f3fb-2642","\uD83D\uDC71\uD83C\uDFFC\u200D\u2640\uFE0F":"1f471-1f3fc-2640","\uD83D\uDC71\uD83C\uDFFC\u200D\u2642\uFE0F":"1f471-1f3fc-2642","\uD83D\uDC71\uD83C\uDFFD\u200D\u2640\uFE0F":"1f471-1f3fd-2640","\uD83D\uDC71\uD83C\uDFFD\u200D\u2642\uFE0F":"1f471-1f3fd-2642","\uD83D\uDC71\uD83C\uDFFE\u200D\u2640\uFE0F":"1f471-1f3fe-2640","\uD83D\uDC71\uD83C\uDFFE\u200D\u2642\uFE0F":"1f471-1f3fe-2642","\uD83D\uDC71\uD83C\uDFFF\u200D\u2640\uFE0F":"1f471-1f3ff-2640","\uD83D\uDC71\uD83C\uDFFF\u200D\u2642\uFE0F":"1f471-1f3ff-2642","\uD83D\uDC73\uD83C\uDFFB\u200D\u2640\uFE0F":"1f473-1f3fb-2640","\uD83D\uDC73\uD83C\uDFFB\u200D\u2642\uFE0F":"1f473-1f3fb-2642","\uD83D\uDC73\uD83C\uDFFC\u200D\u2640\uFE0F":"1f473-1f3fc-2640","\uD83D\uDC73\uD83C\uDFFC\u200D\u2642\uFE0F":"1f473-1f3fc-2642","\uD83D\uDC73\uD83C\uDFFD\u200D\u2640\uFE0F":"1f473-1f3fd-2640","\uD83D\uDC73\uD83C\uDFFD\u200D\u2642\uFE0F":"1f473-1f3fd-2642","\uD83D\uDC73\uD83C\uDFFE\u200D\u2640\uFE0F":"1f473-1f3fe-2640","\uD83D\uDC73\uD83C\uDFFE\u200D\u2642\uFE0F":"1f473-1f3fe-2642","\uD83D\uDC73\uD83C\uDFFF\u200D\u2640\uFE0F":"1f473-1f3ff-2640","\uD83D\uDC73\uD83C\uDFFF\u200D\u2642\uFE0F":"1f473-1f3ff-2642","\uD83D\uDC77\uD83C\uDFFB\u200D\u2640\uFE0F":"1f477-1f3fb-2640","\uD83D\uDC77\uD83C\uDFFB\u200D\u2642\uFE0F":"1f477-1f3fb-2642","\uD83D\uDC77\uD83C\uDFFC\u200D\u2640\uFE0F":"1f477-1f3fc-2640","\uD83D\uDC77\uD83C\uDFFC\u200D\u2642\uFE0F":"1f477-1f3fc-2642","\uD83D\uDC77\uD83C\uDFFD\u200D\u2640\uFE0F":"1f477-1f3fd-2640","\uD83D\uDC77\uD83C\uDFFD\u200D\u2642\uFE0F":"1f477-1f3fd-2642","\uD83D\uDC77\uD83C\uDFFE\u200D\u2640\uFE0F":"1f477-1f3fe-2640","\uD83D\uDC77\uD83C\uDFFE\u200D\u2642\uFE0F":"1f477-1f3fe-2642","\uD83D\uDC77\uD83C\uDFFF\u200D\u2640\uFE0F":"1f477-1f3ff-2640","\uD83D\uDC77\uD83C\uDFFF\u200D\u2642\uFE0F":"1f477-1f3ff-2642","\uD83D\uDC82\uD83C\uDFFB\u200D\u2640\uFE0F":"1f482-1f3fb-2640","\uD83D\uDC82\uD83C\uDFFB\u200D\u2642\uFE0F":"1f482-1f3fb-2642","\uD83D\uDC82\uD83C\uDFFC\u200D\u2640\uFE0F":"1f482-1f3fc-2640","\uD83D\uDC82\uD83C\uDFFC\u200D\u2642\uFE0F":"1f482-1f3fc-2642","\uD83D\uDC82\uD83C\uDFFD\u200D\u2640\uFE0F":"1f482-1f3fd-2640","\uD83D\uDC82\uD83C\uDFFD\u200D\u2642\uFE0F":"1f482-1f3fd-2642","\uD83D\uDC82\uD83C\uDFFE\u200D\u2640\uFE0F":"1f482-1f3fe-2640","\uD83D\uDC82\uD83C\uDFFE\u200D\u2642\uFE0F":"1f482-1f3fe-2642","\uD83D\uDC82\uD83C\uDFFF\u200D\u2640\uFE0F":"1f482-1f3ff-2640","\uD83D\uDC82\uD83C\uDFFF\u200D\u2642\uFE0F":"1f482-1f3ff-2642","\uD83D\uDD75\uFE0F\uD83C\uDFFB\u2640\uFE0F":"1f575-1f3fb-2640","\uD83D\uDD75\uFE0F\uD83C\uDFFB\u2642\uFE0F":"1f575-1f3fb-2642","\uD83D\uDD75\uFE0F\uD83C\uDFFC\u2640\uFE0F":"1f575-1f3fc-2640","\uD83D\uDD75\uFE0F\uD83C\uDFFC\u2642\uFE0F":"1f575-1f3fc-2642","\uD83D\uDD75\uFE0F\uD83C\uDFFD\u2640\uFE0F":"1f575-1f3fd-2640","\uD83D\uDD75\uFE0F\uD83C\uDFFD\u2642\uFE0F":"1f575-1f3fd-2642","\uD83D\uDD75\uFE0F\uD83C\uDFFE\u2640\uFE0F":"1f575-1f3fe-2640","\uD83D\uDD75\uFE0F\uD83C\uDFFE\u2642\uFE0F":"1f575-1f3fe-2642","\uD83D\uDD75\uFE0F\uD83C\uDFFF\u2640\uFE0F":"1f575-1f3ff-2640","\uD83D\uDD75\uFE0F\uD83C\uDFFF\u2642\uFE0F":"1f575-1f3ff-2642","\uD83C\uDFC3\uD83C\uDFFB\u200D\u2640\uFE0F":"1f3c3-1f3fb-2640","\uD83C\uDFC3\uD83C\uDFFB\u200D\u2642\uFE0F":"1f3c3-1f3fb-2642","\uD83C\uDFC3\uD83C\uDFFC\u200D\u2640\uFE0F":"1f3c3-1f3fc-2640","\uD83C\uDFC3\uD83C\uDFFC\u200D\u2642\uFE0F":"1f3c3-1f3fc-2642","\uD83C\uDFC3\uD83C\uDFFD\u200D\u2640\uFE0F":"1f3c3-1f3fd-2640","\uD83C\uDFC3\uD83C\uDFFD\u200D\u2642\uFE0F":"1f3c3-1f3fd-2642","\uD83C\uDFC3\uD83C\uDFFE\u200D\u2640\uFE0F":"1f3c3-1f3fe-2640","\uD83C\uDFC3\uD83C\uDFFE\u200D\u2642\uFE0F":"1f3c3-1f3fe-2642","\uD83C\uDFC3\uD83C\uDFFF\u200D\u2640\uFE0F":"1f3c3-1f3ff-2640","\uD83C\uDFC3\uD83C\uDFFF\u200D\u2642\uFE0F":"1f3c3-1f3ff-2642","\uD83C\uDFC4\uD83C\uDFFB\u200D\u2640\uFE0F":"1f3c4-1f3fb-2640","\uD83C\uDFC4\uD83C\uDFFB\u200D\u2642\uFE0F":"1f3c4-1f3fb-2642","\uD83C\uDFC4\uD83C\uDFFC\u200D\u2640\uFE0F":"1f3c4-1f3fc-2640","\uD83C\uDFC4\uD83C\uDFFC\u200D\u2642\uFE0F":"1f3c4-1f3fc-2642","\uD83C\uDFC4\uD83C\uDFFD\u200D\u2640\uFE0F":"1f3c4-1f3fd-2640","\uD83C\uDFC4\uD83C\uDFFD\u200D\u2642\uFE0F":"1f3c4-1f3fd-2642","\uD83C\uDFC4\uD83C\uDFFE\u200D\u2640\uFE0F":"1f3c4-1f3fe-2640","\uD83C\uDFC4\uD83C\uDFFE\u200D\u2642\uFE0F":"1f3c4-1f3fe-2642","\uD83C\uDFC4\uD83C\uDFFF\u200D\u2640\uFE0F":"1f3c4-1f3ff-2640","\uD83C\uDFC4\uD83C\uDFFF\u200D\u2642\uFE0F":"1f3c4-1f3ff-2642","\uD83C\uDFCA\uD83C\uDFFB\u200D\u2640\uFE0F":"1f3ca-1f3fb-2640","\uD83C\uDFCA\uD83C\uDFFB\u200D\u2642\uFE0F":"1f3ca-1f3fb-2642","\uD83C\uDFCA\uD83C\uDFFC\u200D\u2640\uFE0F":"1f3ca-1f3fc-2640","\uD83C\uDFCA\uD83C\uDFFC\u200D\u2642\uFE0F":"1f3ca-1f3fc-2642","\uD83C\uDFCA\uD83C\uDFFD\u200D\u2640\uFE0F":"1f3ca-1f3fd-2640","\uD83C\uDFCA\uD83C\uDFFD\u200D\u2642\uFE0F":"1f3ca-1f3fd-2642","\uD83C\uDFCA\uD83C\uDFFE\u200D\u2640\uFE0F":"1f3ca-1f3fe-2640","\uD83C\uDFCA\uD83C\uDFFE\u200D\u2642\uFE0F":"1f3ca-1f3fe-2642","\uD83C\uDFCA\uD83C\uDFFF\u200D\u2640\uFE0F":"1f3ca-1f3ff-2640","\uD83C\uDFCA\uD83C\uDFFF\u200D\u2642\uFE0F":"1f3ca-1f3ff-2642","\uD83C\uDFCB\uFE0F\uD83C\uDFFB\u2640\uFE0F":"1f3cb-1f3fb-2640","\uD83C\uDFCB\uFE0F\uD83C\uDFFB\u2642\uFE0F":"1f3cb-1f3fb-2642","\uD83C\uDFCB\uFE0F\uD83C\uDFFC\u2640\uFE0F":"1f3cb-1f3fc-2640","\uD83C\uDFCB\uFE0F\uD83C\uDFFC\u2642\uFE0F":"1f3cb-1f3fc-2642","\uD83C\uDFCB\uFE0F\uD83C\uDFFD\u2640\uFE0F":"1f3cb-1f3fd-2640","\uD83C\uDFCB\uFE0F\uD83C\uDFFD\u2642\uFE0F":"1f3cb-1f3fd-2642","\uD83C\uDFCB\uFE0F\uD83C\uDFFE\u2640\uFE0F":"1f3cb-1f3fe-2640","\uD83C\uDFCB\uFE0F\uD83C\uDFFE\u2642\uFE0F":"1f3cb-1f3fe-2642","\uD83C\uDFCB\uFE0F\uD83C\uDFFF\u2640\uFE0F":"1f3cb-1f3ff-2640","\uD83C\uDFCB\uFE0F\uD83C\uDFFF\u2642\uFE0F":"1f3cb-1f3ff-2642","\uD83C\uDFCC\uFE0F\uD83C\uDFFB\u2640\uFE0F":"1f3cc-1f3fb-2640","\uD83C\uDFCC\uFE0F\uD83C\uDFFB\u2642\uFE0F":"1f3cc-1f3fb-2642","\uD83C\uDFCC\uFE0F\uD83C\uDFFC\u2640\uFE0F":"1f3cc-1f3fc-2640","\uD83C\uDFCC\uFE0F\uD83C\uDFFC\u2642\uFE0F":"1f3cc-1f3fc-2642","\uD83C\uDFCC\uFE0F\uD83C\uDFFD\u2640\uFE0F":"1f3cc-1f3fd-2640","\uD83C\uDFCC\uFE0F\uD83C\uDFFD\u2642\uFE0F":"1f3cc-1f3fd-2642","\uD83C\uDFCC\uFE0F\uD83C\uDFFE\u2640\uFE0F":"1f3cc-1f3fe-2640","\uD83C\uDFCC\uFE0F\uD83C\uDFFE\u2642\uFE0F":"1f3cc-1f3fe-2642","\uD83C\uDFCC\uFE0F\uD83C\uDFFF\u2640\uFE0F":"1f3cc-1f3ff-2640","\uD83C\uDFCC\uFE0F\uD83C\uDFFF\u2642\uFE0F":"1f3cc-1f3ff-2642","\uD83D\uDC86\uD83C\uDFFB\u200D\u2640\uFE0F":"1f486-1f3fb-2640","\uD83D\uDC86\uD83C\uDFFB\u200D\u2642\uFE0F":"1f486-1f3fb-2642","\uD83D\uDC86\uD83C\uDFFC\u200D\u2640\uFE0F":"1f486-1f3fc-2640","\uD83D\uDC86\uD83C\uDFFC\u200D\u2642\uFE0F":"1f486-1f3fc-2642","\uD83D\uDC86\uD83C\uDFFD\u200D\u2640\uFE0F":"1f486-1f3fd-2640","\uD83D\uDC86\uD83C\uDFFD\u200D\u2642\uFE0F":"1f486-1f3fd-2642","\uD83D\uDC86\uD83C\uDFFE\u200D\u2640\uFE0F":"1f486-1f3fe-2640","\uD83D\uDC86\uD83C\uDFFE\u200D\u2642\uFE0F":"1f486-1f3fe-2642","\uD83D\uDC86\uD83C\uDFFF\u200D\u2640\uFE0F":"1f486-1f3ff-2640","\uD83D\uDC86\uD83C\uDFFF\u200D\u2642\uFE0F":"1f486-1f3ff-2642","\uD83D\uDC87\uD83C\uDFFB\u200D\u2640\uFE0F":"1f487-1f3fb-2640","\uD83D\uDC87\uD83C\uDFFB\u200D\u2642\uFE0F":"1f487-1f3fb-2642","\uD83D\uDC87\uD83C\uDFFC\u200D\u2640\uFE0F":"1f487-1f3fc-2640","\uD83D\uDC87\uD83C\uDFFC\u200D\u2642\uFE0F":"1f487-1f3fc-2642","\uD83D\uDC87\uD83C\uDFFD\u200D\u2640\uFE0F":"1f487-1f3fd-2640","\uD83D\uDC87\uD83C\uDFFD\u200D\u2642\uFE0F":"1f487-1f3fd-2642","\uD83D\uDC87\uD83C\uDFFE\u200D\u2640\uFE0F":"1f487-1f3fe-2640","\uD83D\uDC87\uD83C\uDFFE\u200D\u2642\uFE0F":"1f487-1f3fe-2642","\uD83D\uDC87\uD83C\uDFFF\u200D\u2640\uFE0F":"1f487-1f3ff-2640","\uD83D\uDC87\uD83C\uDFFF\u200D\u2642\uFE0F":"1f487-1f3ff-2642","\uD83D\uDEA3\uD83C\uDFFB\u200D\u2640\uFE0F":"1f6a3-1f3fb-2640","\uD83D\uDEA3\uD83C\uDFFB\u200D\u2642\uFE0F":"1f6a3-1f3fb-2642","\uD83D\uDEA3\uD83C\uDFFC\u200D\u2640\uFE0F":"1f6a3-1f3fc-2640","\uD83D\uDEA3\uD83C\uDFFC\u200D\u2642\uFE0F":"1f6a3-1f3fc-2642","\uD83D\uDEA3\uD83C\uDFFD\u200D\u2640\uFE0F":"1f6a3-1f3fd-2640","\uD83D\uDEA3\uD83C\uDFFD\u200D\u2642\uFE0F":"1f6a3-1f3fd-2642","\uD83D\uDEA3\uD83C\uDFFE\u200D\u2640\uFE0F":"1f6a3-1f3fe-2640","\uD83D\uDEA3\uD83C\uDFFE\u200D\u2642\uFE0F":"1f6a3-1f3fe-2642","\uD83D\uDEA3\uD83C\uDFFF\u200D\u2640\uFE0F":"1f6a3-1f3ff-2640","\uD83D\uDEA3\uD83C\uDFFF\u200D\u2642\uFE0F":"1f6a3-1f3ff-2642","\uD83D\uDEB4\uD83C\uDFFB\u200D\u2640\uFE0F":"1f6b4-1f3fb-2640","\uD83D\uDEB4\uD83C\uDFFB\u200D\u2642\uFE0F":"1f6b4-1f3fb-2642","\uD83D\uDEB4\uD83C\uDFFC\u200D\u2640\uFE0F":"1f6b4-1f3fc-2640","\uD83D\uDEB4\uD83C\uDFFC\u200D\u2642\uFE0F":"1f6b4-1f3fc-2642","\uD83D\uDEB4\uD83C\uDFFD\u200D\u2640\uFE0F":"1f6b4-1f3fd-2640","\uD83D\uDEB4\uD83C\uDFFD\u200D\u2642\uFE0F":"1f6b4-1f3fd-2642","\uD83D\uDEB4\uD83C\uDFFE\u200D\u2640\uFE0F":"1f6b4-1f3fe-2640","\uD83D\uDEB4\uD83C\uDFFE\u200D\u2642\uFE0F":"1f6b4-1f3fe-2642","\uD83D\uDEB4\uD83C\uDFFF\u200D\u2640\uFE0F":"1f6b4-1f3ff-2640","\uD83D\uDEB4\uD83C\uDFFF\u200D\u2642\uFE0F":"1f6b4-1f3ff-2642","\uD83D\uDEB5\uD83C\uDFFB\u200D\u2640\uFE0F":"1f6b5-1f3fb-2640","\uD83D\uDEB5\uD83C\uDFFB\u200D\u2642\uFE0F":"1f6b5-1f3fb-2642","\uD83D\uDEB5\uD83C\uDFFC\u200D\u2640\uFE0F":"1f6b5-1f3fc-2640","\uD83D\uDEB5\uD83C\uDFFC\u200D\u2642\uFE0F":"1f6b5-1f3fc-2642","\uD83D\uDEB5\uD83C\uDFFD\u200D\u2640\uFE0F":"1f6b5-1f3fd-2640","\uD83D\uDEB5\uD83C\uDFFD\u200D\u2642\uFE0F":"1f6b5-1f3fd-2642","\uD83D\uDEB5\uD83C\uDFFE\u200D\u2640\uFE0F":"1f6b5-1f3fe-2640","\uD83D\uDEB5\uD83C\uDFFE\u200D\u2642\uFE0F":"1f6b5-1f3fe-2642","\uD83D\uDEB5\uD83C\uDFFF\u200D\u2640\uFE0F":"1f6b5-1f3ff-2640","\uD83D\uDEB5\uD83C\uDFFF\u200D\u2642\uFE0F":"1f6b5-1f3ff-2642","\uD83D\uDEB6\uD83C\uDFFB\u200D\u2640\uFE0F":"1f6b6-1f3fb-2640","\uD83D\uDEB6\uD83C\uDFFB\u200D\u2642\uFE0F":"1f6b6-1f3fb-2642","\uD83D\uDEB6\uD83C\uDFFC\u200D\u2640\uFE0F":"1f6b6-1f3fc-2640","\uD83D\uDEB6\uD83C\uDFFC\u200D\u2642\uFE0F":"1f6b6-1f3fc-2642","\uD83D\uDEB6\uD83C\uDFFD\u200D\u2640\uFE0F":"1f6b6-1f3fd-2640","\uD83D\uDEB6\uD83C\uDFFD\u200D\u2642\uFE0F":"1f6b6-1f3fd-2642","\uD83D\uDEB6\uD83C\uDFFE\u200D\u2640\uFE0F":"1f6b6-1f3fe-2640","\uD83D\uDEB6\uD83C\uDFFE\u200D\u2642\uFE0F":"1f6b6-1f3fe-2642","\uD83D\uDEB6\uD83C\uDFFF\u200D\u2640\uFE0F":"1f6b6-1f3ff-2640","\uD83D\uDEB6\uD83C\uDFFF\u200D\u2642\uFE0F":"1f6b6-1f3ff-2642","\uD83E\uDD38\uD83C\uDFFB\u200D\u2640\uFE0F":"1f938-1f3fb-2640","\uD83E\uDD38\uD83C\uDFFB\u200D\u2642\uFE0F":"1f938-1f3fb-2642","\uD83E\uDD38\uD83C\uDFFC\u200D\u2640\uFE0F":"1f938-1f3fc-2640","\uD83E\uDD38\uD83C\uDFFC\u200D\u2642\uFE0F":"1f938-1f3fc-2642","\uD83E\uDD38\uD83C\uDFFD\u200D\u2640\uFE0F":"1f938-1f3fd-2640","\uD83E\uDD38\uD83C\uDFFD\u200D\u2642\uFE0F":"1f938-1f3fd-2642","\uD83E\uDD38\uD83C\uDFFE\u200D\u2640\uFE0F":"1f938-1f3fe-2640","\uD83E\uDD38\uD83C\uDFFE\u200D\u2642\uFE0F":"1f938-1f3fe-2642","\uD83E\uDD38\uD83C\uDFFF\u200D\u2640\uFE0F":"1f938-1f3ff-2640","\uD83E\uDD38\uD83C\uDFFF\u200D\u2642\uFE0F":"1f938-1f3ff-2642","\uD83E\uDD39\uD83C\uDFFB\u200D\u2640\uFE0F":"1f939-1f3fb-2640","\uD83E\uDD39\uD83C\uDFFB\u200D\u2642\uFE0F":"1f939-1f3fb-2642","\uD83E\uDD39\uD83C\uDFFC\u200D\u2640\uFE0F":"1f939-1f3fc-2640","\uD83E\uDD39\uD83C\uDFFC\u200D\u2642\uFE0F":"1f939-1f3fc-2642","\uD83E\uDD39\uD83C\uDFFD\u200D\u2640\uFE0F":"1f939-1f3fd-2640","\uD83E\uDD39\uD83C\uDFFD\u200D\u2642\uFE0F":"1f939-1f3fd-2642","\uD83E\uDD39\uD83C\uDFFE\u200D\u2640\uFE0F":"1f939-1f3fe-2640","\uD83E\uDD39\uD83C\uDFFE\u200D\u2642\uFE0F":"1f939-1f3fe-2642","\uD83E\uDD39\uD83C\uDFFF\u200D\u2640\uFE0F":"1f939-1f3ff-2640","\uD83E\uDD39\uD83C\uDFFF\u200D\u2642\uFE0F":"1f939-1f3ff-2642","\uD83E\uDD3D\uD83C\uDFFB\u200D\u2640\uFE0F":"1f93d-1f3fb-2640","\uD83E\uDD3D\uD83C\uDFFB\u200D\u2642\uFE0F":"1f93d-1f3fb-2642","\uD83E\uDD3D\uD83C\uDFFC\u200D\u2640\uFE0F":"1f93d-1f3fc-2640","\uD83E\uDD3D\uD83C\uDFFC\u200D\u2642\uFE0F":"1f93d-1f3fc-2642","\uD83E\uDD3D\uD83C\uDFFD\u200D\u2640\uFE0F":"1f93d-1f3fd-2640","\uD83E\uDD3D\uD83C\uDFFD\u200D\u2642\uFE0F":"1f93d-1f3fd-2642","\uD83E\uDD3D\uD83C\uDFFE\u200D\u2640\uFE0F":"1f93d-1f3fe-2640","\uD83E\uDD3D\uD83C\uDFFE\u200D\u2642\uFE0F":"1f93d-1f3fe-2642","\uD83E\uDD3D\uD83C\uDFFF\u200D\u2640\uFE0F":"1f93d-1f3ff-2640","\uD83E\uDD3D\uD83C\uDFFF\u200D\u2642\uFE0F":"1f93d-1f3ff-2642","\uD83E\uDD3E\uD83C\uDFFB\u200D\u2640\uFE0F":"1f93e-1f3fb-2640","\uD83E\uDD3E\uD83C\uDFFB\u200D\u2642\uFE0F":"1f93e-1f3fb-2642","\uD83E\uDD3E\uD83C\uDFFC\u200D\u2640\uFE0F":"1f93e-1f3fc-2640","\uD83E\uDD3E\uD83C\uDFFC\u200D\u2642\uFE0F":"1f93e-1f3fc-2642","\uD83E\uDD3E\uD83C\uDFFD\u200D\u2640\uFE0F":"1f93e-1f3fd-2640","\uD83E\uDD3E\uD83C\uDFFD\u200D\u2642\uFE0F":"1f93e-1f3fd-2642","\uD83E\uDD3E\uD83C\uDFFE\u200D\u2640\uFE0F":"1f93e-1f3fe-2640","\uD83E\uDD3E\uD83C\uDFFE\u200D\u2642\uFE0F":"1f93e-1f3fe-2642","\uD83E\uDD3E\uD83C\uDFFF\u200D\u2640\uFE0F":"1f93e-1f3ff-2640","\uD83E\uDD3E\uD83C\uDFFF\u200D\u2642\uFE0F":"1f93e-1f3ff-2642","\uD83D\uDC81\uD83C\uDFFB\u200D\u2640\uFE0F":"1f481-1f3fb-2640","\uD83D\uDC81\uD83C\uDFFB\u200D\u2642\uFE0F":"1f481-1f3fb-2642","\uD83D\uDC81\uD83C\uDFFC\u200D\u2640\uFE0F":"1f481-1f3fc-2640","\uD83D\uDC81\uD83C\uDFFC\u200D\u2642\uFE0F":"1f481-1f3fc-2642","\uD83D\uDC81\uD83C\uDFFD\u200D\u2640\uFE0F":"1f481-1f3fd-2640","\uD83D\uDC81\uD83C\uDFFD\u200D\u2642\uFE0F":"1f481-1f3fd-2642","\uD83D\uDC81\uD83C\uDFFE\u200D\u2640\uFE0F":"1f481-1f3fe-2640","\uD83D\uDC81\uD83C\uDFFE\u200D\u2642\uFE0F":"1f481-1f3fe-2642","\uD83D\uDC81\uD83C\uDFFF\u200D\u2640\uFE0F":"1f481-1f3ff-2640","\uD83D\uDC81\uD83C\uDFFF\u200D\u2642\uFE0F":"1f481-1f3ff-2642","\uD83D\uDE45\uD83C\uDFFB\u200D\u2640\uFE0F":"1f645-1f3fb-2640","\uD83D\uDE45\uD83C\uDFFB\u200D\u2642\uFE0F":"1f645-1f3fb-2642","\uD83D\uDE45\uD83C\uDFFC\u200D\u2640\uFE0F":"1f645-1f3fc-2640","\uD83D\uDE45\uD83C\uDFFC\u200D\u2642\uFE0F":"1f645-1f3fc-2642","\uD83D\uDE45\uD83C\uDFFD\u200D\u2640\uFE0F":"1f645-1f3fd-2640","\uD83D\uDE45\uD83C\uDFFD\u200D\u2642\uFE0F":"1f645-1f3fd-2642","\uD83D\uDE45\uD83C\uDFFE\u200D\u2640\uFE0F":"1f645-1f3fe-2640","\uD83D\uDE45\uD83C\uDFFE\u200D\u2642\uFE0F":"1f645-1f3fe-2642","\uD83D\uDE45\uD83C\uDFFF\u200D\u2640\uFE0F":"1f645-1f3ff-2640","\uD83D\uDE45\uD83C\uDFFF\u200D\u2642\uFE0F":"1f645-1f3ff-2642","\uD83D\uDE46\uD83C\uDFFB\u200D\u2640\uFE0F":"1f646-1f3fb-2640","\uD83D\uDE46\uD83C\uDFFB\u200D\u2642\uFE0F":"1f646-1f3fb-2642","\uD83D\uDE46\uD83C\uDFFC\u200D\u2640\uFE0F":"1f646-1f3fc-2640","\uD83D\uDE46\uD83C\uDFFC\u200D\u2642\uFE0F":"1f646-1f3fc-2642","\uD83D\uDE46\uD83C\uDFFD\u200D\u2640\uFE0F":"1f646-1f3fd-2640","\uD83D\uDE46\uD83C\uDFFD\u200D\u2642\uFE0F":"1f646-1f3fd-2642","\uD83D\uDE46\uD83C\uDFFE\u200D\u2640\uFE0F":"1f646-1f3fe-2640","\uD83D\uDE46\uD83C\uDFFE\u200D\u2642\uFE0F":"1f646-1f3fe-2642","\uD83D\uDE46\uD83C\uDFFF\u200D\u2640\uFE0F":"1f646-1f3ff-2640","\uD83D\uDE46\uD83C\uDFFF\u200D\u2642\uFE0F":"1f646-1f3ff-2642","\uD83D\uDE47\uD83C\uDFFB\u200D\u2640\uFE0F":"1f647-1f3fb-2640","\uD83D\uDE47\uD83C\uDFFB\u200D\u2642\uFE0F":"1f647-1f3fb-2642","\uD83D\uDE47\uD83C\uDFFC\u200D\u2640\uFE0F":"1f647-1f3fc-2640","\uD83D\uDE47\uD83C\uDFFC\u200D\u2642\uFE0F":"1f647-1f3fc-2642","\uD83D\uDE47\uD83C\uDFFD\u200D\u2640\uFE0F":"1f647-1f3fd-2640","\uD83D\uDE47\uD83C\uDFFD\u200D\u2642\uFE0F":"1f647-1f3fd-2642","\uD83D\uDE47\uD83C\uDFFE\u200D\u2640\uFE0F":"1f647-1f3fe-2640","\uD83D\uDE47\uD83C\uDFFE\u200D\u2642\uFE0F":"1f647-1f3fe-2642","\uD83D\uDE47\uD83C\uDFFF\u200D\u2640\uFE0F":"1f647-1f3ff-2640","\uD83D\uDE47\uD83C\uDFFF\u200D\u2642\uFE0F":"1f647-1f3ff-2642","\uD83D\uDE4B\uD83C\uDFFB\u200D\u2640\uFE0F":"1f64b-1f3fb-2640","\uD83D\uDE4B\uD83C\uDFFB\u200D\u2642\uFE0F":"1f64b-1f3fb-2642","\uD83D\uDE4B\uD83C\uDFFC\u200D\u2640\uFE0F":"1f64b-1f3fc-2640","\uD83D\uDE4B\uD83C\uDFFC\u200D\u2642\uFE0F":"1f64b-1f3fc-2642","\uD83D\uDE4B\uD83C\uDFFD\u200D\u2640\uFE0F":"1f64b-1f3fd-2640","\uD83D\uDE4B\uD83C\uDFFD\u200D\u2642\uFE0F":"1f64b-1f3fd-2642","\uD83D\uDE4B\uD83C\uDFFE\u200D\u2640\uFE0F":"1f64b-1f3fe-2640","\uD83D\uDE4B\uD83C\uDFFE\u200D\u2642\uFE0F":"1f64b-1f3fe-2642","\uD83D\uDE4B\uD83C\uDFFF\u200D\u2640\uFE0F":"1f64b-1f3ff-2640","\uD83D\uDE4B\uD83C\uDFFF\u200D\u2642\uFE0F":"1f64b-1f3ff-2642","\uD83D\uDE4D\uD83C\uDFFB\u200D\u2640\uFE0F":"1f64d-1f3fb-2640","\uD83D\uDE4D\uD83C\uDFFB\u200D\u2642\uFE0F":"1f64d-1f3fb-2642","\uD83D\uDE4D\uD83C\uDFFC\u200D\u2640\uFE0F":"1f64d-1f3fc-2640","\uD83D\uDE4D\uD83C\uDFFC\u200D\u2642\uFE0F":"1f64d-1f3fc-2642","\uD83D\uDE4D\uD83C\uDFFD\u200D\u2640\uFE0F":"1f64d-1f3fd-2640","\uD83D\uDE4D\uD83C\uDFFD\u200D\u2642\uFE0F":"1f64d-1f3fd-2642","\uD83D\uDE4D\uD83C\uDFFE\u200D\u2640\uFE0F":"1f64d-1f3fe-2640","\uD83D\uDE4D\uD83C\uDFFE\u200D\u2642\uFE0F":"1f64d-1f3fe-2642","\uD83D\uDE4D\uD83C\uDFFF\u200D\u2640\uFE0F":"1f64d-1f3ff-2640","\uD83D\uDE4D\uD83C\uDFFF\u200D\u2642\uFE0F":"1f64d-1f3ff-2642","\uD83D\uDE4E\uD83C\uDFFB\u200D\u2640\uFE0F":"1f64e-1f3fb-2640","\uD83D\uDE4E\uD83C\uDFFB\u200D\u2642\uFE0F":"1f64e-1f3fb-2642","\uD83D\uDE4E\uD83C\uDFFC\u200D\u2640\uFE0F":"1f64e-1f3fc-2640","\uD83D\uDE4E\uD83C\uDFFC\u200D\u2642\uFE0F":"1f64e-1f3fc-2642","\uD83D\uDE4E\uD83C\uDFFD\u200D\u2640\uFE0F":"1f64e-1f3fd-2640","\uD83D\uDE4E\uD83C\uDFFD\u200D\u2642\uFE0F":"1f64e-1f3fd-2642","\uD83D\uDE4E\uD83C\uDFFE\u200D\u2640\uFE0F":"1f64e-1f3fe-2640","\uD83D\uDE4E\uD83C\uDFFE\u200D\u2642\uFE0F":"1f64e-1f3fe-2642","\uD83D\uDE4E\uD83C\uDFFF\u200D\u2640\uFE0F":"1f64e-1f3ff-2640","\uD83D\uDE4E\uD83C\uDFFF\u200D\u2642\uFE0F":"1f64e-1f3ff-2642","\uD83E\uDD26\uD83C\uDFFB\u200D\u2640\uFE0F":"1f926-1f3fb-2640","\uD83E\uDD26\uD83C\uDFFB\u200D\u2642\uFE0F":"1f926-1f3fb-2642","\uD83E\uDD26\uD83C\uDFFC\u200D\u2640\uFE0F":"1f926-1f3fc-2640","\uD83E\uDD26\uD83C\uDFFC\u200D\u2642\uFE0F":"1f926-1f3fc-2642","\uD83E\uDD26\uD83C\uDFFD\u200D\u2640\uFE0F":"1f926-1f3fd-2640","\uD83E\uDD26\uD83C\uDFFD\u200D\u2642\uFE0F":"1f926-1f3fd-2642","\uD83E\uDD26\uD83C\uDFFE\u200D\u2640\uFE0F":"1f926-1f3fe-2640","\uD83E\uDD26\uD83C\uDFFE\u200D\u2642\uFE0F":"1f926-1f3fe-2642","\uD83E\uDD26\uD83C\uDFFF\u200D\u2640\uFE0F":"1f926-1f3ff-2640","\uD83E\uDD26\uD83C\uDFFF\u200D\u2642\uFE0F":"1f926-1f3ff-2642","\uD83E\uDD37\uD83C\uDFFB\u200D\u2640\uFE0F":"1f937-1f3fb-2640","\uD83E\uDD37\uD83C\uDFFB\u200D\u2642\uFE0F":"1f937-1f3fb-2642","\uD83E\uDD37\uD83C\uDFFC\u200D\u2640\uFE0F":"1f937-1f3fc-2640","\uD83E\uDD37\uD83C\uDFFC\u200D\u2642\uFE0F":"1f937-1f3fc-2642","\uD83E\uDD37\uD83C\uDFFD\u200D\u2640\uFE0F":"1f937-1f3fd-2640","\uD83E\uDD37\uD83C\uDFFD\u200D\u2642\uFE0F":"1f937-1f3fd-2642","\uD83E\uDD37\uD83C\uDFFE\u200D\u2640\uFE0F":"1f937-1f3fe-2640","\uD83E\uDD37\uD83C\uDFFE\u200D\u2642\uFE0F":"1f937-1f3fe-2642","\uD83E\uDD37\uD83C\uDFFF\u200D\u2640\uFE0F":"1f937-1f3ff-2640","\uD83E\uDD37\uD83C\uDFFF\u200D\u2642\uFE0F":"1f937-1f3ff-2642","\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8\uFE0F":"1f441-1f5e8","\uD83D\uDD75\uD83C\uDFFB\u200D\u2640\uFE0F":"1f575-1f3fb-2640","\uD83D\uDD75\uD83C\uDFFB\u200D\u2642\uFE0F":"1f575-1f3fb-2642","\uD83D\uDD75\uD83C\uDFFC\u200D\u2640\uFE0F":"1f575-1f3fc-2640","\uD83D\uDD75\uD83C\uDFFC\u200D\u2642\uFE0F":"1f575-1f3fc-2642","\uD83D\uDD75\uD83C\uDFFD\u200D\u2640\uFE0F":"1f575-1f3fd-2640","\uD83D\uDD75\uD83C\uDFFD\u200D\u2642\uFE0F":"1f575-1f3fd-2642","\uD83D\uDD75\uD83C\uDFFE\u200D\u2640\uFE0F":"1f575-1f3fe-2640","\uD83D\uDD75\uD83C\uDFFE\u200D\u2642\uFE0F":"1f575-1f3fe-2642","\uD83D\uDD75\uD83C\uDFFF\u200D\u2640\uFE0F":"1f575-1f3ff-2640","\uD83D\uDD75\uD83C\uDFFF\u200D\u2642\uFE0F":"1f575-1f3ff-2642","\uD83C\uDFCB\uD83C\uDFFB\u200D\u2640\uFE0F":"1f3cb-1f3fb-2640","\uD83C\uDFCB\uD83C\uDFFB\u200D\u2642\uFE0F":"1f3cb-1f3fb-2642","\uD83C\uDFCB\uD83C\uDFFC\u200D\u2640\uFE0F":"1f3cb-1f3fc-2640","\uD83C\uDFCB\uD83C\uDFFC\u200D\u2642\uFE0F":"1f3cb-1f3fc-2642","\uD83C\uDFCB\uD83C\uDFFD\u200D\u2640\uFE0F":"1f3cb-1f3fd-2640","\uD83C\uDFCB\uD83C\uDFFD\u200D\u2642\uFE0F":"1f3cb-1f3fd-2642","\uD83C\uDFCB\uD83C\uDFFE\u200D\u2640\uFE0F":"1f3cb-1f3fe-2640","\uD83C\uDFCB\uD83C\uDFFE\u200D\u2642\uFE0F":"1f3cb-1f3fe-2642","\uD83C\uDFCB\uD83C\uDFFF\u200D\u2640\uFE0F":"1f3cb-1f3ff-2640","\uD83C\uDFCB\uD83C\uDFFF\u200D\u2642\uFE0F":"1f3cb-1f3ff-2642","\uD83C\uDFCC\uD83C\uDFFB\u200D\u2640\uFE0F":"1f3cc-1f3fb-2640","\uD83C\uDFCC\uD83C\uDFFB\u200D\u2642\uFE0F":"1f3cc-1f3fb-2642","\uD83C\uDFCC\uD83C\uDFFC\u200D\u2640\uFE0F":"1f3cc-1f3fc-2640","\uD83C\uDFCC\uD83C\uDFFC\u200D\u2642\uFE0F":"1f3cc-1f3fc-2642","\uD83C\uDFCC\uD83C\uDFFD\u200D\u2640\uFE0F":"1f3cc-1f3fd-2640","\uD83C\uDFCC\uD83C\uDFFD\u200D\u2642\uFE0F":"1f3cc-1f3fd-2642","\uD83C\uDFCC\uD83C\uDFFE\u200D\u2640\uFE0F":"1f3cc-1f3fe-2640","\uD83C\uDFCC\uD83C\uDFFE\u200D\u2642\uFE0F":"1f3cc-1f3fe-2642","\uD83C\uDFCC\uD83C\uDFFF\u200D\u2640\uFE0F":"1f3cc-1f3ff-2640","\uD83C\uDFCC\uD83C\uDFFF\u200D\u2642\uFE0F":"1f3cc-1f3ff-2642","\uD83E\uDDD9\uD83C\uDFFB\u200D\u2640\uFE0F":"1f9d9-1f3fb-2640","\uD83E\uDDD9\uD83C\uDFFB\u200D\u2642\uFE0F":"1f9d9-1f3fb-2642","\uD83E\uDDD9\uD83C\uDFFC\u200D\u2640\uFE0F":"1f9d9-1f3fc-2640","\uD83E\uDDD9\uD83C\uDFFC\u200D\u2642\uFE0F":"1f9d9-1f3fc-2642","\uD83E\uDDD9\uD83C\uDFFD\u200D\u2640\uFE0F":"1f9d9-1f3fd-2640","\uD83E\uDDD9\uD83C\uDFFD\u200D\u2642\uFE0F":"1f9d9-1f3fd-2642","\uD83E\uDDD9\uD83C\uDFFE\u200D\u2640\uFE0F":"1f9d9-1f3fe-2640","\uD83E\uDDD9\uD83C\uDFFE\u200D\u2642\uFE0F":"1f9d9-1f3fe-2642","\uD83E\uDDD9\uD83C\uDFFF\u200D\u2640\uFE0F":"1f9d9-1f3ff-2640","\uD83E\uDDD9\uD83C\uDFFF\u200D\u2642\uFE0F":"1f9d9-1f3ff-2642","\uD83E\uDDDA\uD83C\uDFFB\u200D\u2640\uFE0F":"1f9da-1f3fb-2640","\uD83E\uDDDA\uD83C\uDFFB\u200D\u2642\uFE0F":"1f9da-1f3fb-2642","\uD83E\uDDDA\uD83C\uDFFC\u200D\u2640\uFE0F":"1f9da-1f3fc-2640","\uD83E\uDDDA\uD83C\uDFFC\u200D\u2642\uFE0F":"1f9da-1f3fc-2642","\uD83E\uDDDA\uD83C\uDFFD\u200D\u2640\uFE0F":"1f9da-1f3fd-2640","\uD83E\uDDDA\uD83C\uDFFD\u200D\u2642\uFE0F":"1f9da-1f3fd-2642","\uD83E\uDDDA\uD83C\uDFFE\u200D\u2640\uFE0F":"1f9da-1f3fe-2640","\uD83E\uDDDA\uD83C\uDFFE\u200D\u2642\uFE0F":"1f9da-1f3fe-2642","\uD83E\uDDDA\uD83C\uDFFF\u200D\u2640\uFE0F":"1f9da-1f3ff-2640","\uD83E\uDDDA\uD83C\uDFFF\u200D\u2642\uFE0F":"1f9da-1f3ff-2642","\uD83E\uDDDB\uD83C\uDFFB\u200D\u2640\uFE0F":"1f9db-1f3fb-2640","\uD83E\uDDDB\uD83C\uDFFB\u200D\u2642\uFE0F":"1f9db-1f3fb-2642","\uD83E\uDDDB\uD83C\uDFFC\u200D\u2640\uFE0F":"1f9db-1f3fc-2640","\uD83E\uDDDB\uD83C\uDFFC\u200D\u2642\uFE0F":"1f9db-1f3fc-2642","\uD83E\uDDDB\uD83C\uDFFD\u200D\u2640\uFE0F":"1f9db-1f3fd-2640","\uD83E\uDDDB\uD83C\uDFFD\u200D\u2642\uFE0F":"1f9db-1f3fd-2642","\uD83E\uDDDB\uD83C\uDFFE\u200D\u2640\uFE0F":"1f9db-1f3fe-2640","\uD83E\uDDDB\uD83C\uDFFE\u200D\u2642\uFE0F":"1f9db-1f3fe-2642","\uD83E\uDDDB\uD83C\uDFFF\u200D\u2640\uFE0F":"1f9db-1f3ff-2640","\uD83E\uDDDB\uD83C\uDFFF\u200D\u2642\uFE0F":"1f9db-1f3ff-2642","\uD83E\uDDDC\uD83C\uDFFB\u200D\u2640\uFE0F":"1f9dc-1f3fb-2640","\uD83E\uDDDC\uD83C\uDFFB\u200D\u2642\uFE0F":"1f9dc-1f3fb-2642","\uD83E\uDDDC\uD83C\uDFFC\u200D\u2640\uFE0F":"1f9dc-1f3fc-2640","\uD83E\uDDDC\uD83C\uDFFC\u200D\u2642\uFE0F":"1f9dc-1f3fc-2642","\uD83E\uDDDC\uD83C\uDFFD\u200D\u2640\uFE0F":"1f9dc-1f3fd-2640","\uD83E\uDDDC\uD83C\uDFFD\u200D\u2642\uFE0F":"1f9dc-1f3fd-2642","\uD83E\uDDDC\uD83C\uDFFE\u200D\u2640\uFE0F":"1f9dc-1f3fe-2640","\uD83E\uDDDC\uD83C\uDFFE\u200D\u2642\uFE0F":"1f9dc-1f3fe-2642","\uD83E\uDDDC\uD83C\uDFFF\u200D\u2640\uFE0F":"1f9dc-1f3ff-2640","\uD83E\uDDDC\uD83C\uDFFF\u200D\u2642\uFE0F":"1f9dc-1f3ff-2642","\uD83E\uDDDD\uD83C\uDFFB\u200D\u2640\uFE0F":"1f9dd-1f3fb-2640","\uD83E\uDDDD\uD83C\uDFFB\u200D\u2642\uFE0F":"1f9dd-1f3fb-2642","\uD83E\uDDDD\uD83C\uDFFC\u200D\u2640\uFE0F":"1f9dd-1f3fc-2640","\uD83E\uDDDD\uD83C\uDFFC\u200D\u2642\uFE0F":"1f9dd-1f3fc-2642","\uD83E\uDDDD\uD83C\uDFFD\u200D\u2640\uFE0F":"1f9dd-1f3fd-2640","\uD83E\uDDDD\uD83C\uDFFD\u200D\u2642\uFE0F":"1f9dd-1f3fd-2642","\uD83E\uDDDD\uD83C\uDFFE\u200D\u2640\uFE0F":"1f9dd-1f3fe-2640","\uD83E\uDDDD\uD83C\uDFFE\u200D\u2642\uFE0F":"1f9dd-1f3fe-2642","\uD83E\uDDDD\uD83C\uDFFF\u200D\u2640\uFE0F":"1f9dd-1f3ff-2640","\uD83E\uDDDD\uD83C\uDFFF\u200D\u2642\uFE0F":"1f9dd-1f3ff-2642","\uD83E\uDDD6\uD83C\uDFFB\u200D\u2640\uFE0F":"1f9d6-1f3fb-2640","\uD83E\uDDD6\uD83C\uDFFB\u200D\u2642\uFE0F":"1f9d6-1f3fb-2642","\uD83E\uDDD6\uD83C\uDFFC\u200D\u2640\uFE0F":"1f9d6-1f3fc-2640","\uD83E\uDDD6\uD83C\uDFFC\u200D\u2642\uFE0F":"1f9d6-1f3fc-2642","\uD83E\uDDD6\uD83C\uDFFD\u200D\u2640\uFE0F":"1f9d6-1f3fd-2640","\uD83E\uDDD6\uD83C\uDFFD\u200D\u2642\uFE0F":"1f9d6-1f3fd-2642","\uD83E\uDDD6\uD83C\uDFFE\u200D\u2640\uFE0F":"1f9d6-1f3fe-2640","\uD83E\uDDD6\uD83C\uDFFE\u200D\u2642\uFE0F":"1f9d6-1f3fe-2642","\uD83E\uDDD6\uD83C\uDFFF\u200D\u2640\uFE0F":"1f9d6-1f3ff-2640","\uD83E\uDDD6\uD83C\uDFFF\u200D\u2642\uFE0F":"1f9d6-1f3ff-2642","\uD83E\uDDD7\uD83C\uDFFB\u200D\u2640\uFE0F":"1f9d7-1f3fb-2640","\uD83E\uDDD7\uD83C\uDFFB\u200D\u2642\uFE0F":"1f9d7-1f3fb-2642","\uD83E\uDDD7\uD83C\uDFFC\u200D\u2640\uFE0F":"1f9d7-1f3fc-2640","\uD83E\uDDD7\uD83C\uDFFC\u200D\u2642\uFE0F":"1f9d7-1f3fc-2642","\uD83E\uDDD7\uD83C\uDFFD\u200D\u2640\uFE0F":"1f9d7-1f3fd-2640","\uD83E\uDDD7\uD83C\uDFFD\u200D\u2642\uFE0F":"1f9d7-1f3fd-2642","\uD83E\uDDD7\uD83C\uDFFE\u200D\u2640\uFE0F":"1f9d7-1f3fe-2640","\uD83E\uDDD7\uD83C\uDFFE\u200D\u2642\uFE0F":"1f9d7-1f3fe-2642","\uD83E\uDDD7\uD83C\uDFFF\u200D\u2640\uFE0F":"1f9d7-1f3ff-2640","\uD83E\uDDD7\uD83C\uDFFF\u200D\u2642\uFE0F":"1f9d7-1f3ff-2642","\uD83E\uDDD8\uD83C\uDFFB\u200D\u2640\uFE0F":"1f9d8-1f3fb-2640","\uD83E\uDDD8\uD83C\uDFFB\u200D\u2642\uFE0F":"1f9d8-1f3fb-2642","\uD83E\uDDD8\uD83C\uDFFC\u200D\u2640\uFE0F":"1f9d8-1f3fc-2640","\uD83E\uDDD8\uD83C\uDFFC\u200D\u2642\uFE0F":"1f9d8-1f3fc-2642","\uD83E\uDDD8\uD83C\uDFFD\u200D\u2640\uFE0F":"1f9d8-1f3fd-2640","\uD83E\uDDD8\uD83C\uDFFD\u200D\u2642\uFE0F":"1f9d8-1f3fd-2642","\uD83E\uDDD8\uD83C\uDFFE\u200D\u2640\uFE0F":"1f9d8-1f3fe-2640","\uD83E\uDDD8\uD83C\uDFFE\u200D\u2642\uFE0F":"1f9d8-1f3fe-2642","\uD83E\uDDD8\uD83C\uDFFF\u200D\u2640\uFE0F":"1f9d8-1f3ff-2640","\uD83E\uDDD8\uD83C\uDFFF\u200D\u2642\uFE0F":"1f9d8-1f3ff-2642","\uD83D\uDD75\uFE0F\u200D\u2640\uFE0F":"1f575-2640","\uD83D\uDD75\uFE0F\u200D\u2642\uFE0F":"1f575-2642","\u26F9\uFE0F\uD83C\uDFFB\u2640\uFE0F":"26f9-1f3fb-2640","\u26F9\uFE0F\uD83C\uDFFB\u2642\uFE0F":"26f9-1f3fb-2642","\u26F9\uFE0F\uD83C\uDFFC\u2640\uFE0F":"26f9-1f3fc-2640","\u26F9\uFE0F\uD83C\uDFFC\u2642\uFE0F":"26f9-1f3fc-2642","\u26F9\uFE0F\uD83C\uDFFD\u2640\uFE0F":"26f9-1f3fd-2640","\u26F9\uFE0F\uD83C\uDFFD\u2642\uFE0F":"26f9-1f3fd-2642","\u26F9\uFE0F\uD83C\uDFFE\u2640\uFE0F":"26f9-1f3fe-2640","\u26F9\uFE0F\uD83C\uDFFE\u2642\uFE0F":"26f9-1f3fe-2642","\u26F9\uFE0F\uD83C\uDFFF\u2640\uFE0F":"26f9-1f3ff-2640","\u26F9\uFE0F\uD83C\uDFFF\u2642\uFE0F":"26f9-1f3ff-2642","\uD83C\uDFCB\uFE0F\u200D\u2640\uFE0F":"1f3cb-2640","\uD83C\uDFCB\uFE0F\u200D\u2642\uFE0F":"1f3cb-2642","\uD83C\uDFCC\uFE0F\u200D\u2640\uFE0F":"1f3cc-2640","\uD83C\uDFCC\uFE0F\u200D\u2642\uFE0F":"1f3cc-2642","\u26F9\uD83C\uDFFB\u200D\u2640\uFE0F":"26f9-1f3fb-2640","\u26F9\uD83C\uDFFB\u200D\u2642\uFE0F":"26f9-1f3fb-2642","\u26F9\uD83C\uDFFC\u200D\u2640\uFE0F":"26f9-1f3fc-2640","\u26F9\uD83C\uDFFC\u200D\u2642\uFE0F":"26f9-1f3fc-2642","\u26F9\uD83C\uDFFD\u200D\u2640\uFE0F":"26f9-1f3fd-2640","\u26F9\uD83C\uDFFD\u200D\u2642\uFE0F":"26f9-1f3fd-2642","\u26F9\uD83C\uDFFE\u200D\u2640\uFE0F":"26f9-1f3fe-2640","\u26F9\uD83C\uDFFE\u200D\u2642\uFE0F":"26f9-1f3fe-2642","\u26F9\uD83C\uDFFF\u200D\u2640\uFE0F":"26f9-1f3ff-2640","\u26F9\uD83C\uDFFF\u200D\u2642\uFE0F":"26f9-1f3ff-2642","\u26F9\uFE0F\u200D\u2640\uFE0F":"26f9-2640","\u26F9\uFE0F\u200D\u2642\uFE0F":"26f9-2642","\uD83D\uDC68\uD83D\uDC68\uD83D\uDC66\uD83D\uDC66":"1f468-1f468-1f466-1f466","\uD83D\uDC68\uD83D\uDC68\uD83D\uDC67\uD83D\uDC66":"1f468-1f468-1f467-1f466","\uD83D\uDC68\uD83D\uDC68\uD83D\uDC67\uD83D\uDC67":"1f468-1f468-1f467-1f467","\uD83D\uDC68\uD83D\uDC69\uD83D\uDC66\uD83D\uDC66":"1f468-1f469-1f466-1f466","\uD83D\uDC68\uD83D\uDC69\uD83D\uDC67\uD83D\uDC66":"1f468-1f469-1f467-1f466","\uD83D\uDC68\uD83D\uDC69\uD83D\uDC67\uD83D\uDC67":"1f468-1f469-1f467-1f467","\uD83D\uDC69\uD83D\uDC69\uD83D\uDC66\uD83D\uDC66":"1f469-1f469-1f466-1f466","\uD83D\uDC69\uD83D\uDC69\uD83D\uDC67\uD83D\uDC66":"1f469-1f469-1f467-1f466","\uD83D\uDC69\uD83D\uDC69\uD83D\uDC67\uD83D\uDC67":"1f469-1f469-1f467-1f467","\uD83D\uDC68\uD83C\uDFFF\u200D\uD83D\uDCBB":"1f468-1f3ff-1f4bb","\uD83D\uDC68\uD83C\uDFFE\u200D\uD83D\uDCBB":"1f468-1f3fe-1f4bb","\uD83D\uDC68\uD83C\uDFFD\u200D\uD83D\uDCBB":"1f468-1f3fd-1f4bb","\uD83D\uDC68\uD83C\uDFFC\u200D\uD83D\uDCBB":"1f468-1f3fc-1f4bb","\uD83D\uDC68\uD83C\uDFFB\u200D\uD83D\uDCBB":"1f468-1f3fb-1f4bb","\uD83D\uDC69\uD83C\uDFFF\u200D\uD83D\uDCBB":"1f469-1f3ff-1f4bb","\uD83D\uDC69\uD83C\uDFFE\u200D\uD83D\uDCBB":"1f469-1f3fe-1f4bb","\uD83D\uDC69\uD83C\uDFFD\u200D\uD83D\uDCBB":"1f469-1f3fd-1f4bb","\uD83D\uDC69\uD83C\uDFFC\u200D\uD83D\uDCBB":"1f469-1f3fc-1f4bb","\uD83D\uDC69\uD83C\uDFFB\u200D\uD83D\uDCBB":"1f469-1f3fb-1f4bb","\uD83D\uDC68\uD83C\uDFFF\u200D\uD83C\uDFEB":"1f468-1f3ff-1f3eb","\uD83D\uDC68\uD83C\uDFFE\u200D\uD83C\uDFEB":"1f468-1f3fe-1f3eb","\uD83D\uDC68\uD83C\uDFFD\u200D\uD83C\uDFEB":"1f468-1f3fd-1f3eb","\uD83D\uDC68\uD83C\uDFFC\u200D\uD83C\uDFEB":"1f468-1f3fc-1f3eb","\uD83D\uDC68\uD83C\uDFFB\u200D\uD83C\uDFEB":"1f468-1f3fb-1f3eb","\uD83D\uDC69\uD83C\uDFFF\u200D\uD83C\uDFEB":"1f469-1f3ff-1f3eb","\uD83D\uDC69\uD83C\uDFFE\u200D\uD83C\uDFEB":"1f469-1f3fe-1f3eb","\uD83D\uDC69\uD83C\uDFFD\u200D\uD83C\uDFEB":"1f469-1f3fd-1f3eb","\uD83D\uDC69\uD83C\uDFFC\u200D\uD83C\uDFEB":"1f469-1f3fc-1f3eb","\uD83D\uDC69\uD83C\uDFFB\u200D\uD83C\uDFEB":"1f469-1f3fb-1f3eb","\uD83D\uDC68\uD83C\uDFFF\u200D\uD83C\uDF93":"1f468-1f3ff-1f393","\uD83D\uDC68\uD83C\uDFFE\u200D\uD83C\uDF93":"1f468-1f3fe-1f393","\uD83D\uDC68\uD83C\uDFFD\u200D\uD83C\uDF93":"1f468-1f3fd-1f393","\uD83D\uDC68\uD83C\uDFFC\u200D\uD83C\uDF93":"1f468-1f3fc-1f393","\uD83D\uDC68\uD83C\uDFFB\u200D\uD83C\uDF93":"1f468-1f3fb-1f393","\uD83D\uDC69\uD83C\uDFFF\u200D\uD83C\uDF93":"1f469-1f3ff-1f393","\uD83D\uDC69\uD83C\uDFFE\u200D\uD83C\uDF93":"1f469-1f3fe-1f393","\uD83D\uDC69\uD83C\uDFFD\u200D\uD83C\uDF93":"1f469-1f3fd-1f393","\uD83D\uDC69\uD83C\uDFFC\u200D\uD83C\uDF93":"1f469-1f3fc-1f393","\uD83D\uDC69\uD83C\uDFFB\u200D\uD83C\uDF93":"1f469-1f3fb-1f393","\uD83D\uDC68\uD83C\uDFFF\u200D\uD83C\uDFA4":"1f468-1f3ff-1f3a4","\uD83D\uDC68\uD83C\uDFFE\u200D\uD83C\uDFA4":"1f468-1f3fe-1f3a4","\uD83D\uDC68\uD83C\uDFFD\u200D\uD83C\uDFA4":"1f468-1f3fd-1f3a4","\uD83D\uDC68\uD83C\uDFFC\u200D\uD83C\uDFA4":"1f468-1f3fc-1f3a4","\uD83D\uDC68\uD83C\uDFFB\u200D\uD83C\uDFA4":"1f468-1f3fb-1f3a4","\uD83D\uDC69\uD83C\uDFFF\u200D\uD83C\uDFA4":"1f469-1f3ff-1f3a4","\uD83D\uDC69\uD83C\uDFFE\u200D\uD83C\uDFA4":"1f469-1f3fe-1f3a4","\uD83D\uDC69\uD83C\uDFFD\u200D\uD83C\uDFA4":"1f469-1f3fd-1f3a4","\uD83D\uDC69\uD83C\uDFFC\u200D\uD83C\uDFA4":"1f469-1f3fc-1f3a4","\uD83D\uDC69\uD83C\uDFFB\u200D\uD83C\uDFA4":"1f469-1f3fb-1f3a4","\uD83D\uDC68\uD83C\uDFFF\u200D\uD83D\uDD2C":"1f468-1f3ff-1f52c","\uD83D\uDC68\uD83C\uDFFE\u200D\uD83D\uDD2C":"1f468-1f3fe-1f52c","\uD83D\uDC68\uD83C\uDFFD\u200D\uD83D\uDD2C":"1f468-1f3fd-1f52c","\uD83D\uDC68\uD83C\uDFFC\u200D\uD83D\uDD2C":"1f468-1f3fc-1f52c","\uD83D\uDC68\uD83C\uDFFB\u200D\uD83D\uDD2C":"1f468-1f3fb-1f52c","\uD83D\uDC69\uD83C\uDFFF\u200D\uD83D\uDD2C":"1f469-1f3ff-1f52c","\uD83D\uDC69\uD83C\uDFFE\u200D\uD83D\uDD2C":"1f469-1f3fe-1f52c","\uD83D\uDC69\uD83C\uDFFD\u200D\uD83D\uDD2C":"1f469-1f3fd-1f52c","\uD83D\uDC69\uD83C\uDFFC\u200D\uD83D\uDD2C":"1f469-1f3fc-1f52c","\uD83D\uDC69\uD83C\uDFFB\u200D\uD83D\uDD2C":"1f469-1f3fb-1f52c","\uD83D\uDC68\uD83C\uDFFF\u200D\uD83D\uDCBC":"1f468-1f3ff-1f4bc","\uD83D\uDC68\uD83C\uDFFE\u200D\uD83D\uDCBC":"1f468-1f3fe-1f4bc","\uD83D\uDC68\uD83C\uDFFD\u200D\uD83D\uDCBC":"1f468-1f3fd-1f4bc","\uD83D\uDC68\uD83C\uDFFC\u200D\uD83D\uDCBC":"1f468-1f3fc-1f4bc","\uD83D\uDC68\uD83C\uDFFB\u200D\uD83D\uDCBC":"1f468-1f3fb-1f4bc","\uD83D\uDC69\uD83C\uDFFF\u200D\uD83D\uDCBC":"1f469-1f3ff-1f4bc","\uD83D\uDC69\uD83C\uDFFE\u200D\uD83D\uDCBC":"1f469-1f3fe-1f4bc","\uD83D\uDC69\uD83C\uDFFD\u200D\uD83D\uDCBC":"1f469-1f3fd-1f4bc","\uD83D\uDC69\uD83C\uDFFC\u200D\uD83D\uDCBC":"1f469-1f3fc-1f4bc","\uD83D\uDC69\uD83C\uDFFB\u200D\uD83D\uDCBC":"1f469-1f3fb-1f4bc","\uD83D\uDC68\uD83C\uDFFF\u200D\uD83D\uDD27":"1f468-1f3ff-1f527","\uD83D\uDC68\uD83C\uDFFE\u200D\uD83D\uDD27":"1f468-1f3fe-1f527","\uD83D\uDC68\uD83C\uDFFD\u200D\uD83D\uDD27":"1f468-1f3fd-1f527","\uD83D\uDC68\uD83C\uDFFC\u200D\uD83D\uDD27":"1f468-1f3fc-1f527","\uD83D\uDC68\uD83C\uDFFB\u200D\uD83D\uDD27":"1f468-1f3fb-1f527","\uD83D\uDC69\uD83C\uDFFF\u200D\uD83D\uDD27":"1f469-1f3ff-1f527","\uD83D\uDC69\uD83C\uDFFE\u200D\uD83D\uDD27":"1f469-1f3fe-1f527","\uD83D\uDC69\uD83C\uDFFD\u200D\uD83D\uDD27":"1f469-1f3fd-1f527","\uD83D\uDC69\uD83C\uDFFC\u200D\uD83D\uDD27":"1f469-1f3fc-1f527","\uD83D\uDC69\uD83C\uDFFB\u200D\uD83D\uDD27":"1f469-1f3fb-1f527","\uD83D\uDC68\uD83C\uDFFF\u200D\uD83C\uDFED":"1f468-1f3ff-1f3ed","\uD83D\uDC68\uD83C\uDFFE\u200D\uD83C\uDFED":"1f468-1f3fe-1f3ed","\uD83D\uDC68\uD83C\uDFFD\u200D\uD83C\uDFED":"1f468-1f3fd-1f3ed","\uD83D\uDC68\uD83C\uDFFC\u200D\uD83C\uDFED":"1f468-1f3fc-1f3ed","\uD83D\uDC68\uD83C\uDFFB\u200D\uD83C\uDFED":"1f468-1f3fb-1f3ed","\uD83D\uDC69\uD83C\uDFFF\u200D\uD83C\uDFED":"1f469-1f3ff-1f3ed","\uD83D\uDC69\uD83C\uDFFE\u200D\uD83C\uDFED":"1f469-1f3fe-1f3ed","\uD83D\uDC69\uD83C\uDFFD\u200D\uD83C\uDFED":"1f469-1f3fd-1f3ed","\uD83D\uDC69\uD83C\uDFFC\u200D\uD83C\uDFED":"1f469-1f3fc-1f3ed","\uD83D\uDC69\uD83C\uDFFB\u200D\uD83C\uDFED":"1f469-1f3fb-1f3ed","\uD83D\uDC68\uD83C\uDFFF\u200D\uD83C\uDF73":"1f468-1f3ff-1f373","\uD83D\uDC68\uD83C\uDFFE\u200D\uD83C\uDF73":"1f468-1f3fe-1f373","\uD83D\uDC68\uD83C\uDFFD\u200D\uD83C\uDF73":"1f468-1f3fd-1f373","\uD83D\uDC68\uD83C\uDFFC\u200D\uD83C\uDF73":"1f468-1f3fc-1f373","\uD83D\uDC68\uD83C\uDFFB\u200D\uD83C\uDF73":"1f468-1f3fb-1f373","\uD83D\uDC69\uD83C\uDFFF\u200D\uD83C\uDF73":"1f469-1f3ff-1f373","\uD83D\uDC69\uD83C\uDFFE\u200D\uD83C\uDF73":"1f469-1f3fe-1f373","\uD83D\uDC69\uD83C\uDFFD\u200D\uD83C\uDF73":"1f469-1f3fd-1f373","\uD83D\uDC69\uD83C\uDFFC\u200D\uD83C\uDF73":"1f469-1f3fc-1f373","\uD83D\uDC69\uD83C\uDFFB\u200D\uD83C\uDF73":"1f469-1f3fb-1f373","\uD83D\uDC68\uD83C\uDFFF\u200D\uD83C\uDF3E":"1f468-1f3ff-1f33e","\uD83D\uDC68\uD83C\uDFFE\u200D\uD83C\uDF3E":"1f468-1f3fe-1f33e","\uD83D\uDC68\uD83C\uDFFD\u200D\uD83C\uDF3E":"1f468-1f3fd-1f33e","\uD83D\uDC68\uD83C\uDFFC\u200D\uD83C\uDF3E":"1f468-1f3fc-1f33e","\uD83D\uDC68\uD83C\uDFFB\u200D\uD83C\uDF3E":"1f468-1f3fb-1f33e","\uD83D\uDC69\uD83C\uDFFF\u200D\uD83C\uDF3E":"1f469-1f3ff-1f33e","\uD83D\uDC69\uD83C\uDFFE\u200D\uD83C\uDF3E":"1f469-1f3fe-1f33e","\uD83D\uDC69\uD83C\uDFFD\u200D\uD83C\uDF3E":"1f469-1f3fd-1f33e","\uD83D\uDC69\uD83C\uDFFC\u200D\uD83C\uDF3E":"1f469-1f3fc-1f33e","\uD83D\uDC69\uD83C\uDFFB\u200D\uD83C\uDF3E":"1f469-1f3fb-1f33e","\uD83D\uDC68\uD83C\uDFFB\u200D\uD83C\uDFA8":"1f468-1f3fb-1f3a8","\uD83D\uDC68\uD83C\uDFFC\u200D\uD83C\uDFA8":"1f468-1f3fc-1f3a8","\uD83D\uDC68\uD83C\uDFFD\u200D\uD83C\uDFA8":"1f468-1f3fd-1f3a8","\uD83D\uDC68\uD83C\uDFFE\u200D\uD83C\uDFA8":"1f468-1f3fe-1f3a8","\uD83D\uDC68\uD83C\uDFFF\u200D\uD83C\uDFA8":"1f468-1f3ff-1f3a8","\uD83D\uDC69\uD83C\uDFFB\u200D\uD83C\uDFA8":"1f469-1f3fb-1f3a8","\uD83D\uDC69\uD83C\uDFFC\u200D\uD83C\uDFA8":"1f469-1f3fc-1f3a8","\uD83D\uDC69\uD83C\uDFFD\u200D\uD83C\uDFA8":"1f469-1f3fd-1f3a8","\uD83D\uDC69\uD83C\uDFFE\u200D\uD83C\uDFA8":"1f469-1f3fe-1f3a8","\uD83D\uDC69\uD83C\uDFFF\u200D\uD83C\uDFA8":"1f469-1f3ff-1f3a8","\uD83D\uDC68\uD83C\uDFFB\u200D\uD83D\uDE80":"1f468-1f3fb-1f680","\uD83D\uDC68\uD83C\uDFFC\u200D\uD83D\uDE80":"1f468-1f3fc-1f680","\uD83D\uDC68\uD83C\uDFFD\u200D\uD83D\uDE80":"1f468-1f3fd-1f680","\uD83D\uDC68\uD83C\uDFFE\u200D\uD83D\uDE80":"1f468-1f3fe-1f680","\uD83D\uDC68\uD83C\uDFFF\u200D\uD83D\uDE80":"1f468-1f3ff-1f680","\uD83D\uDC69\uD83C\uDFFB\u200D\uD83D\uDE80":"1f469-1f3fb-1f680","\uD83D\uDC69\uD83C\uDFFC\u200D\uD83D\uDE80":"1f469-1f3fc-1f680","\uD83D\uDC69\uD83C\uDFFD\u200D\uD83D\uDE80":"1f469-1f3fd-1f680","\uD83D\uDC69\uD83C\uDFFE\u200D\uD83D\uDE80":"1f469-1f3fe-1f680","\uD83D\uDC69\uD83C\uDFFF\u200D\uD83D\uDE80":"1f469-1f3ff-1f680","\uD83D\uDC68\uD83C\uDFFB\u200D\uD83D\uDE92":"1f468-1f3fb-1f692","\uD83D\uDC68\uD83C\uDFFC\u200D\uD83D\uDE92":"1f468-1f3fc-1f692","\uD83D\uDC68\uD83C\uDFFD\u200D\uD83D\uDE92":"1f468-1f3fd-1f692","\uD83D\uDC68\uD83C\uDFFE\u200D\uD83D\uDE92":"1f468-1f3fe-1f692","\uD83D\uDC68\uD83C\uDFFF\u200D\uD83D\uDE92":"1f468-1f3ff-1f692","\uD83D\uDC69\uD83C\uDFFB\u200D\uD83D\uDE92":"1f469-1f3fb-1f692","\uD83D\uDC69\uD83C\uDFFC\u200D\uD83D\uDE92":"1f469-1f3fc-1f692","\uD83D\uDC69\uD83C\uDFFD\u200D\uD83D\uDE92":"1f469-1f3fd-1f692","\uD83D\uDC69\uD83C\uDFFE\u200D\uD83D\uDE92":"1f469-1f3fe-1f692","\uD83D\uDC69\uD83C\uDFFF\u200D\uD83D\uDE92":"1f469-1f3ff-1f692","\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08":"1f3f3-1f308","\uD83C\uDFCC\uD83C\uDFFB\u200D\u2642":"1f3cc-1f3fb-2642","\uD83C\uDFCC\uD83C\uDFFC\u200D\u2642":"1f3cc-1f3fc-2642","\uD83C\uDFCC\uD83C\uDFFD\u200D\u2642":"1f3cc-1f3fd-2642","\uD83C\uDFCC\uD83C\uDFFE\u200D\u2642":"1f3cc-1f3fe-2642","\uD83C\uDFCC\uD83C\uDFFF\u200D\u2642":"1f3cc-1f3ff-2642","\uD83C\uDFCC\uD83C\uDFFB\u200D\u2640":"1f3cc-1f3fb-2640","\uD83C\uDFCC\uD83C\uDFFC\u200D\u2640":"1f3cc-1f3fc-2640","\uD83C\uDFCC\uD83C\uDFFD\u200D\u2640":"1f3cc-1f3fd-2640","\uD83C\uDFCC\uD83C\uDFFE\u200D\u2640":"1f3cc-1f3fe-2640","\uD83C\uDFCC\uD83C\uDFFF\u200D\u2640":"1f3cc-1f3ff-2640","\uD83E\uDD39\uD83C\uDFFF\u200D\u2642":"1f939-1f3ff-2642","\uD83E\uDD39\uD83C\uDFFE\u200D\u2642":"1f939-1f3fe-2642","\uD83E\uDD39\uD83C\uDFFD\u200D\u2642":"1f939-1f3fd-2642","\uD83E\uDD39\uD83C\uDFFC\u200D\u2642":"1f939-1f3fc-2642","\uD83E\uDD39\uD83C\uDFFB\u200D\u2642":"1f939-1f3fb-2642","\uD83E\uDD39\uD83C\uDFFF\u200D\u2640":"1f939-1f3ff-2640","\uD83E\uDD39\uD83C\uDFFE\u200D\u2640":"1f939-1f3fe-2640","\uD83E\uDD39\uD83C\uDFFD\u200D\u2640":"1f939-1f3fd-2640","\uD83E\uDD39\uD83C\uDFFC\u200D\u2640":"1f939-1f3fc-2640","\uD83E\uDD39\uD83C\uDFFB\u200D\u2640":"1f939-1f3fb-2640","\uD83E\uDD3E\uD83C\uDFFF\u200D\u2642":"1f93e-1f3ff-2642","\uD83E\uDD3E\uD83C\uDFFE\u200D\u2642":"1f93e-1f3fe-2642","\uD83E\uDD3E\uD83C\uDFFD\u200D\u2642":"1f93e-1f3fd-2642","\uD83E\uDD3E\uD83C\uDFFC\u200D\u2642":"1f93e-1f3fc-2642","\uD83E\uDD3E\uD83C\uDFFB\u200D\u2642":"1f93e-1f3fb-2642","\uD83E\uDD3E\uD83C\uDFFF\u200D\u2640":"1f93e-1f3ff-2640","\uD83E\uDD3E\uD83C\uDFFE\u200D\u2640":"1f93e-1f3fe-2640","\uD83E\uDD3E\uD83C\uDFFD\u200D\u2640":"1f93e-1f3fd-2640","\uD83E\uDD3E\uD83C\uDFFC\u200D\u2640":"1f93e-1f3fc-2640","\uD83E\uDD3E\uD83C\uDFFB\u200D\u2640":"1f93e-1f3fb-2640","\uD83E\uDD3D\uD83C\uDFFF\u200D\u2642":"1f93d-1f3ff-2642","\uD83E\uDD3D\uD83C\uDFFE\u200D\u2642":"1f93d-1f3fe-2642","\uD83E\uDD3D\uD83C\uDFFD\u200D\u2642":"1f93d-1f3fd-2642","\uD83E\uDD3D\uD83C\uDFFC\u200D\u2642":"1f93d-1f3fc-2642","\uD83E\uDD3D\uD83C\uDFFB\u200D\u2642":"1f93d-1f3fb-2642","\uD83E\uDD3D\uD83C\uDFFF\u200D\u2640":"1f93d-1f3ff-2640","\uD83E\uDD3D\uD83C\uDFFE\u200D\u2640":"1f93d-1f3fe-2640","\uD83E\uDD3D\uD83C\uDFFD\u200D\u2640":"1f93d-1f3fd-2640","\uD83E\uDD3D\uD83C\uDFFC\u200D\u2640":"1f93d-1f3fc-2640","\uD83E\uDD3D\uD83C\uDFFB\u200D\u2640":"1f93d-1f3fb-2640","\uD83E\uDD38\uD83C\uDFFF\u200D\u2642":"1f938-1f3ff-2642","\uD83E\uDD38\uD83C\uDFFE\u200D\u2642":"1f938-1f3fe-2642","\uD83E\uDD38\uD83C\uDFFD\u200D\u2642":"1f938-1f3fd-2642","\uD83E\uDD38\uD83C\uDFFC\u200D\u2642":"1f938-1f3fc-2642","\uD83E\uDD38\uD83C\uDFFB\u200D\u2642":"1f938-1f3fb-2642","\uD83E\uDD38\uD83C\uDFFF\u200D\u2640":"1f938-1f3ff-2640","\uD83E\uDD38\uD83C\uDFFE\u200D\u2640":"1f938-1f3fe-2640","\uD83E\uDD38\uD83C\uDFFD\u200D\u2640":"1f938-1f3fd-2640","\uD83E\uDD38\uD83C\uDFFC\u200D\u2640":"1f938-1f3fc-2640","\uD83E\uDD38\uD83C\uDFFB\u200D\u2640":"1f938-1f3fb-2640","\uD83D\uDEB6\uD83C\uDFFF\u200D\u2642":"1f6b6-1f3ff-2642","\uD83D\uDEB6\uD83C\uDFFE\u200D\u2642":"1f6b6-1f3fe-2642","\uD83D\uDEB6\uD83C\uDFFD\u200D\u2642":"1f6b6-1f3fd-2642","\uD83D\uDEB6\uD83C\uDFFC\u200D\u2642":"1f6b6-1f3fc-2642","\uD83D\uDEB6\uD83C\uDFFB\u200D\u2642":"1f6b6-1f3fb-2642","\uD83D\uDEB6\uD83C\uDFFF\u200D\u2640":"1f6b6-1f3ff-2640","\uD83D\uDEB6\uD83C\uDFFE\u200D\u2640":"1f6b6-1f3fe-2640","\uD83D\uDEB6\uD83C\uDFFD\u200D\u2640":"1f6b6-1f3fd-2640","\uD83D\uDEB6\uD83C\uDFFC\u200D\u2640":"1f6b6-1f3fc-2640","\uD83D\uDEB6\uD83C\uDFFB\u200D\u2640":"1f6b6-1f3fb-2640","\uD83D\uDEB5\uD83C\uDFFF\u200D\u2642":"1f6b5-1f3ff-2642","\uD83D\uDEB5\uD83C\uDFFE\u200D\u2642":"1f6b5-1f3fe-2642","\uD83D\uDEB5\uD83C\uDFFD\u200D\u2642":"1f6b5-1f3fd-2642","\uD83D\uDEB5\uD83C\uDFFC\u200D\u2642":"1f6b5-1f3fc-2642","\uD83D\uDEB5\uD83C\uDFFB\u200D\u2642":"1f6b5-1f3fb-2642","\uD83D\uDEB5\uD83C\uDFFF\u200D\u2640":"1f6b5-1f3ff-2640","\uD83D\uDEB5\uD83C\uDFFE\u200D\u2640":"1f6b5-1f3fe-2640","\uD83D\uDEB5\uD83C\uDFFD\u200D\u2640":"1f6b5-1f3fd-2640","\uD83D\uDEB5\uD83C\uDFFC\u200D\u2640":"1f6b5-1f3fc-2640","\uD83D\uDEB5\uD83C\uDFFB\u200D\u2640":"1f6b5-1f3fb-2640","\uD83D\uDEB4\uD83C\uDFFF\u200D\u2642":"1f6b4-1f3ff-2642","\uD83D\uDEB4\uD83C\uDFFE\u200D\u2642":"1f6b4-1f3fe-2642","\uD83D\uDEB4\uD83C\uDFFD\u200D\u2642":"1f6b4-1f3fd-2642","\uD83D\uDEB4\uD83C\uDFFC\u200D\u2642":"1f6b4-1f3fc-2642","\uD83D\uDEB4\uD83C\uDFFB\u200D\u2642":"1f6b4-1f3fb-2642","\uD83D\uDEB4\uD83C\uDFFF\u200D\u2640":"1f6b4-1f3ff-2640","\uD83D\uDEB4\uD83C\uDFFE\u200D\u2640":"1f6b4-1f3fe-2640","\uD83D\uDEB4\uD83C\uDFFD\u200D\u2640":"1f6b4-1f3fd-2640","\uD83D\uDEB4\uD83C\uDFFC\u200D\u2640":"1f6b4-1f3fc-2640","\uD83D\uDEB4\uD83C\uDFFB\u200D\u2640":"1f6b4-1f3fb-2640","\uD83D\uDEA3\uD83C\uDFFF\u200D\u2642":"1f6a3-1f3ff-2642","\uD83D\uDEA3\uD83C\uDFFE\u200D\u2642":"1f6a3-1f3fe-2642","\uD83D\uDEA3\uD83C\uDFFD\u200D\u2642":"1f6a3-1f3fd-2642","\uD83D\uDEA3\uD83C\uDFFC\u200D\u2642":"1f6a3-1f3fc-2642","\uD83D\uDEA3\uD83C\uDFFB\u200D\u2642":"1f6a3-1f3fb-2642","\uD83D\uDEA3\uD83C\uDFFF\u200D\u2640":"1f6a3-1f3ff-2640","\uD83D\uDEA3\uD83C\uDFFE\u200D\u2640":"1f6a3-1f3fe-2640","\uD83D\uDEA3\uD83C\uDFFD\u200D\u2640":"1f6a3-1f3fd-2640","\uD83D\uDEA3\uD83C\uDFFC\u200D\u2640":"1f6a3-1f3fc-2640","\uD83D\uDEA3\uD83C\uDFFB\u200D\u2640":"1f6a3-1f3fb-2640","\uD83C\uDFCB\uD83C\uDFFF\u200D\u2642":"1f3cb-1f3ff-2642","\uD83C\uDFCB\uD83C\uDFFE\u200D\u2642":"1f3cb-1f3fe-2642","\uD83C\uDFCB\uD83C\uDFFD\u200D\u2642":"1f3cb-1f3fd-2642","\uD83C\uDFCB\uD83C\uDFFC\u200D\u2642":"1f3cb-1f3fc-2642","\uD83C\uDFCB\uD83C\uDFFB\u200D\u2642":"1f3cb-1f3fb-2642","\uD83C\uDFCB\uD83C\uDFFF\u200D\u2640":"1f3cb-1f3ff-2640","\uD83C\uDFCB\uD83C\uDFFE\u200D\u2640":"1f3cb-1f3fe-2640","\uD83C\uDFCB\uD83C\uDFFD\u200D\u2640":"1f3cb-1f3fd-2640","\uD83C\uDFCB\uD83C\uDFFC\u200D\u2640":"1f3cb-1f3fc-2640","\uD83C\uDFCB\uD83C\uDFFB\u200D\u2640":"1f3cb-1f3fb-2640","\uD83C\uDFCA\uD83C\uDFFF\u200D\u2642":"1f3ca-1f3ff-2642","\uD83C\uDFCA\uD83C\uDFFE\u200D\u2642":"1f3ca-1f3fe-2642","\uD83C\uDFCA\uD83C\uDFFD\u200D\u2642":"1f3ca-1f3fd-2642","\uD83C\uDFCA\uD83C\uDFFC\u200D\u2642":"1f3ca-1f3fc-2642","\uD83C\uDFCA\uD83C\uDFFB\u200D\u2642":"1f3ca-1f3fb-2642","\uD83C\uDFCA\uD83C\uDFFF\u200D\u2640":"1f3ca-1f3ff-2640","\uD83C\uDFCA\uD83C\uDFFE\u200D\u2640":"1f3ca-1f3fe-2640","\uD83C\uDFCA\uD83C\uDFFD\u200D\u2640":"1f3ca-1f3fd-2640","\uD83C\uDFCA\uD83C\uDFFC\u200D\u2640":"1f3ca-1f3fc-2640","\uD83C\uDFCA\uD83C\uDFFB\u200D\u2640":"1f3ca-1f3fb-2640","\uD83C\uDFC4\uD83C\uDFFF\u200D\u2642":"1f3c4-1f3ff-2642","\uD83C\uDFC4\uD83C\uDFFE\u200D\u2642":"1f3c4-1f3fe-2642","\uD83C\uDFC4\uD83C\uDFFD\u200D\u2642":"1f3c4-1f3fd-2642","\uD83C\uDFC4\uD83C\uDFFC\u200D\u2642":"1f3c4-1f3fc-2642","\uD83C\uDFC4\uD83C\uDFFB\u200D\u2642":"1f3c4-1f3fb-2642","\uD83C\uDFC4\uD83C\uDFFF\u200D\u2640":"1f3c4-1f3ff-2640","\uD83C\uDFC4\uD83C\uDFFE\u200D\u2640":"1f3c4-1f3fe-2640","\uD83C\uDFC4\uD83C\uDFFD\u200D\u2640":"1f3c4-1f3fd-2640","\uD83C\uDFC4\uD83C\uDFFC\u200D\u2640":"1f3c4-1f3fc-2640","\uD83C\uDFC4\uD83C\uDFFB\u200D\u2640":"1f3c4-1f3fb-2640","\uD83C\uDFC3\uD83C\uDFFF\u200D\u2642":"1f3c3-1f3ff-2642","\uD83C\uDFC3\uD83C\uDFFE\u200D\u2642":"1f3c3-1f3fe-2642","\uD83C\uDFC3\uD83C\uDFFD\u200D\u2642":"1f3c3-1f3fd-2642","\uD83C\uDFC3\uD83C\uDFFC\u200D\u2642":"1f3c3-1f3fc-2642","\uD83C\uDFC3\uD83C\uDFFB\u200D\u2642":"1f3c3-1f3fb-2642","\uD83C\uDFC3\uD83C\uDFFF\u200D\u2640":"1f3c3-1f3ff-2640","\uD83C\uDFC3\uD83C\uDFFE\u200D\u2640":"1f3c3-1f3fe-2640","\uD83C\uDFC3\uD83C\uDFFD\u200D\u2640":"1f3c3-1f3fd-2640","\uD83C\uDFC3\uD83C\uDFFC\u200D\u2640":"1f3c3-1f3fc-2640","\uD83C\uDFC3\uD83C\uDFFB\u200D\u2640":"1f3c3-1f3fb-2640","\uD83E\uDD37\uD83C\uDFFF\u200D\u2642":"1f937-1f3ff-2642","\uD83E\uDD37\uD83C\uDFFE\u200D\u2642":"1f937-1f3fe-2642","\uD83E\uDD37\uD83C\uDFFD\u200D\u2642":"1f937-1f3fd-2642","\uD83E\uDD37\uD83C\uDFFC\u200D\u2642":"1f937-1f3fc-2642","\uD83E\uDD37\uD83C\uDFFB\u200D\u2642":"1f937-1f3fb-2642","\uD83E\uDD37\uD83C\uDFFF\u200D\u2640":"1f937-1f3ff-2640","\uD83E\uDD37\uD83C\uDFFE\u200D\u2640":"1f937-1f3fe-2640","\uD83E\uDD37\uD83C\uDFFD\u200D\u2640":"1f937-1f3fd-2640","\uD83E\uDD37\uD83C\uDFFC\u200D\u2640":"1f937-1f3fc-2640","\uD83E\uDD37\uD83C\uDFFB\u200D\u2640":"1f937-1f3fb-2640","\uD83E\uDD26\uD83C\uDFFF\u200D\u2642":"1f926-1f3ff-2642","\uD83E\uDD26\uD83C\uDFFE\u200D\u2642":"1f926-1f3fe-2642","\uD83E\uDD26\uD83C\uDFFD\u200D\u2642":"1f926-1f3fd-2642","\uD83E\uDD26\uD83C\uDFFC\u200D\u2642":"1f926-1f3fc-2642","\uD83E\uDD26\uD83C\uDFFB\u200D\u2642":"1f926-1f3fb-2642","\uD83E\uDD26\uD83C\uDFFF\u200D\u2640":"1f926-1f3ff-2640","\uD83E\uDD26\uD83C\uDFFE\u200D\u2640":"1f926-1f3fe-2640","\uD83E\uDD26\uD83C\uDFFD\u200D\u2640":"1f926-1f3fd-2640","\uD83E\uDD26\uD83C\uDFFC\u200D\u2640":"1f926-1f3fc-2640","\uD83E\uDD26\uD83C\uDFFB\u200D\u2640":"1f926-1f3fb-2640","\uD83D\uDE4E\uD83C\uDFFF\u200D\u2642":"1f64e-1f3ff-2642","\uD83D\uDE4E\uD83C\uDFFE\u200D\u2642":"1f64e-1f3fe-2642","\uD83D\uDE4E\uD83C\uDFFD\u200D\u2642":"1f64e-1f3fd-2642","\uD83D\uDE4E\uD83C\uDFFC\u200D\u2642":"1f64e-1f3fc-2642","\uD83D\uDE4E\uD83C\uDFFB\u200D\u2642":"1f64e-1f3fb-2642","\uD83D\uDE4E\uD83C\uDFFF\u200D\u2640":"1f64e-1f3ff-2640","\uD83D\uDE4E\uD83C\uDFFE\u200D\u2640":"1f64e-1f3fe-2640","\uD83D\uDE4E\uD83C\uDFFD\u200D\u2640":"1f64e-1f3fd-2640","\uD83D\uDE4E\uD83C\uDFFC\u200D\u2640":"1f64e-1f3fc-2640","\uD83D\uDE4E\uD83C\uDFFB\u200D\u2640":"1f64e-1f3fb-2640","\uD83D\uDE4D\uD83C\uDFFF\u200D\u2642":"1f64d-1f3ff-2642","\uD83D\uDE4D\uD83C\uDFFE\u200D\u2642":"1f64d-1f3fe-2642","\uD83D\uDE4D\uD83C\uDFFD\u200D\u2642":"1f64d-1f3fd-2642","\uD83D\uDE4D\uD83C\uDFFC\u200D\u2642":"1f64d-1f3fc-2642","\uD83D\uDE4D\uD83C\uDFFB\u200D\u2642":"1f64d-1f3fb-2642","\uD83D\uDE4D\uD83C\uDFFF\u200D\u2640":"1f64d-1f3ff-2640","\uD83D\uDE4D\uD83C\uDFFE\u200D\u2640":"1f64d-1f3fe-2640","\uD83D\uDE4D\uD83C\uDFFD\u200D\u2640":"1f64d-1f3fd-2640","\uD83D\uDE4D\uD83C\uDFFC\u200D\u2640":"1f64d-1f3fc-2640","\uD83D\uDE4D\uD83C\uDFFB\u200D\u2640":"1f64d-1f3fb-2640","\uD83D\uDE4B\uD83C\uDFFF\u200D\u2642":"1f64b-1f3ff-2642","\uD83D\uDE4B\uD83C\uDFFE\u200D\u2642":"1f64b-1f3fe-2642","\uD83D\uDE4B\uD83C\uDFFD\u200D\u2642":"1f64b-1f3fd-2642","\uD83D\uDE4B\uD83C\uDFFC\u200D\u2642":"1f64b-1f3fc-2642","\uD83D\uDE4B\uD83C\uDFFB\u200D\u2642":"1f64b-1f3fb-2642","\uD83D\uDE4B\uD83C\uDFFF\u200D\u2640":"1f64b-1f3ff-2640","\uD83D\uDE4B\uD83C\uDFFE\u200D\u2640":"1f64b-1f3fe-2640","\uD83D\uDE4B\uD83C\uDFFD\u200D\u2640":"1f64b-1f3fd-2640","\uD83D\uDE4B\uD83C\uDFFC\u200D\u2640":"1f64b-1f3fc-2640","\uD83D\uDE4B\uD83C\uDFFB\u200D\u2640":"1f64b-1f3fb-2640","\uD83D\uDE47\uD83C\uDFFF\u200D\u2642":"1f647-1f3ff-2642","\uD83D\uDE47\uD83C\uDFFE\u200D\u2642":"1f647-1f3fe-2642","\uD83D\uDE47\uD83C\uDFFD\u200D\u2642":"1f647-1f3fd-2642","\uD83D\uDE47\uD83C\uDFFC\u200D\u2642":"1f647-1f3fc-2642","\uD83D\uDE47\uD83C\uDFFB\u200D\u2642":"1f647-1f3fb-2642","\uD83D\uDE47\uD83C\uDFFF\u200D\u2640":"1f647-1f3ff-2640","\uD83D\uDE47\uD83C\uDFFE\u200D\u2640":"1f647-1f3fe-2640","\uD83D\uDE47\uD83C\uDFFD\u200D\u2640":"1f647-1f3fd-2640","\uD83D\uDE47\uD83C\uDFFC\u200D\u2640":"1f647-1f3fc-2640","\uD83D\uDE47\uD83C\uDFFB\u200D\u2640":"1f647-1f3fb-2640","\uD83D\uDE46\uD83C\uDFFF\u200D\u2642":"1f646-1f3ff-2642","\uD83D\uDE46\uD83C\uDFFE\u200D\u2642":"1f646-1f3fe-2642","\uD83D\uDE46\uD83C\uDFFD\u200D\u2642":"1f646-1f3fd-2642","\uD83D\uDE46\uD83C\uDFFC\u200D\u2642":"1f646-1f3fc-2642","\uD83D\uDE46\uD83C\uDFFB\u200D\u2642":"1f646-1f3fb-2642","\uD83D\uDE46\uD83C\uDFFF\u200D\u2640":"1f646-1f3ff-2640","\uD83D\uDE46\uD83C\uDFFE\u200D\u2640":"1f646-1f3fe-2640","\uD83D\uDE46\uD83C\uDFFD\u200D\u2640":"1f646-1f3fd-2640","\uD83D\uDE46\uD83C\uDFFC\u200D\u2640":"1f646-1f3fc-2640","\uD83D\uDE46\uD83C\uDFFB\u200D\u2640":"1f646-1f3fb-2640","\uD83D\uDE45\uD83C\uDFFF\u200D\u2642":"1f645-1f3ff-2642","\uD83D\uDE45\uD83C\uDFFE\u200D\u2642":"1f645-1f3fe-2642","\uD83D\uDE45\uD83C\uDFFD\u200D\u2642":"1f645-1f3fd-2642","\uD83D\uDE45\uD83C\uDFFC\u200D\u2642":"1f645-1f3fc-2642","\uD83D\uDE45\uD83C\uDFFB\u200D\u2642":"1f645-1f3fb-2642","\uD83D\uDE45\uD83C\uDFFF\u200D\u2640":"1f645-1f3ff-2640","\uD83D\uDE45\uD83C\uDFFE\u200D\u2640":"1f645-1f3fe-2640","\uD83D\uDE45\uD83C\uDFFD\u200D\u2640":"1f645-1f3fd-2640","\uD83D\uDE45\uD83C\uDFFC\u200D\u2640":"1f645-1f3fc-2640","\uD83D\uDE45\uD83C\uDFFB\u200D\u2640":"1f645-1f3fb-2640","\uD83D\uDC87\uD83C\uDFFF\u200D\u2642":"1f487-1f3ff-2642","\uD83D\uDC87\uD83C\uDFFE\u200D\u2642":"1f487-1f3fe-2642","\uD83D\uDC87\uD83C\uDFFD\u200D\u2642":"1f487-1f3fd-2642","\uD83D\uDC87\uD83C\uDFFC\u200D\u2642":"1f487-1f3fc-2642","\uD83D\uDC87\uD83C\uDFFB\u200D\u2642":"1f487-1f3fb-2642","\uD83D\uDC87\uD83C\uDFFF\u200D\u2640":"1f487-1f3ff-2640","\uD83D\uDC87\uD83C\uDFFE\u200D\u2640":"1f487-1f3fe-2640","\uD83D\uDC87\uD83C\uDFFD\u200D\u2640":"1f487-1f3fd-2640","\uD83D\uDC87\uD83C\uDFFC\u200D\u2640":"1f487-1f3fc-2640","\uD83D\uDC87\uD83C\uDFFB\u200D\u2640":"1f487-1f3fb-2640","\uD83D\uDC86\uD83C\uDFFF\u200D\u2642":"1f486-1f3ff-2642","\uD83D\uDC86\uD83C\uDFFE\u200D\u2642":"1f486-1f3fe-2642","\uD83D\uDC86\uD83C\uDFFD\u200D\u2642":"1f486-1f3fd-2642","\uD83D\uDC86\uD83C\uDFFC\u200D\u2642":"1f486-1f3fc-2642","\uD83D\uDC86\uD83C\uDFFB\u200D\u2642":"1f486-1f3fb-2642","\uD83D\uDC86\uD83C\uDFFF\u200D\u2640":"1f486-1f3ff-2640","\uD83D\uDC86\uD83C\uDFFE\u200D\u2640":"1f486-1f3fe-2640","\uD83D\uDC86\uD83C\uDFFD\u200D\u2640":"1f486-1f3fd-2640","\uD83D\uDC86\uD83C\uDFFC\u200D\u2640":"1f486-1f3fc-2640","\uD83D\uDC86\uD83C\uDFFB\u200D\u2640":"1f486-1f3fb-2640","\uD83D\uDC81\uD83C\uDFFF\u200D\u2642":"1f481-1f3ff-2642","\uD83D\uDC81\uD83C\uDFFE\u200D\u2642":"1f481-1f3fe-2642","\uD83D\uDC81\uD83C\uDFFD\u200D\u2642":"1f481-1f3fd-2642","\uD83D\uDC81\uD83C\uDFFC\u200D\u2642":"1f481-1f3fc-2642","\uD83D\uDC81\uD83C\uDFFB\u200D\u2642":"1f481-1f3fb-2642","\uD83D\uDC81\uD83C\uDFFF\u200D\u2640":"1f481-1f3ff-2640","\uD83D\uDC81\uD83C\uDFFE\u200D\u2640":"1f481-1f3fe-2640","\uD83D\uDC81\uD83C\uDFFD\u200D\u2640":"1f481-1f3fd-2640","\uD83D\uDC81\uD83C\uDFFC\u200D\u2640":"1f481-1f3fc-2640","\uD83D\uDC81\uD83C\uDFFB\u200D\u2640":"1f481-1f3fb-2640","\uD83D\uDC71\uD83C\uDFFF\u200D\u2642":"1f471-1f3ff-2642","\uD83D\uDC71\uD83C\uDFFE\u200D\u2642":"1f471-1f3fe-2642","\uD83D\uDC71\uD83C\uDFFD\u200D\u2642":"1f471-1f3fd-2642","\uD83D\uDC71\uD83C\uDFFC\u200D\u2642":"1f471-1f3fc-2642","\uD83D\uDC71\uD83C\uDFFB\u200D\u2642":"1f471-1f3fb-2642","\uD83D\uDC71\uD83C\uDFFF\u200D\u2640":"1f471-1f3ff-2640","\uD83D\uDC71\uD83C\uDFFE\u200D\u2640":"1f471-1f3fe-2640","\uD83D\uDC71\uD83C\uDFFD\u200D\u2640":"1f471-1f3fd-2640","\uD83D\uDC71\uD83C\uDFFC\u200D\u2640":"1f471-1f3fc-2640","\uD83D\uDC71\uD83C\uDFFB\u200D\u2640":"1f471-1f3fb-2640","\uD83D\uDC73\uD83C\uDFFF\u200D\u2642":"1f473-1f3ff-2642","\uD83D\uDC73\uD83C\uDFFE\u200D\u2642":"1f473-1f3fe-2642","\uD83D\uDC73\uD83C\uDFFD\u200D\u2642":"1f473-1f3fd-2642","\uD83D\uDC73\uD83C\uDFFC\u200D\u2642":"1f473-1f3fc-2642","\uD83D\uDC73\uD83C\uDFFB\u200D\u2642":"1f473-1f3fb-2642","\uD83D\uDC73\uD83C\uDFFF\u200D\u2640":"1f473-1f3ff-2640","\uD83D\uDC73\uD83C\uDFFE\u200D\u2640":"1f473-1f3fe-2640","\uD83D\uDC73\uD83C\uDFFD\u200D\u2640":"1f473-1f3fd-2640","\uD83D\uDC73\uD83C\uDFFC\u200D\u2640":"1f473-1f3fc-2640","\uD83D\uDC73\uD83C\uDFFB\u200D\u2640":"1f473-1f3fb-2640","\uD83D\uDC82\uD83C\uDFFF\u200D\u2642":"1f482-1f3ff-2642","\uD83D\uDC82\uD83C\uDFFE\u200D\u2642":"1f482-1f3fe-2642","\uD83D\uDC82\uD83C\uDFFD\u200D\u2642":"1f482-1f3fd-2642","\uD83D\uDC82\uD83C\uDFFC\u200D\u2642":"1f482-1f3fc-2642","\uD83D\uDC82\uD83C\uDFFB\u200D\u2642":"1f482-1f3fb-2642","\uD83D\uDC82\uD83C\uDFFF\u200D\u2640":"1f482-1f3ff-2640","\uD83D\uDC82\uD83C\uDFFE\u200D\u2640":"1f482-1f3fe-2640","\uD83D\uDC82\uD83C\uDFFD\u200D\u2640":"1f482-1f3fd-2640","\uD83D\uDC82\uD83C\uDFFC\u200D\u2640":"1f482-1f3fc-2640","\uD83D\uDC82\uD83C\uDFFB\u200D\u2640":"1f482-1f3fb-2640","\uD83D\uDD75\uD83C\uDFFF\u200D\u2642":"1f575-1f3ff-2642","\uD83D\uDD75\uD83C\uDFFE\u200D\u2642":"1f575-1f3fe-2642","\uD83D\uDD75\uD83C\uDFFD\u200D\u2642":"1f575-1f3fd-2642","\uD83D\uDD75\uD83C\uDFFC\u200D\u2642":"1f575-1f3fc-2642","\uD83D\uDD75\uD83C\uDFFB\u200D\u2642":"1f575-1f3fb-2642","\uD83D\uDD75\uD83C\uDFFF\u200D\u2640":"1f575-1f3ff-2640","\uD83D\uDD75\uD83C\uDFFE\u200D\u2640":"1f575-1f3fe-2640","\uD83D\uDD75\uD83C\uDFFD\u200D\u2640":"1f575-1f3fd-2640","\uD83D\uDD75\uD83C\uDFFC\u200D\u2640":"1f575-1f3fc-2640","\uD83D\uDD75\uD83C\uDFFB\u200D\u2640":"1f575-1f3fb-2640","\uD83D\uDC77\uD83C\uDFFF\u200D\u2642":"1f477-1f3ff-2642","\uD83D\uDC77\uD83C\uDFFE\u200D\u2642":"1f477-1f3fe-2642","\uD83D\uDC77\uD83C\uDFFD\u200D\u2642":"1f477-1f3fd-2642","\uD83D\uDC77\uD83C\uDFFC\u200D\u2642":"1f477-1f3fc-2642","\uD83D\uDC77\uD83C\uDFFB\u200D\u2642":"1f477-1f3fb-2642","\uD83D\uDC77\uD83C\uDFFF\u200D\u2640":"1f477-1f3ff-2640","\uD83D\uDC77\uD83C\uDFFE\u200D\u2640":"1f477-1f3fe-2640","\uD83D\uDC77\uD83C\uDFFD\u200D\u2640":"1f477-1f3fd-2640","\uD83D\uDC77\uD83C\uDFFC\u200D\u2640":"1f477-1f3fc-2640","\uD83D\uDC77\uD83C\uDFFB\u200D\u2640":"1f477-1f3fb-2640","\uD83D\uDC6E\uD83C\uDFFF\u200D\u2642":"1f46e-1f3ff-2642","\uD83D\uDC6E\uD83C\uDFFE\u200D\u2642":"1f46e-1f3fe-2642","\uD83D\uDC6E\uD83C\uDFFD\u200D\u2642":"1f46e-1f3fd-2642","\uD83D\uDC6E\uD83C\uDFFC\u200D\u2642":"1f46e-1f3fc-2642","\uD83D\uDC6E\uD83C\uDFFB\u200D\u2642":"1f46e-1f3fb-2642","\uD83D\uDC6E\uD83C\uDFFF\u200D\u2640":"1f46e-1f3ff-2640","\uD83D\uDC6E\uD83C\uDFFE\u200D\u2640":"1f46e-1f3fe-2640","\uD83D\uDC6E\uD83C\uDFFD\u200D\u2640":"1f46e-1f3fd-2640","\uD83D\uDC6E\uD83C\uDFFC\u200D\u2640":"1f46e-1f3fc-2640","\uD83D\uDC6E\uD83C\uDFFB\u200D\u2640":"1f46e-1f3fb-2640","\uD83D\uDC68\uD83C\uDFFF\u200D\u2695":"1f468-1f3ff-2695","\uD83D\uDC68\uD83C\uDFFE\u200D\u2695":"1f468-1f3fe-2695","\uD83D\uDC68\uD83C\uDFFD\u200D\u2695":"1f468-1f3fd-2695","\uD83D\uDC68\uD83C\uDFFC\u200D\u2695":"1f468-1f3fc-2695","\uD83D\uDC68\uD83C\uDFFB\u200D\u2695":"1f468-1f3fb-2695","\uD83D\uDC69\uD83C\uDFFF\u200D\u2695":"1f469-1f3ff-2695","\uD83D\uDC69\uD83C\uDFFE\u200D\u2695":"1f469-1f3fe-2695","\uD83D\uDC69\uD83C\uDFFD\u200D\u2695":"1f469-1f3fd-2695","\uD83D\uDC69\uD83C\uDFFC\u200D\u2695":"1f469-1f3fc-2695","\uD83D\uDC69\uD83C\uDFFB\u200D\u2695":"1f469-1f3fb-2695","\uD83D\uDC68\uD83C\uDFFB\u200D\u2696":"1f468-1f3fb-2696","\uD83D\uDC68\uD83C\uDFFC\u200D\u2696":"1f468-1f3fc-2696","\uD83D\uDC68\uD83C\uDFFD\u200D\u2696":"1f468-1f3fd-2696","\uD83D\uDC68\uD83C\uDFFE\u200D\u2696":"1f468-1f3fe-2696","\uD83D\uDC68\uD83C\uDFFF\u200D\u2696":"1f468-1f3ff-2696","\uD83D\uDC69\uD83C\uDFFB\u200D\u2696":"1f469-1f3fb-2696","\uD83D\uDC69\uD83C\uDFFC\u200D\u2696":"1f469-1f3fc-2696","\uD83D\uDC69\uD83C\uDFFD\u200D\u2696":"1f469-1f3fd-2696","\uD83D\uDC69\uD83C\uDFFE\u200D\u2696":"1f469-1f3fe-2696","\uD83D\uDC69\uD83C\uDFFF\u200D\u2696":"1f469-1f3ff-2696","\uD83D\uDC68\uD83C\uDFFB\u200D\u2708":"1f468-1f3fb-2708","\uD83D\uDC68\uD83C\uDFFC\u200D\u2708":"1f468-1f3fc-2708","\uD83D\uDC68\uD83C\uDFFD\u200D\u2708":"1f468-1f3fd-2708","\uD83D\uDC68\uD83C\uDFFE\u200D\u2708":"1f468-1f3fe-2708","\uD83D\uDC68\uD83C\uDFFF\u200D\u2708":"1f468-1f3ff-2708","\uD83D\uDC69\uD83C\uDFFB\u200D\u2708":"1f469-1f3fb-2708","\uD83D\uDC69\uD83C\uDFFC\u200D\u2708":"1f469-1f3fc-2708","\uD83D\uDC69\uD83C\uDFFD\u200D\u2708":"1f469-1f3fd-2708","\uD83D\uDC69\uD83C\uDFFE\u200D\u2708":"1f469-1f3fe-2708","\uD83D\uDC69\uD83C\uDFFF\u200D\u2708":"1f469-1f3ff-2708","\uD83D\uDC68\u2764\uFE0F\uD83D\uDC68":"1f468-2764-1f468","\uD83D\uDC69\u2764\uFE0F\uD83D\uDC68":"1f469-2764-1f468","\uD83D\uDC69\u2764\uFE0F\uD83D\uDC69":"1f469-2764-1f469","\uD83D\uDC68\uD83C\uDFFB\u2695\uFE0F":"1f468-1f3fb-2695","\uD83D\uDC68\uD83C\uDFFB\u2696\uFE0F":"1f468-1f3fb-2696","\uD83D\uDC68\uD83C\uDFFB\u2708\uFE0F":"1f468-1f3fb-2708","\uD83D\uDC68\uD83C\uDFFC\u2695\uFE0F":"1f468-1f3fc-2695","\uD83D\uDC68\uD83C\uDFFC\u2696\uFE0F":"1f468-1f3fc-2696","\uD83D\uDC68\uD83C\uDFFC\u2708\uFE0F":"1f468-1f3fc-2708","\uD83D\uDC68\uD83C\uDFFD\u2695\uFE0F":"1f468-1f3fd-2695","\uD83D\uDC68\uD83C\uDFFD\u2696\uFE0F":"1f468-1f3fd-2696","\uD83D\uDC68\uD83C\uDFFD\u2708\uFE0F":"1f468-1f3fd-2708","\uD83D\uDC68\uD83C\uDFFE\u2695\uFE0F":"1f468-1f3fe-2695","\uD83D\uDC68\uD83C\uDFFE\u2696\uFE0F":"1f468-1f3fe-2696","\uD83D\uDC68\uD83C\uDFFE\u2708\uFE0F":"1f468-1f3fe-2708","\uD83D\uDC68\uD83C\uDFFF\u2695\uFE0F":"1f468-1f3ff-2695","\uD83D\uDC68\uD83C\uDFFF\u2696\uFE0F":"1f468-1f3ff-2696","\uD83D\uDC68\uD83C\uDFFF\u2708\uFE0F":"1f468-1f3ff-2708","\uD83D\uDC69\uD83C\uDFFB\u2695\uFE0F":"1f469-1f3fb-2695","\uD83D\uDC69\uD83C\uDFFB\u2696\uFE0F":"1f469-1f3fb-2696","\uD83D\uDC69\uD83C\uDFFB\u2708\uFE0F":"1f469-1f3fb-2708","\uD83D\uDC69\uD83C\uDFFC\u2695\uFE0F":"1f469-1f3fc-2695","\uD83D\uDC69\uD83C\uDFFC\u2696\uFE0F":"1f469-1f3fc-2696","\uD83D\uDC69\uD83C\uDFFC\u2708\uFE0F":"1f469-1f3fc-2708","\uD83D\uDC69\uD83C\uDFFD\u2695\uFE0F":"1f469-1f3fd-2695","\uD83D\uDC69\uD83C\uDFFD\u2696\uFE0F":"1f469-1f3fd-2696","\uD83D\uDC69\uD83C\uDFFD\u2708\uFE0F":"1f469-1f3fd-2708","\uD83D\uDC69\uD83C\uDFFE\u2695\uFE0F":"1f469-1f3fe-2695","\uD83D\uDC69\uD83C\uDFFE\u2696\uFE0F":"1f469-1f3fe-2696","\uD83D\uDC69\uD83C\uDFFE\u2708\uFE0F":"1f469-1f3fe-2708","\uD83D\uDC69\uD83C\uDFFF\u2695\uFE0F":"1f469-1f3ff-2695","\uD83D\uDC69\uD83C\uDFFF\u2696\uFE0F":"1f469-1f3ff-2696","\uD83D\uDC69\uD83C\uDFFF\u2708\uFE0F":"1f469-1f3ff-2708","\uD83D\uDC6E\uD83C\uDFFB\u2640\uFE0F":"1f46e-1f3fb-2640","\uD83D\uDC6E\uD83C\uDFFB\u2642\uFE0F":"1f46e-1f3fb-2642","\uD83D\uDC6E\uD83C\uDFFC\u2640\uFE0F":"1f46e-1f3fc-2640","\uD83D\uDC6E\uD83C\uDFFC\u2642\uFE0F":"1f46e-1f3fc-2642","\uD83D\uDC6E\uD83C\uDFFD\u2640\uFE0F":"1f46e-1f3fd-2640","\uD83D\uDC6E\uD83C\uDFFD\u2642\uFE0F":"1f46e-1f3fd-2642","\uD83D\uDC6E\uD83C\uDFFE\u2640\uFE0F":"1f46e-1f3fe-2640","\uD83D\uDC6E\uD83C\uDFFE\u2642\uFE0F":"1f46e-1f3fe-2642","\uD83D\uDC6E\uD83C\uDFFF\u2640\uFE0F":"1f46e-1f3ff-2640","\uD83D\uDC6E\uD83C\uDFFF\u2642\uFE0F":"1f46e-1f3ff-2642","\uD83D\uDC71\uD83C\uDFFB\u2640\uFE0F":"1f471-1f3fb-2640","\uD83D\uDC71\uD83C\uDFFB\u2642\uFE0F":"1f471-1f3fb-2642","\uD83D\uDC71\uD83C\uDFFC\u2640\uFE0F":"1f471-1f3fc-2640","\uD83D\uDC71\uD83C\uDFFC\u2642\uFE0F":"1f471-1f3fc-2642","\uD83D\uDC71\uD83C\uDFFD\u2640\uFE0F":"1f471-1f3fd-2640","\uD83D\uDC71\uD83C\uDFFD\u2642\uFE0F":"1f471-1f3fd-2642","\uD83D\uDC71\uD83C\uDFFE\u2640\uFE0F":"1f471-1f3fe-2640","\uD83D\uDC71\uD83C\uDFFE\u2642\uFE0F":"1f471-1f3fe-2642","\uD83D\uDC71\uD83C\uDFFF\u2640\uFE0F":"1f471-1f3ff-2640","\uD83D\uDC71\uD83C\uDFFF\u2642\uFE0F":"1f471-1f3ff-2642","\uD83D\uDC73\uD83C\uDFFB\u2640\uFE0F":"1f473-1f3fb-2640","\uD83D\uDC73\uD83C\uDFFB\u2642\uFE0F":"1f473-1f3fb-2642","\uD83D\uDC73\uD83C\uDFFC\u2640\uFE0F":"1f473-1f3fc-2640","\uD83D\uDC73\uD83C\uDFFC\u2642\uFE0F":"1f473-1f3fc-2642","\uD83D\uDC73\uD83C\uDFFD\u2640\uFE0F":"1f473-1f3fd-2640","\uD83D\uDC73\uD83C\uDFFD\u2642\uFE0F":"1f473-1f3fd-2642","\uD83D\uDC73\uD83C\uDFFE\u2640\uFE0F":"1f473-1f3fe-2640","\uD83D\uDC73\uD83C\uDFFE\u2642\uFE0F":"1f473-1f3fe-2642","\uD83D\uDC73\uD83C\uDFFF\u2640\uFE0F":"1f473-1f3ff-2640","\uD83D\uDC73\uD83C\uDFFF\u2642\uFE0F":"1f473-1f3ff-2642","\uD83D\uDC77\uD83C\uDFFB\u2640\uFE0F":"1f477-1f3fb-2640","\uD83D\uDC77\uD83C\uDFFB\u2642\uFE0F":"1f477-1f3fb-2642","\uD83D\uDC77\uD83C\uDFFC\u2640\uFE0F":"1f477-1f3fc-2640","\uD83D\uDC77\uD83C\uDFFC\u2642\uFE0F":"1f477-1f3fc-2642","\uD83D\uDC77\uD83C\uDFFD\u2640\uFE0F":"1f477-1f3fd-2640","\uD83D\uDC77\uD83C\uDFFD\u2642\uFE0F":"1f477-1f3fd-2642","\uD83D\uDC77\uD83C\uDFFE\u2640\uFE0F":"1f477-1f3fe-2640","\uD83D\uDC77\uD83C\uDFFE\u2642\uFE0F":"1f477-1f3fe-2642","\uD83D\uDC77\uD83C\uDFFF\u2640\uFE0F":"1f477-1f3ff-2640","\uD83D\uDC77\uD83C\uDFFF\u2642\uFE0F":"1f477-1f3ff-2642","\uD83D\uDC82\uD83C\uDFFB\u2640\uFE0F":"1f482-1f3fb-2640","\uD83D\uDC82\uD83C\uDFFB\u2642\uFE0F":"1f482-1f3fb-2642","\uD83D\uDC82\uD83C\uDFFC\u2640\uFE0F":"1f482-1f3fc-2640","\uD83D\uDC82\uD83C\uDFFC\u2642\uFE0F":"1f482-1f3fc-2642","\uD83D\uDC82\uD83C\uDFFD\u2640\uFE0F":"1f482-1f3fd-2640","\uD83D\uDC82\uD83C\uDFFD\u2642\uFE0F":"1f482-1f3fd-2642","\uD83D\uDC82\uD83C\uDFFE\u2640\uFE0F":"1f482-1f3fe-2640","\uD83D\uDC82\uD83C\uDFFE\u2642\uFE0F":"1f482-1f3fe-2642","\uD83D\uDC82\uD83C\uDFFF\u2640\uFE0F":"1f482-1f3ff-2640","\uD83D\uDC82\uD83C\uDFFF\u2642\uFE0F":"1f482-1f3ff-2642","\uD83C\uDFC3\uD83C\uDFFB\u2640\uFE0F":"1f3c3-1f3fb-2640","\uD83C\uDFC3\uD83C\uDFFB\u2642\uFE0F":"1f3c3-1f3fb-2642","\uD83C\uDFC3\uD83C\uDFFC\u2640\uFE0F":"1f3c3-1f3fc-2640","\uD83C\uDFC3\uD83C\uDFFC\u2642\uFE0F":"1f3c3-1f3fc-2642","\uD83C\uDFC3\uD83C\uDFFD\u2640\uFE0F":"1f3c3-1f3fd-2640","\uD83C\uDFC3\uD83C\uDFFD\u2642\uFE0F":"1f3c3-1f3fd-2642","\uD83C\uDFC3\uD83C\uDFFE\u2640\uFE0F":"1f3c3-1f3fe-2640","\uD83C\uDFC3\uD83C\uDFFE\u2642\uFE0F":"1f3c3-1f3fe-2642","\uD83C\uDFC3\uD83C\uDFFF\u2640\uFE0F":"1f3c3-1f3ff-2640","\uD83C\uDFC3\uD83C\uDFFF\u2642\uFE0F":"1f3c3-1f3ff-2642","\uD83C\uDFC4\uD83C\uDFFB\u2640\uFE0F":"1f3c4-1f3fb-2640","\uD83C\uDFC4\uD83C\uDFFB\u2642\uFE0F":"1f3c4-1f3fb-2642","\uD83C\uDFC4\uD83C\uDFFC\u2640\uFE0F":"1f3c4-1f3fc-2640","\uD83C\uDFC4\uD83C\uDFFC\u2642\uFE0F":"1f3c4-1f3fc-2642","\uD83C\uDFC4\uD83C\uDFFD\u2640\uFE0F":"1f3c4-1f3fd-2640","\uD83C\uDFC4\uD83C\uDFFD\u2642\uFE0F":"1f3c4-1f3fd-2642","\uD83C\uDFC4\uD83C\uDFFE\u2640\uFE0F":"1f3c4-1f3fe-2640","\uD83C\uDFC4\uD83C\uDFFE\u2642\uFE0F":"1f3c4-1f3fe-2642","\uD83C\uDFC4\uD83C\uDFFF\u2640\uFE0F":"1f3c4-1f3ff-2640","\uD83C\uDFC4\uD83C\uDFFF\u2642\uFE0F":"1f3c4-1f3ff-2642","\uD83C\uDFCA\uD83C\uDFFB\u2640\uFE0F":"1f3ca-1f3fb-2640","\uD83C\uDFCA\uD83C\uDFFB\u2642\uFE0F":"1f3ca-1f3fb-2642","\uD83C\uDFCA\uD83C\uDFFC\u2640\uFE0F":"1f3ca-1f3fc-2640","\uD83C\uDFCA\uD83C\uDFFC\u2642\uFE0F":"1f3ca-1f3fc-2642","\uD83C\uDFCA\uD83C\uDFFD\u2640\uFE0F":"1f3ca-1f3fd-2640","\uD83C\uDFCA\uD83C\uDFFD\u2642\uFE0F":"1f3ca-1f3fd-2642","\uD83C\uDFCA\uD83C\uDFFE\u2640\uFE0F":"1f3ca-1f3fe-2640","\uD83C\uDFCA\uD83C\uDFFE\u2642\uFE0F":"1f3ca-1f3fe-2642","\uD83C\uDFCA\uD83C\uDFFF\u2640\uFE0F":"1f3ca-1f3ff-2640","\uD83C\uDFCA\uD83C\uDFFF\u2642\uFE0F":"1f3ca-1f3ff-2642","\uD83D\uDC86\uD83C\uDFFB\u2640\uFE0F":"1f486-1f3fb-2640","\uD83D\uDC86\uD83C\uDFFB\u2642\uFE0F":"1f486-1f3fb-2642","\uD83D\uDC86\uD83C\uDFFC\u2640\uFE0F":"1f486-1f3fc-2640","\uD83D\uDC86\uD83C\uDFFC\u2642\uFE0F":"1f486-1f3fc-2642","\uD83D\uDC86\uD83C\uDFFD\u2640\uFE0F":"1f486-1f3fd-2640","\uD83D\uDC86\uD83C\uDFFD\u2642\uFE0F":"1f486-1f3fd-2642","\uD83D\uDC86\uD83C\uDFFE\u2640\uFE0F":"1f486-1f3fe-2640","\uD83D\uDC86\uD83C\uDFFE\u2642\uFE0F":"1f486-1f3fe-2642","\uD83D\uDC86\uD83C\uDFFF\u2640\uFE0F":"1f486-1f3ff-2640","\uD83D\uDC86\uD83C\uDFFF\u2642\uFE0F":"1f486-1f3ff-2642","\uD83D\uDC87\uD83C\uDFFB\u2640\uFE0F":"1f487-1f3fb-2640","\uD83D\uDC87\uD83C\uDFFB\u2642\uFE0F":"1f487-1f3fb-2642","\uD83D\uDC87\uD83C\uDFFC\u2640\uFE0F":"1f487-1f3fc-2640","\uD83D\uDC87\uD83C\uDFFC\u2642\uFE0F":"1f487-1f3fc-2642","\uD83D\uDC87\uD83C\uDFFD\u2640\uFE0F":"1f487-1f3fd-2640","\uD83D\uDC87\uD83C\uDFFD\u2642\uFE0F":"1f487-1f3fd-2642","\uD83D\uDC87\uD83C\uDFFE\u2640\uFE0F":"1f487-1f3fe-2640","\uD83D\uDC87\uD83C\uDFFE\u2642\uFE0F":"1f487-1f3fe-2642","\uD83D\uDC87\uD83C\uDFFF\u2640\uFE0F":"1f487-1f3ff-2640","\uD83D\uDC87\uD83C\uDFFF\u2642\uFE0F":"1f487-1f3ff-2642","\uD83D\uDEA3\uD83C\uDFFB\u2640\uFE0F":"1f6a3-1f3fb-2640","\uD83D\uDEA3\uD83C\uDFFB\u2642\uFE0F":"1f6a3-1f3fb-2642","\uD83D\uDEA3\uD83C\uDFFC\u2640\uFE0F":"1f6a3-1f3fc-2640","\uD83D\uDEA3\uD83C\uDFFC\u2642\uFE0F":"1f6a3-1f3fc-2642","\uD83D\uDEA3\uD83C\uDFFD\u2640\uFE0F":"1f6a3-1f3fd-2640","\uD83D\uDEA3\uD83C\uDFFD\u2642\uFE0F":"1f6a3-1f3fd-2642","\uD83D\uDEA3\uD83C\uDFFE\u2640\uFE0F":"1f6a3-1f3fe-2640","\uD83D\uDEA3\uD83C\uDFFE\u2642\uFE0F":"1f6a3-1f3fe-2642","\uD83D\uDEA3\uD83C\uDFFF\u2640\uFE0F":"1f6a3-1f3ff-2640","\uD83D\uDEA3\uD83C\uDFFF\u2642\uFE0F":"1f6a3-1f3ff-2642","\uD83D\uDEB4\uD83C\uDFFB\u2640\uFE0F":"1f6b4-1f3fb-2640","\uD83D\uDEB4\uD83C\uDFFB\u2642\uFE0F":"1f6b4-1f3fb-2642","\uD83D\uDEB4\uD83C\uDFFC\u2640\uFE0F":"1f6b4-1f3fc-2640","\uD83D\uDEB4\uD83C\uDFFC\u2642\uFE0F":"1f6b4-1f3fc-2642","\uD83D\uDEB4\uD83C\uDFFD\u2640\uFE0F":"1f6b4-1f3fd-2640","\uD83D\uDEB4\uD83C\uDFFD\u2642\uFE0F":"1f6b4-1f3fd-2642","\uD83D\uDEB4\uD83C\uDFFE\u2640\uFE0F":"1f6b4-1f3fe-2640","\uD83D\uDEB4\uD83C\uDFFE\u2642\uFE0F":"1f6b4-1f3fe-2642","\uD83D\uDEB4\uD83C\uDFFF\u2640\uFE0F":"1f6b4-1f3ff-2640","\uD83D\uDEB4\uD83C\uDFFF\u2642\uFE0F":"1f6b4-1f3ff-2642","\uD83D\uDEB5\uD83C\uDFFB\u2640\uFE0F":"1f6b5-1f3fb-2640","\uD83D\uDEB5\uD83C\uDFFB\u2642\uFE0F":"1f6b5-1f3fb-2642","\uD83D\uDEB5\uD83C\uDFFC\u2640\uFE0F":"1f6b5-1f3fc-2640","\uD83D\uDEB5\uD83C\uDFFC\u2642\uFE0F":"1f6b5-1f3fc-2642","\uD83D\uDEB5\uD83C\uDFFD\u2640\uFE0F":"1f6b5-1f3fd-2640","\uD83D\uDEB5\uD83C\uDFFD\u2642\uFE0F":"1f6b5-1f3fd-2642","\uD83D\uDEB5\uD83C\uDFFE\u2640\uFE0F":"1f6b5-1f3fe-2640","\uD83D\uDEB5\uD83C\uDFFE\u2642\uFE0F":"1f6b5-1f3fe-2642","\uD83D\uDEB5\uD83C\uDFFF\u2640\uFE0F":"1f6b5-1f3ff-2640","\uD83D\uDEB5\uD83C\uDFFF\u2642\uFE0F":"1f6b5-1f3ff-2642","\uD83D\uDEB6\uD83C\uDFFB\u2640\uFE0F":"1f6b6-1f3fb-2640","\uD83D\uDEB6\uD83C\uDFFB\u2642\uFE0F":"1f6b6-1f3fb-2642","\uD83D\uDEB6\uD83C\uDFFC\u2640\uFE0F":"1f6b6-1f3fc-2640","\uD83D\uDEB6\uD83C\uDFFC\u2642\uFE0F":"1f6b6-1f3fc-2642","\uD83D\uDEB6\uD83C\uDFFD\u2640\uFE0F":"1f6b6-1f3fd-2640","\uD83D\uDEB6\uD83C\uDFFD\u2642\uFE0F":"1f6b6-1f3fd-2642","\uD83D\uDEB6\uD83C\uDFFE\u2640\uFE0F":"1f6b6-1f3fe-2640","\uD83D\uDEB6\uD83C\uDFFE\u2642\uFE0F":"1f6b6-1f3fe-2642","\uD83D\uDEB6\uD83C\uDFFF\u2640\uFE0F":"1f6b6-1f3ff-2640","\uD83D\uDEB6\uD83C\uDFFF\u2642\uFE0F":"1f6b6-1f3ff-2642","\uD83E\uDD38\uD83C\uDFFB\u2640\uFE0F":"1f938-1f3fb-2640","\uD83E\uDD38\uD83C\uDFFB\u2642\uFE0F":"1f938-1f3fb-2642","\uD83E\uDD38\uD83C\uDFFC\u2640\uFE0F":"1f938-1f3fc-2640","\uD83E\uDD38\uD83C\uDFFC\u2642\uFE0F":"1f938-1f3fc-2642","\uD83E\uDD38\uD83C\uDFFD\u2640\uFE0F":"1f938-1f3fd-2640","\uD83E\uDD38\uD83C\uDFFD\u2642\uFE0F":"1f938-1f3fd-2642","\uD83E\uDD38\uD83C\uDFFE\u2640\uFE0F":"1f938-1f3fe-2640","\uD83E\uDD38\uD83C\uDFFE\u2642\uFE0F":"1f938-1f3fe-2642","\uD83E\uDD38\uD83C\uDFFF\u2640\uFE0F":"1f938-1f3ff-2640","\uD83E\uDD38\uD83C\uDFFF\u2642\uFE0F":"1f938-1f3ff-2642","\uD83E\uDD39\uD83C\uDFFB\u2640\uFE0F":"1f939-1f3fb-2640","\uD83E\uDD39\uD83C\uDFFB\u2642\uFE0F":"1f939-1f3fb-2642","\uD83E\uDD39\uD83C\uDFFC\u2640\uFE0F":"1f939-1f3fc-2640","\uD83E\uDD39\uD83C\uDFFC\u2642\uFE0F":"1f939-1f3fc-2642","\uD83E\uDD39\uD83C\uDFFD\u2640\uFE0F":"1f939-1f3fd-2640","\uD83E\uDD39\uD83C\uDFFD\u2642\uFE0F":"1f939-1f3fd-2642","\uD83E\uDD39\uD83C\uDFFE\u2640\uFE0F":"1f939-1f3fe-2640","\uD83E\uDD39\uD83C\uDFFE\u2642\uFE0F":"1f939-1f3fe-2642","\uD83E\uDD39\uD83C\uDFFF\u2640\uFE0F":"1f939-1f3ff-2640","\uD83E\uDD39\uD83C\uDFFF\u2642\uFE0F":"1f939-1f3ff-2642","\uD83E\uDD3D\uD83C\uDFFB\u2640\uFE0F":"1f93d-1f3fb-2640","\uD83E\uDD3D\uD83C\uDFFB\u2642\uFE0F":"1f93d-1f3fb-2642","\uD83E\uDD3D\uD83C\uDFFC\u2640\uFE0F":"1f93d-1f3fc-2640","\uD83E\uDD3D\uD83C\uDFFC\u2642\uFE0F":"1f93d-1f3fc-2642","\uD83E\uDD3D\uD83C\uDFFD\u2640\uFE0F":"1f93d-1f3fd-2640","\uD83E\uDD3D\uD83C\uDFFD\u2642\uFE0F":"1f93d-1f3fd-2642","\uD83E\uDD3D\uD83C\uDFFE\u2640\uFE0F":"1f93d-1f3fe-2640","\uD83E\uDD3D\uD83C\uDFFE\u2642\uFE0F":"1f93d-1f3fe-2642","\uD83E\uDD3D\uD83C\uDFFF\u2640\uFE0F":"1f93d-1f3ff-2640","\uD83E\uDD3D\uD83C\uDFFF\u2642\uFE0F":"1f93d-1f3ff-2642","\uD83E\uDD3E\uD83C\uDFFB\u2640\uFE0F":"1f93e-1f3fb-2640","\uD83E\uDD3E\uD83C\uDFFB\u2642\uFE0F":"1f93e-1f3fb-2642","\uD83E\uDD3E\uD83C\uDFFC\u2640\uFE0F":"1f93e-1f3fc-2640","\uD83E\uDD3E\uD83C\uDFFC\u2642\uFE0F":"1f93e-1f3fc-2642","\uD83E\uDD3E\uD83C\uDFFD\u2640\uFE0F":"1f93e-1f3fd-2640","\uD83E\uDD3E\uD83C\uDFFD\u2642\uFE0F":"1f93e-1f3fd-2642","\uD83E\uDD3E\uD83C\uDFFE\u2640\uFE0F":"1f93e-1f3fe-2640","\uD83E\uDD3E\uD83C\uDFFE\u2642\uFE0F":"1f93e-1f3fe-2642","\uD83E\uDD3E\uD83C\uDFFF\u2640\uFE0F":"1f93e-1f3ff-2640","\uD83E\uDD3E\uD83C\uDFFF\u2642\uFE0F":"1f93e-1f3ff-2642","\uD83D\uDC81\uD83C\uDFFB\u2640\uFE0F":"1f481-1f3fb-2640","\uD83D\uDC81\uD83C\uDFFB\u2642\uFE0F":"1f481-1f3fb-2642","\uD83D\uDC81\uD83C\uDFFC\u2640\uFE0F":"1f481-1f3fc-2640","\uD83D\uDC81\uD83C\uDFFC\u2642\uFE0F":"1f481-1f3fc-2642","\uD83D\uDC81\uD83C\uDFFD\u2640\uFE0F":"1f481-1f3fd-2640","\uD83D\uDC81\uD83C\uDFFD\u2642\uFE0F":"1f481-1f3fd-2642","\uD83D\uDC81\uD83C\uDFFE\u2640\uFE0F":"1f481-1f3fe-2640","\uD83D\uDC81\uD83C\uDFFE\u2642\uFE0F":"1f481-1f3fe-2642","\uD83D\uDC81\uD83C\uDFFF\u2640\uFE0F":"1f481-1f3ff-2640","\uD83D\uDC81\uD83C\uDFFF\u2642\uFE0F":"1f481-1f3ff-2642","\uD83D\uDE45\uD83C\uDFFB\u2640\uFE0F":"1f645-1f3fb-2640","\uD83D\uDE45\uD83C\uDFFB\u2642\uFE0F":"1f645-1f3fb-2642","\uD83D\uDE45\uD83C\uDFFC\u2640\uFE0F":"1f645-1f3fc-2640","\uD83D\uDE45\uD83C\uDFFC\u2642\uFE0F":"1f645-1f3fc-2642","\uD83D\uDE45\uD83C\uDFFD\u2640\uFE0F":"1f645-1f3fd-2640","\uD83D\uDE45\uD83C\uDFFD\u2642\uFE0F":"1f645-1f3fd-2642","\uD83D\uDE45\uD83C\uDFFE\u2640\uFE0F":"1f645-1f3fe-2640","\uD83D\uDE45\uD83C\uDFFE\u2642\uFE0F":"1f645-1f3fe-2642","\uD83D\uDE45\uD83C\uDFFF\u2640\uFE0F":"1f645-1f3ff-2640","\uD83D\uDE45\uD83C\uDFFF\u2642\uFE0F":"1f645-1f3ff-2642","\uD83D\uDE46\uD83C\uDFFB\u2640\uFE0F":"1f646-1f3fb-2640","\uD83D\uDE46\uD83C\uDFFB\u2642\uFE0F":"1f646-1f3fb-2642","\uD83D\uDE46\uD83C\uDFFC\u2640\uFE0F":"1f646-1f3fc-2640","\uD83D\uDE46\uD83C\uDFFC\u2642\uFE0F":"1f646-1f3fc-2642","\uD83D\uDE46\uD83C\uDFFD\u2640\uFE0F":"1f646-1f3fd-2640","\uD83D\uDE46\uD83C\uDFFD\u2642\uFE0F":"1f646-1f3fd-2642","\uD83D\uDE46\uD83C\uDFFE\u2640\uFE0F":"1f646-1f3fe-2640","\uD83D\uDE46\uD83C\uDFFE\u2642\uFE0F":"1f646-1f3fe-2642","\uD83D\uDE46\uD83C\uDFFF\u2640\uFE0F":"1f646-1f3ff-2640","\uD83D\uDE46\uD83C\uDFFF\u2642\uFE0F":"1f646-1f3ff-2642","\uD83D\uDE47\uD83C\uDFFB\u2640\uFE0F":"1f647-1f3fb-2640","\uD83D\uDE47\uD83C\uDFFB\u2642\uFE0F":"1f647-1f3fb-2642","\uD83D\uDE47\uD83C\uDFFC\u2640\uFE0F":"1f647-1f3fc-2640","\uD83D\uDE47\uD83C\uDFFC\u2642\uFE0F":"1f647-1f3fc-2642","\uD83D\uDE47\uD83C\uDFFD\u2640\uFE0F":"1f647-1f3fd-2640","\uD83D\uDE47\uD83C\uDFFD\u2642\uFE0F":"1f647-1f3fd-2642","\uD83D\uDE47\uD83C\uDFFE\u2640\uFE0F":"1f647-1f3fe-2640","\uD83D\uDE47\uD83C\uDFFE\u2642\uFE0F":"1f647-1f3fe-2642","\uD83D\uDE47\uD83C\uDFFF\u2640\uFE0F":"1f647-1f3ff-2640","\uD83D\uDE47\uD83C\uDFFF\u2642\uFE0F":"1f647-1f3ff-2642","\uD83D\uDE4B\uD83C\uDFFB\u2640\uFE0F":"1f64b-1f3fb-2640","\uD83D\uDE4B\uD83C\uDFFB\u2642\uFE0F":"1f64b-1f3fb-2642","\uD83D\uDE4B\uD83C\uDFFC\u2640\uFE0F":"1f64b-1f3fc-2640","\uD83D\uDE4B\uD83C\uDFFC\u2642\uFE0F":"1f64b-1f3fc-2642","\uD83D\uDE4B\uD83C\uDFFD\u2640\uFE0F":"1f64b-1f3fd-2640","\uD83D\uDE4B\uD83C\uDFFD\u2642\uFE0F":"1f64b-1f3fd-2642","\uD83D\uDE4B\uD83C\uDFFE\u2640\uFE0F":"1f64b-1f3fe-2640","\uD83D\uDE4B\uD83C\uDFFE\u2642\uFE0F":"1f64b-1f3fe-2642","\uD83D\uDE4B\uD83C\uDFFF\u2640\uFE0F":"1f64b-1f3ff-2640","\uD83D\uDE4B\uD83C\uDFFF\u2642\uFE0F":"1f64b-1f3ff-2642","\uD83D\uDE4D\uD83C\uDFFB\u2640\uFE0F":"1f64d-1f3fb-2640","\uD83D\uDE4D\uD83C\uDFFB\u2642\uFE0F":"1f64d-1f3fb-2642","\uD83D\uDE4D\uD83C\uDFFC\u2640\uFE0F":"1f64d-1f3fc-2640","\uD83D\uDE4D\uD83C\uDFFC\u2642\uFE0F":"1f64d-1f3fc-2642","\uD83D\uDE4D\uD83C\uDFFD\u2640\uFE0F":"1f64d-1f3fd-2640","\uD83D\uDE4D\uD83C\uDFFD\u2642\uFE0F":"1f64d-1f3fd-2642","\uD83D\uDE4D\uD83C\uDFFE\u2640\uFE0F":"1f64d-1f3fe-2640","\uD83D\uDE4D\uD83C\uDFFE\u2642\uFE0F":"1f64d-1f3fe-2642","\uD83D\uDE4D\uD83C\uDFFF\u2640\uFE0F":"1f64d-1f3ff-2640","\uD83D\uDE4D\uD83C\uDFFF\u2642\uFE0F":"1f64d-1f3ff-2642","\uD83D\uDE4E\uD83C\uDFFB\u2640\uFE0F":"1f64e-1f3fb-2640","\uD83D\uDE4E\uD83C\uDFFB\u2642\uFE0F":"1f64e-1f3fb-2642","\uD83D\uDE4E\uD83C\uDFFC\u2640\uFE0F":"1f64e-1f3fc-2640","\uD83D\uDE4E\uD83C\uDFFC\u2642\uFE0F":"1f64e-1f3fc-2642","\uD83D\uDE4E\uD83C\uDFFD\u2640\uFE0F":"1f64e-1f3fd-2640","\uD83D\uDE4E\uD83C\uDFFD\u2642\uFE0F":"1f64e-1f3fd-2642","\uD83D\uDE4E\uD83C\uDFFE\u2640\uFE0F":"1f64e-1f3fe-2640","\uD83D\uDE4E\uD83C\uDFFE\u2642\uFE0F":"1f64e-1f3fe-2642","\uD83D\uDE4E\uD83C\uDFFF\u2640\uFE0F":"1f64e-1f3ff-2640","\uD83D\uDE4E\uD83C\uDFFF\u2642\uFE0F":"1f64e-1f3ff-2642","\uD83E\uDD26\uD83C\uDFFB\u2640\uFE0F":"1f926-1f3fb-2640","\uD83E\uDD26\uD83C\uDFFB\u2642\uFE0F":"1f926-1f3fb-2642","\uD83E\uDD26\uD83C\uDFFC\u2640\uFE0F":"1f926-1f3fc-2640","\uD83E\uDD26\uD83C\uDFFC\u2642\uFE0F":"1f926-1f3fc-2642","\uD83E\uDD26\uD83C\uDFFD\u2640\uFE0F":"1f926-1f3fd-2640","\uD83E\uDD26\uD83C\uDFFD\u2642\uFE0F":"1f926-1f3fd-2642","\uD83E\uDD26\uD83C\uDFFE\u2640\uFE0F":"1f926-1f3fe-2640","\uD83E\uDD26\uD83C\uDFFE\u2642\uFE0F":"1f926-1f3fe-2642","\uD83E\uDD26\uD83C\uDFFF\u2640\uFE0F":"1f926-1f3ff-2640","\uD83E\uDD26\uD83C\uDFFF\u2642\uFE0F":"1f926-1f3ff-2642","\uD83E\uDD37\uD83C\uDFFB\u2640\uFE0F":"1f937-1f3fb-2640","\uD83E\uDD37\uD83C\uDFFB\u2642\uFE0F":"1f937-1f3fb-2642","\uD83E\uDD37\uD83C\uDFFC\u2640\uFE0F":"1f937-1f3fc-2640","\uD83E\uDD37\uD83C\uDFFC\u2642\uFE0F":"1f937-1f3fc-2642","\uD83E\uDD37\uD83C\uDFFD\u2640\uFE0F":"1f937-1f3fd-2640","\uD83E\uDD37\uD83C\uDFFD\u2642\uFE0F":"1f937-1f3fd-2642","\uD83E\uDD37\uD83C\uDFFE\u2640\uFE0F":"1f937-1f3fe-2640","\uD83E\uDD37\uD83C\uDFFE\u2642\uFE0F":"1f937-1f3fe-2642","\uD83E\uDD37\uD83C\uDFFF\u2640\uFE0F":"1f937-1f3ff-2640","\uD83E\uDD37\uD83C\uDFFF\u2642\uFE0F":"1f937-1f3ff-2642","\uD83D\uDC41\uFE0F\uD83D\uDDE8\uFE0F":"1f441-1f5e8","\uD83E\uDDD9\uD83C\uDFFB\u200D\u2640":"1f9d9-1f3fb-2640","\uD83E\uDDD9\uD83C\uDFFB\u2640\uFE0F":"1f9d9-1f3fb-2640","\uD83E\uDDD9\uD83C\uDFFB\u200D\u2642":"1f9d9-1f3fb-2642","\uD83E\uDDD9\uD83C\uDFFB\u2642\uFE0F":"1f9d9-1f3fb-2642","\uD83E\uDDD9\uD83C\uDFFC\u200D\u2640":"1f9d9-1f3fc-2640","\uD83E\uDDD9\uD83C\uDFFC\u2640\uFE0F":"1f9d9-1f3fc-2640","\uD83E\uDDD9\uD83C\uDFFC\u200D\u2642":"1f9d9-1f3fc-2642","\uD83E\uDDD9\uD83C\uDFFC\u2642\uFE0F":"1f9d9-1f3fc-2642","\uD83E\uDDD9\uD83C\uDFFD\u200D\u2640":"1f9d9-1f3fd-2640","\uD83E\uDDD9\uD83C\uDFFD\u2640\uFE0F":"1f9d9-1f3fd-2640","\uD83E\uDDD9\uD83C\uDFFD\u200D\u2642":"1f9d9-1f3fd-2642","\uD83E\uDDD9\uD83C\uDFFD\u2642\uFE0F":"1f9d9-1f3fd-2642","\uD83E\uDDD9\uD83C\uDFFE\u200D\u2640":"1f9d9-1f3fe-2640","\uD83E\uDDD9\uD83C\uDFFE\u2640\uFE0F":"1f9d9-1f3fe-2640","\uD83E\uDDD9\uD83C\uDFFE\u200D\u2642":"1f9d9-1f3fe-2642","\uD83E\uDDD9\uD83C\uDFFE\u2642\uFE0F":"1f9d9-1f3fe-2642","\uD83E\uDDD9\uD83C\uDFFF\u200D\u2640":"1f9d9-1f3ff-2640","\uD83E\uDDD9\uD83C\uDFFF\u2640\uFE0F":"1f9d9-1f3ff-2640","\uD83E\uDDD9\uD83C\uDFFF\u200D\u2642":"1f9d9-1f3ff-2642","\uD83E\uDDD9\uD83C\uDFFF\u2642\uFE0F":"1f9d9-1f3ff-2642","\uD83E\uDDDA\uD83C\uDFFB\u200D\u2640":"1f9da-1f3fb-2640","\uD83E\uDDDA\uD83C\uDFFB\u2640\uFE0F":"1f9da-1f3fb-2640","\uD83E\uDDDA\uD83C\uDFFB\u200D\u2642":"1f9da-1f3fb-2642","\uD83E\uDDDA\uD83C\uDFFB\u2642\uFE0F":"1f9da-1f3fb-2642","\uD83E\uDDDA\uD83C\uDFFC\u200D\u2640":"1f9da-1f3fc-2640","\uD83E\uDDDA\uD83C\uDFFC\u2640\uFE0F":"1f9da-1f3fc-2640","\uD83E\uDDDA\uD83C\uDFFC\u200D\u2642":"1f9da-1f3fc-2642","\uD83E\uDDDA\uD83C\uDFFC\u2642\uFE0F":"1f9da-1f3fc-2642","\uD83E\uDDDA\uD83C\uDFFD\u200D\u2640":"1f9da-1f3fd-2640","\uD83E\uDDDA\uD83C\uDFFD\u2640\uFE0F":"1f9da-1f3fd-2640","\uD83E\uDDDA\uD83C\uDFFD\u200D\u2642":"1f9da-1f3fd-2642","\uD83E\uDDDA\uD83C\uDFFD\u2642\uFE0F":"1f9da-1f3fd-2642","\uD83E\uDDDA\uD83C\uDFFE\u200D\u2640":"1f9da-1f3fe-2640","\uD83E\uDDDA\uD83C\uDFFE\u2640\uFE0F":"1f9da-1f3fe-2640","\uD83E\uDDDA\uD83C\uDFFE\u200D\u2642":"1f9da-1f3fe-2642","\uD83E\uDDDA\uD83C\uDFFE\u2642\uFE0F":"1f9da-1f3fe-2642","\uD83E\uDDDA\uD83C\uDFFF\u200D\u2640":"1f9da-1f3ff-2640","\uD83E\uDDDA\uD83C\uDFFF\u2640\uFE0F":"1f9da-1f3ff-2640","\uD83E\uDDDA\uD83C\uDFFF\u200D\u2642":"1f9da-1f3ff-2642","\uD83E\uDDDA\uD83C\uDFFF\u2642\uFE0F":"1f9da-1f3ff-2642","\uD83E\uDDDB\uD83C\uDFFB\u200D\u2640":"1f9db-1f3fb-2640","\uD83E\uDDDB\uD83C\uDFFB\u2640\uFE0F":"1f9db-1f3fb-2640","\uD83E\uDDDB\uD83C\uDFFB\u200D\u2642":"1f9db-1f3fb-2642","\uD83E\uDDDB\uD83C\uDFFB\u2642\uFE0F":"1f9db-1f3fb-2642","\uD83E\uDDDB\uD83C\uDFFC\u200D\u2640":"1f9db-1f3fc-2640","\uD83E\uDDDB\uD83C\uDFFC\u2640\uFE0F":"1f9db-1f3fc-2640","\uD83E\uDDDB\uD83C\uDFFC\u200D\u2642":"1f9db-1f3fc-2642","\uD83E\uDDDB\uD83C\uDFFC\u2642\uFE0F":"1f9db-1f3fc-2642","\uD83E\uDDDB\uD83C\uDFFD\u200D\u2640":"1f9db-1f3fd-2640","\uD83E\uDDDB\uD83C\uDFFD\u2640\uFE0F":"1f9db-1f3fd-2640","\uD83E\uDDDB\uD83C\uDFFD\u200D\u2642":"1f9db-1f3fd-2642","\uD83E\uDDDB\uD83C\uDFFD\u2642\uFE0F":"1f9db-1f3fd-2642","\uD83E\uDDDB\uD83C\uDFFE\u200D\u2640":"1f9db-1f3fe-2640","\uD83E\uDDDB\uD83C\uDFFE\u2640\uFE0F":"1f9db-1f3fe-2640","\uD83E\uDDDB\uD83C\uDFFE\u200D\u2642":"1f9db-1f3fe-2642","\uD83E\uDDDB\uD83C\uDFFE\u2642\uFE0F":"1f9db-1f3fe-2642","\uD83E\uDDDB\uD83C\uDFFF\u200D\u2640":"1f9db-1f3ff-2640","\uD83E\uDDDB\uD83C\uDFFF\u2640\uFE0F":"1f9db-1f3ff-2640","\uD83E\uDDDB\uD83C\uDFFF\u200D\u2642":"1f9db-1f3ff-2642","\uD83E\uDDDB\uD83C\uDFFF\u2642\uFE0F":"1f9db-1f3ff-2642","\uD83E\uDDDC\uD83C\uDFFB\u200D\u2640":"1f9dc-1f3fb-2640","\uD83E\uDDDC\uD83C\uDFFB\u2640\uFE0F":"1f9dc-1f3fb-2640","\uD83E\uDDDC\uD83C\uDFFB\u200D\u2642":"1f9dc-1f3fb-2642","\uD83E\uDDDC\uD83C\uDFFB\u2642\uFE0F":"1f9dc-1f3fb-2642","\uD83E\uDDDC\uD83C\uDFFC\u200D\u2640":"1f9dc-1f3fc-2640","\uD83E\uDDDC\uD83C\uDFFC\u2640\uFE0F":"1f9dc-1f3fc-2640","\uD83E\uDDDC\uD83C\uDFFC\u200D\u2642":"1f9dc-1f3fc-2642","\uD83E\uDDDC\uD83C\uDFFC\u2642\uFE0F":"1f9dc-1f3fc-2642","\uD83E\uDDDC\uD83C\uDFFD\u200D\u2640":"1f9dc-1f3fd-2640","\uD83E\uDDDC\uD83C\uDFFD\u2640\uFE0F":"1f9dc-1f3fd-2640","\uD83E\uDDDC\uD83C\uDFFD\u200D\u2642":"1f9dc-1f3fd-2642","\uD83E\uDDDC\uD83C\uDFFD\u2642\uFE0F":"1f9dc-1f3fd-2642","\uD83E\uDDDC\uD83C\uDFFE\u200D\u2640":"1f9dc-1f3fe-2640","\uD83E\uDDDC\uD83C\uDFFE\u2640\uFE0F":"1f9dc-1f3fe-2640","\uD83E\uDDDC\uD83C\uDFFE\u200D\u2642":"1f9dc-1f3fe-2642","\uD83E\uDDDC\uD83C\uDFFE\u2642\uFE0F":"1f9dc-1f3fe-2642","\uD83E\uDDDC\uD83C\uDFFF\u200D\u2640":"1f9dc-1f3ff-2640","\uD83E\uDDDC\uD83C\uDFFF\u2640\uFE0F":"1f9dc-1f3ff-2640","\uD83E\uDDDC\uD83C\uDFFF\u200D\u2642":"1f9dc-1f3ff-2642","\uD83E\uDDDC\uD83C\uDFFF\u2642\uFE0F":"1f9dc-1f3ff-2642","\uD83E\uDDDD\uD83C\uDFFB\u200D\u2640":"1f9dd-1f3fb-2640","\uD83E\uDDDD\uD83C\uDFFB\u2640\uFE0F":"1f9dd-1f3fb-2640","\uD83E\uDDDD\uD83C\uDFFB\u200D\u2642":"1f9dd-1f3fb-2642","\uD83E\uDDDD\uD83C\uDFFB\u2642\uFE0F":"1f9dd-1f3fb-2642","\uD83E\uDDDD\uD83C\uDFFC\u200D\u2640":"1f9dd-1f3fc-2640","\uD83E\uDDDD\uD83C\uDFFC\u2640\uFE0F":"1f9dd-1f3fc-2640","\uD83E\uDDDD\uD83C\uDFFC\u200D\u2642":"1f9dd-1f3fc-2642","\uD83E\uDDDD\uD83C\uDFFC\u2642\uFE0F":"1f9dd-1f3fc-2642","\uD83E\uDDDD\uD83C\uDFFD\u200D\u2640":"1f9dd-1f3fd-2640","\uD83E\uDDDD\uD83C\uDFFD\u2640\uFE0F":"1f9dd-1f3fd-2640","\uD83E\uDDDD\uD83C\uDFFD\u200D\u2642":"1f9dd-1f3fd-2642","\uD83E\uDDDD\uD83C\uDFFD\u2642\uFE0F":"1f9dd-1f3fd-2642","\uD83E\uDDDD\uD83C\uDFFE\u200D\u2640":"1f9dd-1f3fe-2640","\uD83E\uDDDD\uD83C\uDFFE\u2640\uFE0F":"1f9dd-1f3fe-2640","\uD83E\uDDDD\uD83C\uDFFE\u200D\u2642":"1f9dd-1f3fe-2642","\uD83E\uDDDD\uD83C\uDFFE\u2642\uFE0F":"1f9dd-1f3fe-2642","\uD83E\uDDDD\uD83C\uDFFF\u200D\u2640":"1f9dd-1f3ff-2640","\uD83E\uDDDD\uD83C\uDFFF\u2640\uFE0F":"1f9dd-1f3ff-2640","\uD83E\uDDDD\uD83C\uDFFF\u200D\u2642":"1f9dd-1f3ff-2642","\uD83E\uDDDD\uD83C\uDFFF\u2642\uFE0F":"1f9dd-1f3ff-2642","\uD83E\uDDD6\uD83C\uDFFB\u200D\u2640":"1f9d6-1f3fb-2640","\uD83E\uDDD6\uD83C\uDFFB\u2640\uFE0F":"1f9d6-1f3fb-2640","\uD83E\uDDD6\uD83C\uDFFB\u200D\u2642":"1f9d6-1f3fb-2642","\uD83E\uDDD6\uD83C\uDFFB\u2642\uFE0F":"1f9d6-1f3fb-2642","\uD83E\uDDD6\uD83C\uDFFC\u200D\u2640":"1f9d6-1f3fc-2640","\uD83E\uDDD6\uD83C\uDFFC\u2640\uFE0F":"1f9d6-1f3fc-2640","\uD83E\uDDD6\uD83C\uDFFC\u200D\u2642":"1f9d6-1f3fc-2642","\uD83E\uDDD6\uD83C\uDFFC\u2642\uFE0F":"1f9d6-1f3fc-2642","\uD83E\uDDD6\uD83C\uDFFD\u200D\u2640":"1f9d6-1f3fd-2640","\uD83E\uDDD6\uD83C\uDFFD\u2640\uFE0F":"1f9d6-1f3fd-2640","\uD83E\uDDD6\uD83C\uDFFD\u200D\u2642":"1f9d6-1f3fd-2642","\uD83E\uDDD6\uD83C\uDFFD\u2642\uFE0F":"1f9d6-1f3fd-2642","\uD83E\uDDD6\uD83C\uDFFE\u200D\u2640":"1f9d6-1f3fe-2640","\uD83E\uDDD6\uD83C\uDFFE\u2640\uFE0F":"1f9d6-1f3fe-2640","\uD83E\uDDD6\uD83C\uDFFE\u200D\u2642":"1f9d6-1f3fe-2642","\uD83E\uDDD6\uD83C\uDFFE\u2642\uFE0F":"1f9d6-1f3fe-2642","\uD83E\uDDD6\uD83C\uDFFF\u200D\u2640":"1f9d6-1f3ff-2640","\uD83E\uDDD6\uD83C\uDFFF\u2640\uFE0F":"1f9d6-1f3ff-2640","\uD83E\uDDD6\uD83C\uDFFF\u200D\u2642":"1f9d6-1f3ff-2642","\uD83E\uDDD6\uD83C\uDFFF\u2642\uFE0F":"1f9d6-1f3ff-2642","\uD83E\uDDD7\uD83C\uDFFB\u200D\u2640":"1f9d7-1f3fb-2640","\uD83E\uDDD7\uD83C\uDFFB\u2640\uFE0F":"1f9d7-1f3fb-2640","\uD83E\uDDD7\uD83C\uDFFB\u200D\u2642":"1f9d7-1f3fb-2642","\uD83E\uDDD7\uD83C\uDFFB\u2642\uFE0F":"1f9d7-1f3fb-2642","\uD83E\uDDD7\uD83C\uDFFC\u200D\u2640":"1f9d7-1f3fc-2640","\uD83E\uDDD7\uD83C\uDFFC\u2640\uFE0F":"1f9d7-1f3fc-2640","\uD83E\uDDD7\uD83C\uDFFC\u200D\u2642":"1f9d7-1f3fc-2642","\uD83E\uDDD7\uD83C\uDFFC\u2642\uFE0F":"1f9d7-1f3fc-2642","\uD83E\uDDD7\uD83C\uDFFD\u200D\u2640":"1f9d7-1f3fd-2640","\uD83E\uDDD7\uD83C\uDFFD\u2640\uFE0F":"1f9d7-1f3fd-2640","\uD83E\uDDD7\uD83C\uDFFD\u200D\u2642":"1f9d7-1f3fd-2642","\uD83E\uDDD7\uD83C\uDFFD\u2642\uFE0F":"1f9d7-1f3fd-2642","\uD83E\uDDD7\uD83C\uDFFE\u200D\u2640":"1f9d7-1f3fe-2640","\uD83E\uDDD7\uD83C\uDFFE\u2640\uFE0F":"1f9d7-1f3fe-2640","\uD83E\uDDD7\uD83C\uDFFE\u200D\u2642":"1f9d7-1f3fe-2642","\uD83E\uDDD7\uD83C\uDFFE\u2642\uFE0F":"1f9d7-1f3fe-2642","\uD83E\uDDD7\uD83C\uDFFF\u200D\u2640":"1f9d7-1f3ff-2640","\uD83E\uDDD7\uD83C\uDFFF\u2640\uFE0F":"1f9d7-1f3ff-2640","\uD83E\uDDD7\uD83C\uDFFF\u200D\u2642":"1f9d7-1f3ff-2642","\uD83E\uDDD7\uD83C\uDFFF\u2642\uFE0F":"1f9d7-1f3ff-2642","\uD83E\uDDD8\uD83C\uDFFB\u200D\u2640":"1f9d8-1f3fb-2640","\uD83E\uDDD8\uD83C\uDFFB\u2640\uFE0F":"1f9d8-1f3fb-2640","\uD83E\uDDD8\uD83C\uDFFB\u200D\u2642":"1f9d8-1f3fb-2642","\uD83E\uDDD8\uD83C\uDFFB\u2642\uFE0F":"1f9d8-1f3fb-2642","\uD83E\uDDD8\uD83C\uDFFC\u200D\u2640":"1f9d8-1f3fc-2640","\uD83E\uDDD8\uD83C\uDFFC\u2640\uFE0F":"1f9d8-1f3fc-2640","\uD83E\uDDD8\uD83C\uDFFC\u200D\u2642":"1f9d8-1f3fc-2642","\uD83E\uDDD8\uD83C\uDFFC\u2642\uFE0F":"1f9d8-1f3fc-2642","\uD83E\uDDD8\uD83C\uDFFD\u200D\u2640":"1f9d8-1f3fd-2640","\uD83E\uDDD8\uD83C\uDFFD\u2640\uFE0F":"1f9d8-1f3fd-2640","\uD83E\uDDD8\uD83C\uDFFD\u200D\u2642":"1f9d8-1f3fd-2642","\uD83E\uDDD8\uD83C\uDFFD\u2642\uFE0F":"1f9d8-1f3fd-2642","\uD83E\uDDD8\uD83C\uDFFE\u200D\u2640":"1f9d8-1f3fe-2640","\uD83E\uDDD8\uD83C\uDFFE\u2640\uFE0F":"1f9d8-1f3fe-2640","\uD83E\uDDD8\uD83C\uDFFE\u200D\u2642":"1f9d8-1f3fe-2642","\uD83E\uDDD8\uD83C\uDFFE\u2642\uFE0F":"1f9d8-1f3fe-2642","\uD83E\uDDD8\uD83C\uDFFF\u200D\u2640":"1f9d8-1f3ff-2640","\uD83E\uDDD8\uD83C\uDFFF\u2640\uFE0F":"1f9d8-1f3ff-2640","\uD83E\uDDD8\uD83C\uDFFF\u200D\u2642":"1f9d8-1f3ff-2642","\uD83E\uDDD8\uD83C\uDFFF\u2642\uFE0F":"1f9d8-1f3ff-2642","\u26F9\uD83C\uDFFF\u200D\u2642":"26f9-1f3ff-2642","\u26F9\uD83C\uDFFE\u200D\u2642":"26f9-1f3fe-2642","\u26F9\uD83C\uDFFD\u200D\u2642":"26f9-1f3fd-2642","\u26F9\uD83C\uDFFC\u200D\u2642":"26f9-1f3fc-2642","\u26F9\uD83C\uDFFB\u200D\u2642":"26f9-1f3fb-2642","\u26F9\uD83C\uDFFF\u200D\u2640":"26f9-1f3ff-2640","\u26F9\uD83C\uDFFE\u200D\u2640":"26f9-1f3fe-2640","\u26F9\uD83C\uDFFD\u200D\u2640":"26f9-1f3fd-2640","\u26F9\uD83C\uDFFC\u200D\u2640":"26f9-1f3fc-2640","\u26F9\uD83C\uDFFB\u200D\u2640":"26f9-1f3fb-2640","\uD83D\uDC68\u200D\u2695\uFE0F":"1f468-2695","\uD83D\uDC68\u200D\u2696\uFE0F":"1f468-2696","\uD83D\uDC68\u200D\u2708\uFE0F":"1f468-2708","\uD83D\uDC69\u200D\u2695\uFE0F":"1f469-2695","\uD83D\uDC69\u200D\u2696\uFE0F":"1f469-2696","\uD83D\uDC69\u200D\u2708\uFE0F":"1f469-2708","\uD83D\uDC6E\u200D\u2640\uFE0F":"1f46e-2640","\uD83D\uDC6E\u200D\u2642\uFE0F":"1f46e-2642","\uD83D\uDC71\u200D\u2640\uFE0F":"1f471-2640","\uD83D\uDC71\u200D\u2642\uFE0F":"1f471-2642","\uD83D\uDC73\u200D\u2640\uFE0F":"1f473-2640","\uD83D\uDC73\u200D\u2642\uFE0F":"1f473-2642","\uD83D\uDC77\u200D\u2640\uFE0F":"1f477-2640","\uD83D\uDC77\u200D\u2642\uFE0F":"1f477-2642","\uD83D\uDC82\u200D\u2640\uFE0F":"1f482-2640","\uD83D\uDC82\u200D\u2642\uFE0F":"1f482-2642","\uD83D\uDD75\uFE0F\u2640\uFE0F":"1f575-2640","\uD83D\uDD75\uFE0F\u2642\uFE0F":"1f575-2642","\uD83C\uDFC3\u200D\u2640\uFE0F":"1f3c3-2640","\uD83C\uDFC3\u200D\u2642\uFE0F":"1f3c3-2642","\uD83C\uDFC4\u200D\u2640\uFE0F":"1f3c4-2640","\uD83C\uDFC4\u200D\u2642\uFE0F":"1f3c4-2642","\uD83C\uDFCA\u200D\u2640\uFE0F":"1f3ca-2640","\uD83C\uDFCA\u200D\u2642\uFE0F":"1f3ca-2642","\uD83C\uDFCB\uFE0F\u2640\uFE0F":"1f3cb-2640","\uD83C\uDFCB\uFE0F\u2642\uFE0F":"1f3cb-2642","\uD83C\uDFCC\uFE0F\u2640\uFE0F":"1f3cc-2640","\uD83C\uDFCC\uFE0F\u2642\uFE0F":"1f3cc-2642","\uD83D\uDC6F\u200D\u2640\uFE0F":"1f46f-2640","\uD83D\uDC6F\u200D\u2642\uFE0F":"1f46f-2642","\uD83D\uDC86\u200D\u2640\uFE0F":"1f486-2640","\uD83D\uDC86\u200D\u2642\uFE0F":"1f486-2642","\uD83D\uDC87\u200D\u2640\uFE0F":"1f487-2640","\uD83D\uDC87\u200D\u2642\uFE0F":"1f487-2642","\uD83D\uDEA3\u200D\u2640\uFE0F":"1f6a3-2640","\uD83D\uDEA3\u200D\u2642\uFE0F":"1f6a3-2642","\uD83D\uDEB4\u200D\u2640\uFE0F":"1f6b4-2640","\uD83D\uDEB4\u200D\u2642\uFE0F":"1f6b4-2642","\uD83D\uDEB5\u200D\u2640\uFE0F":"1f6b5-2640","\uD83D\uDEB5\u200D\u2642\uFE0F":"1f6b5-2642","\uD83D\uDEB6\u200D\u2640\uFE0F":"1f6b6-2640","\uD83D\uDEB6\u200D\u2642\uFE0F":"1f6b6-2642","\uD83E\uDD38\u200D\u2640\uFE0F":"1f938-2640","\uD83E\uDD38\u200D\u2642\uFE0F":"1f938-2642","\uD83E\uDD39\u200D\u2640\uFE0F":"1f939-2640","\uD83E\uDD39\u200D\u2642\uFE0F":"1f939-2642","\uD83E\uDD3C\u200D\u2640\uFE0F":"1f93c-2640","\uD83E\uDD3C\u200D\u2642\uFE0F":"1f93c-2642","\uD83E\uDD3D\u200D\u2640\uFE0F":"1f93d-2640","\uD83E\uDD3D\u200D\u2642\uFE0F":"1f93d-2642","\uD83E\uDD3E\u200D\u2640\uFE0F":"1f93e-2640","\uD83E\uDD3E\u200D\u2642\uFE0F":"1f93e-2642","\uD83D\uDC81\u200D\u2640\uFE0F":"1f481-2640","\uD83D\uDC81\u200D\u2642\uFE0F":"1f481-2642","\uD83D\uDE45\u200D\u2640\uFE0F":"1f645-2640","\uD83D\uDE45\u200D\u2642\uFE0F":"1f645-2642","\uD83D\uDE46\u200D\u2640\uFE0F":"1f646-2640","\uD83D\uDE46\u200D\u2642\uFE0F":"1f646-2642","\uD83D\uDE47\u200D\u2640\uFE0F":"1f647-2640","\uD83D\uDE47\u200D\u2642\uFE0F":"1f647-2642","\uD83D\uDE4B\u200D\u2640\uFE0F":"1f64b-2640","\uD83D\uDE4B\u200D\u2642\uFE0F":"1f64b-2642","\uD83D\uDE4D\u200D\u2640\uFE0F":"1f64d-2640","\uD83D\uDE4D\u200D\u2642\uFE0F":"1f64d-2642","\uD83D\uDE4E\u200D\u2640\uFE0F":"1f64e-2640","\uD83D\uDE4E\u200D\u2642\uFE0F":"1f64e-2642","\uD83E\uDD26\u200D\u2640\uFE0F":"1f926-2640","\uD83E\uDD26\u200D\u2642\uFE0F":"1f926-2642","\uD83E\uDD37\u200D\u2640\uFE0F":"1f937-2640","\uD83E\uDD37\u200D\u2642\uFE0F":"1f937-2642","\uD83E\uDDD9\u200D\u2640\uFE0F":"1f9d9-2640","\uD83E\uDDD9\u200D\u2642\uFE0F":"1f9d9-2642","\uD83E\uDDDA\u200D\u2640\uFE0F":"1f9da-2640","\uD83E\uDDDA\u200D\u2642\uFE0F":"1f9da-2642","\uD83E\uDDDB\u200D\u2640\uFE0F":"1f9db-2640","\uD83E\uDDDB\u200D\u2642\uFE0F":"1f9db-2642","\uD83E\uDDDC\u200D\u2640\uFE0F":"1f9dc-2640","\uD83E\uDDDC\u200D\u2642\uFE0F":"1f9dc-2642","\uD83E\uDDDD\u200D\u2640\uFE0F":"1f9dd-2640","\uD83E\uDDDD\u200D\u2642\uFE0F":"1f9dd-2642","\uD83E\uDDDE\u200D\u2640\uFE0F":"1f9de-2640","\uD83E\uDDDE\u200D\u2642\uFE0F":"1f9de-2642","\uD83E\uDDDF\u200D\u2640\uFE0F":"1f9df-2640","\uD83E\uDDDF\u200D\u2642\uFE0F":"1f9df-2642","\uD83E\uDDD6\u200D\u2640\uFE0F":"1f9d6-2640","\uD83E\uDDD6\u200D\u2642\uFE0F":"1f9d6-2642","\uD83E\uDDD7\u200D\u2640\uFE0F":"1f9d7-2640","\uD83E\uDDD7\u200D\u2642\uFE0F":"1f9d7-2642","\uD83E\uDDD8\u200D\u2640\uFE0F":"1f9d8-2640","\uD83E\uDDD8\u200D\u2642\uFE0F":"1f9d8-2642","\u26F9\uFE0F\u2640\uFE0F":"26f9-2640","\u26F9\uFE0F\u2642\uFE0F":"26f9-2642","\uD83D\uDC68\uD83D\uDC68\uD83D\uDC66":"1f468-1f468-1f466","\uD83D\uDC68\uD83D\uDC68\uD83D\uDC67":"1f468-1f468-1f467","\uD83D\uDC68\uD83D\uDC69\uD83D\uDC67":"1f468-1f469-1f467","\uD83D\uDC69\uD83D\uDC69\uD83D\uDC66":"1f469-1f469-1f466","\uD83D\uDC69\uD83D\uDC69\uD83D\uDC67":"1f469-1f469-1f467","\uD83D\uDC68\uD83D\uDC66\uD83D\uDC66":"1f468-1f466-1f466","\uD83D\uDC68\uD83D\uDC67\uD83D\uDC66":"1f468-1f467-1f466","\uD83D\uDC69\uD83D\uDC66\uD83D\uDC66":"1f469-1f466-1f466","\uD83D\uDC69\uD83D\uDC67\uD83D\uDC66":"1f469-1f467-1f466","\uD83D\uDC69\uD83D\uDC67\uD83D\uDC67":"1f469-1f467-1f467","\uD83D\uDC68\uD83C\uDFFB\uD83C\uDFA8":"1f468-1f3fb-1f3a8","\uD83D\uDC68\uD83C\uDFFC\uD83C\uDFA8":"1f468-1f3fc-1f3a8","\uD83D\uDC68\uD83C\uDFFD\uD83C\uDFA8":"1f468-1f3fd-1f3a8","\uD83D\uDC68\uD83C\uDFFE\uD83C\uDFA8":"1f468-1f3fe-1f3a8","\uD83D\uDC68\uD83C\uDFFF\uD83C\uDFA8":"1f468-1f3ff-1f3a8","\uD83D\uDC69\uD83C\uDFFB\uD83C\uDFA8":"1f469-1f3fb-1f3a8","\uD83D\uDC69\uD83C\uDFFC\uD83C\uDFA8":"1f469-1f3fc-1f3a8","\uD83D\uDC69\uD83C\uDFFD\uD83C\uDFA8":"1f469-1f3fd-1f3a8","\uD83D\uDC69\uD83C\uDFFE\uD83C\uDFA8":"1f469-1f3fe-1f3a8","\uD83D\uDC69\uD83C\uDFFF\uD83C\uDFA8":"1f469-1f3ff-1f3a8","\uD83D\uDC68\uD83C\uDFFB\uD83D\uDE80":"1f468-1f3fb-1f680","\uD83D\uDC68\uD83C\uDFFC\uD83D\uDE80":"1f468-1f3fc-1f680","\uD83D\uDC68\uD83C\uDFFD\uD83D\uDE80":"1f468-1f3fd-1f680","\uD83D\uDC68\uD83C\uDFFE\uD83D\uDE80":"1f468-1f3fe-1f680","\uD83D\uDC68\uD83C\uDFFF\uD83D\uDE80":"1f468-1f3ff-1f680","\uD83D\uDC69\uD83C\uDFFB\uD83D\uDE80":"1f469-1f3fb-1f680","\uD83D\uDC69\uD83C\uDFFC\uD83D\uDE80":"1f469-1f3fc-1f680","\uD83D\uDC69\uD83C\uDFFD\uD83D\uDE80":"1f469-1f3fd-1f680","\uD83D\uDC69\uD83C\uDFFE\uD83D\uDE80":"1f469-1f3fe-1f680","\uD83D\uDC69\uD83C\uDFFF\uD83D\uDE80":"1f469-1f3ff-1f680","\uD83D\uDC68\uD83C\uDFFB\uD83D\uDE92":"1f468-1f3fb-1f692","\uD83D\uDC68\uD83C\uDFFC\uD83D\uDE92":"1f468-1f3fc-1f692","\uD83D\uDC68\uD83C\uDFFD\uD83D\uDE92":"1f468-1f3fd-1f692","\uD83D\uDC68\uD83C\uDFFE\uD83D\uDE92":"1f468-1f3fe-1f692","\uD83D\uDC68\uD83C\uDFFF\uD83D\uDE92":"1f468-1f3ff-1f692","\uD83D\uDC69\uD83C\uDFFB\uD83D\uDE92":"1f469-1f3fb-1f692","\uD83D\uDC69\uD83C\uDFFC\uD83D\uDE92":"1f469-1f3fc-1f692","\uD83D\uDC69\uD83C\uDFFD\uD83D\uDE92":"1f469-1f3fd-1f692","\uD83D\uDC69\uD83C\uDFFE\uD83D\uDE92":"1f469-1f3fe-1f692","\uD83D\uDC69\uD83C\uDFFF\uD83D\uDE92":"1f469-1f3ff-1f692","\uD83D\uDC68\uD83D\uDC69\uD83D\uDC66":"1f468-1f469-1f466","\uD83D\uDC68\uD83D\uDC67\uD83D\uDC67":"1f468-1f467-1f467","\uD83D\uDC68\uD83C\uDFFB\uD83C\uDF3E":"1f468-1f3fb-1f33e","\uD83D\uDC68\uD83C\uDFFB\uD83C\uDF73":"1f468-1f3fb-1f373","\uD83D\uDC68\uD83C\uDFFB\uD83C\uDF93":"1f468-1f3fb-1f393","\uD83D\uDC68\uD83C\uDFFB\uD83C\uDFA4":"1f468-1f3fb-1f3a4","\uD83D\uDC68\uD83C\uDFFB\uD83C\uDFEB":"1f468-1f3fb-1f3eb","\uD83D\uDC68\uD83C\uDFFB\uD83C\uDFED":"1f468-1f3fb-1f3ed","\uD83D\uDC68\uD83C\uDFFB\uD83D\uDCBB":"1f468-1f3fb-1f4bb","\uD83D\uDC68\uD83C\uDFFB\uD83D\uDCBC":"1f468-1f3fb-1f4bc","\uD83D\uDC68\uD83C\uDFFB\uD83D\uDD27":"1f468-1f3fb-1f527","\uD83D\uDC68\uD83C\uDFFB\uD83D\uDD2C":"1f468-1f3fb-1f52c","\uD83D\uDC68\uD83C\uDFFC\uD83C\uDF3E":"1f468-1f3fc-1f33e","\uD83D\uDC68\uD83C\uDFFC\uD83C\uDF73":"1f468-1f3fc-1f373","\uD83D\uDC68\uD83C\uDFFC\uD83C\uDF93":"1f468-1f3fc-1f393","\uD83D\uDC68\uD83C\uDFFC\uD83C\uDFA4":"1f468-1f3fc-1f3a4","\uD83D\uDC68\uD83C\uDFFC\uD83C\uDFEB":"1f468-1f3fc-1f3eb","\uD83D\uDC68\uD83C\uDFFC\uD83C\uDFED":"1f468-1f3fc-1f3ed","\uD83D\uDC68\uD83C\uDFFC\uD83D\uDCBB":"1f468-1f3fc-1f4bb","\uD83D\uDC68\uD83C\uDFFC\uD83D\uDCBC":"1f468-1f3fc-1f4bc","\uD83D\uDC68\uD83C\uDFFC\uD83D\uDD27":"1f468-1f3fc-1f527","\uD83D\uDC68\uD83C\uDFFC\uD83D\uDD2C":"1f468-1f3fc-1f52c","\uD83D\uDC68\uD83C\uDFFD\uD83C\uDF3E":"1f468-1f3fd-1f33e","\uD83D\uDC68\uD83C\uDFFD\uD83C\uDF73":"1f468-1f3fd-1f373","\uD83D\uDC68\uD83C\uDFFD\uD83C\uDF93":"1f468-1f3fd-1f393","\uD83D\uDC68\uD83C\uDFFD\uD83C\uDFA4":"1f468-1f3fd-1f3a4","\uD83D\uDC68\uD83C\uDFFD\uD83C\uDFEB":"1f468-1f3fd-1f3eb","\uD83D\uDC68\uD83C\uDFFD\uD83C\uDFED":"1f468-1f3fd-1f3ed","\uD83D\uDC68\uD83C\uDFFD\uD83D\uDCBB":"1f468-1f3fd-1f4bb","\uD83D\uDC68\uD83C\uDFFD\uD83D\uDCBC":"1f468-1f3fd-1f4bc","\uD83D\uDC68\uD83C\uDFFD\uD83D\uDD27":"1f468-1f3fd-1f527","\uD83D\uDC68\uD83C\uDFFD\uD83D\uDD2C":"1f468-1f3fd-1f52c","\uD83D\uDC68\uD83C\uDFFE\uD83C\uDF3E":"1f468-1f3fe-1f33e","\uD83D\uDC68\uD83C\uDFFE\uD83C\uDF73":"1f468-1f3fe-1f373","\uD83D\uDC68\uD83C\uDFFE\uD83C\uDF93":"1f468-1f3fe-1f393","\uD83D\uDC68\uD83C\uDFFE\uD83C\uDFA4":"1f468-1f3fe-1f3a4","\uD83D\uDC68\uD83C\uDFFE\uD83C\uDFEB":"1f468-1f3fe-1f3eb","\uD83D\uDC68\uD83C\uDFFE\uD83C\uDFED":"1f468-1f3fe-1f3ed","\uD83D\uDC68\uD83C\uDFFE\uD83D\uDCBB":"1f468-1f3fe-1f4bb","\uD83D\uDC68\uD83C\uDFFE\uD83D\uDCBC":"1f468-1f3fe-1f4bc","\uD83D\uDC68\uD83C\uDFFE\uD83D\uDD27":"1f468-1f3fe-1f527","\uD83D\uDC68\uD83C\uDFFE\uD83D\uDD2C":"1f468-1f3fe-1f52c","\uD83D\uDC68\uD83C\uDFFF\uD83C\uDF3E":"1f468-1f3ff-1f33e","\uD83D\uDC68\uD83C\uDFFF\uD83C\uDF73":"1f468-1f3ff-1f373","\uD83D\uDC68\uD83C\uDFFF\uD83C\uDF93":"1f468-1f3ff-1f393","\uD83D\uDC68\uD83C\uDFFF\uD83C\uDFA4":"1f468-1f3ff-1f3a4","\uD83D\uDC68\uD83C\uDFFF\uD83C\uDFEB":"1f468-1f3ff-1f3eb","\uD83D\uDC68\uD83C\uDFFF\uD83C\uDFED":"1f468-1f3ff-1f3ed","\uD83D\uDC68\uD83C\uDFFF\uD83D\uDCBB":"1f468-1f3ff-1f4bb","\uD83D\uDC68\uD83C\uDFFF\uD83D\uDCBC":"1f468-1f3ff-1f4bc","\uD83D\uDC68\uD83C\uDFFF\uD83D\uDD27":"1f468-1f3ff-1f527","\uD83D\uDC68\uD83C\uDFFF\uD83D\uDD2C":"1f468-1f3ff-1f52c","\uD83D\uDC69\uD83C\uDFFB\uD83C\uDF3E":"1f469-1f3fb-1f33e","\uD83D\uDC69\uD83C\uDFFB\uD83C\uDF73":"1f469-1f3fb-1f373","\uD83D\uDC69\uD83C\uDFFB\uD83C\uDF93":"1f469-1f3fb-1f393","\uD83D\uDC69\uD83C\uDFFB\uD83C\uDFA4":"1f469-1f3fb-1f3a4","\uD83D\uDC69\uD83C\uDFFB\uD83C\uDFEB":"1f469-1f3fb-1f3eb","\uD83D\uDC69\uD83C\uDFFB\uD83C\uDFED":"1f469-1f3fb-1f3ed","\uD83D\uDC69\uD83C\uDFFB\uD83D\uDCBB":"1f469-1f3fb-1f4bb","\uD83D\uDC69\uD83C\uDFFB\uD83D\uDCBC":"1f469-1f3fb-1f4bc","\uD83D\uDC69\uD83C\uDFFB\uD83D\uDD27":"1f469-1f3fb-1f527","\uD83D\uDC69\uD83C\uDFFB\uD83D\uDD2C":"1f469-1f3fb-1f52c","\uD83D\uDC69\uD83C\uDFFC\uD83C\uDF3E":"1f469-1f3fc-1f33e","\uD83D\uDC69\uD83C\uDFFC\uD83C\uDF73":"1f469-1f3fc-1f373","\uD83D\uDC69\uD83C\uDFFC\uD83C\uDF93":"1f469-1f3fc-1f393","\uD83D\uDC69\uD83C\uDFFC\uD83C\uDFA4":"1f469-1f3fc-1f3a4","\uD83D\uDC69\uD83C\uDFFC\uD83C\uDFEB":"1f469-1f3fc-1f3eb","\uD83D\uDC69\uD83C\uDFFC\uD83C\uDFED":"1f469-1f3fc-1f3ed","\uD83D\uDC69\uD83C\uDFFC\uD83D\uDCBB":"1f469-1f3fc-1f4bb","\uD83D\uDC69\uD83C\uDFFC\uD83D\uDCBC":"1f469-1f3fc-1f4bc","\uD83D\uDC69\uD83C\uDFFC\uD83D\uDD27":"1f469-1f3fc-1f527","\uD83D\uDC69\uD83C\uDFFC\uD83D\uDD2C":"1f469-1f3fc-1f52c","\uD83D\uDC69\uD83C\uDFFD\uD83C\uDF3E":"1f469-1f3fd-1f33e","\uD83D\uDC69\uD83C\uDFFD\uD83C\uDF73":"1f469-1f3fd-1f373","\uD83D\uDC69\uD83C\uDFFD\uD83C\uDF93":"1f469-1f3fd-1f393","\uD83D\uDC69\uD83C\uDFFD\uD83C\uDFA4":"1f469-1f3fd-1f3a4","\uD83D\uDC69\uD83C\uDFFD\uD83C\uDFEB":"1f469-1f3fd-1f3eb","\uD83D\uDC69\uD83C\uDFFD\uD83C\uDFED":"1f469-1f3fd-1f3ed","\uD83D\uDC69\uD83C\uDFFD\uD83D\uDCBB":"1f469-1f3fd-1f4bb","\uD83D\uDC69\uD83C\uDFFD\uD83D\uDCBC":"1f469-1f3fd-1f4bc","\uD83D\uDC69\uD83C\uDFFD\uD83D\uDD27":"1f469-1f3fd-1f527","\uD83D\uDC69\uD83C\uDFFD\uD83D\uDD2C":"1f469-1f3fd-1f52c","\uD83D\uDC69\uD83C\uDFFE\uD83C\uDF3E":"1f469-1f3fe-1f33e","\uD83D\uDC69\uD83C\uDFFE\uD83C\uDF73":"1f469-1f3fe-1f373","\uD83D\uDC69\uD83C\uDFFE\uD83C\uDF93":"1f469-1f3fe-1f393","\uD83D\uDC69\uD83C\uDFFE\uD83C\uDFA4":"1f469-1f3fe-1f3a4","\uD83D\uDC69\uD83C\uDFFE\uD83C\uDFEB":"1f469-1f3fe-1f3eb","\uD83D\uDC69\uD83C\uDFFE\uD83C\uDFED":"1f469-1f3fe-1f3ed","\uD83D\uDC69\uD83C\uDFFE\uD83D\uDCBB":"1f469-1f3fe-1f4bb","\uD83D\uDC69\uD83C\uDFFE\uD83D\uDCBC":"1f469-1f3fe-1f4bc","\uD83D\uDC69\uD83C\uDFFE\uD83D\uDD27":"1f469-1f3fe-1f527","\uD83D\uDC69\uD83C\uDFFE\uD83D\uDD2C":"1f469-1f3fe-1f52c","\uD83D\uDC69\uD83C\uDFFF\uD83C\uDF3E":"1f469-1f3ff-1f33e","\uD83D\uDC69\uD83C\uDFFF\uD83C\uDF73":"1f469-1f3ff-1f373","\uD83D\uDC69\uD83C\uDFFF\uD83C\uDF93":"1f469-1f3ff-1f393","\uD83D\uDC69\uD83C\uDFFF\uD83C\uDFA4":"1f469-1f3ff-1f3a4","\uD83D\uDC69\uD83C\uDFFF\uD83C\uDFEB":"1f469-1f3ff-1f3eb","\uD83D\uDC69\uD83C\uDFFF\uD83C\uDFED":"1f469-1f3ff-1f3ed","\uD83D\uDC69\uD83C\uDFFF\uD83D\uDCBB":"1f469-1f3ff-1f4bb","\uD83D\uDC69\uD83C\uDFFF\uD83D\uDCBC":"1f469-1f3ff-1f4bc","\uD83D\uDC69\uD83C\uDFFF\uD83D\uDD27":"1f469-1f3ff-1f527","\uD83D\uDC69\uD83C\uDFFF\uD83D\uDD2C":"1f469-1f3ff-1f52c","\uD83D\uDC41\u200D\uD83D\uDDE8":"1f441-1f5e8","\uD83D\uDC68\u200D\uD83D\uDCBB":"1f468-1f4bb","\uD83D\uDC69\u200D\uD83D\uDCBB":"1f469-1f4bb","\uD83D\uDC68\u200D\uD83C\uDFEB":"1f468-1f3eb","\uD83D\uDC69\u200D\uD83C\uDFEB":"1f469-1f3eb","\uD83D\uDC68\u200D\uD83C\uDF93":"1f468-1f393","\uD83D\uDC69\u200D\uD83C\uDF93":"1f469-1f393","\uD83D\uDC68\u200D\uD83C\uDFA4":"1f468-1f3a4","\uD83D\uDC69\u200D\uD83C\uDFA4":"1f469-1f3a4","\uD83D\uDC68\u200D\uD83D\uDD2C":"1f468-1f52c","\uD83D\uDC69\u200D\uD83D\uDD2C":"1f469-1f52c","\uD83D\uDC68\u200D\uD83D\uDCBC":"1f468-1f4bc","\uD83D\uDC69\u200D\uD83D\uDCBC":"1f469-1f4bc","\uD83D\uDC68\u200D\uD83D\uDD27":"1f468-1f527","\uD83D\uDC69\u200D\uD83D\uDD27":"1f469-1f527","\uD83D\uDC68\u200D\uD83C\uDFED":"1f468-1f3ed","\uD83D\uDC69\u200D\uD83C\uDFED":"1f469-1f3ed","\uD83D\uDC68\u200D\uD83C\uDF73":"1f468-1f373","\uD83D\uDC69\u200D\uD83C\uDF73":"1f469-1f373","\uD83D\uDC68\u200D\uD83C\uDF3E":"1f468-1f33e","\uD83D\uDC69\u200D\uD83C\uDF3E":"1f469-1f33e","\uD83D\uDC68\u200D\uD83D\uDC66":"1f468-1f466","\uD83D\uDC68\u200D\uD83D\uDC67":"1f468-1f467","\uD83D\uDC69\u200D\uD83D\uDC66":"1f469-1f466","\uD83D\uDC69\u200D\uD83D\uDC67":"1f469-1f467","\uD83D\uDC68\u200D\uD83C\uDFA8":"1f468-1f3a8","\uD83D\uDC69\u200D\uD83C\uDFA8":"1f469-1f3a8","\uD83D\uDC68\u200D\uD83D\uDE80":"1f468-1f680","\uD83D\uDC69\u200D\uD83D\uDE80":"1f469-1f680","\uD83D\uDC68\u200D\uD83D\uDE92":"1f468-1f692","\uD83D\uDC69\u200D\uD83D\uDE92":"1f469-1f692","\uD83C\uDFCB\uFE0F\uD83C\uDFFB":"1f3cb-1f3fb","\uD83C\uDFCB\uFE0F\uD83C\uDFFC":"1f3cb-1f3fc","\uD83C\uDFCB\uFE0F\uD83C\uDFFD":"1f3cb-1f3fd","\uD83C\uDFCB\uFE0F\uD83C\uDFFE":"1f3cb-1f3fe","\uD83C\uDFCB\uFE0F\uD83C\uDFFF":"1f3cb-1f3ff","\uD83C\uDFCC\uFE0F\uD83C\uDFFB":"1f3cc-1f3fb","\uD83C\uDFCC\uFE0F\uD83C\uDFFC":"1f3cc-1f3fc","\uD83C\uDFCC\uFE0F\uD83C\uDFFD":"1f3cc-1f3fd","\uD83C\uDFCC\uFE0F\uD83C\uDFFE":"1f3cc-1f3fe","\uD83C\uDFCC\uFE0F\uD83C\uDFFF":"1f3cc-1f3ff","\uD83D\uDD74\uFE0F\uD83C\uDFFB":"1f574-1f3fb","\uD83D\uDD74\uFE0F\uD83C\uDFFC":"1f574-1f3fc","\uD83D\uDD74\uFE0F\uD83C\uDFFD":"1f574-1f3fd","\uD83D\uDD74\uFE0F\uD83C\uDFFE":"1f574-1f3fe","\uD83D\uDD74\uFE0F\uD83C\uDFFF":"1f574-1f3ff","\uD83D\uDD75\uFE0F\uD83C\uDFFB":"1f575-1f3fb","\uD83D\uDD75\uFE0F\uD83C\uDFFC":"1f575-1f3fc","\uD83D\uDD75\uFE0F\uD83C\uDFFD":"1f575-1f3fd","\uD83D\uDD75\uFE0F\uD83C\uDFFE":"1f575-1f3fe","\uD83D\uDD75\uFE0F\uD83C\uDFFF":"1f575-1f3ff","\uD83D\uDD90\uFE0F\uD83C\uDFFB":"1f590-1f3fb","\uD83D\uDD90\uFE0F\uD83C\uDFFC":"1f590-1f3fc","\uD83D\uDD90\uFE0F\uD83C\uDFFD":"1f590-1f3fd","\uD83D\uDD90\uFE0F\uD83C\uDFFE":"1f590-1f3fe","\uD83D\uDD90\uFE0F\uD83C\uDFFF":"1f590-1f3ff","\uD83C\uDFF3\u200D\uD83C\uDF08":"1f3f3-1f308","\uD83C\uDFF3\uFE0F\uD83C\uDF08":"1f3f3-1f308","\uD83D\uDC6F\u200D\u2642":"1f46f-2642","\uD83D\uDC6F\u200D\u2640":"1f46f-2640","\uD83E\uDD3C\u200D\u2642":"1f93c-2642","\uD83E\uDD3C\u200D\u2640":"1f93c-2640","\uD83E\uDD39\u200D\u2642":"1f939-2642","\uD83E\uDD39\u200D\u2640":"1f939-2640","\uD83E\uDD3E\u200D\u2642":"1f93e-2642","\uD83E\uDD3E\u200D\u2640":"1f93e-2640","\uD83E\uDD3D\u200D\u2642":"1f93d-2642","\uD83E\uDD3D\u200D\u2640":"1f93d-2640","\uD83E\uDD38\u200D\u2642":"1f938-2642","\uD83E\uDD38\u200D\u2640":"1f938-2640","\uD83D\uDEB6\u200D\u2642":"1f6b6-2642","\uD83D\uDEB6\u200D\u2640":"1f6b6-2640","\uD83D\uDEB5\u200D\u2642":"1f6b5-2642","\uD83D\uDEB5\u200D\u2640":"1f6b5-2640","\uD83D\uDEB4\u200D\u2642":"1f6b4-2642","\uD83D\uDEB4\u200D\u2640":"1f6b4-2640","\uD83D\uDEA3\u200D\u2642":"1f6a3-2642","\uD83D\uDEA3\u200D\u2640":"1f6a3-2640","\uD83C\uDFCA\u200D\u2642":"1f3ca-2642","\uD83C\uDFCA\u200D\u2640":"1f3ca-2640","\uD83C\uDFC4\u200D\u2642":"1f3c4-2642","\uD83C\uDFC4\u200D\u2640":"1f3c4-2640","\uD83C\uDFC3\u200D\u2642":"1f3c3-2642","\uD83C\uDFC3\u200D\u2640":"1f3c3-2640","\uD83E\uDD37\u200D\u2642":"1f937-2642","\uD83E\uDD37\u200D\u2640":"1f937-2640","\uD83E\uDD26\u200D\u2642":"1f926-2642","\uD83E\uDD26\u200D\u2640":"1f926-2640","\uD83D\uDE4E\u200D\u2642":"1f64e-2642","\uD83D\uDE4E\u200D\u2640":"1f64e-2640","\uD83D\uDE4D\u200D\u2642":"1f64d-2642","\uD83D\uDE4D\u200D\u2640":"1f64d-2640","\uD83D\uDE4B\u200D\u2642":"1f64b-2642","\uD83D\uDE4B\u200D\u2640":"1f64b-2640","\uD83D\uDE47\u200D\u2642":"1f647-2642","\uD83D\uDE47\u200D\u2640":"1f647-2640","\uD83D\uDE46\u200D\u2642":"1f646-2642","\uD83D\uDE46\u200D\u2640":"1f646-2640","\uD83D\uDE45\u200D\u2642":"1f645-2642","\uD83D\uDE45\u200D\u2640":"1f645-2640","\uD83D\uDC87\u200D\u2642":"1f487-2642","\uD83D\uDC87\u200D\u2640":"1f487-2640","\uD83D\uDC86\u200D\u2642":"1f486-2642","\uD83D\uDC86\u200D\u2640":"1f486-2640","\uD83D\uDC81\u200D\u2642":"1f481-2642","\uD83D\uDC81\u200D\u2640":"1f481-2640","\uD83D\uDC71\u200D\u2642":"1f471-2642","\uD83D\uDC71\u200D\u2640":"1f471-2640","\uD83D\uDC73\u200D\u2642":"1f473-2642","\uD83D\uDC73\u200D\u2640":"1f473-2640","\uD83D\uDC82\u200D\u2642":"1f482-2642","\uD83D\uDC82\u200D\u2640":"1f482-2640","\uD83D\uDC77\u200D\u2642":"1f477-2642","\uD83D\uDC77\u200D\u2640":"1f477-2640","\uD83D\uDC6E\u200D\u2642":"1f46e-2642","\uD83D\uDC6E\u200D\u2640":"1f46e-2640","\uD83D\uDC68\u200D\u2695":"1f468-2695","\uD83D\uDC69\u200D\u2695":"1f469-2695","\uD83D\uDC68\u200D\u2696":"1f468-2696","\uD83D\uDC69\u200D\u2696":"1f469-2696","\uD83D\uDC68\u200D\u2708":"1f468-2708","\uD83D\uDC69\u200D\u2708":"1f469-2708","\u261D\uFE0F\uD83C\uDFFB":"261d-1f3fb","\u261D\uFE0F\uD83C\uDFFC":"261d-1f3fc","\u261D\uFE0F\uD83C\uDFFD":"261d-1f3fd","\u261D\uFE0F\uD83C\uDFFE":"261d-1f3fe","\u261D\uFE0F\uD83C\uDFFF":"261d-1f3ff","\u26F9\uFE0F\uD83C\uDFFB":"26f9-1f3fb","\u26F9\uFE0F\uD83C\uDFFC":"26f9-1f3fc","\u26F9\uFE0F\uD83C\uDFFD":"26f9-1f3fd","\u26F9\uFE0F\uD83C\uDFFE":"26f9-1f3fe","\u26F9\uFE0F\uD83C\uDFFF":"26f9-1f3ff","\u270C\uFE0F\uD83C\uDFFB":"270c-1f3fb","\u270C\uFE0F\uD83C\uDFFC":"270c-1f3fc","\u270C\uFE0F\uD83C\uDFFD":"270c-1f3fd","\u270C\uFE0F\uD83C\uDFFE":"270c-1f3fe","\u270C\uFE0F\uD83C\uDFFF":"270c-1f3ff","\u270D\uFE0F\uD83C\uDFFB":"270d-1f3fb","\u270D\uFE0F\uD83C\uDFFC":"270d-1f3fc","\u270D\uFE0F\uD83C\uDFFD":"270d-1f3fd","\u270D\uFE0F\uD83C\uDFFE":"270d-1f3fe","\u270D\uFE0F\uD83C\uDFFF":"270d-1f3ff","\uD83D\uDC68\u2695\uFE0F":"1f468-2695","\uD83D\uDC68\u2696\uFE0F":"1f468-2696","\uD83D\uDC68\u2708\uFE0F":"1f468-2708","\uD83D\uDC69\u2695\uFE0F":"1f469-2695","\uD83D\uDC69\u2696\uFE0F":"1f469-2696","\uD83D\uDC69\u2708\uFE0F":"1f469-2708","\uD83D\uDC6E\u2640\uFE0F":"1f46e-2640","\uD83D\uDC6E\u2642\uFE0F":"1f46e-2642","\uD83D\uDC71\u2640\uFE0F":"1f471-2640","\uD83D\uDC71\u2642\uFE0F":"1f471-2642","\uD83D\uDC73\u2640\uFE0F":"1f473-2640","\uD83D\uDC73\u2642\uFE0F":"1f473-2642","\uD83D\uDC77\u2640\uFE0F":"1f477-2640","\uD83D\uDC77\u2642\uFE0F":"1f477-2642","\uD83D\uDC82\u2640\uFE0F":"1f482-2640","\uD83D\uDC82\u2642\uFE0F":"1f482-2642","\uD83D\uDD75\u200D\u2640":"1f575-2640","\uD83D\uDD75\u200D\u2642":"1f575-2642","\uD83C\uDFC3\u2640\uFE0F":"1f3c3-2640","\uD83C\uDFC3\u2642\uFE0F":"1f3c3-2642","\uD83C\uDFC4\u2640\uFE0F":"1f3c4-2640","\uD83C\uDFC4\u2642\uFE0F":"1f3c4-2642","\uD83C\uDFCA\u2640\uFE0F":"1f3ca-2640","\uD83C\uDFCA\u2642\uFE0F":"1f3ca-2642","\uD83C\uDFCB\u200D\u2640":"1f3cb-2640","\uD83C\uDFCB\u200D\u2642":"1f3cb-2642","\uD83C\uDFCC\u200D\u2640":"1f3cc-2640","\uD83C\uDFCC\u200D\u2642":"1f3cc-2642","\uD83D\uDC6F\u2640\uFE0F":"1f46f-2640","\uD83D\uDC6F\u2642\uFE0F":"1f46f-2642","\uD83D\uDC86\u2640\uFE0F":"1f486-2640","\uD83D\uDC86\u2642\uFE0F":"1f486-2642","\uD83D\uDC87\u2640\uFE0F":"1f487-2640","\uD83D\uDC87\u2642\uFE0F":"1f487-2642","\uD83D\uDEA3\u2640\uFE0F":"1f6a3-2640","\uD83D\uDEA3\u2642\uFE0F":"1f6a3-2642","\uD83D\uDEB4\u2640\uFE0F":"1f6b4-2640","\uD83D\uDEB4\u2642\uFE0F":"1f6b4-2642","\uD83D\uDEB5\u2640\uFE0F":"1f6b5-2640","\uD83D\uDEB5\u2642\uFE0F":"1f6b5-2642","\uD83D\uDEB6\u2640\uFE0F":"1f6b6-2640","\uD83D\uDEB6\u2642\uFE0F":"1f6b6-2642","\uD83E\uDD38\u2640\uFE0F":"1f938-2640","\uD83E\uDD38\u2642\uFE0F":"1f938-2642","\uD83E\uDD39\u2640\uFE0F":"1f939-2640","\uD83E\uDD39\u2642\uFE0F":"1f939-2642","\uD83E\uDD3C\u2640\uFE0F":"1f93c-2640","\uD83E\uDD3C\u2642\uFE0F":"1f93c-2642","\uD83E\uDD3D\u2640\uFE0F":"1f93d-2640","\uD83E\uDD3D\u2642\uFE0F":"1f93d-2642","\uD83E\uDD3E\u2640\uFE0F":"1f93e-2640","\uD83E\uDD3E\u2642\uFE0F":"1f93e-2642","\uD83D\uDC81\u2640\uFE0F":"1f481-2640","\uD83D\uDC81\u2642\uFE0F":"1f481-2642","\uD83D\uDE45\u2640\uFE0F":"1f645-2640","\uD83D\uDE45\u2642\uFE0F":"1f645-2642","\uD83D\uDE46\u2640\uFE0F":"1f646-2640","\uD83D\uDE46\u2642\uFE0F":"1f646-2642","\uD83D\uDE47\u2640\uFE0F":"1f647-2640","\uD83D\uDE47\u2642\uFE0F":"1f647-2642","\uD83D\uDE4B\u2640\uFE0F":"1f64b-2640","\uD83D\uDE4B\u2642\uFE0F":"1f64b-2642","\uD83D\uDE4D\u2640\uFE0F":"1f64d-2640","\uD83D\uDE4D\u2642\uFE0F":"1f64d-2642","\uD83D\uDE4E\u2640\uFE0F":"1f64e-2640","\uD83D\uDE4E\u2642\uFE0F":"1f64e-2642","\uD83E\uDD26\u2640\uFE0F":"1f926-2640","\uD83E\uDD26\u2642\uFE0F":"1f926-2642","\uD83E\uDD37\u2640\uFE0F":"1f937-2640","\uD83E\uDD37\u2642\uFE0F":"1f937-2642","\uD83E\uDDD9\u200D\u2640":"1f9d9-2640","\uD83E\uDDD9\u2640\uFE0F":"1f9d9-2640","\uD83E\uDDD9\u200D\u2642":"1f9d9-2642","\uD83E\uDDD9\u2642\uFE0F":"1f9d9-2642","\uD83E\uDDDA\u200D\u2640":"1f9da-2640","\uD83E\uDDDA\u2640\uFE0F":"1f9da-2640","\uD83E\uDDDA\u200D\u2642":"1f9da-2642","\uD83E\uDDDA\u2642\uFE0F":"1f9da-2642","\uD83E\uDDDB\u200D\u2640":"1f9db-2640","\uD83E\uDDDB\u2640\uFE0F":"1f9db-2640","\uD83E\uDDDB\u200D\u2642":"1f9db-2642","\uD83E\uDDDB\u2642\uFE0F":"1f9db-2642","\uD83E\uDDDC\u200D\u2640":"1f9dc-2640","\uD83E\uDDDC\u2640\uFE0F":"1f9dc-2640","\uD83E\uDDDC\u200D\u2642":"1f9dc-2642","\uD83E\uDDDC\u2642\uFE0F":"1f9dc-2642","\uD83E\uDDDD\u200D\u2640":"1f9dd-2640","\uD83E\uDDDD\u2640\uFE0F":"1f9dd-2640","\uD83E\uDDDD\u200D\u2642":"1f9dd-2642","\uD83E\uDDDD\u2642\uFE0F":"1f9dd-2642","\uD83E\uDDDE\u200D\u2640":"1f9de-2640","\uD83E\uDDDE\u2640\uFE0F":"1f9de-2640","\uD83E\uDDDE\u200D\u2642":"1f9de-2642","\uD83E\uDDDE\u2642\uFE0F":"1f9de-2642","\uD83E\uDDDF\u200D\u2640":"1f9df-2640","\uD83E\uDDDF\u2640\uFE0F":"1f9df-2640","\uD83E\uDDDF\u200D\u2642":"1f9df-2642","\uD83E\uDDDF\u2642\uFE0F":"1f9df-2642","\uD83E\uDDD6\u200D\u2640":"1f9d6-2640","\uD83E\uDDD6\u2640\uFE0F":"1f9d6-2640","\uD83E\uDDD6\u200D\u2642":"1f9d6-2642","\uD83E\uDDD6\u2642\uFE0F":"1f9d6-2642","\uD83E\uDDD7\u200D\u2640":"1f9d7-2640","\uD83E\uDDD7\u2640\uFE0F":"1f9d7-2640","\uD83E\uDDD7\u200D\u2642":"1f9d7-2642","\uD83E\uDDD7\u2642\uFE0F":"1f9d7-2642","\uD83E\uDDD8\u200D\u2640":"1f9d8-2640","\uD83E\uDDD8\u2640\uFE0F":"1f9d8-2640","\uD83E\uDDD8\u200D\u2642":"1f9d8-2642","\uD83E\uDDD8\u2642\uFE0F":"1f9d8-2642","#\uFE0F\u20E3":"0023-20e3","0\uFE0F\u20E3":"0030-20e3","1\uFE0F\u20E3":"0031-20e3","2\uFE0F\u20E3":"0032-20e3","3\uFE0F\u20E3":"0033-20e3","4\uFE0F\u20E3":"0034-20e3","5\uFE0F\u20E3":"0035-20e3","6\uFE0F\u20E3":"0036-20e3","7\uFE0F\u20E3":"0037-20e3","8\uFE0F\u20E3":"0038-20e3","9\uFE0F\u20E3":"0039-20e3","*\uFE0F\u20E3":"002a-20e3","\u26F9\u200D\u2640":"26f9-2640","\u26F9\u200D\u2642":"26f9-2642","\uD83C\uDDE8\uD83C\uDDF3":"1f1e8-1f1f3","\uD83C\uDDE9\uD83C\uDDEA":"1f1e9-1f1ea","\uD83C\uDDEA\uD83C\uDDF8":"1f1ea-1f1f8","\uD83C\uDDEB\uD83C\uDDF7":"1f1eb-1f1f7","\uD83C\uDDEC\uD83C\uDDE7":"1f1ec-1f1e7","\uD83C\uDDEE\uD83C\uDDF9":"1f1ee-1f1f9","\uD83C\uDDEF\uD83C\uDDF5":"1f1ef-1f1f5","\uD83C\uDDF0\uD83C\uDDF7":"1f1f0-1f1f7","\uD83C\uDDFA\uD83C\uDDF8":"1f1fa-1f1f8","\uD83C\uDDF7\uD83C\uDDFA":"1f1f7-1f1fa","\uD83E\uDD34\uD83C\uDFFB":"1f934-1f3fb","\uD83E\uDD34\uD83C\uDFFC":"1f934-1f3fc","\uD83E\uDD34\uD83C\uDFFD":"1f934-1f3fd","\uD83E\uDD34\uD83C\uDFFE":"1f934-1f3fe","\uD83E\uDD34\uD83C\uDFFF":"1f934-1f3ff","\uD83E\uDD36\uD83C\uDFFB":"1f936-1f3fb","\uD83E\uDD36\uD83C\uDFFC":"1f936-1f3fc","\uD83E\uDD36\uD83C\uDFFD":"1f936-1f3fd","\uD83E\uDD36\uD83C\uDFFE":"1f936-1f3fe","\uD83E\uDD36\uD83C\uDFFF":"1f936-1f3ff","\uD83E\uDD35\uD83C\uDFFB":"1f935-1f3fb","\uD83E\uDD35\uD83C\uDFFC":"1f935-1f3fc","\uD83E\uDD35\uD83C\uDFFD":"1f935-1f3fd","\uD83E\uDD35\uD83C\uDFFE":"1f935-1f3fe","\uD83E\uDD35\uD83C\uDFFF":"1f935-1f3ff","\uD83E\uDD37\uD83C\uDFFB":"1f937-1f3fb","\uD83E\uDD37\uD83C\uDFFC":"1f937-1f3fc","\uD83E\uDD37\uD83C\uDFFD":"1f937-1f3fd","\uD83E\uDD37\uD83C\uDFFE":"1f937-1f3fe","\uD83E\uDD37\uD83C\uDFFF":"1f937-1f3ff","\uD83E\uDD26\uD83C\uDFFB":"1f926-1f3fb","\uD83E\uDD26\uD83C\uDFFC":"1f926-1f3fc","\uD83E\uDD26\uD83C\uDFFD":"1f926-1f3fd","\uD83E\uDD26\uD83C\uDFFE":"1f926-1f3fe","\uD83E\uDD26\uD83C\uDFFF":"1f926-1f3ff","\uD83E\uDD30\uD83C\uDFFB":"1f930-1f3fb","\uD83E\uDD30\uD83C\uDFFC":"1f930-1f3fc","\uD83E\uDD30\uD83C\uDFFD":"1f930-1f3fd","\uD83E\uDD30\uD83C\uDFFE":"1f930-1f3fe","\uD83E\uDD30\uD83C\uDFFF":"1f930-1f3ff","\uD83D\uDD7A\uD83C\uDFFB":"1f57a-1f3fb","\uD83D\uDD7A\uD83C\uDFFC":"1f57a-1f3fc","\uD83D\uDD7A\uD83C\uDFFD":"1f57a-1f3fd","\uD83D\uDD7A\uD83C\uDFFE":"1f57a-1f3fe","\uD83D\uDD7A\uD83C\uDFFF":"1f57a-1f3ff","\uD83E\uDD33\uD83C\uDFFB":"1f933-1f3fb","\uD83E\uDD33\uD83C\uDFFC":"1f933-1f3fc","\uD83E\uDD33\uD83C\uDFFD":"1f933-1f3fd","\uD83E\uDD33\uD83C\uDFFE":"1f933-1f3fe","\uD83E\uDD33\uD83C\uDFFF":"1f933-1f3ff","\uD83E\uDD1E\uD83C\uDFFB":"1f91e-1f3fb","\uD83E\uDD1E\uD83C\uDFFC":"1f91e-1f3fc","\uD83E\uDD1E\uD83C\uDFFD":"1f91e-1f3fd","\uD83E\uDD1E\uD83C\uDFFE":"1f91e-1f3fe","\uD83E\uDD1E\uD83C\uDFFF":"1f91e-1f3ff","\uD83E\uDD19\uD83C\uDFFB":"1f919-1f3fb","\uD83E\uDD19\uD83C\uDFFC":"1f919-1f3fc","\uD83E\uDD19\uD83C\uDFFD":"1f919-1f3fd","\uD83C\uDDE6\uD83C\uDDEB":"1f1e6-1f1eb","\uD83C\uDDE6\uD83C\uDDF1":"1f1e6-1f1f1","\uD83C\uDDE9\uD83C\uDDFF":"1f1e9-1f1ff","\uD83C\uDDE6\uD83C\uDDE9":"1f1e6-1f1e9","\uD83C\uDDE6\uD83C\uDDF4":"1f1e6-1f1f4","\uD83C\uDDE6\uD83C\uDDEC":"1f1e6-1f1ec","\uD83C\uDDE6\uD83C\uDDF7":"1f1e6-1f1f7","\uD83C\uDDE6\uD83C\uDDF2":"1f1e6-1f1f2","\uD83C\uDDE6\uD83C\uDDFA":"1f1e6-1f1fa","\uD83C\uDDE6\uD83C\uDDF9":"1f1e6-1f1f9","\uD83C\uDDE6\uD83C\uDDFF":"1f1e6-1f1ff","\uD83C\uDDE7\uD83C\uDDF8":"1f1e7-1f1f8","\uD83C\uDDE7\uD83C\uDDED":"1f1e7-1f1ed","\uD83C\uDDE7\uD83C\uDDE9":"1f1e7-1f1e9","\uD83C\uDDE7\uD83C\uDDE7":"1f1e7-1f1e7","\uD83C\uDDE7\uD83C\uDDFE":"1f1e7-1f1fe","\uD83C\uDDE7\uD83C\uDDEA":"1f1e7-1f1ea","\uD83C\uDDE7\uD83C\uDDFF":"1f1e7-1f1ff","\uD83C\uDDE7\uD83C\uDDEF":"1f1e7-1f1ef","\uD83C\uDDE7\uD83C\uDDF9":"1f1e7-1f1f9","\uD83C\uDDE7\uD83C\uDDF4":"1f1e7-1f1f4","\uD83C\uDDE7\uD83C\uDDE6":"1f1e7-1f1e6","\uD83C\uDDE7\uD83C\uDDFC":"1f1e7-1f1fc","\uD83C\uDDE7\uD83C\uDDF7":"1f1e7-1f1f7","\uD83C\uDDE7\uD83C\uDDF3":"1f1e7-1f1f3","\uD83C\uDDE7\uD83C\uDDEC":"1f1e7-1f1ec","\uD83C\uDDE7\uD83C\uDDEB":"1f1e7-1f1eb","\uD83C\uDDE7\uD83C\uDDEE":"1f1e7-1f1ee","\uD83C\uDDF0\uD83C\uDDED":"1f1f0-1f1ed","\uD83C\uDDE8\uD83C\uDDF2":"1f1e8-1f1f2","\uD83C\uDDE8\uD83C\uDDE6":"1f1e8-1f1e6","\uD83C\uDDE8\uD83C\uDDFB":"1f1e8-1f1fb","\uD83E\uDD19\uD83C\uDFFE":"1f919-1f3fe","\uD83C\uDDE8\uD83C\uDDEB":"1f1e8-1f1eb","\uD83C\uDDF9\uD83C\uDDE9":"1f1f9-1f1e9","\uD83C\uDDE8\uD83C\uDDF1":"1f1e8-1f1f1","\uD83C\uDDE8\uD83C\uDDF4":"1f1e8-1f1f4","\uD83C\uDDF0\uD83C\uDDF2":"1f1f0-1f1f2","\uD83C\uDDE8\uD83C\uDDF7":"1f1e8-1f1f7","\uD83C\uDDE8\uD83C\uDDEE":"1f1e8-1f1ee","\uD83C\uDDED\uD83C\uDDF7":"1f1ed-1f1f7","\uD83C\uDDE8\uD83C\uDDFA":"1f1e8-1f1fa","\uD83C\uDDE8\uD83C\uDDFE":"1f1e8-1f1fe","\uD83C\uDDE8\uD83C\uDDFF":"1f1e8-1f1ff","\uD83E\uDD19\uD83C\uDFFF":"1f919-1f3ff","\uD83C\uDDE8\uD83C\uDDE9":"1f1e8-1f1e9","\uD83E\uDD1B\uD83C\uDFFB":"1f91b-1f3fb","\uD83C\uDDE9\uD83C\uDDF0":"1f1e9-1f1f0","\uD83C\uDDE9\uD83C\uDDEF":"1f1e9-1f1ef","\uD83C\uDDE9\uD83C\uDDF2":"1f1e9-1f1f2","\uD83C\uDDE9\uD83C\uDDF4":"1f1e9-1f1f4","\uD83C\uDDF9\uD83C\uDDF1":"1f1f9-1f1f1","\uD83C\uDDEA\uD83C\uDDE8":"1f1ea-1f1e8","\uD83C\uDDEA\uD83C\uDDEC":"1f1ea-1f1ec","\uD83C\uDDF8\uD83C\uDDFB":"1f1f8-1f1fb","\uD83C\uDDEC\uD83C\uDDF6":"1f1ec-1f1f6","\uD83C\uDDEA\uD83C\uDDF7":"1f1ea-1f1f7","\uD83C\uDDEA\uD83C\uDDEA":"1f1ea-1f1ea","\uD83C\uDDEA\uD83C\uDDF9":"1f1ea-1f1f9","\uD83E\uDD1B\uD83C\uDFFC":"1f91b-1f3fc","\uD83C\uDDEB\uD83C\uDDEF":"1f1eb-1f1ef","\uD83C\uDDEB\uD83C\uDDEE":"1f1eb-1f1ee","\uD83C\uDDEC\uD83C\uDDE6":"1f1ec-1f1e6","\uD83C\uDDEC\uD83C\uDDF2":"1f1ec-1f1f2","\uD83C\uDDEC\uD83C\uDDEA":"1f1ec-1f1ea","\uD83C\uDDEC\uD83C\uDDED":"1f1ec-1f1ed","\uD83C\uDDEC\uD83C\uDDF7":"1f1ec-1f1f7","\uD83C\uDDEC\uD83C\uDDE9":"1f1ec-1f1e9","\uD83C\uDDEC\uD83C\uDDF9":"1f1ec-1f1f9","\uD83C\uDDEC\uD83C\uDDF3":"1f1ec-1f1f3","\uD83C\uDDEC\uD83C\uDDFC":"1f1ec-1f1fc","\uD83C\uDDEC\uD83C\uDDFE":"1f1ec-1f1fe","\uD83C\uDDED\uD83C\uDDF9":"1f1ed-1f1f9","\uD83C\uDDED\uD83C\uDDF3":"1f1ed-1f1f3","\uD83C\uDDED\uD83C\uDDFA":"1f1ed-1f1fa","\uD83C\uDDEE\uD83C\uDDF8":"1f1ee-1f1f8","\uD83C\uDDEE\uD83C\uDDF3":"1f1ee-1f1f3","\uD83C\uDDEE\uD83C\uDDE9":"1f1ee-1f1e9","\uD83C\uDDEE\uD83C\uDDF7":"1f1ee-1f1f7","\uD83C\uDDEE\uD83C\uDDF6":"1f1ee-1f1f6","\uD83C\uDDEE\uD83C\uDDEA":"1f1ee-1f1ea","\uD83C\uDDEE\uD83C\uDDF1":"1f1ee-1f1f1","\uD83C\uDDEF\uD83C\uDDF2":"1f1ef-1f1f2","\uD83C\uDDEF\uD83C\uDDF4":"1f1ef-1f1f4","\uD83C\uDDF0\uD83C\uDDFF":"1f1f0-1f1ff","\uD83C\uDDF0\uD83C\uDDEA":"1f1f0-1f1ea","\uD83C\uDDF0\uD83C\uDDEE":"1f1f0-1f1ee","\uD83C\uDDFD\uD83C\uDDF0":"1f1fd-1f1f0","\uD83C\uDDF0\uD83C\uDDFC":"1f1f0-1f1fc","\uD83C\uDDF0\uD83C\uDDEC":"1f1f0-1f1ec","\uD83E\uDD1B\uD83C\uDFFD":"1f91b-1f3fd","\uD83C\uDDF1\uD83C\uDDE6":"1f1f1-1f1e6","\uD83C\uDDF1\uD83C\uDDFB":"1f1f1-1f1fb","\uD83C\uDDF1\uD83C\uDDE7":"1f1f1-1f1e7","\uD83C\uDDF1\uD83C\uDDF8":"1f1f1-1f1f8","\uD83C\uDDF1\uD83C\uDDF7":"1f1f1-1f1f7","\uD83C\uDDF1\uD83C\uDDFE":"1f1f1-1f1fe","\uD83C\uDDF1\uD83C\uDDEE":"1f1f1-1f1ee","\uD83C\uDDF1\uD83C\uDDF9":"1f1f1-1f1f9","\uD83C\uDDF1\uD83C\uDDFA":"1f1f1-1f1fa","\uD83C\uDDF2\uD83C\uDDF0":"1f1f2-1f1f0","\uD83C\uDDF2\uD83C\uDDEC":"1f1f2-1f1ec","\uD83C\uDDF2\uD83C\uDDFC":"1f1f2-1f1fc","\uD83C\uDDF2\uD83C\uDDFE":"1f1f2-1f1fe","\uD83C\uDDF2\uD83C\uDDFB":"1f1f2-1f1fb","\uD83C\uDDF2\uD83C\uDDF1":"1f1f2-1f1f1","\uD83C\uDDF2\uD83C\uDDF9":"1f1f2-1f1f9","\uD83C\uDDF2\uD83C\uDDED":"1f1f2-1f1ed","\uD83C\uDDF2\uD83C\uDDF7":"1f1f2-1f1f7","\uD83C\uDDF2\uD83C\uDDFA":"1f1f2-1f1fa","\uD83C\uDDF2\uD83C\uDDFD":"1f1f2-1f1fd","\uD83C\uDDEB\uD83C\uDDF2":"1f1eb-1f1f2","\uD83C\uDDF2\uD83C\uDDE9":"1f1f2-1f1e9","\uD83C\uDDF2\uD83C\uDDE8":"1f1f2-1f1e8","\uD83C\uDDF2\uD83C\uDDF3":"1f1f2-1f1f3","\uD83C\uDDF2\uD83C\uDDEA":"1f1f2-1f1ea","\uD83C\uDDF2\uD83C\uDDE6":"1f1f2-1f1e6","\uD83C\uDDF2\uD83C\uDDFF":"1f1f2-1f1ff","\uD83C\uDDF2\uD83C\uDDF2":"1f1f2-1f1f2","\uD83C\uDDF3\uD83C\uDDE6":"1f1f3-1f1e6","\uD83C\uDDF3\uD83C\uDDF7":"1f1f3-1f1f7","\uD83C\uDDF3\uD83C\uDDF5":"1f1f3-1f1f5","\uD83C\uDDF3\uD83C\uDDF1":"1f1f3-1f1f1","\uD83C\uDDF3\uD83C\uDDFF":"1f1f3-1f1ff","\uD83C\uDDF3\uD83C\uDDEE":"1f1f3-1f1ee","\uD83C\uDDF3\uD83C\uDDEA":"1f1f3-1f1ea","\uD83C\uDDF3\uD83C\uDDEC":"1f1f3-1f1ec","\uD83C\uDDF0\uD83C\uDDF5":"1f1f0-1f1f5","\uD83C\uDDF3\uD83C\uDDF4":"1f1f3-1f1f4","\uD83C\uDDF4\uD83C\uDDF2":"1f1f4-1f1f2","\uD83C\uDDF5\uD83C\uDDF0":"1f1f5-1f1f0","\uD83C\uDDF5\uD83C\uDDFC":"1f1f5-1f1fc","\uD83C\uDDF5\uD83C\uDDE6":"1f1f5-1f1e6","\uD83C\uDDF5\uD83C\uDDEC":"1f1f5-1f1ec","\uD83E\uDD1B\uD83C\uDFFE":"1f91b-1f3fe","\uD83C\uDDF5\uD83C\uDDFE":"1f1f5-1f1fe","\uD83C\uDDF5\uD83C\uDDEA":"1f1f5-1f1ea","\uD83C\uDDF5\uD83C\uDDED":"1f1f5-1f1ed","\uD83C\uDDF5\uD83C\uDDF1":"1f1f5-1f1f1","\uD83C\uDDF5\uD83C\uDDF9":"1f1f5-1f1f9","\uD83C\uDDF6\uD83C\uDDE6":"1f1f6-1f1e6","\uD83C\uDDF9\uD83C\uDDFC":"1f1f9-1f1fc","\uD83C\uDDE8\uD83C\uDDEC":"1f1e8-1f1ec","\uD83C\uDDF7\uD83C\uDDF4":"1f1f7-1f1f4","\uD83C\uDDF7\uD83C\uDDFC":"1f1f7-1f1fc","\uD83C\uDDF0\uD83C\uDDF3":"1f1f0-1f1f3","\uD83C\uDDF1\uD83C\uDDE8":"1f1f1-1f1e8","\uD83C\uDDFB\uD83C\uDDE8":"1f1fb-1f1e8","\uD83C\uDDFC\uD83C\uDDF8":"1f1fc-1f1f8","\uD83C\uDDF8\uD83C\uDDF2":"1f1f8-1f1f2","\uD83C\uDDF8\uD83C\uDDF9":"1f1f8-1f1f9","\uD83C\uDDF8\uD83C\uDDE6":"1f1f8-1f1e6","\uD83E\uDD1B\uD83C\uDFFF":"1f91b-1f3ff","\uD83C\uDDF8\uD83C\uDDF3":"1f1f8-1f1f3","\uD83C\uDDF7\uD83C\uDDF8":"1f1f7-1f1f8","\uD83C\uDDF8\uD83C\uDDE8":"1f1f8-1f1e8","\uD83C\uDDF8\uD83C\uDDF1":"1f1f8-1f1f1","\uD83C\uDDF8\uD83C\uDDEC":"1f1f8-1f1ec","\uD83C\uDDF8\uD83C\uDDF0":"1f1f8-1f1f0","\uD83C\uDDF8\uD83C\uDDEE":"1f1f8-1f1ee","\uD83C\uDDF8\uD83C\uDDE7":"1f1f8-1f1e7","\uD83C\uDDF8\uD83C\uDDF4":"1f1f8-1f1f4","\uD83C\uDDFF\uD83C\uDDE6":"1f1ff-1f1e6","\uD83C\uDDF1\uD83C\uDDF0":"1f1f1-1f1f0","\uD83C\uDDF8\uD83C\uDDE9":"1f1f8-1f1e9","\uD83C\uDDF8\uD83C\uDDF7":"1f1f8-1f1f7","\uD83C\uDDF8\uD83C\uDDFF":"1f1f8-1f1ff","\uD83C\uDDF8\uD83C\uDDEA":"1f1f8-1f1ea","\uD83C\uDDE8\uD83C\uDDED":"1f1e8-1f1ed","\uD83C\uDDF8\uD83C\uDDFE":"1f1f8-1f1fe","\uD83C\uDDF9\uD83C\uDDEF":"1f1f9-1f1ef","\uD83C\uDDF9\uD83C\uDDFF":"1f1f9-1f1ff","\uD83C\uDDF9\uD83C\uDDED":"1f1f9-1f1ed","\uD83C\uDDF9\uD83C\uDDEC":"1f1f9-1f1ec","\uD83C\uDDF9\uD83C\uDDF4":"1f1f9-1f1f4","\uD83C\uDDF9\uD83C\uDDF9":"1f1f9-1f1f9","\uD83C\uDDF9\uD83C\uDDF3":"1f1f9-1f1f3","\uD83C\uDDF9\uD83C\uDDF7":"1f1f9-1f1f7","\uD83C\uDDF9\uD83C\uDDF2":"1f1f9-1f1f2","\uD83C\uDDF9\uD83C\uDDFB":"1f1f9-1f1fb","\uD83C\uDDFA\uD83C\uDDEC":"1f1fa-1f1ec","\uD83C\uDDFA\uD83C\uDDE6":"1f1fa-1f1e6","\uD83C\uDDE6\uD83C\uDDEA":"1f1e6-1f1ea","\uD83C\uDDFA\uD83C\uDDFE":"1f1fa-1f1fe","\uD83C\uDDFA\uD83C\uDDFF":"1f1fa-1f1ff","\uD83C\uDDFB\uD83C\uDDFA":"1f1fb-1f1fa","\uD83C\uDDFB\uD83C\uDDE6":"1f1fb-1f1e6","\uD83C\uDDFB\uD83C\uDDEA":"1f1fb-1f1ea","\uD83C\uDDFB\uD83C\uDDF3":"1f1fb-1f1f3","\uD83C\uDDEA\uD83C\uDDED":"1f1ea-1f1ed","\uD83E\uDD1C\uD83C\uDFFB":"1f91c-1f3fb","\uD83C\uDDFE\uD83C\uDDEA":"1f1fe-1f1ea","\uD83C\uDDFF\uD83C\uDDF2":"1f1ff-1f1f2","\uD83C\uDDFF\uD83C\uDDFC":"1f1ff-1f1fc","\uD83C\uDDF5\uD83C\uDDF7":"1f1f5-1f1f7","\uD83C\uDDF0\uD83C\uDDFE":"1f1f0-1f1fe","\uD83C\uDDE7\uD83C\uDDF2":"1f1e7-1f1f2","\uD83C\uDDF5\uD83C\uDDEB":"1f1f5-1f1eb","\uD83C\uDDF5\uD83C\uDDF8":"1f1f5-1f1f8","\uD83C\uDDF3\uD83C\uDDE8":"1f1f3-1f1e8","\uD83E\uDD1C\uD83C\uDFFC":"1f91c-1f3fc","\uD83C\uDDF8\uD83C\uDDED":"1f1f8-1f1ed","\uD83C\uDDE6\uD83C\uDDFC":"1f1e6-1f1fc","\uD83C\uDDFB\uD83C\uDDEE":"1f1fb-1f1ee","\uD83C\uDDED\uD83C\uDDF0":"1f1ed-1f1f0","\uD83C\uDDE6\uD83C\uDDE8":"1f1e6-1f1e8","\uD83C\uDDF2\uD83C\uDDF8":"1f1f2-1f1f8","\uD83C\uDDEC\uD83C\uDDFA":"1f1ec-1f1fa","\uD83C\uDDEC\uD83C\uDDF1":"1f1ec-1f1f1","\uD83C\uDDF3\uD83C\uDDFA":"1f1f3-1f1fa","\uD83C\uDDFC\uD83C\uDDEB":"1f1fc-1f1eb","\uD83C\uDDF2\uD83C\uDDF4":"1f1f2-1f1f4","\uD83E\uDD1C\uD83C\uDFFD":"1f91c-1f3fd","\uD83C\uDDEB\uD83C\uDDF4":"1f1eb-1f1f4","\uD83C\uDDEB\uD83C\uDDF0":"1f1eb-1f1f0","\uD83C\uDDEF\uD83C\uDDEA":"1f1ef-1f1ea","\uD83C\uDDE6\uD83C\uDDEE":"1f1e6-1f1ee","\uD83C\uDDEC\uD83C\uDDEE":"1f1ec-1f1ee","\uD83E\uDD1C\uD83C\uDFFE":"1f91c-1f3fe","\uD83E\uDD1C\uD83C\uDFFF":"1f91c-1f3ff","\uD83E\uDD1A\uD83C\uDFFB":"1f91a-1f3fb","\uD83E\uDD1A\uD83C\uDFFC":"1f91a-1f3fc","\uD83E\uDD1A\uD83C\uDFFD":"1f91a-1f3fd","\uD83E\uDD1A\uD83C\uDFFE":"1f91a-1f3fe","\uD83D\uDC76\uD83C\uDFFB":"1f476-1f3fb","\uD83D\uDC76\uD83C\uDFFC":"1f476-1f3fc","\uD83D\uDC76\uD83C\uDFFD":"1f476-1f3fd","\uD83D\uDC76\uD83C\uDFFE":"1f476-1f3fe","\uD83D\uDC76\uD83C\uDFFF":"1f476-1f3ff","\uD83D\uDC66\uD83C\uDFFB":"1f466-1f3fb","\uD83D\uDC66\uD83C\uDFFC":"1f466-1f3fc","\uD83D\uDC66\uD83C\uDFFD":"1f466-1f3fd","\uD83D\uDC66\uD83C\uDFFE":"1f466-1f3fe","\uD83D\uDC66\uD83C\uDFFF":"1f466-1f3ff","\uD83D\uDC67\uD83C\uDFFB":"1f467-1f3fb","\uD83D\uDC67\uD83C\uDFFC":"1f467-1f3fc","\uD83D\uDC67\uD83C\uDFFD":"1f467-1f3fd","\uD83D\uDC67\uD83C\uDFFE":"1f467-1f3fe","\uD83D\uDC67\uD83C\uDFFF":"1f467-1f3ff","\uD83D\uDC68\uD83C\uDFFB":"1f468-1f3fb","\uD83D\uDC68\uD83C\uDFFC":"1f468-1f3fc","\uD83D\uDC68\uD83C\uDFFD":"1f468-1f3fd","\uD83D\uDC68\uD83C\uDFFE":"1f468-1f3fe","\uD83D\uDC68\uD83C\uDFFF":"1f468-1f3ff","\uD83D\uDC69\uD83C\uDFFB":"1f469-1f3fb","\uD83D\uDC69\uD83C\uDFFC":"1f469-1f3fc","\uD83D\uDC69\uD83C\uDFFD":"1f469-1f3fd","\uD83D\uDC69\uD83C\uDFFE":"1f469-1f3fe","\uD83D\uDC69\uD83C\uDFFF":"1f469-1f3ff","\uD83D\uDC70\uD83C\uDFFB":"1f470-1f3fb","\uD83D\uDC70\uD83C\uDFFC":"1f470-1f3fc","\uD83E\uDD1A\uD83C\uDFFF":"1f91a-1f3ff","\uD83D\uDC70\uD83C\uDFFD":"1f470-1f3fd","\uD83D\uDC70\uD83C\uDFFE":"1f470-1f3fe","\uD83D\uDC70\uD83C\uDFFF":"1f470-1f3ff","\uD83D\uDC71\uD83C\uDFFB":"1f471-1f3fb","\uD83D\uDC71\uD83C\uDFFC":"1f471-1f3fc","\uD83D\uDC71\uD83C\uDFFD":"1f471-1f3fd","\uD83D\uDC71\uD83C\uDFFE":"1f471-1f3fe","\uD83D\uDC71\uD83C\uDFFF":"1f471-1f3ff","\uD83D\uDC72\uD83C\uDFFB":"1f472-1f3fb","\uD83D\uDC72\uD83C\uDFFC":"1f472-1f3fc","\uD83D\uDC72\uD83C\uDFFD":"1f472-1f3fd","\uD83D\uDC72\uD83C\uDFFE":"1f472-1f3fe","\uD83D\uDC72\uD83C\uDFFF":"1f472-1f3ff","\uD83D\uDC73\uD83C\uDFFB":"1f473-1f3fb","\uD83D\uDC73\uD83C\uDFFC":"1f473-1f3fc","\uD83D\uDC73\uD83C\uDFFD":"1f473-1f3fd","\uD83D\uDC73\uD83C\uDFFE":"1f473-1f3fe","\uD83D\uDC73\uD83C\uDFFF":"1f473-1f3ff","\uD83D\uDC74\uD83C\uDFFB":"1f474-1f3fb","\uD83D\uDC74\uD83C\uDFFC":"1f474-1f3fc","\uD83D\uDC74\uD83C\uDFFD":"1f474-1f3fd","\uD83D\uDC74\uD83C\uDFFE":"1f474-1f3fe","\uD83D\uDC74\uD83C\uDFFF":"1f474-1f3ff","\uD83D\uDC75\uD83C\uDFFB":"1f475-1f3fb","\uD83D\uDC75\uD83C\uDFFC":"1f475-1f3fc","\uD83D\uDC75\uD83C\uDFFD":"1f475-1f3fd","\uD83D\uDC75\uD83C\uDFFE":"1f475-1f3fe","\uD83D\uDC75\uD83C\uDFFF":"1f475-1f3ff","\uD83D\uDC6E\uD83C\uDFFB":"1f46e-1f3fb","\uD83D\uDC6E\uD83C\uDFFC":"1f46e-1f3fc","\uD83D\uDC6E\uD83C\uDFFD":"1f46e-1f3fd","\uD83D\uDC6E\uD83C\uDFFE":"1f46e-1f3fe","\uD83D\uDC6E\uD83C\uDFFF":"1f46e-1f3ff","\uD83D\uDC77\uD83C\uDFFB":"1f477-1f3fb","\uD83D\uDC77\uD83C\uDFFC":"1f477-1f3fc","\uD83D\uDC77\uD83C\uDFFD":"1f477-1f3fd","\uD83D\uDC77\uD83C\uDFFE":"1f477-1f3fe","\uD83D\uDC77\uD83C\uDFFF":"1f477-1f3ff","\uD83D\uDC78\uD83C\uDFFB":"1f478-1f3fb","\uD83D\uDC78\uD83C\uDFFC":"1f478-1f3fc","\uD83D\uDC78\uD83C\uDFFD":"1f478-1f3fd","\uD83D\uDC78\uD83C\uDFFE":"1f478-1f3fe","\uD83E\uDD38\uD83C\uDFFB":"1f938-1f3fb","\uD83D\uDC78\uD83C\uDFFF":"1f478-1f3ff","\uD83D\uDC82\uD83C\uDFFB":"1f482-1f3fb","\uD83D\uDC82\uD83C\uDFFC":"1f482-1f3fc","\uD83E\uDD38\uD83C\uDFFC":"1f938-1f3fc","\uD83D\uDC82\uD83C\uDFFD":"1f482-1f3fd","\uD83D\uDC82\uD83C\uDFFE":"1f482-1f3fe","\uD83D\uDC82\uD83C\uDFFF":"1f482-1f3ff","\uD83E\uDD38\uD83C\uDFFD":"1f938-1f3fd","\uD83D\uDC7C\uD83C\uDFFB":"1f47c-1f3fb","\uD83D\uDC7C\uD83C\uDFFC":"1f47c-1f3fc","\uD83D\uDC7C\uD83C\uDFFD":"1f47c-1f3fd","\uD83D\uDC7C\uD83C\uDFFE":"1f47c-1f3fe","\uD83D\uDC7C\uD83C\uDFFF":"1f47c-1f3ff","\uD83D\uDE47\uD83C\uDFFB":"1f647-1f3fb","\uD83D\uDE47\uD83C\uDFFC":"1f647-1f3fc","\uD83D\uDE47\uD83C\uDFFD":"1f647-1f3fd","\uD83D\uDE47\uD83C\uDFFE":"1f647-1f3fe","\uD83D\uDE47\uD83C\uDFFF":"1f647-1f3ff","\uD83D\uDC81\uD83C\uDFFB":"1f481-1f3fb","\uD83D\uDC81\uD83C\uDFFC":"1f481-1f3fc","\uD83D\uDC81\uD83C\uDFFD":"1f481-1f3fd","\uD83E\uDD38\uD83C\uDFFE":"1f938-1f3fe","\uD83D\uDC81\uD83C\uDFFE":"1f481-1f3fe","\uD83D\uDC81\uD83C\uDFFF":"1f481-1f3ff","\uD83D\uDE45\uD83C\uDFFB":"1f645-1f3fb","\uD83E\uDD38\uD83C\uDFFF":"1f938-1f3ff","\uD83D\uDE45\uD83C\uDFFC":"1f645-1f3fc","\uD83D\uDE45\uD83C\uDFFD":"1f645-1f3fd","\uD83D\uDE45\uD83C\uDFFE":"1f645-1f3fe","\uD83D\uDE45\uD83C\uDFFF":"1f645-1f3ff","\uD83D\uDE46\uD83C\uDFFB":"1f646-1f3fb","\uD83D\uDE46\uD83C\uDFFC":"1f646-1f3fc","\uD83D\uDE46\uD83C\uDFFD":"1f646-1f3fd","\uD83D\uDE46\uD83C\uDFFE":"1f646-1f3fe","\uD83D\uDE46\uD83C\uDFFF":"1f646-1f3ff","\uD83D\uDE4B\uD83C\uDFFB":"1f64b-1f3fb","\uD83D\uDE4B\uD83C\uDFFC":"1f64b-1f3fc","\uD83D\uDE4B\uD83C\uDFFD":"1f64b-1f3fd","\uD83D\uDE4B\uD83C\uDFFE":"1f64b-1f3fe","\uD83D\uDE4B\uD83C\uDFFF":"1f64b-1f3ff","\uD83D\uDE4E\uD83C\uDFFB":"1f64e-1f3fb","\uD83D\uDE4E\uD83C\uDFFC":"1f64e-1f3fc","\uD83D\uDE4E\uD83C\uDFFD":"1f64e-1f3fd","\uD83D\uDE4E\uD83C\uDFFE":"1f64e-1f3fe","\uD83D\uDE4E\uD83C\uDFFF":"1f64e-1f3ff","\uD83D\uDE4D\uD83C\uDFFB":"1f64d-1f3fb","\uD83D\uDE4D\uD83C\uDFFC":"1f64d-1f3fc","\uD83D\uDE4D\uD83C\uDFFD":"1f64d-1f3fd","\uD83D\uDE4D\uD83C\uDFFE":"1f64d-1f3fe","\uD83D\uDE4D\uD83C\uDFFF":"1f64d-1f3ff","\uD83D\uDC86\uD83C\uDFFB":"1f486-1f3fb","\uD83D\uDC86\uD83C\uDFFC":"1f486-1f3fc","\uD83D\uDC86\uD83C\uDFFD":"1f486-1f3fd","\uD83D\uDC86\uD83C\uDFFE":"1f486-1f3fe","\uD83D\uDC86\uD83C\uDFFF":"1f486-1f3ff","\uD83D\uDC87\uD83C\uDFFB":"1f487-1f3fb","\uD83D\uDC87\uD83C\uDFFC":"1f487-1f3fc","\uD83D\uDC87\uD83C\uDFFD":"1f487-1f3fd","\uD83D\uDC87\uD83C\uDFFE":"1f487-1f3fe","\uD83D\uDC87\uD83C\uDFFF":"1f487-1f3ff","\uD83D\uDE4C\uD83C\uDFFB":"1f64c-1f3fb","\uD83D\uDE4C\uD83C\uDFFC":"1f64c-1f3fc","\uD83D\uDE4C\uD83C\uDFFD":"1f64c-1f3fd","\uD83D\uDE4C\uD83C\uDFFE":"1f64c-1f3fe","\uD83D\uDE4C\uD83C\uDFFF":"1f64c-1f3ff","\uD83D\uDC4F\uD83C\uDFFB":"1f44f-1f3fb","\uD83D\uDC4F\uD83C\uDFFC":"1f44f-1f3fc","\uD83D\uDC4F\uD83C\uDFFD":"1f44f-1f3fd","\uD83E\uDD3D\uD83C\uDFFB":"1f93d-1f3fb","\uD83D\uDC4F\uD83C\uDFFE":"1f44f-1f3fe","\uD83D\uDC4F\uD83C\uDFFF":"1f44f-1f3ff","\uD83E\uDD3D\uD83C\uDFFC":"1f93d-1f3fc","\uD83D\uDC42\uD83C\uDFFB":"1f442-1f3fb","\uD83D\uDC42\uD83C\uDFFC":"1f442-1f3fc","\uD83D\uDC42\uD83C\uDFFD":"1f442-1f3fd","\uD83D\uDC42\uD83C\uDFFE":"1f442-1f3fe","\uD83D\uDC42\uD83C\uDFFF":"1f442-1f3ff","\uD83D\uDC43\uD83C\uDFFB":"1f443-1f3fb","\uD83D\uDC43\uD83C\uDFFC":"1f443-1f3fc","\uD83D\uDC43\uD83C\uDFFD":"1f443-1f3fd","\uD83D\uDC43\uD83C\uDFFE":"1f443-1f3fe","\uD83D\uDC43\uD83C\uDFFF":"1f443-1f3ff","\uD83D\uDC85\uD83C\uDFFB":"1f485-1f3fb","\uD83D\uDC85\uD83C\uDFFC":"1f485-1f3fc","\uD83D\uDC85\uD83C\uDFFD":"1f485-1f3fd","\uD83D\uDC85\uD83C\uDFFE":"1f485-1f3fe","\uD83D\uDC85\uD83C\uDFFF":"1f485-1f3ff","\uD83D\uDC4B\uD83C\uDFFB":"1f44b-1f3fb","\uD83D\uDC4B\uD83C\uDFFC":"1f44b-1f3fc","\uD83D\uDC4B\uD83C\uDFFD":"1f44b-1f3fd","\uD83D\uDC4B\uD83C\uDFFE":"1f44b-1f3fe","\uD83D\uDC4B\uD83C\uDFFF":"1f44b-1f3ff","\uD83D\uDC4D\uD83C\uDFFB":"1f44d-1f3fb","\uD83D\uDC4D\uD83C\uDFFC":"1f44d-1f3fc","\uD83D\uDC4D\uD83C\uDFFD":"1f44d-1f3fd","\uD83D\uDC4D\uD83C\uDFFE":"1f44d-1f3fe","\uD83D\uDC4D\uD83C\uDFFF":"1f44d-1f3ff","\uD83D\uDC4E\uD83C\uDFFB":"1f44e-1f3fb","\uD83D\uDC4E\uD83C\uDFFC":"1f44e-1f3fc","\uD83D\uDC4E\uD83C\uDFFD":"1f44e-1f3fd","\uD83D\uDC4E\uD83C\uDFFE":"1f44e-1f3fe","\uD83D\uDC4E\uD83C\uDFFF":"1f44e-1f3ff","\uD83D\uDC46\uD83C\uDFFB":"1f446-1f3fb","\uD83D\uDC46\uD83C\uDFFC":"1f446-1f3fc","\uD83D\uDC46\uD83C\uDFFD":"1f446-1f3fd","\uD83D\uDC46\uD83C\uDFFE":"1f446-1f3fe","\uD83D\uDC46\uD83C\uDFFF":"1f446-1f3ff","\uD83D\uDC47\uD83C\uDFFB":"1f447-1f3fb","\uD83D\uDC47\uD83C\uDFFC":"1f447-1f3fc","\uD83D\uDC47\uD83C\uDFFD":"1f447-1f3fd","\uD83D\uDC47\uD83C\uDFFE":"1f447-1f3fe","\uD83D\uDC47\uD83C\uDFFF":"1f447-1f3ff","\uD83D\uDC48\uD83C\uDFFB":"1f448-1f3fb","\uD83D\uDC48\uD83C\uDFFC":"1f448-1f3fc","\uD83D\uDC48\uD83C\uDFFD":"1f448-1f3fd","\uD83D\uDC48\uD83C\uDFFE":"1f448-1f3fe","\uD83D\uDC48\uD83C\uDFFF":"1f448-1f3ff","\uD83D\uDC49\uD83C\uDFFB":"1f449-1f3fb","\uD83D\uDC49\uD83C\uDFFC":"1f449-1f3fc","\uD83D\uDC49\uD83C\uDFFD":"1f449-1f3fd","\uD83D\uDC49\uD83C\uDFFE":"1f449-1f3fe","\uD83D\uDC49\uD83C\uDFFF":"1f449-1f3ff","\uD83D\uDC4C\uD83C\uDFFB":"1f44c-1f3fb","\uD83D\uDC4C\uD83C\uDFFC":"1f44c-1f3fc","\uD83E\uDD3D\uD83C\uDFFD":"1f93d-1f3fd","\uD83D\uDC4C\uD83C\uDFFD":"1f44c-1f3fd","\uD83D\uDC4C\uD83C\uDFFE":"1f44c-1f3fe","\uD83E\uDD3D\uD83C\uDFFE":"1f93d-1f3fe","\uD83D\uDC4C\uD83C\uDFFF":"1f44c-1f3ff","\uD83D\uDC4A\uD83C\uDFFB":"1f44a-1f3fb","\uD83D\uDC4A\uD83C\uDFFC":"1f44a-1f3fc","\uD83D\uDC4A\uD83C\uDFFD":"1f44a-1f3fd","\uD83D\uDC4A\uD83C\uDFFE":"1f44a-1f3fe","\uD83D\uDC4A\uD83C\uDFFF":"1f44a-1f3ff","\uD83D\uDCAA\uD83C\uDFFB":"1f4aa-1f3fb","\uD83D\uDCAA\uD83C\uDFFC":"1f4aa-1f3fc","\uD83D\uDCAA\uD83C\uDFFD":"1f4aa-1f3fd","\uD83D\uDCAA\uD83C\uDFFE":"1f4aa-1f3fe","\uD83D\uDCAA\uD83C\uDFFF":"1f4aa-1f3ff","\uD83D\uDC50\uD83C\uDFFB":"1f450-1f3fb","\uD83D\uDC50\uD83C\uDFFC":"1f450-1f3fc","\uD83D\uDC50\uD83C\uDFFD":"1f450-1f3fd","\uD83D\uDC50\uD83C\uDFFE":"1f450-1f3fe","\uD83D\uDC50\uD83C\uDFFF":"1f450-1f3ff","\uD83D\uDE4F\uD83C\uDFFB":"1f64f-1f3fb","\uD83E\uDD3D\uD83C\uDFFF":"1f93d-1f3ff","\uD83D\uDE4F\uD83C\uDFFC":"1f64f-1f3fc","\uD83D\uDE4F\uD83C\uDFFD":"1f64f-1f3fd","\uD83E\uDD3E\uD83C\uDFFB":"1f93e-1f3fb","\uD83D\uDE4F\uD83C\uDFFE":"1f64f-1f3fe","\uD83D\uDE4F\uD83C\uDFFF":"1f64f-1f3ff","\uD83E\uDD3E\uD83C\uDFFC":"1f93e-1f3fc","\uD83C\uDFC3\uD83C\uDFFB":"1f3c3-1f3fb","\uD83C\uDFC3\uD83C\uDFFC":"1f3c3-1f3fc","\uD83C\uDFC3\uD83C\uDFFD":"1f3c3-1f3fd","\uD83C\uDFC3\uD83C\uDFFE":"1f3c3-1f3fe","\uD83E\uDD3E\uD83C\uDFFD":"1f93e-1f3fd","\uD83C\uDFC3\uD83C\uDFFF":"1f3c3-1f3ff","\uD83D\uDEB6\uD83C\uDFFB":"1f6b6-1f3fb","\uD83D\uDEB6\uD83C\uDFFC":"1f6b6-1f3fc","\uD83D\uDEB6\uD83C\uDFFD":"1f6b6-1f3fd","\uD83D\uDEB6\uD83C\uDFFE":"1f6b6-1f3fe","\uD83D\uDEB6\uD83C\uDFFF":"1f6b6-1f3ff","\uD83D\uDC83\uD83C\uDFFB":"1f483-1f3fb","\uD83E\uDD3E\uD83C\uDFFE":"1f93e-1f3fe","\uD83D\uDC83\uD83C\uDFFC":"1f483-1f3fc","\uD83D\uDC83\uD83C\uDFFD":"1f483-1f3fd","\uD83E\uDD3E\uD83C\uDFFF":"1f93e-1f3ff","\uD83D\uDC83\uD83C\uDFFE":"1f483-1f3fe","\uD83D\uDC83\uD83C\uDFFF":"1f483-1f3ff","\uD83E\uDD39\uD83C\uDFFB":"1f939-1f3fb","\uD83D\uDEA3\uD83C\uDFFB":"1f6a3-1f3fb","\uD83D\uDEA3\uD83C\uDFFC":"1f6a3-1f3fc","\uD83D\uDEA3\uD83C\uDFFD":"1f6a3-1f3fd","\uD83D\uDEA3\uD83C\uDFFE":"1f6a3-1f3fe","\uD83D\uDEA3\uD83C\uDFFF":"1f6a3-1f3ff","\uD83C\uDFCA\uD83C\uDFFB":"1f3ca-1f3fb","\uD83C\uDFCA\uD83C\uDFFC":"1f3ca-1f3fc","\uD83E\uDD39\uD83C\uDFFC":"1f939-1f3fc","\uD83C\uDFCA\uD83C\uDFFD":"1f3ca-1f3fd","\uD83C\uDFCA\uD83C\uDFFE":"1f3ca-1f3fe","\uD83C\uDFCA\uD83C\uDFFF":"1f3ca-1f3ff","\uD83E\uDD39\uD83C\uDFFD":"1f939-1f3fd","\uD83C\uDFC4\uD83C\uDFFB":"1f3c4-1f3fb","\uD83C\uDFC4\uD83C\uDFFC":"1f3c4-1f3fc","\uD83C\uDFC4\uD83C\uDFFD":"1f3c4-1f3fd","\uD83C\uDFC4\uD83C\uDFFE":"1f3c4-1f3fe","\uD83C\uDFC4\uD83C\uDFFF":"1f3c4-1f3ff","\uD83D\uDEC0\uD83C\uDFFB":"1f6c0-1f3fb","\uD83D\uDEC0\uD83C\uDFFC":"1f6c0-1f3fc","\uD83E\uDD39\uD83C\uDFFE":"1f939-1f3fe","\uD83D\uDEC0\uD83C\uDFFD":"1f6c0-1f3fd","\uD83D\uDEC0\uD83C\uDFFE":"1f6c0-1f3fe","\uD83D\uDEC0\uD83C\uDFFF":"1f6c0-1f3ff","\uD83E\uDD39\uD83C\uDFFF":"1f939-1f3ff","\uD83D\uDEB4\uD83C\uDFFB":"1f6b4-1f3fb","\uD83D\uDEB4\uD83C\uDFFC":"1f6b4-1f3fc","\uD83D\uDEB4\uD83C\uDFFD":"1f6b4-1f3fd","\uD83D\uDEB4\uD83C\uDFFE":"1f6b4-1f3fe","\uD83D\uDEB4\uD83C\uDFFF":"1f6b4-1f3ff","\uD83D\uDEB5\uD83C\uDFFB":"1f6b5-1f3fb","\uD83D\uDEB5\uD83C\uDFFC":"1f6b5-1f3fc","\uD83D\uDEB5\uD83C\uDFFD":"1f6b5-1f3fd","\uD83D\uDEB5\uD83C\uDFFE":"1f6b5-1f3fe","\uD83D\uDEB5\uD83C\uDFFF":"1f6b5-1f3ff","\uD83C\uDFC7\uD83C\uDFFB":"1f3c7-1f3fb","\uD83C\uDFC7\uD83C\uDFFC":"1f3c7-1f3fc","\uD83C\uDFC7\uD83C\uDFFD":"1f3c7-1f3fd","\uD83C\uDFC7\uD83C\uDFFE":"1f3c7-1f3fe","\uD83C\uDFC7\uD83C\uDFFF":"1f3c7-1f3ff","\uD83D\uDD90\uD83C\uDFFB":"1f590-1f3fb","\uD83D\uDD90\uD83C\uDFFC":"1f590-1f3fc","\uD83D\uDD90\uD83C\uDFFD":"1f590-1f3fd","\uD83D\uDD90\uD83C\uDFFE":"1f590-1f3fe","\uD83D\uDD90\uD83C\uDFFF":"1f590-1f3ff","\uD83D\uDD95\uD83C\uDFFB":"1f595-1f3fb","\uD83D\uDD95\uD83C\uDFFC":"1f595-1f3fc","\uD83D\uDD95\uD83C\uDFFD":"1f595-1f3fd","\uD83D\uDD95\uD83C\uDFFE":"1f595-1f3fe","\uD83D\uDD95\uD83C\uDFFF":"1f595-1f3ff","\uD83D\uDD96\uD83C\uDFFB":"1f596-1f3fb","\uD83D\uDD96\uD83C\uDFFC":"1f596-1f3fc","\uD83D\uDD96\uD83C\uDFFD":"1f596-1f3fd","\uD83D\uDD96\uD83C\uDFFE":"1f596-1f3fe","\uD83D\uDD96\uD83C\uDFFF":"1f596-1f3ff","\uD83C\uDF85\uD83C\uDFFB":"1f385-1f3fb","\uD83C\uDF85\uD83C\uDFFC":"1f385-1f3fc","\uD83C\uDF85\uD83C\uDFFD":"1f385-1f3fd","\uD83C\uDF85\uD83C\uDFFE":"1f385-1f3fe","\uD83C\uDF85\uD83C\uDFFF":"1f385-1f3ff","\uD83E\uDD18\uD83C\uDFFB":"1f918-1f3fb","\uD83E\uDD18\uD83C\uDFFC":"1f918-1f3fc","\uD83E\uDD18\uD83C\uDFFD":"1f918-1f3fd","\uD83E\uDD18\uD83C\uDFFE":"1f918-1f3fe","\uD83E\uDD18\uD83C\uDFFF":"1f918-1f3ff","\uD83C\uDFCB\uD83C\uDFFB":"1f3cb-1f3fb","\uD83C\uDFCB\uD83C\uDFFC":"1f3cb-1f3fc","\uD83C\uDFCB\uD83C\uDFFD":"1f3cb-1f3fd","\uD83C\uDFCB\uD83C\uDFFE":"1f3cb-1f3fe","\uD83C\uDFCB\uD83C\uDFFF":"1f3cb-1f3ff","\uD83C\uDDE6\uD83C\uDDFD":"1f1e6-1f1fd","\uD83C\uDDF9\uD83C\uDDE6":"1f1f9-1f1e6","\uD83C\uDDEE\uD83C\uDDF4":"1f1ee-1f1f4","\uD83C\uDDE7\uD83C\uDDF6":"1f1e7-1f1f6","\uD83C\uDDE8\uD83C\uDDFD":"1f1e8-1f1fd","\uD83C\uDDE8\uD83C\uDDE8":"1f1e8-1f1e8","\uD83C\uDDEC\uD83C\uDDEC":"1f1ec-1f1ec","\uD83C\uDDEE\uD83C\uDDF2":"1f1ee-1f1f2","\uD83C\uDDFE\uD83C\uDDF9":"1f1fe-1f1f9","\uD83C\uDDF3\uD83C\uDDEB":"1f1f3-1f1eb","\uD83C\uDDF5\uD83C\uDDF3":"1f1f5-1f1f3","\uD83C\uDDE7\uD83C\uDDF1":"1f1e7-1f1f1","\uD83C\uDDF5\uD83C\uDDF2":"1f1f5-1f1f2","\uD83C\uDDEC\uD83C\uDDF8":"1f1ec-1f1f8","\uD83C\uDDF9\uD83C\uDDF0":"1f1f9-1f1f0","\uD83C\uDDE7\uD83C\uDDFB":"1f1e7-1f1fb","\uD83C\uDDED\uD83C\uDDF2":"1f1ed-1f1f2","\uD83C\uDDF8\uD83C\uDDEF":"1f1f8-1f1ef","\uD83C\uDDFA\uD83C\uDDF2":"1f1fa-1f1f2","\uD83C\uDDEE\uD83C\uDDE8":"1f1ee-1f1e8","\uD83C\uDDEA\uD83C\uDDE6":"1f1ea-1f1e6","\uD83C\uDDE8\uD83C\uDDF5":"1f1e8-1f1f5","\uD83C\uDDE9\uD83C\uDDEC":"1f1e9-1f1ec","\uD83C\uDDE6\uD83C\uDDF8":"1f1e6-1f1f8","\uD83C\uDDE6\uD83C\uDDF6":"1f1e6-1f1f6","\uD83C\uDDFB\uD83C\uDDEC":"1f1fb-1f1ec","\uD83C\uDDE8\uD83C\uDDF0":"1f1e8-1f1f0","\uD83C\uDDE8\uD83C\uDDFC":"1f1e8-1f1fc","\uD83C\uDDEA\uD83C\uDDFA":"1f1ea-1f1fa","\uD83C\uDDEC\uD83C\uDDEB":"1f1ec-1f1eb","\uD83C\uDDF9\uD83C\uDDEB":"1f1f9-1f1eb","\uD83C\uDDEC\uD83C\uDDF5":"1f1ec-1f1f5","\uD83C\uDDF2\uD83C\uDDF6":"1f1f2-1f1f6","\uD83C\uDDF2\uD83C\uDDF5":"1f1f2-1f1f5","\uD83C\uDDF7\uD83C\uDDEA":"1f1f7-1f1ea","\uD83C\uDDF8\uD83C\uDDFD":"1f1f8-1f1fd","\uD83C\uDDF8\uD83C\uDDF8":"1f1f8-1f1f8","\uD83C\uDDF9\uD83C\uDDE8":"1f1f9-1f1e8","\uD83C\uDDF2\uD83C\uDDEB":"1f1f2-1f1eb","\uD83D\uDD75\uD83C\uDFFB":"1f575-1f3fb","\uD83D\uDD75\uD83C\uDFFC":"1f575-1f3fc","\uD83D\uDD75\uD83C\uDFFD":"1f575-1f3fd","\uD83D\uDD75\uD83C\uDFFE":"1f575-1f3fe","\uD83D\uDD75\uD83C\uDFFF":"1f575-1f3ff","\uD83C\uDFC2\uD83C\uDFFB":"1f3c2-1f3fb","\uD83D\uDC68\uD83D\uDCBB":"1f468-1f4bb","\uD83D\uDC69\uD83D\uDCBB":"1f469-1f4bb","\uD83D\uDC68\uD83C\uDFEB":"1f468-1f3eb","\uD83D\uDC69\uD83C\uDFEB":"1f469-1f3eb","\uD83D\uDC68\uD83C\uDF93":"1f468-1f393","\uD83D\uDC69\uD83C\uDF93":"1f469-1f393","\uD83D\uDC68\uD83C\uDFA4":"1f468-1f3a4","\uD83D\uDC69\uD83C\uDFA4":"1f469-1f3a4","\uD83D\uDC68\uD83D\uDD2C":"1f468-1f52c","\uD83D\uDC69\uD83D\uDD2C":"1f469-1f52c","\uD83D\uDC68\uD83D\uDCBC":"1f468-1f4bc","\uD83D\uDC69\uD83D\uDCBC":"1f469-1f4bc","\uD83D\uDC68\uD83D\uDD27":"1f468-1f527","\uD83D\uDC69\uD83D\uDD27":"1f469-1f527","\uD83D\uDC68\uD83C\uDFED":"1f468-1f3ed","\uD83D\uDC69\uD83C\uDFED":"1f469-1f3ed","\uD83D\uDC68\uD83C\uDF73":"1f468-1f373","\uD83D\uDC69\uD83C\uDF73":"1f469-1f373","\uD83D\uDC68\uD83C\uDF3E":"1f468-1f33e","\uD83D\uDC69\uD83C\uDF3E":"1f469-1f33e","\uD83D\uDD74\uD83C\uDFFB":"1f574-1f3fb","\uD83D\uDD74\uD83C\uDFFC":"1f574-1f3fc","\uD83D\uDD74\uD83C\uDFFD":"1f574-1f3fd","\uD83D\uDD74\uD83C\uDFFE":"1f574-1f3fe","\uD83D\uDD74\uD83C\uDFFF":"1f574-1f3ff","\uD83D\uDECC\uD83C\uDFFB":"1f6cc-1f3fb","\uD83D\uDECC\uD83C\uDFFC":"1f6cc-1f3fc","\uD83D\uDECC\uD83C\uDFFD":"1f6cc-1f3fd","\uD83D\uDECC\uD83C\uDFFE":"1f6cc-1f3fe","\uD83D\uDECC\uD83C\uDFFF":"1f6cc-1f3ff","\uD83D\uDC68\uD83D\uDC66":"1f468-1f466","\uD83D\uDC68\uD83D\uDC67":"1f468-1f467","\uD83D\uDC69\uD83D\uDC66":"1f469-1f466","\uD83D\uDC69\uD83D\uDC67":"1f469-1f467","\uD83D\uDC68\uD83C\uDFA8":"1f468-1f3a8","\uD83D\uDC69\uD83C\uDFA8":"1f469-1f3a8","\uD83D\uDC68\uD83D\uDE80":"1f468-1f680","\uD83D\uDC69\uD83D\uDE80":"1f469-1f680","\uD83D\uDC68\uD83D\uDE92":"1f468-1f692","\uD83D\uDC69\uD83D\uDE92":"1f469-1f692","\uD83C\uDDFA\uD83C\uDDF3":"1f1fa-1f1f3","\uD83C\uDFC2\uD83C\uDFFC":"1f3c2-1f3fc","\uD83C\uDFC2\uD83C\uDFFD":"1f3c2-1f3fd","\uD83C\uDFC2\uD83C\uDFFE":"1f3c2-1f3fe","\uD83C\uDFC2\uD83C\uDFFF":"1f3c2-1f3ff","\uD83C\uDFCC\uD83C\uDFFB":"1f3cc-1f3fb","\uD83C\uDFCC\uD83C\uDFFC":"1f3cc-1f3fc","\uD83C\uDFCC\uD83C\uDFFD":"1f3cc-1f3fd","\uD83C\uDFCC\uD83C\uDFFE":"1f3cc-1f3fe","\uD83C\uDFCC\uD83C\uDFFF":"1f3cc-1f3ff","\uD83E\uDD1F\uD83C\uDFFB":"1f91f-1f3fb","\uD83E\uDD1F\uD83C\uDFFC":"1f91f-1f3fc","\uD83E\uDD1F\uD83C\uDFFD":"1f91f-1f3fd","\uD83E\uDD1F\uD83C\uDFFE":"1f91f-1f3fe","\uD83E\uDD1F\uD83C\uDFFF":"1f91f-1f3ff","\uD83E\uDD31\uD83C\uDFFB":"1f931-1f3fb","\uD83E\uDD31\uD83C\uDFFC":"1f931-1f3fc","\uD83E\uDD31\uD83C\uDFFD":"1f931-1f3fd","\uD83E\uDD31\uD83C\uDFFE":"1f931-1f3fe","\uD83E\uDD31\uD83C\uDFFF":"1f931-1f3ff","\uD83E\uDD32\uD83C\uDFFB":"1f932-1f3fb","\uD83E\uDD32\uD83C\uDFFC":"1f932-1f3fc","\uD83E\uDD32\uD83C\uDFFD":"1f932-1f3fd","\uD83E\uDD32\uD83C\uDFFE":"1f932-1f3fe","\uD83E\uDD32\uD83C\uDFFF":"1f932-1f3ff","\uD83E\uDDD1\uD83C\uDFFB":"1f9d1-1f3fb","\uD83E\uDDD1\uD83C\uDFFC":"1f9d1-1f3fc","\uD83E\uDDD1\uD83C\uDFFD":"1f9d1-1f3fd","\uD83E\uDDD1\uD83C\uDFFE":"1f9d1-1f3fe","\uD83E\uDDD1\uD83C\uDFFF":"1f9d1-1f3ff","\uD83E\uDDD2\uD83C\uDFFB":"1f9d2-1f3fb","\uD83E\uDDD2\uD83C\uDFFC":"1f9d2-1f3fc","\uD83E\uDDD2\uD83C\uDFFD":"1f9d2-1f3fd","\uD83E\uDDD2\uD83C\uDFFE":"1f9d2-1f3fe","\uD83E\uDDD2\uD83C\uDFFF":"1f9d2-1f3ff","\uD83E\uDDD3\uD83C\uDFFB":"1f9d3-1f3fb","\uD83E\uDDD3\uD83C\uDFFC":"1f9d3-1f3fc","\uD83E\uDDD3\uD83C\uDFFD":"1f9d3-1f3fd","\uD83E\uDDD3\uD83C\uDFFE":"1f9d3-1f3fe","\uD83E\uDDD3\uD83C\uDFFF":"1f9d3-1f3ff","\uD83E\uDDD4\uD83C\uDFFB":"1f9d4-1f3fb","\uD83E\uDDD4\uD83C\uDFFC":"1f9d4-1f3fc","\uD83E\uDDD4\uD83C\uDFFD":"1f9d4-1f3fd","\uD83E\uDDD4\uD83C\uDFFE":"1f9d4-1f3fe","\uD83E\uDDD4\uD83C\uDFFF":"1f9d4-1f3ff","\uD83E\uDDD5\uD83C\uDFFB":"1f9d5-1f3fb","\uD83E\uDDD5\uD83C\uDFFC":"1f9d5-1f3fc","\uD83E\uDDD5\uD83C\uDFFD":"1f9d5-1f3fd","\uD83E\uDDD5\uD83C\uDFFE":"1f9d5-1f3fe","\uD83E\uDDD5\uD83C\uDFFF":"1f9d5-1f3ff","\uD83E\uDDD6\uD83C\uDFFB":"1f9d6-1f3fb","\uD83E\uDDD6\uD83C\uDFFC":"1f9d6-1f3fc","\uD83E\uDDD6\uD83C\uDFFD":"1f9d6-1f3fd","\uD83E\uDDD6\uD83C\uDFFE":"1f9d6-1f3fe","\uD83E\uDDD6\uD83C\uDFFF":"1f9d6-1f3ff","\uD83E\uDDD7\uD83C\uDFFB":"1f9d7-1f3fb","\uD83E\uDDD7\uD83C\uDFFC":"1f9d7-1f3fc","\uD83E\uDDD7\uD83C\uDFFD":"1f9d7-1f3fd","\uD83E\uDDD7\uD83C\uDFFE":"1f9d7-1f3fe","\uD83E\uDDD7\uD83C\uDFFF":"1f9d7-1f3ff","\uD83E\uDDD8\uD83C\uDFFB":"1f9d8-1f3fb","\uD83E\uDDD8\uD83C\uDFFC":"1f9d8-1f3fc","\uD83E\uDDD8\uD83C\uDFFD":"1f9d8-1f3fd","\uD83E\uDDD8\uD83C\uDFFE":"1f9d8-1f3fe","\uD83E\uDDD8\uD83C\uDFFF":"1f9d8-1f3ff","\uD83E\uDDD9\uD83C\uDFFB":"1f9d9-1f3fb","\uD83E\uDDD9\uD83C\uDFFC":"1f9d9-1f3fc","\uD83E\uDDD9\uD83C\uDFFD":"1f9d9-1f3fd","\uD83E\uDDD9\uD83C\uDFFE":"1f9d9-1f3fe","\uD83E\uDDD9\uD83C\uDFFF":"1f9d9-1f3ff","\uD83E\uDDDA\uD83C\uDFFB":"1f9da-1f3fb","\uD83E\uDDDA\uD83C\uDFFC":"1f9da-1f3fc","\uD83E\uDDDA\uD83C\uDFFD":"1f9da-1f3fd","\uD83E\uDDDA\uD83C\uDFFE":"1f9da-1f3fe","\uD83E\uDDDA\uD83C\uDFFF":"1f9da-1f3ff","\uD83E\uDDDB\uD83C\uDFFB":"1f9db-1f3fb","\uD83E\uDDDB\uD83C\uDFFC":"1f9db-1f3fc","\uD83E\uDDDB\uD83C\uDFFD":"1f9db-1f3fd","\uD83E\uDDDB\uD83C\uDFFE":"1f9db-1f3fe","\uD83E\uDDDB\uD83C\uDFFF":"1f9db-1f3ff","\uD83E\uDDDC\uD83C\uDFFB":"1f9dc-1f3fb","\uD83E\uDDDC\uD83C\uDFFC":"1f9dc-1f3fc","\uD83E\uDDDC\uD83C\uDFFD":"1f9dc-1f3fd","\uD83E\uDDDC\uD83C\uDFFE":"1f9dc-1f3fe","\uD83E\uDDDC\uD83C\uDFFF":"1f9dc-1f3ff","\uD83E\uDDDD\uD83C\uDFFB":"1f9dd-1f3fb","\uD83E\uDDDD\uD83C\uDFFC":"1f9dd-1f3fc","\uD83E\uDDDD\uD83C\uDFFD":"1f9dd-1f3fd","\uD83E\uDDDD\uD83C\uDFFE":"1f9dd-1f3fe","\uD83E\uDDDD\uD83C\uDFFF":"1f9dd-1f3ff","\uD83C\uDD7F\uFE0F":"1f17f","\uD83C\uDE02\uFE0F":"1f202","\uD83C\uDE37\uFE0F":"1f237","\uD83C\uDF9E\uFE0F":"1f39e","\uD83C\uDF9F\uFE0F":"1f39f","\uD83C\uDFCB\uFE0F":"1f3cb","\uD83C\uDFCC\uFE0F":"1f3cc","\uD83C\uDFCD\uFE0F":"1f3cd","\uD83C\uDFCE\uFE0F":"1f3ce","\uD83C\uDF96\uFE0F":"1f396","\uD83C\uDF97\uFE0F":"1f397","\uD83C\uDF36\uFE0F":"1f336","\uD83C\uDF27\uFE0F":"1f327","\uD83C\uDF28\uFE0F":"1f328","\uD83C\uDF29\uFE0F":"1f329","\uD83C\uDF2A\uFE0F":"1f32a","\uD83C\uDF2B\uFE0F":"1f32b","\uD83C\uDF2C\uFE0F":"1f32c","\uD83D\uDC3F\uFE0F":"1f43f","\uD83D\uDD77\uFE0F":"1f577","\uD83D\uDD78\uFE0F":"1f578","\uD83C\uDF21\uFE0F":"1f321","\uD83C\uDF99\uFE0F":"1f399","\uD83C\uDF9A\uFE0F":"1f39a","\uD83C\uDF9B\uFE0F":"1f39b","\uD83C\uDFF3\uFE0F":"1f3f3","\uD83C\uDFF5\uFE0F":"1f3f5","\uD83C\uDFF7\uFE0F":"1f3f7","\uD83D\uDCFD\uFE0F":"1f4fd","\uD83D\uDD49\uFE0F":"1f549","\uD83D\uDD4A\uFE0F":"1f54a","\uD83D\uDD6F\uFE0F":"1f56f","\uD83D\uDD70\uFE0F":"1f570","\uD83D\uDD73\uFE0F":"1f573","\uD83D\uDD76\uFE0F":"1f576","\uD83D\uDD79\uFE0F":"1f579","\uD83D\uDD87\uFE0F":"1f587","\uD83D\uDD8A\uFE0F":"1f58a","\uD83D\uDD8B\uFE0F":"1f58b","\uD83D\uDD8C\uFE0F":"1f58c","\uD83D\uDD8D\uFE0F":"1f58d","\uD83D\uDDA5\uFE0F":"1f5a5","\uD83D\uDDA8\uFE0F":"1f5a8","\uD83D\uDDB2\uFE0F":"1f5b2","\uD83D\uDDBC\uFE0F":"1f5bc","\uD83D\uDDC2\uFE0F":"1f5c2","\uD83D\uDDC3\uFE0F":"1f5c3","\uD83D\uDDC4\uFE0F":"1f5c4","\uD83D\uDDD1\uFE0F":"1f5d1","\uD83D\uDDD2\uFE0F":"1f5d2","\uD83D\uDDD3\uFE0F":"1f5d3","\uD83D\uDDDC\uFE0F":"1f5dc","\uD83D\uDDDD\uFE0F":"1f5dd","\uD83D\uDDDE\uFE0F":"1f5de","\uD83D\uDDE1\uFE0F":"1f5e1","\uD83D\uDDE3\uFE0F":"1f5e3","\uD83D\uDDE8\uFE0F":"1f5e8","\uD83D\uDDEF\uFE0F":"1f5ef","\uD83D\uDDF3\uFE0F":"1f5f3","\uD83D\uDDFA\uFE0F":"1f5fa","\uD83D\uDEE0\uFE0F":"1f6e0","\uD83D\uDEE1\uFE0F":"1f6e1","\uD83D\uDEE2\uFE0F":"1f6e2","\uD83D\uDEF0\uFE0F":"1f6f0","\uD83C\uDF7D\uFE0F":"1f37d","\uD83D\uDC41\uFE0F":"1f441","\uD83D\uDD74\uFE0F":"1f574","\uD83D\uDD75\uFE0F":"1f575","\uD83D\uDD90\uFE0F":"1f590","\uD83C\uDFD4\uFE0F":"1f3d4","\uD83C\uDFD5\uFE0F":"1f3d5","\uD83C\uDFD6\uFE0F":"1f3d6","\uD83C\uDFD7\uFE0F":"1f3d7","\uD83C\uDFD8\uFE0F":"1f3d8","\uD83C\uDFD9\uFE0F":"1f3d9","\uD83C\uDFDA\uFE0F":"1f3da","\uD83C\uDFDB\uFE0F":"1f3db","\uD83C\uDFDC\uFE0F":"1f3dc","\uD83C\uDFDD\uFE0F":"1f3dd","\uD83C\uDFDE\uFE0F":"1f3de","\uD83C\uDFDF\uFE0F":"1f3df","\uD83D\uDECB\uFE0F":"1f6cb","\uD83D\uDECD\uFE0F":"1f6cd","\uD83D\uDECE\uFE0F":"1f6ce","\uD83D\uDECF\uFE0F":"1f6cf","\uD83D\uDEE3\uFE0F":"1f6e3","\uD83D\uDEE4\uFE0F":"1f6e4","\uD83D\uDEE5\uFE0F":"1f6e5","\uD83D\uDEE9\uFE0F":"1f6e9","\uD83D\uDEF3\uFE0F":"1f6f3","\u261D\uD83C\uDFFB":"261d-1f3fb","\u261D\uD83C\uDFFC":"261d-1f3fc","\u261D\uD83C\uDFFD":"261d-1f3fd","\u261D\uD83C\uDFFE":"261d-1f3fe","\u261D\uD83C\uDFFF":"261d-1f3ff","\u270C\uD83C\uDFFB":"270c-1f3fb","\u270C\uD83C\uDFFC":"270c-1f3fc","\u270C\uD83C\uDFFD":"270c-1f3fd","\u270C\uD83C\uDFFE":"270c-1f3fe","\u270C\uD83C\uDFFF":"270c-1f3ff","\u270A\uD83C\uDFFB":"270a-1f3fb","\u270A\uD83C\uDFFC":"270a-1f3fc","\u270A\uD83C\uDFFD":"270a-1f3fd","\u270A\uD83C\uDFFE":"270a-1f3fe","\u270A\uD83C\uDFFF":"270a-1f3ff","\u270B\uD83C\uDFFB":"270b-1f3fb","\u270B\uD83C\uDFFC":"270b-1f3fc","\u270B\uD83C\uDFFD":"270b-1f3fd","\u270B\uD83C\uDFFE":"270b-1f3fe","\u270B\uD83C\uDFFF":"270b-1f3ff","\u270D\uD83C\uDFFB":"270d-1f3fb","\u270D\uD83C\uDFFC":"270d-1f3fc","\u270D\uD83C\uDFFD":"270d-1f3fd","\u270D\uD83C\uDFFE":"270d-1f3fe","\u270D\uD83C\uDFFF":"270d-1f3ff","\uD83C\uDF24\uFE0F":"1f324","\uD83C\uDF25\uFE0F":"1f325","\uD83C\uDF26\uFE0F":"1f326","\uD83D\uDDB1\uFE0F":"1f5b1","\u26F9\uD83C\uDFFB":"26f9-1f3fb","\u26F9\uD83C\uDFFC":"26f9-1f3fc","\u26F9\uD83C\uDFFD":"26f9-1f3fd","\u26F9\uD83C\uDFFE":"26f9-1f3fe","\u26F9\uD83C\uDFFF":"26f9-1f3ff","\uD83C\uDD70\uFE0F":"1f170","\uD83C\uDD71\uFE0F":"1f171","\uD83C\uDD7E\uFE0F":"1f17e","#\u20E3":"0023-20e3","0\u20E3":"0030-20e3","1\u20E3":"0031-20e3","2\u20E3":"0032-20e3","3\u20E3":"0033-20e3","4\u20E3":"0034-20e3","5\u20E3":"0035-20e3","6\u20E3":"0036-20e3","7\u20E3":"0037-20e3","8\u20E3":"0038-20e3","9\u20E3":"0039-20e3","\u00A9\uFE0F":"00a9","\u00AE\uFE0F":"00ae","\u203C\uFE0F":"203c","\u2049\uFE0F":"2049","\u2122\uFE0F":"2122","\u2139\uFE0F":"2139","\u2194\uFE0F":"2194","\u2195\uFE0F":"2195","\u2196\uFE0F":"2196","\u2197\uFE0F":"2197","\u2198\uFE0F":"2198","\u2199\uFE0F":"2199","\u21A9\uFE0F":"21a9","\u21AA\uFE0F":"21aa","\u24C2\uFE0F":"24c2","\u25AA\uFE0F":"25aa","\u25AB\uFE0F":"25ab","\u25B6\uFE0F":"25b6","\u25C0\uFE0F":"25c0","\u25FB\uFE0F":"25fb","\u25FC\uFE0F":"25fc","\u2600\uFE0F":"2600","\u2601\uFE0F":"2601","\u260E\uFE0F":"260e","\u2611\uFE0F":"2611","\u261D\uFE0F":"261d","\u263A\uFE0F":"263a","\u2660\uFE0F":"2660","\u2663\uFE0F":"2663","\u2665\uFE0F":"2665","\u2666\uFE0F":"2666","\u2668\uFE0F":"2668","\u267B\uFE0F":"267b","\u26A0\uFE0F":"26a0","\u2702\uFE0F":"2702","\u2708\uFE0F":"2708","\u2709\uFE0F":"2709","\u270C\uFE0F":"270c","\u270F\uFE0F":"270f","\u2712\uFE0F":"2712","\u2714\uFE0F":"2714","\u2716\uFE0F":"2716","\u2733\uFE0F":"2733","\u2734\uFE0F":"2734","\u2744\uFE0F":"2744","\u2747\uFE0F":"2747","\u2764\uFE0F":"2764","\u27A1\uFE0F":"27a1","\u2934\uFE0F":"2934","\u2935\uFE0F":"2935","\u2B05\uFE0F":"2b05","\u2B06\uFE0F":"2b06","\u2B07\uFE0F":"2b07","\u3030\uFE0F":"3030","\u303D\uFE0F":"303d","\u3297\uFE0F":"3297","\u3299\uFE0F":"3299","\u271D\uFE0F":"271d","\u2328\uFE0F":"2328","\u270D\uFE0F":"270d","*\u20E3":"002a-20e3","\u23CF\uFE0F":"23cf","\u23ED\uFE0F":"23ed","\u23EE\uFE0F":"23ee","\u23EF\uFE0F":"23ef","\u23F1\uFE0F":"23f1","\u23F2\uFE0F":"23f2","\u23F8\uFE0F":"23f8","\u23F9\uFE0F":"23f9","\u23FA\uFE0F":"23fa","\u2602\uFE0F":"2602","\u2603\uFE0F":"2603","\u2604\uFE0F":"2604","\u2618\uFE0F":"2618","\u2620\uFE0F":"2620","\u2622\uFE0F":"2622","\u2623\uFE0F":"2623","\u2626\uFE0F":"2626","\u262A\uFE0F":"262a","\u262E\uFE0F":"262e","\u262F\uFE0F":"262f","\u2638\uFE0F":"2638","\u2639\uFE0F":"2639","\u2692\uFE0F":"2692","\u2694\uFE0F":"2694","\u2696\uFE0F":"2696","\u2697\uFE0F":"2697","\u2699\uFE0F":"2699","\u269B\uFE0F":"269b","\u269C\uFE0F":"269c","\u26B0\uFE0F":"26b0","\u26B1\uFE0F":"26b1","\u26C8\uFE0F":"26c8","\u26CF\uFE0F":"26cf","\u26D1\uFE0F":"26d1","\u26D3\uFE0F":"26d3","\u26E9\uFE0F":"26e9","\u26F0\uFE0F":"26f0","\u26F1\uFE0F":"26f1","\u26F4\uFE0F":"26f4","\u26F7\uFE0F":"26f7","\u26F8\uFE0F":"26f8","\u26F9\uFE0F":"26f9","\u2721\uFE0F":"2721","\u2763\uFE0F":"2763","#\uFE0F":"0023","*\uFE0F":"002a","0\uFE0F":"0030","1\uFE0F":"0031","2\uFE0F":"0032","3\uFE0F":"0033","4\uFE0F":"0034","5\uFE0F":"0035","6\uFE0F":"0036","7\uFE0F":"0037","8\uFE0F":"0038","9\uFE0F":"0039","\u2640\uFE0F":"2640","\u2642\uFE0F":"2642","\u2695\uFE0F":"2695","\uD83E\uDD49":"1f949","\uD83E\uDD48":"1f948","\uD83E\uDD47":"1f947","\uD83E\uDD3A":"1f93a","\uD83E\uDD45":"1f945","\uD83E\uDD3E":"1f93e","\uD83C\uDDFF":"1f1ff","\uD83E\uDD3D":"1f93d","\uD83E\uDD4B":"1f94b","\uD83E\uDD4A":"1f94a","\uD83E\uDD3C":"1f93c","\uD83E\uDD39":"1f939","\uD83E\uDD38":"1f938","\uD83D\uDEF6":"1f6f6","\uD83D\uDEF5":"1f6f5","\uD83D\uDEF4":"1f6f4","\uD83D\uDED2":"1f6d2","\uD83C\uDC04":"1f004","\uD83C\uDCCF":"1f0cf","\uD83D\uDED1":"1f6d1","\uD83C\uDD8E":"1f18e","\uD83C\uDD91":"1f191","\uD83C\uDDFE":"1f1fe","\uD83C\uDD92":"1f192","\uD83C\uDD93":"1f193","\uD83C\uDD94":"1f194","\uD83C\uDD95":"1f195","\uD83C\uDD96":"1f196","\uD83C\uDD97":"1f197","\uD83C\uDD98":"1f198","\uD83E\uDD44":"1f944","\uD83C\uDD99":"1f199","\uD83C\uDD9A":"1f19a","\uD83E\uDD42":"1f942","\uD83E\uDD43":"1f943","\uD83C\uDE01":"1f201","\uD83C\uDE1A":"1f21a","\uD83C\uDE2F":"1f22f","\uD83E\uDD59":"1f959","\uD83C\uDE32":"1f232","\uD83C\uDE33":"1f233","\uD83C\uDE34":"1f234","\uD83C\uDE35":"1f235","\uD83C\uDE36":"1f236","\uD83E\uDD58":"1f958","\uD83C\uDE38":"1f238","\uD83C\uDE39":"1f239","\uD83E\uDD57":"1f957","\uD83C\uDE3A":"1f23a","\uD83C\uDE50":"1f250","\uD83C\uDE51":"1f251","\uD83C\uDF00":"1f300","\uD83E\uDD56":"1f956","\uD83C\uDF01":"1f301","\uD83C\uDF02":"1f302","\uD83C\uDF03":"1f303","\uD83C\uDF04":"1f304","\uD83C\uDF05":"1f305","\uD83C\uDF06":"1f306","\uD83E\uDD55":"1f955","\uD83C\uDF07":"1f307","\uD83C\uDF08":"1f308","\uD83E\uDD54":"1f954","\uD83C\uDF09":"1f309","\uD83C\uDF0A":"1f30a","\uD83C\uDF0B":"1f30b","\uD83C\uDF0C":"1f30c","\uD83C\uDF0F":"1f30f","\uD83C\uDF11":"1f311","\uD83E\uDD53":"1f953","\uD83C\uDF13":"1f313","\uD83C\uDF14":"1f314","\uD83C\uDF15":"1f315","\uD83C\uDF19":"1f319","\uD83C\uDF1B":"1f31b","\uD83C\uDF1F":"1f31f","\uD83E\uDD52":"1f952","\uD83C\uDF20":"1f320","\uD83C\uDF30":"1f330","\uD83E\uDD51":"1f951","\uD83C\uDF31":"1f331","\uD83C\uDF34":"1f334","\uD83C\uDF35":"1f335","\uD83C\uDF37":"1f337","\uD83C\uDF38":"1f338","\uD83C\uDF39":"1f339","\uD83C\uDF3A":"1f33a","\uD83C\uDF3B":"1f33b","\uD83C\uDF3C":"1f33c","\uD83C\uDF3D":"1f33d","\uD83E\uDD50":"1f950","\uD83C\uDF3E":"1f33e","\uD83C\uDF3F":"1f33f","\uD83C\uDF40":"1f340","\uD83C\uDF41":"1f341","\uD83C\uDF42":"1f342","\uD83C\uDF43":"1f343","\uD83C\uDF44":"1f344","\uD83C\uDF45":"1f345","\uD83C\uDF46":"1f346","\uD83C\uDF47":"1f347","\uD83C\uDF48":"1f348","\uD83C\uDF49":"1f349","\uD83C\uDF4A":"1f34a","\uD83E\uDD40":"1f940","\uD83C\uDF4C":"1f34c","\uD83C\uDF4D":"1f34d","\uD83C\uDF4E":"1f34e","\uD83C\uDF4F":"1f34f","\uD83C\uDF51":"1f351","\uD83C\uDF52":"1f352","\uD83C\uDF53":"1f353","\uD83E\uDD8F":"1f98f","\uD83C\uDF54":"1f354","\uD83C\uDF55":"1f355","\uD83C\uDF56":"1f356","\uD83E\uDD8E":"1f98e","\uD83C\uDF57":"1f357","\uD83C\uDF58":"1f358","\uD83C\uDF59":"1f359","\uD83E\uDD8D":"1f98d","\uD83C\uDF5A":"1f35a","\uD83C\uDF5B":"1f35b","\uD83E\uDD8C":"1f98c","\uD83C\uDF5C":"1f35c","\uD83C\uDF5D":"1f35d","\uD83C\uDF5E":"1f35e","\uD83C\uDF5F":"1f35f","\uD83E\uDD8B":"1f98b","\uD83C\uDF60":"1f360","\uD83C\uDF61":"1f361","\uD83E\uDD8A":"1f98a","\uD83C\uDF62":"1f362","\uD83C\uDF63":"1f363","\uD83E\uDD89":"1f989","\uD83C\uDF64":"1f364","\uD83C\uDF65":"1f365","\uD83E\uDD88":"1f988","\uD83C\uDF66":"1f366","\uD83E\uDD87":"1f987","\uD83C\uDF67":"1f367","\uD83C\uDDFD":"1f1fd","\uD83C\uDF68":"1f368","\uD83E\uDD86":"1f986","\uD83C\uDF69":"1f369","\uD83E\uDD85":"1f985","\uD83C\uDF6A":"1f36a","\uD83D\uDDA4":"1f5a4","\uD83C\uDF6B":"1f36b","\uD83C\uDF6C":"1f36c","\uD83C\uDF6D":"1f36d","\uD83C\uDF6E":"1f36e","\uD83C\uDF6F":"1f36f","\uD83E\uDD1E":"1f91e","\uD83C\uDF70":"1f370","\uD83C\uDF71":"1f371","\uD83C\uDF72":"1f372","\uD83E\uDD1D":"1f91d","\uD83C\uDF73":"1f373","\uD83C\uDF74":"1f374","\uD83C\uDF75":"1f375","\uD83C\uDF76":"1f376","\uD83C\uDF77":"1f377","\uD83C\uDF78":"1f378","\uD83C\uDF79":"1f379","\uD83C\uDF7A":"1f37a","\uD83C\uDF7B":"1f37b","\uD83C\uDF80":"1f380","\uD83C\uDF81":"1f381","\uD83C\uDF82":"1f382","\uD83C\uDF83":"1f383","\uD83E\uDD1B":"1f91b","\uD83E\uDD1C":"1f91c","\uD83C\uDF84":"1f384","\uD83C\uDF85":"1f385","\uD83C\uDF86":"1f386","\uD83E\uDD1A":"1f91a","\uD83C\uDF87":"1f387","\uD83C\uDF88":"1f388","\uD83C\uDF89":"1f389","\uD83C\uDF8A":"1f38a","\uD83C\uDF8B":"1f38b","\uD83C\uDF8C":"1f38c","\uD83E\uDD19":"1f919","\uD83C\uDF8D":"1f38d","\uD83D\uDD7A":"1f57a","\uD83C\uDF8E":"1f38e","\uD83E\uDD33":"1f933","\uD83C\uDF8F":"1f38f","\uD83E\uDD30":"1f930","\uD83C\uDF90":"1f390","\uD83E\uDD26":"1f926","\uD83E\uDD37":"1f937","\uD83C\uDF91":"1f391","\uD83C\uDF92":"1f392","\uD83C\uDF93":"1f393","\uD83C\uDFA0":"1f3a0","\uD83C\uDFA1":"1f3a1","\uD83C\uDFA2":"1f3a2","\uD83C\uDFA3":"1f3a3","\uD83C\uDFA4":"1f3a4","\uD83C\uDFA5":"1f3a5","\uD83C\uDFA6":"1f3a6","\uD83C\uDFA7":"1f3a7","\uD83E\uDD36":"1f936","\uD83C\uDFA8":"1f3a8","\uD83E\uDD35":"1f935","\uD83C\uDFA9":"1f3a9","\uD83C\uDFAA":"1f3aa","\uD83E\uDD34":"1f934","\uD83C\uDFAB":"1f3ab","\uD83C\uDFAC":"1f3ac","\uD83C\uDFAD":"1f3ad","\uD83E\uDD27":"1f927","\uD83C\uDFAE":"1f3ae","\uD83C\uDFAF":"1f3af","\uD83C\uDFB0":"1f3b0","\uD83C\uDFB1":"1f3b1","\uD83C\uDFB2":"1f3b2","\uD83C\uDFB3":"1f3b3","\uD83C\uDFB4":"1f3b4","\uD83E\uDD25":"1f925","\uD83C\uDFB5":"1f3b5","\uD83C\uDFB6":"1f3b6","\uD83C\uDFB7":"1f3b7","\uD83E\uDD24":"1f924","\uD83C\uDFB8":"1f3b8","\uD83C\uDFB9":"1f3b9","\uD83C\uDFBA":"1f3ba","\uD83E\uDD23":"1f923","\uD83C\uDFBB":"1f3bb","\uD83C\uDFBC":"1f3bc","\uD83C\uDFBD":"1f3bd","\uD83E\uDD22":"1f922","\uD83C\uDFBE":"1f3be","\uD83C\uDFBF":"1f3bf","\uD83C\uDFC0":"1f3c0","\uD83C\uDFC1":"1f3c1","\uD83E\uDD21":"1f921","\uD83C\uDFC2":"1f3c2","\uD83C\uDFC3":"1f3c3","\uD83C\uDFC4":"1f3c4","\uD83C\uDFC6":"1f3c6","\uD83C\uDFC8":"1f3c8","\uD83C\uDFCA":"1f3ca","\uD83C\uDFE0":"1f3e0","\uD83C\uDFE1":"1f3e1","\uD83C\uDFE2":"1f3e2","\uD83C\uDFE3":"1f3e3","\uD83C\uDFE5":"1f3e5","\uD83C\uDFE6":"1f3e6","\uD83C\uDFE7":"1f3e7","\uD83C\uDFE8":"1f3e8","\uD83C\uDFE9":"1f3e9","\uD83C\uDFEA":"1f3ea","\uD83C\uDFEB":"1f3eb","\uD83C\uDFEC":"1f3ec","\uD83E\uDD20":"1f920","\uD83C\uDFED":"1f3ed","\uD83C\uDFEE":"1f3ee","\uD83C\uDFEF":"1f3ef","\uD83C\uDFF0":"1f3f0","\uD83D\uDC0C":"1f40c","\uD83D\uDC0D":"1f40d","\uD83D\uDC0E":"1f40e","\uD83D\uDC11":"1f411","\uD83D\uDC12":"1f412","\uD83D\uDC14":"1f414","\uD83D\uDC17":"1f417","\uD83D\uDC18":"1f418","\uD83D\uDC19":"1f419","\uD83D\uDC1A":"1f41a","\uD83D\uDC1B":"1f41b","\uD83D\uDC1C":"1f41c","\uD83D\uDC1D":"1f41d","\uD83D\uDC1E":"1f41e","\uD83D\uDC1F":"1f41f","\uD83D\uDC20":"1f420","\uD83D\uDC21":"1f421","\uD83D\uDC22":"1f422","\uD83D\uDC23":"1f423","\uD83D\uDC24":"1f424","\uD83D\uDC25":"1f425","\uD83D\uDC26":"1f426","\uD83D\uDC27":"1f427","\uD83D\uDC28":"1f428","\uD83D\uDC29":"1f429","\uD83D\uDC2B":"1f42b","\uD83D\uDC2C":"1f42c","\uD83D\uDC2D":"1f42d","\uD83D\uDC2E":"1f42e","\uD83D\uDC2F":"1f42f","\uD83D\uDC30":"1f430","\uD83D\uDC31":"1f431","\uD83D\uDC32":"1f432","\uD83D\uDC33":"1f433","\uD83D\uDC34":"1f434","\uD83D\uDC35":"1f435","\uD83D\uDC36":"1f436","\uD83D\uDC37":"1f437","\uD83D\uDC38":"1f438","\uD83D\uDC39":"1f439","\uD83D\uDC3A":"1f43a","\uD83D\uDC3B":"1f43b","\uD83D\uDC3C":"1f43c","\uD83D\uDC3D":"1f43d","\uD83D\uDC3E":"1f43e","\uD83D\uDC40":"1f440","\uD83D\uDC42":"1f442","\uD83D\uDC43":"1f443","\uD83D\uDC44":"1f444","\uD83D\uDC45":"1f445","\uD83D\uDC46":"1f446","\uD83D\uDC47":"1f447","\uD83D\uDC48":"1f448","\uD83D\uDC49":"1f449","\uD83D\uDC4A":"1f44a","\uD83D\uDC4B":"1f44b","\uD83D\uDC4C":"1f44c","\uD83D\uDC4D":"1f44d","\uD83D\uDC4E":"1f44e","\uD83D\uDC4F":"1f44f","\uD83D\uDC50":"1f450","\uD83D\uDC51":"1f451","\uD83D\uDC52":"1f452","\uD83D\uDC53":"1f453","\uD83D\uDC54":"1f454","\uD83D\uDC55":"1f455","\uD83D\uDC56":"1f456","\uD83D\uDC57":"1f457","\uD83D\uDC58":"1f458","\uD83D\uDC59":"1f459","\uD83D\uDC5A":"1f45a","\uD83D\uDC5B":"1f45b","\uD83D\uDC5C":"1f45c","\uD83D\uDC5D":"1f45d","\uD83D\uDC5E":"1f45e","\uD83D\uDC5F":"1f45f","\uD83D\uDC60":"1f460","\uD83D\uDC61":"1f461","\uD83D\uDC62":"1f462","\uD83D\uDC63":"1f463","\uD83D\uDC64":"1f464","\uD83D\uDC66":"1f466","\uD83D\uDC67":"1f467","\uD83D\uDC68":"1f468","\uD83D\uDC69":"1f469","\uD83D\uDC6A":"1f46a","\uD83D\uDC6B":"1f46b","\uD83D\uDC6E":"1f46e","\uD83D\uDC6F":"1f46f","\uD83D\uDC70":"1f470","\uD83D\uDC71":"1f471","\uD83D\uDC72":"1f472","\uD83D\uDC73":"1f473","\uD83D\uDC74":"1f474","\uD83D\uDC75":"1f475","\uD83D\uDC76":"1f476","\uD83D\uDC77":"1f477","\uD83D\uDC78":"1f478","\uD83D\uDC79":"1f479","\uD83D\uDC7A":"1f47a","\uD83D\uDC7B":"1f47b","\uD83D\uDC7C":"1f47c","\uD83D\uDC7D":"1f47d","\uD83D\uDC7E":"1f47e","\uD83D\uDC7F":"1f47f","\uD83D\uDC80":"1f480","\uD83D\uDCC7":"1f4c7","\uD83D\uDC81":"1f481","\uD83D\uDC82":"1f482","\uD83D\uDC83":"1f483","\uD83D\uDC84":"1f484","\uD83D\uDC85":"1f485","\uD83D\uDCD2":"1f4d2","\uD83D\uDC86":"1f486","\uD83D\uDCD3":"1f4d3","\uD83D\uDC87":"1f487","\uD83D\uDCD4":"1f4d4","\uD83D\uDC88":"1f488","\uD83D\uDCD5":"1f4d5","\uD83D\uDC89":"1f489","\uD83D\uDCD6":"1f4d6","\uD83D\uDC8A":"1f48a","\uD83D\uDCD7":"1f4d7","\uD83D\uDC8B":"1f48b","\uD83D\uDCD8":"1f4d8","\uD83D\uDC8C":"1f48c","\uD83D\uDCD9":"1f4d9","\uD83D\uDC8D":"1f48d","\uD83D\uDCDA":"1f4da","\uD83D\uDC8E":"1f48e","\uD83D\uDCDB":"1f4db","\uD83D\uDC8F":"1f48f","\uD83D\uDCDC":"1f4dc","\uD83D\uDC90":"1f490","\uD83D\uDCDD":"1f4dd","\uD83D\uDC91":"1f491","\uD83D\uDCDE":"1f4de","\uD83D\uDC92":"1f492","\uD83D\uDCDF":"1f4df","\uD83D\uDCE0":"1f4e0","\uD83D\uDC93":"1f493","\uD83D\uDCE1":"1f4e1","\uD83D\uDCE2":"1f4e2","\uD83D\uDC94":"1f494","\uD83D\uDCE3":"1f4e3","\uD83D\uDCE4":"1f4e4","\uD83D\uDC95":"1f495","\uD83D\uDCE5":"1f4e5","\uD83D\uDCE6":"1f4e6","\uD83D\uDC96":"1f496","\uD83D\uDCE7":"1f4e7","\uD83D\uDCE8":"1f4e8","\uD83D\uDC97":"1f497","\uD83D\uDCE9":"1f4e9","\uD83D\uDCEA":"1f4ea","\uD83D\uDC98":"1f498","\uD83D\uDCEB":"1f4eb","\uD83D\uDCEE":"1f4ee","\uD83D\uDC99":"1f499","\uD83D\uDCF0":"1f4f0","\uD83D\uDCF1":"1f4f1","\uD83D\uDC9A":"1f49a","\uD83D\uDCF2":"1f4f2","\uD83D\uDCF3":"1f4f3","\uD83D\uDC9B":"1f49b","\uD83D\uDCF4":"1f4f4","\uD83D\uDCF6":"1f4f6","\uD83D\uDC9C":"1f49c","\uD83D\uDCF7":"1f4f7","\uD83D\uDCF9":"1f4f9","\uD83D\uDC9D":"1f49d","\uD83D\uDCFA":"1f4fa","\uD83D\uDCFB":"1f4fb","\uD83D\uDC9E":"1f49e","\uD83D\uDCFC":"1f4fc","\uD83D\uDD03":"1f503","\uD83D\uDC9F":"1f49f","\uD83D\uDD0A":"1f50a","\uD83D\uDD0B":"1f50b","\uD83D\uDCA0":"1f4a0","\uD83D\uDD0C":"1f50c","\uD83D\uDD0D":"1f50d","\uD83D\uDCA1":"1f4a1","\uD83D\uDD0E":"1f50e","\uD83D\uDD0F":"1f50f","\uD83D\uDCA2":"1f4a2","\uD83D\uDD10":"1f510","\uD83D\uDD11":"1f511","\uD83D\uDCA3":"1f4a3","\uD83D\uDD12":"1f512","\uD83D\uDD13":"1f513","\uD83D\uDCA4":"1f4a4","\uD83D\uDD14":"1f514","\uD83D\uDD16":"1f516","\uD83D\uDCA5":"1f4a5","\uD83D\uDD17":"1f517","\uD83D\uDD18":"1f518","\uD83D\uDCA6":"1f4a6","\uD83D\uDD19":"1f519","\uD83D\uDD1A":"1f51a","\uD83D\uDCA7":"1f4a7","\uD83D\uDD1B":"1f51b","\uD83D\uDD1C":"1f51c","\uD83D\uDCA8":"1f4a8","\uD83D\uDD1D":"1f51d","\uD83D\uDD1E":"1f51e","\uD83D\uDCA9":"1f4a9","\uD83D\uDD1F":"1f51f","\uD83D\uDCAA":"1f4aa","\uD83D\uDD20":"1f520","\uD83D\uDD21":"1f521","\uD83D\uDCAB":"1f4ab","\uD83D\uDD22":"1f522","\uD83D\uDD23":"1f523","\uD83D\uDCAC":"1f4ac","\uD83D\uDD24":"1f524","\uD83D\uDD25":"1f525","\uD83D\uDCAE":"1f4ae","\uD83D\uDD26":"1f526","\uD83D\uDD27":"1f527","\uD83D\uDCAF":"1f4af","\uD83D\uDD28":"1f528","\uD83D\uDD29":"1f529","\uD83D\uDCB0":"1f4b0","\uD83D\uDD2A":"1f52a","\uD83D\uDD2B":"1f52b","\uD83D\uDCB1":"1f4b1","\uD83D\uDD2E":"1f52e","\uD83D\uDCB2":"1f4b2","\uD83D\uDD2F":"1f52f","\uD83D\uDCB3":"1f4b3","\uD83D\uDD30":"1f530","\uD83D\uDD31":"1f531","\uD83D\uDCB4":"1f4b4","\uD83D\uDD32":"1f532","\uD83D\uDD33":"1f533","\uD83D\uDCB5":"1f4b5","\uD83D\uDD34":"1f534","\uD83D\uDD35":"1f535","\uD83D\uDCB8":"1f4b8","\uD83D\uDD36":"1f536","\uD83D\uDD37":"1f537","\uD83D\uDCB9":"1f4b9","\uD83D\uDD38":"1f538","\uD83D\uDD39":"1f539","\uD83D\uDCBA":"1f4ba","\uD83D\uDD3A":"1f53a","\uD83D\uDD3B":"1f53b","\uD83D\uDCBB":"1f4bb","\uD83D\uDD3C":"1f53c","\uD83D\uDCBC":"1f4bc","\uD83D\uDD3D":"1f53d","\uD83D\uDD50":"1f550","\uD83D\uDCBD":"1f4bd","\uD83D\uDD51":"1f551","\uD83D\uDCBE":"1f4be","\uD83D\uDD52":"1f552","\uD83D\uDCBF":"1f4bf","\uD83D\uDD53":"1f553","\uD83D\uDCC0":"1f4c0","\uD83D\uDD54":"1f554","\uD83D\uDD55":"1f555","\uD83D\uDCC1":"1f4c1","\uD83D\uDD56":"1f556","\uD83D\uDD57":"1f557","\uD83D\uDCC2":"1f4c2","\uD83D\uDD58":"1f558","\uD83D\uDD59":"1f559","\uD83D\uDCC3":"1f4c3","\uD83D\uDD5A":"1f55a","\uD83D\uDD5B":"1f55b","\uD83D\uDCC4":"1f4c4","\uD83D\uDDFB":"1f5fb","\uD83D\uDDFC":"1f5fc","\uD83D\uDCC5":"1f4c5","\uD83D\uDDFD":"1f5fd","\uD83D\uDDFE":"1f5fe","\uD83D\uDCC6":"1f4c6","\uD83D\uDDFF":"1f5ff","\uD83D\uDE01":"1f601","\uD83D\uDE02":"1f602","\uD83D\uDE03":"1f603","\uD83D\uDCC8":"1f4c8","\uD83D\uDE04":"1f604","\uD83D\uDE05":"1f605","\uD83D\uDCC9":"1f4c9","\uD83D\uDE06":"1f606","\uD83D\uDE09":"1f609","\uD83D\uDCCA":"1f4ca","\uD83D\uDE0A":"1f60a","\uD83D\uDE0B":"1f60b","\uD83D\uDCCB":"1f4cb","\uD83D\uDE0C":"1f60c","\uD83D\uDE0D":"1f60d","\uD83D\uDCCC":"1f4cc","\uD83D\uDE0F":"1f60f","\uD83D\uDE12":"1f612","\uD83D\uDCCD":"1f4cd","\uD83D\uDE13":"1f613","\uD83D\uDE14":"1f614","\uD83D\uDCCE":"1f4ce","\uD83D\uDE16":"1f616","\uD83D\uDE18":"1f618","\uD83D\uDCCF":"1f4cf","\uD83D\uDE1A":"1f61a","\uD83D\uDE1C":"1f61c","\uD83D\uDCD0":"1f4d0","\uD83D\uDE1D":"1f61d","\uD83D\uDE1E":"1f61e","\uD83D\uDCD1":"1f4d1","\uD83D\uDE20":"1f620","\uD83D\uDE21":"1f621","\uD83D\uDE22":"1f622","\uD83D\uDE23":"1f623","\uD83D\uDE24":"1f624","\uD83D\uDE25":"1f625","\uD83D\uDE28":"1f628","\uD83D\uDE29":"1f629","\uD83D\uDE2A":"1f62a","\uD83D\uDE2B":"1f62b","\uD83D\uDE2D":"1f62d","\uD83D\uDE30":"1f630","\uD83D\uDE31":"1f631","\uD83D\uDE32":"1f632","\uD83D\uDE33":"1f633","\uD83D\uDE35":"1f635","\uD83D\uDE37":"1f637","\uD83D\uDE38":"1f638","\uD83D\uDE39":"1f639","\uD83D\uDE3A":"1f63a","\uD83D\uDE3B":"1f63b","\uD83D\uDE3C":"1f63c","\uD83D\uDE3D":"1f63d","\uD83D\uDE3E":"1f63e","\uD83D\uDE3F":"1f63f","\uD83D\uDE40":"1f640","\uD83D\uDE45":"1f645","\uD83D\uDE46":"1f646","\uD83D\uDE47":"1f647","\uD83D\uDE48":"1f648","\uD83D\uDE49":"1f649","\uD83D\uDE4A":"1f64a","\uD83D\uDE4B":"1f64b","\uD83D\uDE4C":"1f64c","\uD83D\uDE4D":"1f64d","\uD83D\uDE4E":"1f64e","\uD83D\uDE4F":"1f64f","\uD83D\uDE80":"1f680","\uD83D\uDE83":"1f683","\uD83D\uDE84":"1f684","\uD83D\uDE85":"1f685","\uD83D\uDE87":"1f687","\uD83D\uDE89":"1f689","\uD83D\uDE8C":"1f68c","\uD83D\uDE8F":"1f68f","\uD83D\uDE91":"1f691","\uD83D\uDE92":"1f692","\uD83D\uDE93":"1f693","\uD83D\uDE95":"1f695","\uD83D\uDE97":"1f697","\uD83D\uDE99":"1f699","\uD83D\uDE9A":"1f69a","\uD83D\uDEA2":"1f6a2","\uD83D\uDEA4":"1f6a4","\uD83D\uDEA5":"1f6a5","\uD83D\uDEA7":"1f6a7","\uD83D\uDEA8":"1f6a8","\uD83D\uDEA9":"1f6a9","\uD83D\uDEAA":"1f6aa","\uD83D\uDEAB":"1f6ab","\uD83D\uDEAC":"1f6ac","\uD83D\uDEAD":"1f6ad","\uD83D\uDEB2":"1f6b2","\uD83D\uDEB6":"1f6b6","\uD83D\uDEB9":"1f6b9","\uD83D\uDEBA":"1f6ba","\uD83D\uDEBB":"1f6bb","\uD83D\uDEBC":"1f6bc","\uD83D\uDEBD":"1f6bd","\uD83D\uDEBE":"1f6be","\uD83D\uDEC0":"1f6c0","\uD83E\uDD18":"1f918","\uD83D\uDE00":"1f600","\uD83D\uDE07":"1f607","\uD83D\uDE08":"1f608","\uD83D\uDE0E":"1f60e","\uD83D\uDE10":"1f610","\uD83D\uDE11":"1f611","\uD83D\uDE15":"1f615","\uD83D\uDE17":"1f617","\uD83D\uDE19":"1f619","\uD83D\uDE1B":"1f61b","\uD83D\uDE1F":"1f61f","\uD83D\uDE26":"1f626","\uD83D\uDE27":"1f627","\uD83D\uDE2C":"1f62c","\uD83D\uDE2E":"1f62e","\uD83D\uDE2F":"1f62f","\uD83D\uDE34":"1f634","\uD83D\uDE36":"1f636","\uD83D\uDE81":"1f681","\uD83D\uDE82":"1f682","\uD83D\uDE86":"1f686","\uD83D\uDE88":"1f688","\uD83D\uDE8A":"1f68a","\uD83D\uDE8D":"1f68d","\uD83D\uDE8E":"1f68e","\uD83D\uDE90":"1f690","\uD83D\uDE94":"1f694","\uD83D\uDE96":"1f696","\uD83D\uDE98":"1f698","\uD83D\uDE9B":"1f69b","\uD83D\uDE9C":"1f69c","\uD83D\uDE9D":"1f69d","\uD83D\uDE9E":"1f69e","\uD83D\uDE9F":"1f69f","\uD83D\uDEA0":"1f6a0","\uD83D\uDEA1":"1f6a1","\uD83D\uDEA3":"1f6a3","\uD83D\uDEA6":"1f6a6","\uD83D\uDEAE":"1f6ae","\uD83D\uDEAF":"1f6af","\uD83D\uDEB0":"1f6b0","\uD83D\uDEB1":"1f6b1","\uD83D\uDEB3":"1f6b3","\uD83D\uDEB4":"1f6b4","\uD83D\uDEB5":"1f6b5","\uD83D\uDEB7":"1f6b7","\uD83D\uDEB8":"1f6b8","\uD83D\uDEBF":"1f6bf","\uD83D\uDEC1":"1f6c1","\uD83D\uDEC2":"1f6c2","\uD83D\uDEC3":"1f6c3","\uD83D\uDEC4":"1f6c4","\uD83D\uDEC5":"1f6c5","\uD83C\uDF0D":"1f30d","\uD83C\uDF0E":"1f30e","\uD83C\uDF10":"1f310","\uD83C\uDF12":"1f312","\uD83C\uDF16":"1f316","\uD83C\uDF17":"1f317","\uD83C\uDF18":"1f318","\uD83C\uDF1A":"1f31a","\uD83C\uDF1C":"1f31c","\uD83C\uDF1D":"1f31d","\uD83C\uDF1E":"1f31e","\uD83C\uDF32":"1f332","\uD83C\uDF33":"1f333","\uD83C\uDF4B":"1f34b","\uD83C\uDF50":"1f350","\uD83C\uDF7C":"1f37c","\uD83C\uDFC7":"1f3c7","\uD83C\uDFC9":"1f3c9","\uD83C\uDFE4":"1f3e4","\uD83D\uDC00":"1f400","\uD83D\uDC01":"1f401","\uD83D\uDC02":"1f402","\uD83D\uDC03":"1f403","\uD83D\uDC04":"1f404","\uD83D\uDC05":"1f405","\uD83D\uDC06":"1f406","\uD83D\uDC07":"1f407","\uD83D\uDC08":"1f408","\uD83D\uDC09":"1f409","\uD83D\uDC0A":"1f40a","\uD83D\uDC0B":"1f40b","\uD83D\uDC0F":"1f40f","\uD83D\uDC10":"1f410","\uD83D\uDC13":"1f413","\uD83D\uDC15":"1f415","\uD83D\uDC16":"1f416","\uD83D\uDC2A":"1f42a","\uD83D\uDC65":"1f465","\uD83D\uDC6C":"1f46c","\uD83D\uDC6D":"1f46d","\uD83D\uDCAD":"1f4ad","\uD83D\uDCB6":"1f4b6","\uD83D\uDCB7":"1f4b7","\uD83D\uDCEC":"1f4ec","\uD83D\uDCED":"1f4ed","\uD83D\uDCEF":"1f4ef","\uD83D\uDCF5":"1f4f5","\uD83D\uDD00":"1f500","\uD83D\uDD01":"1f501","\uD83D\uDD02":"1f502","\uD83D\uDD04":"1f504","\uD83D\uDD05":"1f505","\uD83D\uDD06":"1f506","\uD83D\uDD07":"1f507","\uD83D\uDD09":"1f509","\uD83D\uDD15":"1f515","\uD83D\uDD2C":"1f52c","\uD83D\uDD2D":"1f52d","\uD83D\uDD5C":"1f55c","\uD83D\uDD5D":"1f55d","\uD83D\uDD5E":"1f55e","\uD83D\uDD5F":"1f55f","\uD83D\uDD60":"1f560","\uD83D\uDD61":"1f561","\uD83D\uDD62":"1f562","\uD83D\uDD63":"1f563","\uD83D\uDD64":"1f564","\uD83D\uDD65":"1f565","\uD83D\uDD66":"1f566","\uD83D\uDD67":"1f567","\uD83D\uDD08":"1f508","\uD83D\uDE8B":"1f68b","\uD83C\uDFC5":"1f3c5","\uD83C\uDFF4":"1f3f4","\uD83D\uDCF8":"1f4f8","\uD83D\uDECC":"1f6cc","\uD83D\uDD95":"1f595","\uD83D\uDD96":"1f596","\uD83D\uDE41":"1f641","\uD83D\uDE42":"1f642","\uD83D\uDEEB":"1f6eb","\uD83D\uDEEC":"1f6ec","\uD83C\uDFFB":"1f3fb","\uD83C\uDFFC":"1f3fc","\uD83C\uDFFD":"1f3fd","\uD83C\uDFFE":"1f3fe","\uD83C\uDFFF":"1f3ff","\uD83D\uDE43":"1f643","\uD83E\uDD11":"1f911","\uD83E\uDD13":"1f913","\uD83E\uDD17":"1f917","\uD83D\uDE44":"1f644","\uD83E\uDD14":"1f914","\uD83E\uDD10":"1f910","\uD83E\uDD12":"1f912","\uD83E\uDD15":"1f915","\uD83E\uDD16":"1f916","\uD83E\uDD81":"1f981","\uD83E\uDD84":"1f984","\uD83E\uDD82":"1f982","\uD83E\uDD80":"1f980","\uD83E\uDD83":"1f983","\uD83E\uDDC0":"1f9c0","\uD83C\uDF2D":"1f32d","\uD83C\uDF2E":"1f32e","\uD83C\uDF2F":"1f32f","\uD83C\uDF7F":"1f37f","\uD83C\uDF7E":"1f37e","\uD83C\uDFF9":"1f3f9","\uD83C\uDFFA":"1f3fa","\uD83D\uDED0":"1f6d0","\uD83D\uDD4B":"1f54b","\uD83D\uDD4C":"1f54c","\uD83D\uDD4D":"1f54d","\uD83D\uDD4E":"1f54e","\uD83D\uDCFF":"1f4ff","\uD83C\uDFCF":"1f3cf","\uD83C\uDFD0":"1f3d0","\uD83C\uDFD1":"1f3d1","\uD83C\uDFD2":"1f3d2","\uD83C\uDFD3":"1f3d3","\uD83C\uDFF8":"1f3f8","\uD83E\uDD41":"1f941","\uD83E\uDD90":"1f990","\uD83E\uDD91":"1f991","\uD83E\uDD5A":"1f95a","\uD83E\uDD5B":"1f95b","\uD83E\uDD5C":"1f95c","\uD83E\uDD5D":"1f95d","\uD83E\uDD5E":"1f95e","\uD83C\uDDFC":"1f1fc","\uD83C\uDDFB":"1f1fb","\uD83C\uDDFA":"1f1fa","\uD83C\uDDF9":"1f1f9","\uD83C\uDDF8":"1f1f8","\uD83C\uDDF7":"1f1f7","\uD83C\uDDF6":"1f1f6","\uD83C\uDDF5":"1f1f5","\uD83C\uDDF4":"1f1f4","\uD83C\uDDF3":"1f1f3","\uD83C\uDDF2":"1f1f2","\uD83C\uDDF1":"1f1f1","\uD83C\uDDF0":"1f1f0","\uD83C\uDDEF":"1f1ef","\uD83C\uDDEE":"1f1ee","\uD83C\uDDED":"1f1ed","\uD83C\uDDEC":"1f1ec","\uD83C\uDDEB":"1f1eb","\uD83C\uDDEA":"1f1ea","\uD83C\uDDE9":"1f1e9","\uD83C\uDDE8":"1f1e8","\uD83C\uDDE7":"1f1e7","\uD83C\uDDE6":"1f1e6","\uD83D\uDEF7":"1f6f7","\uD83D\uDEF8":"1f6f8","\uD83E\uDD1F":"1f91f","\uD83E\uDD28":"1f928","\uD83E\uDD29":"1f929","\uD83E\uDD2A":"1f92a","\uD83E\uDD2B":"1f92b","\uD83E\uDD2C":"1f92c","\uD83E\uDD2D":"1f92d","\uD83E\uDD2E":"1f92e","\uD83E\uDD2F":"1f92f","\uD83E\uDD31":"1f931","\uD83E\uDD32":"1f932","\uD83E\uDD4C":"1f94c","\uD83E\uDD5F":"1f95f","\uD83E\uDD60":"1f960","\uD83E\uDD61":"1f961","\uD83E\uDD62":"1f962","\uD83E\uDD63":"1f963","\uD83E\uDD64":"1f964","\uD83E\uDD65":"1f965","\uD83E\uDD66":"1f966","\uD83E\uDD67":"1f967","\uD83E\uDD68":"1f968","\uD83E\uDD69":"1f969","\uD83E\uDD6A":"1f96a","\uD83E\uDD6B":"1f96b","\uD83E\uDD92":"1f992","\uD83E\uDD93":"1f993","\uD83E\uDD94":"1f994","\uD83E\uDD95":"1f995","\uD83E\uDD96":"1f996","\uD83E\uDD97":"1f997","\uD83E\uDDD0":"1f9d0","\uD83E\uDDD1":"1f9d1","\uD83E\uDDD2":"1f9d2","\uD83E\uDDD3":"1f9d3","\uD83E\uDDD4":"1f9d4","\uD83E\uDDD5":"1f9d5","\uD83E\uDDD6":"1f9d6","\uD83E\uDDD7":"1f9d7","\uD83E\uDDD8":"1f9d8","\uD83E\uDDD9":"1f9d9","\uD83E\uDDDA":"1f9da","\uD83E\uDDDB":"1f9db","\uD83E\uDDDC":"1f9dc","\uD83E\uDDDD":"1f9dd","\uD83E\uDDDE":"1f9de","\uD83E\uDDDF":"1f9df","\uD83E\uDDE0":"1f9e0","\uD83E\uDDE1":"1f9e1","\uD83E\uDDE2":"1f9e2","\uD83E\uDDE3":"1f9e3","\uD83E\uDDE4":"1f9e4","\uD83E\uDDE5":"1f9e5","\uD83E\uDDE6":"1f9e6","\u231A":"231a","\u231B":"231b","\u23E9":"23e9","\u23EA":"23ea","\u23EB":"23eb","\u23EC":"23ec","\u23F0":"23f0","\u23F3":"23f3","\u25FD":"25fd","\u25FE":"25fe","\u2614":"2614","\u2615":"2615","\u2648":"2648","\u2649":"2649","\u264A":"264a","\u264B":"264b","\u264C":"264c","\u264D":"264d","\u264E":"264e","\u264F":"264f","\u2650":"2650","\u2651":"2651","\u2652":"2652","\u2653":"2653","\u267F":"267f","\u2693":"2693","\u26A1":"26a1","\u26AA":"26aa","\u26AB":"26ab","\u26BD":"26bd","\u26BE":"26be","\u26C4":"26c4","\u26C5":"26c5","\u26CE":"26ce","\u26D4":"26d4","\u26EA":"26ea","\u26F2":"26f2","\u26F3":"26f3","\u26F5":"26f5","\u26FA":"26fa","\u26FD":"26fd","\u2705":"2705","\u270A":"270a","\u270B":"270b","\u2728":"2728","\u274C":"274c","\u274E":"274e","\u2753":"2753","\u2754":"2754","\u2755":"2755","\u2757":"2757","\u2795":"2795","\u2796":"2796","\u2797":"2797","\u27B0":"27b0","\u2B1B":"2b1b","\u2B1C":"2b1c","\u2B50":"2b50","\u2B55":"2b55","\u27BF":"27bf"};
  39235. ns.jsEscapeMapGreedy = {"\uD83D\uDC69\u2764\uD83D\uDC8B\uD83D\uDC69":"1f469-2764-1f48b-1f469","\uD83D\uDC68\u2764\uD83D\uDC8B\uD83D\uDC68":"1f468-2764-1f48b-1f468","\uD83D\uDC69\u2764\uD83D\uDC8B\uD83D\uDC68":"1f469-2764-1f48b-1f468","\uD83D\uDC69\u2764\uD83D\uDC69":"1f469-2764-1f469","\uD83D\uDC68\u2764\uD83D\uDC68":"1f468-2764-1f468","\uD83C\uDFCC\uD83C\uDFFB\u2642":"1f3cc-1f3fb-2642","\uD83C\uDFCC\uD83C\uDFFC\u2642":"1f3cc-1f3fc-2642","\uD83C\uDFCC\uD83C\uDFFD\u2642":"1f3cc-1f3fd-2642","\uD83C\uDFCC\uD83C\uDFFE\u2642":"1f3cc-1f3fe-2642","\uD83C\uDFCC\uD83C\uDFFF\u2642":"1f3cc-1f3ff-2642","\uD83C\uDFCC\uD83C\uDFFB\u2640":"1f3cc-1f3fb-2640","\uD83C\uDFCC\uD83C\uDFFC\u2640":"1f3cc-1f3fc-2640","\uD83C\uDFCC\uD83C\uDFFD\u2640":"1f3cc-1f3fd-2640","\uD83C\uDFCC\uD83C\uDFFE\u2640":"1f3cc-1f3fe-2640","\uD83C\uDFCC\uD83C\uDFFF\u2640":"1f3cc-1f3ff-2640","\uD83D\uDC68\uD83C\uDFFB\u2696":"1f468-1f3fb-2696","\uD83D\uDC68\uD83C\uDFFC\u2696":"1f468-1f3fc-2696","\uD83D\uDC68\uD83C\uDFFD\u2696":"1f468-1f3fd-2696","\uD83D\uDC68\uD83C\uDFFE\u2696":"1f468-1f3fe-2696","\uD83D\uDC68\uD83C\uDFFF\u2696":"1f468-1f3ff-2696","\uD83D\uDC69\uD83C\uDFFB\u2696":"1f469-1f3fb-2696","\uD83D\uDC69\uD83C\uDFFC\u2696":"1f469-1f3fc-2696","\uD83D\uDC69\uD83C\uDFFD\u2696":"1f469-1f3fd-2696","\uD83D\uDC69\uD83C\uDFFE\u2696":"1f469-1f3fe-2696","\uD83D\uDC69\uD83C\uDFFF\u2696":"1f469-1f3ff-2696","\uD83D\uDC68\uD83C\uDFFB\u2708":"1f468-1f3fb-2708","\uD83D\uDC68\uD83C\uDFFC\u2708":"1f468-1f3fc-2708","\uD83D\uDC68\uD83C\uDFFD\u2708":"1f468-1f3fd-2708","\uD83D\uDC68\uD83C\uDFFE\u2708":"1f468-1f3fe-2708","\uD83D\uDC68\uD83C\uDFFF\u2708":"1f468-1f3ff-2708","\uD83D\uDC69\uD83C\uDFFB\u2708":"1f469-1f3fb-2708","\uD83D\uDC69\uD83C\uDFFC\u2708":"1f469-1f3fc-2708","\uD83D\uDC69\uD83C\uDFFD\u2708":"1f469-1f3fd-2708","\uD83D\uDC69\uD83C\uDFFE\u2708":"1f469-1f3fe-2708","\uD83D\uDC69\uD83C\uDFFF\u2708":"1f469-1f3ff-2708","\uD83D\uDC69\u2764\uD83D\uDC68":"1f469-2764-1f468","\uD83D\uDC68\uD83C\uDFFB\u2695":"1f468-1f3fb-2695","\uD83D\uDC68\uD83C\uDFFC\u2695":"1f468-1f3fc-2695","\uD83D\uDC68\uD83C\uDFFD\u2695":"1f468-1f3fd-2695","\uD83D\uDC68\uD83C\uDFFE\u2695":"1f468-1f3fe-2695","\uD83D\uDC68\uD83C\uDFFF\u2695":"1f468-1f3ff-2695","\uD83D\uDC69\uD83C\uDFFB\u2695":"1f469-1f3fb-2695","\uD83D\uDC69\uD83C\uDFFC\u2695":"1f469-1f3fc-2695","\uD83D\uDC69\uD83C\uDFFD\u2695":"1f469-1f3fd-2695","\uD83D\uDC69\uD83C\uDFFE\u2695":"1f469-1f3fe-2695","\uD83D\uDC69\uD83C\uDFFF\u2695":"1f469-1f3ff-2695","\uD83D\uDC6E\uD83C\uDFFB\u2640":"1f46e-1f3fb-2640","\uD83D\uDC6E\uD83C\uDFFB\u2642":"1f46e-1f3fb-2642","\uD83D\uDC6E\uD83C\uDFFC\u2640":"1f46e-1f3fc-2640","\uD83D\uDC6E\uD83C\uDFFC\u2642":"1f46e-1f3fc-2642","\uD83D\uDC6E\uD83C\uDFFD\u2640":"1f46e-1f3fd-2640","\uD83D\uDC6E\uD83C\uDFFD\u2642":"1f46e-1f3fd-2642","\uD83D\uDC6E\uD83C\uDFFE\u2640":"1f46e-1f3fe-2640","\uD83D\uDC6E\uD83C\uDFFE\u2642":"1f46e-1f3fe-2642","\uD83D\uDC6E\uD83C\uDFFF\u2640":"1f46e-1f3ff-2640","\uD83D\uDC6E\uD83C\uDFFF\u2642":"1f46e-1f3ff-2642","\uD83D\uDC71\uD83C\uDFFB\u2640":"1f471-1f3fb-2640","\uD83D\uDC71\uD83C\uDFFB\u2642":"1f471-1f3fb-2642","\uD83D\uDC71\uD83C\uDFFC\u2640":"1f471-1f3fc-2640","\uD83D\uDC71\uD83C\uDFFC\u2642":"1f471-1f3fc-2642","\uD83D\uDC71\uD83C\uDFFD\u2640":"1f471-1f3fd-2640","\uD83D\uDC71\uD83C\uDFFD\u2642":"1f471-1f3fd-2642","\uD83D\uDC71\uD83C\uDFFE\u2640":"1f471-1f3fe-2640","\uD83D\uDC71\uD83C\uDFFE\u2642":"1f471-1f3fe-2642","\uD83D\uDC71\uD83C\uDFFF\u2640":"1f471-1f3ff-2640","\uD83D\uDC71\uD83C\uDFFF\u2642":"1f471-1f3ff-2642","\uD83D\uDC73\uD83C\uDFFB\u2640":"1f473-1f3fb-2640","\uD83D\uDC73\uD83C\uDFFB\u2642":"1f473-1f3fb-2642","\uD83D\uDC73\uD83C\uDFFC\u2640":"1f473-1f3fc-2640","\uD83D\uDC73\uD83C\uDFFC\u2642":"1f473-1f3fc-2642","\uD83D\uDC73\uD83C\uDFFD\u2640":"1f473-1f3fd-2640","\uD83D\uDC73\uD83C\uDFFD\u2642":"1f473-1f3fd-2642","\uD83D\uDC73\uD83C\uDFFE\u2640":"1f473-1f3fe-2640","\uD83D\uDC73\uD83C\uDFFE\u2642":"1f473-1f3fe-2642","\uD83D\uDC73\uD83C\uDFFF\u2640":"1f473-1f3ff-2640","\uD83D\uDC73\uD83C\uDFFF\u2642":"1f473-1f3ff-2642","\uD83D\uDC77\uD83C\uDFFB\u2640":"1f477-1f3fb-2640","\uD83D\uDC77\uD83C\uDFFB\u2642":"1f477-1f3fb-2642","\uD83D\uDC77\uD83C\uDFFC\u2640":"1f477-1f3fc-2640","\uD83D\uDC77\uD83C\uDFFC\u2642":"1f477-1f3fc-2642","\uD83D\uDC77\uD83C\uDFFD\u2640":"1f477-1f3fd-2640","\uD83D\uDC77\uD83C\uDFFD\u2642":"1f477-1f3fd-2642","\uD83D\uDC77\uD83C\uDFFE\u2640":"1f477-1f3fe-2640","\uD83D\uDC77\uD83C\uDFFE\u2642":"1f477-1f3fe-2642","\uD83D\uDC77\uD83C\uDFFF\u2640":"1f477-1f3ff-2640","\uD83D\uDC77\uD83C\uDFFF\u2642":"1f477-1f3ff-2642","\uD83D\uDC82\uD83C\uDFFB\u2640":"1f482-1f3fb-2640","\uD83D\uDC82\uD83C\uDFFB\u2642":"1f482-1f3fb-2642","\uD83D\uDC82\uD83C\uDFFC\u2640":"1f482-1f3fc-2640","\uD83D\uDC82\uD83C\uDFFC\u2642":"1f482-1f3fc-2642","\uD83D\uDC82\uD83C\uDFFD\u2640":"1f482-1f3fd-2640","\uD83D\uDC82\uD83C\uDFFD\u2642":"1f482-1f3fd-2642","\uD83D\uDC82\uD83C\uDFFE\u2640":"1f482-1f3fe-2640","\uD83D\uDC82\uD83C\uDFFE\u2642":"1f482-1f3fe-2642","\uD83D\uDC82\uD83C\uDFFF\u2640":"1f482-1f3ff-2640","\uD83D\uDC82\uD83C\uDFFF\u2642":"1f482-1f3ff-2642","\uD83D\uDD75\uD83C\uDFFB\u2640":"1f575-1f3fb-2640","\uD83D\uDD75\uD83C\uDFFB\u2642":"1f575-1f3fb-2642","\uD83D\uDD75\uD83C\uDFFC\u2640":"1f575-1f3fc-2640","\uD83D\uDD75\uD83C\uDFFC\u2642":"1f575-1f3fc-2642","\uD83D\uDD75\uD83C\uDFFD\u2640":"1f575-1f3fd-2640","\uD83D\uDD75\uD83C\uDFFD\u2642":"1f575-1f3fd-2642","\uD83D\uDD75\uD83C\uDFFE\u2640":"1f575-1f3fe-2640","\uD83D\uDD75\uD83C\uDFFE\u2642":"1f575-1f3fe-2642","\uD83D\uDD75\uD83C\uDFFF\u2640":"1f575-1f3ff-2640","\uD83D\uDD75\uD83C\uDFFF\u2642":"1f575-1f3ff-2642","\uD83C\uDFC3\uD83C\uDFFB\u2640":"1f3c3-1f3fb-2640","\uD83C\uDFC3\uD83C\uDFFB\u2642":"1f3c3-1f3fb-2642","\uD83C\uDFC3\uD83C\uDFFC\u2640":"1f3c3-1f3fc-2640","\uD83C\uDFC3\uD83C\uDFFC\u2642":"1f3c3-1f3fc-2642","\uD83C\uDFC3\uD83C\uDFFD\u2640":"1f3c3-1f3fd-2640","\uD83C\uDFC3\uD83C\uDFFD\u2642":"1f3c3-1f3fd-2642","\uD83C\uDFC3\uD83C\uDFFE\u2640":"1f3c3-1f3fe-2640","\uD83C\uDFC3\uD83C\uDFFE\u2642":"1f3c3-1f3fe-2642","\uD83C\uDFC3\uD83C\uDFFF\u2640":"1f3c3-1f3ff-2640","\uD83C\uDFC3\uD83C\uDFFF\u2642":"1f3c3-1f3ff-2642","\uD83C\uDFC4\uD83C\uDFFB\u2640":"1f3c4-1f3fb-2640","\uD83C\uDFC4\uD83C\uDFFB\u2642":"1f3c4-1f3fb-2642","\uD83C\uDFC4\uD83C\uDFFC\u2640":"1f3c4-1f3fc-2640","\uD83C\uDFC4\uD83C\uDFFC\u2642":"1f3c4-1f3fc-2642","\uD83C\uDFC4\uD83C\uDFFD\u2640":"1f3c4-1f3fd-2640","\uD83C\uDFC4\uD83C\uDFFD\u2642":"1f3c4-1f3fd-2642","\uD83C\uDFC4\uD83C\uDFFE\u2640":"1f3c4-1f3fe-2640","\uD83C\uDFC4\uD83C\uDFFE\u2642":"1f3c4-1f3fe-2642","\uD83C\uDFC4\uD83C\uDFFF\u2640":"1f3c4-1f3ff-2640","\uD83C\uDFC4\uD83C\uDFFF\u2642":"1f3c4-1f3ff-2642","\uD83C\uDFCA\uD83C\uDFFB\u2640":"1f3ca-1f3fb-2640","\uD83C\uDFCA\uD83C\uDFFB\u2642":"1f3ca-1f3fb-2642","\uD83C\uDFCA\uD83C\uDFFC\u2640":"1f3ca-1f3fc-2640","\uD83C\uDFCA\uD83C\uDFFC\u2642":"1f3ca-1f3fc-2642","\uD83C\uDFCA\uD83C\uDFFD\u2640":"1f3ca-1f3fd-2640","\uD83C\uDFCA\uD83C\uDFFD\u2642":"1f3ca-1f3fd-2642","\uD83C\uDFCA\uD83C\uDFFE\u2640":"1f3ca-1f3fe-2640","\uD83C\uDFCA\uD83C\uDFFE\u2642":"1f3ca-1f3fe-2642","\uD83C\uDFCA\uD83C\uDFFF\u2640":"1f3ca-1f3ff-2640","\uD83C\uDFCA\uD83C\uDFFF\u2642":"1f3ca-1f3ff-2642","\uD83C\uDFCB\uD83C\uDFFB\u2640":"1f3cb-1f3fb-2640","\uD83C\uDFCB\uD83C\uDFFB\u2642":"1f3cb-1f3fb-2642","\uD83C\uDFCB\uD83C\uDFFC\u2640":"1f3cb-1f3fc-2640","\uD83C\uDFCB\uD83C\uDFFC\u2642":"1f3cb-1f3fc-2642","\uD83C\uDFCB\uD83C\uDFFD\u2640":"1f3cb-1f3fd-2640","\uD83C\uDFCB\uD83C\uDFFD\u2642":"1f3cb-1f3fd-2642","\uD83C\uDFCB\uD83C\uDFFE\u2640":"1f3cb-1f3fe-2640","\uD83C\uDFCB\uD83C\uDFFE\u2642":"1f3cb-1f3fe-2642","\uD83C\uDFCB\uD83C\uDFFF\u2640":"1f3cb-1f3ff-2640","\uD83C\uDFCB\uD83C\uDFFF\u2642":"1f3cb-1f3ff-2642","\uD83D\uDC86\uD83C\uDFFB\u2640":"1f486-1f3fb-2640","\uD83D\uDC86\uD83C\uDFFB\u2642":"1f486-1f3fb-2642","\uD83D\uDC86\uD83C\uDFFC\u2640":"1f486-1f3fc-2640","\uD83D\uDC86\uD83C\uDFFC\u2642":"1f486-1f3fc-2642","\uD83D\uDC86\uD83C\uDFFD\u2640":"1f486-1f3fd-2640","\uD83D\uDC86\uD83C\uDFFD\u2642":"1f486-1f3fd-2642","\uD83D\uDC86\uD83C\uDFFE\u2640":"1f486-1f3fe-2640","\uD83D\uDC86\uD83C\uDFFE\u2642":"1f486-1f3fe-2642","\uD83D\uDC86\uD83C\uDFFF\u2640":"1f486-1f3ff-2640","\uD83D\uDC86\uD83C\uDFFF\u2642":"1f486-1f3ff-2642","\uD83D\uDC87\uD83C\uDFFB\u2640":"1f487-1f3fb-2640","\uD83D\uDC87\uD83C\uDFFB\u2642":"1f487-1f3fb-2642","\uD83D\uDC87\uD83C\uDFFC\u2640":"1f487-1f3fc-2640","\uD83D\uDC87\uD83C\uDFFC\u2642":"1f487-1f3fc-2642","\uD83D\uDC87\uD83C\uDFFD\u2640":"1f487-1f3fd-2640","\uD83D\uDC87\uD83C\uDFFD\u2642":"1f487-1f3fd-2642","\uD83D\uDC87\uD83C\uDFFE\u2640":"1f487-1f3fe-2640","\uD83D\uDC87\uD83C\uDFFE\u2642":"1f487-1f3fe-2642","\uD83D\uDC87\uD83C\uDFFF\u2640":"1f487-1f3ff-2640","\uD83D\uDC87\uD83C\uDFFF\u2642":"1f487-1f3ff-2642","\uD83D\uDEA3\uD83C\uDFFB\u2640":"1f6a3-1f3fb-2640","\uD83D\uDEA3\uD83C\uDFFB\u2642":"1f6a3-1f3fb-2642","\uD83D\uDEA3\uD83C\uDFFC\u2640":"1f6a3-1f3fc-2640","\uD83D\uDEA3\uD83C\uDFFC\u2642":"1f6a3-1f3fc-2642","\uD83D\uDEA3\uD83C\uDFFD\u2640":"1f6a3-1f3fd-2640","\uD83D\uDEA3\uD83C\uDFFD\u2642":"1f6a3-1f3fd-2642","\uD83D\uDEA3\uD83C\uDFFE\u2640":"1f6a3-1f3fe-2640","\uD83D\uDEA3\uD83C\uDFFE\u2642":"1f6a3-1f3fe-2642","\uD83D\uDEA3\uD83C\uDFFF\u2640":"1f6a3-1f3ff-2640","\uD83D\uDEA3\uD83C\uDFFF\u2642":"1f6a3-1f3ff-2642","\uD83D\uDEB4\uD83C\uDFFB\u2640":"1f6b4-1f3fb-2640","\uD83D\uDEB4\uD83C\uDFFB\u2642":"1f6b4-1f3fb-2642","\uD83D\uDEB4\uD83C\uDFFC\u2640":"1f6b4-1f3fc-2640","\uD83D\uDEB4\uD83C\uDFFC\u2642":"1f6b4-1f3fc-2642","\uD83D\uDEB4\uD83C\uDFFD\u2640":"1f6b4-1f3fd-2640","\uD83D\uDEB4\uD83C\uDFFD\u2642":"1f6b4-1f3fd-2642","\uD83D\uDEB4\uD83C\uDFFE\u2640":"1f6b4-1f3fe-2640","\uD83D\uDEB4\uD83C\uDFFE\u2642":"1f6b4-1f3fe-2642","\uD83D\uDEB4\uD83C\uDFFF\u2640":"1f6b4-1f3ff-2640","\uD83D\uDEB4\uD83C\uDFFF\u2642":"1f6b4-1f3ff-2642","\uD83D\uDEB5\uD83C\uDFFB\u2640":"1f6b5-1f3fb-2640","\uD83D\uDEB5\uD83C\uDFFB\u2642":"1f6b5-1f3fb-2642","\uD83D\uDEB5\uD83C\uDFFC\u2640":"1f6b5-1f3fc-2640","\uD83D\uDEB5\uD83C\uDFFC\u2642":"1f6b5-1f3fc-2642","\uD83D\uDEB5\uD83C\uDFFD\u2640":"1f6b5-1f3fd-2640","\uD83D\uDEB5\uD83C\uDFFD\u2642":"1f6b5-1f3fd-2642","\uD83D\uDEB5\uD83C\uDFFE\u2640":"1f6b5-1f3fe-2640","\uD83D\uDEB5\uD83C\uDFFE\u2642":"1f6b5-1f3fe-2642","\uD83D\uDEB5\uD83C\uDFFF\u2640":"1f6b5-1f3ff-2640","\uD83D\uDEB5\uD83C\uDFFF\u2642":"1f6b5-1f3ff-2642","\uD83D\uDEB6\uD83C\uDFFB\u2640":"1f6b6-1f3fb-2640","\uD83D\uDEB6\uD83C\uDFFB\u2642":"1f6b6-1f3fb-2642","\uD83D\uDEB6\uD83C\uDFFC\u2640":"1f6b6-1f3fc-2640","\uD83D\uDEB6\uD83C\uDFFC\u2642":"1f6b6-1f3fc-2642","\uD83D\uDEB6\uD83C\uDFFD\u2640":"1f6b6-1f3fd-2640","\uD83D\uDEB6\uD83C\uDFFD\u2642":"1f6b6-1f3fd-2642","\uD83D\uDEB6\uD83C\uDFFE\u2640":"1f6b6-1f3fe-2640","\uD83D\uDEB6\uD83C\uDFFE\u2642":"1f6b6-1f3fe-2642","\uD83D\uDEB6\uD83C\uDFFF\u2640":"1f6b6-1f3ff-2640","\uD83D\uDEB6\uD83C\uDFFF\u2642":"1f6b6-1f3ff-2642","\uD83E\uDD38\uD83C\uDFFB\u2640":"1f938-1f3fb-2640","\uD83E\uDD38\uD83C\uDFFB\u2642":"1f938-1f3fb-2642","\uD83E\uDD38\uD83C\uDFFC\u2640":"1f938-1f3fc-2640","\uD83E\uDD38\uD83C\uDFFC\u2642":"1f938-1f3fc-2642","\uD83E\uDD38\uD83C\uDFFD\u2640":"1f938-1f3fd-2640","\uD83E\uDD38\uD83C\uDFFD\u2642":"1f938-1f3fd-2642","\uD83E\uDD38\uD83C\uDFFE\u2640":"1f938-1f3fe-2640","\uD83E\uDD38\uD83C\uDFFE\u2642":"1f938-1f3fe-2642","\uD83E\uDD38\uD83C\uDFFF\u2640":"1f938-1f3ff-2640","\uD83E\uDD38\uD83C\uDFFF\u2642":"1f938-1f3ff-2642","\uD83E\uDD39\uD83C\uDFFB\u2640":"1f939-1f3fb-2640","\uD83E\uDD39\uD83C\uDFFB\u2642":"1f939-1f3fb-2642","\uD83E\uDD39\uD83C\uDFFC\u2640":"1f939-1f3fc-2640","\uD83E\uDD39\uD83C\uDFFC\u2642":"1f939-1f3fc-2642","\uD83E\uDD39\uD83C\uDFFD\u2640":"1f939-1f3fd-2640","\uD83E\uDD39\uD83C\uDFFD\u2642":"1f939-1f3fd-2642","\uD83E\uDD39\uD83C\uDFFE\u2640":"1f939-1f3fe-2640","\uD83E\uDD39\uD83C\uDFFE\u2642":"1f939-1f3fe-2642","\uD83E\uDD39\uD83C\uDFFF\u2640":"1f939-1f3ff-2640","\uD83E\uDD39\uD83C\uDFFF\u2642":"1f939-1f3ff-2642","\uD83E\uDD3D\uD83C\uDFFB\u2640":"1f93d-1f3fb-2640","\uD83E\uDD3D\uD83C\uDFFB\u2642":"1f93d-1f3fb-2642","\uD83E\uDD3D\uD83C\uDFFC\u2640":"1f93d-1f3fc-2640","\uD83E\uDD3D\uD83C\uDFFC\u2642":"1f93d-1f3fc-2642","\uD83E\uDD3D\uD83C\uDFFD\u2640":"1f93d-1f3fd-2640","\uD83E\uDD3D\uD83C\uDFFD\u2642":"1f93d-1f3fd-2642","\uD83E\uDD3D\uD83C\uDFFE\u2640":"1f93d-1f3fe-2640","\uD83E\uDD3D\uD83C\uDFFE\u2642":"1f93d-1f3fe-2642","\uD83E\uDD3D\uD83C\uDFFF\u2640":"1f93d-1f3ff-2640","\uD83E\uDD3D\uD83C\uDFFF\u2642":"1f93d-1f3ff-2642","\uD83E\uDD3E\uD83C\uDFFB\u2640":"1f93e-1f3fb-2640","\uD83E\uDD3E\uD83C\uDFFB\u2642":"1f93e-1f3fb-2642","\uD83E\uDD3E\uD83C\uDFFC\u2640":"1f93e-1f3fc-2640","\uD83E\uDD3E\uD83C\uDFFC\u2642":"1f93e-1f3fc-2642","\uD83E\uDD3E\uD83C\uDFFD\u2640":"1f93e-1f3fd-2640","\uD83E\uDD3E\uD83C\uDFFD\u2642":"1f93e-1f3fd-2642","\uD83E\uDD3E\uD83C\uDFFE\u2640":"1f93e-1f3fe-2640","\uD83E\uDD3E\uD83C\uDFFE\u2642":"1f93e-1f3fe-2642","\uD83E\uDD3E\uD83C\uDFFF\u2640":"1f93e-1f3ff-2640","\uD83E\uDD3E\uD83C\uDFFF\u2642":"1f93e-1f3ff-2642","\uD83D\uDC81\uD83C\uDFFB\u2640":"1f481-1f3fb-2640","\uD83D\uDC81\uD83C\uDFFB\u2642":"1f481-1f3fb-2642","\uD83D\uDC81\uD83C\uDFFC\u2640":"1f481-1f3fc-2640","\uD83D\uDC81\uD83C\uDFFC\u2642":"1f481-1f3fc-2642","\uD83D\uDC81\uD83C\uDFFD\u2640":"1f481-1f3fd-2640","\uD83D\uDC81\uD83C\uDFFD\u2642":"1f481-1f3fd-2642","\uD83D\uDC81\uD83C\uDFFE\u2640":"1f481-1f3fe-2640","\uD83D\uDC81\uD83C\uDFFE\u2642":"1f481-1f3fe-2642","\uD83D\uDC81\uD83C\uDFFF\u2640":"1f481-1f3ff-2640","\uD83D\uDC81\uD83C\uDFFF\u2642":"1f481-1f3ff-2642","\uD83D\uDE45\uD83C\uDFFB\u2640":"1f645-1f3fb-2640","\uD83D\uDE45\uD83C\uDFFB\u2642":"1f645-1f3fb-2642","\uD83D\uDE45\uD83C\uDFFC\u2640":"1f645-1f3fc-2640","\uD83D\uDE45\uD83C\uDFFC\u2642":"1f645-1f3fc-2642","\uD83D\uDE45\uD83C\uDFFD\u2640":"1f645-1f3fd-2640","\uD83D\uDE45\uD83C\uDFFD\u2642":"1f645-1f3fd-2642","\uD83D\uDE45\uD83C\uDFFE\u2640":"1f645-1f3fe-2640","\uD83D\uDE45\uD83C\uDFFE\u2642":"1f645-1f3fe-2642","\uD83D\uDE45\uD83C\uDFFF\u2640":"1f645-1f3ff-2640","\uD83D\uDE45\uD83C\uDFFF\u2642":"1f645-1f3ff-2642","\uD83D\uDE46\uD83C\uDFFB\u2640":"1f646-1f3fb-2640","\uD83D\uDE46\uD83C\uDFFB\u2642":"1f646-1f3fb-2642","\uD83D\uDE46\uD83C\uDFFC\u2640":"1f646-1f3fc-2640","\uD83D\uDE46\uD83C\uDFFC\u2642":"1f646-1f3fc-2642","\uD83D\uDE46\uD83C\uDFFD\u2640":"1f646-1f3fd-2640","\uD83D\uDE46\uD83C\uDFFD\u2642":"1f646-1f3fd-2642","\uD83D\uDE46\uD83C\uDFFE\u2640":"1f646-1f3fe-2640","\uD83D\uDE46\uD83C\uDFFE\u2642":"1f646-1f3fe-2642","\uD83D\uDE46\uD83C\uDFFF\u2640":"1f646-1f3ff-2640","\uD83D\uDE46\uD83C\uDFFF\u2642":"1f646-1f3ff-2642","\uD83D\uDE47\uD83C\uDFFB\u2640":"1f647-1f3fb-2640","\uD83D\uDE47\uD83C\uDFFB\u2642":"1f647-1f3fb-2642","\uD83D\uDE47\uD83C\uDFFC\u2640":"1f647-1f3fc-2640","\uD83D\uDE47\uD83C\uDFFC\u2642":"1f647-1f3fc-2642","\uD83D\uDE47\uD83C\uDFFD\u2640":"1f647-1f3fd-2640","\uD83D\uDE47\uD83C\uDFFD\u2642":"1f647-1f3fd-2642","\uD83D\uDE47\uD83C\uDFFE\u2640":"1f647-1f3fe-2640","\uD83D\uDE47\uD83C\uDFFE\u2642":"1f647-1f3fe-2642","\uD83D\uDE47\uD83C\uDFFF\u2640":"1f647-1f3ff-2640","\uD83D\uDE47\uD83C\uDFFF\u2642":"1f647-1f3ff-2642","\uD83D\uDE4B\uD83C\uDFFB\u2640":"1f64b-1f3fb-2640","\uD83D\uDE4B\uD83C\uDFFB\u2642":"1f64b-1f3fb-2642","\uD83D\uDE4B\uD83C\uDFFC\u2640":"1f64b-1f3fc-2640","\uD83D\uDE4B\uD83C\uDFFC\u2642":"1f64b-1f3fc-2642","\uD83D\uDE4B\uD83C\uDFFD\u2640":"1f64b-1f3fd-2640","\uD83D\uDE4B\uD83C\uDFFD\u2642":"1f64b-1f3fd-2642","\uD83D\uDE4B\uD83C\uDFFE\u2640":"1f64b-1f3fe-2640","\uD83D\uDE4B\uD83C\uDFFE\u2642":"1f64b-1f3fe-2642","\uD83D\uDE4B\uD83C\uDFFF\u2640":"1f64b-1f3ff-2640","\uD83D\uDE4B\uD83C\uDFFF\u2642":"1f64b-1f3ff-2642","\uD83D\uDE4D\uD83C\uDFFB\u2640":"1f64d-1f3fb-2640","\uD83D\uDE4D\uD83C\uDFFB\u2642":"1f64d-1f3fb-2642","\uD83D\uDE4D\uD83C\uDFFC\u2640":"1f64d-1f3fc-2640","\uD83D\uDE4D\uD83C\uDFFC\u2642":"1f64d-1f3fc-2642","\uD83D\uDE4D\uD83C\uDFFD\u2640":"1f64d-1f3fd-2640","\uD83D\uDE4D\uD83C\uDFFD\u2642":"1f64d-1f3fd-2642","\uD83D\uDE4D\uD83C\uDFFE\u2640":"1f64d-1f3fe-2640","\uD83D\uDE4D\uD83C\uDFFE\u2642":"1f64d-1f3fe-2642","\uD83D\uDE4D\uD83C\uDFFF\u2640":"1f64d-1f3ff-2640","\uD83D\uDE4D\uD83C\uDFFF\u2642":"1f64d-1f3ff-2642","\uD83D\uDE4E\uD83C\uDFFB\u2640":"1f64e-1f3fb-2640","\uD83D\uDE4E\uD83C\uDFFB\u2642":"1f64e-1f3fb-2642","\uD83D\uDE4E\uD83C\uDFFC\u2640":"1f64e-1f3fc-2640","\uD83D\uDE4E\uD83C\uDFFC\u2642":"1f64e-1f3fc-2642","\uD83D\uDE4E\uD83C\uDFFD\u2640":"1f64e-1f3fd-2640","\uD83D\uDE4E\uD83C\uDFFD\u2642":"1f64e-1f3fd-2642","\uD83D\uDE4E\uD83C\uDFFE\u2640":"1f64e-1f3fe-2640","\uD83D\uDE4E\uD83C\uDFFE\u2642":"1f64e-1f3fe-2642","\uD83D\uDE4E\uD83C\uDFFF\u2640":"1f64e-1f3ff-2640","\uD83D\uDE4E\uD83C\uDFFF\u2642":"1f64e-1f3ff-2642","\uD83E\uDD26\uD83C\uDFFB\u2640":"1f926-1f3fb-2640","\uD83E\uDD26\uD83C\uDFFB\u2642":"1f926-1f3fb-2642","\uD83E\uDD26\uD83C\uDFFC\u2640":"1f926-1f3fc-2640","\uD83E\uDD26\uD83C\uDFFC\u2642":"1f926-1f3fc-2642","\uD83E\uDD26\uD83C\uDFFD\u2640":"1f926-1f3fd-2640","\uD83E\uDD26\uD83C\uDFFD\u2642":"1f926-1f3fd-2642","\uD83E\uDD26\uD83C\uDFFE\u2640":"1f926-1f3fe-2640","\uD83E\uDD26\uD83C\uDFFE\u2642":"1f926-1f3fe-2642","\uD83E\uDD26\uD83C\uDFFF\u2640":"1f926-1f3ff-2640","\uD83E\uDD26\uD83C\uDFFF\u2642":"1f926-1f3ff-2642","\uD83E\uDD37\uD83C\uDFFB\u2640":"1f937-1f3fb-2640","\uD83E\uDD37\uD83C\uDFFB\u2642":"1f937-1f3fb-2642","\uD83E\uDD37\uD83C\uDFFC\u2640":"1f937-1f3fc-2640","\uD83E\uDD37\uD83C\uDFFC\u2642":"1f937-1f3fc-2642","\uD83E\uDD37\uD83C\uDFFD\u2640":"1f937-1f3fd-2640","\uD83E\uDD37\uD83C\uDFFD\u2642":"1f937-1f3fd-2642","\uD83E\uDD37\uD83C\uDFFE\u2640":"1f937-1f3fe-2640","\uD83E\uDD37\uD83C\uDFFE\u2642":"1f937-1f3fe-2642","\uD83E\uDD37\uD83C\uDFFF\u2640":"1f937-1f3ff-2640","\uD83E\uDD37\uD83C\uDFFF\u2642":"1f937-1f3ff-2642","\uD83E\uDDD9\uD83C\uDFFB\u2640":"1f9d9-1f3fb-2640","\uD83E\uDDD9\uD83C\uDFFB\u2642":"1f9d9-1f3fb-2642","\uD83E\uDDD9\uD83C\uDFFC\u2640":"1f9d9-1f3fc-2640","\uD83E\uDDD9\uD83C\uDFFC\u2642":"1f9d9-1f3fc-2642","\uD83E\uDDD9\uD83C\uDFFD\u2640":"1f9d9-1f3fd-2640","\uD83E\uDDD9\uD83C\uDFFD\u2642":"1f9d9-1f3fd-2642","\uD83E\uDDD9\uD83C\uDFFE\u2640":"1f9d9-1f3fe-2640","\uD83E\uDDD9\uD83C\uDFFE\u2642":"1f9d9-1f3fe-2642","\uD83E\uDDD9\uD83C\uDFFF\u2640":"1f9d9-1f3ff-2640","\uD83E\uDDD9\uD83C\uDFFF\u2642":"1f9d9-1f3ff-2642","\uD83E\uDDDA\uD83C\uDFFB\u2640":"1f9da-1f3fb-2640","\uD83E\uDDDA\uD83C\uDFFB\u2642":"1f9da-1f3fb-2642","\uD83E\uDDDA\uD83C\uDFFC\u2640":"1f9da-1f3fc-2640","\uD83E\uDDDA\uD83C\uDFFC\u2642":"1f9da-1f3fc-2642","\uD83E\uDDDA\uD83C\uDFFD\u2640":"1f9da-1f3fd-2640","\uD83E\uDDDA\uD83C\uDFFD\u2642":"1f9da-1f3fd-2642","\uD83E\uDDDA\uD83C\uDFFE\u2640":"1f9da-1f3fe-2640","\uD83E\uDDDA\uD83C\uDFFE\u2642":"1f9da-1f3fe-2642","\uD83E\uDDDA\uD83C\uDFFF\u2640":"1f9da-1f3ff-2640","\uD83E\uDDDA\uD83C\uDFFF\u2642":"1f9da-1f3ff-2642","\uD83E\uDDDB\uD83C\uDFFB\u2640":"1f9db-1f3fb-2640","\uD83E\uDDDB\uD83C\uDFFB\u2642":"1f9db-1f3fb-2642","\uD83E\uDDDB\uD83C\uDFFC\u2640":"1f9db-1f3fc-2640","\uD83E\uDDDB\uD83C\uDFFC\u2642":"1f9db-1f3fc-2642","\uD83E\uDDDB\uD83C\uDFFD\u2640":"1f9db-1f3fd-2640","\uD83E\uDDDB\uD83C\uDFFD\u2642":"1f9db-1f3fd-2642","\uD83E\uDDDB\uD83C\uDFFE\u2640":"1f9db-1f3fe-2640","\uD83E\uDDDB\uD83C\uDFFE\u2642":"1f9db-1f3fe-2642","\uD83E\uDDDB\uD83C\uDFFF\u2640":"1f9db-1f3ff-2640","\uD83E\uDDDB\uD83C\uDFFF\u2642":"1f9db-1f3ff-2642","\uD83E\uDDDC\uD83C\uDFFB\u2640":"1f9dc-1f3fb-2640","\uD83E\uDDDC\uD83C\uDFFB\u2642":"1f9dc-1f3fb-2642","\uD83E\uDDDC\uD83C\uDFFC\u2640":"1f9dc-1f3fc-2640","\uD83E\uDDDC\uD83C\uDFFC\u2642":"1f9dc-1f3fc-2642","\uD83E\uDDDC\uD83C\uDFFD\u2640":"1f9dc-1f3fd-2640","\uD83E\uDDDC\uD83C\uDFFD\u2642":"1f9dc-1f3fd-2642","\uD83E\uDDDC\uD83C\uDFFE\u2640":"1f9dc-1f3fe-2640","\uD83E\uDDDC\uD83C\uDFFE\u2642":"1f9dc-1f3fe-2642","\uD83E\uDDDC\uD83C\uDFFF\u2640":"1f9dc-1f3ff-2640","\uD83E\uDDDC\uD83C\uDFFF\u2642":"1f9dc-1f3ff-2642","\uD83E\uDDDD\uD83C\uDFFB\u2640":"1f9dd-1f3fb-2640","\uD83E\uDDDD\uD83C\uDFFB\u2642":"1f9dd-1f3fb-2642","\uD83E\uDDDD\uD83C\uDFFC\u2640":"1f9dd-1f3fc-2640","\uD83E\uDDDD\uD83C\uDFFC\u2642":"1f9dd-1f3fc-2642","\uD83E\uDDDD\uD83C\uDFFD\u2640":"1f9dd-1f3fd-2640","\uD83E\uDDDD\uD83C\uDFFD\u2642":"1f9dd-1f3fd-2642","\uD83E\uDDDD\uD83C\uDFFE\u2640":"1f9dd-1f3fe-2640","\uD83E\uDDDD\uD83C\uDFFE\u2642":"1f9dd-1f3fe-2642","\uD83E\uDDDD\uD83C\uDFFF\u2640":"1f9dd-1f3ff-2640","\uD83E\uDDDD\uD83C\uDFFF\u2642":"1f9dd-1f3ff-2642","\uD83E\uDDD6\uD83C\uDFFB\u2640":"1f9d6-1f3fb-2640","\uD83E\uDDD6\uD83C\uDFFB\u2642":"1f9d6-1f3fb-2642","\uD83E\uDDD6\uD83C\uDFFC\u2640":"1f9d6-1f3fc-2640","\uD83E\uDDD6\uD83C\uDFFC\u2642":"1f9d6-1f3fc-2642","\uD83E\uDDD6\uD83C\uDFFD\u2640":"1f9d6-1f3fd-2640","\uD83E\uDDD6\uD83C\uDFFD\u2642":"1f9d6-1f3fd-2642","\uD83E\uDDD6\uD83C\uDFFE\u2640":"1f9d6-1f3fe-2640","\uD83E\uDDD6\uD83C\uDFFE\u2642":"1f9d6-1f3fe-2642","\uD83E\uDDD6\uD83C\uDFFF\u2640":"1f9d6-1f3ff-2640","\uD83E\uDDD6\uD83C\uDFFF\u2642":"1f9d6-1f3ff-2642","\uD83E\uDDD7\uD83C\uDFFB\u2640":"1f9d7-1f3fb-2640","\uD83E\uDDD7\uD83C\uDFFB\u2642":"1f9d7-1f3fb-2642","\uD83E\uDDD7\uD83C\uDFFC\u2640":"1f9d7-1f3fc-2640","\uD83E\uDDD7\uD83C\uDFFC\u2642":"1f9d7-1f3fc-2642","\uD83E\uDDD7\uD83C\uDFFD\u2640":"1f9d7-1f3fd-2640","\uD83E\uDDD7\uD83C\uDFFD\u2642":"1f9d7-1f3fd-2642","\uD83E\uDDD7\uD83C\uDFFE\u2640":"1f9d7-1f3fe-2640","\uD83E\uDDD7\uD83C\uDFFE\u2642":"1f9d7-1f3fe-2642","\uD83E\uDDD7\uD83C\uDFFF\u2640":"1f9d7-1f3ff-2640","\uD83E\uDDD7\uD83C\uDFFF\u2642":"1f9d7-1f3ff-2642","\uD83E\uDDD8\uD83C\uDFFB\u2640":"1f9d8-1f3fb-2640","\uD83E\uDDD8\uD83C\uDFFB\u2642":"1f9d8-1f3fb-2642","\uD83E\uDDD8\uD83C\uDFFC\u2640":"1f9d8-1f3fc-2640","\uD83E\uDDD8\uD83C\uDFFC\u2642":"1f9d8-1f3fc-2642","\uD83E\uDDD8\uD83C\uDFFD\u2640":"1f9d8-1f3fd-2640","\uD83E\uDDD8\uD83C\uDFFD\u2642":"1f9d8-1f3fd-2642","\uD83E\uDDD8\uD83C\uDFFE\u2640":"1f9d8-1f3fe-2640","\uD83E\uDDD8\uD83C\uDFFE\u2642":"1f9d8-1f3fe-2642","\uD83E\uDDD8\uD83C\uDFFF\u2640":"1f9d8-1f3ff-2640","\uD83E\uDDD8\uD83C\uDFFF\u2642":"1f9d8-1f3ff-2642","\u26F9\uD83C\uDFFB\u2640":"26f9-1f3fb-2640","\u26F9\uD83C\uDFFB\u2642":"26f9-1f3fb-2642","\u26F9\uD83C\uDFFC\u2640":"26f9-1f3fc-2640","\u26F9\uD83C\uDFFC\u2642":"26f9-1f3fc-2642","\u26F9\uD83C\uDFFD\u2640":"26f9-1f3fd-2640","\u26F9\uD83C\uDFFD\u2642":"26f9-1f3fd-2642","\u26F9\uD83C\uDFFE\u2640":"26f9-1f3fe-2640","\u26F9\uD83C\uDFFE\u2642":"26f9-1f3fe-2642","\u26F9\uD83C\uDFFF\u2640":"26f9-1f3ff-2640","\u26F9\uD83C\uDFFF\u2642":"26f9-1f3ff-2642","\uD83C\uDFF3\uD83C\uDF08":"1f3f3-1f308","\uD83D\uDC41\uD83D\uDDE8":"1f441-1f5e8","\uD83D\uDC6F\u2642":"1f46f-2642","\uD83D\uDC6F\u2640":"1f46f-2640","\uD83C\uDFCC\u2642":"1f3cc-2642","\uD83C\uDFCC\u2640":"1f3cc-2640","\uD83E\uDD3C\u2642":"1f93c-2642","\uD83E\uDD3C\u2640":"1f93c-2640","\uD83E\uDD39\u2642":"1f939-2642","\uD83E\uDD39\u2640":"1f939-2640","\uD83E\uDD3E\u2642":"1f93e-2642","\uD83E\uDD3E\u2640":"1f93e-2640","\uD83E\uDD3D\u2642":"1f93d-2642","\uD83E\uDD3D\u2640":"1f93d-2640","\uD83E\uDD38\u2642":"1f938-2642","\uD83E\uDD38\u2640":"1f938-2640","\uD83D\uDEB6\u2642":"1f6b6-2642","\uD83D\uDEB6\u2640":"1f6b6-2640","\uD83D\uDEB5\u2642":"1f6b5-2642","\uD83D\uDEB5\u2640":"1f6b5-2640","\uD83D\uDEB4\u2642":"1f6b4-2642","\uD83D\uDEB4\u2640":"1f6b4-2640","\uD83D\uDEA3\u2642":"1f6a3-2642","\uD83D\uDEA3\u2640":"1f6a3-2640","\uD83C\uDFCB\u2642":"1f3cb-2642","\uD83C\uDFCB\u2640":"1f3cb-2640","\uD83C\uDFCA\u2642":"1f3ca-2642","\uD83C\uDFCA\u2640":"1f3ca-2640","\uD83C\uDFC4\u2642":"1f3c4-2642","\uD83C\uDFC4\u2640":"1f3c4-2640","\uD83C\uDFC3\u2642":"1f3c3-2642","\uD83C\uDFC3\u2640":"1f3c3-2640","\uD83E\uDD37\u2642":"1f937-2642","\uD83E\uDD37\u2640":"1f937-2640","\uD83E\uDD26\u2642":"1f926-2642","\uD83E\uDD26\u2640":"1f926-2640","\uD83D\uDE4E\u2642":"1f64e-2642","\uD83D\uDE4E\u2640":"1f64e-2640","\uD83D\uDE4D\u2642":"1f64d-2642","\uD83D\uDE4D\u2640":"1f64d-2640","\uD83D\uDE4B\u2642":"1f64b-2642","\uD83D\uDE4B\u2640":"1f64b-2640","\uD83D\uDE47\u2642":"1f647-2642","\uD83D\uDE47\u2640":"1f647-2640","\uD83D\uDE46\u2642":"1f646-2642","\uD83D\uDE46\u2640":"1f646-2640","\uD83D\uDE45\u2642":"1f645-2642","\uD83D\uDE45\u2640":"1f645-2640","\uD83D\uDC87\u2642":"1f487-2642","\uD83D\uDC87\u2640":"1f487-2640","\uD83D\uDC86\u2642":"1f486-2642","\uD83D\uDC86\u2640":"1f486-2640","\uD83D\uDC81\u2642":"1f481-2642","\uD83D\uDC81\u2640":"1f481-2640","\uD83D\uDC71\u2642":"1f471-2642","\uD83D\uDC71\u2640":"1f471-2640","\uD83D\uDC73\u2642":"1f473-2642","\uD83D\uDC73\u2640":"1f473-2640","\uD83D\uDC82\u2642":"1f482-2642","\uD83D\uDC82\u2640":"1f482-2640","\uD83D\uDD75\u2642":"1f575-2642","\uD83D\uDD75\u2640":"1f575-2640","\uD83D\uDC77\u2642":"1f477-2642","\uD83D\uDC77\u2640":"1f477-2640","\uD83D\uDC6E\u2642":"1f46e-2642","\uD83D\uDC6E\u2640":"1f46e-2640","\uD83D\uDC68\u2695":"1f468-2695","\uD83D\uDC69\u2695":"1f469-2695","\uD83D\uDC68\u2696":"1f468-2696","\uD83D\uDC69\u2696":"1f469-2696","\uD83D\uDC68\u2708":"1f468-2708","\uD83D\uDC69\u2708":"1f469-2708","\uD83E\uDDD9\u2640":"1f9d9-2640","\uD83E\uDDD9\u2642":"1f9d9-2642","\uD83E\uDDDA\u2640":"1f9da-2640","\uD83E\uDDDA\u2642":"1f9da-2642","\uD83E\uDDDB\u2640":"1f9db-2640","\uD83E\uDDDB\u2642":"1f9db-2642","\uD83E\uDDDC\u2640":"1f9dc-2640","\uD83E\uDDDC\u2642":"1f9dc-2642","\uD83E\uDDDD\u2640":"1f9dd-2640","\uD83E\uDDDD\u2642":"1f9dd-2642","\uD83E\uDDDE\u2640":"1f9de-2640","\uD83E\uDDDE\u2642":"1f9de-2642","\uD83E\uDDDF\u2640":"1f9df-2640","\uD83E\uDDDF\u2642":"1f9df-2642","\uD83E\uDDD6\u2640":"1f9d6-2640","\uD83E\uDDD6\u2642":"1f9d6-2642","\uD83E\uDDD7\u2640":"1f9d7-2640","\uD83E\uDDD7\u2642":"1f9d7-2642","\uD83E\uDDD8\u2640":"1f9d8-2640","\uD83E\uDDD8\u2642":"1f9d8-2642","\u26F9\u2642":"26f9-2642","\u26F9\u2640":"26f9-2640","\uD83C\uDD70":"1f170","\uD83C\uDD71":"1f171","\uD83C\uDD7E":"1f17e","\uD83C\uDD7F":"1f17f","\uD83C\uDE02":"1f202","\uD83C\uDE37":"1f237","\uD83C\uDF9E":"1f39e","\uD83C\uDF9F":"1f39f","\uD83C\uDFCB":"1f3cb","\uD83C\uDFCC":"1f3cc","\uD83C\uDFCD":"1f3cd","\uD83C\uDFCE":"1f3ce","\uD83C\uDF96":"1f396","\uD83C\uDF97":"1f397","\uD83C\uDF36":"1f336","\uD83C\uDF27":"1f327","\uD83C\uDF28":"1f328","\uD83C\uDF29":"1f329","\uD83C\uDF2A":"1f32a","\uD83C\uDF2B":"1f32b","\uD83C\uDF2C":"1f32c","\uD83D\uDC3F":"1f43f","\uD83D\uDD77":"1f577","\uD83D\uDD78":"1f578","\uD83C\uDF21":"1f321","\uD83C\uDF99":"1f399","\uD83C\uDF9A":"1f39a","\uD83C\uDF9B":"1f39b","\uD83C\uDFF3":"1f3f3","\uD83C\uDFF5":"1f3f5","\uD83C\uDFF7":"1f3f7","\uD83D\uDCFD":"1f4fd","\uD83D\uDD49":"1f549","\uD83D\uDD4A":"1f54a","\uD83D\uDD6F":"1f56f","\uD83D\uDD70":"1f570","\uD83D\uDD73":"1f573","\uD83D\uDD76":"1f576","\uD83D\uDD79":"1f579","\uD83D\uDD87":"1f587","\uD83D\uDD8A":"1f58a","\uD83D\uDD8B":"1f58b","\uD83D\uDD8C":"1f58c","\uD83D\uDD8D":"1f58d","\uD83D\uDDA5":"1f5a5","\uD83D\uDDA8":"1f5a8","\uD83D\uDDB2":"1f5b2","\uD83D\uDDBC":"1f5bc","\uD83D\uDDC2":"1f5c2","\uD83D\uDDC3":"1f5c3","\uD83D\uDDC4":"1f5c4","\uD83D\uDDD1":"1f5d1","\uD83D\uDDD2":"1f5d2","\uD83D\uDDD3":"1f5d3","\uD83D\uDDDC":"1f5dc","\uD83D\uDDDD":"1f5dd","\uD83D\uDDDE":"1f5de","\uD83D\uDDE1":"1f5e1","\uD83D\uDDE3":"1f5e3","\uD83D\uDDE8":"1f5e8","\uD83D\uDDEF":"1f5ef","\uD83D\uDDF3":"1f5f3","\uD83D\uDDFA":"1f5fa","\uD83D\uDEE0":"1f6e0","\uD83D\uDEE1":"1f6e1","\uD83D\uDEE2":"1f6e2","\uD83D\uDEF0":"1f6f0","\uD83C\uDF7D":"1f37d","\uD83D\uDC41":"1f441","\uD83D\uDD74":"1f574","\uD83D\uDD75":"1f575","\uD83D\uDD90":"1f590","\uD83C\uDFD4":"1f3d4","\uD83C\uDFD5":"1f3d5","\uD83C\uDFD6":"1f3d6","\uD83C\uDFD7":"1f3d7","\uD83C\uDFD8":"1f3d8","\uD83C\uDFD9":"1f3d9","\uD83C\uDFDA":"1f3da","\uD83C\uDFDB":"1f3db","\uD83C\uDFDC":"1f3dc","\uD83C\uDFDD":"1f3dd","\uD83C\uDFDE":"1f3de","\uD83C\uDFDF":"1f3df","\uD83D\uDECB":"1f6cb","\uD83D\uDECD":"1f6cd","\uD83D\uDECE":"1f6ce","\uD83D\uDECF":"1f6cf","\uD83D\uDEE3":"1f6e3","\uD83D\uDEE4":"1f6e4","\uD83D\uDEE5":"1f6e5","\uD83D\uDEE9":"1f6e9","\uD83D\uDEF3":"1f6f3","\uD83C\uDF24":"1f324","\uD83C\uDF25":"1f325","\uD83C\uDF26":"1f326","\uD83D\uDDB1":"1f5b1","\u00A9":"00a9","\u00AE":"00ae","\u203C":"203c","\u2049":"2049","\u2122":"2122","\u2139":"2139","\u2194":"2194","\u2195":"2195","\u2196":"2196","\u2197":"2197","\u2198":"2198","\u2199":"2199","\u21A9":"21a9","\u21AA":"21aa","\u24C2":"24c2","\u25AA":"25aa","\u25AB":"25ab","\u25B6":"25b6","\u25C0":"25c0","\u25FB":"25fb","\u25FC":"25fc","\u2600":"2600","\u2601":"2601","\u260E":"260e","\u2611":"2611","\u261D":"261d","\u263A":"263a","*":"002a","\u2660":"2660","\u2663":"2663","\u2665":"2665","\u2666":"2666","\u2668":"2668","\u267B":"267b","\u26A0":"26a0","\u2702":"2702","\u2708":"2708","\u2709":"2709","\u270C":"270c","\u270F":"270f","\u2712":"2712","\u2714":"2714","\u2716":"2716","\u2733":"2733","\u2734":"2734","\u2744":"2744","\u2747":"2747","\u2764":"2764","\u27A1":"27a1","\u2934":"2934","\u2935":"2935","\u2B05":"2b05","\u2B06":"2b06","\u2B07":"2b07","\u3030":"3030","\u303D":"303d","\u3297":"3297","\u3299":"3299","#":"0023","\u271D":"271d","\u2328":"2328","\u270D":"270d","\u23CF":"23cf","\u23ED":"23ed","\u23EE":"23ee","\u23EF":"23ef","\u23F1":"23f1","\u23F2":"23f2","\u23F8":"23f8","\u23F9":"23f9","\u23FA":"23fa","\u2602":"2602","\u2603":"2603","\u2604":"2604","\u2618":"2618","\u2620":"2620","\u2622":"2622","\u2623":"2623","\u2626":"2626","\u262A":"262a","\u262E":"262e","\u262F":"262f","\u2638":"2638","\u2639":"2639","\u2692":"2692","\u2694":"2694","\u2696":"2696","\u2697":"2697","\u2699":"2699","\u269B":"269b","\u269C":"269c","\u26B0":"26b0","\u26B1":"26b1","\u26C8":"26c8","\u26CF":"26cf","\u26D1":"26d1","\u26D3":"26d3","\u26E9":"26e9","\u26F0":"26f0","\u26F1":"26f1","\u26F4":"26f4","\u26F7":"26f7","\u26F8":"26f8","\u26F9":"26f9","\u2721":"2721","\u2763":"2763","9":"0039","8":"0038","7":"0037","6":"0036","5":"0035","4":"0034","3":"0033","2":"0032","1":"0031","0":"0030","\u2640":"2640","\u2642":"2642","\u2695":"2695"};
  39236. ns.asciiList = {
  39237. '*\\0/*':'1f646',
  39238. '*\\O/*':'1f646',
  39239. '-___-':'1f611',
  39240. ':\'-)':'1f602',
  39241. '\':-)':'1f605',
  39242. '\':-D':'1f605',
  39243. '>:-)':'1f606',
  39244. '\':-(':'1f613',
  39245. '>:-(':'1f620',
  39246. ':\'-(':'1f622',
  39247. 'O:-)':'1f607',
  39248. '0:-3':'1f607',
  39249. '0:-)':'1f607',
  39250. '0;^)':'1f607',
  39251. 'O;-)':'1f607',
  39252. '0;-)':'1f607',
  39253. 'O:-3':'1f607',
  39254. '-__-':'1f611',
  39255. ':-Þ':'1f61b',
  39256. '</3':'1f494',
  39257. ':\')':'1f602',
  39258. ':-D':'1f603',
  39259. '\':)':'1f605',
  39260. '\'=)':'1f605',
  39261. '\':D':'1f605',
  39262. '\'=D':'1f605',
  39263. '>:)':'1f606',
  39264. '>;)':'1f606',
  39265. '>=)':'1f606',
  39266. ';-)':'1f609',
  39267. '*-)':'1f609',
  39268. ';-]':'1f609',
  39269. ';^)':'1f609',
  39270. '\':(':'1f613',
  39271. '\'=(':'1f613',
  39272. ':-*':'1f618',
  39273. ':^*':'1f618',
  39274. '>:P':'1f61c',
  39275. 'X-P':'1f61c',
  39276. '>:[':'1f61e',
  39277. ':-(':'1f61e',
  39278. ':-[':'1f61e',
  39279. '>:(':'1f620',
  39280. ':\'(':'1f622',
  39281. ';-(':'1f622',
  39282. '>.<':'1f623',
  39283. '#-)':'1f635',
  39284. '%-)':'1f635',
  39285. 'X-)':'1f635',
  39286. '\\0/':'1f646',
  39287. '\\O/':'1f646',
  39288. '0:3':'1f607',
  39289. '0:)':'1f607',
  39290. 'O:)':'1f607',
  39291. 'O=)':'1f607',
  39292. 'O:3':'1f607',
  39293. 'B-)':'1f60e',
  39294. '8-)':'1f60e',
  39295. 'B-D':'1f60e',
  39296. '8-D':'1f60e',
  39297. '-_-':'1f611',
  39298. '>:\\':'1f615',
  39299. '>:/':'1f615',
  39300. ':-/':'1f615',
  39301. ':-.':'1f615',
  39302. ':-P':'1f61b',
  39303. ':Þ':'1f61b',
  39304. ':-b':'1f61b',
  39305. ':-O':'1f62e',
  39306. 'O_O':'1f62e',
  39307. '>:O':'1f62e',
  39308. ':-X':'1f636',
  39309. ':-#':'1f636',
  39310. ':-)':'1f642',
  39311. '(y)':'1f44d',
  39312. '<3':'2764',
  39313. ':D':'1f603',
  39314. '=D':'1f603',
  39315. ';)':'1f609',
  39316. '*)':'1f609',
  39317. ';]':'1f609',
  39318. ';D':'1f609',
  39319. ':*':'1f618',
  39320. '=*':'1f618',
  39321. ':(':'1f61e',
  39322. ':[':'1f61e',
  39323. '=(':'1f61e',
  39324. ':@':'1f620',
  39325. ';(':'1f622',
  39326. 'D:':'1f628',
  39327. ':$':'1f633',
  39328. '=$':'1f633',
  39329. '#)':'1f635',
  39330. '%)':'1f635',
  39331. 'X)':'1f635',
  39332. 'B)':'1f60e',
  39333. '8)':'1f60e',
  39334. ':/':'1f615',
  39335. ':\\':'1f615',
  39336. '=/':'1f615',
  39337. '=\\':'1f615',
  39338. ':L':'1f615',
  39339. '=L':'1f615',
  39340. ':P':'1f61b',
  39341. '=P':'1f61b',
  39342. ':b':'1f61b',
  39343. ':O':'1f62e',
  39344. ':X':'1f636',
  39345. ':#':'1f636',
  39346. '=X':'1f636',
  39347. '=#':'1f636',
  39348. ':)':'1f642',
  39349. '=]':'1f642',
  39350. '=)':'1f642',
  39351. ':]':'1f642'
  39352. };
  39353. ns.asciiRegexp = '(\\*\\\\0\\/\\*|\\*\\\\O\\/\\*|\\-___\\-|\\:\'\\-\\)|\'\\:\\-\\)|\'\\:\\-D|\\>\\:\\-\\)|>\\:\\-\\)|\'\\:\\-\\(|\\>\\:\\-\\(|>\\:\\-\\(|\\:\'\\-\\(|O\\:\\-\\)|0\\:\\-3|0\\:\\-\\)|0;\\^\\)|O;\\-\\)|0;\\-\\)|O\\:\\-3|\\-__\\-|\\:\\-Þ|\\:\\-Þ|\\<\\/3|<\\/3|\\:\'\\)|\\:\\-D|\'\\:\\)|\'\\=\\)|\'\\:D|\'\\=D|\\>\\:\\)|>\\:\\)|\\>;\\)|>;\\)|\\>\\=\\)|>\\=\\)|;\\-\\)|\\*\\-\\)|;\\-\\]|;\\^\\)|\'\\:\\(|\'\\=\\(|\\:\\-\\*|\\:\\^\\*|\\>\\:P|>\\:P|X\\-P|\\>\\:\\[|>\\:\\[|\\:\\-\\(|\\:\\-\\[|\\>\\:\\(|>\\:\\(|\\:\'\\(|;\\-\\(|\\>\\.\\<|>\\.<|#\\-\\)|%\\-\\)|X\\-\\)|\\\\0\\/|\\\\O\\/|0\\:3|0\\:\\)|O\\:\\)|O\\=\\)|O\\:3|B\\-\\)|8\\-\\)|B\\-D|8\\-D|\\-_\\-|\\>\\:\\\\|>\\:\\\\|\\>\\:\\/|>\\:\\/|\\:\\-\\/|\\:\\-\\.|\\:\\-P|\\:Þ|\\:Þ|\\:\\-b|\\:\\-O|O_O|\\>\\:O|>\\:O|\\:\\-X|\\:\\-#|\\:\\-\\)|\\(y\\)|\\<3|<3|\\:D|\\=D|;\\)|\\*\\)|;\\]|;D|\\:\\*|\\=\\*|\\:\\(|\\:\\[|\\=\\(|\\:@|;\\(|D\\:|\\:\\$|\\=\\$|#\\)|%\\)|X\\)|B\\)|8\\)|\\:\\/|\\:\\\\|\\=\\/|\\=\\\\|\\:L|\\=L|\\:P|\\=P|\\:b|\\:O|\\:X|\\:#|\\=X|\\=#|\\:\\)|\\=\\]|\\=\\)|\\:\\])';
  39354. ns.emojiVersion = '3.1'; // you can [optionally] modify this to load alternate emoji versions. see readme for backwards compatibility and version options
  39355. ns.emojiSize = '32';
  39356. ns.greedyMatch = false; // set to true for greedy unicode matching
  39357. ns.imagePathPNG = 'https://cdn.jsdelivr.net/emojione/assets/' + ns.emojiVersion + '/png/';
  39358. ns.defaultPathPNG = ns.imagePathPNG;
  39359. ns.imageTitleTag = true; // set to false to remove title attribute from img tag
  39360. ns.sprites = false; // if this is true then sprite markup will be used
  39361. ns.spriteSize = '32';
  39362. ns.unicodeAlt = true; // use the unicode char as the alt attribute (makes copy and pasting the resulting text better)
  39363. ns.ascii = false; // change to true to convert ascii smileys
  39364. ns.riskyMatchAscii = false; // set true to match ascii without leading/trailing space char
  39365. ns.regShortNames = new RegExp("<object[^>]*>.*?<\/object>|<span[^>]*>.*?<\/span>|<(?:object|embed|svg|img|div|span|p|a)[^>]*>|("+ns.shortnames+")", "gi");
  39366. ns.regAscii = new RegExp("<object[^>]*>.*?<\/object>|<span[^>]*>.*?<\/span>|<(?:object|embed|svg|img|div|span|p|a)[^>]*>|((\\s|^)"+ns.asciiRegexp+"(?=\\s|$|[!,.?]))", "gi");
  39367. ns.regAsciiRisky = new RegExp("<object[^>]*>.*?<\/object>|<span[^>]*>.*?<\/span>|<(?:object|embed|svg|img|div|span|p|a)[^>]*>|(()"+ns.asciiRegexp+"())", "gi");
  39368. ns.regUnicode = new RegExp("<object[^>]*>.*?<\/object>|<span[^>]*>.*?<\/span>|<(?:object|embed|svg|img|div|span|p|a)[^>]*>|(?:\uD83C\uDFF3)\uFE0F?\u200D?(?:\uD83C\uDF08)|(?:\uD83D\uDC41)\uFE0F?\u200D?(?:\uD83D\uDDE8)\uFE0F?|[#-9]\uFE0F?\u20E3|(?:(?:\uD83C\uDFF4)(?:\uDB40[\uDC60-\uDCFF]){1,6})|(?:\uD83C[\uDDE0-\uDDFF]){2}|(?:(?:\uD83D[\uDC68\uDC69]))\uFE0F?(?:\uD83C[\uDFFA-\uDFFF])?\u200D?(?:[\u2695\u2696\u2708]|\uD83C[\uDF3E-\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92])|(?:\uD83D[\uDC68\uDC69]|\uD83E[\uDDD0-\uDDDF])(?:\uD83C[\uDFFA-\uDFFF])?\u200D?[\u2640\u2642\u2695\u2696\u2708]?\uFE0F?|(?:(?:\u2764|\uD83D[\uDC66-\uDC69\uDC8B])[\u200D\uFE0F]{0,2}){1,3}(?:\u2764|\uD83D[\uDC66-\uDC69\uDC8B])|(?:(?:\u2764|\uD83D[\uDC66-\uDC69\uDC8B])\uFE0F?){2,4}|(?:\uD83D[\uDC68\uDC69\uDC6E\uDC71-\uDC87\uDD75\uDE45-\uDE4E]|\uD83E[\uDD26\uDD37]|\uD83C[\uDFC3-\uDFCC]|\uD83E[\uDD38-\uDD3E]|\uD83D[\uDEA3-\uDEB6]|\u26f9|\uD83D\uDC6F)\uFE0F?(?:\uD83C[\uDFFB-\uDFFF])?\u200D?[\u2640\u2642]?\uFE0F?|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85-\uDFCC]|\uD83D[\uDC42-\uDCAA\uDD74-\uDD96\uDE45-\uDE4F\uDEA3-\uDECC]|\uD83E[\uDD18-\uDD3E])\uFE0F?(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u2194-\u2199\u21a9-\u21aa]\uFE0F?|[\u0023\u002a]|[\u3030\u303d]\uFE0F?|(?:\ud83c[\udd70-\udd71]|\ud83c\udd8e|\ud83c[\udd91-\udd9a])\uFE0F?|\u24c2\uFE0F?|[\u3297\u3299]\uFE0F?|(?:\ud83c[\ude01-\ude02]|\ud83c\ude1a|\ud83c\ude2f|\ud83c[\ude32-\ude3a]|\ud83c[\ude50-\ude51])\uFE0F?|[\u203c\u2049]\uFE0F?|[\u25aa-\u25ab\u25b6\u25c0\u25fb-\u25fe]\uFE0F?|[\u00a9\u00ae]\uFE0F?|[\u2122\u2139]\uFE0F?|\ud83c\udc04\uFE0F?|[\u2b05-\u2b07\u2b1b-\u2b1c\u2b50\u2b55]\uFE0F?|[\u231a-\u231b\u2328\u23cf\u23e9-\u23f3\u23f8-\u23fa]\uFE0F?|\ud83c\udccf|[\u2934\u2935]\uFE0F?)|[\u2700-\u27bf]\uFE0F?|[\ud800-\udbff][\udc00-\udfff]\uFE0F?|[\u2600-\u26FF]\uFE0F?|[\u0030-\u0039]\uFE0F", "g");
  39369. ns.toImage = function(str) {
  39370. str = ns.unicodeToImage(str);
  39371. str = ns.shortnameToImage(str);
  39372. return str;
  39373. };
  39374. // Uses toShort to transform all unicode into a standard shortname
  39375. // then transforms the shortname into unicode
  39376. // This is done for standardization when converting several unicode types
  39377. ns.unifyUnicode = function(str) {
  39378. str = ns.toShort(str);
  39379. str = ns.shortnameToUnicode(str);
  39380. return str;
  39381. };
  39382. // Replace shortnames (:wink:) with Ascii equivalents ( ;^) )
  39383. // Useful for systems that dont support unicode nor images
  39384. ns.shortnameToAscii = function(str) {
  39385. var unicode,
  39386. // something to keep in mind here is that array flip will destroy
  39387. // half of the ascii text "emojis" because the unicode numbers are duplicated
  39388. // this is ok for what it's being used for
  39389. unicodeToAscii = ns.objectFlip(ns.asciiList);
  39390. str = str.replace(ns.regShortNames, function(shortname) {
  39391. if( (typeof shortname === 'undefined') || (shortname === '') || (!(shortname in ns.emojioneList)) ) {
  39392. // if the shortname doesnt exist just return the entire match
  39393. return shortname;
  39394. }
  39395. else {
  39396. unicode = ns.emojioneList[shortname].uc_output;
  39397. if(typeof unicodeToAscii[unicode] !== 'undefined') {
  39398. return unicodeToAscii[unicode];
  39399. } else {
  39400. return shortname;
  39401. }
  39402. }
  39403. });
  39404. return str;
  39405. };
  39406. // will output unicode from shortname
  39407. // useful for sending emojis back to mobile devices
  39408. ns.shortnameToUnicode = function(str) {
  39409. // replace regular shortnames first
  39410. var unicode,fname;
  39411. str = str.replace(ns.regShortNames, function(shortname) {
  39412. if( (typeof shortname === 'undefined') || (shortname === '') || (!(shortname in ns.emojioneList)) ) {
  39413. // if the shortname doesnt exist just return the entire matchhju
  39414. return shortname;
  39415. }
  39416. unicode = ns.emojioneList[shortname].uc_output.toUpperCase();
  39417. fname = ns.emojioneList[shortname].uc_base;
  39418. return ns.convert(unicode);
  39419. });
  39420. // if ascii smileys are turned on, then we'll replace them!
  39421. if (ns.ascii) {
  39422. var asciiRX = ns.riskyMatchAscii ? ns.regAsciiRisky : ns.regAscii;
  39423. str = str.replace(asciiRX, function(entire, m1, m2, m3) {
  39424. if( (typeof m3 === 'undefined') || (m3 === '') || (!(ns.unescapeHTML(m3) in ns.asciiList)) ) {
  39425. // if the ascii doesnt exist just return the entire match
  39426. return entire;
  39427. }
  39428. m3 = ns.unescapeHTML(m3);
  39429. unicode = ns.asciiList[m3].toUpperCase();
  39430. return m2+ns.convert(unicode);
  39431. });
  39432. }
  39433. return str;
  39434. };
  39435. ns.shortnameToImage = function(str) {
  39436. // replace regular shortnames first
  39437. var replaceWith,shortname,unicode,fname,alt,category,title,size,ePath;
  39438. var mappedUnicode = ns.mapUnicodeToShort();
  39439. str = str.replace(ns.regShortNames, function(shortname) {
  39440. if( (typeof shortname === 'undefined') || (shortname === '') || (ns.shortnames.indexOf(shortname) === -1) ) {
  39441. // if the shortname doesnt exist just return the entire match
  39442. return shortname;
  39443. }
  39444. else {
  39445. // map shortname to parent
  39446. if (!ns.emojioneList[shortname]) {
  39447. for ( var emoji in ns.emojioneList ) {
  39448. if (!ns.emojioneList.hasOwnProperty(emoji) || (emoji === '')) continue;
  39449. if (ns.emojioneList[emoji].shortnames.indexOf(shortname) === -1) continue;
  39450. shortname = emoji;
  39451. break;
  39452. }
  39453. }
  39454. unicode = ns.emojioneList[shortname].uc_output;
  39455. fname = ns.emojioneList[shortname].uc_base;
  39456. category = (fname.includes("-1f3f")) ? 'diversity' : ns.emojioneList[shortname].category;
  39457. title = ns.imageTitleTag ? 'title="' + shortname + '"' : '';
  39458. size = (ns.spriteSize == '32' || ns.spriteSize == '64') ? ns.spriteSize : '32';
  39459. //if the image path has not changed, we'll assume the default cdn path, otherwise we'll assume the provided path
  39460. ePath = (ns.imagePathPNG != ns.defaultPathPNG) ? ns.imagePathPNG : ns.defaultPathPNG + ns.emojiSize + '/';
  39461. // depending on the settings, we'll either add the native unicode as the alt tag, otherwise the shortname
  39462. alt = (ns.unicodeAlt) ? ns.convert(unicode.toUpperCase()) : shortname;
  39463. if(ns.sprites) {
  39464. replaceWith = '<span class="emojione emojione-' + size + '-' + category + ' _' + fname + '" ' + title + '>' + alt + '</span>';
  39465. }
  39466. else {
  39467. replaceWith = '<img class="emojione" alt="' + alt + '" ' + title + ' src="' + ePath + fname + '.png"/>';
  39468. }
  39469. return replaceWith;
  39470. }
  39471. });
  39472. // if ascii smileys are turned on, then we'll replace them!
  39473. if (ns.ascii) {
  39474. var asciiRX = ns.riskyMatchAscii ? ns.regAsciiRisky : ns.regAscii;
  39475. str = str.replace(asciiRX, function(entire, m1, m2, m3) {
  39476. if( (typeof m3 === 'undefined') || (m3 === '') || (!(ns.unescapeHTML(m3) in ns.asciiList)) ) {
  39477. // if the ascii doesnt exist just return the entire match
  39478. return entire;
  39479. }
  39480. m3 = ns.unescapeHTML(m3);
  39481. unicode = ns.asciiList[m3];
  39482. shortname = mappedUnicode[unicode];
  39483. category = (unicode.includes("-1f3f")) ? 'diversity' : ns.emojioneList[shortname].category;
  39484. title = ns.imageTitleTag ? 'title="' + ns.escapeHTML(m3) + '"' : '';
  39485. size = (ns.spriteSize == '32' || ns.spriteSize == '64') ? ns.spriteSize : '32';
  39486. //if the image path has not changed, we'll assume the default cdn path, otherwise we'll assume the provided path
  39487. ePath = (ns.imagePathPNG != ns.defaultPathPNG) ? ns.imagePathPNG : ns.defaultPathPNG + ns.emojiSize + '/';
  39488. // depending on the settings, we'll either add the native unicode as the alt tag, otherwise the shortname
  39489. alt = (ns.unicodeAlt) ? ns.convert(unicode.toUpperCase()) : ns.escapeHTML(m3);
  39490. if(ns.sprites) {
  39491. replaceWith = m2+'<span class="emojione emojione-' + size + '-' + category + ' _' + unicode +'" ' + title + '>' + alt + '</span>';
  39492. }
  39493. else {
  39494. replaceWith = m2+'<img class="emojione" alt="'+alt+'" ' + title + ' src="' + ePath + unicode + '.png"/>';
  39495. }
  39496. return replaceWith;
  39497. });
  39498. }
  39499. return str;
  39500. };
  39501. ns.unicodeToImage = function(str) {
  39502. var replaceWith,unicode,short,fname,alt,category,title,size,ePath;
  39503. var mappedUnicode = ns.mapUnicodeToShort();
  39504. var eList = ns.emojioneList;
  39505. str = str.replace(ns.regUnicode, function(unicodeChar) {
  39506. if( (typeof unicodeChar === 'undefined') || (unicodeChar === '') )
  39507. {
  39508. return unicodeChar;
  39509. }
  39510. else if ( unicodeChar in ns.jsEscapeMap )
  39511. {
  39512. fname = ns.jsEscapeMap[unicodeChar];
  39513. }
  39514. else if ( ns.greedyMatch && unicodeChar in ns.jsEscapeMapGreedy )
  39515. {
  39516. fname = ns.jsEscapeMapGreedy[unicodeChar];
  39517. }
  39518. else
  39519. {
  39520. return unicodeChar;
  39521. }
  39522. // then map to shortname and locate the filename
  39523. short = mappedUnicode[fname];
  39524. // then pull the unicode output from emojioneList
  39525. fname = eList[short].uc_base;
  39526. unicode = eList[short].uc_output;
  39527. category = (fname.includes("-1f3f")) ? 'diversity' : eList[short].category;
  39528. size = (ns.spriteSize == '32' || ns.spriteSize == '64') ? ns.spriteSize : '32';
  39529. //if the image path has not changed, we'll assume the default cdn path, otherwise we'll assume the provided path
  39530. ePath = (ns.imagePathPNG != ns.defaultPathPNG) ? ns.imagePathPNG : ns.defaultPathPNG + ns.emojiSize + '/';
  39531. // depending on the settings, we'll either add the native unicode as the alt tag, otherwise the shortname
  39532. alt = (ns.unicodeAlt) ? ns.convert(unicode.toUpperCase()) : short;
  39533. title = ns.imageTitleTag ? 'title="' + short + '"' : '';
  39534. if(ns.sprites) {
  39535. replaceWith = '<span class="emojione emojione-' + size + '-' + category + ' _' + fname + '" ' + title + '>' + alt + '</span>';
  39536. }
  39537. else {
  39538. replaceWith = '<img class="emojione" alt="' + alt + '" ' + title + ' src="' + ePath + fname + '.png"/>';
  39539. }
  39540. return replaceWith;
  39541. });
  39542. // if ascii smileys are turned on, then we'll replace them!
  39543. if (ns.ascii) {
  39544. var asciiRX = ns.riskyMatchAscii ? ns.regAsciiRisky : ns.regAscii;
  39545. str = str.replace(asciiRX, function(entire, m1, m2, m3) {
  39546. if( (typeof m3 === 'undefined') || (m3 === '') || (!(ns.unescapeHTML(m3) in ns.asciiList)) ) {
  39547. // if the ascii doesnt exist just return the entire match
  39548. return entire;
  39549. }
  39550. m3 = ns.unescapeHTML(m3);
  39551. unicode = ns.asciiList[m3];
  39552. shortname = mappedUnicode[unicode];
  39553. category = (unicode.includes("-1f3f")) ? 'diversity' : ns.emojioneList[shortname].category;
  39554. title = ns.imageTitleTag ? 'title="' + ns.escapeHTML(m3) + '"' : '';
  39555. size = (ns.spriteSize == '32' || ns.spriteSize == '64') ? ns.spriteSize : '32';
  39556. //if the image path has not changed, we'll assume the default cdn path, otherwise we'll assume the provided path
  39557. ePath = (ns.imagePathPNG != ns.defaultPathPNG) ? ns.imagePathPNG : ns.defaultPathPNG + ns.emojiSize + '/';
  39558. // depending on the settings, we'll either add the native unicode as the alt tag, otherwise the shortname
  39559. alt = (ns.unicodeAlt) ? ns.convert(unicode.toUpperCase()) : ns.escapeHTML(m3);
  39560. if(ns.sprites) {
  39561. replaceWith = m2+'<span class="emojione emojione-' + size + '-' + category + ' _' + unicode +'" ' + title + '>' + alt + '</span>';
  39562. }
  39563. else {
  39564. replaceWith = m2+'<img class="emojione" alt="'+alt+'" ' + title + ' src="' + ePath + unicode + '.png"/>';
  39565. }
  39566. return replaceWith;
  39567. });
  39568. }
  39569. return str;
  39570. };
  39571. // this is really just unicodeToShortname() but I opted for the shorthand name to match toImage()
  39572. ns.toShort = function(str) {
  39573. var find = ns.unicodeCharRegex();
  39574. return ns.replaceAll(str, find);
  39575. };
  39576. // for converting unicode code points and code pairs to their respective characters
  39577. ns.convert = function(unicode) {
  39578. if(unicode.indexOf("-") > -1) {
  39579. var parts = [];
  39580. var s = unicode.split('-');
  39581. for(var i = 0; i < s.length; i++) {
  39582. var part = parseInt(s[i], 16);
  39583. if (part >= 0x10000 && part <= 0x10FFFF) {
  39584. var hi = Math.floor((part - 0x10000) / 0x400) + 0xD800;
  39585. var lo = ((part - 0x10000) % 0x400) + 0xDC00;
  39586. part = (String.fromCharCode(hi) + String.fromCharCode(lo));
  39587. }
  39588. else {
  39589. part = String.fromCharCode(part);
  39590. }
  39591. parts.push(part);
  39592. }
  39593. return parts.join('');
  39594. }
  39595. else {
  39596. var s = parseInt(unicode, 16);
  39597. if (s >= 0x10000 && s <= 0x10FFFF) {
  39598. var hi = Math.floor((s - 0x10000) / 0x400) + 0xD800;
  39599. var lo = ((s - 0x10000) % 0x400) + 0xDC00;
  39600. return (String.fromCharCode(hi) + String.fromCharCode(lo));
  39601. }
  39602. else {
  39603. return String.fromCharCode(s);
  39604. }
  39605. }
  39606. };
  39607. ns.escapeHTML = function (string) {
  39608. var escaped = {
  39609. '&' : '&amp;',
  39610. '<' : '&lt;',
  39611. '>' : '&gt;',
  39612. '"' : '&quot;',
  39613. '\'': '&#039;'
  39614. };
  39615. return string.replace(/[&<>"']/g, function (match) {
  39616. return escaped[match];
  39617. });
  39618. };
  39619. ns.unescapeHTML = function (string) {
  39620. var unescaped = {
  39621. '&amp;' : '&',
  39622. '&#38;' : '&',
  39623. '&#x26;' : '&',
  39624. '&lt;' : '<',
  39625. '&#60;' : '<',
  39626. '&#x3C;' : '<',
  39627. '&gt;' : '>',
  39628. '&#62;' : '>',
  39629. '&#x3E;' : '>',
  39630. '&quot;' : '"',
  39631. '&#34;' : '"',
  39632. '&#x22;' : '"',
  39633. '&apos;' : '\'',
  39634. '&#39;' : '\'',
  39635. '&#x27;' : '\''
  39636. };
  39637. return string.replace(/&(?:amp|#38|#x26|lt|#60|#x3C|gt|#62|#x3E|apos|#39|#x27|quot|#34|#x22);/ig, function (match) {
  39638. return unescaped[match];
  39639. });
  39640. };
  39641. ns.shortnameConversionMap = function() {
  39642. var map = [], emoji;
  39643. for (emoji in ns.emojioneList) {
  39644. if (!ns.emojioneList.hasOwnProperty(emoji) || (emoji === '')) continue;
  39645. map[ns.convert(ns.emojioneList[emoji].uc_output)] = emoji;
  39646. }
  39647. return map;
  39648. };
  39649. ns.unicodeCharRegex = function() {
  39650. var map = [];
  39651. for (emoji in ns.emojioneList) {
  39652. if (!ns.emojioneList.hasOwnProperty(emoji) || (emoji === '')) continue;
  39653. map.push(ns.convert(ns.emojioneList[emoji].uc_output));
  39654. }
  39655. return map.join('|');
  39656. };
  39657. ns.mapEmojioneList = function (addToMapStorage) {
  39658. for (var shortname in ns.emojioneList) {
  39659. if (!ns.emojioneList.hasOwnProperty(shortname)) { continue; }
  39660. var unicode = ns.emojioneList[shortname].uc_base;
  39661. addToMapStorage(unicode, shortname);
  39662. }
  39663. };
  39664. ns.mapUnicodeToShort = function() {
  39665. if (!ns.memMapShortToUnicode) {
  39666. ns.memMapShortToUnicode = {};
  39667. ns.mapEmojioneList(function (unicode, shortname) {
  39668. ns.memMapShortToUnicode[unicode] = shortname;
  39669. });
  39670. }
  39671. return ns.memMapShortToUnicode;
  39672. };
  39673. ns.memorizeReplacement = function() {
  39674. if (!ns.unicodeReplacementRegEx || !ns.memMapShortToUnicodeCharacters) {
  39675. var unicodeList = [];
  39676. ns.memMapShortToUnicodeCharacters = {};
  39677. ns.mapEmojioneList(function (unicode, shortname) {
  39678. var emojiCharacter = ns.convert(unicode);
  39679. ns.memMapShortToUnicodeCharacters[emojiCharacter] = shortname;
  39680. unicodeList.push(emojiCharacter);
  39681. });
  39682. ns.unicodeReplacementRegEx = unicodeList.join('|');
  39683. }
  39684. };
  39685. ns.mapUnicodeCharactersToShort = function() {
  39686. ns.memorizeReplacement();
  39687. return ns.memMapShortToUnicodeCharacters;
  39688. };
  39689. //reverse an object
  39690. ns.objectFlip = function (obj) {
  39691. var key, tmp_obj = {};
  39692. for (key in obj) {
  39693. if (obj.hasOwnProperty(key)) {
  39694. tmp_obj[obj[key]] = key;
  39695. }
  39696. }
  39697. return tmp_obj;
  39698. };
  39699. ns.escapeRegExp = function(string) {
  39700. return string.replace(/[-[\]{}()*+?.,;:&\\^$#\s]/g, "\\$&");
  39701. };
  39702. ns.replaceAll = function(string, find) {
  39703. var escapedFind = ns.escapeRegExp(find); //sorted largest output to smallest output
  39704. var search = new RegExp("<object[^>]*>.*?<\/object>|<span[^>]*>.*?<\/span>|<(?:object|embed|svg|img|div|span|p|a)[^>]*>|("+escapedFind+")", "gi");
  39705. // callback prevents replacing anything inside of these common html tags as well as between an <object></object> tag
  39706. var replace = function(entire, m1) {
  39707. return ((typeof m1 === 'undefined') || (m1 === '')) ? entire : ns.shortnameConversionMap()[m1];
  39708. };
  39709. return string.replace(search,replace);
  39710. };
  39711. }(this.emojione = this.emojione || {}));
  39712. if(typeof module === "object") module.exports = this.emojione;
  39713. define("emojione", (function (global) {
  39714. return function () {
  39715. var ret, fn;
  39716. return ret || global.emojione;
  39717. };
  39718. }(this)));
  39719. (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
  39720. /**
  39721. * default settings
  39722. *
  39723. * @author Zongmin Lei<leizongmin@gmail.com>
  39724. */
  39725. var FilterCSS = require("cssfilter").FilterCSS;
  39726. var getDefaultCSSWhiteList = require("cssfilter").getDefaultWhiteList;
  39727. var _ = require("./util");
  39728. function getDefaultWhiteList() {
  39729. return {
  39730. a: ["target", "href", "title"],
  39731. abbr: ["title"],
  39732. address: [],
  39733. area: ["shape", "coords", "href", "alt"],
  39734. article: [],
  39735. aside: [],
  39736. audio: ["autoplay", "controls", "loop", "preload", "src"],
  39737. b: [],
  39738. bdi: ["dir"],
  39739. bdo: ["dir"],
  39740. big: [],
  39741. blockquote: ["cite"],
  39742. br: [],
  39743. caption: [],
  39744. center: [],
  39745. cite: [],
  39746. code: [],
  39747. col: ["align", "valign", "span", "width"],
  39748. colgroup: ["align", "valign", "span", "width"],
  39749. dd: [],
  39750. del: ["datetime"],
  39751. details: ["open"],
  39752. div: [],
  39753. dl: [],
  39754. dt: [],
  39755. em: [],
  39756. font: ["color", "size", "face"],
  39757. footer: [],
  39758. h1: [],
  39759. h2: [],
  39760. h3: [],
  39761. h4: [],
  39762. h5: [],
  39763. h6: [],
  39764. header: [],
  39765. hr: [],
  39766. i: [],
  39767. img: ["src", "alt", "title", "width", "height"],
  39768. ins: ["datetime"],
  39769. li: [],
  39770. mark: [],
  39771. nav: [],
  39772. ol: [],
  39773. p: [],
  39774. pre: [],
  39775. s: [],
  39776. section: [],
  39777. small: [],
  39778. span: [],
  39779. sub: [],
  39780. sup: [],
  39781. strong: [],
  39782. table: ["width", "border", "align", "valign"],
  39783. tbody: ["align", "valign"],
  39784. td: ["width", "rowspan", "colspan", "align", "valign"],
  39785. tfoot: ["align", "valign"],
  39786. th: ["width", "rowspan", "colspan", "align", "valign"],
  39787. thead: ["align", "valign"],
  39788. tr: ["rowspan", "align", "valign"],
  39789. tt: [],
  39790. u: [],
  39791. ul: [],
  39792. video: ["autoplay", "controls", "loop", "preload", "src", "height", "width"]
  39793. };
  39794. }
  39795. var defaultCSSFilter = new FilterCSS();
  39796. /**
  39797. * default onTag function
  39798. *
  39799. * @param {String} tag
  39800. * @param {String} html
  39801. * @param {Object} options
  39802. * @return {String}
  39803. */
  39804. function onTag(tag, html, options) {
  39805. // do nothing
  39806. }
  39807. /**
  39808. * default onIgnoreTag function
  39809. *
  39810. * @param {String} tag
  39811. * @param {String} html
  39812. * @param {Object} options
  39813. * @return {String}
  39814. */
  39815. function onIgnoreTag(tag, html, options) {
  39816. // do nothing
  39817. }
  39818. /**
  39819. * default onTagAttr function
  39820. *
  39821. * @param {String} tag
  39822. * @param {String} name
  39823. * @param {String} value
  39824. * @return {String}
  39825. */
  39826. function onTagAttr(tag, name, value) {
  39827. // do nothing
  39828. }
  39829. /**
  39830. * default onIgnoreTagAttr function
  39831. *
  39832. * @param {String} tag
  39833. * @param {String} name
  39834. * @param {String} value
  39835. * @return {String}
  39836. */
  39837. function onIgnoreTagAttr(tag, name, value) {
  39838. // do nothing
  39839. }
  39840. /**
  39841. * default escapeHtml function
  39842. *
  39843. * @param {String} html
  39844. */
  39845. function escapeHtml(html) {
  39846. return html.replace(REGEXP_LT, "&lt;").replace(REGEXP_GT, "&gt;");
  39847. }
  39848. /**
  39849. * default safeAttrValue function
  39850. *
  39851. * @param {String} tag
  39852. * @param {String} name
  39853. * @param {String} value
  39854. * @param {Object} cssFilter
  39855. * @return {String}
  39856. */
  39857. function safeAttrValue(tag, name, value, cssFilter) {
  39858. // unescape attribute value firstly
  39859. value = friendlyAttrValue(value);
  39860. if (name === "href" || name === "src") {
  39861. // filter `href` and `src` attribute
  39862. // only allow the value that starts with `http://` | `https://` | `mailto:` | `/` | `#`
  39863. value = _.trim(value);
  39864. if (value === "#") return "#";
  39865. if (
  39866. !(
  39867. value.substr(0, 7) === "http://" ||
  39868. value.substr(0, 8) === "https://" ||
  39869. value.substr(0, 7) === "mailto:" ||
  39870. value.substr(0, 4) === "tel:" ||
  39871. value[0] === "#" ||
  39872. value[0] === "/"
  39873. )
  39874. ) {
  39875. return "";
  39876. }
  39877. } else if (name === "background") {
  39878. // filter `background` attribute (maybe no use)
  39879. // `javascript:`
  39880. REGEXP_DEFAULT_ON_TAG_ATTR_4.lastIndex = 0;
  39881. if (REGEXP_DEFAULT_ON_TAG_ATTR_4.test(value)) {
  39882. return "";
  39883. }
  39884. } else if (name === "style") {
  39885. // `expression()`
  39886. REGEXP_DEFAULT_ON_TAG_ATTR_7.lastIndex = 0;
  39887. if (REGEXP_DEFAULT_ON_TAG_ATTR_7.test(value)) {
  39888. return "";
  39889. }
  39890. // `url()`
  39891. REGEXP_DEFAULT_ON_TAG_ATTR_8.lastIndex = 0;
  39892. if (REGEXP_DEFAULT_ON_TAG_ATTR_8.test(value)) {
  39893. REGEXP_DEFAULT_ON_TAG_ATTR_4.lastIndex = 0;
  39894. if (REGEXP_DEFAULT_ON_TAG_ATTR_4.test(value)) {
  39895. return "";
  39896. }
  39897. }
  39898. if (cssFilter !== false) {
  39899. cssFilter = cssFilter || defaultCSSFilter;
  39900. value = cssFilter.process(value);
  39901. }
  39902. }
  39903. // escape `<>"` before returns
  39904. value = escapeAttrValue(value);
  39905. return value;
  39906. }
  39907. // RegExp list
  39908. var REGEXP_LT = /</g;
  39909. var REGEXP_GT = />/g;
  39910. var REGEXP_QUOTE = /"/g;
  39911. var REGEXP_QUOTE_2 = /&quot;/g;
  39912. var REGEXP_ATTR_VALUE_1 = /&#([a-zA-Z0-9]*);?/gim;
  39913. var REGEXP_ATTR_VALUE_COLON = /&colon;?/gim;
  39914. var REGEXP_ATTR_VALUE_NEWLINE = /&newline;?/gim;
  39915. var REGEXP_DEFAULT_ON_TAG_ATTR_3 = /\/\*|\*\//gm;
  39916. var REGEXP_DEFAULT_ON_TAG_ATTR_4 = /((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a)\:/gi;
  39917. var REGEXP_DEFAULT_ON_TAG_ATTR_5 = /^[\s"'`]*(d\s*a\s*t\s*a\s*)\:/gi;
  39918. var REGEXP_DEFAULT_ON_TAG_ATTR_6 = /^[\s"'`]*(d\s*a\s*t\s*a\s*)\:\s*image\//gi;
  39919. var REGEXP_DEFAULT_ON_TAG_ATTR_7 = /e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi;
  39920. var REGEXP_DEFAULT_ON_TAG_ATTR_8 = /u\s*r\s*l\s*\(.*/gi;
  39921. /**
  39922. * escape doube quote
  39923. *
  39924. * @param {String} str
  39925. * @return {String} str
  39926. */
  39927. function escapeQuote(str) {
  39928. return str.replace(REGEXP_QUOTE, "&quot;");
  39929. }
  39930. /**
  39931. * unescape double quote
  39932. *
  39933. * @param {String} str
  39934. * @return {String} str
  39935. */
  39936. function unescapeQuote(str) {
  39937. return str.replace(REGEXP_QUOTE_2, '"');
  39938. }
  39939. /**
  39940. * escape html entities
  39941. *
  39942. * @param {String} str
  39943. * @return {String}
  39944. */
  39945. function escapeHtmlEntities(str) {
  39946. return str.replace(REGEXP_ATTR_VALUE_1, function replaceUnicode(str, code) {
  39947. return code[0] === "x" || code[0] === "X"
  39948. ? String.fromCharCode(parseInt(code.substr(1), 16))
  39949. : String.fromCharCode(parseInt(code, 10));
  39950. });
  39951. }
  39952. /**
  39953. * escape html5 new danger entities
  39954. *
  39955. * @param {String} str
  39956. * @return {String}
  39957. */
  39958. function escapeDangerHtml5Entities(str) {
  39959. return str
  39960. .replace(REGEXP_ATTR_VALUE_COLON, ":")
  39961. .replace(REGEXP_ATTR_VALUE_NEWLINE, " ");
  39962. }
  39963. /**
  39964. * clear nonprintable characters
  39965. *
  39966. * @param {String} str
  39967. * @return {String}
  39968. */
  39969. function clearNonPrintableCharacter(str) {
  39970. var str2 = "";
  39971. for (var i = 0, len = str.length; i < len; i++) {
  39972. str2 += str.charCodeAt(i) < 32 ? " " : str.charAt(i);
  39973. }
  39974. return _.trim(str2);
  39975. }
  39976. /**
  39977. * get friendly attribute value
  39978. *
  39979. * @param {String} str
  39980. * @return {String}
  39981. */
  39982. function friendlyAttrValue(str) {
  39983. str = unescapeQuote(str);
  39984. str = escapeHtmlEntities(str);
  39985. str = escapeDangerHtml5Entities(str);
  39986. str = clearNonPrintableCharacter(str);
  39987. return str;
  39988. }
  39989. /**
  39990. * unescape attribute value
  39991. *
  39992. * @param {String} str
  39993. * @return {String}
  39994. */
  39995. function escapeAttrValue(str) {
  39996. str = escapeQuote(str);
  39997. str = escapeHtml(str);
  39998. return str;
  39999. }
  40000. /**
  40001. * `onIgnoreTag` function for removing all the tags that are not in whitelist
  40002. */
  40003. function onIgnoreTagStripAll() {
  40004. return "";
  40005. }
  40006. /**
  40007. * remove tag body
  40008. * specify a `tags` list, if the tag is not in the `tags` list then process by the specify function (optional)
  40009. *
  40010. * @param {array} tags
  40011. * @param {function} next
  40012. */
  40013. function StripTagBody(tags, next) {
  40014. if (typeof next !== "function") {
  40015. next = function() {};
  40016. }
  40017. var isRemoveAllTag = !Array.isArray(tags);
  40018. function isRemoveTag(tag) {
  40019. if (isRemoveAllTag) return true;
  40020. return _.indexOf(tags, tag) !== -1;
  40021. }
  40022. var removeList = [];
  40023. var posStart = false;
  40024. return {
  40025. onIgnoreTag: function(tag, html, options) {
  40026. if (isRemoveTag(tag)) {
  40027. if (options.isClosing) {
  40028. var ret = "[/removed]";
  40029. var end = options.position + ret.length;
  40030. removeList.push([
  40031. posStart !== false ? posStart : options.position,
  40032. end
  40033. ]);
  40034. posStart = false;
  40035. return ret;
  40036. } else {
  40037. if (!posStart) {
  40038. posStart = options.position;
  40039. }
  40040. return "[removed]";
  40041. }
  40042. } else {
  40043. return next(tag, html, options);
  40044. }
  40045. },
  40046. remove: function(html) {
  40047. var rethtml = "";
  40048. var lastPos = 0;
  40049. _.forEach(removeList, function(pos) {
  40050. rethtml += html.slice(lastPos, pos[0]);
  40051. lastPos = pos[1];
  40052. });
  40053. rethtml += html.slice(lastPos);
  40054. return rethtml;
  40055. }
  40056. };
  40057. }
  40058. /**
  40059. * remove html comments
  40060. *
  40061. * @param {String} html
  40062. * @return {String}
  40063. */
  40064. function stripCommentTag(html) {
  40065. return html.replace(STRIP_COMMENT_TAG_REGEXP, "");
  40066. }
  40067. var STRIP_COMMENT_TAG_REGEXP = /<!--[\s\S]*?-->/g;
  40068. /**
  40069. * remove invisible characters
  40070. *
  40071. * @param {String} html
  40072. * @return {String}
  40073. */
  40074. function stripBlankChar(html) {
  40075. var chars = html.split("");
  40076. chars = chars.filter(function(char) {
  40077. var c = char.charCodeAt(0);
  40078. if (c === 127) return false;
  40079. if (c <= 31) {
  40080. if (c === 10 || c === 13) return true;
  40081. return false;
  40082. }
  40083. return true;
  40084. });
  40085. return chars.join("");
  40086. }
  40087. exports.whiteList = getDefaultWhiteList();
  40088. exports.getDefaultWhiteList = getDefaultWhiteList;
  40089. exports.onTag = onTag;
  40090. exports.onIgnoreTag = onIgnoreTag;
  40091. exports.onTagAttr = onTagAttr;
  40092. exports.onIgnoreTagAttr = onIgnoreTagAttr;
  40093. exports.safeAttrValue = safeAttrValue;
  40094. exports.escapeHtml = escapeHtml;
  40095. exports.escapeQuote = escapeQuote;
  40096. exports.unescapeQuote = unescapeQuote;
  40097. exports.escapeHtmlEntities = escapeHtmlEntities;
  40098. exports.escapeDangerHtml5Entities = escapeDangerHtml5Entities;
  40099. exports.clearNonPrintableCharacter = clearNonPrintableCharacter;
  40100. exports.friendlyAttrValue = friendlyAttrValue;
  40101. exports.escapeAttrValue = escapeAttrValue;
  40102. exports.onIgnoreTagStripAll = onIgnoreTagStripAll;
  40103. exports.StripTagBody = StripTagBody;
  40104. exports.stripCommentTag = stripCommentTag;
  40105. exports.stripBlankChar = stripBlankChar;
  40106. exports.cssFilter = defaultCSSFilter;
  40107. exports.getDefaultCSSWhiteList = getDefaultCSSWhiteList;
  40108. },{"./util":4,"cssfilter":8}],2:[function(require,module,exports){
  40109. /**
  40110. * xss
  40111. *
  40112. * @author Zongmin Lei<leizongmin@gmail.com>
  40113. */
  40114. var DEFAULT = require("./default");
  40115. var parser = require("./parser");
  40116. var FilterXSS = require("./xss");
  40117. /**
  40118. * filter xss function
  40119. *
  40120. * @param {String} html
  40121. * @param {Object} options { whiteList, onTag, onTagAttr, onIgnoreTag, onIgnoreTagAttr, safeAttrValue, escapeHtml }
  40122. * @return {String}
  40123. */
  40124. function filterXSS(html, options) {
  40125. var xss = new FilterXSS(options);
  40126. return xss.process(html);
  40127. }
  40128. exports = module.exports = filterXSS;
  40129. exports.FilterXSS = FilterXSS;
  40130. for (var i in DEFAULT) exports[i] = DEFAULT[i];
  40131. for (var i in parser) exports[i] = parser[i];
  40132. // using `xss` on the browser, output `filterXSS` to the globals
  40133. if (typeof window !== "undefined") {
  40134. window.filterXSS = module.exports;
  40135. }
  40136. },{"./default":1,"./parser":3,"./xss":5}],3:[function(require,module,exports){
  40137. /**
  40138. * Simple HTML Parser
  40139. *
  40140. * @author Zongmin Lei<leizongmin@gmail.com>
  40141. */
  40142. var _ = require("./util");
  40143. /**
  40144. * get tag name
  40145. *
  40146. * @param {String} html e.g. '<a hef="#">'
  40147. * @return {String}
  40148. */
  40149. function getTagName(html) {
  40150. var i = _.spaceIndex(html);
  40151. if (i === -1) {
  40152. var tagName = html.slice(1, -1);
  40153. } else {
  40154. var tagName = html.slice(1, i + 1);
  40155. }
  40156. tagName = _.trim(tagName).toLowerCase();
  40157. if (tagName.slice(0, 1) === "/") tagName = tagName.slice(1);
  40158. if (tagName.slice(-1) === "/") tagName = tagName.slice(0, -1);
  40159. return tagName;
  40160. }
  40161. /**
  40162. * is close tag?
  40163. *
  40164. * @param {String} html 如:'<a hef="#">'
  40165. * @return {Boolean}
  40166. */
  40167. function isClosing(html) {
  40168. return html.slice(0, 2) === "</";
  40169. }
  40170. /**
  40171. * parse input html and returns processed html
  40172. *
  40173. * @param {String} html
  40174. * @param {Function} onTag e.g. function (sourcePosition, position, tag, html, isClosing)
  40175. * @param {Function} escapeHtml
  40176. * @return {String}
  40177. */
  40178. function parseTag(html, onTag, escapeHtml) {
  40179. "user strict";
  40180. var rethtml = "";
  40181. var lastPos = 0;
  40182. var tagStart = false;
  40183. var quoteStart = false;
  40184. var currentPos = 0;
  40185. var len = html.length;
  40186. var currentTagName = "";
  40187. var currentHtml = "";
  40188. for (currentPos = 0; currentPos < len; currentPos++) {
  40189. var c = html.charAt(currentPos);
  40190. if (tagStart === false) {
  40191. if (c === "<") {
  40192. tagStart = currentPos;
  40193. continue;
  40194. }
  40195. } else {
  40196. if (quoteStart === false) {
  40197. if (c === "<") {
  40198. rethtml += escapeHtml(html.slice(lastPos, currentPos));
  40199. tagStart = currentPos;
  40200. lastPos = currentPos;
  40201. continue;
  40202. }
  40203. if (c === ">") {
  40204. rethtml += escapeHtml(html.slice(lastPos, tagStart));
  40205. currentHtml = html.slice(tagStart, currentPos + 1);
  40206. currentTagName = getTagName(currentHtml);
  40207. rethtml += onTag(
  40208. tagStart,
  40209. rethtml.length,
  40210. currentTagName,
  40211. currentHtml,
  40212. isClosing(currentHtml)
  40213. );
  40214. lastPos = currentPos + 1;
  40215. tagStart = false;
  40216. continue;
  40217. }
  40218. if ((c === '"' || c === "'") && html.charAt(currentPos - 1) === "=") {
  40219. quoteStart = c;
  40220. continue;
  40221. }
  40222. } else {
  40223. if (c === quoteStart) {
  40224. quoteStart = false;
  40225. continue;
  40226. }
  40227. }
  40228. }
  40229. }
  40230. if (lastPos < html.length) {
  40231. rethtml += escapeHtml(html.substr(lastPos));
  40232. }
  40233. return rethtml;
  40234. }
  40235. var REGEXP_ILLEGAL_ATTR_NAME = /[^a-zA-Z0-9_:\.\-]/gim;
  40236. /**
  40237. * parse input attributes and returns processed attributes
  40238. *
  40239. * @param {String} html e.g. `href="#" target="_blank"`
  40240. * @param {Function} onAttr e.g. `function (name, value)`
  40241. * @return {String}
  40242. */
  40243. function parseAttr(html, onAttr) {
  40244. "user strict";
  40245. var lastPos = 0;
  40246. var retAttrs = [];
  40247. var tmpName = false;
  40248. var len = html.length;
  40249. function addAttr(name, value) {
  40250. name = _.trim(name);
  40251. name = name.replace(REGEXP_ILLEGAL_ATTR_NAME, "").toLowerCase();
  40252. if (name.length < 1) return;
  40253. var ret = onAttr(name, value || "");
  40254. if (ret) retAttrs.push(ret);
  40255. }
  40256. // 逐个分析字符
  40257. for (var i = 0; i < len; i++) {
  40258. var c = html.charAt(i);
  40259. var v, j;
  40260. if (tmpName === false && c === "=") {
  40261. tmpName = html.slice(lastPos, i);
  40262. lastPos = i + 1;
  40263. continue;
  40264. }
  40265. if (tmpName !== false) {
  40266. if (
  40267. i === lastPos &&
  40268. (c === '"' || c === "'") &&
  40269. html.charAt(i - 1) === "="
  40270. ) {
  40271. j = html.indexOf(c, i + 1);
  40272. if (j === -1) {
  40273. break;
  40274. } else {
  40275. v = _.trim(html.slice(lastPos + 1, j));
  40276. addAttr(tmpName, v);
  40277. tmpName = false;
  40278. i = j;
  40279. lastPos = i + 1;
  40280. continue;
  40281. }
  40282. }
  40283. }
  40284. if (/\s|\n|\t/.test(c)) {
  40285. html = html.replace(/\s|\n|\t/g, " ");
  40286. if (tmpName === false) {
  40287. j = findNextEqual(html, i);
  40288. if (j === -1) {
  40289. v = _.trim(html.slice(lastPos, i));
  40290. addAttr(v);
  40291. tmpName = false;
  40292. lastPos = i + 1;
  40293. continue;
  40294. } else {
  40295. i = j - 1;
  40296. continue;
  40297. }
  40298. } else {
  40299. j = findBeforeEqual(html, i - 1);
  40300. if (j === -1) {
  40301. v = _.trim(html.slice(lastPos, i));
  40302. v = stripQuoteWrap(v);
  40303. addAttr(tmpName, v);
  40304. tmpName = false;
  40305. lastPos = i + 1;
  40306. continue;
  40307. } else {
  40308. continue;
  40309. }
  40310. }
  40311. }
  40312. }
  40313. if (lastPos < html.length) {
  40314. if (tmpName === false) {
  40315. addAttr(html.slice(lastPos));
  40316. } else {
  40317. addAttr(tmpName, stripQuoteWrap(_.trim(html.slice(lastPos))));
  40318. }
  40319. }
  40320. return _.trim(retAttrs.join(" "));
  40321. }
  40322. function findNextEqual(str, i) {
  40323. for (; i < str.length; i++) {
  40324. var c = str[i];
  40325. if (c === " ") continue;
  40326. if (c === "=") return i;
  40327. return -1;
  40328. }
  40329. }
  40330. function findBeforeEqual(str, i) {
  40331. for (; i > 0; i--) {
  40332. var c = str[i];
  40333. if (c === " ") continue;
  40334. if (c === "=") return i;
  40335. return -1;
  40336. }
  40337. }
  40338. function isQuoteWrapString(text) {
  40339. if (
  40340. (text[0] === '"' && text[text.length - 1] === '"') ||
  40341. (text[0] === "'" && text[text.length - 1] === "'")
  40342. ) {
  40343. return true;
  40344. } else {
  40345. return false;
  40346. }
  40347. }
  40348. function stripQuoteWrap(text) {
  40349. if (isQuoteWrapString(text)) {
  40350. return text.substr(1, text.length - 2);
  40351. } else {
  40352. return text;
  40353. }
  40354. }
  40355. exports.parseTag = parseTag;
  40356. exports.parseAttr = parseAttr;
  40357. },{"./util":4}],4:[function(require,module,exports){
  40358. module.exports = {
  40359. indexOf: function(arr, item) {
  40360. var i, j;
  40361. if (Array.prototype.indexOf) {
  40362. return arr.indexOf(item);
  40363. }
  40364. for (i = 0, j = arr.length; i < j; i++) {
  40365. if (arr[i] === item) {
  40366. return i;
  40367. }
  40368. }
  40369. return -1;
  40370. },
  40371. forEach: function(arr, fn, scope) {
  40372. var i, j;
  40373. if (Array.prototype.forEach) {
  40374. return arr.forEach(fn, scope);
  40375. }
  40376. for (i = 0, j = arr.length; i < j; i++) {
  40377. fn.call(scope, arr[i], i, arr);
  40378. }
  40379. },
  40380. trim: function(str) {
  40381. if (String.prototype.trim) {
  40382. return str.trim();
  40383. }
  40384. return str.replace(/(^\s*)|(\s*$)/g, "");
  40385. },
  40386. spaceIndex: function(str) {
  40387. var reg = /\s|\n|\t/;
  40388. var match = reg.exec(str);
  40389. return match ? match.index : -1;
  40390. }
  40391. };
  40392. },{}],5:[function(require,module,exports){
  40393. /**
  40394. * filter xss
  40395. *
  40396. * @author Zongmin Lei<leizongmin@gmail.com>
  40397. */
  40398. var FilterCSS = require("cssfilter").FilterCSS;
  40399. var DEFAULT = require("./default");
  40400. var parser = require("./parser");
  40401. var parseTag = parser.parseTag;
  40402. var parseAttr = parser.parseAttr;
  40403. var _ = require("./util");
  40404. /**
  40405. * returns `true` if the input value is `undefined` or `null`
  40406. *
  40407. * @param {Object} obj
  40408. * @return {Boolean}
  40409. */
  40410. function isNull(obj) {
  40411. return obj === undefined || obj === null;
  40412. }
  40413. /**
  40414. * get attributes for a tag
  40415. *
  40416. * @param {String} html
  40417. * @return {Object}
  40418. * - {String} html
  40419. * - {Boolean} closing
  40420. */
  40421. function getAttrs(html) {
  40422. var i = _.spaceIndex(html);
  40423. if (i === -1) {
  40424. return {
  40425. html: "",
  40426. closing: html[html.length - 2] === "/"
  40427. };
  40428. }
  40429. html = _.trim(html.slice(i + 1, -1));
  40430. var isClosing = html[html.length - 1] === "/";
  40431. if (isClosing) html = _.trim(html.slice(0, -1));
  40432. return {
  40433. html: html,
  40434. closing: isClosing
  40435. };
  40436. }
  40437. /**
  40438. * shallow copy
  40439. *
  40440. * @param {Object} obj
  40441. * @return {Object}
  40442. */
  40443. function shallowCopyObject(obj) {
  40444. var ret = {};
  40445. for (var i in obj) {
  40446. ret[i] = obj[i];
  40447. }
  40448. return ret;
  40449. }
  40450. /**
  40451. * FilterXSS class
  40452. *
  40453. * @param {Object} options
  40454. * whiteList, onTag, onTagAttr, onIgnoreTag,
  40455. * onIgnoreTagAttr, safeAttrValue, escapeHtml
  40456. * stripIgnoreTagBody, allowCommentTag, stripBlankChar
  40457. * css{whiteList, onAttr, onIgnoreAttr} `css=false` means don't use `cssfilter`
  40458. */
  40459. function FilterXSS(options) {
  40460. options = shallowCopyObject(options || {});
  40461. if (options.stripIgnoreTag) {
  40462. if (options.onIgnoreTag) {
  40463. console.error(
  40464. 'Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'
  40465. );
  40466. }
  40467. options.onIgnoreTag = DEFAULT.onIgnoreTagStripAll;
  40468. }
  40469. options.whiteList = options.whiteList || DEFAULT.whiteList;
  40470. options.onTag = options.onTag || DEFAULT.onTag;
  40471. options.onTagAttr = options.onTagAttr || DEFAULT.onTagAttr;
  40472. options.onIgnoreTag = options.onIgnoreTag || DEFAULT.onIgnoreTag;
  40473. options.onIgnoreTagAttr = options.onIgnoreTagAttr || DEFAULT.onIgnoreTagAttr;
  40474. options.safeAttrValue = options.safeAttrValue || DEFAULT.safeAttrValue;
  40475. options.escapeHtml = options.escapeHtml || DEFAULT.escapeHtml;
  40476. this.options = options;
  40477. if (options.css === false) {
  40478. this.cssFilter = false;
  40479. } else {
  40480. options.css = options.css || {};
  40481. this.cssFilter = new FilterCSS(options.css);
  40482. }
  40483. }
  40484. /**
  40485. * start process and returns result
  40486. *
  40487. * @param {String} html
  40488. * @return {String}
  40489. */
  40490. FilterXSS.prototype.process = function(html) {
  40491. // compatible with the input
  40492. html = html || "";
  40493. html = html.toString();
  40494. if (!html) return "";
  40495. var me = this;
  40496. var options = me.options;
  40497. var whiteList = options.whiteList;
  40498. var onTag = options.onTag;
  40499. var onIgnoreTag = options.onIgnoreTag;
  40500. var onTagAttr = options.onTagAttr;
  40501. var onIgnoreTagAttr = options.onIgnoreTagAttr;
  40502. var safeAttrValue = options.safeAttrValue;
  40503. var escapeHtml = options.escapeHtml;
  40504. var cssFilter = me.cssFilter;
  40505. // remove invisible characters
  40506. if (options.stripBlankChar) {
  40507. html = DEFAULT.stripBlankChar(html);
  40508. }
  40509. // remove html comments
  40510. if (!options.allowCommentTag) {
  40511. html = DEFAULT.stripCommentTag(html);
  40512. }
  40513. // if enable stripIgnoreTagBody
  40514. var stripIgnoreTagBody = false;
  40515. if (options.stripIgnoreTagBody) {
  40516. var stripIgnoreTagBody = DEFAULT.StripTagBody(
  40517. options.stripIgnoreTagBody,
  40518. onIgnoreTag
  40519. );
  40520. onIgnoreTag = stripIgnoreTagBody.onIgnoreTag;
  40521. }
  40522. var retHtml = parseTag(
  40523. html,
  40524. function(sourcePosition, position, tag, html, isClosing) {
  40525. var info = {
  40526. sourcePosition: sourcePosition,
  40527. position: position,
  40528. isClosing: isClosing,
  40529. isWhite: whiteList.hasOwnProperty(tag)
  40530. };
  40531. // call `onTag()`
  40532. var ret = onTag(tag, html, info);
  40533. if (!isNull(ret)) return ret;
  40534. if (info.isWhite) {
  40535. if (info.isClosing) {
  40536. return "</" + tag + ">";
  40537. }
  40538. var attrs = getAttrs(html);
  40539. var whiteAttrList = whiteList[tag];
  40540. var attrsHtml = parseAttr(attrs.html, function(name, value) {
  40541. // call `onTagAttr()`
  40542. var isWhiteAttr = _.indexOf(whiteAttrList, name) !== -1;
  40543. var ret = onTagAttr(tag, name, value, isWhiteAttr);
  40544. if (!isNull(ret)) return ret;
  40545. if (isWhiteAttr) {
  40546. // call `safeAttrValue()`
  40547. value = safeAttrValue(tag, name, value, cssFilter);
  40548. if (value) {
  40549. return name + '="' + value + '"';
  40550. } else {
  40551. return name;
  40552. }
  40553. } else {
  40554. // call `onIgnoreTagAttr()`
  40555. var ret = onIgnoreTagAttr(tag, name, value, isWhiteAttr);
  40556. if (!isNull(ret)) return ret;
  40557. return;
  40558. }
  40559. });
  40560. // build new tag html
  40561. var html = "<" + tag;
  40562. if (attrsHtml) html += " " + attrsHtml;
  40563. if (attrs.closing) html += " /";
  40564. html += ">";
  40565. return html;
  40566. } else {
  40567. // call `onIgnoreTag()`
  40568. var ret = onIgnoreTag(tag, html, info);
  40569. if (!isNull(ret)) return ret;
  40570. return escapeHtml(html);
  40571. }
  40572. },
  40573. escapeHtml
  40574. );
  40575. // if enable stripIgnoreTagBody
  40576. if (stripIgnoreTagBody) {
  40577. retHtml = stripIgnoreTagBody.remove(retHtml);
  40578. }
  40579. return retHtml;
  40580. };
  40581. module.exports = FilterXSS;
  40582. },{"./default":1,"./parser":3,"./util":4,"cssfilter":8}],6:[function(require,module,exports){
  40583. /**
  40584. * cssfilter
  40585. *
  40586. * @author 老雷<leizongmin@gmail.com>
  40587. */
  40588. var DEFAULT = require('./default');
  40589. var parseStyle = require('./parser');
  40590. var _ = require('./util');
  40591. /**
  40592. * 返回值是否为空
  40593. *
  40594. * @param {Object} obj
  40595. * @return {Boolean}
  40596. */
  40597. function isNull (obj) {
  40598. return (obj === undefined || obj === null);
  40599. }
  40600. /**
  40601. * 浅拷贝对象
  40602. *
  40603. * @param {Object} obj
  40604. * @return {Object}
  40605. */
  40606. function shallowCopyObject (obj) {
  40607. var ret = {};
  40608. for (var i in obj) {
  40609. ret[i] = obj[i];
  40610. }
  40611. return ret;
  40612. }
  40613. /**
  40614. * 创建CSS过滤器
  40615. *
  40616. * @param {Object} options
  40617. * - {Object} whiteList
  40618. * - {Function} onAttr
  40619. * - {Function} onIgnoreAttr
  40620. * - {Function} safeAttrValue
  40621. */
  40622. function FilterCSS (options) {
  40623. options = shallowCopyObject(options || {});
  40624. options.whiteList = options.whiteList || DEFAULT.whiteList;
  40625. options.onAttr = options.onAttr || DEFAULT.onAttr;
  40626. options.onIgnoreAttr = options.onIgnoreAttr || DEFAULT.onIgnoreAttr;
  40627. options.safeAttrValue = options.safeAttrValue || DEFAULT.safeAttrValue;
  40628. this.options = options;
  40629. }
  40630. FilterCSS.prototype.process = function (css) {
  40631. // 兼容各种奇葩输入
  40632. css = css || '';
  40633. css = css.toString();
  40634. if (!css) return '';
  40635. var me = this;
  40636. var options = me.options;
  40637. var whiteList = options.whiteList;
  40638. var onAttr = options.onAttr;
  40639. var onIgnoreAttr = options.onIgnoreAttr;
  40640. var safeAttrValue = options.safeAttrValue;
  40641. var retCSS = parseStyle(css, function (sourcePosition, position, name, value, source) {
  40642. var check = whiteList[name];
  40643. var isWhite = false;
  40644. if (check === true) isWhite = check;
  40645. else if (typeof check === 'function') isWhite = check(value);
  40646. else if (check instanceof RegExp) isWhite = check.test(value);
  40647. if (isWhite !== true) isWhite = false;
  40648. // 如果过滤后 value 为空则直接忽略
  40649. value = safeAttrValue(name, value);
  40650. if (!value) return;
  40651. var opts = {
  40652. position: position,
  40653. sourcePosition: sourcePosition,
  40654. source: source,
  40655. isWhite: isWhite
  40656. };
  40657. if (isWhite) {
  40658. var ret = onAttr(name, value, opts);
  40659. if (isNull(ret)) {
  40660. return name + ':' + value;
  40661. } else {
  40662. return ret;
  40663. }
  40664. } else {
  40665. var ret = onIgnoreAttr(name, value, opts);
  40666. if (!isNull(ret)) {
  40667. return ret;
  40668. }
  40669. }
  40670. });
  40671. return retCSS;
  40672. };
  40673. module.exports = FilterCSS;
  40674. },{"./default":7,"./parser":9,"./util":10}],7:[function(require,module,exports){
  40675. /**
  40676. * cssfilter
  40677. *
  40678. * @author 老雷<leizongmin@gmail.com>
  40679. */
  40680. function getDefaultWhiteList () {
  40681. // 白名单值说明:
  40682. // true: 允许该属性
  40683. // Function: function (val) { } 返回true表示允许该属性,其他值均表示不允许
  40684. // RegExp: regexp.test(val) 返回true表示允许该属性,其他值均表示不允许
  40685. // 除上面列出的值外均表示不允许
  40686. var whiteList = {};
  40687. whiteList['align-content'] = false; // default: auto
  40688. whiteList['align-items'] = false; // default: auto
  40689. whiteList['align-self'] = false; // default: auto
  40690. whiteList['alignment-adjust'] = false; // default: auto
  40691. whiteList['alignment-baseline'] = false; // default: baseline
  40692. whiteList['all'] = false; // default: depending on individual properties
  40693. whiteList['anchor-point'] = false; // default: none
  40694. whiteList['animation'] = false; // default: depending on individual properties
  40695. whiteList['animation-delay'] = false; // default: 0
  40696. whiteList['animation-direction'] = false; // default: normal
  40697. whiteList['animation-duration'] = false; // default: 0
  40698. whiteList['animation-fill-mode'] = false; // default: none
  40699. whiteList['animation-iteration-count'] = false; // default: 1
  40700. whiteList['animation-name'] = false; // default: none
  40701. whiteList['animation-play-state'] = false; // default: running
  40702. whiteList['animation-timing-function'] = false; // default: ease
  40703. whiteList['azimuth'] = false; // default: center
  40704. whiteList['backface-visibility'] = false; // default: visible
  40705. whiteList['background'] = true; // default: depending on individual properties
  40706. whiteList['background-attachment'] = true; // default: scroll
  40707. whiteList['background-clip'] = true; // default: border-box
  40708. whiteList['background-color'] = true; // default: transparent
  40709. whiteList['background-image'] = true; // default: none
  40710. whiteList['background-origin'] = true; // default: padding-box
  40711. whiteList['background-position'] = true; // default: 0% 0%
  40712. whiteList['background-repeat'] = true; // default: repeat
  40713. whiteList['background-size'] = true; // default: auto
  40714. whiteList['baseline-shift'] = false; // default: baseline
  40715. whiteList['binding'] = false; // default: none
  40716. whiteList['bleed'] = false; // default: 6pt
  40717. whiteList['bookmark-label'] = false; // default: content()
  40718. whiteList['bookmark-level'] = false; // default: none
  40719. whiteList['bookmark-state'] = false; // default: open
  40720. whiteList['border'] = true; // default: depending on individual properties
  40721. whiteList['border-bottom'] = true; // default: depending on individual properties
  40722. whiteList['border-bottom-color'] = true; // default: current color
  40723. whiteList['border-bottom-left-radius'] = true; // default: 0
  40724. whiteList['border-bottom-right-radius'] = true; // default: 0
  40725. whiteList['border-bottom-style'] = true; // default: none
  40726. whiteList['border-bottom-width'] = true; // default: medium
  40727. whiteList['border-collapse'] = true; // default: separate
  40728. whiteList['border-color'] = true; // default: depending on individual properties
  40729. whiteList['border-image'] = true; // default: none
  40730. whiteList['border-image-outset'] = true; // default: 0
  40731. whiteList['border-image-repeat'] = true; // default: stretch
  40732. whiteList['border-image-slice'] = true; // default: 100%
  40733. whiteList['border-image-source'] = true; // default: none
  40734. whiteList['border-image-width'] = true; // default: 1
  40735. whiteList['border-left'] = true; // default: depending on individual properties
  40736. whiteList['border-left-color'] = true; // default: current color
  40737. whiteList['border-left-style'] = true; // default: none
  40738. whiteList['border-left-width'] = true; // default: medium
  40739. whiteList['border-radius'] = true; // default: 0
  40740. whiteList['border-right'] = true; // default: depending on individual properties
  40741. whiteList['border-right-color'] = true; // default: current color
  40742. whiteList['border-right-style'] = true; // default: none
  40743. whiteList['border-right-width'] = true; // default: medium
  40744. whiteList['border-spacing'] = true; // default: 0
  40745. whiteList['border-style'] = true; // default: depending on individual properties
  40746. whiteList['border-top'] = true; // default: depending on individual properties
  40747. whiteList['border-top-color'] = true; // default: current color
  40748. whiteList['border-top-left-radius'] = true; // default: 0
  40749. whiteList['border-top-right-radius'] = true; // default: 0
  40750. whiteList['border-top-style'] = true; // default: none
  40751. whiteList['border-top-width'] = true; // default: medium
  40752. whiteList['border-width'] = true; // default: depending on individual properties
  40753. whiteList['bottom'] = false; // default: auto
  40754. whiteList['box-decoration-break'] = true; // default: slice
  40755. whiteList['box-shadow'] = true; // default: none
  40756. whiteList['box-sizing'] = true; // default: content-box
  40757. whiteList['box-snap'] = true; // default: none
  40758. whiteList['box-suppress'] = true; // default: show
  40759. whiteList['break-after'] = true; // default: auto
  40760. whiteList['break-before'] = true; // default: auto
  40761. whiteList['break-inside'] = true; // default: auto
  40762. whiteList['caption-side'] = false; // default: top
  40763. whiteList['chains'] = false; // default: none
  40764. whiteList['clear'] = true; // default: none
  40765. whiteList['clip'] = false; // default: auto
  40766. whiteList['clip-path'] = false; // default: none
  40767. whiteList['clip-rule'] = false; // default: nonzero
  40768. whiteList['color'] = true; // default: implementation dependent
  40769. whiteList['color-interpolation-filters'] = true; // default: auto
  40770. whiteList['column-count'] = false; // default: auto
  40771. whiteList['column-fill'] = false; // default: balance
  40772. whiteList['column-gap'] = false; // default: normal
  40773. whiteList['column-rule'] = false; // default: depending on individual properties
  40774. whiteList['column-rule-color'] = false; // default: current color
  40775. whiteList['column-rule-style'] = false; // default: medium
  40776. whiteList['column-rule-width'] = false; // default: medium
  40777. whiteList['column-span'] = false; // default: none
  40778. whiteList['column-width'] = false; // default: auto
  40779. whiteList['columns'] = false; // default: depending on individual properties
  40780. whiteList['contain'] = false; // default: none
  40781. whiteList['content'] = false; // default: normal
  40782. whiteList['counter-increment'] = false; // default: none
  40783. whiteList['counter-reset'] = false; // default: none
  40784. whiteList['counter-set'] = false; // default: none
  40785. whiteList['crop'] = false; // default: auto
  40786. whiteList['cue'] = false; // default: depending on individual properties
  40787. whiteList['cue-after'] = false; // default: none
  40788. whiteList['cue-before'] = false; // default: none
  40789. whiteList['cursor'] = false; // default: auto
  40790. whiteList['direction'] = false; // default: ltr
  40791. whiteList['display'] = true; // default: depending on individual properties
  40792. whiteList['display-inside'] = true; // default: auto
  40793. whiteList['display-list'] = true; // default: none
  40794. whiteList['display-outside'] = true; // default: inline-level
  40795. whiteList['dominant-baseline'] = false; // default: auto
  40796. whiteList['elevation'] = false; // default: level
  40797. whiteList['empty-cells'] = false; // default: show
  40798. whiteList['filter'] = false; // default: none
  40799. whiteList['flex'] = false; // default: depending on individual properties
  40800. whiteList['flex-basis'] = false; // default: auto
  40801. whiteList['flex-direction'] = false; // default: row
  40802. whiteList['flex-flow'] = false; // default: depending on individual properties
  40803. whiteList['flex-grow'] = false; // default: 0
  40804. whiteList['flex-shrink'] = false; // default: 1
  40805. whiteList['flex-wrap'] = false; // default: nowrap
  40806. whiteList['float'] = false; // default: none
  40807. whiteList['float-offset'] = false; // default: 0 0
  40808. whiteList['flood-color'] = false; // default: black
  40809. whiteList['flood-opacity'] = false; // default: 1
  40810. whiteList['flow-from'] = false; // default: none
  40811. whiteList['flow-into'] = false; // default: none
  40812. whiteList['font'] = true; // default: depending on individual properties
  40813. whiteList['font-family'] = true; // default: implementation dependent
  40814. whiteList['font-feature-settings'] = true; // default: normal
  40815. whiteList['font-kerning'] = true; // default: auto
  40816. whiteList['font-language-override'] = true; // default: normal
  40817. whiteList['font-size'] = true; // default: medium
  40818. whiteList['font-size-adjust'] = true; // default: none
  40819. whiteList['font-stretch'] = true; // default: normal
  40820. whiteList['font-style'] = true; // default: normal
  40821. whiteList['font-synthesis'] = true; // default: weight style
  40822. whiteList['font-variant'] = true; // default: normal
  40823. whiteList['font-variant-alternates'] = true; // default: normal
  40824. whiteList['font-variant-caps'] = true; // default: normal
  40825. whiteList['font-variant-east-asian'] = true; // default: normal
  40826. whiteList['font-variant-ligatures'] = true; // default: normal
  40827. whiteList['font-variant-numeric'] = true; // default: normal
  40828. whiteList['font-variant-position'] = true; // default: normal
  40829. whiteList['font-weight'] = true; // default: normal
  40830. whiteList['grid'] = false; // default: depending on individual properties
  40831. whiteList['grid-area'] = false; // default: depending on individual properties
  40832. whiteList['grid-auto-columns'] = false; // default: auto
  40833. whiteList['grid-auto-flow'] = false; // default: none
  40834. whiteList['grid-auto-rows'] = false; // default: auto
  40835. whiteList['grid-column'] = false; // default: depending on individual properties
  40836. whiteList['grid-column-end'] = false; // default: auto
  40837. whiteList['grid-column-start'] = false; // default: auto
  40838. whiteList['grid-row'] = false; // default: depending on individual properties
  40839. whiteList['grid-row-end'] = false; // default: auto
  40840. whiteList['grid-row-start'] = false; // default: auto
  40841. whiteList['grid-template'] = false; // default: depending on individual properties
  40842. whiteList['grid-template-areas'] = false; // default: none
  40843. whiteList['grid-template-columns'] = false; // default: none
  40844. whiteList['grid-template-rows'] = false; // default: none
  40845. whiteList['hanging-punctuation'] = false; // default: none
  40846. whiteList['height'] = true; // default: auto
  40847. whiteList['hyphens'] = false; // default: manual
  40848. whiteList['icon'] = false; // default: auto
  40849. whiteList['image-orientation'] = false; // default: auto
  40850. whiteList['image-resolution'] = false; // default: normal
  40851. whiteList['ime-mode'] = false; // default: auto
  40852. whiteList['initial-letters'] = false; // default: normal
  40853. whiteList['inline-box-align'] = false; // default: last
  40854. whiteList['justify-content'] = false; // default: auto
  40855. whiteList['justify-items'] = false; // default: auto
  40856. whiteList['justify-self'] = false; // default: auto
  40857. whiteList['left'] = false; // default: auto
  40858. whiteList['letter-spacing'] = true; // default: normal
  40859. whiteList['lighting-color'] = true; // default: white
  40860. whiteList['line-box-contain'] = false; // default: block inline replaced
  40861. whiteList['line-break'] = false; // default: auto
  40862. whiteList['line-grid'] = false; // default: match-parent
  40863. whiteList['line-height'] = false; // default: normal
  40864. whiteList['line-snap'] = false; // default: none
  40865. whiteList['line-stacking'] = false; // default: depending on individual properties
  40866. whiteList['line-stacking-ruby'] = false; // default: exclude-ruby
  40867. whiteList['line-stacking-shift'] = false; // default: consider-shifts
  40868. whiteList['line-stacking-strategy'] = false; // default: inline-line-height
  40869. whiteList['list-style'] = true; // default: depending on individual properties
  40870. whiteList['list-style-image'] = true; // default: none
  40871. whiteList['list-style-position'] = true; // default: outside
  40872. whiteList['list-style-type'] = true; // default: disc
  40873. whiteList['margin'] = true; // default: depending on individual properties
  40874. whiteList['margin-bottom'] = true; // default: 0
  40875. whiteList['margin-left'] = true; // default: 0
  40876. whiteList['margin-right'] = true; // default: 0
  40877. whiteList['margin-top'] = true; // default: 0
  40878. whiteList['marker-offset'] = false; // default: auto
  40879. whiteList['marker-side'] = false; // default: list-item
  40880. whiteList['marks'] = false; // default: none
  40881. whiteList['mask'] = false; // default: border-box
  40882. whiteList['mask-box'] = false; // default: see individual properties
  40883. whiteList['mask-box-outset'] = false; // default: 0
  40884. whiteList['mask-box-repeat'] = false; // default: stretch
  40885. whiteList['mask-box-slice'] = false; // default: 0 fill
  40886. whiteList['mask-box-source'] = false; // default: none
  40887. whiteList['mask-box-width'] = false; // default: auto
  40888. whiteList['mask-clip'] = false; // default: border-box
  40889. whiteList['mask-image'] = false; // default: none
  40890. whiteList['mask-origin'] = false; // default: border-box
  40891. whiteList['mask-position'] = false; // default: center
  40892. whiteList['mask-repeat'] = false; // default: no-repeat
  40893. whiteList['mask-size'] = false; // default: border-box
  40894. whiteList['mask-source-type'] = false; // default: auto
  40895. whiteList['mask-type'] = false; // default: luminance
  40896. whiteList['max-height'] = true; // default: none
  40897. whiteList['max-lines'] = false; // default: none
  40898. whiteList['max-width'] = true; // default: none
  40899. whiteList['min-height'] = true; // default: 0
  40900. whiteList['min-width'] = true; // default: 0
  40901. whiteList['move-to'] = false; // default: normal
  40902. whiteList['nav-down'] = false; // default: auto
  40903. whiteList['nav-index'] = false; // default: auto
  40904. whiteList['nav-left'] = false; // default: auto
  40905. whiteList['nav-right'] = false; // default: auto
  40906. whiteList['nav-up'] = false; // default: auto
  40907. whiteList['object-fit'] = false; // default: fill
  40908. whiteList['object-position'] = false; // default: 50% 50%
  40909. whiteList['opacity'] = false; // default: 1
  40910. whiteList['order'] = false; // default: 0
  40911. whiteList['orphans'] = false; // default: 2
  40912. whiteList['outline'] = false; // default: depending on individual properties
  40913. whiteList['outline-color'] = false; // default: invert
  40914. whiteList['outline-offset'] = false; // default: 0
  40915. whiteList['outline-style'] = false; // default: none
  40916. whiteList['outline-width'] = false; // default: medium
  40917. whiteList['overflow'] = false; // default: depending on individual properties
  40918. whiteList['overflow-wrap'] = false; // default: normal
  40919. whiteList['overflow-x'] = false; // default: visible
  40920. whiteList['overflow-y'] = false; // default: visible
  40921. whiteList['padding'] = true; // default: depending on individual properties
  40922. whiteList['padding-bottom'] = true; // default: 0
  40923. whiteList['padding-left'] = true; // default: 0
  40924. whiteList['padding-right'] = true; // default: 0
  40925. whiteList['padding-top'] = true; // default: 0
  40926. whiteList['page'] = false; // default: auto
  40927. whiteList['page-break-after'] = false; // default: auto
  40928. whiteList['page-break-before'] = false; // default: auto
  40929. whiteList['page-break-inside'] = false; // default: auto
  40930. whiteList['page-policy'] = false; // default: start
  40931. whiteList['pause'] = false; // default: implementation dependent
  40932. whiteList['pause-after'] = false; // default: implementation dependent
  40933. whiteList['pause-before'] = false; // default: implementation dependent
  40934. whiteList['perspective'] = false; // default: none
  40935. whiteList['perspective-origin'] = false; // default: 50% 50%
  40936. whiteList['pitch'] = false; // default: medium
  40937. whiteList['pitch-range'] = false; // default: 50
  40938. whiteList['play-during'] = false; // default: auto
  40939. whiteList['position'] = false; // default: static
  40940. whiteList['presentation-level'] = false; // default: 0
  40941. whiteList['quotes'] = false; // default: text
  40942. whiteList['region-fragment'] = false; // default: auto
  40943. whiteList['resize'] = false; // default: none
  40944. whiteList['rest'] = false; // default: depending on individual properties
  40945. whiteList['rest-after'] = false; // default: none
  40946. whiteList['rest-before'] = false; // default: none
  40947. whiteList['richness'] = false; // default: 50
  40948. whiteList['right'] = false; // default: auto
  40949. whiteList['rotation'] = false; // default: 0
  40950. whiteList['rotation-point'] = false; // default: 50% 50%
  40951. whiteList['ruby-align'] = false; // default: auto
  40952. whiteList['ruby-merge'] = false; // default: separate
  40953. whiteList['ruby-position'] = false; // default: before
  40954. whiteList['shape-image-threshold'] = false; // default: 0.0
  40955. whiteList['shape-outside'] = false; // default: none
  40956. whiteList['shape-margin'] = false; // default: 0
  40957. whiteList['size'] = false; // default: auto
  40958. whiteList['speak'] = false; // default: auto
  40959. whiteList['speak-as'] = false; // default: normal
  40960. whiteList['speak-header'] = false; // default: once
  40961. whiteList['speak-numeral'] = false; // default: continuous
  40962. whiteList['speak-punctuation'] = false; // default: none
  40963. whiteList['speech-rate'] = false; // default: medium
  40964. whiteList['stress'] = false; // default: 50
  40965. whiteList['string-set'] = false; // default: none
  40966. whiteList['tab-size'] = false; // default: 8
  40967. whiteList['table-layout'] = false; // default: auto
  40968. whiteList['text-align'] = true; // default: start
  40969. whiteList['text-align-last'] = true; // default: auto
  40970. whiteList['text-combine-upright'] = true; // default: none
  40971. whiteList['text-decoration'] = true; // default: none
  40972. whiteList['text-decoration-color'] = true; // default: currentColor
  40973. whiteList['text-decoration-line'] = true; // default: none
  40974. whiteList['text-decoration-skip'] = true; // default: objects
  40975. whiteList['text-decoration-style'] = true; // default: solid
  40976. whiteList['text-emphasis'] = true; // default: depending on individual properties
  40977. whiteList['text-emphasis-color'] = true; // default: currentColor
  40978. whiteList['text-emphasis-position'] = true; // default: over right
  40979. whiteList['text-emphasis-style'] = true; // default: none
  40980. whiteList['text-height'] = true; // default: auto
  40981. whiteList['text-indent'] = true; // default: 0
  40982. whiteList['text-justify'] = true; // default: auto
  40983. whiteList['text-orientation'] = true; // default: mixed
  40984. whiteList['text-overflow'] = true; // default: clip
  40985. whiteList['text-shadow'] = true; // default: none
  40986. whiteList['text-space-collapse'] = true; // default: collapse
  40987. whiteList['text-transform'] = true; // default: none
  40988. whiteList['text-underline-position'] = true; // default: auto
  40989. whiteList['text-wrap'] = true; // default: normal
  40990. whiteList['top'] = false; // default: auto
  40991. whiteList['transform'] = false; // default: none
  40992. whiteList['transform-origin'] = false; // default: 50% 50% 0
  40993. whiteList['transform-style'] = false; // default: flat
  40994. whiteList['transition'] = false; // default: depending on individual properties
  40995. whiteList['transition-delay'] = false; // default: 0s
  40996. whiteList['transition-duration'] = false; // default: 0s
  40997. whiteList['transition-property'] = false; // default: all
  40998. whiteList['transition-timing-function'] = false; // default: ease
  40999. whiteList['unicode-bidi'] = false; // default: normal
  41000. whiteList['vertical-align'] = false; // default: baseline
  41001. whiteList['visibility'] = false; // default: visible
  41002. whiteList['voice-balance'] = false; // default: center
  41003. whiteList['voice-duration'] = false; // default: auto
  41004. whiteList['voice-family'] = false; // default: implementation dependent
  41005. whiteList['voice-pitch'] = false; // default: medium
  41006. whiteList['voice-range'] = false; // default: medium
  41007. whiteList['voice-rate'] = false; // default: normal
  41008. whiteList['voice-stress'] = false; // default: normal
  41009. whiteList['voice-volume'] = false; // default: medium
  41010. whiteList['volume'] = false; // default: medium
  41011. whiteList['white-space'] = false; // default: normal
  41012. whiteList['widows'] = false; // default: 2
  41013. whiteList['width'] = true; // default: auto
  41014. whiteList['will-change'] = false; // default: auto
  41015. whiteList['word-break'] = true; // default: normal
  41016. whiteList['word-spacing'] = true; // default: normal
  41017. whiteList['word-wrap'] = true; // default: normal
  41018. whiteList['wrap-flow'] = false; // default: auto
  41019. whiteList['wrap-through'] = false; // default: wrap
  41020. whiteList['writing-mode'] = false; // default: horizontal-tb
  41021. whiteList['z-index'] = false; // default: auto
  41022. return whiteList;
  41023. }
  41024. /**
  41025. * 匹配到白名单上的一个属性时
  41026. *
  41027. * @param {String} name
  41028. * @param {String} value
  41029. * @param {Object} options
  41030. * @return {String}
  41031. */
  41032. function onAttr (name, value, options) {
  41033. // do nothing
  41034. }
  41035. /**
  41036. * 匹配到不在白名单上的一个属性时
  41037. *
  41038. * @param {String} name
  41039. * @param {String} value
  41040. * @param {Object} options
  41041. * @return {String}
  41042. */
  41043. function onIgnoreAttr (name, value, options) {
  41044. // do nothing
  41045. }
  41046. var REGEXP_URL_JAVASCRIPT = /javascript\s*\:/img;
  41047. /**
  41048. * 过滤属性值
  41049. *
  41050. * @param {String} name
  41051. * @param {String} value
  41052. * @return {String}
  41053. */
  41054. function safeAttrValue(name, value) {
  41055. if (REGEXP_URL_JAVASCRIPT.test(value)) return '';
  41056. return value;
  41057. }
  41058. exports.whiteList = getDefaultWhiteList();
  41059. exports.getDefaultWhiteList = getDefaultWhiteList;
  41060. exports.onAttr = onAttr;
  41061. exports.onIgnoreAttr = onIgnoreAttr;
  41062. exports.safeAttrValue = safeAttrValue;
  41063. },{}],8:[function(require,module,exports){
  41064. /**
  41065. * cssfilter
  41066. *
  41067. * @author 老雷<leizongmin@gmail.com>
  41068. */
  41069. var DEFAULT = require('./default');
  41070. var FilterCSS = require('./css');
  41071. /**
  41072. * XSS过滤
  41073. *
  41074. * @param {String} css 要过滤的CSS代码
  41075. * @param {Object} options 选项:whiteList, onAttr, onIgnoreAttr
  41076. * @return {String}
  41077. */
  41078. function filterCSS (html, options) {
  41079. var xss = new FilterCSS(options);
  41080. return xss.process(html);
  41081. }
  41082. // 输出
  41083. exports = module.exports = filterCSS;
  41084. exports.FilterCSS = FilterCSS;
  41085. for (var i in DEFAULT) exports[i] = DEFAULT[i];
  41086. // 在浏览器端使用
  41087. if (typeof window !== 'undefined') {
  41088. window.filterCSS = module.exports;
  41089. }
  41090. },{"./css":6,"./default":7}],9:[function(require,module,exports){
  41091. /**
  41092. * cssfilter
  41093. *
  41094. * @author 老雷<leizongmin@gmail.com>
  41095. */
  41096. var _ = require('./util');
  41097. /**
  41098. * 解析style
  41099. *
  41100. * @param {String} css
  41101. * @param {Function} onAttr 处理属性的函数
  41102. * 参数格式: function (sourcePosition, position, name, value, source)
  41103. * @return {String}
  41104. */
  41105. function parseStyle (css, onAttr) {
  41106. css = _.trimRight(css);
  41107. if (css[css.length - 1] !== ';') css += ';';
  41108. var cssLength = css.length;
  41109. var isParenthesisOpen = false;
  41110. var lastPos = 0;
  41111. var i = 0;
  41112. var retCSS = '';
  41113. function addNewAttr () {
  41114. // 如果没有正常的闭合圆括号,则直接忽略当前属性
  41115. if (!isParenthesisOpen) {
  41116. var source = _.trim(css.slice(lastPos, i));
  41117. var j = source.indexOf(':');
  41118. if (j !== -1) {
  41119. var name = _.trim(source.slice(0, j));
  41120. var value = _.trim(source.slice(j + 1));
  41121. // 必须有属性名称
  41122. if (name) {
  41123. var ret = onAttr(lastPos, retCSS.length, name, value, source);
  41124. if (ret) retCSS += ret + '; ';
  41125. }
  41126. }
  41127. }
  41128. lastPos = i + 1;
  41129. }
  41130. for (; i < cssLength; i++) {
  41131. var c = css[i];
  41132. if (c === '/' && css[i + 1] === '*') {
  41133. // 备注开始
  41134. var j = css.indexOf('*/', i + 2);
  41135. // 如果没有正常的备注结束,则后面的部分全部跳过
  41136. if (j === -1) break;
  41137. // 直接将当前位置调到备注结尾,并且初始化状态
  41138. i = j + 1;
  41139. lastPos = i + 1;
  41140. isParenthesisOpen = false;
  41141. } else if (c === '(') {
  41142. isParenthesisOpen = true;
  41143. } else if (c === ')') {
  41144. isParenthesisOpen = false;
  41145. } else if (c === ';') {
  41146. if (isParenthesisOpen) {
  41147. // 在圆括号里面,忽略
  41148. } else {
  41149. addNewAttr();
  41150. }
  41151. } else if (c === '\n') {
  41152. addNewAttr();
  41153. }
  41154. }
  41155. return _.trim(retCSS);
  41156. }
  41157. module.exports = parseStyle;
  41158. },{"./util":10}],10:[function(require,module,exports){
  41159. module.exports = {
  41160. indexOf: function (arr, item) {
  41161. var i, j;
  41162. if (Array.prototype.indexOf) {
  41163. return arr.indexOf(item);
  41164. }
  41165. for (i = 0, j = arr.length; i < j; i++) {
  41166. if (arr[i] === item) {
  41167. return i;
  41168. }
  41169. }
  41170. return -1;
  41171. },
  41172. forEach: function (arr, fn, scope) {
  41173. var i, j;
  41174. if (Array.prototype.forEach) {
  41175. return arr.forEach(fn, scope);
  41176. }
  41177. for (i = 0, j = arr.length; i < j; i++) {
  41178. fn.call(scope, arr[i], i, arr);
  41179. }
  41180. },
  41181. trim: function (str) {
  41182. if (String.prototype.trim) {
  41183. return str.trim();
  41184. }
  41185. return str.replace(/(^\s*)|(\s*$)/g, '');
  41186. },
  41187. trimRight: function (str) {
  41188. if (String.prototype.trimRight) {
  41189. return str.trimRight();
  41190. }
  41191. return str.replace(/(\s*$)/g, '');
  41192. }
  41193. };
  41194. },{}]},{},[2]);
  41195. define("xss", (function (global) {
  41196. return function () {
  41197. var ret, fn;
  41198. fn = function (xss_noconflict) {
  41199. return {
  41200. filterXSS: window.filterXSS,
  41201. filterCSS: window.filterCSS
  41202. }
  41203. };
  41204. ret = fn.apply(global, arguments);
  41205. return ret;
  41206. };
  41207. }(this)));
  41208. /* Lo-Dash Template Loader v1.0.1
  41209. * Copyright 2015, Tim Branyen (@tbranyen).
  41210. * loader.js may be freely distributed under the MIT license.
  41211. */
  41212. (function(global) {
  41213. "use strict";
  41214. // Cache used to map configuration options between load and write.
  41215. var buildMap = {};
  41216. // Alias the correct `nodeRequire` method.
  41217. var nodeRequire = typeof requirejs === "function" && requirejs.nodeRequire;
  41218. // Strips trailing `/` from url fragments.
  41219. var stripTrailing = function(prop) {
  41220. return prop.replace(/(\/$)/, '');
  41221. };
  41222. // Define the plugin using the CommonJS syntax.
  41223. define('tpl',['require','exports','module','lodash'],function(require, exports) {
  41224. var _ = require("lodash");
  41225. exports.version = "1.0.1";
  41226. // Invoked by the AMD builder, passed the path to resolve, the require
  41227. // function, done callback, and the configuration options.
  41228. exports.load = function(name, req, load, config) {
  41229. var isDojo;
  41230. // Dojo provides access to the config object through the req function.
  41231. if (!config) {
  41232. config = require.rawConfig;
  41233. isDojo = true;
  41234. }
  41235. var contents = "";
  41236. var settings = configure(config);
  41237. // If the baseUrl and root are the same, just null out the root.
  41238. if (stripTrailing(config.baseUrl) === stripTrailing(settings.root)) {
  41239. settings.root = '';
  41240. }
  41241. var url = require.toUrl(settings.root + name + settings.ext);
  41242. if (isDojo && url.indexOf(config.baseUrl) !== 0) {
  41243. url = stripTrailing(config.baseUrl) + url;
  41244. }
  41245. // Builds with r.js require Node.js to be installed.
  41246. if (config.isBuild) {
  41247. // If in Node, get access to the filesystem.
  41248. var fs = nodeRequire("fs");
  41249. try {
  41250. // First try reading the filepath as-is.
  41251. contents = String(fs.readFileSync(url));
  41252. } catch(ex) {
  41253. // If it failed, it's most likely because of a leading `/` and not an
  41254. // absolute path. Remove the leading slash and try again.
  41255. if (url.slice(0, 1) === "/") {
  41256. url = url.slice(1);
  41257. }
  41258. // Try reading again with the leading `/`.
  41259. contents = String(fs.readFileSync(url));
  41260. }
  41261. // Read in the file synchronously, as RequireJS expects, and return the
  41262. // contents. Process as a Lo-Dash template.
  41263. buildMap[name] = _.template(contents);
  41264. return load();
  41265. }
  41266. // Create a basic XHR.
  41267. var xhr = new XMLHttpRequest();
  41268. // Wait for it to load.
  41269. xhr.onreadystatechange = function() {
  41270. if (xhr.readyState === 4) {
  41271. var templateSettings = _.clone(settings.templateSettings);
  41272. // Attach the sourceURL.
  41273. templateSettings.sourceURL = url;
  41274. // Process as a Lo-Dash template and cache.
  41275. buildMap[name] = _.template(xhr.responseText, templateSettings);
  41276. // Return the compiled template.
  41277. load(buildMap[name]);
  41278. }
  41279. };
  41280. // Initiate the fetch.
  41281. xhr.open("GET", url, true);
  41282. xhr.send(null);
  41283. };
  41284. // Also invoked by the AMD builder, this writes out a compatible define
  41285. // call that will work with loaders such as almond.js that cannot read
  41286. // the configuration data.
  41287. exports.write = function(pluginName, moduleName, write) {
  41288. var template = buildMap[moduleName].source;
  41289. // Write out the actual definition
  41290. write(strDefine(pluginName, moduleName, template));
  41291. };
  41292. // This is for curl.js/cram.js build-time support.
  41293. exports.compile = function(pluginName, moduleName, req, io, config) {
  41294. configure(config);
  41295. // Ask cram to fetch the template file (resId) and pass it to `write`.
  41296. io.read(moduleName, write, io.error);
  41297. function write(template) {
  41298. // Write-out define(id,function(){return{/* template */}});
  41299. io.write(strDefine(pluginName, moduleName, template));
  41300. }
  41301. };
  41302. // Crafts the written definition form of the module during a build.
  41303. function strDefine(pluginName, moduleName, template) {
  41304. return [
  41305. "define('", pluginName, "!", moduleName, "', ", "['lodash'], ",
  41306. [
  41307. "function(_) {",
  41308. "return ", template, ";",
  41309. "}"
  41310. ].join(""),
  41311. ");\n"
  41312. ].join("");
  41313. }
  41314. function configure(config) {
  41315. // Default settings point to the project root and using html files.
  41316. var settings = _.extend({
  41317. ext: ".html",
  41318. root: config.baseUrl,
  41319. templateSettings: {}
  41320. }, config.lodashLoader);
  41321. // Ensure the root has been properly configured with a trailing slash,
  41322. // unless it's an empty string or undefined, in which case work off the
  41323. // baseUrl.
  41324. if (settings.root && settings.root.slice(-1) !== "/") {
  41325. settings.root += "/";
  41326. }
  41327. // Set the custom passed in template settings.
  41328. _.extend(_.templateSettings, settings.templateSettings);
  41329. return settings;
  41330. }
  41331. });
  41332. })(typeof global === "object" ? global : this);
  41333. define('tpl!action', ['lodash'], function(_) {return function(o) {
  41334. var __t, __p = '', __e = _.escape;
  41335. __p += '<div class="message chat-message ' +
  41336. __e(o.extra_classes) +
  41337. '" data-isodate="' +
  41338. __e(o.isodate) +
  41339. '">\n <span class="chat-msg-author chat-msg-' +
  41340. __e(o.sender) +
  41341. '">' +
  41342. __e(o.time) +
  41343. ' **' +
  41344. __e(o.username) +
  41345. '&nbsp;</span>\n <span class="chat-msg-content chat-action"><!-- message gets added here via renderMessage --></span>\n</div>\n';
  41346. return __p
  41347. };});
  41348. define('tpl!chatbox', ['lodash'], function(_) {return function(o) {
  41349. var __t, __p = '', __j = Array.prototype.join;
  41350. function print() { __p += __j.call(arguments, '') }
  41351. __p += '<div class="flyout box-flyout">\n <div class="chat-body">\n <div class="chat-content ';
  41352. if (o.show_send_button) { ;
  41353. __p += 'chat-content-sendbutton';
  41354. } ;
  41355. __p += '"></div>\n <div class="message-form-container"/>\n </div>\n</div>\n';
  41356. return __p
  41357. };});
  41358. define('tpl!chatbox_head', ['lodash'], function(_) {return function(o) {
  41359. var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
  41360. function print() { __p += __j.call(arguments, '') }
  41361. __p += '<div class="chat-head chat-head-chatbox row no-gutters">\n <div class="col">\n <div class="row no-gutters">\n ';
  41362. if (o.show_avatar) { ;
  41363. __p += '\n <div class="col-auto">\n <img alt="User Avatar"\n class="avatar"\n height="' +
  41364. __e(o.avatar_height) +
  41365. 'px" width="' +
  41366. __e(o.avatar_width) +
  41367. 'px"\n src="data:' +
  41368. __e(o.image_type || o._converse.DEFAULT_IMAGE_TYPE) +
  41369. ';base64,' +
  41370. __e(o.image || o._converse.DEFAULT_IMAGE) +
  41371. '"/>\n </div>\n ';
  41372. } ;
  41373. __p += '\n <div class="col chat-title" title="' +
  41374. __e(o.jid) +
  41375. '">\n ';
  41376. if (o.url) { ;
  41377. __p += '\n <a href="' +
  41378. __e(o.url) +
  41379. '" target="_blank" rel="noopener" class="user">\n ';
  41380. } ;
  41381. __p += '\n ' +
  41382. __e( o.fullname || o.jid ) +
  41383. '\n ';
  41384. if (o.url) { ;
  41385. __p += '\n </a>\n ';
  41386. } ;
  41387. __p += '\n <p class="user-custom-message">' +
  41388. __e( o.status ) +
  41389. '</p>\n </div>\n </div>\n </div>\n <div class="chatbox-buttons row no-gutters">\n <a class="chatbox-btn close-chatbox-button fa fa-close" title=' +
  41390. __e(o.info_close) +
  41391. '></a>\n <!-- <a class="chatbox-btn fa fa-vcard" title="Contact profile" data-toggle="modal" data-target="#contactProfileModal"></a> -->\n </div>\n</div>\n';
  41392. return __p
  41393. };});
  41394. define('tpl!chatbox_message_form', ['lodash'], function(_) {return function(o) {
  41395. var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
  41396. function print() { __p += __j.call(arguments, '') }
  41397. __p += '<div class="message-form-container">\n<div class="new-msgs-indicator hidden">▼ ' +
  41398. __e( o.unread_msgs ) +
  41399. ' ▼</div>\n<form class="sendXMPPMessage">\n ';
  41400. if (o.show_toolbar) { ;
  41401. __p += '\n <ul class="chat-toolbar no-text-select"></ul>\n ';
  41402. } ;
  41403. __p += '\n <input type="text" placeholder="' +
  41404. ((__t = (o.label_spoiler_hint)) == null ? '' : __t) +
  41405. '" value="' +
  41406. ((__t = ( o.hint_value )) == null ? '' : __t) +
  41407. '"\n class="';
  41408. if (!o.composing_spoiler) { ;
  41409. __p += ' hidden ';
  41410. } ;
  41411. __p += ' spoiler-hint"/>\n <textarea\n type="text"\n class="chat-textarea\n ';
  41412. if (o.show_send_button) { ;
  41413. __p += ' chat-textarea-send-button ';
  41414. } ;
  41415. __p += '\n ';
  41416. if (o.composing_spoiler) { ;
  41417. __p += ' spoiler ';
  41418. } ;
  41419. __p += '"\n placeholder="' +
  41420. __e(o.label_personal_message) +
  41421. '">' +
  41422. ((__t = ( o.message_value )) == null ? '' : __t) +
  41423. '</textarea>\n ';
  41424. if (o.show_send_button) { ;
  41425. __p += '\n <button type="submit" class="pure-button send-button">' +
  41426. __e( o.label_send ) +
  41427. '</button>\n ';
  41428. } ;
  41429. __p += '\n</form>\n</div>\n';
  41430. return __p
  41431. };});
  41432. define('tpl!emojis', ['lodash'], function(_) {return function(o) {
  41433. var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
  41434. function print() { __p += __j.call(arguments, '') }
  41435. __p += '<div class="emoji-picker-container">\n';
  41436. _.forEach(o.emojis_by_category, function (obj, category) { ;
  41437. __p += '\n <ul class="emoji-picker emoji-picker-' +
  41438. __e(category) +
  41439. ' ';
  41440. if (o.current_category !== category) { ;
  41441. __p += ' hidden ';
  41442. } ;
  41443. __p += '">\n ';
  41444. _.forEach(o.emojis_by_category[category], function (emoji) { ;
  41445. __p += '\n <li class="emoji insert-emoji ';
  41446. if (o.shouldBeHidden(emoji._shortname, o.current_skintone, o.toned_emojis)) { ;
  41447. __p += ' hidden ';
  41448. }; ;
  41449. __p += '"\n data-emoji="' +
  41450. __e(emoji._shortname) +
  41451. '">\n <a href="#" data-emoji="' +
  41452. __e(emoji._shortname) +
  41453. '"> ' +
  41454. ((__t = ( o.transform(emoji._shortname) )) == null ? '' : __t) +
  41455. ' </a>\n </li>\n ';
  41456. }); ;
  41457. __p += '\n </ul>\n';
  41458. }); ;
  41459. __p += '\n<ul class="emoji-toolbar">\n <li class="emoji-category-picker">\n <ul>\n ';
  41460. _.forEach(o.emojis_by_category, function (obj, category) { ;
  41461. __p += '\n <li data-category="' +
  41462. __e(category) +
  41463. '" class="emoji-category ';
  41464. if (o.current_category === category) { ;
  41465. __p += ' picked ';
  41466. } ;
  41467. __p += '">\n <a class="pick-category" href="#" data-category="' +
  41468. __e(category) +
  41469. '"> ' +
  41470. ((__t = ( o.transform(o.emojis_by_category[category][0]._shortname) )) == null ? '' : __t) +
  41471. ' </a>\n </li>\n ';
  41472. }); ;
  41473. __p += '\n </ul>\n </li>\n <li class="emoji-skintone-picker">\n <ul>\n ';
  41474. _.forEach(o.skintones, function (skintone) { ;
  41475. __p += '\n <li data-skintone="' +
  41476. __e(skintone) +
  41477. '" class="emoji-skintone ';
  41478. if (o.current_skintone === skintone) { ;
  41479. __p += ' picked ';
  41480. } ;
  41481. __p += '">\n <a class="pick-skintone" href="#" data-skintone="' +
  41482. __e(skintone) +
  41483. '"> ' +
  41484. ((__t = ( o.transform(':'+skintone+':') )) == null ? '' : __t) +
  41485. ' </a>\n </li>\n ';
  41486. }); ;
  41487. __p += '\n </ul>\n </li>\n</ul>\n</div>\n';
  41488. return __p
  41489. };});
  41490. define('tpl!help_message', ['lodash'], function(_) {return function(o) {
  41491. var __t, __p = '', __e = _.escape;
  41492. __p += '<div class="message chat-' +
  41493. __e(o.type) +
  41494. '" data-isodate="' +
  41495. __e(o.isodate) +
  41496. '">' +
  41497. ((__t = (o.message)) == null ? '' : __t) +
  41498. '</div>\n';
  41499. return __p
  41500. };});
  41501. define('tpl!info', ['lodash'], function(_) {return function(o) {
  41502. var __t, __p = '', __e = _.escape;
  41503. __p += '<div class="message chat-info ' +
  41504. __e(o.extra_classes) +
  41505. '" data-isodate="' +
  41506. __e(o.isodate) +
  41507. '" ' +
  41508. __e(o.data) +
  41509. '>' +
  41510. __e(o.message) +
  41511. '</div>\n';
  41512. return __p
  41513. };});
  41514. define('tpl!message', ['lodash'], function(_) {return function(o) {
  41515. var __t, __p = '', __e = _.escape;
  41516. __p += '<div class="message chat-message ' +
  41517. __e(o.extra_classes) +
  41518. '" data-isodate="' +
  41519. __e(o.isodate) +
  41520. '" data-msgid="' +
  41521. __e(o.msgid) +
  41522. '">\n <span class="chat-msg-author chat-msg-' +
  41523. __e(o.sender) +
  41524. '">' +
  41525. __e(o.time) +
  41526. ' ' +
  41527. __e(o.username) +
  41528. ':&nbsp;</span>\n <span class="chat-msg-content"><!-- message gets added here via renderMessage --></span>\n</div>\n';
  41529. return __p
  41530. };});
  41531. define('tpl!new_day', ['lodash'], function(_) {return function(o) {
  41532. var __t, __p = '', __e = _.escape;
  41533. __p += '<time class="message chat-info chat-date badge badge-info" data-isodate="' +
  41534. __e(o.isodate) +
  41535. '">' +
  41536. __e(o.datestring) +
  41537. '</time>\n';
  41538. return __p
  41539. };});
  41540. define('tpl!spinner', ['lodash'], function(_) {return function(o) {
  41541. var __t, __p = '';
  41542. __p += '<span class="spinner fa fa-spinner centered"/>\n';
  41543. return __p
  41544. };});
  41545. define('tpl!spoiler_button', ['lodash'], function(_) {return function(o) {
  41546. var __t, __p = '', __j = Array.prototype.join;
  41547. function print() { __p += __j.call(arguments, '') }
  41548. __p += '<li class="toggle-compose-spoiler fa ';
  41549. if (o.composing_spoiler) { ;
  41550. __p += ' fa-eye-slash ';
  41551. } ;
  41552. __p += ' ';
  41553. if (!o.composing_spoiler) { ;
  41554. __p += ' fa-eye ';
  41555. } ;
  41556. __p += '"\n title="' +
  41557. ((__t = ( o.label_toggle_spoiler )) == null ? '' : __t) +
  41558. '"></a>\n</li>\n';
  41559. return __p
  41560. };});
  41561. define('tpl!spoiler_message', ['lodash'], function(_) {return function(o) {
  41562. var __t, __p = '', __e = _.escape;
  41563. __p += '<div class="message chat-message ' +
  41564. __e(o.extra_classes) +
  41565. '" data-isodate="' +
  41566. __e(o.isodate) +
  41567. '" data-msgid="' +
  41568. __e(o.msgid) +
  41569. '">\n <span class="chat-msg-author chat-msg-' +
  41570. __e(o.sender) +
  41571. '">' +
  41572. __e(o.time) +
  41573. ' ' +
  41574. __e(o.username) +
  41575. ':&nbsp;</span>\n <div class="spoiler-hint"><!-- message gets added here via renderMessage --></div>\n <a class="icon-eye toggle-spoiler" data-toggle-state="closed" href="#">' +
  41576. __e(o.label_show) +
  41577. '</a>\n <div class="chat-msg-content spoiler collapsed"><!-- message gets added here via renderMessage --></div>\n</div>\n';
  41578. return __p
  41579. };});
  41580. define('tpl!toolbar', ['lodash'], function(_) {return function(o) {
  41581. var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
  41582. function print() { __p += __j.call(arguments, '') }
  41583. if (o.use_emoji) { ;
  41584. __p += '\n<li class="toggle-toolbar-menu toggle-smiley fa fa-smile-o dropup">\n <div class="emoji-picker dropdown-menu toolbar-menu"></div>\n</li>\n';
  41585. } ;
  41586. __p += '\n';
  41587. if (o.show_call_button) { ;
  41588. __p += '\n<li class="toggle-call fa fa-phone" title="' +
  41589. __e(o.label_start_call) +
  41590. '"></li>\n';
  41591. } ;
  41592. __p += '\n';
  41593. return __p
  41594. };});
  41595. define('tpl!chatboxes', ['lodash'], function(_) {return function(o) {
  41596. var __t, __p = '';
  41597. __p += '<div class="converse-chatboxes row no-gutters"></div>\n<div id="converse-modals" class="modals"></div>\n';
  41598. return __p
  41599. };});
  41600. /*!
  41601. * Backbone.Overview
  41602. *
  41603. * Copyright (c) 2018, JC Brand <jc@opkode.com>
  41604. * Licensed under the Mozilla Public License (MPL)
  41605. */
  41606. (function (root, factory) {
  41607. if (typeof define === 'function' && define.amd) {
  41608. define('backbone.overview',["underscore", "backbone"], factory);
  41609. } else {
  41610. // RequireJS isn't being used.
  41611. // Assume underscore and backbone are loaded in <script> tags
  41612. factory(_ || root._, Backbone || root.Backbone);
  41613. }
  41614. })(this, function (_, Backbone) {
  41615. "use strict";
  41616. var View = _.isUndefined(Backbone.NativeView) ? Backbone.View : Backbone.NativeView;
  41617. var Overview = Backbone.Overview = function (options) {
  41618. /* An Overview is a View that contains and keeps track of sub-views.
  41619. * Kind of like what a Collection is to a Model.
  41620. */
  41621. var that = this;
  41622. this.views = {};
  41623. this.keys = _.partial(_.keys, this.views);
  41624. this.getAll = _.partial(_.identity, this.views);
  41625. this.get = function (id) {
  41626. return that.views[id];
  41627. };
  41628. this.xget = function (id) {
  41629. /* Exclusive get. Returns all instances except the given id. */
  41630. return _.filter(that.views, function (view, vid) {
  41631. return vid !== id;
  41632. });
  41633. };
  41634. this.add = function (id, view) {
  41635. that.views[id] = view;
  41636. return view;
  41637. };
  41638. this.remove = function (id) {
  41639. if (typeof id === "undefined") {
  41640. new View().remove.apply(that);
  41641. }
  41642. var view = that.views[id];
  41643. if (view) {
  41644. delete that.views[id];
  41645. view.remove();
  41646. return view;
  41647. }
  41648. };
  41649. this.removeAll = function () {
  41650. _.each(_.keys(that.views), that.remove);
  41651. return that;
  41652. };
  41653. View.apply(this, Array.prototype.slice.apply(arguments));
  41654. };
  41655. var methods = ['all', 'any', 'chain', 'collect', 'contains', 'detect', 'difference', 'drop', 'each', 'every', 'filter', 'find', 'first', 'foldl', 'foldr', 'forEach', 'head', 'include', 'indexOf', 'initial', 'inject', 'invoke', 'isEmpty', 'last', 'lastIndexOf', 'map', 'max', 'min', 'reduce', 'reduceRight', 'reject', 'rest', 'sample', 'select', 'shuffle', 'size', 'some', 'sortBy', 'tail', 'take', 'toArray', 'without']; // Mix in each Underscore method as a proxy to `Overview#view`.
  41656. _.each(methods, function (method) {
  41657. Overview.prototype[method] = function () {
  41658. var args = Array.prototype.slice.call(arguments);
  41659. args.unshift(this.views);
  41660. return _[method].apply(_, args);
  41661. };
  41662. });
  41663. _.extend(Overview.prototype, View.prototype);
  41664. Overview.extend = View.extend;
  41665. Backbone.OrderedListView = Backbone.Overview.extend({
  41666. // The `listItems` attribute denotes the path (from this View) to the
  41667. // list of items.
  41668. listItems: 'model',
  41669. // The `sortEvent` attribute specifies the event which should cause the
  41670. // ordered list to be sorted.
  41671. sortEvent: 'change',
  41672. // The `listSelector` is the selector used to query for the DOM list
  41673. // element which contains the ordered items.
  41674. listSelector: '.ordered-items',
  41675. // The `itemView` is constructor which should be called to create a
  41676. // View for a new item.
  41677. ItemView: undefined,
  41678. initialize: function initialize() {
  41679. this.sortEventually = _.debounce(this.sortAndPositionAllItems.bind(this), 500);
  41680. this.items = _.get(this, this.listItems);
  41681. this.items.on('add', this.createItemView, this);
  41682. this.items.on('add', this.sortEventually, this);
  41683. this.items.on(this.sortEvent, this.sortEventually, this);
  41684. },
  41685. createItemView: function createItemView(item) {
  41686. var item_view = this.get(item.get('id'));
  41687. if (!item_view) {
  41688. item_view = new this.ItemView({
  41689. model: item
  41690. });
  41691. this.add(item.get('id'), item_view);
  41692. } else {
  41693. item_view.model = item;
  41694. item_view.initialize();
  41695. }
  41696. item_view.render();
  41697. return item_view;
  41698. },
  41699. sortAndPositionAllItems: function sortAndPositionAllItems() {
  41700. var _this = this;
  41701. this.items.sort();
  41702. this.items.each(function (item) {
  41703. if (_.isUndefined(_this.get(item.get('id')))) {
  41704. _this.createItemView(item);
  41705. }
  41706. _this.positionItem(item, _this.el.querySelector(_this.listSelector));
  41707. });
  41708. },
  41709. positionItem: function positionItem(item, list_el) {
  41710. /* Place the View's DOM element in the correct alphabetical
  41711. * position in the list.
  41712. *
  41713. * IMPORTANT: there's an important implicit assumption being
  41714. * made here. And that is that initially this method gets called
  41715. * for each item in the right positional order.
  41716. *
  41717. * In other words, it gets called for the 0th, then the
  41718. * 1st, then the 2nd, 3rd and so on.
  41719. *
  41720. * That's why we call it in the "success" handler after
  41721. * fetching the items, so that we know we have ALL of
  41722. * them and that they're sorted.
  41723. */
  41724. var view = this.get(item.get('id')),
  41725. index = this.items.indexOf(item);
  41726. if (index === 0) {
  41727. list_el.insertAdjacentElement('afterbegin', view.el);
  41728. } else if (index === this.items.length - 1) {
  41729. list_el.insertAdjacentElement('beforeend', view.el);
  41730. } else {
  41731. var neighbour_el = list_el.querySelector('li:nth-child(' + index + ')');
  41732. neighbour_el.insertAdjacentElement('afterend', view.el);
  41733. }
  41734. return view;
  41735. }
  41736. });
  41737. return Backbone.Overview;
  41738. });
  41739. //# sourceMappingURL=backbone.overview.js.map;
  41740. // Converse.js (A browser based XMPP chat client)
  41741. // http://conversejs.org
  41742. //
  41743. // Copyright (c) 2012-2017, Jan-Carel Brand <jc@opkode.com>
  41744. // Licensed under the Mozilla Public License (MPLv2)
  41745. //
  41746. /*global define */
  41747. (function (root, factory) {
  41748. define('converse-chatboxes',["converse-core", "tpl!chatboxes", "backbone.overview"], factory);
  41749. })(void 0, function (converse, tpl_chatboxes) {
  41750. "use strict";
  41751. var _converse$env = converse.env,
  41752. Backbone = _converse$env.Backbone,
  41753. Promise = _converse$env.Promise,
  41754. Strophe = _converse$env.Strophe,
  41755. b64_sha1 = _converse$env.b64_sha1,
  41756. moment = _converse$env.moment,
  41757. utils = _converse$env.utils,
  41758. _ = _converse$env._;
  41759. converse.plugins.add('converse-chatboxes', {
  41760. overrides: {
  41761. // Overrides mentioned here will be picked up by converse.js's
  41762. // plugin architecture they will replace existing methods on the
  41763. // relevant objects or classes.
  41764. disconnect: function disconnect() {
  41765. var _converse = this.__super__._converse;
  41766. _converse.chatboxviews.closeAllChatBoxes();
  41767. return this.__super__.disconnect.apply(this, arguments);
  41768. },
  41769. logOut: function logOut() {
  41770. var _converse = this.__super__._converse;
  41771. _converse.chatboxviews.closeAllChatBoxes();
  41772. return this.__super__.logOut.apply(this, arguments);
  41773. },
  41774. initStatus: function initStatus(reconnecting) {
  41775. var _converse = this.__super__._converse;
  41776. if (!reconnecting) {
  41777. _converse.chatboxviews.closeAllChatBoxes();
  41778. }
  41779. return this.__super__.initStatus.apply(this, arguments);
  41780. }
  41781. },
  41782. initialize: function initialize() {
  41783. /* The initialize function gets called as soon as the plugin is
  41784. * loaded by converse.js's plugin machinery.
  41785. */
  41786. var _converse = this._converse;
  41787. _converse.api.promises.add(['chatBoxesFetched', 'chatBoxesInitialized']);
  41788. function openChat(jid) {
  41789. if (!utils.isValidJID(jid)) {
  41790. return converse.log("Invalid JID \"".concat(jid, "\" provided in URL fragment"), Strophe.LogLevel.WARN);
  41791. }
  41792. Promise.all([_converse.api.waitUntil('rosterContactsFetched'), _converse.api.waitUntil('chatBoxesFetched')]).then(function () {
  41793. _converse.api.chats.open(jid);
  41794. });
  41795. }
  41796. _converse.router.route('converse/chat?jid=:jid', openChat);
  41797. _converse.Message = Backbone.Model.extend({
  41798. defaults: function defaults() {
  41799. return {
  41800. msgid: _converse.connection.getUniqueId()
  41801. };
  41802. }
  41803. });
  41804. _converse.Messages = Backbone.Collection.extend({
  41805. model: _converse.Message,
  41806. comparator: 'time'
  41807. });
  41808. _converse.ChatBox = Backbone.Model.extend({
  41809. defaults: {
  41810. 'bookmarked': false,
  41811. 'chat_state': undefined,
  41812. 'image': _converse.DEFAULT_IMAGE,
  41813. 'image_type': _converse.DEFAULT_IMAGE_TYPE,
  41814. 'num_unread': 0,
  41815. 'show_avatar': true,
  41816. 'type': 'chatbox',
  41817. 'url': ''
  41818. },
  41819. initialize: function initialize() {
  41820. this.messages = new _converse.Messages();
  41821. this.messages.browserStorage = new Backbone.BrowserStorage[_converse.message_storage](b64_sha1("converse.messages".concat(this.get('jid')).concat(_converse.bare_jid)));
  41822. this.save({
  41823. // The chat_state will be set to ACTIVE once the chat box is opened
  41824. // and we listen for change:chat_state, so shouldn't set it to ACTIVE here.
  41825. 'box_id': b64_sha1(this.get('jid')),
  41826. 'time_opened': this.get('time_opened') || moment().valueOf(),
  41827. 'user_id': Strophe.getNodeFromJid(this.get('jid'))
  41828. });
  41829. },
  41830. getMessageBody: function getMessageBody(message) {
  41831. var type = message.getAttribute('type');
  41832. return type === 'error' ? _.propertyOf(message.querySelector('error text'))('textContent') : _.propertyOf(message.querySelector('body'))('textContent');
  41833. },
  41834. getMessageAttributes: function getMessageAttributes(message, delay, original_stanza) {
  41835. /* Parses a passed in message stanza and returns an object
  41836. * of attributes.
  41837. *
  41838. * Parameters:
  41839. * (XMLElement) message - The message stanza
  41840. * (XMLElement) delay - The <delay> node from the
  41841. * stanza, if there was one.
  41842. * (XMLElement) original_stanza - The original stanza,
  41843. * that contains the message stanza, if it was
  41844. * contained, otherwise it's the message stanza itself.
  41845. */
  41846. var _converse = this.__super__._converse,
  41847. __ = _converse.__;
  41848. delay = delay || message.querySelector('delay');
  41849. var type = message.getAttribute('type'),
  41850. body = this.getMessageBody(message);
  41851. var delayed = !_.isNull(delay),
  41852. is_groupchat = type === 'groupchat',
  41853. chat_state = message.getElementsByTagName(_converse.COMPOSING).length && _converse.COMPOSING || message.getElementsByTagName(_converse.PAUSED).length && _converse.PAUSED || message.getElementsByTagName(_converse.INACTIVE).length && _converse.INACTIVE || message.getElementsByTagName(_converse.ACTIVE).length && _converse.ACTIVE || message.getElementsByTagName(_converse.GONE).length && _converse.GONE;
  41854. var from;
  41855. if (is_groupchat) {
  41856. from = Strophe.unescapeNode(Strophe.getResourceFromJid(message.getAttribute('from')));
  41857. } else {
  41858. from = Strophe.getBareJidFromJid(message.getAttribute('from'));
  41859. }
  41860. var time = delayed ? delay.getAttribute('stamp') : moment().format();
  41861. var sender, fullname;
  41862. if (is_groupchat && from === this.get('nick') || !is_groupchat && from === _converse.bare_jid) {
  41863. sender = 'me';
  41864. fullname = _converse.xmppstatus.get('fullname') || from;
  41865. } else {
  41866. sender = 'them';
  41867. fullname = this.get('fullname') || from;
  41868. }
  41869. var spoiler = message.querySelector("spoiler[xmlns=\"".concat(Strophe.NS.SPOILER, "\"]"));
  41870. var attrs = {
  41871. 'type': type,
  41872. 'chat_state': chat_state,
  41873. 'delayed': delayed,
  41874. 'fullname': fullname,
  41875. 'message': body || undefined,
  41876. 'msgid': message.getAttribute('id'),
  41877. 'sender': sender,
  41878. 'time': time,
  41879. 'is_spoiler': !_.isNull(spoiler)
  41880. };
  41881. if (spoiler) {
  41882. attrs.spoiler_hint = spoiler.textContent.length > 0 ? spoiler.textContent : '';
  41883. }
  41884. return attrs;
  41885. },
  41886. createMessage: function createMessage(message, delay, original_stanza) {
  41887. /* Create a Backbone.Message object inside this chat box
  41888. * based on the identified message stanza.
  41889. */
  41890. return this.messages.create(this.getMessageAttributes.apply(this, arguments));
  41891. },
  41892. newMessageWillBeHidden: function newMessageWillBeHidden() {
  41893. /* Returns a boolean to indicate whether a newly received
  41894. * message will be visible to the user or not.
  41895. */
  41896. return this.get('hidden') || this.get('minimized') || this.isScrolledUp() || _converse.windowState === 'hidden';
  41897. },
  41898. incrementUnreadMsgCounter: function incrementUnreadMsgCounter(stanza) {
  41899. /* Given a newly received message, update the unread counter if
  41900. * necessary.
  41901. */
  41902. if (_.isNull(stanza.querySelector('body'))) {
  41903. return; // The message has no text
  41904. }
  41905. if (utils.isNewMessage(stanza) && this.newMessageWillBeHidden()) {
  41906. this.save({
  41907. 'num_unread': this.get('num_unread') + 1
  41908. });
  41909. _converse.incrementMsgCounter();
  41910. }
  41911. },
  41912. clearUnreadMsgCounter: function clearUnreadMsgCounter() {
  41913. this.save({
  41914. 'num_unread': 0
  41915. });
  41916. },
  41917. isScrolledUp: function isScrolledUp() {
  41918. return this.get('scrolled', true);
  41919. }
  41920. });
  41921. _converse.ChatBoxes = Backbone.Collection.extend({
  41922. comparator: 'time_opened',
  41923. model: function model(attrs, options) {
  41924. return new _converse.ChatBox(attrs, options);
  41925. },
  41926. registerMessageHandler: function registerMessageHandler() {
  41927. _converse.connection.addHandler(this.onMessage.bind(this), null, 'message', 'chat');
  41928. _converse.connection.addHandler(this.onErrorMessage.bind(this), null, 'message', 'error');
  41929. },
  41930. chatBoxMayBeShown: function chatBoxMayBeShown(chatbox) {
  41931. return true;
  41932. },
  41933. onChatBoxesFetched: function onChatBoxesFetched(collection) {
  41934. var _this = this;
  41935. /* Show chat boxes upon receiving them from sessionStorage */
  41936. collection.each(function (chatbox) {
  41937. if (_this.chatBoxMayBeShown(chatbox)) {
  41938. chatbox.trigger('show');
  41939. }
  41940. });
  41941. _converse.emit('chatBoxesFetched');
  41942. },
  41943. onConnected: function onConnected() {
  41944. this.browserStorage = new Backbone.BrowserStorage[_converse.storage](b64_sha1("converse.chatboxes-".concat(_converse.bare_jid)));
  41945. this.registerMessageHandler();
  41946. this.fetch({
  41947. add: true,
  41948. success: this.onChatBoxesFetched.bind(this)
  41949. });
  41950. },
  41951. onErrorMessage: function onErrorMessage(message) {
  41952. /* Handler method for all incoming error message stanzas
  41953. */
  41954. // TODO: we can likely just reuse "onMessage" below
  41955. var from_jid = Strophe.getBareJidFromJid(message.getAttribute('from'));
  41956. if (utils.isSameBareJID(from_jid, _converse.bare_jid)) {
  41957. return true;
  41958. } // Get chat box, but only create a new one when the message has a body.
  41959. var chatbox = this.getChatBox(from_jid);
  41960. if (!chatbox) {
  41961. return true;
  41962. }
  41963. chatbox.createMessage(message, null, message);
  41964. return true;
  41965. },
  41966. onMessage: function onMessage(message) {
  41967. /* Handler method for all incoming single-user chat "message"
  41968. * stanzas.
  41969. *
  41970. * Parameters:
  41971. * (XMLElement) message - The incoming message stanza
  41972. */
  41973. var contact_jid,
  41974. delay,
  41975. resource,
  41976. from_jid = message.getAttribute('from'),
  41977. to_jid = message.getAttribute('to');
  41978. var original_stanza = message,
  41979. to_resource = Strophe.getResourceFromJid(to_jid),
  41980. is_carbon = !_.isNull(message.querySelector("received[xmlns=\"".concat(Strophe.NS.CARBONS, "\"]")));
  41981. if (_converse.filter_by_resource && to_resource && to_resource !== _converse.resource) {
  41982. _converse.log("onMessage: Ignoring incoming message intended for a different resource: ".concat(to_jid), Strophe.LogLevel.INFO);
  41983. return true;
  41984. } else if (utils.isHeadlineMessage(_converse, message)) {
  41985. // XXX: Ideally we wouldn't have to check for headline
  41986. // messages, but Prosody sends headline messages with the
  41987. // wrong type ('chat'), so we need to filter them out here.
  41988. _converse.log("onMessage: Ignoring incoming headline message sent with type 'chat' from JID: ".concat(from_jid), Strophe.LogLevel.INFO);
  41989. return true;
  41990. }
  41991. var forwarded = message.querySelector('forwarded');
  41992. if (!_.isNull(forwarded)) {
  41993. var forwarded_message = forwarded.querySelector('message');
  41994. var forwarded_from = forwarded_message.getAttribute('from');
  41995. if (is_carbon && Strophe.getBareJidFromJid(forwarded_from) !== from_jid) {
  41996. // Prevent message forging via carbons
  41997. //
  41998. // https://xmpp.org/extensions/xep-0280.html#security
  41999. return true;
  42000. }
  42001. message = forwarded_message;
  42002. delay = forwarded.querySelector('delay');
  42003. from_jid = message.getAttribute('from');
  42004. to_jid = message.getAttribute('to');
  42005. }
  42006. var from_bare_jid = Strophe.getBareJidFromJid(from_jid),
  42007. from_resource = Strophe.getResourceFromJid(from_jid),
  42008. is_me = from_bare_jid === _converse.bare_jid;
  42009. if (is_me) {
  42010. // I am the sender, so this must be a forwarded message...
  42011. contact_jid = Strophe.getBareJidFromJid(to_jid);
  42012. resource = Strophe.getResourceFromJid(to_jid);
  42013. } else {
  42014. contact_jid = from_bare_jid;
  42015. resource = from_resource;
  42016. } // Get chat box, but only create a new one when the message has a body.
  42017. var attrs = {
  42018. 'fullname': _.get(_converse.api.contacts.get(contact_jid), 'attributes.fullname')
  42019. };
  42020. var chatbox = this.getChatBox(contact_jid, attrs, !_.isNull(message.querySelector('body'))),
  42021. msgid = message.getAttribute('id');
  42022. if (chatbox) {
  42023. var messages = msgid && chatbox.messages.findWhere({
  42024. msgid: msgid
  42025. }) || [];
  42026. if (_.isEmpty(messages)) {
  42027. // Only create the message when we're sure it's not a
  42028. // duplicate
  42029. chatbox.incrementUnreadMsgCounter(original_stanza);
  42030. chatbox.createMessage(message, delay, original_stanza);
  42031. }
  42032. }
  42033. _converse.emit('message', {
  42034. 'stanza': original_stanza,
  42035. 'chatbox': chatbox
  42036. });
  42037. return true;
  42038. },
  42039. getChatBox: function getChatBox(jid) {
  42040. var attrs = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  42041. var create = arguments.length > 2 ? arguments[2] : undefined;
  42042. /* Returns a chat box or optionally return a newly
  42043. * created one if one doesn't exist.
  42044. *
  42045. * Parameters:
  42046. * (String) jid - The JID of the user whose chat box we want
  42047. * (Boolean) create - Should a new chat box be created if none exists?
  42048. * (Object) attrs - Optional chat box atributes.
  42049. */
  42050. if (_.isObject(jid)) {
  42051. create = attrs;
  42052. attrs = jid;
  42053. jid = attrs.jid;
  42054. }
  42055. jid = Strophe.getBareJidFromJid(jid.toLowerCase());
  42056. var chatbox = this.get(Strophe.getBareJidFromJid(jid));
  42057. if (!chatbox && create) {
  42058. _.extend(attrs, {
  42059. 'jid': jid,
  42060. 'id': jid
  42061. });
  42062. chatbox = this.create(attrs, {
  42063. 'error': function error(model, response) {
  42064. _converse.log(response.responseText);
  42065. }
  42066. });
  42067. }
  42068. return chatbox;
  42069. }
  42070. });
  42071. _converse.ChatBoxViews = Backbone.Overview.extend({
  42072. _ensureElement: function _ensureElement() {
  42073. /* Override method from backbone.js
  42074. * If the #conversejs element doesn't exist, create it.
  42075. */
  42076. if (!this.el) {
  42077. var el = _converse.root.querySelector('#conversejs');
  42078. if (_.isNull(el)) {
  42079. el = document.createElement('div');
  42080. el.setAttribute('id', 'conversejs');
  42081. var body = _converse.root.querySelector('body');
  42082. if (body) {
  42083. body.appendChild(el);
  42084. } else {
  42085. // Perhaps inside a web component?
  42086. _converse.root.appendChild(el);
  42087. }
  42088. }
  42089. if (_.includes(['mobile', 'fullscreen'], _converse.view_mode)) {
  42090. el.classList.add('fullscreen');
  42091. }
  42092. el.innerHTML = '';
  42093. this.setElement(el, false);
  42094. } else {
  42095. this.setElement(_.result(this, 'el'), false);
  42096. }
  42097. },
  42098. initialize: function initialize() {
  42099. this.model.on("add", this.onChatBoxAdded, this);
  42100. this.model.on("destroy", this.removeChat, this);
  42101. this.render();
  42102. },
  42103. render: function render() {
  42104. try {
  42105. this.el.innerHTML = tpl_chatboxes();
  42106. } catch (e) {
  42107. this._ensureElement();
  42108. this.el.innerHTML = tpl_chatboxes();
  42109. }
  42110. this.row_el = this.el.querySelector('.row');
  42111. },
  42112. insertRowColumn: function insertRowColumn(el) {
  42113. /* Add a new DOM element (likely a chat box) into the
  42114. * the row managed by this overview.
  42115. */
  42116. this.row_el.insertAdjacentElement('afterBegin', el);
  42117. },
  42118. onChatBoxAdded: function onChatBoxAdded(item) {
  42119. // Views aren't created here, since the core code doesn't
  42120. // contain any views. Instead, they're created in overrides in
  42121. // plugins, such as in converse-chatview.js and converse-muc.js
  42122. return this.get(item.get('id'));
  42123. },
  42124. removeChat: function removeChat(item) {
  42125. this.remove(item.get('id'));
  42126. },
  42127. closeAllChatBoxes: function closeAllChatBoxes() {
  42128. /* This method gets overridden in src/converse-controlbox.js if
  42129. * the controlbox plugin is active.
  42130. */
  42131. this.each(function (view) {
  42132. view.close();
  42133. });
  42134. return this;
  42135. },
  42136. chatBoxMayBeShown: function chatBoxMayBeShown(chatbox) {
  42137. return this.model.chatBoxMayBeShown(chatbox);
  42138. }
  42139. }); // TODO: move to converse-chatboxviews.js and use there in the API
  42140. _converse.getViewForChatBox = function (chatbox) {
  42141. if (!chatbox) {
  42142. return;
  42143. }
  42144. return _converse.chatboxviews.get(chatbox.get('id'));
  42145. };
  42146. /************************ BEGIN Event Handlers ************************/
  42147. _converse.api.listen.on('pluginsInitialized', function () {
  42148. _converse.chatboxes = new _converse.ChatBoxes();
  42149. _converse.chatboxviews = new _converse.ChatBoxViews({
  42150. 'model': _converse.chatboxes
  42151. });
  42152. _converse.emit('chatBoxesInitialized');
  42153. });
  42154. _converse.api.listen.on('beforeTearDown', function () {
  42155. _converse.chatboxes.remove(); // Don't call off(), events won't get re-registered upon reconnect.
  42156. delete _converse.chatboxes.browserStorage;
  42157. });
  42158. _converse.api.listen.on('statusInitialized', function () {
  42159. return _converse.chatboxes.onConnected();
  42160. });
  42161. /************************ END Event Handlers ************************/
  42162. /************************ BEGIN API ************************/
  42163. _.extend(_converse.api, {
  42164. 'chats': {
  42165. 'create': function create(jids, attrs) {
  42166. if (_.isUndefined(jids)) {
  42167. _converse.log("chats.create: You need to provide at least one JID", Strophe.LogLevel.ERROR);
  42168. return null;
  42169. }
  42170. if (_.isString(jids)) {
  42171. if (attrs && !_.get(attrs, 'fullname')) {
  42172. attrs.fullname = _.get(_converse.api.contacts.get(jids), 'attributes.fullname');
  42173. }
  42174. var chatbox = _converse.chatboxes.getChatBox(jids, attrs, true);
  42175. if (_.isNil(chatbox)) {
  42176. _converse.log("Could not open chatbox for JID: " + jids, Strophe.LogLevel.ERROR);
  42177. return;
  42178. }
  42179. return chatbox;
  42180. }
  42181. return _.map(jids, function (jid) {
  42182. attrs.fullname = _.get(_converse.api.contacts.get(jid), 'attributes.fullname');
  42183. return _converse.chatboxes.getChatBox(jid, attrs, true).trigger('show');
  42184. });
  42185. },
  42186. 'open': function open(jids, attrs) {
  42187. if (_.isUndefined(jids)) {
  42188. _converse.log("chats.open: You need to provide at least one JID", Strophe.LogLevel.ERROR);
  42189. return null;
  42190. } else if (_.isString(jids)) {
  42191. var chatbox = _converse.api.chats.create(jids, attrs);
  42192. chatbox.trigger('show');
  42193. return chatbox;
  42194. }
  42195. return _.map(jids, function (jid) {
  42196. return _converse.api.chats.create(jid, attrs).trigger('show');
  42197. });
  42198. },
  42199. 'get': function get(jids) {
  42200. if (_.isUndefined(jids)) {
  42201. var result = [];
  42202. _converse.chatboxes.each(function (chatbox) {
  42203. // FIXME: Leaky abstraction from MUC. We need to add a
  42204. // base type for chat boxes, and check for that.
  42205. if (chatbox.get('type') !== 'chatroom') {
  42206. result.push(chatbox);
  42207. }
  42208. });
  42209. return result;
  42210. } else if (_.isString(jids)) {
  42211. return _converse.chatboxes.getChatBox(jids);
  42212. }
  42213. return _.map(jids, _.partial(_converse.chatboxes.getChatBox.bind(_converse.chatboxes), _, {}, true));
  42214. }
  42215. }
  42216. });
  42217. /************************ END API ************************/
  42218. }
  42219. });
  42220. return converse;
  42221. });
  42222. //# sourceMappingURL=converse-chatboxes.js.map;
  42223. // Converse.js (A browser based XMPP chat client)
  42224. // http://conversejs.org
  42225. //
  42226. // Copyright (c) 2012-2017, Jan-Carel Brand <jc@opkode.com>
  42227. // Licensed under the Mozilla Public License (MPLv2)
  42228. //
  42229. /*global define */
  42230. (function (root, factory) {
  42231. define('converse-chatview',["converse-core", "bootstrap", "emojione", "xss", "tpl!action", "tpl!chatbox", "tpl!chatbox_head", "tpl!chatbox_message_form", "tpl!emojis", "tpl!help_message", "tpl!info", "tpl!message", "tpl!new_day", "tpl!spinner", "tpl!spoiler_button", "tpl!spoiler_message", "tpl!toolbar", "converse-chatboxes"], factory);
  42232. })(void 0, function (converse, bootstrap, emojione, xss, tpl_action, tpl_chatbox, tpl_chatbox_head, tpl_chatbox_message_form, tpl_emojis, tpl_help_message, tpl_info, tpl_message, tpl_new_day, tpl_spinner, tpl_spoiler_button, tpl_spoiler_message, tpl_toolbar) {
  42233. "use strict";
  42234. var _converse$env = converse.env,
  42235. $msg = _converse$env.$msg,
  42236. Backbone = _converse$env.Backbone,
  42237. Promise = _converse$env.Promise,
  42238. Strophe = _converse$env.Strophe,
  42239. _ = _converse$env._,
  42240. b64_sha1 = _converse$env.b64_sha1,
  42241. f = _converse$env.f,
  42242. sizzle = _converse$env.sizzle,
  42243. moment = _converse$env.moment;
  42244. var u = converse.env.utils;
  42245. var KEY = {
  42246. ENTER: 13,
  42247. FORWARD_SLASH: 47
  42248. };
  42249. converse.plugins.add('converse-chatview', {
  42250. /* Plugin dependencies are other plugins which might be
  42251. * overridden or relied upon, and therefore need to be loaded before
  42252. * this plugin.
  42253. *
  42254. * If the setting "strict_plugin_dependencies" is set to true,
  42255. * an error will be raised if the plugin is not found. By default it's
  42256. * false, which means these plugins are only loaded opportunistically.
  42257. *
  42258. * NB: These plugins need to have already been loaded via require.js.
  42259. */
  42260. dependencies: ["converse-chatboxes", "converse-disco"],
  42261. overrides: {
  42262. // Overrides mentioned here will be picked up by converse.js's
  42263. // plugin architecture they will replace existing methods on the
  42264. // relevant objects or classes.
  42265. //
  42266. // New functions which don't exist yet can also be added.
  42267. //
  42268. ChatBoxViews: {
  42269. onChatBoxAdded: function onChatBoxAdded(item) {
  42270. var _converse = this.__super__._converse;
  42271. var view = this.get(item.get('id'));
  42272. if (!view) {
  42273. view = new _converse.ChatBoxView({
  42274. model: item
  42275. });
  42276. this.add(item.get('id'), view);
  42277. return view;
  42278. } else {
  42279. return this.__super__.onChatBoxAdded.apply(this, arguments);
  42280. }
  42281. }
  42282. }
  42283. },
  42284. initialize: function initialize() {
  42285. /* The initialize function gets called as soon as the plugin is
  42286. * loaded by converse.js's plugin machinery.
  42287. */
  42288. var _converse = this._converse,
  42289. __ = _converse.__;
  42290. _converse.api.settings.update({
  42291. 'use_emojione': false,
  42292. 'emojione_image_path': emojione.imagePathPNG,
  42293. 'chatview_avatar_height': 32,
  42294. 'chatview_avatar_width': 32,
  42295. 'show_toolbar': true,
  42296. 'show_message_load_animation': false,
  42297. 'time_format': 'HH:mm',
  42298. 'visible_toolbar_buttons': {
  42299. 'call': false,
  42300. 'clear': true,
  42301. 'emoji': true,
  42302. 'spoiler': true
  42303. }
  42304. });
  42305. emojione.imagePathPNG = _converse.emojione_image_path;
  42306. emojione.ascii = true;
  42307. function onWindowStateChanged(data) {
  42308. _converse.chatboxviews.each(function (chatboxview) {
  42309. chatboxview.onWindowStateChanged(data.state);
  42310. });
  42311. }
  42312. _converse.api.listen.on('windowStateChanged', onWindowStateChanged);
  42313. _converse.EmojiPicker = Backbone.Model.extend({
  42314. defaults: {
  42315. 'current_category': 'people',
  42316. 'current_skintone': '',
  42317. 'scroll_position': 0
  42318. },
  42319. initialize: function initialize() {
  42320. var id = "converse.emoji-".concat(_converse.bare_jid);
  42321. this.id = id;
  42322. this.browserStorage = new Backbone.BrowserStorage[_converse.storage](id);
  42323. }
  42324. });
  42325. _converse.EmojiPickerView = Backbone.VDOMView.extend({
  42326. className: 'emoji-picker-container',
  42327. events: {
  42328. 'click .emoji-category-picker li.emoji-category': 'chooseCategory',
  42329. 'click .emoji-skintone-picker li.emoji-skintone': 'chooseSkinTone'
  42330. },
  42331. initialize: function initialize() {
  42332. this.model.on('change:current_skintone', this.render, this);
  42333. this.model.on('change:current_category', this.render, this);
  42334. },
  42335. toHTML: function toHTML() {
  42336. return tpl_emojis(_.extend(this.model.toJSON(), {
  42337. 'transform': _converse.use_emojione ? emojione.shortnameToImage : emojione.shortnameToUnicode,
  42338. 'emojis_by_category': u.getEmojisByCategory(_converse, emojione),
  42339. 'toned_emojis': u.getTonedEmojis(_converse),
  42340. 'skintones': ['tone1', 'tone2', 'tone3', 'tone4', 'tone5'],
  42341. 'shouldBeHidden': this.shouldBeHidden
  42342. }));
  42343. },
  42344. shouldBeHidden: function shouldBeHidden(shortname, current_skintone, toned_emojis) {
  42345. /* Helper method for the template which decides whether an
  42346. * emoji should be hidden, based on which skin tone is
  42347. * currently being applied.
  42348. */
  42349. if (_.includes(shortname, '_tone')) {
  42350. if (!current_skintone || !_.includes(shortname, current_skintone)) {
  42351. return true;
  42352. }
  42353. } else {
  42354. if (current_skintone && _.includes(toned_emojis, shortname)) {
  42355. return true;
  42356. }
  42357. }
  42358. return false;
  42359. },
  42360. chooseSkinTone: function chooseSkinTone(ev) {
  42361. ev.preventDefault();
  42362. ev.stopPropagation();
  42363. var target = ev.target.nodeName === 'IMG' ? ev.target.parentElement : ev.target;
  42364. var skintone = target.getAttribute("data-skintone").trim();
  42365. if (this.model.get('current_skintone') === skintone) {
  42366. this.model.save({
  42367. 'current_skintone': ''
  42368. });
  42369. } else {
  42370. this.model.save({
  42371. 'current_skintone': skintone
  42372. });
  42373. }
  42374. },
  42375. chooseCategory: function chooseCategory(ev) {
  42376. ev.preventDefault();
  42377. ev.stopPropagation();
  42378. var target = ev.target.nodeName === 'IMG' ? ev.target.parentElement : ev.target;
  42379. var category = target.getAttribute("data-category").trim();
  42380. this.model.save({
  42381. 'current_category': category,
  42382. 'scroll_position': 0
  42383. });
  42384. }
  42385. });
  42386. _converse.ChatBoxHeading = Backbone.NativeView.extend({
  42387. initialize: function initialize() {
  42388. this.model.on('change:image', this.render, this);
  42389. this.model.on('change:status', this.onStatusMessageChanged, this);
  42390. this.model.on('change:fullname', this.render, this);
  42391. },
  42392. render: function render() {
  42393. this.el.innerHTML = tpl_chatbox_head(_.extend(this.model.toJSON(), {
  42394. '_converse': _converse,
  42395. 'avatar_width': _converse.chatview_avatar_width,
  42396. 'avatar_height': _converse.chatview_avatar_height,
  42397. 'info_close': __('Close this chat box')
  42398. }));
  42399. return this;
  42400. },
  42401. onStatusMessageChanged: function onStatusMessageChanged(item) {
  42402. this.render();
  42403. _converse.emit('contactStatusMessageChanged', {
  42404. 'contact': item.attributes,
  42405. 'message': item.get('status')
  42406. });
  42407. }
  42408. });
  42409. _converse.ChatBoxView = Backbone.NativeView.extend({
  42410. length: 200,
  42411. className: 'chatbox hidden',
  42412. is_chatroom: false,
  42413. // Leaky abstraction from MUC
  42414. events: {
  42415. 'click .close-chatbox-button': 'close',
  42416. 'click .new-msgs-indicator': 'viewUnreadMessages',
  42417. 'click .send-button': 'onFormSubmitted',
  42418. 'click .toggle-call': 'toggleCall',
  42419. 'click .toggle-clear': 'clearMessages',
  42420. 'click .toggle-smiley ul.emoji-picker li': 'insertEmoji',
  42421. 'click .toggle-smiley': 'toggleEmojiMenu',
  42422. 'click .toggle-spoiler': 'toggleSpoilerMessage',
  42423. 'click .toggle-compose-spoiler': 'toggleComposeSpoilerMessage',
  42424. 'keypress .chat-textarea': 'keyPressed'
  42425. },
  42426. initialize: function initialize() {
  42427. this.scrollDown = _.debounce(this._scrollDown, 250);
  42428. this.markScrolled = _.debounce(this._markScrolled, 100);
  42429. this.createEmojiPicker();
  42430. this.model.messages.on('add', this.onMessageAdded, this);
  42431. this.model.on('show', this.show, this);
  42432. this.model.on('destroy', this.remove, this); // TODO check for changed fullname as well
  42433. this.model.on('change:chat_state', this.sendChatState, this);
  42434. this.model.on('change:chat_status', this.onChatStatusChanged, this);
  42435. this.model.on('showHelpMessages', this.showHelpMessages, this);
  42436. this.model.on('sendMessage', this.sendMessage, this);
  42437. this.render();
  42438. this.fetchMessages();
  42439. _converse.emit('chatBoxOpened', this);
  42440. _converse.emit('chatBoxInitialized', this);
  42441. },
  42442. render: function render() {
  42443. // XXX: Is this still needed?
  42444. this.el.setAttribute('id', this.model.get('box_id'));
  42445. this.el.innerHTML = tpl_chatbox(_.extend(this.model.toJSON(), {
  42446. unread_msgs: __('You have unread messages')
  42447. }));
  42448. this.content = this.el.querySelector('.chat-content');
  42449. this.renderMessageForm();
  42450. this.insertHeading();
  42451. return this;
  42452. },
  42453. renderToolbar: function renderToolbar(toolbar, options) {
  42454. if (!_converse.show_toolbar) {
  42455. return this;
  42456. }
  42457. toolbar = toolbar || tpl_toolbar;
  42458. options = _.assign(this.model.toJSON(), this.getToolbarOptions(options || {}));
  42459. this.el.querySelector('.chat-toolbar').innerHTML = toolbar(options);
  42460. this.addSpoilerButton(options);
  42461. this.insertEmojiPicker();
  42462. return this;
  42463. },
  42464. renderMessageForm: function renderMessageForm() {
  42465. var placeholder;
  42466. if (this.model.get('composing_spoiler')) {
  42467. placeholder = __('Hidden message');
  42468. } else {
  42469. placeholder = __('Personal message');
  42470. }
  42471. var form_container = this.el.querySelector('.message-form-container');
  42472. form_container.innerHTML = tpl_chatbox_message_form(_.extend(this.model.toJSON(), {
  42473. 'hint_value': _.get(this.el.querySelector('.spoiler-hint'), 'value'),
  42474. 'label_personal_message': placeholder,
  42475. 'label_send': __('Send'),
  42476. 'label_spoiler_hint': __('Optional hint'),
  42477. 'message_value': _.get(this.el.querySelector('.chat-textarea'), 'value'),
  42478. 'show_send_button': _converse.show_send_button,
  42479. 'show_toolbar': _converse.show_toolbar,
  42480. 'unread_msgs': __('You have unread messages')
  42481. }));
  42482. this.renderToolbar();
  42483. },
  42484. addSpoilerButton: function addSpoilerButton(options) {
  42485. var _this = this;
  42486. /* Asynchronously adds a button for writing spoiler
  42487. * messages, based on whether the contact's client supports
  42488. * it.
  42489. */
  42490. if (!options.show_spoiler_button || this.model.get('type') === 'chatroom') {
  42491. return;
  42492. }
  42493. var contact_jid = this.model.get('jid');
  42494. var resources = this.model.get('resources');
  42495. if (_.isEmpty(resources)) {
  42496. return;
  42497. }
  42498. Promise.all(_.map(_.keys(resources), function (resource) {
  42499. return _converse.api.disco.supports(Strophe.NS.SPOILER, "".concat(contact_jid, "/").concat(resource));
  42500. })).then(function (results) {
  42501. var supported = _.every(f.map(f.get('supported'))(results));
  42502. if (supported) {
  42503. var html = tpl_spoiler_button(_this.model.toJSON());
  42504. if (_converse.visible_toolbar_buttons.emoji) {
  42505. _this.el.querySelector('.toggle-smiley').insertAdjacentHTML('afterEnd', html);
  42506. } else {
  42507. _this.el.querySelector('.chat-toolbar').insertAdjacentHTML('afterBegin', html);
  42508. }
  42509. }
  42510. });
  42511. },
  42512. insertHeading: function insertHeading() {
  42513. this.heading = new _converse.ChatBoxHeading({
  42514. 'model': this.model
  42515. });
  42516. this.heading.render();
  42517. this.heading.chatview = this;
  42518. var flyout = this.el.querySelector('.flyout');
  42519. flyout.insertBefore(this.heading.el, flyout.querySelector('.chat-body'));
  42520. return this;
  42521. },
  42522. getToolbarOptions: function getToolbarOptions(options) {
  42523. var label_toggle_spoiler;
  42524. if (this.model.get('composing_spoiler')) {
  42525. label_toggle_spoiler = __('Click to write as a normal (non-spoiler) message');
  42526. } else {
  42527. label_toggle_spoiler = __('Click to write your message as a spoiler');
  42528. }
  42529. return _.extend(options || {}, {
  42530. 'label_clear': __('Clear all messages'),
  42531. 'label_insert_smiley': __('Insert a smiley'),
  42532. 'label_start_call': __('Start a call'),
  42533. 'label_toggle_spoiler': label_toggle_spoiler,
  42534. 'show_call_button': _converse.visible_toolbar_buttons.call,
  42535. 'show_spoiler_button': _converse.visible_toolbar_buttons.spoiler,
  42536. 'use_emoji': _converse.visible_toolbar_buttons.emoji
  42537. });
  42538. },
  42539. afterMessagesFetched: function afterMessagesFetched() {
  42540. this.insertIntoDOM();
  42541. this.scrollDown();
  42542. this.content.addEventListener('scroll', this.markScrolled.bind(this));
  42543. _converse.emit('afterMessagesFetched', this);
  42544. },
  42545. fetchMessages: function fetchMessages() {
  42546. this.model.messages.fetch({
  42547. 'add': true,
  42548. 'success': this.afterMessagesFetched.bind(this),
  42549. 'error': this.afterMessagesFetched.bind(this)
  42550. });
  42551. return this;
  42552. },
  42553. insertIntoDOM: function insertIntoDOM() {
  42554. /* This method gets overridden in src/converse-controlbox.js
  42555. * as well as src/converse-muc.js (if those plugins are
  42556. * enabled).
  42557. */
  42558. _converse.chatboxviews.insertRowColumn(this.el);
  42559. return this;
  42560. },
  42561. clearStatusNotification: function clearStatusNotification() {
  42562. u.removeElement(this.content.querySelector('.chat-event'));
  42563. },
  42564. showStatusNotification: function showStatusNotification(message, keep_old, permanent) {
  42565. if (!keep_old) {
  42566. this.clearStatusNotification();
  42567. }
  42568. this.content.insertAdjacentHTML('beforeend', tpl_info({
  42569. 'extra_classes': !permanent ? 'chat-event' : '',
  42570. 'message': message,
  42571. 'isodate': moment().format(),
  42572. 'data': ''
  42573. }));
  42574. this.scrollDown();
  42575. },
  42576. addSpinner: function addSpinner() {
  42577. var append = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
  42578. if (_.isNull(this.el.querySelector('.spinner'))) {
  42579. if (append) {
  42580. this.content.insertAdjacentHTML('beforeend', tpl_spinner());
  42581. this.scrollDown();
  42582. } else {
  42583. this.content.insertAdjacentHTML('afterbegin', tpl_spinner());
  42584. }
  42585. }
  42586. },
  42587. clearSpinner: function clearSpinner() {
  42588. _.each(this.content.querySelectorAll('span.spinner'), function (el) {
  42589. return el.parentNode.removeChild(el);
  42590. });
  42591. },
  42592. insertDayIndicator: function insertDayIndicator(next_msg_el) {
  42593. /* Inserts an indicator into the chat area, showing the
  42594. * day as given by the passed in date.
  42595. *
  42596. * The indicator is only inserted if necessary.
  42597. *
  42598. * Parameters:
  42599. * (HTMLElement) next_msg_el - The message element before
  42600. * which the day indicator element must be inserted.
  42601. * This element must have a "data-isodate" attribute
  42602. * which specifies its creation date.
  42603. */
  42604. var prev_msg_el = u.getPreviousElement(next_msg_el, ".message:not(.chat-event)"),
  42605. prev_msg_date = _.isNull(prev_msg_el) ? null : prev_msg_el.getAttribute('data-isodate'),
  42606. next_msg_date = next_msg_el.getAttribute('data-isodate');
  42607. if (_.isNull(prev_msg_date) || moment(next_msg_date).isAfter(prev_msg_date, 'day')) {
  42608. var day_date = moment(next_msg_date).startOf('day');
  42609. next_msg_el.insertAdjacentHTML('beforeBegin', tpl_new_day({
  42610. 'isodate': day_date.format(),
  42611. 'datestring': day_date.format("dddd MMM Do YYYY")
  42612. }));
  42613. }
  42614. },
  42615. getLastMessageDate: function getLastMessageDate(cutoff) {
  42616. /* Return the ISO8601 format date of the latest message.
  42617. *
  42618. * Parameters:
  42619. * (Object) cutoff: Moment Date cutoff date. The last
  42620. * message received cutoff this date will be returned.
  42621. */
  42622. var first_msg = u.getFirstChildElement(this.content, '.message:not(.chat-event)'),
  42623. oldest_date = first_msg ? first_msg.getAttribute('data-isodate') : null;
  42624. if (!_.isNull(oldest_date) && moment(oldest_date).isAfter(cutoff)) {
  42625. return null;
  42626. }
  42627. var last_msg = u.getLastChildElement(this.content, '.message:not(.chat-event)'),
  42628. most_recent_date = last_msg ? last_msg.getAttribute('data-isodate') : null;
  42629. if (_.isNull(most_recent_date) || moment(most_recent_date).isBefore(cutoff)) {
  42630. return most_recent_date;
  42631. }
  42632. /* XXX: We avoid .chat-event messages, since they are
  42633. * temporary and get removed once a new element is
  42634. * inserted into the chat area, so we don't query for
  42635. * them here, otherwise we get a null reference later
  42636. * upon element insertion.
  42637. */
  42638. var msg_dates = _.invokeMap(sizzle('.message:not(.chat-event)', this.content), Element.prototype.getAttribute, 'data-isodate');
  42639. if (_.isObject(cutoff)) {
  42640. cutoff = cutoff.format();
  42641. }
  42642. msg_dates.push(cutoff);
  42643. msg_dates.sort();
  42644. var idx = msg_dates.lastIndexOf(cutoff);
  42645. if (idx === 0) {
  42646. return null;
  42647. } else {
  42648. return msg_dates[idx - 1];
  42649. }
  42650. },
  42651. showMessage: function showMessage(attrs) {
  42652. /* Inserts a chat message into the content area of the chat box.
  42653. * Will also insert a new day indicator if the message is on a
  42654. * different day.
  42655. *
  42656. * The message to show may either be newer than the newest
  42657. * message, or older than the oldest message.
  42658. *
  42659. * Parameters:
  42660. * (Object) attrs: An object containing the message
  42661. * attributes.
  42662. */
  42663. var current_msg_date = moment(attrs.time) || moment,
  42664. previous_msg_date = this.getLastMessageDate(current_msg_date),
  42665. message_el = this.renderMessage(attrs);
  42666. if (_.isNull(previous_msg_date)) {
  42667. this.content.insertAdjacentElement('afterbegin', message_el);
  42668. } else {
  42669. var previous_msg_el = sizzle("[data-isodate=\"".concat(previous_msg_date, "\"]:last"), this.content).pop();
  42670. previous_msg_el.insertAdjacentElement('afterend', message_el);
  42671. }
  42672. this.insertDayIndicator(message_el);
  42673. this.clearStatusNotification();
  42674. this.setScrollPosition(message_el);
  42675. },
  42676. setScrollPosition: function setScrollPosition(message_el) {
  42677. /* Given a newly inserted message, determine whether we
  42678. * should keep the scrollbar in place (so as to not scroll
  42679. * up when using infinite scroll).
  42680. */
  42681. if (this.model.get('scrolled')) {
  42682. var next_msg_el = u.getNextElement(message_el, ".chat-message");
  42683. if (next_msg_el) {
  42684. // The currently received message is not new, there
  42685. // are newer messages after it. So let's see if we
  42686. // should maintain our current scroll position.
  42687. if (this.content.scrollTop === 0 || this.model.get('top_visible_message')) {
  42688. var top_visible_message = this.model.get('top_visible_message') || next_msg_el;
  42689. this.model.set('top_visible_message', top_visible_message);
  42690. this.content.scrollTop = top_visible_message.offsetTop - 30;
  42691. }
  42692. }
  42693. } else {
  42694. this.scrollDown();
  42695. }
  42696. },
  42697. getExtraMessageTemplateAttributes: function getExtraMessageTemplateAttributes(attrs) {
  42698. /* Provides a hook for sending more attributes to the
  42699. * message template.
  42700. *
  42701. * Parameters:
  42702. * (Object) attrs: An object containing message attributes.
  42703. */
  42704. if (attrs.is_spoiler) {
  42705. return {
  42706. 'label_show': __('Show hidden message')
  42707. };
  42708. } else {
  42709. return {};
  42710. }
  42711. },
  42712. getExtraMessageClasses: function getExtraMessageClasses(attrs) {
  42713. if (_converse.show_message_load_animation) {
  42714. return 'onload ' + (attrs.delayed && 'delayed' || '');
  42715. } else {
  42716. return attrs.delayed && 'delayed' || '';
  42717. }
  42718. },
  42719. renderSpoilerMessage: function renderSpoilerMessage(msg, attrs) {
  42720. /* Render a "spoiler" message, as defined in XEP-0382
  42721. *
  42722. * Parameters:
  42723. * (HTMLElement) msg: The chat message DOM element
  42724. * (Object) attrs: An object containing the message attributes.
  42725. */
  42726. var hint = msg.querySelector('.spoiler-hint');
  42727. hint.appendChild(document.createTextNode(attrs.spoiler_hint || ''));
  42728. },
  42729. renderMessage: function renderMessage(attrs) {
  42730. /* Renders a chat message based on the passed in attributes.
  42731. *
  42732. * Parameters:
  42733. * (Object) attrs: An object containing the message attributes.
  42734. *
  42735. * Returns:
  42736. * The DOM element representing the message.
  42737. */
  42738. var text = attrs.message,
  42739. fullname = this.model.get('fullname') || attrs.fullname,
  42740. template,
  42741. username;
  42742. var match = text.match(/^\/(.*?)(?: (.*))?$/);
  42743. if (match && match[1] === 'me') {
  42744. text = text.replace(/^\/me/, '');
  42745. template = tpl_action;
  42746. if (attrs.sender === 'me') {
  42747. fullname = _converse.xmppstatus.get('fullname') || attrs.fullname;
  42748. username = _.isNil(fullname) ? _converse.bare_jid : fullname;
  42749. } else {
  42750. username = attrs.fullname;
  42751. }
  42752. } else {
  42753. username = attrs.sender === 'me' && __('me') || fullname;
  42754. template = attrs.is_spoiler ? tpl_spoiler_message : tpl_message;
  42755. }
  42756. var msg_time = moment(attrs.time) || moment;
  42757. var msg = u.stringToElement(template(_.extend(this.getExtraMessageTemplateAttributes(attrs), {
  42758. 'msgid': attrs.msgid,
  42759. 'sender': attrs.sender,
  42760. 'time': msg_time.format(_converse.time_format),
  42761. 'isodate': msg_time.format(),
  42762. 'username': username,
  42763. 'extra_classes': this.getExtraMessageClasses(attrs)
  42764. })));
  42765. if (_converse.show_message_load_animation) {
  42766. window.setTimeout(_.partial(u.removeClass, 'onload', msg), 2000);
  42767. }
  42768. var msg_content = msg.querySelector('.chat-msg-content');
  42769. msg_content.innerHTML = u.addEmoji(_converse, emojione, u.addHyperlinks(xss.filterXSS(text, {
  42770. 'whiteList': {}
  42771. })));
  42772. if (attrs.is_spoiler) {
  42773. this.renderSpoilerMessage(msg, attrs);
  42774. }
  42775. u.renderImageURLs(msg_content).then(this.scrollDown.bind(this));
  42776. return msg;
  42777. },
  42778. showHelpMessages: function showHelpMessages(msgs, type, spinner) {
  42779. var _this2 = this;
  42780. _.each(msgs, function (msg) {
  42781. _this2.content.insertAdjacentHTML('beforeend', tpl_help_message({
  42782. 'isodate': moment().format(),
  42783. 'type': type || 'info',
  42784. 'message': xss.filterXSS(msg, {
  42785. 'whiteList': {
  42786. 'strong': []
  42787. }
  42788. })
  42789. }));
  42790. });
  42791. if (spinner === true) {
  42792. this.addSpinner();
  42793. } else if (spinner === false) {
  42794. this.clearSpinner();
  42795. }
  42796. return this.scrollDown();
  42797. },
  42798. handleChatStateMessage: function handleChatStateMessage(message) {
  42799. if (message.get('chat_state') === _converse.COMPOSING) {
  42800. if (message.get('sender') === 'me') {
  42801. this.showStatusNotification(__('Typing from another device'));
  42802. } else {
  42803. this.showStatusNotification(message.get('fullname') + ' ' + __('is typing'));
  42804. }
  42805. this.clear_status_timeout = window.setTimeout(this.clearStatusNotification.bind(this), 30000);
  42806. } else if (message.get('chat_state') === _converse.PAUSED) {
  42807. if (message.get('sender') === 'me') {
  42808. this.showStatusNotification(__('Stopped typing on the other device'));
  42809. } else {
  42810. this.showStatusNotification(message.get('fullname') + ' ' + __('has stopped typing'));
  42811. }
  42812. } else if (_.includes([_converse.INACTIVE, _converse.ACTIVE], message.get('chat_state'))) {
  42813. this.clearStatusNotification();
  42814. } else if (message.get('chat_state') === _converse.GONE) {
  42815. this.showStatusNotification(message.get('fullname') + ' ' + __('has gone away'));
  42816. }
  42817. return message;
  42818. },
  42819. shouldShowOnTextMessage: function shouldShowOnTextMessage() {
  42820. return !u.isVisible(this.el);
  42821. },
  42822. handleTextMessage: function handleTextMessage(message) {
  42823. this.showMessage(_.clone(message.attributes));
  42824. if (u.isNewMessage(message)) {
  42825. if (message.get('sender') === 'me') {
  42826. // We remove the "scrolled" flag so that the chat area
  42827. // gets scrolled down. We always want to scroll down
  42828. // when the user writes a message as opposed to when a
  42829. // message is received.
  42830. this.model.set('scrolled', false);
  42831. } else if (this.model.get('scrolled', true)) {
  42832. this.showNewMessagesIndicator();
  42833. }
  42834. }
  42835. if (this.shouldShowOnTextMessage()) {
  42836. this.show();
  42837. } else {
  42838. this.scrollDown();
  42839. }
  42840. },
  42841. handleErrorMessage: function handleErrorMessage(message) {
  42842. var message_el = this.content.querySelector("[data-msgid=\"".concat(message.get('msgid'), "\"]"));
  42843. if (!_.isNull(message_el)) {
  42844. message_el.insertAdjacentHTML('afterend', tpl_info({
  42845. 'extra_classes': 'chat-error',
  42846. 'message': message.get('message'),
  42847. 'isodate': moment().format(),
  42848. 'data': ''
  42849. }));
  42850. this.scrollDown();
  42851. }
  42852. },
  42853. onMessageAdded: function onMessageAdded(message) {
  42854. /* Handler that gets called when a new message object is created.
  42855. *
  42856. * Parameters:
  42857. * (Object) message - The message Backbone object that was added.
  42858. */
  42859. if (!_.isUndefined(this.clear_status_timeout)) {
  42860. window.clearTimeout(this.clear_status_timeout);
  42861. delete this.clear_status_timeout;
  42862. }
  42863. if (message.get('type') === 'error') {
  42864. this.handleErrorMessage(message);
  42865. } else {
  42866. if (message.get('chat_state')) {
  42867. this.handleChatStateMessage(message);
  42868. }
  42869. if (message.get('message')) {
  42870. this.handleTextMessage(message);
  42871. }
  42872. }
  42873. _converse.emit('messageAdded', {
  42874. 'message': message,
  42875. 'chatbox': this.model
  42876. });
  42877. },
  42878. createMessageStanza: function createMessageStanza(message) {
  42879. var stanza = $msg({
  42880. 'from': _converse.connection.jid,
  42881. 'to': this.model.get('jid'),
  42882. 'type': 'chat',
  42883. 'id': message.get('msgid')
  42884. }).c('body').t(message.get('message')).up().c(_converse.ACTIVE, {
  42885. 'xmlns': Strophe.NS.CHATSTATES
  42886. }).up();
  42887. if (message.get('is_spoiler')) {
  42888. if (message.get('spoiler_hint')) {
  42889. stanza.c('spoiler', {
  42890. 'xmlns': Strophe.NS.SPOILER
  42891. }, message.get('spoiler_hint'));
  42892. } else {
  42893. stanza.c('spoiler', {
  42894. 'xmlns': Strophe.NS.SPOILER
  42895. });
  42896. }
  42897. }
  42898. return stanza;
  42899. },
  42900. sendMessage: function sendMessage(message) {
  42901. /* Responsible for sending off a text message.
  42902. *
  42903. * Parameters:
  42904. * (Message) message - The chat message
  42905. */
  42906. // TODO: We might want to send to specfic resources.
  42907. // Especially in the OTR case.
  42908. var messageStanza = this.createMessageStanza(message);
  42909. _converse.connection.send(messageStanza);
  42910. if (_converse.forward_messages) {
  42911. // Forward the message, so that other connected resources are also aware of it.
  42912. _converse.connection.send($msg({
  42913. to: _converse.bare_jid,
  42914. type: 'chat',
  42915. id: message.get('msgid')
  42916. }).c('forwarded', {
  42917. 'xmlns': Strophe.NS.FORWARD
  42918. }).c('delay', {
  42919. 'xmns': Strophe.NS.DELAY,
  42920. 'stamp': moment().format()
  42921. }).up().cnode(messageStanza.tree()));
  42922. }
  42923. },
  42924. parseMessageForCommands: function parseMessageForCommands(text) {
  42925. var match = text.replace(/^\s*/, "").match(/^\/(.*)\s*$/);
  42926. if (match) {
  42927. if (match[1] === "clear") {
  42928. this.clearMessages();
  42929. return true;
  42930. } else if (match[1] === "help") {
  42931. var msgs = ["<strong>/clear</strong>: ".concat(__('Remove messages')), "<strong>/me</strong>: ".concat(__('Write in the third person')), "<strong>/help</strong>: ".concat(__('Show this menu'))];
  42932. this.showHelpMessages(msgs);
  42933. return true;
  42934. }
  42935. }
  42936. },
  42937. onMessageSubmitted: function onMessageSubmitted(text, spoiler_hint) {
  42938. /* This method gets called once the user has typed a message
  42939. * and then pressed enter in a chat box.
  42940. *
  42941. * Parameters:
  42942. * (String) text - The chat message text.
  42943. * (String) spoiler_hint - A hint in case the message
  42944. * text is a hidden/spoiler message. See XEP-0382
  42945. */
  42946. if (!_converse.connection.authenticated) {
  42947. return this.showHelpMessages(['Sorry, the connection has been lost, ' + 'and your message could not be sent'], 'error');
  42948. }
  42949. if (this.parseMessageForCommands(text)) {
  42950. return;
  42951. }
  42952. var attrs = this.getOutgoingMessageAttributes(text, spoiler_hint);
  42953. var message = this.model.messages.create(attrs);
  42954. this.sendMessage(message);
  42955. },
  42956. getOutgoingMessageAttributes: function getOutgoingMessageAttributes(text, spoiler_hint) {
  42957. /* Overridable method which returns the attributes to be
  42958. * passed to Backbone.Message's constructor.
  42959. */
  42960. var fullname = _converse.xmppstatus.get('fullname'),
  42961. is_spoiler = this.model.get('composing_spoiler'),
  42962. attrs = {
  42963. 'fullname': _.isEmpty(fullname) ? _converse.bare_jid : fullname,
  42964. 'sender': 'me',
  42965. 'time': moment().format(),
  42966. 'message': emojione.shortnameToUnicode(text),
  42967. 'is_spoiler': is_spoiler
  42968. };
  42969. if (is_spoiler) {
  42970. attrs.spoiler_hint = spoiler_hint;
  42971. }
  42972. return attrs;
  42973. },
  42974. sendChatState: function sendChatState() {
  42975. /* Sends a message with the status of the user in this chat session
  42976. * as taken from the 'chat_state' attribute of the chat box.
  42977. * See XEP-0085 Chat State Notifications.
  42978. */
  42979. _converse.connection.send($msg({
  42980. 'to': this.model.get('jid'),
  42981. 'type': 'chat'
  42982. }).c(this.model.get('chat_state'), {
  42983. 'xmlns': Strophe.NS.CHATSTATES
  42984. }).up().c('no-store', {
  42985. 'xmlns': Strophe.NS.HINTS
  42986. }).up().c('no-permanent-store', {
  42987. 'xmlns': Strophe.NS.HINTS
  42988. }));
  42989. },
  42990. setChatState: function setChatState(state, no_save) {
  42991. /* Mutator for setting the chat state of this chat session.
  42992. * Handles clearing of any chat state notification timeouts and
  42993. * setting new ones if necessary.
  42994. * Timeouts are set when the state being set is COMPOSING or PAUSED.
  42995. * After the timeout, COMPOSING will become PAUSED and PAUSED will become INACTIVE.
  42996. * See XEP-0085 Chat State Notifications.
  42997. *
  42998. * Parameters:
  42999. * (string) state - The chat state (consts ACTIVE, COMPOSING, PAUSED, INACTIVE, GONE)
  43000. * (Boolean) no_save - Just do the cleanup or setup but don't actually save the state.
  43001. */
  43002. if (!_.isUndefined(this.chat_state_timeout)) {
  43003. window.clearTimeout(this.chat_state_timeout);
  43004. delete this.chat_state_timeout;
  43005. }
  43006. if (state === _converse.COMPOSING) {
  43007. this.chat_state_timeout = window.setTimeout(this.setChatState.bind(this), _converse.TIMEOUTS.PAUSED, _converse.PAUSED);
  43008. } else if (state === _converse.PAUSED) {
  43009. this.chat_state_timeout = window.setTimeout(this.setChatState.bind(this), _converse.TIMEOUTS.INACTIVE, _converse.INACTIVE);
  43010. }
  43011. if (!no_save && this.model.get('chat_state') !== state) {
  43012. this.model.set('chat_state', state);
  43013. }
  43014. return this;
  43015. },
  43016. onFormSubmitted: function onFormSubmitted(ev) {
  43017. ev.preventDefault();
  43018. var textarea = this.el.querySelector('.chat-textarea'),
  43019. message = textarea.value;
  43020. var spoiler_hint;
  43021. if (this.model.get('composing_spoiler')) {
  43022. var hint_el = this.el.querySelector('form.sendXMPPMessage input.spoiler-hint');
  43023. spoiler_hint = hint_el.value;
  43024. hint_el.value = '';
  43025. }
  43026. textarea.value = '';
  43027. textarea.focus();
  43028. if (message !== '') {
  43029. this.onMessageSubmitted(message, spoiler_hint);
  43030. _converse.emit('messageSend', message);
  43031. }
  43032. this.setChatState(_converse.ACTIVE);
  43033. },
  43034. keyPressed: function keyPressed(ev) {
  43035. /* Event handler for when a key is pressed in a chat box textarea.
  43036. */
  43037. if (ev.keyCode === KEY.ENTER) {
  43038. this.onFormSubmitted(ev);
  43039. } else {
  43040. // Set chat state to composing if keyCode is not a forward-slash
  43041. // (which would imply an internal command and not a message).
  43042. this.setChatState(_converse.COMPOSING, ev.keyCode === KEY.FORWARD_SLASH);
  43043. }
  43044. },
  43045. clearMessages: function clearMessages(ev) {
  43046. if (ev && ev.preventDefault) {
  43047. ev.preventDefault();
  43048. }
  43049. var result = confirm(__("Are you sure you want to clear the messages from this chat box?"));
  43050. if (result === true) {
  43051. this.content.innerHTML = '';
  43052. this.model.messages.reset();
  43053. this.model.messages.browserStorage._clear();
  43054. }
  43055. return this;
  43056. },
  43057. insertIntoTextArea: function insertIntoTextArea(value) {
  43058. var textbox_el = this.el.querySelector('.chat-textarea');
  43059. var existing = textbox_el.value;
  43060. if (existing && existing[existing.length - 1] !== ' ') {
  43061. existing = existing + ' ';
  43062. }
  43063. textbox_el.value = existing + value + ' ';
  43064. textbox_el.focus();
  43065. },
  43066. createEmojiPicker: function createEmojiPicker() {
  43067. if (_.isUndefined(_converse.emojipicker)) {
  43068. _converse.emojipicker = new _converse.EmojiPicker();
  43069. _converse.emojipicker.fetch();
  43070. }
  43071. this.emoji_picker_view = new _converse.EmojiPickerView({
  43072. 'model': _converse.emojipicker
  43073. });
  43074. },
  43075. insertEmoji: function insertEmoji(ev) {
  43076. ev.stopPropagation();
  43077. var target = ev.target.nodeName === 'IMG' ? ev.target.parentElement : ev.target;
  43078. this.insertIntoTextArea(target.getAttribute('data-emoji'));
  43079. },
  43080. toggleEmojiMenu: function toggleEmojiMenu(ev) {
  43081. if (_.isUndefined(this.emoji_dropdown)) {
  43082. ev.stopPropagation();
  43083. var dropdown_el = this.el.querySelector('.toggle-smiley.dropup');
  43084. this.emoji_dropdown = new bootstrap.Dropdown(dropdown_el, true);
  43085. this.emoji_dropdown.toggle();
  43086. }
  43087. },
  43088. toggleCall: function toggleCall(ev) {
  43089. ev.stopPropagation();
  43090. _converse.emit('callButtonClicked', {
  43091. connection: _converse.connection,
  43092. model: this.model
  43093. });
  43094. },
  43095. toggleComposeSpoilerMessage: function toggleComposeSpoilerMessage() {
  43096. this.model.set('composing_spoiler', !this.model.get('composing_spoiler'));
  43097. this.renderMessageForm();
  43098. this.focus();
  43099. },
  43100. toggleSpoilerMessage: function toggleSpoilerMessage(ev) {
  43101. if (ev && ev.preventDefault) {
  43102. ev.preventDefault();
  43103. }
  43104. var toggle_el = ev.target;
  43105. u.slideToggleElement(toggle_el.parentElement.querySelector('.spoiler'));
  43106. if (toggle_el.getAttribute("data-toggle-state") == "closed") {
  43107. toggle_el.textContent = __('Hide hidden message');
  43108. toggle_el.classList.remove("icon-eye");
  43109. toggle_el.classList.add("icon-eye-blocked");
  43110. toggle_el.setAttribute("data-toggle-state", "open");
  43111. } else {
  43112. toggle_el.textContent = __('Show hidden message');
  43113. toggle_el.classList.remove("icon-eye-blocked");
  43114. toggle_el.classList.add("icon-eye");
  43115. toggle_el.setAttribute("data-toggle-state", "closed");
  43116. }
  43117. },
  43118. onChatStatusChanged: function onChatStatusChanged(item) {
  43119. var chat_status = item.get('chat_status');
  43120. var fullname = item.get('fullname');
  43121. fullname = _.isEmpty(fullname) ? item.get('jid') : fullname;
  43122. if (u.isVisible(this.el)) {
  43123. if (chat_status === 'offline') {
  43124. this.showStatusNotification(fullname + ' ' + __('has gone offline'));
  43125. } else if (chat_status === 'away') {
  43126. this.showStatusNotification(fullname + ' ' + __('has gone away'));
  43127. } else if (chat_status === 'dnd') {
  43128. this.showStatusNotification(fullname + ' ' + __('is busy'));
  43129. } else if (chat_status === 'online') {
  43130. this.clearStatusNotification();
  43131. }
  43132. }
  43133. },
  43134. close: function close(ev) {
  43135. if (ev && ev.preventDefault) {
  43136. ev.preventDefault();
  43137. }
  43138. if (Backbone.history.getFragment() === "converse/chat?jid=" + this.model.get('jid')) {
  43139. _converse.router.navigate('');
  43140. }
  43141. if (_converse.connection.connected) {
  43142. // Immediately sending the chat state, because the
  43143. // model is going to be destroyed afterwards.
  43144. this.setChatState(_converse.INACTIVE);
  43145. this.sendChatState();
  43146. }
  43147. try {
  43148. this.model.destroy();
  43149. } catch (e) {
  43150. _converse.log(e, Strophe.LogLevel.ERROR);
  43151. }
  43152. this.remove();
  43153. _converse.emit('chatBoxClosed', this);
  43154. return this;
  43155. },
  43156. renderEmojiPicker: function renderEmojiPicker() {
  43157. this.emoji_picker_view.render();
  43158. },
  43159. insertEmojiPicker: function insertEmojiPicker() {
  43160. var picker_el = this.el.querySelector('.emoji-picker');
  43161. if (!_.isNull(picker_el)) {
  43162. picker_el.innerHTML = '';
  43163. picker_el.appendChild(this.emoji_picker_view.el);
  43164. }
  43165. },
  43166. focus: function focus() {
  43167. var textarea_el = this.el.querySelector('.chat-textarea');
  43168. if (!_.isNull(textarea_el)) {
  43169. textarea_el.focus();
  43170. _converse.emit('chatBoxFocused', this);
  43171. }
  43172. return this;
  43173. },
  43174. hide: function hide() {
  43175. this.el.classList.add('hidden');
  43176. return this;
  43177. },
  43178. afterShown: function afterShown() {
  43179. if (u.isPersistableModel(this.model)) {
  43180. this.model.clearUnreadMsgCounter();
  43181. this.model.save();
  43182. }
  43183. this.setChatState(_converse.ACTIVE);
  43184. this.renderEmojiPicker();
  43185. this.scrollDown();
  43186. this.focus();
  43187. },
  43188. _show: function _show(f) {
  43189. /* Inner show method that gets debounced */
  43190. if (u.isVisible(this.el)) {
  43191. this.focus();
  43192. return;
  43193. }
  43194. u.fadeIn(this.el, _.bind(this.afterShown, this));
  43195. },
  43196. show: function show() {
  43197. if (_.isUndefined(this.debouncedShow)) {
  43198. /* We wrap the method in a debouncer and set it on the
  43199. * instance, so that we have it debounced per instance.
  43200. * Debouncing it on the class-level is too broad.
  43201. */
  43202. this.debouncedShow = _.debounce(this._show, 250, {
  43203. 'leading': true
  43204. });
  43205. }
  43206. this.debouncedShow.apply(this, arguments);
  43207. return this;
  43208. },
  43209. showNewMessagesIndicator: function showNewMessagesIndicator() {
  43210. u.showElement(this.el.querySelector('.new-msgs-indicator'));
  43211. },
  43212. hideNewMessagesIndicator: function hideNewMessagesIndicator() {
  43213. var new_msgs_indicator = this.el.querySelector('.new-msgs-indicator');
  43214. if (!_.isNull(new_msgs_indicator)) {
  43215. new_msgs_indicator.classList.add('hidden');
  43216. }
  43217. },
  43218. _markScrolled: function _markScrolled(ev) {
  43219. /* Called when the chat content is scrolled up or down.
  43220. * We want to record when the user has scrolled away from
  43221. * the bottom, so that we don't automatically scroll away
  43222. * from what the user is reading when new messages are
  43223. * received.
  43224. */
  43225. if (ev && ev.preventDefault) {
  43226. ev.preventDefault();
  43227. }
  43228. var scrolled = true;
  43229. var is_at_bottom = this.content.scrollTop + this.content.clientHeight >= this.content.scrollHeight - 62; // sigh...
  43230. if (is_at_bottom) {
  43231. scrolled = false;
  43232. this.onScrolledDown();
  43233. }
  43234. u.safeSave(this.model, {
  43235. 'scrolled': scrolled,
  43236. 'top_visible_message': null
  43237. });
  43238. },
  43239. viewUnreadMessages: function viewUnreadMessages() {
  43240. this.model.save({
  43241. 'scrolled': false,
  43242. 'top_visible_message': null
  43243. });
  43244. this.scrollDown();
  43245. },
  43246. _scrollDown: function _scrollDown() {
  43247. /* Inner method that gets debounced */
  43248. if (_.isUndefined(this.content)) {
  43249. return;
  43250. }
  43251. if (u.isVisible(this.content) && !this.model.get('scrolled')) {
  43252. this.content.scrollTop = this.content.scrollHeight;
  43253. }
  43254. },
  43255. onScrolledDown: function onScrolledDown() {
  43256. this.hideNewMessagesIndicator();
  43257. if (_converse.windowState !== 'hidden') {
  43258. this.model.clearUnreadMsgCounter();
  43259. }
  43260. _converse.emit('chatBoxScrolledDown', {
  43261. 'chatbox': this.model
  43262. });
  43263. },
  43264. onWindowStateChanged: function onWindowStateChanged(state) {
  43265. if (this.model.get('num_unread', 0) && !this.model.newMessageWillBeHidden()) {
  43266. this.model.clearUnreadMsgCounter();
  43267. }
  43268. }
  43269. });
  43270. _converse.on('connected', function () {
  43271. // Advertise that we support XEP-0382 Message Spoilers
  43272. _converse.connection.disco.addFeature(Strophe.NS.SPOILER);
  43273. });
  43274. /************************ BEGIN API ************************/
  43275. _.extend(_converse.api, {
  43276. 'chatviews': {
  43277. 'get': function get(jids) {
  43278. if (_.isUndefined(jids)) {
  43279. _converse.log("chats.create: You need to provide at least one JID", Strophe.LogLevel.ERROR);
  43280. return null;
  43281. }
  43282. if (_.isString(jids)) {
  43283. return _converse.chatboxviews.get(jids);
  43284. }
  43285. return _.map(jids, function (jid) {
  43286. return _converse.chatboxviews.get(jids);
  43287. });
  43288. }
  43289. }
  43290. });
  43291. /************************ END API ************************/
  43292. }
  43293. });
  43294. return converse;
  43295. });
  43296. //# sourceMappingURL=converse-chatview.js.map;
  43297. /*
  43298. Copyright 2010, François de Metz <francois@2metz.fr>
  43299. */
  43300. /**
  43301. * Disco Strophe Plugin
  43302. * Implement http://xmpp.org/extensions/xep-0030.html
  43303. * TODO: manage node hierarchies, and node on info request
  43304. */
  43305. (function (root, factory) {
  43306. if (typeof define === 'function' && define.amd) {
  43307. // AMD. Register as an anonymous module.
  43308. define("strophe.disco", [
  43309. "strophe"
  43310. ], function (Strophe) {
  43311. factory(
  43312. Strophe.Strophe,
  43313. Strophe.$build,
  43314. Strophe.$iq ,
  43315. Strophe.$msg,
  43316. Strophe.$pres
  43317. );
  43318. return Strophe;
  43319. });
  43320. } else {
  43321. // Browser globals
  43322. factory(
  43323. root.Strophe,
  43324. root.$build,
  43325. root.$iq ,
  43326. root.$msg,
  43327. root.$pres
  43328. );
  43329. }
  43330. }(this, function (Strophe, $build, $iq, $msg, $pres) {
  43331. Strophe.addConnectionPlugin('disco',
  43332. {
  43333. _connection: null,
  43334. _identities : [],
  43335. _features : [],
  43336. _items : [],
  43337. /** Function: init
  43338. * Plugin init
  43339. *
  43340. * Parameters:
  43341. * (Strophe.Connection) conn - Strophe connection
  43342. */
  43343. init: function(conn)
  43344. {
  43345. this._connection = conn;
  43346. this._identities = [];
  43347. this._features = [];
  43348. this._items = [];
  43349. // disco info
  43350. conn.addHandler(this._onDiscoInfo.bind(this), Strophe.NS.DISCO_INFO, 'iq', 'get', null, null);
  43351. // disco items
  43352. conn.addHandler(this._onDiscoItems.bind(this), Strophe.NS.DISCO_ITEMS, 'iq', 'get', null, null);
  43353. },
  43354. /** Function: addIdentity
  43355. * See http://xmpp.org/registrar/disco-categories.html
  43356. * Parameters:
  43357. * (String) category - category of identity (like client, automation, etc ...)
  43358. * (String) type - type of identity (like pc, web, bot , etc ...)
  43359. * (String) name - name of identity in natural language
  43360. * (String) lang - lang of name parameter
  43361. *
  43362. * Returns:
  43363. * Boolean
  43364. */
  43365. addIdentity: function(category, type, name, lang)
  43366. {
  43367. for (var i=0; i<this._identities.length; i++)
  43368. {
  43369. if (this._identities[i].category == category &&
  43370. this._identities[i].type == type &&
  43371. this._identities[i].name == name &&
  43372. this._identities[i].lang == lang)
  43373. {
  43374. return false;
  43375. }
  43376. }
  43377. this._identities.push({category: category, type: type, name: name, lang: lang});
  43378. return true;
  43379. },
  43380. /** Function: addFeature
  43381. *
  43382. * Parameters:
  43383. * (String) var_name - feature name (like jabber:iq:version)
  43384. *
  43385. * Returns:
  43386. * boolean
  43387. */
  43388. addFeature: function(var_name)
  43389. {
  43390. for (var i=0; i<this._features.length; i++)
  43391. {
  43392. if (this._features[i] == var_name)
  43393. return false;
  43394. }
  43395. this._features.push(var_name);
  43396. return true;
  43397. },
  43398. /** Function: removeFeature
  43399. *
  43400. * Parameters:
  43401. * (String) var_name - feature name (like jabber:iq:version)
  43402. *
  43403. * Returns:
  43404. * boolean
  43405. */
  43406. removeFeature: function(var_name)
  43407. {
  43408. for (var i=0; i<this._features.length; i++)
  43409. {
  43410. if (this._features[i] === var_name){
  43411. this._features.splice(i,1);
  43412. return true;
  43413. }
  43414. }
  43415. return false;
  43416. },
  43417. /** Function: addItem
  43418. *
  43419. * Parameters:
  43420. * (String) jid
  43421. * (String) name
  43422. * (String) node
  43423. * (Function) call_back
  43424. *
  43425. * Returns:
  43426. * boolean
  43427. */
  43428. addItem: function(jid, name, node, call_back)
  43429. {
  43430. if (node && !call_back)
  43431. return false;
  43432. this._items.push({jid: jid, name: name, node: node, call_back: call_back});
  43433. return true;
  43434. },
  43435. /** Function: info
  43436. * Info query
  43437. *
  43438. * Parameters:
  43439. * (Function) call_back
  43440. * (String) jid
  43441. * (String) node
  43442. */
  43443. info: function(jid, node, success, error, timeout)
  43444. {
  43445. var attrs = {xmlns: Strophe.NS.DISCO_INFO};
  43446. if (node)
  43447. attrs.node = node;
  43448. var info = $iq({from:this._connection.jid,
  43449. to:jid, type:'get'}).c('query', attrs);
  43450. this._connection.sendIQ(info, success, error, timeout);
  43451. },
  43452. /** Function: items
  43453. * Items query
  43454. *
  43455. * Parameters:
  43456. * (Function) call_back
  43457. * (String) jid
  43458. * (String) node
  43459. */
  43460. items: function(jid, node, success, error, timeout)
  43461. {
  43462. var attrs = {xmlns: Strophe.NS.DISCO_ITEMS};
  43463. if (node)
  43464. attrs.node = node;
  43465. var items = $iq({from:this._connection.jid,
  43466. to:jid, type:'get'}).c('query', attrs);
  43467. this._connection.sendIQ(items, success, error, timeout);
  43468. },
  43469. /** PrivateFunction: _buildIQResult
  43470. */
  43471. _buildIQResult: function(stanza, query_attrs)
  43472. {
  43473. var id = stanza.getAttribute('id');
  43474. var from = stanza.getAttribute('from');
  43475. var iqresult = $iq({type: 'result', id: id});
  43476. if (from !== null) {
  43477. iqresult.attrs({to: from});
  43478. }
  43479. return iqresult.c('query', query_attrs);
  43480. },
  43481. /** PrivateFunction: _onDiscoInfo
  43482. * Called when receive info request
  43483. */
  43484. _onDiscoInfo: function(stanza)
  43485. {
  43486. var node = stanza.getElementsByTagName('query')[0].getAttribute('node');
  43487. var attrs = {xmlns: Strophe.NS.DISCO_INFO};
  43488. var i;
  43489. if (node)
  43490. {
  43491. attrs.node = node;
  43492. }
  43493. var iqresult = this._buildIQResult(stanza, attrs);
  43494. for (i=0; i<this._identities.length; i++)
  43495. {
  43496. attrs = {category: this._identities[i].category,
  43497. type : this._identities[i].type};
  43498. if (this._identities[i].name)
  43499. attrs.name = this._identities[i].name;
  43500. if (this._identities[i].lang)
  43501. attrs['xml:lang'] = this._identities[i].lang;
  43502. iqresult.c('identity', attrs).up();
  43503. }
  43504. for (i=0; i<this._features.length; i++)
  43505. {
  43506. iqresult.c('feature', {'var':this._features[i]}).up();
  43507. }
  43508. this._connection.send(iqresult.tree());
  43509. return true;
  43510. },
  43511. /** PrivateFunction: _onDiscoItems
  43512. * Called when receive items request
  43513. */
  43514. _onDiscoItems: function(stanza)
  43515. {
  43516. var query_attrs = {xmlns: Strophe.NS.DISCO_ITEMS};
  43517. var node = stanza.getElementsByTagName('query')[0].getAttribute('node');
  43518. var items, i;
  43519. if (node)
  43520. {
  43521. query_attrs.node = node;
  43522. items = [];
  43523. for (i = 0; i < this._items.length; i++)
  43524. {
  43525. if (this._items[i].node == node)
  43526. {
  43527. items = this._items[i].call_back(stanza);
  43528. break;
  43529. }
  43530. }
  43531. }
  43532. else
  43533. {
  43534. items = this._items;
  43535. }
  43536. var iqresult = this._buildIQResult(stanza, query_attrs);
  43537. for (i = 0; i < items.length; i++)
  43538. {
  43539. var attrs = {jid: items[i].jid};
  43540. if (items[i].name)
  43541. attrs.name = items[i].name;
  43542. if (items[i].node)
  43543. attrs.node = items[i].node;
  43544. iqresult.c('item', attrs).up();
  43545. }
  43546. this._connection.send(iqresult.tree());
  43547. return true;
  43548. }
  43549. });
  43550. }));
  43551. // Converse.js (A browser based XMPP chat client)
  43552. // http://conversejs.org
  43553. //
  43554. // Copyright (c) 2012-2017, Jan-Carel Brand <jc@opkode.com>
  43555. // Licensed under the Mozilla Public License (MPLv2)
  43556. //
  43557. /* This is a Converse.js plugin which add support for XEP-0030: Service Discovery */
  43558. /*global Backbone, define, window */
  43559. (function (root, factory) {
  43560. define('converse-disco',["converse-core", "sizzle", "strophe.disco"], factory);
  43561. })(void 0, function (converse, sizzle) {
  43562. var _converse$env = converse.env,
  43563. Backbone = _converse$env.Backbone,
  43564. Promise = _converse$env.Promise,
  43565. Strophe = _converse$env.Strophe,
  43566. b64_sha1 = _converse$env.b64_sha1,
  43567. utils = _converse$env.utils,
  43568. _ = _converse$env._;
  43569. converse.plugins.add('converse-disco', {
  43570. initialize: function initialize() {
  43571. /* The initialize function gets called as soon as the plugin is
  43572. * loaded by converse.js's plugin machinery.
  43573. */
  43574. var _converse = this._converse;
  43575. function onDiscoItems(stanza) {
  43576. _.each(stanza.querySelectorAll('query item'), function (item) {
  43577. if (item.getAttribute("node")) {
  43578. // XXX: ignore nodes for now.
  43579. // See: https://xmpp.org/extensions/xep-0030.html#items-nodes
  43580. return;
  43581. }
  43582. var jid = item.getAttribute('jid');
  43583. var entities = _converse.disco_entities;
  43584. if (_.isUndefined(entities.get(jid))) {
  43585. entities.create({
  43586. 'jid': jid
  43587. });
  43588. }
  43589. });
  43590. } // Promises exposed by this plugin
  43591. _converse.api.promises.add('discoInitialized');
  43592. _converse.DiscoEntity = Backbone.Model.extend({
  43593. /* A Disco Entity is a JID addressable entity that can be queried
  43594. * for features.
  43595. *
  43596. * See XEP-0030: https://xmpp.org/extensions/xep-0030.html
  43597. */
  43598. idAttribute: 'jid',
  43599. initialize: function initialize() {
  43600. this.waitUntilFeaturesDiscovered = utils.getResolveablePromise();
  43601. this.features = new Backbone.Collection();
  43602. this.features.browserStorage = new Backbone.BrowserStorage[_converse.storage](b64_sha1("converse.features-".concat(this.get('jid'))));
  43603. this.features.on('add', this.onFeatureAdded, this);
  43604. this.identities = new Backbone.Collection();
  43605. this.identities.browserStorage = new Backbone.BrowserStorage[_converse.storage](b64_sha1("converse.identities-".concat(this.get('jid'))));
  43606. this.fetchFeatures();
  43607. },
  43608. getIdentity: function getIdentity(category, type) {
  43609. /* Returns a Promise which resolves with a map indicating
  43610. * whether a given identity is provided.
  43611. *
  43612. * Parameters:
  43613. * (String) category - The identity category
  43614. * (String) type - The identity type
  43615. */
  43616. var entity = this;
  43617. return new Promise(function (resolve, reject) {
  43618. function fulfillPromise() {
  43619. var model = entity.identities.findWhere({
  43620. 'category': category,
  43621. 'type': type
  43622. });
  43623. resolve(model);
  43624. }
  43625. entity.waitUntilFeaturesDiscovered.then(fulfillPromise).catch(_.partial(_converse.log, _, Strophe.LogLevel.FATAL));
  43626. });
  43627. },
  43628. hasFeature: function hasFeature(feature) {
  43629. /* Returns a Promise which resolves with a map indicating
  43630. * whether a given feature is supported.
  43631. *
  43632. * Parameters:
  43633. * (String) feature - The feature that might be supported.
  43634. */
  43635. var entity = this;
  43636. return new Promise(function (resolve, reject) {
  43637. function fulfillPromise() {
  43638. var model = entity.features.findWhere({
  43639. 'var': feature
  43640. });
  43641. if (model) {
  43642. resolve({
  43643. 'supported': true,
  43644. 'feature': model
  43645. });
  43646. } else {
  43647. resolve({
  43648. 'supported': false,
  43649. 'feature': null
  43650. });
  43651. }
  43652. }
  43653. entity.waitUntilFeaturesDiscovered.then(fulfillPromise).catch(_.partial(_converse.log, _, Strophe.LogLevel.FATAL));
  43654. });
  43655. },
  43656. onFeatureAdded: function onFeatureAdded(feature) {
  43657. feature.entity = this;
  43658. _converse.emit('serviceDiscovered', feature);
  43659. },
  43660. fetchFeatures: function fetchFeatures() {
  43661. var _this = this;
  43662. if (this.features.browserStorage.records.length === 0) {
  43663. this.queryInfo();
  43664. } else {
  43665. this.features.fetch({
  43666. add: true,
  43667. success: function success() {
  43668. _this.waitUntilFeaturesDiscovered.resolve();
  43669. _this.trigger('featuresDiscovered');
  43670. }
  43671. });
  43672. this.identities.fetch({
  43673. add: true
  43674. });
  43675. }
  43676. },
  43677. queryInfo: function queryInfo() {
  43678. _converse.connection.disco.info(this.get('jid'), null, this.onInfo.bind(this));
  43679. },
  43680. queryForItems: function queryForItems() {
  43681. if (_.isEmpty(this.identities.where({
  43682. 'category': 'server'
  43683. }))) {
  43684. // Don't fetch features and items if this is not a
  43685. // server or a conference component.
  43686. return;
  43687. }
  43688. _converse.connection.disco.items(this.get('jid'), null, onDiscoItems);
  43689. },
  43690. onInfo: function onInfo(stanza) {
  43691. var _this2 = this;
  43692. _.forEach(stanza.querySelectorAll('identity'), function (identity) {
  43693. _this2.identities.create({
  43694. 'category': identity.getAttribute('category'),
  43695. 'type': identity.getAttribute('type'),
  43696. 'name': identity.getAttribute('name')
  43697. });
  43698. });
  43699. if (stanza.querySelector('feature[var="' + Strophe.NS.DISCO_ITEMS + '"]')) {
  43700. this.queryForItems();
  43701. }
  43702. _.forEach(stanza.querySelectorAll('feature'), function (feature) {
  43703. _this2.features.create({
  43704. 'var': feature.getAttribute('var'),
  43705. 'from': stanza.getAttribute('from')
  43706. });
  43707. });
  43708. this.waitUntilFeaturesDiscovered.resolve();
  43709. this.trigger('featuresDiscovered');
  43710. }
  43711. });
  43712. _converse.DiscoEntities = Backbone.Collection.extend({
  43713. model: _converse.DiscoEntity,
  43714. initialize: function initialize() {
  43715. this.browserStorage = new Backbone.BrowserStorage[_converse.storage](b64_sha1("converse.disco-entities-".concat(_converse.bare_jid)));
  43716. this.fetchEntities().then(_.partial(_converse.emit, 'discoInitialized'), _.partial(_converse.emit, 'discoInitialized')).catch(_.partial(_converse.log, _, Strophe.LogLevel.FATAL));
  43717. },
  43718. fetchEntities: function fetchEntities() {
  43719. var _this3 = this;
  43720. return new Promise(function (resolve, reject) {
  43721. _this3.fetch({
  43722. add: true,
  43723. success: function (collection) {
  43724. if (collection.length === 0 || !collection.get(_converse.domain)) {
  43725. this.create({
  43726. 'jid': _converse.domain
  43727. });
  43728. }
  43729. resolve();
  43730. }.bind(_this3),
  43731. error: function error() {
  43732. reject(new Error("Could not fetch disco entities"));
  43733. }
  43734. });
  43735. });
  43736. }
  43737. });
  43738. function addClientFeatures() {
  43739. /* The strophe.disco.js plugin keeps a list of features which
  43740. * it will advertise to any #info queries made to it.
  43741. *
  43742. * See: http://xmpp.org/extensions/xep-0030.html#info
  43743. */
  43744. // See http://xmpp.org/registrar/disco-categories.html
  43745. _converse.connection.disco.addIdentity('client', 'web', 'Converse.js');
  43746. _converse.connection.disco.addFeature(Strophe.NS.BOSH);
  43747. _converse.connection.disco.addFeature(Strophe.NS.CHATSTATES);
  43748. _converse.connection.disco.addFeature(Strophe.NS.DISCO_INFO);
  43749. _converse.connection.disco.addFeature(Strophe.NS.ROSTERX); // Limited support
  43750. if (_converse.message_carbons) {
  43751. _converse.connection.disco.addFeature(Strophe.NS.CARBONS);
  43752. }
  43753. _converse.emit('addClientFeatures');
  43754. return this;
  43755. }
  43756. function initializeDisco() {
  43757. addClientFeatures();
  43758. _converse.disco_entities = new _converse.DiscoEntities();
  43759. }
  43760. _converse.api.listen.on('reconnected', initializeDisco);
  43761. _converse.api.listen.on('connected', initializeDisco);
  43762. _converse.api.listen.on('beforeTearDown', function () {
  43763. if (_converse.disco_entities) {
  43764. _converse.disco_entities.each(function (entity) {
  43765. entity.features.reset();
  43766. entity.features.browserStorage._clear();
  43767. });
  43768. _converse.disco_entities.reset();
  43769. _converse.disco_entities.browserStorage._clear();
  43770. }
  43771. });
  43772. /* We extend the default converse.js API to add methods specific to service discovery */
  43773. _.extend(_converse.api, {
  43774. 'disco': {
  43775. 'entities': {
  43776. 'get': function get(entity_jid) {
  43777. var create = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  43778. var entity = _converse.disco_entities.get(entity_jid);
  43779. if (entity || !create) {
  43780. return entity;
  43781. }
  43782. return _converse.disco_entities.create({
  43783. 'jid': entity_jid
  43784. });
  43785. }
  43786. },
  43787. 'supports': function supports(feature, entity_jid) {
  43788. /* Returns a Promise which resolves with a map indicating
  43789. * whether a given feature is supported.
  43790. *
  43791. * Parameters:
  43792. * (String) feature - The feature that might be
  43793. * supported. In the XML stanza, this is the `var`
  43794. * attribute of the `<feature>` element. For
  43795. * example: 'http://jabber.org/protocol/muc'
  43796. * (String) entity_jid - The JID of the entity which might support the feature.
  43797. */
  43798. return _converse.api.waitUntil('discoInitialized').then(function () {
  43799. var entity = _converse.api.disco.entities.get(entity_jid, true);
  43800. return entity.hasFeature(feature);
  43801. }).catch(_.partial(_converse.log, _, Strophe.LogLevel.FATAL));
  43802. },
  43803. 'getIdentity': function getIdentity(category, type, entity_jid) {
  43804. /* Returns a Promise which resolves with a map indicating
  43805. * whether an identity with a given type is provided by
  43806. * the entity.
  43807. *
  43808. * Parameters:
  43809. * (String) category - The identity category.
  43810. * In the XML stanza, this is the `category`
  43811. * attribute of the `<identity>` element.
  43812. * For example: 'pubsub'
  43813. * (String) type - The identity type.
  43814. * In the XML stanza, this is the `type`
  43815. * attribute of the `<identity>` element.
  43816. * For example: 'pep'
  43817. */
  43818. return _converse.api.waitUntil('discoInitialized').then(function () {
  43819. var entity = _converse.api.disco.entities.get(entity_jid, true);
  43820. return entity.getIdentity(category, type);
  43821. }).catch(_.partial(_converse.log, _, Strophe.LogLevel.FATAL));
  43822. }
  43823. }
  43824. });
  43825. }
  43826. });
  43827. });
  43828. //# sourceMappingURL=converse-disco.js.map;
  43829. // http://xmpp.org/extensions/xep-0059.html
  43830. (function (root, factory) {
  43831. if (typeof define === 'function' && define.amd) {
  43832. // AMD. Register as an anonymous module.
  43833. define("strophe.rsm", [
  43834. "strophe"
  43835. ], function (Strophe) {
  43836. factory(
  43837. Strophe.Strophe,
  43838. Strophe.$build,
  43839. Strophe.$iq ,
  43840. Strophe.$msg,
  43841. Strophe.$pres
  43842. );
  43843. return Strophe;
  43844. });
  43845. } else {
  43846. // Browser globals
  43847. factory(
  43848. root.Strophe,
  43849. root.$build,
  43850. root.$iq ,
  43851. root.$msg,
  43852. root.$pres
  43853. );
  43854. }
  43855. }(this, function (Strophe, $build, $iq, $msg, $pres) {
  43856. Strophe.addNamespace('RSM', 'http://jabber.org/protocol/rsm');
  43857. Strophe.RSM = function(options) {
  43858. this.attribs = ['max', 'first', 'last', 'after', 'before', 'index', 'count'];
  43859. if (typeof options.xml != 'undefined') {
  43860. this.fromXMLElement(options.xml);
  43861. } else {
  43862. for (var ii = 0; ii < this.attribs.length; ii++) {
  43863. var attrib = this.attribs[ii];
  43864. this[attrib] = options[attrib];
  43865. }
  43866. }
  43867. };
  43868. Strophe.RSM.prototype = {
  43869. toXML: function() {
  43870. var xml = $build('set', {xmlns: Strophe.NS.RSM});
  43871. for (var ii = 0; ii < this.attribs.length; ii++) {
  43872. var attrib = this.attribs[ii];
  43873. if (typeof this[attrib] != 'undefined') {
  43874. xml = xml.c(attrib).t(this[attrib].toString()).up();
  43875. }
  43876. }
  43877. return xml.tree();
  43878. },
  43879. next: function(max) {
  43880. var newSet = new Strophe.RSM({max: max, after: this.last});
  43881. return newSet;
  43882. },
  43883. previous: function(max) {
  43884. var newSet = new Strophe.RSM({max: max, before: this.first});
  43885. return newSet;
  43886. },
  43887. fromXMLElement: function(xmlElement) {
  43888. for (var ii = 0; ii < this.attribs.length; ii++) {
  43889. var attrib = this.attribs[ii];
  43890. var elem = xmlElement.getElementsByTagName(attrib)[0];
  43891. if (typeof elem != 'undefined' && elem !== null) {
  43892. this[attrib] = Strophe.getText(elem);
  43893. if (attrib == 'first') {
  43894. this.index = elem.getAttribute('index');
  43895. }
  43896. }
  43897. }
  43898. }
  43899. };
  43900. }));
  43901. // Converse.js (A browser based XMPP chat client)
  43902. // http://conversejs.org
  43903. //
  43904. // Copyright (c) 2012-2017, Jan-Carel Brand <jc@opkode.com>
  43905. // Licensed under the Mozilla Public License (MPLv2)
  43906. //
  43907. /*global define */
  43908. // XEP-0059 Result Set Management
  43909. (function (root, factory) {
  43910. define('converse-mam',["sizzle", "converse-core", "utils", "converse-disco", "strophe.rsm"], factory);
  43911. })(void 0, function (sizzle, converse, utils) {
  43912. "use strict";
  43913. var CHATROOMS_TYPE = 'chatroom';
  43914. var _converse$env = converse.env,
  43915. Promise = _converse$env.Promise,
  43916. Strophe = _converse$env.Strophe,
  43917. $iq = _converse$env.$iq,
  43918. _ = _converse$env._,
  43919. moment = _converse$env.moment;
  43920. var RSM_ATTRIBUTES = ['max', 'first', 'last', 'after', 'before', 'index', 'count']; // XEP-0313 Message Archive Management
  43921. var MAM_ATTRIBUTES = ['with', 'start', 'end'];
  43922. function getMessageArchiveID(stanza) {
  43923. var result = sizzle("result[xmlns=\"".concat(Strophe.NS.MAM, "\"]"), stanza).pop();
  43924. if (!_.isUndefined(result)) {
  43925. return result.getAttribute('id');
  43926. }
  43927. var stanza_id = sizzle("stanza-id[xmlns=\"".concat(Strophe.NS.SID, "\"]"), stanza).pop();
  43928. if (!_.isUndefined(stanza_id)) {
  43929. return stanza_id.getAttribute('id');
  43930. }
  43931. }
  43932. function queryForArchivedMessages(_converse, options, callback, errback) {
  43933. /* Internal function, called by the "archive.query" API method.
  43934. */
  43935. var date;
  43936. if (_.isFunction(options)) {
  43937. callback = options;
  43938. errback = callback;
  43939. }
  43940. var queryid = _converse.connection.getUniqueId();
  43941. var attrs = {
  43942. 'type': 'set'
  43943. };
  43944. if (!_.isUndefined(options) && options.groupchat) {
  43945. if (!options['with']) {
  43946. // eslint-disable-line dot-notation
  43947. throw new Error('You need to specify a "with" value containing ' + 'the chat room JID, when querying groupchat messages.');
  43948. }
  43949. attrs.to = options['with']; // eslint-disable-line dot-notation
  43950. }
  43951. var stanza = $iq(attrs).c('query', {
  43952. 'xmlns': Strophe.NS.MAM,
  43953. 'queryid': queryid
  43954. });
  43955. if (!_.isUndefined(options)) {
  43956. stanza.c('x', {
  43957. 'xmlns': Strophe.NS.XFORM,
  43958. 'type': 'submit'
  43959. }).c('field', {
  43960. 'var': 'FORM_TYPE',
  43961. 'type': 'hidden'
  43962. }).c('value').t(Strophe.NS.MAM).up().up();
  43963. if (options['with'] && !options.groupchat) {
  43964. // eslint-disable-line dot-notation
  43965. stanza.c('field', {
  43966. 'var': 'with'
  43967. }).c('value').t(options['with']).up().up(); // eslint-disable-line dot-notation
  43968. }
  43969. _.each(['start', 'end'], function (t) {
  43970. if (options[t]) {
  43971. date = moment(options[t]);
  43972. if (date.isValid()) {
  43973. stanza.c('field', {
  43974. 'var': t
  43975. }).c('value').t(date.format()).up().up();
  43976. } else {
  43977. throw new TypeError("archive.query: invalid date provided for: ".concat(t));
  43978. }
  43979. }
  43980. });
  43981. stanza.up();
  43982. if (options instanceof Strophe.RSM) {
  43983. stanza.cnode(options.toXML());
  43984. } else if (_.intersection(RSM_ATTRIBUTES, _.keys(options)).length) {
  43985. stanza.cnode(new Strophe.RSM(options).toXML());
  43986. }
  43987. }
  43988. var messages = [];
  43989. var message_handler = _converse.connection.addHandler(function (message) {
  43990. if (options.groupchat && message.getAttribute('from') !== options['with']) {
  43991. // eslint-disable-line dot-notation
  43992. return true;
  43993. }
  43994. var result = message.querySelector('result');
  43995. if (!_.isNull(result) && result.getAttribute('queryid') === queryid) {
  43996. messages.push(message);
  43997. }
  43998. return true;
  43999. }, Strophe.NS.MAM);
  44000. _converse.connection.sendIQ(stanza, function (iq) {
  44001. _converse.connection.deleteHandler(message_handler);
  44002. if (_.isFunction(callback)) {
  44003. var set = iq.querySelector('set');
  44004. var rsm;
  44005. if (!_.isUndefined(set)) {
  44006. rsm = new Strophe.RSM({
  44007. xml: set
  44008. });
  44009. _.extend(rsm, _.pick(options, _.concat(MAM_ATTRIBUTES, ['max'])));
  44010. }
  44011. callback(messages, rsm);
  44012. }
  44013. }, function () {
  44014. _converse.connection.deleteHandler(message_handler);
  44015. if (_.isFunction(errback)) {
  44016. errback.apply(this, arguments);
  44017. }
  44018. }, _converse.message_archiving_timeout);
  44019. }
  44020. converse.plugins.add('converse-mam', {
  44021. dependencies: ['converse-chatview', 'converse-muc', 'converse-muc-views'],
  44022. overrides: {
  44023. // Overrides mentioned here will be picked up by converse.js's
  44024. // plugin architecture they will replace existing methods on the
  44025. // relevant objects or classes.
  44026. //
  44027. // New functions which don't exist yet can also be added.
  44028. ChatBox: {
  44029. getMessageAttributes: function getMessageAttributes(message, delay, original_stanza) {
  44030. var attrs = this.__super__.getMessageAttributes.apply(this, arguments);
  44031. var archive_id = getMessageArchiveID(original_stanza);
  44032. if (archive_id) {
  44033. attrs.archive_id = archive_id;
  44034. }
  44035. return attrs;
  44036. }
  44037. },
  44038. ChatBoxView: {
  44039. render: function render() {
  44040. var result = this.__super__.render.apply(this, arguments);
  44041. if (!this.disable_mam) {
  44042. this.content.addEventListener('scroll', _.debounce(this.onScroll.bind(this), 100));
  44043. }
  44044. return result;
  44045. },
  44046. fetchNewestMessages: function fetchNewestMessages() {
  44047. var _this = this;
  44048. /* Fetches messages that might have been archived *after*
  44049. * the last archived message in our local cache.
  44050. */
  44051. if (this.disable_mam) {
  44052. return;
  44053. }
  44054. var _converse = this.__super__._converse;
  44055. _converse.api.disco.supports(Strophe.NS.MAM, _converse.bare_jid).then(function (result) {
  44056. // Success
  44057. if (result.supported) {
  44058. var most_recent_msg = utils.getMostRecentMessage(_this.model);
  44059. if (_.isNil(most_recent_msg)) {
  44060. _this.fetchArchivedMessages();
  44061. } else {
  44062. var archive_id = most_recent_msg.get('archive_id');
  44063. if (archive_id) {
  44064. _this.fetchArchivedMessages({
  44065. 'after': most_recent_msg.get('archive_id')
  44066. });
  44067. } else {
  44068. _this.fetchArchivedMessages({
  44069. 'start': most_recent_msg.get('time')
  44070. });
  44071. }
  44072. }
  44073. }
  44074. }, function () {
  44075. // Error
  44076. _converse.log("Error or timeout while checking for MAM support", Strophe.LogLevel.ERROR);
  44077. }).catch(function (msg) {
  44078. _this.clearSpinner();
  44079. _converse.log(msg, Strophe.LogLevel.FATAL);
  44080. });
  44081. },
  44082. fetchArchivedMessagesIfNecessary: function fetchArchivedMessagesIfNecessary() {
  44083. var _this2 = this;
  44084. /* Check if archived messages should be fetched, and if so, do so. */
  44085. if (this.disable_mam || this.model.get('mam_initialized')) {
  44086. return;
  44087. }
  44088. var _converse = this.__super__._converse;
  44089. _converse.api.disco.supports(Strophe.NS.MAM, _converse.bare_jid).then(function (result) {
  44090. // Success
  44091. if (result.supported) {
  44092. _this2.fetchArchivedMessages();
  44093. }
  44094. _this2.model.save({
  44095. 'mam_initialized': true
  44096. });
  44097. }, function () {
  44098. // Error
  44099. _converse.log("Error or timeout while checking for MAM support", Strophe.LogLevel.ERROR);
  44100. }).catch(function (msg) {
  44101. _this2.clearSpinner();
  44102. _converse.log(msg, Strophe.LogLevel.FATAL);
  44103. });
  44104. },
  44105. fetchArchivedMessages: function fetchArchivedMessages(options) {
  44106. var _this3 = this;
  44107. /* Fetch archived chat messages from the XMPP server.
  44108. *
  44109. * Then, upon receiving them, call onMessage on the chat
  44110. * box, so that they are displayed inside it.
  44111. */
  44112. var _converse = this.__super__._converse;
  44113. if (!_converse.disco_entities.get(_converse.bare_jid).features.findWhere({
  44114. 'var': Strophe.NS.MAM
  44115. })) {
  44116. _converse.log("Attempted to fetch archived messages but this " + "user's server doesn't support XEP-0313", Strophe.LogLevel.WARN);
  44117. return;
  44118. }
  44119. if (this.disable_mam) {
  44120. return;
  44121. }
  44122. this.addSpinner();
  44123. _converse.api.archive.query(_.extend({
  44124. 'before': '',
  44125. // Page backwards from the most recent message
  44126. 'max': _converse.archived_messages_page_size,
  44127. 'with': this.model.get('jid')
  44128. }, options), function (messages) {
  44129. // Success
  44130. _this3.clearSpinner();
  44131. if (messages.length) {
  44132. _.each(messages, _converse.chatboxes.onMessage.bind(_converse.chatboxes));
  44133. }
  44134. }, function () {
  44135. // Error
  44136. _this3.clearSpinner();
  44137. _converse.log("Error or timeout while trying to fetch " + "archived messages", Strophe.LogLevel.ERROR);
  44138. });
  44139. },
  44140. onScroll: function onScroll(ev) {
  44141. var _converse = this.__super__._converse;
  44142. if (this.content.scrollTop === 0 && this.model.messages.length) {
  44143. var oldest_message = this.model.messages.at(0);
  44144. var archive_id = oldest_message.get('archive_id');
  44145. if (archive_id) {
  44146. this.fetchArchivedMessages({
  44147. 'before': archive_id
  44148. });
  44149. } else {
  44150. this.fetchArchivedMessages({
  44151. 'end': oldest_message.get('time')
  44152. });
  44153. }
  44154. }
  44155. }
  44156. },
  44157. ChatRoomView: {
  44158. initialize: function initialize() {
  44159. var _converse = this.__super__._converse;
  44160. this.__super__.initialize.apply(this, arguments);
  44161. this.model.on('change:mam_enabled', this.fetchArchivedMessagesIfNecessary, this);
  44162. this.model.on('change:connection_status', this.fetchArchivedMessagesIfNecessary, this);
  44163. },
  44164. isDuplicate: function isDuplicate(message, original_stanza) {
  44165. var result = this.__super__.isDuplicate.apply(this, arguments);
  44166. if (result) {
  44167. return result;
  44168. }
  44169. var archive_id = getMessageArchiveID(original_stanza);
  44170. if (archive_id) {
  44171. return this.model.messages.filter({
  44172. 'archive_id': archive_id
  44173. }).length > 0;
  44174. }
  44175. },
  44176. renderChatArea: function renderChatArea() {
  44177. var result = this.__super__.renderChatArea.apply(this, arguments);
  44178. if (!this.disable_mam) {
  44179. this.content.addEventListener('scroll', _.debounce(this.onScroll.bind(this), 100));
  44180. }
  44181. return result;
  44182. },
  44183. handleMUCMessage: function handleMUCMessage(stanza) {
  44184. /* MAM (message archive management XEP-0313) messages are
  44185. * ignored, since they're handled separately.
  44186. */
  44187. if (sizzle("[xmlns=\"".concat(Strophe.NS.MAM, "\"]"), stanza).length > 0) {
  44188. return true;
  44189. }
  44190. return this.__super__.handleMUCMessage.apply(this, arguments);
  44191. },
  44192. fetchArchivedMessagesIfNecessary: function fetchArchivedMessagesIfNecessary() {
  44193. if (this.model.get('connection_status') !== converse.ROOMSTATUS.ENTERED || !this.model.get('mam_enabled') || this.model.get('mam_initialized')) {
  44194. return;
  44195. }
  44196. this.fetchArchivedMessages();
  44197. this.model.save({
  44198. 'mam_initialized': true
  44199. });
  44200. },
  44201. fetchArchivedMessages: function fetchArchivedMessages(options) {
  44202. /* Fetch archived chat messages for this Chat Room
  44203. *
  44204. * Then, upon receiving them, call onChatRoomMessage
  44205. * so that they are displayed inside it.
  44206. */
  44207. var that = this;
  44208. var _converse = this.__super__._converse;
  44209. this.addSpinner();
  44210. _converse.api.archive.query(_.extend({
  44211. 'groupchat': true,
  44212. 'before': '',
  44213. // Page backwards from the most recent message
  44214. 'with': this.model.get('jid'),
  44215. 'max': _converse.archived_messages_page_size
  44216. }, options), function (messages) {
  44217. that.clearSpinner();
  44218. if (messages.length) {
  44219. _.each(messages, that.onChatRoomMessage.bind(that));
  44220. }
  44221. }, function () {
  44222. that.clearSpinner();
  44223. _converse.log("Error while trying to fetch archived messages", Strophe.LogLevel.WARN);
  44224. });
  44225. }
  44226. }
  44227. },
  44228. initialize: function initialize() {
  44229. /* The initialize function gets called as soon as the plugin is
  44230. * loaded by Converse.js's plugin machinery.
  44231. */
  44232. var _converse = this._converse;
  44233. _converse.api.settings.update({
  44234. archived_messages_page_size: '50',
  44235. message_archiving: undefined,
  44236. // Supported values are 'always', 'never', 'roster' (https://xmpp.org/extensions/xep-0313.html#prefs)
  44237. message_archiving_timeout: 8000 // Time (in milliseconds) to wait before aborting MAM request
  44238. });
  44239. _converse.onMAMError = function (iq) {
  44240. if (iq.querySelectorAll('feature-not-implemented').length) {
  44241. _converse.log("Message Archive Management (XEP-0313) not supported by this server", Strophe.LogLevel.WARN);
  44242. } else {
  44243. _converse.log("An error occured while trying to set archiving preferences.", Strophe.LogLevel.ERROR);
  44244. _converse.log(iq);
  44245. }
  44246. };
  44247. _converse.onMAMPreferences = function (feature, iq) {
  44248. /* Handle returned IQ stanza containing Message Archive
  44249. * Management (XEP-0313) preferences.
  44250. *
  44251. * XXX: For now we only handle the global default preference.
  44252. * The XEP also provides for per-JID preferences, which is
  44253. * currently not supported in converse.js.
  44254. *
  44255. * Per JID preferences will be set in chat boxes, so it'll
  44256. * probbaly be handled elsewhere in any case.
  44257. */
  44258. var preference = sizzle("prefs[xmlns=\"".concat(Strophe.NS.MAM, "\"]"), iq).pop();
  44259. var default_pref = preference.getAttribute('default');
  44260. if (default_pref !== _converse.message_archiving) {
  44261. var stanza = $iq({
  44262. 'type': 'set'
  44263. }).c('prefs', {
  44264. 'xmlns': Strophe.NS.MAM,
  44265. 'default': _converse.message_archiving
  44266. });
  44267. _.each(preference.children, function (child) {
  44268. stanza.cnode(child).up();
  44269. });
  44270. _converse.connection.sendIQ(stanza, _.partial(function (feature, iq) {
  44271. // XXX: Strictly speaking, the server should respond with the updated prefs
  44272. // (see example 18: https://xmpp.org/extensions/xep-0313.html#config)
  44273. // but Prosody doesn't do this, so we don't rely on it.
  44274. feature.save({
  44275. 'preferences': {
  44276. 'default': _converse.message_archiving
  44277. }
  44278. });
  44279. }, feature), _converse.onMAMError);
  44280. } else {
  44281. feature.save({
  44282. 'preferences': {
  44283. 'default': _converse.message_archiving
  44284. }
  44285. });
  44286. }
  44287. };
  44288. /* Event handlers */
  44289. _converse.on('serviceDiscovered', function (feature) {
  44290. var prefs = feature.get('preferences') || {};
  44291. if (feature.get('var') === Strophe.NS.MAM && prefs['default'] !== _converse.message_archiving && // eslint-disable-line dot-notation
  44292. !_.isUndefined(_converse.message_archiving)) {
  44293. // Ask the server for archiving preferences
  44294. _converse.connection.sendIQ($iq({
  44295. 'type': 'get'
  44296. }).c('prefs', {
  44297. 'xmlns': Strophe.NS.MAM
  44298. }), _.partial(_converse.onMAMPreferences, feature), _.partial(_converse.onMAMError, feature));
  44299. }
  44300. });
  44301. _converse.on('addClientFeatures', function () {
  44302. _converse.connection.disco.addFeature(Strophe.NS.MAM);
  44303. });
  44304. _converse.on('afterMessagesFetched', function (chatboxview) {
  44305. chatboxview.fetchNewestMessages();
  44306. });
  44307. _converse.on('reconnected', function () {
  44308. var private_chats = _converse.chatboxviews.filter(function (view) {
  44309. return _.at(view, 'model.attributes.type')[0] === 'chatbox';
  44310. });
  44311. _.each(private_chats, function (view) {
  44312. return view.fetchNewestMessages();
  44313. });
  44314. });
  44315. _.extend(_converse.api, {
  44316. /* Extend default converse.js API to add methods specific to MAM
  44317. */
  44318. 'archive': {
  44319. 'query': function query(options, callback, errback) {
  44320. /* Do a MAM (XEP-0313) query for archived messages.
  44321. *
  44322. * Parameters:
  44323. * (Object) options - Query parameters, either
  44324. * MAM-specific or also for Result Set Management.
  44325. * (Function) callback - A function to call whenever
  44326. * we receive query-relevant stanza.
  44327. * (Function) errback - A function to call when an
  44328. * error stanza is received.
  44329. *
  44330. * The options parameter can also be an instance of
  44331. * Strophe.RSM to enable easy querying between results pages.
  44332. *
  44333. * When the the callback is called, a Strophe.RSM object is
  44334. * returned on which "next" or "previous" can be called
  44335. * before passing it in again to this method, to
  44336. * get the next or previous page in the result set.
  44337. */
  44338. if (!_converse.api.connection.connected()) {
  44339. throw new Error('Can\'t call `api.archive.query` before having established an XMPP session');
  44340. }
  44341. return queryForArchivedMessages(_converse, options, callback, errback);
  44342. }
  44343. }
  44344. });
  44345. }
  44346. });
  44347. });
  44348. //# sourceMappingURL=converse-mam.js.map;
  44349. define('tpl!field', ['lodash'], function(_) {return function(o) {
  44350. var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
  44351. function print() { __p += __j.call(arguments, '') }
  44352. __p += '<field var="' +
  44353. __e(o.name) +
  44354. '">\n';
  44355. if (_.isArray(o.value)) { ;
  44356. __p += '\n ';
  44357. _.each(o.value,function(arrayValue) { ;
  44358. __p += '<value>' +
  44359. __e(arrayValue) +
  44360. '</value>';
  44361. }); ;
  44362. __p += '\n';
  44363. } else { ;
  44364. __p += '\n <value>' +
  44365. __e(o.value) +
  44366. '</value>\n';
  44367. } ;
  44368. __p += '</field>\n';
  44369. return __p
  44370. };});
  44371. define('tpl!select_option', ['lodash'], function(_) {return function(o) {
  44372. var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
  44373. function print() { __p += __j.call(arguments, '') }
  44374. __p += '<option value="' +
  44375. __e(o.value) +
  44376. '" ';
  44377. if (o.selected) { ;
  44378. __p += ' selected="selected" ';
  44379. } ;
  44380. __p += ' >' +
  44381. __e(o.label) +
  44382. '</option>\n';
  44383. return __p
  44384. };});
  44385. define('tpl!form_select', ['lodash'], function(_) {return function(o) {
  44386. var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
  44387. function print() { __p += __j.call(arguments, '') }
  44388. __p += '<label>\n ' +
  44389. __e(o.label) +
  44390. '\n <select name="' +
  44391. __e(o.name) +
  44392. '" ';
  44393. if (o.multiple) { ;
  44394. __p += ' multiple="multiple" ';
  44395. } ;
  44396. __p += '>' +
  44397. ((__t = (o.options)) == null ? '' : __t) +
  44398. '</select>\n</label>\n';
  44399. return __p
  44400. };});
  44401. define('tpl!form_textarea', ['lodash'], function(_) {return function(o) {
  44402. var __t, __p = '', __e = _.escape;
  44403. __p += '<label class="label-ta">' +
  44404. __e(o.label) +
  44405. '</label>\n<textarea name="' +
  44406. __e(o.name) +
  44407. '">' +
  44408. __e(o.value) +
  44409. '</textarea>\n';
  44410. return __p
  44411. };});
  44412. define('tpl!form_checkbox', ['lodash'], function(_) {return function(o) {
  44413. var __t, __p = '', __e = _.escape;
  44414. __p += '<label class="checkbox" for="' +
  44415. __e(o.name) +
  44416. '">' +
  44417. __e(o.label) +
  44418. '<input name="' +
  44419. __e(o.name) +
  44420. '" type="' +
  44421. __e(o.type) +
  44422. '" ' +
  44423. __e(o.checked) +
  44424. '></label>\n\n';
  44425. return __p
  44426. };});
  44427. define('tpl!form_username', ['lodash'], function(_) {return function(o) {
  44428. var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
  44429. function print() { __p += __j.call(arguments, '') }
  44430. if (o.label) { ;
  44431. __p += '\n<label>\n ' +
  44432. __e(o.label) +
  44433. '\n</label>\n';
  44434. } ;
  44435. __p += '\n<div class="input-group">\n <input name="' +
  44436. __e(o.name) +
  44437. '" type="' +
  44438. __e(o.type) +
  44439. '"\n ';
  44440. if (o.value) { ;
  44441. __p += ' value="' +
  44442. __e(o.value) +
  44443. '" ';
  44444. } ;
  44445. __p += '\n ';
  44446. if (o.required) { ;
  44447. __p += ' class="required" ';
  44448. } ;
  44449. __p += ' />\n <span title="' +
  44450. __e(o.domain) +
  44451. '">' +
  44452. __e(o.domain) +
  44453. '</span>\n</div>\n';
  44454. return __p
  44455. };});
  44456. define('tpl!form_input', ['lodash'], function(_) {return function(o) {
  44457. var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
  44458. function print() { __p += __j.call(arguments, '') }
  44459. __p += '<label>\n ' +
  44460. __e(o.label) +
  44461. '\n <input name="' +
  44462. __e(o.name) +
  44463. '" type="' +
  44464. __e(o.type) +
  44465. '" \n ';
  44466. if (o.placeholder) { ;
  44467. __p += ' placeholder="' +
  44468. __e(o.placeholder) +
  44469. '" ';
  44470. } ;
  44471. __p += '\n ';
  44472. if (o.value) { ;
  44473. __p += ' value="' +
  44474. __e(o.value) +
  44475. '" ';
  44476. } ;
  44477. __p += '\n ';
  44478. if (o.required) { ;
  44479. __p += ' class="required" ';
  44480. } ;
  44481. __p += ' >\n</label>\n';
  44482. return __p
  44483. };});
  44484. define('tpl!form_captcha', ['lodash'], function(_) {return function(o) {
  44485. var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
  44486. function print() { __p += __j.call(arguments, '') }
  44487. if (o.label) { ;
  44488. __p += '\n<label>\n ' +
  44489. __e(o.label) +
  44490. '\n</label>\n';
  44491. } ;
  44492. __p += '\n<img src="data:' +
  44493. __e(o.type) +
  44494. ';base64,' +
  44495. __e(o.data) +
  44496. '">\n<input name="' +
  44497. __e(o.name) +
  44498. '" type="text" ';
  44499. if (o.required) { ;
  44500. __p += ' class="required" ';
  44501. } ;
  44502. __p += ' >\n\n\n';
  44503. return __p
  44504. };});
  44505. define('tpl!form_url', ['lodash'], function(_) {return function(o) {
  44506. var __t, __p = '', __e = _.escape;
  44507. __p += '<label>\n ' +
  44508. __e(o.label) +
  44509. '\n <a class="form-url" target="_blank" rel="noopener" href="' +
  44510. __e(o.value) +
  44511. '">' +
  44512. __e(o.value) +
  44513. '</a>\n</label>\n';
  44514. return __p
  44515. };});
  44516. // Converse.js (A browser based XMPP chat client)
  44517. // http://conversejs.org
  44518. //
  44519. // This is the utilities module.
  44520. //
  44521. // Copyright (c) 2012-2017, Jan-Carel Brand <jc@opkode.com>
  44522. // Licensed under the Mozilla Public License (MPLv2)
  44523. //
  44524. /*global define, escape, Jed */
  44525. (function (root, factory) {
  44526. define('form-utils',["sizzle", "lodash.noconflict", "utils", "tpl!field", "tpl!select_option", "tpl!form_select", "tpl!form_textarea", "tpl!form_checkbox", "tpl!form_username", "tpl!form_input", "tpl!form_captcha", "tpl!form_url"], factory);
  44527. })(void 0, function (sizzle, _, u, tpl_field, tpl_select_option, tpl_form_select, tpl_form_textarea, tpl_form_checkbox, tpl_form_username, tpl_form_input, tpl_form_captcha, tpl_form_url) {
  44528. "use strict";
  44529. var XFORM_TYPE_MAP = {
  44530. 'text-private': 'password',
  44531. 'text-single': 'text',
  44532. 'fixed': 'label',
  44533. 'boolean': 'checkbox',
  44534. 'hidden': 'hidden',
  44535. 'jid-multi': 'textarea',
  44536. 'list-single': 'dropdown',
  44537. 'list-multi': 'dropdown'
  44538. };
  44539. u.webForm2xForm = function (field) {
  44540. /* Takes an HTML DOM and turns it into an XForm field.
  44541. *
  44542. * Parameters:
  44543. * (DOMElement) field - the field to convert
  44544. */
  44545. var value;
  44546. if (field.getAttribute('type') === 'checkbox') {
  44547. value = field.checked && 1 || 0;
  44548. } else if (field.tagName == "textarea") {
  44549. value = _.filter(field.value.split('\n'), _.trim);
  44550. } else {
  44551. value = field.value;
  44552. }
  44553. return u.stringToNode(tpl_field({
  44554. name: field.getAttribute('name'),
  44555. value: value
  44556. }));
  44557. };
  44558. u.xForm2webForm = function (field, stanza, domain) {
  44559. /* Takes a field in XMPP XForm (XEP-004: Data Forms) format
  44560. * and turns it into an HTML field.
  44561. *
  44562. * Returns either text or a DOM element (which is not ideal, but fine
  44563. * for now).
  44564. *
  44565. * Parameters:
  44566. * (XMLElement) field - the field to convert
  44567. */
  44568. if (field.getAttribute('type')) {
  44569. if (field.getAttribute('type') === 'list-single' || field.getAttribute('type') === 'list-multi') {
  44570. var values = _.map(u.queryChildren(field, 'value'), _.partial(_.get, _, 'textContent'));
  44571. var options = _.map(u.queryChildren(field, 'option'), function (option) {
  44572. var value = _.get(option.querySelector('value'), 'textContent');
  44573. return tpl_select_option({
  44574. 'value': value,
  44575. 'label': option.getAttribute('label'),
  44576. 'selected': _.startsWith(values, value),
  44577. 'required': !_.isNil(field.querySelector('required'))
  44578. });
  44579. });
  44580. return tpl_form_select({
  44581. 'name': field.getAttribute('var'),
  44582. 'label': field.getAttribute('label'),
  44583. 'options': options.join(''),
  44584. 'multiple': field.getAttribute('type') === 'list-multi',
  44585. 'required': !_.isNil(field.querySelector('required'))
  44586. });
  44587. } else if (field.getAttribute('type') === 'fixed') {
  44588. var text = _.get(field.querySelector('value'), 'textContent');
  44589. return '<p class="form-help">' + text + '</p>';
  44590. } else if (field.getAttribute('type') === 'jid-multi') {
  44591. return tpl_form_textarea({
  44592. 'name': field.getAttribute('var'),
  44593. 'label': field.getAttribute('label') || '',
  44594. 'value': _.get(field.querySelector('value'), 'textContent'),
  44595. 'required': !_.isNil(field.querySelector('required'))
  44596. });
  44597. } else if (field.getAttribute('type') === 'boolean') {
  44598. return tpl_form_checkbox({
  44599. 'name': field.getAttribute('var'),
  44600. 'type': XFORM_TYPE_MAP[field.getAttribute('type')],
  44601. 'label': field.getAttribute('label') || '',
  44602. 'checked': _.get(field.querySelector('value'), 'textContent') === "1" && 'checked="1"' || '',
  44603. 'required': !_.isNil(field.querySelector('required'))
  44604. });
  44605. } else if (field.getAttribute('var') === 'url') {
  44606. return tpl_form_url({
  44607. 'label': field.getAttribute('label') || '',
  44608. 'value': _.get(field.querySelector('value'), 'textContent')
  44609. });
  44610. } else if (field.getAttribute('var') === 'username') {
  44611. return tpl_form_username({
  44612. 'domain': ' @' + domain,
  44613. 'name': field.getAttribute('var'),
  44614. 'type': XFORM_TYPE_MAP[field.getAttribute('type')],
  44615. 'label': field.getAttribute('label') || '',
  44616. 'value': _.get(field.querySelector('value'), 'textContent'),
  44617. 'required': !_.isNil(field.querySelector('required'))
  44618. });
  44619. } else {
  44620. return tpl_form_input({
  44621. 'label': field.getAttribute('label') || '',
  44622. 'name': field.getAttribute('var'),
  44623. 'placeholder': null,
  44624. 'required': !_.isNil(field.querySelector('required')),
  44625. 'type': XFORM_TYPE_MAP[field.getAttribute('type')],
  44626. 'value': _.get(field.querySelector('value'), 'textContent')
  44627. });
  44628. }
  44629. } else {
  44630. if (field.getAttribute('var') === 'ocr') {
  44631. // Captcha
  44632. var uri = field.querySelector('uri');
  44633. var el = sizzle('data[cid="' + uri.textContent.replace(/^cid:/, '') + '"]', stanza)[0];
  44634. return tpl_form_captcha({
  44635. 'label': field.getAttribute('label'),
  44636. 'name': field.getAttribute('var'),
  44637. 'data': _.get(el, 'textContent'),
  44638. 'type': uri.getAttribute('type'),
  44639. 'required': !_.isNil(field.querySelector('required'))
  44640. });
  44641. }
  44642. }
  44643. };
  44644. return u;
  44645. });
  44646. //# sourceMappingURL=form-utils.js.map;
  44647. /*!
  44648. * Backbone.OrderedListView
  44649. *
  44650. * Copyright (c) 2017, JC Brand <jc@opkode.com>
  44651. * Licensed under the Mozilla Public License (MPL)
  44652. */
  44653. (function (root, factory) {
  44654. if (typeof define === 'function' && define.amd) {
  44655. define('backbone.orderedlistview',["underscore", "backbone", "backbone.overview"], factory);
  44656. } else {
  44657. // RequireJS isn't being used.
  44658. // Assume underscore and backbone are loaded in <script> tags
  44659. factory(_ || root._, Backbone || root.Backbone);
  44660. }
  44661. })(this, function (_, Backbone) {
  44662. "use strict";
  44663. Backbone.OrderedListView = Backbone.Overview.extend({
  44664. /* An OrderedListView is a special type of Overview which adds some
  44665. * methods and conventions for rendering an ordered list of elements.
  44666. */
  44667. // The `listItems` attribute denotes the path (from this View) to the
  44668. // list of items.
  44669. listItems: 'model',
  44670. // The `sortEvent` attribute specifies the event which should cause the
  44671. // ordered list to be sorted.
  44672. sortEvent: 'change',
  44673. // The `listSelector` is the selector used to query for the DOM list
  44674. // element which contains the ordered items.
  44675. listSelector: '.ordered-items',
  44676. // The `itemView` is constructor which should be called to create a
  44677. // View for a new item.
  44678. ItemView: undefined,
  44679. // The `subviewIndex` is the attribute of the list element model which
  44680. // acts as the index of the subview in the overview.
  44681. // An overview is a "Collection" of views, and they can be retrieved
  44682. // via an index. By default this is the 'id' attribute, but it could be
  44683. // set to something else.
  44684. subviewIndex: 'id',
  44685. initialize: function initialize() {
  44686. this.sortEventually = _.debounce(this.sortAndPositionAllItems.bind(this), 500);
  44687. this.items = _.get(this, this.listItems);
  44688. this.items.on('add', this.sortAndPositionAllItems, this);
  44689. this.items.on('remove', this.removeView, this);
  44690. if (!_.isNil(this.sortEvent)) {
  44691. this.items.on(this.sortEvent, this.sortEventually, this);
  44692. }
  44693. },
  44694. createItemView: function createItemView(item) {
  44695. var item_view = this.get(item.get(this.subviewIndex));
  44696. if (!item_view) {
  44697. item_view = new this.ItemView({
  44698. model: item
  44699. });
  44700. this.add(item.get(this.subviewIndex), item_view);
  44701. } else {
  44702. item_view.model = item;
  44703. item_view.initialize();
  44704. }
  44705. item_view.render();
  44706. return item_view;
  44707. },
  44708. removeView: function removeView(item) {
  44709. this.remove(item.get(this.subviewIndex));
  44710. },
  44711. sortAndPositionAllItems: function sortAndPositionAllItems() {
  44712. var _this = this;
  44713. if (!this.items.length) {
  44714. return;
  44715. }
  44716. this.items.sort();
  44717. var list_el = this.el.querySelector(this.listSelector);
  44718. var div = document.createElement('div');
  44719. list_el.parentNode.replaceChild(div, list_el);
  44720. this.items.each(function (item) {
  44721. var view = _this.get(item.get(_this.subviewIndex));
  44722. if (_.isUndefined(view)) {
  44723. view = _this.createItemView(item);
  44724. }
  44725. list_el.insertAdjacentElement('beforeend', view.el);
  44726. });
  44727. div.parentNode.replaceChild(list_el, div);
  44728. }
  44729. });
  44730. return Backbone.OrderedListView;
  44731. });
  44732. //# sourceMappingURL=backbone.orderedlistview.js.map;
  44733. (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define('snabbdom',[],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.snabbdom = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
  44734. "use strict";
  44735. Object.defineProperty(exports, "__esModule", { value: true });
  44736. var vnode_1 = require("./vnode");
  44737. var is = require("./is");
  44738. function addNS(data, children, sel) {
  44739. data.ns = 'http://www.w3.org/2000/svg';
  44740. if (sel !== 'foreignObject' && children !== undefined) {
  44741. for (var i = 0; i < children.length; ++i) {
  44742. var childData = children[i].data;
  44743. if (childData !== undefined) {
  44744. addNS(childData, children[i].children, children[i].sel);
  44745. }
  44746. }
  44747. }
  44748. }
  44749. function h(sel, b, c) {
  44750. var data = {}, children, text, i;
  44751. if (c !== undefined) {
  44752. data = b;
  44753. if (is.array(c)) {
  44754. children = c;
  44755. }
  44756. else if (is.primitive(c)) {
  44757. text = c;
  44758. }
  44759. else if (c && c.sel) {
  44760. children = [c];
  44761. }
  44762. }
  44763. else if (b !== undefined) {
  44764. if (is.array(b)) {
  44765. children = b;
  44766. }
  44767. else if (is.primitive(b)) {
  44768. text = b;
  44769. }
  44770. else if (b && b.sel) {
  44771. children = [b];
  44772. }
  44773. else {
  44774. data = b;
  44775. }
  44776. }
  44777. if (is.array(children)) {
  44778. for (i = 0; i < children.length; ++i) {
  44779. if (is.primitive(children[i]))
  44780. children[i] = vnode_1.vnode(undefined, undefined, undefined, children[i]);
  44781. }
  44782. }
  44783. if (sel[0] === 's' && sel[1] === 'v' && sel[2] === 'g' &&
  44784. (sel.length === 3 || sel[3] === '.' || sel[3] === '#')) {
  44785. addNS(data, children, sel);
  44786. }
  44787. return vnode_1.vnode(sel, data, children, text, undefined);
  44788. }
  44789. exports.h = h;
  44790. ;
  44791. exports.default = h;
  44792. },{"./is":3,"./vnode":6}],2:[function(require,module,exports){
  44793. "use strict";
  44794. Object.defineProperty(exports, "__esModule", { value: true });
  44795. function createElement(tagName) {
  44796. return document.createElement(tagName);
  44797. }
  44798. function createElementNS(namespaceURI, qualifiedName) {
  44799. return document.createElementNS(namespaceURI, qualifiedName);
  44800. }
  44801. function createTextNode(text) {
  44802. return document.createTextNode(text);
  44803. }
  44804. function createComment(text) {
  44805. return document.createComment(text);
  44806. }
  44807. function insertBefore(parentNode, newNode, referenceNode) {
  44808. parentNode.insertBefore(newNode, referenceNode);
  44809. }
  44810. function removeChild(node, child) {
  44811. node.removeChild(child);
  44812. }
  44813. function appendChild(node, child) {
  44814. node.appendChild(child);
  44815. }
  44816. function parentNode(node) {
  44817. return node.parentNode;
  44818. }
  44819. function nextSibling(node) {
  44820. return node.nextSibling;
  44821. }
  44822. function tagName(elm) {
  44823. return elm.tagName;
  44824. }
  44825. function setTextContent(node, text) {
  44826. node.textContent = text;
  44827. }
  44828. function getTextContent(node) {
  44829. return node.textContent;
  44830. }
  44831. function isElement(node) {
  44832. return node.nodeType === 1;
  44833. }
  44834. function isText(node) {
  44835. return node.nodeType === 3;
  44836. }
  44837. function isComment(node) {
  44838. return node.nodeType === 8;
  44839. }
  44840. exports.htmlDomApi = {
  44841. createElement: createElement,
  44842. createElementNS: createElementNS,
  44843. createTextNode: createTextNode,
  44844. createComment: createComment,
  44845. insertBefore: insertBefore,
  44846. removeChild: removeChild,
  44847. appendChild: appendChild,
  44848. parentNode: parentNode,
  44849. nextSibling: nextSibling,
  44850. tagName: tagName,
  44851. setTextContent: setTextContent,
  44852. getTextContent: getTextContent,
  44853. isElement: isElement,
  44854. isText: isText,
  44855. isComment: isComment,
  44856. };
  44857. exports.default = exports.htmlDomApi;
  44858. },{}],3:[function(require,module,exports){
  44859. "use strict";
  44860. Object.defineProperty(exports, "__esModule", { value: true });
  44861. exports.array = Array.isArray;
  44862. function primitive(s) {
  44863. return typeof s === 'string' || typeof s === 'number';
  44864. }
  44865. exports.primitive = primitive;
  44866. },{}],4:[function(require,module,exports){
  44867. "use strict";
  44868. Object.defineProperty(exports, "__esModule", { value: true });
  44869. var vnode_1 = require("./vnode");
  44870. var is = require("./is");
  44871. var htmldomapi_1 = require("./htmldomapi");
  44872. function isUndef(s) { return s === undefined; }
  44873. function isDef(s) { return s !== undefined; }
  44874. var emptyNode = vnode_1.default('', {}, [], undefined, undefined);
  44875. function sameVnode(vnode1, vnode2) {
  44876. return vnode1.key === vnode2.key && vnode1.sel === vnode2.sel;
  44877. }
  44878. function isVnode(vnode) {
  44879. return vnode.sel !== undefined;
  44880. }
  44881. function createKeyToOldIdx(children, beginIdx, endIdx) {
  44882. var i, map = {}, key, ch;
  44883. for (i = beginIdx; i <= endIdx; ++i) {
  44884. ch = children[i];
  44885. if (ch != null) {
  44886. key = ch.key;
  44887. if (key !== undefined)
  44888. map[key] = i;
  44889. }
  44890. }
  44891. return map;
  44892. }
  44893. var hooks = ['create', 'update', 'remove', 'destroy', 'pre', 'post'];
  44894. var h_1 = require("./h");
  44895. exports.h = h_1.h;
  44896. var thunk_1 = require("./thunk");
  44897. exports.thunk = thunk_1.thunk;
  44898. function init(modules, domApi) {
  44899. var i, j, cbs = {};
  44900. var api = domApi !== undefined ? domApi : htmldomapi_1.default;
  44901. for (i = 0; i < hooks.length; ++i) {
  44902. cbs[hooks[i]] = [];
  44903. for (j = 0; j < modules.length; ++j) {
  44904. var hook = modules[j][hooks[i]];
  44905. if (hook !== undefined) {
  44906. cbs[hooks[i]].push(hook);
  44907. }
  44908. }
  44909. }
  44910. function emptyNodeAt(elm) {
  44911. var id = elm.id ? '#' + elm.id : '';
  44912. var c = elm.className ? '.' + elm.className.split(' ').join('.') : '';
  44913. return vnode_1.default(api.tagName(elm).toLowerCase() + id + c, {}, [], undefined, elm);
  44914. }
  44915. function createRmCb(childElm, listeners) {
  44916. return function rmCb() {
  44917. if (--listeners === 0) {
  44918. var parent_1 = api.parentNode(childElm);
  44919. api.removeChild(parent_1, childElm);
  44920. }
  44921. };
  44922. }
  44923. function createElm(vnode, insertedVnodeQueue) {
  44924. var i, data = vnode.data;
  44925. if (data !== undefined) {
  44926. if (isDef(i = data.hook) && isDef(i = i.init)) {
  44927. i(vnode);
  44928. data = vnode.data;
  44929. }
  44930. }
  44931. var children = vnode.children, sel = vnode.sel;
  44932. if (sel === '!') {
  44933. if (isUndef(vnode.text)) {
  44934. vnode.text = '';
  44935. }
  44936. vnode.elm = api.createComment(vnode.text);
  44937. }
  44938. else if (sel !== undefined) {
  44939. // Parse selector
  44940. var hashIdx = sel.indexOf('#');
  44941. var dotIdx = sel.indexOf('.', hashIdx);
  44942. var hash = hashIdx > 0 ? hashIdx : sel.length;
  44943. var dot = dotIdx > 0 ? dotIdx : sel.length;
  44944. var tag = hashIdx !== -1 || dotIdx !== -1 ? sel.slice(0, Math.min(hash, dot)) : sel;
  44945. var elm = vnode.elm = isDef(data) && isDef(i = data.ns) ? api.createElementNS(i, tag)
  44946. : api.createElement(tag);
  44947. if (hash < dot)
  44948. elm.setAttribute('id', sel.slice(hash + 1, dot));
  44949. if (dotIdx > 0)
  44950. elm.setAttribute('class', sel.slice(dot + 1).replace(/\./g, ' '));
  44951. for (i = 0; i < cbs.create.length; ++i)
  44952. cbs.create[i](emptyNode, vnode);
  44953. if (is.array(children)) {
  44954. for (i = 0; i < children.length; ++i) {
  44955. var ch = children[i];
  44956. if (ch != null) {
  44957. api.appendChild(elm, createElm(ch, insertedVnodeQueue));
  44958. }
  44959. }
  44960. }
  44961. else if (is.primitive(vnode.text)) {
  44962. api.appendChild(elm, api.createTextNode(vnode.text));
  44963. }
  44964. i = vnode.data.hook; // Reuse variable
  44965. if (isDef(i)) {
  44966. if (i.create)
  44967. i.create(emptyNode, vnode);
  44968. if (i.insert)
  44969. insertedVnodeQueue.push(vnode);
  44970. }
  44971. }
  44972. else {
  44973. vnode.elm = api.createTextNode(vnode.text);
  44974. }
  44975. return vnode.elm;
  44976. }
  44977. function addVnodes(parentElm, before, vnodes, startIdx, endIdx, insertedVnodeQueue) {
  44978. for (; startIdx <= endIdx; ++startIdx) {
  44979. var ch = vnodes[startIdx];
  44980. if (ch != null) {
  44981. api.insertBefore(parentElm, createElm(ch, insertedVnodeQueue), before);
  44982. }
  44983. }
  44984. }
  44985. function invokeDestroyHook(vnode) {
  44986. var i, j, data = vnode.data;
  44987. if (data !== undefined) {
  44988. if (isDef(i = data.hook) && isDef(i = i.destroy))
  44989. i(vnode);
  44990. for (i = 0; i < cbs.destroy.length; ++i)
  44991. cbs.destroy[i](vnode);
  44992. if (vnode.children !== undefined) {
  44993. for (j = 0; j < vnode.children.length; ++j) {
  44994. i = vnode.children[j];
  44995. if (i != null && typeof i !== "string") {
  44996. invokeDestroyHook(i);
  44997. }
  44998. }
  44999. }
  45000. }
  45001. }
  45002. function removeVnodes(parentElm, vnodes, startIdx, endIdx) {
  45003. for (; startIdx <= endIdx; ++startIdx) {
  45004. var i_1 = void 0, listeners = void 0, rm = void 0, ch = vnodes[startIdx];
  45005. if (ch != null) {
  45006. if (isDef(ch.sel)) {
  45007. invokeDestroyHook(ch);
  45008. listeners = cbs.remove.length + 1;
  45009. rm = createRmCb(ch.elm, listeners);
  45010. for (i_1 = 0; i_1 < cbs.remove.length; ++i_1)
  45011. cbs.remove[i_1](ch, rm);
  45012. if (isDef(i_1 = ch.data) && isDef(i_1 = i_1.hook) && isDef(i_1 = i_1.remove)) {
  45013. i_1(ch, rm);
  45014. }
  45015. else {
  45016. rm();
  45017. }
  45018. }
  45019. else {
  45020. api.removeChild(parentElm, ch.elm);
  45021. }
  45022. }
  45023. }
  45024. }
  45025. function updateChildren(parentElm, oldCh, newCh, insertedVnodeQueue) {
  45026. var oldStartIdx = 0, newStartIdx = 0;
  45027. var oldEndIdx = oldCh.length - 1;
  45028. var oldStartVnode = oldCh[0];
  45029. var oldEndVnode = oldCh[oldEndIdx];
  45030. var newEndIdx = newCh.length - 1;
  45031. var newStartVnode = newCh[0];
  45032. var newEndVnode = newCh[newEndIdx];
  45033. var oldKeyToIdx;
  45034. var idxInOld;
  45035. var elmToMove;
  45036. var before;
  45037. while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
  45038. if (oldStartVnode == null) {
  45039. oldStartVnode = oldCh[++oldStartIdx]; // Vnode might have been moved left
  45040. }
  45041. else if (oldEndVnode == null) {
  45042. oldEndVnode = oldCh[--oldEndIdx];
  45043. }
  45044. else if (newStartVnode == null) {
  45045. newStartVnode = newCh[++newStartIdx];
  45046. }
  45047. else if (newEndVnode == null) {
  45048. newEndVnode = newCh[--newEndIdx];
  45049. }
  45050. else if (sameVnode(oldStartVnode, newStartVnode)) {
  45051. patchVnode(oldStartVnode, newStartVnode, insertedVnodeQueue);
  45052. oldStartVnode = oldCh[++oldStartIdx];
  45053. newStartVnode = newCh[++newStartIdx];
  45054. }
  45055. else if (sameVnode(oldEndVnode, newEndVnode)) {
  45056. patchVnode(oldEndVnode, newEndVnode, insertedVnodeQueue);
  45057. oldEndVnode = oldCh[--oldEndIdx];
  45058. newEndVnode = newCh[--newEndIdx];
  45059. }
  45060. else if (sameVnode(oldStartVnode, newEndVnode)) {
  45061. patchVnode(oldStartVnode, newEndVnode, insertedVnodeQueue);
  45062. api.insertBefore(parentElm, oldStartVnode.elm, api.nextSibling(oldEndVnode.elm));
  45063. oldStartVnode = oldCh[++oldStartIdx];
  45064. newEndVnode = newCh[--newEndIdx];
  45065. }
  45066. else if (sameVnode(oldEndVnode, newStartVnode)) {
  45067. patchVnode(oldEndVnode, newStartVnode, insertedVnodeQueue);
  45068. api.insertBefore(parentElm, oldEndVnode.elm, oldStartVnode.elm);
  45069. oldEndVnode = oldCh[--oldEndIdx];
  45070. newStartVnode = newCh[++newStartIdx];
  45071. }
  45072. else {
  45073. if (oldKeyToIdx === undefined) {
  45074. oldKeyToIdx = createKeyToOldIdx(oldCh, oldStartIdx, oldEndIdx);
  45075. }
  45076. idxInOld = oldKeyToIdx[newStartVnode.key];
  45077. if (isUndef(idxInOld)) {
  45078. api.insertBefore(parentElm, createElm(newStartVnode, insertedVnodeQueue), oldStartVnode.elm);
  45079. newStartVnode = newCh[++newStartIdx];
  45080. }
  45081. else {
  45082. elmToMove = oldCh[idxInOld];
  45083. if (elmToMove.sel !== newStartVnode.sel) {
  45084. api.insertBefore(parentElm, createElm(newStartVnode, insertedVnodeQueue), oldStartVnode.elm);
  45085. }
  45086. else {
  45087. patchVnode(elmToMove, newStartVnode, insertedVnodeQueue);
  45088. oldCh[idxInOld] = undefined;
  45089. api.insertBefore(parentElm, elmToMove.elm, oldStartVnode.elm);
  45090. }
  45091. newStartVnode = newCh[++newStartIdx];
  45092. }
  45093. }
  45094. }
  45095. if (oldStartIdx > oldEndIdx) {
  45096. before = newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].elm;
  45097. addVnodes(parentElm, before, newCh, newStartIdx, newEndIdx, insertedVnodeQueue);
  45098. }
  45099. else if (newStartIdx > newEndIdx) {
  45100. removeVnodes(parentElm, oldCh, oldStartIdx, oldEndIdx);
  45101. }
  45102. }
  45103. function patchVnode(oldVnode, vnode, insertedVnodeQueue) {
  45104. var i, hook;
  45105. if (isDef(i = vnode.data) && isDef(hook = i.hook) && isDef(i = hook.prepatch)) {
  45106. i(oldVnode, vnode);
  45107. }
  45108. var elm = vnode.elm = oldVnode.elm;
  45109. var oldCh = oldVnode.children;
  45110. var ch = vnode.children;
  45111. if (oldVnode === vnode)
  45112. return;
  45113. if (vnode.data !== undefined) {
  45114. for (i = 0; i < cbs.update.length; ++i)
  45115. cbs.update[i](oldVnode, vnode);
  45116. i = vnode.data.hook;
  45117. if (isDef(i) && isDef(i = i.update))
  45118. i(oldVnode, vnode);
  45119. }
  45120. if (isUndef(vnode.text)) {
  45121. if (isDef(oldCh) && isDef(ch)) {
  45122. if (oldCh !== ch)
  45123. updateChildren(elm, oldCh, ch, insertedVnodeQueue);
  45124. }
  45125. else if (isDef(ch)) {
  45126. if (isDef(oldVnode.text))
  45127. api.setTextContent(elm, '');
  45128. addVnodes(elm, null, ch, 0, ch.length - 1, insertedVnodeQueue);
  45129. }
  45130. else if (isDef(oldCh)) {
  45131. removeVnodes(elm, oldCh, 0, oldCh.length - 1);
  45132. }
  45133. else if (isDef(oldVnode.text)) {
  45134. api.setTextContent(elm, '');
  45135. }
  45136. }
  45137. else if (oldVnode.text !== vnode.text) {
  45138. api.setTextContent(elm, vnode.text);
  45139. }
  45140. if (isDef(hook) && isDef(i = hook.postpatch)) {
  45141. i(oldVnode, vnode);
  45142. }
  45143. }
  45144. return function patch(oldVnode, vnode) {
  45145. var i, elm, parent;
  45146. var insertedVnodeQueue = [];
  45147. for (i = 0; i < cbs.pre.length; ++i)
  45148. cbs.pre[i]();
  45149. if (!isVnode(oldVnode)) {
  45150. oldVnode = emptyNodeAt(oldVnode);
  45151. }
  45152. if (sameVnode(oldVnode, vnode)) {
  45153. patchVnode(oldVnode, vnode, insertedVnodeQueue);
  45154. }
  45155. else {
  45156. elm = oldVnode.elm;
  45157. parent = api.parentNode(elm);
  45158. createElm(vnode, insertedVnodeQueue);
  45159. if (parent !== null) {
  45160. api.insertBefore(parent, vnode.elm, api.nextSibling(elm));
  45161. removeVnodes(parent, [oldVnode], 0, 0);
  45162. }
  45163. }
  45164. for (i = 0; i < insertedVnodeQueue.length; ++i) {
  45165. insertedVnodeQueue[i].data.hook.insert(insertedVnodeQueue[i]);
  45166. }
  45167. for (i = 0; i < cbs.post.length; ++i)
  45168. cbs.post[i]();
  45169. return vnode;
  45170. };
  45171. }
  45172. exports.init = init;
  45173. },{"./h":1,"./htmldomapi":2,"./is":3,"./thunk":5,"./vnode":6}],5:[function(require,module,exports){
  45174. "use strict";
  45175. Object.defineProperty(exports, "__esModule", { value: true });
  45176. var h_1 = require("./h");
  45177. function copyToThunk(vnode, thunk) {
  45178. thunk.elm = vnode.elm;
  45179. vnode.data.fn = thunk.data.fn;
  45180. vnode.data.args = thunk.data.args;
  45181. thunk.data = vnode.data;
  45182. thunk.children = vnode.children;
  45183. thunk.text = vnode.text;
  45184. thunk.elm = vnode.elm;
  45185. }
  45186. function init(thunk) {
  45187. var cur = thunk.data;
  45188. var vnode = cur.fn.apply(undefined, cur.args);
  45189. copyToThunk(vnode, thunk);
  45190. }
  45191. function prepatch(oldVnode, thunk) {
  45192. var i, old = oldVnode.data, cur = thunk.data;
  45193. var oldArgs = old.args, args = cur.args;
  45194. if (old.fn !== cur.fn || oldArgs.length !== args.length) {
  45195. copyToThunk(cur.fn.apply(undefined, args), thunk);
  45196. return;
  45197. }
  45198. for (i = 0; i < args.length; ++i) {
  45199. if (oldArgs[i] !== args[i]) {
  45200. copyToThunk(cur.fn.apply(undefined, args), thunk);
  45201. return;
  45202. }
  45203. }
  45204. copyToThunk(oldVnode, thunk);
  45205. }
  45206. exports.thunk = function thunk(sel, key, fn, args) {
  45207. if (args === undefined) {
  45208. args = fn;
  45209. fn = key;
  45210. key = undefined;
  45211. }
  45212. return h_1.h(sel, {
  45213. key: key,
  45214. hook: { init: init, prepatch: prepatch },
  45215. fn: fn,
  45216. args: args
  45217. });
  45218. };
  45219. exports.default = exports.thunk;
  45220. },{"./h":1}],6:[function(require,module,exports){
  45221. "use strict";
  45222. Object.defineProperty(exports, "__esModule", { value: true });
  45223. function vnode(sel, data, children, text, elm) {
  45224. var key = data === undefined ? undefined : data.key;
  45225. return { sel: sel, data: data, children: children,
  45226. text: text, elm: elm, key: key };
  45227. }
  45228. exports.vnode = vnode;
  45229. exports.default = vnode;
  45230. },{}]},{},[4])(4)
  45231. });
  45232. //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy8ucmVnaXN0cnkubnBtanMub3JnL2Jyb3dzZXItcGFjay82LjAuMi9ub2RlX21vZHVsZXMvYnJvd3Nlci1wYWNrL19wcmVsdWRlLmpzIiwiaC5qcyIsImh0bWxkb21hcGkuanMiLCJpcy5qcyIsInNuYWJiZG9tLmpzIiwidGh1bmsuanMiLCJ2bm9kZS5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtBQ0FBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FDMURBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUNqRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUNQQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUNsVEE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUM5Q0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJmaWxlIjoiZ2VuZXJhdGVkLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXNDb250ZW50IjpbIihmdW5jdGlvbiBlKHQsbixyKXtmdW5jdGlvbiBzKG8sdSl7aWYoIW5bb10pe2lmKCF0W29dKXt2YXIgYT10eXBlb2YgcmVxdWlyZT09XCJmdW5jdGlvblwiJiZyZXF1aXJlO2lmKCF1JiZhKXJldHVybiBhKG8sITApO2lmKGkpcmV0dXJuIGkobywhMCk7dmFyIGY9bmV3IEVycm9yKFwiQ2Fubm90IGZpbmQgbW9kdWxlICdcIitvK1wiJ1wiKTt0aHJvdyBmLmNvZGU9XCJNT0RVTEVfTk9UX0ZPVU5EXCIsZn12YXIgbD1uW29dPXtleHBvcnRzOnt9fTt0W29dWzBdLmNhbGwobC5leHBvcnRzLGZ1bmN0aW9uKGUpe3ZhciBuPXRbb11bMV1bZV07cmV0dXJuIHMobj9uOmUpfSxsLGwuZXhwb3J0cyxlLHQsbixyKX1yZXR1cm4gbltvXS5leHBvcnRzfXZhciBpPXR5cGVvZiByZXF1aXJlPT1cImZ1bmN0aW9uXCImJnJlcXVpcmU7Zm9yKHZhciBvPTA7bzxyLmxlbmd0aDtvKyspcyhyW29dKTtyZXR1cm4gc30pIiwiXCJ1c2Ugc3RyaWN0XCI7XG5PYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgXCJfX2VzTW9kdWxlXCIsIHsgdmFsdWU6IHRydWUgfSk7XG52YXIgdm5vZGVfMSA9IHJlcXVpcmUoXCIuL3Zub2RlXCIpO1xudmFyIGlzID0gcmVxdWlyZShcIi4vaXNcIik7XG5mdW5jdGlvbiBhZGROUyhkYXRhLCBjaGlsZHJlbiwgc2VsKSB7XG4gICAgZGF0YS5ucyA9ICdodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2Zyc7XG4gICAgaWYgKHNlbCAhPT0gJ2ZvcmVpZ25PYmplY3QnICYmIGNoaWxkcmVuICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBjaGlsZHJlbi5sZW5ndGg7ICsraSkge1xuICAgICAgICAgICAgdmFyIGNoaWxkRGF0YSA9IGNoaWxkcmVuW2ldLmRhdGE7XG4gICAgICAgICAgICBpZiAoY2hpbGREYXRhICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgICAgICBhZGROUyhjaGlsZERhdGEsIGNoaWxkcmVuW2ldLmNoaWxkcmVuLCBjaGlsZHJlbltpXS5zZWwpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxufVxuZnVuY3Rpb24gaChzZWwsIGIsIGMpIHtcbiAgICB2YXIgZGF0YSA9IHt9LCBjaGlsZHJlbiwgdGV4dCwgaTtcbiAgICBpZiAoYyAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgIGRhdGEgPSBiO1xuICAgICAgICBpZiAoaXMuYXJyYXkoYykpIHtcbiAgICAgICAgICAgIGNoaWxkcmVuID0gYztcbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmIChpcy5wcmltaXRpdmUoYykpIHtcbiAgICAgICAgICAgIHRleHQgPSBjO1xuICAgICAgICB9XG4gICAgICAgIGVsc2UgaWYgKGMgJiYgYy5zZWwpIHtcbiAgICAgICAgICAgIGNoaWxkcmVuID0gW2NdO1xuICAgICAgICB9XG4gICAgfVxuICAgIGVsc2UgaWYgKGIgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICBpZiAoaXMuYXJyYXkoYikpIHtcbiAgICAgICAgICAgIGNoaWxkcmVuID0gYjtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmIChpcy5wcmltaXRpdmUoYikpIHtcbiAgICAgICAgICAgIHRleHQgPSBiO1xuICAgICAgICB9XG4gICAgICAgIGVsc2UgaWYgKGIgJiYgYi5zZWwpIHtcbiAgICAgICAgICAgIGNoaWxkcmVuID0gW2JdO1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgZGF0YSA9IGI7XG4gICAgICAgIH1cbiAgICB9XG4gICAgaWYgKGlzLmFycmF5KGNoaWxkcmVuKSkge1xuICAgICAgICBmb3IgKGkgPSAwOyBpIDwgY2hpbGRyZW4ubGVuZ3RoOyArK2kpIHtcbiAgICAgICAgICAgIGlmIChpcy5wcmltaXRpdmUoY2hpbGRyZW5baV0pKVxuICAgICAgICAgICAgICAgIGNoaWxkcmVuW2ldID0gdm5vZGVfMS52bm9kZSh1bmRlZmluZWQsIHVuZGVmaW5lZCwgdW5kZWZpbmVkLCBjaGlsZHJlbltpXSk7XG4gICAgICAgIH1cbiAgICB9XG4gICAgaWYgKHNlbFswXSA9PT0gJ3MnICYmIHNlbFsxXSA9PT0gJ3YnICYmIHNlbFsyXSA9PT0gJ2cnICYmXG4gICAgICAgIChzZWwubGVuZ3RoID09PSAzIHx8IHNlbFszXSA9PT0gJy4nIHx8IHNlbFszXSA9PT0gJyMnKSkge1xuICAgICAgICBhZGROUyhkYXRhLCBjaGlsZHJlbiwgc2VsKTtcbiAgICB9XG4gICAgcmV0dXJuIHZub2RlXzEudm5vZGUoc2VsLCBkYXRhLCBjaGlsZHJlbiwgdGV4dCwgdW5kZWZpbmVkKTtcbn1cbmV4cG9ydHMuaCA9IGg7XG47XG5leHBvcnRzLmRlZmF1bHQgPSBoO1xuLy8jIHNvdXJjZU1hcHBpbmdVUkw9aC5qcy5tYXAiLCJcInVzZSBzdHJpY3RcIjtcbk9iamVjdC5kZWZpbmVQcm9wZXJ0eShleHBvcnRzLCBcIl9fZXNNb2R1bGVcIiwgeyB2YWx1ZTogdHJ1ZSB9KTtcbmZ1bmN0aW9uIGNyZWF0ZUVsZW1lbnQodGFnTmFtZSkge1xuICAgIHJldHVybiBkb2N1bWVudC5jcmVhdGVFbGVtZW50KHRhZ05hbWUpO1xufVxuZnVuY3Rpb24gY3JlYXRlRWxlbWVudE5TKG5hbWVzcGFjZVVSSSwgcXVhbGlmaWVkTmFtZSkge1xuICAgIHJldHVybiBkb2N1bWVudC5jcmVhdGVFbGVtZW50TlMobmFtZXNwYWNlVVJJLCBxdWFsaWZpZWROYW1lKTtcbn1cbmZ1bmN0aW9uIGNyZWF0ZVRleHROb2RlKHRleHQpIHtcbiAgICByZXR1cm4gZG9jdW1lbnQuY3JlYXRlVGV4dE5vZGUodGV4dCk7XG59XG5mdW5jdGlvbiBjcmVhdGVDb21tZW50KHRleHQpIHtcbiAgICByZXR1cm4gZG9jdW1lbnQuY3JlYXRlQ29tbWVudCh0ZXh0KTtcbn1cbmZ1bmN0aW9uIGluc2VydEJlZm9yZShwYXJlbnROb2RlLCBuZXdOb2RlLCByZWZlcmVuY2VOb2RlKSB7XG4gICAgcGFyZW50Tm9kZS5pbnNlcnRCZWZvcmUobmV3Tm9kZSwgcmVmZXJlbmNlTm9kZSk7XG59XG5mdW5jdGlvbiByZW1vdmVDaGlsZChub2RlLCBjaGlsZCkge1xuICAgIG5vZGUucmVtb3ZlQ2hpbGQoY2hpbGQpO1xufVxuZnVuY3Rpb24gYXBwZW5kQ2hpbGQobm9kZSwgY2hpbGQpIHtcbiAgICBub2RlLmFwcGVuZENoaWxkKGNoaWxkKTtcbn1cbmZ1bmN0aW9uIHBhcmVudE5vZGUobm9kZSkge1xuICAgIHJldHVybiBub2RlLnBhcmVudE5vZGU7XG59XG5mdW5jdGlvbiBuZXh0U2libGluZyhub2RlKSB7XG4gICAgcmV0dXJuIG5vZGUubmV4dFNpYmxpbmc7XG59XG5mdW5jdGlvbiB0YWdOYW1lKGVsbSkge1xuICAgIHJldHVybiBlbG0udGFnTmFtZTtcbn1cbmZ1bmN0aW9uIHNldFRleHRDb250ZW50KG5vZGUsIHRleHQpIHtcbiAgICBub2RlLnRleHRDb250ZW50ID0gdGV4dDtcbn1cbmZ1bmN0aW9uIGdldFRleHRDb250ZW50KG5vZGUpIHtcbiAgICByZXR1cm4gbm9kZS50ZXh0Q29udGVudDtcbn1cbmZ1bmN0aW9uIGlzRWxlbWVudChub2RlKSB7XG4gICAgcmV0dXJuIG5vZGUubm9kZVR5cGUgPT09IDE7XG59XG5mdW5jdGlvbiBpc1RleHQobm9kZSkge1xuICAgIHJldHVybiBub2RlLm5vZGVUeXBlID09PSAzO1xufVxuZnVuY3Rpb24gaXNDb21tZW50KG5vZGUpIHtcbiAgICByZXR1cm4gbm9kZS5ub2RlVHlwZSA9PT0gODtcbn1cbmV4cG9ydHMuaHRtbERvbUFwaSA9IHtcbiAgICBjcmVhdGVFbGVtZW50OiBjcmVhdGVFbGVtZW50LFxuICAgIGNyZWF0ZUVsZW1lbnROUzogY3JlYXRlRWxlbWVudE5TLFxuICAgIGNyZWF0ZVRleHROb2RlOiBjcmVhdGVUZXh0Tm9kZSxcbiAgICBjcmVhdGVDb21tZW50OiBjcmVhdGVDb21tZW50LFxuICAgIGluc2VydEJlZm9yZTogaW5zZXJ0QmVmb3JlLFxuICAgIHJlbW92ZUNoaWxkOiByZW1vdmVDaGlsZCxcbiAgICBhcHBlbmRDaGlsZDogYXBwZW5kQ2hpbGQsXG4gICAgcGFyZW50Tm9kZTogcGFyZW50Tm9kZSxcbiAgICBuZXh0U2libGluZzogbmV4dFNpYmxpbmcsXG4gICAgdGFnTmFtZTogdGFnTmFtZSxcbiAgICBzZXRUZXh0Q29udGVudDogc2V0VGV4dENvbnRlbnQsXG4gICAgZ2V0VGV4dENvbnRlbnQ6IGdldFRleHRDb250ZW50LFxuICAgIGlzRWxlbWVudDogaXNFbGVtZW50LFxuICAgIGlzVGV4dDogaXNUZXh0LFxuICAgIGlzQ29tbWVudDogaXNDb21tZW50LFxufTtcbmV4cG9ydHMuZGVmYXVsdCA9IGV4cG9ydHMuaHRtbERvbUFwaTtcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPWh0bWxkb21hcGkuanMubWFwIiwiXCJ1c2Ugc3RyaWN0XCI7XG5PYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgXCJfX2VzTW9kdWxlXCIsIHsgdmFsdWU6IHRydWUgfSk7XG5leHBvcnRzLmFycmF5ID0gQXJyYXkuaXNBcnJheTtcbmZ1bmN0aW9uIHByaW1pdGl2ZShzKSB7XG4gICAgcmV0dXJuIHR5cGVvZiBzID09PSAnc3RyaW5nJyB8fCB0eXBlb2YgcyA9PT0gJ251bWJlcic7XG59XG5leHBvcnRzLnByaW1pdGl2ZSA9IHByaW1pdGl2ZTtcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPWlzLmpzLm1hcCIsIlwidXNlIHN0cmljdFwiO1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsIFwiX19lc01vZHVsZVwiLCB7IHZhbHVlOiB0cnVlIH0pO1xudmFyIHZub2RlXzEgPSByZXF1aXJlKFwiLi92bm9kZVwiKTtcbnZhciBpcyA9IHJlcXVpcmUoXCIuL2lzXCIpO1xudmFyIGh0bWxkb21hcGlfMSA9IHJlcXVpcmUoXCIuL2h0bWxkb21hcGlcIik7XG5mdW5jdGlvbiBpc1VuZGVmKHMpIHsgcmV0dXJuIHMgPT09IHVuZGVmaW5lZDsgfVxuZnVuY3Rpb24gaXNEZWYocykgeyByZXR1cm4gcyAhPT0gdW5kZWZpbmVkOyB9XG52YXIgZW1wdHlOb2RlID0gdm5vZGVfMS5kZWZhdWx0KCcnLCB7fSwgW10sIHVuZGVmaW5lZCwgdW5kZWZpbmVkKTtcbmZ1bmN0aW9uIHNhbWVWbm9kZSh2bm9kZTEsIHZub2RlMikge1xuICAgIHJldHVybiB2bm9kZTEua2V5ID09PSB2bm9kZTIua2V5ICYmIHZub2RlMS5zZWwgPT09IHZub2RlMi5zZWw7XG59XG5mdW5jdGlvbiBpc1Zub2RlKHZub2RlKSB7XG4gICAgcmV0dXJuIHZub2RlLnNlbCAhPT0gdW5kZWZpbmVkO1xufVxuZnVuY3Rpb24gY3JlYXRlS2V5VG9PbGRJZHgoY2hpbGRyZW4sIGJlZ2luSWR4LCBlbmRJZHgpIHtcbiAgICB2YXIgaSwgbWFwID0ge30sIGtleSwgY2g7XG4gICAgZm9yIChpID0gYmVnaW5JZHg7IGkgPD0gZW5kSWR4OyArK2kpIHtcbiAgICAgICAgY2ggPSBjaGlsZHJlbltpXTtcbiAgICAgICAgaWYgKGNoICE9IG51bGwpIHtcbiAgICAgICAgICAgIGtleSA9IGNoLmtleTtcbiAgICAgICAgICAgIGlmIChrZXkgIT09IHVuZGVmaW5lZClcbiAgICAgICAgICAgICAgICBtYXBba2V5XSA9IGk7XG4gICAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIG1hcDtcbn1cbnZhciBob29rcyA9IFsnY3JlYXRlJywgJ3VwZGF0ZScsICdyZW1vdmUnLCAnZGVzdHJveScsICdwcmUnLCAncG9zdCddO1xudmFyIGhfMSA9IHJlcXVpcmUoXCIuL2hcIik7XG5leHBvcnRzLmggPSBoXzEuaDtcbnZhciB0aHVua18xID0gcmVxdWlyZShcIi4vdGh1bmtcIik7XG5leHBvcnRzLnRodW5rID0gdGh1bmtfMS50aHVuaztcbmZ1bmN0aW9uIGluaXQobW9kdWxlcywgZG9tQXBpKSB7XG4gICAgdmFyIGksIGosIGNicyA9IHt9O1xuICAgIHZhciBhcGkgPSBkb21BcGkgIT09IHVuZGVmaW5lZCA/IGRvbUFwaSA6IGh0bWxkb21hcGlfMS5kZWZhdWx0O1xuICAgIGZvciAoaSA9IDA7IGkgPCBob29rcy5sZW5ndGg7ICsraSkge1xuICAgICAgICBjYnNbaG9va3NbaV1dID0gW107XG4gICAgICAgIGZvciAoaiA9IDA7IGogPCBtb2R1bGVzLmxlbmd0aDsgKytqKSB7XG4gICAgICAgICAgICB2YXIgaG9vayA9IG1vZHVsZXNbal1baG9va3NbaV1dO1xuICAgICAgICAgICAgaWYgKGhvb2sgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgIGNic1tob29rc1tpXV0ucHVzaChob29rKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cbiAgICBmdW5jdGlvbiBlbXB0eU5vZGVBdChlbG0pIHtcbiAgICAgICAgdmFyIGlkID0gZWxtLmlkID8gJyMnICsgZWxtLmlkIDogJyc7XG4gICAgICAgIHZhciBjID0gZWxtLmNsYXNzTmFtZSA/ICcuJyArIGVsbS5jbGFzc05hbWUuc3BsaXQoJyAnKS5qb2luKCcuJykgOiAnJztcbiAgICAgICAgcmV0dXJuIHZub2RlXzEuZGVmYXVsdChhcGkudGFnTmFtZShlbG0pLnRvTG93ZXJDYXNlKCkgKyBpZCArIGMsIHt9LCBbXSwgdW5kZWZpbmVkLCBlbG0pO1xuICAgIH1cbiAgICBmdW5jdGlvbiBjcmVhdGVSbUNiKGNoaWxkRWxtLCBsaXN0ZW5lcnMpIHtcbiAgICAgICAgcmV0dXJuIGZ1bmN0aW9uIHJtQ2IoKSB7XG4gICAgICAgICAgICBpZiAoLS1saXN0ZW5lcnMgPT09IDApIHtcbiAgICAgICAgICAgICAgICB2YXIgcGFyZW50XzEgPSBhcGkucGFyZW50Tm9kZShjaGlsZEVsbSk7XG4gICAgICAgICAgICAgICAgYXBpLnJlbW92ZUNoaWxkKHBhcmVudF8xLCBjaGlsZEVsbSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG4gICAgfVxuICAgIGZ1bmN0aW9uIGNyZWF0ZUVsbSh2bm9kZSwgaW5zZXJ0ZWRWbm9kZVF1ZXVlKSB7XG4gICAgICAgIHZhciBpLCBkYXRhID0gdm5vZGUuZGF0YTtcbiAgICAgICAgaWYgKGRhdGEgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgaWYgKGlzRGVmKGkgPSBkYXRhLmhvb2spICYmIGlzRGVmKGkgPSBpLmluaXQpKSB7XG4gICAgICAgICAgICAgICAgaSh2bm9kZSk7XG4gICAgICAgICAgICAgICAgZGF0YSA9IHZub2RlLmRhdGE7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgdmFyIGNoaWxkcmVuID0gdm5vZGUuY2hpbGRyZW4sIHNlbCA9IHZub2RlLnNlbDtcbiAgICAgICAgaWYgKHNlbCA9PT0gJyEnKSB7XG4gICAgICAgICAgICBpZiAoaXNVbmRlZih2bm9kZS50ZXh0KSkge1xuICAgICAgICAgICAgICAgIHZub2RlLnRleHQgPSAnJztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHZub2RlLmVsbSA9IGFwaS5jcmVhdGVDb21tZW50KHZub2RlLnRleHQpO1xuICAgICAgICB9XG4gICAgICAgIGVsc2UgaWYgKHNlbCAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAvLyBQYXJzZSBzZWxlY3RvclxuICAgICAgICAgICAgdmFyIGhhc2hJZHggPSBzZWwuaW5kZXhPZignIycpO1xuICAgICAgICAgICAgdmFyIGRvdElkeCA9IHNlbC5pbmRleE9mKCcuJywgaGFzaElkeCk7XG4gICAgICAgICAgICB2YXIgaGFzaCA9IGhhc2hJZHggPiAwID8gaGFzaElkeCA6IHNlbC5sZW5ndGg7XG4gICAgICAgICAgICB2YXIgZG90ID0gZG90SWR4ID4gMCA/IGRvdElkeCA6IHNlbC5sZW5ndGg7XG4gICAgICAgICAgICB2YXIgdGFnID0gaGFzaElkeCAhPT0gLTEgfHwgZG90SWR4ICE9PSAtMSA/IHNlbC5zbGljZSgwLCBNYXRoLm1pbihoYXNoLCBkb3QpKSA6IHNlbDtcbiAgICAgICAgICAgIHZhciBlbG0gPSB2bm9kZS5lbG0gPSBpc0RlZihkYXRhKSAmJiBpc0RlZihpID0gZGF0YS5ucykgPyBhcGkuY3JlYXRlRWxlbWVudE5TKGksIHRhZylcbiAgICAgICAgICAgICAgICA6IGFwaS5jcmVhdGVFbGVtZW50KHRhZyk7XG4gICAgICAgICAgICBpZiAoaGFzaCA8IGRvdClcbiAgICAgICAgICAgICAgICBlbG0uc2V0QXR0cmlidXRlKCdpZCcsIHNlbC5zbGljZShoYXNoICsgMSwgZG90KSk7XG4gICAgICAgICAgICBpZiAoZG90SWR4ID4gMClcbiAgICAgICAgICAgICAgICBlbG0uc2V0QXR0cmlidXRlKCdjbGFzcycsIHNlbC5zbGljZShkb3QgKyAxKS5yZXBsYWNlKC9cXC4vZywgJyAnKSk7XG4gICAgICAgICAgICBmb3IgKGkgPSAwOyBpIDwgY2JzLmNyZWF0ZS5sZW5ndGg7ICsraSlcbiAgICAgICAgICAgICAgICBjYnMuY3JlYXRlW2ldKGVtcHR5Tm9kZSwgdm5vZGUpO1xuICAgICAgICAgICAgaWYgKGlzLmFycmF5KGNoaWxkcmVuKSkge1xuICAgICAgICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCBjaGlsZHJlbi5sZW5ndGg7ICsraSkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgY2ggPSBjaGlsZHJlbltpXTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGNoICE9IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGFwaS5hcHBlbmRDaGlsZChlbG0sIGNyZWF0ZUVsbShjaCwgaW5zZXJ0ZWRWbm9kZVF1ZXVlKSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIGlmIChpcy5wcmltaXRpdmUodm5vZGUudGV4dCkpIHtcbiAgICAgICAgICAgICAgICBhcGkuYXBwZW5kQ2hpbGQoZWxtLCBhcGkuY3JlYXRlVGV4dE5vZGUodm5vZGUudGV4dCkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaSA9IHZub2RlLmRhdGEuaG9vazsgLy8gUmV1c2UgdmFyaWFibGVcbiAgICAgICAgICAgIGlmIChpc0RlZihpKSkge1xuICAgICAgICAgICAgICAgIGlmIChpLmNyZWF0ZSlcbiAgICAgICAgICAgICAgICAgICAgaS5jcmVhdGUoZW1wdHlOb2RlLCB2bm9kZSk7XG4gICAgICAgICAgICAgICAgaWYgKGkuaW5zZXJ0KVxuICAgICAgICAgICAgICAgICAgICBpbnNlcnRlZFZub2RlUXVldWUucHVzaCh2bm9kZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICB2bm9kZS5lbG0gPSBhcGkuY3JlYXRlVGV4dE5vZGUodm5vZGUudGV4dCk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHZub2RlLmVsbTtcbiAgICB9XG4gICAgZnVuY3Rpb24gYWRkVm5vZGVzKHBhcmVudEVsbSwgYmVmb3JlLCB2bm9kZXMsIHN0YXJ0SWR4LCBlbmRJZHgsIGluc2VydGVkVm5vZGVRdWV1ZSkge1xuICAgICAgICBmb3IgKDsgc3RhcnRJZHggPD0gZW5kSWR4OyArK3N0YXJ0SWR4KSB7XG4gICAgICAgICAgICB2YXIgY2ggPSB2bm9kZXNbc3RhcnRJZHhdO1xuICAgICAgICAgICAgaWYgKGNoICE9IG51bGwpIHtcbiAgICAgICAgICAgICAgICBhcGkuaW5zZXJ0QmVmb3JlKHBhcmVudEVsbSwgY3JlYXRlRWxtKGNoLCBpbnNlcnRlZFZub2RlUXVldWUpLCBiZWZvcmUpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuICAgIGZ1bmN0aW9uIGludm9rZURlc3Ryb3lIb29rKHZub2RlKSB7XG4gICAgICAgIHZhciBpLCBqLCBkYXRhID0gdm5vZGUuZGF0YTtcbiAgICAgICAgaWYgKGRhdGEgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgaWYgKGlzRGVmKGkgPSBkYXRhLmhvb2spICYmIGlzRGVmKGkgPSBpLmRlc3Ryb3kpKVxuICAgICAgICAgICAgICAgIGkodm5vZGUpO1xuICAgICAgICAgICAgZm9yIChpID0gMDsgaSA8IGNicy5kZXN0cm95Lmxlbmd0aDsgKytpKVxuICAgICAgICAgICAgICAgIGNicy5kZXN0cm95W2ldKHZub2RlKTtcbiAgICAgICAgICAgIGlmICh2bm9kZS5jaGlsZHJlbiAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgZm9yIChqID0gMDsgaiA8IHZub2RlLmNoaWxkcmVuLmxlbmd0aDsgKytqKSB7XG4gICAgICAgICAgICAgICAgICAgIGkgPSB2bm9kZS5jaGlsZHJlbltqXTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGkgIT0gbnVsbCAmJiB0eXBlb2YgaSAhPT0gXCJzdHJpbmdcIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgaW52b2tlRGVzdHJveUhvb2soaSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG4gICAgZnVuY3Rpb24gcmVtb3ZlVm5vZGVzKHBhcmVudEVsbSwgdm5vZGVzLCBzdGFydElkeCwgZW5kSWR4KSB7XG4gICAgICAgIGZvciAoOyBzdGFydElkeCA8PSBlbmRJZHg7ICsrc3RhcnRJZHgpIHtcbiAgICAgICAgICAgIHZhciBpXzEgPSB2b2lkIDAsIGxpc3RlbmVycyA9IHZvaWQgMCwgcm0gPSB2b2lkIDAsIGNoID0gdm5vZGVzW3N0YXJ0SWR4XTtcbiAgICAgICAgICAgIGlmIChjaCAhPSBudWxsKSB7XG4gICAgICAgICAgICAgICAgaWYgKGlzRGVmKGNoLnNlbCkpIHtcbiAgICAgICAgICAgICAgICAgICAgaW52b2tlRGVzdHJveUhvb2soY2gpO1xuICAgICAgICAgICAgICAgICAgICBsaXN0ZW5lcnMgPSBjYnMucmVtb3ZlLmxlbmd0aCArIDE7XG4gICAgICAgICAgICAgICAgICAgIHJtID0gY3JlYXRlUm1DYihjaC5lbG0sIGxpc3RlbmVycyk7XG4gICAgICAgICAgICAgICAgICAgIGZvciAoaV8xID0gMDsgaV8xIDwgY2JzLnJlbW92ZS5sZW5ndGg7ICsraV8xKVxuICAgICAgICAgICAgICAgICAgICAgICAgY2JzLnJlbW92ZVtpXzFdKGNoLCBybSk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChpc0RlZihpXzEgPSBjaC5kYXRhKSAmJiBpc0RlZihpXzEgPSBpXzEuaG9vaykgJiYgaXNEZWYoaV8xID0gaV8xLnJlbW92ZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlfMShjaCwgcm0pO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgcm0oKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgYXBpLnJlbW92ZUNoaWxkKHBhcmVudEVsbSwgY2guZWxtKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG4gICAgZnVuY3Rpb24gdXBkYXRlQ2hpbGRyZW4ocGFyZW50RWxtLCBvbGRDaCwgbmV3Q2gsIGluc2VydGVkVm5vZGVRdWV1ZSkge1xuICAgICAgICB2YXIgb2xkU3RhcnRJZHggPSAwLCBuZXdTdGFydElkeCA9IDA7XG4gICAgICAgIHZhciBvbGRFbmRJZHggPSBvbGRDaC5sZW5ndGggLSAxO1xuICAgICAgICB2YXIgb2xkU3RhcnRWbm9kZSA9IG9sZENoWzBdO1xuICAgICAgICB2YXIgb2xkRW5kVm5vZGUgPSBvbGRDaFtvbGRFbmRJZHhdO1xuICAgICAgICB2YXIgbmV3RW5kSWR4ID0gbmV3Q2gubGVuZ3RoIC0gMTtcbiAgICAgICAgdmFyIG5ld1N0YXJ0Vm5vZGUgPSBuZXdDaFswXTtcbiAgICAgICAgdmFyIG5ld0VuZFZub2RlID0gbmV3Q2hbbmV3RW5kSWR4XTtcbiAgICAgICAgdmFyIG9sZEtleVRvSWR4O1xuICAgICAgICB2YXIgaWR4SW5PbGQ7XG4gICAgICAgIHZhciBlbG1Ub01vdmU7XG4gICAgICAgIHZhciBiZWZvcmU7XG4gICAgICAgIHdoaWxlIChvbGRTdGFydElkeCA8PSBvbGRFbmRJZHggJiYgbmV3U3RhcnRJZHggPD0gbmV3RW5kSWR4KSB7XG4gICAgICAgICAgICBpZiAob2xkU3RhcnRWbm9kZSA9PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgb2xkU3RhcnRWbm9kZSA9IG9sZENoWysrb2xkU3RhcnRJZHhdOyAvLyBWbm9kZSBtaWdodCBoYXZlIGJlZW4gbW92ZWQgbGVmdFxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSBpZiAob2xkRW5kVm5vZGUgPT0gbnVsbCkge1xuICAgICAgICAgICAgICAgIG9sZEVuZFZub2RlID0gb2xkQ2hbLS1vbGRFbmRJZHhdO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSBpZiAobmV3U3RhcnRWbm9kZSA9PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgbmV3U3RhcnRWbm9kZSA9IG5ld0NoWysrbmV3U3RhcnRJZHhdO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSBpZiAobmV3RW5kVm5vZGUgPT0gbnVsbCkge1xuICAgICAgICAgICAgICAgIG5ld0VuZFZub2RlID0gbmV3Q2hbLS1uZXdFbmRJZHhdO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSBpZiAoc2FtZVZub2RlKG9sZFN0YXJ0Vm5vZGUsIG5ld1N0YXJ0Vm5vZGUpKSB7XG4gICAgICAgICAgICAgICAgcGF0Y2hWbm9kZShvbGRTdGFydFZub2RlLCBuZXdTdGFydFZub2RlLCBpbnNlcnRlZFZub2RlUXVldWUpO1xuICAgICAgICAgICAgICAgIG9sZFN0YXJ0Vm5vZGUgPSBvbGRDaFsrK29sZFN0YXJ0SWR4XTtcbiAgICAgICAgICAgICAgICBuZXdTdGFydFZub2RlID0gbmV3Q2hbKytuZXdTdGFydElkeF07XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIGlmIChzYW1lVm5vZGUob2xkRW5kVm5vZGUsIG5ld0VuZFZub2RlKSkge1xuICAgICAgICAgICAgICAgIHBhdGNoVm5vZGUob2xkRW5kVm5vZGUsIG5ld0VuZFZub2RlLCBpbnNlcnRlZFZub2RlUXVldWUpO1xuICAgICAgICAgICAgICAgIG9sZEVuZFZub2RlID0gb2xkQ2hbLS1vbGRFbmRJZHhdO1xuICAgICAgICAgICAgICAgIG5ld0VuZFZub2RlID0gbmV3Q2hbLS1uZXdFbmRJZHhdO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSBpZiAoc2FtZVZub2RlKG9sZFN0YXJ0Vm5vZGUsIG5ld0VuZFZub2RlKSkge1xuICAgICAgICAgICAgICAgIHBhdGNoVm5vZGUob2xkU3RhcnRWbm9kZSwgbmV3RW5kVm5vZGUsIGluc2VydGVkVm5vZGVRdWV1ZSk7XG4gICAgICAgICAgICAgICAgYXBpLmluc2VydEJlZm9yZShwYXJlbnRFbG0sIG9sZFN0YXJ0Vm5vZGUuZWxtLCBhcGkubmV4dFNpYmxpbmcob2xkRW5kVm5vZGUuZWxtKSk7XG4gICAgICAgICAgICAgICAgb2xkU3RhcnRWbm9kZSA9IG9sZENoWysrb2xkU3RhcnRJZHhdO1xuICAgICAgICAgICAgICAgIG5ld0VuZFZub2RlID0gbmV3Q2hbLS1uZXdFbmRJZHhdO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSBpZiAoc2FtZVZub2RlKG9sZEVuZFZub2RlLCBuZXdTdGFydFZub2RlKSkge1xuICAgICAgICAgICAgICAgIHBhdGNoVm5vZGUob2xkRW5kVm5vZGUsIG5ld1N0YXJ0Vm5vZGUsIGluc2VydGVkVm5vZGVRdWV1ZSk7XG4gICAgICAgICAgICAgICAgYXBpLmluc2VydEJlZm9yZShwYXJlbnRFbG0sIG9sZEVuZFZub2RlLmVsbSwgb2xkU3RhcnRWbm9kZS5lbG0pO1xuICAgICAgICAgICAgICAgIG9sZEVuZFZub2RlID0gb2xkQ2hbLS1vbGRFbmRJZHhdO1xuICAgICAgICAgICAgICAgIG5ld1N0YXJ0Vm5vZGUgPSBuZXdDaFsrK25ld1N0YXJ0SWR4XTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIGlmIChvbGRLZXlUb0lkeCA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgICAgIG9sZEtleVRvSWR4ID0gY3JlYXRlS2V5VG9PbGRJZHgob2xkQ2gsIG9sZFN0YXJ0SWR4LCBvbGRFbmRJZHgpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZHhJbk9sZCA9IG9sZEtleVRvSWR4W25ld1N0YXJ0Vm5vZGUua2V5XTtcbiAgICAgICAgICAgICAgICBpZiAoaXNVbmRlZihpZHhJbk9sZCkpIHtcbiAgICAgICAgICAgICAgICAgICAgYXBpLmluc2VydEJlZm9yZShwYXJlbnRFbG0sIGNyZWF0ZUVsbShuZXdTdGFydFZub2RlLCBpbnNlcnRlZFZub2RlUXVldWUpLCBvbGRTdGFydFZub2RlLmVsbSk7XG4gICAgICAgICAgICAgICAgICAgIG5ld1N0YXJ0Vm5vZGUgPSBuZXdDaFsrK25ld1N0YXJ0SWR4XTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGVsbVRvTW92ZSA9IG9sZENoW2lkeEluT2xkXTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGVsbVRvTW92ZS5zZWwgIT09IG5ld1N0YXJ0Vm5vZGUuc2VsKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBhcGkuaW5zZXJ0QmVmb3JlKHBhcmVudEVsbSwgY3JlYXRlRWxtKG5ld1N0YXJ0Vm5vZGUsIGluc2VydGVkVm5vZGVRdWV1ZSksIG9sZFN0YXJ0Vm5vZGUuZWxtKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhdGNoVm5vZGUoZWxtVG9Nb3ZlLCBuZXdTdGFydFZub2RlLCBpbnNlcnRlZFZub2RlUXVldWUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgb2xkQ2hbaWR4SW5PbGRdID0gdW5kZWZpbmVkO1xuICAgICAgICAgICAgICAgICAgICAgICAgYXBpLmluc2VydEJlZm9yZShwYXJlbnRFbG0sIGVsbVRvTW92ZS5lbG0sIG9sZFN0YXJ0Vm5vZGUuZWxtKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBuZXdTdGFydFZub2RlID0gbmV3Q2hbKytuZXdTdGFydElkeF07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGlmIChvbGRTdGFydElkeCA+IG9sZEVuZElkeCkge1xuICAgICAgICAgICAgYmVmb3JlID0gbmV3Q2hbbmV3RW5kSWR4ICsgMV0gPT0gbnVsbCA/IG51bGwgOiBuZXdDaFtuZXdFbmRJZHggKyAxXS5lbG07XG4gICAgICAgICAgICBhZGRWbm9kZXMocGFyZW50RWxtLCBiZWZvcmUsIG5ld0NoLCBuZXdTdGFydElkeCwgbmV3RW5kSWR4LCBpbnNlcnRlZFZub2RlUXVldWUpO1xuICAgICAgICB9XG4gICAgICAgIGVsc2UgaWYgKG5ld1N0YXJ0SWR4ID4gbmV3RW5kSWR4KSB7XG4gICAgICAgICAgICByZW1vdmVWbm9kZXMocGFyZW50RWxtLCBvbGRDaCwgb2xkU3RhcnRJZHgsIG9sZEVuZElkeCk7XG4gICAgICAgIH1cbiAgICB9XG4gICAgZnVuY3Rpb24gcGF0Y2hWbm9kZShvbGRWbm9kZSwgdm5vZGUsIGluc2VydGVkVm5vZGVRdWV1ZSkge1xuICAgICAgICB2YXIgaSwgaG9vaztcbiAgICAgICAgaWYgKGlzRGVmKGkgPSB2bm9kZS5kYXRhKSAmJiBpc0RlZihob29rID0gaS5ob29rKSAmJiBpc0RlZihpID0gaG9vay5wcmVwYXRjaCkpIHtcbiAgICAgICAgICAgIGkob2xkVm5vZGUsIHZub2RlKTtcbiAgICAgICAgfVxuICAgICAgICB2YXIgZWxtID0gdm5vZGUuZWxtID0gb2xkVm5vZGUuZWxtO1xuICAgICAgICB2YXIgb2xkQ2ggPSBvbGRWbm9kZS5jaGlsZHJlbjtcbiAgICAgICAgdmFyIGNoID0gdm5vZGUuY2hpbGRyZW47XG4gICAgICAgIGlmIChvbGRWbm9kZSA9PT0gdm5vZGUpXG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIGlmICh2bm9kZS5kYXRhICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCBjYnMudXBkYXRlLmxlbmd0aDsgKytpKVxuICAgICAgICAgICAgICAgIGNicy51cGRhdGVbaV0ob2xkVm5vZGUsIHZub2RlKTtcbiAgICAgICAgICAgIGkgPSB2bm9kZS5kYXRhLmhvb2s7XG4gICAgICAgICAgICBpZiAoaXNEZWYoaSkgJiYgaXNEZWYoaSA9IGkudXBkYXRlKSlcbiAgICAgICAgICAgICAgICBpKG9sZFZub2RlLCB2bm9kZSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGlzVW5kZWYodm5vZGUudGV4dCkpIHtcbiAgICAgICAgICAgIGlmIChpc0RlZihvbGRDaCkgJiYgaXNEZWYoY2gpKSB7XG4gICAgICAgICAgICAgICAgaWYgKG9sZENoICE9PSBjaClcbiAgICAgICAgICAgICAgICAgICAgdXBkYXRlQ2hpbGRyZW4oZWxtLCBvbGRDaCwgY2gsIGluc2VydGVkVm5vZGVRdWV1ZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIGlmIChpc0RlZihjaCkpIHtcbiAgICAgICAgICAgICAgICBpZiAoaXNEZWYob2xkVm5vZGUudGV4dCkpXG4gICAgICAgICAgICAgICAgICAgIGFwaS5zZXRUZXh0Q29udGVudChlbG0sICcnKTtcbiAgICAgICAgICAgICAgICBhZGRWbm9kZXMoZWxtLCBudWxsLCBjaCwgMCwgY2gubGVuZ3RoIC0gMSwgaW5zZXJ0ZWRWbm9kZVF1ZXVlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2UgaWYgKGlzRGVmKG9sZENoKSkge1xuICAgICAgICAgICAgICAgIHJlbW92ZVZub2RlcyhlbG0sIG9sZENoLCAwLCBvbGRDaC5sZW5ndGggLSAxKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2UgaWYgKGlzRGVmKG9sZFZub2RlLnRleHQpKSB7XG4gICAgICAgICAgICAgICAgYXBpLnNldFRleHRDb250ZW50KGVsbSwgJycpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGVsc2UgaWYgKG9sZFZub2RlLnRleHQgIT09IHZub2RlLnRleHQpIHtcbiAgICAgICAgICAgIGFwaS5zZXRUZXh0Q29udGVudChlbG0sIHZub2RlLnRleHQpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChpc0RlZihob29rKSAmJiBpc0RlZihpID0gaG9vay5wb3N0cGF0Y2gpKSB7XG4gICAgICAgICAgICBpKG9sZFZub2RlLCB2bm9kZSk7XG4gICAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIGZ1bmN0aW9uIHBhdGNoKG9sZFZub2RlLCB2bm9kZSkge1xuICAgICAgICB2YXIgaSwgZWxtLCBwYXJlbnQ7XG4gICAgICAgIHZhciBpbnNlcnRlZFZub2RlUXVldWUgPSBbXTtcbiAgICAgICAgZm9yIChpID0gMDsgaSA8IGNicy5wcmUubGVuZ3RoOyArK2kpXG4gICAgICAgICAgICBjYnMucHJlW2ldKCk7XG4gICAgICAgIGlmICghaXNWbm9kZShvbGRWbm9kZSkpIHtcbiAgICAgICAgICAgIG9sZFZub2RlID0gZW1wdHlOb2RlQXQob2xkVm5vZGUpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChzYW1lVm5vZGUob2xkVm5vZGUsIHZub2RlKSkge1xuICAgICAgICAgICAgcGF0Y2hWbm9kZShvbGRWbm9kZSwgdm5vZGUsIGluc2VydGVkVm5vZGVRdWV1ZSk7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICBlbG0gPSBvbGRWbm9kZS5lbG07XG4gICAgICAgICAgICBwYXJlbnQgPSBhcGkucGFyZW50Tm9kZShlbG0pO1xuICAgICAgICAgICAgY3JlYXRlRWxtKHZub2RlLCBpbnNlcnRlZFZub2RlUXVldWUpO1xuICAgICAgICAgICAgaWYgKHBhcmVudCAhPT0gbnVsbCkge1xuICAgICAgICAgICAgICAgIGFwaS5pbnNlcnRCZWZvcmUocGFyZW50LCB2bm9kZS5lbG0sIGFwaS5uZXh0U2libGluZyhlbG0pKTtcbiAgICAgICAgICAgICAgICByZW1vdmVWbm9kZXMocGFyZW50LCBbb2xkVm5vZGVdLCAwLCAwKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBmb3IgKGkgPSAwOyBpIDwgaW5zZXJ0ZWRWbm9kZVF1ZXVlLmxlbmd0aDsgKytpKSB7XG4gICAgICAgICAgICBpbnNlcnRlZFZub2RlUXVldWVbaV0uZGF0YS5ob29rLmluc2VydChpbnNlcnRlZFZub2RlUXVldWVbaV0pO1xuICAgICAgICB9XG4gICAgICAgIGZvciAoaSA9IDA7IGkgPCBjYnMucG9zdC5sZW5ndGg7ICsraSlcbiAgICAgICAgICAgIGNicy5wb3N0W2ldKCk7XG4gICAgICAgIHJldHVybiB2bm9kZTtcbiAgICB9O1xufVxuZXhwb3J0cy5pbml0ID0gaW5pdDtcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPXNuYWJiZG9tLmpzLm1hcCIsIlwidXNlIHN0cmljdFwiO1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsIFwiX19lc01vZHVsZVwiLCB7IHZhbHVlOiB0cnVlIH0pO1xudmFyIGhfMSA9IHJlcXVpcmUoXCIuL2hcIik7XG5mdW5jdGlvbiBjb3B5VG9UaHVuayh2bm9kZSwgdGh1bmspIHtcbiAgICB0aHVuay5lbG0gPSB2bm9kZS5lbG07XG4gICAgdm5vZGUuZGF0YS5mbiA9IHRodW5rLmRhdGEuZm47XG4gICAgdm5vZGUuZGF0YS5hcmdzID0gdGh1bmsuZGF0YS5hcmdzO1xuICAgIHRodW5rLmRhdGEgPSB2bm9kZS5kYXRhO1xuICAgIHRodW5rLmNoaWxkcmVuID0gdm5vZGUuY2hpbGRyZW47XG4gICAgdGh1bmsudGV4dCA9IHZub2RlLnRleHQ7XG4gICAgdGh1bmsuZWxtID0gdm5vZGUuZWxtO1xufVxuZnVuY3Rpb24gaW5pdCh0aHVuaykge1xuICAgIHZhciBjdXIgPSB0aHVuay5kYXRhO1xuICAgIHZhciB2bm9kZSA9IGN1ci5mbi5hcHBseSh1bmRlZmluZWQsIGN1ci5hcmdzKTtcbiAgICBjb3B5VG9UaHVuayh2bm9kZSwgdGh1bmspO1xufVxuZnVuY3Rpb24gcHJlcGF0Y2gob2xkVm5vZGUsIHRodW5rKSB7XG4gICAgdmFyIGksIG9sZCA9IG9sZFZub2RlLmRhdGEsIGN1ciA9IHRodW5rLmRhdGE7XG4gICAgdmFyIG9sZEFyZ3MgPSBvbGQuYXJncywgYXJncyA9IGN1ci5hcmdzO1xuICAgIGlmIChvbGQuZm4gIT09IGN1ci5mbiB8fCBvbGRBcmdzLmxlbmd0aCAhPT0gYXJncy5sZW5ndGgpIHtcbiAgICAgICAgY29weVRvVGh1bmsoY3VyLmZuLmFwcGx5KHVuZGVmaW5lZCwgYXJncyksIHRodW5rKTtcbiAgICAgICAgcmV0dXJuO1xuICAgIH1cbiAgICBmb3IgKGkgPSAwOyBpIDwgYXJncy5sZW5ndGg7ICsraSkge1xuICAgICAgICBpZiAob2xkQXJnc1tpXSAhPT0gYXJnc1tpXSkge1xuICAgICAgICAgICAgY29weVRvVGh1bmsoY3VyLmZuLmFwcGx5KHVuZGVmaW5lZCwgYXJncyksIHRodW5rKTtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgIH1cbiAgICBjb3B5VG9UaHVuayhvbGRWbm9kZSwgdGh1bmspO1xufVxuZXhwb3J0cy50aHVuayA9IGZ1bmN0aW9uIHRodW5rKHNlbCwga2V5LCBmbiwgYXJncykge1xuICAgIGlmIChhcmdzID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgYXJncyA9IGZuO1xuICAgICAgICBmbiA9IGtleTtcbiAgICAgICAga2V5ID0gdW5kZWZpbmVkO1xuICAgIH1cbiAgICByZXR1cm4gaF8xLmgoc2VsLCB7XG4gICAgICAgIGtleToga2V5LFxuICAgICAgICBob29rOiB7IGluaXQ6IGluaXQsIHByZXBhdGNoOiBwcmVwYXRjaCB9LFxuICAgICAgICBmbjogZm4sXG4gICAgICAgIGFyZ3M6IGFyZ3NcbiAgICB9KTtcbn07XG5leHBvcnRzLmRlZmF1bHQgPSBleHBvcnRzLnRodW5rO1xuLy8jIHNvdXJjZU1hcHBpbmdVUkw9dGh1bmsuanMubWFwIiwiXCJ1c2Ugc3RyaWN0XCI7XG5PYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgXCJfX2VzTW9kdWxlXCIsIHsgdmFsdWU6IHRydWUgfSk7XG5mdW5jdGlvbiB2bm9kZShzZWwsIGRhdGEsIGNoaWxkcmVuLCB0ZXh0LCBlbG0pIHtcbiAgICB2YXIga2V5ID0gZGF0YSA9PT0gdW5kZWZpbmVkID8gdW5kZWZpbmVkIDogZGF0YS5rZXk7XG4gICAgcmV0dXJuIHsgc2VsOiBzZWwsIGRhdGE6IGRhdGEsIGNoaWxkcmVuOiBjaGlsZHJlbixcbiAgICAgICAgdGV4dDogdGV4dCwgZWxtOiBlbG0sIGtleToga2V5IH07XG59XG5leHBvcnRzLnZub2RlID0gdm5vZGU7XG5leHBvcnRzLmRlZmF1bHQgPSB2bm9kZTtcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPXZub2RlLmpzLm1hcCJdfQ==
  45233. ;
  45234. (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define('snabbdom-attributes',[],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.snabbdom_attributes = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
  45235. "use strict";
  45236. Object.defineProperty(exports, "__esModule", { value: true });
  45237. var booleanAttrs = ["allowfullscreen", "async", "autofocus", "autoplay", "checked", "compact", "controls", "declare",
  45238. "default", "defaultchecked", "defaultmuted", "defaultselected", "defer", "disabled", "draggable",
  45239. "enabled", "formnovalidate", "hidden", "indeterminate", "inert", "ismap", "itemscope", "loop", "multiple",
  45240. "muted", "nohref", "noresize", "noshade", "novalidate", "nowrap", "open", "pauseonexit", "readonly",
  45241. "required", "reversed", "scoped", "seamless", "selected", "sortable", "spellcheck", "translate",
  45242. "truespeed", "typemustmatch", "visible"];
  45243. var xlinkNS = 'http://www.w3.org/1999/xlink';
  45244. var xmlNS = 'http://www.w3.org/XML/1998/namespace';
  45245. var colonChar = 58;
  45246. var xChar = 120;
  45247. var booleanAttrsDict = Object.create(null);
  45248. for (var i = 0, len = booleanAttrs.length; i < len; i++) {
  45249. booleanAttrsDict[booleanAttrs[i]] = true;
  45250. }
  45251. function updateAttrs(oldVnode, vnode) {
  45252. var key, elm = vnode.elm, oldAttrs = oldVnode.data.attrs, attrs = vnode.data.attrs;
  45253. if (!oldAttrs && !attrs)
  45254. return;
  45255. if (oldAttrs === attrs)
  45256. return;
  45257. oldAttrs = oldAttrs || {};
  45258. attrs = attrs || {};
  45259. // update modified attributes, add new attributes
  45260. for (key in attrs) {
  45261. var cur = attrs[key];
  45262. var old = oldAttrs[key];
  45263. if (old !== cur) {
  45264. if (booleanAttrsDict[key]) {
  45265. if (cur) {
  45266. elm.setAttribute(key, "");
  45267. }
  45268. else {
  45269. elm.removeAttribute(key);
  45270. }
  45271. }
  45272. else {
  45273. if (key.charCodeAt(0) !== xChar) {
  45274. elm.setAttribute(key, cur);
  45275. }
  45276. else if (key.charCodeAt(3) === colonChar) {
  45277. // Assume xml namespace
  45278. elm.setAttributeNS(xmlNS, key, cur);
  45279. }
  45280. else if (key.charCodeAt(5) === colonChar) {
  45281. // Assume xlink namespace
  45282. elm.setAttributeNS(xlinkNS, key, cur);
  45283. }
  45284. else {
  45285. elm.setAttribute(key, cur);
  45286. }
  45287. }
  45288. }
  45289. }
  45290. // remove removed attributes
  45291. // use `in` operator since the previous `for` iteration uses it (.i.e. add even attributes with undefined value)
  45292. // the other option is to remove all attributes with value == undefined
  45293. for (key in oldAttrs) {
  45294. if (!(key in attrs)) {
  45295. elm.removeAttribute(key);
  45296. }
  45297. }
  45298. }
  45299. exports.attributesModule = { create: updateAttrs, update: updateAttrs };
  45300. exports.default = exports.attributesModule;
  45301. },{}]},{},[1])(1)
  45302. });
  45303. //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy8ucmVnaXN0cnkubnBtanMub3JnL2Jyb3dzZXItcGFjay82LjAuMi9ub2RlX21vZHVsZXMvYnJvd3Nlci1wYWNrL19wcmVsdWRlLmpzIiwibW9kdWxlcy9hdHRyaWJ1dGVzLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FDQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJmaWxlIjoiZ2VuZXJhdGVkLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXNDb250ZW50IjpbIihmdW5jdGlvbiBlKHQsbixyKXtmdW5jdGlvbiBzKG8sdSl7aWYoIW5bb10pe2lmKCF0W29dKXt2YXIgYT10eXBlb2YgcmVxdWlyZT09XCJmdW5jdGlvblwiJiZyZXF1aXJlO2lmKCF1JiZhKXJldHVybiBhKG8sITApO2lmKGkpcmV0dXJuIGkobywhMCk7dmFyIGY9bmV3IEVycm9yKFwiQ2Fubm90IGZpbmQgbW9kdWxlICdcIitvK1wiJ1wiKTt0aHJvdyBmLmNvZGU9XCJNT0RVTEVfTk9UX0ZPVU5EXCIsZn12YXIgbD1uW29dPXtleHBvcnRzOnt9fTt0W29dWzBdLmNhbGwobC5leHBvcnRzLGZ1bmN0aW9uKGUpe3ZhciBuPXRbb11bMV1bZV07cmV0dXJuIHMobj9uOmUpfSxsLGwuZXhwb3J0cyxlLHQsbixyKX1yZXR1cm4gbltvXS5leHBvcnRzfXZhciBpPXR5cGVvZiByZXF1aXJlPT1cImZ1bmN0aW9uXCImJnJlcXVpcmU7Zm9yKHZhciBvPTA7bzxyLmxlbmd0aDtvKyspcyhyW29dKTtyZXR1cm4gc30pIiwiXCJ1c2Ugc3RyaWN0XCI7XG5PYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgXCJfX2VzTW9kdWxlXCIsIHsgdmFsdWU6IHRydWUgfSk7XG52YXIgYm9vbGVhbkF0dHJzID0gW1wiYWxsb3dmdWxsc2NyZWVuXCIsIFwiYXN5bmNcIiwgXCJhdXRvZm9jdXNcIiwgXCJhdXRvcGxheVwiLCBcImNoZWNrZWRcIiwgXCJjb21wYWN0XCIsIFwiY29udHJvbHNcIiwgXCJkZWNsYXJlXCIsXG4gICAgXCJkZWZhdWx0XCIsIFwiZGVmYXVsdGNoZWNrZWRcIiwgXCJkZWZhdWx0bXV0ZWRcIiwgXCJkZWZhdWx0c2VsZWN0ZWRcIiwgXCJkZWZlclwiLCBcImRpc2FibGVkXCIsIFwiZHJhZ2dhYmxlXCIsXG4gICAgXCJlbmFibGVkXCIsIFwiZm9ybW5vdmFsaWRhdGVcIiwgXCJoaWRkZW5cIiwgXCJpbmRldGVybWluYXRlXCIsIFwiaW5lcnRcIiwgXCJpc21hcFwiLCBcIml0ZW1zY29wZVwiLCBcImxvb3BcIiwgXCJtdWx0aXBsZVwiLFxuICAgIFwibXV0ZWRcIiwgXCJub2hyZWZcIiwgXCJub3Jlc2l6ZVwiLCBcIm5vc2hhZGVcIiwgXCJub3ZhbGlkYXRlXCIsIFwibm93cmFwXCIsIFwib3BlblwiLCBcInBhdXNlb25leGl0XCIsIFwicmVhZG9ubHlcIixcbiAgICBcInJlcXVpcmVkXCIsIFwicmV2ZXJzZWRcIiwgXCJzY29wZWRcIiwgXCJzZWFtbGVzc1wiLCBcInNlbGVjdGVkXCIsIFwic29ydGFibGVcIiwgXCJzcGVsbGNoZWNrXCIsIFwidHJhbnNsYXRlXCIsXG4gICAgXCJ0cnVlc3BlZWRcIiwgXCJ0eXBlbXVzdG1hdGNoXCIsIFwidmlzaWJsZVwiXTtcbnZhciB4bGlua05TID0gJ2h0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsnO1xudmFyIHhtbE5TID0gJ2h0dHA6Ly93d3cudzMub3JnL1hNTC8xOTk4L25hbWVzcGFjZSc7XG52YXIgY29sb25DaGFyID0gNTg7XG52YXIgeENoYXIgPSAxMjA7XG52YXIgYm9vbGVhbkF0dHJzRGljdCA9IE9iamVjdC5jcmVhdGUobnVsbCk7XG5mb3IgKHZhciBpID0gMCwgbGVuID0gYm9vbGVhbkF0dHJzLmxlbmd0aDsgaSA8IGxlbjsgaSsrKSB7XG4gICAgYm9vbGVhbkF0dHJzRGljdFtib29sZWFuQXR0cnNbaV1dID0gdHJ1ZTtcbn1cbmZ1bmN0aW9uIHVwZGF0ZUF0dHJzKG9sZFZub2RlLCB2bm9kZSkge1xuICAgIHZhciBrZXksIGVsbSA9IHZub2RlLmVsbSwgb2xkQXR0cnMgPSBvbGRWbm9kZS5kYXRhLmF0dHJzLCBhdHRycyA9IHZub2RlLmRhdGEuYXR0cnM7XG4gICAgaWYgKCFvbGRBdHRycyAmJiAhYXR0cnMpXG4gICAgICAgIHJldHVybjtcbiAgICBpZiAob2xkQXR0cnMgPT09IGF0dHJzKVxuICAgICAgICByZXR1cm47XG4gICAgb2xkQXR0cnMgPSBvbGRBdHRycyB8fCB7fTtcbiAgICBhdHRycyA9IGF0dHJzIHx8IHt9O1xuICAgIC8vIHVwZGF0ZSBtb2RpZmllZCBhdHRyaWJ1dGVzLCBhZGQgbmV3IGF0dHJpYnV0ZXNcbiAgICBmb3IgKGtleSBpbiBhdHRycykge1xuICAgICAgICB2YXIgY3VyID0gYXR0cnNba2V5XTtcbiAgICAgICAgdmFyIG9sZCA9IG9sZEF0dHJzW2tleV07XG4gICAgICAgIGlmIChvbGQgIT09IGN1cikge1xuICAgICAgICAgICAgaWYgKGJvb2xlYW5BdHRyc0RpY3Rba2V5XSkge1xuICAgICAgICAgICAgICAgIGlmIChjdXIpIHtcbiAgICAgICAgICAgICAgICAgICAgZWxtLnNldEF0dHJpYnV0ZShrZXksIFwiXCIpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgZWxtLnJlbW92ZUF0dHJpYnV0ZShrZXkpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIGlmIChrZXkuY2hhckNvZGVBdCgwKSAhPT0geENoYXIpIHtcbiAgICAgICAgICAgICAgICAgICAgZWxtLnNldEF0dHJpYnV0ZShrZXksIGN1cik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2UgaWYgKGtleS5jaGFyQ29kZUF0KDMpID09PSBjb2xvbkNoYXIpIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gQXNzdW1lIHhtbCBuYW1lc3BhY2VcbiAgICAgICAgICAgICAgICAgICAgZWxtLnNldEF0dHJpYnV0ZU5TKHhtbE5TLCBrZXksIGN1cik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2UgaWYgKGtleS5jaGFyQ29kZUF0KDUpID09PSBjb2xvbkNoYXIpIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gQXNzdW1lIHhsaW5rIG5hbWVzcGFjZVxuICAgICAgICAgICAgICAgICAgICBlbG0uc2V0QXR0cmlidXRlTlMoeGxpbmtOUywga2V5LCBjdXIpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgZWxtLnNldEF0dHJpYnV0ZShrZXksIGN1cik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuICAgIC8vIHJlbW92ZSByZW1vdmVkIGF0dHJpYnV0ZXNcbiAgICAvLyB1c2UgYGluYCBvcGVyYXRvciBzaW5jZSB0aGUgcHJldmlvdXMgYGZvcmAgaXRlcmF0aW9uIHVzZXMgaXQgKC5pLmUuIGFkZCBldmVuIGF0dHJpYnV0ZXMgd2l0aCB1bmRlZmluZWQgdmFsdWUpXG4gICAgLy8gdGhlIG90aGVyIG9wdGlvbiBpcyB0byByZW1vdmUgYWxsIGF0dHJpYnV0ZXMgd2l0aCB2YWx1ZSA9PSB1bmRlZmluZWRcbiAgICBmb3IgKGtleSBpbiBvbGRBdHRycykge1xuICAgICAgICBpZiAoIShrZXkgaW4gYXR0cnMpKSB7XG4gICAgICAgICAgICBlbG0ucmVtb3ZlQXR0cmlidXRlKGtleSk7XG4gICAgICAgIH1cbiAgICB9XG59XG5leHBvcnRzLmF0dHJpYnV0ZXNNb2R1bGUgPSB7IGNyZWF0ZTogdXBkYXRlQXR0cnMsIHVwZGF0ZTogdXBkYXRlQXR0cnMgfTtcbmV4cG9ydHMuZGVmYXVsdCA9IGV4cG9ydHMuYXR0cmlidXRlc01vZHVsZTtcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPWF0dHJpYnV0ZXMuanMubWFwIl19
  45304. ;
  45305. (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define('snabbdom-class',[],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.snabbdom_class = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
  45306. "use strict";
  45307. Object.defineProperty(exports, "__esModule", { value: true });
  45308. function updateClass(oldVnode, vnode) {
  45309. var cur, name, elm = vnode.elm, oldClass = oldVnode.data.class, klass = vnode.data.class;
  45310. if (!oldClass && !klass)
  45311. return;
  45312. if (oldClass === klass)
  45313. return;
  45314. oldClass = oldClass || {};
  45315. klass = klass || {};
  45316. for (name in oldClass) {
  45317. if (!klass[name]) {
  45318. elm.classList.remove(name);
  45319. }
  45320. }
  45321. for (name in klass) {
  45322. cur = klass[name];
  45323. if (cur !== oldClass[name]) {
  45324. elm.classList[cur ? 'add' : 'remove'](name);
  45325. }
  45326. }
  45327. }
  45328. exports.classModule = { create: updateClass, update: updateClass };
  45329. exports.default = exports.classModule;
  45330. },{}]},{},[1])(1)
  45331. });
  45332. //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy8ucmVnaXN0cnkubnBtanMub3JnL2Jyb3dzZXItcGFjay82LjAuMi9ub2RlX21vZHVsZXMvYnJvd3Nlci1wYWNrL19wcmVsdWRlLmpzIiwibW9kdWxlcy9jbGFzcy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtBQ0FBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwiZmlsZSI6ImdlbmVyYXRlZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzQ29udGVudCI6WyIoZnVuY3Rpb24gZSh0LG4scil7ZnVuY3Rpb24gcyhvLHUpe2lmKCFuW29dKXtpZighdFtvXSl7dmFyIGE9dHlwZW9mIHJlcXVpcmU9PVwiZnVuY3Rpb25cIiYmcmVxdWlyZTtpZighdSYmYSlyZXR1cm4gYShvLCEwKTtpZihpKXJldHVybiBpKG8sITApO3ZhciBmPW5ldyBFcnJvcihcIkNhbm5vdCBmaW5kIG1vZHVsZSAnXCIrbytcIidcIik7dGhyb3cgZi5jb2RlPVwiTU9EVUxFX05PVF9GT1VORFwiLGZ9dmFyIGw9bltvXT17ZXhwb3J0czp7fX07dFtvXVswXS5jYWxsKGwuZXhwb3J0cyxmdW5jdGlvbihlKXt2YXIgbj10W29dWzFdW2VdO3JldHVybiBzKG4/bjplKX0sbCxsLmV4cG9ydHMsZSx0LG4scil9cmV0dXJuIG5bb10uZXhwb3J0c312YXIgaT10eXBlb2YgcmVxdWlyZT09XCJmdW5jdGlvblwiJiZyZXF1aXJlO2Zvcih2YXIgbz0wO288ci5sZW5ndGg7bysrKXMocltvXSk7cmV0dXJuIHN9KSIsIlwidXNlIHN0cmljdFwiO1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsIFwiX19lc01vZHVsZVwiLCB7IHZhbHVlOiB0cnVlIH0pO1xuZnVuY3Rpb24gdXBkYXRlQ2xhc3Mob2xkVm5vZGUsIHZub2RlKSB7XG4gICAgdmFyIGN1ciwgbmFtZSwgZWxtID0gdm5vZGUuZWxtLCBvbGRDbGFzcyA9IG9sZFZub2RlLmRhdGEuY2xhc3MsIGtsYXNzID0gdm5vZGUuZGF0YS5jbGFzcztcbiAgICBpZiAoIW9sZENsYXNzICYmICFrbGFzcylcbiAgICAgICAgcmV0dXJuO1xuICAgIGlmIChvbGRDbGFzcyA9PT0ga2xhc3MpXG4gICAgICAgIHJldHVybjtcbiAgICBvbGRDbGFzcyA9IG9sZENsYXNzIHx8IHt9O1xuICAgIGtsYXNzID0ga2xhc3MgfHwge307XG4gICAgZm9yIChuYW1lIGluIG9sZENsYXNzKSB7XG4gICAgICAgIGlmICgha2xhc3NbbmFtZV0pIHtcbiAgICAgICAgICAgIGVsbS5jbGFzc0xpc3QucmVtb3ZlKG5hbWUpO1xuICAgICAgICB9XG4gICAgfVxuICAgIGZvciAobmFtZSBpbiBrbGFzcykge1xuICAgICAgICBjdXIgPSBrbGFzc1tuYW1lXTtcbiAgICAgICAgaWYgKGN1ciAhPT0gb2xkQ2xhc3NbbmFtZV0pIHtcbiAgICAgICAgICAgIGVsbS5jbGFzc0xpc3RbY3VyID8gJ2FkZCcgOiAncmVtb3ZlJ10obmFtZSk7XG4gICAgICAgIH1cbiAgICB9XG59XG5leHBvcnRzLmNsYXNzTW9kdWxlID0geyBjcmVhdGU6IHVwZGF0ZUNsYXNzLCB1cGRhdGU6IHVwZGF0ZUNsYXNzIH07XG5leHBvcnRzLmRlZmF1bHQgPSBleHBvcnRzLmNsYXNzTW9kdWxlO1xuLy8jIHNvdXJjZU1hcHBpbmdVUkw9Y2xhc3MuanMubWFwIl19
  45333. ;
  45334. (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define('snabbdom-dataset',[],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.snabbdom_dataset = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
  45335. "use strict";
  45336. Object.defineProperty(exports, "__esModule", { value: true });
  45337. var CAPS_REGEX = /[A-Z]/g;
  45338. function updateDataset(oldVnode, vnode) {
  45339. var elm = vnode.elm, oldDataset = oldVnode.data.dataset, dataset = vnode.data.dataset, key;
  45340. if (!oldDataset && !dataset)
  45341. return;
  45342. if (oldDataset === dataset)
  45343. return;
  45344. oldDataset = oldDataset || {};
  45345. dataset = dataset || {};
  45346. var d = elm.dataset;
  45347. for (key in oldDataset) {
  45348. if (!dataset[key]) {
  45349. if (d) {
  45350. if (key in d) {
  45351. delete d[key];
  45352. }
  45353. }
  45354. else {
  45355. elm.removeAttribute('data-' + key.replace(CAPS_REGEX, '-$&').toLowerCase());
  45356. }
  45357. }
  45358. }
  45359. for (key in dataset) {
  45360. if (oldDataset[key] !== dataset[key]) {
  45361. if (d) {
  45362. d[key] = dataset[key];
  45363. }
  45364. else {
  45365. elm.setAttribute('data-' + key.replace(CAPS_REGEX, '-$&').toLowerCase(), dataset[key]);
  45366. }
  45367. }
  45368. }
  45369. }
  45370. exports.datasetModule = { create: updateDataset, update: updateDataset };
  45371. exports.default = exports.datasetModule;
  45372. },{}]},{},[1])(1)
  45373. });
  45374. //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9icm93c2VyLXBhY2svX3ByZWx1ZGUuanMiLCJtb2R1bGVzL2RhdGFzZXQuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7QUNBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwiZmlsZSI6ImdlbmVyYXRlZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzQ29udGVudCI6WyIoZnVuY3Rpb24gZSh0LG4scil7ZnVuY3Rpb24gcyhvLHUpe2lmKCFuW29dKXtpZighdFtvXSl7dmFyIGE9dHlwZW9mIHJlcXVpcmU9PVwiZnVuY3Rpb25cIiYmcmVxdWlyZTtpZighdSYmYSlyZXR1cm4gYShvLCEwKTtpZihpKXJldHVybiBpKG8sITApO3ZhciBmPW5ldyBFcnJvcihcIkNhbm5vdCBmaW5kIG1vZHVsZSAnXCIrbytcIidcIik7dGhyb3cgZi5jb2RlPVwiTU9EVUxFX05PVF9GT1VORFwiLGZ9dmFyIGw9bltvXT17ZXhwb3J0czp7fX07dFtvXVswXS5jYWxsKGwuZXhwb3J0cyxmdW5jdGlvbihlKXt2YXIgbj10W29dWzFdW2VdO3JldHVybiBzKG4/bjplKX0sbCxsLmV4cG9ydHMsZSx0LG4scil9cmV0dXJuIG5bb10uZXhwb3J0c312YXIgaT10eXBlb2YgcmVxdWlyZT09XCJmdW5jdGlvblwiJiZyZXF1aXJlO2Zvcih2YXIgbz0wO288ci5sZW5ndGg7bysrKXMocltvXSk7cmV0dXJuIHN9KSIsIlwidXNlIHN0cmljdFwiO1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsIFwiX19lc01vZHVsZVwiLCB7IHZhbHVlOiB0cnVlIH0pO1xudmFyIENBUFNfUkVHRVggPSAvW0EtWl0vZztcbmZ1bmN0aW9uIHVwZGF0ZURhdGFzZXQob2xkVm5vZGUsIHZub2RlKSB7XG4gICAgdmFyIGVsbSA9IHZub2RlLmVsbSwgb2xkRGF0YXNldCA9IG9sZFZub2RlLmRhdGEuZGF0YXNldCwgZGF0YXNldCA9IHZub2RlLmRhdGEuZGF0YXNldCwga2V5O1xuICAgIGlmICghb2xkRGF0YXNldCAmJiAhZGF0YXNldClcbiAgICAgICAgcmV0dXJuO1xuICAgIGlmIChvbGREYXRhc2V0ID09PSBkYXRhc2V0KVxuICAgICAgICByZXR1cm47XG4gICAgb2xkRGF0YXNldCA9IG9sZERhdGFzZXQgfHwge307XG4gICAgZGF0YXNldCA9IGRhdGFzZXQgfHwge307XG4gICAgdmFyIGQgPSBlbG0uZGF0YXNldDtcbiAgICBmb3IgKGtleSBpbiBvbGREYXRhc2V0KSB7XG4gICAgICAgIGlmICghZGF0YXNldFtrZXldKSB7XG4gICAgICAgICAgICBpZiAoZCkge1xuICAgICAgICAgICAgICAgIGlmIChrZXkgaW4gZCkge1xuICAgICAgICAgICAgICAgICAgICBkZWxldGUgZFtrZXldO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIGVsbS5yZW1vdmVBdHRyaWJ1dGUoJ2RhdGEtJyArIGtleS5yZXBsYWNlKENBUFNfUkVHRVgsICctJCYnKS50b0xvd2VyQ2FzZSgpKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cbiAgICBmb3IgKGtleSBpbiBkYXRhc2V0KSB7XG4gICAgICAgIGlmIChvbGREYXRhc2V0W2tleV0gIT09IGRhdGFzZXRba2V5XSkge1xuICAgICAgICAgICAgaWYgKGQpIHtcbiAgICAgICAgICAgICAgICBkW2tleV0gPSBkYXRhc2V0W2tleV07XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICBlbG0uc2V0QXR0cmlidXRlKCdkYXRhLScgKyBrZXkucmVwbGFjZShDQVBTX1JFR0VYLCAnLSQmJykudG9Mb3dlckNhc2UoKSwgZGF0YXNldFtrZXldKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cbn1cbmV4cG9ydHMuZGF0YXNldE1vZHVsZSA9IHsgY3JlYXRlOiB1cGRhdGVEYXRhc2V0LCB1cGRhdGU6IHVwZGF0ZURhdGFzZXQgfTtcbmV4cG9ydHMuZGVmYXVsdCA9IGV4cG9ydHMuZGF0YXNldE1vZHVsZTtcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPWRhdGFzZXQuanMubWFwIl19
  45375. ;
  45376. (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define('snabbdom-props',[],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.snabbdom_props = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
  45377. "use strict";
  45378. Object.defineProperty(exports, "__esModule", { value: true });
  45379. function updateProps(oldVnode, vnode) {
  45380. var key, cur, old, elm = vnode.elm, oldProps = oldVnode.data.props, props = vnode.data.props;
  45381. if (!oldProps && !props)
  45382. return;
  45383. if (oldProps === props)
  45384. return;
  45385. oldProps = oldProps || {};
  45386. props = props || {};
  45387. for (key in oldProps) {
  45388. if (!props[key]) {
  45389. delete elm[key];
  45390. }
  45391. }
  45392. for (key in props) {
  45393. cur = props[key];
  45394. old = oldProps[key];
  45395. if (old !== cur && (key !== 'value' || elm[key] !== cur)) {
  45396. elm[key] = cur;
  45397. }
  45398. }
  45399. }
  45400. exports.propsModule = { create: updateProps, update: updateProps };
  45401. exports.default = exports.propsModule;
  45402. },{}]},{},[1])(1)
  45403. });
  45404. //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy8ucmVnaXN0cnkubnBtanMub3JnL2Jyb3dzZXItcGFjay82LjAuMi9ub2RlX21vZHVsZXMvYnJvd3Nlci1wYWNrL19wcmVsdWRlLmpzIiwibW9kdWxlcy9wcm9wcy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtBQ0FBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJmaWxlIjoiZ2VuZXJhdGVkLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXNDb250ZW50IjpbIihmdW5jdGlvbiBlKHQsbixyKXtmdW5jdGlvbiBzKG8sdSl7aWYoIW5bb10pe2lmKCF0W29dKXt2YXIgYT10eXBlb2YgcmVxdWlyZT09XCJmdW5jdGlvblwiJiZyZXF1aXJlO2lmKCF1JiZhKXJldHVybiBhKG8sITApO2lmKGkpcmV0dXJuIGkobywhMCk7dmFyIGY9bmV3IEVycm9yKFwiQ2Fubm90IGZpbmQgbW9kdWxlICdcIitvK1wiJ1wiKTt0aHJvdyBmLmNvZGU9XCJNT0RVTEVfTk9UX0ZPVU5EXCIsZn12YXIgbD1uW29dPXtleHBvcnRzOnt9fTt0W29dWzBdLmNhbGwobC5leHBvcnRzLGZ1bmN0aW9uKGUpe3ZhciBuPXRbb11bMV1bZV07cmV0dXJuIHMobj9uOmUpfSxsLGwuZXhwb3J0cyxlLHQsbixyKX1yZXR1cm4gbltvXS5leHBvcnRzfXZhciBpPXR5cGVvZiByZXF1aXJlPT1cImZ1bmN0aW9uXCImJnJlcXVpcmU7Zm9yKHZhciBvPTA7bzxyLmxlbmd0aDtvKyspcyhyW29dKTtyZXR1cm4gc30pIiwiXCJ1c2Ugc3RyaWN0XCI7XG5PYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgXCJfX2VzTW9kdWxlXCIsIHsgdmFsdWU6IHRydWUgfSk7XG5mdW5jdGlvbiB1cGRhdGVQcm9wcyhvbGRWbm9kZSwgdm5vZGUpIHtcbiAgICB2YXIga2V5LCBjdXIsIG9sZCwgZWxtID0gdm5vZGUuZWxtLCBvbGRQcm9wcyA9IG9sZFZub2RlLmRhdGEucHJvcHMsIHByb3BzID0gdm5vZGUuZGF0YS5wcm9wcztcbiAgICBpZiAoIW9sZFByb3BzICYmICFwcm9wcylcbiAgICAgICAgcmV0dXJuO1xuICAgIGlmIChvbGRQcm9wcyA9PT0gcHJvcHMpXG4gICAgICAgIHJldHVybjtcbiAgICBvbGRQcm9wcyA9IG9sZFByb3BzIHx8IHt9O1xuICAgIHByb3BzID0gcHJvcHMgfHwge307XG4gICAgZm9yIChrZXkgaW4gb2xkUHJvcHMpIHtcbiAgICAgICAgaWYgKCFwcm9wc1trZXldKSB7XG4gICAgICAgICAgICBkZWxldGUgZWxtW2tleV07XG4gICAgICAgIH1cbiAgICB9XG4gICAgZm9yIChrZXkgaW4gcHJvcHMpIHtcbiAgICAgICAgY3VyID0gcHJvcHNba2V5XTtcbiAgICAgICAgb2xkID0gb2xkUHJvcHNba2V5XTtcbiAgICAgICAgaWYgKG9sZCAhPT0gY3VyICYmIChrZXkgIT09ICd2YWx1ZScgfHwgZWxtW2tleV0gIT09IGN1cikpIHtcbiAgICAgICAgICAgIGVsbVtrZXldID0gY3VyO1xuICAgICAgICB9XG4gICAgfVxufVxuZXhwb3J0cy5wcm9wc01vZHVsZSA9IHsgY3JlYXRlOiB1cGRhdGVQcm9wcywgdXBkYXRlOiB1cGRhdGVQcm9wcyB9O1xuZXhwb3J0cy5kZWZhdWx0ID0gZXhwb3J0cy5wcm9wc01vZHVsZTtcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPXByb3BzLmpzLm1hcCJdfQ==
  45405. ;
  45406. (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define('snabbdom-style',[],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.snabbdom_style = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
  45407. "use strict";
  45408. Object.defineProperty(exports, "__esModule", { value: true });
  45409. var raf = (typeof window !== 'undefined' && window.requestAnimationFrame) || setTimeout;
  45410. var nextFrame = function (fn) { raf(function () { raf(fn); }); };
  45411. function setNextFrame(obj, prop, val) {
  45412. nextFrame(function () { obj[prop] = val; });
  45413. }
  45414. function updateStyle(oldVnode, vnode) {
  45415. var cur, name, elm = vnode.elm, oldStyle = oldVnode.data.style, style = vnode.data.style;
  45416. if (!oldStyle && !style)
  45417. return;
  45418. if (oldStyle === style)
  45419. return;
  45420. oldStyle = oldStyle || {};
  45421. style = style || {};
  45422. var oldHasDel = 'delayed' in oldStyle;
  45423. for (name in oldStyle) {
  45424. if (!style[name]) {
  45425. if (name[0] === '-' && name[1] === '-') {
  45426. elm.style.removeProperty(name);
  45427. }
  45428. else {
  45429. elm.style[name] = '';
  45430. }
  45431. }
  45432. }
  45433. for (name in style) {
  45434. cur = style[name];
  45435. if (name === 'delayed' && style.delayed) {
  45436. for (var name2 in style.delayed) {
  45437. cur = style.delayed[name2];
  45438. if (!oldHasDel || cur !== oldStyle.delayed[name2]) {
  45439. setNextFrame(elm.style, name2, cur);
  45440. }
  45441. }
  45442. }
  45443. else if (name !== 'remove' && cur !== oldStyle[name]) {
  45444. if (name[0] === '-' && name[1] === '-') {
  45445. elm.style.setProperty(name, cur);
  45446. }
  45447. else {
  45448. elm.style[name] = cur;
  45449. }
  45450. }
  45451. }
  45452. }
  45453. function applyDestroyStyle(vnode) {
  45454. var style, name, elm = vnode.elm, s = vnode.data.style;
  45455. if (!s || !(style = s.destroy))
  45456. return;
  45457. for (name in style) {
  45458. elm.style[name] = style[name];
  45459. }
  45460. }
  45461. function applyRemoveStyle(vnode, rm) {
  45462. var s = vnode.data.style;
  45463. if (!s || !s.remove) {
  45464. rm();
  45465. return;
  45466. }
  45467. var name, elm = vnode.elm, i = 0, compStyle, style = s.remove, amount = 0, applied = [];
  45468. for (name in style) {
  45469. applied.push(name);
  45470. elm.style[name] = style[name];
  45471. }
  45472. compStyle = getComputedStyle(elm);
  45473. var props = compStyle['transition-property'].split(', ');
  45474. for (; i < props.length; ++i) {
  45475. if (applied.indexOf(props[i]) !== -1)
  45476. amount++;
  45477. }
  45478. elm.addEventListener('transitionend', function (ev) {
  45479. if (ev.target === elm)
  45480. --amount;
  45481. if (amount === 0)
  45482. rm();
  45483. });
  45484. }
  45485. exports.styleModule = {
  45486. create: updateStyle,
  45487. update: updateStyle,
  45488. destroy: applyDestroyStyle,
  45489. remove: applyRemoveStyle
  45490. };
  45491. exports.default = exports.styleModule;
  45492. },{}]},{},[1])(1)
  45493. });
  45494. //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy8ucmVnaXN0cnkubnBtanMub3JnL2Jyb3dzZXItcGFjay82LjAuMi9ub2RlX21vZHVsZXMvYnJvd3Nlci1wYWNrL19wcmVsdWRlLmpzIiwibW9kdWxlcy9zdHlsZS5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtBQ0FBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJmaWxlIjoiZ2VuZXJhdGVkLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXNDb250ZW50IjpbIihmdW5jdGlvbiBlKHQsbixyKXtmdW5jdGlvbiBzKG8sdSl7aWYoIW5bb10pe2lmKCF0W29dKXt2YXIgYT10eXBlb2YgcmVxdWlyZT09XCJmdW5jdGlvblwiJiZyZXF1aXJlO2lmKCF1JiZhKXJldHVybiBhKG8sITApO2lmKGkpcmV0dXJuIGkobywhMCk7dmFyIGY9bmV3IEVycm9yKFwiQ2Fubm90IGZpbmQgbW9kdWxlICdcIitvK1wiJ1wiKTt0aHJvdyBmLmNvZGU9XCJNT0RVTEVfTk9UX0ZPVU5EXCIsZn12YXIgbD1uW29dPXtleHBvcnRzOnt9fTt0W29dWzBdLmNhbGwobC5leHBvcnRzLGZ1bmN0aW9uKGUpe3ZhciBuPXRbb11bMV1bZV07cmV0dXJuIHMobj9uOmUpfSxsLGwuZXhwb3J0cyxlLHQsbixyKX1yZXR1cm4gbltvXS5leHBvcnRzfXZhciBpPXR5cGVvZiByZXF1aXJlPT1cImZ1bmN0aW9uXCImJnJlcXVpcmU7Zm9yKHZhciBvPTA7bzxyLmxlbmd0aDtvKyspcyhyW29dKTtyZXR1cm4gc30pIiwiXCJ1c2Ugc3RyaWN0XCI7XG5PYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgXCJfX2VzTW9kdWxlXCIsIHsgdmFsdWU6IHRydWUgfSk7XG52YXIgcmFmID0gKHR5cGVvZiB3aW5kb3cgIT09ICd1bmRlZmluZWQnICYmIHdpbmRvdy5yZXF1ZXN0QW5pbWF0aW9uRnJhbWUpIHx8IHNldFRpbWVvdXQ7XG52YXIgbmV4dEZyYW1lID0gZnVuY3Rpb24gKGZuKSB7IHJhZihmdW5jdGlvbiAoKSB7IHJhZihmbik7IH0pOyB9O1xuZnVuY3Rpb24gc2V0TmV4dEZyYW1lKG9iaiwgcHJvcCwgdmFsKSB7XG4gICAgbmV4dEZyYW1lKGZ1bmN0aW9uICgpIHsgb2JqW3Byb3BdID0gdmFsOyB9KTtcbn1cbmZ1bmN0aW9uIHVwZGF0ZVN0eWxlKG9sZFZub2RlLCB2bm9kZSkge1xuICAgIHZhciBjdXIsIG5hbWUsIGVsbSA9IHZub2RlLmVsbSwgb2xkU3R5bGUgPSBvbGRWbm9kZS5kYXRhLnN0eWxlLCBzdHlsZSA9IHZub2RlLmRhdGEuc3R5bGU7XG4gICAgaWYgKCFvbGRTdHlsZSAmJiAhc3R5bGUpXG4gICAgICAgIHJldHVybjtcbiAgICBpZiAob2xkU3R5bGUgPT09IHN0eWxlKVxuICAgICAgICByZXR1cm47XG4gICAgb2xkU3R5bGUgPSBvbGRTdHlsZSB8fCB7fTtcbiAgICBzdHlsZSA9IHN0eWxlIHx8IHt9O1xuICAgIHZhciBvbGRIYXNEZWwgPSAnZGVsYXllZCcgaW4gb2xkU3R5bGU7XG4gICAgZm9yIChuYW1lIGluIG9sZFN0eWxlKSB7XG4gICAgICAgIGlmICghc3R5bGVbbmFtZV0pIHtcbiAgICAgICAgICAgIGlmIChuYW1lWzBdID09PSAnLScgJiYgbmFtZVsxXSA9PT0gJy0nKSB7XG4gICAgICAgICAgICAgICAgZWxtLnN0eWxlLnJlbW92ZVByb3BlcnR5KG5hbWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgZWxtLnN0eWxlW25hbWVdID0gJyc7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG4gICAgZm9yIChuYW1lIGluIHN0eWxlKSB7XG4gICAgICAgIGN1ciA9IHN0eWxlW25hbWVdO1xuICAgICAgICBpZiAobmFtZSA9PT0gJ2RlbGF5ZWQnICYmIHN0eWxlLmRlbGF5ZWQpIHtcbiAgICAgICAgICAgIGZvciAodmFyIG5hbWUyIGluIHN0eWxlLmRlbGF5ZWQpIHtcbiAgICAgICAgICAgICAgICBjdXIgPSBzdHlsZS5kZWxheWVkW25hbWUyXTtcbiAgICAgICAgICAgICAgICBpZiAoIW9sZEhhc0RlbCB8fCBjdXIgIT09IG9sZFN0eWxlLmRlbGF5ZWRbbmFtZTJdKSB7XG4gICAgICAgICAgICAgICAgICAgIHNldE5leHRGcmFtZShlbG0uc3R5bGUsIG5hbWUyLCBjdXIpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmIChuYW1lICE9PSAncmVtb3ZlJyAmJiBjdXIgIT09IG9sZFN0eWxlW25hbWVdKSB7XG4gICAgICAgICAgICBpZiAobmFtZVswXSA9PT0gJy0nICYmIG5hbWVbMV0gPT09ICctJykge1xuICAgICAgICAgICAgICAgIGVsbS5zdHlsZS5zZXRQcm9wZXJ0eShuYW1lLCBjdXIpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgZWxtLnN0eWxlW25hbWVdID0gY3VyO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxufVxuZnVuY3Rpb24gYXBwbHlEZXN0cm95U3R5bGUodm5vZGUpIHtcbiAgICB2YXIgc3R5bGUsIG5hbWUsIGVsbSA9IHZub2RlLmVsbSwgcyA9IHZub2RlLmRhdGEuc3R5bGU7XG4gICAgaWYgKCFzIHx8ICEoc3R5bGUgPSBzLmRlc3Ryb3kpKVxuICAgICAgICByZXR1cm47XG4gICAgZm9yIChuYW1lIGluIHN0eWxlKSB7XG4gICAgICAgIGVsbS5zdHlsZVtuYW1lXSA9IHN0eWxlW25hbWVdO1xuICAgIH1cbn1cbmZ1bmN0aW9uIGFwcGx5UmVtb3ZlU3R5bGUodm5vZGUsIHJtKSB7XG4gICAgdmFyIHMgPSB2bm9kZS5kYXRhLnN0eWxlO1xuICAgIGlmICghcyB8fCAhcy5yZW1vdmUpIHtcbiAgICAgICAgcm0oKTtcbiAgICAgICAgcmV0dXJuO1xuICAgIH1cbiAgICB2YXIgbmFtZSwgZWxtID0gdm5vZGUuZWxtLCBpID0gMCwgY29tcFN0eWxlLCBzdHlsZSA9IHMucmVtb3ZlLCBhbW91bnQgPSAwLCBhcHBsaWVkID0gW107XG4gICAgZm9yIChuYW1lIGluIHN0eWxlKSB7XG4gICAgICAgIGFwcGxpZWQucHVzaChuYW1lKTtcbiAgICAgICAgZWxtLnN0eWxlW25hbWVdID0gc3R5bGVbbmFtZV07XG4gICAgfVxuICAgIGNvbXBTdHlsZSA9IGdldENvbXB1dGVkU3R5bGUoZWxtKTtcbiAgICB2YXIgcHJvcHMgPSBjb21wU3R5bGVbJ3RyYW5zaXRpb24tcHJvcGVydHknXS5zcGxpdCgnLCAnKTtcbiAgICBmb3IgKDsgaSA8IHByb3BzLmxlbmd0aDsgKytpKSB7XG4gICAgICAgIGlmIChhcHBsaWVkLmluZGV4T2YocHJvcHNbaV0pICE9PSAtMSlcbiAgICAgICAgICAgIGFtb3VudCsrO1xuICAgIH1cbiAgICBlbG0uYWRkRXZlbnRMaXN0ZW5lcigndHJhbnNpdGlvbmVuZCcsIGZ1bmN0aW9uIChldikge1xuICAgICAgICBpZiAoZXYudGFyZ2V0ID09PSBlbG0pXG4gICAgICAgICAgICAtLWFtb3VudDtcbiAgICAgICAgaWYgKGFtb3VudCA9PT0gMClcbiAgICAgICAgICAgIHJtKCk7XG4gICAgfSk7XG59XG5leHBvcnRzLnN0eWxlTW9kdWxlID0ge1xuICAgIGNyZWF0ZTogdXBkYXRlU3R5bGUsXG4gICAgdXBkYXRlOiB1cGRhdGVTdHlsZSxcbiAgICBkZXN0cm95OiBhcHBseURlc3Ryb3lTdHlsZSxcbiAgICByZW1vdmU6IGFwcGx5UmVtb3ZlU3R5bGVcbn07XG5leHBvcnRzLmRlZmF1bHQgPSBleHBvcnRzLnN0eWxlTW9kdWxlO1xuLy8jIHNvdXJjZU1hcHBpbmdVUkw9c3R5bGUuanMubWFwIl19
  45495. ;
  45496. (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define('tovnode',[],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.tovnode = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
  45497. "use strict";
  45498. Object.defineProperty(exports, "__esModule", { value: true });
  45499. function createElement(tagName) {
  45500. return document.createElement(tagName);
  45501. }
  45502. function createElementNS(namespaceURI, qualifiedName) {
  45503. return document.createElementNS(namespaceURI, qualifiedName);
  45504. }
  45505. function createTextNode(text) {
  45506. return document.createTextNode(text);
  45507. }
  45508. function createComment(text) {
  45509. return document.createComment(text);
  45510. }
  45511. function insertBefore(parentNode, newNode, referenceNode) {
  45512. parentNode.insertBefore(newNode, referenceNode);
  45513. }
  45514. function removeChild(node, child) {
  45515. node.removeChild(child);
  45516. }
  45517. function appendChild(node, child) {
  45518. node.appendChild(child);
  45519. }
  45520. function parentNode(node) {
  45521. return node.parentNode;
  45522. }
  45523. function nextSibling(node) {
  45524. return node.nextSibling;
  45525. }
  45526. function tagName(elm) {
  45527. return elm.tagName;
  45528. }
  45529. function setTextContent(node, text) {
  45530. node.textContent = text;
  45531. }
  45532. function getTextContent(node) {
  45533. return node.textContent;
  45534. }
  45535. function isElement(node) {
  45536. return node.nodeType === 1;
  45537. }
  45538. function isText(node) {
  45539. return node.nodeType === 3;
  45540. }
  45541. function isComment(node) {
  45542. return node.nodeType === 8;
  45543. }
  45544. exports.htmlDomApi = {
  45545. createElement: createElement,
  45546. createElementNS: createElementNS,
  45547. createTextNode: createTextNode,
  45548. createComment: createComment,
  45549. insertBefore: insertBefore,
  45550. removeChild: removeChild,
  45551. appendChild: appendChild,
  45552. parentNode: parentNode,
  45553. nextSibling: nextSibling,
  45554. tagName: tagName,
  45555. setTextContent: setTextContent,
  45556. getTextContent: getTextContent,
  45557. isElement: isElement,
  45558. isText: isText,
  45559. isComment: isComment,
  45560. };
  45561. exports.default = exports.htmlDomApi;
  45562. },{}],2:[function(require,module,exports){
  45563. "use strict";
  45564. Object.defineProperty(exports, "__esModule", { value: true });
  45565. var vnode_1 = require("./vnode");
  45566. var htmldomapi_1 = require("./htmldomapi");
  45567. function toVNode(node, domApi) {
  45568. var api = domApi !== undefined ? domApi : htmldomapi_1.default;
  45569. var text;
  45570. if (api.isElement(node)) {
  45571. var id = node.id ? '#' + node.id : '';
  45572. var cn = node.getAttribute('class');
  45573. var c = cn ? '.' + cn.split(' ').join('.') : '';
  45574. var sel = api.tagName(node).toLowerCase() + id + c;
  45575. var attrs = {};
  45576. var children = [];
  45577. var name_1;
  45578. var i = void 0, n = void 0;
  45579. var elmAttrs = node.attributes;
  45580. var elmChildren = node.childNodes;
  45581. for (i = 0, n = elmAttrs.length; i < n; i++) {
  45582. name_1 = elmAttrs[i].nodeName;
  45583. if (name_1 !== 'id' && name_1 !== 'class') {
  45584. attrs[name_1] = elmAttrs[i].nodeValue;
  45585. }
  45586. }
  45587. for (i = 0, n = elmChildren.length; i < n; i++) {
  45588. children.push(toVNode(elmChildren[i]));
  45589. }
  45590. return vnode_1.default(sel, { attrs: attrs }, children, undefined, node);
  45591. }
  45592. else if (api.isText(node)) {
  45593. text = api.getTextContent(node);
  45594. return vnode_1.default(undefined, undefined, undefined, text, node);
  45595. }
  45596. else if (api.isComment(node)) {
  45597. text = api.getTextContent(node);
  45598. return vnode_1.default('!', {}, [], text, node);
  45599. }
  45600. else {
  45601. return vnode_1.default('', {}, [], undefined, undefined);
  45602. }
  45603. }
  45604. exports.toVNode = toVNode;
  45605. exports.default = toVNode;
  45606. },{"./htmldomapi":1,"./vnode":3}],3:[function(require,module,exports){
  45607. "use strict";
  45608. Object.defineProperty(exports, "__esModule", { value: true });
  45609. function vnode(sel, data, children, text, elm) {
  45610. var key = data === undefined ? undefined : data.key;
  45611. return { sel: sel, data: data, children: children,
  45612. text: text, elm: elm, key: key };
  45613. }
  45614. exports.vnode = vnode;
  45615. exports.default = vnode;
  45616. },{}]},{},[2])(2)
  45617. });
  45618. //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy8ucmVnaXN0cnkubnBtanMub3JnL2Jyb3dzZXItcGFjay82LjAuMi9ub2RlX21vZHVsZXMvYnJvd3Nlci1wYWNrL19wcmVsdWRlLmpzIiwiaHRtbGRvbWFwaS5qcyIsInRvdm5vZGUuanMiLCJ2bm9kZS5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtBQ0FBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUNqRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUMzQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJmaWxlIjoiZ2VuZXJhdGVkLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXNDb250ZW50IjpbIihmdW5jdGlvbiBlKHQsbixyKXtmdW5jdGlvbiBzKG8sdSl7aWYoIW5bb10pe2lmKCF0W29dKXt2YXIgYT10eXBlb2YgcmVxdWlyZT09XCJmdW5jdGlvblwiJiZyZXF1aXJlO2lmKCF1JiZhKXJldHVybiBhKG8sITApO2lmKGkpcmV0dXJuIGkobywhMCk7dmFyIGY9bmV3IEVycm9yKFwiQ2Fubm90IGZpbmQgbW9kdWxlICdcIitvK1wiJ1wiKTt0aHJvdyBmLmNvZGU9XCJNT0RVTEVfTk9UX0ZPVU5EXCIsZn12YXIgbD1uW29dPXtleHBvcnRzOnt9fTt0W29dWzBdLmNhbGwobC5leHBvcnRzLGZ1bmN0aW9uKGUpe3ZhciBuPXRbb11bMV1bZV07cmV0dXJuIHMobj9uOmUpfSxsLGwuZXhwb3J0cyxlLHQsbixyKX1yZXR1cm4gbltvXS5leHBvcnRzfXZhciBpPXR5cGVvZiByZXF1aXJlPT1cImZ1bmN0aW9uXCImJnJlcXVpcmU7Zm9yKHZhciBvPTA7bzxyLmxlbmd0aDtvKyspcyhyW29dKTtyZXR1cm4gc30pIiwiXCJ1c2Ugc3RyaWN0XCI7XG5PYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgXCJfX2VzTW9kdWxlXCIsIHsgdmFsdWU6IHRydWUgfSk7XG5mdW5jdGlvbiBjcmVhdGVFbGVtZW50KHRhZ05hbWUpIHtcbiAgICByZXR1cm4gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCh0YWdOYW1lKTtcbn1cbmZ1bmN0aW9uIGNyZWF0ZUVsZW1lbnROUyhuYW1lc3BhY2VVUkksIHF1YWxpZmllZE5hbWUpIHtcbiAgICByZXR1cm4gZG9jdW1lbnQuY3JlYXRlRWxlbWVudE5TKG5hbWVzcGFjZVVSSSwgcXVhbGlmaWVkTmFtZSk7XG59XG5mdW5jdGlvbiBjcmVhdGVUZXh0Tm9kZSh0ZXh0KSB7XG4gICAgcmV0dXJuIGRvY3VtZW50LmNyZWF0ZVRleHROb2RlKHRleHQpO1xufVxuZnVuY3Rpb24gY3JlYXRlQ29tbWVudCh0ZXh0KSB7XG4gICAgcmV0dXJuIGRvY3VtZW50LmNyZWF0ZUNvbW1lbnQodGV4dCk7XG59XG5mdW5jdGlvbiBpbnNlcnRCZWZvcmUocGFyZW50Tm9kZSwgbmV3Tm9kZSwgcmVmZXJlbmNlTm9kZSkge1xuICAgIHBhcmVudE5vZGUuaW5zZXJ0QmVmb3JlKG5ld05vZGUsIHJlZmVyZW5jZU5vZGUpO1xufVxuZnVuY3Rpb24gcmVtb3ZlQ2hpbGQobm9kZSwgY2hpbGQpIHtcbiAgICBub2RlLnJlbW92ZUNoaWxkKGNoaWxkKTtcbn1cbmZ1bmN0aW9uIGFwcGVuZENoaWxkKG5vZGUsIGNoaWxkKSB7XG4gICAgbm9kZS5hcHBlbmRDaGlsZChjaGlsZCk7XG59XG5mdW5jdGlvbiBwYXJlbnROb2RlKG5vZGUpIHtcbiAgICByZXR1cm4gbm9kZS5wYXJlbnROb2RlO1xufVxuZnVuY3Rpb24gbmV4dFNpYmxpbmcobm9kZSkge1xuICAgIHJldHVybiBub2RlLm5leHRTaWJsaW5nO1xufVxuZnVuY3Rpb24gdGFnTmFtZShlbG0pIHtcbiAgICByZXR1cm4gZWxtLnRhZ05hbWU7XG59XG5mdW5jdGlvbiBzZXRUZXh0Q29udGVudChub2RlLCB0ZXh0KSB7XG4gICAgbm9kZS50ZXh0Q29udGVudCA9IHRleHQ7XG59XG5mdW5jdGlvbiBnZXRUZXh0Q29udGVudChub2RlKSB7XG4gICAgcmV0dXJuIG5vZGUudGV4dENvbnRlbnQ7XG59XG5mdW5jdGlvbiBpc0VsZW1lbnQobm9kZSkge1xuICAgIHJldHVybiBub2RlLm5vZGVUeXBlID09PSAxO1xufVxuZnVuY3Rpb24gaXNUZXh0KG5vZGUpIHtcbiAgICByZXR1cm4gbm9kZS5ub2RlVHlwZSA9PT0gMztcbn1cbmZ1bmN0aW9uIGlzQ29tbWVudChub2RlKSB7XG4gICAgcmV0dXJuIG5vZGUubm9kZVR5cGUgPT09IDg7XG59XG5leHBvcnRzLmh0bWxEb21BcGkgPSB7XG4gICAgY3JlYXRlRWxlbWVudDogY3JlYXRlRWxlbWVudCxcbiAgICBjcmVhdGVFbGVtZW50TlM6IGNyZWF0ZUVsZW1lbnROUyxcbiAgICBjcmVhdGVUZXh0Tm9kZTogY3JlYXRlVGV4dE5vZGUsXG4gICAgY3JlYXRlQ29tbWVudDogY3JlYXRlQ29tbWVudCxcbiAgICBpbnNlcnRCZWZvcmU6IGluc2VydEJlZm9yZSxcbiAgICByZW1vdmVDaGlsZDogcmVtb3ZlQ2hpbGQsXG4gICAgYXBwZW5kQ2hpbGQ6IGFwcGVuZENoaWxkLFxuICAgIHBhcmVudE5vZGU6IHBhcmVudE5vZGUsXG4gICAgbmV4dFNpYmxpbmc6IG5leHRTaWJsaW5nLFxuICAgIHRhZ05hbWU6IHRhZ05hbWUsXG4gICAgc2V0VGV4dENvbnRlbnQ6IHNldFRleHRDb250ZW50LFxuICAgIGdldFRleHRDb250ZW50OiBnZXRUZXh0Q29udGVudCxcbiAgICBpc0VsZW1lbnQ6IGlzRWxlbWVudCxcbiAgICBpc1RleHQ6IGlzVGV4dCxcbiAgICBpc0NvbW1lbnQ6IGlzQ29tbWVudCxcbn07XG5leHBvcnRzLmRlZmF1bHQgPSBleHBvcnRzLmh0bWxEb21BcGk7XG4vLyMgc291cmNlTWFwcGluZ1VSTD1odG1sZG9tYXBpLmpzLm1hcCIsIlwidXNlIHN0cmljdFwiO1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsIFwiX19lc01vZHVsZVwiLCB7IHZhbHVlOiB0cnVlIH0pO1xudmFyIHZub2RlXzEgPSByZXF1aXJlKFwiLi92bm9kZVwiKTtcbnZhciBodG1sZG9tYXBpXzEgPSByZXF1aXJlKFwiLi9odG1sZG9tYXBpXCIpO1xuZnVuY3Rpb24gdG9WTm9kZShub2RlLCBkb21BcGkpIHtcbiAgICB2YXIgYXBpID0gZG9tQXBpICE9PSB1bmRlZmluZWQgPyBkb21BcGkgOiBodG1sZG9tYXBpXzEuZGVmYXVsdDtcbiAgICB2YXIgdGV4dDtcbiAgICBpZiAoYXBpLmlzRWxlbWVudChub2RlKSkge1xuICAgICAgICB2YXIgaWQgPSBub2RlLmlkID8gJyMnICsgbm9kZS5pZCA6ICcnO1xuICAgICAgICB2YXIgY24gPSBub2RlLmdldEF0dHJpYnV0ZSgnY2xhc3MnKTtcbiAgICAgICAgdmFyIGMgPSBjbiA/ICcuJyArIGNuLnNwbGl0KCcgJykuam9pbignLicpIDogJyc7XG4gICAgICAgIHZhciBzZWwgPSBhcGkudGFnTmFtZShub2RlKS50b0xvd2VyQ2FzZSgpICsgaWQgKyBjO1xuICAgICAgICB2YXIgYXR0cnMgPSB7fTtcbiAgICAgICAgdmFyIGNoaWxkcmVuID0gW107XG4gICAgICAgIHZhciBuYW1lXzE7XG4gICAgICAgIHZhciBpID0gdm9pZCAwLCBuID0gdm9pZCAwO1xuICAgICAgICB2YXIgZWxtQXR0cnMgPSBub2RlLmF0dHJpYnV0ZXM7XG4gICAgICAgIHZhciBlbG1DaGlsZHJlbiA9IG5vZGUuY2hpbGROb2RlcztcbiAgICAgICAgZm9yIChpID0gMCwgbiA9IGVsbUF0dHJzLmxlbmd0aDsgaSA8IG47IGkrKykge1xuICAgICAgICAgICAgbmFtZV8xID0gZWxtQXR0cnNbaV0ubm9kZU5hbWU7XG4gICAgICAgICAgICBpZiAobmFtZV8xICE9PSAnaWQnICYmIG5hbWVfMSAhPT0gJ2NsYXNzJykge1xuICAgICAgICAgICAgICAgIGF0dHJzW25hbWVfMV0gPSBlbG1BdHRyc1tpXS5ub2RlVmFsdWU7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgZm9yIChpID0gMCwgbiA9IGVsbUNoaWxkcmVuLmxlbmd0aDsgaSA8IG47IGkrKykge1xuICAgICAgICAgICAgY2hpbGRyZW4ucHVzaCh0b1ZOb2RlKGVsbUNoaWxkcmVuW2ldKSk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHZub2RlXzEuZGVmYXVsdChzZWwsIHsgYXR0cnM6IGF0dHJzIH0sIGNoaWxkcmVuLCB1bmRlZmluZWQsIG5vZGUpO1xuICAgIH1cbiAgICBlbHNlIGlmIChhcGkuaXNUZXh0KG5vZGUpKSB7XG4gICAgICAgIHRleHQgPSBhcGkuZ2V0VGV4dENvbnRlbnQobm9kZSk7XG4gICAgICAgIHJldHVybiB2bm9kZV8xLmRlZmF1bHQodW5kZWZpbmVkLCB1bmRlZmluZWQsIHVuZGVmaW5lZCwgdGV4dCwgbm9kZSk7XG4gICAgfVxuICAgIGVsc2UgaWYgKGFwaS5pc0NvbW1lbnQobm9kZSkpIHtcbiAgICAgICAgdGV4dCA9IGFwaS5nZXRUZXh0Q29udGVudChub2RlKTtcbiAgICAgICAgcmV0dXJuIHZub2RlXzEuZGVmYXVsdCgnIScsIHt9LCBbXSwgdGV4dCwgbm9kZSk7XG4gICAgfVxuICAgIGVsc2Uge1xuICAgICAgICByZXR1cm4gdm5vZGVfMS5kZWZhdWx0KCcnLCB7fSwgW10sIHVuZGVmaW5lZCwgdW5kZWZpbmVkKTtcbiAgICB9XG59XG5leHBvcnRzLnRvVk5vZGUgPSB0b1ZOb2RlO1xuZXhwb3J0cy5kZWZhdWx0ID0gdG9WTm9kZTtcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPXRvdm5vZGUuanMubWFwIiwiXCJ1c2Ugc3RyaWN0XCI7XG5PYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgXCJfX2VzTW9kdWxlXCIsIHsgdmFsdWU6IHRydWUgfSk7XG5mdW5jdGlvbiB2bm9kZShzZWwsIGRhdGEsIGNoaWxkcmVuLCB0ZXh0LCBlbG0pIHtcbiAgICB2YXIga2V5ID0gZGF0YSA9PT0gdW5kZWZpbmVkID8gdW5kZWZpbmVkIDogZGF0YS5rZXk7XG4gICAgcmV0dXJuIHsgc2VsOiBzZWwsIGRhdGE6IGRhdGEsIGNoaWxkcmVuOiBjaGlsZHJlbixcbiAgICAgICAgdGV4dDogdGV4dCwgZWxtOiBlbG0sIGtleToga2V5IH07XG59XG5leHBvcnRzLnZub2RlID0gdm5vZGU7XG5leHBvcnRzLmRlZmF1bHQgPSB2bm9kZTtcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPXZub2RlLmpzLm1hcCJdfQ==
  45619. ;
  45620. function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
  45621. /*!
  45622. * Backbone.VDOMView
  45623. *
  45624. * MIT Licensed. Copyright (c) 2017, JC Brand <jc@opkode.com>
  45625. */
  45626. (function (root, factory) {
  45627. if (typeof define === 'function' && define.amd) {
  45628. define('backbone.vdomview',["snabbdom", "snabbdom-attributes", "snabbdom-class", "snabbdom-dataset", "snabbdom-props", "snabbdom-style", "tovnode", "underscore", "backbone"], factory);
  45629. } else if ((typeof module === "undefined" ? "undefined" : _typeof(module)) === 'object' && module.exports) {
  45630. // CommonJS-like environments
  45631. module.exports = factory(require('snabbdom'), require('snabbdom-attributes'), require('snabbdom-class'), require('snabbdom-dataset'), require('snabbdom-props'), require('snabbdom-style'), require('tovnode'), require('underscore'), require('backbone'));
  45632. }
  45633. })(void 0, function (snabbdom, snabbdom_attributes, snabbdom_class, snabbdom_dataset, snabbdom_props, snabbdom_style, tovnode, _, Backbone) {
  45634. "use strict";
  45635. var domParser = new DOMParser();
  45636. var patch = snabbdom.init([snabbdom_attributes.default, snabbdom_class.default, snabbdom_dataset.default, snabbdom_props.default, snabbdom_style.default]);
  45637. var View = _.isUndefined(Backbone.NativeView) ? Backbone.View : Backbone.NativeView;
  45638. function parseHTMLToDOM(html_str) {
  45639. /* Parses a string with HTML and returns a DOM element.
  45640. *
  45641. * Forked from vdom_parser:
  45642. * https://github.com/bitinn/vdom-parser
  45643. */
  45644. if (typeof html_str !== 'string') {
  45645. throw new Error('Invalid parameter type in parseHTMLToDOM');
  45646. }
  45647. if (!('DOMParser' in window)) {
  45648. throw new Error('DOMParser is not available, ' + 'so parsing string to DOM node is not possible.');
  45649. }
  45650. if (!html_str) {
  45651. return document.createTextNode('');
  45652. }
  45653. domParser = domParser || new DOMParser();
  45654. var doc = domParser.parseFromString(html_str, 'text/html'); // most tags default to body
  45655. if (doc.body.firstChild) {
  45656. return doc.getElementsByTagName('body')[0].firstChild; // some tags, like script and style, default to head
  45657. } else if (doc.head.firstChild && (doc.head.firstChild.tagName !== 'TITLE' || doc.title)) {
  45658. return doc.head.firstChild; // special case for html comment, cdata, doctype
  45659. } else if (doc.firstChild && doc.firstChild.tagName !== 'HTML') {
  45660. return doc.firstChild; // other element, such as whitespace, or html/body/head tag, fallback to empty text node
  45661. } else {
  45662. return document.createTextNode('');
  45663. }
  45664. }
  45665. Backbone.VDOMView = View.extend({
  45666. updateEventListeners: function updateEventListeners(old_vnode, new_vnode) {
  45667. this.setElement(new_vnode.elm);
  45668. },
  45669. render: function render() {
  45670. if (_.isFunction(this.beforeRender)) {
  45671. this.beforeRender();
  45672. }
  45673. var new_vnode = tovnode.toVNode(parseHTMLToDOM(this.toHTML()));
  45674. new_vnode.data.hook = _.extend({
  45675. create: this.updateEventListeners.bind(this),
  45676. update: this.updateEventListeners.bind(this)
  45677. });
  45678. var el = this.vnode ? this.vnode.elm : this.el;
  45679. if (el.outerHTML !== new_vnode.elm.outerHTML) {
  45680. this.vnode = patch(this.vnode || this.el, new_vnode);
  45681. }
  45682. if (_.isFunction(this.afterRender)) {
  45683. this.afterRender();
  45684. }
  45685. return this;
  45686. }
  45687. });
  45688. return Backbone.VDOMView;
  45689. });
  45690. //# sourceMappingURL=backbone.vdomview.js.map;
  45691. // Converse.js (A browser based XMPP chat client)
  45692. // http://conversejs.org
  45693. //
  45694. // Copyright (c) 2012-2017, Jan-Carel Brand <jc@opkode.com>
  45695. // Licensed under the Mozilla Public License (MPLv2)
  45696. //
  45697. /*global define */
  45698. /* This is a Converse.js plugin which add support for multi-user chat rooms, as
  45699. * specified in XEP-0045 Multi-user chat.
  45700. */
  45701. (function (root, factory) {
  45702. define('converse-muc',["form-utils", "converse-core", "converse-chatview", "converse-disco", "backbone.overview", "backbone.orderedlistview", "backbone.vdomview"], factory);
  45703. })(void 0, function (u, converse) {
  45704. "use strict";
  45705. var MUC_ROLE_WEIGHTS = {
  45706. 'moderator': 1,
  45707. 'participant': 2,
  45708. 'visitor': 3,
  45709. 'none': 4
  45710. };
  45711. var _converse$env = converse.env,
  45712. Strophe = _converse$env.Strophe,
  45713. Backbone = _converse$env.Backbone,
  45714. Promise = _converse$env.Promise,
  45715. $iq = _converse$env.$iq,
  45716. $build = _converse$env.$build,
  45717. $msg = _converse$env.$msg,
  45718. $pres = _converse$env.$pres,
  45719. b64_sha1 = _converse$env.b64_sha1,
  45720. sizzle = _converse$env.sizzle,
  45721. _ = _converse$env._,
  45722. moment = _converse$env.moment; // Add Strophe Namespaces
  45723. Strophe.addNamespace('MUC_ADMIN', Strophe.NS.MUC + "#admin");
  45724. Strophe.addNamespace('MUC_OWNER', Strophe.NS.MUC + "#owner");
  45725. Strophe.addNamespace('MUC_REGISTER', "jabber:iq:register");
  45726. Strophe.addNamespace('MUC_ROOMCONF', Strophe.NS.MUC + "#roomconfig");
  45727. Strophe.addNamespace('MUC_USER', Strophe.NS.MUC + "#user");
  45728. converse.CHATROOMS_TYPE = 'chatroom';
  45729. converse.ROOM_FEATURES = ['passwordprotected', 'unsecured', 'hidden', 'publicroom', 'membersonly', 'open', 'persistent', 'temporary', 'nonanonymous', 'semianonymous', 'moderated', 'unmoderated', 'mam_enabled'];
  45730. converse.ROOMSTATUS = {
  45731. CONNECTED: 0,
  45732. CONNECTING: 1,
  45733. NICKNAME_REQUIRED: 2,
  45734. PASSWORD_REQUIRED: 3,
  45735. DISCONNECTED: 4,
  45736. ENTERED: 5
  45737. };
  45738. converse.plugins.add('converse-muc', {
  45739. /* Optional dependencies are other plugins which might be
  45740. * overridden or relied upon, and therefore need to be loaded before
  45741. * this plugin. They are called "optional" because they might not be
  45742. * available, in which case any overrides applicable to them will be
  45743. * ignored.
  45744. *
  45745. * It's possible however to make optional dependencies non-optional.
  45746. * If the setting "strict_plugin_dependencies" is set to true,
  45747. * an error will be raised if the plugin is not found.
  45748. *
  45749. * NB: These plugins need to have already been loaded via require.js.
  45750. */
  45751. dependencies: ["converse-controlbox", "converse-chatview"],
  45752. overrides: {
  45753. // Overrides mentioned here will be picked up by converse.js's
  45754. // plugin architecture they will replace existing methods on the
  45755. // relevant objects or classes.
  45756. //
  45757. // New functions which don't exist yet can also be added.
  45758. _tearDown: function _tearDown() {
  45759. var rooms = this.chatboxes.where({
  45760. 'type': converse.CHATROOMS_TYPE
  45761. });
  45762. _.each(rooms, function (room) {
  45763. u.safeSave(room, {
  45764. 'connection_status': converse.ROOMSTATUS.DISCONNECTED
  45765. });
  45766. });
  45767. this.__super__._tearDown.call(this, arguments);
  45768. },
  45769. ChatBoxes: {
  45770. model: function model(attrs, options) {
  45771. var _converse = this.__super__._converse;
  45772. if (attrs.type == converse.CHATROOMS_TYPE) {
  45773. return new _converse.ChatRoom(attrs, options);
  45774. } else {
  45775. return this.__super__.model.apply(this, arguments);
  45776. }
  45777. }
  45778. }
  45779. },
  45780. initialize: function initialize() {
  45781. /* The initialize function gets called as soon as the plugin is
  45782. * loaded by converse.js's plugin machinery.
  45783. */
  45784. var _converse = this._converse,
  45785. __ = _converse.__;
  45786. function ___(str) {
  45787. /* This is part of a hack to get gettext to scan strings to be
  45788. * translated. Strings we cannot send to the function above because
  45789. * they require variable interpolation and we don't yet have the
  45790. * variables at scan time.
  45791. *
  45792. * See actionInfoMessages further below.
  45793. */
  45794. return str;
  45795. } // XXX: Inside plugins, all calls to the translation machinery
  45796. // (e.g. u.__) should only be done in the initialize function.
  45797. // If called before, we won't know what language the user wants,
  45798. // and it'll fall back to English.
  45799. /* http://xmpp.org/extensions/xep-0045.html
  45800. * ----------------------------------------
  45801. * 100 message Entering a room Inform user that any occupant is allowed to see the user's full JID
  45802. * 101 message (out of band) Affiliation change Inform user that his or her affiliation changed while not in the room
  45803. * 102 message Configuration change Inform occupants that room now shows unavailable members
  45804. * 103 message Configuration change Inform occupants that room now does not show unavailable members
  45805. * 104 message Configuration change Inform occupants that a non-privacy-related room configuration change has occurred
  45806. * 110 presence Any room presence Inform user that presence refers to one of its own room occupants
  45807. * 170 message or initial presence Configuration change Inform occupants that room logging is now enabled
  45808. * 171 message Configuration change Inform occupants that room logging is now disabled
  45809. * 172 message Configuration change Inform occupants that the room is now non-anonymous
  45810. * 173 message Configuration change Inform occupants that the room is now semi-anonymous
  45811. * 174 message Configuration change Inform occupants that the room is now fully-anonymous
  45812. * 201 presence Entering a room Inform user that a new room has been created
  45813. * 210 presence Entering a room Inform user that the service has assigned or modified the occupant's roomnick
  45814. * 301 presence Removal from room Inform user that he or she has been banned from the room
  45815. * 303 presence Exiting a room Inform all occupants of new room nickname
  45816. * 307 presence Removal from room Inform user that he or she has been kicked from the room
  45817. * 321 presence Removal from room Inform user that he or she is being removed from the room because of an affiliation change
  45818. * 322 presence Removal from room Inform user that he or she is being removed from the room because the room has been changed to members-only and the user is not a member
  45819. * 332 presence Removal from room Inform user that he or she is being removed from the room because of a system shutdown
  45820. */
  45821. _converse.muc = {
  45822. info_messages: {
  45823. 100: __('This room is not anonymous'),
  45824. 102: __('This room now shows unavailable members'),
  45825. 103: __('This room does not show unavailable members'),
  45826. 104: __('The room configuration has changed'),
  45827. 170: __('Room logging is now enabled'),
  45828. 171: __('Room logging is now disabled'),
  45829. 172: __('This room is now no longer anonymous'),
  45830. 173: __('This room is now semi-anonymous'),
  45831. 174: __('This room is now fully-anonymous'),
  45832. 201: __('A new room has been created')
  45833. },
  45834. disconnect_messages: {
  45835. 301: __('You have been banned from this room'),
  45836. 307: __('You have been kicked from this room'),
  45837. 321: __("You have been removed from this room because of an affiliation change"),
  45838. 322: __("You have been removed from this room because the room has changed to members-only and you're not a member"),
  45839. 332: __("You have been removed from this room because the MUC (Multi-user chat) service is being shut down")
  45840. },
  45841. action_info_messages: {
  45842. /* XXX: Note the triple underscore function and not double
  45843. * underscore.
  45844. *
  45845. * This is a hack. We can't pass the strings to __ because we
  45846. * don't yet know what the variable to interpolate is.
  45847. *
  45848. * Triple underscore will just return the string again, but we
  45849. * can then at least tell gettext to scan for it so that these
  45850. * strings are picked up by the translation machinery.
  45851. */
  45852. 301: ___("%1$s has been banned"),
  45853. 303: ___("%1$s's nickname has changed"),
  45854. 307: ___("%1$s has been kicked out"),
  45855. 321: ___("%1$s has been removed because of an affiliation change"),
  45856. 322: ___("%1$s has been removed for not being a member")
  45857. },
  45858. new_nickname_messages: {
  45859. 210: ___('Your nickname has been automatically set to %1$s'),
  45860. 303: ___('Your nickname has been changed to %1$s')
  45861. }
  45862. }; // Configuration values for this plugin
  45863. // ====================================
  45864. // Refer to docs/source/configuration.rst for explanations of these
  45865. // configuration settings.
  45866. _converse.api.settings.update({
  45867. allow_muc: true,
  45868. allow_muc_invitations: true,
  45869. auto_join_on_invite: false,
  45870. auto_join_rooms: [],
  45871. auto_list_rooms: false,
  45872. hide_muc_server: false,
  45873. muc_disable_moderator_commands: false,
  45874. muc_domain: undefined,
  45875. muc_history_max_stanzas: undefined,
  45876. muc_instant_rooms: true,
  45877. muc_nickname_from_jid: false,
  45878. muc_show_join_leave: true,
  45879. visible_toolbar_buttons: {
  45880. 'toggle_occupants': true
  45881. }
  45882. });
  45883. _converse.api.promises.add(['roomsAutoJoined']);
  45884. function openRoom(jid) {
  45885. if (!u.isValidMUCJID(jid)) {
  45886. return _converse.log("Invalid JID \"".concat(jid, "\" provided in URL fragment"), Strophe.LogLevel.WARN);
  45887. }
  45888. var promises = [_converse.api.waitUntil('roomsAutoJoined')];
  45889. if (_converse.allow_bookmarks) {
  45890. promises.push(_converse.api.waitUntil('bookmarksInitialized'));
  45891. }
  45892. Promise.all(promises).then(function () {
  45893. _converse.api.rooms.open(jid);
  45894. });
  45895. }
  45896. _converse.router.route('converse/room?jid=:jid', openRoom);
  45897. _converse.openChatRoom = function (jid, settings, bring_to_foreground) {
  45898. /* Opens a chat room, making sure that certain attributes
  45899. * are correct, for example that the "type" is set to
  45900. * "chatroom".
  45901. */
  45902. settings.type = converse.CHATROOMS_TYPE;
  45903. settings.id = jid;
  45904. settings.box_id = b64_sha1(jid);
  45905. var chatbox = _converse.chatboxes.getChatBox(jid, settings, true);
  45906. chatbox.trigger('show', true);
  45907. return chatbox;
  45908. };
  45909. _converse.ChatRoom = _converse.ChatBox.extend({
  45910. defaults: function defaults() {
  45911. return _.assign(_.clone(_converse.ChatBox.prototype.defaults), _.zipObject(converse.ROOM_FEATURES, _.map(converse.ROOM_FEATURES, _.stubFalse)), {
  45912. // For group chats, we distinguish between generally unread
  45913. // messages and those ones that specifically mention the
  45914. // user.
  45915. //
  45916. // To keep things simple, we reuse `num_unread` from
  45917. // _converse.ChatBox to indicate unread messages which
  45918. // mention the user and `num_unread_general` to indicate
  45919. // generally unread messages (which *includes* mentions!).
  45920. 'num_unread_general': 0,
  45921. 'affiliation': null,
  45922. 'connection_status': converse.ROOMSTATUS.DISCONNECTED,
  45923. 'name': '',
  45924. 'description': '',
  45925. 'features_fetched': false,
  45926. 'roomconfig': {},
  45927. 'type': converse.CHATROOMS_TYPE
  45928. });
  45929. },
  45930. isUserMentioned: function isUserMentioned(message) {
  45931. /* Returns a boolean to indicate whether the current user
  45932. * was mentioned in a message.
  45933. *
  45934. * Parameters:
  45935. * (String): The text message
  45936. */
  45937. return new RegExp("\\b".concat(this.get('nick'), "\\b")).test(message);
  45938. },
  45939. incrementUnreadMsgCounter: function incrementUnreadMsgCounter(stanza) {
  45940. /* Given a newly received message, update the unread counter if
  45941. * necessary.
  45942. *
  45943. * Parameters:
  45944. * (XMLElement): The <messsage> stanza
  45945. */
  45946. var body = stanza.querySelector('body');
  45947. if (_.isNull(body)) {
  45948. return; // The message has no text
  45949. }
  45950. if (u.isNewMessage(stanza) && this.newMessageWillBeHidden()) {
  45951. this.save({
  45952. 'num_unread_general': this.get('num_unread_general') + 1
  45953. });
  45954. if (this.isUserMentioned(body.textContent)) {
  45955. this.save({
  45956. 'num_unread': this.get('num_unread') + 1
  45957. });
  45958. _converse.incrementMsgCounter();
  45959. }
  45960. }
  45961. },
  45962. clearUnreadMsgCounter: function clearUnreadMsgCounter() {
  45963. u.safeSave(this, {
  45964. 'num_unread': 0,
  45965. 'num_unread_general': 0
  45966. });
  45967. }
  45968. });
  45969. _converse.ChatRoomOccupant = Backbone.Model.extend({
  45970. initialize: function initialize(attributes) {
  45971. this.set(_.extend({
  45972. 'id': _converse.connection.getUniqueId()
  45973. }, attributes));
  45974. }
  45975. });
  45976. _converse.ChatRoomOccupants = Backbone.Collection.extend({
  45977. model: _converse.ChatRoomOccupant,
  45978. comparator: function comparator(occupant1, occupant2) {
  45979. var role1 = occupant1.get('role') || 'none';
  45980. var role2 = occupant2.get('role') || 'none';
  45981. if (MUC_ROLE_WEIGHTS[role1] === MUC_ROLE_WEIGHTS[role2]) {
  45982. var nick1 = occupant1.get('nick').toLowerCase();
  45983. var nick2 = occupant2.get('nick').toLowerCase();
  45984. return nick1 < nick2 ? -1 : nick1 > nick2 ? 1 : 0;
  45985. } else {
  45986. return MUC_ROLE_WEIGHTS[role1] < MUC_ROLE_WEIGHTS[role2] ? -1 : 1;
  45987. }
  45988. }
  45989. });
  45990. _converse.RoomsPanelModel = Backbone.Model.extend({
  45991. defaults: {
  45992. 'muc_domain': ''
  45993. }
  45994. });
  45995. _converse.onDirectMUCInvitation = function (message) {
  45996. /* A direct MUC invitation to join a room has been received
  45997. * See XEP-0249: Direct MUC invitations.
  45998. *
  45999. * Parameters:
  46000. * (XMLElement) message: The message stanza containing the
  46001. * invitation.
  46002. */
  46003. var x_el = sizzle('x[xmlns="jabber:x:conference"]', message).pop(),
  46004. from = Strophe.getBareJidFromJid(message.getAttribute('from')),
  46005. room_jid = x_el.getAttribute('jid'),
  46006. reason = x_el.getAttribute('reason');
  46007. var contact = _converse.roster.get(from),
  46008. result;
  46009. if (_converse.auto_join_on_invite) {
  46010. result = true;
  46011. } else {
  46012. // Invite request might come from someone not your roster list
  46013. contact = contact ? contact.get('fullname') : Strophe.getNodeFromJid(from);
  46014. if (!reason) {
  46015. result = confirm(__("%1$s has invited you to join a chat room: %2$s", contact, room_jid));
  46016. } else {
  46017. result = confirm(__('%1$s has invited you to join a chat room: %2$s, and left the following reason: "%3$s"', contact, room_jid, reason));
  46018. }
  46019. }
  46020. if (result === true) {
  46021. var chatroom = _converse.openChatRoom(room_jid, {
  46022. 'password': x_el.getAttribute('password')
  46023. });
  46024. if (chatroom.get('connection_status') === converse.ROOMSTATUS.DISCONNECTED) {
  46025. _converse.chatboxviews.get(room_jid).join();
  46026. }
  46027. }
  46028. };
  46029. if (_converse.allow_muc_invitations) {
  46030. var registerDirectInvitationHandler = function registerDirectInvitationHandler() {
  46031. _converse.connection.addHandler(function (message) {
  46032. _converse.onDirectMUCInvitation(message);
  46033. return true;
  46034. }, 'jabber:x:conference', 'message');
  46035. };
  46036. _converse.on('connected', registerDirectInvitationHandler);
  46037. _converse.on('reconnected', registerDirectInvitationHandler);
  46038. }
  46039. var getChatRoom = function getChatRoom(jid, attrs, create) {
  46040. jid = jid.toLowerCase();
  46041. attrs.type = converse.CHATROOMS_TYPE;
  46042. attrs.id = jid;
  46043. attrs.box_id = b64_sha1(jid);
  46044. return _converse.chatboxes.getChatBox(jid, attrs, create);
  46045. };
  46046. var createChatRoom = function createChatRoom(jid, attrs) {
  46047. return getChatRoom(jid, attrs, true);
  46048. };
  46049. function autoJoinRooms() {
  46050. /* Automatically join chat rooms, based on the
  46051. * "auto_join_rooms" configuration setting, which is an array
  46052. * of strings (room JIDs) or objects (with room JID and other
  46053. * settings).
  46054. */
  46055. _.each(_converse.auto_join_rooms, function (room) {
  46056. if (_converse.chatboxes.where({
  46057. 'jid': room
  46058. }).length) {
  46059. return;
  46060. }
  46061. if (_.isString(room)) {
  46062. _converse.api.rooms.open(room);
  46063. } else if (_.isObject(room)) {
  46064. _converse.api.rooms.open(room.jid, room.nick);
  46065. } else {
  46066. _converse.log('Invalid room criteria specified for "auto_join_rooms"', Strophe.LogLevel.ERROR);
  46067. }
  46068. });
  46069. _converse.emit('roomsAutoJoined');
  46070. }
  46071. function reconnectToChatRooms() {
  46072. /* Upon a reconnection event from converse, join again
  46073. * all the open chat rooms.
  46074. */
  46075. _converse.chatboxviews.each(function (view) {
  46076. if (view.model.get('type') === converse.CHATROOMS_TYPE) {
  46077. view.model.save('connection_status', converse.ROOMSTATUS.DISCONNECTED);
  46078. view.registerHandlers();
  46079. view.join();
  46080. view.fetchMessages();
  46081. }
  46082. });
  46083. }
  46084. function disconnectChatRooms() {
  46085. /* When disconnecting, or reconnecting, mark all chat rooms as
  46086. * disconnected, so that they will be properly entered again
  46087. * when fetched from session storage.
  46088. */
  46089. _converse.chatboxes.each(function (model) {
  46090. if (model.get('type') === converse.CHATROOMS_TYPE) {
  46091. model.save('connection_status', converse.ROOMSTATUS.DISCONNECTED);
  46092. }
  46093. });
  46094. }
  46095. /************************ BEGIN Event Handlers ************************/
  46096. _converse.on('addClientFeatures', function () {
  46097. if (_converse.allow_muc) {
  46098. _converse.connection.disco.addFeature(Strophe.NS.MUC);
  46099. }
  46100. if (_converse.allow_muc_invitations) {
  46101. _converse.connection.disco.addFeature('jabber:x:conference'); // Invites
  46102. }
  46103. });
  46104. _converse.on('chatBoxesFetched', autoJoinRooms);
  46105. _converse.on('reconnected', reconnectToChatRooms);
  46106. _converse.on('reconnecting', disconnectChatRooms);
  46107. _converse.on('disconnecting', disconnectChatRooms);
  46108. /************************ END Event Handlers ************************/
  46109. /************************ BEGIN API ************************/
  46110. // We extend the default converse.js API to add methods specific to MUC chat rooms.
  46111. _.extend(_converse.api, {
  46112. 'rooms': {
  46113. 'close': function close(jids) {
  46114. if (_.isUndefined(jids)) {
  46115. // FIXME: can't access views here
  46116. _converse.chatboxviews.each(function (view) {
  46117. if (view.is_chatroom && view.model) {
  46118. view.close();
  46119. }
  46120. });
  46121. } else if (_.isString(jids)) {
  46122. var view = _converse.chatboxviews.get(jids);
  46123. if (view) {
  46124. view.close();
  46125. }
  46126. } else {
  46127. _.each(jids, function (jid) {
  46128. var view = _converse.chatboxviews.get(jid);
  46129. if (view) {
  46130. view.close();
  46131. }
  46132. });
  46133. }
  46134. },
  46135. 'create': function create(jids, attrs) {
  46136. if (_.isString(attrs)) {
  46137. attrs = {
  46138. 'nick': attrs
  46139. };
  46140. } else if (_.isUndefined(attrs)) {
  46141. attrs = {};
  46142. }
  46143. if (_.isUndefined(attrs.maximize)) {
  46144. attrs.maximize = false;
  46145. }
  46146. if (!attrs.nick && _converse.muc_nickname_from_jid) {
  46147. attrs.nick = Strophe.getNodeFromJid(_converse.bare_jid);
  46148. }
  46149. if (_.isUndefined(jids)) {
  46150. throw new TypeError('rooms.create: You need to provide at least one JID');
  46151. } else if (_.isString(jids)) {
  46152. return createChatRoom(jids, attrs);
  46153. }
  46154. return _.map(jids, _.partial(createChatRoom, _, attrs));
  46155. },
  46156. 'open': function open(jids, attrs) {
  46157. if (_.isUndefined(jids)) {
  46158. throw new TypeError('rooms.open: You need to provide at least one JID');
  46159. } else if (_.isString(jids)) {
  46160. return _converse.api.rooms.create(jids, attrs).trigger('show');
  46161. }
  46162. return _.map(jids, function (jid) {
  46163. return _converse.api.rooms.create(jid, attrs).trigger('show');
  46164. });
  46165. },
  46166. 'get': function get(jids, attrs, create) {
  46167. if (_.isString(attrs)) {
  46168. attrs = {
  46169. 'nick': attrs
  46170. };
  46171. } else if (_.isUndefined(attrs)) {
  46172. attrs = {};
  46173. }
  46174. if (_.isUndefined(jids)) {
  46175. var result = [];
  46176. _converse.chatboxes.each(function (chatbox) {
  46177. if (chatbox.get('type') === converse.CHATROOMS_TYPE) {
  46178. result.push(chatbox);
  46179. }
  46180. });
  46181. return result;
  46182. }
  46183. if (!attrs.nick) {
  46184. attrs.nick = Strophe.getNodeFromJid(_converse.bare_jid);
  46185. }
  46186. if (_.isString(jids)) {
  46187. return getChatRoom(jids, attrs);
  46188. }
  46189. return _.map(jids, _.partial(getChatRoom, _, attrs));
  46190. }
  46191. }
  46192. });
  46193. /************************ END API ************************/
  46194. }
  46195. });
  46196. });
  46197. //# sourceMappingURL=converse-muc.js.map;
  46198. // Converse.js (A browser based XMPP chat client)
  46199. // http://conversejs.org
  46200. //
  46201. // Copyright (c) 2012-2017, Jan-Carel Brand <jc@opkode.com>
  46202. // Licensed under the Mozilla Public License (MPLv2)
  46203. //
  46204. (function (root, factory) {
  46205. define('converse-muc-embedded',["converse-core", "converse-muc"], factory);
  46206. })(void 0, function (converse) {
  46207. "use strict";
  46208. var _converse$env = converse.env,
  46209. Backbone = _converse$env.Backbone,
  46210. _ = _converse$env._;
  46211. converse.plugins.add('converse-muc-embedded', {
  46212. enabled: function enabled(_converse) {
  46213. return _converse.view_mode === 'embedded';
  46214. },
  46215. overrides: {
  46216. // Overrides mentioned here will be picked up by converse.js's
  46217. // plugin architecture they will replace existing methods on the
  46218. // relevant objects or classes.
  46219. //
  46220. // New functions which don't exist yet can also be added.
  46221. ChatBoxViews: {
  46222. initialize: function initialize() {
  46223. this.__super__.initialize.apply(this, arguments);
  46224. this.el.classList.add('converse-embedded');
  46225. }
  46226. }
  46227. },
  46228. initialize: function initialize() {
  46229. /* The initialize function gets called as soon as the plugin is
  46230. * loaded by converse.js's plugin machinery.
  46231. */
  46232. this._converse.api.settings.update({
  46233. 'allow_logout': false,
  46234. // No point in logging out when we have auto_login as true.
  46235. 'allow_muc_invitations': false,
  46236. // Doesn't make sense to allow because only
  46237. // roster contacts can be invited
  46238. 'hide_muc_server': true // Federation is disabled, so no use in
  46239. // showing the MUC server.
  46240. });
  46241. var _converse = this._converse;
  46242. if (!_.isArray(_converse.auto_join_rooms)) {
  46243. throw new Error("converse-muc-embedded: auto_join_rooms must be an Array");
  46244. }
  46245. if (_converse.auto_join_rooms.length !== 1) {
  46246. throw new Error("converse-muc-embedded: It doesn't make " + "sense to have the auto_join_rooms setting to zero or " + "more then one, since only one chat room can be open " + "at any time.");
  46247. }
  46248. }
  46249. });
  46250. });
  46251. //# sourceMappingURL=converse-muc-embedded.js.map;
  46252. /*
  46253. * Based on Ping Strophejs plugins (https://github.com/metajack/strophejs-plugins/tree/master/ping)
  46254. * This plugin is distributed under the terms of the MIT licence.
  46255. * Please see the LICENCE file for details.
  46256. *
  46257. * Copyright (c) Markus Kohlhase, 2010
  46258. * Refactored by Pavel Lang, 2011
  46259. * AMD Support added by Thierry
  46260. */
  46261. /**
  46262. * File: strophe.ping.js
  46263. * A Strophe plugin for XMPP Ping ( http://xmpp.org/extensions/xep-0199.html )
  46264. */
  46265. (function (root, factory) {
  46266. if (typeof define === 'function' && define.amd) {
  46267. // AMD. Register as an anonymous module.
  46268. define('strophe.ping',[
  46269. "strophe"
  46270. ], function (Strophe) {
  46271. factory(
  46272. Strophe.Strophe,
  46273. Strophe.$build,
  46274. Strophe.$iq ,
  46275. Strophe.$msg,
  46276. Strophe.$pres
  46277. );
  46278. return Strophe;
  46279. });
  46280. } else {
  46281. // Browser globals
  46282. factory(
  46283. root.Strophe,
  46284. root.$build,
  46285. root.$iq ,
  46286. root.$msg,
  46287. root.$pres
  46288. );
  46289. }
  46290. }(this, function (Strophe, $build, $iq, $msg, $pres) {
  46291. Strophe.addConnectionPlugin('ping', {
  46292. _c: null,
  46293. // called by the Strophe.Connection constructor
  46294. init: function(conn) {
  46295. this._c = conn;
  46296. Strophe.addNamespace('PING', "urn:xmpp:ping");
  46297. },
  46298. /**
  46299. * Function: ping
  46300. *
  46301. * Parameters:
  46302. * (String) to - The JID you want to ping
  46303. * (Function) success - Callback function on success
  46304. * (Function) error - Callback function on error
  46305. * (Integer) timeout - Timeout in milliseconds
  46306. */
  46307. ping: function(jid, success, error, timeout) {
  46308. var id = this._c.getUniqueId('ping');
  46309. var iq = $iq({type: 'get', to: jid, id: id}).c(
  46310. 'ping', {xmlns: Strophe.NS.PING});
  46311. this._c.sendIQ(iq, success, error, timeout);
  46312. },
  46313. /**
  46314. * Function: pong
  46315. *
  46316. * Parameters:
  46317. * (Object) ping - The ping stanza from the server.
  46318. */
  46319. pong: function(ping) {
  46320. var from = ping.getAttribute('from');
  46321. var id = ping.getAttribute('id');
  46322. var iq = $iq({type: 'result', to: from,id: id});
  46323. this._c.sendIQ(iq);
  46324. },
  46325. /**
  46326. * Function: addPingHandler
  46327. *
  46328. * Parameters:
  46329. * (Function) handler - Ping handler
  46330. *
  46331. * Returns:
  46332. * A reference to the handler that can be used to remove it.
  46333. */
  46334. addPingHandler: function(handler) {
  46335. return this._c.addHandler(handler, Strophe.NS.PING, "iq", "get");
  46336. }
  46337. });
  46338. }));
  46339. // Converse.js (A browser based XMPP chat client)
  46340. // http://conversejs.org
  46341. //
  46342. // Copyright (c) 2012-2017, Jan-Carel Brand <jc@opkode.com>
  46343. // Licensed under the Mozilla Public License (MPLv2)
  46344. //
  46345. /*global define */
  46346. /* This is a Converse.js plugin which add support for application-level pings
  46347. * as specified in XEP-0199 XMPP Ping.
  46348. */
  46349. (function (root, factory) {
  46350. define('converse-ping',["converse-core", "strophe.ping"], factory);
  46351. })(void 0, function (converse) {
  46352. "use strict"; // Strophe methods for building stanzas
  46353. var _converse$env = converse.env,
  46354. Strophe = _converse$env.Strophe,
  46355. _ = _converse$env._;
  46356. converse.plugins.add('converse-ping', {
  46357. initialize: function initialize() {
  46358. /* The initialize function gets called as soon as the plugin is
  46359. * loaded by converse.js's plugin machinery.
  46360. */
  46361. var _converse = this._converse;
  46362. _converse.api.settings.update({
  46363. ping_interval: 180 //in seconds
  46364. });
  46365. _converse.ping = function (jid, success, error, timeout) {
  46366. // XXX: We could first check here if the server advertised that
  46367. // it supports PING.
  46368. // However, some servers don't advertise while still keeping the
  46369. // connection option due to pings.
  46370. //
  46371. // var feature = _converse.disco_entities[_converse.domain].features.findWhere({'var': Strophe.NS.PING});
  46372. _converse.lastStanzaDate = new Date();
  46373. if (_.isNil(jid)) {
  46374. jid = Strophe.getDomainFromJid(_converse.bare_jid);
  46375. }
  46376. if (_.isUndefined(timeout)) {
  46377. timeout = null;
  46378. }
  46379. if (_.isUndefined(success)) {
  46380. success = null;
  46381. }
  46382. if (_.isUndefined(error)) {
  46383. error = null;
  46384. }
  46385. if (_converse.connection) {
  46386. _converse.connection.ping.ping(jid, success, error, timeout);
  46387. return true;
  46388. }
  46389. return false;
  46390. };
  46391. _converse.pong = function (ping) {
  46392. _converse.lastStanzaDate = new Date();
  46393. _converse.connection.ping.pong(ping);
  46394. return true;
  46395. };
  46396. _converse.registerPongHandler = function () {
  46397. if (!_.isUndefined(_converse.connection.disco)) {
  46398. _converse.connection.disco.addFeature(Strophe.NS.PING);
  46399. }
  46400. _converse.connection.ping.addPingHandler(_converse.pong);
  46401. };
  46402. _converse.registerPingHandler = function () {
  46403. _converse.registerPongHandler();
  46404. if (_converse.ping_interval > 0) {
  46405. _converse.connection.addHandler(function () {
  46406. /* Handler on each stanza, saves the received date
  46407. * in order to ping only when needed.
  46408. */
  46409. _converse.lastStanzaDate = new Date();
  46410. return true;
  46411. });
  46412. _converse.connection.addTimedHandler(1000, function () {
  46413. var now = new Date();
  46414. if (!_converse.lastStanzaDate) {
  46415. _converse.lastStanzaDate = now;
  46416. }
  46417. if ((now - _converse.lastStanzaDate) / 1000 > _converse.ping_interval) {
  46418. return _converse.ping();
  46419. }
  46420. return true;
  46421. });
  46422. }
  46423. };
  46424. var onConnected = function onConnected() {
  46425. // Wrapper so that we can spy on registerPingHandler in tests
  46426. _converse.registerPingHandler();
  46427. };
  46428. _converse.on('connected', onConnected);
  46429. _converse.on('reconnected', onConnected);
  46430. }
  46431. });
  46432. });
  46433. //# sourceMappingURL=converse-ping.js.map;
  46434. // Converse.js (A browser based XMPP chat client)
  46435. // http://conversejs.org
  46436. //
  46437. // Copyright (c) 2012-2017, Jan-Carel Brand <jc@opkode.com>
  46438. // Licensed under the Mozilla Public License (MPLv2)
  46439. //
  46440. /*global define */
  46441. (function (root, factory) {
  46442. define('converse-notification',["converse-core"], factory);
  46443. })(void 0, function (converse) {
  46444. "use strict";
  46445. var _converse$env = converse.env,
  46446. utils = _converse$env.utils,
  46447. Strophe = _converse$env.Strophe,
  46448. _ = _converse$env._;
  46449. converse.plugins.add('converse-notification', {
  46450. initialize: function initialize() {
  46451. /* The initialize function gets called as soon as the plugin is
  46452. * loaded by converse.js's plugin machinery.
  46453. */
  46454. var _converse = this._converse;
  46455. var __ = _converse.__;
  46456. _converse.supports_html5_notification = "Notification" in window;
  46457. _converse.api.settings.update({
  46458. notify_all_room_messages: false,
  46459. show_desktop_notifications: true,
  46460. show_chatstate_notifications: false,
  46461. chatstate_notification_blacklist: [],
  46462. // ^ a list of JIDs to ignore concerning chat state notifications
  46463. play_sounds: true,
  46464. sounds_path: '/sounds/',
  46465. notification_icon: '/logo/conversejs128.png'
  46466. });
  46467. _converse.isOnlyChatStateNotification = function (msg) {
  46468. return (// See XEP-0085 Chat State Notification
  46469. _.isNull(msg.querySelector('body')) && (_.isNull(msg.querySelector(_converse.ACTIVE)) || _.isNull(msg.querySelector(_converse.COMPOSING)) || _.isNull(msg.querySelector(_converse.INACTIVE)) || _.isNull(msg.querySelector(_converse.PAUSED)) || _.isNull(msg.querySelector(_converse.GONE)))
  46470. );
  46471. };
  46472. _converse.shouldNotifyOfGroupMessage = function (message) {
  46473. /* Is this a group message worthy of notification?
  46474. */
  46475. var notify_all = _converse.notify_all_room_messages;
  46476. var jid = message.getAttribute('from'),
  46477. resource = Strophe.getResourceFromJid(jid),
  46478. room_jid = Strophe.getBareJidFromJid(jid),
  46479. sender = resource && Strophe.unescapeNode(resource) || '';
  46480. if (sender === '' || message.querySelectorAll('delay').length > 0) {
  46481. return false;
  46482. }
  46483. var room = _converse.chatboxes.get(room_jid);
  46484. var body = message.querySelector('body');
  46485. if (_.isNull(body)) {
  46486. return false;
  46487. }
  46488. var mentioned = new RegExp("\\b".concat(room.get('nick'), "\\b")).test(body.textContent);
  46489. notify_all = notify_all === true || _.isArray(notify_all) && _.includes(notify_all, room_jid);
  46490. if (sender === room.get('nick') || !notify_all && !mentioned) {
  46491. return false;
  46492. }
  46493. return true;
  46494. };
  46495. _converse.isMessageToHiddenChat = function (message) {
  46496. if (_.includes(['mobile', 'fullscreen', 'embedded'], _converse.view_mode)) {
  46497. var jid = Strophe.getBareJidFromJid(message.getAttribute('from'));
  46498. var model = _converse.chatboxes.get(jid);
  46499. if (!_.isNil(model)) {
  46500. return model.get('hidden') || _converse.windowState === 'hidden';
  46501. }
  46502. return true;
  46503. }
  46504. return _converse.windowState === 'hidden';
  46505. };
  46506. _converse.shouldNotifyOfMessage = function (message) {
  46507. /* Is this a message worthy of notification?
  46508. */
  46509. if (utils.isOTRMessage(message)) {
  46510. return false;
  46511. }
  46512. var forwarded = message.querySelector('forwarded');
  46513. if (!_.isNull(forwarded)) {
  46514. return false;
  46515. } else if (message.getAttribute('type') === 'groupchat') {
  46516. return _converse.shouldNotifyOfGroupMessage(message);
  46517. } else if (utils.isHeadlineMessage(_converse, message)) {
  46518. // We want to show notifications for headline messages.
  46519. return _converse.isMessageToHiddenChat(message);
  46520. }
  46521. var is_me = Strophe.getBareJidFromJid(message.getAttribute('from')) === _converse.bare_jid;
  46522. return !_converse.isOnlyChatStateNotification(message) && !is_me && _converse.isMessageToHiddenChat(message);
  46523. };
  46524. _converse.playSoundNotification = function () {
  46525. /* Plays a sound to notify that a new message was recieved.
  46526. */
  46527. // XXX Eventually this can be refactored to use Notification's sound
  46528. // feature, but no browser currently supports it.
  46529. // https://developer.mozilla.org/en-US/docs/Web/API/notification/sound
  46530. var audio;
  46531. if (_converse.play_sounds && !_.isUndefined(window.Audio)) {
  46532. audio = new Audio(_converse.sounds_path + "msg_received.ogg");
  46533. if (audio.canPlayType('audio/ogg')) {
  46534. audio.play();
  46535. } else {
  46536. audio = new Audio(_converse.sounds_path + "msg_received.mp3");
  46537. if (audio.canPlayType('audio/mp3')) {
  46538. audio.play();
  46539. }
  46540. }
  46541. }
  46542. };
  46543. _converse.areDesktopNotificationsEnabled = function () {
  46544. return _converse.supports_html5_notification && _converse.show_desktop_notifications && Notification.permission === "granted";
  46545. };
  46546. _converse.showMessageNotification = function (message) {
  46547. /* Shows an HTML5 Notification to indicate that a new chat
  46548. * message was received.
  46549. */
  46550. var title, roster_item;
  46551. var full_from_jid = message.getAttribute('from'),
  46552. from_jid = Strophe.getBareJidFromJid(full_from_jid);
  46553. if (message.getAttribute('type') === 'headline') {
  46554. if (!_.includes(from_jid, '@') || _converse.allow_non_roster_messaging) {
  46555. title = __("Notification from %1$s", from_jid);
  46556. } else {
  46557. return;
  46558. }
  46559. } else if (!_.includes(from_jid, '@')) {
  46560. // workaround for Prosody which doesn't give type "headline"
  46561. title = __("Notification from %1$s", from_jid);
  46562. } else if (message.getAttribute('type') === 'groupchat') {
  46563. title = __("%1$s says", Strophe.getResourceFromJid(full_from_jid));
  46564. } else {
  46565. if (_.isUndefined(_converse.roster)) {
  46566. _converse.log("Could not send notification, because roster is undefined", Strophe.LogLevel.ERROR);
  46567. return;
  46568. }
  46569. roster_item = _converse.roster.get(from_jid);
  46570. if (!_.isUndefined(roster_item)) {
  46571. title = __("%1$s says", roster_item.get('fullname'));
  46572. } else {
  46573. if (_converse.allow_non_roster_messaging) {
  46574. title = __("%1$s says", from_jid);
  46575. } else {
  46576. return;
  46577. }
  46578. }
  46579. }
  46580. var n = new Notification(title, {
  46581. body: message.querySelector('body').textContent,
  46582. lang: _converse.locale,
  46583. icon: _converse.notification_icon
  46584. });
  46585. setTimeout(n.close.bind(n), 5000);
  46586. };
  46587. _converse.showChatStateNotification = function (contact) {
  46588. /* Creates an HTML5 Notification to inform of a change in a
  46589. * contact's chat state.
  46590. */
  46591. if (_.includes(_converse.chatstate_notification_blacklist, contact.jid)) {
  46592. // Don't notify if the user is being ignored.
  46593. return;
  46594. }
  46595. var chat_state = contact.chat_status;
  46596. var message = null;
  46597. if (chat_state === 'offline') {
  46598. message = __('has gone offline');
  46599. } else if (chat_state === 'away') {
  46600. message = __('has gone away');
  46601. } else if (chat_state === 'dnd') {
  46602. message = __('is busy');
  46603. } else if (chat_state === 'online') {
  46604. message = __('has come online');
  46605. }
  46606. if (message === null) {
  46607. return;
  46608. }
  46609. var n = new Notification(contact.fullname, {
  46610. body: message,
  46611. lang: _converse.locale,
  46612. icon: _converse.notification_icon
  46613. });
  46614. setTimeout(n.close.bind(n), 5000);
  46615. };
  46616. _converse.showContactRequestNotification = function (contact) {
  46617. var n = new Notification(contact.fullname, {
  46618. body: __('wants to be your contact'),
  46619. lang: _converse.locale,
  46620. icon: _converse.notification_icon
  46621. });
  46622. setTimeout(n.close.bind(n), 5000);
  46623. };
  46624. _converse.showFeedbackNotification = function (data) {
  46625. if (data.klass === 'error' || data.klass === 'warn') {
  46626. var n = new Notification(data.subject, {
  46627. body: data.message,
  46628. lang: _converse.locale,
  46629. icon: _converse.notification_icon
  46630. });
  46631. setTimeout(n.close.bind(n), 5000);
  46632. }
  46633. };
  46634. _converse.handleChatStateNotification = function (contact) {
  46635. /* Event handler for on('contactStatusChanged').
  46636. * Will show an HTML5 notification to indicate that the chat
  46637. * status has changed.
  46638. */
  46639. if (_converse.areDesktopNotificationsEnabled() && _converse.show_chatstate_notifications) {
  46640. _converse.showChatStateNotification(contact);
  46641. }
  46642. };
  46643. _converse.handleMessageNotification = function (data) {
  46644. /* Event handler for the on('message') event. Will call methods
  46645. * to play sounds and show HTML5 notifications.
  46646. */
  46647. var message = data.stanza;
  46648. if (!_converse.shouldNotifyOfMessage(message)) {
  46649. return false;
  46650. }
  46651. _converse.playSoundNotification();
  46652. if (_converse.areDesktopNotificationsEnabled()) {
  46653. _converse.showMessageNotification(message);
  46654. }
  46655. };
  46656. _converse.handleContactRequestNotification = function (contact) {
  46657. if (_converse.areDesktopNotificationsEnabled(true)) {
  46658. _converse.showContactRequestNotification(contact);
  46659. }
  46660. };
  46661. _converse.handleFeedback = function (data) {
  46662. if (_converse.areDesktopNotificationsEnabled(true)) {
  46663. _converse.showFeedbackNotification(data);
  46664. }
  46665. };
  46666. _converse.requestPermission = function () {
  46667. if (_converse.supports_html5_notification && !_.includes(['denied', 'granted'], Notification.permission)) {
  46668. // Ask user to enable HTML5 notifications
  46669. Notification.requestPermission();
  46670. }
  46671. };
  46672. _converse.on('pluginsInitialized', function () {
  46673. // We only register event handlers after all plugins are
  46674. // registered, because other plugins might override some of our
  46675. // handlers.
  46676. _converse.on('contactRequest', _converse.handleContactRequestNotification);
  46677. _converse.on('contactStatusChanged', _converse.handleChatStateNotification);
  46678. _converse.on('message', _converse.handleMessageNotification);
  46679. _converse.on('feedback', _converse.handleFeedback);
  46680. _converse.on('connected', _converse.requestPermission);
  46681. });
  46682. }
  46683. });
  46684. });
  46685. //# sourceMappingURL=converse-notification.js.map;
  46686. /*global define */
  46687. if (typeof define !== 'undefined') {
  46688. // The section below determines which plugins will be included in a build
  46689. define('converse',[
  46690. "converse-core",
  46691. /* START: Removable components
  46692. * --------------------
  46693. * Any of the following components may be removed if they're not needed.
  46694. */
  46695. "converse-chatview", // Renders standalone chat boxes for single user chat
  46696. "converse-mam", // XEP-0313 Message Archive Management
  46697. "converse-muc", // XEP-0045 Multi-user chat
  46698. "converse-muc-embedded",
  46699. "converse-ping", // XEP-0199 XMPP Ping
  46700. "converse-notification",// HTML5 Notifications
  46701. /* END: Removable components */
  46702. ], function (converse) {
  46703. return converse;
  46704. });
  46705. }
  46706. ;
  46707. /* jshint ignore:start */
  46708. //The modules for your project will be inlined above
  46709. //this snippet. Ask almond to synchronously require the
  46710. //module value for 'converse' here and return it as the
  46711. //value to use for the public API for the built file.
  46712. return require('converse');
  46713. }));
  46714. /* jshint ignore:end */