resources_js_pages_member_Index_vue.js 694KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327
  1. (self["webpackChunk"] = self["webpackChunk"] || []).push([["resources_js_pages_member_Index_vue"],{
  2. /***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppButtonLink.vue?vue&type=script&setup=true&lang=js":
  3. /*!******************************************************************************************************************************************************************************************************************!*\
  4. !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppButtonLink.vue?vue&type=script&setup=true&lang=js ***!
  5. \******************************************************************************************************************************************************************************************************************/
  6. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  7. "use strict";
  8. __webpack_require__.r(__webpack_exports__);
  9. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  10. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  11. /* harmony export */ });
  12. /* harmony import */ var _inertiajs_inertia_vue3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @inertiajs/inertia-vue3 */ "./node_modules/@inertiajs/inertia-vue3/dist/index.js");
  13. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
  14. props: {
  15. inertiaLink: {
  16. type: Boolean,
  17. "default": true
  18. },
  19. icon: String,
  20. label: String,
  21. classButton: String
  22. },
  23. setup: function setup(__props, _ref) {
  24. var expose = _ref.expose;
  25. expose();
  26. var __returned__ = {
  27. Link: _inertiajs_inertia_vue3__WEBPACK_IMPORTED_MODULE_0__.Link
  28. };
  29. Object.defineProperty(__returned__, '__isScriptSetup', {
  30. enumerable: false,
  31. value: true
  32. });
  33. return __returned__;
  34. }
  35. });
  36. /***/ }),
  37. /***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppMessage.vue?vue&type=script&setup=true&lang=js":
  38. /*!***************************************************************************************************************************************************************************************************************!*\
  39. !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppMessage.vue?vue&type=script&setup=true&lang=js ***!
  40. \***************************************************************************************************************************************************************************************************************/
  41. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  42. "use strict";
  43. __webpack_require__.r(__webpack_exports__);
  44. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  45. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  46. /* harmony export */ });
  47. /* harmony import */ var _inertiajs_inertia_vue3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @inertiajs/inertia-vue3 */ "./node_modules/@inertiajs/inertia-vue3/dist/index.js");
  48. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
  49. setup: function setup(__props, _ref) {
  50. var expose = _ref.expose;
  51. expose();
  52. var onClose = function onClose() {
  53. (0,_inertiajs_inertia_vue3__WEBPACK_IMPORTED_MODULE_0__.usePage)().props.value.errors = {};
  54. (0,_inertiajs_inertia_vue3__WEBPACK_IMPORTED_MODULE_0__.usePage)().props.value.flash.success = null;
  55. (0,_inertiajs_inertia_vue3__WEBPACK_IMPORTED_MODULE_0__.usePage)().props.value.flash.error = null;
  56. };
  57. var __returned__ = {
  58. onClose: onClose,
  59. usePage: _inertiajs_inertia_vue3__WEBPACK_IMPORTED_MODULE_0__.usePage
  60. };
  61. Object.defineProperty(__returned__, '__isScriptSetup', {
  62. enumerable: false,
  63. value: true
  64. });
  65. return __returned__;
  66. }
  67. });
  68. /***/ }),
  69. /***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppPagination.vue?vue&type=script&setup=true&lang=js":
  70. /*!******************************************************************************************************************************************************************************************************************!*\
  71. !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppPagination.vue?vue&type=script&setup=true&lang=js ***!
  72. \******************************************************************************************************************************************************************************************************************/
  73. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  74. "use strict";
  75. __webpack_require__.r(__webpack_exports__);
  76. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  77. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  78. /* harmony export */ });
  79. /* harmony import */ var _inertiajs_inertia_vue3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @inertiajs/inertia-vue3 */ "./node_modules/@inertiajs/inertia-vue3/dist/index.js");
  80. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
  81. props: {
  82. links: Array
  83. },
  84. setup: function setup(__props, _ref) {
  85. var expose = _ref.expose;
  86. expose();
  87. var __returned__ = {
  88. Link: _inertiajs_inertia_vue3__WEBPACK_IMPORTED_MODULE_0__.Link
  89. };
  90. Object.defineProperty(__returned__, '__isScriptSetup', {
  91. enumerable: false,
  92. value: true
  93. });
  94. return __returned__;
  95. }
  96. });
  97. /***/ }),
  98. /***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppSidebar.vue?vue&type=script&setup=true&lang=js":
  99. /*!***************************************************************************************************************************************************************************************************************!*\
  100. !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppSidebar.vue?vue&type=script&setup=true&lang=js ***!
  101. \***************************************************************************************************************************************************************************************************************/
  102. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  103. "use strict";
  104. __webpack_require__.r(__webpack_exports__);
  105. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  106. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  107. /* harmony export */ });
  108. /* harmony import */ var _components_AppSubSidebar_vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/components/AppSubSidebar.vue */ "./resources/js/components/AppSubSidebar.vue");
  109. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
  110. props: {
  111. menu: Array
  112. },
  113. setup: function setup(__props, _ref) {
  114. var expose = _ref.expose;
  115. expose();
  116. var __returned__ = {
  117. AppSubSidebar: _components_AppSubSidebar_vue__WEBPACK_IMPORTED_MODULE_0__["default"]
  118. };
  119. Object.defineProperty(__returned__, '__isScriptSetup', {
  120. enumerable: false,
  121. value: true
  122. });
  123. return __returned__;
  124. }
  125. });
  126. /***/ }),
  127. /***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppSubSidebar.vue?vue&type=script&setup=true&lang=js":
  128. /*!******************************************************************************************************************************************************************************************************************!*\
  129. !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppSubSidebar.vue?vue&type=script&setup=true&lang=js ***!
  130. \******************************************************************************************************************************************************************************************************************/
  131. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  132. "use strict";
  133. __webpack_require__.r(__webpack_exports__);
  134. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  135. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  136. /* harmony export */ });
  137. /* harmony import */ var _inertiajs_inertia_vue3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @inertiajs/inertia-vue3 */ "./node_modules/@inertiajs/inertia-vue3/dist/index.js");
  138. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
  139. props: {
  140. items: Array,
  141. root: {
  142. type: Boolean,
  143. "default": false
  144. }
  145. },
  146. setup: function setup(__props, _ref) {
  147. var expose = _ref.expose;
  148. expose();
  149. var __returned__ = {
  150. Link: _inertiajs_inertia_vue3__WEBPACK_IMPORTED_MODULE_0__.Link
  151. };
  152. Object.defineProperty(__returned__, '__isScriptSetup', {
  153. enumerable: false,
  154. value: true
  155. });
  156. return __returned__;
  157. }
  158. });
  159. /***/ }),
  160. /***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppTopBar.vue?vue&type=script&setup=true&lang=js":
  161. /*!**************************************************************************************************************************************************************************************************************!*\
  162. !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppTopBar.vue?vue&type=script&setup=true&lang=js ***!
  163. \**************************************************************************************************************************************************************************************************************/
  164. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  165. "use strict";
  166. __webpack_require__.r(__webpack_exports__);
  167. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  168. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  169. /* harmony export */ });
  170. /* harmony import */ var _inertiajs_inertia_vue3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @inertiajs/inertia-vue3 */ "./node_modules/@inertiajs/inertia-vue3/dist/index.js");
  171. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
  172. emits: ['menu-toggle'],
  173. setup: function setup(__props, _ref) {
  174. var expose = _ref.expose;
  175. expose();
  176. var __returned__ = {
  177. Link: _inertiajs_inertia_vue3__WEBPACK_IMPORTED_MODULE_0__.Link
  178. };
  179. Object.defineProperty(__returned__, '__isScriptSetup', {
  180. enumerable: false,
  181. value: true
  182. });
  183. return __returned__;
  184. }
  185. });
  186. /***/ }),
  187. /***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/layouts/DashboardLayout.vue?vue&type=script&setup=true&lang=js":
  188. /*!*****************************************************************************************************************************************************************************************************************!*\
  189. !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/layouts/DashboardLayout.vue?vue&type=script&setup=true&lang=js ***!
  190. \*****************************************************************************************************************************************************************************************************************/
  191. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  192. "use strict";
  193. __webpack_require__.r(__webpack_exports__);
  194. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  195. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  196. /* harmony export */ });
  197. /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
  198. /* harmony import */ var _components_AppTopBar_vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/components/AppTopBar.vue */ "./resources/js/components/AppTopBar.vue");
  199. /* harmony import */ var _components_AppSidebar_vue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/components/AppSidebar.vue */ "./resources/js/components/AppSidebar.vue");
  200. /* harmony import */ var _components_AppFooter_vue__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/components/AppFooter.vue */ "./resources/js/components/AppFooter.vue");
  201. /* harmony import */ var _components_AppMessage_vue__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @/components/AppMessage.vue */ "./resources/js/components/AppMessage.vue");
  202. /* harmony import */ var _utils_menu__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/utils/menu */ "./resources/js/utils/menu.js");
  203. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
  204. setup: function setup(__props, _ref) {
  205. var expose = _ref.expose;
  206. expose();
  207. var mobileMenuActive = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(false);
  208. var staticMenuInactive = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(false);
  209. var menuClick = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(false);
  210. var isDesktop = function isDesktop() {
  211. return window.innerWidth >= 992;
  212. };
  213. var containerClass = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(function () {
  214. return ['layout-wrapper', {
  215. 'layout-static-sidebar-inactive': staticMenuInactive.value,
  216. 'layout-mobile-sidebar-active': mobileMenuActive.value
  217. }];
  218. });
  219. var onWrapperClick = function onWrapperClick() {
  220. if (!menuClick.value) {
  221. mobileMenuActive.value = false;
  222. }
  223. menuClick.value = false;
  224. };
  225. var onMenuToggle = function onMenuToggle(event) {
  226. menuClick.value = true;
  227. if (isDesktop()) {
  228. staticMenuInactive.value = !staticMenuInactive.value;
  229. } else {
  230. mobileMenuActive.value = !mobileMenuActive.value;
  231. }
  232. event.preventDefault();
  233. };
  234. var __returned__ = {
  235. mobileMenuActive: mobileMenuActive,
  236. staticMenuInactive: staticMenuInactive,
  237. menuClick: menuClick,
  238. isDesktop: isDesktop,
  239. containerClass: containerClass,
  240. onWrapperClick: onWrapperClick,
  241. onMenuToggle: onMenuToggle,
  242. ref: vue__WEBPACK_IMPORTED_MODULE_0__.ref,
  243. computed: vue__WEBPACK_IMPORTED_MODULE_0__.computed,
  244. AppTopBar: _components_AppTopBar_vue__WEBPACK_IMPORTED_MODULE_1__["default"],
  245. AppSidebar: _components_AppSidebar_vue__WEBPACK_IMPORTED_MODULE_2__["default"],
  246. AppFooter: _components_AppFooter_vue__WEBPACK_IMPORTED_MODULE_3__["default"],
  247. AppMessage: _components_AppMessage_vue__WEBPACK_IMPORTED_MODULE_4__["default"],
  248. menu: _utils_menu__WEBPACK_IMPORTED_MODULE_5__["default"]
  249. };
  250. Object.defineProperty(__returned__, '__isScriptSetup', {
  251. enumerable: false,
  252. value: true
  253. });
  254. return __returned__;
  255. }
  256. });
  257. /***/ }),
  258. /***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/pages/member/Index.vue?vue&type=script&setup=true&lang=js":
  259. /*!************************************************************************************************************************************************************************************************************!*\
  260. !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/pages/member/Index.vue?vue&type=script&setup=true&lang=js ***!
  261. \************************************************************************************************************************************************************************************************************/
  262. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  263. "use strict";
  264. __webpack_require__.r(__webpack_exports__);
  265. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  266. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  267. /* harmony export */ });
  268. /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
  269. /* harmony import */ var _inertiajs_inertia__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @inertiajs/inertia */ "./node_modules/@inertiajs/inertia/dist/index.js");
  270. /* harmony import */ var _inertiajs_inertia_vue3__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @inertiajs/inertia-vue3 */ "./node_modules/@inertiajs/inertia-vue3/dist/index.js");
  271. /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash */ "./node_modules/lodash/lodash.js");
  272. /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_3__);
  273. /* harmony import */ var _tableHeader__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./tableHeader */ "./resources/js/pages/member/tableHeader.js");
  274. /* harmony import */ var _components_useSearchText__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/components/useSearchText */ "./resources/js/components/useSearchText.js");
  275. /* harmony import */ var _components_AppButtonLink_vue__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/components/AppButtonLink.vue */ "./resources/js/components/AppButtonLink.vue");
  276. /* harmony import */ var _components_AppPagination_vue__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @/components/AppPagination.vue */ "./resources/js/components/AppPagination.vue");
  277. /* harmony import */ var _layouts_DashboardLayout_vue__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @/layouts/DashboardLayout.vue */ "./resources/js/layouts/DashboardLayout.vue");
  278. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
  279. props: {
  280. members: Object,
  281. initialSearch: String
  282. },
  283. setup: function setup(__props, _ref) {
  284. var expose = _ref.expose;
  285. expose();
  286. var props = __props;
  287. var _useSearchText = (0,_components_useSearchText__WEBPACK_IMPORTED_MODULE_5__.useSearchText)(props),
  288. search = _useSearchText.search;
  289. (0,vue__WEBPACK_IMPORTED_MODULE_0__.watch)(search, function () {
  290. _inertiajs_inertia__WEBPACK_IMPORTED_MODULE_1__.Inertia.get('/members', (0,lodash__WEBPACK_IMPORTED_MODULE_3__.pickBy)({
  291. search: search.value
  292. }), {
  293. preserveState: true
  294. });
  295. });
  296. var __returned__ = {
  297. props: props,
  298. search: search,
  299. watch: vue__WEBPACK_IMPORTED_MODULE_0__.watch,
  300. Inertia: _inertiajs_inertia__WEBPACK_IMPORTED_MODULE_1__.Inertia,
  301. Head: _inertiajs_inertia_vue3__WEBPACK_IMPORTED_MODULE_2__.Head,
  302. pickBy: lodash__WEBPACK_IMPORTED_MODULE_3__.pickBy,
  303. indexTable: _tableHeader__WEBPACK_IMPORTED_MODULE_4__.indexTable,
  304. useSearchText: _components_useSearchText__WEBPACK_IMPORTED_MODULE_5__.useSearchText,
  305. AppButtonLink: _components_AppButtonLink_vue__WEBPACK_IMPORTED_MODULE_6__["default"],
  306. AppPagination: _components_AppPagination_vue__WEBPACK_IMPORTED_MODULE_7__["default"],
  307. DashboardLayout: _layouts_DashboardLayout_vue__WEBPACK_IMPORTED_MODULE_8__["default"]
  308. };
  309. Object.defineProperty(__returned__, '__isScriptSetup', {
  310. enumerable: false,
  311. value: true
  312. });
  313. return __returned__;
  314. }
  315. });
  316. /***/ }),
  317. /***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppButtonLink.vue?vue&type=template&id=c3621f1c":
  318. /*!***********************************************************************************************************************************************************************************************************************************************************************************!*\
  319. !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppButtonLink.vue?vue&type=template&id=c3621f1c ***!
  320. \***********************************************************************************************************************************************************************************************************************************************************************************/
  321. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  322. "use strict";
  323. __webpack_require__.r(__webpack_exports__);
  324. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  325. /* harmony export */ "render": () => (/* binding */ render)
  326. /* harmony export */ });
  327. /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
  328. var _hoisted_1 = {
  329. key: 1,
  330. "class": "p-button-label"
  331. };
  332. var _hoisted_2 = {
  333. key: 1,
  334. "class": "p-button-label"
  335. };
  336. function render(_ctx, _cache, $props, $setup, $data, $options) {
  337. return $props.inertiaLink ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)($setup["Link"], {
  338. key: 0,
  339. "class": "p-button p-component",
  340. as: "button",
  341. type: "button"
  342. }, {
  343. "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
  344. return [$props.icon ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", {
  345. key: 0,
  346. "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(["p-button-icon p-button-icon-left", $props.icon])
  347. }, null, 2
  348. /* CLASS */
  349. )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), $props.label ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", _hoisted_1, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.label), 1
  350. /* TEXT */
  351. )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)];
  352. }),
  353. _: 1
  354. /* STABLE */
  355. })) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("a", {
  356. key: 1,
  357. "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)([$props.classButton, "p-button p-component"])
  358. }, [$props.icon ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", {
  359. key: 0,
  360. "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(["p-button-icon p-button-icon-left", $props.icon])
  361. }, null, 2
  362. /* CLASS */
  363. )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), $props.label ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", _hoisted_2, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.label), 1
  364. /* TEXT */
  365. )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)], 2
  366. /* CLASS */
  367. ));
  368. }
  369. /***/ }),
  370. /***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppFooter.vue?vue&type=template&id=4ab6097e&scoped=true":
  371. /*!*******************************************************************************************************************************************************************************************************************************************************************************************!*\
  372. !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppFooter.vue?vue&type=template&id=4ab6097e&scoped=true ***!
  373. \*******************************************************************************************************************************************************************************************************************************************************************************************/
  374. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  375. "use strict";
  376. __webpack_require__.r(__webpack_exports__);
  377. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  378. /* harmony export */ "render": () => (/* binding */ render)
  379. /* harmony export */ });
  380. /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
  381. var _withScopeId = function _withScopeId(n) {
  382. return (0,vue__WEBPACK_IMPORTED_MODULE_0__.pushScopeId)("data-v-4ab6097e"), n = n(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.popScopeId)(), n;
  383. };
  384. var _hoisted_1 = {
  385. "class": "layout-footer"
  386. };
  387. var _hoisted_2 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)(" Developed by ");
  388. var _hoisted_3 = /*#__PURE__*/_withScopeId(function () {
  389. return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("a", {
  390. href: "https://dijitalcode.com",
  391. target: "_blank",
  392. "class": "font-medium ml-2"
  393. }, "DijitalCODE", -1
  394. /* HOISTED */
  395. );
  396. });
  397. var _hoisted_4 = [_hoisted_2, _hoisted_3];
  398. function render(_ctx, _cache) {
  399. return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", _hoisted_1, _hoisted_4);
  400. }
  401. /***/ }),
  402. /***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppMessage.vue?vue&type=template&id=07159051":
  403. /*!********************************************************************************************************************************************************************************************************************************************************************************!*\
  404. !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppMessage.vue?vue&type=template&id=07159051 ***!
  405. \********************************************************************************************************************************************************************************************************************************************************************************/
  406. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  407. "use strict";
  408. __webpack_require__.r(__webpack_exports__);
  409. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  410. /* harmony export */ "render": () => (/* binding */ render)
  411. /* harmony export */ });
  412. /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
  413. var _hoisted_1 = {
  414. key: 0
  415. };
  416. var _hoisted_2 = {
  417. key: 1
  418. };
  419. function render(_ctx, _cache, $props, $setup, $data, $options) {
  420. var _component_Message = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("Message");
  421. return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, [_ctx.$page.props.flash.success ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(_component_Message, {
  422. key: 0,
  423. severity: "success",
  424. onClose: $setup.onClose
  425. }, {
  426. "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
  427. return [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)((0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(_ctx.$page.props.flash.success), 1
  428. /* TEXT */
  429. )];
  430. }),
  431. _: 1
  432. /* STABLE */
  433. })) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), _ctx.$page.props.flash.error ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(_component_Message, {
  434. key: 1,
  435. severity: "error",
  436. onClose: $setup.onClose
  437. }, {
  438. "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
  439. return [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)((0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(_ctx.$page.props.flash.error), 1
  440. /* TEXT */
  441. )];
  442. }),
  443. _: 1
  444. /* STABLE */
  445. })) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), Object.keys(_ctx.$page.props.errors).length > 0 ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(_component_Message, {
  446. key: 2,
  447. severity: "error",
  448. onClose: $setup.onClose
  449. }, {
  450. "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
  451. return [Object.keys(_ctx.$page.props.errors).length === 1 ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", _hoisted_1, "Ditemukan satu error pada form")) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", _hoisted_2, "Ditemukan " + (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(Object.keys(_ctx.$page.props.errors).length) + " error pada form", 1
  452. /* TEXT */
  453. ))];
  454. }),
  455. _: 1
  456. /* STABLE */
  457. })) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)], 64
  458. /* STABLE_FRAGMENT */
  459. );
  460. }
  461. /***/ }),
  462. /***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppPagination.vue?vue&type=template&id=4da56ec0":
  463. /*!***********************************************************************************************************************************************************************************************************************************************************************************!*\
  464. !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppPagination.vue?vue&type=template&id=4da56ec0 ***!
  465. \***********************************************************************************************************************************************************************************************************************************************************************************/
  466. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  467. "use strict";
  468. __webpack_require__.r(__webpack_exports__);
  469. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  470. /* harmony export */ "render": () => (/* binding */ render)
  471. /* harmony export */ });
  472. /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
  473. var _hoisted_1 = {
  474. key: 0,
  475. "class": "p-paginator p-component flex justify-content-start"
  476. };
  477. var _hoisted_2 = {
  478. "class": "p-paginator-pages"
  479. };
  480. var _hoisted_3 = ["innerHTML"];
  481. function render(_ctx, _cache, $props, $setup, $data, $options) {
  482. return $props.links.length > 3 ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("nav", _hoisted_1, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_2, [((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(true), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderList)($props.links, function (link, key) {
  483. return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, [link.url === null ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", {
  484. key: "link-".concat(key),
  485. "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(["p-paginator-page p-paginator-element p-link", {
  486. 'p-disabled': link
  487. }]),
  488. innerHTML: link.label
  489. }, null, 10
  490. /* CLASS, PROPS */
  491. , _hoisted_3)) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), link.url !== null ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)($setup["Link"], {
  492. key: "link-".concat(key),
  493. href: link.url,
  494. "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)([{
  495. 'p-highlight': link.active
  496. }, "p-paginator-page p-paginator-element p-link"]),
  497. innerHTML: link.label
  498. }, null, 8
  499. /* PROPS */
  500. , ["href", "class", "innerHTML"])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)], 64
  501. /* STABLE_FRAGMENT */
  502. );
  503. }), 256
  504. /* UNKEYED_FRAGMENT */
  505. ))])])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true);
  506. }
  507. /***/ }),
  508. /***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppSidebar.vue?vue&type=template&id=22a4e926&scoped=true":
  509. /*!********************************************************************************************************************************************************************************************************************************************************************************************!*\
  510. !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppSidebar.vue?vue&type=template&id=22a4e926&scoped=true ***!
  511. \********************************************************************************************************************************************************************************************************************************************************************************************/
  512. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  513. "use strict";
  514. __webpack_require__.r(__webpack_exports__);
  515. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  516. /* harmony export */ "render": () => (/* binding */ render)
  517. /* harmony export */ });
  518. /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
  519. function render(_ctx, _cache, $props, $setup, $data, $options) {
  520. return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", null, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)($setup["AppSubSidebar"], {
  521. "class": "layout-menu",
  522. items: $props.menu,
  523. root: true
  524. }, null, 8
  525. /* PROPS */
  526. , ["items"])]);
  527. }
  528. /***/ }),
  529. /***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppSubSidebar.vue?vue&type=template&id=0addd9bc&scoped=true":
  530. /*!***********************************************************************************************************************************************************************************************************************************************************************************************!*\
  531. !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppSubSidebar.vue?vue&type=template&id=0addd9bc&scoped=true ***!
  532. \***********************************************************************************************************************************************************************************************************************************************************************************************/
  533. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  534. "use strict";
  535. __webpack_require__.r(__webpack_exports__);
  536. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  537. /* harmony export */ "render": () => (/* binding */ render)
  538. /* harmony export */ });
  539. /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
  540. var _withScopeId = function _withScopeId(n) {
  541. return (0,vue__WEBPACK_IMPORTED_MODULE_0__.pushScopeId)("data-v-0addd9bc"), n = n(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.popScopeId)(), n;
  542. };
  543. var _hoisted_1 = {
  544. key: 0
  545. };
  546. var _hoisted_2 = ["aria-label"];
  547. var _hoisted_3 = ["aria-label"];
  548. function render(_ctx, _cache, $props, $setup, $data, $options) {
  549. var _component_AppSubSidebar = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("AppSubSidebar", true);
  550. return $props.items ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("ul", _hoisted_1, [((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(true), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderList)($props.items, function (item, i) {
  551. return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, [item ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("li", {
  552. key: i,
  553. "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)([{
  554. 'layout-menuitem-category': $props.root
  555. }]),
  556. role: "none"
  557. }, [$props.root ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, {
  558. key: 0
  559. }, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", {
  560. "class": "layout-menuitem-root-text",
  561. "aria-label": item.label
  562. }, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(item.label), 9
  563. /* TEXT, PROPS */
  564. , _hoisted_2), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_AppSubSidebar, {
  565. items: item.items
  566. }, null, 8
  567. /* PROPS */
  568. , ["items"])], 64
  569. /* STABLE_FRAGMENT */
  570. )) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, {
  571. key: 1
  572. }, [item.to ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)($setup["Link"], {
  573. key: 0,
  574. role: "menuitem",
  575. href: item.to,
  576. "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)([{
  577. 'router-link-active': _ctx.$page.component.startsWith(item.component) || _ctx.$page.url.startsWith(item.to),
  578. 'router-link-exact-active': _ctx.$page.component.startsWith(item.component) || _ctx.$page.url.startsWith(item.to)
  579. }]),
  580. "aria-label": item.label
  581. }, {
  582. "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
  583. return [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("i", {
  584. "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(item.icon)
  585. }, null, 2
  586. /* CLASS */
  587. ), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(item.label), 1
  588. /* TEXT */
  589. )];
  590. }),
  591. _: 2
  592. /* DYNAMIC */
  593. }, 1032
  594. /* PROPS, DYNAMIC_SLOTS */
  595. , ["href", "class", "aria-label"])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), !item.to ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("a", {
  596. key: 1,
  597. href: "#",
  598. role: "menuitem",
  599. "aria-label": item.label
  600. }, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("i", {
  601. "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(item.icon)
  602. }, null, 2
  603. /* CLASS */
  604. ), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(item.label), 1
  605. /* TEXT */
  606. )], 8
  607. /* PROPS */
  608. , _hoisted_3)) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_AppSubSidebar, {
  609. items: item.items
  610. }, null, 8
  611. /* PROPS */
  612. , ["items"])], 64
  613. /* STABLE_FRAGMENT */
  614. ))], 2
  615. /* CLASS */
  616. )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)], 64
  617. /* STABLE_FRAGMENT */
  618. );
  619. }), 256
  620. /* UNKEYED_FRAGMENT */
  621. ))])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true);
  622. }
  623. /***/ }),
  624. /***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppTopBar.vue?vue&type=template&id=42bf62a4&scoped=true":
  625. /*!*******************************************************************************************************************************************************************************************************************************************************************************************!*\
  626. !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppTopBar.vue?vue&type=template&id=42bf62a4&scoped=true ***!
  627. \*******************************************************************************************************************************************************************************************************************************************************************************************/
  628. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  629. "use strict";
  630. __webpack_require__.r(__webpack_exports__);
  631. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  632. /* harmony export */ "render": () => (/* binding */ render)
  633. /* harmony export */ });
  634. /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
  635. var _withScopeId = function _withScopeId(n) {
  636. return (0,vue__WEBPACK_IMPORTED_MODULE_0__.pushScopeId)("data-v-42bf62a4"), n = n(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.popScopeId)(), n;
  637. };
  638. var _hoisted_1 = {
  639. "class": "layout-topbar"
  640. };
  641. var _hoisted_2 = /*#__PURE__*/_withScopeId(function () {
  642. return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("img", {
  643. alt: "Logo",
  644. src: "/images/logo.svg",
  645. "class": "md:mr-3"
  646. }, null, -1
  647. /* HOISTED */
  648. );
  649. });
  650. var _hoisted_3 = /*#__PURE__*/_withScopeId(function () {
  651. return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", null, "Parkirin", -1
  652. /* HOISTED */
  653. );
  654. });
  655. var _hoisted_4 = /*#__PURE__*/_withScopeId(function () {
  656. return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("i", {
  657. "class": "pi pi-bars"
  658. }, null, -1
  659. /* HOISTED */
  660. );
  661. });
  662. var _hoisted_5 = [_hoisted_4];
  663. var _hoisted_6 = {
  664. "class": "p-link layout-topbar-menu-button layout-topbar-button"
  665. };
  666. var _hoisted_7 = /*#__PURE__*/_withScopeId(function () {
  667. return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("i", {
  668. "class": "pi pi-ellipsis-v"
  669. }, null, -1
  670. /* HOISTED */
  671. );
  672. });
  673. var _hoisted_8 = [_hoisted_7];
  674. var _hoisted_9 = {
  675. "class": "layout-topbar-menu hidden lg:flex origin-top"
  676. };
  677. var _hoisted_10 = {
  678. "class": "align-self-center"
  679. };
  680. var _hoisted_11 = {
  681. "class": "hidden lg:inline"
  682. };
  683. var _hoisted_12 = /*#__PURE__*/_withScopeId(function () {
  684. return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("i", {
  685. "class": "pi pi-user"
  686. }, null, -1
  687. /* HOISTED */
  688. );
  689. });
  690. var _hoisted_13 = /*#__PURE__*/_withScopeId(function () {
  691. return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", null, "Profil Saya", -1
  692. /* HOISTED */
  693. );
  694. });
  695. var _hoisted_14 = /*#__PURE__*/_withScopeId(function () {
  696. return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("i", {
  697. "class": "pi pi-sign-out"
  698. }, null, -1
  699. /* HOISTED */
  700. );
  701. });
  702. var _hoisted_15 = /*#__PURE__*/_withScopeId(function () {
  703. return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", null, "Sign Out", -1
  704. /* HOISTED */
  705. );
  706. });
  707. function render(_ctx, _cache, $props, $setup, $data, $options) {
  708. var _directive_styleclass = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveDirective)("styleclass");
  709. return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", _hoisted_1, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)($setup["Link"], {
  710. href: "/",
  711. "class": "layout-topbar-logo"
  712. }, {
  713. "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
  714. return [_hoisted_2, _hoisted_3];
  715. }),
  716. _: 1
  717. /* STABLE */
  718. }), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("button", {
  719. "class": "p-link layout-menu-button layout-topbar-button",
  720. onClick: _cache[0] || (_cache[0] = function ($event) {
  721. return _ctx.$emit('menu-toggle', $event);
  722. })
  723. }, _hoisted_5), (0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)(((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("button", _hoisted_6, _hoisted_8)), [[_directive_styleclass, {
  724. selector: '@next',
  725. enterClass: 'hidden',
  726. enterActiveClass: 'scalein',
  727. leaveToClass: 'hidden',
  728. leaveActiveClass: 'fadeout',
  729. hideOnOutsideClick: true
  730. }]]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("ul", _hoisted_9, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("li", _hoisted_10, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", _hoisted_11, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(_ctx.$page.props.auth.user.name), 1
  731. /* TEXT */
  732. )]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("li", null, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)($setup["Link"], {
  733. href: _ctx.route('users.show', _ctx.$page.props.auth.user.id),
  734. "class": "p-link layout-topbar-button"
  735. }, {
  736. "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
  737. return [_hoisted_12, _hoisted_13];
  738. }),
  739. _: 1
  740. /* STABLE */
  741. }, 8
  742. /* PROPS */
  743. , ["href"])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("li", null, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)($setup["Link"], {
  744. href: _ctx.route('logout'),
  745. as: "button",
  746. method: "post",
  747. "class": "p-link layout-topbar-button"
  748. }, {
  749. "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
  750. return [_hoisted_14, _hoisted_15];
  751. }),
  752. _: 1
  753. /* STABLE */
  754. }, 8
  755. /* PROPS */
  756. , ["href"])])])]);
  757. }
  758. /***/ }),
  759. /***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/layouts/DashboardLayout.vue?vue&type=template&id=549bf5ac&scoped=true":
  760. /*!**********************************************************************************************************************************************************************************************************************************************************************************************!*\
  761. !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/layouts/DashboardLayout.vue?vue&type=template&id=549bf5ac&scoped=true ***!
  762. \**********************************************************************************************************************************************************************************************************************************************************************************************/
  763. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  764. "use strict";
  765. __webpack_require__.r(__webpack_exports__);
  766. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  767. /* harmony export */ "render": () => (/* binding */ render)
  768. /* harmony export */ });
  769. /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
  770. var _withScopeId = function _withScopeId(n) {
  771. return (0,vue__WEBPACK_IMPORTED_MODULE_0__.pushScopeId)("data-v-549bf5ac"), n = n(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.popScopeId)(), n;
  772. };
  773. var _hoisted_1 = {
  774. "class": "layout-sidebar"
  775. };
  776. var _hoisted_2 = {
  777. "class": "layout-main-container"
  778. };
  779. var _hoisted_3 = {
  780. "class": "layout-main"
  781. };
  782. var _hoisted_4 = {
  783. key: 0,
  784. "class": "layout-mask p-component-overlay"
  785. };
  786. function render(_ctx, _cache, $props, $setup, $data, $options) {
  787. return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", {
  788. "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)($setup.containerClass),
  789. onClick: $setup.onWrapperClick
  790. }, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)($setup["AppTopBar"], {
  791. onMenuToggle: $setup.onMenuToggle
  792. }), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_1, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)($setup["AppSidebar"], {
  793. menu: $setup.menu[_ctx.$page.props.auth.user.role_id]
  794. }, null, 8
  795. /* PROPS */
  796. , ["menu"])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_2, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_3, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)($setup["AppMessage"]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(_ctx.$slots, "default", {}, undefined, true)]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)($setup["AppFooter"])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(vue__WEBPACK_IMPORTED_MODULE_0__.Transition, {
  797. name: "layout-mask"
  798. }, {
  799. "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
  800. return [$setup.mobileMenuActive ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", _hoisted_4)) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)];
  801. }),
  802. _: 1
  803. /* STABLE */
  804. })], 2
  805. /* CLASS */
  806. );
  807. }
  808. /***/ }),
  809. /***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/pages/member/Index.vue?vue&type=template&id=7b0e4c66":
  810. /*!*****************************************************************************************************************************************************************************************************************************************************************************!*\
  811. !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/pages/member/Index.vue?vue&type=template&id=7b0e4c66 ***!
  812. \*****************************************************************************************************************************************************************************************************************************************************************************/
  813. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  814. "use strict";
  815. __webpack_require__.r(__webpack_exports__);
  816. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  817. /* harmony export */ "render": () => (/* binding */ render)
  818. /* harmony export */ });
  819. /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
  820. var _hoisted_1 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("h1", null, "Daftar Member", -1
  821. /* HOISTED */
  822. );
  823. var _hoisted_2 = {
  824. "class": "grid"
  825. };
  826. var _hoisted_3 = {
  827. "class": "col-12 md:col-8"
  828. };
  829. var _hoisted_4 = {
  830. "class": "flex align-items-center"
  831. };
  832. var _hoisted_5 = {
  833. "class": "col-12 md:col-4 flex flex-column md:flex-row justify-content-end"
  834. };
  835. function render(_ctx, _cache, $props, $setup, $data, $options) {
  836. var _component_InputText = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("InputText");
  837. var _component_Column = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("Column");
  838. var _component_DataTable = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("DataTable");
  839. return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)($setup["Head"], {
  840. title: "Daftar Member"
  841. }), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)($setup["DashboardLayout"], null, {
  842. "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
  843. return [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_DataTable, {
  844. "responsive-layout": "scroll",
  845. "column-resize-mode": "expand",
  846. value: $props.members.data,
  847. "row-hover": true,
  848. "striped-rows": true
  849. }, {
  850. header: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
  851. return [_hoisted_1, (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_2, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_3, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_4, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_InputText, {
  852. "class": "w-full md:w-27rem",
  853. placeholder: "cari, contoh: tina",
  854. modelValue: $setup.search,
  855. "onUpdate:modelValue": _cache[0] || (_cache[0] = function ($event) {
  856. return $setup.search = $event;
  857. })
  858. }, null, 8
  859. /* PROPS */
  860. , ["modelValue"])])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_5, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)($setup["AppButtonLink"], {
  861. label: "Tambah Member",
  862. "class": "p-button-outlined",
  863. icon: "pi pi-pencil",
  864. href: _ctx.route('members.create')
  865. }, null, 8
  866. /* PROPS */
  867. , ["href"])])])];
  868. }),
  869. "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
  870. return [((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(true), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderList)($setup.indexTable, function (value) {
  871. return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(_component_Column, {
  872. field: value.field,
  873. header: value.header,
  874. key: value.field
  875. }, null, 8
  876. /* PROPS */
  877. , ["field", "header"]);
  878. }), 128
  879. /* KEYED_FRAGMENT */
  880. )), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Column, null, {
  881. body: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function (_ref) {
  882. var data = _ref.data;
  883. return [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)($setup["AppButtonLink"], {
  884. icon: "pi pi-pencil",
  885. "class": "p-button-text p-button-icon-only p-button-rounded p-button-text",
  886. href: _ctx.route('members.edit', data.id)
  887. }, null, 8
  888. /* PROPS */
  889. , ["href"])];
  890. }),
  891. _: 1
  892. /* STABLE */
  893. })];
  894. }),
  895. _: 1
  896. /* STABLE */
  897. }, 8
  898. /* PROPS */
  899. , ["value"]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)($setup["AppPagination"], {
  900. links: $props.members.links
  901. }, null, 8
  902. /* PROPS */
  903. , ["links"])];
  904. }),
  905. _: 1
  906. /* STABLE */
  907. })], 64
  908. /* STABLE_FRAGMENT */
  909. );
  910. }
  911. /***/ }),
  912. /***/ "./resources/js/components/useSearchText.js":
  913. /*!**************************************************!*\
  914. !*** ./resources/js/components/useSearchText.js ***!
  915. \**************************************************/
  916. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  917. "use strict";
  918. __webpack_require__.r(__webpack_exports__);
  919. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  920. /* harmony export */ "useSearchText": () => (/* binding */ useSearchText)
  921. /* harmony export */ });
  922. /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
  923. function useSearchText(props) {
  924. var search = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(props.initialSearch);
  925. return {
  926. search: search
  927. };
  928. }
  929. /***/ }),
  930. /***/ "./resources/js/pages/member/tableHeader.js":
  931. /*!**************************************************!*\
  932. !*** ./resources/js/pages/member/tableHeader.js ***!
  933. \**************************************************/
  934. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  935. "use strict";
  936. __webpack_require__.r(__webpack_exports__);
  937. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  938. /* harmony export */ "indexTable": () => (/* binding */ indexTable),
  939. /* harmony export */ "platNumberTable": () => (/* binding */ platNumberTable)
  940. /* harmony export */ });
  941. var indexTable = [{
  942. field: 'updatedAt',
  943. header: 'Diperbaharui'
  944. }, {
  945. field: 'name',
  946. header: 'Nama'
  947. }, {
  948. field: 'platNumber',
  949. header: 'Plat Kendaraan'
  950. }, {
  951. field: 'type',
  952. header: 'Jenis Member'
  953. }, {
  954. field: 'price',
  955. header: 'Tarif Member'
  956. }, {
  957. field: 'expDate',
  958. header: 'Berakhir'
  959. }];
  960. var platNumberTable = [{
  961. field: 'platNumber',
  962. header: 'Plat Kendaraan'
  963. }, {
  964. field: 'typeVehicle',
  965. header: 'Jenis Kendaraan'
  966. }];
  967. /***/ }),
  968. /***/ "./resources/js/utils/menu.js":
  969. /*!************************************!*\
  970. !*** ./resources/js/utils/menu.js ***!
  971. \************************************/
  972. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  973. "use strict";
  974. __webpack_require__.r(__webpack_exports__);
  975. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  976. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  977. /* harmony export */ });
  978. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
  979. // Admin
  980. 1: [{
  981. label: 'Home',
  982. items: [{
  983. label: 'Dashboard',
  984. icon: 'pi pi-home',
  985. to: '/dashboards',
  986. component: 'home/Index'
  987. }]
  988. }, {
  989. label: 'Master',
  990. items: [{
  991. label: 'User',
  992. icon: 'pi pi-user',
  993. to: '/users',
  994. component: 'user/Index'
  995. }]
  996. }],
  997. // Supervisor
  998. 2: [{
  999. label: 'Home',
  1000. items: [{
  1001. label: 'Dashboard',
  1002. icon: 'pi pi-home',
  1003. to: '/dashboards',
  1004. component: 'home/Index'
  1005. }]
  1006. }, {
  1007. label: 'Menu',
  1008. items: [{
  1009. label: 'Pengeluaran',
  1010. icon: 'pi pi-wallet',
  1011. to: '/expenses',
  1012. component: 'expense/Index'
  1013. }, {
  1014. label: 'Laporan',
  1015. icon: 'pi pi-book',
  1016. items: [{
  1017. label: 'Mutasi',
  1018. icon: 'pi pi-circle',
  1019. to: '/reports/mutations',
  1020. component: 'mutation/Report'
  1021. }]
  1022. }]
  1023. }, {
  1024. label: 'Master',
  1025. items: [{
  1026. label: 'Jenis Kendaraan',
  1027. icon: 'pi pi-car',
  1028. to: '/type-vehicles',
  1029. component: 'typevehicle/Index'
  1030. }, {
  1031. label: 'Jenis Member',
  1032. icon: 'pi pi-id-card',
  1033. to: '/type-members',
  1034. component: 'typemember/Index'
  1035. }]
  1036. }, {
  1037. label: 'Pengaturan',
  1038. items: [{
  1039. label: 'Tarif Parkir',
  1040. icon: 'pi pi-car',
  1041. to: '/parking-fees/create',
  1042. component: 'parkingfee/Create'
  1043. }]
  1044. }],
  1045. // Operator
  1046. 3: [{
  1047. label: 'Home',
  1048. items: [{
  1049. label: 'Dashboard',
  1050. icon: 'pi pi-home',
  1051. to: '/dashboards',
  1052. component: 'home/Index'
  1053. }]
  1054. }, {
  1055. label: 'Menu',
  1056. items: [{
  1057. label: 'Pengeluaran',
  1058. icon: 'pi pi-wallet',
  1059. to: '/expenses',
  1060. component: 'expense/Index'
  1061. }, {
  1062. label: 'Member',
  1063. icon: 'pi pi-id-card',
  1064. to: '/members',
  1065. component: 'member/Index'
  1066. }, {
  1067. label: 'Top Up',
  1068. icon: 'pi pi-car',
  1069. to: '/top-ups',
  1070. component: 'topup/Index'
  1071. }]
  1072. }]
  1073. });
  1074. /***/ }),
  1075. /***/ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppFooter.vue?vue&type=style&index=0&id=4ab6097e&lang=scss&scoped=true":
  1076. /*!***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  1077. !*** ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppFooter.vue?vue&type=style&index=0&id=4ab6097e&lang=scss&scoped=true ***!
  1078. \***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  1079. /***/ ((module, __webpack_exports__, __webpack_require__) => {
  1080. "use strict";
  1081. __webpack_require__.r(__webpack_exports__);
  1082. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  1083. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  1084. /* harmony export */ });
  1085. /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
  1086. /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);
  1087. // Imports
  1088. var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
  1089. // Module
  1090. ___CSS_LOADER_EXPORT___.push([module.id, ".layout-footer[data-v-4ab6097e] {\n transition: margin-left 0.2s;\n display: flex;\n align-items: center;\n justify-content: center;\n padding-top: 1rem;\n border-top: 1px solid var(--surface-border);\n}", ""]);
  1091. // Exports
  1092. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
  1093. /***/ }),
  1094. /***/ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppSidebar.vue?vue&type=style&index=0&id=22a4e926&lang=scss&scoped=true":
  1095. /*!************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  1096. !*** ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppSidebar.vue?vue&type=style&index=0&id=22a4e926&lang=scss&scoped=true ***!
  1097. \************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  1098. /***/ ((module, __webpack_exports__, __webpack_require__) => {
  1099. "use strict";
  1100. __webpack_require__.r(__webpack_exports__);
  1101. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  1102. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  1103. /* harmony export */ });
  1104. /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
  1105. /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);
  1106. // Imports
  1107. var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
  1108. // Module
  1109. ___CSS_LOADER_EXPORT___.push([module.id, ".layout-menu[data-v-22a4e926] {\n list-style-type: none;\n margin: 0;\n padding: 0;\n}", ""]);
  1110. // Exports
  1111. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
  1112. /***/ }),
  1113. /***/ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppSubSidebar.vue?vue&type=style&index=0&id=0addd9bc&lang=scss&scoped=true":
  1114. /*!***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  1115. !*** ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppSubSidebar.vue?vue&type=style&index=0&id=0addd9bc&lang=scss&scoped=true ***!
  1116. \***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  1117. /***/ ((module, __webpack_exports__, __webpack_require__) => {
  1118. "use strict";
  1119. __webpack_require__.r(__webpack_exports__);
  1120. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  1121. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  1122. /* harmony export */ });
  1123. /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
  1124. /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);
  1125. // Imports
  1126. var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
  1127. // Module
  1128. ___CSS_LOADER_EXPORT___.push([module.id, "li.layout-menuitem-category[data-v-0addd9bc] {\n margin-top: 0.75rem;\n}\nli.layout-menuitem-category[data-v-0addd9bc]:first-child {\n margin-top: 0;\n}\nli .layout-menuitem-root-text[data-v-0addd9bc] {\n text-transform: uppercase;\n color: var(--surface-900);\n font-weight: 600;\n margin-bottom: 0.5rem;\n font-size: 0.875rem;\n}\nli a[data-v-0addd9bc] {\n cursor: pointer;\n text-decoration: none;\n display: flex;\n align-items: center;\n color: var(--text-color);\n transition: color 0.2s;\n border-radius: 12px;\n padding: 0.75rem 1rem;\n transition: background-color 0.15s;\n}\nli a span[data-v-0addd9bc] {\n margin-left: 0.5rem;\n}\nli a .menuitem-toggle-icon[data-v-0addd9bc] {\n margin-left: auto;\n}\nli a[data-v-0addd9bc]:focus {\n outline: 0 none;\n outline-offset: 0;\n transition: box-shadow 0.2s;\n box-shadow: inset var(--focus-ring);\n}\nli a[data-v-0addd9bc]:hover {\n background-color: var(--surface-hover);\n}\nli a.router-link-exact-active[data-v-0addd9bc] {\n font-weight: 700;\n color: var(--primary-color);\n}\nli ul[data-v-0addd9bc] {\n list-style-type: none;\n margin: 0;\n padding: 0;\n}\nli ul ul[data-v-0addd9bc] {\n padding-left: 1rem;\n}", ""]);
  1129. // Exports
  1130. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
  1131. /***/ }),
  1132. /***/ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppTopBar.vue?vue&type=style&index=0&id=42bf62a4&lang=scss&scoped=true":
  1133. /*!***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  1134. !*** ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppTopBar.vue?vue&type=style&index=0&id=42bf62a4&lang=scss&scoped=true ***!
  1135. \***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  1136. /***/ ((module, __webpack_exports__, __webpack_require__) => {
  1137. "use strict";
  1138. __webpack_require__.r(__webpack_exports__);
  1139. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  1140. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  1141. /* harmony export */ });
  1142. /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
  1143. /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);
  1144. // Imports
  1145. var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
  1146. // Module
  1147. ___CSS_LOADER_EXPORT___.push([module.id, ".layout-topbar[data-v-42bf62a4] {\n position: fixed;\n height: 5rem;\n z-index: 997;\n left: 0;\n top: 0;\n width: 100%;\n padding: 0 2rem;\n background-color: var(--surface-card);\n transition: left 0.2s;\n display: flex;\n align-items: center;\n box-shadow: 0px 3px 5px rgba(0, 0, 0, 0.02), 0px 0px 2px rgba(0, 0, 0, 0.05), 0px 1px 4px rgba(0, 0, 0, 0.08);\n}\n.layout-topbar .layout-topbar-logo[data-v-42bf62a4] {\n display: flex;\n align-items: center;\n color: var(--surface-900);\n font-size: 1.5rem;\n font-weight: 500;\n width: 300px;\n border-radius: 12px;\n}\n.layout-topbar .layout-topbar-logo img[data-v-42bf62a4] {\n height: 2.5rem;\n margin-right: 0.5rem;\n}\n.layout-topbar .layout-topbar-logo[data-v-42bf62a4]:focus {\n outline: 0 none;\n outline-offset: 0;\n transition: box-shadow 0.2s;\n box-shadow: var(--focus-ring);\n}\n.layout-topbar .layout-topbar-button[data-v-42bf62a4] {\n display: inline-flex;\n justify-content: center;\n align-items: center;\n position: relative;\n color: var(--text-color-secondary);\n border-radius: 50%;\n width: 3rem;\n height: 3rem;\n cursor: pointer;\n transition: background-color 0.2s;\n}\n.layout-topbar .layout-topbar-button[data-v-42bf62a4]:hover {\n color: var(--text-color);\n background-color: var(--surface-hover);\n}\n.layout-topbar .layout-topbar-button[data-v-42bf62a4]:focus {\n outline: 0 none;\n outline-offset: 0;\n transition: box-shadow 0.2s;\n box-shadow: var(--focus-ring);\n}\n.layout-topbar .layout-topbar-button i[data-v-42bf62a4] {\n font-size: 1.5rem;\n}\n.layout-topbar .layout-topbar-button span[data-v-42bf62a4] {\n font-size: 1rem;\n display: none;\n}\n.layout-topbar .layout-menu-button[data-v-42bf62a4] {\n margin-left: 2rem;\n}\n.layout-topbar .layout-topbar-menu-button[data-v-42bf62a4] {\n display: none;\n}\n.layout-topbar .layout-topbar-menu-button i[data-v-42bf62a4] {\n font-size: 1.25rem;\n}\n.layout-topbar .layout-topbar-menu[data-v-42bf62a4] {\n margin: 0 0 0 auto;\n padding: 0;\n list-style: none;\n display: flex;\n}\n.layout-topbar .layout-topbar-menu .layout-topbar-button[data-v-42bf62a4] {\n margin-left: 1rem;\n}\n@media (max-width: 991px) {\n.layout-topbar[data-v-42bf62a4] {\n justify-content: space-between;\n}\n.layout-topbar .layout-topbar-logo[data-v-42bf62a4] {\n width: auto;\n order: 2;\n}\n.layout-topbar .layout-menu-button[data-v-42bf62a4] {\n margin-left: 0;\n order: 1;\n}\n.layout-topbar .layout-topbar-menu-button[data-v-42bf62a4] {\n display: inline-flex;\n margin-left: 0;\n order: 3;\n}\n.layout-topbar .layout-topbar-menu[data-v-42bf62a4] {\n margin-left: 0;\n position: absolute;\n flex-direction: column;\n background-color: var(--surface-overlay);\n box-shadow: 0px 3px 5px rgba(0, 0, 0, 0.02), 0px 0px 2px rgba(0, 0, 0, 0.05), 0px 1px 4px rgba(0, 0, 0, 0.08);\n border-radius: 4px;\n padding: 1rem;\n right: 2rem;\n top: 5rem;\n min-width: 15rem;\n}\n.layout-topbar .layout-topbar-menu .layout-topbar-button[data-v-42bf62a4] {\n margin-left: 0;\n display: flex;\n width: 100%;\n height: auto;\n justify-content: flex-start;\n border-radius: 12px;\n padding: 1rem;\n}\n.layout-topbar .layout-topbar-menu .layout-topbar-button i[data-v-42bf62a4] {\n font-size: 1rem;\n margin-right: 0.5rem;\n}\n.layout-topbar .layout-topbar-menu .layout-topbar-button span[data-v-42bf62a4] {\n font-weight: medium;\n display: block;\n}\n}", ""]);
  1148. // Exports
  1149. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
  1150. /***/ }),
  1151. /***/ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/layouts/DashboardLayout.vue?vue&type=style&index=0&id=549bf5ac&lang=scss&scoped=true":
  1152. /*!**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  1153. !*** ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/layouts/DashboardLayout.vue?vue&type=style&index=0&id=549bf5ac&lang=scss&scoped=true ***!
  1154. \**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  1155. /***/ ((module, __webpack_exports__, __webpack_require__) => {
  1156. "use strict";
  1157. __webpack_require__.r(__webpack_exports__);
  1158. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  1159. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  1160. /* harmony export */ });
  1161. /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
  1162. /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);
  1163. // Imports
  1164. var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
  1165. // Module
  1166. ___CSS_LOADER_EXPORT___.push([module.id, ".layout-sidebar[data-v-549bf5ac] {\n position: fixed;\n width: 300px;\n height: calc(100vh - 9rem);\n z-index: 999;\n overflow-y: auto;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n top: 7rem;\n left: 2rem;\n transition: transform 0.2s, left 0.2s;\n background-color: var(--surface-overlay);\n border-radius: 4px;\n padding: 1.5rem;\n box-shadow: 0px 3px 5px rgba(0, 0, 0, 0.02), 0px 0px 2px rgba(0, 0, 0, 0.05), 0px 1px 4px rgba(0, 0, 0, 0.08);\n}\n.layout-main-container[data-v-549bf5ac] {\n display: flex;\n flex-direction: column;\n min-height: 100vh;\n justify-content: space-between;\n padding: 7rem 2rem 2rem 4rem;\n transition: margin-left 0.2s;\n}\n.layout-main[data-v-549bf5ac] {\n flex: 1 1 auto;\n}\n@media (min-width: 992px) {\n.layout-wrapper .layout-main-container[data-v-549bf5ac] {\n margin-left: 300px;\n}\n.layout-wrapper.layout-static-sidebar-inactive .layout-sidebar[data-v-549bf5ac] {\n transform: translateX(-100%);\n left: 0;\n}\n.layout-wrapper.layout-static-sidebar-inactive .layout-main-container[data-v-549bf5ac] {\n margin-left: 0;\n padding-left: 2rem;\n}\n.layout-wrapper .layout-mask[data-v-549bf5ac] {\n display: none;\n}\n}\n@media (max-width: 991px) {\n.layout-wrapper .layout-main-container[data-v-549bf5ac] {\n margin-left: 0;\n padding-left: 2rem;\n}\n.layout-wrapper .layout-sidebar[data-v-549bf5ac] {\n transform: translateX(-100%);\n left: 0;\n top: 0;\n height: 100vh;\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n}\n.layout-wrapper .layout-mask[data-v-549bf5ac] {\n z-index: 998;\n background-color: var(--maskbg);\n}\n.layout-wrapper .layout-mask.layout-mask-enter-from[data-v-549bf5ac], .layout-wrapper .layout-mask.layout-mask-leave-to[data-v-549bf5ac] {\n background-color: transparent;\n}\n.layout-wrapper.layout-mobile-sidebar-active .layout-sidebar[data-v-549bf5ac] {\n transform: translateX(0);\n}\n.layout-wrapper.layout-mobile-sidebar-active .layout-mask[data-v-549bf5ac] {\n display: block;\n}\n}", ""]);
  1167. // Exports
  1168. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
  1169. /***/ }),
  1170. /***/ "./node_modules/lodash/lodash.js":
  1171. /*!***************************************!*\
  1172. !*** ./node_modules/lodash/lodash.js ***!
  1173. \***************************************/
  1174. /***/ (function(module, exports, __webpack_require__) {
  1175. /* module decorator */ module = __webpack_require__.nmd(module);
  1176. var __WEBPACK_AMD_DEFINE_RESULT__;/**
  1177. * @license
  1178. * Lodash <https://lodash.com/>
  1179. * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
  1180. * Released under MIT license <https://lodash.com/license>
  1181. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  1182. * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  1183. */
  1184. ;(function() {
  1185. /** Used as a safe reference for `undefined` in pre-ES5 environments. */
  1186. var undefined;
  1187. /** Used as the semantic version number. */
  1188. var VERSION = '4.17.21';
  1189. /** Used as the size to enable large array optimizations. */
  1190. var LARGE_ARRAY_SIZE = 200;
  1191. /** Error message constants. */
  1192. var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',
  1193. FUNC_ERROR_TEXT = 'Expected a function',
  1194. INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`';
  1195. /** Used to stand-in for `undefined` hash values. */
  1196. var HASH_UNDEFINED = '__lodash_hash_undefined__';
  1197. /** Used as the maximum memoize cache size. */
  1198. var MAX_MEMOIZE_SIZE = 500;
  1199. /** Used as the internal argument placeholder. */
  1200. var PLACEHOLDER = '__lodash_placeholder__';
  1201. /** Used to compose bitmasks for cloning. */
  1202. var CLONE_DEEP_FLAG = 1,
  1203. CLONE_FLAT_FLAG = 2,
  1204. CLONE_SYMBOLS_FLAG = 4;
  1205. /** Used to compose bitmasks for value comparisons. */
  1206. var COMPARE_PARTIAL_FLAG = 1,
  1207. COMPARE_UNORDERED_FLAG = 2;
  1208. /** Used to compose bitmasks for function metadata. */
  1209. var WRAP_BIND_FLAG = 1,
  1210. WRAP_BIND_KEY_FLAG = 2,
  1211. WRAP_CURRY_BOUND_FLAG = 4,
  1212. WRAP_CURRY_FLAG = 8,
  1213. WRAP_CURRY_RIGHT_FLAG = 16,
  1214. WRAP_PARTIAL_FLAG = 32,
  1215. WRAP_PARTIAL_RIGHT_FLAG = 64,
  1216. WRAP_ARY_FLAG = 128,
  1217. WRAP_REARG_FLAG = 256,
  1218. WRAP_FLIP_FLAG = 512;
  1219. /** Used as default options for `_.truncate`. */
  1220. var DEFAULT_TRUNC_LENGTH = 30,
  1221. DEFAULT_TRUNC_OMISSION = '...';
  1222. /** Used to detect hot functions by number of calls within a span of milliseconds. */
  1223. var HOT_COUNT = 800,
  1224. HOT_SPAN = 16;
  1225. /** Used to indicate the type of lazy iteratees. */
  1226. var LAZY_FILTER_FLAG = 1,
  1227. LAZY_MAP_FLAG = 2,
  1228. LAZY_WHILE_FLAG = 3;
  1229. /** Used as references for various `Number` constants. */
  1230. var INFINITY = 1 / 0,
  1231. MAX_SAFE_INTEGER = 9007199254740991,
  1232. MAX_INTEGER = 1.7976931348623157e+308,
  1233. NAN = 0 / 0;
  1234. /** Used as references for the maximum length and index of an array. */
  1235. var MAX_ARRAY_LENGTH = 4294967295,
  1236. MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,
  1237. HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
  1238. /** Used to associate wrap methods with their bit flags. */
  1239. var wrapFlags = [
  1240. ['ary', WRAP_ARY_FLAG],
  1241. ['bind', WRAP_BIND_FLAG],
  1242. ['bindKey', WRAP_BIND_KEY_FLAG],
  1243. ['curry', WRAP_CURRY_FLAG],
  1244. ['curryRight', WRAP_CURRY_RIGHT_FLAG],
  1245. ['flip', WRAP_FLIP_FLAG],
  1246. ['partial', WRAP_PARTIAL_FLAG],
  1247. ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],
  1248. ['rearg', WRAP_REARG_FLAG]
  1249. ];
  1250. /** `Object#toString` result references. */
  1251. var argsTag = '[object Arguments]',
  1252. arrayTag = '[object Array]',
  1253. asyncTag = '[object AsyncFunction]',
  1254. boolTag = '[object Boolean]',
  1255. dateTag = '[object Date]',
  1256. domExcTag = '[object DOMException]',
  1257. errorTag = '[object Error]',
  1258. funcTag = '[object Function]',
  1259. genTag = '[object GeneratorFunction]',
  1260. mapTag = '[object Map]',
  1261. numberTag = '[object Number]',
  1262. nullTag = '[object Null]',
  1263. objectTag = '[object Object]',
  1264. promiseTag = '[object Promise]',
  1265. proxyTag = '[object Proxy]',
  1266. regexpTag = '[object RegExp]',
  1267. setTag = '[object Set]',
  1268. stringTag = '[object String]',
  1269. symbolTag = '[object Symbol]',
  1270. undefinedTag = '[object Undefined]',
  1271. weakMapTag = '[object WeakMap]',
  1272. weakSetTag = '[object WeakSet]';
  1273. var arrayBufferTag = '[object ArrayBuffer]',
  1274. dataViewTag = '[object DataView]',
  1275. float32Tag = '[object Float32Array]',
  1276. float64Tag = '[object Float64Array]',
  1277. int8Tag = '[object Int8Array]',
  1278. int16Tag = '[object Int16Array]',
  1279. int32Tag = '[object Int32Array]',
  1280. uint8Tag = '[object Uint8Array]',
  1281. uint8ClampedTag = '[object Uint8ClampedArray]',
  1282. uint16Tag = '[object Uint16Array]',
  1283. uint32Tag = '[object Uint32Array]';
  1284. /** Used to match empty string literals in compiled template source. */
  1285. var reEmptyStringLeading = /\b__p \+= '';/g,
  1286. reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
  1287. reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
  1288. /** Used to match HTML entities and HTML characters. */
  1289. var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,
  1290. reUnescapedHtml = /[&<>"']/g,
  1291. reHasEscapedHtml = RegExp(reEscapedHtml.source),
  1292. reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
  1293. /** Used to match template delimiters. */
  1294. var reEscape = /<%-([\s\S]+?)%>/g,
  1295. reEvaluate = /<%([\s\S]+?)%>/g,
  1296. reInterpolate = /<%=([\s\S]+?)%>/g;
  1297. /** Used to match property names within property paths. */
  1298. var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
  1299. reIsPlainProp = /^\w*$/,
  1300. rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
  1301. /**
  1302. * Used to match `RegExp`
  1303. * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
  1304. */
  1305. var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
  1306. reHasRegExpChar = RegExp(reRegExpChar.source);
  1307. /** Used to match leading whitespace. */
  1308. var reTrimStart = /^\s+/;
  1309. /** Used to match a single whitespace character. */
  1310. var reWhitespace = /\s/;
  1311. /** Used to match wrap detail comments. */
  1312. var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,
  1313. reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/,
  1314. reSplitDetails = /,? & /;
  1315. /** Used to match words composed of alphanumeric characters. */
  1316. var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
  1317. /**
  1318. * Used to validate the `validate` option in `_.template` variable.
  1319. *
  1320. * Forbids characters which could potentially change the meaning of the function argument definition:
  1321. * - "()," (modification of function parameters)
  1322. * - "=" (default value)
  1323. * - "[]{}" (destructuring of function parameters)
  1324. * - "/" (beginning of a comment)
  1325. * - whitespace
  1326. */
  1327. var reForbiddenIdentifierChars = /[()=,{}\[\]\/\s]/;
  1328. /** Used to match backslashes in property paths. */
  1329. var reEscapeChar = /\\(\\)?/g;
  1330. /**
  1331. * Used to match
  1332. * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).
  1333. */
  1334. var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
  1335. /** Used to match `RegExp` flags from their coerced string values. */
  1336. var reFlags = /\w*$/;
  1337. /** Used to detect bad signed hexadecimal string values. */
  1338. var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
  1339. /** Used to detect binary string values. */
  1340. var reIsBinary = /^0b[01]+$/i;
  1341. /** Used to detect host constructors (Safari). */
  1342. var reIsHostCtor = /^\[object .+?Constructor\]$/;
  1343. /** Used to detect octal string values. */
  1344. var reIsOctal = /^0o[0-7]+$/i;
  1345. /** Used to detect unsigned integer values. */
  1346. var reIsUint = /^(?:0|[1-9]\d*)$/;
  1347. /** Used to match Latin Unicode letters (excluding mathematical operators). */
  1348. var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
  1349. /** Used to ensure capturing order of template delimiters. */
  1350. var reNoMatch = /($^)/;
  1351. /** Used to match unescaped characters in compiled string literals. */
  1352. var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
  1353. /** Used to compose unicode character classes. */
  1354. var rsAstralRange = '\\ud800-\\udfff',
  1355. rsComboMarksRange = '\\u0300-\\u036f',
  1356. reComboHalfMarksRange = '\\ufe20-\\ufe2f',
  1357. rsComboSymbolsRange = '\\u20d0-\\u20ff',
  1358. rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
  1359. rsDingbatRange = '\\u2700-\\u27bf',
  1360. rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
  1361. rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
  1362. rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
  1363. rsPunctuationRange = '\\u2000-\\u206f',
  1364. 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',
  1365. rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
  1366. rsVarRange = '\\ufe0e\\ufe0f',
  1367. rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
  1368. /** Used to compose unicode capture groups. */
  1369. var rsApos = "['\u2019]",
  1370. rsAstral = '[' + rsAstralRange + ']',
  1371. rsBreak = '[' + rsBreakRange + ']',
  1372. rsCombo = '[' + rsComboRange + ']',
  1373. rsDigits = '\\d+',
  1374. rsDingbat = '[' + rsDingbatRange + ']',
  1375. rsLower = '[' + rsLowerRange + ']',
  1376. rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
  1377. rsFitz = '\\ud83c[\\udffb-\\udfff]',
  1378. rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
  1379. rsNonAstral = '[^' + rsAstralRange + ']',
  1380. rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
  1381. rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
  1382. rsUpper = '[' + rsUpperRange + ']',
  1383. rsZWJ = '\\u200d';
  1384. /** Used to compose unicode regexes. */
  1385. var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',
  1386. rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',
  1387. rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',
  1388. rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',
  1389. reOptMod = rsModifier + '?',
  1390. rsOptVar = '[' + rsVarRange + ']?',
  1391. rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
  1392. rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])',
  1393. rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])',
  1394. rsSeq = rsOptVar + reOptMod + rsOptJoin,
  1395. rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,
  1396. rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
  1397. /** Used to match apostrophes. */
  1398. var reApos = RegExp(rsApos, 'g');
  1399. /**
  1400. * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
  1401. * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
  1402. */
  1403. var reComboMark = RegExp(rsCombo, 'g');
  1404. /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
  1405. var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
  1406. /** Used to match complex or compound words. */
  1407. var reUnicodeWord = RegExp([
  1408. rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
  1409. rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',
  1410. rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,
  1411. rsUpper + '+' + rsOptContrUpper,
  1412. rsOrdUpper,
  1413. rsOrdLower,
  1414. rsDigits,
  1415. rsEmoji
  1416. ].join('|'), 'g');
  1417. /** 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/). */
  1418. var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');
  1419. /** Used to detect strings that need a more robust regexp to match words. */
  1420. 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 ]/;
  1421. /** Used to assign default `context` object properties. */
  1422. var contextProps = [
  1423. 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',
  1424. 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',
  1425. 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',
  1426. 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',
  1427. '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'
  1428. ];
  1429. /** Used to make template sourceURLs easier to identify. */
  1430. var templateCounter = -1;
  1431. /** Used to identify `toStringTag` values of typed arrays. */
  1432. var typedArrayTags = {};
  1433. typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
  1434. typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
  1435. typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
  1436. typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
  1437. typedArrayTags[uint32Tag] = true;
  1438. typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
  1439. typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
  1440. typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
  1441. typedArrayTags[errorTag] = typedArrayTags[funcTag] =
  1442. typedArrayTags[mapTag] = typedArrayTags[numberTag] =
  1443. typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
  1444. typedArrayTags[setTag] = typedArrayTags[stringTag] =
  1445. typedArrayTags[weakMapTag] = false;
  1446. /** Used to identify `toStringTag` values supported by `_.clone`. */
  1447. var cloneableTags = {};
  1448. cloneableTags[argsTag] = cloneableTags[arrayTag] =
  1449. cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
  1450. cloneableTags[boolTag] = cloneableTags[dateTag] =
  1451. cloneableTags[float32Tag] = cloneableTags[float64Tag] =
  1452. cloneableTags[int8Tag] = cloneableTags[int16Tag] =
  1453. cloneableTags[int32Tag] = cloneableTags[mapTag] =
  1454. cloneableTags[numberTag] = cloneableTags[objectTag] =
  1455. cloneableTags[regexpTag] = cloneableTags[setTag] =
  1456. cloneableTags[stringTag] = cloneableTags[symbolTag] =
  1457. cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
  1458. cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
  1459. cloneableTags[errorTag] = cloneableTags[funcTag] =
  1460. cloneableTags[weakMapTag] = false;
  1461. /** Used to map Latin Unicode letters to basic Latin letters. */
  1462. var deburredLetters = {
  1463. // Latin-1 Supplement block.
  1464. '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
  1465. '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
  1466. '\xc7': 'C', '\xe7': 'c',
  1467. '\xd0': 'D', '\xf0': 'd',
  1468. '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
  1469. '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
  1470. '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
  1471. '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
  1472. '\xd1': 'N', '\xf1': 'n',
  1473. '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
  1474. '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
  1475. '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
  1476. '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
  1477. '\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
  1478. '\xc6': 'Ae', '\xe6': 'ae',
  1479. '\xde': 'Th', '\xfe': 'th',
  1480. '\xdf': 'ss',
  1481. // Latin Extended-A block.
  1482. '\u0100': 'A', '\u0102': 'A', '\u0104': 'A',
  1483. '\u0101': 'a', '\u0103': 'a', '\u0105': 'a',
  1484. '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
  1485. '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
  1486. '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
  1487. '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
  1488. '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
  1489. '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
  1490. '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
  1491. '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
  1492. '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
  1493. '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
  1494. '\u0134': 'J', '\u0135': 'j',
  1495. '\u0136': 'K', '\u0137': 'k', '\u0138': 'k',
  1496. '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
  1497. '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
  1498. '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
  1499. '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
  1500. '\u014c': 'O', '\u014e': 'O', '\u0150': 'O',
  1501. '\u014d': 'o', '\u014f': 'o', '\u0151': 'o',
  1502. '\u0154': 'R', '\u0156': 'R', '\u0158': 'R',
  1503. '\u0155': 'r', '\u0157': 'r', '\u0159': 'r',
  1504. '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
  1505. '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's',
  1506. '\u0162': 'T', '\u0164': 'T', '\u0166': 'T',
  1507. '\u0163': 't', '\u0165': 't', '\u0167': 't',
  1508. '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
  1509. '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
  1510. '\u0174': 'W', '\u0175': 'w',
  1511. '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y',
  1512. '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z',
  1513. '\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
  1514. '\u0132': 'IJ', '\u0133': 'ij',
  1515. '\u0152': 'Oe', '\u0153': 'oe',
  1516. '\u0149': "'n", '\u017f': 's'
  1517. };
  1518. /** Used to map characters to HTML entities. */
  1519. var htmlEscapes = {
  1520. '&': '&amp;',
  1521. '<': '&lt;',
  1522. '>': '&gt;',
  1523. '"': '&quot;',
  1524. "'": '&#39;'
  1525. };
  1526. /** Used to map HTML entities to characters. */
  1527. var htmlUnescapes = {
  1528. '&amp;': '&',
  1529. '&lt;': '<',
  1530. '&gt;': '>',
  1531. '&quot;': '"',
  1532. '&#39;': "'"
  1533. };
  1534. /** Used to escape characters for inclusion in compiled string literals. */
  1535. var stringEscapes = {
  1536. '\\': '\\',
  1537. "'": "'",
  1538. '\n': 'n',
  1539. '\r': 'r',
  1540. '\u2028': 'u2028',
  1541. '\u2029': 'u2029'
  1542. };
  1543. /** Built-in method references without a dependency on `root`. */
  1544. var freeParseFloat = parseFloat,
  1545. freeParseInt = parseInt;
  1546. /** Detect free variable `global` from Node.js. */
  1547. var freeGlobal = typeof __webpack_require__.g == 'object' && __webpack_require__.g && __webpack_require__.g.Object === Object && __webpack_require__.g;
  1548. /** Detect free variable `self`. */
  1549. var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
  1550. /** Used as a reference to the global object. */
  1551. var root = freeGlobal || freeSelf || Function('return this')();
  1552. /** Detect free variable `exports`. */
  1553. var freeExports = true && exports && !exports.nodeType && exports;
  1554. /** Detect free variable `module`. */
  1555. var freeModule = freeExports && "object" == 'object' && module && !module.nodeType && module;
  1556. /** Detect the popular CommonJS extension `module.exports`. */
  1557. var moduleExports = freeModule && freeModule.exports === freeExports;
  1558. /** Detect free variable `process` from Node.js. */
  1559. var freeProcess = moduleExports && freeGlobal.process;
  1560. /** Used to access faster Node.js helpers. */
  1561. var nodeUtil = (function() {
  1562. try {
  1563. // Use `util.types` for Node.js 10+.
  1564. var types = freeModule && freeModule.require && freeModule.require('util').types;
  1565. if (types) {
  1566. return types;
  1567. }
  1568. // Legacy `process.binding('util')` for Node.js < 10.
  1569. return freeProcess && freeProcess.binding && freeProcess.binding('util');
  1570. } catch (e) {}
  1571. }());
  1572. /* Node.js helper references. */
  1573. var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,
  1574. nodeIsDate = nodeUtil && nodeUtil.isDate,
  1575. nodeIsMap = nodeUtil && nodeUtil.isMap,
  1576. nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,
  1577. nodeIsSet = nodeUtil && nodeUtil.isSet,
  1578. nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
  1579. /*--------------------------------------------------------------------------*/
  1580. /**
  1581. * A faster alternative to `Function#apply`, this function invokes `func`
  1582. * with the `this` binding of `thisArg` and the arguments of `args`.
  1583. *
  1584. * @private
  1585. * @param {Function} func The function to invoke.
  1586. * @param {*} thisArg The `this` binding of `func`.
  1587. * @param {Array} args The arguments to invoke `func` with.
  1588. * @returns {*} Returns the result of `func`.
  1589. */
  1590. function apply(func, thisArg, args) {
  1591. switch (args.length) {
  1592. case 0: return func.call(thisArg);
  1593. case 1: return func.call(thisArg, args[0]);
  1594. case 2: return func.call(thisArg, args[0], args[1]);
  1595. case 3: return func.call(thisArg, args[0], args[1], args[2]);
  1596. }
  1597. return func.apply(thisArg, args);
  1598. }
  1599. /**
  1600. * A specialized version of `baseAggregator` for arrays.
  1601. *
  1602. * @private
  1603. * @param {Array} [array] The array to iterate over.
  1604. * @param {Function} setter The function to set `accumulator` values.
  1605. * @param {Function} iteratee The iteratee to transform keys.
  1606. * @param {Object} accumulator The initial aggregated object.
  1607. * @returns {Function} Returns `accumulator`.
  1608. */
  1609. function arrayAggregator(array, setter, iteratee, accumulator) {
  1610. var index = -1,
  1611. length = array == null ? 0 : array.length;
  1612. while (++index < length) {
  1613. var value = array[index];
  1614. setter(accumulator, value, iteratee(value), array);
  1615. }
  1616. return accumulator;
  1617. }
  1618. /**
  1619. * A specialized version of `_.forEach` for arrays without support for
  1620. * iteratee shorthands.
  1621. *
  1622. * @private
  1623. * @param {Array} [array] The array to iterate over.
  1624. * @param {Function} iteratee The function invoked per iteration.
  1625. * @returns {Array} Returns `array`.
  1626. */
  1627. function arrayEach(array, iteratee) {
  1628. var index = -1,
  1629. length = array == null ? 0 : array.length;
  1630. while (++index < length) {
  1631. if (iteratee(array[index], index, array) === false) {
  1632. break;
  1633. }
  1634. }
  1635. return array;
  1636. }
  1637. /**
  1638. * A specialized version of `_.forEachRight` for arrays without support for
  1639. * iteratee shorthands.
  1640. *
  1641. * @private
  1642. * @param {Array} [array] The array to iterate over.
  1643. * @param {Function} iteratee The function invoked per iteration.
  1644. * @returns {Array} Returns `array`.
  1645. */
  1646. function arrayEachRight(array, iteratee) {
  1647. var length = array == null ? 0 : array.length;
  1648. while (length--) {
  1649. if (iteratee(array[length], length, array) === false) {
  1650. break;
  1651. }
  1652. }
  1653. return array;
  1654. }
  1655. /**
  1656. * A specialized version of `_.every` for arrays without support for
  1657. * iteratee shorthands.
  1658. *
  1659. * @private
  1660. * @param {Array} [array] The array to iterate over.
  1661. * @param {Function} predicate The function invoked per iteration.
  1662. * @returns {boolean} Returns `true` if all elements pass the predicate check,
  1663. * else `false`.
  1664. */
  1665. function arrayEvery(array, predicate) {
  1666. var index = -1,
  1667. length = array == null ? 0 : array.length;
  1668. while (++index < length) {
  1669. if (!predicate(array[index], index, array)) {
  1670. return false;
  1671. }
  1672. }
  1673. return true;
  1674. }
  1675. /**
  1676. * A specialized version of `_.filter` for arrays without support for
  1677. * iteratee shorthands.
  1678. *
  1679. * @private
  1680. * @param {Array} [array] The array to iterate over.
  1681. * @param {Function} predicate The function invoked per iteration.
  1682. * @returns {Array} Returns the new filtered array.
  1683. */
  1684. function arrayFilter(array, predicate) {
  1685. var index = -1,
  1686. length = array == null ? 0 : array.length,
  1687. resIndex = 0,
  1688. result = [];
  1689. while (++index < length) {
  1690. var value = array[index];
  1691. if (predicate(value, index, array)) {
  1692. result[resIndex++] = value;
  1693. }
  1694. }
  1695. return result;
  1696. }
  1697. /**
  1698. * A specialized version of `_.includes` for arrays without support for
  1699. * specifying an index to search from.
  1700. *
  1701. * @private
  1702. * @param {Array} [array] The array to inspect.
  1703. * @param {*} target The value to search for.
  1704. * @returns {boolean} Returns `true` if `target` is found, else `false`.
  1705. */
  1706. function arrayIncludes(array, value) {
  1707. var length = array == null ? 0 : array.length;
  1708. return !!length && baseIndexOf(array, value, 0) > -1;
  1709. }
  1710. /**
  1711. * This function is like `arrayIncludes` except that it accepts a comparator.
  1712. *
  1713. * @private
  1714. * @param {Array} [array] The array to inspect.
  1715. * @param {*} target The value to search for.
  1716. * @param {Function} comparator The comparator invoked per element.
  1717. * @returns {boolean} Returns `true` if `target` is found, else `false`.
  1718. */
  1719. function arrayIncludesWith(array, value, comparator) {
  1720. var index = -1,
  1721. length = array == null ? 0 : array.length;
  1722. while (++index < length) {
  1723. if (comparator(value, array[index])) {
  1724. return true;
  1725. }
  1726. }
  1727. return false;
  1728. }
  1729. /**
  1730. * A specialized version of `_.map` for arrays without support for iteratee
  1731. * shorthands.
  1732. *
  1733. * @private
  1734. * @param {Array} [array] The array to iterate over.
  1735. * @param {Function} iteratee The function invoked per iteration.
  1736. * @returns {Array} Returns the new mapped array.
  1737. */
  1738. function arrayMap(array, iteratee) {
  1739. var index = -1,
  1740. length = array == null ? 0 : array.length,
  1741. result = Array(length);
  1742. while (++index < length) {
  1743. result[index] = iteratee(array[index], index, array);
  1744. }
  1745. return result;
  1746. }
  1747. /**
  1748. * Appends the elements of `values` to `array`.
  1749. *
  1750. * @private
  1751. * @param {Array} array The array to modify.
  1752. * @param {Array} values The values to append.
  1753. * @returns {Array} Returns `array`.
  1754. */
  1755. function arrayPush(array, values) {
  1756. var index = -1,
  1757. length = values.length,
  1758. offset = array.length;
  1759. while (++index < length) {
  1760. array[offset + index] = values[index];
  1761. }
  1762. return array;
  1763. }
  1764. /**
  1765. * A specialized version of `_.reduce` for arrays without support for
  1766. * iteratee shorthands.
  1767. *
  1768. * @private
  1769. * @param {Array} [array] The array to iterate over.
  1770. * @param {Function} iteratee The function invoked per iteration.
  1771. * @param {*} [accumulator] The initial value.
  1772. * @param {boolean} [initAccum] Specify using the first element of `array` as
  1773. * the initial value.
  1774. * @returns {*} Returns the accumulated value.
  1775. */
  1776. function arrayReduce(array, iteratee, accumulator, initAccum) {
  1777. var index = -1,
  1778. length = array == null ? 0 : array.length;
  1779. if (initAccum && length) {
  1780. accumulator = array[++index];
  1781. }
  1782. while (++index < length) {
  1783. accumulator = iteratee(accumulator, array[index], index, array);
  1784. }
  1785. return accumulator;
  1786. }
  1787. /**
  1788. * A specialized version of `_.reduceRight` for arrays without support for
  1789. * iteratee shorthands.
  1790. *
  1791. * @private
  1792. * @param {Array} [array] The array to iterate over.
  1793. * @param {Function} iteratee The function invoked per iteration.
  1794. * @param {*} [accumulator] The initial value.
  1795. * @param {boolean} [initAccum] Specify using the last element of `array` as
  1796. * the initial value.
  1797. * @returns {*} Returns the accumulated value.
  1798. */
  1799. function arrayReduceRight(array, iteratee, accumulator, initAccum) {
  1800. var length = array == null ? 0 : array.length;
  1801. if (initAccum && length) {
  1802. accumulator = array[--length];
  1803. }
  1804. while (length--) {
  1805. accumulator = iteratee(accumulator, array[length], length, array);
  1806. }
  1807. return accumulator;
  1808. }
  1809. /**
  1810. * A specialized version of `_.some` for arrays without support for iteratee
  1811. * shorthands.
  1812. *
  1813. * @private
  1814. * @param {Array} [array] The array to iterate over.
  1815. * @param {Function} predicate The function invoked per iteration.
  1816. * @returns {boolean} Returns `true` if any element passes the predicate check,
  1817. * else `false`.
  1818. */
  1819. function arraySome(array, predicate) {
  1820. var index = -1,
  1821. length = array == null ? 0 : array.length;
  1822. while (++index < length) {
  1823. if (predicate(array[index], index, array)) {
  1824. return true;
  1825. }
  1826. }
  1827. return false;
  1828. }
  1829. /**
  1830. * Gets the size of an ASCII `string`.
  1831. *
  1832. * @private
  1833. * @param {string} string The string inspect.
  1834. * @returns {number} Returns the string size.
  1835. */
  1836. var asciiSize = baseProperty('length');
  1837. /**
  1838. * Converts an ASCII `string` to an array.
  1839. *
  1840. * @private
  1841. * @param {string} string The string to convert.
  1842. * @returns {Array} Returns the converted array.
  1843. */
  1844. function asciiToArray(string) {
  1845. return string.split('');
  1846. }
  1847. /**
  1848. * Splits an ASCII `string` into an array of its words.
  1849. *
  1850. * @private
  1851. * @param {string} The string to inspect.
  1852. * @returns {Array} Returns the words of `string`.
  1853. */
  1854. function asciiWords(string) {
  1855. return string.match(reAsciiWord) || [];
  1856. }
  1857. /**
  1858. * The base implementation of methods like `_.findKey` and `_.findLastKey`,
  1859. * without support for iteratee shorthands, which iterates over `collection`
  1860. * using `eachFunc`.
  1861. *
  1862. * @private
  1863. * @param {Array|Object} collection The collection to inspect.
  1864. * @param {Function} predicate The function invoked per iteration.
  1865. * @param {Function} eachFunc The function to iterate over `collection`.
  1866. * @returns {*} Returns the found element or its key, else `undefined`.
  1867. */
  1868. function baseFindKey(collection, predicate, eachFunc) {
  1869. var result;
  1870. eachFunc(collection, function(value, key, collection) {
  1871. if (predicate(value, key, collection)) {
  1872. result = key;
  1873. return false;
  1874. }
  1875. });
  1876. return result;
  1877. }
  1878. /**
  1879. * The base implementation of `_.findIndex` and `_.findLastIndex` without
  1880. * support for iteratee shorthands.
  1881. *
  1882. * @private
  1883. * @param {Array} array The array to inspect.
  1884. * @param {Function} predicate The function invoked per iteration.
  1885. * @param {number} fromIndex The index to search from.
  1886. * @param {boolean} [fromRight] Specify iterating from right to left.
  1887. * @returns {number} Returns the index of the matched value, else `-1`.
  1888. */
  1889. function baseFindIndex(array, predicate, fromIndex, fromRight) {
  1890. var length = array.length,
  1891. index = fromIndex + (fromRight ? 1 : -1);
  1892. while ((fromRight ? index-- : ++index < length)) {
  1893. if (predicate(array[index], index, array)) {
  1894. return index;
  1895. }
  1896. }
  1897. return -1;
  1898. }
  1899. /**
  1900. * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
  1901. *
  1902. * @private
  1903. * @param {Array} array The array to inspect.
  1904. * @param {*} value The value to search for.
  1905. * @param {number} fromIndex The index to search from.
  1906. * @returns {number} Returns the index of the matched value, else `-1`.
  1907. */
  1908. function baseIndexOf(array, value, fromIndex) {
  1909. return value === value
  1910. ? strictIndexOf(array, value, fromIndex)
  1911. : baseFindIndex(array, baseIsNaN, fromIndex);
  1912. }
  1913. /**
  1914. * This function is like `baseIndexOf` except that it accepts a comparator.
  1915. *
  1916. * @private
  1917. * @param {Array} array The array to inspect.
  1918. * @param {*} value The value to search for.
  1919. * @param {number} fromIndex The index to search from.
  1920. * @param {Function} comparator The comparator invoked per element.
  1921. * @returns {number} Returns the index of the matched value, else `-1`.
  1922. */
  1923. function baseIndexOfWith(array, value, fromIndex, comparator) {
  1924. var index = fromIndex - 1,
  1925. length = array.length;
  1926. while (++index < length) {
  1927. if (comparator(array[index], value)) {
  1928. return index;
  1929. }
  1930. }
  1931. return -1;
  1932. }
  1933. /**
  1934. * The base implementation of `_.isNaN` without support for number objects.
  1935. *
  1936. * @private
  1937. * @param {*} value The value to check.
  1938. * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
  1939. */
  1940. function baseIsNaN(value) {
  1941. return value !== value;
  1942. }
  1943. /**
  1944. * The base implementation of `_.mean` and `_.meanBy` without support for
  1945. * iteratee shorthands.
  1946. *
  1947. * @private
  1948. * @param {Array} array The array to iterate over.
  1949. * @param {Function} iteratee The function invoked per iteration.
  1950. * @returns {number} Returns the mean.
  1951. */
  1952. function baseMean(array, iteratee) {
  1953. var length = array == null ? 0 : array.length;
  1954. return length ? (baseSum(array, iteratee) / length) : NAN;
  1955. }
  1956. /**
  1957. * The base implementation of `_.property` without support for deep paths.
  1958. *
  1959. * @private
  1960. * @param {string} key The key of the property to get.
  1961. * @returns {Function} Returns the new accessor function.
  1962. */
  1963. function baseProperty(key) {
  1964. return function(object) {
  1965. return object == null ? undefined : object[key];
  1966. };
  1967. }
  1968. /**
  1969. * The base implementation of `_.propertyOf` without support for deep paths.
  1970. *
  1971. * @private
  1972. * @param {Object} object The object to query.
  1973. * @returns {Function} Returns the new accessor function.
  1974. */
  1975. function basePropertyOf(object) {
  1976. return function(key) {
  1977. return object == null ? undefined : object[key];
  1978. };
  1979. }
  1980. /**
  1981. * The base implementation of `_.reduce` and `_.reduceRight`, without support
  1982. * for iteratee shorthands, which iterates over `collection` using `eachFunc`.
  1983. *
  1984. * @private
  1985. * @param {Array|Object} collection The collection to iterate over.
  1986. * @param {Function} iteratee The function invoked per iteration.
  1987. * @param {*} accumulator The initial value.
  1988. * @param {boolean} initAccum Specify using the first or last element of
  1989. * `collection` as the initial value.
  1990. * @param {Function} eachFunc The function to iterate over `collection`.
  1991. * @returns {*} Returns the accumulated value.
  1992. */
  1993. function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
  1994. eachFunc(collection, function(value, index, collection) {
  1995. accumulator = initAccum
  1996. ? (initAccum = false, value)
  1997. : iteratee(accumulator, value, index, collection);
  1998. });
  1999. return accumulator;
  2000. }
  2001. /**
  2002. * The base implementation of `_.sortBy` which uses `comparer` to define the
  2003. * sort order of `array` and replaces criteria objects with their corresponding
  2004. * values.
  2005. *
  2006. * @private
  2007. * @param {Array} array The array to sort.
  2008. * @param {Function} comparer The function to define sort order.
  2009. * @returns {Array} Returns `array`.
  2010. */
  2011. function baseSortBy(array, comparer) {
  2012. var length = array.length;
  2013. array.sort(comparer);
  2014. while (length--) {
  2015. array[length] = array[length].value;
  2016. }
  2017. return array;
  2018. }
  2019. /**
  2020. * The base implementation of `_.sum` and `_.sumBy` without support for
  2021. * iteratee shorthands.
  2022. *
  2023. * @private
  2024. * @param {Array} array The array to iterate over.
  2025. * @param {Function} iteratee The function invoked per iteration.
  2026. * @returns {number} Returns the sum.
  2027. */
  2028. function baseSum(array, iteratee) {
  2029. var result,
  2030. index = -1,
  2031. length = array.length;
  2032. while (++index < length) {
  2033. var current = iteratee(array[index]);
  2034. if (current !== undefined) {
  2035. result = result === undefined ? current : (result + current);
  2036. }
  2037. }
  2038. return result;
  2039. }
  2040. /**
  2041. * The base implementation of `_.times` without support for iteratee shorthands
  2042. * or max array length checks.
  2043. *
  2044. * @private
  2045. * @param {number} n The number of times to invoke `iteratee`.
  2046. * @param {Function} iteratee The function invoked per iteration.
  2047. * @returns {Array} Returns the array of results.
  2048. */
  2049. function baseTimes(n, iteratee) {
  2050. var index = -1,
  2051. result = Array(n);
  2052. while (++index < n) {
  2053. result[index] = iteratee(index);
  2054. }
  2055. return result;
  2056. }
  2057. /**
  2058. * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array
  2059. * of key-value pairs for `object` corresponding to the property names of `props`.
  2060. *
  2061. * @private
  2062. * @param {Object} object The object to query.
  2063. * @param {Array} props The property names to get values for.
  2064. * @returns {Object} Returns the key-value pairs.
  2065. */
  2066. function baseToPairs(object, props) {
  2067. return arrayMap(props, function(key) {
  2068. return [key, object[key]];
  2069. });
  2070. }
  2071. /**
  2072. * The base implementation of `_.trim`.
  2073. *
  2074. * @private
  2075. * @param {string} string The string to trim.
  2076. * @returns {string} Returns the trimmed string.
  2077. */
  2078. function baseTrim(string) {
  2079. return string
  2080. ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')
  2081. : string;
  2082. }
  2083. /**
  2084. * The base implementation of `_.unary` without support for storing metadata.
  2085. *
  2086. * @private
  2087. * @param {Function} func The function to cap arguments for.
  2088. * @returns {Function} Returns the new capped function.
  2089. */
  2090. function baseUnary(func) {
  2091. return function(value) {
  2092. return func(value);
  2093. };
  2094. }
  2095. /**
  2096. * The base implementation of `_.values` and `_.valuesIn` which creates an
  2097. * array of `object` property values corresponding to the property names
  2098. * of `props`.
  2099. *
  2100. * @private
  2101. * @param {Object} object The object to query.
  2102. * @param {Array} props The property names to get values for.
  2103. * @returns {Object} Returns the array of property values.
  2104. */
  2105. function baseValues(object, props) {
  2106. return arrayMap(props, function(key) {
  2107. return object[key];
  2108. });
  2109. }
  2110. /**
  2111. * Checks if a `cache` value for `key` exists.
  2112. *
  2113. * @private
  2114. * @param {Object} cache The cache to query.
  2115. * @param {string} key The key of the entry to check.
  2116. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  2117. */
  2118. function cacheHas(cache, key) {
  2119. return cache.has(key);
  2120. }
  2121. /**
  2122. * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol
  2123. * that is not found in the character symbols.
  2124. *
  2125. * @private
  2126. * @param {Array} strSymbols The string symbols to inspect.
  2127. * @param {Array} chrSymbols The character symbols to find.
  2128. * @returns {number} Returns the index of the first unmatched string symbol.
  2129. */
  2130. function charsStartIndex(strSymbols, chrSymbols) {
  2131. var index = -1,
  2132. length = strSymbols.length;
  2133. while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
  2134. return index;
  2135. }
  2136. /**
  2137. * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol
  2138. * that is not found in the character symbols.
  2139. *
  2140. * @private
  2141. * @param {Array} strSymbols The string symbols to inspect.
  2142. * @param {Array} chrSymbols The character symbols to find.
  2143. * @returns {number} Returns the index of the last unmatched string symbol.
  2144. */
  2145. function charsEndIndex(strSymbols, chrSymbols) {
  2146. var index = strSymbols.length;
  2147. while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
  2148. return index;
  2149. }
  2150. /**
  2151. * Gets the number of `placeholder` occurrences in `array`.
  2152. *
  2153. * @private
  2154. * @param {Array} array The array to inspect.
  2155. * @param {*} placeholder The placeholder to search for.
  2156. * @returns {number} Returns the placeholder count.
  2157. */
  2158. function countHolders(array, placeholder) {
  2159. var length = array.length,
  2160. result = 0;
  2161. while (length--) {
  2162. if (array[length] === placeholder) {
  2163. ++result;
  2164. }
  2165. }
  2166. return result;
  2167. }
  2168. /**
  2169. * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
  2170. * letters to basic Latin letters.
  2171. *
  2172. * @private
  2173. * @param {string} letter The matched letter to deburr.
  2174. * @returns {string} Returns the deburred letter.
  2175. */
  2176. var deburrLetter = basePropertyOf(deburredLetters);
  2177. /**
  2178. * Used by `_.escape` to convert characters to HTML entities.
  2179. *
  2180. * @private
  2181. * @param {string} chr The matched character to escape.
  2182. * @returns {string} Returns the escaped character.
  2183. */
  2184. var escapeHtmlChar = basePropertyOf(htmlEscapes);
  2185. /**
  2186. * Used by `_.template` to escape characters for inclusion in compiled string literals.
  2187. *
  2188. * @private
  2189. * @param {string} chr The matched character to escape.
  2190. * @returns {string} Returns the escaped character.
  2191. */
  2192. function escapeStringChar(chr) {
  2193. return '\\' + stringEscapes[chr];
  2194. }
  2195. /**
  2196. * Gets the value at `key` of `object`.
  2197. *
  2198. * @private
  2199. * @param {Object} [object] The object to query.
  2200. * @param {string} key The key of the property to get.
  2201. * @returns {*} Returns the property value.
  2202. */
  2203. function getValue(object, key) {
  2204. return object == null ? undefined : object[key];
  2205. }
  2206. /**
  2207. * Checks if `string` contains Unicode symbols.
  2208. *
  2209. * @private
  2210. * @param {string} string The string to inspect.
  2211. * @returns {boolean} Returns `true` if a symbol is found, else `false`.
  2212. */
  2213. function hasUnicode(string) {
  2214. return reHasUnicode.test(string);
  2215. }
  2216. /**
  2217. * Checks if `string` contains a word composed of Unicode symbols.
  2218. *
  2219. * @private
  2220. * @param {string} string The string to inspect.
  2221. * @returns {boolean} Returns `true` if a word is found, else `false`.
  2222. */
  2223. function hasUnicodeWord(string) {
  2224. return reHasUnicodeWord.test(string);
  2225. }
  2226. /**
  2227. * Converts `iterator` to an array.
  2228. *
  2229. * @private
  2230. * @param {Object} iterator The iterator to convert.
  2231. * @returns {Array} Returns the converted array.
  2232. */
  2233. function iteratorToArray(iterator) {
  2234. var data,
  2235. result = [];
  2236. while (!(data = iterator.next()).done) {
  2237. result.push(data.value);
  2238. }
  2239. return result;
  2240. }
  2241. /**
  2242. * Converts `map` to its key-value pairs.
  2243. *
  2244. * @private
  2245. * @param {Object} map The map to convert.
  2246. * @returns {Array} Returns the key-value pairs.
  2247. */
  2248. function mapToArray(map) {
  2249. var index = -1,
  2250. result = Array(map.size);
  2251. map.forEach(function(value, key) {
  2252. result[++index] = [key, value];
  2253. });
  2254. return result;
  2255. }
  2256. /**
  2257. * Creates a unary function that invokes `func` with its argument transformed.
  2258. *
  2259. * @private
  2260. * @param {Function} func The function to wrap.
  2261. * @param {Function} transform The argument transform.
  2262. * @returns {Function} Returns the new function.
  2263. */
  2264. function overArg(func, transform) {
  2265. return function(arg) {
  2266. return func(transform(arg));
  2267. };
  2268. }
  2269. /**
  2270. * Replaces all `placeholder` elements in `array` with an internal placeholder
  2271. * and returns an array of their indexes.
  2272. *
  2273. * @private
  2274. * @param {Array} array The array to modify.
  2275. * @param {*} placeholder The placeholder to replace.
  2276. * @returns {Array} Returns the new array of placeholder indexes.
  2277. */
  2278. function replaceHolders(array, placeholder) {
  2279. var index = -1,
  2280. length = array.length,
  2281. resIndex = 0,
  2282. result = [];
  2283. while (++index < length) {
  2284. var value = array[index];
  2285. if (value === placeholder || value === PLACEHOLDER) {
  2286. array[index] = PLACEHOLDER;
  2287. result[resIndex++] = index;
  2288. }
  2289. }
  2290. return result;
  2291. }
  2292. /**
  2293. * Converts `set` to an array of its values.
  2294. *
  2295. * @private
  2296. * @param {Object} set The set to convert.
  2297. * @returns {Array} Returns the values.
  2298. */
  2299. function setToArray(set) {
  2300. var index = -1,
  2301. result = Array(set.size);
  2302. set.forEach(function(value) {
  2303. result[++index] = value;
  2304. });
  2305. return result;
  2306. }
  2307. /**
  2308. * Converts `set` to its value-value pairs.
  2309. *
  2310. * @private
  2311. * @param {Object} set The set to convert.
  2312. * @returns {Array} Returns the value-value pairs.
  2313. */
  2314. function setToPairs(set) {
  2315. var index = -1,
  2316. result = Array(set.size);
  2317. set.forEach(function(value) {
  2318. result[++index] = [value, value];
  2319. });
  2320. return result;
  2321. }
  2322. /**
  2323. * A specialized version of `_.indexOf` which performs strict equality
  2324. * comparisons of values, i.e. `===`.
  2325. *
  2326. * @private
  2327. * @param {Array} array The array to inspect.
  2328. * @param {*} value The value to search for.
  2329. * @param {number} fromIndex The index to search from.
  2330. * @returns {number} Returns the index of the matched value, else `-1`.
  2331. */
  2332. function strictIndexOf(array, value, fromIndex) {
  2333. var index = fromIndex - 1,
  2334. length = array.length;
  2335. while (++index < length) {
  2336. if (array[index] === value) {
  2337. return index;
  2338. }
  2339. }
  2340. return -1;
  2341. }
  2342. /**
  2343. * A specialized version of `_.lastIndexOf` which performs strict equality
  2344. * comparisons of values, i.e. `===`.
  2345. *
  2346. * @private
  2347. * @param {Array} array The array to inspect.
  2348. * @param {*} value The value to search for.
  2349. * @param {number} fromIndex The index to search from.
  2350. * @returns {number} Returns the index of the matched value, else `-1`.
  2351. */
  2352. function strictLastIndexOf(array, value, fromIndex) {
  2353. var index = fromIndex + 1;
  2354. while (index--) {
  2355. if (array[index] === value) {
  2356. return index;
  2357. }
  2358. }
  2359. return index;
  2360. }
  2361. /**
  2362. * Gets the number of symbols in `string`.
  2363. *
  2364. * @private
  2365. * @param {string} string The string to inspect.
  2366. * @returns {number} Returns the string size.
  2367. */
  2368. function stringSize(string) {
  2369. return hasUnicode(string)
  2370. ? unicodeSize(string)
  2371. : asciiSize(string);
  2372. }
  2373. /**
  2374. * Converts `string` to an array.
  2375. *
  2376. * @private
  2377. * @param {string} string The string to convert.
  2378. * @returns {Array} Returns the converted array.
  2379. */
  2380. function stringToArray(string) {
  2381. return hasUnicode(string)
  2382. ? unicodeToArray(string)
  2383. : asciiToArray(string);
  2384. }
  2385. /**
  2386. * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
  2387. * character of `string`.
  2388. *
  2389. * @private
  2390. * @param {string} string The string to inspect.
  2391. * @returns {number} Returns the index of the last non-whitespace character.
  2392. */
  2393. function trimmedEndIndex(string) {
  2394. var index = string.length;
  2395. while (index-- && reWhitespace.test(string.charAt(index))) {}
  2396. return index;
  2397. }
  2398. /**
  2399. * Used by `_.unescape` to convert HTML entities to characters.
  2400. *
  2401. * @private
  2402. * @param {string} chr The matched character to unescape.
  2403. * @returns {string} Returns the unescaped character.
  2404. */
  2405. var unescapeHtmlChar = basePropertyOf(htmlUnescapes);
  2406. /**
  2407. * Gets the size of a Unicode `string`.
  2408. *
  2409. * @private
  2410. * @param {string} string The string inspect.
  2411. * @returns {number} Returns the string size.
  2412. */
  2413. function unicodeSize(string) {
  2414. var result = reUnicode.lastIndex = 0;
  2415. while (reUnicode.test(string)) {
  2416. ++result;
  2417. }
  2418. return result;
  2419. }
  2420. /**
  2421. * Converts a Unicode `string` to an array.
  2422. *
  2423. * @private
  2424. * @param {string} string The string to convert.
  2425. * @returns {Array} Returns the converted array.
  2426. */
  2427. function unicodeToArray(string) {
  2428. return string.match(reUnicode) || [];
  2429. }
  2430. /**
  2431. * Splits a Unicode `string` into an array of its words.
  2432. *
  2433. * @private
  2434. * @param {string} The string to inspect.
  2435. * @returns {Array} Returns the words of `string`.
  2436. */
  2437. function unicodeWords(string) {
  2438. return string.match(reUnicodeWord) || [];
  2439. }
  2440. /*--------------------------------------------------------------------------*/
  2441. /**
  2442. * Create a new pristine `lodash` function using the `context` object.
  2443. *
  2444. * @static
  2445. * @memberOf _
  2446. * @since 1.1.0
  2447. * @category Util
  2448. * @param {Object} [context=root] The context object.
  2449. * @returns {Function} Returns a new `lodash` function.
  2450. * @example
  2451. *
  2452. * _.mixin({ 'foo': _.constant('foo') });
  2453. *
  2454. * var lodash = _.runInContext();
  2455. * lodash.mixin({ 'bar': lodash.constant('bar') });
  2456. *
  2457. * _.isFunction(_.foo);
  2458. * // => true
  2459. * _.isFunction(_.bar);
  2460. * // => false
  2461. *
  2462. * lodash.isFunction(lodash.foo);
  2463. * // => false
  2464. * lodash.isFunction(lodash.bar);
  2465. * // => true
  2466. *
  2467. * // Create a suped-up `defer` in Node.js.
  2468. * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;
  2469. */
  2470. var runInContext = (function runInContext(context) {
  2471. context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));
  2472. /** Built-in constructor references. */
  2473. var Array = context.Array,
  2474. Date = context.Date,
  2475. Error = context.Error,
  2476. Function = context.Function,
  2477. Math = context.Math,
  2478. Object = context.Object,
  2479. RegExp = context.RegExp,
  2480. String = context.String,
  2481. TypeError = context.TypeError;
  2482. /** Used for built-in method references. */
  2483. var arrayProto = Array.prototype,
  2484. funcProto = Function.prototype,
  2485. objectProto = Object.prototype;
  2486. /** Used to detect overreaching core-js shims. */
  2487. var coreJsData = context['__core-js_shared__'];
  2488. /** Used to resolve the decompiled source of functions. */
  2489. var funcToString = funcProto.toString;
  2490. /** Used to check objects for own properties. */
  2491. var hasOwnProperty = objectProto.hasOwnProperty;
  2492. /** Used to generate unique IDs. */
  2493. var idCounter = 0;
  2494. /** Used to detect methods masquerading as native. */
  2495. var maskSrcKey = (function() {
  2496. var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
  2497. return uid ? ('Symbol(src)_1.' + uid) : '';
  2498. }());
  2499. /**
  2500. * Used to resolve the
  2501. * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
  2502. * of values.
  2503. */
  2504. var nativeObjectToString = objectProto.toString;
  2505. /** Used to infer the `Object` constructor. */
  2506. var objectCtorString = funcToString.call(Object);
  2507. /** Used to restore the original `_` reference in `_.noConflict`. */
  2508. var oldDash = root._;
  2509. /** Used to detect if a method is native. */
  2510. var reIsNative = RegExp('^' +
  2511. funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
  2512. .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
  2513. );
  2514. /** Built-in value references. */
  2515. var Buffer = moduleExports ? context.Buffer : undefined,
  2516. Symbol = context.Symbol,
  2517. Uint8Array = context.Uint8Array,
  2518. allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,
  2519. getPrototype = overArg(Object.getPrototypeOf, Object),
  2520. objectCreate = Object.create,
  2521. propertyIsEnumerable = objectProto.propertyIsEnumerable,
  2522. splice = arrayProto.splice,
  2523. spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,
  2524. symIterator = Symbol ? Symbol.iterator : undefined,
  2525. symToStringTag = Symbol ? Symbol.toStringTag : undefined;
  2526. var defineProperty = (function() {
  2527. try {
  2528. var func = getNative(Object, 'defineProperty');
  2529. func({}, '', {});
  2530. return func;
  2531. } catch (e) {}
  2532. }());
  2533. /** Mocked built-ins. */
  2534. var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,
  2535. ctxNow = Date && Date.now !== root.Date.now && Date.now,
  2536. ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
  2537. /* Built-in method references for those with the same name as other `lodash` methods. */
  2538. var nativeCeil = Math.ceil,
  2539. nativeFloor = Math.floor,
  2540. nativeGetSymbols = Object.getOwnPropertySymbols,
  2541. nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
  2542. nativeIsFinite = context.isFinite,
  2543. nativeJoin = arrayProto.join,
  2544. nativeKeys = overArg(Object.keys, Object),
  2545. nativeMax = Math.max,
  2546. nativeMin = Math.min,
  2547. nativeNow = Date.now,
  2548. nativeParseInt = context.parseInt,
  2549. nativeRandom = Math.random,
  2550. nativeReverse = arrayProto.reverse;
  2551. /* Built-in method references that are verified to be native. */
  2552. var DataView = getNative(context, 'DataView'),
  2553. Map = getNative(context, 'Map'),
  2554. Promise = getNative(context, 'Promise'),
  2555. Set = getNative(context, 'Set'),
  2556. WeakMap = getNative(context, 'WeakMap'),
  2557. nativeCreate = getNative(Object, 'create');
  2558. /** Used to store function metadata. */
  2559. var metaMap = WeakMap && new WeakMap;
  2560. /** Used to lookup unminified function names. */
  2561. var realNames = {};
  2562. /** Used to detect maps, sets, and weakmaps. */
  2563. var dataViewCtorString = toSource(DataView),
  2564. mapCtorString = toSource(Map),
  2565. promiseCtorString = toSource(Promise),
  2566. setCtorString = toSource(Set),
  2567. weakMapCtorString = toSource(WeakMap);
  2568. /** Used to convert symbols to primitives and strings. */
  2569. var symbolProto = Symbol ? Symbol.prototype : undefined,
  2570. symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,
  2571. symbolToString = symbolProto ? symbolProto.toString : undefined;
  2572. /*------------------------------------------------------------------------*/
  2573. /**
  2574. * Creates a `lodash` object which wraps `value` to enable implicit method
  2575. * chain sequences. Methods that operate on and return arrays, collections,
  2576. * and functions can be chained together. Methods that retrieve a single value
  2577. * or may return a primitive value will automatically end the chain sequence
  2578. * and return the unwrapped value. Otherwise, the value must be unwrapped
  2579. * with `_#value`.
  2580. *
  2581. * Explicit chain sequences, which must be unwrapped with `_#value`, may be
  2582. * enabled using `_.chain`.
  2583. *
  2584. * The execution of chained methods is lazy, that is, it's deferred until
  2585. * `_#value` is implicitly or explicitly called.
  2586. *
  2587. * Lazy evaluation allows several methods to support shortcut fusion.
  2588. * Shortcut fusion is an optimization to merge iteratee calls; this avoids
  2589. * the creation of intermediate arrays and can greatly reduce the number of
  2590. * iteratee executions. Sections of a chain sequence qualify for shortcut
  2591. * fusion if the section is applied to an array and iteratees accept only
  2592. * one argument. The heuristic for whether a section qualifies for shortcut
  2593. * fusion is subject to change.
  2594. *
  2595. * Chaining is supported in custom builds as long as the `_#value` method is
  2596. * directly or indirectly included in the build.
  2597. *
  2598. * In addition to lodash methods, wrappers have `Array` and `String` methods.
  2599. *
  2600. * The wrapper `Array` methods are:
  2601. * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`
  2602. *
  2603. * The wrapper `String` methods are:
  2604. * `replace` and `split`
  2605. *
  2606. * The wrapper methods that support shortcut fusion are:
  2607. * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,
  2608. * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,
  2609. * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`
  2610. *
  2611. * The chainable wrapper methods are:
  2612. * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,
  2613. * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,
  2614. * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,
  2615. * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,
  2616. * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,
  2617. * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,
  2618. * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,
  2619. * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,
  2620. * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,
  2621. * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,
  2622. * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,
  2623. * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,
  2624. * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,
  2625. * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,
  2626. * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,
  2627. * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,
  2628. * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,
  2629. * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,
  2630. * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,
  2631. * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,
  2632. * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,
  2633. * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,
  2634. * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,
  2635. * `zipObject`, `zipObjectDeep`, and `zipWith`
  2636. *
  2637. * The wrapper methods that are **not** chainable by default are:
  2638. * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,
  2639. * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,
  2640. * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,
  2641. * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,
  2642. * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,
  2643. * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,
  2644. * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,
  2645. * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,
  2646. * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,
  2647. * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,
  2648. * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,
  2649. * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,
  2650. * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,
  2651. * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,
  2652. * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,
  2653. * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,
  2654. * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,
  2655. * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,
  2656. * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,
  2657. * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,
  2658. * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,
  2659. * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,
  2660. * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,
  2661. * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,
  2662. * `upperFirst`, `value`, and `words`
  2663. *
  2664. * @name _
  2665. * @constructor
  2666. * @category Seq
  2667. * @param {*} value The value to wrap in a `lodash` instance.
  2668. * @returns {Object} Returns the new `lodash` wrapper instance.
  2669. * @example
  2670. *
  2671. * function square(n) {
  2672. * return n * n;
  2673. * }
  2674. *
  2675. * var wrapped = _([1, 2, 3]);
  2676. *
  2677. * // Returns an unwrapped value.
  2678. * wrapped.reduce(_.add);
  2679. * // => 6
  2680. *
  2681. * // Returns a wrapped value.
  2682. * var squares = wrapped.map(square);
  2683. *
  2684. * _.isArray(squares);
  2685. * // => false
  2686. *
  2687. * _.isArray(squares.value());
  2688. * // => true
  2689. */
  2690. function lodash(value) {
  2691. if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
  2692. if (value instanceof LodashWrapper) {
  2693. return value;
  2694. }
  2695. if (hasOwnProperty.call(value, '__wrapped__')) {
  2696. return wrapperClone(value);
  2697. }
  2698. }
  2699. return new LodashWrapper(value);
  2700. }
  2701. /**
  2702. * The base implementation of `_.create` without support for assigning
  2703. * properties to the created object.
  2704. *
  2705. * @private
  2706. * @param {Object} proto The object to inherit from.
  2707. * @returns {Object} Returns the new object.
  2708. */
  2709. var baseCreate = (function() {
  2710. function object() {}
  2711. return function(proto) {
  2712. if (!isObject(proto)) {
  2713. return {};
  2714. }
  2715. if (objectCreate) {
  2716. return objectCreate(proto);
  2717. }
  2718. object.prototype = proto;
  2719. var result = new object;
  2720. object.prototype = undefined;
  2721. return result;
  2722. };
  2723. }());
  2724. /**
  2725. * The function whose prototype chain sequence wrappers inherit from.
  2726. *
  2727. * @private
  2728. */
  2729. function baseLodash() {
  2730. // No operation performed.
  2731. }
  2732. /**
  2733. * The base constructor for creating `lodash` wrapper objects.
  2734. *
  2735. * @private
  2736. * @param {*} value The value to wrap.
  2737. * @param {boolean} [chainAll] Enable explicit method chain sequences.
  2738. */
  2739. function LodashWrapper(value, chainAll) {
  2740. this.__wrapped__ = value;
  2741. this.__actions__ = [];
  2742. this.__chain__ = !!chainAll;
  2743. this.__index__ = 0;
  2744. this.__values__ = undefined;
  2745. }
  2746. /**
  2747. * By default, the template delimiters used by lodash are like those in
  2748. * embedded Ruby (ERB) as well as ES2015 template strings. Change the
  2749. * following template settings to use alternative delimiters.
  2750. *
  2751. * @static
  2752. * @memberOf _
  2753. * @type {Object}
  2754. */
  2755. lodash.templateSettings = {
  2756. /**
  2757. * Used to detect `data` property values to be HTML-escaped.
  2758. *
  2759. * @memberOf _.templateSettings
  2760. * @type {RegExp}
  2761. */
  2762. 'escape': reEscape,
  2763. /**
  2764. * Used to detect code to be evaluated.
  2765. *
  2766. * @memberOf _.templateSettings
  2767. * @type {RegExp}
  2768. */
  2769. 'evaluate': reEvaluate,
  2770. /**
  2771. * Used to detect `data` property values to inject.
  2772. *
  2773. * @memberOf _.templateSettings
  2774. * @type {RegExp}
  2775. */
  2776. 'interpolate': reInterpolate,
  2777. /**
  2778. * Used to reference the data object in the template text.
  2779. *
  2780. * @memberOf _.templateSettings
  2781. * @type {string}
  2782. */
  2783. 'variable': '',
  2784. /**
  2785. * Used to import variables into the compiled template.
  2786. *
  2787. * @memberOf _.templateSettings
  2788. * @type {Object}
  2789. */
  2790. 'imports': {
  2791. /**
  2792. * A reference to the `lodash` function.
  2793. *
  2794. * @memberOf _.templateSettings.imports
  2795. * @type {Function}
  2796. */
  2797. '_': lodash
  2798. }
  2799. };
  2800. // Ensure wrappers are instances of `baseLodash`.
  2801. lodash.prototype = baseLodash.prototype;
  2802. lodash.prototype.constructor = lodash;
  2803. LodashWrapper.prototype = baseCreate(baseLodash.prototype);
  2804. LodashWrapper.prototype.constructor = LodashWrapper;
  2805. /*------------------------------------------------------------------------*/
  2806. /**
  2807. * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.
  2808. *
  2809. * @private
  2810. * @constructor
  2811. * @param {*} value The value to wrap.
  2812. */
  2813. function LazyWrapper(value) {
  2814. this.__wrapped__ = value;
  2815. this.__actions__ = [];
  2816. this.__dir__ = 1;
  2817. this.__filtered__ = false;
  2818. this.__iteratees__ = [];
  2819. this.__takeCount__ = MAX_ARRAY_LENGTH;
  2820. this.__views__ = [];
  2821. }
  2822. /**
  2823. * Creates a clone of the lazy wrapper object.
  2824. *
  2825. * @private
  2826. * @name clone
  2827. * @memberOf LazyWrapper
  2828. * @returns {Object} Returns the cloned `LazyWrapper` object.
  2829. */
  2830. function lazyClone() {
  2831. var result = new LazyWrapper(this.__wrapped__);
  2832. result.__actions__ = copyArray(this.__actions__);
  2833. result.__dir__ = this.__dir__;
  2834. result.__filtered__ = this.__filtered__;
  2835. result.__iteratees__ = copyArray(this.__iteratees__);
  2836. result.__takeCount__ = this.__takeCount__;
  2837. result.__views__ = copyArray(this.__views__);
  2838. return result;
  2839. }
  2840. /**
  2841. * Reverses the direction of lazy iteration.
  2842. *
  2843. * @private
  2844. * @name reverse
  2845. * @memberOf LazyWrapper
  2846. * @returns {Object} Returns the new reversed `LazyWrapper` object.
  2847. */
  2848. function lazyReverse() {
  2849. if (this.__filtered__) {
  2850. var result = new LazyWrapper(this);
  2851. result.__dir__ = -1;
  2852. result.__filtered__ = true;
  2853. } else {
  2854. result = this.clone();
  2855. result.__dir__ *= -1;
  2856. }
  2857. return result;
  2858. }
  2859. /**
  2860. * Extracts the unwrapped value from its lazy wrapper.
  2861. *
  2862. * @private
  2863. * @name value
  2864. * @memberOf LazyWrapper
  2865. * @returns {*} Returns the unwrapped value.
  2866. */
  2867. function lazyValue() {
  2868. var array = this.__wrapped__.value(),
  2869. dir = this.__dir__,
  2870. isArr = isArray(array),
  2871. isRight = dir < 0,
  2872. arrLength = isArr ? array.length : 0,
  2873. view = getView(0, arrLength, this.__views__),
  2874. start = view.start,
  2875. end = view.end,
  2876. length = end - start,
  2877. index = isRight ? end : (start - 1),
  2878. iteratees = this.__iteratees__,
  2879. iterLength = iteratees.length,
  2880. resIndex = 0,
  2881. takeCount = nativeMin(length, this.__takeCount__);
  2882. if (!isArr || (!isRight && arrLength == length && takeCount == length)) {
  2883. return baseWrapperValue(array, this.__actions__);
  2884. }
  2885. var result = [];
  2886. outer:
  2887. while (length-- && resIndex < takeCount) {
  2888. index += dir;
  2889. var iterIndex = -1,
  2890. value = array[index];
  2891. while (++iterIndex < iterLength) {
  2892. var data = iteratees[iterIndex],
  2893. iteratee = data.iteratee,
  2894. type = data.type,
  2895. computed = iteratee(value);
  2896. if (type == LAZY_MAP_FLAG) {
  2897. value = computed;
  2898. } else if (!computed) {
  2899. if (type == LAZY_FILTER_FLAG) {
  2900. continue outer;
  2901. } else {
  2902. break outer;
  2903. }
  2904. }
  2905. }
  2906. result[resIndex++] = value;
  2907. }
  2908. return result;
  2909. }
  2910. // Ensure `LazyWrapper` is an instance of `baseLodash`.
  2911. LazyWrapper.prototype = baseCreate(baseLodash.prototype);
  2912. LazyWrapper.prototype.constructor = LazyWrapper;
  2913. /*------------------------------------------------------------------------*/
  2914. /**
  2915. * Creates a hash object.
  2916. *
  2917. * @private
  2918. * @constructor
  2919. * @param {Array} [entries] The key-value pairs to cache.
  2920. */
  2921. function Hash(entries) {
  2922. var index = -1,
  2923. length = entries == null ? 0 : entries.length;
  2924. this.clear();
  2925. while (++index < length) {
  2926. var entry = entries[index];
  2927. this.set(entry[0], entry[1]);
  2928. }
  2929. }
  2930. /**
  2931. * Removes all key-value entries from the hash.
  2932. *
  2933. * @private
  2934. * @name clear
  2935. * @memberOf Hash
  2936. */
  2937. function hashClear() {
  2938. this.__data__ = nativeCreate ? nativeCreate(null) : {};
  2939. this.size = 0;
  2940. }
  2941. /**
  2942. * Removes `key` and its value from the hash.
  2943. *
  2944. * @private
  2945. * @name delete
  2946. * @memberOf Hash
  2947. * @param {Object} hash The hash to modify.
  2948. * @param {string} key The key of the value to remove.
  2949. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  2950. */
  2951. function hashDelete(key) {
  2952. var result = this.has(key) && delete this.__data__[key];
  2953. this.size -= result ? 1 : 0;
  2954. return result;
  2955. }
  2956. /**
  2957. * Gets the hash value for `key`.
  2958. *
  2959. * @private
  2960. * @name get
  2961. * @memberOf Hash
  2962. * @param {string} key The key of the value to get.
  2963. * @returns {*} Returns the entry value.
  2964. */
  2965. function hashGet(key) {
  2966. var data = this.__data__;
  2967. if (nativeCreate) {
  2968. var result = data[key];
  2969. return result === HASH_UNDEFINED ? undefined : result;
  2970. }
  2971. return hasOwnProperty.call(data, key) ? data[key] : undefined;
  2972. }
  2973. /**
  2974. * Checks if a hash value for `key` exists.
  2975. *
  2976. * @private
  2977. * @name has
  2978. * @memberOf Hash
  2979. * @param {string} key The key of the entry to check.
  2980. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  2981. */
  2982. function hashHas(key) {
  2983. var data = this.__data__;
  2984. return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
  2985. }
  2986. /**
  2987. * Sets the hash `key` to `value`.
  2988. *
  2989. * @private
  2990. * @name set
  2991. * @memberOf Hash
  2992. * @param {string} key The key of the value to set.
  2993. * @param {*} value The value to set.
  2994. * @returns {Object} Returns the hash instance.
  2995. */
  2996. function hashSet(key, value) {
  2997. var data = this.__data__;
  2998. this.size += this.has(key) ? 0 : 1;
  2999. data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
  3000. return this;
  3001. }
  3002. // Add methods to `Hash`.
  3003. Hash.prototype.clear = hashClear;
  3004. Hash.prototype['delete'] = hashDelete;
  3005. Hash.prototype.get = hashGet;
  3006. Hash.prototype.has = hashHas;
  3007. Hash.prototype.set = hashSet;
  3008. /*------------------------------------------------------------------------*/
  3009. /**
  3010. * Creates an list cache object.
  3011. *
  3012. * @private
  3013. * @constructor
  3014. * @param {Array} [entries] The key-value pairs to cache.
  3015. */
  3016. function ListCache(entries) {
  3017. var index = -1,
  3018. length = entries == null ? 0 : entries.length;
  3019. this.clear();
  3020. while (++index < length) {
  3021. var entry = entries[index];
  3022. this.set(entry[0], entry[1]);
  3023. }
  3024. }
  3025. /**
  3026. * Removes all key-value entries from the list cache.
  3027. *
  3028. * @private
  3029. * @name clear
  3030. * @memberOf ListCache
  3031. */
  3032. function listCacheClear() {
  3033. this.__data__ = [];
  3034. this.size = 0;
  3035. }
  3036. /**
  3037. * Removes `key` and its value from the list cache.
  3038. *
  3039. * @private
  3040. * @name delete
  3041. * @memberOf ListCache
  3042. * @param {string} key The key of the value to remove.
  3043. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  3044. */
  3045. function listCacheDelete(key) {
  3046. var data = this.__data__,
  3047. index = assocIndexOf(data, key);
  3048. if (index < 0) {
  3049. return false;
  3050. }
  3051. var lastIndex = data.length - 1;
  3052. if (index == lastIndex) {
  3053. data.pop();
  3054. } else {
  3055. splice.call(data, index, 1);
  3056. }
  3057. --this.size;
  3058. return true;
  3059. }
  3060. /**
  3061. * Gets the list cache value for `key`.
  3062. *
  3063. * @private
  3064. * @name get
  3065. * @memberOf ListCache
  3066. * @param {string} key The key of the value to get.
  3067. * @returns {*} Returns the entry value.
  3068. */
  3069. function listCacheGet(key) {
  3070. var data = this.__data__,
  3071. index = assocIndexOf(data, key);
  3072. return index < 0 ? undefined : data[index][1];
  3073. }
  3074. /**
  3075. * Checks if a list cache value for `key` exists.
  3076. *
  3077. * @private
  3078. * @name has
  3079. * @memberOf ListCache
  3080. * @param {string} key The key of the entry to check.
  3081. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  3082. */
  3083. function listCacheHas(key) {
  3084. return assocIndexOf(this.__data__, key) > -1;
  3085. }
  3086. /**
  3087. * Sets the list cache `key` to `value`.
  3088. *
  3089. * @private
  3090. * @name set
  3091. * @memberOf ListCache
  3092. * @param {string} key The key of the value to set.
  3093. * @param {*} value The value to set.
  3094. * @returns {Object} Returns the list cache instance.
  3095. */
  3096. function listCacheSet(key, value) {
  3097. var data = this.__data__,
  3098. index = assocIndexOf(data, key);
  3099. if (index < 0) {
  3100. ++this.size;
  3101. data.push([key, value]);
  3102. } else {
  3103. data[index][1] = value;
  3104. }
  3105. return this;
  3106. }
  3107. // Add methods to `ListCache`.
  3108. ListCache.prototype.clear = listCacheClear;
  3109. ListCache.prototype['delete'] = listCacheDelete;
  3110. ListCache.prototype.get = listCacheGet;
  3111. ListCache.prototype.has = listCacheHas;
  3112. ListCache.prototype.set = listCacheSet;
  3113. /*------------------------------------------------------------------------*/
  3114. /**
  3115. * Creates a map cache object to store key-value pairs.
  3116. *
  3117. * @private
  3118. * @constructor
  3119. * @param {Array} [entries] The key-value pairs to cache.
  3120. */
  3121. function MapCache(entries) {
  3122. var index = -1,
  3123. length = entries == null ? 0 : entries.length;
  3124. this.clear();
  3125. while (++index < length) {
  3126. var entry = entries[index];
  3127. this.set(entry[0], entry[1]);
  3128. }
  3129. }
  3130. /**
  3131. * Removes all key-value entries from the map.
  3132. *
  3133. * @private
  3134. * @name clear
  3135. * @memberOf MapCache
  3136. */
  3137. function mapCacheClear() {
  3138. this.size = 0;
  3139. this.__data__ = {
  3140. 'hash': new Hash,
  3141. 'map': new (Map || ListCache),
  3142. 'string': new Hash
  3143. };
  3144. }
  3145. /**
  3146. * Removes `key` and its value from the map.
  3147. *
  3148. * @private
  3149. * @name delete
  3150. * @memberOf MapCache
  3151. * @param {string} key The key of the value to remove.
  3152. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  3153. */
  3154. function mapCacheDelete(key) {
  3155. var result = getMapData(this, key)['delete'](key);
  3156. this.size -= result ? 1 : 0;
  3157. return result;
  3158. }
  3159. /**
  3160. * Gets the map value for `key`.
  3161. *
  3162. * @private
  3163. * @name get
  3164. * @memberOf MapCache
  3165. * @param {string} key The key of the value to get.
  3166. * @returns {*} Returns the entry value.
  3167. */
  3168. function mapCacheGet(key) {
  3169. return getMapData(this, key).get(key);
  3170. }
  3171. /**
  3172. * Checks if a map value for `key` exists.
  3173. *
  3174. * @private
  3175. * @name has
  3176. * @memberOf MapCache
  3177. * @param {string} key The key of the entry to check.
  3178. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  3179. */
  3180. function mapCacheHas(key) {
  3181. return getMapData(this, key).has(key);
  3182. }
  3183. /**
  3184. * Sets the map `key` to `value`.
  3185. *
  3186. * @private
  3187. * @name set
  3188. * @memberOf MapCache
  3189. * @param {string} key The key of the value to set.
  3190. * @param {*} value The value to set.
  3191. * @returns {Object} Returns the map cache instance.
  3192. */
  3193. function mapCacheSet(key, value) {
  3194. var data = getMapData(this, key),
  3195. size = data.size;
  3196. data.set(key, value);
  3197. this.size += data.size == size ? 0 : 1;
  3198. return this;
  3199. }
  3200. // Add methods to `MapCache`.
  3201. MapCache.prototype.clear = mapCacheClear;
  3202. MapCache.prototype['delete'] = mapCacheDelete;
  3203. MapCache.prototype.get = mapCacheGet;
  3204. MapCache.prototype.has = mapCacheHas;
  3205. MapCache.prototype.set = mapCacheSet;
  3206. /*------------------------------------------------------------------------*/
  3207. /**
  3208. *
  3209. * Creates an array cache object to store unique values.
  3210. *
  3211. * @private
  3212. * @constructor
  3213. * @param {Array} [values] The values to cache.
  3214. */
  3215. function SetCache(values) {
  3216. var index = -1,
  3217. length = values == null ? 0 : values.length;
  3218. this.__data__ = new MapCache;
  3219. while (++index < length) {
  3220. this.add(values[index]);
  3221. }
  3222. }
  3223. /**
  3224. * Adds `value` to the array cache.
  3225. *
  3226. * @private
  3227. * @name add
  3228. * @memberOf SetCache
  3229. * @alias push
  3230. * @param {*} value The value to cache.
  3231. * @returns {Object} Returns the cache instance.
  3232. */
  3233. function setCacheAdd(value) {
  3234. this.__data__.set(value, HASH_UNDEFINED);
  3235. return this;
  3236. }
  3237. /**
  3238. * Checks if `value` is in the array cache.
  3239. *
  3240. * @private
  3241. * @name has
  3242. * @memberOf SetCache
  3243. * @param {*} value The value to search for.
  3244. * @returns {number} Returns `true` if `value` is found, else `false`.
  3245. */
  3246. function setCacheHas(value) {
  3247. return this.__data__.has(value);
  3248. }
  3249. // Add methods to `SetCache`.
  3250. SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
  3251. SetCache.prototype.has = setCacheHas;
  3252. /*------------------------------------------------------------------------*/
  3253. /**
  3254. * Creates a stack cache object to store key-value pairs.
  3255. *
  3256. * @private
  3257. * @constructor
  3258. * @param {Array} [entries] The key-value pairs to cache.
  3259. */
  3260. function Stack(entries) {
  3261. var data = this.__data__ = new ListCache(entries);
  3262. this.size = data.size;
  3263. }
  3264. /**
  3265. * Removes all key-value entries from the stack.
  3266. *
  3267. * @private
  3268. * @name clear
  3269. * @memberOf Stack
  3270. */
  3271. function stackClear() {
  3272. this.__data__ = new ListCache;
  3273. this.size = 0;
  3274. }
  3275. /**
  3276. * Removes `key` and its value from the stack.
  3277. *
  3278. * @private
  3279. * @name delete
  3280. * @memberOf Stack
  3281. * @param {string} key The key of the value to remove.
  3282. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  3283. */
  3284. function stackDelete(key) {
  3285. var data = this.__data__,
  3286. result = data['delete'](key);
  3287. this.size = data.size;
  3288. return result;
  3289. }
  3290. /**
  3291. * Gets the stack value for `key`.
  3292. *
  3293. * @private
  3294. * @name get
  3295. * @memberOf Stack
  3296. * @param {string} key The key of the value to get.
  3297. * @returns {*} Returns the entry value.
  3298. */
  3299. function stackGet(key) {
  3300. return this.__data__.get(key);
  3301. }
  3302. /**
  3303. * Checks if a stack value for `key` exists.
  3304. *
  3305. * @private
  3306. * @name has
  3307. * @memberOf Stack
  3308. * @param {string} key The key of the entry to check.
  3309. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  3310. */
  3311. function stackHas(key) {
  3312. return this.__data__.has(key);
  3313. }
  3314. /**
  3315. * Sets the stack `key` to `value`.
  3316. *
  3317. * @private
  3318. * @name set
  3319. * @memberOf Stack
  3320. * @param {string} key The key of the value to set.
  3321. * @param {*} value The value to set.
  3322. * @returns {Object} Returns the stack cache instance.
  3323. */
  3324. function stackSet(key, value) {
  3325. var data = this.__data__;
  3326. if (data instanceof ListCache) {
  3327. var pairs = data.__data__;
  3328. if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
  3329. pairs.push([key, value]);
  3330. this.size = ++data.size;
  3331. return this;
  3332. }
  3333. data = this.__data__ = new MapCache(pairs);
  3334. }
  3335. data.set(key, value);
  3336. this.size = data.size;
  3337. return this;
  3338. }
  3339. // Add methods to `Stack`.
  3340. Stack.prototype.clear = stackClear;
  3341. Stack.prototype['delete'] = stackDelete;
  3342. Stack.prototype.get = stackGet;
  3343. Stack.prototype.has = stackHas;
  3344. Stack.prototype.set = stackSet;
  3345. /*------------------------------------------------------------------------*/
  3346. /**
  3347. * Creates an array of the enumerable property names of the array-like `value`.
  3348. *
  3349. * @private
  3350. * @param {*} value The value to query.
  3351. * @param {boolean} inherited Specify returning inherited property names.
  3352. * @returns {Array} Returns the array of property names.
  3353. */
  3354. function arrayLikeKeys(value, inherited) {
  3355. var isArr = isArray(value),
  3356. isArg = !isArr && isArguments(value),
  3357. isBuff = !isArr && !isArg && isBuffer(value),
  3358. isType = !isArr && !isArg && !isBuff && isTypedArray(value),
  3359. skipIndexes = isArr || isArg || isBuff || isType,
  3360. result = skipIndexes ? baseTimes(value.length, String) : [],
  3361. length = result.length;
  3362. for (var key in value) {
  3363. if ((inherited || hasOwnProperty.call(value, key)) &&
  3364. !(skipIndexes && (
  3365. // Safari 9 has enumerable `arguments.length` in strict mode.
  3366. key == 'length' ||
  3367. // Node.js 0.10 has enumerable non-index properties on buffers.
  3368. (isBuff && (key == 'offset' || key == 'parent')) ||
  3369. // PhantomJS 2 has enumerable non-index properties on typed arrays.
  3370. (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
  3371. // Skip index properties.
  3372. isIndex(key, length)
  3373. ))) {
  3374. result.push(key);
  3375. }
  3376. }
  3377. return result;
  3378. }
  3379. /**
  3380. * A specialized version of `_.sample` for arrays.
  3381. *
  3382. * @private
  3383. * @param {Array} array The array to sample.
  3384. * @returns {*} Returns the random element.
  3385. */
  3386. function arraySample(array) {
  3387. var length = array.length;
  3388. return length ? array[baseRandom(0, length - 1)] : undefined;
  3389. }
  3390. /**
  3391. * A specialized version of `_.sampleSize` for arrays.
  3392. *
  3393. * @private
  3394. * @param {Array} array The array to sample.
  3395. * @param {number} n The number of elements to sample.
  3396. * @returns {Array} Returns the random elements.
  3397. */
  3398. function arraySampleSize(array, n) {
  3399. return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));
  3400. }
  3401. /**
  3402. * A specialized version of `_.shuffle` for arrays.
  3403. *
  3404. * @private
  3405. * @param {Array} array The array to shuffle.
  3406. * @returns {Array} Returns the new shuffled array.
  3407. */
  3408. function arrayShuffle(array) {
  3409. return shuffleSelf(copyArray(array));
  3410. }
  3411. /**
  3412. * This function is like `assignValue` except that it doesn't assign
  3413. * `undefined` values.
  3414. *
  3415. * @private
  3416. * @param {Object} object The object to modify.
  3417. * @param {string} key The key of the property to assign.
  3418. * @param {*} value The value to assign.
  3419. */
  3420. function assignMergeValue(object, key, value) {
  3421. if ((value !== undefined && !eq(object[key], value)) ||
  3422. (value === undefined && !(key in object))) {
  3423. baseAssignValue(object, key, value);
  3424. }
  3425. }
  3426. /**
  3427. * Assigns `value` to `key` of `object` if the existing value is not equivalent
  3428. * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  3429. * for equality comparisons.
  3430. *
  3431. * @private
  3432. * @param {Object} object The object to modify.
  3433. * @param {string} key The key of the property to assign.
  3434. * @param {*} value The value to assign.
  3435. */
  3436. function assignValue(object, key, value) {
  3437. var objValue = object[key];
  3438. if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
  3439. (value === undefined && !(key in object))) {
  3440. baseAssignValue(object, key, value);
  3441. }
  3442. }
  3443. /**
  3444. * Gets the index at which the `key` is found in `array` of key-value pairs.
  3445. *
  3446. * @private
  3447. * @param {Array} array The array to inspect.
  3448. * @param {*} key The key to search for.
  3449. * @returns {number} Returns the index of the matched value, else `-1`.
  3450. */
  3451. function assocIndexOf(array, key) {
  3452. var length = array.length;
  3453. while (length--) {
  3454. if (eq(array[length][0], key)) {
  3455. return length;
  3456. }
  3457. }
  3458. return -1;
  3459. }
  3460. /**
  3461. * Aggregates elements of `collection` on `accumulator` with keys transformed
  3462. * by `iteratee` and values set by `setter`.
  3463. *
  3464. * @private
  3465. * @param {Array|Object} collection The collection to iterate over.
  3466. * @param {Function} setter The function to set `accumulator` values.
  3467. * @param {Function} iteratee The iteratee to transform keys.
  3468. * @param {Object} accumulator The initial aggregated object.
  3469. * @returns {Function} Returns `accumulator`.
  3470. */
  3471. function baseAggregator(collection, setter, iteratee, accumulator) {
  3472. baseEach(collection, function(value, key, collection) {
  3473. setter(accumulator, value, iteratee(value), collection);
  3474. });
  3475. return accumulator;
  3476. }
  3477. /**
  3478. * The base implementation of `_.assign` without support for multiple sources
  3479. * or `customizer` functions.
  3480. *
  3481. * @private
  3482. * @param {Object} object The destination object.
  3483. * @param {Object} source The source object.
  3484. * @returns {Object} Returns `object`.
  3485. */
  3486. function baseAssign(object, source) {
  3487. return object && copyObject(source, keys(source), object);
  3488. }
  3489. /**
  3490. * The base implementation of `_.assignIn` without support for multiple sources
  3491. * or `customizer` functions.
  3492. *
  3493. * @private
  3494. * @param {Object} object The destination object.
  3495. * @param {Object} source The source object.
  3496. * @returns {Object} Returns `object`.
  3497. */
  3498. function baseAssignIn(object, source) {
  3499. return object && copyObject(source, keysIn(source), object);
  3500. }
  3501. /**
  3502. * The base implementation of `assignValue` and `assignMergeValue` without
  3503. * value checks.
  3504. *
  3505. * @private
  3506. * @param {Object} object The object to modify.
  3507. * @param {string} key The key of the property to assign.
  3508. * @param {*} value The value to assign.
  3509. */
  3510. function baseAssignValue(object, key, value) {
  3511. if (key == '__proto__' && defineProperty) {
  3512. defineProperty(object, key, {
  3513. 'configurable': true,
  3514. 'enumerable': true,
  3515. 'value': value,
  3516. 'writable': true
  3517. });
  3518. } else {
  3519. object[key] = value;
  3520. }
  3521. }
  3522. /**
  3523. * The base implementation of `_.at` without support for individual paths.
  3524. *
  3525. * @private
  3526. * @param {Object} object The object to iterate over.
  3527. * @param {string[]} paths The property paths to pick.
  3528. * @returns {Array} Returns the picked elements.
  3529. */
  3530. function baseAt(object, paths) {
  3531. var index = -1,
  3532. length = paths.length,
  3533. result = Array(length),
  3534. skip = object == null;
  3535. while (++index < length) {
  3536. result[index] = skip ? undefined : get(object, paths[index]);
  3537. }
  3538. return result;
  3539. }
  3540. /**
  3541. * The base implementation of `_.clamp` which doesn't coerce arguments.
  3542. *
  3543. * @private
  3544. * @param {number} number The number to clamp.
  3545. * @param {number} [lower] The lower bound.
  3546. * @param {number} upper The upper bound.
  3547. * @returns {number} Returns the clamped number.
  3548. */
  3549. function baseClamp(number, lower, upper) {
  3550. if (number === number) {
  3551. if (upper !== undefined) {
  3552. number = number <= upper ? number : upper;
  3553. }
  3554. if (lower !== undefined) {
  3555. number = number >= lower ? number : lower;
  3556. }
  3557. }
  3558. return number;
  3559. }
  3560. /**
  3561. * The base implementation of `_.clone` and `_.cloneDeep` which tracks
  3562. * traversed objects.
  3563. *
  3564. * @private
  3565. * @param {*} value The value to clone.
  3566. * @param {boolean} bitmask The bitmask flags.
  3567. * 1 - Deep clone
  3568. * 2 - Flatten inherited properties
  3569. * 4 - Clone symbols
  3570. * @param {Function} [customizer] The function to customize cloning.
  3571. * @param {string} [key] The key of `value`.
  3572. * @param {Object} [object] The parent object of `value`.
  3573. * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
  3574. * @returns {*} Returns the cloned value.
  3575. */
  3576. function baseClone(value, bitmask, customizer, key, object, stack) {
  3577. var result,
  3578. isDeep = bitmask & CLONE_DEEP_FLAG,
  3579. isFlat = bitmask & CLONE_FLAT_FLAG,
  3580. isFull = bitmask & CLONE_SYMBOLS_FLAG;
  3581. if (customizer) {
  3582. result = object ? customizer(value, key, object, stack) : customizer(value);
  3583. }
  3584. if (result !== undefined) {
  3585. return result;
  3586. }
  3587. if (!isObject(value)) {
  3588. return value;
  3589. }
  3590. var isArr = isArray(value);
  3591. if (isArr) {
  3592. result = initCloneArray(value);
  3593. if (!isDeep) {
  3594. return copyArray(value, result);
  3595. }
  3596. } else {
  3597. var tag = getTag(value),
  3598. isFunc = tag == funcTag || tag == genTag;
  3599. if (isBuffer(value)) {
  3600. return cloneBuffer(value, isDeep);
  3601. }
  3602. if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
  3603. result = (isFlat || isFunc) ? {} : initCloneObject(value);
  3604. if (!isDeep) {
  3605. return isFlat
  3606. ? copySymbolsIn(value, baseAssignIn(result, value))
  3607. : copySymbols(value, baseAssign(result, value));
  3608. }
  3609. } else {
  3610. if (!cloneableTags[tag]) {
  3611. return object ? value : {};
  3612. }
  3613. result = initCloneByTag(value, tag, isDeep);
  3614. }
  3615. }
  3616. // Check for circular references and return its corresponding clone.
  3617. stack || (stack = new Stack);
  3618. var stacked = stack.get(value);
  3619. if (stacked) {
  3620. return stacked;
  3621. }
  3622. stack.set(value, result);
  3623. if (isSet(value)) {
  3624. value.forEach(function(subValue) {
  3625. result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
  3626. });
  3627. } else if (isMap(value)) {
  3628. value.forEach(function(subValue, key) {
  3629. result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
  3630. });
  3631. }
  3632. var keysFunc = isFull
  3633. ? (isFlat ? getAllKeysIn : getAllKeys)
  3634. : (isFlat ? keysIn : keys);
  3635. var props = isArr ? undefined : keysFunc(value);
  3636. arrayEach(props || value, function(subValue, key) {
  3637. if (props) {
  3638. key = subValue;
  3639. subValue = value[key];
  3640. }
  3641. // Recursively populate clone (susceptible to call stack limits).
  3642. assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
  3643. });
  3644. return result;
  3645. }
  3646. /**
  3647. * The base implementation of `_.conforms` which doesn't clone `source`.
  3648. *
  3649. * @private
  3650. * @param {Object} source The object of property predicates to conform to.
  3651. * @returns {Function} Returns the new spec function.
  3652. */
  3653. function baseConforms(source) {
  3654. var props = keys(source);
  3655. return function(object) {
  3656. return baseConformsTo(object, source, props);
  3657. };
  3658. }
  3659. /**
  3660. * The base implementation of `_.conformsTo` which accepts `props` to check.
  3661. *
  3662. * @private
  3663. * @param {Object} object The object to inspect.
  3664. * @param {Object} source The object of property predicates to conform to.
  3665. * @returns {boolean} Returns `true` if `object` conforms, else `false`.
  3666. */
  3667. function baseConformsTo(object, source, props) {
  3668. var length = props.length;
  3669. if (object == null) {
  3670. return !length;
  3671. }
  3672. object = Object(object);
  3673. while (length--) {
  3674. var key = props[length],
  3675. predicate = source[key],
  3676. value = object[key];
  3677. if ((value === undefined && !(key in object)) || !predicate(value)) {
  3678. return false;
  3679. }
  3680. }
  3681. return true;
  3682. }
  3683. /**
  3684. * The base implementation of `_.delay` and `_.defer` which accepts `args`
  3685. * to provide to `func`.
  3686. *
  3687. * @private
  3688. * @param {Function} func The function to delay.
  3689. * @param {number} wait The number of milliseconds to delay invocation.
  3690. * @param {Array} args The arguments to provide to `func`.
  3691. * @returns {number|Object} Returns the timer id or timeout object.
  3692. */
  3693. function baseDelay(func, wait, args) {
  3694. if (typeof func != 'function') {
  3695. throw new TypeError(FUNC_ERROR_TEXT);
  3696. }
  3697. return setTimeout(function() { func.apply(undefined, args); }, wait);
  3698. }
  3699. /**
  3700. * The base implementation of methods like `_.difference` without support
  3701. * for excluding multiple arrays or iteratee shorthands.
  3702. *
  3703. * @private
  3704. * @param {Array} array The array to inspect.
  3705. * @param {Array} values The values to exclude.
  3706. * @param {Function} [iteratee] The iteratee invoked per element.
  3707. * @param {Function} [comparator] The comparator invoked per element.
  3708. * @returns {Array} Returns the new array of filtered values.
  3709. */
  3710. function baseDifference(array, values, iteratee, comparator) {
  3711. var index = -1,
  3712. includes = arrayIncludes,
  3713. isCommon = true,
  3714. length = array.length,
  3715. result = [],
  3716. valuesLength = values.length;
  3717. if (!length) {
  3718. return result;
  3719. }
  3720. if (iteratee) {
  3721. values = arrayMap(values, baseUnary(iteratee));
  3722. }
  3723. if (comparator) {
  3724. includes = arrayIncludesWith;
  3725. isCommon = false;
  3726. }
  3727. else if (values.length >= LARGE_ARRAY_SIZE) {
  3728. includes = cacheHas;
  3729. isCommon = false;
  3730. values = new SetCache(values);
  3731. }
  3732. outer:
  3733. while (++index < length) {
  3734. var value = array[index],
  3735. computed = iteratee == null ? value : iteratee(value);
  3736. value = (comparator || value !== 0) ? value : 0;
  3737. if (isCommon && computed === computed) {
  3738. var valuesIndex = valuesLength;
  3739. while (valuesIndex--) {
  3740. if (values[valuesIndex] === computed) {
  3741. continue outer;
  3742. }
  3743. }
  3744. result.push(value);
  3745. }
  3746. else if (!includes(values, computed, comparator)) {
  3747. result.push(value);
  3748. }
  3749. }
  3750. return result;
  3751. }
  3752. /**
  3753. * The base implementation of `_.forEach` without support for iteratee shorthands.
  3754. *
  3755. * @private
  3756. * @param {Array|Object} collection The collection to iterate over.
  3757. * @param {Function} iteratee The function invoked per iteration.
  3758. * @returns {Array|Object} Returns `collection`.
  3759. */
  3760. var baseEach = createBaseEach(baseForOwn);
  3761. /**
  3762. * The base implementation of `_.forEachRight` without support for iteratee shorthands.
  3763. *
  3764. * @private
  3765. * @param {Array|Object} collection The collection to iterate over.
  3766. * @param {Function} iteratee The function invoked per iteration.
  3767. * @returns {Array|Object} Returns `collection`.
  3768. */
  3769. var baseEachRight = createBaseEach(baseForOwnRight, true);
  3770. /**
  3771. * The base implementation of `_.every` without support for iteratee shorthands.
  3772. *
  3773. * @private
  3774. * @param {Array|Object} collection The collection to iterate over.
  3775. * @param {Function} predicate The function invoked per iteration.
  3776. * @returns {boolean} Returns `true` if all elements pass the predicate check,
  3777. * else `false`
  3778. */
  3779. function baseEvery(collection, predicate) {
  3780. var result = true;
  3781. baseEach(collection, function(value, index, collection) {
  3782. result = !!predicate(value, index, collection);
  3783. return result;
  3784. });
  3785. return result;
  3786. }
  3787. /**
  3788. * The base implementation of methods like `_.max` and `_.min` which accepts a
  3789. * `comparator` to determine the extremum value.
  3790. *
  3791. * @private
  3792. * @param {Array} array The array to iterate over.
  3793. * @param {Function} iteratee The iteratee invoked per iteration.
  3794. * @param {Function} comparator The comparator used to compare values.
  3795. * @returns {*} Returns the extremum value.
  3796. */
  3797. function baseExtremum(array, iteratee, comparator) {
  3798. var index = -1,
  3799. length = array.length;
  3800. while (++index < length) {
  3801. var value = array[index],
  3802. current = iteratee(value);
  3803. if (current != null && (computed === undefined
  3804. ? (current === current && !isSymbol(current))
  3805. : comparator(current, computed)
  3806. )) {
  3807. var computed = current,
  3808. result = value;
  3809. }
  3810. }
  3811. return result;
  3812. }
  3813. /**
  3814. * The base implementation of `_.fill` without an iteratee call guard.
  3815. *
  3816. * @private
  3817. * @param {Array} array The array to fill.
  3818. * @param {*} value The value to fill `array` with.
  3819. * @param {number} [start=0] The start position.
  3820. * @param {number} [end=array.length] The end position.
  3821. * @returns {Array} Returns `array`.
  3822. */
  3823. function baseFill(array, value, start, end) {
  3824. var length = array.length;
  3825. start = toInteger(start);
  3826. if (start < 0) {
  3827. start = -start > length ? 0 : (length + start);
  3828. }
  3829. end = (end === undefined || end > length) ? length : toInteger(end);
  3830. if (end < 0) {
  3831. end += length;
  3832. }
  3833. end = start > end ? 0 : toLength(end);
  3834. while (start < end) {
  3835. array[start++] = value;
  3836. }
  3837. return array;
  3838. }
  3839. /**
  3840. * The base implementation of `_.filter` without support for iteratee shorthands.
  3841. *
  3842. * @private
  3843. * @param {Array|Object} collection The collection to iterate over.
  3844. * @param {Function} predicate The function invoked per iteration.
  3845. * @returns {Array} Returns the new filtered array.
  3846. */
  3847. function baseFilter(collection, predicate) {
  3848. var result = [];
  3849. baseEach(collection, function(value, index, collection) {
  3850. if (predicate(value, index, collection)) {
  3851. result.push(value);
  3852. }
  3853. });
  3854. return result;
  3855. }
  3856. /**
  3857. * The base implementation of `_.flatten` with support for restricting flattening.
  3858. *
  3859. * @private
  3860. * @param {Array} array The array to flatten.
  3861. * @param {number} depth The maximum recursion depth.
  3862. * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
  3863. * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
  3864. * @param {Array} [result=[]] The initial result value.
  3865. * @returns {Array} Returns the new flattened array.
  3866. */
  3867. function baseFlatten(array, depth, predicate, isStrict, result) {
  3868. var index = -1,
  3869. length = array.length;
  3870. predicate || (predicate = isFlattenable);
  3871. result || (result = []);
  3872. while (++index < length) {
  3873. var value = array[index];
  3874. if (depth > 0 && predicate(value)) {
  3875. if (depth > 1) {
  3876. // Recursively flatten arrays (susceptible to call stack limits).
  3877. baseFlatten(value, depth - 1, predicate, isStrict, result);
  3878. } else {
  3879. arrayPush(result, value);
  3880. }
  3881. } else if (!isStrict) {
  3882. result[result.length] = value;
  3883. }
  3884. }
  3885. return result;
  3886. }
  3887. /**
  3888. * The base implementation of `baseForOwn` which iterates over `object`
  3889. * properties returned by `keysFunc` and invokes `iteratee` for each property.
  3890. * Iteratee functions may exit iteration early by explicitly returning `false`.
  3891. *
  3892. * @private
  3893. * @param {Object} object The object to iterate over.
  3894. * @param {Function} iteratee The function invoked per iteration.
  3895. * @param {Function} keysFunc The function to get the keys of `object`.
  3896. * @returns {Object} Returns `object`.
  3897. */
  3898. var baseFor = createBaseFor();
  3899. /**
  3900. * This function is like `baseFor` except that it iterates over properties
  3901. * in the opposite order.
  3902. *
  3903. * @private
  3904. * @param {Object} object The object to iterate over.
  3905. * @param {Function} iteratee The function invoked per iteration.
  3906. * @param {Function} keysFunc The function to get the keys of `object`.
  3907. * @returns {Object} Returns `object`.
  3908. */
  3909. var baseForRight = createBaseFor(true);
  3910. /**
  3911. * The base implementation of `_.forOwn` without support for iteratee shorthands.
  3912. *
  3913. * @private
  3914. * @param {Object} object The object to iterate over.
  3915. * @param {Function} iteratee The function invoked per iteration.
  3916. * @returns {Object} Returns `object`.
  3917. */
  3918. function baseForOwn(object, iteratee) {
  3919. return object && baseFor(object, iteratee, keys);
  3920. }
  3921. /**
  3922. * The base implementation of `_.forOwnRight` without support for iteratee shorthands.
  3923. *
  3924. * @private
  3925. * @param {Object} object The object to iterate over.
  3926. * @param {Function} iteratee The function invoked per iteration.
  3927. * @returns {Object} Returns `object`.
  3928. */
  3929. function baseForOwnRight(object, iteratee) {
  3930. return object && baseForRight(object, iteratee, keys);
  3931. }
  3932. /**
  3933. * The base implementation of `_.functions` which creates an array of
  3934. * `object` function property names filtered from `props`.
  3935. *
  3936. * @private
  3937. * @param {Object} object The object to inspect.
  3938. * @param {Array} props The property names to filter.
  3939. * @returns {Array} Returns the function names.
  3940. */
  3941. function baseFunctions(object, props) {
  3942. return arrayFilter(props, function(key) {
  3943. return isFunction(object[key]);
  3944. });
  3945. }
  3946. /**
  3947. * The base implementation of `_.get` without support for default values.
  3948. *
  3949. * @private
  3950. * @param {Object} object The object to query.
  3951. * @param {Array|string} path The path of the property to get.
  3952. * @returns {*} Returns the resolved value.
  3953. */
  3954. function baseGet(object, path) {
  3955. path = castPath(path, object);
  3956. var index = 0,
  3957. length = path.length;
  3958. while (object != null && index < length) {
  3959. object = object[toKey(path[index++])];
  3960. }
  3961. return (index && index == length) ? object : undefined;
  3962. }
  3963. /**
  3964. * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
  3965. * `keysFunc` and `symbolsFunc` to get the enumerable property names and
  3966. * symbols of `object`.
  3967. *
  3968. * @private
  3969. * @param {Object} object The object to query.
  3970. * @param {Function} keysFunc The function to get the keys of `object`.
  3971. * @param {Function} symbolsFunc The function to get the symbols of `object`.
  3972. * @returns {Array} Returns the array of property names and symbols.
  3973. */
  3974. function baseGetAllKeys(object, keysFunc, symbolsFunc) {
  3975. var result = keysFunc(object);
  3976. return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
  3977. }
  3978. /**
  3979. * The base implementation of `getTag` without fallbacks for buggy environments.
  3980. *
  3981. * @private
  3982. * @param {*} value The value to query.
  3983. * @returns {string} Returns the `toStringTag`.
  3984. */
  3985. function baseGetTag(value) {
  3986. if (value == null) {
  3987. return value === undefined ? undefinedTag : nullTag;
  3988. }
  3989. return (symToStringTag && symToStringTag in Object(value))
  3990. ? getRawTag(value)
  3991. : objectToString(value);
  3992. }
  3993. /**
  3994. * The base implementation of `_.gt` which doesn't coerce arguments.
  3995. *
  3996. * @private
  3997. * @param {*} value The value to compare.
  3998. * @param {*} other The other value to compare.
  3999. * @returns {boolean} Returns `true` if `value` is greater than `other`,
  4000. * else `false`.
  4001. */
  4002. function baseGt(value, other) {
  4003. return value > other;
  4004. }
  4005. /**
  4006. * The base implementation of `_.has` without support for deep paths.
  4007. *
  4008. * @private
  4009. * @param {Object} [object] The object to query.
  4010. * @param {Array|string} key The key to check.
  4011. * @returns {boolean} Returns `true` if `key` exists, else `false`.
  4012. */
  4013. function baseHas(object, key) {
  4014. return object != null && hasOwnProperty.call(object, key);
  4015. }
  4016. /**
  4017. * The base implementation of `_.hasIn` without support for deep paths.
  4018. *
  4019. * @private
  4020. * @param {Object} [object] The object to query.
  4021. * @param {Array|string} key The key to check.
  4022. * @returns {boolean} Returns `true` if `key` exists, else `false`.
  4023. */
  4024. function baseHasIn(object, key) {
  4025. return object != null && key in Object(object);
  4026. }
  4027. /**
  4028. * The base implementation of `_.inRange` which doesn't coerce arguments.
  4029. *
  4030. * @private
  4031. * @param {number} number The number to check.
  4032. * @param {number} start The start of the range.
  4033. * @param {number} end The end of the range.
  4034. * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
  4035. */
  4036. function baseInRange(number, start, end) {
  4037. return number >= nativeMin(start, end) && number < nativeMax(start, end);
  4038. }
  4039. /**
  4040. * The base implementation of methods like `_.intersection`, without support
  4041. * for iteratee shorthands, that accepts an array of arrays to inspect.
  4042. *
  4043. * @private
  4044. * @param {Array} arrays The arrays to inspect.
  4045. * @param {Function} [iteratee] The iteratee invoked per element.
  4046. * @param {Function} [comparator] The comparator invoked per element.
  4047. * @returns {Array} Returns the new array of shared values.
  4048. */
  4049. function baseIntersection(arrays, iteratee, comparator) {
  4050. var includes = comparator ? arrayIncludesWith : arrayIncludes,
  4051. length = arrays[0].length,
  4052. othLength = arrays.length,
  4053. othIndex = othLength,
  4054. caches = Array(othLength),
  4055. maxLength = Infinity,
  4056. result = [];
  4057. while (othIndex--) {
  4058. var array = arrays[othIndex];
  4059. if (othIndex && iteratee) {
  4060. array = arrayMap(array, baseUnary(iteratee));
  4061. }
  4062. maxLength = nativeMin(array.length, maxLength);
  4063. caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))
  4064. ? new SetCache(othIndex && array)
  4065. : undefined;
  4066. }
  4067. array = arrays[0];
  4068. var index = -1,
  4069. seen = caches[0];
  4070. outer:
  4071. while (++index < length && result.length < maxLength) {
  4072. var value = array[index],
  4073. computed = iteratee ? iteratee(value) : value;
  4074. value = (comparator || value !== 0) ? value : 0;
  4075. if (!(seen
  4076. ? cacheHas(seen, computed)
  4077. : includes(result, computed, comparator)
  4078. )) {
  4079. othIndex = othLength;
  4080. while (--othIndex) {
  4081. var cache = caches[othIndex];
  4082. if (!(cache
  4083. ? cacheHas(cache, computed)
  4084. : includes(arrays[othIndex], computed, comparator))
  4085. ) {
  4086. continue outer;
  4087. }
  4088. }
  4089. if (seen) {
  4090. seen.push(computed);
  4091. }
  4092. result.push(value);
  4093. }
  4094. }
  4095. return result;
  4096. }
  4097. /**
  4098. * The base implementation of `_.invert` and `_.invertBy` which inverts
  4099. * `object` with values transformed by `iteratee` and set by `setter`.
  4100. *
  4101. * @private
  4102. * @param {Object} object The object to iterate over.
  4103. * @param {Function} setter The function to set `accumulator` values.
  4104. * @param {Function} iteratee The iteratee to transform values.
  4105. * @param {Object} accumulator The initial inverted object.
  4106. * @returns {Function} Returns `accumulator`.
  4107. */
  4108. function baseInverter(object, setter, iteratee, accumulator) {
  4109. baseForOwn(object, function(value, key, object) {
  4110. setter(accumulator, iteratee(value), key, object);
  4111. });
  4112. return accumulator;
  4113. }
  4114. /**
  4115. * The base implementation of `_.invoke` without support for individual
  4116. * method arguments.
  4117. *
  4118. * @private
  4119. * @param {Object} object The object to query.
  4120. * @param {Array|string} path The path of the method to invoke.
  4121. * @param {Array} args The arguments to invoke the method with.
  4122. * @returns {*} Returns the result of the invoked method.
  4123. */
  4124. function baseInvoke(object, path, args) {
  4125. path = castPath(path, object);
  4126. object = parent(object, path);
  4127. var func = object == null ? object : object[toKey(last(path))];
  4128. return func == null ? undefined : apply(func, object, args);
  4129. }
  4130. /**
  4131. * The base implementation of `_.isArguments`.
  4132. *
  4133. * @private
  4134. * @param {*} value The value to check.
  4135. * @returns {boolean} Returns `true` if `value` is an `arguments` object,
  4136. */
  4137. function baseIsArguments(value) {
  4138. return isObjectLike(value) && baseGetTag(value) == argsTag;
  4139. }
  4140. /**
  4141. * The base implementation of `_.isArrayBuffer` without Node.js optimizations.
  4142. *
  4143. * @private
  4144. * @param {*} value The value to check.
  4145. * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
  4146. */
  4147. function baseIsArrayBuffer(value) {
  4148. return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;
  4149. }
  4150. /**
  4151. * The base implementation of `_.isDate` without Node.js optimizations.
  4152. *
  4153. * @private
  4154. * @param {*} value The value to check.
  4155. * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
  4156. */
  4157. function baseIsDate(value) {
  4158. return isObjectLike(value) && baseGetTag(value) == dateTag;
  4159. }
  4160. /**
  4161. * The base implementation of `_.isEqual` which supports partial comparisons
  4162. * and tracks traversed objects.
  4163. *
  4164. * @private
  4165. * @param {*} value The value to compare.
  4166. * @param {*} other The other value to compare.
  4167. * @param {boolean} bitmask The bitmask flags.
  4168. * 1 - Unordered comparison
  4169. * 2 - Partial comparison
  4170. * @param {Function} [customizer] The function to customize comparisons.
  4171. * @param {Object} [stack] Tracks traversed `value` and `other` objects.
  4172. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  4173. */
  4174. function baseIsEqual(value, other, bitmask, customizer, stack) {
  4175. if (value === other) {
  4176. return true;
  4177. }
  4178. if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
  4179. return value !== value && other !== other;
  4180. }
  4181. return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
  4182. }
  4183. /**
  4184. * A specialized version of `baseIsEqual` for arrays and objects which performs
  4185. * deep comparisons and tracks traversed objects enabling objects with circular
  4186. * references to be compared.
  4187. *
  4188. * @private
  4189. * @param {Object} object The object to compare.
  4190. * @param {Object} other The other object to compare.
  4191. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  4192. * @param {Function} customizer The function to customize comparisons.
  4193. * @param {Function} equalFunc The function to determine equivalents of values.
  4194. * @param {Object} [stack] Tracks traversed `object` and `other` objects.
  4195. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  4196. */
  4197. function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
  4198. var objIsArr = isArray(object),
  4199. othIsArr = isArray(other),
  4200. objTag = objIsArr ? arrayTag : getTag(object),
  4201. othTag = othIsArr ? arrayTag : getTag(other);
  4202. objTag = objTag == argsTag ? objectTag : objTag;
  4203. othTag = othTag == argsTag ? objectTag : othTag;
  4204. var objIsObj = objTag == objectTag,
  4205. othIsObj = othTag == objectTag,
  4206. isSameTag = objTag == othTag;
  4207. if (isSameTag && isBuffer(object)) {
  4208. if (!isBuffer(other)) {
  4209. return false;
  4210. }
  4211. objIsArr = true;
  4212. objIsObj = false;
  4213. }
  4214. if (isSameTag && !objIsObj) {
  4215. stack || (stack = new Stack);
  4216. return (objIsArr || isTypedArray(object))
  4217. ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
  4218. : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
  4219. }
  4220. if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
  4221. var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
  4222. othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
  4223. if (objIsWrapped || othIsWrapped) {
  4224. var objUnwrapped = objIsWrapped ? object.value() : object,
  4225. othUnwrapped = othIsWrapped ? other.value() : other;
  4226. stack || (stack = new Stack);
  4227. return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
  4228. }
  4229. }
  4230. if (!isSameTag) {
  4231. return false;
  4232. }
  4233. stack || (stack = new Stack);
  4234. return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
  4235. }
  4236. /**
  4237. * The base implementation of `_.isMap` without Node.js optimizations.
  4238. *
  4239. * @private
  4240. * @param {*} value The value to check.
  4241. * @returns {boolean} Returns `true` if `value` is a map, else `false`.
  4242. */
  4243. function baseIsMap(value) {
  4244. return isObjectLike(value) && getTag(value) == mapTag;
  4245. }
  4246. /**
  4247. * The base implementation of `_.isMatch` without support for iteratee shorthands.
  4248. *
  4249. * @private
  4250. * @param {Object} object The object to inspect.
  4251. * @param {Object} source The object of property values to match.
  4252. * @param {Array} matchData The property names, values, and compare flags to match.
  4253. * @param {Function} [customizer] The function to customize comparisons.
  4254. * @returns {boolean} Returns `true` if `object` is a match, else `false`.
  4255. */
  4256. function baseIsMatch(object, source, matchData, customizer) {
  4257. var index = matchData.length,
  4258. length = index,
  4259. noCustomizer = !customizer;
  4260. if (object == null) {
  4261. return !length;
  4262. }
  4263. object = Object(object);
  4264. while (index--) {
  4265. var data = matchData[index];
  4266. if ((noCustomizer && data[2])
  4267. ? data[1] !== object[data[0]]
  4268. : !(data[0] in object)
  4269. ) {
  4270. return false;
  4271. }
  4272. }
  4273. while (++index < length) {
  4274. data = matchData[index];
  4275. var key = data[0],
  4276. objValue = object[key],
  4277. srcValue = data[1];
  4278. if (noCustomizer && data[2]) {
  4279. if (objValue === undefined && !(key in object)) {
  4280. return false;
  4281. }
  4282. } else {
  4283. var stack = new Stack;
  4284. if (customizer) {
  4285. var result = customizer(objValue, srcValue, key, object, source, stack);
  4286. }
  4287. if (!(result === undefined
  4288. ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)
  4289. : result
  4290. )) {
  4291. return false;
  4292. }
  4293. }
  4294. }
  4295. return true;
  4296. }
  4297. /**
  4298. * The base implementation of `_.isNative` without bad shim checks.
  4299. *
  4300. * @private
  4301. * @param {*} value The value to check.
  4302. * @returns {boolean} Returns `true` if `value` is a native function,
  4303. * else `false`.
  4304. */
  4305. function baseIsNative(value) {
  4306. if (!isObject(value) || isMasked(value)) {
  4307. return false;
  4308. }
  4309. var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
  4310. return pattern.test(toSource(value));
  4311. }
  4312. /**
  4313. * The base implementation of `_.isRegExp` without Node.js optimizations.
  4314. *
  4315. * @private
  4316. * @param {*} value The value to check.
  4317. * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
  4318. */
  4319. function baseIsRegExp(value) {
  4320. return isObjectLike(value) && baseGetTag(value) == regexpTag;
  4321. }
  4322. /**
  4323. * The base implementation of `_.isSet` without Node.js optimizations.
  4324. *
  4325. * @private
  4326. * @param {*} value The value to check.
  4327. * @returns {boolean} Returns `true` if `value` is a set, else `false`.
  4328. */
  4329. function baseIsSet(value) {
  4330. return isObjectLike(value) && getTag(value) == setTag;
  4331. }
  4332. /**
  4333. * The base implementation of `_.isTypedArray` without Node.js optimizations.
  4334. *
  4335. * @private
  4336. * @param {*} value The value to check.
  4337. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
  4338. */
  4339. function baseIsTypedArray(value) {
  4340. return isObjectLike(value) &&
  4341. isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
  4342. }
  4343. /**
  4344. * The base implementation of `_.iteratee`.
  4345. *
  4346. * @private
  4347. * @param {*} [value=_.identity] The value to convert to an iteratee.
  4348. * @returns {Function} Returns the iteratee.
  4349. */
  4350. function baseIteratee(value) {
  4351. // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
  4352. // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
  4353. if (typeof value == 'function') {
  4354. return value;
  4355. }
  4356. if (value == null) {
  4357. return identity;
  4358. }
  4359. if (typeof value == 'object') {
  4360. return isArray(value)
  4361. ? baseMatchesProperty(value[0], value[1])
  4362. : baseMatches(value);
  4363. }
  4364. return property(value);
  4365. }
  4366. /**
  4367. * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
  4368. *
  4369. * @private
  4370. * @param {Object} object The object to query.
  4371. * @returns {Array} Returns the array of property names.
  4372. */
  4373. function baseKeys(object) {
  4374. if (!isPrototype(object)) {
  4375. return nativeKeys(object);
  4376. }
  4377. var result = [];
  4378. for (var key in Object(object)) {
  4379. if (hasOwnProperty.call(object, key) && key != 'constructor') {
  4380. result.push(key);
  4381. }
  4382. }
  4383. return result;
  4384. }
  4385. /**
  4386. * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
  4387. *
  4388. * @private
  4389. * @param {Object} object The object to query.
  4390. * @returns {Array} Returns the array of property names.
  4391. */
  4392. function baseKeysIn(object) {
  4393. if (!isObject(object)) {
  4394. return nativeKeysIn(object);
  4395. }
  4396. var isProto = isPrototype(object),
  4397. result = [];
  4398. for (var key in object) {
  4399. if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
  4400. result.push(key);
  4401. }
  4402. }
  4403. return result;
  4404. }
  4405. /**
  4406. * The base implementation of `_.lt` which doesn't coerce arguments.
  4407. *
  4408. * @private
  4409. * @param {*} value The value to compare.
  4410. * @param {*} other The other value to compare.
  4411. * @returns {boolean} Returns `true` if `value` is less than `other`,
  4412. * else `false`.
  4413. */
  4414. function baseLt(value, other) {
  4415. return value < other;
  4416. }
  4417. /**
  4418. * The base implementation of `_.map` without support for iteratee shorthands.
  4419. *
  4420. * @private
  4421. * @param {Array|Object} collection The collection to iterate over.
  4422. * @param {Function} iteratee The function invoked per iteration.
  4423. * @returns {Array} Returns the new mapped array.
  4424. */
  4425. function baseMap(collection, iteratee) {
  4426. var index = -1,
  4427. result = isArrayLike(collection) ? Array(collection.length) : [];
  4428. baseEach(collection, function(value, key, collection) {
  4429. result[++index] = iteratee(value, key, collection);
  4430. });
  4431. return result;
  4432. }
  4433. /**
  4434. * The base implementation of `_.matches` which doesn't clone `source`.
  4435. *
  4436. * @private
  4437. * @param {Object} source The object of property values to match.
  4438. * @returns {Function} Returns the new spec function.
  4439. */
  4440. function baseMatches(source) {
  4441. var matchData = getMatchData(source);
  4442. if (matchData.length == 1 && matchData[0][2]) {
  4443. return matchesStrictComparable(matchData[0][0], matchData[0][1]);
  4444. }
  4445. return function(object) {
  4446. return object === source || baseIsMatch(object, source, matchData);
  4447. };
  4448. }
  4449. /**
  4450. * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
  4451. *
  4452. * @private
  4453. * @param {string} path The path of the property to get.
  4454. * @param {*} srcValue The value to match.
  4455. * @returns {Function} Returns the new spec function.
  4456. */
  4457. function baseMatchesProperty(path, srcValue) {
  4458. if (isKey(path) && isStrictComparable(srcValue)) {
  4459. return matchesStrictComparable(toKey(path), srcValue);
  4460. }
  4461. return function(object) {
  4462. var objValue = get(object, path);
  4463. return (objValue === undefined && objValue === srcValue)
  4464. ? hasIn(object, path)
  4465. : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
  4466. };
  4467. }
  4468. /**
  4469. * The base implementation of `_.merge` without support for multiple sources.
  4470. *
  4471. * @private
  4472. * @param {Object} object The destination object.
  4473. * @param {Object} source The source object.
  4474. * @param {number} srcIndex The index of `source`.
  4475. * @param {Function} [customizer] The function to customize merged values.
  4476. * @param {Object} [stack] Tracks traversed source values and their merged
  4477. * counterparts.
  4478. */
  4479. function baseMerge(object, source, srcIndex, customizer, stack) {
  4480. if (object === source) {
  4481. return;
  4482. }
  4483. baseFor(source, function(srcValue, key) {
  4484. stack || (stack = new Stack);
  4485. if (isObject(srcValue)) {
  4486. baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
  4487. }
  4488. else {
  4489. var newValue = customizer
  4490. ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)
  4491. : undefined;
  4492. if (newValue === undefined) {
  4493. newValue = srcValue;
  4494. }
  4495. assignMergeValue(object, key, newValue);
  4496. }
  4497. }, keysIn);
  4498. }
  4499. /**
  4500. * A specialized version of `baseMerge` for arrays and objects which performs
  4501. * deep merges and tracks traversed objects enabling objects with circular
  4502. * references to be merged.
  4503. *
  4504. * @private
  4505. * @param {Object} object The destination object.
  4506. * @param {Object} source The source object.
  4507. * @param {string} key The key of the value to merge.
  4508. * @param {number} srcIndex The index of `source`.
  4509. * @param {Function} mergeFunc The function to merge values.
  4510. * @param {Function} [customizer] The function to customize assigned values.
  4511. * @param {Object} [stack] Tracks traversed source values and their merged
  4512. * counterparts.
  4513. */
  4514. function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
  4515. var objValue = safeGet(object, key),
  4516. srcValue = safeGet(source, key),
  4517. stacked = stack.get(srcValue);
  4518. if (stacked) {
  4519. assignMergeValue(object, key, stacked);
  4520. return;
  4521. }
  4522. var newValue = customizer
  4523. ? customizer(objValue, srcValue, (key + ''), object, source, stack)
  4524. : undefined;
  4525. var isCommon = newValue === undefined;
  4526. if (isCommon) {
  4527. var isArr = isArray(srcValue),
  4528. isBuff = !isArr && isBuffer(srcValue),
  4529. isTyped = !isArr && !isBuff && isTypedArray(srcValue);
  4530. newValue = srcValue;
  4531. if (isArr || isBuff || isTyped) {
  4532. if (isArray(objValue)) {
  4533. newValue = objValue;
  4534. }
  4535. else if (isArrayLikeObject(objValue)) {
  4536. newValue = copyArray(objValue);
  4537. }
  4538. else if (isBuff) {
  4539. isCommon = false;
  4540. newValue = cloneBuffer(srcValue, true);
  4541. }
  4542. else if (isTyped) {
  4543. isCommon = false;
  4544. newValue = cloneTypedArray(srcValue, true);
  4545. }
  4546. else {
  4547. newValue = [];
  4548. }
  4549. }
  4550. else if (isPlainObject(srcValue) || isArguments(srcValue)) {
  4551. newValue = objValue;
  4552. if (isArguments(objValue)) {
  4553. newValue = toPlainObject(objValue);
  4554. }
  4555. else if (!isObject(objValue) || isFunction(objValue)) {
  4556. newValue = initCloneObject(srcValue);
  4557. }
  4558. }
  4559. else {
  4560. isCommon = false;
  4561. }
  4562. }
  4563. if (isCommon) {
  4564. // Recursively merge objects and arrays (susceptible to call stack limits).
  4565. stack.set(srcValue, newValue);
  4566. mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
  4567. stack['delete'](srcValue);
  4568. }
  4569. assignMergeValue(object, key, newValue);
  4570. }
  4571. /**
  4572. * The base implementation of `_.nth` which doesn't coerce arguments.
  4573. *
  4574. * @private
  4575. * @param {Array} array The array to query.
  4576. * @param {number} n The index of the element to return.
  4577. * @returns {*} Returns the nth element of `array`.
  4578. */
  4579. function baseNth(array, n) {
  4580. var length = array.length;
  4581. if (!length) {
  4582. return;
  4583. }
  4584. n += n < 0 ? length : 0;
  4585. return isIndex(n, length) ? array[n] : undefined;
  4586. }
  4587. /**
  4588. * The base implementation of `_.orderBy` without param guards.
  4589. *
  4590. * @private
  4591. * @param {Array|Object} collection The collection to iterate over.
  4592. * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
  4593. * @param {string[]} orders The sort orders of `iteratees`.
  4594. * @returns {Array} Returns the new sorted array.
  4595. */
  4596. function baseOrderBy(collection, iteratees, orders) {
  4597. if (iteratees.length) {
  4598. iteratees = arrayMap(iteratees, function(iteratee) {
  4599. if (isArray(iteratee)) {
  4600. return function(value) {
  4601. return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);
  4602. }
  4603. }
  4604. return iteratee;
  4605. });
  4606. } else {
  4607. iteratees = [identity];
  4608. }
  4609. var index = -1;
  4610. iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
  4611. var result = baseMap(collection, function(value, key, collection) {
  4612. var criteria = arrayMap(iteratees, function(iteratee) {
  4613. return iteratee(value);
  4614. });
  4615. return { 'criteria': criteria, 'index': ++index, 'value': value };
  4616. });
  4617. return baseSortBy(result, function(object, other) {
  4618. return compareMultiple(object, other, orders);
  4619. });
  4620. }
  4621. /**
  4622. * The base implementation of `_.pick` without support for individual
  4623. * property identifiers.
  4624. *
  4625. * @private
  4626. * @param {Object} object The source object.
  4627. * @param {string[]} paths The property paths to pick.
  4628. * @returns {Object} Returns the new object.
  4629. */
  4630. function basePick(object, paths) {
  4631. return basePickBy(object, paths, function(value, path) {
  4632. return hasIn(object, path);
  4633. });
  4634. }
  4635. /**
  4636. * The base implementation of `_.pickBy` without support for iteratee shorthands.
  4637. *
  4638. * @private
  4639. * @param {Object} object The source object.
  4640. * @param {string[]} paths The property paths to pick.
  4641. * @param {Function} predicate The function invoked per property.
  4642. * @returns {Object} Returns the new object.
  4643. */
  4644. function basePickBy(object, paths, predicate) {
  4645. var index = -1,
  4646. length = paths.length,
  4647. result = {};
  4648. while (++index < length) {
  4649. var path = paths[index],
  4650. value = baseGet(object, path);
  4651. if (predicate(value, path)) {
  4652. baseSet(result, castPath(path, object), value);
  4653. }
  4654. }
  4655. return result;
  4656. }
  4657. /**
  4658. * A specialized version of `baseProperty` which supports deep paths.
  4659. *
  4660. * @private
  4661. * @param {Array|string} path The path of the property to get.
  4662. * @returns {Function} Returns the new accessor function.
  4663. */
  4664. function basePropertyDeep(path) {
  4665. return function(object) {
  4666. return baseGet(object, path);
  4667. };
  4668. }
  4669. /**
  4670. * The base implementation of `_.pullAllBy` without support for iteratee
  4671. * shorthands.
  4672. *
  4673. * @private
  4674. * @param {Array} array The array to modify.
  4675. * @param {Array} values The values to remove.
  4676. * @param {Function} [iteratee] The iteratee invoked per element.
  4677. * @param {Function} [comparator] The comparator invoked per element.
  4678. * @returns {Array} Returns `array`.
  4679. */
  4680. function basePullAll(array, values, iteratee, comparator) {
  4681. var indexOf = comparator ? baseIndexOfWith : baseIndexOf,
  4682. index = -1,
  4683. length = values.length,
  4684. seen = array;
  4685. if (array === values) {
  4686. values = copyArray(values);
  4687. }
  4688. if (iteratee) {
  4689. seen = arrayMap(array, baseUnary(iteratee));
  4690. }
  4691. while (++index < length) {
  4692. var fromIndex = 0,
  4693. value = values[index],
  4694. computed = iteratee ? iteratee(value) : value;
  4695. while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {
  4696. if (seen !== array) {
  4697. splice.call(seen, fromIndex, 1);
  4698. }
  4699. splice.call(array, fromIndex, 1);
  4700. }
  4701. }
  4702. return array;
  4703. }
  4704. /**
  4705. * The base implementation of `_.pullAt` without support for individual
  4706. * indexes or capturing the removed elements.
  4707. *
  4708. * @private
  4709. * @param {Array} array The array to modify.
  4710. * @param {number[]} indexes The indexes of elements to remove.
  4711. * @returns {Array} Returns `array`.
  4712. */
  4713. function basePullAt(array, indexes) {
  4714. var length = array ? indexes.length : 0,
  4715. lastIndex = length - 1;
  4716. while (length--) {
  4717. var index = indexes[length];
  4718. if (length == lastIndex || index !== previous) {
  4719. var previous = index;
  4720. if (isIndex(index)) {
  4721. splice.call(array, index, 1);
  4722. } else {
  4723. baseUnset(array, index);
  4724. }
  4725. }
  4726. }
  4727. return array;
  4728. }
  4729. /**
  4730. * The base implementation of `_.random` without support for returning
  4731. * floating-point numbers.
  4732. *
  4733. * @private
  4734. * @param {number} lower The lower bound.
  4735. * @param {number} upper The upper bound.
  4736. * @returns {number} Returns the random number.
  4737. */
  4738. function baseRandom(lower, upper) {
  4739. return lower + nativeFloor(nativeRandom() * (upper - lower + 1));
  4740. }
  4741. /**
  4742. * The base implementation of `_.range` and `_.rangeRight` which doesn't
  4743. * coerce arguments.
  4744. *
  4745. * @private
  4746. * @param {number} start The start of the range.
  4747. * @param {number} end The end of the range.
  4748. * @param {number} step The value to increment or decrement by.
  4749. * @param {boolean} [fromRight] Specify iterating from right to left.
  4750. * @returns {Array} Returns the range of numbers.
  4751. */
  4752. function baseRange(start, end, step, fromRight) {
  4753. var index = -1,
  4754. length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),
  4755. result = Array(length);
  4756. while (length--) {
  4757. result[fromRight ? length : ++index] = start;
  4758. start += step;
  4759. }
  4760. return result;
  4761. }
  4762. /**
  4763. * The base implementation of `_.repeat` which doesn't coerce arguments.
  4764. *
  4765. * @private
  4766. * @param {string} string The string to repeat.
  4767. * @param {number} n The number of times to repeat the string.
  4768. * @returns {string} Returns the repeated string.
  4769. */
  4770. function baseRepeat(string, n) {
  4771. var result = '';
  4772. if (!string || n < 1 || n > MAX_SAFE_INTEGER) {
  4773. return result;
  4774. }
  4775. // Leverage the exponentiation by squaring algorithm for a faster repeat.
  4776. // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.
  4777. do {
  4778. if (n % 2) {
  4779. result += string;
  4780. }
  4781. n = nativeFloor(n / 2);
  4782. if (n) {
  4783. string += string;
  4784. }
  4785. } while (n);
  4786. return result;
  4787. }
  4788. /**
  4789. * The base implementation of `_.rest` which doesn't validate or coerce arguments.
  4790. *
  4791. * @private
  4792. * @param {Function} func The function to apply a rest parameter to.
  4793. * @param {number} [start=func.length-1] The start position of the rest parameter.
  4794. * @returns {Function} Returns the new function.
  4795. */
  4796. function baseRest(func, start) {
  4797. return setToString(overRest(func, start, identity), func + '');
  4798. }
  4799. /**
  4800. * The base implementation of `_.sample`.
  4801. *
  4802. * @private
  4803. * @param {Array|Object} collection The collection to sample.
  4804. * @returns {*} Returns the random element.
  4805. */
  4806. function baseSample(collection) {
  4807. return arraySample(values(collection));
  4808. }
  4809. /**
  4810. * The base implementation of `_.sampleSize` without param guards.
  4811. *
  4812. * @private
  4813. * @param {Array|Object} collection The collection to sample.
  4814. * @param {number} n The number of elements to sample.
  4815. * @returns {Array} Returns the random elements.
  4816. */
  4817. function baseSampleSize(collection, n) {
  4818. var array = values(collection);
  4819. return shuffleSelf(array, baseClamp(n, 0, array.length));
  4820. }
  4821. /**
  4822. * The base implementation of `_.set`.
  4823. *
  4824. * @private
  4825. * @param {Object} object The object to modify.
  4826. * @param {Array|string} path The path of the property to set.
  4827. * @param {*} value The value to set.
  4828. * @param {Function} [customizer] The function to customize path creation.
  4829. * @returns {Object} Returns `object`.
  4830. */
  4831. function baseSet(object, path, value, customizer) {
  4832. if (!isObject(object)) {
  4833. return object;
  4834. }
  4835. path = castPath(path, object);
  4836. var index = -1,
  4837. length = path.length,
  4838. lastIndex = length - 1,
  4839. nested = object;
  4840. while (nested != null && ++index < length) {
  4841. var key = toKey(path[index]),
  4842. newValue = value;
  4843. if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
  4844. return object;
  4845. }
  4846. if (index != lastIndex) {
  4847. var objValue = nested[key];
  4848. newValue = customizer ? customizer(objValue, key, nested) : undefined;
  4849. if (newValue === undefined) {
  4850. newValue = isObject(objValue)
  4851. ? objValue
  4852. : (isIndex(path[index + 1]) ? [] : {});
  4853. }
  4854. }
  4855. assignValue(nested, key, newValue);
  4856. nested = nested[key];
  4857. }
  4858. return object;
  4859. }
  4860. /**
  4861. * The base implementation of `setData` without support for hot loop shorting.
  4862. *
  4863. * @private
  4864. * @param {Function} func The function to associate metadata with.
  4865. * @param {*} data The metadata.
  4866. * @returns {Function} Returns `func`.
  4867. */
  4868. var baseSetData = !metaMap ? identity : function(func, data) {
  4869. metaMap.set(func, data);
  4870. return func;
  4871. };
  4872. /**
  4873. * The base implementation of `setToString` without support for hot loop shorting.
  4874. *
  4875. * @private
  4876. * @param {Function} func The function to modify.
  4877. * @param {Function} string The `toString` result.
  4878. * @returns {Function} Returns `func`.
  4879. */
  4880. var baseSetToString = !defineProperty ? identity : function(func, string) {
  4881. return defineProperty(func, 'toString', {
  4882. 'configurable': true,
  4883. 'enumerable': false,
  4884. 'value': constant(string),
  4885. 'writable': true
  4886. });
  4887. };
  4888. /**
  4889. * The base implementation of `_.shuffle`.
  4890. *
  4891. * @private
  4892. * @param {Array|Object} collection The collection to shuffle.
  4893. * @returns {Array} Returns the new shuffled array.
  4894. */
  4895. function baseShuffle(collection) {
  4896. return shuffleSelf(values(collection));
  4897. }
  4898. /**
  4899. * The base implementation of `_.slice` without an iteratee call guard.
  4900. *
  4901. * @private
  4902. * @param {Array} array The array to slice.
  4903. * @param {number} [start=0] The start position.
  4904. * @param {number} [end=array.length] The end position.
  4905. * @returns {Array} Returns the slice of `array`.
  4906. */
  4907. function baseSlice(array, start, end) {
  4908. var index = -1,
  4909. length = array.length;
  4910. if (start < 0) {
  4911. start = -start > length ? 0 : (length + start);
  4912. }
  4913. end = end > length ? length : end;
  4914. if (end < 0) {
  4915. end += length;
  4916. }
  4917. length = start > end ? 0 : ((end - start) >>> 0);
  4918. start >>>= 0;
  4919. var result = Array(length);
  4920. while (++index < length) {
  4921. result[index] = array[index + start];
  4922. }
  4923. return result;
  4924. }
  4925. /**
  4926. * The base implementation of `_.some` without support for iteratee shorthands.
  4927. *
  4928. * @private
  4929. * @param {Array|Object} collection The collection to iterate over.
  4930. * @param {Function} predicate The function invoked per iteration.
  4931. * @returns {boolean} Returns `true` if any element passes the predicate check,
  4932. * else `false`.
  4933. */
  4934. function baseSome(collection, predicate) {
  4935. var result;
  4936. baseEach(collection, function(value, index, collection) {
  4937. result = predicate(value, index, collection);
  4938. return !result;
  4939. });
  4940. return !!result;
  4941. }
  4942. /**
  4943. * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which
  4944. * performs a binary search of `array` to determine the index at which `value`
  4945. * should be inserted into `array` in order to maintain its sort order.
  4946. *
  4947. * @private
  4948. * @param {Array} array The sorted array to inspect.
  4949. * @param {*} value The value to evaluate.
  4950. * @param {boolean} [retHighest] Specify returning the highest qualified index.
  4951. * @returns {number} Returns the index at which `value` should be inserted
  4952. * into `array`.
  4953. */
  4954. function baseSortedIndex(array, value, retHighest) {
  4955. var low = 0,
  4956. high = array == null ? low : array.length;
  4957. if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
  4958. while (low < high) {
  4959. var mid = (low + high) >>> 1,
  4960. computed = array[mid];
  4961. if (computed !== null && !isSymbol(computed) &&
  4962. (retHighest ? (computed <= value) : (computed < value))) {
  4963. low = mid + 1;
  4964. } else {
  4965. high = mid;
  4966. }
  4967. }
  4968. return high;
  4969. }
  4970. return baseSortedIndexBy(array, value, identity, retHighest);
  4971. }
  4972. /**
  4973. * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`
  4974. * which invokes `iteratee` for `value` and each element of `array` to compute
  4975. * their sort ranking. The iteratee is invoked with one argument; (value).
  4976. *
  4977. * @private
  4978. * @param {Array} array The sorted array to inspect.
  4979. * @param {*} value The value to evaluate.
  4980. * @param {Function} iteratee The iteratee invoked per element.
  4981. * @param {boolean} [retHighest] Specify returning the highest qualified index.
  4982. * @returns {number} Returns the index at which `value` should be inserted
  4983. * into `array`.
  4984. */
  4985. function baseSortedIndexBy(array, value, iteratee, retHighest) {
  4986. var low = 0,
  4987. high = array == null ? 0 : array.length;
  4988. if (high === 0) {
  4989. return 0;
  4990. }
  4991. value = iteratee(value);
  4992. var valIsNaN = value !== value,
  4993. valIsNull = value === null,
  4994. valIsSymbol = isSymbol(value),
  4995. valIsUndefined = value === undefined;
  4996. while (low < high) {
  4997. var mid = nativeFloor((low + high) / 2),
  4998. computed = iteratee(array[mid]),
  4999. othIsDefined = computed !== undefined,
  5000. othIsNull = computed === null,
  5001. othIsReflexive = computed === computed,
  5002. othIsSymbol = isSymbol(computed);
  5003. if (valIsNaN) {
  5004. var setLow = retHighest || othIsReflexive;
  5005. } else if (valIsUndefined) {
  5006. setLow = othIsReflexive && (retHighest || othIsDefined);
  5007. } else if (valIsNull) {
  5008. setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);
  5009. } else if (valIsSymbol) {
  5010. setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);
  5011. } else if (othIsNull || othIsSymbol) {
  5012. setLow = false;
  5013. } else {
  5014. setLow = retHighest ? (computed <= value) : (computed < value);
  5015. }
  5016. if (setLow) {
  5017. low = mid + 1;
  5018. } else {
  5019. high = mid;
  5020. }
  5021. }
  5022. return nativeMin(high, MAX_ARRAY_INDEX);
  5023. }
  5024. /**
  5025. * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without
  5026. * support for iteratee shorthands.
  5027. *
  5028. * @private
  5029. * @param {Array} array The array to inspect.
  5030. * @param {Function} [iteratee] The iteratee invoked per element.
  5031. * @returns {Array} Returns the new duplicate free array.
  5032. */
  5033. function baseSortedUniq(array, iteratee) {
  5034. var index = -1,
  5035. length = array.length,
  5036. resIndex = 0,
  5037. result = [];
  5038. while (++index < length) {
  5039. var value = array[index],
  5040. computed = iteratee ? iteratee(value) : value;
  5041. if (!index || !eq(computed, seen)) {
  5042. var seen = computed;
  5043. result[resIndex++] = value === 0 ? 0 : value;
  5044. }
  5045. }
  5046. return result;
  5047. }
  5048. /**
  5049. * The base implementation of `_.toNumber` which doesn't ensure correct
  5050. * conversions of binary, hexadecimal, or octal string values.
  5051. *
  5052. * @private
  5053. * @param {*} value The value to process.
  5054. * @returns {number} Returns the number.
  5055. */
  5056. function baseToNumber(value) {
  5057. if (typeof value == 'number') {
  5058. return value;
  5059. }
  5060. if (isSymbol(value)) {
  5061. return NAN;
  5062. }
  5063. return +value;
  5064. }
  5065. /**
  5066. * The base implementation of `_.toString` which doesn't convert nullish
  5067. * values to empty strings.
  5068. *
  5069. * @private
  5070. * @param {*} value The value to process.
  5071. * @returns {string} Returns the string.
  5072. */
  5073. function baseToString(value) {
  5074. // Exit early for strings to avoid a performance hit in some environments.
  5075. if (typeof value == 'string') {
  5076. return value;
  5077. }
  5078. if (isArray(value)) {
  5079. // Recursively convert values (susceptible to call stack limits).
  5080. return arrayMap(value, baseToString) + '';
  5081. }
  5082. if (isSymbol(value)) {
  5083. return symbolToString ? symbolToString.call(value) : '';
  5084. }
  5085. var result = (value + '');
  5086. return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
  5087. }
  5088. /**
  5089. * The base implementation of `_.uniqBy` without support for iteratee shorthands.
  5090. *
  5091. * @private
  5092. * @param {Array} array The array to inspect.
  5093. * @param {Function} [iteratee] The iteratee invoked per element.
  5094. * @param {Function} [comparator] The comparator invoked per element.
  5095. * @returns {Array} Returns the new duplicate free array.
  5096. */
  5097. function baseUniq(array, iteratee, comparator) {
  5098. var index = -1,
  5099. includes = arrayIncludes,
  5100. length = array.length,
  5101. isCommon = true,
  5102. result = [],
  5103. seen = result;
  5104. if (comparator) {
  5105. isCommon = false;
  5106. includes = arrayIncludesWith;
  5107. }
  5108. else if (length >= LARGE_ARRAY_SIZE) {
  5109. var set = iteratee ? null : createSet(array);
  5110. if (set) {
  5111. return setToArray(set);
  5112. }
  5113. isCommon = false;
  5114. includes = cacheHas;
  5115. seen = new SetCache;
  5116. }
  5117. else {
  5118. seen = iteratee ? [] : result;
  5119. }
  5120. outer:
  5121. while (++index < length) {
  5122. var value = array[index],
  5123. computed = iteratee ? iteratee(value) : value;
  5124. value = (comparator || value !== 0) ? value : 0;
  5125. if (isCommon && computed === computed) {
  5126. var seenIndex = seen.length;
  5127. while (seenIndex--) {
  5128. if (seen[seenIndex] === computed) {
  5129. continue outer;
  5130. }
  5131. }
  5132. if (iteratee) {
  5133. seen.push(computed);
  5134. }
  5135. result.push(value);
  5136. }
  5137. else if (!includes(seen, computed, comparator)) {
  5138. if (seen !== result) {
  5139. seen.push(computed);
  5140. }
  5141. result.push(value);
  5142. }
  5143. }
  5144. return result;
  5145. }
  5146. /**
  5147. * The base implementation of `_.unset`.
  5148. *
  5149. * @private
  5150. * @param {Object} object The object to modify.
  5151. * @param {Array|string} path The property path to unset.
  5152. * @returns {boolean} Returns `true` if the property is deleted, else `false`.
  5153. */
  5154. function baseUnset(object, path) {
  5155. path = castPath(path, object);
  5156. object = parent(object, path);
  5157. return object == null || delete object[toKey(last(path))];
  5158. }
  5159. /**
  5160. * The base implementation of `_.update`.
  5161. *
  5162. * @private
  5163. * @param {Object} object The object to modify.
  5164. * @param {Array|string} path The path of the property to update.
  5165. * @param {Function} updater The function to produce the updated value.
  5166. * @param {Function} [customizer] The function to customize path creation.
  5167. * @returns {Object} Returns `object`.
  5168. */
  5169. function baseUpdate(object, path, updater, customizer) {
  5170. return baseSet(object, path, updater(baseGet(object, path)), customizer);
  5171. }
  5172. /**
  5173. * The base implementation of methods like `_.dropWhile` and `_.takeWhile`
  5174. * without support for iteratee shorthands.
  5175. *
  5176. * @private
  5177. * @param {Array} array The array to query.
  5178. * @param {Function} predicate The function invoked per iteration.
  5179. * @param {boolean} [isDrop] Specify dropping elements instead of taking them.
  5180. * @param {boolean} [fromRight] Specify iterating from right to left.
  5181. * @returns {Array} Returns the slice of `array`.
  5182. */
  5183. function baseWhile(array, predicate, isDrop, fromRight) {
  5184. var length = array.length,
  5185. index = fromRight ? length : -1;
  5186. while ((fromRight ? index-- : ++index < length) &&
  5187. predicate(array[index], index, array)) {}
  5188. return isDrop
  5189. ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))
  5190. : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));
  5191. }
  5192. /**
  5193. * The base implementation of `wrapperValue` which returns the result of
  5194. * performing a sequence of actions on the unwrapped `value`, where each
  5195. * successive action is supplied the return value of the previous.
  5196. *
  5197. * @private
  5198. * @param {*} value The unwrapped value.
  5199. * @param {Array} actions Actions to perform to resolve the unwrapped value.
  5200. * @returns {*} Returns the resolved value.
  5201. */
  5202. function baseWrapperValue(value, actions) {
  5203. var result = value;
  5204. if (result instanceof LazyWrapper) {
  5205. result = result.value();
  5206. }
  5207. return arrayReduce(actions, function(result, action) {
  5208. return action.func.apply(action.thisArg, arrayPush([result], action.args));
  5209. }, result);
  5210. }
  5211. /**
  5212. * The base implementation of methods like `_.xor`, without support for
  5213. * iteratee shorthands, that accepts an array of arrays to inspect.
  5214. *
  5215. * @private
  5216. * @param {Array} arrays The arrays to inspect.
  5217. * @param {Function} [iteratee] The iteratee invoked per element.
  5218. * @param {Function} [comparator] The comparator invoked per element.
  5219. * @returns {Array} Returns the new array of values.
  5220. */
  5221. function baseXor(arrays, iteratee, comparator) {
  5222. var length = arrays.length;
  5223. if (length < 2) {
  5224. return length ? baseUniq(arrays[0]) : [];
  5225. }
  5226. var index = -1,
  5227. result = Array(length);
  5228. while (++index < length) {
  5229. var array = arrays[index],
  5230. othIndex = -1;
  5231. while (++othIndex < length) {
  5232. if (othIndex != index) {
  5233. result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);
  5234. }
  5235. }
  5236. }
  5237. return baseUniq(baseFlatten(result, 1), iteratee, comparator);
  5238. }
  5239. /**
  5240. * This base implementation of `_.zipObject` which assigns values using `assignFunc`.
  5241. *
  5242. * @private
  5243. * @param {Array} props The property identifiers.
  5244. * @param {Array} values The property values.
  5245. * @param {Function} assignFunc The function to assign values.
  5246. * @returns {Object} Returns the new object.
  5247. */
  5248. function baseZipObject(props, values, assignFunc) {
  5249. var index = -1,
  5250. length = props.length,
  5251. valsLength = values.length,
  5252. result = {};
  5253. while (++index < length) {
  5254. var value = index < valsLength ? values[index] : undefined;
  5255. assignFunc(result, props[index], value);
  5256. }
  5257. return result;
  5258. }
  5259. /**
  5260. * Casts `value` to an empty array if it's not an array like object.
  5261. *
  5262. * @private
  5263. * @param {*} value The value to inspect.
  5264. * @returns {Array|Object} Returns the cast array-like object.
  5265. */
  5266. function castArrayLikeObject(value) {
  5267. return isArrayLikeObject(value) ? value : [];
  5268. }
  5269. /**
  5270. * Casts `value` to `identity` if it's not a function.
  5271. *
  5272. * @private
  5273. * @param {*} value The value to inspect.
  5274. * @returns {Function} Returns cast function.
  5275. */
  5276. function castFunction(value) {
  5277. return typeof value == 'function' ? value : identity;
  5278. }
  5279. /**
  5280. * Casts `value` to a path array if it's not one.
  5281. *
  5282. * @private
  5283. * @param {*} value The value to inspect.
  5284. * @param {Object} [object] The object to query keys on.
  5285. * @returns {Array} Returns the cast property path array.
  5286. */
  5287. function castPath(value, object) {
  5288. if (isArray(value)) {
  5289. return value;
  5290. }
  5291. return isKey(value, object) ? [value] : stringToPath(toString(value));
  5292. }
  5293. /**
  5294. * A `baseRest` alias which can be replaced with `identity` by module
  5295. * replacement plugins.
  5296. *
  5297. * @private
  5298. * @type {Function}
  5299. * @param {Function} func The function to apply a rest parameter to.
  5300. * @returns {Function} Returns the new function.
  5301. */
  5302. var castRest = baseRest;
  5303. /**
  5304. * Casts `array` to a slice if it's needed.
  5305. *
  5306. * @private
  5307. * @param {Array} array The array to inspect.
  5308. * @param {number} start The start position.
  5309. * @param {number} [end=array.length] The end position.
  5310. * @returns {Array} Returns the cast slice.
  5311. */
  5312. function castSlice(array, start, end) {
  5313. var length = array.length;
  5314. end = end === undefined ? length : end;
  5315. return (!start && end >= length) ? array : baseSlice(array, start, end);
  5316. }
  5317. /**
  5318. * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout).
  5319. *
  5320. * @private
  5321. * @param {number|Object} id The timer id or timeout object of the timer to clear.
  5322. */
  5323. var clearTimeout = ctxClearTimeout || function(id) {
  5324. return root.clearTimeout(id);
  5325. };
  5326. /**
  5327. * Creates a clone of `buffer`.
  5328. *
  5329. * @private
  5330. * @param {Buffer} buffer The buffer to clone.
  5331. * @param {boolean} [isDeep] Specify a deep clone.
  5332. * @returns {Buffer} Returns the cloned buffer.
  5333. */
  5334. function cloneBuffer(buffer, isDeep) {
  5335. if (isDeep) {
  5336. return buffer.slice();
  5337. }
  5338. var length = buffer.length,
  5339. result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
  5340. buffer.copy(result);
  5341. return result;
  5342. }
  5343. /**
  5344. * Creates a clone of `arrayBuffer`.
  5345. *
  5346. * @private
  5347. * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
  5348. * @returns {ArrayBuffer} Returns the cloned array buffer.
  5349. */
  5350. function cloneArrayBuffer(arrayBuffer) {
  5351. var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
  5352. new Uint8Array(result).set(new Uint8Array(arrayBuffer));
  5353. return result;
  5354. }
  5355. /**
  5356. * Creates a clone of `dataView`.
  5357. *
  5358. * @private
  5359. * @param {Object} dataView The data view to clone.
  5360. * @param {boolean} [isDeep] Specify a deep clone.
  5361. * @returns {Object} Returns the cloned data view.
  5362. */
  5363. function cloneDataView(dataView, isDeep) {
  5364. var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
  5365. return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
  5366. }
  5367. /**
  5368. * Creates a clone of `regexp`.
  5369. *
  5370. * @private
  5371. * @param {Object} regexp The regexp to clone.
  5372. * @returns {Object} Returns the cloned regexp.
  5373. */
  5374. function cloneRegExp(regexp) {
  5375. var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
  5376. result.lastIndex = regexp.lastIndex;
  5377. return result;
  5378. }
  5379. /**
  5380. * Creates a clone of the `symbol` object.
  5381. *
  5382. * @private
  5383. * @param {Object} symbol The symbol object to clone.
  5384. * @returns {Object} Returns the cloned symbol object.
  5385. */
  5386. function cloneSymbol(symbol) {
  5387. return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
  5388. }
  5389. /**
  5390. * Creates a clone of `typedArray`.
  5391. *
  5392. * @private
  5393. * @param {Object} typedArray The typed array to clone.
  5394. * @param {boolean} [isDeep] Specify a deep clone.
  5395. * @returns {Object} Returns the cloned typed array.
  5396. */
  5397. function cloneTypedArray(typedArray, isDeep) {
  5398. var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
  5399. return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
  5400. }
  5401. /**
  5402. * Compares values to sort them in ascending order.
  5403. *
  5404. * @private
  5405. * @param {*} value The value to compare.
  5406. * @param {*} other The other value to compare.
  5407. * @returns {number} Returns the sort order indicator for `value`.
  5408. */
  5409. function compareAscending(value, other) {
  5410. if (value !== other) {
  5411. var valIsDefined = value !== undefined,
  5412. valIsNull = value === null,
  5413. valIsReflexive = value === value,
  5414. valIsSymbol = isSymbol(value);
  5415. var othIsDefined = other !== undefined,
  5416. othIsNull = other === null,
  5417. othIsReflexive = other === other,
  5418. othIsSymbol = isSymbol(other);
  5419. if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||
  5420. (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||
  5421. (valIsNull && othIsDefined && othIsReflexive) ||
  5422. (!valIsDefined && othIsReflexive) ||
  5423. !valIsReflexive) {
  5424. return 1;
  5425. }
  5426. if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||
  5427. (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||
  5428. (othIsNull && valIsDefined && valIsReflexive) ||
  5429. (!othIsDefined && valIsReflexive) ||
  5430. !othIsReflexive) {
  5431. return -1;
  5432. }
  5433. }
  5434. return 0;
  5435. }
  5436. /**
  5437. * Used by `_.orderBy` to compare multiple properties of a value to another
  5438. * and stable sort them.
  5439. *
  5440. * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,
  5441. * specify an order of "desc" for descending or "asc" for ascending sort order
  5442. * of corresponding values.
  5443. *
  5444. * @private
  5445. * @param {Object} object The object to compare.
  5446. * @param {Object} other The other object to compare.
  5447. * @param {boolean[]|string[]} orders The order to sort by for each property.
  5448. * @returns {number} Returns the sort order indicator for `object`.
  5449. */
  5450. function compareMultiple(object, other, orders) {
  5451. var index = -1,
  5452. objCriteria = object.criteria,
  5453. othCriteria = other.criteria,
  5454. length = objCriteria.length,
  5455. ordersLength = orders.length;
  5456. while (++index < length) {
  5457. var result = compareAscending(objCriteria[index], othCriteria[index]);
  5458. if (result) {
  5459. if (index >= ordersLength) {
  5460. return result;
  5461. }
  5462. var order = orders[index];
  5463. return result * (order == 'desc' ? -1 : 1);
  5464. }
  5465. }
  5466. // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
  5467. // that causes it, under certain circumstances, to provide the same value for
  5468. // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247
  5469. // for more details.
  5470. //
  5471. // This also ensures a stable sort in V8 and other engines.
  5472. // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.
  5473. return object.index - other.index;
  5474. }
  5475. /**
  5476. * Creates an array that is the composition of partially applied arguments,
  5477. * placeholders, and provided arguments into a single array of arguments.
  5478. *
  5479. * @private
  5480. * @param {Array} args The provided arguments.
  5481. * @param {Array} partials The arguments to prepend to those provided.
  5482. * @param {Array} holders The `partials` placeholder indexes.
  5483. * @params {boolean} [isCurried] Specify composing for a curried function.
  5484. * @returns {Array} Returns the new array of composed arguments.
  5485. */
  5486. function composeArgs(args, partials, holders, isCurried) {
  5487. var argsIndex = -1,
  5488. argsLength = args.length,
  5489. holdersLength = holders.length,
  5490. leftIndex = -1,
  5491. leftLength = partials.length,
  5492. rangeLength = nativeMax(argsLength - holdersLength, 0),
  5493. result = Array(leftLength + rangeLength),
  5494. isUncurried = !isCurried;
  5495. while (++leftIndex < leftLength) {
  5496. result[leftIndex] = partials[leftIndex];
  5497. }
  5498. while (++argsIndex < holdersLength) {
  5499. if (isUncurried || argsIndex < argsLength) {
  5500. result[holders[argsIndex]] = args[argsIndex];
  5501. }
  5502. }
  5503. while (rangeLength--) {
  5504. result[leftIndex++] = args[argsIndex++];
  5505. }
  5506. return result;
  5507. }
  5508. /**
  5509. * This function is like `composeArgs` except that the arguments composition
  5510. * is tailored for `_.partialRight`.
  5511. *
  5512. * @private
  5513. * @param {Array} args The provided arguments.
  5514. * @param {Array} partials The arguments to append to those provided.
  5515. * @param {Array} holders The `partials` placeholder indexes.
  5516. * @params {boolean} [isCurried] Specify composing for a curried function.
  5517. * @returns {Array} Returns the new array of composed arguments.
  5518. */
  5519. function composeArgsRight(args, partials, holders, isCurried) {
  5520. var argsIndex = -1,
  5521. argsLength = args.length,
  5522. holdersIndex = -1,
  5523. holdersLength = holders.length,
  5524. rightIndex = -1,
  5525. rightLength = partials.length,
  5526. rangeLength = nativeMax(argsLength - holdersLength, 0),
  5527. result = Array(rangeLength + rightLength),
  5528. isUncurried = !isCurried;
  5529. while (++argsIndex < rangeLength) {
  5530. result[argsIndex] = args[argsIndex];
  5531. }
  5532. var offset = argsIndex;
  5533. while (++rightIndex < rightLength) {
  5534. result[offset + rightIndex] = partials[rightIndex];
  5535. }
  5536. while (++holdersIndex < holdersLength) {
  5537. if (isUncurried || argsIndex < argsLength) {
  5538. result[offset + holders[holdersIndex]] = args[argsIndex++];
  5539. }
  5540. }
  5541. return result;
  5542. }
  5543. /**
  5544. * Copies the values of `source` to `array`.
  5545. *
  5546. * @private
  5547. * @param {Array} source The array to copy values from.
  5548. * @param {Array} [array=[]] The array to copy values to.
  5549. * @returns {Array} Returns `array`.
  5550. */
  5551. function copyArray(source, array) {
  5552. var index = -1,
  5553. length = source.length;
  5554. array || (array = Array(length));
  5555. while (++index < length) {
  5556. array[index] = source[index];
  5557. }
  5558. return array;
  5559. }
  5560. /**
  5561. * Copies properties of `source` to `object`.
  5562. *
  5563. * @private
  5564. * @param {Object} source The object to copy properties from.
  5565. * @param {Array} props The property identifiers to copy.
  5566. * @param {Object} [object={}] The object to copy properties to.
  5567. * @param {Function} [customizer] The function to customize copied values.
  5568. * @returns {Object} Returns `object`.
  5569. */
  5570. function copyObject(source, props, object, customizer) {
  5571. var isNew = !object;
  5572. object || (object = {});
  5573. var index = -1,
  5574. length = props.length;
  5575. while (++index < length) {
  5576. var key = props[index];
  5577. var newValue = customizer
  5578. ? customizer(object[key], source[key], key, object, source)
  5579. : undefined;
  5580. if (newValue === undefined) {
  5581. newValue = source[key];
  5582. }
  5583. if (isNew) {
  5584. baseAssignValue(object, key, newValue);
  5585. } else {
  5586. assignValue(object, key, newValue);
  5587. }
  5588. }
  5589. return object;
  5590. }
  5591. /**
  5592. * Copies own symbols of `source` to `object`.
  5593. *
  5594. * @private
  5595. * @param {Object} source The object to copy symbols from.
  5596. * @param {Object} [object={}] The object to copy symbols to.
  5597. * @returns {Object} Returns `object`.
  5598. */
  5599. function copySymbols(source, object) {
  5600. return copyObject(source, getSymbols(source), object);
  5601. }
  5602. /**
  5603. * Copies own and inherited symbols of `source` to `object`.
  5604. *
  5605. * @private
  5606. * @param {Object} source The object to copy symbols from.
  5607. * @param {Object} [object={}] The object to copy symbols to.
  5608. * @returns {Object} Returns `object`.
  5609. */
  5610. function copySymbolsIn(source, object) {
  5611. return copyObject(source, getSymbolsIn(source), object);
  5612. }
  5613. /**
  5614. * Creates a function like `_.groupBy`.
  5615. *
  5616. * @private
  5617. * @param {Function} setter The function to set accumulator values.
  5618. * @param {Function} [initializer] The accumulator object initializer.
  5619. * @returns {Function} Returns the new aggregator function.
  5620. */
  5621. function createAggregator(setter, initializer) {
  5622. return function(collection, iteratee) {
  5623. var func = isArray(collection) ? arrayAggregator : baseAggregator,
  5624. accumulator = initializer ? initializer() : {};
  5625. return func(collection, setter, getIteratee(iteratee, 2), accumulator);
  5626. };
  5627. }
  5628. /**
  5629. * Creates a function like `_.assign`.
  5630. *
  5631. * @private
  5632. * @param {Function} assigner The function to assign values.
  5633. * @returns {Function} Returns the new assigner function.
  5634. */
  5635. function createAssigner(assigner) {
  5636. return baseRest(function(object, sources) {
  5637. var index = -1,
  5638. length = sources.length,
  5639. customizer = length > 1 ? sources[length - 1] : undefined,
  5640. guard = length > 2 ? sources[2] : undefined;
  5641. customizer = (assigner.length > 3 && typeof customizer == 'function')
  5642. ? (length--, customizer)
  5643. : undefined;
  5644. if (guard && isIterateeCall(sources[0], sources[1], guard)) {
  5645. customizer = length < 3 ? undefined : customizer;
  5646. length = 1;
  5647. }
  5648. object = Object(object);
  5649. while (++index < length) {
  5650. var source = sources[index];
  5651. if (source) {
  5652. assigner(object, source, index, customizer);
  5653. }
  5654. }
  5655. return object;
  5656. });
  5657. }
  5658. /**
  5659. * Creates a `baseEach` or `baseEachRight` function.
  5660. *
  5661. * @private
  5662. * @param {Function} eachFunc The function to iterate over a collection.
  5663. * @param {boolean} [fromRight] Specify iterating from right to left.
  5664. * @returns {Function} Returns the new base function.
  5665. */
  5666. function createBaseEach(eachFunc, fromRight) {
  5667. return function(collection, iteratee) {
  5668. if (collection == null) {
  5669. return collection;
  5670. }
  5671. if (!isArrayLike(collection)) {
  5672. return eachFunc(collection, iteratee);
  5673. }
  5674. var length = collection.length,
  5675. index = fromRight ? length : -1,
  5676. iterable = Object(collection);
  5677. while ((fromRight ? index-- : ++index < length)) {
  5678. if (iteratee(iterable[index], index, iterable) === false) {
  5679. break;
  5680. }
  5681. }
  5682. return collection;
  5683. };
  5684. }
  5685. /**
  5686. * Creates a base function for methods like `_.forIn` and `_.forOwn`.
  5687. *
  5688. * @private
  5689. * @param {boolean} [fromRight] Specify iterating from right to left.
  5690. * @returns {Function} Returns the new base function.
  5691. */
  5692. function createBaseFor(fromRight) {
  5693. return function(object, iteratee, keysFunc) {
  5694. var index = -1,
  5695. iterable = Object(object),
  5696. props = keysFunc(object),
  5697. length = props.length;
  5698. while (length--) {
  5699. var key = props[fromRight ? length : ++index];
  5700. if (iteratee(iterable[key], key, iterable) === false) {
  5701. break;
  5702. }
  5703. }
  5704. return object;
  5705. };
  5706. }
  5707. /**
  5708. * Creates a function that wraps `func` to invoke it with the optional `this`
  5709. * binding of `thisArg`.
  5710. *
  5711. * @private
  5712. * @param {Function} func The function to wrap.
  5713. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  5714. * @param {*} [thisArg] The `this` binding of `func`.
  5715. * @returns {Function} Returns the new wrapped function.
  5716. */
  5717. function createBind(func, bitmask, thisArg) {
  5718. var isBind = bitmask & WRAP_BIND_FLAG,
  5719. Ctor = createCtor(func);
  5720. function wrapper() {
  5721. var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
  5722. return fn.apply(isBind ? thisArg : this, arguments);
  5723. }
  5724. return wrapper;
  5725. }
  5726. /**
  5727. * Creates a function like `_.lowerFirst`.
  5728. *
  5729. * @private
  5730. * @param {string} methodName The name of the `String` case method to use.
  5731. * @returns {Function} Returns the new case function.
  5732. */
  5733. function createCaseFirst(methodName) {
  5734. return function(string) {
  5735. string = toString(string);
  5736. var strSymbols = hasUnicode(string)
  5737. ? stringToArray(string)
  5738. : undefined;
  5739. var chr = strSymbols
  5740. ? strSymbols[0]
  5741. : string.charAt(0);
  5742. var trailing = strSymbols
  5743. ? castSlice(strSymbols, 1).join('')
  5744. : string.slice(1);
  5745. return chr[methodName]() + trailing;
  5746. };
  5747. }
  5748. /**
  5749. * Creates a function like `_.camelCase`.
  5750. *
  5751. * @private
  5752. * @param {Function} callback The function to combine each word.
  5753. * @returns {Function} Returns the new compounder function.
  5754. */
  5755. function createCompounder(callback) {
  5756. return function(string) {
  5757. return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');
  5758. };
  5759. }
  5760. /**
  5761. * Creates a function that produces an instance of `Ctor` regardless of
  5762. * whether it was invoked as part of a `new` expression or by `call` or `apply`.
  5763. *
  5764. * @private
  5765. * @param {Function} Ctor The constructor to wrap.
  5766. * @returns {Function} Returns the new wrapped function.
  5767. */
  5768. function createCtor(Ctor) {
  5769. return function() {
  5770. // Use a `switch` statement to work with class constructors. See
  5771. // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist
  5772. // for more details.
  5773. var args = arguments;
  5774. switch (args.length) {
  5775. case 0: return new Ctor;
  5776. case 1: return new Ctor(args[0]);
  5777. case 2: return new Ctor(args[0], args[1]);
  5778. case 3: return new Ctor(args[0], args[1], args[2]);
  5779. case 4: return new Ctor(args[0], args[1], args[2], args[3]);
  5780. case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);
  5781. case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
  5782. case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
  5783. }
  5784. var thisBinding = baseCreate(Ctor.prototype),
  5785. result = Ctor.apply(thisBinding, args);
  5786. // Mimic the constructor's `return` behavior.
  5787. // See https://es5.github.io/#x13.2.2 for more details.
  5788. return isObject(result) ? result : thisBinding;
  5789. };
  5790. }
  5791. /**
  5792. * Creates a function that wraps `func` to enable currying.
  5793. *
  5794. * @private
  5795. * @param {Function} func The function to wrap.
  5796. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  5797. * @param {number} arity The arity of `func`.
  5798. * @returns {Function} Returns the new wrapped function.
  5799. */
  5800. function createCurry(func, bitmask, arity) {
  5801. var Ctor = createCtor(func);
  5802. function wrapper() {
  5803. var length = arguments.length,
  5804. args = Array(length),
  5805. index = length,
  5806. placeholder = getHolder(wrapper);
  5807. while (index--) {
  5808. args[index] = arguments[index];
  5809. }
  5810. var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)
  5811. ? []
  5812. : replaceHolders(args, placeholder);
  5813. length -= holders.length;
  5814. if (length < arity) {
  5815. return createRecurry(
  5816. func, bitmask, createHybrid, wrapper.placeholder, undefined,
  5817. args, holders, undefined, undefined, arity - length);
  5818. }
  5819. var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
  5820. return apply(fn, this, args);
  5821. }
  5822. return wrapper;
  5823. }
  5824. /**
  5825. * Creates a `_.find` or `_.findLast` function.
  5826. *
  5827. * @private
  5828. * @param {Function} findIndexFunc The function to find the collection index.
  5829. * @returns {Function} Returns the new find function.
  5830. */
  5831. function createFind(findIndexFunc) {
  5832. return function(collection, predicate, fromIndex) {
  5833. var iterable = Object(collection);
  5834. if (!isArrayLike(collection)) {
  5835. var iteratee = getIteratee(predicate, 3);
  5836. collection = keys(collection);
  5837. predicate = function(key) { return iteratee(iterable[key], key, iterable); };
  5838. }
  5839. var index = findIndexFunc(collection, predicate, fromIndex);
  5840. return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;
  5841. };
  5842. }
  5843. /**
  5844. * Creates a `_.flow` or `_.flowRight` function.
  5845. *
  5846. * @private
  5847. * @param {boolean} [fromRight] Specify iterating from right to left.
  5848. * @returns {Function} Returns the new flow function.
  5849. */
  5850. function createFlow(fromRight) {
  5851. return flatRest(function(funcs) {
  5852. var length = funcs.length,
  5853. index = length,
  5854. prereq = LodashWrapper.prototype.thru;
  5855. if (fromRight) {
  5856. funcs.reverse();
  5857. }
  5858. while (index--) {
  5859. var func = funcs[index];
  5860. if (typeof func != 'function') {
  5861. throw new TypeError(FUNC_ERROR_TEXT);
  5862. }
  5863. if (prereq && !wrapper && getFuncName(func) == 'wrapper') {
  5864. var wrapper = new LodashWrapper([], true);
  5865. }
  5866. }
  5867. index = wrapper ? index : length;
  5868. while (++index < length) {
  5869. func = funcs[index];
  5870. var funcName = getFuncName(func),
  5871. data = funcName == 'wrapper' ? getData(func) : undefined;
  5872. if (data && isLaziable(data[0]) &&
  5873. data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&
  5874. !data[4].length && data[9] == 1
  5875. ) {
  5876. wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
  5877. } else {
  5878. wrapper = (func.length == 1 && isLaziable(func))
  5879. ? wrapper[funcName]()
  5880. : wrapper.thru(func);
  5881. }
  5882. }
  5883. return function() {
  5884. var args = arguments,
  5885. value = args[0];
  5886. if (wrapper && args.length == 1 && isArray(value)) {
  5887. return wrapper.plant(value).value();
  5888. }
  5889. var index = 0,
  5890. result = length ? funcs[index].apply(this, args) : value;
  5891. while (++index < length) {
  5892. result = funcs[index].call(this, result);
  5893. }
  5894. return result;
  5895. };
  5896. });
  5897. }
  5898. /**
  5899. * Creates a function that wraps `func` to invoke it with optional `this`
  5900. * binding of `thisArg`, partial application, and currying.
  5901. *
  5902. * @private
  5903. * @param {Function|string} func The function or method name to wrap.
  5904. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  5905. * @param {*} [thisArg] The `this` binding of `func`.
  5906. * @param {Array} [partials] The arguments to prepend to those provided to
  5907. * the new function.
  5908. * @param {Array} [holders] The `partials` placeholder indexes.
  5909. * @param {Array} [partialsRight] The arguments to append to those provided
  5910. * to the new function.
  5911. * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.
  5912. * @param {Array} [argPos] The argument positions of the new function.
  5913. * @param {number} [ary] The arity cap of `func`.
  5914. * @param {number} [arity] The arity of `func`.
  5915. * @returns {Function} Returns the new wrapped function.
  5916. */
  5917. function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {
  5918. var isAry = bitmask & WRAP_ARY_FLAG,
  5919. isBind = bitmask & WRAP_BIND_FLAG,
  5920. isBindKey = bitmask & WRAP_BIND_KEY_FLAG,
  5921. isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),
  5922. isFlip = bitmask & WRAP_FLIP_FLAG,
  5923. Ctor = isBindKey ? undefined : createCtor(func);
  5924. function wrapper() {
  5925. var length = arguments.length,
  5926. args = Array(length),
  5927. index = length;
  5928. while (index--) {
  5929. args[index] = arguments[index];
  5930. }
  5931. if (isCurried) {
  5932. var placeholder = getHolder(wrapper),
  5933. holdersCount = countHolders(args, placeholder);
  5934. }
  5935. if (partials) {
  5936. args = composeArgs(args, partials, holders, isCurried);
  5937. }
  5938. if (partialsRight) {
  5939. args = composeArgsRight(args, partialsRight, holdersRight, isCurried);
  5940. }
  5941. length -= holdersCount;
  5942. if (isCurried && length < arity) {
  5943. var newHolders = replaceHolders(args, placeholder);
  5944. return createRecurry(
  5945. func, bitmask, createHybrid, wrapper.placeholder, thisArg,
  5946. args, newHolders, argPos, ary, arity - length
  5947. );
  5948. }
  5949. var thisBinding = isBind ? thisArg : this,
  5950. fn = isBindKey ? thisBinding[func] : func;
  5951. length = args.length;
  5952. if (argPos) {
  5953. args = reorder(args, argPos);
  5954. } else if (isFlip && length > 1) {
  5955. args.reverse();
  5956. }
  5957. if (isAry && ary < length) {
  5958. args.length = ary;
  5959. }
  5960. if (this && this !== root && this instanceof wrapper) {
  5961. fn = Ctor || createCtor(fn);
  5962. }
  5963. return fn.apply(thisBinding, args);
  5964. }
  5965. return wrapper;
  5966. }
  5967. /**
  5968. * Creates a function like `_.invertBy`.
  5969. *
  5970. * @private
  5971. * @param {Function} setter The function to set accumulator values.
  5972. * @param {Function} toIteratee The function to resolve iteratees.
  5973. * @returns {Function} Returns the new inverter function.
  5974. */
  5975. function createInverter(setter, toIteratee) {
  5976. return function(object, iteratee) {
  5977. return baseInverter(object, setter, toIteratee(iteratee), {});
  5978. };
  5979. }
  5980. /**
  5981. * Creates a function that performs a mathematical operation on two values.
  5982. *
  5983. * @private
  5984. * @param {Function} operator The function to perform the operation.
  5985. * @param {number} [defaultValue] The value used for `undefined` arguments.
  5986. * @returns {Function} Returns the new mathematical operation function.
  5987. */
  5988. function createMathOperation(operator, defaultValue) {
  5989. return function(value, other) {
  5990. var result;
  5991. if (value === undefined && other === undefined) {
  5992. return defaultValue;
  5993. }
  5994. if (value !== undefined) {
  5995. result = value;
  5996. }
  5997. if (other !== undefined) {
  5998. if (result === undefined) {
  5999. return other;
  6000. }
  6001. if (typeof value == 'string' || typeof other == 'string') {
  6002. value = baseToString(value);
  6003. other = baseToString(other);
  6004. } else {
  6005. value = baseToNumber(value);
  6006. other = baseToNumber(other);
  6007. }
  6008. result = operator(value, other);
  6009. }
  6010. return result;
  6011. };
  6012. }
  6013. /**
  6014. * Creates a function like `_.over`.
  6015. *
  6016. * @private
  6017. * @param {Function} arrayFunc The function to iterate over iteratees.
  6018. * @returns {Function} Returns the new over function.
  6019. */
  6020. function createOver(arrayFunc) {
  6021. return flatRest(function(iteratees) {
  6022. iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
  6023. return baseRest(function(args) {
  6024. var thisArg = this;
  6025. return arrayFunc(iteratees, function(iteratee) {
  6026. return apply(iteratee, thisArg, args);
  6027. });
  6028. });
  6029. });
  6030. }
  6031. /**
  6032. * Creates the padding for `string` based on `length`. The `chars` string
  6033. * is truncated if the number of characters exceeds `length`.
  6034. *
  6035. * @private
  6036. * @param {number} length The padding length.
  6037. * @param {string} [chars=' '] The string used as padding.
  6038. * @returns {string} Returns the padding for `string`.
  6039. */
  6040. function createPadding(length, chars) {
  6041. chars = chars === undefined ? ' ' : baseToString(chars);
  6042. var charsLength = chars.length;
  6043. if (charsLength < 2) {
  6044. return charsLength ? baseRepeat(chars, length) : chars;
  6045. }
  6046. var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));
  6047. return hasUnicode(chars)
  6048. ? castSlice(stringToArray(result), 0, length).join('')
  6049. : result.slice(0, length);
  6050. }
  6051. /**
  6052. * Creates a function that wraps `func` to invoke it with the `this` binding
  6053. * of `thisArg` and `partials` prepended to the arguments it receives.
  6054. *
  6055. * @private
  6056. * @param {Function} func The function to wrap.
  6057. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  6058. * @param {*} thisArg The `this` binding of `func`.
  6059. * @param {Array} partials The arguments to prepend to those provided to
  6060. * the new function.
  6061. * @returns {Function} Returns the new wrapped function.
  6062. */
  6063. function createPartial(func, bitmask, thisArg, partials) {
  6064. var isBind = bitmask & WRAP_BIND_FLAG,
  6065. Ctor = createCtor(func);
  6066. function wrapper() {
  6067. var argsIndex = -1,
  6068. argsLength = arguments.length,
  6069. leftIndex = -1,
  6070. leftLength = partials.length,
  6071. args = Array(leftLength + argsLength),
  6072. fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
  6073. while (++leftIndex < leftLength) {
  6074. args[leftIndex] = partials[leftIndex];
  6075. }
  6076. while (argsLength--) {
  6077. args[leftIndex++] = arguments[++argsIndex];
  6078. }
  6079. return apply(fn, isBind ? thisArg : this, args);
  6080. }
  6081. return wrapper;
  6082. }
  6083. /**
  6084. * Creates a `_.range` or `_.rangeRight` function.
  6085. *
  6086. * @private
  6087. * @param {boolean} [fromRight] Specify iterating from right to left.
  6088. * @returns {Function} Returns the new range function.
  6089. */
  6090. function createRange(fromRight) {
  6091. return function(start, end, step) {
  6092. if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {
  6093. end = step = undefined;
  6094. }
  6095. // Ensure the sign of `-0` is preserved.
  6096. start = toFinite(start);
  6097. if (end === undefined) {
  6098. end = start;
  6099. start = 0;
  6100. } else {
  6101. end = toFinite(end);
  6102. }
  6103. step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);
  6104. return baseRange(start, end, step, fromRight);
  6105. };
  6106. }
  6107. /**
  6108. * Creates a function that performs a relational operation on two values.
  6109. *
  6110. * @private
  6111. * @param {Function} operator The function to perform the operation.
  6112. * @returns {Function} Returns the new relational operation function.
  6113. */
  6114. function createRelationalOperation(operator) {
  6115. return function(value, other) {
  6116. if (!(typeof value == 'string' && typeof other == 'string')) {
  6117. value = toNumber(value);
  6118. other = toNumber(other);
  6119. }
  6120. return operator(value, other);
  6121. };
  6122. }
  6123. /**
  6124. * Creates a function that wraps `func` to continue currying.
  6125. *
  6126. * @private
  6127. * @param {Function} func The function to wrap.
  6128. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  6129. * @param {Function} wrapFunc The function to create the `func` wrapper.
  6130. * @param {*} placeholder The placeholder value.
  6131. * @param {*} [thisArg] The `this` binding of `func`.
  6132. * @param {Array} [partials] The arguments to prepend to those provided to
  6133. * the new function.
  6134. * @param {Array} [holders] The `partials` placeholder indexes.
  6135. * @param {Array} [argPos] The argument positions of the new function.
  6136. * @param {number} [ary] The arity cap of `func`.
  6137. * @param {number} [arity] The arity of `func`.
  6138. * @returns {Function} Returns the new wrapped function.
  6139. */
  6140. function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {
  6141. var isCurry = bitmask & WRAP_CURRY_FLAG,
  6142. newHolders = isCurry ? holders : undefined,
  6143. newHoldersRight = isCurry ? undefined : holders,
  6144. newPartials = isCurry ? partials : undefined,
  6145. newPartialsRight = isCurry ? undefined : partials;
  6146. bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);
  6147. bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);
  6148. if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {
  6149. bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);
  6150. }
  6151. var newData = [
  6152. func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,
  6153. newHoldersRight, argPos, ary, arity
  6154. ];
  6155. var result = wrapFunc.apply(undefined, newData);
  6156. if (isLaziable(func)) {
  6157. setData(result, newData);
  6158. }
  6159. result.placeholder = placeholder;
  6160. return setWrapToString(result, func, bitmask);
  6161. }
  6162. /**
  6163. * Creates a function like `_.round`.
  6164. *
  6165. * @private
  6166. * @param {string} methodName The name of the `Math` method to use when rounding.
  6167. * @returns {Function} Returns the new round function.
  6168. */
  6169. function createRound(methodName) {
  6170. var func = Math[methodName];
  6171. return function(number, precision) {
  6172. number = toNumber(number);
  6173. precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
  6174. if (precision && nativeIsFinite(number)) {
  6175. // Shift with exponential notation to avoid floating-point issues.
  6176. // See [MDN](https://mdn.io/round#Examples) for more details.
  6177. var pair = (toString(number) + 'e').split('e'),
  6178. value = func(pair[0] + 'e' + (+pair[1] + precision));
  6179. pair = (toString(value) + 'e').split('e');
  6180. return +(pair[0] + 'e' + (+pair[1] - precision));
  6181. }
  6182. return func(number);
  6183. };
  6184. }
  6185. /**
  6186. * Creates a set object of `values`.
  6187. *
  6188. * @private
  6189. * @param {Array} values The values to add to the set.
  6190. * @returns {Object} Returns the new set.
  6191. */
  6192. var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {
  6193. return new Set(values);
  6194. };
  6195. /**
  6196. * Creates a `_.toPairs` or `_.toPairsIn` function.
  6197. *
  6198. * @private
  6199. * @param {Function} keysFunc The function to get the keys of a given object.
  6200. * @returns {Function} Returns the new pairs function.
  6201. */
  6202. function createToPairs(keysFunc) {
  6203. return function(object) {
  6204. var tag = getTag(object);
  6205. if (tag == mapTag) {
  6206. return mapToArray(object);
  6207. }
  6208. if (tag == setTag) {
  6209. return setToPairs(object);
  6210. }
  6211. return baseToPairs(object, keysFunc(object));
  6212. };
  6213. }
  6214. /**
  6215. * Creates a function that either curries or invokes `func` with optional
  6216. * `this` binding and partially applied arguments.
  6217. *
  6218. * @private
  6219. * @param {Function|string} func The function or method name to wrap.
  6220. * @param {number} bitmask The bitmask flags.
  6221. * 1 - `_.bind`
  6222. * 2 - `_.bindKey`
  6223. * 4 - `_.curry` or `_.curryRight` of a bound function
  6224. * 8 - `_.curry`
  6225. * 16 - `_.curryRight`
  6226. * 32 - `_.partial`
  6227. * 64 - `_.partialRight`
  6228. * 128 - `_.rearg`
  6229. * 256 - `_.ary`
  6230. * 512 - `_.flip`
  6231. * @param {*} [thisArg] The `this` binding of `func`.
  6232. * @param {Array} [partials] The arguments to be partially applied.
  6233. * @param {Array} [holders] The `partials` placeholder indexes.
  6234. * @param {Array} [argPos] The argument positions of the new function.
  6235. * @param {number} [ary] The arity cap of `func`.
  6236. * @param {number} [arity] The arity of `func`.
  6237. * @returns {Function} Returns the new wrapped function.
  6238. */
  6239. function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {
  6240. var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;
  6241. if (!isBindKey && typeof func != 'function') {
  6242. throw new TypeError(FUNC_ERROR_TEXT);
  6243. }
  6244. var length = partials ? partials.length : 0;
  6245. if (!length) {
  6246. bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);
  6247. partials = holders = undefined;
  6248. }
  6249. ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);
  6250. arity = arity === undefined ? arity : toInteger(arity);
  6251. length -= holders ? holders.length : 0;
  6252. if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {
  6253. var partialsRight = partials,
  6254. holdersRight = holders;
  6255. partials = holders = undefined;
  6256. }
  6257. var data = isBindKey ? undefined : getData(func);
  6258. var newData = [
  6259. func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,
  6260. argPos, ary, arity
  6261. ];
  6262. if (data) {
  6263. mergeData(newData, data);
  6264. }
  6265. func = newData[0];
  6266. bitmask = newData[1];
  6267. thisArg = newData[2];
  6268. partials = newData[3];
  6269. holders = newData[4];
  6270. arity = newData[9] = newData[9] === undefined
  6271. ? (isBindKey ? 0 : func.length)
  6272. : nativeMax(newData[9] - length, 0);
  6273. if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {
  6274. bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);
  6275. }
  6276. if (!bitmask || bitmask == WRAP_BIND_FLAG) {
  6277. var result = createBind(func, bitmask, thisArg);
  6278. } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {
  6279. result = createCurry(func, bitmask, arity);
  6280. } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {
  6281. result = createPartial(func, bitmask, thisArg, partials);
  6282. } else {
  6283. result = createHybrid.apply(undefined, newData);
  6284. }
  6285. var setter = data ? baseSetData : setData;
  6286. return setWrapToString(setter(result, newData), func, bitmask);
  6287. }
  6288. /**
  6289. * Used by `_.defaults` to customize its `_.assignIn` use to assign properties
  6290. * of source objects to the destination object for all destination properties
  6291. * that resolve to `undefined`.
  6292. *
  6293. * @private
  6294. * @param {*} objValue The destination value.
  6295. * @param {*} srcValue The source value.
  6296. * @param {string} key The key of the property to assign.
  6297. * @param {Object} object The parent object of `objValue`.
  6298. * @returns {*} Returns the value to assign.
  6299. */
  6300. function customDefaultsAssignIn(objValue, srcValue, key, object) {
  6301. if (objValue === undefined ||
  6302. (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {
  6303. return srcValue;
  6304. }
  6305. return objValue;
  6306. }
  6307. /**
  6308. * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source
  6309. * objects into destination objects that are passed thru.
  6310. *
  6311. * @private
  6312. * @param {*} objValue The destination value.
  6313. * @param {*} srcValue The source value.
  6314. * @param {string} key The key of the property to merge.
  6315. * @param {Object} object The parent object of `objValue`.
  6316. * @param {Object} source The parent object of `srcValue`.
  6317. * @param {Object} [stack] Tracks traversed source values and their merged
  6318. * counterparts.
  6319. * @returns {*} Returns the value to assign.
  6320. */
  6321. function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {
  6322. if (isObject(objValue) && isObject(srcValue)) {
  6323. // Recursively merge objects and arrays (susceptible to call stack limits).
  6324. stack.set(srcValue, objValue);
  6325. baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);
  6326. stack['delete'](srcValue);
  6327. }
  6328. return objValue;
  6329. }
  6330. /**
  6331. * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain
  6332. * objects.
  6333. *
  6334. * @private
  6335. * @param {*} value The value to inspect.
  6336. * @param {string} key The key of the property to inspect.
  6337. * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.
  6338. */
  6339. function customOmitClone(value) {
  6340. return isPlainObject(value) ? undefined : value;
  6341. }
  6342. /**
  6343. * A specialized version of `baseIsEqualDeep` for arrays with support for
  6344. * partial deep comparisons.
  6345. *
  6346. * @private
  6347. * @param {Array} array The array to compare.
  6348. * @param {Array} other The other array to compare.
  6349. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  6350. * @param {Function} customizer The function to customize comparisons.
  6351. * @param {Function} equalFunc The function to determine equivalents of values.
  6352. * @param {Object} stack Tracks traversed `array` and `other` objects.
  6353. * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
  6354. */
  6355. function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
  6356. var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
  6357. arrLength = array.length,
  6358. othLength = other.length;
  6359. if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
  6360. return false;
  6361. }
  6362. // Check that cyclic values are equal.
  6363. var arrStacked = stack.get(array);
  6364. var othStacked = stack.get(other);
  6365. if (arrStacked && othStacked) {
  6366. return arrStacked == other && othStacked == array;
  6367. }
  6368. var index = -1,
  6369. result = true,
  6370. seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;
  6371. stack.set(array, other);
  6372. stack.set(other, array);
  6373. // Ignore non-index properties.
  6374. while (++index < arrLength) {
  6375. var arrValue = array[index],
  6376. othValue = other[index];
  6377. if (customizer) {
  6378. var compared = isPartial
  6379. ? customizer(othValue, arrValue, index, other, array, stack)
  6380. : customizer(arrValue, othValue, index, array, other, stack);
  6381. }
  6382. if (compared !== undefined) {
  6383. if (compared) {
  6384. continue;
  6385. }
  6386. result = false;
  6387. break;
  6388. }
  6389. // Recursively compare arrays (susceptible to call stack limits).
  6390. if (seen) {
  6391. if (!arraySome(other, function(othValue, othIndex) {
  6392. if (!cacheHas(seen, othIndex) &&
  6393. (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
  6394. return seen.push(othIndex);
  6395. }
  6396. })) {
  6397. result = false;
  6398. break;
  6399. }
  6400. } else if (!(
  6401. arrValue === othValue ||
  6402. equalFunc(arrValue, othValue, bitmask, customizer, stack)
  6403. )) {
  6404. result = false;
  6405. break;
  6406. }
  6407. }
  6408. stack['delete'](array);
  6409. stack['delete'](other);
  6410. return result;
  6411. }
  6412. /**
  6413. * A specialized version of `baseIsEqualDeep` for comparing objects of
  6414. * the same `toStringTag`.
  6415. *
  6416. * **Note:** This function only supports comparing values with tags of
  6417. * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
  6418. *
  6419. * @private
  6420. * @param {Object} object The object to compare.
  6421. * @param {Object} other The other object to compare.
  6422. * @param {string} tag The `toStringTag` of the objects to compare.
  6423. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  6424. * @param {Function} customizer The function to customize comparisons.
  6425. * @param {Function} equalFunc The function to determine equivalents of values.
  6426. * @param {Object} stack Tracks traversed `object` and `other` objects.
  6427. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  6428. */
  6429. function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
  6430. switch (tag) {
  6431. case dataViewTag:
  6432. if ((object.byteLength != other.byteLength) ||
  6433. (object.byteOffset != other.byteOffset)) {
  6434. return false;
  6435. }
  6436. object = object.buffer;
  6437. other = other.buffer;
  6438. case arrayBufferTag:
  6439. if ((object.byteLength != other.byteLength) ||
  6440. !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
  6441. return false;
  6442. }
  6443. return true;
  6444. case boolTag:
  6445. case dateTag:
  6446. case numberTag:
  6447. // Coerce booleans to `1` or `0` and dates to milliseconds.
  6448. // Invalid dates are coerced to `NaN`.
  6449. return eq(+object, +other);
  6450. case errorTag:
  6451. return object.name == other.name && object.message == other.message;
  6452. case regexpTag:
  6453. case stringTag:
  6454. // Coerce regexes to strings and treat strings, primitives and objects,
  6455. // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
  6456. // for more details.
  6457. return object == (other + '');
  6458. case mapTag:
  6459. var convert = mapToArray;
  6460. case setTag:
  6461. var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
  6462. convert || (convert = setToArray);
  6463. if (object.size != other.size && !isPartial) {
  6464. return false;
  6465. }
  6466. // Assume cyclic values are equal.
  6467. var stacked = stack.get(object);
  6468. if (stacked) {
  6469. return stacked == other;
  6470. }
  6471. bitmask |= COMPARE_UNORDERED_FLAG;
  6472. // Recursively compare objects (susceptible to call stack limits).
  6473. stack.set(object, other);
  6474. var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
  6475. stack['delete'](object);
  6476. return result;
  6477. case symbolTag:
  6478. if (symbolValueOf) {
  6479. return symbolValueOf.call(object) == symbolValueOf.call(other);
  6480. }
  6481. }
  6482. return false;
  6483. }
  6484. /**
  6485. * A specialized version of `baseIsEqualDeep` for objects with support for
  6486. * partial deep comparisons.
  6487. *
  6488. * @private
  6489. * @param {Object} object The object to compare.
  6490. * @param {Object} other The other object to compare.
  6491. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  6492. * @param {Function} customizer The function to customize comparisons.
  6493. * @param {Function} equalFunc The function to determine equivalents of values.
  6494. * @param {Object} stack Tracks traversed `object` and `other` objects.
  6495. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  6496. */
  6497. function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
  6498. var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
  6499. objProps = getAllKeys(object),
  6500. objLength = objProps.length,
  6501. othProps = getAllKeys(other),
  6502. othLength = othProps.length;
  6503. if (objLength != othLength && !isPartial) {
  6504. return false;
  6505. }
  6506. var index = objLength;
  6507. while (index--) {
  6508. var key = objProps[index];
  6509. if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
  6510. return false;
  6511. }
  6512. }
  6513. // Check that cyclic values are equal.
  6514. var objStacked = stack.get(object);
  6515. var othStacked = stack.get(other);
  6516. if (objStacked && othStacked) {
  6517. return objStacked == other && othStacked == object;
  6518. }
  6519. var result = true;
  6520. stack.set(object, other);
  6521. stack.set(other, object);
  6522. var skipCtor = isPartial;
  6523. while (++index < objLength) {
  6524. key = objProps[index];
  6525. var objValue = object[key],
  6526. othValue = other[key];
  6527. if (customizer) {
  6528. var compared = isPartial
  6529. ? customizer(othValue, objValue, key, other, object, stack)
  6530. : customizer(objValue, othValue, key, object, other, stack);
  6531. }
  6532. // Recursively compare objects (susceptible to call stack limits).
  6533. if (!(compared === undefined
  6534. ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
  6535. : compared
  6536. )) {
  6537. result = false;
  6538. break;
  6539. }
  6540. skipCtor || (skipCtor = key == 'constructor');
  6541. }
  6542. if (result && !skipCtor) {
  6543. var objCtor = object.constructor,
  6544. othCtor = other.constructor;
  6545. // Non `Object` object instances with different constructors are not equal.
  6546. if (objCtor != othCtor &&
  6547. ('constructor' in object && 'constructor' in other) &&
  6548. !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
  6549. typeof othCtor == 'function' && othCtor instanceof othCtor)) {
  6550. result = false;
  6551. }
  6552. }
  6553. stack['delete'](object);
  6554. stack['delete'](other);
  6555. return result;
  6556. }
  6557. /**
  6558. * A specialized version of `baseRest` which flattens the rest array.
  6559. *
  6560. * @private
  6561. * @param {Function} func The function to apply a rest parameter to.
  6562. * @returns {Function} Returns the new function.
  6563. */
  6564. function flatRest(func) {
  6565. return setToString(overRest(func, undefined, flatten), func + '');
  6566. }
  6567. /**
  6568. * Creates an array of own enumerable property names and symbols of `object`.
  6569. *
  6570. * @private
  6571. * @param {Object} object The object to query.
  6572. * @returns {Array} Returns the array of property names and symbols.
  6573. */
  6574. function getAllKeys(object) {
  6575. return baseGetAllKeys(object, keys, getSymbols);
  6576. }
  6577. /**
  6578. * Creates an array of own and inherited enumerable property names and
  6579. * symbols of `object`.
  6580. *
  6581. * @private
  6582. * @param {Object} object The object to query.
  6583. * @returns {Array} Returns the array of property names and symbols.
  6584. */
  6585. function getAllKeysIn(object) {
  6586. return baseGetAllKeys(object, keysIn, getSymbolsIn);
  6587. }
  6588. /**
  6589. * Gets metadata for `func`.
  6590. *
  6591. * @private
  6592. * @param {Function} func The function to query.
  6593. * @returns {*} Returns the metadata for `func`.
  6594. */
  6595. var getData = !metaMap ? noop : function(func) {
  6596. return metaMap.get(func);
  6597. };
  6598. /**
  6599. * Gets the name of `func`.
  6600. *
  6601. * @private
  6602. * @param {Function} func The function to query.
  6603. * @returns {string} Returns the function name.
  6604. */
  6605. function getFuncName(func) {
  6606. var result = (func.name + ''),
  6607. array = realNames[result],
  6608. length = hasOwnProperty.call(realNames, result) ? array.length : 0;
  6609. while (length--) {
  6610. var data = array[length],
  6611. otherFunc = data.func;
  6612. if (otherFunc == null || otherFunc == func) {
  6613. return data.name;
  6614. }
  6615. }
  6616. return result;
  6617. }
  6618. /**
  6619. * Gets the argument placeholder value for `func`.
  6620. *
  6621. * @private
  6622. * @param {Function} func The function to inspect.
  6623. * @returns {*} Returns the placeholder value.
  6624. */
  6625. function getHolder(func) {
  6626. var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;
  6627. return object.placeholder;
  6628. }
  6629. /**
  6630. * Gets the appropriate "iteratee" function. If `_.iteratee` is customized,
  6631. * this function returns the custom method, otherwise it returns `baseIteratee`.
  6632. * If arguments are provided, the chosen function is invoked with them and
  6633. * its result is returned.
  6634. *
  6635. * @private
  6636. * @param {*} [value] The value to convert to an iteratee.
  6637. * @param {number} [arity] The arity of the created iteratee.
  6638. * @returns {Function} Returns the chosen function or its result.
  6639. */
  6640. function getIteratee() {
  6641. var result = lodash.iteratee || iteratee;
  6642. result = result === iteratee ? baseIteratee : result;
  6643. return arguments.length ? result(arguments[0], arguments[1]) : result;
  6644. }
  6645. /**
  6646. * Gets the data for `map`.
  6647. *
  6648. * @private
  6649. * @param {Object} map The map to query.
  6650. * @param {string} key The reference key.
  6651. * @returns {*} Returns the map data.
  6652. */
  6653. function getMapData(map, key) {
  6654. var data = map.__data__;
  6655. return isKeyable(key)
  6656. ? data[typeof key == 'string' ? 'string' : 'hash']
  6657. : data.map;
  6658. }
  6659. /**
  6660. * Gets the property names, values, and compare flags of `object`.
  6661. *
  6662. * @private
  6663. * @param {Object} object The object to query.
  6664. * @returns {Array} Returns the match data of `object`.
  6665. */
  6666. function getMatchData(object) {
  6667. var result = keys(object),
  6668. length = result.length;
  6669. while (length--) {
  6670. var key = result[length],
  6671. value = object[key];
  6672. result[length] = [key, value, isStrictComparable(value)];
  6673. }
  6674. return result;
  6675. }
  6676. /**
  6677. * Gets the native function at `key` of `object`.
  6678. *
  6679. * @private
  6680. * @param {Object} object The object to query.
  6681. * @param {string} key The key of the method to get.
  6682. * @returns {*} Returns the function if it's native, else `undefined`.
  6683. */
  6684. function getNative(object, key) {
  6685. var value = getValue(object, key);
  6686. return baseIsNative(value) ? value : undefined;
  6687. }
  6688. /**
  6689. * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
  6690. *
  6691. * @private
  6692. * @param {*} value The value to query.
  6693. * @returns {string} Returns the raw `toStringTag`.
  6694. */
  6695. function getRawTag(value) {
  6696. var isOwn = hasOwnProperty.call(value, symToStringTag),
  6697. tag = value[symToStringTag];
  6698. try {
  6699. value[symToStringTag] = undefined;
  6700. var unmasked = true;
  6701. } catch (e) {}
  6702. var result = nativeObjectToString.call(value);
  6703. if (unmasked) {
  6704. if (isOwn) {
  6705. value[symToStringTag] = tag;
  6706. } else {
  6707. delete value[symToStringTag];
  6708. }
  6709. }
  6710. return result;
  6711. }
  6712. /**
  6713. * Creates an array of the own enumerable symbols of `object`.
  6714. *
  6715. * @private
  6716. * @param {Object} object The object to query.
  6717. * @returns {Array} Returns the array of symbols.
  6718. */
  6719. var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
  6720. if (object == null) {
  6721. return [];
  6722. }
  6723. object = Object(object);
  6724. return arrayFilter(nativeGetSymbols(object), function(symbol) {
  6725. return propertyIsEnumerable.call(object, symbol);
  6726. });
  6727. };
  6728. /**
  6729. * Creates an array of the own and inherited enumerable symbols of `object`.
  6730. *
  6731. * @private
  6732. * @param {Object} object The object to query.
  6733. * @returns {Array} Returns the array of symbols.
  6734. */
  6735. var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
  6736. var result = [];
  6737. while (object) {
  6738. arrayPush(result, getSymbols(object));
  6739. object = getPrototype(object);
  6740. }
  6741. return result;
  6742. };
  6743. /**
  6744. * Gets the `toStringTag` of `value`.
  6745. *
  6746. * @private
  6747. * @param {*} value The value to query.
  6748. * @returns {string} Returns the `toStringTag`.
  6749. */
  6750. var getTag = baseGetTag;
  6751. // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
  6752. if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
  6753. (Map && getTag(new Map) != mapTag) ||
  6754. (Promise && getTag(Promise.resolve()) != promiseTag) ||
  6755. (Set && getTag(new Set) != setTag) ||
  6756. (WeakMap && getTag(new WeakMap) != weakMapTag)) {
  6757. getTag = function(value) {
  6758. var result = baseGetTag(value),
  6759. Ctor = result == objectTag ? value.constructor : undefined,
  6760. ctorString = Ctor ? toSource(Ctor) : '';
  6761. if (ctorString) {
  6762. switch (ctorString) {
  6763. case dataViewCtorString: return dataViewTag;
  6764. case mapCtorString: return mapTag;
  6765. case promiseCtorString: return promiseTag;
  6766. case setCtorString: return setTag;
  6767. case weakMapCtorString: return weakMapTag;
  6768. }
  6769. }
  6770. return result;
  6771. };
  6772. }
  6773. /**
  6774. * Gets the view, applying any `transforms` to the `start` and `end` positions.
  6775. *
  6776. * @private
  6777. * @param {number} start The start of the view.
  6778. * @param {number} end The end of the view.
  6779. * @param {Array} transforms The transformations to apply to the view.
  6780. * @returns {Object} Returns an object containing the `start` and `end`
  6781. * positions of the view.
  6782. */
  6783. function getView(start, end, transforms) {
  6784. var index = -1,
  6785. length = transforms.length;
  6786. while (++index < length) {
  6787. var data = transforms[index],
  6788. size = data.size;
  6789. switch (data.type) {
  6790. case 'drop': start += size; break;
  6791. case 'dropRight': end -= size; break;
  6792. case 'take': end = nativeMin(end, start + size); break;
  6793. case 'takeRight': start = nativeMax(start, end - size); break;
  6794. }
  6795. }
  6796. return { 'start': start, 'end': end };
  6797. }
  6798. /**
  6799. * Extracts wrapper details from the `source` body comment.
  6800. *
  6801. * @private
  6802. * @param {string} source The source to inspect.
  6803. * @returns {Array} Returns the wrapper details.
  6804. */
  6805. function getWrapDetails(source) {
  6806. var match = source.match(reWrapDetails);
  6807. return match ? match[1].split(reSplitDetails) : [];
  6808. }
  6809. /**
  6810. * Checks if `path` exists on `object`.
  6811. *
  6812. * @private
  6813. * @param {Object} object The object to query.
  6814. * @param {Array|string} path The path to check.
  6815. * @param {Function} hasFunc The function to check properties.
  6816. * @returns {boolean} Returns `true` if `path` exists, else `false`.
  6817. */
  6818. function hasPath(object, path, hasFunc) {
  6819. path = castPath(path, object);
  6820. var index = -1,
  6821. length = path.length,
  6822. result = false;
  6823. while (++index < length) {
  6824. var key = toKey(path[index]);
  6825. if (!(result = object != null && hasFunc(object, key))) {
  6826. break;
  6827. }
  6828. object = object[key];
  6829. }
  6830. if (result || ++index != length) {
  6831. return result;
  6832. }
  6833. length = object == null ? 0 : object.length;
  6834. return !!length && isLength(length) && isIndex(key, length) &&
  6835. (isArray(object) || isArguments(object));
  6836. }
  6837. /**
  6838. * Initializes an array clone.
  6839. *
  6840. * @private
  6841. * @param {Array} array The array to clone.
  6842. * @returns {Array} Returns the initialized clone.
  6843. */
  6844. function initCloneArray(array) {
  6845. var length = array.length,
  6846. result = new array.constructor(length);
  6847. // Add properties assigned by `RegExp#exec`.
  6848. if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
  6849. result.index = array.index;
  6850. result.input = array.input;
  6851. }
  6852. return result;
  6853. }
  6854. /**
  6855. * Initializes an object clone.
  6856. *
  6857. * @private
  6858. * @param {Object} object The object to clone.
  6859. * @returns {Object} Returns the initialized clone.
  6860. */
  6861. function initCloneObject(object) {
  6862. return (typeof object.constructor == 'function' && !isPrototype(object))
  6863. ? baseCreate(getPrototype(object))
  6864. : {};
  6865. }
  6866. /**
  6867. * Initializes an object clone based on its `toStringTag`.
  6868. *
  6869. * **Note:** This function only supports cloning values with tags of
  6870. * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
  6871. *
  6872. * @private
  6873. * @param {Object} object The object to clone.
  6874. * @param {string} tag The `toStringTag` of the object to clone.
  6875. * @param {boolean} [isDeep] Specify a deep clone.
  6876. * @returns {Object} Returns the initialized clone.
  6877. */
  6878. function initCloneByTag(object, tag, isDeep) {
  6879. var Ctor = object.constructor;
  6880. switch (tag) {
  6881. case arrayBufferTag:
  6882. return cloneArrayBuffer(object);
  6883. case boolTag:
  6884. case dateTag:
  6885. return new Ctor(+object);
  6886. case dataViewTag:
  6887. return cloneDataView(object, isDeep);
  6888. case float32Tag: case float64Tag:
  6889. case int8Tag: case int16Tag: case int32Tag:
  6890. case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
  6891. return cloneTypedArray(object, isDeep);
  6892. case mapTag:
  6893. return new Ctor;
  6894. case numberTag:
  6895. case stringTag:
  6896. return new Ctor(object);
  6897. case regexpTag:
  6898. return cloneRegExp(object);
  6899. case setTag:
  6900. return new Ctor;
  6901. case symbolTag:
  6902. return cloneSymbol(object);
  6903. }
  6904. }
  6905. /**
  6906. * Inserts wrapper `details` in a comment at the top of the `source` body.
  6907. *
  6908. * @private
  6909. * @param {string} source The source to modify.
  6910. * @returns {Array} details The details to insert.
  6911. * @returns {string} Returns the modified source.
  6912. */
  6913. function insertWrapDetails(source, details) {
  6914. var length = details.length;
  6915. if (!length) {
  6916. return source;
  6917. }
  6918. var lastIndex = length - 1;
  6919. details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];
  6920. details = details.join(length > 2 ? ', ' : ' ');
  6921. return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n');
  6922. }
  6923. /**
  6924. * Checks if `value` is a flattenable `arguments` object or array.
  6925. *
  6926. * @private
  6927. * @param {*} value The value to check.
  6928. * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
  6929. */
  6930. function isFlattenable(value) {
  6931. return isArray(value) || isArguments(value) ||
  6932. !!(spreadableSymbol && value && value[spreadableSymbol]);
  6933. }
  6934. /**
  6935. * Checks if `value` is a valid array-like index.
  6936. *
  6937. * @private
  6938. * @param {*} value The value to check.
  6939. * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
  6940. * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
  6941. */
  6942. function isIndex(value, length) {
  6943. var type = typeof value;
  6944. length = length == null ? MAX_SAFE_INTEGER : length;
  6945. return !!length &&
  6946. (type == 'number' ||
  6947. (type != 'symbol' && reIsUint.test(value))) &&
  6948. (value > -1 && value % 1 == 0 && value < length);
  6949. }
  6950. /**
  6951. * Checks if the given arguments are from an iteratee call.
  6952. *
  6953. * @private
  6954. * @param {*} value The potential iteratee value argument.
  6955. * @param {*} index The potential iteratee index or key argument.
  6956. * @param {*} object The potential iteratee object argument.
  6957. * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
  6958. * else `false`.
  6959. */
  6960. function isIterateeCall(value, index, object) {
  6961. if (!isObject(object)) {
  6962. return false;
  6963. }
  6964. var type = typeof index;
  6965. if (type == 'number'
  6966. ? (isArrayLike(object) && isIndex(index, object.length))
  6967. : (type == 'string' && index in object)
  6968. ) {
  6969. return eq(object[index], value);
  6970. }
  6971. return false;
  6972. }
  6973. /**
  6974. * Checks if `value` is a property name and not a property path.
  6975. *
  6976. * @private
  6977. * @param {*} value The value to check.
  6978. * @param {Object} [object] The object to query keys on.
  6979. * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
  6980. */
  6981. function isKey(value, object) {
  6982. if (isArray(value)) {
  6983. return false;
  6984. }
  6985. var type = typeof value;
  6986. if (type == 'number' || type == 'symbol' || type == 'boolean' ||
  6987. value == null || isSymbol(value)) {
  6988. return true;
  6989. }
  6990. return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
  6991. (object != null && value in Object(object));
  6992. }
  6993. /**
  6994. * Checks if `value` is suitable for use as unique object key.
  6995. *
  6996. * @private
  6997. * @param {*} value The value to check.
  6998. * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
  6999. */
  7000. function isKeyable(value) {
  7001. var type = typeof value;
  7002. return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
  7003. ? (value !== '__proto__')
  7004. : (value === null);
  7005. }
  7006. /**
  7007. * Checks if `func` has a lazy counterpart.
  7008. *
  7009. * @private
  7010. * @param {Function} func The function to check.
  7011. * @returns {boolean} Returns `true` if `func` has a lazy counterpart,
  7012. * else `false`.
  7013. */
  7014. function isLaziable(func) {
  7015. var funcName = getFuncName(func),
  7016. other = lodash[funcName];
  7017. if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {
  7018. return false;
  7019. }
  7020. if (func === other) {
  7021. return true;
  7022. }
  7023. var data = getData(other);
  7024. return !!data && func === data[0];
  7025. }
  7026. /**
  7027. * Checks if `func` has its source masked.
  7028. *
  7029. * @private
  7030. * @param {Function} func The function to check.
  7031. * @returns {boolean} Returns `true` if `func` is masked, else `false`.
  7032. */
  7033. function isMasked(func) {
  7034. return !!maskSrcKey && (maskSrcKey in func);
  7035. }
  7036. /**
  7037. * Checks if `func` is capable of being masked.
  7038. *
  7039. * @private
  7040. * @param {*} value The value to check.
  7041. * @returns {boolean} Returns `true` if `func` is maskable, else `false`.
  7042. */
  7043. var isMaskable = coreJsData ? isFunction : stubFalse;
  7044. /**
  7045. * Checks if `value` is likely a prototype object.
  7046. *
  7047. * @private
  7048. * @param {*} value The value to check.
  7049. * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
  7050. */
  7051. function isPrototype(value) {
  7052. var Ctor = value && value.constructor,
  7053. proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
  7054. return value === proto;
  7055. }
  7056. /**
  7057. * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
  7058. *
  7059. * @private
  7060. * @param {*} value The value to check.
  7061. * @returns {boolean} Returns `true` if `value` if suitable for strict
  7062. * equality comparisons, else `false`.
  7063. */
  7064. function isStrictComparable(value) {
  7065. return value === value && !isObject(value);
  7066. }
  7067. /**
  7068. * A specialized version of `matchesProperty` for source values suitable
  7069. * for strict equality comparisons, i.e. `===`.
  7070. *
  7071. * @private
  7072. * @param {string} key The key of the property to get.
  7073. * @param {*} srcValue The value to match.
  7074. * @returns {Function} Returns the new spec function.
  7075. */
  7076. function matchesStrictComparable(key, srcValue) {
  7077. return function(object) {
  7078. if (object == null) {
  7079. return false;
  7080. }
  7081. return object[key] === srcValue &&
  7082. (srcValue !== undefined || (key in Object(object)));
  7083. };
  7084. }
  7085. /**
  7086. * A specialized version of `_.memoize` which clears the memoized function's
  7087. * cache when it exceeds `MAX_MEMOIZE_SIZE`.
  7088. *
  7089. * @private
  7090. * @param {Function} func The function to have its output memoized.
  7091. * @returns {Function} Returns the new memoized function.
  7092. */
  7093. function memoizeCapped(func) {
  7094. var result = memoize(func, function(key) {
  7095. if (cache.size === MAX_MEMOIZE_SIZE) {
  7096. cache.clear();
  7097. }
  7098. return key;
  7099. });
  7100. var cache = result.cache;
  7101. return result;
  7102. }
  7103. /**
  7104. * Merges the function metadata of `source` into `data`.
  7105. *
  7106. * Merging metadata reduces the number of wrappers used to invoke a function.
  7107. * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`
  7108. * may be applied regardless of execution order. Methods like `_.ary` and
  7109. * `_.rearg` modify function arguments, making the order in which they are
  7110. * executed important, preventing the merging of metadata. However, we make
  7111. * an exception for a safe combined case where curried functions have `_.ary`
  7112. * and or `_.rearg` applied.
  7113. *
  7114. * @private
  7115. * @param {Array} data The destination metadata.
  7116. * @param {Array} source The source metadata.
  7117. * @returns {Array} Returns `data`.
  7118. */
  7119. function mergeData(data, source) {
  7120. var bitmask = data[1],
  7121. srcBitmask = source[1],
  7122. newBitmask = bitmask | srcBitmask,
  7123. isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);
  7124. var isCombo =
  7125. ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||
  7126. ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||
  7127. ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));
  7128. // Exit early if metadata can't be merged.
  7129. if (!(isCommon || isCombo)) {
  7130. return data;
  7131. }
  7132. // Use source `thisArg` if available.
  7133. if (srcBitmask & WRAP_BIND_FLAG) {
  7134. data[2] = source[2];
  7135. // Set when currying a bound function.
  7136. newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;
  7137. }
  7138. // Compose partial arguments.
  7139. var value = source[3];
  7140. if (value) {
  7141. var partials = data[3];
  7142. data[3] = partials ? composeArgs(partials, value, source[4]) : value;
  7143. data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];
  7144. }
  7145. // Compose partial right arguments.
  7146. value = source[5];
  7147. if (value) {
  7148. partials = data[5];
  7149. data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;
  7150. data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];
  7151. }
  7152. // Use source `argPos` if available.
  7153. value = source[7];
  7154. if (value) {
  7155. data[7] = value;
  7156. }
  7157. // Use source `ary` if it's smaller.
  7158. if (srcBitmask & WRAP_ARY_FLAG) {
  7159. data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);
  7160. }
  7161. // Use source `arity` if one is not provided.
  7162. if (data[9] == null) {
  7163. data[9] = source[9];
  7164. }
  7165. // Use source `func` and merge bitmasks.
  7166. data[0] = source[0];
  7167. data[1] = newBitmask;
  7168. return data;
  7169. }
  7170. /**
  7171. * This function is like
  7172. * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
  7173. * except that it includes inherited enumerable properties.
  7174. *
  7175. * @private
  7176. * @param {Object} object The object to query.
  7177. * @returns {Array} Returns the array of property names.
  7178. */
  7179. function nativeKeysIn(object) {
  7180. var result = [];
  7181. if (object != null) {
  7182. for (var key in Object(object)) {
  7183. result.push(key);
  7184. }
  7185. }
  7186. return result;
  7187. }
  7188. /**
  7189. * Converts `value` to a string using `Object.prototype.toString`.
  7190. *
  7191. * @private
  7192. * @param {*} value The value to convert.
  7193. * @returns {string} Returns the converted string.
  7194. */
  7195. function objectToString(value) {
  7196. return nativeObjectToString.call(value);
  7197. }
  7198. /**
  7199. * A specialized version of `baseRest` which transforms the rest array.
  7200. *
  7201. * @private
  7202. * @param {Function} func The function to apply a rest parameter to.
  7203. * @param {number} [start=func.length-1] The start position of the rest parameter.
  7204. * @param {Function} transform The rest array transform.
  7205. * @returns {Function} Returns the new function.
  7206. */
  7207. function overRest(func, start, transform) {
  7208. start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
  7209. return function() {
  7210. var args = arguments,
  7211. index = -1,
  7212. length = nativeMax(args.length - start, 0),
  7213. array = Array(length);
  7214. while (++index < length) {
  7215. array[index] = args[start + index];
  7216. }
  7217. index = -1;
  7218. var otherArgs = Array(start + 1);
  7219. while (++index < start) {
  7220. otherArgs[index] = args[index];
  7221. }
  7222. otherArgs[start] = transform(array);
  7223. return apply(func, this, otherArgs);
  7224. };
  7225. }
  7226. /**
  7227. * Gets the parent value at `path` of `object`.
  7228. *
  7229. * @private
  7230. * @param {Object} object The object to query.
  7231. * @param {Array} path The path to get the parent value of.
  7232. * @returns {*} Returns the parent value.
  7233. */
  7234. function parent(object, path) {
  7235. return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
  7236. }
  7237. /**
  7238. * Reorder `array` according to the specified indexes where the element at
  7239. * the first index is assigned as the first element, the element at
  7240. * the second index is assigned as the second element, and so on.
  7241. *
  7242. * @private
  7243. * @param {Array} array The array to reorder.
  7244. * @param {Array} indexes The arranged array indexes.
  7245. * @returns {Array} Returns `array`.
  7246. */
  7247. function reorder(array, indexes) {
  7248. var arrLength = array.length,
  7249. length = nativeMin(indexes.length, arrLength),
  7250. oldArray = copyArray(array);
  7251. while (length--) {
  7252. var index = indexes[length];
  7253. array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;
  7254. }
  7255. return array;
  7256. }
  7257. /**
  7258. * Gets the value at `key`, unless `key` is "__proto__" or "constructor".
  7259. *
  7260. * @private
  7261. * @param {Object} object The object to query.
  7262. * @param {string} key The key of the property to get.
  7263. * @returns {*} Returns the property value.
  7264. */
  7265. function safeGet(object, key) {
  7266. if (key === 'constructor' && typeof object[key] === 'function') {
  7267. return;
  7268. }
  7269. if (key == '__proto__') {
  7270. return;
  7271. }
  7272. return object[key];
  7273. }
  7274. /**
  7275. * Sets metadata for `func`.
  7276. *
  7277. * **Note:** If this function becomes hot, i.e. is invoked a lot in a short
  7278. * period of time, it will trip its breaker and transition to an identity
  7279. * function to avoid garbage collection pauses in V8. See
  7280. * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)
  7281. * for more details.
  7282. *
  7283. * @private
  7284. * @param {Function} func The function to associate metadata with.
  7285. * @param {*} data The metadata.
  7286. * @returns {Function} Returns `func`.
  7287. */
  7288. var setData = shortOut(baseSetData);
  7289. /**
  7290. * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout).
  7291. *
  7292. * @private
  7293. * @param {Function} func The function to delay.
  7294. * @param {number} wait The number of milliseconds to delay invocation.
  7295. * @returns {number|Object} Returns the timer id or timeout object.
  7296. */
  7297. var setTimeout = ctxSetTimeout || function(func, wait) {
  7298. return root.setTimeout(func, wait);
  7299. };
  7300. /**
  7301. * Sets the `toString` method of `func` to return `string`.
  7302. *
  7303. * @private
  7304. * @param {Function} func The function to modify.
  7305. * @param {Function} string The `toString` result.
  7306. * @returns {Function} Returns `func`.
  7307. */
  7308. var setToString = shortOut(baseSetToString);
  7309. /**
  7310. * Sets the `toString` method of `wrapper` to mimic the source of `reference`
  7311. * with wrapper details in a comment at the top of the source body.
  7312. *
  7313. * @private
  7314. * @param {Function} wrapper The function to modify.
  7315. * @param {Function} reference The reference function.
  7316. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  7317. * @returns {Function} Returns `wrapper`.
  7318. */
  7319. function setWrapToString(wrapper, reference, bitmask) {
  7320. var source = (reference + '');
  7321. return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));
  7322. }
  7323. /**
  7324. * Creates a function that'll short out and invoke `identity` instead
  7325. * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
  7326. * milliseconds.
  7327. *
  7328. * @private
  7329. * @param {Function} func The function to restrict.
  7330. * @returns {Function} Returns the new shortable function.
  7331. */
  7332. function shortOut(func) {
  7333. var count = 0,
  7334. lastCalled = 0;
  7335. return function() {
  7336. var stamp = nativeNow(),
  7337. remaining = HOT_SPAN - (stamp - lastCalled);
  7338. lastCalled = stamp;
  7339. if (remaining > 0) {
  7340. if (++count >= HOT_COUNT) {
  7341. return arguments[0];
  7342. }
  7343. } else {
  7344. count = 0;
  7345. }
  7346. return func.apply(undefined, arguments);
  7347. };
  7348. }
  7349. /**
  7350. * A specialized version of `_.shuffle` which mutates and sets the size of `array`.
  7351. *
  7352. * @private
  7353. * @param {Array} array The array to shuffle.
  7354. * @param {number} [size=array.length] The size of `array`.
  7355. * @returns {Array} Returns `array`.
  7356. */
  7357. function shuffleSelf(array, size) {
  7358. var index = -1,
  7359. length = array.length,
  7360. lastIndex = length - 1;
  7361. size = size === undefined ? length : size;
  7362. while (++index < size) {
  7363. var rand = baseRandom(index, lastIndex),
  7364. value = array[rand];
  7365. array[rand] = array[index];
  7366. array[index] = value;
  7367. }
  7368. array.length = size;
  7369. return array;
  7370. }
  7371. /**
  7372. * Converts `string` to a property path array.
  7373. *
  7374. * @private
  7375. * @param {string} string The string to convert.
  7376. * @returns {Array} Returns the property path array.
  7377. */
  7378. var stringToPath = memoizeCapped(function(string) {
  7379. var result = [];
  7380. if (string.charCodeAt(0) === 46 /* . */) {
  7381. result.push('');
  7382. }
  7383. string.replace(rePropName, function(match, number, quote, subString) {
  7384. result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
  7385. });
  7386. return result;
  7387. });
  7388. /**
  7389. * Converts `value` to a string key if it's not a string or symbol.
  7390. *
  7391. * @private
  7392. * @param {*} value The value to inspect.
  7393. * @returns {string|symbol} Returns the key.
  7394. */
  7395. function toKey(value) {
  7396. if (typeof value == 'string' || isSymbol(value)) {
  7397. return value;
  7398. }
  7399. var result = (value + '');
  7400. return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
  7401. }
  7402. /**
  7403. * Converts `func` to its source code.
  7404. *
  7405. * @private
  7406. * @param {Function} func The function to convert.
  7407. * @returns {string} Returns the source code.
  7408. */
  7409. function toSource(func) {
  7410. if (func != null) {
  7411. try {
  7412. return funcToString.call(func);
  7413. } catch (e) {}
  7414. try {
  7415. return (func + '');
  7416. } catch (e) {}
  7417. }
  7418. return '';
  7419. }
  7420. /**
  7421. * Updates wrapper `details` based on `bitmask` flags.
  7422. *
  7423. * @private
  7424. * @returns {Array} details The details to modify.
  7425. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  7426. * @returns {Array} Returns `details`.
  7427. */
  7428. function updateWrapDetails(details, bitmask) {
  7429. arrayEach(wrapFlags, function(pair) {
  7430. var value = '_.' + pair[0];
  7431. if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {
  7432. details.push(value);
  7433. }
  7434. });
  7435. return details.sort();
  7436. }
  7437. /**
  7438. * Creates a clone of `wrapper`.
  7439. *
  7440. * @private
  7441. * @param {Object} wrapper The wrapper to clone.
  7442. * @returns {Object} Returns the cloned wrapper.
  7443. */
  7444. function wrapperClone(wrapper) {
  7445. if (wrapper instanceof LazyWrapper) {
  7446. return wrapper.clone();
  7447. }
  7448. var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);
  7449. result.__actions__ = copyArray(wrapper.__actions__);
  7450. result.__index__ = wrapper.__index__;
  7451. result.__values__ = wrapper.__values__;
  7452. return result;
  7453. }
  7454. /*------------------------------------------------------------------------*/
  7455. /**
  7456. * Creates an array of elements split into groups the length of `size`.
  7457. * If `array` can't be split evenly, the final chunk will be the remaining
  7458. * elements.
  7459. *
  7460. * @static
  7461. * @memberOf _
  7462. * @since 3.0.0
  7463. * @category Array
  7464. * @param {Array} array The array to process.
  7465. * @param {number} [size=1] The length of each chunk
  7466. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  7467. * @returns {Array} Returns the new array of chunks.
  7468. * @example
  7469. *
  7470. * _.chunk(['a', 'b', 'c', 'd'], 2);
  7471. * // => [['a', 'b'], ['c', 'd']]
  7472. *
  7473. * _.chunk(['a', 'b', 'c', 'd'], 3);
  7474. * // => [['a', 'b', 'c'], ['d']]
  7475. */
  7476. function chunk(array, size, guard) {
  7477. if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {
  7478. size = 1;
  7479. } else {
  7480. size = nativeMax(toInteger(size), 0);
  7481. }
  7482. var length = array == null ? 0 : array.length;
  7483. if (!length || size < 1) {
  7484. return [];
  7485. }
  7486. var index = 0,
  7487. resIndex = 0,
  7488. result = Array(nativeCeil(length / size));
  7489. while (index < length) {
  7490. result[resIndex++] = baseSlice(array, index, (index += size));
  7491. }
  7492. return result;
  7493. }
  7494. /**
  7495. * Creates an array with all falsey values removed. The values `false`, `null`,
  7496. * `0`, `""`, `undefined`, and `NaN` are falsey.
  7497. *
  7498. * @static
  7499. * @memberOf _
  7500. * @since 0.1.0
  7501. * @category Array
  7502. * @param {Array} array The array to compact.
  7503. * @returns {Array} Returns the new array of filtered values.
  7504. * @example
  7505. *
  7506. * _.compact([0, 1, false, 2, '', 3]);
  7507. * // => [1, 2, 3]
  7508. */
  7509. function compact(array) {
  7510. var index = -1,
  7511. length = array == null ? 0 : array.length,
  7512. resIndex = 0,
  7513. result = [];
  7514. while (++index < length) {
  7515. var value = array[index];
  7516. if (value) {
  7517. result[resIndex++] = value;
  7518. }
  7519. }
  7520. return result;
  7521. }
  7522. /**
  7523. * Creates a new array concatenating `array` with any additional arrays
  7524. * and/or values.
  7525. *
  7526. * @static
  7527. * @memberOf _
  7528. * @since 4.0.0
  7529. * @category Array
  7530. * @param {Array} array The array to concatenate.
  7531. * @param {...*} [values] The values to concatenate.
  7532. * @returns {Array} Returns the new concatenated array.
  7533. * @example
  7534. *
  7535. * var array = [1];
  7536. * var other = _.concat(array, 2, [3], [[4]]);
  7537. *
  7538. * console.log(other);
  7539. * // => [1, 2, 3, [4]]
  7540. *
  7541. * console.log(array);
  7542. * // => [1]
  7543. */
  7544. function concat() {
  7545. var length = arguments.length;
  7546. if (!length) {
  7547. return [];
  7548. }
  7549. var args = Array(length - 1),
  7550. array = arguments[0],
  7551. index = length;
  7552. while (index--) {
  7553. args[index - 1] = arguments[index];
  7554. }
  7555. return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));
  7556. }
  7557. /**
  7558. * Creates an array of `array` values not included in the other given arrays
  7559. * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  7560. * for equality comparisons. The order and references of result values are
  7561. * determined by the first array.
  7562. *
  7563. * **Note:** Unlike `_.pullAll`, this method returns a new array.
  7564. *
  7565. * @static
  7566. * @memberOf _
  7567. * @since 0.1.0
  7568. * @category Array
  7569. * @param {Array} array The array to inspect.
  7570. * @param {...Array} [values] The values to exclude.
  7571. * @returns {Array} Returns the new array of filtered values.
  7572. * @see _.without, _.xor
  7573. * @example
  7574. *
  7575. * _.difference([2, 1], [2, 3]);
  7576. * // => [1]
  7577. */
  7578. var difference = baseRest(function(array, values) {
  7579. return isArrayLikeObject(array)
  7580. ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))
  7581. : [];
  7582. });
  7583. /**
  7584. * This method is like `_.difference` except that it accepts `iteratee` which
  7585. * is invoked for each element of `array` and `values` to generate the criterion
  7586. * by which they're compared. The order and references of result values are
  7587. * determined by the first array. The iteratee is invoked with one argument:
  7588. * (value).
  7589. *
  7590. * **Note:** Unlike `_.pullAllBy`, this method returns a new array.
  7591. *
  7592. * @static
  7593. * @memberOf _
  7594. * @since 4.0.0
  7595. * @category Array
  7596. * @param {Array} array The array to inspect.
  7597. * @param {...Array} [values] The values to exclude.
  7598. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  7599. * @returns {Array} Returns the new array of filtered values.
  7600. * @example
  7601. *
  7602. * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);
  7603. * // => [1.2]
  7604. *
  7605. * // The `_.property` iteratee shorthand.
  7606. * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');
  7607. * // => [{ 'x': 2 }]
  7608. */
  7609. var differenceBy = baseRest(function(array, values) {
  7610. var iteratee = last(values);
  7611. if (isArrayLikeObject(iteratee)) {
  7612. iteratee = undefined;
  7613. }
  7614. return isArrayLikeObject(array)
  7615. ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2))
  7616. : [];
  7617. });
  7618. /**
  7619. * This method is like `_.difference` except that it accepts `comparator`
  7620. * which is invoked to compare elements of `array` to `values`. The order and
  7621. * references of result values are determined by the first array. The comparator
  7622. * is invoked with two arguments: (arrVal, othVal).
  7623. *
  7624. * **Note:** Unlike `_.pullAllWith`, this method returns a new array.
  7625. *
  7626. * @static
  7627. * @memberOf _
  7628. * @since 4.0.0
  7629. * @category Array
  7630. * @param {Array} array The array to inspect.
  7631. * @param {...Array} [values] The values to exclude.
  7632. * @param {Function} [comparator] The comparator invoked per element.
  7633. * @returns {Array} Returns the new array of filtered values.
  7634. * @example
  7635. *
  7636. * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
  7637. *
  7638. * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);
  7639. * // => [{ 'x': 2, 'y': 1 }]
  7640. */
  7641. var differenceWith = baseRest(function(array, values) {
  7642. var comparator = last(values);
  7643. if (isArrayLikeObject(comparator)) {
  7644. comparator = undefined;
  7645. }
  7646. return isArrayLikeObject(array)
  7647. ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)
  7648. : [];
  7649. });
  7650. /**
  7651. * Creates a slice of `array` with `n` elements dropped from the beginning.
  7652. *
  7653. * @static
  7654. * @memberOf _
  7655. * @since 0.5.0
  7656. * @category Array
  7657. * @param {Array} array The array to query.
  7658. * @param {number} [n=1] The number of elements to drop.
  7659. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  7660. * @returns {Array} Returns the slice of `array`.
  7661. * @example
  7662. *
  7663. * _.drop([1, 2, 3]);
  7664. * // => [2, 3]
  7665. *
  7666. * _.drop([1, 2, 3], 2);
  7667. * // => [3]
  7668. *
  7669. * _.drop([1, 2, 3], 5);
  7670. * // => []
  7671. *
  7672. * _.drop([1, 2, 3], 0);
  7673. * // => [1, 2, 3]
  7674. */
  7675. function drop(array, n, guard) {
  7676. var length = array == null ? 0 : array.length;
  7677. if (!length) {
  7678. return [];
  7679. }
  7680. n = (guard || n === undefined) ? 1 : toInteger(n);
  7681. return baseSlice(array, n < 0 ? 0 : n, length);
  7682. }
  7683. /**
  7684. * Creates a slice of `array` with `n` elements dropped from the end.
  7685. *
  7686. * @static
  7687. * @memberOf _
  7688. * @since 3.0.0
  7689. * @category Array
  7690. * @param {Array} array The array to query.
  7691. * @param {number} [n=1] The number of elements to drop.
  7692. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  7693. * @returns {Array} Returns the slice of `array`.
  7694. * @example
  7695. *
  7696. * _.dropRight([1, 2, 3]);
  7697. * // => [1, 2]
  7698. *
  7699. * _.dropRight([1, 2, 3], 2);
  7700. * // => [1]
  7701. *
  7702. * _.dropRight([1, 2, 3], 5);
  7703. * // => []
  7704. *
  7705. * _.dropRight([1, 2, 3], 0);
  7706. * // => [1, 2, 3]
  7707. */
  7708. function dropRight(array, n, guard) {
  7709. var length = array == null ? 0 : array.length;
  7710. if (!length) {
  7711. return [];
  7712. }
  7713. n = (guard || n === undefined) ? 1 : toInteger(n);
  7714. n = length - n;
  7715. return baseSlice(array, 0, n < 0 ? 0 : n);
  7716. }
  7717. /**
  7718. * Creates a slice of `array` excluding elements dropped from the end.
  7719. * Elements are dropped until `predicate` returns falsey. The predicate is
  7720. * invoked with three arguments: (value, index, array).
  7721. *
  7722. * @static
  7723. * @memberOf _
  7724. * @since 3.0.0
  7725. * @category Array
  7726. * @param {Array} array The array to query.
  7727. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  7728. * @returns {Array} Returns the slice of `array`.
  7729. * @example
  7730. *
  7731. * var users = [
  7732. * { 'user': 'barney', 'active': true },
  7733. * { 'user': 'fred', 'active': false },
  7734. * { 'user': 'pebbles', 'active': false }
  7735. * ];
  7736. *
  7737. * _.dropRightWhile(users, function(o) { return !o.active; });
  7738. * // => objects for ['barney']
  7739. *
  7740. * // The `_.matches` iteratee shorthand.
  7741. * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });
  7742. * // => objects for ['barney', 'fred']
  7743. *
  7744. * // The `_.matchesProperty` iteratee shorthand.
  7745. * _.dropRightWhile(users, ['active', false]);
  7746. * // => objects for ['barney']
  7747. *
  7748. * // The `_.property` iteratee shorthand.
  7749. * _.dropRightWhile(users, 'active');
  7750. * // => objects for ['barney', 'fred', 'pebbles']
  7751. */
  7752. function dropRightWhile(array, predicate) {
  7753. return (array && array.length)
  7754. ? baseWhile(array, getIteratee(predicate, 3), true, true)
  7755. : [];
  7756. }
  7757. /**
  7758. * Creates a slice of `array` excluding elements dropped from the beginning.
  7759. * Elements are dropped until `predicate` returns falsey. The predicate is
  7760. * invoked with three arguments: (value, index, array).
  7761. *
  7762. * @static
  7763. * @memberOf _
  7764. * @since 3.0.0
  7765. * @category Array
  7766. * @param {Array} array The array to query.
  7767. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  7768. * @returns {Array} Returns the slice of `array`.
  7769. * @example
  7770. *
  7771. * var users = [
  7772. * { 'user': 'barney', 'active': false },
  7773. * { 'user': 'fred', 'active': false },
  7774. * { 'user': 'pebbles', 'active': true }
  7775. * ];
  7776. *
  7777. * _.dropWhile(users, function(o) { return !o.active; });
  7778. * // => objects for ['pebbles']
  7779. *
  7780. * // The `_.matches` iteratee shorthand.
  7781. * _.dropWhile(users, { 'user': 'barney', 'active': false });
  7782. * // => objects for ['fred', 'pebbles']
  7783. *
  7784. * // The `_.matchesProperty` iteratee shorthand.
  7785. * _.dropWhile(users, ['active', false]);
  7786. * // => objects for ['pebbles']
  7787. *
  7788. * // The `_.property` iteratee shorthand.
  7789. * _.dropWhile(users, 'active');
  7790. * // => objects for ['barney', 'fred', 'pebbles']
  7791. */
  7792. function dropWhile(array, predicate) {
  7793. return (array && array.length)
  7794. ? baseWhile(array, getIteratee(predicate, 3), true)
  7795. : [];
  7796. }
  7797. /**
  7798. * Fills elements of `array` with `value` from `start` up to, but not
  7799. * including, `end`.
  7800. *
  7801. * **Note:** This method mutates `array`.
  7802. *
  7803. * @static
  7804. * @memberOf _
  7805. * @since 3.2.0
  7806. * @category Array
  7807. * @param {Array} array The array to fill.
  7808. * @param {*} value The value to fill `array` with.
  7809. * @param {number} [start=0] The start position.
  7810. * @param {number} [end=array.length] The end position.
  7811. * @returns {Array} Returns `array`.
  7812. * @example
  7813. *
  7814. * var array = [1, 2, 3];
  7815. *
  7816. * _.fill(array, 'a');
  7817. * console.log(array);
  7818. * // => ['a', 'a', 'a']
  7819. *
  7820. * _.fill(Array(3), 2);
  7821. * // => [2, 2, 2]
  7822. *
  7823. * _.fill([4, 6, 8, 10], '*', 1, 3);
  7824. * // => [4, '*', '*', 10]
  7825. */
  7826. function fill(array, value, start, end) {
  7827. var length = array == null ? 0 : array.length;
  7828. if (!length) {
  7829. return [];
  7830. }
  7831. if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {
  7832. start = 0;
  7833. end = length;
  7834. }
  7835. return baseFill(array, value, start, end);
  7836. }
  7837. /**
  7838. * This method is like `_.find` except that it returns the index of the first
  7839. * element `predicate` returns truthy for instead of the element itself.
  7840. *
  7841. * @static
  7842. * @memberOf _
  7843. * @since 1.1.0
  7844. * @category Array
  7845. * @param {Array} array The array to inspect.
  7846. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  7847. * @param {number} [fromIndex=0] The index to search from.
  7848. * @returns {number} Returns the index of the found element, else `-1`.
  7849. * @example
  7850. *
  7851. * var users = [
  7852. * { 'user': 'barney', 'active': false },
  7853. * { 'user': 'fred', 'active': false },
  7854. * { 'user': 'pebbles', 'active': true }
  7855. * ];
  7856. *
  7857. * _.findIndex(users, function(o) { return o.user == 'barney'; });
  7858. * // => 0
  7859. *
  7860. * // The `_.matches` iteratee shorthand.
  7861. * _.findIndex(users, { 'user': 'fred', 'active': false });
  7862. * // => 1
  7863. *
  7864. * // The `_.matchesProperty` iteratee shorthand.
  7865. * _.findIndex(users, ['active', false]);
  7866. * // => 0
  7867. *
  7868. * // The `_.property` iteratee shorthand.
  7869. * _.findIndex(users, 'active');
  7870. * // => 2
  7871. */
  7872. function findIndex(array, predicate, fromIndex) {
  7873. var length = array == null ? 0 : array.length;
  7874. if (!length) {
  7875. return -1;
  7876. }
  7877. var index = fromIndex == null ? 0 : toInteger(fromIndex);
  7878. if (index < 0) {
  7879. index = nativeMax(length + index, 0);
  7880. }
  7881. return baseFindIndex(array, getIteratee(predicate, 3), index);
  7882. }
  7883. /**
  7884. * This method is like `_.findIndex` except that it iterates over elements
  7885. * of `collection` from right to left.
  7886. *
  7887. * @static
  7888. * @memberOf _
  7889. * @since 2.0.0
  7890. * @category Array
  7891. * @param {Array} array The array to inspect.
  7892. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  7893. * @param {number} [fromIndex=array.length-1] The index to search from.
  7894. * @returns {number} Returns the index of the found element, else `-1`.
  7895. * @example
  7896. *
  7897. * var users = [
  7898. * { 'user': 'barney', 'active': true },
  7899. * { 'user': 'fred', 'active': false },
  7900. * { 'user': 'pebbles', 'active': false }
  7901. * ];
  7902. *
  7903. * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });
  7904. * // => 2
  7905. *
  7906. * // The `_.matches` iteratee shorthand.
  7907. * _.findLastIndex(users, { 'user': 'barney', 'active': true });
  7908. * // => 0
  7909. *
  7910. * // The `_.matchesProperty` iteratee shorthand.
  7911. * _.findLastIndex(users, ['active', false]);
  7912. * // => 2
  7913. *
  7914. * // The `_.property` iteratee shorthand.
  7915. * _.findLastIndex(users, 'active');
  7916. * // => 0
  7917. */
  7918. function findLastIndex(array, predicate, fromIndex) {
  7919. var length = array == null ? 0 : array.length;
  7920. if (!length) {
  7921. return -1;
  7922. }
  7923. var index = length - 1;
  7924. if (fromIndex !== undefined) {
  7925. index = toInteger(fromIndex);
  7926. index = fromIndex < 0
  7927. ? nativeMax(length + index, 0)
  7928. : nativeMin(index, length - 1);
  7929. }
  7930. return baseFindIndex(array, getIteratee(predicate, 3), index, true);
  7931. }
  7932. /**
  7933. * Flattens `array` a single level deep.
  7934. *
  7935. * @static
  7936. * @memberOf _
  7937. * @since 0.1.0
  7938. * @category Array
  7939. * @param {Array} array The array to flatten.
  7940. * @returns {Array} Returns the new flattened array.
  7941. * @example
  7942. *
  7943. * _.flatten([1, [2, [3, [4]], 5]]);
  7944. * // => [1, 2, [3, [4]], 5]
  7945. */
  7946. function flatten(array) {
  7947. var length = array == null ? 0 : array.length;
  7948. return length ? baseFlatten(array, 1) : [];
  7949. }
  7950. /**
  7951. * Recursively flattens `array`.
  7952. *
  7953. * @static
  7954. * @memberOf _
  7955. * @since 3.0.0
  7956. * @category Array
  7957. * @param {Array} array The array to flatten.
  7958. * @returns {Array} Returns the new flattened array.
  7959. * @example
  7960. *
  7961. * _.flattenDeep([1, [2, [3, [4]], 5]]);
  7962. * // => [1, 2, 3, 4, 5]
  7963. */
  7964. function flattenDeep(array) {
  7965. var length = array == null ? 0 : array.length;
  7966. return length ? baseFlatten(array, INFINITY) : [];
  7967. }
  7968. /**
  7969. * Recursively flatten `array` up to `depth` times.
  7970. *
  7971. * @static
  7972. * @memberOf _
  7973. * @since 4.4.0
  7974. * @category Array
  7975. * @param {Array} array The array to flatten.
  7976. * @param {number} [depth=1] The maximum recursion depth.
  7977. * @returns {Array} Returns the new flattened array.
  7978. * @example
  7979. *
  7980. * var array = [1, [2, [3, [4]], 5]];
  7981. *
  7982. * _.flattenDepth(array, 1);
  7983. * // => [1, 2, [3, [4]], 5]
  7984. *
  7985. * _.flattenDepth(array, 2);
  7986. * // => [1, 2, 3, [4], 5]
  7987. */
  7988. function flattenDepth(array, depth) {
  7989. var length = array == null ? 0 : array.length;
  7990. if (!length) {
  7991. return [];
  7992. }
  7993. depth = depth === undefined ? 1 : toInteger(depth);
  7994. return baseFlatten(array, depth);
  7995. }
  7996. /**
  7997. * The inverse of `_.toPairs`; this method returns an object composed
  7998. * from key-value `pairs`.
  7999. *
  8000. * @static
  8001. * @memberOf _
  8002. * @since 4.0.0
  8003. * @category Array
  8004. * @param {Array} pairs The key-value pairs.
  8005. * @returns {Object} Returns the new object.
  8006. * @example
  8007. *
  8008. * _.fromPairs([['a', 1], ['b', 2]]);
  8009. * // => { 'a': 1, 'b': 2 }
  8010. */
  8011. function fromPairs(pairs) {
  8012. var index = -1,
  8013. length = pairs == null ? 0 : pairs.length,
  8014. result = {};
  8015. while (++index < length) {
  8016. var pair = pairs[index];
  8017. result[pair[0]] = pair[1];
  8018. }
  8019. return result;
  8020. }
  8021. /**
  8022. * Gets the first element of `array`.
  8023. *
  8024. * @static
  8025. * @memberOf _
  8026. * @since 0.1.0
  8027. * @alias first
  8028. * @category Array
  8029. * @param {Array} array The array to query.
  8030. * @returns {*} Returns the first element of `array`.
  8031. * @example
  8032. *
  8033. * _.head([1, 2, 3]);
  8034. * // => 1
  8035. *
  8036. * _.head([]);
  8037. * // => undefined
  8038. */
  8039. function head(array) {
  8040. return (array && array.length) ? array[0] : undefined;
  8041. }
  8042. /**
  8043. * Gets the index at which the first occurrence of `value` is found in `array`
  8044. * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  8045. * for equality comparisons. If `fromIndex` is negative, it's used as the
  8046. * offset from the end of `array`.
  8047. *
  8048. * @static
  8049. * @memberOf _
  8050. * @since 0.1.0
  8051. * @category Array
  8052. * @param {Array} array The array to inspect.
  8053. * @param {*} value The value to search for.
  8054. * @param {number} [fromIndex=0] The index to search from.
  8055. * @returns {number} Returns the index of the matched value, else `-1`.
  8056. * @example
  8057. *
  8058. * _.indexOf([1, 2, 1, 2], 2);
  8059. * // => 1
  8060. *
  8061. * // Search from the `fromIndex`.
  8062. * _.indexOf([1, 2, 1, 2], 2, 2);
  8063. * // => 3
  8064. */
  8065. function indexOf(array, value, fromIndex) {
  8066. var length = array == null ? 0 : array.length;
  8067. if (!length) {
  8068. return -1;
  8069. }
  8070. var index = fromIndex == null ? 0 : toInteger(fromIndex);
  8071. if (index < 0) {
  8072. index = nativeMax(length + index, 0);
  8073. }
  8074. return baseIndexOf(array, value, index);
  8075. }
  8076. /**
  8077. * Gets all but the last element of `array`.
  8078. *
  8079. * @static
  8080. * @memberOf _
  8081. * @since 0.1.0
  8082. * @category Array
  8083. * @param {Array} array The array to query.
  8084. * @returns {Array} Returns the slice of `array`.
  8085. * @example
  8086. *
  8087. * _.initial([1, 2, 3]);
  8088. * // => [1, 2]
  8089. */
  8090. function initial(array) {
  8091. var length = array == null ? 0 : array.length;
  8092. return length ? baseSlice(array, 0, -1) : [];
  8093. }
  8094. /**
  8095. * Creates an array of unique values that are included in all given arrays
  8096. * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  8097. * for equality comparisons. The order and references of result values are
  8098. * determined by the first array.
  8099. *
  8100. * @static
  8101. * @memberOf _
  8102. * @since 0.1.0
  8103. * @category Array
  8104. * @param {...Array} [arrays] The arrays to inspect.
  8105. * @returns {Array} Returns the new array of intersecting values.
  8106. * @example
  8107. *
  8108. * _.intersection([2, 1], [2, 3]);
  8109. * // => [2]
  8110. */
  8111. var intersection = baseRest(function(arrays) {
  8112. var mapped = arrayMap(arrays, castArrayLikeObject);
  8113. return (mapped.length && mapped[0] === arrays[0])
  8114. ? baseIntersection(mapped)
  8115. : [];
  8116. });
  8117. /**
  8118. * This method is like `_.intersection` except that it accepts `iteratee`
  8119. * which is invoked for each element of each `arrays` to generate the criterion
  8120. * by which they're compared. The order and references of result values are
  8121. * determined by the first array. The iteratee is invoked with one argument:
  8122. * (value).
  8123. *
  8124. * @static
  8125. * @memberOf _
  8126. * @since 4.0.0
  8127. * @category Array
  8128. * @param {...Array} [arrays] The arrays to inspect.
  8129. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  8130. * @returns {Array} Returns the new array of intersecting values.
  8131. * @example
  8132. *
  8133. * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);
  8134. * // => [2.1]
  8135. *
  8136. * // The `_.property` iteratee shorthand.
  8137. * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
  8138. * // => [{ 'x': 1 }]
  8139. */
  8140. var intersectionBy = baseRest(function(arrays) {
  8141. var iteratee = last(arrays),
  8142. mapped = arrayMap(arrays, castArrayLikeObject);
  8143. if (iteratee === last(mapped)) {
  8144. iteratee = undefined;
  8145. } else {
  8146. mapped.pop();
  8147. }
  8148. return (mapped.length && mapped[0] === arrays[0])
  8149. ? baseIntersection(mapped, getIteratee(iteratee, 2))
  8150. : [];
  8151. });
  8152. /**
  8153. * This method is like `_.intersection` except that it accepts `comparator`
  8154. * which is invoked to compare elements of `arrays`. The order and references
  8155. * of result values are determined by the first array. The comparator is
  8156. * invoked with two arguments: (arrVal, othVal).
  8157. *
  8158. * @static
  8159. * @memberOf _
  8160. * @since 4.0.0
  8161. * @category Array
  8162. * @param {...Array} [arrays] The arrays to inspect.
  8163. * @param {Function} [comparator] The comparator invoked per element.
  8164. * @returns {Array} Returns the new array of intersecting values.
  8165. * @example
  8166. *
  8167. * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
  8168. * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
  8169. *
  8170. * _.intersectionWith(objects, others, _.isEqual);
  8171. * // => [{ 'x': 1, 'y': 2 }]
  8172. */
  8173. var intersectionWith = baseRest(function(arrays) {
  8174. var comparator = last(arrays),
  8175. mapped = arrayMap(arrays, castArrayLikeObject);
  8176. comparator = typeof comparator == 'function' ? comparator : undefined;
  8177. if (comparator) {
  8178. mapped.pop();
  8179. }
  8180. return (mapped.length && mapped[0] === arrays[0])
  8181. ? baseIntersection(mapped, undefined, comparator)
  8182. : [];
  8183. });
  8184. /**
  8185. * Converts all elements in `array` into a string separated by `separator`.
  8186. *
  8187. * @static
  8188. * @memberOf _
  8189. * @since 4.0.0
  8190. * @category Array
  8191. * @param {Array} array The array to convert.
  8192. * @param {string} [separator=','] The element separator.
  8193. * @returns {string} Returns the joined string.
  8194. * @example
  8195. *
  8196. * _.join(['a', 'b', 'c'], '~');
  8197. * // => 'a~b~c'
  8198. */
  8199. function join(array, separator) {
  8200. return array == null ? '' : nativeJoin.call(array, separator);
  8201. }
  8202. /**
  8203. * Gets the last element of `array`.
  8204. *
  8205. * @static
  8206. * @memberOf _
  8207. * @since 0.1.0
  8208. * @category Array
  8209. * @param {Array} array The array to query.
  8210. * @returns {*} Returns the last element of `array`.
  8211. * @example
  8212. *
  8213. * _.last([1, 2, 3]);
  8214. * // => 3
  8215. */
  8216. function last(array) {
  8217. var length = array == null ? 0 : array.length;
  8218. return length ? array[length - 1] : undefined;
  8219. }
  8220. /**
  8221. * This method is like `_.indexOf` except that it iterates over elements of
  8222. * `array` from right to left.
  8223. *
  8224. * @static
  8225. * @memberOf _
  8226. * @since 0.1.0
  8227. * @category Array
  8228. * @param {Array} array The array to inspect.
  8229. * @param {*} value The value to search for.
  8230. * @param {number} [fromIndex=array.length-1] The index to search from.
  8231. * @returns {number} Returns the index of the matched value, else `-1`.
  8232. * @example
  8233. *
  8234. * _.lastIndexOf([1, 2, 1, 2], 2);
  8235. * // => 3
  8236. *
  8237. * // Search from the `fromIndex`.
  8238. * _.lastIndexOf([1, 2, 1, 2], 2, 2);
  8239. * // => 1
  8240. */
  8241. function lastIndexOf(array, value, fromIndex) {
  8242. var length = array == null ? 0 : array.length;
  8243. if (!length) {
  8244. return -1;
  8245. }
  8246. var index = length;
  8247. if (fromIndex !== undefined) {
  8248. index = toInteger(fromIndex);
  8249. index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);
  8250. }
  8251. return value === value
  8252. ? strictLastIndexOf(array, value, index)
  8253. : baseFindIndex(array, baseIsNaN, index, true);
  8254. }
  8255. /**
  8256. * Gets the element at index `n` of `array`. If `n` is negative, the nth
  8257. * element from the end is returned.
  8258. *
  8259. * @static
  8260. * @memberOf _
  8261. * @since 4.11.0
  8262. * @category Array
  8263. * @param {Array} array The array to query.
  8264. * @param {number} [n=0] The index of the element to return.
  8265. * @returns {*} Returns the nth element of `array`.
  8266. * @example
  8267. *
  8268. * var array = ['a', 'b', 'c', 'd'];
  8269. *
  8270. * _.nth(array, 1);
  8271. * // => 'b'
  8272. *
  8273. * _.nth(array, -2);
  8274. * // => 'c';
  8275. */
  8276. function nth(array, n) {
  8277. return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;
  8278. }
  8279. /**
  8280. * Removes all given values from `array` using
  8281. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  8282. * for equality comparisons.
  8283. *
  8284. * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`
  8285. * to remove elements from an array by predicate.
  8286. *
  8287. * @static
  8288. * @memberOf _
  8289. * @since 2.0.0
  8290. * @category Array
  8291. * @param {Array} array The array to modify.
  8292. * @param {...*} [values] The values to remove.
  8293. * @returns {Array} Returns `array`.
  8294. * @example
  8295. *
  8296. * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
  8297. *
  8298. * _.pull(array, 'a', 'c');
  8299. * console.log(array);
  8300. * // => ['b', 'b']
  8301. */
  8302. var pull = baseRest(pullAll);
  8303. /**
  8304. * This method is like `_.pull` except that it accepts an array of values to remove.
  8305. *
  8306. * **Note:** Unlike `_.difference`, this method mutates `array`.
  8307. *
  8308. * @static
  8309. * @memberOf _
  8310. * @since 4.0.0
  8311. * @category Array
  8312. * @param {Array} array The array to modify.
  8313. * @param {Array} values The values to remove.
  8314. * @returns {Array} Returns `array`.
  8315. * @example
  8316. *
  8317. * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
  8318. *
  8319. * _.pullAll(array, ['a', 'c']);
  8320. * console.log(array);
  8321. * // => ['b', 'b']
  8322. */
  8323. function pullAll(array, values) {
  8324. return (array && array.length && values && values.length)
  8325. ? basePullAll(array, values)
  8326. : array;
  8327. }
  8328. /**
  8329. * This method is like `_.pullAll` except that it accepts `iteratee` which is
  8330. * invoked for each element of `array` and `values` to generate the criterion
  8331. * by which they're compared. The iteratee is invoked with one argument: (value).
  8332. *
  8333. * **Note:** Unlike `_.differenceBy`, this method mutates `array`.
  8334. *
  8335. * @static
  8336. * @memberOf _
  8337. * @since 4.0.0
  8338. * @category Array
  8339. * @param {Array} array The array to modify.
  8340. * @param {Array} values The values to remove.
  8341. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  8342. * @returns {Array} Returns `array`.
  8343. * @example
  8344. *
  8345. * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];
  8346. *
  8347. * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');
  8348. * console.log(array);
  8349. * // => [{ 'x': 2 }]
  8350. */
  8351. function pullAllBy(array, values, iteratee) {
  8352. return (array && array.length && values && values.length)
  8353. ? basePullAll(array, values, getIteratee(iteratee, 2))
  8354. : array;
  8355. }
  8356. /**
  8357. * This method is like `_.pullAll` except that it accepts `comparator` which
  8358. * is invoked to compare elements of `array` to `values`. The comparator is
  8359. * invoked with two arguments: (arrVal, othVal).
  8360. *
  8361. * **Note:** Unlike `_.differenceWith`, this method mutates `array`.
  8362. *
  8363. * @static
  8364. * @memberOf _
  8365. * @since 4.6.0
  8366. * @category Array
  8367. * @param {Array} array The array to modify.
  8368. * @param {Array} values The values to remove.
  8369. * @param {Function} [comparator] The comparator invoked per element.
  8370. * @returns {Array} Returns `array`.
  8371. * @example
  8372. *
  8373. * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];
  8374. *
  8375. * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);
  8376. * console.log(array);
  8377. * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]
  8378. */
  8379. function pullAllWith(array, values, comparator) {
  8380. return (array && array.length && values && values.length)
  8381. ? basePullAll(array, values, undefined, comparator)
  8382. : array;
  8383. }
  8384. /**
  8385. * Removes elements from `array` corresponding to `indexes` and returns an
  8386. * array of removed elements.
  8387. *
  8388. * **Note:** Unlike `_.at`, this method mutates `array`.
  8389. *
  8390. * @static
  8391. * @memberOf _
  8392. * @since 3.0.0
  8393. * @category Array
  8394. * @param {Array} array The array to modify.
  8395. * @param {...(number|number[])} [indexes] The indexes of elements to remove.
  8396. * @returns {Array} Returns the new array of removed elements.
  8397. * @example
  8398. *
  8399. * var array = ['a', 'b', 'c', 'd'];
  8400. * var pulled = _.pullAt(array, [1, 3]);
  8401. *
  8402. * console.log(array);
  8403. * // => ['a', 'c']
  8404. *
  8405. * console.log(pulled);
  8406. * // => ['b', 'd']
  8407. */
  8408. var pullAt = flatRest(function(array, indexes) {
  8409. var length = array == null ? 0 : array.length,
  8410. result = baseAt(array, indexes);
  8411. basePullAt(array, arrayMap(indexes, function(index) {
  8412. return isIndex(index, length) ? +index : index;
  8413. }).sort(compareAscending));
  8414. return result;
  8415. });
  8416. /**
  8417. * Removes all elements from `array` that `predicate` returns truthy for
  8418. * and returns an array of the removed elements. The predicate is invoked
  8419. * with three arguments: (value, index, array).
  8420. *
  8421. * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`
  8422. * to pull elements from an array by value.
  8423. *
  8424. * @static
  8425. * @memberOf _
  8426. * @since 2.0.0
  8427. * @category Array
  8428. * @param {Array} array The array to modify.
  8429. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  8430. * @returns {Array} Returns the new array of removed elements.
  8431. * @example
  8432. *
  8433. * var array = [1, 2, 3, 4];
  8434. * var evens = _.remove(array, function(n) {
  8435. * return n % 2 == 0;
  8436. * });
  8437. *
  8438. * console.log(array);
  8439. * // => [1, 3]
  8440. *
  8441. * console.log(evens);
  8442. * // => [2, 4]
  8443. */
  8444. function remove(array, predicate) {
  8445. var result = [];
  8446. if (!(array && array.length)) {
  8447. return result;
  8448. }
  8449. var index = -1,
  8450. indexes = [],
  8451. length = array.length;
  8452. predicate = getIteratee(predicate, 3);
  8453. while (++index < length) {
  8454. var value = array[index];
  8455. if (predicate(value, index, array)) {
  8456. result.push(value);
  8457. indexes.push(index);
  8458. }
  8459. }
  8460. basePullAt(array, indexes);
  8461. return result;
  8462. }
  8463. /**
  8464. * Reverses `array` so that the first element becomes the last, the second
  8465. * element becomes the second to last, and so on.
  8466. *
  8467. * **Note:** This method mutates `array` and is based on
  8468. * [`Array#reverse`](https://mdn.io/Array/reverse).
  8469. *
  8470. * @static
  8471. * @memberOf _
  8472. * @since 4.0.0
  8473. * @category Array
  8474. * @param {Array} array The array to modify.
  8475. * @returns {Array} Returns `array`.
  8476. * @example
  8477. *
  8478. * var array = [1, 2, 3];
  8479. *
  8480. * _.reverse(array);
  8481. * // => [3, 2, 1]
  8482. *
  8483. * console.log(array);
  8484. * // => [3, 2, 1]
  8485. */
  8486. function reverse(array) {
  8487. return array == null ? array : nativeReverse.call(array);
  8488. }
  8489. /**
  8490. * Creates a slice of `array` from `start` up to, but not including, `end`.
  8491. *
  8492. * **Note:** This method is used instead of
  8493. * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are
  8494. * returned.
  8495. *
  8496. * @static
  8497. * @memberOf _
  8498. * @since 3.0.0
  8499. * @category Array
  8500. * @param {Array} array The array to slice.
  8501. * @param {number} [start=0] The start position.
  8502. * @param {number} [end=array.length] The end position.
  8503. * @returns {Array} Returns the slice of `array`.
  8504. */
  8505. function slice(array, start, end) {
  8506. var length = array == null ? 0 : array.length;
  8507. if (!length) {
  8508. return [];
  8509. }
  8510. if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {
  8511. start = 0;
  8512. end = length;
  8513. }
  8514. else {
  8515. start = start == null ? 0 : toInteger(start);
  8516. end = end === undefined ? length : toInteger(end);
  8517. }
  8518. return baseSlice(array, start, end);
  8519. }
  8520. /**
  8521. * Uses a binary search to determine the lowest index at which `value`
  8522. * should be inserted into `array` in order to maintain its sort order.
  8523. *
  8524. * @static
  8525. * @memberOf _
  8526. * @since 0.1.0
  8527. * @category Array
  8528. * @param {Array} array The sorted array to inspect.
  8529. * @param {*} value The value to evaluate.
  8530. * @returns {number} Returns the index at which `value` should be inserted
  8531. * into `array`.
  8532. * @example
  8533. *
  8534. * _.sortedIndex([30, 50], 40);
  8535. * // => 1
  8536. */
  8537. function sortedIndex(array, value) {
  8538. return baseSortedIndex(array, value);
  8539. }
  8540. /**
  8541. * This method is like `_.sortedIndex` except that it accepts `iteratee`
  8542. * which is invoked for `value` and each element of `array` to compute their
  8543. * sort ranking. The iteratee is invoked with one argument: (value).
  8544. *
  8545. * @static
  8546. * @memberOf _
  8547. * @since 4.0.0
  8548. * @category Array
  8549. * @param {Array} array The sorted array to inspect.
  8550. * @param {*} value The value to evaluate.
  8551. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  8552. * @returns {number} Returns the index at which `value` should be inserted
  8553. * into `array`.
  8554. * @example
  8555. *
  8556. * var objects = [{ 'x': 4 }, { 'x': 5 }];
  8557. *
  8558. * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
  8559. * // => 0
  8560. *
  8561. * // The `_.property` iteratee shorthand.
  8562. * _.sortedIndexBy(objects, { 'x': 4 }, 'x');
  8563. * // => 0
  8564. */
  8565. function sortedIndexBy(array, value, iteratee) {
  8566. return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));
  8567. }
  8568. /**
  8569. * This method is like `_.indexOf` except that it performs a binary
  8570. * search on a sorted `array`.
  8571. *
  8572. * @static
  8573. * @memberOf _
  8574. * @since 4.0.0
  8575. * @category Array
  8576. * @param {Array} array The array to inspect.
  8577. * @param {*} value The value to search for.
  8578. * @returns {number} Returns the index of the matched value, else `-1`.
  8579. * @example
  8580. *
  8581. * _.sortedIndexOf([4, 5, 5, 5, 6], 5);
  8582. * // => 1
  8583. */
  8584. function sortedIndexOf(array, value) {
  8585. var length = array == null ? 0 : array.length;
  8586. if (length) {
  8587. var index = baseSortedIndex(array, value);
  8588. if (index < length && eq(array[index], value)) {
  8589. return index;
  8590. }
  8591. }
  8592. return -1;
  8593. }
  8594. /**
  8595. * This method is like `_.sortedIndex` except that it returns the highest
  8596. * index at which `value` should be inserted into `array` in order to
  8597. * maintain its sort order.
  8598. *
  8599. * @static
  8600. * @memberOf _
  8601. * @since 3.0.0
  8602. * @category Array
  8603. * @param {Array} array The sorted array to inspect.
  8604. * @param {*} value The value to evaluate.
  8605. * @returns {number} Returns the index at which `value` should be inserted
  8606. * into `array`.
  8607. * @example
  8608. *
  8609. * _.sortedLastIndex([4, 5, 5, 5, 6], 5);
  8610. * // => 4
  8611. */
  8612. function sortedLastIndex(array, value) {
  8613. return baseSortedIndex(array, value, true);
  8614. }
  8615. /**
  8616. * This method is like `_.sortedLastIndex` except that it accepts `iteratee`
  8617. * which is invoked for `value` and each element of `array` to compute their
  8618. * sort ranking. The iteratee is invoked with one argument: (value).
  8619. *
  8620. * @static
  8621. * @memberOf _
  8622. * @since 4.0.0
  8623. * @category Array
  8624. * @param {Array} array The sorted array to inspect.
  8625. * @param {*} value The value to evaluate.
  8626. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  8627. * @returns {number} Returns the index at which `value` should be inserted
  8628. * into `array`.
  8629. * @example
  8630. *
  8631. * var objects = [{ 'x': 4 }, { 'x': 5 }];
  8632. *
  8633. * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
  8634. * // => 1
  8635. *
  8636. * // The `_.property` iteratee shorthand.
  8637. * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');
  8638. * // => 1
  8639. */
  8640. function sortedLastIndexBy(array, value, iteratee) {
  8641. return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);
  8642. }
  8643. /**
  8644. * This method is like `_.lastIndexOf` except that it performs a binary
  8645. * search on a sorted `array`.
  8646. *
  8647. * @static
  8648. * @memberOf _
  8649. * @since 4.0.0
  8650. * @category Array
  8651. * @param {Array} array The array to inspect.
  8652. * @param {*} value The value to search for.
  8653. * @returns {number} Returns the index of the matched value, else `-1`.
  8654. * @example
  8655. *
  8656. * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);
  8657. * // => 3
  8658. */
  8659. function sortedLastIndexOf(array, value) {
  8660. var length = array == null ? 0 : array.length;
  8661. if (length) {
  8662. var index = baseSortedIndex(array, value, true) - 1;
  8663. if (eq(array[index], value)) {
  8664. return index;
  8665. }
  8666. }
  8667. return -1;
  8668. }
  8669. /**
  8670. * This method is like `_.uniq` except that it's designed and optimized
  8671. * for sorted arrays.
  8672. *
  8673. * @static
  8674. * @memberOf _
  8675. * @since 4.0.0
  8676. * @category Array
  8677. * @param {Array} array The array to inspect.
  8678. * @returns {Array} Returns the new duplicate free array.
  8679. * @example
  8680. *
  8681. * _.sortedUniq([1, 1, 2]);
  8682. * // => [1, 2]
  8683. */
  8684. function sortedUniq(array) {
  8685. return (array && array.length)
  8686. ? baseSortedUniq(array)
  8687. : [];
  8688. }
  8689. /**
  8690. * This method is like `_.uniqBy` except that it's designed and optimized
  8691. * for sorted arrays.
  8692. *
  8693. * @static
  8694. * @memberOf _
  8695. * @since 4.0.0
  8696. * @category Array
  8697. * @param {Array} array The array to inspect.
  8698. * @param {Function} [iteratee] The iteratee invoked per element.
  8699. * @returns {Array} Returns the new duplicate free array.
  8700. * @example
  8701. *
  8702. * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);
  8703. * // => [1.1, 2.3]
  8704. */
  8705. function sortedUniqBy(array, iteratee) {
  8706. return (array && array.length)
  8707. ? baseSortedUniq(array, getIteratee(iteratee, 2))
  8708. : [];
  8709. }
  8710. /**
  8711. * Gets all but the first element of `array`.
  8712. *
  8713. * @static
  8714. * @memberOf _
  8715. * @since 4.0.0
  8716. * @category Array
  8717. * @param {Array} array The array to query.
  8718. * @returns {Array} Returns the slice of `array`.
  8719. * @example
  8720. *
  8721. * _.tail([1, 2, 3]);
  8722. * // => [2, 3]
  8723. */
  8724. function tail(array) {
  8725. var length = array == null ? 0 : array.length;
  8726. return length ? baseSlice(array, 1, length) : [];
  8727. }
  8728. /**
  8729. * Creates a slice of `array` with `n` elements taken from the beginning.
  8730. *
  8731. * @static
  8732. * @memberOf _
  8733. * @since 0.1.0
  8734. * @category Array
  8735. * @param {Array} array The array to query.
  8736. * @param {number} [n=1] The number of elements to take.
  8737. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  8738. * @returns {Array} Returns the slice of `array`.
  8739. * @example
  8740. *
  8741. * _.take([1, 2, 3]);
  8742. * // => [1]
  8743. *
  8744. * _.take([1, 2, 3], 2);
  8745. * // => [1, 2]
  8746. *
  8747. * _.take([1, 2, 3], 5);
  8748. * // => [1, 2, 3]
  8749. *
  8750. * _.take([1, 2, 3], 0);
  8751. * // => []
  8752. */
  8753. function take(array, n, guard) {
  8754. if (!(array && array.length)) {
  8755. return [];
  8756. }
  8757. n = (guard || n === undefined) ? 1 : toInteger(n);
  8758. return baseSlice(array, 0, n < 0 ? 0 : n);
  8759. }
  8760. /**
  8761. * Creates a slice of `array` with `n` elements taken from the end.
  8762. *
  8763. * @static
  8764. * @memberOf _
  8765. * @since 3.0.0
  8766. * @category Array
  8767. * @param {Array} array The array to query.
  8768. * @param {number} [n=1] The number of elements to take.
  8769. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  8770. * @returns {Array} Returns the slice of `array`.
  8771. * @example
  8772. *
  8773. * _.takeRight([1, 2, 3]);
  8774. * // => [3]
  8775. *
  8776. * _.takeRight([1, 2, 3], 2);
  8777. * // => [2, 3]
  8778. *
  8779. * _.takeRight([1, 2, 3], 5);
  8780. * // => [1, 2, 3]
  8781. *
  8782. * _.takeRight([1, 2, 3], 0);
  8783. * // => []
  8784. */
  8785. function takeRight(array, n, guard) {
  8786. var length = array == null ? 0 : array.length;
  8787. if (!length) {
  8788. return [];
  8789. }
  8790. n = (guard || n === undefined) ? 1 : toInteger(n);
  8791. n = length - n;
  8792. return baseSlice(array, n < 0 ? 0 : n, length);
  8793. }
  8794. /**
  8795. * Creates a slice of `array` with elements taken from the end. Elements are
  8796. * taken until `predicate` returns falsey. The predicate is invoked with
  8797. * three arguments: (value, index, array).
  8798. *
  8799. * @static
  8800. * @memberOf _
  8801. * @since 3.0.0
  8802. * @category Array
  8803. * @param {Array} array The array to query.
  8804. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  8805. * @returns {Array} Returns the slice of `array`.
  8806. * @example
  8807. *
  8808. * var users = [
  8809. * { 'user': 'barney', 'active': true },
  8810. * { 'user': 'fred', 'active': false },
  8811. * { 'user': 'pebbles', 'active': false }
  8812. * ];
  8813. *
  8814. * _.takeRightWhile(users, function(o) { return !o.active; });
  8815. * // => objects for ['fred', 'pebbles']
  8816. *
  8817. * // The `_.matches` iteratee shorthand.
  8818. * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });
  8819. * // => objects for ['pebbles']
  8820. *
  8821. * // The `_.matchesProperty` iteratee shorthand.
  8822. * _.takeRightWhile(users, ['active', false]);
  8823. * // => objects for ['fred', 'pebbles']
  8824. *
  8825. * // The `_.property` iteratee shorthand.
  8826. * _.takeRightWhile(users, 'active');
  8827. * // => []
  8828. */
  8829. function takeRightWhile(array, predicate) {
  8830. return (array && array.length)
  8831. ? baseWhile(array, getIteratee(predicate, 3), false, true)
  8832. : [];
  8833. }
  8834. /**
  8835. * Creates a slice of `array` with elements taken from the beginning. Elements
  8836. * are taken until `predicate` returns falsey. The predicate is invoked with
  8837. * three arguments: (value, index, array).
  8838. *
  8839. * @static
  8840. * @memberOf _
  8841. * @since 3.0.0
  8842. * @category Array
  8843. * @param {Array} array The array to query.
  8844. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  8845. * @returns {Array} Returns the slice of `array`.
  8846. * @example
  8847. *
  8848. * var users = [
  8849. * { 'user': 'barney', 'active': false },
  8850. * { 'user': 'fred', 'active': false },
  8851. * { 'user': 'pebbles', 'active': true }
  8852. * ];
  8853. *
  8854. * _.takeWhile(users, function(o) { return !o.active; });
  8855. * // => objects for ['barney', 'fred']
  8856. *
  8857. * // The `_.matches` iteratee shorthand.
  8858. * _.takeWhile(users, { 'user': 'barney', 'active': false });
  8859. * // => objects for ['barney']
  8860. *
  8861. * // The `_.matchesProperty` iteratee shorthand.
  8862. * _.takeWhile(users, ['active', false]);
  8863. * // => objects for ['barney', 'fred']
  8864. *
  8865. * // The `_.property` iteratee shorthand.
  8866. * _.takeWhile(users, 'active');
  8867. * // => []
  8868. */
  8869. function takeWhile(array, predicate) {
  8870. return (array && array.length)
  8871. ? baseWhile(array, getIteratee(predicate, 3))
  8872. : [];
  8873. }
  8874. /**
  8875. * Creates an array of unique values, in order, from all given arrays using
  8876. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  8877. * for equality comparisons.
  8878. *
  8879. * @static
  8880. * @memberOf _
  8881. * @since 0.1.0
  8882. * @category Array
  8883. * @param {...Array} [arrays] The arrays to inspect.
  8884. * @returns {Array} Returns the new array of combined values.
  8885. * @example
  8886. *
  8887. * _.union([2], [1, 2]);
  8888. * // => [2, 1]
  8889. */
  8890. var union = baseRest(function(arrays) {
  8891. return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));
  8892. });
  8893. /**
  8894. * This method is like `_.union` except that it accepts `iteratee` which is
  8895. * invoked for each element of each `arrays` to generate the criterion by
  8896. * which uniqueness is computed. Result values are chosen from the first
  8897. * array in which the value occurs. The iteratee is invoked with one argument:
  8898. * (value).
  8899. *
  8900. * @static
  8901. * @memberOf _
  8902. * @since 4.0.0
  8903. * @category Array
  8904. * @param {...Array} [arrays] The arrays to inspect.
  8905. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  8906. * @returns {Array} Returns the new array of combined values.
  8907. * @example
  8908. *
  8909. * _.unionBy([2.1], [1.2, 2.3], Math.floor);
  8910. * // => [2.1, 1.2]
  8911. *
  8912. * // The `_.property` iteratee shorthand.
  8913. * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
  8914. * // => [{ 'x': 1 }, { 'x': 2 }]
  8915. */
  8916. var unionBy = baseRest(function(arrays) {
  8917. var iteratee = last(arrays);
  8918. if (isArrayLikeObject(iteratee)) {
  8919. iteratee = undefined;
  8920. }
  8921. return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2));
  8922. });
  8923. /**
  8924. * This method is like `_.union` except that it accepts `comparator` which
  8925. * is invoked to compare elements of `arrays`. Result values are chosen from
  8926. * the first array in which the value occurs. The comparator is invoked
  8927. * with two arguments: (arrVal, othVal).
  8928. *
  8929. * @static
  8930. * @memberOf _
  8931. * @since 4.0.0
  8932. * @category Array
  8933. * @param {...Array} [arrays] The arrays to inspect.
  8934. * @param {Function} [comparator] The comparator invoked per element.
  8935. * @returns {Array} Returns the new array of combined values.
  8936. * @example
  8937. *
  8938. * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
  8939. * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
  8940. *
  8941. * _.unionWith(objects, others, _.isEqual);
  8942. * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
  8943. */
  8944. var unionWith = baseRest(function(arrays) {
  8945. var comparator = last(arrays);
  8946. comparator = typeof comparator == 'function' ? comparator : undefined;
  8947. return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);
  8948. });
  8949. /**
  8950. * Creates a duplicate-free version of an array, using
  8951. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  8952. * for equality comparisons, in which only the first occurrence of each element
  8953. * is kept. The order of result values is determined by the order they occur
  8954. * in the array.
  8955. *
  8956. * @static
  8957. * @memberOf _
  8958. * @since 0.1.0
  8959. * @category Array
  8960. * @param {Array} array The array to inspect.
  8961. * @returns {Array} Returns the new duplicate free array.
  8962. * @example
  8963. *
  8964. * _.uniq([2, 1, 2]);
  8965. * // => [2, 1]
  8966. */
  8967. function uniq(array) {
  8968. return (array && array.length) ? baseUniq(array) : [];
  8969. }
  8970. /**
  8971. * This method is like `_.uniq` except that it accepts `iteratee` which is
  8972. * invoked for each element in `array` to generate the criterion by which
  8973. * uniqueness is computed. The order of result values is determined by the
  8974. * order they occur in the array. The iteratee is invoked with one argument:
  8975. * (value).
  8976. *
  8977. * @static
  8978. * @memberOf _
  8979. * @since 4.0.0
  8980. * @category Array
  8981. * @param {Array} array The array to inspect.
  8982. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  8983. * @returns {Array} Returns the new duplicate free array.
  8984. * @example
  8985. *
  8986. * _.uniqBy([2.1, 1.2, 2.3], Math.floor);
  8987. * // => [2.1, 1.2]
  8988. *
  8989. * // The `_.property` iteratee shorthand.
  8990. * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
  8991. * // => [{ 'x': 1 }, { 'x': 2 }]
  8992. */
  8993. function uniqBy(array, iteratee) {
  8994. return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : [];
  8995. }
  8996. /**
  8997. * This method is like `_.uniq` except that it accepts `comparator` which
  8998. * is invoked to compare elements of `array`. The order of result values is
  8999. * determined by the order they occur in the array.The comparator is invoked
  9000. * with two arguments: (arrVal, othVal).
  9001. *
  9002. * @static
  9003. * @memberOf _
  9004. * @since 4.0.0
  9005. * @category Array
  9006. * @param {Array} array The array to inspect.
  9007. * @param {Function} [comparator] The comparator invoked per element.
  9008. * @returns {Array} Returns the new duplicate free array.
  9009. * @example
  9010. *
  9011. * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];
  9012. *
  9013. * _.uniqWith(objects, _.isEqual);
  9014. * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]
  9015. */
  9016. function uniqWith(array, comparator) {
  9017. comparator = typeof comparator == 'function' ? comparator : undefined;
  9018. return (array && array.length) ? baseUniq(array, undefined, comparator) : [];
  9019. }
  9020. /**
  9021. * This method is like `_.zip` except that it accepts an array of grouped
  9022. * elements and creates an array regrouping the elements to their pre-zip
  9023. * configuration.
  9024. *
  9025. * @static
  9026. * @memberOf _
  9027. * @since 1.2.0
  9028. * @category Array
  9029. * @param {Array} array The array of grouped elements to process.
  9030. * @returns {Array} Returns the new array of regrouped elements.
  9031. * @example
  9032. *
  9033. * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);
  9034. * // => [['a', 1, true], ['b', 2, false]]
  9035. *
  9036. * _.unzip(zipped);
  9037. * // => [['a', 'b'], [1, 2], [true, false]]
  9038. */
  9039. function unzip(array) {
  9040. if (!(array && array.length)) {
  9041. return [];
  9042. }
  9043. var length = 0;
  9044. array = arrayFilter(array, function(group) {
  9045. if (isArrayLikeObject(group)) {
  9046. length = nativeMax(group.length, length);
  9047. return true;
  9048. }
  9049. });
  9050. return baseTimes(length, function(index) {
  9051. return arrayMap(array, baseProperty(index));
  9052. });
  9053. }
  9054. /**
  9055. * This method is like `_.unzip` except that it accepts `iteratee` to specify
  9056. * how regrouped values should be combined. The iteratee is invoked with the
  9057. * elements of each group: (...group).
  9058. *
  9059. * @static
  9060. * @memberOf _
  9061. * @since 3.8.0
  9062. * @category Array
  9063. * @param {Array} array The array of grouped elements to process.
  9064. * @param {Function} [iteratee=_.identity] The function to combine
  9065. * regrouped values.
  9066. * @returns {Array} Returns the new array of regrouped elements.
  9067. * @example
  9068. *
  9069. * var zipped = _.zip([1, 2], [10, 20], [100, 200]);
  9070. * // => [[1, 10, 100], [2, 20, 200]]
  9071. *
  9072. * _.unzipWith(zipped, _.add);
  9073. * // => [3, 30, 300]
  9074. */
  9075. function unzipWith(array, iteratee) {
  9076. if (!(array && array.length)) {
  9077. return [];
  9078. }
  9079. var result = unzip(array);
  9080. if (iteratee == null) {
  9081. return result;
  9082. }
  9083. return arrayMap(result, function(group) {
  9084. return apply(iteratee, undefined, group);
  9085. });
  9086. }
  9087. /**
  9088. * Creates an array excluding all given values using
  9089. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  9090. * for equality comparisons.
  9091. *
  9092. * **Note:** Unlike `_.pull`, this method returns a new array.
  9093. *
  9094. * @static
  9095. * @memberOf _
  9096. * @since 0.1.0
  9097. * @category Array
  9098. * @param {Array} array The array to inspect.
  9099. * @param {...*} [values] The values to exclude.
  9100. * @returns {Array} Returns the new array of filtered values.
  9101. * @see _.difference, _.xor
  9102. * @example
  9103. *
  9104. * _.without([2, 1, 2, 3], 1, 2);
  9105. * // => [3]
  9106. */
  9107. var without = baseRest(function(array, values) {
  9108. return isArrayLikeObject(array)
  9109. ? baseDifference(array, values)
  9110. : [];
  9111. });
  9112. /**
  9113. * Creates an array of unique values that is the
  9114. * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)
  9115. * of the given arrays. The order of result values is determined by the order
  9116. * they occur in the arrays.
  9117. *
  9118. * @static
  9119. * @memberOf _
  9120. * @since 2.4.0
  9121. * @category Array
  9122. * @param {...Array} [arrays] The arrays to inspect.
  9123. * @returns {Array} Returns the new array of filtered values.
  9124. * @see _.difference, _.without
  9125. * @example
  9126. *
  9127. * _.xor([2, 1], [2, 3]);
  9128. * // => [1, 3]
  9129. */
  9130. var xor = baseRest(function(arrays) {
  9131. return baseXor(arrayFilter(arrays, isArrayLikeObject));
  9132. });
  9133. /**
  9134. * This method is like `_.xor` except that it accepts `iteratee` which is
  9135. * invoked for each element of each `arrays` to generate the criterion by
  9136. * which by which they're compared. The order of result values is determined
  9137. * by the order they occur in the arrays. The iteratee is invoked with one
  9138. * argument: (value).
  9139. *
  9140. * @static
  9141. * @memberOf _
  9142. * @since 4.0.0
  9143. * @category Array
  9144. * @param {...Array} [arrays] The arrays to inspect.
  9145. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  9146. * @returns {Array} Returns the new array of filtered values.
  9147. * @example
  9148. *
  9149. * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);
  9150. * // => [1.2, 3.4]
  9151. *
  9152. * // The `_.property` iteratee shorthand.
  9153. * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
  9154. * // => [{ 'x': 2 }]
  9155. */
  9156. var xorBy = baseRest(function(arrays) {
  9157. var iteratee = last(arrays);
  9158. if (isArrayLikeObject(iteratee)) {
  9159. iteratee = undefined;
  9160. }
  9161. return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));
  9162. });
  9163. /**
  9164. * This method is like `_.xor` except that it accepts `comparator` which is
  9165. * invoked to compare elements of `arrays`. The order of result values is
  9166. * determined by the order they occur in the arrays. The comparator is invoked
  9167. * with two arguments: (arrVal, othVal).
  9168. *
  9169. * @static
  9170. * @memberOf _
  9171. * @since 4.0.0
  9172. * @category Array
  9173. * @param {...Array} [arrays] The arrays to inspect.
  9174. * @param {Function} [comparator] The comparator invoked per element.
  9175. * @returns {Array} Returns the new array of filtered values.
  9176. * @example
  9177. *
  9178. * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
  9179. * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
  9180. *
  9181. * _.xorWith(objects, others, _.isEqual);
  9182. * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
  9183. */
  9184. var xorWith = baseRest(function(arrays) {
  9185. var comparator = last(arrays);
  9186. comparator = typeof comparator == 'function' ? comparator : undefined;
  9187. return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);
  9188. });
  9189. /**
  9190. * Creates an array of grouped elements, the first of which contains the
  9191. * first elements of the given arrays, the second of which contains the
  9192. * second elements of the given arrays, and so on.
  9193. *
  9194. * @static
  9195. * @memberOf _
  9196. * @since 0.1.0
  9197. * @category Array
  9198. * @param {...Array} [arrays] The arrays to process.
  9199. * @returns {Array} Returns the new array of grouped elements.
  9200. * @example
  9201. *
  9202. * _.zip(['a', 'b'], [1, 2], [true, false]);
  9203. * // => [['a', 1, true], ['b', 2, false]]
  9204. */
  9205. var zip = baseRest(unzip);
  9206. /**
  9207. * This method is like `_.fromPairs` except that it accepts two arrays,
  9208. * one of property identifiers and one of corresponding values.
  9209. *
  9210. * @static
  9211. * @memberOf _
  9212. * @since 0.4.0
  9213. * @category Array
  9214. * @param {Array} [props=[]] The property identifiers.
  9215. * @param {Array} [values=[]] The property values.
  9216. * @returns {Object} Returns the new object.
  9217. * @example
  9218. *
  9219. * _.zipObject(['a', 'b'], [1, 2]);
  9220. * // => { 'a': 1, 'b': 2 }
  9221. */
  9222. function zipObject(props, values) {
  9223. return baseZipObject(props || [], values || [], assignValue);
  9224. }
  9225. /**
  9226. * This method is like `_.zipObject` except that it supports property paths.
  9227. *
  9228. * @static
  9229. * @memberOf _
  9230. * @since 4.1.0
  9231. * @category Array
  9232. * @param {Array} [props=[]] The property identifiers.
  9233. * @param {Array} [values=[]] The property values.
  9234. * @returns {Object} Returns the new object.
  9235. * @example
  9236. *
  9237. * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);
  9238. * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }
  9239. */
  9240. function zipObjectDeep(props, values) {
  9241. return baseZipObject(props || [], values || [], baseSet);
  9242. }
  9243. /**
  9244. * This method is like `_.zip` except that it accepts `iteratee` to specify
  9245. * how grouped values should be combined. The iteratee is invoked with the
  9246. * elements of each group: (...group).
  9247. *
  9248. * @static
  9249. * @memberOf _
  9250. * @since 3.8.0
  9251. * @category Array
  9252. * @param {...Array} [arrays] The arrays to process.
  9253. * @param {Function} [iteratee=_.identity] The function to combine
  9254. * grouped values.
  9255. * @returns {Array} Returns the new array of grouped elements.
  9256. * @example
  9257. *
  9258. * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {
  9259. * return a + b + c;
  9260. * });
  9261. * // => [111, 222]
  9262. */
  9263. var zipWith = baseRest(function(arrays) {
  9264. var length = arrays.length,
  9265. iteratee = length > 1 ? arrays[length - 1] : undefined;
  9266. iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;
  9267. return unzipWith(arrays, iteratee);
  9268. });
  9269. /*------------------------------------------------------------------------*/
  9270. /**
  9271. * Creates a `lodash` wrapper instance that wraps `value` with explicit method
  9272. * chain sequences enabled. The result of such sequences must be unwrapped
  9273. * with `_#value`.
  9274. *
  9275. * @static
  9276. * @memberOf _
  9277. * @since 1.3.0
  9278. * @category Seq
  9279. * @param {*} value The value to wrap.
  9280. * @returns {Object} Returns the new `lodash` wrapper instance.
  9281. * @example
  9282. *
  9283. * var users = [
  9284. * { 'user': 'barney', 'age': 36 },
  9285. * { 'user': 'fred', 'age': 40 },
  9286. * { 'user': 'pebbles', 'age': 1 }
  9287. * ];
  9288. *
  9289. * var youngest = _
  9290. * .chain(users)
  9291. * .sortBy('age')
  9292. * .map(function(o) {
  9293. * return o.user + ' is ' + o.age;
  9294. * })
  9295. * .head()
  9296. * .value();
  9297. * // => 'pebbles is 1'
  9298. */
  9299. function chain(value) {
  9300. var result = lodash(value);
  9301. result.__chain__ = true;
  9302. return result;
  9303. }
  9304. /**
  9305. * This method invokes `interceptor` and returns `value`. The interceptor
  9306. * is invoked with one argument; (value). The purpose of this method is to
  9307. * "tap into" a method chain sequence in order to modify intermediate results.
  9308. *
  9309. * @static
  9310. * @memberOf _
  9311. * @since 0.1.0
  9312. * @category Seq
  9313. * @param {*} value The value to provide to `interceptor`.
  9314. * @param {Function} interceptor The function to invoke.
  9315. * @returns {*} Returns `value`.
  9316. * @example
  9317. *
  9318. * _([1, 2, 3])
  9319. * .tap(function(array) {
  9320. * // Mutate input array.
  9321. * array.pop();
  9322. * })
  9323. * .reverse()
  9324. * .value();
  9325. * // => [2, 1]
  9326. */
  9327. function tap(value, interceptor) {
  9328. interceptor(value);
  9329. return value;
  9330. }
  9331. /**
  9332. * This method is like `_.tap` except that it returns the result of `interceptor`.
  9333. * The purpose of this method is to "pass thru" values replacing intermediate
  9334. * results in a method chain sequence.
  9335. *
  9336. * @static
  9337. * @memberOf _
  9338. * @since 3.0.0
  9339. * @category Seq
  9340. * @param {*} value The value to provide to `interceptor`.
  9341. * @param {Function} interceptor The function to invoke.
  9342. * @returns {*} Returns the result of `interceptor`.
  9343. * @example
  9344. *
  9345. * _(' abc ')
  9346. * .chain()
  9347. * .trim()
  9348. * .thru(function(value) {
  9349. * return [value];
  9350. * })
  9351. * .value();
  9352. * // => ['abc']
  9353. */
  9354. function thru(value, interceptor) {
  9355. return interceptor(value);
  9356. }
  9357. /**
  9358. * This method is the wrapper version of `_.at`.
  9359. *
  9360. * @name at
  9361. * @memberOf _
  9362. * @since 1.0.0
  9363. * @category Seq
  9364. * @param {...(string|string[])} [paths] The property paths to pick.
  9365. * @returns {Object} Returns the new `lodash` wrapper instance.
  9366. * @example
  9367. *
  9368. * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
  9369. *
  9370. * _(object).at(['a[0].b.c', 'a[1]']).value();
  9371. * // => [3, 4]
  9372. */
  9373. var wrapperAt = flatRest(function(paths) {
  9374. var length = paths.length,
  9375. start = length ? paths[0] : 0,
  9376. value = this.__wrapped__,
  9377. interceptor = function(object) { return baseAt(object, paths); };
  9378. if (length > 1 || this.__actions__.length ||
  9379. !(value instanceof LazyWrapper) || !isIndex(start)) {
  9380. return this.thru(interceptor);
  9381. }
  9382. value = value.slice(start, +start + (length ? 1 : 0));
  9383. value.__actions__.push({
  9384. 'func': thru,
  9385. 'args': [interceptor],
  9386. 'thisArg': undefined
  9387. });
  9388. return new LodashWrapper(value, this.__chain__).thru(function(array) {
  9389. if (length && !array.length) {
  9390. array.push(undefined);
  9391. }
  9392. return array;
  9393. });
  9394. });
  9395. /**
  9396. * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.
  9397. *
  9398. * @name chain
  9399. * @memberOf _
  9400. * @since 0.1.0
  9401. * @category Seq
  9402. * @returns {Object} Returns the new `lodash` wrapper instance.
  9403. * @example
  9404. *
  9405. * var users = [
  9406. * { 'user': 'barney', 'age': 36 },
  9407. * { 'user': 'fred', 'age': 40 }
  9408. * ];
  9409. *
  9410. * // A sequence without explicit chaining.
  9411. * _(users).head();
  9412. * // => { 'user': 'barney', 'age': 36 }
  9413. *
  9414. * // A sequence with explicit chaining.
  9415. * _(users)
  9416. * .chain()
  9417. * .head()
  9418. * .pick('user')
  9419. * .value();
  9420. * // => { 'user': 'barney' }
  9421. */
  9422. function wrapperChain() {
  9423. return chain(this);
  9424. }
  9425. /**
  9426. * Executes the chain sequence and returns the wrapped result.
  9427. *
  9428. * @name commit
  9429. * @memberOf _
  9430. * @since 3.2.0
  9431. * @category Seq
  9432. * @returns {Object} Returns the new `lodash` wrapper instance.
  9433. * @example
  9434. *
  9435. * var array = [1, 2];
  9436. * var wrapped = _(array).push(3);
  9437. *
  9438. * console.log(array);
  9439. * // => [1, 2]
  9440. *
  9441. * wrapped = wrapped.commit();
  9442. * console.log(array);
  9443. * // => [1, 2, 3]
  9444. *
  9445. * wrapped.last();
  9446. * // => 3
  9447. *
  9448. * console.log(array);
  9449. * // => [1, 2, 3]
  9450. */
  9451. function wrapperCommit() {
  9452. return new LodashWrapper(this.value(), this.__chain__);
  9453. }
  9454. /**
  9455. * Gets the next value on a wrapped object following the
  9456. * [iterator protocol](https://mdn.io/iteration_protocols#iterator).
  9457. *
  9458. * @name next
  9459. * @memberOf _
  9460. * @since 4.0.0
  9461. * @category Seq
  9462. * @returns {Object} Returns the next iterator value.
  9463. * @example
  9464. *
  9465. * var wrapped = _([1, 2]);
  9466. *
  9467. * wrapped.next();
  9468. * // => { 'done': false, 'value': 1 }
  9469. *
  9470. * wrapped.next();
  9471. * // => { 'done': false, 'value': 2 }
  9472. *
  9473. * wrapped.next();
  9474. * // => { 'done': true, 'value': undefined }
  9475. */
  9476. function wrapperNext() {
  9477. if (this.__values__ === undefined) {
  9478. this.__values__ = toArray(this.value());
  9479. }
  9480. var done = this.__index__ >= this.__values__.length,
  9481. value = done ? undefined : this.__values__[this.__index__++];
  9482. return { 'done': done, 'value': value };
  9483. }
  9484. /**
  9485. * Enables the wrapper to be iterable.
  9486. *
  9487. * @name Symbol.iterator
  9488. * @memberOf _
  9489. * @since 4.0.0
  9490. * @category Seq
  9491. * @returns {Object} Returns the wrapper object.
  9492. * @example
  9493. *
  9494. * var wrapped = _([1, 2]);
  9495. *
  9496. * wrapped[Symbol.iterator]() === wrapped;
  9497. * // => true
  9498. *
  9499. * Array.from(wrapped);
  9500. * // => [1, 2]
  9501. */
  9502. function wrapperToIterator() {
  9503. return this;
  9504. }
  9505. /**
  9506. * Creates a clone of the chain sequence planting `value` as the wrapped value.
  9507. *
  9508. * @name plant
  9509. * @memberOf _
  9510. * @since 3.2.0
  9511. * @category Seq
  9512. * @param {*} value The value to plant.
  9513. * @returns {Object} Returns the new `lodash` wrapper instance.
  9514. * @example
  9515. *
  9516. * function square(n) {
  9517. * return n * n;
  9518. * }
  9519. *
  9520. * var wrapped = _([1, 2]).map(square);
  9521. * var other = wrapped.plant([3, 4]);
  9522. *
  9523. * other.value();
  9524. * // => [9, 16]
  9525. *
  9526. * wrapped.value();
  9527. * // => [1, 4]
  9528. */
  9529. function wrapperPlant(value) {
  9530. var result,
  9531. parent = this;
  9532. while (parent instanceof baseLodash) {
  9533. var clone = wrapperClone(parent);
  9534. clone.__index__ = 0;
  9535. clone.__values__ = undefined;
  9536. if (result) {
  9537. previous.__wrapped__ = clone;
  9538. } else {
  9539. result = clone;
  9540. }
  9541. var previous = clone;
  9542. parent = parent.__wrapped__;
  9543. }
  9544. previous.__wrapped__ = value;
  9545. return result;
  9546. }
  9547. /**
  9548. * This method is the wrapper version of `_.reverse`.
  9549. *
  9550. * **Note:** This method mutates the wrapped array.
  9551. *
  9552. * @name reverse
  9553. * @memberOf _
  9554. * @since 0.1.0
  9555. * @category Seq
  9556. * @returns {Object} Returns the new `lodash` wrapper instance.
  9557. * @example
  9558. *
  9559. * var array = [1, 2, 3];
  9560. *
  9561. * _(array).reverse().value()
  9562. * // => [3, 2, 1]
  9563. *
  9564. * console.log(array);
  9565. * // => [3, 2, 1]
  9566. */
  9567. function wrapperReverse() {
  9568. var value = this.__wrapped__;
  9569. if (value instanceof LazyWrapper) {
  9570. var wrapped = value;
  9571. if (this.__actions__.length) {
  9572. wrapped = new LazyWrapper(this);
  9573. }
  9574. wrapped = wrapped.reverse();
  9575. wrapped.__actions__.push({
  9576. 'func': thru,
  9577. 'args': [reverse],
  9578. 'thisArg': undefined
  9579. });
  9580. return new LodashWrapper(wrapped, this.__chain__);
  9581. }
  9582. return this.thru(reverse);
  9583. }
  9584. /**
  9585. * Executes the chain sequence to resolve the unwrapped value.
  9586. *
  9587. * @name value
  9588. * @memberOf _
  9589. * @since 0.1.0
  9590. * @alias toJSON, valueOf
  9591. * @category Seq
  9592. * @returns {*} Returns the resolved unwrapped value.
  9593. * @example
  9594. *
  9595. * _([1, 2, 3]).value();
  9596. * // => [1, 2, 3]
  9597. */
  9598. function wrapperValue() {
  9599. return baseWrapperValue(this.__wrapped__, this.__actions__);
  9600. }
  9601. /*------------------------------------------------------------------------*/
  9602. /**
  9603. * Creates an object composed of keys generated from the results of running
  9604. * each element of `collection` thru `iteratee`. The corresponding value of
  9605. * each key is the number of times the key was returned by `iteratee`. The
  9606. * iteratee is invoked with one argument: (value).
  9607. *
  9608. * @static
  9609. * @memberOf _
  9610. * @since 0.5.0
  9611. * @category Collection
  9612. * @param {Array|Object} collection The collection to iterate over.
  9613. * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
  9614. * @returns {Object} Returns the composed aggregate object.
  9615. * @example
  9616. *
  9617. * _.countBy([6.1, 4.2, 6.3], Math.floor);
  9618. * // => { '4': 1, '6': 2 }
  9619. *
  9620. * // The `_.property` iteratee shorthand.
  9621. * _.countBy(['one', 'two', 'three'], 'length');
  9622. * // => { '3': 2, '5': 1 }
  9623. */
  9624. var countBy = createAggregator(function(result, value, key) {
  9625. if (hasOwnProperty.call(result, key)) {
  9626. ++result[key];
  9627. } else {
  9628. baseAssignValue(result, key, 1);
  9629. }
  9630. });
  9631. /**
  9632. * Checks if `predicate` returns truthy for **all** elements of `collection`.
  9633. * Iteration is stopped once `predicate` returns falsey. The predicate is
  9634. * invoked with three arguments: (value, index|key, collection).
  9635. *
  9636. * **Note:** This method returns `true` for
  9637. * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because
  9638. * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of
  9639. * elements of empty collections.
  9640. *
  9641. * @static
  9642. * @memberOf _
  9643. * @since 0.1.0
  9644. * @category Collection
  9645. * @param {Array|Object} collection The collection to iterate over.
  9646. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  9647. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  9648. * @returns {boolean} Returns `true` if all elements pass the predicate check,
  9649. * else `false`.
  9650. * @example
  9651. *
  9652. * _.every([true, 1, null, 'yes'], Boolean);
  9653. * // => false
  9654. *
  9655. * var users = [
  9656. * { 'user': 'barney', 'age': 36, 'active': false },
  9657. * { 'user': 'fred', 'age': 40, 'active': false }
  9658. * ];
  9659. *
  9660. * // The `_.matches` iteratee shorthand.
  9661. * _.every(users, { 'user': 'barney', 'active': false });
  9662. * // => false
  9663. *
  9664. * // The `_.matchesProperty` iteratee shorthand.
  9665. * _.every(users, ['active', false]);
  9666. * // => true
  9667. *
  9668. * // The `_.property` iteratee shorthand.
  9669. * _.every(users, 'active');
  9670. * // => false
  9671. */
  9672. function every(collection, predicate, guard) {
  9673. var func = isArray(collection) ? arrayEvery : baseEvery;
  9674. if (guard && isIterateeCall(collection, predicate, guard)) {
  9675. predicate = undefined;
  9676. }
  9677. return func(collection, getIteratee(predicate, 3));
  9678. }
  9679. /**
  9680. * Iterates over elements of `collection`, returning an array of all elements
  9681. * `predicate` returns truthy for. The predicate is invoked with three
  9682. * arguments: (value, index|key, collection).
  9683. *
  9684. * **Note:** Unlike `_.remove`, this method returns a new array.
  9685. *
  9686. * @static
  9687. * @memberOf _
  9688. * @since 0.1.0
  9689. * @category Collection
  9690. * @param {Array|Object} collection The collection to iterate over.
  9691. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  9692. * @returns {Array} Returns the new filtered array.
  9693. * @see _.reject
  9694. * @example
  9695. *
  9696. * var users = [
  9697. * { 'user': 'barney', 'age': 36, 'active': true },
  9698. * { 'user': 'fred', 'age': 40, 'active': false }
  9699. * ];
  9700. *
  9701. * _.filter(users, function(o) { return !o.active; });
  9702. * // => objects for ['fred']
  9703. *
  9704. * // The `_.matches` iteratee shorthand.
  9705. * _.filter(users, { 'age': 36, 'active': true });
  9706. * // => objects for ['barney']
  9707. *
  9708. * // The `_.matchesProperty` iteratee shorthand.
  9709. * _.filter(users, ['active', false]);
  9710. * // => objects for ['fred']
  9711. *
  9712. * // The `_.property` iteratee shorthand.
  9713. * _.filter(users, 'active');
  9714. * // => objects for ['barney']
  9715. *
  9716. * // Combining several predicates using `_.overEvery` or `_.overSome`.
  9717. * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));
  9718. * // => objects for ['fred', 'barney']
  9719. */
  9720. function filter(collection, predicate) {
  9721. var func = isArray(collection) ? arrayFilter : baseFilter;
  9722. return func(collection, getIteratee(predicate, 3));
  9723. }
  9724. /**
  9725. * Iterates over elements of `collection`, returning the first element
  9726. * `predicate` returns truthy for. The predicate is invoked with three
  9727. * arguments: (value, index|key, collection).
  9728. *
  9729. * @static
  9730. * @memberOf _
  9731. * @since 0.1.0
  9732. * @category Collection
  9733. * @param {Array|Object} collection The collection to inspect.
  9734. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  9735. * @param {number} [fromIndex=0] The index to search from.
  9736. * @returns {*} Returns the matched element, else `undefined`.
  9737. * @example
  9738. *
  9739. * var users = [
  9740. * { 'user': 'barney', 'age': 36, 'active': true },
  9741. * { 'user': 'fred', 'age': 40, 'active': false },
  9742. * { 'user': 'pebbles', 'age': 1, 'active': true }
  9743. * ];
  9744. *
  9745. * _.find(users, function(o) { return o.age < 40; });
  9746. * // => object for 'barney'
  9747. *
  9748. * // The `_.matches` iteratee shorthand.
  9749. * _.find(users, { 'age': 1, 'active': true });
  9750. * // => object for 'pebbles'
  9751. *
  9752. * // The `_.matchesProperty` iteratee shorthand.
  9753. * _.find(users, ['active', false]);
  9754. * // => object for 'fred'
  9755. *
  9756. * // The `_.property` iteratee shorthand.
  9757. * _.find(users, 'active');
  9758. * // => object for 'barney'
  9759. */
  9760. var find = createFind(findIndex);
  9761. /**
  9762. * This method is like `_.find` except that it iterates over elements of
  9763. * `collection` from right to left.
  9764. *
  9765. * @static
  9766. * @memberOf _
  9767. * @since 2.0.0
  9768. * @category Collection
  9769. * @param {Array|Object} collection The collection to inspect.
  9770. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  9771. * @param {number} [fromIndex=collection.length-1] The index to search from.
  9772. * @returns {*} Returns the matched element, else `undefined`.
  9773. * @example
  9774. *
  9775. * _.findLast([1, 2, 3, 4], function(n) {
  9776. * return n % 2 == 1;
  9777. * });
  9778. * // => 3
  9779. */
  9780. var findLast = createFind(findLastIndex);
  9781. /**
  9782. * Creates a flattened array of values by running each element in `collection`
  9783. * thru `iteratee` and flattening the mapped results. The iteratee is invoked
  9784. * with three arguments: (value, index|key, collection).
  9785. *
  9786. * @static
  9787. * @memberOf _
  9788. * @since 4.0.0
  9789. * @category Collection
  9790. * @param {Array|Object} collection The collection to iterate over.
  9791. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  9792. * @returns {Array} Returns the new flattened array.
  9793. * @example
  9794. *
  9795. * function duplicate(n) {
  9796. * return [n, n];
  9797. * }
  9798. *
  9799. * _.flatMap([1, 2], duplicate);
  9800. * // => [1, 1, 2, 2]
  9801. */
  9802. function flatMap(collection, iteratee) {
  9803. return baseFlatten(map(collection, iteratee), 1);
  9804. }
  9805. /**
  9806. * This method is like `_.flatMap` except that it recursively flattens the
  9807. * mapped results.
  9808. *
  9809. * @static
  9810. * @memberOf _
  9811. * @since 4.7.0
  9812. * @category Collection
  9813. * @param {Array|Object} collection The collection to iterate over.
  9814. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  9815. * @returns {Array} Returns the new flattened array.
  9816. * @example
  9817. *
  9818. * function duplicate(n) {
  9819. * return [[[n, n]]];
  9820. * }
  9821. *
  9822. * _.flatMapDeep([1, 2], duplicate);
  9823. * // => [1, 1, 2, 2]
  9824. */
  9825. function flatMapDeep(collection, iteratee) {
  9826. return baseFlatten(map(collection, iteratee), INFINITY);
  9827. }
  9828. /**
  9829. * This method is like `_.flatMap` except that it recursively flattens the
  9830. * mapped results up to `depth` times.
  9831. *
  9832. * @static
  9833. * @memberOf _
  9834. * @since 4.7.0
  9835. * @category Collection
  9836. * @param {Array|Object} collection The collection to iterate over.
  9837. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  9838. * @param {number} [depth=1] The maximum recursion depth.
  9839. * @returns {Array} Returns the new flattened array.
  9840. * @example
  9841. *
  9842. * function duplicate(n) {
  9843. * return [[[n, n]]];
  9844. * }
  9845. *
  9846. * _.flatMapDepth([1, 2], duplicate, 2);
  9847. * // => [[1, 1], [2, 2]]
  9848. */
  9849. function flatMapDepth(collection, iteratee, depth) {
  9850. depth = depth === undefined ? 1 : toInteger(depth);
  9851. return baseFlatten(map(collection, iteratee), depth);
  9852. }
  9853. /**
  9854. * Iterates over elements of `collection` and invokes `iteratee` for each element.
  9855. * The iteratee is invoked with three arguments: (value, index|key, collection).
  9856. * Iteratee functions may exit iteration early by explicitly returning `false`.
  9857. *
  9858. * **Note:** As with other "Collections" methods, objects with a "length"
  9859. * property are iterated like arrays. To avoid this behavior use `_.forIn`
  9860. * or `_.forOwn` for object iteration.
  9861. *
  9862. * @static
  9863. * @memberOf _
  9864. * @since 0.1.0
  9865. * @alias each
  9866. * @category Collection
  9867. * @param {Array|Object} collection The collection to iterate over.
  9868. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  9869. * @returns {Array|Object} Returns `collection`.
  9870. * @see _.forEachRight
  9871. * @example
  9872. *
  9873. * _.forEach([1, 2], function(value) {
  9874. * console.log(value);
  9875. * });
  9876. * // => Logs `1` then `2`.
  9877. *
  9878. * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
  9879. * console.log(key);
  9880. * });
  9881. * // => Logs 'a' then 'b' (iteration order is not guaranteed).
  9882. */
  9883. function forEach(collection, iteratee) {
  9884. var func = isArray(collection) ? arrayEach : baseEach;
  9885. return func(collection, getIteratee(iteratee, 3));
  9886. }
  9887. /**
  9888. * This method is like `_.forEach` except that it iterates over elements of
  9889. * `collection` from right to left.
  9890. *
  9891. * @static
  9892. * @memberOf _
  9893. * @since 2.0.0
  9894. * @alias eachRight
  9895. * @category Collection
  9896. * @param {Array|Object} collection The collection to iterate over.
  9897. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  9898. * @returns {Array|Object} Returns `collection`.
  9899. * @see _.forEach
  9900. * @example
  9901. *
  9902. * _.forEachRight([1, 2], function(value) {
  9903. * console.log(value);
  9904. * });
  9905. * // => Logs `2` then `1`.
  9906. */
  9907. function forEachRight(collection, iteratee) {
  9908. var func = isArray(collection) ? arrayEachRight : baseEachRight;
  9909. return func(collection, getIteratee(iteratee, 3));
  9910. }
  9911. /**
  9912. * Creates an object composed of keys generated from the results of running
  9913. * each element of `collection` thru `iteratee`. The order of grouped values
  9914. * is determined by the order they occur in `collection`. The corresponding
  9915. * value of each key is an array of elements responsible for generating the
  9916. * key. The iteratee is invoked with one argument: (value).
  9917. *
  9918. * @static
  9919. * @memberOf _
  9920. * @since 0.1.0
  9921. * @category Collection
  9922. * @param {Array|Object} collection The collection to iterate over.
  9923. * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
  9924. * @returns {Object} Returns the composed aggregate object.
  9925. * @example
  9926. *
  9927. * _.groupBy([6.1, 4.2, 6.3], Math.floor);
  9928. * // => { '4': [4.2], '6': [6.1, 6.3] }
  9929. *
  9930. * // The `_.property` iteratee shorthand.
  9931. * _.groupBy(['one', 'two', 'three'], 'length');
  9932. * // => { '3': ['one', 'two'], '5': ['three'] }
  9933. */
  9934. var groupBy = createAggregator(function(result, value, key) {
  9935. if (hasOwnProperty.call(result, key)) {
  9936. result[key].push(value);
  9937. } else {
  9938. baseAssignValue(result, key, [value]);
  9939. }
  9940. });
  9941. /**
  9942. * Checks if `value` is in `collection`. If `collection` is a string, it's
  9943. * checked for a substring of `value`, otherwise
  9944. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  9945. * is used for equality comparisons. If `fromIndex` is negative, it's used as
  9946. * the offset from the end of `collection`.
  9947. *
  9948. * @static
  9949. * @memberOf _
  9950. * @since 0.1.0
  9951. * @category Collection
  9952. * @param {Array|Object|string} collection The collection to inspect.
  9953. * @param {*} value The value to search for.
  9954. * @param {number} [fromIndex=0] The index to search from.
  9955. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
  9956. * @returns {boolean} Returns `true` if `value` is found, else `false`.
  9957. * @example
  9958. *
  9959. * _.includes([1, 2, 3], 1);
  9960. * // => true
  9961. *
  9962. * _.includes([1, 2, 3], 1, 2);
  9963. * // => false
  9964. *
  9965. * _.includes({ 'a': 1, 'b': 2 }, 1);
  9966. * // => true
  9967. *
  9968. * _.includes('abcd', 'bc');
  9969. * // => true
  9970. */
  9971. function includes(collection, value, fromIndex, guard) {
  9972. collection = isArrayLike(collection) ? collection : values(collection);
  9973. fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;
  9974. var length = collection.length;
  9975. if (fromIndex < 0) {
  9976. fromIndex = nativeMax(length + fromIndex, 0);
  9977. }
  9978. return isString(collection)
  9979. ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)
  9980. : (!!length && baseIndexOf(collection, value, fromIndex) > -1);
  9981. }
  9982. /**
  9983. * Invokes the method at `path` of each element in `collection`, returning
  9984. * an array of the results of each invoked method. Any additional arguments
  9985. * are provided to each invoked method. If `path` is a function, it's invoked
  9986. * for, and `this` bound to, each element in `collection`.
  9987. *
  9988. * @static
  9989. * @memberOf _
  9990. * @since 4.0.0
  9991. * @category Collection
  9992. * @param {Array|Object} collection The collection to iterate over.
  9993. * @param {Array|Function|string} path The path of the method to invoke or
  9994. * the function invoked per iteration.
  9995. * @param {...*} [args] The arguments to invoke each method with.
  9996. * @returns {Array} Returns the array of results.
  9997. * @example
  9998. *
  9999. * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');
  10000. * // => [[1, 5, 7], [1, 2, 3]]
  10001. *
  10002. * _.invokeMap([123, 456], String.prototype.split, '');
  10003. * // => [['1', '2', '3'], ['4', '5', '6']]
  10004. */
  10005. var invokeMap = baseRest(function(collection, path, args) {
  10006. var index = -1,
  10007. isFunc = typeof path == 'function',
  10008. result = isArrayLike(collection) ? Array(collection.length) : [];
  10009. baseEach(collection, function(value) {
  10010. result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);
  10011. });
  10012. return result;
  10013. });
  10014. /**
  10015. * Creates an object composed of keys generated from the results of running
  10016. * each element of `collection` thru `iteratee`. The corresponding value of
  10017. * each key is the last element responsible for generating the key. The
  10018. * iteratee is invoked with one argument: (value).
  10019. *
  10020. * @static
  10021. * @memberOf _
  10022. * @since 4.0.0
  10023. * @category Collection
  10024. * @param {Array|Object} collection The collection to iterate over.
  10025. * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
  10026. * @returns {Object} Returns the composed aggregate object.
  10027. * @example
  10028. *
  10029. * var array = [
  10030. * { 'dir': 'left', 'code': 97 },
  10031. * { 'dir': 'right', 'code': 100 }
  10032. * ];
  10033. *
  10034. * _.keyBy(array, function(o) {
  10035. * return String.fromCharCode(o.code);
  10036. * });
  10037. * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
  10038. *
  10039. * _.keyBy(array, 'dir');
  10040. * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }
  10041. */
  10042. var keyBy = createAggregator(function(result, value, key) {
  10043. baseAssignValue(result, key, value);
  10044. });
  10045. /**
  10046. * Creates an array of values by running each element in `collection` thru
  10047. * `iteratee`. The iteratee is invoked with three arguments:
  10048. * (value, index|key, collection).
  10049. *
  10050. * Many lodash methods are guarded to work as iteratees for methods like
  10051. * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
  10052. *
  10053. * The guarded methods are:
  10054. * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
  10055. * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
  10056. * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
  10057. * `template`, `trim`, `trimEnd`, `trimStart`, and `words`
  10058. *
  10059. * @static
  10060. * @memberOf _
  10061. * @since 0.1.0
  10062. * @category Collection
  10063. * @param {Array|Object} collection The collection to iterate over.
  10064. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  10065. * @returns {Array} Returns the new mapped array.
  10066. * @example
  10067. *
  10068. * function square(n) {
  10069. * return n * n;
  10070. * }
  10071. *
  10072. * _.map([4, 8], square);
  10073. * // => [16, 64]
  10074. *
  10075. * _.map({ 'a': 4, 'b': 8 }, square);
  10076. * // => [16, 64] (iteration order is not guaranteed)
  10077. *
  10078. * var users = [
  10079. * { 'user': 'barney' },
  10080. * { 'user': 'fred' }
  10081. * ];
  10082. *
  10083. * // The `_.property` iteratee shorthand.
  10084. * _.map(users, 'user');
  10085. * // => ['barney', 'fred']
  10086. */
  10087. function map(collection, iteratee) {
  10088. var func = isArray(collection) ? arrayMap : baseMap;
  10089. return func(collection, getIteratee(iteratee, 3));
  10090. }
  10091. /**
  10092. * This method is like `_.sortBy` except that it allows specifying the sort
  10093. * orders of the iteratees to sort by. If `orders` is unspecified, all values
  10094. * are sorted in ascending order. Otherwise, specify an order of "desc" for
  10095. * descending or "asc" for ascending sort order of corresponding values.
  10096. *
  10097. * @static
  10098. * @memberOf _
  10099. * @since 4.0.0
  10100. * @category Collection
  10101. * @param {Array|Object} collection The collection to iterate over.
  10102. * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]
  10103. * The iteratees to sort by.
  10104. * @param {string[]} [orders] The sort orders of `iteratees`.
  10105. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
  10106. * @returns {Array} Returns the new sorted array.
  10107. * @example
  10108. *
  10109. * var users = [
  10110. * { 'user': 'fred', 'age': 48 },
  10111. * { 'user': 'barney', 'age': 34 },
  10112. * { 'user': 'fred', 'age': 40 },
  10113. * { 'user': 'barney', 'age': 36 }
  10114. * ];
  10115. *
  10116. * // Sort by `user` in ascending order and by `age` in descending order.
  10117. * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);
  10118. * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
  10119. */
  10120. function orderBy(collection, iteratees, orders, guard) {
  10121. if (collection == null) {
  10122. return [];
  10123. }
  10124. if (!isArray(iteratees)) {
  10125. iteratees = iteratees == null ? [] : [iteratees];
  10126. }
  10127. orders = guard ? undefined : orders;
  10128. if (!isArray(orders)) {
  10129. orders = orders == null ? [] : [orders];
  10130. }
  10131. return baseOrderBy(collection, iteratees, orders);
  10132. }
  10133. /**
  10134. * Creates an array of elements split into two groups, the first of which
  10135. * contains elements `predicate` returns truthy for, the second of which
  10136. * contains elements `predicate` returns falsey for. The predicate is
  10137. * invoked with one argument: (value).
  10138. *
  10139. * @static
  10140. * @memberOf _
  10141. * @since 3.0.0
  10142. * @category Collection
  10143. * @param {Array|Object} collection The collection to iterate over.
  10144. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  10145. * @returns {Array} Returns the array of grouped elements.
  10146. * @example
  10147. *
  10148. * var users = [
  10149. * { 'user': 'barney', 'age': 36, 'active': false },
  10150. * { 'user': 'fred', 'age': 40, 'active': true },
  10151. * { 'user': 'pebbles', 'age': 1, 'active': false }
  10152. * ];
  10153. *
  10154. * _.partition(users, function(o) { return o.active; });
  10155. * // => objects for [['fred'], ['barney', 'pebbles']]
  10156. *
  10157. * // The `_.matches` iteratee shorthand.
  10158. * _.partition(users, { 'age': 1, 'active': false });
  10159. * // => objects for [['pebbles'], ['barney', 'fred']]
  10160. *
  10161. * // The `_.matchesProperty` iteratee shorthand.
  10162. * _.partition(users, ['active', false]);
  10163. * // => objects for [['barney', 'pebbles'], ['fred']]
  10164. *
  10165. * // The `_.property` iteratee shorthand.
  10166. * _.partition(users, 'active');
  10167. * // => objects for [['fred'], ['barney', 'pebbles']]
  10168. */
  10169. var partition = createAggregator(function(result, value, key) {
  10170. result[key ? 0 : 1].push(value);
  10171. }, function() { return [[], []]; });
  10172. /**
  10173. * Reduces `collection` to a value which is the accumulated result of running
  10174. * each element in `collection` thru `iteratee`, where each successive
  10175. * invocation is supplied the return value of the previous. If `accumulator`
  10176. * is not given, the first element of `collection` is used as the initial
  10177. * value. The iteratee is invoked with four arguments:
  10178. * (accumulator, value, index|key, collection).
  10179. *
  10180. * Many lodash methods are guarded to work as iteratees for methods like
  10181. * `_.reduce`, `_.reduceRight`, and `_.transform`.
  10182. *
  10183. * The guarded methods are:
  10184. * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,
  10185. * and `sortBy`
  10186. *
  10187. * @static
  10188. * @memberOf _
  10189. * @since 0.1.0
  10190. * @category Collection
  10191. * @param {Array|Object} collection The collection to iterate over.
  10192. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  10193. * @param {*} [accumulator] The initial value.
  10194. * @returns {*} Returns the accumulated value.
  10195. * @see _.reduceRight
  10196. * @example
  10197. *
  10198. * _.reduce([1, 2], function(sum, n) {
  10199. * return sum + n;
  10200. * }, 0);
  10201. * // => 3
  10202. *
  10203. * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
  10204. * (result[value] || (result[value] = [])).push(key);
  10205. * return result;
  10206. * }, {});
  10207. * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
  10208. */
  10209. function reduce(collection, iteratee, accumulator) {
  10210. var func = isArray(collection) ? arrayReduce : baseReduce,
  10211. initAccum = arguments.length < 3;
  10212. return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);
  10213. }
  10214. /**
  10215. * This method is like `_.reduce` except that it iterates over elements of
  10216. * `collection` from right to left.
  10217. *
  10218. * @static
  10219. * @memberOf _
  10220. * @since 0.1.0
  10221. * @category Collection
  10222. * @param {Array|Object} collection The collection to iterate over.
  10223. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  10224. * @param {*} [accumulator] The initial value.
  10225. * @returns {*} Returns the accumulated value.
  10226. * @see _.reduce
  10227. * @example
  10228. *
  10229. * var array = [[0, 1], [2, 3], [4, 5]];
  10230. *
  10231. * _.reduceRight(array, function(flattened, other) {
  10232. * return flattened.concat(other);
  10233. * }, []);
  10234. * // => [4, 5, 2, 3, 0, 1]
  10235. */
  10236. function reduceRight(collection, iteratee, accumulator) {
  10237. var func = isArray(collection) ? arrayReduceRight : baseReduce,
  10238. initAccum = arguments.length < 3;
  10239. return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);
  10240. }
  10241. /**
  10242. * The opposite of `_.filter`; this method returns the elements of `collection`
  10243. * that `predicate` does **not** return truthy for.
  10244. *
  10245. * @static
  10246. * @memberOf _
  10247. * @since 0.1.0
  10248. * @category Collection
  10249. * @param {Array|Object} collection The collection to iterate over.
  10250. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  10251. * @returns {Array} Returns the new filtered array.
  10252. * @see _.filter
  10253. * @example
  10254. *
  10255. * var users = [
  10256. * { 'user': 'barney', 'age': 36, 'active': false },
  10257. * { 'user': 'fred', 'age': 40, 'active': true }
  10258. * ];
  10259. *
  10260. * _.reject(users, function(o) { return !o.active; });
  10261. * // => objects for ['fred']
  10262. *
  10263. * // The `_.matches` iteratee shorthand.
  10264. * _.reject(users, { 'age': 40, 'active': true });
  10265. * // => objects for ['barney']
  10266. *
  10267. * // The `_.matchesProperty` iteratee shorthand.
  10268. * _.reject(users, ['active', false]);
  10269. * // => objects for ['fred']
  10270. *
  10271. * // The `_.property` iteratee shorthand.
  10272. * _.reject(users, 'active');
  10273. * // => objects for ['barney']
  10274. */
  10275. function reject(collection, predicate) {
  10276. var func = isArray(collection) ? arrayFilter : baseFilter;
  10277. return func(collection, negate(getIteratee(predicate, 3)));
  10278. }
  10279. /**
  10280. * Gets a random element from `collection`.
  10281. *
  10282. * @static
  10283. * @memberOf _
  10284. * @since 2.0.0
  10285. * @category Collection
  10286. * @param {Array|Object} collection The collection to sample.
  10287. * @returns {*} Returns the random element.
  10288. * @example
  10289. *
  10290. * _.sample([1, 2, 3, 4]);
  10291. * // => 2
  10292. */
  10293. function sample(collection) {
  10294. var func = isArray(collection) ? arraySample : baseSample;
  10295. return func(collection);
  10296. }
  10297. /**
  10298. * Gets `n` random elements at unique keys from `collection` up to the
  10299. * size of `collection`.
  10300. *
  10301. * @static
  10302. * @memberOf _
  10303. * @since 4.0.0
  10304. * @category Collection
  10305. * @param {Array|Object} collection The collection to sample.
  10306. * @param {number} [n=1] The number of elements to sample.
  10307. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  10308. * @returns {Array} Returns the random elements.
  10309. * @example
  10310. *
  10311. * _.sampleSize([1, 2, 3], 2);
  10312. * // => [3, 1]
  10313. *
  10314. * _.sampleSize([1, 2, 3], 4);
  10315. * // => [2, 3, 1]
  10316. */
  10317. function sampleSize(collection, n, guard) {
  10318. if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {
  10319. n = 1;
  10320. } else {
  10321. n = toInteger(n);
  10322. }
  10323. var func = isArray(collection) ? arraySampleSize : baseSampleSize;
  10324. return func(collection, n);
  10325. }
  10326. /**
  10327. * Creates an array of shuffled values, using a version of the
  10328. * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).
  10329. *
  10330. * @static
  10331. * @memberOf _
  10332. * @since 0.1.0
  10333. * @category Collection
  10334. * @param {Array|Object} collection The collection to shuffle.
  10335. * @returns {Array} Returns the new shuffled array.
  10336. * @example
  10337. *
  10338. * _.shuffle([1, 2, 3, 4]);
  10339. * // => [4, 1, 3, 2]
  10340. */
  10341. function shuffle(collection) {
  10342. var func = isArray(collection) ? arrayShuffle : baseShuffle;
  10343. return func(collection);
  10344. }
  10345. /**
  10346. * Gets the size of `collection` by returning its length for array-like
  10347. * values or the number of own enumerable string keyed properties for objects.
  10348. *
  10349. * @static
  10350. * @memberOf _
  10351. * @since 0.1.0
  10352. * @category Collection
  10353. * @param {Array|Object|string} collection The collection to inspect.
  10354. * @returns {number} Returns the collection size.
  10355. * @example
  10356. *
  10357. * _.size([1, 2, 3]);
  10358. * // => 3
  10359. *
  10360. * _.size({ 'a': 1, 'b': 2 });
  10361. * // => 2
  10362. *
  10363. * _.size('pebbles');
  10364. * // => 7
  10365. */
  10366. function size(collection) {
  10367. if (collection == null) {
  10368. return 0;
  10369. }
  10370. if (isArrayLike(collection)) {
  10371. return isString(collection) ? stringSize(collection) : collection.length;
  10372. }
  10373. var tag = getTag(collection);
  10374. if (tag == mapTag || tag == setTag) {
  10375. return collection.size;
  10376. }
  10377. return baseKeys(collection).length;
  10378. }
  10379. /**
  10380. * Checks if `predicate` returns truthy for **any** element of `collection`.
  10381. * Iteration is stopped once `predicate` returns truthy. The predicate is
  10382. * invoked with three arguments: (value, index|key, collection).
  10383. *
  10384. * @static
  10385. * @memberOf _
  10386. * @since 0.1.0
  10387. * @category Collection
  10388. * @param {Array|Object} collection The collection to iterate over.
  10389. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  10390. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  10391. * @returns {boolean} Returns `true` if any element passes the predicate check,
  10392. * else `false`.
  10393. * @example
  10394. *
  10395. * _.some([null, 0, 'yes', false], Boolean);
  10396. * // => true
  10397. *
  10398. * var users = [
  10399. * { 'user': 'barney', 'active': true },
  10400. * { 'user': 'fred', 'active': false }
  10401. * ];
  10402. *
  10403. * // The `_.matches` iteratee shorthand.
  10404. * _.some(users, { 'user': 'barney', 'active': false });
  10405. * // => false
  10406. *
  10407. * // The `_.matchesProperty` iteratee shorthand.
  10408. * _.some(users, ['active', false]);
  10409. * // => true
  10410. *
  10411. * // The `_.property` iteratee shorthand.
  10412. * _.some(users, 'active');
  10413. * // => true
  10414. */
  10415. function some(collection, predicate, guard) {
  10416. var func = isArray(collection) ? arraySome : baseSome;
  10417. if (guard && isIterateeCall(collection, predicate, guard)) {
  10418. predicate = undefined;
  10419. }
  10420. return func(collection, getIteratee(predicate, 3));
  10421. }
  10422. /**
  10423. * Creates an array of elements, sorted in ascending order by the results of
  10424. * running each element in a collection thru each iteratee. This method
  10425. * performs a stable sort, that is, it preserves the original sort order of
  10426. * equal elements. The iteratees are invoked with one argument: (value).
  10427. *
  10428. * @static
  10429. * @memberOf _
  10430. * @since 0.1.0
  10431. * @category Collection
  10432. * @param {Array|Object} collection The collection to iterate over.
  10433. * @param {...(Function|Function[])} [iteratees=[_.identity]]
  10434. * The iteratees to sort by.
  10435. * @returns {Array} Returns the new sorted array.
  10436. * @example
  10437. *
  10438. * var users = [
  10439. * { 'user': 'fred', 'age': 48 },
  10440. * { 'user': 'barney', 'age': 36 },
  10441. * { 'user': 'fred', 'age': 30 },
  10442. * { 'user': 'barney', 'age': 34 }
  10443. * ];
  10444. *
  10445. * _.sortBy(users, [function(o) { return o.user; }]);
  10446. * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]
  10447. *
  10448. * _.sortBy(users, ['user', 'age']);
  10449. * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]
  10450. */
  10451. var sortBy = baseRest(function(collection, iteratees) {
  10452. if (collection == null) {
  10453. return [];
  10454. }
  10455. var length = iteratees.length;
  10456. if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
  10457. iteratees = [];
  10458. } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
  10459. iteratees = [iteratees[0]];
  10460. }
  10461. return baseOrderBy(collection, baseFlatten(iteratees, 1), []);
  10462. });
  10463. /*------------------------------------------------------------------------*/
  10464. /**
  10465. * Gets the timestamp of the number of milliseconds that have elapsed since
  10466. * the Unix epoch (1 January 1970 00:00:00 UTC).
  10467. *
  10468. * @static
  10469. * @memberOf _
  10470. * @since 2.4.0
  10471. * @category Date
  10472. * @returns {number} Returns the timestamp.
  10473. * @example
  10474. *
  10475. * _.defer(function(stamp) {
  10476. * console.log(_.now() - stamp);
  10477. * }, _.now());
  10478. * // => Logs the number of milliseconds it took for the deferred invocation.
  10479. */
  10480. var now = ctxNow || function() {
  10481. return root.Date.now();
  10482. };
  10483. /*------------------------------------------------------------------------*/
  10484. /**
  10485. * The opposite of `_.before`; this method creates a function that invokes
  10486. * `func` once it's called `n` or more times.
  10487. *
  10488. * @static
  10489. * @memberOf _
  10490. * @since 0.1.0
  10491. * @category Function
  10492. * @param {number} n The number of calls before `func` is invoked.
  10493. * @param {Function} func The function to restrict.
  10494. * @returns {Function} Returns the new restricted function.
  10495. * @example
  10496. *
  10497. * var saves = ['profile', 'settings'];
  10498. *
  10499. * var done = _.after(saves.length, function() {
  10500. * console.log('done saving!');
  10501. * });
  10502. *
  10503. * _.forEach(saves, function(type) {
  10504. * asyncSave({ 'type': type, 'complete': done });
  10505. * });
  10506. * // => Logs 'done saving!' after the two async saves have completed.
  10507. */
  10508. function after(n, func) {
  10509. if (typeof func != 'function') {
  10510. throw new TypeError(FUNC_ERROR_TEXT);
  10511. }
  10512. n = toInteger(n);
  10513. return function() {
  10514. if (--n < 1) {
  10515. return func.apply(this, arguments);
  10516. }
  10517. };
  10518. }
  10519. /**
  10520. * Creates a function that invokes `func`, with up to `n` arguments,
  10521. * ignoring any additional arguments.
  10522. *
  10523. * @static
  10524. * @memberOf _
  10525. * @since 3.0.0
  10526. * @category Function
  10527. * @param {Function} func The function to cap arguments for.
  10528. * @param {number} [n=func.length] The arity cap.
  10529. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  10530. * @returns {Function} Returns the new capped function.
  10531. * @example
  10532. *
  10533. * _.map(['6', '8', '10'], _.ary(parseInt, 1));
  10534. * // => [6, 8, 10]
  10535. */
  10536. function ary(func, n, guard) {
  10537. n = guard ? undefined : n;
  10538. n = (func && n == null) ? func.length : n;
  10539. return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);
  10540. }
  10541. /**
  10542. * Creates a function that invokes `func`, with the `this` binding and arguments
  10543. * of the created function, while it's called less than `n` times. Subsequent
  10544. * calls to the created function return the result of the last `func` invocation.
  10545. *
  10546. * @static
  10547. * @memberOf _
  10548. * @since 3.0.0
  10549. * @category Function
  10550. * @param {number} n The number of calls at which `func` is no longer invoked.
  10551. * @param {Function} func The function to restrict.
  10552. * @returns {Function} Returns the new restricted function.
  10553. * @example
  10554. *
  10555. * jQuery(element).on('click', _.before(5, addContactToList));
  10556. * // => Allows adding up to 4 contacts to the list.
  10557. */
  10558. function before(n, func) {
  10559. var result;
  10560. if (typeof func != 'function') {
  10561. throw new TypeError(FUNC_ERROR_TEXT);
  10562. }
  10563. n = toInteger(n);
  10564. return function() {
  10565. if (--n > 0) {
  10566. result = func.apply(this, arguments);
  10567. }
  10568. if (n <= 1) {
  10569. func = undefined;
  10570. }
  10571. return result;
  10572. };
  10573. }
  10574. /**
  10575. * Creates a function that invokes `func` with the `this` binding of `thisArg`
  10576. * and `partials` prepended to the arguments it receives.
  10577. *
  10578. * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
  10579. * may be used as a placeholder for partially applied arguments.
  10580. *
  10581. * **Note:** Unlike native `Function#bind`, this method doesn't set the "length"
  10582. * property of bound functions.
  10583. *
  10584. * @static
  10585. * @memberOf _
  10586. * @since 0.1.0
  10587. * @category Function
  10588. * @param {Function} func The function to bind.
  10589. * @param {*} thisArg The `this` binding of `func`.
  10590. * @param {...*} [partials] The arguments to be partially applied.
  10591. * @returns {Function} Returns the new bound function.
  10592. * @example
  10593. *
  10594. * function greet(greeting, punctuation) {
  10595. * return greeting + ' ' + this.user + punctuation;
  10596. * }
  10597. *
  10598. * var object = { 'user': 'fred' };
  10599. *
  10600. * var bound = _.bind(greet, object, 'hi');
  10601. * bound('!');
  10602. * // => 'hi fred!'
  10603. *
  10604. * // Bound with placeholders.
  10605. * var bound = _.bind(greet, object, _, '!');
  10606. * bound('hi');
  10607. * // => 'hi fred!'
  10608. */
  10609. var bind = baseRest(function(func, thisArg, partials) {
  10610. var bitmask = WRAP_BIND_FLAG;
  10611. if (partials.length) {
  10612. var holders = replaceHolders(partials, getHolder(bind));
  10613. bitmask |= WRAP_PARTIAL_FLAG;
  10614. }
  10615. return createWrap(func, bitmask, thisArg, partials, holders);
  10616. });
  10617. /**
  10618. * Creates a function that invokes the method at `object[key]` with `partials`
  10619. * prepended to the arguments it receives.
  10620. *
  10621. * This method differs from `_.bind` by allowing bound functions to reference
  10622. * methods that may be redefined or don't yet exist. See
  10623. * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)
  10624. * for more details.
  10625. *
  10626. * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic
  10627. * builds, may be used as a placeholder for partially applied arguments.
  10628. *
  10629. * @static
  10630. * @memberOf _
  10631. * @since 0.10.0
  10632. * @category Function
  10633. * @param {Object} object The object to invoke the method on.
  10634. * @param {string} key The key of the method.
  10635. * @param {...*} [partials] The arguments to be partially applied.
  10636. * @returns {Function} Returns the new bound function.
  10637. * @example
  10638. *
  10639. * var object = {
  10640. * 'user': 'fred',
  10641. * 'greet': function(greeting, punctuation) {
  10642. * return greeting + ' ' + this.user + punctuation;
  10643. * }
  10644. * };
  10645. *
  10646. * var bound = _.bindKey(object, 'greet', 'hi');
  10647. * bound('!');
  10648. * // => 'hi fred!'
  10649. *
  10650. * object.greet = function(greeting, punctuation) {
  10651. * return greeting + 'ya ' + this.user + punctuation;
  10652. * };
  10653. *
  10654. * bound('!');
  10655. * // => 'hiya fred!'
  10656. *
  10657. * // Bound with placeholders.
  10658. * var bound = _.bindKey(object, 'greet', _, '!');
  10659. * bound('hi');
  10660. * // => 'hiya fred!'
  10661. */
  10662. var bindKey = baseRest(function(object, key, partials) {
  10663. var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;
  10664. if (partials.length) {
  10665. var holders = replaceHolders(partials, getHolder(bindKey));
  10666. bitmask |= WRAP_PARTIAL_FLAG;
  10667. }
  10668. return createWrap(key, bitmask, object, partials, holders);
  10669. });
  10670. /**
  10671. * Creates a function that accepts arguments of `func` and either invokes
  10672. * `func` returning its result, if at least `arity` number of arguments have
  10673. * been provided, or returns a function that accepts the remaining `func`
  10674. * arguments, and so on. The arity of `func` may be specified if `func.length`
  10675. * is not sufficient.
  10676. *
  10677. * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,
  10678. * may be used as a placeholder for provided arguments.
  10679. *
  10680. * **Note:** This method doesn't set the "length" property of curried functions.
  10681. *
  10682. * @static
  10683. * @memberOf _
  10684. * @since 2.0.0
  10685. * @category Function
  10686. * @param {Function} func The function to curry.
  10687. * @param {number} [arity=func.length] The arity of `func`.
  10688. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  10689. * @returns {Function} Returns the new curried function.
  10690. * @example
  10691. *
  10692. * var abc = function(a, b, c) {
  10693. * return [a, b, c];
  10694. * };
  10695. *
  10696. * var curried = _.curry(abc);
  10697. *
  10698. * curried(1)(2)(3);
  10699. * // => [1, 2, 3]
  10700. *
  10701. * curried(1, 2)(3);
  10702. * // => [1, 2, 3]
  10703. *
  10704. * curried(1, 2, 3);
  10705. * // => [1, 2, 3]
  10706. *
  10707. * // Curried with placeholders.
  10708. * curried(1)(_, 3)(2);
  10709. * // => [1, 2, 3]
  10710. */
  10711. function curry(func, arity, guard) {
  10712. arity = guard ? undefined : arity;
  10713. var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
  10714. result.placeholder = curry.placeholder;
  10715. return result;
  10716. }
  10717. /**
  10718. * This method is like `_.curry` except that arguments are applied to `func`
  10719. * in the manner of `_.partialRight` instead of `_.partial`.
  10720. *
  10721. * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic
  10722. * builds, may be used as a placeholder for provided arguments.
  10723. *
  10724. * **Note:** This method doesn't set the "length" property of curried functions.
  10725. *
  10726. * @static
  10727. * @memberOf _
  10728. * @since 3.0.0
  10729. * @category Function
  10730. * @param {Function} func The function to curry.
  10731. * @param {number} [arity=func.length] The arity of `func`.
  10732. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  10733. * @returns {Function} Returns the new curried function.
  10734. * @example
  10735. *
  10736. * var abc = function(a, b, c) {
  10737. * return [a, b, c];
  10738. * };
  10739. *
  10740. * var curried = _.curryRight(abc);
  10741. *
  10742. * curried(3)(2)(1);
  10743. * // => [1, 2, 3]
  10744. *
  10745. * curried(2, 3)(1);
  10746. * // => [1, 2, 3]
  10747. *
  10748. * curried(1, 2, 3);
  10749. * // => [1, 2, 3]
  10750. *
  10751. * // Curried with placeholders.
  10752. * curried(3)(1, _)(2);
  10753. * // => [1, 2, 3]
  10754. */
  10755. function curryRight(func, arity, guard) {
  10756. arity = guard ? undefined : arity;
  10757. var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
  10758. result.placeholder = curryRight.placeholder;
  10759. return result;
  10760. }
  10761. /**
  10762. * Creates a debounced function that delays invoking `func` until after `wait`
  10763. * milliseconds have elapsed since the last time the debounced function was
  10764. * invoked. The debounced function comes with a `cancel` method to cancel
  10765. * delayed `func` invocations and a `flush` method to immediately invoke them.
  10766. * Provide `options` to indicate whether `func` should be invoked on the
  10767. * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
  10768. * with the last arguments provided to the debounced function. Subsequent
  10769. * calls to the debounced function return the result of the last `func`
  10770. * invocation.
  10771. *
  10772. * **Note:** If `leading` and `trailing` options are `true`, `func` is
  10773. * invoked on the trailing edge of the timeout only if the debounced function
  10774. * is invoked more than once during the `wait` timeout.
  10775. *
  10776. * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
  10777. * until to the next tick, similar to `setTimeout` with a timeout of `0`.
  10778. *
  10779. * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
  10780. * for details over the differences between `_.debounce` and `_.throttle`.
  10781. *
  10782. * @static
  10783. * @memberOf _
  10784. * @since 0.1.0
  10785. * @category Function
  10786. * @param {Function} func The function to debounce.
  10787. * @param {number} [wait=0] The number of milliseconds to delay.
  10788. * @param {Object} [options={}] The options object.
  10789. * @param {boolean} [options.leading=false]
  10790. * Specify invoking on the leading edge of the timeout.
  10791. * @param {number} [options.maxWait]
  10792. * The maximum time `func` is allowed to be delayed before it's invoked.
  10793. * @param {boolean} [options.trailing=true]
  10794. * Specify invoking on the trailing edge of the timeout.
  10795. * @returns {Function} Returns the new debounced function.
  10796. * @example
  10797. *
  10798. * // Avoid costly calculations while the window size is in flux.
  10799. * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
  10800. *
  10801. * // Invoke `sendMail` when clicked, debouncing subsequent calls.
  10802. * jQuery(element).on('click', _.debounce(sendMail, 300, {
  10803. * 'leading': true,
  10804. * 'trailing': false
  10805. * }));
  10806. *
  10807. * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
  10808. * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
  10809. * var source = new EventSource('/stream');
  10810. * jQuery(source).on('message', debounced);
  10811. *
  10812. * // Cancel the trailing debounced invocation.
  10813. * jQuery(window).on('popstate', debounced.cancel);
  10814. */
  10815. function debounce(func, wait, options) {
  10816. var lastArgs,
  10817. lastThis,
  10818. maxWait,
  10819. result,
  10820. timerId,
  10821. lastCallTime,
  10822. lastInvokeTime = 0,
  10823. leading = false,
  10824. maxing = false,
  10825. trailing = true;
  10826. if (typeof func != 'function') {
  10827. throw new TypeError(FUNC_ERROR_TEXT);
  10828. }
  10829. wait = toNumber(wait) || 0;
  10830. if (isObject(options)) {
  10831. leading = !!options.leading;
  10832. maxing = 'maxWait' in options;
  10833. maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
  10834. trailing = 'trailing' in options ? !!options.trailing : trailing;
  10835. }
  10836. function invokeFunc(time) {
  10837. var args = lastArgs,
  10838. thisArg = lastThis;
  10839. lastArgs = lastThis = undefined;
  10840. lastInvokeTime = time;
  10841. result = func.apply(thisArg, args);
  10842. return result;
  10843. }
  10844. function leadingEdge(time) {
  10845. // Reset any `maxWait` timer.
  10846. lastInvokeTime = time;
  10847. // Start the timer for the trailing edge.
  10848. timerId = setTimeout(timerExpired, wait);
  10849. // Invoke the leading edge.
  10850. return leading ? invokeFunc(time) : result;
  10851. }
  10852. function remainingWait(time) {
  10853. var timeSinceLastCall = time - lastCallTime,
  10854. timeSinceLastInvoke = time - lastInvokeTime,
  10855. timeWaiting = wait - timeSinceLastCall;
  10856. return maxing
  10857. ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
  10858. : timeWaiting;
  10859. }
  10860. function shouldInvoke(time) {
  10861. var timeSinceLastCall = time - lastCallTime,
  10862. timeSinceLastInvoke = time - lastInvokeTime;
  10863. // Either this is the first call, activity has stopped and we're at the
  10864. // trailing edge, the system time has gone backwards and we're treating
  10865. // it as the trailing edge, or we've hit the `maxWait` limit.
  10866. return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
  10867. (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
  10868. }
  10869. function timerExpired() {
  10870. var time = now();
  10871. if (shouldInvoke(time)) {
  10872. return trailingEdge(time);
  10873. }
  10874. // Restart the timer.
  10875. timerId = setTimeout(timerExpired, remainingWait(time));
  10876. }
  10877. function trailingEdge(time) {
  10878. timerId = undefined;
  10879. // Only invoke if we have `lastArgs` which means `func` has been
  10880. // debounced at least once.
  10881. if (trailing && lastArgs) {
  10882. return invokeFunc(time);
  10883. }
  10884. lastArgs = lastThis = undefined;
  10885. return result;
  10886. }
  10887. function cancel() {
  10888. if (timerId !== undefined) {
  10889. clearTimeout(timerId);
  10890. }
  10891. lastInvokeTime = 0;
  10892. lastArgs = lastCallTime = lastThis = timerId = undefined;
  10893. }
  10894. function flush() {
  10895. return timerId === undefined ? result : trailingEdge(now());
  10896. }
  10897. function debounced() {
  10898. var time = now(),
  10899. isInvoking = shouldInvoke(time);
  10900. lastArgs = arguments;
  10901. lastThis = this;
  10902. lastCallTime = time;
  10903. if (isInvoking) {
  10904. if (timerId === undefined) {
  10905. return leadingEdge(lastCallTime);
  10906. }
  10907. if (maxing) {
  10908. // Handle invocations in a tight loop.
  10909. clearTimeout(timerId);
  10910. timerId = setTimeout(timerExpired, wait);
  10911. return invokeFunc(lastCallTime);
  10912. }
  10913. }
  10914. if (timerId === undefined) {
  10915. timerId = setTimeout(timerExpired, wait);
  10916. }
  10917. return result;
  10918. }
  10919. debounced.cancel = cancel;
  10920. debounced.flush = flush;
  10921. return debounced;
  10922. }
  10923. /**
  10924. * Defers invoking the `func` until the current call stack has cleared. Any
  10925. * additional arguments are provided to `func` when it's invoked.
  10926. *
  10927. * @static
  10928. * @memberOf _
  10929. * @since 0.1.0
  10930. * @category Function
  10931. * @param {Function} func The function to defer.
  10932. * @param {...*} [args] The arguments to invoke `func` with.
  10933. * @returns {number} Returns the timer id.
  10934. * @example
  10935. *
  10936. * _.defer(function(text) {
  10937. * console.log(text);
  10938. * }, 'deferred');
  10939. * // => Logs 'deferred' after one millisecond.
  10940. */
  10941. var defer = baseRest(function(func, args) {
  10942. return baseDelay(func, 1, args);
  10943. });
  10944. /**
  10945. * Invokes `func` after `wait` milliseconds. Any additional arguments are
  10946. * provided to `func` when it's invoked.
  10947. *
  10948. * @static
  10949. * @memberOf _
  10950. * @since 0.1.0
  10951. * @category Function
  10952. * @param {Function} func The function to delay.
  10953. * @param {number} wait The number of milliseconds to delay invocation.
  10954. * @param {...*} [args] The arguments to invoke `func` with.
  10955. * @returns {number} Returns the timer id.
  10956. * @example
  10957. *
  10958. * _.delay(function(text) {
  10959. * console.log(text);
  10960. * }, 1000, 'later');
  10961. * // => Logs 'later' after one second.
  10962. */
  10963. var delay = baseRest(function(func, wait, args) {
  10964. return baseDelay(func, toNumber(wait) || 0, args);
  10965. });
  10966. /**
  10967. * Creates a function that invokes `func` with arguments reversed.
  10968. *
  10969. * @static
  10970. * @memberOf _
  10971. * @since 4.0.0
  10972. * @category Function
  10973. * @param {Function} func The function to flip arguments for.
  10974. * @returns {Function} Returns the new flipped function.
  10975. * @example
  10976. *
  10977. * var flipped = _.flip(function() {
  10978. * return _.toArray(arguments);
  10979. * });
  10980. *
  10981. * flipped('a', 'b', 'c', 'd');
  10982. * // => ['d', 'c', 'b', 'a']
  10983. */
  10984. function flip(func) {
  10985. return createWrap(func, WRAP_FLIP_FLAG);
  10986. }
  10987. /**
  10988. * Creates a function that memoizes the result of `func`. If `resolver` is
  10989. * provided, it determines the cache key for storing the result based on the
  10990. * arguments provided to the memoized function. By default, the first argument
  10991. * provided to the memoized function is used as the map cache key. The `func`
  10992. * is invoked with the `this` binding of the memoized function.
  10993. *
  10994. * **Note:** The cache is exposed as the `cache` property on the memoized
  10995. * function. Its creation may be customized by replacing the `_.memoize.Cache`
  10996. * constructor with one whose instances implement the
  10997. * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
  10998. * method interface of `clear`, `delete`, `get`, `has`, and `set`.
  10999. *
  11000. * @static
  11001. * @memberOf _
  11002. * @since 0.1.0
  11003. * @category Function
  11004. * @param {Function} func The function to have its output memoized.
  11005. * @param {Function} [resolver] The function to resolve the cache key.
  11006. * @returns {Function} Returns the new memoized function.
  11007. * @example
  11008. *
  11009. * var object = { 'a': 1, 'b': 2 };
  11010. * var other = { 'c': 3, 'd': 4 };
  11011. *
  11012. * var values = _.memoize(_.values);
  11013. * values(object);
  11014. * // => [1, 2]
  11015. *
  11016. * values(other);
  11017. * // => [3, 4]
  11018. *
  11019. * object.a = 2;
  11020. * values(object);
  11021. * // => [1, 2]
  11022. *
  11023. * // Modify the result cache.
  11024. * values.cache.set(object, ['a', 'b']);
  11025. * values(object);
  11026. * // => ['a', 'b']
  11027. *
  11028. * // Replace `_.memoize.Cache`.
  11029. * _.memoize.Cache = WeakMap;
  11030. */
  11031. function memoize(func, resolver) {
  11032. if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
  11033. throw new TypeError(FUNC_ERROR_TEXT);
  11034. }
  11035. var memoized = function() {
  11036. var args = arguments,
  11037. key = resolver ? resolver.apply(this, args) : args[0],
  11038. cache = memoized.cache;
  11039. if (cache.has(key)) {
  11040. return cache.get(key);
  11041. }
  11042. var result = func.apply(this, args);
  11043. memoized.cache = cache.set(key, result) || cache;
  11044. return result;
  11045. };
  11046. memoized.cache = new (memoize.Cache || MapCache);
  11047. return memoized;
  11048. }
  11049. // Expose `MapCache`.
  11050. memoize.Cache = MapCache;
  11051. /**
  11052. * Creates a function that negates the result of the predicate `func`. The
  11053. * `func` predicate is invoked with the `this` binding and arguments of the
  11054. * created function.
  11055. *
  11056. * @static
  11057. * @memberOf _
  11058. * @since 3.0.0
  11059. * @category Function
  11060. * @param {Function} predicate The predicate to negate.
  11061. * @returns {Function} Returns the new negated function.
  11062. * @example
  11063. *
  11064. * function isEven(n) {
  11065. * return n % 2 == 0;
  11066. * }
  11067. *
  11068. * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));
  11069. * // => [1, 3, 5]
  11070. */
  11071. function negate(predicate) {
  11072. if (typeof predicate != 'function') {
  11073. throw new TypeError(FUNC_ERROR_TEXT);
  11074. }
  11075. return function() {
  11076. var args = arguments;
  11077. switch (args.length) {
  11078. case 0: return !predicate.call(this);
  11079. case 1: return !predicate.call(this, args[0]);
  11080. case 2: return !predicate.call(this, args[0], args[1]);
  11081. case 3: return !predicate.call(this, args[0], args[1], args[2]);
  11082. }
  11083. return !predicate.apply(this, args);
  11084. };
  11085. }
  11086. /**
  11087. * Creates a function that is restricted to invoking `func` once. Repeat calls
  11088. * to the function return the value of the first invocation. The `func` is
  11089. * invoked with the `this` binding and arguments of the created function.
  11090. *
  11091. * @static
  11092. * @memberOf _
  11093. * @since 0.1.0
  11094. * @category Function
  11095. * @param {Function} func The function to restrict.
  11096. * @returns {Function} Returns the new restricted function.
  11097. * @example
  11098. *
  11099. * var initialize = _.once(createApplication);
  11100. * initialize();
  11101. * initialize();
  11102. * // => `createApplication` is invoked once
  11103. */
  11104. function once(func) {
  11105. return before(2, func);
  11106. }
  11107. /**
  11108. * Creates a function that invokes `func` with its arguments transformed.
  11109. *
  11110. * @static
  11111. * @since 4.0.0
  11112. * @memberOf _
  11113. * @category Function
  11114. * @param {Function} func The function to wrap.
  11115. * @param {...(Function|Function[])} [transforms=[_.identity]]
  11116. * The argument transforms.
  11117. * @returns {Function} Returns the new function.
  11118. * @example
  11119. *
  11120. * function doubled(n) {
  11121. * return n * 2;
  11122. * }
  11123. *
  11124. * function square(n) {
  11125. * return n * n;
  11126. * }
  11127. *
  11128. * var func = _.overArgs(function(x, y) {
  11129. * return [x, y];
  11130. * }, [square, doubled]);
  11131. *
  11132. * func(9, 3);
  11133. * // => [81, 6]
  11134. *
  11135. * func(10, 5);
  11136. * // => [100, 10]
  11137. */
  11138. var overArgs = castRest(function(func, transforms) {
  11139. transforms = (transforms.length == 1 && isArray(transforms[0]))
  11140. ? arrayMap(transforms[0], baseUnary(getIteratee()))
  11141. : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));
  11142. var funcsLength = transforms.length;
  11143. return baseRest(function(args) {
  11144. var index = -1,
  11145. length = nativeMin(args.length, funcsLength);
  11146. while (++index < length) {
  11147. args[index] = transforms[index].call(this, args[index]);
  11148. }
  11149. return apply(func, this, args);
  11150. });
  11151. });
  11152. /**
  11153. * Creates a function that invokes `func` with `partials` prepended to the
  11154. * arguments it receives. This method is like `_.bind` except it does **not**
  11155. * alter the `this` binding.
  11156. *
  11157. * The `_.partial.placeholder` value, which defaults to `_` in monolithic
  11158. * builds, may be used as a placeholder for partially applied arguments.
  11159. *
  11160. * **Note:** This method doesn't set the "length" property of partially
  11161. * applied functions.
  11162. *
  11163. * @static
  11164. * @memberOf _
  11165. * @since 0.2.0
  11166. * @category Function
  11167. * @param {Function} func The function to partially apply arguments to.
  11168. * @param {...*} [partials] The arguments to be partially applied.
  11169. * @returns {Function} Returns the new partially applied function.
  11170. * @example
  11171. *
  11172. * function greet(greeting, name) {
  11173. * return greeting + ' ' + name;
  11174. * }
  11175. *
  11176. * var sayHelloTo = _.partial(greet, 'hello');
  11177. * sayHelloTo('fred');
  11178. * // => 'hello fred'
  11179. *
  11180. * // Partially applied with placeholders.
  11181. * var greetFred = _.partial(greet, _, 'fred');
  11182. * greetFred('hi');
  11183. * // => 'hi fred'
  11184. */
  11185. var partial = baseRest(function(func, partials) {
  11186. var holders = replaceHolders(partials, getHolder(partial));
  11187. return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);
  11188. });
  11189. /**
  11190. * This method is like `_.partial` except that partially applied arguments
  11191. * are appended to the arguments it receives.
  11192. *
  11193. * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic
  11194. * builds, may be used as a placeholder for partially applied arguments.
  11195. *
  11196. * **Note:** This method doesn't set the "length" property of partially
  11197. * applied functions.
  11198. *
  11199. * @static
  11200. * @memberOf _
  11201. * @since 1.0.0
  11202. * @category Function
  11203. * @param {Function} func The function to partially apply arguments to.
  11204. * @param {...*} [partials] The arguments to be partially applied.
  11205. * @returns {Function} Returns the new partially applied function.
  11206. * @example
  11207. *
  11208. * function greet(greeting, name) {
  11209. * return greeting + ' ' + name;
  11210. * }
  11211. *
  11212. * var greetFred = _.partialRight(greet, 'fred');
  11213. * greetFred('hi');
  11214. * // => 'hi fred'
  11215. *
  11216. * // Partially applied with placeholders.
  11217. * var sayHelloTo = _.partialRight(greet, 'hello', _);
  11218. * sayHelloTo('fred');
  11219. * // => 'hello fred'
  11220. */
  11221. var partialRight = baseRest(function(func, partials) {
  11222. var holders = replaceHolders(partials, getHolder(partialRight));
  11223. return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);
  11224. });
  11225. /**
  11226. * Creates a function that invokes `func` with arguments arranged according
  11227. * to the specified `indexes` where the argument value at the first index is
  11228. * provided as the first argument, the argument value at the second index is
  11229. * provided as the second argument, and so on.
  11230. *
  11231. * @static
  11232. * @memberOf _
  11233. * @since 3.0.0
  11234. * @category Function
  11235. * @param {Function} func The function to rearrange arguments for.
  11236. * @param {...(number|number[])} indexes The arranged argument indexes.
  11237. * @returns {Function} Returns the new function.
  11238. * @example
  11239. *
  11240. * var rearged = _.rearg(function(a, b, c) {
  11241. * return [a, b, c];
  11242. * }, [2, 0, 1]);
  11243. *
  11244. * rearged('b', 'c', 'a')
  11245. * // => ['a', 'b', 'c']
  11246. */
  11247. var rearg = flatRest(function(func, indexes) {
  11248. return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);
  11249. });
  11250. /**
  11251. * Creates a function that invokes `func` with the `this` binding of the
  11252. * created function and arguments from `start` and beyond provided as
  11253. * an array.
  11254. *
  11255. * **Note:** This method is based on the
  11256. * [rest parameter](https://mdn.io/rest_parameters).
  11257. *
  11258. * @static
  11259. * @memberOf _
  11260. * @since 4.0.0
  11261. * @category Function
  11262. * @param {Function} func The function to apply a rest parameter to.
  11263. * @param {number} [start=func.length-1] The start position of the rest parameter.
  11264. * @returns {Function} Returns the new function.
  11265. * @example
  11266. *
  11267. * var say = _.rest(function(what, names) {
  11268. * return what + ' ' + _.initial(names).join(', ') +
  11269. * (_.size(names) > 1 ? ', & ' : '') + _.last(names);
  11270. * });
  11271. *
  11272. * say('hello', 'fred', 'barney', 'pebbles');
  11273. * // => 'hello fred, barney, & pebbles'
  11274. */
  11275. function rest(func, start) {
  11276. if (typeof func != 'function') {
  11277. throw new TypeError(FUNC_ERROR_TEXT);
  11278. }
  11279. start = start === undefined ? start : toInteger(start);
  11280. return baseRest(func, start);
  11281. }
  11282. /**
  11283. * Creates a function that invokes `func` with the `this` binding of the
  11284. * create function and an array of arguments much like
  11285. * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).
  11286. *
  11287. * **Note:** This method is based on the
  11288. * [spread operator](https://mdn.io/spread_operator).
  11289. *
  11290. * @static
  11291. * @memberOf _
  11292. * @since 3.2.0
  11293. * @category Function
  11294. * @param {Function} func The function to spread arguments over.
  11295. * @param {number} [start=0] The start position of the spread.
  11296. * @returns {Function} Returns the new function.
  11297. * @example
  11298. *
  11299. * var say = _.spread(function(who, what) {
  11300. * return who + ' says ' + what;
  11301. * });
  11302. *
  11303. * say(['fred', 'hello']);
  11304. * // => 'fred says hello'
  11305. *
  11306. * var numbers = Promise.all([
  11307. * Promise.resolve(40),
  11308. * Promise.resolve(36)
  11309. * ]);
  11310. *
  11311. * numbers.then(_.spread(function(x, y) {
  11312. * return x + y;
  11313. * }));
  11314. * // => a Promise of 76
  11315. */
  11316. function spread(func, start) {
  11317. if (typeof func != 'function') {
  11318. throw new TypeError(FUNC_ERROR_TEXT);
  11319. }
  11320. start = start == null ? 0 : nativeMax(toInteger(start), 0);
  11321. return baseRest(function(args) {
  11322. var array = args[start],
  11323. otherArgs = castSlice(args, 0, start);
  11324. if (array) {
  11325. arrayPush(otherArgs, array);
  11326. }
  11327. return apply(func, this, otherArgs);
  11328. });
  11329. }
  11330. /**
  11331. * Creates a throttled function that only invokes `func` at most once per
  11332. * every `wait` milliseconds. The throttled function comes with a `cancel`
  11333. * method to cancel delayed `func` invocations and a `flush` method to
  11334. * immediately invoke them. Provide `options` to indicate whether `func`
  11335. * should be invoked on the leading and/or trailing edge of the `wait`
  11336. * timeout. The `func` is invoked with the last arguments provided to the
  11337. * throttled function. Subsequent calls to the throttled function return the
  11338. * result of the last `func` invocation.
  11339. *
  11340. * **Note:** If `leading` and `trailing` options are `true`, `func` is
  11341. * invoked on the trailing edge of the timeout only if the throttled function
  11342. * is invoked more than once during the `wait` timeout.
  11343. *
  11344. * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
  11345. * until to the next tick, similar to `setTimeout` with a timeout of `0`.
  11346. *
  11347. * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
  11348. * for details over the differences between `_.throttle` and `_.debounce`.
  11349. *
  11350. * @static
  11351. * @memberOf _
  11352. * @since 0.1.0
  11353. * @category Function
  11354. * @param {Function} func The function to throttle.
  11355. * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
  11356. * @param {Object} [options={}] The options object.
  11357. * @param {boolean} [options.leading=true]
  11358. * Specify invoking on the leading edge of the timeout.
  11359. * @param {boolean} [options.trailing=true]
  11360. * Specify invoking on the trailing edge of the timeout.
  11361. * @returns {Function} Returns the new throttled function.
  11362. * @example
  11363. *
  11364. * // Avoid excessively updating the position while scrolling.
  11365. * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
  11366. *
  11367. * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
  11368. * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
  11369. * jQuery(element).on('click', throttled);
  11370. *
  11371. * // Cancel the trailing throttled invocation.
  11372. * jQuery(window).on('popstate', throttled.cancel);
  11373. */
  11374. function throttle(func, wait, options) {
  11375. var leading = true,
  11376. trailing = true;
  11377. if (typeof func != 'function') {
  11378. throw new TypeError(FUNC_ERROR_TEXT);
  11379. }
  11380. if (isObject(options)) {
  11381. leading = 'leading' in options ? !!options.leading : leading;
  11382. trailing = 'trailing' in options ? !!options.trailing : trailing;
  11383. }
  11384. return debounce(func, wait, {
  11385. 'leading': leading,
  11386. 'maxWait': wait,
  11387. 'trailing': trailing
  11388. });
  11389. }
  11390. /**
  11391. * Creates a function that accepts up to one argument, ignoring any
  11392. * additional arguments.
  11393. *
  11394. * @static
  11395. * @memberOf _
  11396. * @since 4.0.0
  11397. * @category Function
  11398. * @param {Function} func The function to cap arguments for.
  11399. * @returns {Function} Returns the new capped function.
  11400. * @example
  11401. *
  11402. * _.map(['6', '8', '10'], _.unary(parseInt));
  11403. * // => [6, 8, 10]
  11404. */
  11405. function unary(func) {
  11406. return ary(func, 1);
  11407. }
  11408. /**
  11409. * Creates a function that provides `value` to `wrapper` as its first
  11410. * argument. Any additional arguments provided to the function are appended
  11411. * to those provided to the `wrapper`. The wrapper is invoked with the `this`
  11412. * binding of the created function.
  11413. *
  11414. * @static
  11415. * @memberOf _
  11416. * @since 0.1.0
  11417. * @category Function
  11418. * @param {*} value The value to wrap.
  11419. * @param {Function} [wrapper=identity] The wrapper function.
  11420. * @returns {Function} Returns the new function.
  11421. * @example
  11422. *
  11423. * var p = _.wrap(_.escape, function(func, text) {
  11424. * return '<p>' + func(text) + '</p>';
  11425. * });
  11426. *
  11427. * p('fred, barney, & pebbles');
  11428. * // => '<p>fred, barney, &amp; pebbles</p>'
  11429. */
  11430. function wrap(value, wrapper) {
  11431. return partial(castFunction(wrapper), value);
  11432. }
  11433. /*------------------------------------------------------------------------*/
  11434. /**
  11435. * Casts `value` as an array if it's not one.
  11436. *
  11437. * @static
  11438. * @memberOf _
  11439. * @since 4.4.0
  11440. * @category Lang
  11441. * @param {*} value The value to inspect.
  11442. * @returns {Array} Returns the cast array.
  11443. * @example
  11444. *
  11445. * _.castArray(1);
  11446. * // => [1]
  11447. *
  11448. * _.castArray({ 'a': 1 });
  11449. * // => [{ 'a': 1 }]
  11450. *
  11451. * _.castArray('abc');
  11452. * // => ['abc']
  11453. *
  11454. * _.castArray(null);
  11455. * // => [null]
  11456. *
  11457. * _.castArray(undefined);
  11458. * // => [undefined]
  11459. *
  11460. * _.castArray();
  11461. * // => []
  11462. *
  11463. * var array = [1, 2, 3];
  11464. * console.log(_.castArray(array) === array);
  11465. * // => true
  11466. */
  11467. function castArray() {
  11468. if (!arguments.length) {
  11469. return [];
  11470. }
  11471. var value = arguments[0];
  11472. return isArray(value) ? value : [value];
  11473. }
  11474. /**
  11475. * Creates a shallow clone of `value`.
  11476. *
  11477. * **Note:** This method is loosely based on the
  11478. * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)
  11479. * and supports cloning arrays, array buffers, booleans, date objects, maps,
  11480. * numbers, `Object` objects, regexes, sets, strings, symbols, and typed
  11481. * arrays. The own enumerable properties of `arguments` objects are cloned
  11482. * as plain objects. An empty object is returned for uncloneable values such
  11483. * as error objects, functions, DOM nodes, and WeakMaps.
  11484. *
  11485. * @static
  11486. * @memberOf _
  11487. * @since 0.1.0
  11488. * @category Lang
  11489. * @param {*} value The value to clone.
  11490. * @returns {*} Returns the cloned value.
  11491. * @see _.cloneDeep
  11492. * @example
  11493. *
  11494. * var objects = [{ 'a': 1 }, { 'b': 2 }];
  11495. *
  11496. * var shallow = _.clone(objects);
  11497. * console.log(shallow[0] === objects[0]);
  11498. * // => true
  11499. */
  11500. function clone(value) {
  11501. return baseClone(value, CLONE_SYMBOLS_FLAG);
  11502. }
  11503. /**
  11504. * This method is like `_.clone` except that it accepts `customizer` which
  11505. * is invoked to produce the cloned value. If `customizer` returns `undefined`,
  11506. * cloning is handled by the method instead. The `customizer` is invoked with
  11507. * up to four arguments; (value [, index|key, object, stack]).
  11508. *
  11509. * @static
  11510. * @memberOf _
  11511. * @since 4.0.0
  11512. * @category Lang
  11513. * @param {*} value The value to clone.
  11514. * @param {Function} [customizer] The function to customize cloning.
  11515. * @returns {*} Returns the cloned value.
  11516. * @see _.cloneDeepWith
  11517. * @example
  11518. *
  11519. * function customizer(value) {
  11520. * if (_.isElement(value)) {
  11521. * return value.cloneNode(false);
  11522. * }
  11523. * }
  11524. *
  11525. * var el = _.cloneWith(document.body, customizer);
  11526. *
  11527. * console.log(el === document.body);
  11528. * // => false
  11529. * console.log(el.nodeName);
  11530. * // => 'BODY'
  11531. * console.log(el.childNodes.length);
  11532. * // => 0
  11533. */
  11534. function cloneWith(value, customizer) {
  11535. customizer = typeof customizer == 'function' ? customizer : undefined;
  11536. return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);
  11537. }
  11538. /**
  11539. * This method is like `_.clone` except that it recursively clones `value`.
  11540. *
  11541. * @static
  11542. * @memberOf _
  11543. * @since 1.0.0
  11544. * @category Lang
  11545. * @param {*} value The value to recursively clone.
  11546. * @returns {*} Returns the deep cloned value.
  11547. * @see _.clone
  11548. * @example
  11549. *
  11550. * var objects = [{ 'a': 1 }, { 'b': 2 }];
  11551. *
  11552. * var deep = _.cloneDeep(objects);
  11553. * console.log(deep[0] === objects[0]);
  11554. * // => false
  11555. */
  11556. function cloneDeep(value) {
  11557. return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
  11558. }
  11559. /**
  11560. * This method is like `_.cloneWith` except that it recursively clones `value`.
  11561. *
  11562. * @static
  11563. * @memberOf _
  11564. * @since 4.0.0
  11565. * @category Lang
  11566. * @param {*} value The value to recursively clone.
  11567. * @param {Function} [customizer] The function to customize cloning.
  11568. * @returns {*} Returns the deep cloned value.
  11569. * @see _.cloneWith
  11570. * @example
  11571. *
  11572. * function customizer(value) {
  11573. * if (_.isElement(value)) {
  11574. * return value.cloneNode(true);
  11575. * }
  11576. * }
  11577. *
  11578. * var el = _.cloneDeepWith(document.body, customizer);
  11579. *
  11580. * console.log(el === document.body);
  11581. * // => false
  11582. * console.log(el.nodeName);
  11583. * // => 'BODY'
  11584. * console.log(el.childNodes.length);
  11585. * // => 20
  11586. */
  11587. function cloneDeepWith(value, customizer) {
  11588. customizer = typeof customizer == 'function' ? customizer : undefined;
  11589. return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);
  11590. }
  11591. /**
  11592. * Checks if `object` conforms to `source` by invoking the predicate
  11593. * properties of `source` with the corresponding property values of `object`.
  11594. *
  11595. * **Note:** This method is equivalent to `_.conforms` when `source` is
  11596. * partially applied.
  11597. *
  11598. * @static
  11599. * @memberOf _
  11600. * @since 4.14.0
  11601. * @category Lang
  11602. * @param {Object} object The object to inspect.
  11603. * @param {Object} source The object of property predicates to conform to.
  11604. * @returns {boolean} Returns `true` if `object` conforms, else `false`.
  11605. * @example
  11606. *
  11607. * var object = { 'a': 1, 'b': 2 };
  11608. *
  11609. * _.conformsTo(object, { 'b': function(n) { return n > 1; } });
  11610. * // => true
  11611. *
  11612. * _.conformsTo(object, { 'b': function(n) { return n > 2; } });
  11613. * // => false
  11614. */
  11615. function conformsTo(object, source) {
  11616. return source == null || baseConformsTo(object, source, keys(source));
  11617. }
  11618. /**
  11619. * Performs a
  11620. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  11621. * comparison between two values to determine if they are equivalent.
  11622. *
  11623. * @static
  11624. * @memberOf _
  11625. * @since 4.0.0
  11626. * @category Lang
  11627. * @param {*} value The value to compare.
  11628. * @param {*} other The other value to compare.
  11629. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  11630. * @example
  11631. *
  11632. * var object = { 'a': 1 };
  11633. * var other = { 'a': 1 };
  11634. *
  11635. * _.eq(object, object);
  11636. * // => true
  11637. *
  11638. * _.eq(object, other);
  11639. * // => false
  11640. *
  11641. * _.eq('a', 'a');
  11642. * // => true
  11643. *
  11644. * _.eq('a', Object('a'));
  11645. * // => false
  11646. *
  11647. * _.eq(NaN, NaN);
  11648. * // => true
  11649. */
  11650. function eq(value, other) {
  11651. return value === other || (value !== value && other !== other);
  11652. }
  11653. /**
  11654. * Checks if `value` is greater than `other`.
  11655. *
  11656. * @static
  11657. * @memberOf _
  11658. * @since 3.9.0
  11659. * @category Lang
  11660. * @param {*} value The value to compare.
  11661. * @param {*} other The other value to compare.
  11662. * @returns {boolean} Returns `true` if `value` is greater than `other`,
  11663. * else `false`.
  11664. * @see _.lt
  11665. * @example
  11666. *
  11667. * _.gt(3, 1);
  11668. * // => true
  11669. *
  11670. * _.gt(3, 3);
  11671. * // => false
  11672. *
  11673. * _.gt(1, 3);
  11674. * // => false
  11675. */
  11676. var gt = createRelationalOperation(baseGt);
  11677. /**
  11678. * Checks if `value` is greater than or equal to `other`.
  11679. *
  11680. * @static
  11681. * @memberOf _
  11682. * @since 3.9.0
  11683. * @category Lang
  11684. * @param {*} value The value to compare.
  11685. * @param {*} other The other value to compare.
  11686. * @returns {boolean} Returns `true` if `value` is greater than or equal to
  11687. * `other`, else `false`.
  11688. * @see _.lte
  11689. * @example
  11690. *
  11691. * _.gte(3, 1);
  11692. * // => true
  11693. *
  11694. * _.gte(3, 3);
  11695. * // => true
  11696. *
  11697. * _.gte(1, 3);
  11698. * // => false
  11699. */
  11700. var gte = createRelationalOperation(function(value, other) {
  11701. return value >= other;
  11702. });
  11703. /**
  11704. * Checks if `value` is likely an `arguments` object.
  11705. *
  11706. * @static
  11707. * @memberOf _
  11708. * @since 0.1.0
  11709. * @category Lang
  11710. * @param {*} value The value to check.
  11711. * @returns {boolean} Returns `true` if `value` is an `arguments` object,
  11712. * else `false`.
  11713. * @example
  11714. *
  11715. * _.isArguments(function() { return arguments; }());
  11716. * // => true
  11717. *
  11718. * _.isArguments([1, 2, 3]);
  11719. * // => false
  11720. */
  11721. var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
  11722. return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
  11723. !propertyIsEnumerable.call(value, 'callee');
  11724. };
  11725. /**
  11726. * Checks if `value` is classified as an `Array` object.
  11727. *
  11728. * @static
  11729. * @memberOf _
  11730. * @since 0.1.0
  11731. * @category Lang
  11732. * @param {*} value The value to check.
  11733. * @returns {boolean} Returns `true` if `value` is an array, else `false`.
  11734. * @example
  11735. *
  11736. * _.isArray([1, 2, 3]);
  11737. * // => true
  11738. *
  11739. * _.isArray(document.body.children);
  11740. * // => false
  11741. *
  11742. * _.isArray('abc');
  11743. * // => false
  11744. *
  11745. * _.isArray(_.noop);
  11746. * // => false
  11747. */
  11748. var isArray = Array.isArray;
  11749. /**
  11750. * Checks if `value` is classified as an `ArrayBuffer` object.
  11751. *
  11752. * @static
  11753. * @memberOf _
  11754. * @since 4.3.0
  11755. * @category Lang
  11756. * @param {*} value The value to check.
  11757. * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
  11758. * @example
  11759. *
  11760. * _.isArrayBuffer(new ArrayBuffer(2));
  11761. * // => true
  11762. *
  11763. * _.isArrayBuffer(new Array(2));
  11764. * // => false
  11765. */
  11766. var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;
  11767. /**
  11768. * Checks if `value` is array-like. A value is considered array-like if it's
  11769. * not a function and has a `value.length` that's an integer greater than or
  11770. * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
  11771. *
  11772. * @static
  11773. * @memberOf _
  11774. * @since 4.0.0
  11775. * @category Lang
  11776. * @param {*} value The value to check.
  11777. * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
  11778. * @example
  11779. *
  11780. * _.isArrayLike([1, 2, 3]);
  11781. * // => true
  11782. *
  11783. * _.isArrayLike(document.body.children);
  11784. * // => true
  11785. *
  11786. * _.isArrayLike('abc');
  11787. * // => true
  11788. *
  11789. * _.isArrayLike(_.noop);
  11790. * // => false
  11791. */
  11792. function isArrayLike(value) {
  11793. return value != null && isLength(value.length) && !isFunction(value);
  11794. }
  11795. /**
  11796. * This method is like `_.isArrayLike` except that it also checks if `value`
  11797. * is an object.
  11798. *
  11799. * @static
  11800. * @memberOf _
  11801. * @since 4.0.0
  11802. * @category Lang
  11803. * @param {*} value The value to check.
  11804. * @returns {boolean} Returns `true` if `value` is an array-like object,
  11805. * else `false`.
  11806. * @example
  11807. *
  11808. * _.isArrayLikeObject([1, 2, 3]);
  11809. * // => true
  11810. *
  11811. * _.isArrayLikeObject(document.body.children);
  11812. * // => true
  11813. *
  11814. * _.isArrayLikeObject('abc');
  11815. * // => false
  11816. *
  11817. * _.isArrayLikeObject(_.noop);
  11818. * // => false
  11819. */
  11820. function isArrayLikeObject(value) {
  11821. return isObjectLike(value) && isArrayLike(value);
  11822. }
  11823. /**
  11824. * Checks if `value` is classified as a boolean primitive or object.
  11825. *
  11826. * @static
  11827. * @memberOf _
  11828. * @since 0.1.0
  11829. * @category Lang
  11830. * @param {*} value The value to check.
  11831. * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.
  11832. * @example
  11833. *
  11834. * _.isBoolean(false);
  11835. * // => true
  11836. *
  11837. * _.isBoolean(null);
  11838. * // => false
  11839. */
  11840. function isBoolean(value) {
  11841. return value === true || value === false ||
  11842. (isObjectLike(value) && baseGetTag(value) == boolTag);
  11843. }
  11844. /**
  11845. * Checks if `value` is a buffer.
  11846. *
  11847. * @static
  11848. * @memberOf _
  11849. * @since 4.3.0
  11850. * @category Lang
  11851. * @param {*} value The value to check.
  11852. * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
  11853. * @example
  11854. *
  11855. * _.isBuffer(new Buffer(2));
  11856. * // => true
  11857. *
  11858. * _.isBuffer(new Uint8Array(2));
  11859. * // => false
  11860. */
  11861. var isBuffer = nativeIsBuffer || stubFalse;
  11862. /**
  11863. * Checks if `value` is classified as a `Date` object.
  11864. *
  11865. * @static
  11866. * @memberOf _
  11867. * @since 0.1.0
  11868. * @category Lang
  11869. * @param {*} value The value to check.
  11870. * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
  11871. * @example
  11872. *
  11873. * _.isDate(new Date);
  11874. * // => true
  11875. *
  11876. * _.isDate('Mon April 23 2012');
  11877. * // => false
  11878. */
  11879. var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;
  11880. /**
  11881. * Checks if `value` is likely a DOM element.
  11882. *
  11883. * @static
  11884. * @memberOf _
  11885. * @since 0.1.0
  11886. * @category Lang
  11887. * @param {*} value The value to check.
  11888. * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.
  11889. * @example
  11890. *
  11891. * _.isElement(document.body);
  11892. * // => true
  11893. *
  11894. * _.isElement('<body>');
  11895. * // => false
  11896. */
  11897. function isElement(value) {
  11898. return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);
  11899. }
  11900. /**
  11901. * Checks if `value` is an empty object, collection, map, or set.
  11902. *
  11903. * Objects are considered empty if they have no own enumerable string keyed
  11904. * properties.
  11905. *
  11906. * Array-like values such as `arguments` objects, arrays, buffers, strings, or
  11907. * jQuery-like collections are considered empty if they have a `length` of `0`.
  11908. * Similarly, maps and sets are considered empty if they have a `size` of `0`.
  11909. *
  11910. * @static
  11911. * @memberOf _
  11912. * @since 0.1.0
  11913. * @category Lang
  11914. * @param {*} value The value to check.
  11915. * @returns {boolean} Returns `true` if `value` is empty, else `false`.
  11916. * @example
  11917. *
  11918. * _.isEmpty(null);
  11919. * // => true
  11920. *
  11921. * _.isEmpty(true);
  11922. * // => true
  11923. *
  11924. * _.isEmpty(1);
  11925. * // => true
  11926. *
  11927. * _.isEmpty([1, 2, 3]);
  11928. * // => false
  11929. *
  11930. * _.isEmpty({ 'a': 1 });
  11931. * // => false
  11932. */
  11933. function isEmpty(value) {
  11934. if (value == null) {
  11935. return true;
  11936. }
  11937. if (isArrayLike(value) &&
  11938. (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||
  11939. isBuffer(value) || isTypedArray(value) || isArguments(value))) {
  11940. return !value.length;
  11941. }
  11942. var tag = getTag(value);
  11943. if (tag == mapTag || tag == setTag) {
  11944. return !value.size;
  11945. }
  11946. if (isPrototype(value)) {
  11947. return !baseKeys(value).length;
  11948. }
  11949. for (var key in value) {
  11950. if (hasOwnProperty.call(value, key)) {
  11951. return false;
  11952. }
  11953. }
  11954. return true;
  11955. }
  11956. /**
  11957. * Performs a deep comparison between two values to determine if they are
  11958. * equivalent.
  11959. *
  11960. * **Note:** This method supports comparing arrays, array buffers, booleans,
  11961. * date objects, error objects, maps, numbers, `Object` objects, regexes,
  11962. * sets, strings, symbols, and typed arrays. `Object` objects are compared
  11963. * by their own, not inherited, enumerable properties. Functions and DOM
  11964. * nodes are compared by strict equality, i.e. `===`.
  11965. *
  11966. * @static
  11967. * @memberOf _
  11968. * @since 0.1.0
  11969. * @category Lang
  11970. * @param {*} value The value to compare.
  11971. * @param {*} other The other value to compare.
  11972. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  11973. * @example
  11974. *
  11975. * var object = { 'a': 1 };
  11976. * var other = { 'a': 1 };
  11977. *
  11978. * _.isEqual(object, other);
  11979. * // => true
  11980. *
  11981. * object === other;
  11982. * // => false
  11983. */
  11984. function isEqual(value, other) {
  11985. return baseIsEqual(value, other);
  11986. }
  11987. /**
  11988. * This method is like `_.isEqual` except that it accepts `customizer` which
  11989. * is invoked to compare values. If `customizer` returns `undefined`, comparisons
  11990. * are handled by the method instead. The `customizer` is invoked with up to
  11991. * six arguments: (objValue, othValue [, index|key, object, other, stack]).
  11992. *
  11993. * @static
  11994. * @memberOf _
  11995. * @since 4.0.0
  11996. * @category Lang
  11997. * @param {*} value The value to compare.
  11998. * @param {*} other The other value to compare.
  11999. * @param {Function} [customizer] The function to customize comparisons.
  12000. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  12001. * @example
  12002. *
  12003. * function isGreeting(value) {
  12004. * return /^h(?:i|ello)$/.test(value);
  12005. * }
  12006. *
  12007. * function customizer(objValue, othValue) {
  12008. * if (isGreeting(objValue) && isGreeting(othValue)) {
  12009. * return true;
  12010. * }
  12011. * }
  12012. *
  12013. * var array = ['hello', 'goodbye'];
  12014. * var other = ['hi', 'goodbye'];
  12015. *
  12016. * _.isEqualWith(array, other, customizer);
  12017. * // => true
  12018. */
  12019. function isEqualWith(value, other, customizer) {
  12020. customizer = typeof customizer == 'function' ? customizer : undefined;
  12021. var result = customizer ? customizer(value, other) : undefined;
  12022. return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;
  12023. }
  12024. /**
  12025. * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,
  12026. * `SyntaxError`, `TypeError`, or `URIError` object.
  12027. *
  12028. * @static
  12029. * @memberOf _
  12030. * @since 3.0.0
  12031. * @category Lang
  12032. * @param {*} value The value to check.
  12033. * @returns {boolean} Returns `true` if `value` is an error object, else `false`.
  12034. * @example
  12035. *
  12036. * _.isError(new Error);
  12037. * // => true
  12038. *
  12039. * _.isError(Error);
  12040. * // => false
  12041. */
  12042. function isError(value) {
  12043. if (!isObjectLike(value)) {
  12044. return false;
  12045. }
  12046. var tag = baseGetTag(value);
  12047. return tag == errorTag || tag == domExcTag ||
  12048. (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));
  12049. }
  12050. /**
  12051. * Checks if `value` is a finite primitive number.
  12052. *
  12053. * **Note:** This method is based on
  12054. * [`Number.isFinite`](https://mdn.io/Number/isFinite).
  12055. *
  12056. * @static
  12057. * @memberOf _
  12058. * @since 0.1.0
  12059. * @category Lang
  12060. * @param {*} value The value to check.
  12061. * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.
  12062. * @example
  12063. *
  12064. * _.isFinite(3);
  12065. * // => true
  12066. *
  12067. * _.isFinite(Number.MIN_VALUE);
  12068. * // => true
  12069. *
  12070. * _.isFinite(Infinity);
  12071. * // => false
  12072. *
  12073. * _.isFinite('3');
  12074. * // => false
  12075. */
  12076. function isFinite(value) {
  12077. return typeof value == 'number' && nativeIsFinite(value);
  12078. }
  12079. /**
  12080. * Checks if `value` is classified as a `Function` object.
  12081. *
  12082. * @static
  12083. * @memberOf _
  12084. * @since 0.1.0
  12085. * @category Lang
  12086. * @param {*} value The value to check.
  12087. * @returns {boolean} Returns `true` if `value` is a function, else `false`.
  12088. * @example
  12089. *
  12090. * _.isFunction(_);
  12091. * // => true
  12092. *
  12093. * _.isFunction(/abc/);
  12094. * // => false
  12095. */
  12096. function isFunction(value) {
  12097. if (!isObject(value)) {
  12098. return false;
  12099. }
  12100. // The use of `Object#toString` avoids issues with the `typeof` operator
  12101. // in Safari 9 which returns 'object' for typed arrays and other constructors.
  12102. var tag = baseGetTag(value);
  12103. return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
  12104. }
  12105. /**
  12106. * Checks if `value` is an integer.
  12107. *
  12108. * **Note:** This method is based on
  12109. * [`Number.isInteger`](https://mdn.io/Number/isInteger).
  12110. *
  12111. * @static
  12112. * @memberOf _
  12113. * @since 4.0.0
  12114. * @category Lang
  12115. * @param {*} value The value to check.
  12116. * @returns {boolean} Returns `true` if `value` is an integer, else `false`.
  12117. * @example
  12118. *
  12119. * _.isInteger(3);
  12120. * // => true
  12121. *
  12122. * _.isInteger(Number.MIN_VALUE);
  12123. * // => false
  12124. *
  12125. * _.isInteger(Infinity);
  12126. * // => false
  12127. *
  12128. * _.isInteger('3');
  12129. * // => false
  12130. */
  12131. function isInteger(value) {
  12132. return typeof value == 'number' && value == toInteger(value);
  12133. }
  12134. /**
  12135. * Checks if `value` is a valid array-like length.
  12136. *
  12137. * **Note:** This method is loosely based on
  12138. * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
  12139. *
  12140. * @static
  12141. * @memberOf _
  12142. * @since 4.0.0
  12143. * @category Lang
  12144. * @param {*} value The value to check.
  12145. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
  12146. * @example
  12147. *
  12148. * _.isLength(3);
  12149. * // => true
  12150. *
  12151. * _.isLength(Number.MIN_VALUE);
  12152. * // => false
  12153. *
  12154. * _.isLength(Infinity);
  12155. * // => false
  12156. *
  12157. * _.isLength('3');
  12158. * // => false
  12159. */
  12160. function isLength(value) {
  12161. return typeof value == 'number' &&
  12162. value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
  12163. }
  12164. /**
  12165. * Checks if `value` is the
  12166. * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
  12167. * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
  12168. *
  12169. * @static
  12170. * @memberOf _
  12171. * @since 0.1.0
  12172. * @category Lang
  12173. * @param {*} value The value to check.
  12174. * @returns {boolean} Returns `true` if `value` is an object, else `false`.
  12175. * @example
  12176. *
  12177. * _.isObject({});
  12178. * // => true
  12179. *
  12180. * _.isObject([1, 2, 3]);
  12181. * // => true
  12182. *
  12183. * _.isObject(_.noop);
  12184. * // => true
  12185. *
  12186. * _.isObject(null);
  12187. * // => false
  12188. */
  12189. function isObject(value) {
  12190. var type = typeof value;
  12191. return value != null && (type == 'object' || type == 'function');
  12192. }
  12193. /**
  12194. * Checks if `value` is object-like. A value is object-like if it's not `null`
  12195. * and has a `typeof` result of "object".
  12196. *
  12197. * @static
  12198. * @memberOf _
  12199. * @since 4.0.0
  12200. * @category Lang
  12201. * @param {*} value The value to check.
  12202. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  12203. * @example
  12204. *
  12205. * _.isObjectLike({});
  12206. * // => true
  12207. *
  12208. * _.isObjectLike([1, 2, 3]);
  12209. * // => true
  12210. *
  12211. * _.isObjectLike(_.noop);
  12212. * // => false
  12213. *
  12214. * _.isObjectLike(null);
  12215. * // => false
  12216. */
  12217. function isObjectLike(value) {
  12218. return value != null && typeof value == 'object';
  12219. }
  12220. /**
  12221. * Checks if `value` is classified as a `Map` object.
  12222. *
  12223. * @static
  12224. * @memberOf _
  12225. * @since 4.3.0
  12226. * @category Lang
  12227. * @param {*} value The value to check.
  12228. * @returns {boolean} Returns `true` if `value` is a map, else `false`.
  12229. * @example
  12230. *
  12231. * _.isMap(new Map);
  12232. * // => true
  12233. *
  12234. * _.isMap(new WeakMap);
  12235. * // => false
  12236. */
  12237. var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
  12238. /**
  12239. * Performs a partial deep comparison between `object` and `source` to
  12240. * determine if `object` contains equivalent property values.
  12241. *
  12242. * **Note:** This method is equivalent to `_.matches` when `source` is
  12243. * partially applied.
  12244. *
  12245. * Partial comparisons will match empty array and empty object `source`
  12246. * values against any array or object value, respectively. See `_.isEqual`
  12247. * for a list of supported value comparisons.
  12248. *
  12249. * @static
  12250. * @memberOf _
  12251. * @since 3.0.0
  12252. * @category Lang
  12253. * @param {Object} object The object to inspect.
  12254. * @param {Object} source The object of property values to match.
  12255. * @returns {boolean} Returns `true` if `object` is a match, else `false`.
  12256. * @example
  12257. *
  12258. * var object = { 'a': 1, 'b': 2 };
  12259. *
  12260. * _.isMatch(object, { 'b': 2 });
  12261. * // => true
  12262. *
  12263. * _.isMatch(object, { 'b': 1 });
  12264. * // => false
  12265. */
  12266. function isMatch(object, source) {
  12267. return object === source || baseIsMatch(object, source, getMatchData(source));
  12268. }
  12269. /**
  12270. * This method is like `_.isMatch` except that it accepts `customizer` which
  12271. * is invoked to compare values. If `customizer` returns `undefined`, comparisons
  12272. * are handled by the method instead. The `customizer` is invoked with five
  12273. * arguments: (objValue, srcValue, index|key, object, source).
  12274. *
  12275. * @static
  12276. * @memberOf _
  12277. * @since 4.0.0
  12278. * @category Lang
  12279. * @param {Object} object The object to inspect.
  12280. * @param {Object} source The object of property values to match.
  12281. * @param {Function} [customizer] The function to customize comparisons.
  12282. * @returns {boolean} Returns `true` if `object` is a match, else `false`.
  12283. * @example
  12284. *
  12285. * function isGreeting(value) {
  12286. * return /^h(?:i|ello)$/.test(value);
  12287. * }
  12288. *
  12289. * function customizer(objValue, srcValue) {
  12290. * if (isGreeting(objValue) && isGreeting(srcValue)) {
  12291. * return true;
  12292. * }
  12293. * }
  12294. *
  12295. * var object = { 'greeting': 'hello' };
  12296. * var source = { 'greeting': 'hi' };
  12297. *
  12298. * _.isMatchWith(object, source, customizer);
  12299. * // => true
  12300. */
  12301. function isMatchWith(object, source, customizer) {
  12302. customizer = typeof customizer == 'function' ? customizer : undefined;
  12303. return baseIsMatch(object, source, getMatchData(source), customizer);
  12304. }
  12305. /**
  12306. * Checks if `value` is `NaN`.
  12307. *
  12308. * **Note:** This method is based on
  12309. * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as
  12310. * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for
  12311. * `undefined` and other non-number values.
  12312. *
  12313. * @static
  12314. * @memberOf _
  12315. * @since 0.1.0
  12316. * @category Lang
  12317. * @param {*} value The value to check.
  12318. * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
  12319. * @example
  12320. *
  12321. * _.isNaN(NaN);
  12322. * // => true
  12323. *
  12324. * _.isNaN(new Number(NaN));
  12325. * // => true
  12326. *
  12327. * isNaN(undefined);
  12328. * // => true
  12329. *
  12330. * _.isNaN(undefined);
  12331. * // => false
  12332. */
  12333. function isNaN(value) {
  12334. // An `NaN` primitive is the only value that is not equal to itself.
  12335. // Perform the `toStringTag` check first to avoid errors with some
  12336. // ActiveX objects in IE.
  12337. return isNumber(value) && value != +value;
  12338. }
  12339. /**
  12340. * Checks if `value` is a pristine native function.
  12341. *
  12342. * **Note:** This method can't reliably detect native functions in the presence
  12343. * of the core-js package because core-js circumvents this kind of detection.
  12344. * Despite multiple requests, the core-js maintainer has made it clear: any
  12345. * attempt to fix the detection will be obstructed. As a result, we're left
  12346. * with little choice but to throw an error. Unfortunately, this also affects
  12347. * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),
  12348. * which rely on core-js.
  12349. *
  12350. * @static
  12351. * @memberOf _
  12352. * @since 3.0.0
  12353. * @category Lang
  12354. * @param {*} value The value to check.
  12355. * @returns {boolean} Returns `true` if `value` is a native function,
  12356. * else `false`.
  12357. * @example
  12358. *
  12359. * _.isNative(Array.prototype.push);
  12360. * // => true
  12361. *
  12362. * _.isNative(_);
  12363. * // => false
  12364. */
  12365. function isNative(value) {
  12366. if (isMaskable(value)) {
  12367. throw new Error(CORE_ERROR_TEXT);
  12368. }
  12369. return baseIsNative(value);
  12370. }
  12371. /**
  12372. * Checks if `value` is `null`.
  12373. *
  12374. * @static
  12375. * @memberOf _
  12376. * @since 0.1.0
  12377. * @category Lang
  12378. * @param {*} value The value to check.
  12379. * @returns {boolean} Returns `true` if `value` is `null`, else `false`.
  12380. * @example
  12381. *
  12382. * _.isNull(null);
  12383. * // => true
  12384. *
  12385. * _.isNull(void 0);
  12386. * // => false
  12387. */
  12388. function isNull(value) {
  12389. return value === null;
  12390. }
  12391. /**
  12392. * Checks if `value` is `null` or `undefined`.
  12393. *
  12394. * @static
  12395. * @memberOf _
  12396. * @since 4.0.0
  12397. * @category Lang
  12398. * @param {*} value The value to check.
  12399. * @returns {boolean} Returns `true` if `value` is nullish, else `false`.
  12400. * @example
  12401. *
  12402. * _.isNil(null);
  12403. * // => true
  12404. *
  12405. * _.isNil(void 0);
  12406. * // => true
  12407. *
  12408. * _.isNil(NaN);
  12409. * // => false
  12410. */
  12411. function isNil(value) {
  12412. return value == null;
  12413. }
  12414. /**
  12415. * Checks if `value` is classified as a `Number` primitive or object.
  12416. *
  12417. * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are
  12418. * classified as numbers, use the `_.isFinite` method.
  12419. *
  12420. * @static
  12421. * @memberOf _
  12422. * @since 0.1.0
  12423. * @category Lang
  12424. * @param {*} value The value to check.
  12425. * @returns {boolean} Returns `true` if `value` is a number, else `false`.
  12426. * @example
  12427. *
  12428. * _.isNumber(3);
  12429. * // => true
  12430. *
  12431. * _.isNumber(Number.MIN_VALUE);
  12432. * // => true
  12433. *
  12434. * _.isNumber(Infinity);
  12435. * // => true
  12436. *
  12437. * _.isNumber('3');
  12438. * // => false
  12439. */
  12440. function isNumber(value) {
  12441. return typeof value == 'number' ||
  12442. (isObjectLike(value) && baseGetTag(value) == numberTag);
  12443. }
  12444. /**
  12445. * Checks if `value` is a plain object, that is, an object created by the
  12446. * `Object` constructor or one with a `[[Prototype]]` of `null`.
  12447. *
  12448. * @static
  12449. * @memberOf _
  12450. * @since 0.8.0
  12451. * @category Lang
  12452. * @param {*} value The value to check.
  12453. * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
  12454. * @example
  12455. *
  12456. * function Foo() {
  12457. * this.a = 1;
  12458. * }
  12459. *
  12460. * _.isPlainObject(new Foo);
  12461. * // => false
  12462. *
  12463. * _.isPlainObject([1, 2, 3]);
  12464. * // => false
  12465. *
  12466. * _.isPlainObject({ 'x': 0, 'y': 0 });
  12467. * // => true
  12468. *
  12469. * _.isPlainObject(Object.create(null));
  12470. * // => true
  12471. */
  12472. function isPlainObject(value) {
  12473. if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
  12474. return false;
  12475. }
  12476. var proto = getPrototype(value);
  12477. if (proto === null) {
  12478. return true;
  12479. }
  12480. var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
  12481. return typeof Ctor == 'function' && Ctor instanceof Ctor &&
  12482. funcToString.call(Ctor) == objectCtorString;
  12483. }
  12484. /**
  12485. * Checks if `value` is classified as a `RegExp` object.
  12486. *
  12487. * @static
  12488. * @memberOf _
  12489. * @since 0.1.0
  12490. * @category Lang
  12491. * @param {*} value The value to check.
  12492. * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
  12493. * @example
  12494. *
  12495. * _.isRegExp(/abc/);
  12496. * // => true
  12497. *
  12498. * _.isRegExp('/abc/');
  12499. * // => false
  12500. */
  12501. var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;
  12502. /**
  12503. * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754
  12504. * double precision number which isn't the result of a rounded unsafe integer.
  12505. *
  12506. * **Note:** This method is based on
  12507. * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).
  12508. *
  12509. * @static
  12510. * @memberOf _
  12511. * @since 4.0.0
  12512. * @category Lang
  12513. * @param {*} value The value to check.
  12514. * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.
  12515. * @example
  12516. *
  12517. * _.isSafeInteger(3);
  12518. * // => true
  12519. *
  12520. * _.isSafeInteger(Number.MIN_VALUE);
  12521. * // => false
  12522. *
  12523. * _.isSafeInteger(Infinity);
  12524. * // => false
  12525. *
  12526. * _.isSafeInteger('3');
  12527. * // => false
  12528. */
  12529. function isSafeInteger(value) {
  12530. return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;
  12531. }
  12532. /**
  12533. * Checks if `value` is classified as a `Set` object.
  12534. *
  12535. * @static
  12536. * @memberOf _
  12537. * @since 4.3.0
  12538. * @category Lang
  12539. * @param {*} value The value to check.
  12540. * @returns {boolean} Returns `true` if `value` is a set, else `false`.
  12541. * @example
  12542. *
  12543. * _.isSet(new Set);
  12544. * // => true
  12545. *
  12546. * _.isSet(new WeakSet);
  12547. * // => false
  12548. */
  12549. var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
  12550. /**
  12551. * Checks if `value` is classified as a `String` primitive or object.
  12552. *
  12553. * @static
  12554. * @since 0.1.0
  12555. * @memberOf _
  12556. * @category Lang
  12557. * @param {*} value The value to check.
  12558. * @returns {boolean} Returns `true` if `value` is a string, else `false`.
  12559. * @example
  12560. *
  12561. * _.isString('abc');
  12562. * // => true
  12563. *
  12564. * _.isString(1);
  12565. * // => false
  12566. */
  12567. function isString(value) {
  12568. return typeof value == 'string' ||
  12569. (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);
  12570. }
  12571. /**
  12572. * Checks if `value` is classified as a `Symbol` primitive or object.
  12573. *
  12574. * @static
  12575. * @memberOf _
  12576. * @since 4.0.0
  12577. * @category Lang
  12578. * @param {*} value The value to check.
  12579. * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
  12580. * @example
  12581. *
  12582. * _.isSymbol(Symbol.iterator);
  12583. * // => true
  12584. *
  12585. * _.isSymbol('abc');
  12586. * // => false
  12587. */
  12588. function isSymbol(value) {
  12589. return typeof value == 'symbol' ||
  12590. (isObjectLike(value) && baseGetTag(value) == symbolTag);
  12591. }
  12592. /**
  12593. * Checks if `value` is classified as a typed array.
  12594. *
  12595. * @static
  12596. * @memberOf _
  12597. * @since 3.0.0
  12598. * @category Lang
  12599. * @param {*} value The value to check.
  12600. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
  12601. * @example
  12602. *
  12603. * _.isTypedArray(new Uint8Array);
  12604. * // => true
  12605. *
  12606. * _.isTypedArray([]);
  12607. * // => false
  12608. */
  12609. var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
  12610. /**
  12611. * Checks if `value` is `undefined`.
  12612. *
  12613. * @static
  12614. * @since 0.1.0
  12615. * @memberOf _
  12616. * @category Lang
  12617. * @param {*} value The value to check.
  12618. * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
  12619. * @example
  12620. *
  12621. * _.isUndefined(void 0);
  12622. * // => true
  12623. *
  12624. * _.isUndefined(null);
  12625. * // => false
  12626. */
  12627. function isUndefined(value) {
  12628. return value === undefined;
  12629. }
  12630. /**
  12631. * Checks if `value` is classified as a `WeakMap` object.
  12632. *
  12633. * @static
  12634. * @memberOf _
  12635. * @since 4.3.0
  12636. * @category Lang
  12637. * @param {*} value The value to check.
  12638. * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.
  12639. * @example
  12640. *
  12641. * _.isWeakMap(new WeakMap);
  12642. * // => true
  12643. *
  12644. * _.isWeakMap(new Map);
  12645. * // => false
  12646. */
  12647. function isWeakMap(value) {
  12648. return isObjectLike(value) && getTag(value) == weakMapTag;
  12649. }
  12650. /**
  12651. * Checks if `value` is classified as a `WeakSet` object.
  12652. *
  12653. * @static
  12654. * @memberOf _
  12655. * @since 4.3.0
  12656. * @category Lang
  12657. * @param {*} value The value to check.
  12658. * @returns {boolean} Returns `true` if `value` is a weak set, else `false`.
  12659. * @example
  12660. *
  12661. * _.isWeakSet(new WeakSet);
  12662. * // => true
  12663. *
  12664. * _.isWeakSet(new Set);
  12665. * // => false
  12666. */
  12667. function isWeakSet(value) {
  12668. return isObjectLike(value) && baseGetTag(value) == weakSetTag;
  12669. }
  12670. /**
  12671. * Checks if `value` is less than `other`.
  12672. *
  12673. * @static
  12674. * @memberOf _
  12675. * @since 3.9.0
  12676. * @category Lang
  12677. * @param {*} value The value to compare.
  12678. * @param {*} other The other value to compare.
  12679. * @returns {boolean} Returns `true` if `value` is less than `other`,
  12680. * else `false`.
  12681. * @see _.gt
  12682. * @example
  12683. *
  12684. * _.lt(1, 3);
  12685. * // => true
  12686. *
  12687. * _.lt(3, 3);
  12688. * // => false
  12689. *
  12690. * _.lt(3, 1);
  12691. * // => false
  12692. */
  12693. var lt = createRelationalOperation(baseLt);
  12694. /**
  12695. * Checks if `value` is less than or equal to `other`.
  12696. *
  12697. * @static
  12698. * @memberOf _
  12699. * @since 3.9.0
  12700. * @category Lang
  12701. * @param {*} value The value to compare.
  12702. * @param {*} other The other value to compare.
  12703. * @returns {boolean} Returns `true` if `value` is less than or equal to
  12704. * `other`, else `false`.
  12705. * @see _.gte
  12706. * @example
  12707. *
  12708. * _.lte(1, 3);
  12709. * // => true
  12710. *
  12711. * _.lte(3, 3);
  12712. * // => true
  12713. *
  12714. * _.lte(3, 1);
  12715. * // => false
  12716. */
  12717. var lte = createRelationalOperation(function(value, other) {
  12718. return value <= other;
  12719. });
  12720. /**
  12721. * Converts `value` to an array.
  12722. *
  12723. * @static
  12724. * @since 0.1.0
  12725. * @memberOf _
  12726. * @category Lang
  12727. * @param {*} value The value to convert.
  12728. * @returns {Array} Returns the converted array.
  12729. * @example
  12730. *
  12731. * _.toArray({ 'a': 1, 'b': 2 });
  12732. * // => [1, 2]
  12733. *
  12734. * _.toArray('abc');
  12735. * // => ['a', 'b', 'c']
  12736. *
  12737. * _.toArray(1);
  12738. * // => []
  12739. *
  12740. * _.toArray(null);
  12741. * // => []
  12742. */
  12743. function toArray(value) {
  12744. if (!value) {
  12745. return [];
  12746. }
  12747. if (isArrayLike(value)) {
  12748. return isString(value) ? stringToArray(value) : copyArray(value);
  12749. }
  12750. if (symIterator && value[symIterator]) {
  12751. return iteratorToArray(value[symIterator]());
  12752. }
  12753. var tag = getTag(value),
  12754. func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);
  12755. return func(value);
  12756. }
  12757. /**
  12758. * Converts `value` to a finite number.
  12759. *
  12760. * @static
  12761. * @memberOf _
  12762. * @since 4.12.0
  12763. * @category Lang
  12764. * @param {*} value The value to convert.
  12765. * @returns {number} Returns the converted number.
  12766. * @example
  12767. *
  12768. * _.toFinite(3.2);
  12769. * // => 3.2
  12770. *
  12771. * _.toFinite(Number.MIN_VALUE);
  12772. * // => 5e-324
  12773. *
  12774. * _.toFinite(Infinity);
  12775. * // => 1.7976931348623157e+308
  12776. *
  12777. * _.toFinite('3.2');
  12778. * // => 3.2
  12779. */
  12780. function toFinite(value) {
  12781. if (!value) {
  12782. return value === 0 ? value : 0;
  12783. }
  12784. value = toNumber(value);
  12785. if (value === INFINITY || value === -INFINITY) {
  12786. var sign = (value < 0 ? -1 : 1);
  12787. return sign * MAX_INTEGER;
  12788. }
  12789. return value === value ? value : 0;
  12790. }
  12791. /**
  12792. * Converts `value` to an integer.
  12793. *
  12794. * **Note:** This method is loosely based on
  12795. * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
  12796. *
  12797. * @static
  12798. * @memberOf _
  12799. * @since 4.0.0
  12800. * @category Lang
  12801. * @param {*} value The value to convert.
  12802. * @returns {number} Returns the converted integer.
  12803. * @example
  12804. *
  12805. * _.toInteger(3.2);
  12806. * // => 3
  12807. *
  12808. * _.toInteger(Number.MIN_VALUE);
  12809. * // => 0
  12810. *
  12811. * _.toInteger(Infinity);
  12812. * // => 1.7976931348623157e+308
  12813. *
  12814. * _.toInteger('3.2');
  12815. * // => 3
  12816. */
  12817. function toInteger(value) {
  12818. var result = toFinite(value),
  12819. remainder = result % 1;
  12820. return result === result ? (remainder ? result - remainder : result) : 0;
  12821. }
  12822. /**
  12823. * Converts `value` to an integer suitable for use as the length of an
  12824. * array-like object.
  12825. *
  12826. * **Note:** This method is based on
  12827. * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
  12828. *
  12829. * @static
  12830. * @memberOf _
  12831. * @since 4.0.0
  12832. * @category Lang
  12833. * @param {*} value The value to convert.
  12834. * @returns {number} Returns the converted integer.
  12835. * @example
  12836. *
  12837. * _.toLength(3.2);
  12838. * // => 3
  12839. *
  12840. * _.toLength(Number.MIN_VALUE);
  12841. * // => 0
  12842. *
  12843. * _.toLength(Infinity);
  12844. * // => 4294967295
  12845. *
  12846. * _.toLength('3.2');
  12847. * // => 3
  12848. */
  12849. function toLength(value) {
  12850. return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;
  12851. }
  12852. /**
  12853. * Converts `value` to a number.
  12854. *
  12855. * @static
  12856. * @memberOf _
  12857. * @since 4.0.0
  12858. * @category Lang
  12859. * @param {*} value The value to process.
  12860. * @returns {number} Returns the number.
  12861. * @example
  12862. *
  12863. * _.toNumber(3.2);
  12864. * // => 3.2
  12865. *
  12866. * _.toNumber(Number.MIN_VALUE);
  12867. * // => 5e-324
  12868. *
  12869. * _.toNumber(Infinity);
  12870. * // => Infinity
  12871. *
  12872. * _.toNumber('3.2');
  12873. * // => 3.2
  12874. */
  12875. function toNumber(value) {
  12876. if (typeof value == 'number') {
  12877. return value;
  12878. }
  12879. if (isSymbol(value)) {
  12880. return NAN;
  12881. }
  12882. if (isObject(value)) {
  12883. var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
  12884. value = isObject(other) ? (other + '') : other;
  12885. }
  12886. if (typeof value != 'string') {
  12887. return value === 0 ? value : +value;
  12888. }
  12889. value = baseTrim(value);
  12890. var isBinary = reIsBinary.test(value);
  12891. return (isBinary || reIsOctal.test(value))
  12892. ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
  12893. : (reIsBadHex.test(value) ? NAN : +value);
  12894. }
  12895. /**
  12896. * Converts `value` to a plain object flattening inherited enumerable string
  12897. * keyed properties of `value` to own properties of the plain object.
  12898. *
  12899. * @static
  12900. * @memberOf _
  12901. * @since 3.0.0
  12902. * @category Lang
  12903. * @param {*} value The value to convert.
  12904. * @returns {Object} Returns the converted plain object.
  12905. * @example
  12906. *
  12907. * function Foo() {
  12908. * this.b = 2;
  12909. * }
  12910. *
  12911. * Foo.prototype.c = 3;
  12912. *
  12913. * _.assign({ 'a': 1 }, new Foo);
  12914. * // => { 'a': 1, 'b': 2 }
  12915. *
  12916. * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
  12917. * // => { 'a': 1, 'b': 2, 'c': 3 }
  12918. */
  12919. function toPlainObject(value) {
  12920. return copyObject(value, keysIn(value));
  12921. }
  12922. /**
  12923. * Converts `value` to a safe integer. A safe integer can be compared and
  12924. * represented correctly.
  12925. *
  12926. * @static
  12927. * @memberOf _
  12928. * @since 4.0.0
  12929. * @category Lang
  12930. * @param {*} value The value to convert.
  12931. * @returns {number} Returns the converted integer.
  12932. * @example
  12933. *
  12934. * _.toSafeInteger(3.2);
  12935. * // => 3
  12936. *
  12937. * _.toSafeInteger(Number.MIN_VALUE);
  12938. * // => 0
  12939. *
  12940. * _.toSafeInteger(Infinity);
  12941. * // => 9007199254740991
  12942. *
  12943. * _.toSafeInteger('3.2');
  12944. * // => 3
  12945. */
  12946. function toSafeInteger(value) {
  12947. return value
  12948. ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)
  12949. : (value === 0 ? value : 0);
  12950. }
  12951. /**
  12952. * Converts `value` to a string. An empty string is returned for `null`
  12953. * and `undefined` values. The sign of `-0` is preserved.
  12954. *
  12955. * @static
  12956. * @memberOf _
  12957. * @since 4.0.0
  12958. * @category Lang
  12959. * @param {*} value The value to convert.
  12960. * @returns {string} Returns the converted string.
  12961. * @example
  12962. *
  12963. * _.toString(null);
  12964. * // => ''
  12965. *
  12966. * _.toString(-0);
  12967. * // => '-0'
  12968. *
  12969. * _.toString([1, 2, 3]);
  12970. * // => '1,2,3'
  12971. */
  12972. function toString(value) {
  12973. return value == null ? '' : baseToString(value);
  12974. }
  12975. /*------------------------------------------------------------------------*/
  12976. /**
  12977. * Assigns own enumerable string keyed properties of source objects to the
  12978. * destination object. Source objects are applied from left to right.
  12979. * Subsequent sources overwrite property assignments of previous sources.
  12980. *
  12981. * **Note:** This method mutates `object` and is loosely based on
  12982. * [`Object.assign`](https://mdn.io/Object/assign).
  12983. *
  12984. * @static
  12985. * @memberOf _
  12986. * @since 0.10.0
  12987. * @category Object
  12988. * @param {Object} object The destination object.
  12989. * @param {...Object} [sources] The source objects.
  12990. * @returns {Object} Returns `object`.
  12991. * @see _.assignIn
  12992. * @example
  12993. *
  12994. * function Foo() {
  12995. * this.a = 1;
  12996. * }
  12997. *
  12998. * function Bar() {
  12999. * this.c = 3;
  13000. * }
  13001. *
  13002. * Foo.prototype.b = 2;
  13003. * Bar.prototype.d = 4;
  13004. *
  13005. * _.assign({ 'a': 0 }, new Foo, new Bar);
  13006. * // => { 'a': 1, 'c': 3 }
  13007. */
  13008. var assign = createAssigner(function(object, source) {
  13009. if (isPrototype(source) || isArrayLike(source)) {
  13010. copyObject(source, keys(source), object);
  13011. return;
  13012. }
  13013. for (var key in source) {
  13014. if (hasOwnProperty.call(source, key)) {
  13015. assignValue(object, key, source[key]);
  13016. }
  13017. }
  13018. });
  13019. /**
  13020. * This method is like `_.assign` except that it iterates over own and
  13021. * inherited source properties.
  13022. *
  13023. * **Note:** This method mutates `object`.
  13024. *
  13025. * @static
  13026. * @memberOf _
  13027. * @since 4.0.0
  13028. * @alias extend
  13029. * @category Object
  13030. * @param {Object} object The destination object.
  13031. * @param {...Object} [sources] The source objects.
  13032. * @returns {Object} Returns `object`.
  13033. * @see _.assign
  13034. * @example
  13035. *
  13036. * function Foo() {
  13037. * this.a = 1;
  13038. * }
  13039. *
  13040. * function Bar() {
  13041. * this.c = 3;
  13042. * }
  13043. *
  13044. * Foo.prototype.b = 2;
  13045. * Bar.prototype.d = 4;
  13046. *
  13047. * _.assignIn({ 'a': 0 }, new Foo, new Bar);
  13048. * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }
  13049. */
  13050. var assignIn = createAssigner(function(object, source) {
  13051. copyObject(source, keysIn(source), object);
  13052. });
  13053. /**
  13054. * This method is like `_.assignIn` except that it accepts `customizer`
  13055. * which is invoked to produce the assigned values. If `customizer` returns
  13056. * `undefined`, assignment is handled by the method instead. The `customizer`
  13057. * is invoked with five arguments: (objValue, srcValue, key, object, source).
  13058. *
  13059. * **Note:** This method mutates `object`.
  13060. *
  13061. * @static
  13062. * @memberOf _
  13063. * @since 4.0.0
  13064. * @alias extendWith
  13065. * @category Object
  13066. * @param {Object} object The destination object.
  13067. * @param {...Object} sources The source objects.
  13068. * @param {Function} [customizer] The function to customize assigned values.
  13069. * @returns {Object} Returns `object`.
  13070. * @see _.assignWith
  13071. * @example
  13072. *
  13073. * function customizer(objValue, srcValue) {
  13074. * return _.isUndefined(objValue) ? srcValue : objValue;
  13075. * }
  13076. *
  13077. * var defaults = _.partialRight(_.assignInWith, customizer);
  13078. *
  13079. * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
  13080. * // => { 'a': 1, 'b': 2 }
  13081. */
  13082. var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {
  13083. copyObject(source, keysIn(source), object, customizer);
  13084. });
  13085. /**
  13086. * This method is like `_.assign` except that it accepts `customizer`
  13087. * which is invoked to produce the assigned values. If `customizer` returns
  13088. * `undefined`, assignment is handled by the method instead. The `customizer`
  13089. * is invoked with five arguments: (objValue, srcValue, key, object, source).
  13090. *
  13091. * **Note:** This method mutates `object`.
  13092. *
  13093. * @static
  13094. * @memberOf _
  13095. * @since 4.0.0
  13096. * @category Object
  13097. * @param {Object} object The destination object.
  13098. * @param {...Object} sources The source objects.
  13099. * @param {Function} [customizer] The function to customize assigned values.
  13100. * @returns {Object} Returns `object`.
  13101. * @see _.assignInWith
  13102. * @example
  13103. *
  13104. * function customizer(objValue, srcValue) {
  13105. * return _.isUndefined(objValue) ? srcValue : objValue;
  13106. * }
  13107. *
  13108. * var defaults = _.partialRight(_.assignWith, customizer);
  13109. *
  13110. * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
  13111. * // => { 'a': 1, 'b': 2 }
  13112. */
  13113. var assignWith = createAssigner(function(object, source, srcIndex, customizer) {
  13114. copyObject(source, keys(source), object, customizer);
  13115. });
  13116. /**
  13117. * Creates an array of values corresponding to `paths` of `object`.
  13118. *
  13119. * @static
  13120. * @memberOf _
  13121. * @since 1.0.0
  13122. * @category Object
  13123. * @param {Object} object The object to iterate over.
  13124. * @param {...(string|string[])} [paths] The property paths to pick.
  13125. * @returns {Array} Returns the picked values.
  13126. * @example
  13127. *
  13128. * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
  13129. *
  13130. * _.at(object, ['a[0].b.c', 'a[1]']);
  13131. * // => [3, 4]
  13132. */
  13133. var at = flatRest(baseAt);
  13134. /**
  13135. * Creates an object that inherits from the `prototype` object. If a
  13136. * `properties` object is given, its own enumerable string keyed properties
  13137. * are assigned to the created object.
  13138. *
  13139. * @static
  13140. * @memberOf _
  13141. * @since 2.3.0
  13142. * @category Object
  13143. * @param {Object} prototype The object to inherit from.
  13144. * @param {Object} [properties] The properties to assign to the object.
  13145. * @returns {Object} Returns the new object.
  13146. * @example
  13147. *
  13148. * function Shape() {
  13149. * this.x = 0;
  13150. * this.y = 0;
  13151. * }
  13152. *
  13153. * function Circle() {
  13154. * Shape.call(this);
  13155. * }
  13156. *
  13157. * Circle.prototype = _.create(Shape.prototype, {
  13158. * 'constructor': Circle
  13159. * });
  13160. *
  13161. * var circle = new Circle;
  13162. * circle instanceof Circle;
  13163. * // => true
  13164. *
  13165. * circle instanceof Shape;
  13166. * // => true
  13167. */
  13168. function create(prototype, properties) {
  13169. var result = baseCreate(prototype);
  13170. return properties == null ? result : baseAssign(result, properties);
  13171. }
  13172. /**
  13173. * Assigns own and inherited enumerable string keyed properties of source
  13174. * objects to the destination object for all destination properties that
  13175. * resolve to `undefined`. Source objects are applied from left to right.
  13176. * Once a property is set, additional values of the same property are ignored.
  13177. *
  13178. * **Note:** This method mutates `object`.
  13179. *
  13180. * @static
  13181. * @since 0.1.0
  13182. * @memberOf _
  13183. * @category Object
  13184. * @param {Object} object The destination object.
  13185. * @param {...Object} [sources] The source objects.
  13186. * @returns {Object} Returns `object`.
  13187. * @see _.defaultsDeep
  13188. * @example
  13189. *
  13190. * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
  13191. * // => { 'a': 1, 'b': 2 }
  13192. */
  13193. var defaults = baseRest(function(object, sources) {
  13194. object = Object(object);
  13195. var index = -1;
  13196. var length = sources.length;
  13197. var guard = length > 2 ? sources[2] : undefined;
  13198. if (guard && isIterateeCall(sources[0], sources[1], guard)) {
  13199. length = 1;
  13200. }
  13201. while (++index < length) {
  13202. var source = sources[index];
  13203. var props = keysIn(source);
  13204. var propsIndex = -1;
  13205. var propsLength = props.length;
  13206. while (++propsIndex < propsLength) {
  13207. var key = props[propsIndex];
  13208. var value = object[key];
  13209. if (value === undefined ||
  13210. (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {
  13211. object[key] = source[key];
  13212. }
  13213. }
  13214. }
  13215. return object;
  13216. });
  13217. /**
  13218. * This method is like `_.defaults` except that it recursively assigns
  13219. * default properties.
  13220. *
  13221. * **Note:** This method mutates `object`.
  13222. *
  13223. * @static
  13224. * @memberOf _
  13225. * @since 3.10.0
  13226. * @category Object
  13227. * @param {Object} object The destination object.
  13228. * @param {...Object} [sources] The source objects.
  13229. * @returns {Object} Returns `object`.
  13230. * @see _.defaults
  13231. * @example
  13232. *
  13233. * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });
  13234. * // => { 'a': { 'b': 2, 'c': 3 } }
  13235. */
  13236. var defaultsDeep = baseRest(function(args) {
  13237. args.push(undefined, customDefaultsMerge);
  13238. return apply(mergeWith, undefined, args);
  13239. });
  13240. /**
  13241. * This method is like `_.find` except that it returns the key of the first
  13242. * element `predicate` returns truthy for instead of the element itself.
  13243. *
  13244. * @static
  13245. * @memberOf _
  13246. * @since 1.1.0
  13247. * @category Object
  13248. * @param {Object} object The object to inspect.
  13249. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  13250. * @returns {string|undefined} Returns the key of the matched element,
  13251. * else `undefined`.
  13252. * @example
  13253. *
  13254. * var users = {
  13255. * 'barney': { 'age': 36, 'active': true },
  13256. * 'fred': { 'age': 40, 'active': false },
  13257. * 'pebbles': { 'age': 1, 'active': true }
  13258. * };
  13259. *
  13260. * _.findKey(users, function(o) { return o.age < 40; });
  13261. * // => 'barney' (iteration order is not guaranteed)
  13262. *
  13263. * // The `_.matches` iteratee shorthand.
  13264. * _.findKey(users, { 'age': 1, 'active': true });
  13265. * // => 'pebbles'
  13266. *
  13267. * // The `_.matchesProperty` iteratee shorthand.
  13268. * _.findKey(users, ['active', false]);
  13269. * // => 'fred'
  13270. *
  13271. * // The `_.property` iteratee shorthand.
  13272. * _.findKey(users, 'active');
  13273. * // => 'barney'
  13274. */
  13275. function findKey(object, predicate) {
  13276. return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);
  13277. }
  13278. /**
  13279. * This method is like `_.findKey` except that it iterates over elements of
  13280. * a collection in the opposite order.
  13281. *
  13282. * @static
  13283. * @memberOf _
  13284. * @since 2.0.0
  13285. * @category Object
  13286. * @param {Object} object The object to inspect.
  13287. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  13288. * @returns {string|undefined} Returns the key of the matched element,
  13289. * else `undefined`.
  13290. * @example
  13291. *
  13292. * var users = {
  13293. * 'barney': { 'age': 36, 'active': true },
  13294. * 'fred': { 'age': 40, 'active': false },
  13295. * 'pebbles': { 'age': 1, 'active': true }
  13296. * };
  13297. *
  13298. * _.findLastKey(users, function(o) { return o.age < 40; });
  13299. * // => returns 'pebbles' assuming `_.findKey` returns 'barney'
  13300. *
  13301. * // The `_.matches` iteratee shorthand.
  13302. * _.findLastKey(users, { 'age': 36, 'active': true });
  13303. * // => 'barney'
  13304. *
  13305. * // The `_.matchesProperty` iteratee shorthand.
  13306. * _.findLastKey(users, ['active', false]);
  13307. * // => 'fred'
  13308. *
  13309. * // The `_.property` iteratee shorthand.
  13310. * _.findLastKey(users, 'active');
  13311. * // => 'pebbles'
  13312. */
  13313. function findLastKey(object, predicate) {
  13314. return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);
  13315. }
  13316. /**
  13317. * Iterates over own and inherited enumerable string keyed properties of an
  13318. * object and invokes `iteratee` for each property. The iteratee is invoked
  13319. * with three arguments: (value, key, object). Iteratee functions may exit
  13320. * iteration early by explicitly returning `false`.
  13321. *
  13322. * @static
  13323. * @memberOf _
  13324. * @since 0.3.0
  13325. * @category Object
  13326. * @param {Object} object The object to iterate over.
  13327. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  13328. * @returns {Object} Returns `object`.
  13329. * @see _.forInRight
  13330. * @example
  13331. *
  13332. * function Foo() {
  13333. * this.a = 1;
  13334. * this.b = 2;
  13335. * }
  13336. *
  13337. * Foo.prototype.c = 3;
  13338. *
  13339. * _.forIn(new Foo, function(value, key) {
  13340. * console.log(key);
  13341. * });
  13342. * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).
  13343. */
  13344. function forIn(object, iteratee) {
  13345. return object == null
  13346. ? object
  13347. : baseFor(object, getIteratee(iteratee, 3), keysIn);
  13348. }
  13349. /**
  13350. * This method is like `_.forIn` except that it iterates over properties of
  13351. * `object` in the opposite order.
  13352. *
  13353. * @static
  13354. * @memberOf _
  13355. * @since 2.0.0
  13356. * @category Object
  13357. * @param {Object} object The object to iterate over.
  13358. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  13359. * @returns {Object} Returns `object`.
  13360. * @see _.forIn
  13361. * @example
  13362. *
  13363. * function Foo() {
  13364. * this.a = 1;
  13365. * this.b = 2;
  13366. * }
  13367. *
  13368. * Foo.prototype.c = 3;
  13369. *
  13370. * _.forInRight(new Foo, function(value, key) {
  13371. * console.log(key);
  13372. * });
  13373. * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.
  13374. */
  13375. function forInRight(object, iteratee) {
  13376. return object == null
  13377. ? object
  13378. : baseForRight(object, getIteratee(iteratee, 3), keysIn);
  13379. }
  13380. /**
  13381. * Iterates over own enumerable string keyed properties of an object and
  13382. * invokes `iteratee` for each property. The iteratee is invoked with three
  13383. * arguments: (value, key, object). Iteratee functions may exit iteration
  13384. * early by explicitly returning `false`.
  13385. *
  13386. * @static
  13387. * @memberOf _
  13388. * @since 0.3.0
  13389. * @category Object
  13390. * @param {Object} object The object to iterate over.
  13391. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  13392. * @returns {Object} Returns `object`.
  13393. * @see _.forOwnRight
  13394. * @example
  13395. *
  13396. * function Foo() {
  13397. * this.a = 1;
  13398. * this.b = 2;
  13399. * }
  13400. *
  13401. * Foo.prototype.c = 3;
  13402. *
  13403. * _.forOwn(new Foo, function(value, key) {
  13404. * console.log(key);
  13405. * });
  13406. * // => Logs 'a' then 'b' (iteration order is not guaranteed).
  13407. */
  13408. function forOwn(object, iteratee) {
  13409. return object && baseForOwn(object, getIteratee(iteratee, 3));
  13410. }
  13411. /**
  13412. * This method is like `_.forOwn` except that it iterates over properties of
  13413. * `object` in the opposite order.
  13414. *
  13415. * @static
  13416. * @memberOf _
  13417. * @since 2.0.0
  13418. * @category Object
  13419. * @param {Object} object The object to iterate over.
  13420. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  13421. * @returns {Object} Returns `object`.
  13422. * @see _.forOwn
  13423. * @example
  13424. *
  13425. * function Foo() {
  13426. * this.a = 1;
  13427. * this.b = 2;
  13428. * }
  13429. *
  13430. * Foo.prototype.c = 3;
  13431. *
  13432. * _.forOwnRight(new Foo, function(value, key) {
  13433. * console.log(key);
  13434. * });
  13435. * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.
  13436. */
  13437. function forOwnRight(object, iteratee) {
  13438. return object && baseForOwnRight(object, getIteratee(iteratee, 3));
  13439. }
  13440. /**
  13441. * Creates an array of function property names from own enumerable properties
  13442. * of `object`.
  13443. *
  13444. * @static
  13445. * @since 0.1.0
  13446. * @memberOf _
  13447. * @category Object
  13448. * @param {Object} object The object to inspect.
  13449. * @returns {Array} Returns the function names.
  13450. * @see _.functionsIn
  13451. * @example
  13452. *
  13453. * function Foo() {
  13454. * this.a = _.constant('a');
  13455. * this.b = _.constant('b');
  13456. * }
  13457. *
  13458. * Foo.prototype.c = _.constant('c');
  13459. *
  13460. * _.functions(new Foo);
  13461. * // => ['a', 'b']
  13462. */
  13463. function functions(object) {
  13464. return object == null ? [] : baseFunctions(object, keys(object));
  13465. }
  13466. /**
  13467. * Creates an array of function property names from own and inherited
  13468. * enumerable properties of `object`.
  13469. *
  13470. * @static
  13471. * @memberOf _
  13472. * @since 4.0.0
  13473. * @category Object
  13474. * @param {Object} object The object to inspect.
  13475. * @returns {Array} Returns the function names.
  13476. * @see _.functions
  13477. * @example
  13478. *
  13479. * function Foo() {
  13480. * this.a = _.constant('a');
  13481. * this.b = _.constant('b');
  13482. * }
  13483. *
  13484. * Foo.prototype.c = _.constant('c');
  13485. *
  13486. * _.functionsIn(new Foo);
  13487. * // => ['a', 'b', 'c']
  13488. */
  13489. function functionsIn(object) {
  13490. return object == null ? [] : baseFunctions(object, keysIn(object));
  13491. }
  13492. /**
  13493. * Gets the value at `path` of `object`. If the resolved value is
  13494. * `undefined`, the `defaultValue` is returned in its place.
  13495. *
  13496. * @static
  13497. * @memberOf _
  13498. * @since 3.7.0
  13499. * @category Object
  13500. * @param {Object} object The object to query.
  13501. * @param {Array|string} path The path of the property to get.
  13502. * @param {*} [defaultValue] The value returned for `undefined` resolved values.
  13503. * @returns {*} Returns the resolved value.
  13504. * @example
  13505. *
  13506. * var object = { 'a': [{ 'b': { 'c': 3 } }] };
  13507. *
  13508. * _.get(object, 'a[0].b.c');
  13509. * // => 3
  13510. *
  13511. * _.get(object, ['a', '0', 'b', 'c']);
  13512. * // => 3
  13513. *
  13514. * _.get(object, 'a.b.c', 'default');
  13515. * // => 'default'
  13516. */
  13517. function get(object, path, defaultValue) {
  13518. var result = object == null ? undefined : baseGet(object, path);
  13519. return result === undefined ? defaultValue : result;
  13520. }
  13521. /**
  13522. * Checks if `path` is a direct property of `object`.
  13523. *
  13524. * @static
  13525. * @since 0.1.0
  13526. * @memberOf _
  13527. * @category Object
  13528. * @param {Object} object The object to query.
  13529. * @param {Array|string} path The path to check.
  13530. * @returns {boolean} Returns `true` if `path` exists, else `false`.
  13531. * @example
  13532. *
  13533. * var object = { 'a': { 'b': 2 } };
  13534. * var other = _.create({ 'a': _.create({ 'b': 2 }) });
  13535. *
  13536. * _.has(object, 'a');
  13537. * // => true
  13538. *
  13539. * _.has(object, 'a.b');
  13540. * // => true
  13541. *
  13542. * _.has(object, ['a', 'b']);
  13543. * // => true
  13544. *
  13545. * _.has(other, 'a');
  13546. * // => false
  13547. */
  13548. function has(object, path) {
  13549. return object != null && hasPath(object, path, baseHas);
  13550. }
  13551. /**
  13552. * Checks if `path` is a direct or inherited property of `object`.
  13553. *
  13554. * @static
  13555. * @memberOf _
  13556. * @since 4.0.0
  13557. * @category Object
  13558. * @param {Object} object The object to query.
  13559. * @param {Array|string} path The path to check.
  13560. * @returns {boolean} Returns `true` if `path` exists, else `false`.
  13561. * @example
  13562. *
  13563. * var object = _.create({ 'a': _.create({ 'b': 2 }) });
  13564. *
  13565. * _.hasIn(object, 'a');
  13566. * // => true
  13567. *
  13568. * _.hasIn(object, 'a.b');
  13569. * // => true
  13570. *
  13571. * _.hasIn(object, ['a', 'b']);
  13572. * // => true
  13573. *
  13574. * _.hasIn(object, 'b');
  13575. * // => false
  13576. */
  13577. function hasIn(object, path) {
  13578. return object != null && hasPath(object, path, baseHasIn);
  13579. }
  13580. /**
  13581. * Creates an object composed of the inverted keys and values of `object`.
  13582. * If `object` contains duplicate values, subsequent values overwrite
  13583. * property assignments of previous values.
  13584. *
  13585. * @static
  13586. * @memberOf _
  13587. * @since 0.7.0
  13588. * @category Object
  13589. * @param {Object} object The object to invert.
  13590. * @returns {Object} Returns the new inverted object.
  13591. * @example
  13592. *
  13593. * var object = { 'a': 1, 'b': 2, 'c': 1 };
  13594. *
  13595. * _.invert(object);
  13596. * // => { '1': 'c', '2': 'b' }
  13597. */
  13598. var invert = createInverter(function(result, value, key) {
  13599. if (value != null &&
  13600. typeof value.toString != 'function') {
  13601. value = nativeObjectToString.call(value);
  13602. }
  13603. result[value] = key;
  13604. }, constant(identity));
  13605. /**
  13606. * This method is like `_.invert` except that the inverted object is generated
  13607. * from the results of running each element of `object` thru `iteratee`. The
  13608. * corresponding inverted value of each inverted key is an array of keys
  13609. * responsible for generating the inverted value. The iteratee is invoked
  13610. * with one argument: (value).
  13611. *
  13612. * @static
  13613. * @memberOf _
  13614. * @since 4.1.0
  13615. * @category Object
  13616. * @param {Object} object The object to invert.
  13617. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  13618. * @returns {Object} Returns the new inverted object.
  13619. * @example
  13620. *
  13621. * var object = { 'a': 1, 'b': 2, 'c': 1 };
  13622. *
  13623. * _.invertBy(object);
  13624. * // => { '1': ['a', 'c'], '2': ['b'] }
  13625. *
  13626. * _.invertBy(object, function(value) {
  13627. * return 'group' + value;
  13628. * });
  13629. * // => { 'group1': ['a', 'c'], 'group2': ['b'] }
  13630. */
  13631. var invertBy = createInverter(function(result, value, key) {
  13632. if (value != null &&
  13633. typeof value.toString != 'function') {
  13634. value = nativeObjectToString.call(value);
  13635. }
  13636. if (hasOwnProperty.call(result, value)) {
  13637. result[value].push(key);
  13638. } else {
  13639. result[value] = [key];
  13640. }
  13641. }, getIteratee);
  13642. /**
  13643. * Invokes the method at `path` of `object`.
  13644. *
  13645. * @static
  13646. * @memberOf _
  13647. * @since 4.0.0
  13648. * @category Object
  13649. * @param {Object} object The object to query.
  13650. * @param {Array|string} path The path of the method to invoke.
  13651. * @param {...*} [args] The arguments to invoke the method with.
  13652. * @returns {*} Returns the result of the invoked method.
  13653. * @example
  13654. *
  13655. * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };
  13656. *
  13657. * _.invoke(object, 'a[0].b.c.slice', 1, 3);
  13658. * // => [2, 3]
  13659. */
  13660. var invoke = baseRest(baseInvoke);
  13661. /**
  13662. * Creates an array of the own enumerable property names of `object`.
  13663. *
  13664. * **Note:** Non-object values are coerced to objects. See the
  13665. * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
  13666. * for more details.
  13667. *
  13668. * @static
  13669. * @since 0.1.0
  13670. * @memberOf _
  13671. * @category Object
  13672. * @param {Object} object The object to query.
  13673. * @returns {Array} Returns the array of property names.
  13674. * @example
  13675. *
  13676. * function Foo() {
  13677. * this.a = 1;
  13678. * this.b = 2;
  13679. * }
  13680. *
  13681. * Foo.prototype.c = 3;
  13682. *
  13683. * _.keys(new Foo);
  13684. * // => ['a', 'b'] (iteration order is not guaranteed)
  13685. *
  13686. * _.keys('hi');
  13687. * // => ['0', '1']
  13688. */
  13689. function keys(object) {
  13690. return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
  13691. }
  13692. /**
  13693. * Creates an array of the own and inherited enumerable property names of `object`.
  13694. *
  13695. * **Note:** Non-object values are coerced to objects.
  13696. *
  13697. * @static
  13698. * @memberOf _
  13699. * @since 3.0.0
  13700. * @category Object
  13701. * @param {Object} object The object to query.
  13702. * @returns {Array} Returns the array of property names.
  13703. * @example
  13704. *
  13705. * function Foo() {
  13706. * this.a = 1;
  13707. * this.b = 2;
  13708. * }
  13709. *
  13710. * Foo.prototype.c = 3;
  13711. *
  13712. * _.keysIn(new Foo);
  13713. * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
  13714. */
  13715. function keysIn(object) {
  13716. return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
  13717. }
  13718. /**
  13719. * The opposite of `_.mapValues`; this method creates an object with the
  13720. * same values as `object` and keys generated by running each own enumerable
  13721. * string keyed property of `object` thru `iteratee`. The iteratee is invoked
  13722. * with three arguments: (value, key, object).
  13723. *
  13724. * @static
  13725. * @memberOf _
  13726. * @since 3.8.0
  13727. * @category Object
  13728. * @param {Object} object The object to iterate over.
  13729. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  13730. * @returns {Object} Returns the new mapped object.
  13731. * @see _.mapValues
  13732. * @example
  13733. *
  13734. * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {
  13735. * return key + value;
  13736. * });
  13737. * // => { 'a1': 1, 'b2': 2 }
  13738. */
  13739. function mapKeys(object, iteratee) {
  13740. var result = {};
  13741. iteratee = getIteratee(iteratee, 3);
  13742. baseForOwn(object, function(value, key, object) {
  13743. baseAssignValue(result, iteratee(value, key, object), value);
  13744. });
  13745. return result;
  13746. }
  13747. /**
  13748. * Creates an object with the same keys as `object` and values generated
  13749. * by running each own enumerable string keyed property of `object` thru
  13750. * `iteratee`. The iteratee is invoked with three arguments:
  13751. * (value, key, object).
  13752. *
  13753. * @static
  13754. * @memberOf _
  13755. * @since 2.4.0
  13756. * @category Object
  13757. * @param {Object} object The object to iterate over.
  13758. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  13759. * @returns {Object} Returns the new mapped object.
  13760. * @see _.mapKeys
  13761. * @example
  13762. *
  13763. * var users = {
  13764. * 'fred': { 'user': 'fred', 'age': 40 },
  13765. * 'pebbles': { 'user': 'pebbles', 'age': 1 }
  13766. * };
  13767. *
  13768. * _.mapValues(users, function(o) { return o.age; });
  13769. * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
  13770. *
  13771. * // The `_.property` iteratee shorthand.
  13772. * _.mapValues(users, 'age');
  13773. * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
  13774. */
  13775. function mapValues(object, iteratee) {
  13776. var result = {};
  13777. iteratee = getIteratee(iteratee, 3);
  13778. baseForOwn(object, function(value, key, object) {
  13779. baseAssignValue(result, key, iteratee(value, key, object));
  13780. });
  13781. return result;
  13782. }
  13783. /**
  13784. * This method is like `_.assign` except that it recursively merges own and
  13785. * inherited enumerable string keyed properties of source objects into the
  13786. * destination object. Source properties that resolve to `undefined` are
  13787. * skipped if a destination value exists. Array and plain object properties
  13788. * are merged recursively. Other objects and value types are overridden by
  13789. * assignment. Source objects are applied from left to right. Subsequent
  13790. * sources overwrite property assignments of previous sources.
  13791. *
  13792. * **Note:** This method mutates `object`.
  13793. *
  13794. * @static
  13795. * @memberOf _
  13796. * @since 0.5.0
  13797. * @category Object
  13798. * @param {Object} object The destination object.
  13799. * @param {...Object} [sources] The source objects.
  13800. * @returns {Object} Returns `object`.
  13801. * @example
  13802. *
  13803. * var object = {
  13804. * 'a': [{ 'b': 2 }, { 'd': 4 }]
  13805. * };
  13806. *
  13807. * var other = {
  13808. * 'a': [{ 'c': 3 }, { 'e': 5 }]
  13809. * };
  13810. *
  13811. * _.merge(object, other);
  13812. * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
  13813. */
  13814. var merge = createAssigner(function(object, source, srcIndex) {
  13815. baseMerge(object, source, srcIndex);
  13816. });
  13817. /**
  13818. * This method is like `_.merge` except that it accepts `customizer` which
  13819. * is invoked to produce the merged values of the destination and source
  13820. * properties. If `customizer` returns `undefined`, merging is handled by the
  13821. * method instead. The `customizer` is invoked with six arguments:
  13822. * (objValue, srcValue, key, object, source, stack).
  13823. *
  13824. * **Note:** This method mutates `object`.
  13825. *
  13826. * @static
  13827. * @memberOf _
  13828. * @since 4.0.0
  13829. * @category Object
  13830. * @param {Object} object The destination object.
  13831. * @param {...Object} sources The source objects.
  13832. * @param {Function} customizer The function to customize assigned values.
  13833. * @returns {Object} Returns `object`.
  13834. * @example
  13835. *
  13836. * function customizer(objValue, srcValue) {
  13837. * if (_.isArray(objValue)) {
  13838. * return objValue.concat(srcValue);
  13839. * }
  13840. * }
  13841. *
  13842. * var object = { 'a': [1], 'b': [2] };
  13843. * var other = { 'a': [3], 'b': [4] };
  13844. *
  13845. * _.mergeWith(object, other, customizer);
  13846. * // => { 'a': [1, 3], 'b': [2, 4] }
  13847. */
  13848. var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {
  13849. baseMerge(object, source, srcIndex, customizer);
  13850. });
  13851. /**
  13852. * The opposite of `_.pick`; this method creates an object composed of the
  13853. * own and inherited enumerable property paths of `object` that are not omitted.
  13854. *
  13855. * **Note:** This method is considerably slower than `_.pick`.
  13856. *
  13857. * @static
  13858. * @since 0.1.0
  13859. * @memberOf _
  13860. * @category Object
  13861. * @param {Object} object The source object.
  13862. * @param {...(string|string[])} [paths] The property paths to omit.
  13863. * @returns {Object} Returns the new object.
  13864. * @example
  13865. *
  13866. * var object = { 'a': 1, 'b': '2', 'c': 3 };
  13867. *
  13868. * _.omit(object, ['a', 'c']);
  13869. * // => { 'b': '2' }
  13870. */
  13871. var omit = flatRest(function(object, paths) {
  13872. var result = {};
  13873. if (object == null) {
  13874. return result;
  13875. }
  13876. var isDeep = false;
  13877. paths = arrayMap(paths, function(path) {
  13878. path = castPath(path, object);
  13879. isDeep || (isDeep = path.length > 1);
  13880. return path;
  13881. });
  13882. copyObject(object, getAllKeysIn(object), result);
  13883. if (isDeep) {
  13884. result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
  13885. }
  13886. var length = paths.length;
  13887. while (length--) {
  13888. baseUnset(result, paths[length]);
  13889. }
  13890. return result;
  13891. });
  13892. /**
  13893. * The opposite of `_.pickBy`; this method creates an object composed of
  13894. * the own and inherited enumerable string keyed properties of `object` that
  13895. * `predicate` doesn't return truthy for. The predicate is invoked with two
  13896. * arguments: (value, key).
  13897. *
  13898. * @static
  13899. * @memberOf _
  13900. * @since 4.0.0
  13901. * @category Object
  13902. * @param {Object} object The source object.
  13903. * @param {Function} [predicate=_.identity] The function invoked per property.
  13904. * @returns {Object} Returns the new object.
  13905. * @example
  13906. *
  13907. * var object = { 'a': 1, 'b': '2', 'c': 3 };
  13908. *
  13909. * _.omitBy(object, _.isNumber);
  13910. * // => { 'b': '2' }
  13911. */
  13912. function omitBy(object, predicate) {
  13913. return pickBy(object, negate(getIteratee(predicate)));
  13914. }
  13915. /**
  13916. * Creates an object composed of the picked `object` properties.
  13917. *
  13918. * @static
  13919. * @since 0.1.0
  13920. * @memberOf _
  13921. * @category Object
  13922. * @param {Object} object The source object.
  13923. * @param {...(string|string[])} [paths] The property paths to pick.
  13924. * @returns {Object} Returns the new object.
  13925. * @example
  13926. *
  13927. * var object = { 'a': 1, 'b': '2', 'c': 3 };
  13928. *
  13929. * _.pick(object, ['a', 'c']);
  13930. * // => { 'a': 1, 'c': 3 }
  13931. */
  13932. var pick = flatRest(function(object, paths) {
  13933. return object == null ? {} : basePick(object, paths);
  13934. });
  13935. /**
  13936. * Creates an object composed of the `object` properties `predicate` returns
  13937. * truthy for. The predicate is invoked with two arguments: (value, key).
  13938. *
  13939. * @static
  13940. * @memberOf _
  13941. * @since 4.0.0
  13942. * @category Object
  13943. * @param {Object} object The source object.
  13944. * @param {Function} [predicate=_.identity] The function invoked per property.
  13945. * @returns {Object} Returns the new object.
  13946. * @example
  13947. *
  13948. * var object = { 'a': 1, 'b': '2', 'c': 3 };
  13949. *
  13950. * _.pickBy(object, _.isNumber);
  13951. * // => { 'a': 1, 'c': 3 }
  13952. */
  13953. function pickBy(object, predicate) {
  13954. if (object == null) {
  13955. return {};
  13956. }
  13957. var props = arrayMap(getAllKeysIn(object), function(prop) {
  13958. return [prop];
  13959. });
  13960. predicate = getIteratee(predicate);
  13961. return basePickBy(object, props, function(value, path) {
  13962. return predicate(value, path[0]);
  13963. });
  13964. }
  13965. /**
  13966. * This method is like `_.get` except that if the resolved value is a
  13967. * function it's invoked with the `this` binding of its parent object and
  13968. * its result is returned.
  13969. *
  13970. * @static
  13971. * @since 0.1.0
  13972. * @memberOf _
  13973. * @category Object
  13974. * @param {Object} object The object to query.
  13975. * @param {Array|string} path The path of the property to resolve.
  13976. * @param {*} [defaultValue] The value returned for `undefined` resolved values.
  13977. * @returns {*} Returns the resolved value.
  13978. * @example
  13979. *
  13980. * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };
  13981. *
  13982. * _.result(object, 'a[0].b.c1');
  13983. * // => 3
  13984. *
  13985. * _.result(object, 'a[0].b.c2');
  13986. * // => 4
  13987. *
  13988. * _.result(object, 'a[0].b.c3', 'default');
  13989. * // => 'default'
  13990. *
  13991. * _.result(object, 'a[0].b.c3', _.constant('default'));
  13992. * // => 'default'
  13993. */
  13994. function result(object, path, defaultValue) {
  13995. path = castPath(path, object);
  13996. var index = -1,
  13997. length = path.length;
  13998. // Ensure the loop is entered when path is empty.
  13999. if (!length) {
  14000. length = 1;
  14001. object = undefined;
  14002. }
  14003. while (++index < length) {
  14004. var value = object == null ? undefined : object[toKey(path[index])];
  14005. if (value === undefined) {
  14006. index = length;
  14007. value = defaultValue;
  14008. }
  14009. object = isFunction(value) ? value.call(object) : value;
  14010. }
  14011. return object;
  14012. }
  14013. /**
  14014. * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,
  14015. * it's created. Arrays are created for missing index properties while objects
  14016. * are created for all other missing properties. Use `_.setWith` to customize
  14017. * `path` creation.
  14018. *
  14019. * **Note:** This method mutates `object`.
  14020. *
  14021. * @static
  14022. * @memberOf _
  14023. * @since 3.7.0
  14024. * @category Object
  14025. * @param {Object} object The object to modify.
  14026. * @param {Array|string} path The path of the property to set.
  14027. * @param {*} value The value to set.
  14028. * @returns {Object} Returns `object`.
  14029. * @example
  14030. *
  14031. * var object = { 'a': [{ 'b': { 'c': 3 } }] };
  14032. *
  14033. * _.set(object, 'a[0].b.c', 4);
  14034. * console.log(object.a[0].b.c);
  14035. * // => 4
  14036. *
  14037. * _.set(object, ['x', '0', 'y', 'z'], 5);
  14038. * console.log(object.x[0].y.z);
  14039. * // => 5
  14040. */
  14041. function set(object, path, value) {
  14042. return object == null ? object : baseSet(object, path, value);
  14043. }
  14044. /**
  14045. * This method is like `_.set` except that it accepts `customizer` which is
  14046. * invoked to produce the objects of `path`. If `customizer` returns `undefined`
  14047. * path creation is handled by the method instead. The `customizer` is invoked
  14048. * with three arguments: (nsValue, key, nsObject).
  14049. *
  14050. * **Note:** This method mutates `object`.
  14051. *
  14052. * @static
  14053. * @memberOf _
  14054. * @since 4.0.0
  14055. * @category Object
  14056. * @param {Object} object The object to modify.
  14057. * @param {Array|string} path The path of the property to set.
  14058. * @param {*} value The value to set.
  14059. * @param {Function} [customizer] The function to customize assigned values.
  14060. * @returns {Object} Returns `object`.
  14061. * @example
  14062. *
  14063. * var object = {};
  14064. *
  14065. * _.setWith(object, '[0][1]', 'a', Object);
  14066. * // => { '0': { '1': 'a' } }
  14067. */
  14068. function setWith(object, path, value, customizer) {
  14069. customizer = typeof customizer == 'function' ? customizer : undefined;
  14070. return object == null ? object : baseSet(object, path, value, customizer);
  14071. }
  14072. /**
  14073. * Creates an array of own enumerable string keyed-value pairs for `object`
  14074. * which can be consumed by `_.fromPairs`. If `object` is a map or set, its
  14075. * entries are returned.
  14076. *
  14077. * @static
  14078. * @memberOf _
  14079. * @since 4.0.0
  14080. * @alias entries
  14081. * @category Object
  14082. * @param {Object} object The object to query.
  14083. * @returns {Array} Returns the key-value pairs.
  14084. * @example
  14085. *
  14086. * function Foo() {
  14087. * this.a = 1;
  14088. * this.b = 2;
  14089. * }
  14090. *
  14091. * Foo.prototype.c = 3;
  14092. *
  14093. * _.toPairs(new Foo);
  14094. * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)
  14095. */
  14096. var toPairs = createToPairs(keys);
  14097. /**
  14098. * Creates an array of own and inherited enumerable string keyed-value pairs
  14099. * for `object` which can be consumed by `_.fromPairs`. If `object` is a map
  14100. * or set, its entries are returned.
  14101. *
  14102. * @static
  14103. * @memberOf _
  14104. * @since 4.0.0
  14105. * @alias entriesIn
  14106. * @category Object
  14107. * @param {Object} object The object to query.
  14108. * @returns {Array} Returns the key-value pairs.
  14109. * @example
  14110. *
  14111. * function Foo() {
  14112. * this.a = 1;
  14113. * this.b = 2;
  14114. * }
  14115. *
  14116. * Foo.prototype.c = 3;
  14117. *
  14118. * _.toPairsIn(new Foo);
  14119. * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)
  14120. */
  14121. var toPairsIn = createToPairs(keysIn);
  14122. /**
  14123. * An alternative to `_.reduce`; this method transforms `object` to a new
  14124. * `accumulator` object which is the result of running each of its own
  14125. * enumerable string keyed properties thru `iteratee`, with each invocation
  14126. * potentially mutating the `accumulator` object. If `accumulator` is not
  14127. * provided, a new object with the same `[[Prototype]]` will be used. The
  14128. * iteratee is invoked with four arguments: (accumulator, value, key, object).
  14129. * Iteratee functions may exit iteration early by explicitly returning `false`.
  14130. *
  14131. * @static
  14132. * @memberOf _
  14133. * @since 1.3.0
  14134. * @category Object
  14135. * @param {Object} object The object to iterate over.
  14136. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  14137. * @param {*} [accumulator] The custom accumulator value.
  14138. * @returns {*} Returns the accumulated value.
  14139. * @example
  14140. *
  14141. * _.transform([2, 3, 4], function(result, n) {
  14142. * result.push(n *= n);
  14143. * return n % 2 == 0;
  14144. * }, []);
  14145. * // => [4, 9]
  14146. *
  14147. * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
  14148. * (result[value] || (result[value] = [])).push(key);
  14149. * }, {});
  14150. * // => { '1': ['a', 'c'], '2': ['b'] }
  14151. */
  14152. function transform(object, iteratee, accumulator) {
  14153. var isArr = isArray(object),
  14154. isArrLike = isArr || isBuffer(object) || isTypedArray(object);
  14155. iteratee = getIteratee(iteratee, 4);
  14156. if (accumulator == null) {
  14157. var Ctor = object && object.constructor;
  14158. if (isArrLike) {
  14159. accumulator = isArr ? new Ctor : [];
  14160. }
  14161. else if (isObject(object)) {
  14162. accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
  14163. }
  14164. else {
  14165. accumulator = {};
  14166. }
  14167. }
  14168. (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {
  14169. return iteratee(accumulator, value, index, object);
  14170. });
  14171. return accumulator;
  14172. }
  14173. /**
  14174. * Removes the property at `path` of `object`.
  14175. *
  14176. * **Note:** This method mutates `object`.
  14177. *
  14178. * @static
  14179. * @memberOf _
  14180. * @since 4.0.0
  14181. * @category Object
  14182. * @param {Object} object The object to modify.
  14183. * @param {Array|string} path The path of the property to unset.
  14184. * @returns {boolean} Returns `true` if the property is deleted, else `false`.
  14185. * @example
  14186. *
  14187. * var object = { 'a': [{ 'b': { 'c': 7 } }] };
  14188. * _.unset(object, 'a[0].b.c');
  14189. * // => true
  14190. *
  14191. * console.log(object);
  14192. * // => { 'a': [{ 'b': {} }] };
  14193. *
  14194. * _.unset(object, ['a', '0', 'b', 'c']);
  14195. * // => true
  14196. *
  14197. * console.log(object);
  14198. * // => { 'a': [{ 'b': {} }] };
  14199. */
  14200. function unset(object, path) {
  14201. return object == null ? true : baseUnset(object, path);
  14202. }
  14203. /**
  14204. * This method is like `_.set` except that accepts `updater` to produce the
  14205. * value to set. Use `_.updateWith` to customize `path` creation. The `updater`
  14206. * is invoked with one argument: (value).
  14207. *
  14208. * **Note:** This method mutates `object`.
  14209. *
  14210. * @static
  14211. * @memberOf _
  14212. * @since 4.6.0
  14213. * @category Object
  14214. * @param {Object} object The object to modify.
  14215. * @param {Array|string} path The path of the property to set.
  14216. * @param {Function} updater The function to produce the updated value.
  14217. * @returns {Object} Returns `object`.
  14218. * @example
  14219. *
  14220. * var object = { 'a': [{ 'b': { 'c': 3 } }] };
  14221. *
  14222. * _.update(object, 'a[0].b.c', function(n) { return n * n; });
  14223. * console.log(object.a[0].b.c);
  14224. * // => 9
  14225. *
  14226. * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });
  14227. * console.log(object.x[0].y.z);
  14228. * // => 0
  14229. */
  14230. function update(object, path, updater) {
  14231. return object == null ? object : baseUpdate(object, path, castFunction(updater));
  14232. }
  14233. /**
  14234. * This method is like `_.update` except that it accepts `customizer` which is
  14235. * invoked to produce the objects of `path`. If `customizer` returns `undefined`
  14236. * path creation is handled by the method instead. The `customizer` is invoked
  14237. * with three arguments: (nsValue, key, nsObject).
  14238. *
  14239. * **Note:** This method mutates `object`.
  14240. *
  14241. * @static
  14242. * @memberOf _
  14243. * @since 4.6.0
  14244. * @category Object
  14245. * @param {Object} object The object to modify.
  14246. * @param {Array|string} path The path of the property to set.
  14247. * @param {Function} updater The function to produce the updated value.
  14248. * @param {Function} [customizer] The function to customize assigned values.
  14249. * @returns {Object} Returns `object`.
  14250. * @example
  14251. *
  14252. * var object = {};
  14253. *
  14254. * _.updateWith(object, '[0][1]', _.constant('a'), Object);
  14255. * // => { '0': { '1': 'a' } }
  14256. */
  14257. function updateWith(object, path, updater, customizer) {
  14258. customizer = typeof customizer == 'function' ? customizer : undefined;
  14259. return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);
  14260. }
  14261. /**
  14262. * Creates an array of the own enumerable string keyed property values of `object`.
  14263. *
  14264. * **Note:** Non-object values are coerced to objects.
  14265. *
  14266. * @static
  14267. * @since 0.1.0
  14268. * @memberOf _
  14269. * @category Object
  14270. * @param {Object} object The object to query.
  14271. * @returns {Array} Returns the array of property values.
  14272. * @example
  14273. *
  14274. * function Foo() {
  14275. * this.a = 1;
  14276. * this.b = 2;
  14277. * }
  14278. *
  14279. * Foo.prototype.c = 3;
  14280. *
  14281. * _.values(new Foo);
  14282. * // => [1, 2] (iteration order is not guaranteed)
  14283. *
  14284. * _.values('hi');
  14285. * // => ['h', 'i']
  14286. */
  14287. function values(object) {
  14288. return object == null ? [] : baseValues(object, keys(object));
  14289. }
  14290. /**
  14291. * Creates an array of the own and inherited enumerable string keyed property
  14292. * values of `object`.
  14293. *
  14294. * **Note:** Non-object values are coerced to objects.
  14295. *
  14296. * @static
  14297. * @memberOf _
  14298. * @since 3.0.0
  14299. * @category Object
  14300. * @param {Object} object The object to query.
  14301. * @returns {Array} Returns the array of property values.
  14302. * @example
  14303. *
  14304. * function Foo() {
  14305. * this.a = 1;
  14306. * this.b = 2;
  14307. * }
  14308. *
  14309. * Foo.prototype.c = 3;
  14310. *
  14311. * _.valuesIn(new Foo);
  14312. * // => [1, 2, 3] (iteration order is not guaranteed)
  14313. */
  14314. function valuesIn(object) {
  14315. return object == null ? [] : baseValues(object, keysIn(object));
  14316. }
  14317. /*------------------------------------------------------------------------*/
  14318. /**
  14319. * Clamps `number` within the inclusive `lower` and `upper` bounds.
  14320. *
  14321. * @static
  14322. * @memberOf _
  14323. * @since 4.0.0
  14324. * @category Number
  14325. * @param {number} number The number to clamp.
  14326. * @param {number} [lower] The lower bound.
  14327. * @param {number} upper The upper bound.
  14328. * @returns {number} Returns the clamped number.
  14329. * @example
  14330. *
  14331. * _.clamp(-10, -5, 5);
  14332. * // => -5
  14333. *
  14334. * _.clamp(10, -5, 5);
  14335. * // => 5
  14336. */
  14337. function clamp(number, lower, upper) {
  14338. if (upper === undefined) {
  14339. upper = lower;
  14340. lower = undefined;
  14341. }
  14342. if (upper !== undefined) {
  14343. upper = toNumber(upper);
  14344. upper = upper === upper ? upper : 0;
  14345. }
  14346. if (lower !== undefined) {
  14347. lower = toNumber(lower);
  14348. lower = lower === lower ? lower : 0;
  14349. }
  14350. return baseClamp(toNumber(number), lower, upper);
  14351. }
  14352. /**
  14353. * Checks if `n` is between `start` and up to, but not including, `end`. If
  14354. * `end` is not specified, it's set to `start` with `start` then set to `0`.
  14355. * If `start` is greater than `end` the params are swapped to support
  14356. * negative ranges.
  14357. *
  14358. * @static
  14359. * @memberOf _
  14360. * @since 3.3.0
  14361. * @category Number
  14362. * @param {number} number The number to check.
  14363. * @param {number} [start=0] The start of the range.
  14364. * @param {number} end The end of the range.
  14365. * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
  14366. * @see _.range, _.rangeRight
  14367. * @example
  14368. *
  14369. * _.inRange(3, 2, 4);
  14370. * // => true
  14371. *
  14372. * _.inRange(4, 8);
  14373. * // => true
  14374. *
  14375. * _.inRange(4, 2);
  14376. * // => false
  14377. *
  14378. * _.inRange(2, 2);
  14379. * // => false
  14380. *
  14381. * _.inRange(1.2, 2);
  14382. * // => true
  14383. *
  14384. * _.inRange(5.2, 4);
  14385. * // => false
  14386. *
  14387. * _.inRange(-3, -2, -6);
  14388. * // => true
  14389. */
  14390. function inRange(number, start, end) {
  14391. start = toFinite(start);
  14392. if (end === undefined) {
  14393. end = start;
  14394. start = 0;
  14395. } else {
  14396. end = toFinite(end);
  14397. }
  14398. number = toNumber(number);
  14399. return baseInRange(number, start, end);
  14400. }
  14401. /**
  14402. * Produces a random number between the inclusive `lower` and `upper` bounds.
  14403. * If only one argument is provided a number between `0` and the given number
  14404. * is returned. If `floating` is `true`, or either `lower` or `upper` are
  14405. * floats, a floating-point number is returned instead of an integer.
  14406. *
  14407. * **Note:** JavaScript follows the IEEE-754 standard for resolving
  14408. * floating-point values which can produce unexpected results.
  14409. *
  14410. * @static
  14411. * @memberOf _
  14412. * @since 0.7.0
  14413. * @category Number
  14414. * @param {number} [lower=0] The lower bound.
  14415. * @param {number} [upper=1] The upper bound.
  14416. * @param {boolean} [floating] Specify returning a floating-point number.
  14417. * @returns {number} Returns the random number.
  14418. * @example
  14419. *
  14420. * _.random(0, 5);
  14421. * // => an integer between 0 and 5
  14422. *
  14423. * _.random(5);
  14424. * // => also an integer between 0 and 5
  14425. *
  14426. * _.random(5, true);
  14427. * // => a floating-point number between 0 and 5
  14428. *
  14429. * _.random(1.2, 5.2);
  14430. * // => a floating-point number between 1.2 and 5.2
  14431. */
  14432. function random(lower, upper, floating) {
  14433. if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {
  14434. upper = floating = undefined;
  14435. }
  14436. if (floating === undefined) {
  14437. if (typeof upper == 'boolean') {
  14438. floating = upper;
  14439. upper = undefined;
  14440. }
  14441. else if (typeof lower == 'boolean') {
  14442. floating = lower;
  14443. lower = undefined;
  14444. }
  14445. }
  14446. if (lower === undefined && upper === undefined) {
  14447. lower = 0;
  14448. upper = 1;
  14449. }
  14450. else {
  14451. lower = toFinite(lower);
  14452. if (upper === undefined) {
  14453. upper = lower;
  14454. lower = 0;
  14455. } else {
  14456. upper = toFinite(upper);
  14457. }
  14458. }
  14459. if (lower > upper) {
  14460. var temp = lower;
  14461. lower = upper;
  14462. upper = temp;
  14463. }
  14464. if (floating || lower % 1 || upper % 1) {
  14465. var rand = nativeRandom();
  14466. return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);
  14467. }
  14468. return baseRandom(lower, upper);
  14469. }
  14470. /*------------------------------------------------------------------------*/
  14471. /**
  14472. * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
  14473. *
  14474. * @static
  14475. * @memberOf _
  14476. * @since 3.0.0
  14477. * @category String
  14478. * @param {string} [string=''] The string to convert.
  14479. * @returns {string} Returns the camel cased string.
  14480. * @example
  14481. *
  14482. * _.camelCase('Foo Bar');
  14483. * // => 'fooBar'
  14484. *
  14485. * _.camelCase('--foo-bar--');
  14486. * // => 'fooBar'
  14487. *
  14488. * _.camelCase('__FOO_BAR__');
  14489. * // => 'fooBar'
  14490. */
  14491. var camelCase = createCompounder(function(result, word, index) {
  14492. word = word.toLowerCase();
  14493. return result + (index ? capitalize(word) : word);
  14494. });
  14495. /**
  14496. * Converts the first character of `string` to upper case and the remaining
  14497. * to lower case.
  14498. *
  14499. * @static
  14500. * @memberOf _
  14501. * @since 3.0.0
  14502. * @category String
  14503. * @param {string} [string=''] The string to capitalize.
  14504. * @returns {string} Returns the capitalized string.
  14505. * @example
  14506. *
  14507. * _.capitalize('FRED');
  14508. * // => 'Fred'
  14509. */
  14510. function capitalize(string) {
  14511. return upperFirst(toString(string).toLowerCase());
  14512. }
  14513. /**
  14514. * Deburrs `string` by converting
  14515. * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
  14516. * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
  14517. * letters to basic Latin letters and removing
  14518. * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
  14519. *
  14520. * @static
  14521. * @memberOf _
  14522. * @since 3.0.0
  14523. * @category String
  14524. * @param {string} [string=''] The string to deburr.
  14525. * @returns {string} Returns the deburred string.
  14526. * @example
  14527. *
  14528. * _.deburr('déjà vu');
  14529. * // => 'deja vu'
  14530. */
  14531. function deburr(string) {
  14532. string = toString(string);
  14533. return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');
  14534. }
  14535. /**
  14536. * Checks if `string` ends with the given target string.
  14537. *
  14538. * @static
  14539. * @memberOf _
  14540. * @since 3.0.0
  14541. * @category String
  14542. * @param {string} [string=''] The string to inspect.
  14543. * @param {string} [target] The string to search for.
  14544. * @param {number} [position=string.length] The position to search up to.
  14545. * @returns {boolean} Returns `true` if `string` ends with `target`,
  14546. * else `false`.
  14547. * @example
  14548. *
  14549. * _.endsWith('abc', 'c');
  14550. * // => true
  14551. *
  14552. * _.endsWith('abc', 'b');
  14553. * // => false
  14554. *
  14555. * _.endsWith('abc', 'b', 2);
  14556. * // => true
  14557. */
  14558. function endsWith(string, target, position) {
  14559. string = toString(string);
  14560. target = baseToString(target);
  14561. var length = string.length;
  14562. position = position === undefined
  14563. ? length
  14564. : baseClamp(toInteger(position), 0, length);
  14565. var end = position;
  14566. position -= target.length;
  14567. return position >= 0 && string.slice(position, end) == target;
  14568. }
  14569. /**
  14570. * Converts the characters "&", "<", ">", '"', and "'" in `string` to their
  14571. * corresponding HTML entities.
  14572. *
  14573. * **Note:** No other characters are escaped. To escape additional
  14574. * characters use a third-party library like [_he_](https://mths.be/he).
  14575. *
  14576. * Though the ">" character is escaped for symmetry, characters like
  14577. * ">" and "/" don't need escaping in HTML and have no special meaning
  14578. * unless they're part of a tag or unquoted attribute value. See
  14579. * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
  14580. * (under "semi-related fun fact") for more details.
  14581. *
  14582. * When working with HTML you should always
  14583. * [quote attribute values](http://wonko.com/post/html-escaping) to reduce
  14584. * XSS vectors.
  14585. *
  14586. * @static
  14587. * @since 0.1.0
  14588. * @memberOf _
  14589. * @category String
  14590. * @param {string} [string=''] The string to escape.
  14591. * @returns {string} Returns the escaped string.
  14592. * @example
  14593. *
  14594. * _.escape('fred, barney, & pebbles');
  14595. * // => 'fred, barney, &amp; pebbles'
  14596. */
  14597. function escape(string) {
  14598. string = toString(string);
  14599. return (string && reHasUnescapedHtml.test(string))
  14600. ? string.replace(reUnescapedHtml, escapeHtmlChar)
  14601. : string;
  14602. }
  14603. /**
  14604. * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+",
  14605. * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`.
  14606. *
  14607. * @static
  14608. * @memberOf _
  14609. * @since 3.0.0
  14610. * @category String
  14611. * @param {string} [string=''] The string to escape.
  14612. * @returns {string} Returns the escaped string.
  14613. * @example
  14614. *
  14615. * _.escapeRegExp('[lodash](https://lodash.com/)');
  14616. * // => '\[lodash\]\(https://lodash\.com/\)'
  14617. */
  14618. function escapeRegExp(string) {
  14619. string = toString(string);
  14620. return (string && reHasRegExpChar.test(string))
  14621. ? string.replace(reRegExpChar, '\\$&')
  14622. : string;
  14623. }
  14624. /**
  14625. * Converts `string` to
  14626. * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).
  14627. *
  14628. * @static
  14629. * @memberOf _
  14630. * @since 3.0.0
  14631. * @category String
  14632. * @param {string} [string=''] The string to convert.
  14633. * @returns {string} Returns the kebab cased string.
  14634. * @example
  14635. *
  14636. * _.kebabCase('Foo Bar');
  14637. * // => 'foo-bar'
  14638. *
  14639. * _.kebabCase('fooBar');
  14640. * // => 'foo-bar'
  14641. *
  14642. * _.kebabCase('__FOO_BAR__');
  14643. * // => 'foo-bar'
  14644. */
  14645. var kebabCase = createCompounder(function(result, word, index) {
  14646. return result + (index ? '-' : '') + word.toLowerCase();
  14647. });
  14648. /**
  14649. * Converts `string`, as space separated words, to lower case.
  14650. *
  14651. * @static
  14652. * @memberOf _
  14653. * @since 4.0.0
  14654. * @category String
  14655. * @param {string} [string=''] The string to convert.
  14656. * @returns {string} Returns the lower cased string.
  14657. * @example
  14658. *
  14659. * _.lowerCase('--Foo-Bar--');
  14660. * // => 'foo bar'
  14661. *
  14662. * _.lowerCase('fooBar');
  14663. * // => 'foo bar'
  14664. *
  14665. * _.lowerCase('__FOO_BAR__');
  14666. * // => 'foo bar'
  14667. */
  14668. var lowerCase = createCompounder(function(result, word, index) {
  14669. return result + (index ? ' ' : '') + word.toLowerCase();
  14670. });
  14671. /**
  14672. * Converts the first character of `string` to lower case.
  14673. *
  14674. * @static
  14675. * @memberOf _
  14676. * @since 4.0.0
  14677. * @category String
  14678. * @param {string} [string=''] The string to convert.
  14679. * @returns {string} Returns the converted string.
  14680. * @example
  14681. *
  14682. * _.lowerFirst('Fred');
  14683. * // => 'fred'
  14684. *
  14685. * _.lowerFirst('FRED');
  14686. * // => 'fRED'
  14687. */
  14688. var lowerFirst = createCaseFirst('toLowerCase');
  14689. /**
  14690. * Pads `string` on the left and right sides if it's shorter than `length`.
  14691. * Padding characters are truncated if they can't be evenly divided by `length`.
  14692. *
  14693. * @static
  14694. * @memberOf _
  14695. * @since 3.0.0
  14696. * @category String
  14697. * @param {string} [string=''] The string to pad.
  14698. * @param {number} [length=0] The padding length.
  14699. * @param {string} [chars=' '] The string used as padding.
  14700. * @returns {string} Returns the padded string.
  14701. * @example
  14702. *
  14703. * _.pad('abc', 8);
  14704. * // => ' abc '
  14705. *
  14706. * _.pad('abc', 8, '_-');
  14707. * // => '_-abc_-_'
  14708. *
  14709. * _.pad('abc', 3);
  14710. * // => 'abc'
  14711. */
  14712. function pad(string, length, chars) {
  14713. string = toString(string);
  14714. length = toInteger(length);
  14715. var strLength = length ? stringSize(string) : 0;
  14716. if (!length || strLength >= length) {
  14717. return string;
  14718. }
  14719. var mid = (length - strLength) / 2;
  14720. return (
  14721. createPadding(nativeFloor(mid), chars) +
  14722. string +
  14723. createPadding(nativeCeil(mid), chars)
  14724. );
  14725. }
  14726. /**
  14727. * Pads `string` on the right side if it's shorter than `length`. Padding
  14728. * characters are truncated if they exceed `length`.
  14729. *
  14730. * @static
  14731. * @memberOf _
  14732. * @since 4.0.0
  14733. * @category String
  14734. * @param {string} [string=''] The string to pad.
  14735. * @param {number} [length=0] The padding length.
  14736. * @param {string} [chars=' '] The string used as padding.
  14737. * @returns {string} Returns the padded string.
  14738. * @example
  14739. *
  14740. * _.padEnd('abc', 6);
  14741. * // => 'abc '
  14742. *
  14743. * _.padEnd('abc', 6, '_-');
  14744. * // => 'abc_-_'
  14745. *
  14746. * _.padEnd('abc', 3);
  14747. * // => 'abc'
  14748. */
  14749. function padEnd(string, length, chars) {
  14750. string = toString(string);
  14751. length = toInteger(length);
  14752. var strLength = length ? stringSize(string) : 0;
  14753. return (length && strLength < length)
  14754. ? (string + createPadding(length - strLength, chars))
  14755. : string;
  14756. }
  14757. /**
  14758. * Pads `string` on the left side if it's shorter than `length`. Padding
  14759. * characters are truncated if they exceed `length`.
  14760. *
  14761. * @static
  14762. * @memberOf _
  14763. * @since 4.0.0
  14764. * @category String
  14765. * @param {string} [string=''] The string to pad.
  14766. * @param {number} [length=0] The padding length.
  14767. * @param {string} [chars=' '] The string used as padding.
  14768. * @returns {string} Returns the padded string.
  14769. * @example
  14770. *
  14771. * _.padStart('abc', 6);
  14772. * // => ' abc'
  14773. *
  14774. * _.padStart('abc', 6, '_-');
  14775. * // => '_-_abc'
  14776. *
  14777. * _.padStart('abc', 3);
  14778. * // => 'abc'
  14779. */
  14780. function padStart(string, length, chars) {
  14781. string = toString(string);
  14782. length = toInteger(length);
  14783. var strLength = length ? stringSize(string) : 0;
  14784. return (length && strLength < length)
  14785. ? (createPadding(length - strLength, chars) + string)
  14786. : string;
  14787. }
  14788. /**
  14789. * Converts `string` to an integer of the specified radix. If `radix` is
  14790. * `undefined` or `0`, a `radix` of `10` is used unless `value` is a
  14791. * hexadecimal, in which case a `radix` of `16` is used.
  14792. *
  14793. * **Note:** This method aligns with the
  14794. * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.
  14795. *
  14796. * @static
  14797. * @memberOf _
  14798. * @since 1.1.0
  14799. * @category String
  14800. * @param {string} string The string to convert.
  14801. * @param {number} [radix=10] The radix to interpret `value` by.
  14802. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  14803. * @returns {number} Returns the converted integer.
  14804. * @example
  14805. *
  14806. * _.parseInt('08');
  14807. * // => 8
  14808. *
  14809. * _.map(['6', '08', '10'], _.parseInt);
  14810. * // => [6, 8, 10]
  14811. */
  14812. function parseInt(string, radix, guard) {
  14813. if (guard || radix == null) {
  14814. radix = 0;
  14815. } else if (radix) {
  14816. radix = +radix;
  14817. }
  14818. return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);
  14819. }
  14820. /**
  14821. * Repeats the given string `n` times.
  14822. *
  14823. * @static
  14824. * @memberOf _
  14825. * @since 3.0.0
  14826. * @category String
  14827. * @param {string} [string=''] The string to repeat.
  14828. * @param {number} [n=1] The number of times to repeat the string.
  14829. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  14830. * @returns {string} Returns the repeated string.
  14831. * @example
  14832. *
  14833. * _.repeat('*', 3);
  14834. * // => '***'
  14835. *
  14836. * _.repeat('abc', 2);
  14837. * // => 'abcabc'
  14838. *
  14839. * _.repeat('abc', 0);
  14840. * // => ''
  14841. */
  14842. function repeat(string, n, guard) {
  14843. if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {
  14844. n = 1;
  14845. } else {
  14846. n = toInteger(n);
  14847. }
  14848. return baseRepeat(toString(string), n);
  14849. }
  14850. /**
  14851. * Replaces matches for `pattern` in `string` with `replacement`.
  14852. *
  14853. * **Note:** This method is based on
  14854. * [`String#replace`](https://mdn.io/String/replace).
  14855. *
  14856. * @static
  14857. * @memberOf _
  14858. * @since 4.0.0
  14859. * @category String
  14860. * @param {string} [string=''] The string to modify.
  14861. * @param {RegExp|string} pattern The pattern to replace.
  14862. * @param {Function|string} replacement The match replacement.
  14863. * @returns {string} Returns the modified string.
  14864. * @example
  14865. *
  14866. * _.replace('Hi Fred', 'Fred', 'Barney');
  14867. * // => 'Hi Barney'
  14868. */
  14869. function replace() {
  14870. var args = arguments,
  14871. string = toString(args[0]);
  14872. return args.length < 3 ? string : string.replace(args[1], args[2]);
  14873. }
  14874. /**
  14875. * Converts `string` to
  14876. * [snake case](https://en.wikipedia.org/wiki/Snake_case).
  14877. *
  14878. * @static
  14879. * @memberOf _
  14880. * @since 3.0.0
  14881. * @category String
  14882. * @param {string} [string=''] The string to convert.
  14883. * @returns {string} Returns the snake cased string.
  14884. * @example
  14885. *
  14886. * _.snakeCase('Foo Bar');
  14887. * // => 'foo_bar'
  14888. *
  14889. * _.snakeCase('fooBar');
  14890. * // => 'foo_bar'
  14891. *
  14892. * _.snakeCase('--FOO-BAR--');
  14893. * // => 'foo_bar'
  14894. */
  14895. var snakeCase = createCompounder(function(result, word, index) {
  14896. return result + (index ? '_' : '') + word.toLowerCase();
  14897. });
  14898. /**
  14899. * Splits `string` by `separator`.
  14900. *
  14901. * **Note:** This method is based on
  14902. * [`String#split`](https://mdn.io/String/split).
  14903. *
  14904. * @static
  14905. * @memberOf _
  14906. * @since 4.0.0
  14907. * @category String
  14908. * @param {string} [string=''] The string to split.
  14909. * @param {RegExp|string} separator The separator pattern to split by.
  14910. * @param {number} [limit] The length to truncate results to.
  14911. * @returns {Array} Returns the string segments.
  14912. * @example
  14913. *
  14914. * _.split('a-b-c', '-', 2);
  14915. * // => ['a', 'b']
  14916. */
  14917. function split(string, separator, limit) {
  14918. if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {
  14919. separator = limit = undefined;
  14920. }
  14921. limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;
  14922. if (!limit) {
  14923. return [];
  14924. }
  14925. string = toString(string);
  14926. if (string && (
  14927. typeof separator == 'string' ||
  14928. (separator != null && !isRegExp(separator))
  14929. )) {
  14930. separator = baseToString(separator);
  14931. if (!separator && hasUnicode(string)) {
  14932. return castSlice(stringToArray(string), 0, limit);
  14933. }
  14934. }
  14935. return string.split(separator, limit);
  14936. }
  14937. /**
  14938. * Converts `string` to
  14939. * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).
  14940. *
  14941. * @static
  14942. * @memberOf _
  14943. * @since 3.1.0
  14944. * @category String
  14945. * @param {string} [string=''] The string to convert.
  14946. * @returns {string} Returns the start cased string.
  14947. * @example
  14948. *
  14949. * _.startCase('--foo-bar--');
  14950. * // => 'Foo Bar'
  14951. *
  14952. * _.startCase('fooBar');
  14953. * // => 'Foo Bar'
  14954. *
  14955. * _.startCase('__FOO_BAR__');
  14956. * // => 'FOO BAR'
  14957. */
  14958. var startCase = createCompounder(function(result, word, index) {
  14959. return result + (index ? ' ' : '') + upperFirst(word);
  14960. });
  14961. /**
  14962. * Checks if `string` starts with the given target string.
  14963. *
  14964. * @static
  14965. * @memberOf _
  14966. * @since 3.0.0
  14967. * @category String
  14968. * @param {string} [string=''] The string to inspect.
  14969. * @param {string} [target] The string to search for.
  14970. * @param {number} [position=0] The position to search from.
  14971. * @returns {boolean} Returns `true` if `string` starts with `target`,
  14972. * else `false`.
  14973. * @example
  14974. *
  14975. * _.startsWith('abc', 'a');
  14976. * // => true
  14977. *
  14978. * _.startsWith('abc', 'b');
  14979. * // => false
  14980. *
  14981. * _.startsWith('abc', 'b', 1);
  14982. * // => true
  14983. */
  14984. function startsWith(string, target, position) {
  14985. string = toString(string);
  14986. position = position == null
  14987. ? 0
  14988. : baseClamp(toInteger(position), 0, string.length);
  14989. target = baseToString(target);
  14990. return string.slice(position, position + target.length) == target;
  14991. }
  14992. /**
  14993. * Creates a compiled template function that can interpolate data properties
  14994. * in "interpolate" delimiters, HTML-escape interpolated data properties in
  14995. * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data
  14996. * properties may be accessed as free variables in the template. If a setting
  14997. * object is given, it takes precedence over `_.templateSettings` values.
  14998. *
  14999. * **Note:** In the development build `_.template` utilizes
  15000. * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
  15001. * for easier debugging.
  15002. *
  15003. * For more information on precompiling templates see
  15004. * [lodash's custom builds documentation](https://lodash.com/custom-builds).
  15005. *
  15006. * For more information on Chrome extension sandboxes see
  15007. * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).
  15008. *
  15009. * @static
  15010. * @since 0.1.0
  15011. * @memberOf _
  15012. * @category String
  15013. * @param {string} [string=''] The template string.
  15014. * @param {Object} [options={}] The options object.
  15015. * @param {RegExp} [options.escape=_.templateSettings.escape]
  15016. * The HTML "escape" delimiter.
  15017. * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]
  15018. * The "evaluate" delimiter.
  15019. * @param {Object} [options.imports=_.templateSettings.imports]
  15020. * An object to import into the template as free variables.
  15021. * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]
  15022. * The "interpolate" delimiter.
  15023. * @param {string} [options.sourceURL='lodash.templateSources[n]']
  15024. * The sourceURL of the compiled template.
  15025. * @param {string} [options.variable='obj']
  15026. * The data object variable name.
  15027. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  15028. * @returns {Function} Returns the compiled template function.
  15029. * @example
  15030. *
  15031. * // Use the "interpolate" delimiter to create a compiled template.
  15032. * var compiled = _.template('hello <%= user %>!');
  15033. * compiled({ 'user': 'fred' });
  15034. * // => 'hello fred!'
  15035. *
  15036. * // Use the HTML "escape" delimiter to escape data property values.
  15037. * var compiled = _.template('<b><%- value %></b>');
  15038. * compiled({ 'value': '<script>' });
  15039. * // => '<b>&lt;script&gt;</b>'
  15040. *
  15041. * // Use the "evaluate" delimiter to execute JavaScript and generate HTML.
  15042. * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');
  15043. * compiled({ 'users': ['fred', 'barney'] });
  15044. * // => '<li>fred</li><li>barney</li>'
  15045. *
  15046. * // Use the internal `print` function in "evaluate" delimiters.
  15047. * var compiled = _.template('<% print("hello " + user); %>!');
  15048. * compiled({ 'user': 'barney' });
  15049. * // => 'hello barney!'
  15050. *
  15051. * // Use the ES template literal delimiter as an "interpolate" delimiter.
  15052. * // Disable support by replacing the "interpolate" delimiter.
  15053. * var compiled = _.template('hello ${ user }!');
  15054. * compiled({ 'user': 'pebbles' });
  15055. * // => 'hello pebbles!'
  15056. *
  15057. * // Use backslashes to treat delimiters as plain text.
  15058. * var compiled = _.template('<%= "\\<%- value %\\>" %>');
  15059. * compiled({ 'value': 'ignored' });
  15060. * // => '<%- value %>'
  15061. *
  15062. * // Use the `imports` option to import `jQuery` as `jq`.
  15063. * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';
  15064. * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });
  15065. * compiled({ 'users': ['fred', 'barney'] });
  15066. * // => '<li>fred</li><li>barney</li>'
  15067. *
  15068. * // Use the `sourceURL` option to specify a custom sourceURL for the template.
  15069. * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });
  15070. * compiled(data);
  15071. * // => Find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector.
  15072. *
  15073. * // Use the `variable` option to ensure a with-statement isn't used in the compiled template.
  15074. * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });
  15075. * compiled.source;
  15076. * // => function(data) {
  15077. * // var __t, __p = '';
  15078. * // __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';
  15079. * // return __p;
  15080. * // }
  15081. *
  15082. * // Use custom template delimiters.
  15083. * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g;
  15084. * var compiled = _.template('hello {{ user }}!');
  15085. * compiled({ 'user': 'mustache' });
  15086. * // => 'hello mustache!'
  15087. *
  15088. * // Use the `source` property to inline compiled templates for meaningful
  15089. * // line numbers in error messages and stack traces.
  15090. * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\
  15091. * var JST = {\
  15092. * "main": ' + _.template(mainText).source + '\
  15093. * };\
  15094. * ');
  15095. */
  15096. function template(string, options, guard) {
  15097. // Based on John Resig's `tmpl` implementation
  15098. // (http://ejohn.org/blog/javascript-micro-templating/)
  15099. // and Laura Doktorova's doT.js (https://github.com/olado/doT).
  15100. var settings = lodash.templateSettings;
  15101. if (guard && isIterateeCall(string, options, guard)) {
  15102. options = undefined;
  15103. }
  15104. string = toString(string);
  15105. options = assignInWith({}, options, settings, customDefaultsAssignIn);
  15106. var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn),
  15107. importsKeys = keys(imports),
  15108. importsValues = baseValues(imports, importsKeys);
  15109. var isEscaping,
  15110. isEvaluating,
  15111. index = 0,
  15112. interpolate = options.interpolate || reNoMatch,
  15113. source = "__p += '";
  15114. // Compile the regexp to match each delimiter.
  15115. var reDelimiters = RegExp(
  15116. (options.escape || reNoMatch).source + '|' +
  15117. interpolate.source + '|' +
  15118. (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +
  15119. (options.evaluate || reNoMatch).source + '|$'
  15120. , 'g');
  15121. // Use a sourceURL for easier debugging.
  15122. // The sourceURL gets injected into the source that's eval-ed, so be careful
  15123. // to normalize all kinds of whitespace, so e.g. newlines (and unicode versions of it) can't sneak in
  15124. // and escape the comment, thus injecting code that gets evaled.
  15125. var sourceURL = '//# sourceURL=' +
  15126. (hasOwnProperty.call(options, 'sourceURL')
  15127. ? (options.sourceURL + '').replace(/\s/g, ' ')
  15128. : ('lodash.templateSources[' + (++templateCounter) + ']')
  15129. ) + '\n';
  15130. string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
  15131. interpolateValue || (interpolateValue = esTemplateValue);
  15132. // Escape characters that can't be included in string literals.
  15133. source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);
  15134. // Replace delimiters with snippets.
  15135. if (escapeValue) {
  15136. isEscaping = true;
  15137. source += "' +\n__e(" + escapeValue + ") +\n'";
  15138. }
  15139. if (evaluateValue) {
  15140. isEvaluating = true;
  15141. source += "';\n" + evaluateValue + ";\n__p += '";
  15142. }
  15143. if (interpolateValue) {
  15144. source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
  15145. }
  15146. index = offset + match.length;
  15147. // The JS engine embedded in Adobe products needs `match` returned in
  15148. // order to produce the correct `offset` value.
  15149. return match;
  15150. });
  15151. source += "';\n";
  15152. // If `variable` is not specified wrap a with-statement around the generated
  15153. // code to add the data object to the top of the scope chain.
  15154. var variable = hasOwnProperty.call(options, 'variable') && options.variable;
  15155. if (!variable) {
  15156. source = 'with (obj) {\n' + source + '\n}\n';
  15157. }
  15158. // Throw an error if a forbidden character was found in `variable`, to prevent
  15159. // potential command injection attacks.
  15160. else if (reForbiddenIdentifierChars.test(variable)) {
  15161. throw new Error(INVALID_TEMPL_VAR_ERROR_TEXT);
  15162. }
  15163. // Cleanup code by stripping empty strings.
  15164. source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)
  15165. .replace(reEmptyStringMiddle, '$1')
  15166. .replace(reEmptyStringTrailing, '$1;');
  15167. // Frame code as the function body.
  15168. source = 'function(' + (variable || 'obj') + ') {\n' +
  15169. (variable
  15170. ? ''
  15171. : 'obj || (obj = {});\n'
  15172. ) +
  15173. "var __t, __p = ''" +
  15174. (isEscaping
  15175. ? ', __e = _.escape'
  15176. : ''
  15177. ) +
  15178. (isEvaluating
  15179. ? ', __j = Array.prototype.join;\n' +
  15180. "function print() { __p += __j.call(arguments, '') }\n"
  15181. : ';\n'
  15182. ) +
  15183. source +
  15184. 'return __p\n}';
  15185. var result = attempt(function() {
  15186. return Function(importsKeys, sourceURL + 'return ' + source)
  15187. .apply(undefined, importsValues);
  15188. });
  15189. // Provide the compiled function's source by its `toString` method or
  15190. // the `source` property as a convenience for inlining compiled templates.
  15191. result.source = source;
  15192. if (isError(result)) {
  15193. throw result;
  15194. }
  15195. return result;
  15196. }
  15197. /**
  15198. * Converts `string`, as a whole, to lower case just like
  15199. * [String#toLowerCase](https://mdn.io/toLowerCase).
  15200. *
  15201. * @static
  15202. * @memberOf _
  15203. * @since 4.0.0
  15204. * @category String
  15205. * @param {string} [string=''] The string to convert.
  15206. * @returns {string} Returns the lower cased string.
  15207. * @example
  15208. *
  15209. * _.toLower('--Foo-Bar--');
  15210. * // => '--foo-bar--'
  15211. *
  15212. * _.toLower('fooBar');
  15213. * // => 'foobar'
  15214. *
  15215. * _.toLower('__FOO_BAR__');
  15216. * // => '__foo_bar__'
  15217. */
  15218. function toLower(value) {
  15219. return toString(value).toLowerCase();
  15220. }
  15221. /**
  15222. * Converts `string`, as a whole, to upper case just like
  15223. * [String#toUpperCase](https://mdn.io/toUpperCase).
  15224. *
  15225. * @static
  15226. * @memberOf _
  15227. * @since 4.0.0
  15228. * @category String
  15229. * @param {string} [string=''] The string to convert.
  15230. * @returns {string} Returns the upper cased string.
  15231. * @example
  15232. *
  15233. * _.toUpper('--foo-bar--');
  15234. * // => '--FOO-BAR--'
  15235. *
  15236. * _.toUpper('fooBar');
  15237. * // => 'FOOBAR'
  15238. *
  15239. * _.toUpper('__foo_bar__');
  15240. * // => '__FOO_BAR__'
  15241. */
  15242. function toUpper(value) {
  15243. return toString(value).toUpperCase();
  15244. }
  15245. /**
  15246. * Removes leading and trailing whitespace or specified characters from `string`.
  15247. *
  15248. * @static
  15249. * @memberOf _
  15250. * @since 3.0.0
  15251. * @category String
  15252. * @param {string} [string=''] The string to trim.
  15253. * @param {string} [chars=whitespace] The characters to trim.
  15254. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  15255. * @returns {string} Returns the trimmed string.
  15256. * @example
  15257. *
  15258. * _.trim(' abc ');
  15259. * // => 'abc'
  15260. *
  15261. * _.trim('-_-abc-_-', '_-');
  15262. * // => 'abc'
  15263. *
  15264. * _.map([' foo ', ' bar '], _.trim);
  15265. * // => ['foo', 'bar']
  15266. */
  15267. function trim(string, chars, guard) {
  15268. string = toString(string);
  15269. if (string && (guard || chars === undefined)) {
  15270. return baseTrim(string);
  15271. }
  15272. if (!string || !(chars = baseToString(chars))) {
  15273. return string;
  15274. }
  15275. var strSymbols = stringToArray(string),
  15276. chrSymbols = stringToArray(chars),
  15277. start = charsStartIndex(strSymbols, chrSymbols),
  15278. end = charsEndIndex(strSymbols, chrSymbols) + 1;
  15279. return castSlice(strSymbols, start, end).join('');
  15280. }
  15281. /**
  15282. * Removes trailing whitespace or specified characters from `string`.
  15283. *
  15284. * @static
  15285. * @memberOf _
  15286. * @since 4.0.0
  15287. * @category String
  15288. * @param {string} [string=''] The string to trim.
  15289. * @param {string} [chars=whitespace] The characters to trim.
  15290. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  15291. * @returns {string} Returns the trimmed string.
  15292. * @example
  15293. *
  15294. * _.trimEnd(' abc ');
  15295. * // => ' abc'
  15296. *
  15297. * _.trimEnd('-_-abc-_-', '_-');
  15298. * // => '-_-abc'
  15299. */
  15300. function trimEnd(string, chars, guard) {
  15301. string = toString(string);
  15302. if (string && (guard || chars === undefined)) {
  15303. return string.slice(0, trimmedEndIndex(string) + 1);
  15304. }
  15305. if (!string || !(chars = baseToString(chars))) {
  15306. return string;
  15307. }
  15308. var strSymbols = stringToArray(string),
  15309. end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;
  15310. return castSlice(strSymbols, 0, end).join('');
  15311. }
  15312. /**
  15313. * Removes leading whitespace or specified characters from `string`.
  15314. *
  15315. * @static
  15316. * @memberOf _
  15317. * @since 4.0.0
  15318. * @category String
  15319. * @param {string} [string=''] The string to trim.
  15320. * @param {string} [chars=whitespace] The characters to trim.
  15321. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  15322. * @returns {string} Returns the trimmed string.
  15323. * @example
  15324. *
  15325. * _.trimStart(' abc ');
  15326. * // => 'abc '
  15327. *
  15328. * _.trimStart('-_-abc-_-', '_-');
  15329. * // => 'abc-_-'
  15330. */
  15331. function trimStart(string, chars, guard) {
  15332. string = toString(string);
  15333. if (string && (guard || chars === undefined)) {
  15334. return string.replace(reTrimStart, '');
  15335. }
  15336. if (!string || !(chars = baseToString(chars))) {
  15337. return string;
  15338. }
  15339. var strSymbols = stringToArray(string),
  15340. start = charsStartIndex(strSymbols, stringToArray(chars));
  15341. return castSlice(strSymbols, start).join('');
  15342. }
  15343. /**
  15344. * Truncates `string` if it's longer than the given maximum string length.
  15345. * The last characters of the truncated string are replaced with the omission
  15346. * string which defaults to "...".
  15347. *
  15348. * @static
  15349. * @memberOf _
  15350. * @since 4.0.0
  15351. * @category String
  15352. * @param {string} [string=''] The string to truncate.
  15353. * @param {Object} [options={}] The options object.
  15354. * @param {number} [options.length=30] The maximum string length.
  15355. * @param {string} [options.omission='...'] The string to indicate text is omitted.
  15356. * @param {RegExp|string} [options.separator] The separator pattern to truncate to.
  15357. * @returns {string} Returns the truncated string.
  15358. * @example
  15359. *
  15360. * _.truncate('hi-diddly-ho there, neighborino');
  15361. * // => 'hi-diddly-ho there, neighbo...'
  15362. *
  15363. * _.truncate('hi-diddly-ho there, neighborino', {
  15364. * 'length': 24,
  15365. * 'separator': ' '
  15366. * });
  15367. * // => 'hi-diddly-ho there,...'
  15368. *
  15369. * _.truncate('hi-diddly-ho there, neighborino', {
  15370. * 'length': 24,
  15371. * 'separator': /,? +/
  15372. * });
  15373. * // => 'hi-diddly-ho there...'
  15374. *
  15375. * _.truncate('hi-diddly-ho there, neighborino', {
  15376. * 'omission': ' [...]'
  15377. * });
  15378. * // => 'hi-diddly-ho there, neig [...]'
  15379. */
  15380. function truncate(string, options) {
  15381. var length = DEFAULT_TRUNC_LENGTH,
  15382. omission = DEFAULT_TRUNC_OMISSION;
  15383. if (isObject(options)) {
  15384. var separator = 'separator' in options ? options.separator : separator;
  15385. length = 'length' in options ? toInteger(options.length) : length;
  15386. omission = 'omission' in options ? baseToString(options.omission) : omission;
  15387. }
  15388. string = toString(string);
  15389. var strLength = string.length;
  15390. if (hasUnicode(string)) {
  15391. var strSymbols = stringToArray(string);
  15392. strLength = strSymbols.length;
  15393. }
  15394. if (length >= strLength) {
  15395. return string;
  15396. }
  15397. var end = length - stringSize(omission);
  15398. if (end < 1) {
  15399. return omission;
  15400. }
  15401. var result = strSymbols
  15402. ? castSlice(strSymbols, 0, end).join('')
  15403. : string.slice(0, end);
  15404. if (separator === undefined) {
  15405. return result + omission;
  15406. }
  15407. if (strSymbols) {
  15408. end += (result.length - end);
  15409. }
  15410. if (isRegExp(separator)) {
  15411. if (string.slice(end).search(separator)) {
  15412. var match,
  15413. substring = result;
  15414. if (!separator.global) {
  15415. separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g');
  15416. }
  15417. separator.lastIndex = 0;
  15418. while ((match = separator.exec(substring))) {
  15419. var newEnd = match.index;
  15420. }
  15421. result = result.slice(0, newEnd === undefined ? end : newEnd);
  15422. }
  15423. } else if (string.indexOf(baseToString(separator), end) != end) {
  15424. var index = result.lastIndexOf(separator);
  15425. if (index > -1) {
  15426. result = result.slice(0, index);
  15427. }
  15428. }
  15429. return result + omission;
  15430. }
  15431. /**
  15432. * The inverse of `_.escape`; this method converts the HTML entities
  15433. * `&amp;`, `&lt;`, `&gt;`, `&quot;`, and `&#39;` in `string` to
  15434. * their corresponding characters.
  15435. *
  15436. * **Note:** No other HTML entities are unescaped. To unescape additional
  15437. * HTML entities use a third-party library like [_he_](https://mths.be/he).
  15438. *
  15439. * @static
  15440. * @memberOf _
  15441. * @since 0.6.0
  15442. * @category String
  15443. * @param {string} [string=''] The string to unescape.
  15444. * @returns {string} Returns the unescaped string.
  15445. * @example
  15446. *
  15447. * _.unescape('fred, barney, &amp; pebbles');
  15448. * // => 'fred, barney, & pebbles'
  15449. */
  15450. function unescape(string) {
  15451. string = toString(string);
  15452. return (string && reHasEscapedHtml.test(string))
  15453. ? string.replace(reEscapedHtml, unescapeHtmlChar)
  15454. : string;
  15455. }
  15456. /**
  15457. * Converts `string`, as space separated words, to upper case.
  15458. *
  15459. * @static
  15460. * @memberOf _
  15461. * @since 4.0.0
  15462. * @category String
  15463. * @param {string} [string=''] The string to convert.
  15464. * @returns {string} Returns the upper cased string.
  15465. * @example
  15466. *
  15467. * _.upperCase('--foo-bar');
  15468. * // => 'FOO BAR'
  15469. *
  15470. * _.upperCase('fooBar');
  15471. * // => 'FOO BAR'
  15472. *
  15473. * _.upperCase('__foo_bar__');
  15474. * // => 'FOO BAR'
  15475. */
  15476. var upperCase = createCompounder(function(result, word, index) {
  15477. return result + (index ? ' ' : '') + word.toUpperCase();
  15478. });
  15479. /**
  15480. * Converts the first character of `string` to upper case.
  15481. *
  15482. * @static
  15483. * @memberOf _
  15484. * @since 4.0.0
  15485. * @category String
  15486. * @param {string} [string=''] The string to convert.
  15487. * @returns {string} Returns the converted string.
  15488. * @example
  15489. *
  15490. * _.upperFirst('fred');
  15491. * // => 'Fred'
  15492. *
  15493. * _.upperFirst('FRED');
  15494. * // => 'FRED'
  15495. */
  15496. var upperFirst = createCaseFirst('toUpperCase');
  15497. /**
  15498. * Splits `string` into an array of its words.
  15499. *
  15500. * @static
  15501. * @memberOf _
  15502. * @since 3.0.0
  15503. * @category String
  15504. * @param {string} [string=''] The string to inspect.
  15505. * @param {RegExp|string} [pattern] The pattern to match words.
  15506. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  15507. * @returns {Array} Returns the words of `string`.
  15508. * @example
  15509. *
  15510. * _.words('fred, barney, & pebbles');
  15511. * // => ['fred', 'barney', 'pebbles']
  15512. *
  15513. * _.words('fred, barney, & pebbles', /[^, ]+/g);
  15514. * // => ['fred', 'barney', '&', 'pebbles']
  15515. */
  15516. function words(string, pattern, guard) {
  15517. string = toString(string);
  15518. pattern = guard ? undefined : pattern;
  15519. if (pattern === undefined) {
  15520. return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);
  15521. }
  15522. return string.match(pattern) || [];
  15523. }
  15524. /*------------------------------------------------------------------------*/
  15525. /**
  15526. * Attempts to invoke `func`, returning either the result or the caught error
  15527. * object. Any additional arguments are provided to `func` when it's invoked.
  15528. *
  15529. * @static
  15530. * @memberOf _
  15531. * @since 3.0.0
  15532. * @category Util
  15533. * @param {Function} func The function to attempt.
  15534. * @param {...*} [args] The arguments to invoke `func` with.
  15535. * @returns {*} Returns the `func` result or error object.
  15536. * @example
  15537. *
  15538. * // Avoid throwing errors for invalid selectors.
  15539. * var elements = _.attempt(function(selector) {
  15540. * return document.querySelectorAll(selector);
  15541. * }, '>_>');
  15542. *
  15543. * if (_.isError(elements)) {
  15544. * elements = [];
  15545. * }
  15546. */
  15547. var attempt = baseRest(function(func, args) {
  15548. try {
  15549. return apply(func, undefined, args);
  15550. } catch (e) {
  15551. return isError(e) ? e : new Error(e);
  15552. }
  15553. });
  15554. /**
  15555. * Binds methods of an object to the object itself, overwriting the existing
  15556. * method.
  15557. *
  15558. * **Note:** This method doesn't set the "length" property of bound functions.
  15559. *
  15560. * @static
  15561. * @since 0.1.0
  15562. * @memberOf _
  15563. * @category Util
  15564. * @param {Object} object The object to bind and assign the bound methods to.
  15565. * @param {...(string|string[])} methodNames The object method names to bind.
  15566. * @returns {Object} Returns `object`.
  15567. * @example
  15568. *
  15569. * var view = {
  15570. * 'label': 'docs',
  15571. * 'click': function() {
  15572. * console.log('clicked ' + this.label);
  15573. * }
  15574. * };
  15575. *
  15576. * _.bindAll(view, ['click']);
  15577. * jQuery(element).on('click', view.click);
  15578. * // => Logs 'clicked docs' when clicked.
  15579. */
  15580. var bindAll = flatRest(function(object, methodNames) {
  15581. arrayEach(methodNames, function(key) {
  15582. key = toKey(key);
  15583. baseAssignValue(object, key, bind(object[key], object));
  15584. });
  15585. return object;
  15586. });
  15587. /**
  15588. * Creates a function that iterates over `pairs` and invokes the corresponding
  15589. * function of the first predicate to return truthy. The predicate-function
  15590. * pairs are invoked with the `this` binding and arguments of the created
  15591. * function.
  15592. *
  15593. * @static
  15594. * @memberOf _
  15595. * @since 4.0.0
  15596. * @category Util
  15597. * @param {Array} pairs The predicate-function pairs.
  15598. * @returns {Function} Returns the new composite function.
  15599. * @example
  15600. *
  15601. * var func = _.cond([
  15602. * [_.matches({ 'a': 1 }), _.constant('matches A')],
  15603. * [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],
  15604. * [_.stubTrue, _.constant('no match')]
  15605. * ]);
  15606. *
  15607. * func({ 'a': 1, 'b': 2 });
  15608. * // => 'matches A'
  15609. *
  15610. * func({ 'a': 0, 'b': 1 });
  15611. * // => 'matches B'
  15612. *
  15613. * func({ 'a': '1', 'b': '2' });
  15614. * // => 'no match'
  15615. */
  15616. function cond(pairs) {
  15617. var length = pairs == null ? 0 : pairs.length,
  15618. toIteratee = getIteratee();
  15619. pairs = !length ? [] : arrayMap(pairs, function(pair) {
  15620. if (typeof pair[1] != 'function') {
  15621. throw new TypeError(FUNC_ERROR_TEXT);
  15622. }
  15623. return [toIteratee(pair[0]), pair[1]];
  15624. });
  15625. return baseRest(function(args) {
  15626. var index = -1;
  15627. while (++index < length) {
  15628. var pair = pairs[index];
  15629. if (apply(pair[0], this, args)) {
  15630. return apply(pair[1], this, args);
  15631. }
  15632. }
  15633. });
  15634. }
  15635. /**
  15636. * Creates a function that invokes the predicate properties of `source` with
  15637. * the corresponding property values of a given object, returning `true` if
  15638. * all predicates return truthy, else `false`.
  15639. *
  15640. * **Note:** The created function is equivalent to `_.conformsTo` with
  15641. * `source` partially applied.
  15642. *
  15643. * @static
  15644. * @memberOf _
  15645. * @since 4.0.0
  15646. * @category Util
  15647. * @param {Object} source The object of property predicates to conform to.
  15648. * @returns {Function} Returns the new spec function.
  15649. * @example
  15650. *
  15651. * var objects = [
  15652. * { 'a': 2, 'b': 1 },
  15653. * { 'a': 1, 'b': 2 }
  15654. * ];
  15655. *
  15656. * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } }));
  15657. * // => [{ 'a': 1, 'b': 2 }]
  15658. */
  15659. function conforms(source) {
  15660. return baseConforms(baseClone(source, CLONE_DEEP_FLAG));
  15661. }
  15662. /**
  15663. * Creates a function that returns `value`.
  15664. *
  15665. * @static
  15666. * @memberOf _
  15667. * @since 2.4.0
  15668. * @category Util
  15669. * @param {*} value The value to return from the new function.
  15670. * @returns {Function} Returns the new constant function.
  15671. * @example
  15672. *
  15673. * var objects = _.times(2, _.constant({ 'a': 1 }));
  15674. *
  15675. * console.log(objects);
  15676. * // => [{ 'a': 1 }, { 'a': 1 }]
  15677. *
  15678. * console.log(objects[0] === objects[1]);
  15679. * // => true
  15680. */
  15681. function constant(value) {
  15682. return function() {
  15683. return value;
  15684. };
  15685. }
  15686. /**
  15687. * Checks `value` to determine whether a default value should be returned in
  15688. * its place. The `defaultValue` is returned if `value` is `NaN`, `null`,
  15689. * or `undefined`.
  15690. *
  15691. * @static
  15692. * @memberOf _
  15693. * @since 4.14.0
  15694. * @category Util
  15695. * @param {*} value The value to check.
  15696. * @param {*} defaultValue The default value.
  15697. * @returns {*} Returns the resolved value.
  15698. * @example
  15699. *
  15700. * _.defaultTo(1, 10);
  15701. * // => 1
  15702. *
  15703. * _.defaultTo(undefined, 10);
  15704. * // => 10
  15705. */
  15706. function defaultTo(value, defaultValue) {
  15707. return (value == null || value !== value) ? defaultValue : value;
  15708. }
  15709. /**
  15710. * Creates a function that returns the result of invoking the given functions
  15711. * with the `this` binding of the created function, where each successive
  15712. * invocation is supplied the return value of the previous.
  15713. *
  15714. * @static
  15715. * @memberOf _
  15716. * @since 3.0.0
  15717. * @category Util
  15718. * @param {...(Function|Function[])} [funcs] The functions to invoke.
  15719. * @returns {Function} Returns the new composite function.
  15720. * @see _.flowRight
  15721. * @example
  15722. *
  15723. * function square(n) {
  15724. * return n * n;
  15725. * }
  15726. *
  15727. * var addSquare = _.flow([_.add, square]);
  15728. * addSquare(1, 2);
  15729. * // => 9
  15730. */
  15731. var flow = createFlow();
  15732. /**
  15733. * This method is like `_.flow` except that it creates a function that
  15734. * invokes the given functions from right to left.
  15735. *
  15736. * @static
  15737. * @since 3.0.0
  15738. * @memberOf _
  15739. * @category Util
  15740. * @param {...(Function|Function[])} [funcs] The functions to invoke.
  15741. * @returns {Function} Returns the new composite function.
  15742. * @see _.flow
  15743. * @example
  15744. *
  15745. * function square(n) {
  15746. * return n * n;
  15747. * }
  15748. *
  15749. * var addSquare = _.flowRight([square, _.add]);
  15750. * addSquare(1, 2);
  15751. * // => 9
  15752. */
  15753. var flowRight = createFlow(true);
  15754. /**
  15755. * This method returns the first argument it receives.
  15756. *
  15757. * @static
  15758. * @since 0.1.0
  15759. * @memberOf _
  15760. * @category Util
  15761. * @param {*} value Any value.
  15762. * @returns {*} Returns `value`.
  15763. * @example
  15764. *
  15765. * var object = { 'a': 1 };
  15766. *
  15767. * console.log(_.identity(object) === object);
  15768. * // => true
  15769. */
  15770. function identity(value) {
  15771. return value;
  15772. }
  15773. /**
  15774. * Creates a function that invokes `func` with the arguments of the created
  15775. * function. If `func` is a property name, the created function returns the
  15776. * property value for a given element. If `func` is an array or object, the
  15777. * created function returns `true` for elements that contain the equivalent
  15778. * source properties, otherwise it returns `false`.
  15779. *
  15780. * @static
  15781. * @since 4.0.0
  15782. * @memberOf _
  15783. * @category Util
  15784. * @param {*} [func=_.identity] The value to convert to a callback.
  15785. * @returns {Function} Returns the callback.
  15786. * @example
  15787. *
  15788. * var users = [
  15789. * { 'user': 'barney', 'age': 36, 'active': true },
  15790. * { 'user': 'fred', 'age': 40, 'active': false }
  15791. * ];
  15792. *
  15793. * // The `_.matches` iteratee shorthand.
  15794. * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));
  15795. * // => [{ 'user': 'barney', 'age': 36, 'active': true }]
  15796. *
  15797. * // The `_.matchesProperty` iteratee shorthand.
  15798. * _.filter(users, _.iteratee(['user', 'fred']));
  15799. * // => [{ 'user': 'fred', 'age': 40 }]
  15800. *
  15801. * // The `_.property` iteratee shorthand.
  15802. * _.map(users, _.iteratee('user'));
  15803. * // => ['barney', 'fred']
  15804. *
  15805. * // Create custom iteratee shorthands.
  15806. * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {
  15807. * return !_.isRegExp(func) ? iteratee(func) : function(string) {
  15808. * return func.test(string);
  15809. * };
  15810. * });
  15811. *
  15812. * _.filter(['abc', 'def'], /ef/);
  15813. * // => ['def']
  15814. */
  15815. function iteratee(func) {
  15816. return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG));
  15817. }
  15818. /**
  15819. * Creates a function that performs a partial deep comparison between a given
  15820. * object and `source`, returning `true` if the given object has equivalent
  15821. * property values, else `false`.
  15822. *
  15823. * **Note:** The created function is equivalent to `_.isMatch` with `source`
  15824. * partially applied.
  15825. *
  15826. * Partial comparisons will match empty array and empty object `source`
  15827. * values against any array or object value, respectively. See `_.isEqual`
  15828. * for a list of supported value comparisons.
  15829. *
  15830. * **Note:** Multiple values can be checked by combining several matchers
  15831. * using `_.overSome`
  15832. *
  15833. * @static
  15834. * @memberOf _
  15835. * @since 3.0.0
  15836. * @category Util
  15837. * @param {Object} source The object of property values to match.
  15838. * @returns {Function} Returns the new spec function.
  15839. * @example
  15840. *
  15841. * var objects = [
  15842. * { 'a': 1, 'b': 2, 'c': 3 },
  15843. * { 'a': 4, 'b': 5, 'c': 6 }
  15844. * ];
  15845. *
  15846. * _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));
  15847. * // => [{ 'a': 4, 'b': 5, 'c': 6 }]
  15848. *
  15849. * // Checking for several possible values
  15850. * _.filter(objects, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })]));
  15851. * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]
  15852. */
  15853. function matches(source) {
  15854. return baseMatches(baseClone(source, CLONE_DEEP_FLAG));
  15855. }
  15856. /**
  15857. * Creates a function that performs a partial deep comparison between the
  15858. * value at `path` of a given object to `srcValue`, returning `true` if the
  15859. * object value is equivalent, else `false`.
  15860. *
  15861. * **Note:** Partial comparisons will match empty array and empty object
  15862. * `srcValue` values against any array or object value, respectively. See
  15863. * `_.isEqual` for a list of supported value comparisons.
  15864. *
  15865. * **Note:** Multiple values can be checked by combining several matchers
  15866. * using `_.overSome`
  15867. *
  15868. * @static
  15869. * @memberOf _
  15870. * @since 3.2.0
  15871. * @category Util
  15872. * @param {Array|string} path The path of the property to get.
  15873. * @param {*} srcValue The value to match.
  15874. * @returns {Function} Returns the new spec function.
  15875. * @example
  15876. *
  15877. * var objects = [
  15878. * { 'a': 1, 'b': 2, 'c': 3 },
  15879. * { 'a': 4, 'b': 5, 'c': 6 }
  15880. * ];
  15881. *
  15882. * _.find(objects, _.matchesProperty('a', 4));
  15883. * // => { 'a': 4, 'b': 5, 'c': 6 }
  15884. *
  15885. * // Checking for several possible values
  15886. * _.filter(objects, _.overSome([_.matchesProperty('a', 1), _.matchesProperty('a', 4)]));
  15887. * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]
  15888. */
  15889. function matchesProperty(path, srcValue) {
  15890. return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));
  15891. }
  15892. /**
  15893. * Creates a function that invokes the method at `path` of a given object.
  15894. * Any additional arguments are provided to the invoked method.
  15895. *
  15896. * @static
  15897. * @memberOf _
  15898. * @since 3.7.0
  15899. * @category Util
  15900. * @param {Array|string} path The path of the method to invoke.
  15901. * @param {...*} [args] The arguments to invoke the method with.
  15902. * @returns {Function} Returns the new invoker function.
  15903. * @example
  15904. *
  15905. * var objects = [
  15906. * { 'a': { 'b': _.constant(2) } },
  15907. * { 'a': { 'b': _.constant(1) } }
  15908. * ];
  15909. *
  15910. * _.map(objects, _.method('a.b'));
  15911. * // => [2, 1]
  15912. *
  15913. * _.map(objects, _.method(['a', 'b']));
  15914. * // => [2, 1]
  15915. */
  15916. var method = baseRest(function(path, args) {
  15917. return function(object) {
  15918. return baseInvoke(object, path, args);
  15919. };
  15920. });
  15921. /**
  15922. * The opposite of `_.method`; this method creates a function that invokes
  15923. * the method at a given path of `object`. Any additional arguments are
  15924. * provided to the invoked method.
  15925. *
  15926. * @static
  15927. * @memberOf _
  15928. * @since 3.7.0
  15929. * @category Util
  15930. * @param {Object} object The object to query.
  15931. * @param {...*} [args] The arguments to invoke the method with.
  15932. * @returns {Function} Returns the new invoker function.
  15933. * @example
  15934. *
  15935. * var array = _.times(3, _.constant),
  15936. * object = { 'a': array, 'b': array, 'c': array };
  15937. *
  15938. * _.map(['a[2]', 'c[0]'], _.methodOf(object));
  15939. * // => [2, 0]
  15940. *
  15941. * _.map([['a', '2'], ['c', '0']], _.methodOf(object));
  15942. * // => [2, 0]
  15943. */
  15944. var methodOf = baseRest(function(object, args) {
  15945. return function(path) {
  15946. return baseInvoke(object, path, args);
  15947. };
  15948. });
  15949. /**
  15950. * Adds all own enumerable string keyed function properties of a source
  15951. * object to the destination object. If `object` is a function, then methods
  15952. * are added to its prototype as well.
  15953. *
  15954. * **Note:** Use `_.runInContext` to create a pristine `lodash` function to
  15955. * avoid conflicts caused by modifying the original.
  15956. *
  15957. * @static
  15958. * @since 0.1.0
  15959. * @memberOf _
  15960. * @category Util
  15961. * @param {Function|Object} [object=lodash] The destination object.
  15962. * @param {Object} source The object of functions to add.
  15963. * @param {Object} [options={}] The options object.
  15964. * @param {boolean} [options.chain=true] Specify whether mixins are chainable.
  15965. * @returns {Function|Object} Returns `object`.
  15966. * @example
  15967. *
  15968. * function vowels(string) {
  15969. * return _.filter(string, function(v) {
  15970. * return /[aeiou]/i.test(v);
  15971. * });
  15972. * }
  15973. *
  15974. * _.mixin({ 'vowels': vowels });
  15975. * _.vowels('fred');
  15976. * // => ['e']
  15977. *
  15978. * _('fred').vowels().value();
  15979. * // => ['e']
  15980. *
  15981. * _.mixin({ 'vowels': vowels }, { 'chain': false });
  15982. * _('fred').vowels();
  15983. * // => ['e']
  15984. */
  15985. function mixin(object, source, options) {
  15986. var props = keys(source),
  15987. methodNames = baseFunctions(source, props);
  15988. if (options == null &&
  15989. !(isObject(source) && (methodNames.length || !props.length))) {
  15990. options = source;
  15991. source = object;
  15992. object = this;
  15993. methodNames = baseFunctions(source, keys(source));
  15994. }
  15995. var chain = !(isObject(options) && 'chain' in options) || !!options.chain,
  15996. isFunc = isFunction(object);
  15997. arrayEach(methodNames, function(methodName) {
  15998. var func = source[methodName];
  15999. object[methodName] = func;
  16000. if (isFunc) {
  16001. object.prototype[methodName] = function() {
  16002. var chainAll = this.__chain__;
  16003. if (chain || chainAll) {
  16004. var result = object(this.__wrapped__),
  16005. actions = result.__actions__ = copyArray(this.__actions__);
  16006. actions.push({ 'func': func, 'args': arguments, 'thisArg': object });
  16007. result.__chain__ = chainAll;
  16008. return result;
  16009. }
  16010. return func.apply(object, arrayPush([this.value()], arguments));
  16011. };
  16012. }
  16013. });
  16014. return object;
  16015. }
  16016. /**
  16017. * Reverts the `_` variable to its previous value and returns a reference to
  16018. * the `lodash` function.
  16019. *
  16020. * @static
  16021. * @since 0.1.0
  16022. * @memberOf _
  16023. * @category Util
  16024. * @returns {Function} Returns the `lodash` function.
  16025. * @example
  16026. *
  16027. * var lodash = _.noConflict();
  16028. */
  16029. function noConflict() {
  16030. if (root._ === this) {
  16031. root._ = oldDash;
  16032. }
  16033. return this;
  16034. }
  16035. /**
  16036. * This method returns `undefined`.
  16037. *
  16038. * @static
  16039. * @memberOf _
  16040. * @since 2.3.0
  16041. * @category Util
  16042. * @example
  16043. *
  16044. * _.times(2, _.noop);
  16045. * // => [undefined, undefined]
  16046. */
  16047. function noop() {
  16048. // No operation performed.
  16049. }
  16050. /**
  16051. * Creates a function that gets the argument at index `n`. If `n` is negative,
  16052. * the nth argument from the end is returned.
  16053. *
  16054. * @static
  16055. * @memberOf _
  16056. * @since 4.0.0
  16057. * @category Util
  16058. * @param {number} [n=0] The index of the argument to return.
  16059. * @returns {Function} Returns the new pass-thru function.
  16060. * @example
  16061. *
  16062. * var func = _.nthArg(1);
  16063. * func('a', 'b', 'c', 'd');
  16064. * // => 'b'
  16065. *
  16066. * var func = _.nthArg(-2);
  16067. * func('a', 'b', 'c', 'd');
  16068. * // => 'c'
  16069. */
  16070. function nthArg(n) {
  16071. n = toInteger(n);
  16072. return baseRest(function(args) {
  16073. return baseNth(args, n);
  16074. });
  16075. }
  16076. /**
  16077. * Creates a function that invokes `iteratees` with the arguments it receives
  16078. * and returns their results.
  16079. *
  16080. * @static
  16081. * @memberOf _
  16082. * @since 4.0.0
  16083. * @category Util
  16084. * @param {...(Function|Function[])} [iteratees=[_.identity]]
  16085. * The iteratees to invoke.
  16086. * @returns {Function} Returns the new function.
  16087. * @example
  16088. *
  16089. * var func = _.over([Math.max, Math.min]);
  16090. *
  16091. * func(1, 2, 3, 4);
  16092. * // => [4, 1]
  16093. */
  16094. var over = createOver(arrayMap);
  16095. /**
  16096. * Creates a function that checks if **all** of the `predicates` return
  16097. * truthy when invoked with the arguments it receives.
  16098. *
  16099. * Following shorthands are possible for providing predicates.
  16100. * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.
  16101. * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.
  16102. *
  16103. * @static
  16104. * @memberOf _
  16105. * @since 4.0.0
  16106. * @category Util
  16107. * @param {...(Function|Function[])} [predicates=[_.identity]]
  16108. * The predicates to check.
  16109. * @returns {Function} Returns the new function.
  16110. * @example
  16111. *
  16112. * var func = _.overEvery([Boolean, isFinite]);
  16113. *
  16114. * func('1');
  16115. * // => true
  16116. *
  16117. * func(null);
  16118. * // => false
  16119. *
  16120. * func(NaN);
  16121. * // => false
  16122. */
  16123. var overEvery = createOver(arrayEvery);
  16124. /**
  16125. * Creates a function that checks if **any** of the `predicates` return
  16126. * truthy when invoked with the arguments it receives.
  16127. *
  16128. * Following shorthands are possible for providing predicates.
  16129. * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.
  16130. * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.
  16131. *
  16132. * @static
  16133. * @memberOf _
  16134. * @since 4.0.0
  16135. * @category Util
  16136. * @param {...(Function|Function[])} [predicates=[_.identity]]
  16137. * The predicates to check.
  16138. * @returns {Function} Returns the new function.
  16139. * @example
  16140. *
  16141. * var func = _.overSome([Boolean, isFinite]);
  16142. *
  16143. * func('1');
  16144. * // => true
  16145. *
  16146. * func(null);
  16147. * // => true
  16148. *
  16149. * func(NaN);
  16150. * // => false
  16151. *
  16152. * var matchesFunc = _.overSome([{ 'a': 1 }, { 'a': 2 }])
  16153. * var matchesPropertyFunc = _.overSome([['a', 1], ['a', 2]])
  16154. */
  16155. var overSome = createOver(arraySome);
  16156. /**
  16157. * Creates a function that returns the value at `path` of a given object.
  16158. *
  16159. * @static
  16160. * @memberOf _
  16161. * @since 2.4.0
  16162. * @category Util
  16163. * @param {Array|string} path The path of the property to get.
  16164. * @returns {Function} Returns the new accessor function.
  16165. * @example
  16166. *
  16167. * var objects = [
  16168. * { 'a': { 'b': 2 } },
  16169. * { 'a': { 'b': 1 } }
  16170. * ];
  16171. *
  16172. * _.map(objects, _.property('a.b'));
  16173. * // => [2, 1]
  16174. *
  16175. * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
  16176. * // => [1, 2]
  16177. */
  16178. function property(path) {
  16179. return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
  16180. }
  16181. /**
  16182. * The opposite of `_.property`; this method creates a function that returns
  16183. * the value at a given path of `object`.
  16184. *
  16185. * @static
  16186. * @memberOf _
  16187. * @since 3.0.0
  16188. * @category Util
  16189. * @param {Object} object The object to query.
  16190. * @returns {Function} Returns the new accessor function.
  16191. * @example
  16192. *
  16193. * var array = [0, 1, 2],
  16194. * object = { 'a': array, 'b': array, 'c': array };
  16195. *
  16196. * _.map(['a[2]', 'c[0]'], _.propertyOf(object));
  16197. * // => [2, 0]
  16198. *
  16199. * _.map([['a', '2'], ['c', '0']], _.propertyOf(object));
  16200. * // => [2, 0]
  16201. */
  16202. function propertyOf(object) {
  16203. return function(path) {
  16204. return object == null ? undefined : baseGet(object, path);
  16205. };
  16206. }
  16207. /**
  16208. * Creates an array of numbers (positive and/or negative) progressing from
  16209. * `start` up to, but not including, `end`. A step of `-1` is used if a negative
  16210. * `start` is specified without an `end` or `step`. If `end` is not specified,
  16211. * it's set to `start` with `start` then set to `0`.
  16212. *
  16213. * **Note:** JavaScript follows the IEEE-754 standard for resolving
  16214. * floating-point values which can produce unexpected results.
  16215. *
  16216. * @static
  16217. * @since 0.1.0
  16218. * @memberOf _
  16219. * @category Util
  16220. * @param {number} [start=0] The start of the range.
  16221. * @param {number} end The end of the range.
  16222. * @param {number} [step=1] The value to increment or decrement by.
  16223. * @returns {Array} Returns the range of numbers.
  16224. * @see _.inRange, _.rangeRight
  16225. * @example
  16226. *
  16227. * _.range(4);
  16228. * // => [0, 1, 2, 3]
  16229. *
  16230. * _.range(-4);
  16231. * // => [0, -1, -2, -3]
  16232. *
  16233. * _.range(1, 5);
  16234. * // => [1, 2, 3, 4]
  16235. *
  16236. * _.range(0, 20, 5);
  16237. * // => [0, 5, 10, 15]
  16238. *
  16239. * _.range(0, -4, -1);
  16240. * // => [0, -1, -2, -3]
  16241. *
  16242. * _.range(1, 4, 0);
  16243. * // => [1, 1, 1]
  16244. *
  16245. * _.range(0);
  16246. * // => []
  16247. */
  16248. var range = createRange();
  16249. /**
  16250. * This method is like `_.range` except that it populates values in
  16251. * descending order.
  16252. *
  16253. * @static
  16254. * @memberOf _
  16255. * @since 4.0.0
  16256. * @category Util
  16257. * @param {number} [start=0] The start of the range.
  16258. * @param {number} end The end of the range.
  16259. * @param {number} [step=1] The value to increment or decrement by.
  16260. * @returns {Array} Returns the range of numbers.
  16261. * @see _.inRange, _.range
  16262. * @example
  16263. *
  16264. * _.rangeRight(4);
  16265. * // => [3, 2, 1, 0]
  16266. *
  16267. * _.rangeRight(-4);
  16268. * // => [-3, -2, -1, 0]
  16269. *
  16270. * _.rangeRight(1, 5);
  16271. * // => [4, 3, 2, 1]
  16272. *
  16273. * _.rangeRight(0, 20, 5);
  16274. * // => [15, 10, 5, 0]
  16275. *
  16276. * _.rangeRight(0, -4, -1);
  16277. * // => [-3, -2, -1, 0]
  16278. *
  16279. * _.rangeRight(1, 4, 0);
  16280. * // => [1, 1, 1]
  16281. *
  16282. * _.rangeRight(0);
  16283. * // => []
  16284. */
  16285. var rangeRight = createRange(true);
  16286. /**
  16287. * This method returns a new empty array.
  16288. *
  16289. * @static
  16290. * @memberOf _
  16291. * @since 4.13.0
  16292. * @category Util
  16293. * @returns {Array} Returns the new empty array.
  16294. * @example
  16295. *
  16296. * var arrays = _.times(2, _.stubArray);
  16297. *
  16298. * console.log(arrays);
  16299. * // => [[], []]
  16300. *
  16301. * console.log(arrays[0] === arrays[1]);
  16302. * // => false
  16303. */
  16304. function stubArray() {
  16305. return [];
  16306. }
  16307. /**
  16308. * This method returns `false`.
  16309. *
  16310. * @static
  16311. * @memberOf _
  16312. * @since 4.13.0
  16313. * @category Util
  16314. * @returns {boolean} Returns `false`.
  16315. * @example
  16316. *
  16317. * _.times(2, _.stubFalse);
  16318. * // => [false, false]
  16319. */
  16320. function stubFalse() {
  16321. return false;
  16322. }
  16323. /**
  16324. * This method returns a new empty object.
  16325. *
  16326. * @static
  16327. * @memberOf _
  16328. * @since 4.13.0
  16329. * @category Util
  16330. * @returns {Object} Returns the new empty object.
  16331. * @example
  16332. *
  16333. * var objects = _.times(2, _.stubObject);
  16334. *
  16335. * console.log(objects);
  16336. * // => [{}, {}]
  16337. *
  16338. * console.log(objects[0] === objects[1]);
  16339. * // => false
  16340. */
  16341. function stubObject() {
  16342. return {};
  16343. }
  16344. /**
  16345. * This method returns an empty string.
  16346. *
  16347. * @static
  16348. * @memberOf _
  16349. * @since 4.13.0
  16350. * @category Util
  16351. * @returns {string} Returns the empty string.
  16352. * @example
  16353. *
  16354. * _.times(2, _.stubString);
  16355. * // => ['', '']
  16356. */
  16357. function stubString() {
  16358. return '';
  16359. }
  16360. /**
  16361. * This method returns `true`.
  16362. *
  16363. * @static
  16364. * @memberOf _
  16365. * @since 4.13.0
  16366. * @category Util
  16367. * @returns {boolean} Returns `true`.
  16368. * @example
  16369. *
  16370. * _.times(2, _.stubTrue);
  16371. * // => [true, true]
  16372. */
  16373. function stubTrue() {
  16374. return true;
  16375. }
  16376. /**
  16377. * Invokes the iteratee `n` times, returning an array of the results of
  16378. * each invocation. The iteratee is invoked with one argument; (index).
  16379. *
  16380. * @static
  16381. * @since 0.1.0
  16382. * @memberOf _
  16383. * @category Util
  16384. * @param {number} n The number of times to invoke `iteratee`.
  16385. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  16386. * @returns {Array} Returns the array of results.
  16387. * @example
  16388. *
  16389. * _.times(3, String);
  16390. * // => ['0', '1', '2']
  16391. *
  16392. * _.times(4, _.constant(0));
  16393. * // => [0, 0, 0, 0]
  16394. */
  16395. function times(n, iteratee) {
  16396. n = toInteger(n);
  16397. if (n < 1 || n > MAX_SAFE_INTEGER) {
  16398. return [];
  16399. }
  16400. var index = MAX_ARRAY_LENGTH,
  16401. length = nativeMin(n, MAX_ARRAY_LENGTH);
  16402. iteratee = getIteratee(iteratee);
  16403. n -= MAX_ARRAY_LENGTH;
  16404. var result = baseTimes(length, iteratee);
  16405. while (++index < n) {
  16406. iteratee(index);
  16407. }
  16408. return result;
  16409. }
  16410. /**
  16411. * Converts `value` to a property path array.
  16412. *
  16413. * @static
  16414. * @memberOf _
  16415. * @since 4.0.0
  16416. * @category Util
  16417. * @param {*} value The value to convert.
  16418. * @returns {Array} Returns the new property path array.
  16419. * @example
  16420. *
  16421. * _.toPath('a.b.c');
  16422. * // => ['a', 'b', 'c']
  16423. *
  16424. * _.toPath('a[0].b.c');
  16425. * // => ['a', '0', 'b', 'c']
  16426. */
  16427. function toPath(value) {
  16428. if (isArray(value)) {
  16429. return arrayMap(value, toKey);
  16430. }
  16431. return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));
  16432. }
  16433. /**
  16434. * Generates a unique ID. If `prefix` is given, the ID is appended to it.
  16435. *
  16436. * @static
  16437. * @since 0.1.0
  16438. * @memberOf _
  16439. * @category Util
  16440. * @param {string} [prefix=''] The value to prefix the ID with.
  16441. * @returns {string} Returns the unique ID.
  16442. * @example
  16443. *
  16444. * _.uniqueId('contact_');
  16445. * // => 'contact_104'
  16446. *
  16447. * _.uniqueId();
  16448. * // => '105'
  16449. */
  16450. function uniqueId(prefix) {
  16451. var id = ++idCounter;
  16452. return toString(prefix) + id;
  16453. }
  16454. /*------------------------------------------------------------------------*/
  16455. /**
  16456. * Adds two numbers.
  16457. *
  16458. * @static
  16459. * @memberOf _
  16460. * @since 3.4.0
  16461. * @category Math
  16462. * @param {number} augend The first number in an addition.
  16463. * @param {number} addend The second number in an addition.
  16464. * @returns {number} Returns the total.
  16465. * @example
  16466. *
  16467. * _.add(6, 4);
  16468. * // => 10
  16469. */
  16470. var add = createMathOperation(function(augend, addend) {
  16471. return augend + addend;
  16472. }, 0);
  16473. /**
  16474. * Computes `number` rounded up to `precision`.
  16475. *
  16476. * @static
  16477. * @memberOf _
  16478. * @since 3.10.0
  16479. * @category Math
  16480. * @param {number} number The number to round up.
  16481. * @param {number} [precision=0] The precision to round up to.
  16482. * @returns {number} Returns the rounded up number.
  16483. * @example
  16484. *
  16485. * _.ceil(4.006);
  16486. * // => 5
  16487. *
  16488. * _.ceil(6.004, 2);
  16489. * // => 6.01
  16490. *
  16491. * _.ceil(6040, -2);
  16492. * // => 6100
  16493. */
  16494. var ceil = createRound('ceil');
  16495. /**
  16496. * Divide two numbers.
  16497. *
  16498. * @static
  16499. * @memberOf _
  16500. * @since 4.7.0
  16501. * @category Math
  16502. * @param {number} dividend The first number in a division.
  16503. * @param {number} divisor The second number in a division.
  16504. * @returns {number} Returns the quotient.
  16505. * @example
  16506. *
  16507. * _.divide(6, 4);
  16508. * // => 1.5
  16509. */
  16510. var divide = createMathOperation(function(dividend, divisor) {
  16511. return dividend / divisor;
  16512. }, 1);
  16513. /**
  16514. * Computes `number` rounded down to `precision`.
  16515. *
  16516. * @static
  16517. * @memberOf _
  16518. * @since 3.10.0
  16519. * @category Math
  16520. * @param {number} number The number to round down.
  16521. * @param {number} [precision=0] The precision to round down to.
  16522. * @returns {number} Returns the rounded down number.
  16523. * @example
  16524. *
  16525. * _.floor(4.006);
  16526. * // => 4
  16527. *
  16528. * _.floor(0.046, 2);
  16529. * // => 0.04
  16530. *
  16531. * _.floor(4060, -2);
  16532. * // => 4000
  16533. */
  16534. var floor = createRound('floor');
  16535. /**
  16536. * Computes the maximum value of `array`. If `array` is empty or falsey,
  16537. * `undefined` is returned.
  16538. *
  16539. * @static
  16540. * @since 0.1.0
  16541. * @memberOf _
  16542. * @category Math
  16543. * @param {Array} array The array to iterate over.
  16544. * @returns {*} Returns the maximum value.
  16545. * @example
  16546. *
  16547. * _.max([4, 2, 8, 6]);
  16548. * // => 8
  16549. *
  16550. * _.max([]);
  16551. * // => undefined
  16552. */
  16553. function max(array) {
  16554. return (array && array.length)
  16555. ? baseExtremum(array, identity, baseGt)
  16556. : undefined;
  16557. }
  16558. /**
  16559. * This method is like `_.max` except that it accepts `iteratee` which is
  16560. * invoked for each element in `array` to generate the criterion by which
  16561. * the value is ranked. The iteratee is invoked with one argument: (value).
  16562. *
  16563. * @static
  16564. * @memberOf _
  16565. * @since 4.0.0
  16566. * @category Math
  16567. * @param {Array} array The array to iterate over.
  16568. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  16569. * @returns {*} Returns the maximum value.
  16570. * @example
  16571. *
  16572. * var objects = [{ 'n': 1 }, { 'n': 2 }];
  16573. *
  16574. * _.maxBy(objects, function(o) { return o.n; });
  16575. * // => { 'n': 2 }
  16576. *
  16577. * // The `_.property` iteratee shorthand.
  16578. * _.maxBy(objects, 'n');
  16579. * // => { 'n': 2 }
  16580. */
  16581. function maxBy(array, iteratee) {
  16582. return (array && array.length)
  16583. ? baseExtremum(array, getIteratee(iteratee, 2), baseGt)
  16584. : undefined;
  16585. }
  16586. /**
  16587. * Computes the mean of the values in `array`.
  16588. *
  16589. * @static
  16590. * @memberOf _
  16591. * @since 4.0.0
  16592. * @category Math
  16593. * @param {Array} array The array to iterate over.
  16594. * @returns {number} Returns the mean.
  16595. * @example
  16596. *
  16597. * _.mean([4, 2, 8, 6]);
  16598. * // => 5
  16599. */
  16600. function mean(array) {
  16601. return baseMean(array, identity);
  16602. }
  16603. /**
  16604. * This method is like `_.mean` except that it accepts `iteratee` which is
  16605. * invoked for each element in `array` to generate the value to be averaged.
  16606. * The iteratee is invoked with one argument: (value).
  16607. *
  16608. * @static
  16609. * @memberOf _
  16610. * @since 4.7.0
  16611. * @category Math
  16612. * @param {Array} array The array to iterate over.
  16613. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  16614. * @returns {number} Returns the mean.
  16615. * @example
  16616. *
  16617. * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
  16618. *
  16619. * _.meanBy(objects, function(o) { return o.n; });
  16620. * // => 5
  16621. *
  16622. * // The `_.property` iteratee shorthand.
  16623. * _.meanBy(objects, 'n');
  16624. * // => 5
  16625. */
  16626. function meanBy(array, iteratee) {
  16627. return baseMean(array, getIteratee(iteratee, 2));
  16628. }
  16629. /**
  16630. * Computes the minimum value of `array`. If `array` is empty or falsey,
  16631. * `undefined` is returned.
  16632. *
  16633. * @static
  16634. * @since 0.1.0
  16635. * @memberOf _
  16636. * @category Math
  16637. * @param {Array} array The array to iterate over.
  16638. * @returns {*} Returns the minimum value.
  16639. * @example
  16640. *
  16641. * _.min([4, 2, 8, 6]);
  16642. * // => 2
  16643. *
  16644. * _.min([]);
  16645. * // => undefined
  16646. */
  16647. function min(array) {
  16648. return (array && array.length)
  16649. ? baseExtremum(array, identity, baseLt)
  16650. : undefined;
  16651. }
  16652. /**
  16653. * This method is like `_.min` except that it accepts `iteratee` which is
  16654. * invoked for each element in `array` to generate the criterion by which
  16655. * the value is ranked. The iteratee is invoked with one argument: (value).
  16656. *
  16657. * @static
  16658. * @memberOf _
  16659. * @since 4.0.0
  16660. * @category Math
  16661. * @param {Array} array The array to iterate over.
  16662. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  16663. * @returns {*} Returns the minimum value.
  16664. * @example
  16665. *
  16666. * var objects = [{ 'n': 1 }, { 'n': 2 }];
  16667. *
  16668. * _.minBy(objects, function(o) { return o.n; });
  16669. * // => { 'n': 1 }
  16670. *
  16671. * // The `_.property` iteratee shorthand.
  16672. * _.minBy(objects, 'n');
  16673. * // => { 'n': 1 }
  16674. */
  16675. function minBy(array, iteratee) {
  16676. return (array && array.length)
  16677. ? baseExtremum(array, getIteratee(iteratee, 2), baseLt)
  16678. : undefined;
  16679. }
  16680. /**
  16681. * Multiply two numbers.
  16682. *
  16683. * @static
  16684. * @memberOf _
  16685. * @since 4.7.0
  16686. * @category Math
  16687. * @param {number} multiplier The first number in a multiplication.
  16688. * @param {number} multiplicand The second number in a multiplication.
  16689. * @returns {number} Returns the product.
  16690. * @example
  16691. *
  16692. * _.multiply(6, 4);
  16693. * // => 24
  16694. */
  16695. var multiply = createMathOperation(function(multiplier, multiplicand) {
  16696. return multiplier * multiplicand;
  16697. }, 1);
  16698. /**
  16699. * Computes `number` rounded to `precision`.
  16700. *
  16701. * @static
  16702. * @memberOf _
  16703. * @since 3.10.0
  16704. * @category Math
  16705. * @param {number} number The number to round.
  16706. * @param {number} [precision=0] The precision to round to.
  16707. * @returns {number} Returns the rounded number.
  16708. * @example
  16709. *
  16710. * _.round(4.006);
  16711. * // => 4
  16712. *
  16713. * _.round(4.006, 2);
  16714. * // => 4.01
  16715. *
  16716. * _.round(4060, -2);
  16717. * // => 4100
  16718. */
  16719. var round = createRound('round');
  16720. /**
  16721. * Subtract two numbers.
  16722. *
  16723. * @static
  16724. * @memberOf _
  16725. * @since 4.0.0
  16726. * @category Math
  16727. * @param {number} minuend The first number in a subtraction.
  16728. * @param {number} subtrahend The second number in a subtraction.
  16729. * @returns {number} Returns the difference.
  16730. * @example
  16731. *
  16732. * _.subtract(6, 4);
  16733. * // => 2
  16734. */
  16735. var subtract = createMathOperation(function(minuend, subtrahend) {
  16736. return minuend - subtrahend;
  16737. }, 0);
  16738. /**
  16739. * Computes the sum of the values in `array`.
  16740. *
  16741. * @static
  16742. * @memberOf _
  16743. * @since 3.4.0
  16744. * @category Math
  16745. * @param {Array} array The array to iterate over.
  16746. * @returns {number} Returns the sum.
  16747. * @example
  16748. *
  16749. * _.sum([4, 2, 8, 6]);
  16750. * // => 20
  16751. */
  16752. function sum(array) {
  16753. return (array && array.length)
  16754. ? baseSum(array, identity)
  16755. : 0;
  16756. }
  16757. /**
  16758. * This method is like `_.sum` except that it accepts `iteratee` which is
  16759. * invoked for each element in `array` to generate the value to be summed.
  16760. * The iteratee is invoked with one argument: (value).
  16761. *
  16762. * @static
  16763. * @memberOf _
  16764. * @since 4.0.0
  16765. * @category Math
  16766. * @param {Array} array The array to iterate over.
  16767. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  16768. * @returns {number} Returns the sum.
  16769. * @example
  16770. *
  16771. * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
  16772. *
  16773. * _.sumBy(objects, function(o) { return o.n; });
  16774. * // => 20
  16775. *
  16776. * // The `_.property` iteratee shorthand.
  16777. * _.sumBy(objects, 'n');
  16778. * // => 20
  16779. */
  16780. function sumBy(array, iteratee) {
  16781. return (array && array.length)
  16782. ? baseSum(array, getIteratee(iteratee, 2))
  16783. : 0;
  16784. }
  16785. /*------------------------------------------------------------------------*/
  16786. // Add methods that return wrapped values in chain sequences.
  16787. lodash.after = after;
  16788. lodash.ary = ary;
  16789. lodash.assign = assign;
  16790. lodash.assignIn = assignIn;
  16791. lodash.assignInWith = assignInWith;
  16792. lodash.assignWith = assignWith;
  16793. lodash.at = at;
  16794. lodash.before = before;
  16795. lodash.bind = bind;
  16796. lodash.bindAll = bindAll;
  16797. lodash.bindKey = bindKey;
  16798. lodash.castArray = castArray;
  16799. lodash.chain = chain;
  16800. lodash.chunk = chunk;
  16801. lodash.compact = compact;
  16802. lodash.concat = concat;
  16803. lodash.cond = cond;
  16804. lodash.conforms = conforms;
  16805. lodash.constant = constant;
  16806. lodash.countBy = countBy;
  16807. lodash.create = create;
  16808. lodash.curry = curry;
  16809. lodash.curryRight = curryRight;
  16810. lodash.debounce = debounce;
  16811. lodash.defaults = defaults;
  16812. lodash.defaultsDeep = defaultsDeep;
  16813. lodash.defer = defer;
  16814. lodash.delay = delay;
  16815. lodash.difference = difference;
  16816. lodash.differenceBy = differenceBy;
  16817. lodash.differenceWith = differenceWith;
  16818. lodash.drop = drop;
  16819. lodash.dropRight = dropRight;
  16820. lodash.dropRightWhile = dropRightWhile;
  16821. lodash.dropWhile = dropWhile;
  16822. lodash.fill = fill;
  16823. lodash.filter = filter;
  16824. lodash.flatMap = flatMap;
  16825. lodash.flatMapDeep = flatMapDeep;
  16826. lodash.flatMapDepth = flatMapDepth;
  16827. lodash.flatten = flatten;
  16828. lodash.flattenDeep = flattenDeep;
  16829. lodash.flattenDepth = flattenDepth;
  16830. lodash.flip = flip;
  16831. lodash.flow = flow;
  16832. lodash.flowRight = flowRight;
  16833. lodash.fromPairs = fromPairs;
  16834. lodash.functions = functions;
  16835. lodash.functionsIn = functionsIn;
  16836. lodash.groupBy = groupBy;
  16837. lodash.initial = initial;
  16838. lodash.intersection = intersection;
  16839. lodash.intersectionBy = intersectionBy;
  16840. lodash.intersectionWith = intersectionWith;
  16841. lodash.invert = invert;
  16842. lodash.invertBy = invertBy;
  16843. lodash.invokeMap = invokeMap;
  16844. lodash.iteratee = iteratee;
  16845. lodash.keyBy = keyBy;
  16846. lodash.keys = keys;
  16847. lodash.keysIn = keysIn;
  16848. lodash.map = map;
  16849. lodash.mapKeys = mapKeys;
  16850. lodash.mapValues = mapValues;
  16851. lodash.matches = matches;
  16852. lodash.matchesProperty = matchesProperty;
  16853. lodash.memoize = memoize;
  16854. lodash.merge = merge;
  16855. lodash.mergeWith = mergeWith;
  16856. lodash.method = method;
  16857. lodash.methodOf = methodOf;
  16858. lodash.mixin = mixin;
  16859. lodash.negate = negate;
  16860. lodash.nthArg = nthArg;
  16861. lodash.omit = omit;
  16862. lodash.omitBy = omitBy;
  16863. lodash.once = once;
  16864. lodash.orderBy = orderBy;
  16865. lodash.over = over;
  16866. lodash.overArgs = overArgs;
  16867. lodash.overEvery = overEvery;
  16868. lodash.overSome = overSome;
  16869. lodash.partial = partial;
  16870. lodash.partialRight = partialRight;
  16871. lodash.partition = partition;
  16872. lodash.pick = pick;
  16873. lodash.pickBy = pickBy;
  16874. lodash.property = property;
  16875. lodash.propertyOf = propertyOf;
  16876. lodash.pull = pull;
  16877. lodash.pullAll = pullAll;
  16878. lodash.pullAllBy = pullAllBy;
  16879. lodash.pullAllWith = pullAllWith;
  16880. lodash.pullAt = pullAt;
  16881. lodash.range = range;
  16882. lodash.rangeRight = rangeRight;
  16883. lodash.rearg = rearg;
  16884. lodash.reject = reject;
  16885. lodash.remove = remove;
  16886. lodash.rest = rest;
  16887. lodash.reverse = reverse;
  16888. lodash.sampleSize = sampleSize;
  16889. lodash.set = set;
  16890. lodash.setWith = setWith;
  16891. lodash.shuffle = shuffle;
  16892. lodash.slice = slice;
  16893. lodash.sortBy = sortBy;
  16894. lodash.sortedUniq = sortedUniq;
  16895. lodash.sortedUniqBy = sortedUniqBy;
  16896. lodash.split = split;
  16897. lodash.spread = spread;
  16898. lodash.tail = tail;
  16899. lodash.take = take;
  16900. lodash.takeRight = takeRight;
  16901. lodash.takeRightWhile = takeRightWhile;
  16902. lodash.takeWhile = takeWhile;
  16903. lodash.tap = tap;
  16904. lodash.throttle = throttle;
  16905. lodash.thru = thru;
  16906. lodash.toArray = toArray;
  16907. lodash.toPairs = toPairs;
  16908. lodash.toPairsIn = toPairsIn;
  16909. lodash.toPath = toPath;
  16910. lodash.toPlainObject = toPlainObject;
  16911. lodash.transform = transform;
  16912. lodash.unary = unary;
  16913. lodash.union = union;
  16914. lodash.unionBy = unionBy;
  16915. lodash.unionWith = unionWith;
  16916. lodash.uniq = uniq;
  16917. lodash.uniqBy = uniqBy;
  16918. lodash.uniqWith = uniqWith;
  16919. lodash.unset = unset;
  16920. lodash.unzip = unzip;
  16921. lodash.unzipWith = unzipWith;
  16922. lodash.update = update;
  16923. lodash.updateWith = updateWith;
  16924. lodash.values = values;
  16925. lodash.valuesIn = valuesIn;
  16926. lodash.without = without;
  16927. lodash.words = words;
  16928. lodash.wrap = wrap;
  16929. lodash.xor = xor;
  16930. lodash.xorBy = xorBy;
  16931. lodash.xorWith = xorWith;
  16932. lodash.zip = zip;
  16933. lodash.zipObject = zipObject;
  16934. lodash.zipObjectDeep = zipObjectDeep;
  16935. lodash.zipWith = zipWith;
  16936. // Add aliases.
  16937. lodash.entries = toPairs;
  16938. lodash.entriesIn = toPairsIn;
  16939. lodash.extend = assignIn;
  16940. lodash.extendWith = assignInWith;
  16941. // Add methods to `lodash.prototype`.
  16942. mixin(lodash, lodash);
  16943. /*------------------------------------------------------------------------*/
  16944. // Add methods that return unwrapped values in chain sequences.
  16945. lodash.add = add;
  16946. lodash.attempt = attempt;
  16947. lodash.camelCase = camelCase;
  16948. lodash.capitalize = capitalize;
  16949. lodash.ceil = ceil;
  16950. lodash.clamp = clamp;
  16951. lodash.clone = clone;
  16952. lodash.cloneDeep = cloneDeep;
  16953. lodash.cloneDeepWith = cloneDeepWith;
  16954. lodash.cloneWith = cloneWith;
  16955. lodash.conformsTo = conformsTo;
  16956. lodash.deburr = deburr;
  16957. lodash.defaultTo = defaultTo;
  16958. lodash.divide = divide;
  16959. lodash.endsWith = endsWith;
  16960. lodash.eq = eq;
  16961. lodash.escape = escape;
  16962. lodash.escapeRegExp = escapeRegExp;
  16963. lodash.every = every;
  16964. lodash.find = find;
  16965. lodash.findIndex = findIndex;
  16966. lodash.findKey = findKey;
  16967. lodash.findLast = findLast;
  16968. lodash.findLastIndex = findLastIndex;
  16969. lodash.findLastKey = findLastKey;
  16970. lodash.floor = floor;
  16971. lodash.forEach = forEach;
  16972. lodash.forEachRight = forEachRight;
  16973. lodash.forIn = forIn;
  16974. lodash.forInRight = forInRight;
  16975. lodash.forOwn = forOwn;
  16976. lodash.forOwnRight = forOwnRight;
  16977. lodash.get = get;
  16978. lodash.gt = gt;
  16979. lodash.gte = gte;
  16980. lodash.has = has;
  16981. lodash.hasIn = hasIn;
  16982. lodash.head = head;
  16983. lodash.identity = identity;
  16984. lodash.includes = includes;
  16985. lodash.indexOf = indexOf;
  16986. lodash.inRange = inRange;
  16987. lodash.invoke = invoke;
  16988. lodash.isArguments = isArguments;
  16989. lodash.isArray = isArray;
  16990. lodash.isArrayBuffer = isArrayBuffer;
  16991. lodash.isArrayLike = isArrayLike;
  16992. lodash.isArrayLikeObject = isArrayLikeObject;
  16993. lodash.isBoolean = isBoolean;
  16994. lodash.isBuffer = isBuffer;
  16995. lodash.isDate = isDate;
  16996. lodash.isElement = isElement;
  16997. lodash.isEmpty = isEmpty;
  16998. lodash.isEqual = isEqual;
  16999. lodash.isEqualWith = isEqualWith;
  17000. lodash.isError = isError;
  17001. lodash.isFinite = isFinite;
  17002. lodash.isFunction = isFunction;
  17003. lodash.isInteger = isInteger;
  17004. lodash.isLength = isLength;
  17005. lodash.isMap = isMap;
  17006. lodash.isMatch = isMatch;
  17007. lodash.isMatchWith = isMatchWith;
  17008. lodash.isNaN = isNaN;
  17009. lodash.isNative = isNative;
  17010. lodash.isNil = isNil;
  17011. lodash.isNull = isNull;
  17012. lodash.isNumber = isNumber;
  17013. lodash.isObject = isObject;
  17014. lodash.isObjectLike = isObjectLike;
  17015. lodash.isPlainObject = isPlainObject;
  17016. lodash.isRegExp = isRegExp;
  17017. lodash.isSafeInteger = isSafeInteger;
  17018. lodash.isSet = isSet;
  17019. lodash.isString = isString;
  17020. lodash.isSymbol = isSymbol;
  17021. lodash.isTypedArray = isTypedArray;
  17022. lodash.isUndefined = isUndefined;
  17023. lodash.isWeakMap = isWeakMap;
  17024. lodash.isWeakSet = isWeakSet;
  17025. lodash.join = join;
  17026. lodash.kebabCase = kebabCase;
  17027. lodash.last = last;
  17028. lodash.lastIndexOf = lastIndexOf;
  17029. lodash.lowerCase = lowerCase;
  17030. lodash.lowerFirst = lowerFirst;
  17031. lodash.lt = lt;
  17032. lodash.lte = lte;
  17033. lodash.max = max;
  17034. lodash.maxBy = maxBy;
  17035. lodash.mean = mean;
  17036. lodash.meanBy = meanBy;
  17037. lodash.min = min;
  17038. lodash.minBy = minBy;
  17039. lodash.stubArray = stubArray;
  17040. lodash.stubFalse = stubFalse;
  17041. lodash.stubObject = stubObject;
  17042. lodash.stubString = stubString;
  17043. lodash.stubTrue = stubTrue;
  17044. lodash.multiply = multiply;
  17045. lodash.nth = nth;
  17046. lodash.noConflict = noConflict;
  17047. lodash.noop = noop;
  17048. lodash.now = now;
  17049. lodash.pad = pad;
  17050. lodash.padEnd = padEnd;
  17051. lodash.padStart = padStart;
  17052. lodash.parseInt = parseInt;
  17053. lodash.random = random;
  17054. lodash.reduce = reduce;
  17055. lodash.reduceRight = reduceRight;
  17056. lodash.repeat = repeat;
  17057. lodash.replace = replace;
  17058. lodash.result = result;
  17059. lodash.round = round;
  17060. lodash.runInContext = runInContext;
  17061. lodash.sample = sample;
  17062. lodash.size = size;
  17063. lodash.snakeCase = snakeCase;
  17064. lodash.some = some;
  17065. lodash.sortedIndex = sortedIndex;
  17066. lodash.sortedIndexBy = sortedIndexBy;
  17067. lodash.sortedIndexOf = sortedIndexOf;
  17068. lodash.sortedLastIndex = sortedLastIndex;
  17069. lodash.sortedLastIndexBy = sortedLastIndexBy;
  17070. lodash.sortedLastIndexOf = sortedLastIndexOf;
  17071. lodash.startCase = startCase;
  17072. lodash.startsWith = startsWith;
  17073. lodash.subtract = subtract;
  17074. lodash.sum = sum;
  17075. lodash.sumBy = sumBy;
  17076. lodash.template = template;
  17077. lodash.times = times;
  17078. lodash.toFinite = toFinite;
  17079. lodash.toInteger = toInteger;
  17080. lodash.toLength = toLength;
  17081. lodash.toLower = toLower;
  17082. lodash.toNumber = toNumber;
  17083. lodash.toSafeInteger = toSafeInteger;
  17084. lodash.toString = toString;
  17085. lodash.toUpper = toUpper;
  17086. lodash.trim = trim;
  17087. lodash.trimEnd = trimEnd;
  17088. lodash.trimStart = trimStart;
  17089. lodash.truncate = truncate;
  17090. lodash.unescape = unescape;
  17091. lodash.uniqueId = uniqueId;
  17092. lodash.upperCase = upperCase;
  17093. lodash.upperFirst = upperFirst;
  17094. // Add aliases.
  17095. lodash.each = forEach;
  17096. lodash.eachRight = forEachRight;
  17097. lodash.first = head;
  17098. mixin(lodash, (function() {
  17099. var source = {};
  17100. baseForOwn(lodash, function(func, methodName) {
  17101. if (!hasOwnProperty.call(lodash.prototype, methodName)) {
  17102. source[methodName] = func;
  17103. }
  17104. });
  17105. return source;
  17106. }()), { 'chain': false });
  17107. /*------------------------------------------------------------------------*/
  17108. /**
  17109. * The semantic version number.
  17110. *
  17111. * @static
  17112. * @memberOf _
  17113. * @type {string}
  17114. */
  17115. lodash.VERSION = VERSION;
  17116. // Assign default placeholders.
  17117. arrayEach(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function(methodName) {
  17118. lodash[methodName].placeholder = lodash;
  17119. });
  17120. // Add `LazyWrapper` methods for `_.drop` and `_.take` variants.
  17121. arrayEach(['drop', 'take'], function(methodName, index) {
  17122. LazyWrapper.prototype[methodName] = function(n) {
  17123. n = n === undefined ? 1 : nativeMax(toInteger(n), 0);
  17124. var result = (this.__filtered__ && !index)
  17125. ? new LazyWrapper(this)
  17126. : this.clone();
  17127. if (result.__filtered__) {
  17128. result.__takeCount__ = nativeMin(n, result.__takeCount__);
  17129. } else {
  17130. result.__views__.push({
  17131. 'size': nativeMin(n, MAX_ARRAY_LENGTH),
  17132. 'type': methodName + (result.__dir__ < 0 ? 'Right' : '')
  17133. });
  17134. }
  17135. return result;
  17136. };
  17137. LazyWrapper.prototype[methodName + 'Right'] = function(n) {
  17138. return this.reverse()[methodName](n).reverse();
  17139. };
  17140. });
  17141. // Add `LazyWrapper` methods that accept an `iteratee` value.
  17142. arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) {
  17143. var type = index + 1,
  17144. isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;
  17145. LazyWrapper.prototype[methodName] = function(iteratee) {
  17146. var result = this.clone();
  17147. result.__iteratees__.push({
  17148. 'iteratee': getIteratee(iteratee, 3),
  17149. 'type': type
  17150. });
  17151. result.__filtered__ = result.__filtered__ || isFilter;
  17152. return result;
  17153. };
  17154. });
  17155. // Add `LazyWrapper` methods for `_.head` and `_.last`.
  17156. arrayEach(['head', 'last'], function(methodName, index) {
  17157. var takeName = 'take' + (index ? 'Right' : '');
  17158. LazyWrapper.prototype[methodName] = function() {
  17159. return this[takeName](1).value()[0];
  17160. };
  17161. });
  17162. // Add `LazyWrapper` methods for `_.initial` and `_.tail`.
  17163. arrayEach(['initial', 'tail'], function(methodName, index) {
  17164. var dropName = 'drop' + (index ? '' : 'Right');
  17165. LazyWrapper.prototype[methodName] = function() {
  17166. return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);
  17167. };
  17168. });
  17169. LazyWrapper.prototype.compact = function() {
  17170. return this.filter(identity);
  17171. };
  17172. LazyWrapper.prototype.find = function(predicate) {
  17173. return this.filter(predicate).head();
  17174. };
  17175. LazyWrapper.prototype.findLast = function(predicate) {
  17176. return this.reverse().find(predicate);
  17177. };
  17178. LazyWrapper.prototype.invokeMap = baseRest(function(path, args) {
  17179. if (typeof path == 'function') {
  17180. return new LazyWrapper(this);
  17181. }
  17182. return this.map(function(value) {
  17183. return baseInvoke(value, path, args);
  17184. });
  17185. });
  17186. LazyWrapper.prototype.reject = function(predicate) {
  17187. return this.filter(negate(getIteratee(predicate)));
  17188. };
  17189. LazyWrapper.prototype.slice = function(start, end) {
  17190. start = toInteger(start);
  17191. var result = this;
  17192. if (result.__filtered__ && (start > 0 || end < 0)) {
  17193. return new LazyWrapper(result);
  17194. }
  17195. if (start < 0) {
  17196. result = result.takeRight(-start);
  17197. } else if (start) {
  17198. result = result.drop(start);
  17199. }
  17200. if (end !== undefined) {
  17201. end = toInteger(end);
  17202. result = end < 0 ? result.dropRight(-end) : result.take(end - start);
  17203. }
  17204. return result;
  17205. };
  17206. LazyWrapper.prototype.takeRightWhile = function(predicate) {
  17207. return this.reverse().takeWhile(predicate).reverse();
  17208. };
  17209. LazyWrapper.prototype.toArray = function() {
  17210. return this.take(MAX_ARRAY_LENGTH);
  17211. };
  17212. // Add `LazyWrapper` methods to `lodash.prototype`.
  17213. baseForOwn(LazyWrapper.prototype, function(func, methodName) {
  17214. var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName),
  17215. isTaker = /^(?:head|last)$/.test(methodName),
  17216. lodashFunc = lodash[isTaker ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName],
  17217. retUnwrapped = isTaker || /^find/.test(methodName);
  17218. if (!lodashFunc) {
  17219. return;
  17220. }
  17221. lodash.prototype[methodName] = function() {
  17222. var value = this.__wrapped__,
  17223. args = isTaker ? [1] : arguments,
  17224. isLazy = value instanceof LazyWrapper,
  17225. iteratee = args[0],
  17226. useLazy = isLazy || isArray(value);
  17227. var interceptor = function(value) {
  17228. var result = lodashFunc.apply(lodash, arrayPush([value], args));
  17229. return (isTaker && chainAll) ? result[0] : result;
  17230. };
  17231. if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {
  17232. // Avoid lazy use if the iteratee has a "length" value other than `1`.
  17233. isLazy = useLazy = false;
  17234. }
  17235. var chainAll = this.__chain__,
  17236. isHybrid = !!this.__actions__.length,
  17237. isUnwrapped = retUnwrapped && !chainAll,
  17238. onlyLazy = isLazy && !isHybrid;
  17239. if (!retUnwrapped && useLazy) {
  17240. value = onlyLazy ? value : new LazyWrapper(this);
  17241. var result = func.apply(value, args);
  17242. result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });
  17243. return new LodashWrapper(result, chainAll);
  17244. }
  17245. if (isUnwrapped && onlyLazy) {
  17246. return func.apply(this, args);
  17247. }
  17248. result = this.thru(interceptor);
  17249. return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result;
  17250. };
  17251. });
  17252. // Add `Array` methods to `lodash.prototype`.
  17253. arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {
  17254. var func = arrayProto[methodName],
  17255. chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',
  17256. retUnwrapped = /^(?:pop|shift)$/.test(methodName);
  17257. lodash.prototype[methodName] = function() {
  17258. var args = arguments;
  17259. if (retUnwrapped && !this.__chain__) {
  17260. var value = this.value();
  17261. return func.apply(isArray(value) ? value : [], args);
  17262. }
  17263. return this[chainName](function(value) {
  17264. return func.apply(isArray(value) ? value : [], args);
  17265. });
  17266. };
  17267. });
  17268. // Map minified method names to their real names.
  17269. baseForOwn(LazyWrapper.prototype, function(func, methodName) {
  17270. var lodashFunc = lodash[methodName];
  17271. if (lodashFunc) {
  17272. var key = lodashFunc.name + '';
  17273. if (!hasOwnProperty.call(realNames, key)) {
  17274. realNames[key] = [];
  17275. }
  17276. realNames[key].push({ 'name': methodName, 'func': lodashFunc });
  17277. }
  17278. });
  17279. realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [{
  17280. 'name': 'wrapper',
  17281. 'func': undefined
  17282. }];
  17283. // Add methods to `LazyWrapper`.
  17284. LazyWrapper.prototype.clone = lazyClone;
  17285. LazyWrapper.prototype.reverse = lazyReverse;
  17286. LazyWrapper.prototype.value = lazyValue;
  17287. // Add chain sequence methods to the `lodash` wrapper.
  17288. lodash.prototype.at = wrapperAt;
  17289. lodash.prototype.chain = wrapperChain;
  17290. lodash.prototype.commit = wrapperCommit;
  17291. lodash.prototype.next = wrapperNext;
  17292. lodash.prototype.plant = wrapperPlant;
  17293. lodash.prototype.reverse = wrapperReverse;
  17294. lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;
  17295. // Add lazy aliases.
  17296. lodash.prototype.first = lodash.prototype.head;
  17297. if (symIterator) {
  17298. lodash.prototype[symIterator] = wrapperToIterator;
  17299. }
  17300. return lodash;
  17301. });
  17302. /*--------------------------------------------------------------------------*/
  17303. // Export lodash.
  17304. var _ = runInContext();
  17305. // Some AMD build optimizers, like r.js, check for condition patterns like:
  17306. if (true) {
  17307. // Expose Lodash on the global object to prevent errors when Lodash is
  17308. // loaded by a script tag in the presence of an AMD loader.
  17309. // See http://requirejs.org/docs/errors.html#mismatch for more details.
  17310. // Use `_.noConflict` to remove Lodash from the global object.
  17311. root._ = _;
  17312. // Define as an anonymous module so, through path mapping, it can be
  17313. // referenced as the "underscore" module.
  17314. !(__WEBPACK_AMD_DEFINE_RESULT__ = (function() {
  17315. return _;
  17316. }).call(exports, __webpack_require__, exports, module),
  17317. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  17318. }
  17319. // Check for `exports` after `define` in case a build optimizer adds it.
  17320. else {}
  17321. }.call(this));
  17322. /***/ }),
  17323. /***/ "./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppFooter.vue?vue&type=style&index=0&id=4ab6097e&lang=scss&scoped=true":
  17324. /*!***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  17325. !*** ./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppFooter.vue?vue&type=style&index=0&id=4ab6097e&lang=scss&scoped=true ***!
  17326. \***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  17327. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17328. "use strict";
  17329. __webpack_require__.r(__webpack_exports__);
  17330. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17331. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17332. /* harmony export */ });
  17333. /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js");
  17334. /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
  17335. /* harmony import */ var _node_modules_css_loader_dist_cjs_js_clonedRuleSet_11_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_11_use_2_node_modules_sass_loader_dist_cjs_js_clonedRuleSet_11_use_3_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppFooter_vue_vue_type_style_index_0_id_4ab6097e_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!../../../node_modules/vue-loader/dist/stylePostLoader.js!../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!../../../node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./AppFooter.vue?vue&type=style&index=0&id=4ab6097e&lang=scss&scoped=true */ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppFooter.vue?vue&type=style&index=0&id=4ab6097e&lang=scss&scoped=true");
  17336. var options = {};
  17337. options.insert = "head";
  17338. options.singleton = false;
  17339. var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_clonedRuleSet_11_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_11_use_2_node_modules_sass_loader_dist_cjs_js_clonedRuleSet_11_use_3_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppFooter_vue_vue_type_style_index_0_id_4ab6097e_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_1__["default"], options);
  17340. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_clonedRuleSet_11_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_11_use_2_node_modules_sass_loader_dist_cjs_js_clonedRuleSet_11_use_3_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppFooter_vue_vue_type_style_index_0_id_4ab6097e_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {});
  17341. /***/ }),
  17342. /***/ "./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppSidebar.vue?vue&type=style&index=0&id=22a4e926&lang=scss&scoped=true":
  17343. /*!****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  17344. !*** ./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppSidebar.vue?vue&type=style&index=0&id=22a4e926&lang=scss&scoped=true ***!
  17345. \****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  17346. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17347. "use strict";
  17348. __webpack_require__.r(__webpack_exports__);
  17349. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17350. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17351. /* harmony export */ });
  17352. /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js");
  17353. /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
  17354. /* harmony import */ var _node_modules_css_loader_dist_cjs_js_clonedRuleSet_11_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_11_use_2_node_modules_sass_loader_dist_cjs_js_clonedRuleSet_11_use_3_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppSidebar_vue_vue_type_style_index_0_id_22a4e926_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!../../../node_modules/vue-loader/dist/stylePostLoader.js!../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!../../../node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./AppSidebar.vue?vue&type=style&index=0&id=22a4e926&lang=scss&scoped=true */ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppSidebar.vue?vue&type=style&index=0&id=22a4e926&lang=scss&scoped=true");
  17355. var options = {};
  17356. options.insert = "head";
  17357. options.singleton = false;
  17358. var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_clonedRuleSet_11_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_11_use_2_node_modules_sass_loader_dist_cjs_js_clonedRuleSet_11_use_3_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppSidebar_vue_vue_type_style_index_0_id_22a4e926_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_1__["default"], options);
  17359. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_clonedRuleSet_11_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_11_use_2_node_modules_sass_loader_dist_cjs_js_clonedRuleSet_11_use_3_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppSidebar_vue_vue_type_style_index_0_id_22a4e926_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {});
  17360. /***/ }),
  17361. /***/ "./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppSubSidebar.vue?vue&type=style&index=0&id=0addd9bc&lang=scss&scoped=true":
  17362. /*!*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  17363. !*** ./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppSubSidebar.vue?vue&type=style&index=0&id=0addd9bc&lang=scss&scoped=true ***!
  17364. \*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  17365. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17366. "use strict";
  17367. __webpack_require__.r(__webpack_exports__);
  17368. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17369. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17370. /* harmony export */ });
  17371. /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js");
  17372. /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
  17373. /* harmony import */ var _node_modules_css_loader_dist_cjs_js_clonedRuleSet_11_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_11_use_2_node_modules_sass_loader_dist_cjs_js_clonedRuleSet_11_use_3_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppSubSidebar_vue_vue_type_style_index_0_id_0addd9bc_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!../../../node_modules/vue-loader/dist/stylePostLoader.js!../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!../../../node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./AppSubSidebar.vue?vue&type=style&index=0&id=0addd9bc&lang=scss&scoped=true */ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppSubSidebar.vue?vue&type=style&index=0&id=0addd9bc&lang=scss&scoped=true");
  17374. var options = {};
  17375. options.insert = "head";
  17376. options.singleton = false;
  17377. var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_clonedRuleSet_11_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_11_use_2_node_modules_sass_loader_dist_cjs_js_clonedRuleSet_11_use_3_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppSubSidebar_vue_vue_type_style_index_0_id_0addd9bc_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_1__["default"], options);
  17378. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_clonedRuleSet_11_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_11_use_2_node_modules_sass_loader_dist_cjs_js_clonedRuleSet_11_use_3_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppSubSidebar_vue_vue_type_style_index_0_id_0addd9bc_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {});
  17379. /***/ }),
  17380. /***/ "./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppTopBar.vue?vue&type=style&index=0&id=42bf62a4&lang=scss&scoped=true":
  17381. /*!***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  17382. !*** ./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppTopBar.vue?vue&type=style&index=0&id=42bf62a4&lang=scss&scoped=true ***!
  17383. \***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  17384. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17385. "use strict";
  17386. __webpack_require__.r(__webpack_exports__);
  17387. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17388. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17389. /* harmony export */ });
  17390. /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js");
  17391. /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
  17392. /* harmony import */ var _node_modules_css_loader_dist_cjs_js_clonedRuleSet_11_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_11_use_2_node_modules_sass_loader_dist_cjs_js_clonedRuleSet_11_use_3_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppTopBar_vue_vue_type_style_index_0_id_42bf62a4_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!../../../node_modules/vue-loader/dist/stylePostLoader.js!../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!../../../node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./AppTopBar.vue?vue&type=style&index=0&id=42bf62a4&lang=scss&scoped=true */ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppTopBar.vue?vue&type=style&index=0&id=42bf62a4&lang=scss&scoped=true");
  17393. var options = {};
  17394. options.insert = "head";
  17395. options.singleton = false;
  17396. var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_clonedRuleSet_11_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_11_use_2_node_modules_sass_loader_dist_cjs_js_clonedRuleSet_11_use_3_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppTopBar_vue_vue_type_style_index_0_id_42bf62a4_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_1__["default"], options);
  17397. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_clonedRuleSet_11_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_11_use_2_node_modules_sass_loader_dist_cjs_js_clonedRuleSet_11_use_3_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppTopBar_vue_vue_type_style_index_0_id_42bf62a4_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {});
  17398. /***/ }),
  17399. /***/ "./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/layouts/DashboardLayout.vue?vue&type=style&index=0&id=549bf5ac&lang=scss&scoped=true":
  17400. /*!******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  17401. !*** ./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/layouts/DashboardLayout.vue?vue&type=style&index=0&id=549bf5ac&lang=scss&scoped=true ***!
  17402. \******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  17403. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17404. "use strict";
  17405. __webpack_require__.r(__webpack_exports__);
  17406. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17407. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17408. /* harmony export */ });
  17409. /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js");
  17410. /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
  17411. /* harmony import */ var _node_modules_css_loader_dist_cjs_js_clonedRuleSet_11_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_11_use_2_node_modules_sass_loader_dist_cjs_js_clonedRuleSet_11_use_3_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_DashboardLayout_vue_vue_type_style_index_0_id_549bf5ac_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!../../../node_modules/vue-loader/dist/stylePostLoader.js!../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!../../../node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./DashboardLayout.vue?vue&type=style&index=0&id=549bf5ac&lang=scss&scoped=true */ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/layouts/DashboardLayout.vue?vue&type=style&index=0&id=549bf5ac&lang=scss&scoped=true");
  17412. var options = {};
  17413. options.insert = "head";
  17414. options.singleton = false;
  17415. var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_clonedRuleSet_11_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_11_use_2_node_modules_sass_loader_dist_cjs_js_clonedRuleSet_11_use_3_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_DashboardLayout_vue_vue_type_style_index_0_id_549bf5ac_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_1__["default"], options);
  17416. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_clonedRuleSet_11_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_11_use_2_node_modules_sass_loader_dist_cjs_js_clonedRuleSet_11_use_3_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_DashboardLayout_vue_vue_type_style_index_0_id_549bf5ac_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {});
  17417. /***/ }),
  17418. /***/ "./node_modules/vue-loader/dist/exportHelper.js":
  17419. /*!******************************************************!*\
  17420. !*** ./node_modules/vue-loader/dist/exportHelper.js ***!
  17421. \******************************************************/
  17422. /***/ ((__unused_webpack_module, exports) => {
  17423. "use strict";
  17424. Object.defineProperty(exports, "__esModule", ({ value: true }));
  17425. // runtime helper for setting properties on components
  17426. // in a tree-shakable way
  17427. exports["default"] = (sfc, props) => {
  17428. const target = sfc.__vccOpts || sfc;
  17429. for (const [key, val] of props) {
  17430. target[key] = val;
  17431. }
  17432. return target;
  17433. };
  17434. /***/ }),
  17435. /***/ "./resources/js/components/AppButtonLink.vue":
  17436. /*!***************************************************!*\
  17437. !*** ./resources/js/components/AppButtonLink.vue ***!
  17438. \***************************************************/
  17439. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17440. "use strict";
  17441. __webpack_require__.r(__webpack_exports__);
  17442. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17443. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17444. /* harmony export */ });
  17445. /* harmony import */ var _AppButtonLink_vue_vue_type_template_id_c3621f1c__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AppButtonLink.vue?vue&type=template&id=c3621f1c */ "./resources/js/components/AppButtonLink.vue?vue&type=template&id=c3621f1c");
  17446. /* harmony import */ var _AppButtonLink_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AppButtonLink.vue?vue&type=script&setup=true&lang=js */ "./resources/js/components/AppButtonLink.vue?vue&type=script&setup=true&lang=js");
  17447. /* harmony import */ var _media_dijitalcode_3ad9c6e0_4296_4a57_b136_144df49e7bb8_Projects_parkirin_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/vue-loader/dist/exportHelper.js */ "./node_modules/vue-loader/dist/exportHelper.js");
  17448. ;
  17449. const __exports__ = /*#__PURE__*/(0,_media_dijitalcode_3ad9c6e0_4296_4a57_b136_144df49e7bb8_Projects_parkirin_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_2__["default"])(_AppButtonLink_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_1__["default"], [['render',_AppButtonLink_vue_vue_type_template_id_c3621f1c__WEBPACK_IMPORTED_MODULE_0__.render],['__file',"resources/js/components/AppButtonLink.vue"]])
  17450. /* hot reload */
  17451. if (false) {}
  17452. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
  17453. /***/ }),
  17454. /***/ "./resources/js/components/AppFooter.vue":
  17455. /*!***********************************************!*\
  17456. !*** ./resources/js/components/AppFooter.vue ***!
  17457. \***********************************************/
  17458. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17459. "use strict";
  17460. __webpack_require__.r(__webpack_exports__);
  17461. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17462. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17463. /* harmony export */ });
  17464. /* harmony import */ var _AppFooter_vue_vue_type_template_id_4ab6097e_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AppFooter.vue?vue&type=template&id=4ab6097e&scoped=true */ "./resources/js/components/AppFooter.vue?vue&type=template&id=4ab6097e&scoped=true");
  17465. /* harmony import */ var _AppFooter_vue_vue_type_style_index_0_id_4ab6097e_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AppFooter.vue?vue&type=style&index=0&id=4ab6097e&lang=scss&scoped=true */ "./resources/js/components/AppFooter.vue?vue&type=style&index=0&id=4ab6097e&lang=scss&scoped=true");
  17466. /* harmony import */ var _media_dijitalcode_3ad9c6e0_4296_4a57_b136_144df49e7bb8_Projects_parkirin_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/vue-loader/dist/exportHelper.js */ "./node_modules/vue-loader/dist/exportHelper.js");
  17467. const script = {}
  17468. ;
  17469. const __exports__ = /*#__PURE__*/(0,_media_dijitalcode_3ad9c6e0_4296_4a57_b136_144df49e7bb8_Projects_parkirin_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_2__["default"])(script, [['render',_AppFooter_vue_vue_type_template_id_4ab6097e_scoped_true__WEBPACK_IMPORTED_MODULE_0__.render],['__scopeId',"data-v-4ab6097e"],['__file',"resources/js/components/AppFooter.vue"]])
  17470. /* hot reload */
  17471. if (false) {}
  17472. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
  17473. /***/ }),
  17474. /***/ "./resources/js/components/AppMessage.vue":
  17475. /*!************************************************!*\
  17476. !*** ./resources/js/components/AppMessage.vue ***!
  17477. \************************************************/
  17478. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17479. "use strict";
  17480. __webpack_require__.r(__webpack_exports__);
  17481. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17482. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17483. /* harmony export */ });
  17484. /* harmony import */ var _AppMessage_vue_vue_type_template_id_07159051__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AppMessage.vue?vue&type=template&id=07159051 */ "./resources/js/components/AppMessage.vue?vue&type=template&id=07159051");
  17485. /* harmony import */ var _AppMessage_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AppMessage.vue?vue&type=script&setup=true&lang=js */ "./resources/js/components/AppMessage.vue?vue&type=script&setup=true&lang=js");
  17486. /* harmony import */ var _media_dijitalcode_3ad9c6e0_4296_4a57_b136_144df49e7bb8_Projects_parkirin_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/vue-loader/dist/exportHelper.js */ "./node_modules/vue-loader/dist/exportHelper.js");
  17487. ;
  17488. const __exports__ = /*#__PURE__*/(0,_media_dijitalcode_3ad9c6e0_4296_4a57_b136_144df49e7bb8_Projects_parkirin_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_2__["default"])(_AppMessage_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_1__["default"], [['render',_AppMessage_vue_vue_type_template_id_07159051__WEBPACK_IMPORTED_MODULE_0__.render],['__file',"resources/js/components/AppMessage.vue"]])
  17489. /* hot reload */
  17490. if (false) {}
  17491. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
  17492. /***/ }),
  17493. /***/ "./resources/js/components/AppPagination.vue":
  17494. /*!***************************************************!*\
  17495. !*** ./resources/js/components/AppPagination.vue ***!
  17496. \***************************************************/
  17497. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17498. "use strict";
  17499. __webpack_require__.r(__webpack_exports__);
  17500. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17501. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17502. /* harmony export */ });
  17503. /* harmony import */ var _AppPagination_vue_vue_type_template_id_4da56ec0__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AppPagination.vue?vue&type=template&id=4da56ec0 */ "./resources/js/components/AppPagination.vue?vue&type=template&id=4da56ec0");
  17504. /* harmony import */ var _AppPagination_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AppPagination.vue?vue&type=script&setup=true&lang=js */ "./resources/js/components/AppPagination.vue?vue&type=script&setup=true&lang=js");
  17505. /* harmony import */ var _media_dijitalcode_3ad9c6e0_4296_4a57_b136_144df49e7bb8_Projects_parkirin_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/vue-loader/dist/exportHelper.js */ "./node_modules/vue-loader/dist/exportHelper.js");
  17506. ;
  17507. const __exports__ = /*#__PURE__*/(0,_media_dijitalcode_3ad9c6e0_4296_4a57_b136_144df49e7bb8_Projects_parkirin_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_2__["default"])(_AppPagination_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_1__["default"], [['render',_AppPagination_vue_vue_type_template_id_4da56ec0__WEBPACK_IMPORTED_MODULE_0__.render],['__file',"resources/js/components/AppPagination.vue"]])
  17508. /* hot reload */
  17509. if (false) {}
  17510. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
  17511. /***/ }),
  17512. /***/ "./resources/js/components/AppSidebar.vue":
  17513. /*!************************************************!*\
  17514. !*** ./resources/js/components/AppSidebar.vue ***!
  17515. \************************************************/
  17516. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17517. "use strict";
  17518. __webpack_require__.r(__webpack_exports__);
  17519. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17520. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17521. /* harmony export */ });
  17522. /* harmony import */ var _AppSidebar_vue_vue_type_template_id_22a4e926_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AppSidebar.vue?vue&type=template&id=22a4e926&scoped=true */ "./resources/js/components/AppSidebar.vue?vue&type=template&id=22a4e926&scoped=true");
  17523. /* harmony import */ var _AppSidebar_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AppSidebar.vue?vue&type=script&setup=true&lang=js */ "./resources/js/components/AppSidebar.vue?vue&type=script&setup=true&lang=js");
  17524. /* harmony import */ var _AppSidebar_vue_vue_type_style_index_0_id_22a4e926_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./AppSidebar.vue?vue&type=style&index=0&id=22a4e926&lang=scss&scoped=true */ "./resources/js/components/AppSidebar.vue?vue&type=style&index=0&id=22a4e926&lang=scss&scoped=true");
  17525. /* harmony import */ var _media_dijitalcode_3ad9c6e0_4296_4a57_b136_144df49e7bb8_Projects_parkirin_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./node_modules/vue-loader/dist/exportHelper.js */ "./node_modules/vue-loader/dist/exportHelper.js");
  17526. ;
  17527. const __exports__ = /*#__PURE__*/(0,_media_dijitalcode_3ad9c6e0_4296_4a57_b136_144df49e7bb8_Projects_parkirin_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_3__["default"])(_AppSidebar_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_1__["default"], [['render',_AppSidebar_vue_vue_type_template_id_22a4e926_scoped_true__WEBPACK_IMPORTED_MODULE_0__.render],['__scopeId',"data-v-22a4e926"],['__file',"resources/js/components/AppSidebar.vue"]])
  17528. /* hot reload */
  17529. if (false) {}
  17530. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
  17531. /***/ }),
  17532. /***/ "./resources/js/components/AppSubSidebar.vue":
  17533. /*!***************************************************!*\
  17534. !*** ./resources/js/components/AppSubSidebar.vue ***!
  17535. \***************************************************/
  17536. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17537. "use strict";
  17538. __webpack_require__.r(__webpack_exports__);
  17539. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17540. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17541. /* harmony export */ });
  17542. /* harmony import */ var _AppSubSidebar_vue_vue_type_template_id_0addd9bc_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AppSubSidebar.vue?vue&type=template&id=0addd9bc&scoped=true */ "./resources/js/components/AppSubSidebar.vue?vue&type=template&id=0addd9bc&scoped=true");
  17543. /* harmony import */ var _AppSubSidebar_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AppSubSidebar.vue?vue&type=script&setup=true&lang=js */ "./resources/js/components/AppSubSidebar.vue?vue&type=script&setup=true&lang=js");
  17544. /* harmony import */ var _AppSubSidebar_vue_vue_type_style_index_0_id_0addd9bc_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./AppSubSidebar.vue?vue&type=style&index=0&id=0addd9bc&lang=scss&scoped=true */ "./resources/js/components/AppSubSidebar.vue?vue&type=style&index=0&id=0addd9bc&lang=scss&scoped=true");
  17545. /* harmony import */ var _media_dijitalcode_3ad9c6e0_4296_4a57_b136_144df49e7bb8_Projects_parkirin_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./node_modules/vue-loader/dist/exportHelper.js */ "./node_modules/vue-loader/dist/exportHelper.js");
  17546. ;
  17547. const __exports__ = /*#__PURE__*/(0,_media_dijitalcode_3ad9c6e0_4296_4a57_b136_144df49e7bb8_Projects_parkirin_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_3__["default"])(_AppSubSidebar_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_1__["default"], [['render',_AppSubSidebar_vue_vue_type_template_id_0addd9bc_scoped_true__WEBPACK_IMPORTED_MODULE_0__.render],['__scopeId',"data-v-0addd9bc"],['__file',"resources/js/components/AppSubSidebar.vue"]])
  17548. /* hot reload */
  17549. if (false) {}
  17550. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
  17551. /***/ }),
  17552. /***/ "./resources/js/components/AppTopBar.vue":
  17553. /*!***********************************************!*\
  17554. !*** ./resources/js/components/AppTopBar.vue ***!
  17555. \***********************************************/
  17556. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17557. "use strict";
  17558. __webpack_require__.r(__webpack_exports__);
  17559. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17560. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17561. /* harmony export */ });
  17562. /* harmony import */ var _AppTopBar_vue_vue_type_template_id_42bf62a4_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AppTopBar.vue?vue&type=template&id=42bf62a4&scoped=true */ "./resources/js/components/AppTopBar.vue?vue&type=template&id=42bf62a4&scoped=true");
  17563. /* harmony import */ var _AppTopBar_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AppTopBar.vue?vue&type=script&setup=true&lang=js */ "./resources/js/components/AppTopBar.vue?vue&type=script&setup=true&lang=js");
  17564. /* harmony import */ var _AppTopBar_vue_vue_type_style_index_0_id_42bf62a4_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./AppTopBar.vue?vue&type=style&index=0&id=42bf62a4&lang=scss&scoped=true */ "./resources/js/components/AppTopBar.vue?vue&type=style&index=0&id=42bf62a4&lang=scss&scoped=true");
  17565. /* harmony import */ var _media_dijitalcode_3ad9c6e0_4296_4a57_b136_144df49e7bb8_Projects_parkirin_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./node_modules/vue-loader/dist/exportHelper.js */ "./node_modules/vue-loader/dist/exportHelper.js");
  17566. ;
  17567. const __exports__ = /*#__PURE__*/(0,_media_dijitalcode_3ad9c6e0_4296_4a57_b136_144df49e7bb8_Projects_parkirin_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_3__["default"])(_AppTopBar_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_1__["default"], [['render',_AppTopBar_vue_vue_type_template_id_42bf62a4_scoped_true__WEBPACK_IMPORTED_MODULE_0__.render],['__scopeId',"data-v-42bf62a4"],['__file',"resources/js/components/AppTopBar.vue"]])
  17568. /* hot reload */
  17569. if (false) {}
  17570. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
  17571. /***/ }),
  17572. /***/ "./resources/js/layouts/DashboardLayout.vue":
  17573. /*!**************************************************!*\
  17574. !*** ./resources/js/layouts/DashboardLayout.vue ***!
  17575. \**************************************************/
  17576. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17577. "use strict";
  17578. __webpack_require__.r(__webpack_exports__);
  17579. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17580. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17581. /* harmony export */ });
  17582. /* harmony import */ var _DashboardLayout_vue_vue_type_template_id_549bf5ac_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./DashboardLayout.vue?vue&type=template&id=549bf5ac&scoped=true */ "./resources/js/layouts/DashboardLayout.vue?vue&type=template&id=549bf5ac&scoped=true");
  17583. /* harmony import */ var _DashboardLayout_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./DashboardLayout.vue?vue&type=script&setup=true&lang=js */ "./resources/js/layouts/DashboardLayout.vue?vue&type=script&setup=true&lang=js");
  17584. /* harmony import */ var _DashboardLayout_vue_vue_type_style_index_0_id_549bf5ac_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./DashboardLayout.vue?vue&type=style&index=0&id=549bf5ac&lang=scss&scoped=true */ "./resources/js/layouts/DashboardLayout.vue?vue&type=style&index=0&id=549bf5ac&lang=scss&scoped=true");
  17585. /* harmony import */ var _media_dijitalcode_3ad9c6e0_4296_4a57_b136_144df49e7bb8_Projects_parkirin_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./node_modules/vue-loader/dist/exportHelper.js */ "./node_modules/vue-loader/dist/exportHelper.js");
  17586. ;
  17587. const __exports__ = /*#__PURE__*/(0,_media_dijitalcode_3ad9c6e0_4296_4a57_b136_144df49e7bb8_Projects_parkirin_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_3__["default"])(_DashboardLayout_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_1__["default"], [['render',_DashboardLayout_vue_vue_type_template_id_549bf5ac_scoped_true__WEBPACK_IMPORTED_MODULE_0__.render],['__scopeId',"data-v-549bf5ac"],['__file',"resources/js/layouts/DashboardLayout.vue"]])
  17588. /* hot reload */
  17589. if (false) {}
  17590. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
  17591. /***/ }),
  17592. /***/ "./resources/js/pages/member/Index.vue":
  17593. /*!*********************************************!*\
  17594. !*** ./resources/js/pages/member/Index.vue ***!
  17595. \*********************************************/
  17596. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17597. "use strict";
  17598. __webpack_require__.r(__webpack_exports__);
  17599. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17600. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17601. /* harmony export */ });
  17602. /* harmony import */ var _Index_vue_vue_type_template_id_7b0e4c66__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Index.vue?vue&type=template&id=7b0e4c66 */ "./resources/js/pages/member/Index.vue?vue&type=template&id=7b0e4c66");
  17603. /* harmony import */ var _Index_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Index.vue?vue&type=script&setup=true&lang=js */ "./resources/js/pages/member/Index.vue?vue&type=script&setup=true&lang=js");
  17604. /* harmony import */ var _media_dijitalcode_3ad9c6e0_4296_4a57_b136_144df49e7bb8_Projects_parkirin_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/vue-loader/dist/exportHelper.js */ "./node_modules/vue-loader/dist/exportHelper.js");
  17605. ;
  17606. const __exports__ = /*#__PURE__*/(0,_media_dijitalcode_3ad9c6e0_4296_4a57_b136_144df49e7bb8_Projects_parkirin_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_2__["default"])(_Index_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_1__["default"], [['render',_Index_vue_vue_type_template_id_7b0e4c66__WEBPACK_IMPORTED_MODULE_0__.render],['__file',"resources/js/pages/member/Index.vue"]])
  17607. /* hot reload */
  17608. if (false) {}
  17609. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
  17610. /***/ }),
  17611. /***/ "./resources/js/components/AppButtonLink.vue?vue&type=script&setup=true&lang=js":
  17612. /*!**************************************************************************************!*\
  17613. !*** ./resources/js/components/AppButtonLink.vue?vue&type=script&setup=true&lang=js ***!
  17614. \**************************************************************************************/
  17615. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17616. "use strict";
  17617. __webpack_require__.r(__webpack_exports__);
  17618. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17619. /* harmony export */ "default": () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppButtonLink_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_0__["default"])
  17620. /* harmony export */ });
  17621. /* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppButtonLink_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./AppButtonLink.vue?vue&type=script&setup=true&lang=js */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppButtonLink.vue?vue&type=script&setup=true&lang=js");
  17622. /***/ }),
  17623. /***/ "./resources/js/components/AppMessage.vue?vue&type=script&setup=true&lang=js":
  17624. /*!***********************************************************************************!*\
  17625. !*** ./resources/js/components/AppMessage.vue?vue&type=script&setup=true&lang=js ***!
  17626. \***********************************************************************************/
  17627. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17628. "use strict";
  17629. __webpack_require__.r(__webpack_exports__);
  17630. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17631. /* harmony export */ "default": () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppMessage_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_0__["default"])
  17632. /* harmony export */ });
  17633. /* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppMessage_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./AppMessage.vue?vue&type=script&setup=true&lang=js */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppMessage.vue?vue&type=script&setup=true&lang=js");
  17634. /***/ }),
  17635. /***/ "./resources/js/components/AppPagination.vue?vue&type=script&setup=true&lang=js":
  17636. /*!**************************************************************************************!*\
  17637. !*** ./resources/js/components/AppPagination.vue?vue&type=script&setup=true&lang=js ***!
  17638. \**************************************************************************************/
  17639. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17640. "use strict";
  17641. __webpack_require__.r(__webpack_exports__);
  17642. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17643. /* harmony export */ "default": () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppPagination_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_0__["default"])
  17644. /* harmony export */ });
  17645. /* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppPagination_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./AppPagination.vue?vue&type=script&setup=true&lang=js */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppPagination.vue?vue&type=script&setup=true&lang=js");
  17646. /***/ }),
  17647. /***/ "./resources/js/components/AppSidebar.vue?vue&type=script&setup=true&lang=js":
  17648. /*!***********************************************************************************!*\
  17649. !*** ./resources/js/components/AppSidebar.vue?vue&type=script&setup=true&lang=js ***!
  17650. \***********************************************************************************/
  17651. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17652. "use strict";
  17653. __webpack_require__.r(__webpack_exports__);
  17654. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17655. /* harmony export */ "default": () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppSidebar_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_0__["default"])
  17656. /* harmony export */ });
  17657. /* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppSidebar_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./AppSidebar.vue?vue&type=script&setup=true&lang=js */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppSidebar.vue?vue&type=script&setup=true&lang=js");
  17658. /***/ }),
  17659. /***/ "./resources/js/components/AppSubSidebar.vue?vue&type=script&setup=true&lang=js":
  17660. /*!**************************************************************************************!*\
  17661. !*** ./resources/js/components/AppSubSidebar.vue?vue&type=script&setup=true&lang=js ***!
  17662. \**************************************************************************************/
  17663. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17664. "use strict";
  17665. __webpack_require__.r(__webpack_exports__);
  17666. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17667. /* harmony export */ "default": () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppSubSidebar_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_0__["default"])
  17668. /* harmony export */ });
  17669. /* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppSubSidebar_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./AppSubSidebar.vue?vue&type=script&setup=true&lang=js */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppSubSidebar.vue?vue&type=script&setup=true&lang=js");
  17670. /***/ }),
  17671. /***/ "./resources/js/components/AppTopBar.vue?vue&type=script&setup=true&lang=js":
  17672. /*!**********************************************************************************!*\
  17673. !*** ./resources/js/components/AppTopBar.vue?vue&type=script&setup=true&lang=js ***!
  17674. \**********************************************************************************/
  17675. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17676. "use strict";
  17677. __webpack_require__.r(__webpack_exports__);
  17678. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17679. /* harmony export */ "default": () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppTopBar_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_0__["default"])
  17680. /* harmony export */ });
  17681. /* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppTopBar_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./AppTopBar.vue?vue&type=script&setup=true&lang=js */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppTopBar.vue?vue&type=script&setup=true&lang=js");
  17682. /***/ }),
  17683. /***/ "./resources/js/layouts/DashboardLayout.vue?vue&type=script&setup=true&lang=js":
  17684. /*!*************************************************************************************!*\
  17685. !*** ./resources/js/layouts/DashboardLayout.vue?vue&type=script&setup=true&lang=js ***!
  17686. \*************************************************************************************/
  17687. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17688. "use strict";
  17689. __webpack_require__.r(__webpack_exports__);
  17690. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17691. /* harmony export */ "default": () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_DashboardLayout_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_0__["default"])
  17692. /* harmony export */ });
  17693. /* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_DashboardLayout_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./DashboardLayout.vue?vue&type=script&setup=true&lang=js */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/layouts/DashboardLayout.vue?vue&type=script&setup=true&lang=js");
  17694. /***/ }),
  17695. /***/ "./resources/js/pages/member/Index.vue?vue&type=script&setup=true&lang=js":
  17696. /*!********************************************************************************!*\
  17697. !*** ./resources/js/pages/member/Index.vue?vue&type=script&setup=true&lang=js ***!
  17698. \********************************************************************************/
  17699. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17700. "use strict";
  17701. __webpack_require__.r(__webpack_exports__);
  17702. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17703. /* harmony export */ "default": () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_Index_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_0__["default"])
  17704. /* harmony export */ });
  17705. /* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_Index_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./Index.vue?vue&type=script&setup=true&lang=js */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/pages/member/Index.vue?vue&type=script&setup=true&lang=js");
  17706. /***/ }),
  17707. /***/ "./resources/js/components/AppButtonLink.vue?vue&type=template&id=c3621f1c":
  17708. /*!*********************************************************************************!*\
  17709. !*** ./resources/js/components/AppButtonLink.vue?vue&type=template&id=c3621f1c ***!
  17710. \*********************************************************************************/
  17711. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17712. "use strict";
  17713. __webpack_require__.r(__webpack_exports__);
  17714. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17715. /* harmony export */ "render": () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppButtonLink_vue_vue_type_template_id_c3621f1c__WEBPACK_IMPORTED_MODULE_0__.render)
  17716. /* harmony export */ });
  17717. /* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppButtonLink_vue_vue_type_template_id_c3621f1c__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./AppButtonLink.vue?vue&type=template&id=c3621f1c */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppButtonLink.vue?vue&type=template&id=c3621f1c");
  17718. /***/ }),
  17719. /***/ "./resources/js/components/AppFooter.vue?vue&type=template&id=4ab6097e&scoped=true":
  17720. /*!*****************************************************************************************!*\
  17721. !*** ./resources/js/components/AppFooter.vue?vue&type=template&id=4ab6097e&scoped=true ***!
  17722. \*****************************************************************************************/
  17723. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17724. "use strict";
  17725. __webpack_require__.r(__webpack_exports__);
  17726. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17727. /* harmony export */ "render": () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppFooter_vue_vue_type_template_id_4ab6097e_scoped_true__WEBPACK_IMPORTED_MODULE_0__.render)
  17728. /* harmony export */ });
  17729. /* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppFooter_vue_vue_type_template_id_4ab6097e_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./AppFooter.vue?vue&type=template&id=4ab6097e&scoped=true */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppFooter.vue?vue&type=template&id=4ab6097e&scoped=true");
  17730. /***/ }),
  17731. /***/ "./resources/js/components/AppMessage.vue?vue&type=template&id=07159051":
  17732. /*!******************************************************************************!*\
  17733. !*** ./resources/js/components/AppMessage.vue?vue&type=template&id=07159051 ***!
  17734. \******************************************************************************/
  17735. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17736. "use strict";
  17737. __webpack_require__.r(__webpack_exports__);
  17738. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17739. /* harmony export */ "render": () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppMessage_vue_vue_type_template_id_07159051__WEBPACK_IMPORTED_MODULE_0__.render)
  17740. /* harmony export */ });
  17741. /* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppMessage_vue_vue_type_template_id_07159051__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./AppMessage.vue?vue&type=template&id=07159051 */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppMessage.vue?vue&type=template&id=07159051");
  17742. /***/ }),
  17743. /***/ "./resources/js/components/AppPagination.vue?vue&type=template&id=4da56ec0":
  17744. /*!*********************************************************************************!*\
  17745. !*** ./resources/js/components/AppPagination.vue?vue&type=template&id=4da56ec0 ***!
  17746. \*********************************************************************************/
  17747. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17748. "use strict";
  17749. __webpack_require__.r(__webpack_exports__);
  17750. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17751. /* harmony export */ "render": () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppPagination_vue_vue_type_template_id_4da56ec0__WEBPACK_IMPORTED_MODULE_0__.render)
  17752. /* harmony export */ });
  17753. /* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppPagination_vue_vue_type_template_id_4da56ec0__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./AppPagination.vue?vue&type=template&id=4da56ec0 */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppPagination.vue?vue&type=template&id=4da56ec0");
  17754. /***/ }),
  17755. /***/ "./resources/js/components/AppSidebar.vue?vue&type=template&id=22a4e926&scoped=true":
  17756. /*!******************************************************************************************!*\
  17757. !*** ./resources/js/components/AppSidebar.vue?vue&type=template&id=22a4e926&scoped=true ***!
  17758. \******************************************************************************************/
  17759. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17760. "use strict";
  17761. __webpack_require__.r(__webpack_exports__);
  17762. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17763. /* harmony export */ "render": () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppSidebar_vue_vue_type_template_id_22a4e926_scoped_true__WEBPACK_IMPORTED_MODULE_0__.render)
  17764. /* harmony export */ });
  17765. /* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppSidebar_vue_vue_type_template_id_22a4e926_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./AppSidebar.vue?vue&type=template&id=22a4e926&scoped=true */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppSidebar.vue?vue&type=template&id=22a4e926&scoped=true");
  17766. /***/ }),
  17767. /***/ "./resources/js/components/AppSubSidebar.vue?vue&type=template&id=0addd9bc&scoped=true":
  17768. /*!*********************************************************************************************!*\
  17769. !*** ./resources/js/components/AppSubSidebar.vue?vue&type=template&id=0addd9bc&scoped=true ***!
  17770. \*********************************************************************************************/
  17771. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17772. "use strict";
  17773. __webpack_require__.r(__webpack_exports__);
  17774. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17775. /* harmony export */ "render": () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppSubSidebar_vue_vue_type_template_id_0addd9bc_scoped_true__WEBPACK_IMPORTED_MODULE_0__.render)
  17776. /* harmony export */ });
  17777. /* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppSubSidebar_vue_vue_type_template_id_0addd9bc_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./AppSubSidebar.vue?vue&type=template&id=0addd9bc&scoped=true */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppSubSidebar.vue?vue&type=template&id=0addd9bc&scoped=true");
  17778. /***/ }),
  17779. /***/ "./resources/js/components/AppTopBar.vue?vue&type=template&id=42bf62a4&scoped=true":
  17780. /*!*****************************************************************************************!*\
  17781. !*** ./resources/js/components/AppTopBar.vue?vue&type=template&id=42bf62a4&scoped=true ***!
  17782. \*****************************************************************************************/
  17783. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17784. "use strict";
  17785. __webpack_require__.r(__webpack_exports__);
  17786. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17787. /* harmony export */ "render": () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppTopBar_vue_vue_type_template_id_42bf62a4_scoped_true__WEBPACK_IMPORTED_MODULE_0__.render)
  17788. /* harmony export */ });
  17789. /* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppTopBar_vue_vue_type_template_id_42bf62a4_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./AppTopBar.vue?vue&type=template&id=42bf62a4&scoped=true */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppTopBar.vue?vue&type=template&id=42bf62a4&scoped=true");
  17790. /***/ }),
  17791. /***/ "./resources/js/layouts/DashboardLayout.vue?vue&type=template&id=549bf5ac&scoped=true":
  17792. /*!********************************************************************************************!*\
  17793. !*** ./resources/js/layouts/DashboardLayout.vue?vue&type=template&id=549bf5ac&scoped=true ***!
  17794. \********************************************************************************************/
  17795. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17796. "use strict";
  17797. __webpack_require__.r(__webpack_exports__);
  17798. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17799. /* harmony export */ "render": () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_DashboardLayout_vue_vue_type_template_id_549bf5ac_scoped_true__WEBPACK_IMPORTED_MODULE_0__.render)
  17800. /* harmony export */ });
  17801. /* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_DashboardLayout_vue_vue_type_template_id_549bf5ac_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./DashboardLayout.vue?vue&type=template&id=549bf5ac&scoped=true */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/layouts/DashboardLayout.vue?vue&type=template&id=549bf5ac&scoped=true");
  17802. /***/ }),
  17803. /***/ "./resources/js/pages/member/Index.vue?vue&type=template&id=7b0e4c66":
  17804. /*!***************************************************************************!*\
  17805. !*** ./resources/js/pages/member/Index.vue?vue&type=template&id=7b0e4c66 ***!
  17806. \***************************************************************************/
  17807. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17808. "use strict";
  17809. __webpack_require__.r(__webpack_exports__);
  17810. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17811. /* harmony export */ "render": () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_Index_vue_vue_type_template_id_7b0e4c66__WEBPACK_IMPORTED_MODULE_0__.render)
  17812. /* harmony export */ });
  17813. /* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_Index_vue_vue_type_template_id_7b0e4c66__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./Index.vue?vue&type=template&id=7b0e4c66 */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/pages/member/Index.vue?vue&type=template&id=7b0e4c66");
  17814. /***/ }),
  17815. /***/ "./resources/js/components/AppFooter.vue?vue&type=style&index=0&id=4ab6097e&lang=scss&scoped=true":
  17816. /*!********************************************************************************************************!*\
  17817. !*** ./resources/js/components/AppFooter.vue?vue&type=style&index=0&id=4ab6097e&lang=scss&scoped=true ***!
  17818. \********************************************************************************************************/
  17819. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17820. "use strict";
  17821. __webpack_require__.r(__webpack_exports__);
  17822. /* harmony import */ var _node_modules_style_loader_dist_cjs_js_node_modules_css_loader_dist_cjs_js_clonedRuleSet_11_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_11_use_2_node_modules_sass_loader_dist_cjs_js_clonedRuleSet_11_use_3_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppFooter_vue_vue_type_style_index_0_id_4ab6097e_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/style-loader/dist/cjs.js!../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!../../../node_modules/vue-loader/dist/stylePostLoader.js!../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!../../../node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./AppFooter.vue?vue&type=style&index=0&id=4ab6097e&lang=scss&scoped=true */ "./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppFooter.vue?vue&type=style&index=0&id=4ab6097e&lang=scss&scoped=true");
  17823. /***/ }),
  17824. /***/ "./resources/js/components/AppSidebar.vue?vue&type=style&index=0&id=22a4e926&lang=scss&scoped=true":
  17825. /*!*********************************************************************************************************!*\
  17826. !*** ./resources/js/components/AppSidebar.vue?vue&type=style&index=0&id=22a4e926&lang=scss&scoped=true ***!
  17827. \*********************************************************************************************************/
  17828. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17829. "use strict";
  17830. __webpack_require__.r(__webpack_exports__);
  17831. /* harmony import */ var _node_modules_style_loader_dist_cjs_js_node_modules_css_loader_dist_cjs_js_clonedRuleSet_11_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_11_use_2_node_modules_sass_loader_dist_cjs_js_clonedRuleSet_11_use_3_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppSidebar_vue_vue_type_style_index_0_id_22a4e926_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/style-loader/dist/cjs.js!../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!../../../node_modules/vue-loader/dist/stylePostLoader.js!../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!../../../node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./AppSidebar.vue?vue&type=style&index=0&id=22a4e926&lang=scss&scoped=true */ "./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppSidebar.vue?vue&type=style&index=0&id=22a4e926&lang=scss&scoped=true");
  17832. /***/ }),
  17833. /***/ "./resources/js/components/AppSubSidebar.vue?vue&type=style&index=0&id=0addd9bc&lang=scss&scoped=true":
  17834. /*!************************************************************************************************************!*\
  17835. !*** ./resources/js/components/AppSubSidebar.vue?vue&type=style&index=0&id=0addd9bc&lang=scss&scoped=true ***!
  17836. \************************************************************************************************************/
  17837. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17838. "use strict";
  17839. __webpack_require__.r(__webpack_exports__);
  17840. /* harmony import */ var _node_modules_style_loader_dist_cjs_js_node_modules_css_loader_dist_cjs_js_clonedRuleSet_11_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_11_use_2_node_modules_sass_loader_dist_cjs_js_clonedRuleSet_11_use_3_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppSubSidebar_vue_vue_type_style_index_0_id_0addd9bc_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/style-loader/dist/cjs.js!../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!../../../node_modules/vue-loader/dist/stylePostLoader.js!../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!../../../node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./AppSubSidebar.vue?vue&type=style&index=0&id=0addd9bc&lang=scss&scoped=true */ "./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppSubSidebar.vue?vue&type=style&index=0&id=0addd9bc&lang=scss&scoped=true");
  17841. /***/ }),
  17842. /***/ "./resources/js/components/AppTopBar.vue?vue&type=style&index=0&id=42bf62a4&lang=scss&scoped=true":
  17843. /*!********************************************************************************************************!*\
  17844. !*** ./resources/js/components/AppTopBar.vue?vue&type=style&index=0&id=42bf62a4&lang=scss&scoped=true ***!
  17845. \********************************************************************************************************/
  17846. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17847. "use strict";
  17848. __webpack_require__.r(__webpack_exports__);
  17849. /* harmony import */ var _node_modules_style_loader_dist_cjs_js_node_modules_css_loader_dist_cjs_js_clonedRuleSet_11_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_11_use_2_node_modules_sass_loader_dist_cjs_js_clonedRuleSet_11_use_3_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppTopBar_vue_vue_type_style_index_0_id_42bf62a4_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/style-loader/dist/cjs.js!../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!../../../node_modules/vue-loader/dist/stylePostLoader.js!../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!../../../node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./AppTopBar.vue?vue&type=style&index=0&id=42bf62a4&lang=scss&scoped=true */ "./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppTopBar.vue?vue&type=style&index=0&id=42bf62a4&lang=scss&scoped=true");
  17850. /***/ }),
  17851. /***/ "./resources/js/layouts/DashboardLayout.vue?vue&type=style&index=0&id=549bf5ac&lang=scss&scoped=true":
  17852. /*!***********************************************************************************************************!*\
  17853. !*** ./resources/js/layouts/DashboardLayout.vue?vue&type=style&index=0&id=549bf5ac&lang=scss&scoped=true ***!
  17854. \***********************************************************************************************************/
  17855. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17856. "use strict";
  17857. __webpack_require__.r(__webpack_exports__);
  17858. /* harmony import */ var _node_modules_style_loader_dist_cjs_js_node_modules_css_loader_dist_cjs_js_clonedRuleSet_11_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_11_use_2_node_modules_sass_loader_dist_cjs_js_clonedRuleSet_11_use_3_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_DashboardLayout_vue_vue_type_style_index_0_id_549bf5ac_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/style-loader/dist/cjs.js!../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!../../../node_modules/vue-loader/dist/stylePostLoader.js!../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!../../../node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./DashboardLayout.vue?vue&type=style&index=0&id=549bf5ac&lang=scss&scoped=true */ "./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/layouts/DashboardLayout.vue?vue&type=style&index=0&id=549bf5ac&lang=scss&scoped=true");
  17859. /***/ })
  17860. }]);