resources_js_pages_mutation_Report_vue.js 706KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470
  1. (self["webpackChunk"] = self["webpackChunk"] || []).push([["resources_js_pages_mutation_Report_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/mutation/Report.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/mutation/Report.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/mutation/tableHeader.js");
  274. /* harmony import */ var _components_useDateRangeFilter__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/components/useDateRangeFilter */ "./resources/js/components/useDateRangeFilter.js");
  275. /* harmony import */ var _layouts_DashboardLayout_vue__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/layouts/DashboardLayout.vue */ "./resources/js/layouts/DashboardLayout.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 _components_AppButtonLink_vue__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @/components/AppButtonLink.vue */ "./resources/js/components/AppButtonLink.vue");
  278. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
  279. props: {
  280. mutations: {
  281. type: Object,
  282. "default": {
  283. details: {
  284. data: [],
  285. links: [],
  286. total: 0
  287. }
  288. }
  289. },
  290. initialDateRage: Array
  291. },
  292. setup: function setup(__props, _ref) {
  293. var expose = _ref.expose;
  294. expose();
  295. var props = __props;
  296. var _useDateRangeFilter = (0,_components_useDateRangeFilter__WEBPACK_IMPORTED_MODULE_5__.useDateRangeFilter)(props.initialDateRage),
  297. dates = _useDateRangeFilter.dates,
  298. startDate = _useDateRangeFilter.startDate,
  299. endDate = _useDateRangeFilter.endDate;
  300. (0,vue__WEBPACK_IMPORTED_MODULE_0__.watch)(dates, function () {
  301. _inertiajs_inertia__WEBPACK_IMPORTED_MODULE_1__.Inertia.reload({
  302. data: (0,lodash__WEBPACK_IMPORTED_MODULE_3__.pickBy)({
  303. startDate: startDate.value,
  304. endDate: endDate.value
  305. }),
  306. only: ['mutations']
  307. });
  308. var params = window.location.search;
  309. exportExcelLink.value = "/reports/mutations/export/excel".concat(params);
  310. });
  311. var filterReset = function filterReset() {
  312. _inertiajs_inertia__WEBPACK_IMPORTED_MODULE_1__.Inertia.get('/reports/mutations');
  313. };
  314. var linkReference = function linkReference(data) {
  315. if (data.topUpId) {
  316. return route('top-ups.show', data.topUpId);
  317. } else if (data.expenseId) {
  318. return route('expenses.show', data.expenseId);
  319. } else {
  320. return route('out-transactions.show', data.outTransactionId);
  321. }
  322. };
  323. var exportExcelLink = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)('/reports/mutations/export/excel');
  324. var __returned__ = {
  325. props: props,
  326. dates: dates,
  327. startDate: startDate,
  328. endDate: endDate,
  329. filterReset: filterReset,
  330. linkReference: linkReference,
  331. exportExcelLink: exportExcelLink,
  332. watch: vue__WEBPACK_IMPORTED_MODULE_0__.watch,
  333. ref: vue__WEBPACK_IMPORTED_MODULE_0__.ref,
  334. Inertia: _inertiajs_inertia__WEBPACK_IMPORTED_MODULE_1__.Inertia,
  335. Head: _inertiajs_inertia_vue3__WEBPACK_IMPORTED_MODULE_2__.Head,
  336. pickBy: lodash__WEBPACK_IMPORTED_MODULE_3__.pickBy,
  337. tableHeader: _tableHeader__WEBPACK_IMPORTED_MODULE_4__["default"],
  338. useDateRangeFilter: _components_useDateRangeFilter__WEBPACK_IMPORTED_MODULE_5__.useDateRangeFilter,
  339. DashboardLayout: _layouts_DashboardLayout_vue__WEBPACK_IMPORTED_MODULE_6__["default"],
  340. AppPagination: _components_AppPagination_vue__WEBPACK_IMPORTED_MODULE_7__["default"],
  341. AppButtonLink: _components_AppButtonLink_vue__WEBPACK_IMPORTED_MODULE_8__["default"]
  342. };
  343. Object.defineProperty(__returned__, '__isScriptSetup', {
  344. enumerable: false,
  345. value: true
  346. });
  347. return __returned__;
  348. }
  349. });
  350. /***/ }),
  351. /***/ "./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":
  352. /*!***********************************************************************************************************************************************************************************************************************************************************************************!*\
  353. !*** ./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 ***!
  354. \***********************************************************************************************************************************************************************************************************************************************************************************/
  355. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  356. "use strict";
  357. __webpack_require__.r(__webpack_exports__);
  358. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  359. /* harmony export */ "render": () => (/* binding */ render)
  360. /* harmony export */ });
  361. /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
  362. var _hoisted_1 = {
  363. key: 1,
  364. "class": "p-button-label"
  365. };
  366. var _hoisted_2 = {
  367. key: 1,
  368. "class": "p-button-label"
  369. };
  370. function render(_ctx, _cache, $props, $setup, $data, $options) {
  371. return $props.inertiaLink ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)($setup["Link"], {
  372. key: 0,
  373. "class": "p-button p-component",
  374. as: "button",
  375. type: "button"
  376. }, {
  377. "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
  378. return [$props.icon ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", {
  379. key: 0,
  380. "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(["p-button-icon p-button-icon-left", $props.icon])
  381. }, null, 2
  382. /* CLASS */
  383. )) : (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
  384. /* TEXT */
  385. )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)];
  386. }),
  387. _: 1
  388. /* STABLE */
  389. })) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("a", {
  390. key: 1,
  391. "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)([$props.classButton, "p-button p-component"])
  392. }, [$props.icon ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", {
  393. key: 0,
  394. "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(["p-button-icon p-button-icon-left", $props.icon])
  395. }, null, 2
  396. /* CLASS */
  397. )) : (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
  398. /* TEXT */
  399. )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)], 2
  400. /* CLASS */
  401. ));
  402. }
  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/AppFooter.vue?vue&type=template&id=4ab6097e&scoped=true":
  405. /*!*******************************************************************************************************************************************************************************************************************************************************************************************!*\
  406. !*** ./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 ***!
  407. \*******************************************************************************************************************************************************************************************************************************************************************************************/
  408. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  409. "use strict";
  410. __webpack_require__.r(__webpack_exports__);
  411. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  412. /* harmony export */ "render": () => (/* binding */ render)
  413. /* harmony export */ });
  414. /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
  415. var _withScopeId = function _withScopeId(n) {
  416. return (0,vue__WEBPACK_IMPORTED_MODULE_0__.pushScopeId)("data-v-4ab6097e"), n = n(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.popScopeId)(), n;
  417. };
  418. var _hoisted_1 = {
  419. "class": "layout-footer"
  420. };
  421. var _hoisted_2 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)(" Developed by ");
  422. var _hoisted_3 = /*#__PURE__*/_withScopeId(function () {
  423. return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("a", {
  424. href: "https://dijitalcode.com",
  425. target: "_blank",
  426. "class": "font-medium ml-2"
  427. }, "DijitalCODE", -1
  428. /* HOISTED */
  429. );
  430. });
  431. var _hoisted_4 = [_hoisted_2, _hoisted_3];
  432. function render(_ctx, _cache) {
  433. return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", _hoisted_1, _hoisted_4);
  434. }
  435. /***/ }),
  436. /***/ "./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":
  437. /*!********************************************************************************************************************************************************************************************************************************************************************************!*\
  438. !*** ./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 ***!
  439. \********************************************************************************************************************************************************************************************************************************************************************************/
  440. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  441. "use strict";
  442. __webpack_require__.r(__webpack_exports__);
  443. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  444. /* harmony export */ "render": () => (/* binding */ render)
  445. /* harmony export */ });
  446. /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
  447. var _hoisted_1 = {
  448. "class": "grid"
  449. };
  450. var _hoisted_2 = {
  451. "class": "col-12"
  452. };
  453. var _hoisted_3 = {
  454. key: 0
  455. };
  456. var _hoisted_4 = {
  457. key: 1
  458. };
  459. function render(_ctx, _cache, $props, $setup, $data, $options) {
  460. var _component_Message = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("Message");
  461. return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", _hoisted_1, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_2, [_ctx.$page.props.flash.success ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(_component_Message, {
  462. key: 0,
  463. severity: "success",
  464. onClose: $setup.onClose
  465. }, {
  466. "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
  467. return [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)((0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(_ctx.$page.props.flash.success), 1
  468. /* TEXT */
  469. )];
  470. }),
  471. _: 1
  472. /* STABLE */
  473. })) : (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, {
  474. key: 1,
  475. severity: "error",
  476. onClose: $setup.onClose
  477. }, {
  478. "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
  479. return [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)((0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(_ctx.$page.props.flash.error), 1
  480. /* TEXT */
  481. )];
  482. }),
  483. _: 1
  484. /* STABLE */
  485. })) : (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, {
  486. key: 2,
  487. severity: "error",
  488. onClose: $setup.onClose
  489. }, {
  490. "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
  491. 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_3, "Ditemukan satu error pada form")) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", _hoisted_4, "Ditemukan " + (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(Object.keys(_ctx.$page.props.errors).length) + " error pada form", 1
  492. /* TEXT */
  493. ))];
  494. }),
  495. _: 1
  496. /* STABLE */
  497. })) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)])]);
  498. }
  499. /***/ }),
  500. /***/ "./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":
  501. /*!***********************************************************************************************************************************************************************************************************************************************************************************!*\
  502. !*** ./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 ***!
  503. \***********************************************************************************************************************************************************************************************************************************************************************************/
  504. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  505. "use strict";
  506. __webpack_require__.r(__webpack_exports__);
  507. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  508. /* harmony export */ "render": () => (/* binding */ render)
  509. /* harmony export */ });
  510. /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
  511. var _hoisted_1 = {
  512. key: 0,
  513. "class": "p-paginator p-component flex justify-content-start"
  514. };
  515. var _hoisted_2 = {
  516. "class": "p-paginator-pages"
  517. };
  518. var _hoisted_3 = ["innerHTML"];
  519. function render(_ctx, _cache, $props, $setup, $data, $options) {
  520. 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) {
  521. 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", {
  522. key: "link-".concat(key),
  523. "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(["p-paginator-page p-paginator-element p-link", {
  524. 'p-disabled': link
  525. }]),
  526. innerHTML: link.label
  527. }, null, 10
  528. /* CLASS, PROPS */
  529. , _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"], {
  530. key: "link-".concat(key),
  531. href: link.url,
  532. "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)([{
  533. 'p-highlight': link.active
  534. }, "p-paginator-page p-paginator-element p-link"]),
  535. innerHTML: link.label
  536. }, null, 8
  537. /* PROPS */
  538. , ["href", "class", "innerHTML"])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)], 64
  539. /* STABLE_FRAGMENT */
  540. );
  541. }), 256
  542. /* UNKEYED_FRAGMENT */
  543. ))])])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true);
  544. }
  545. /***/ }),
  546. /***/ "./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":
  547. /*!********************************************************************************************************************************************************************************************************************************************************************************************!*\
  548. !*** ./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 ***!
  549. \********************************************************************************************************************************************************************************************************************************************************************************************/
  550. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  551. "use strict";
  552. __webpack_require__.r(__webpack_exports__);
  553. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  554. /* harmony export */ "render": () => (/* binding */ render)
  555. /* harmony export */ });
  556. /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
  557. function render(_ctx, _cache, $props, $setup, $data, $options) {
  558. 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"], {
  559. "class": "layout-menu",
  560. items: $props.menu,
  561. root: true
  562. }, null, 8
  563. /* PROPS */
  564. , ["items"])]);
  565. }
  566. /***/ }),
  567. /***/ "./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":
  568. /*!***********************************************************************************************************************************************************************************************************************************************************************************************!*\
  569. !*** ./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 ***!
  570. \***********************************************************************************************************************************************************************************************************************************************************************************************/
  571. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  572. "use strict";
  573. __webpack_require__.r(__webpack_exports__);
  574. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  575. /* harmony export */ "render": () => (/* binding */ render)
  576. /* harmony export */ });
  577. /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
  578. var _withScopeId = function _withScopeId(n) {
  579. return (0,vue__WEBPACK_IMPORTED_MODULE_0__.pushScopeId)("data-v-0addd9bc"), n = n(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.popScopeId)(), n;
  580. };
  581. var _hoisted_1 = {
  582. key: 0
  583. };
  584. var _hoisted_2 = ["aria-label"];
  585. var _hoisted_3 = ["aria-label"];
  586. function render(_ctx, _cache, $props, $setup, $data, $options) {
  587. var _component_AppSubSidebar = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("AppSubSidebar", true);
  588. 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) {
  589. 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", {
  590. key: i,
  591. "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)([{
  592. 'layout-menuitem-category': $props.root
  593. }]),
  594. role: "none"
  595. }, [$props.root ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, {
  596. key: 0
  597. }, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", {
  598. "class": "layout-menuitem-root-text",
  599. "aria-label": item.label
  600. }, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(item.label), 9
  601. /* TEXT, PROPS */
  602. , _hoisted_2), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_AppSubSidebar, {
  603. items: item.items
  604. }, null, 8
  605. /* PROPS */
  606. , ["items"])], 64
  607. /* STABLE_FRAGMENT */
  608. )) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, {
  609. key: 1
  610. }, [item.to ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)($setup["Link"], {
  611. key: 0,
  612. role: "menuitem",
  613. href: item.to,
  614. "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)([{
  615. 'router-link-active': _ctx.$page.component.startsWith(item.component) || _ctx.$page.url.startsWith(item.to),
  616. 'router-link-exact-active': _ctx.$page.component.startsWith(item.component) || _ctx.$page.url.startsWith(item.to)
  617. }]),
  618. "aria-label": item.label
  619. }, {
  620. "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
  621. return [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("i", {
  622. "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(item.icon)
  623. }, null, 2
  624. /* CLASS */
  625. ), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(item.label), 1
  626. /* TEXT */
  627. )];
  628. }),
  629. _: 2
  630. /* DYNAMIC */
  631. }, 1032
  632. /* PROPS, DYNAMIC_SLOTS */
  633. , ["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", {
  634. key: 1,
  635. href: "#",
  636. role: "menuitem",
  637. "aria-label": item.label
  638. }, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("i", {
  639. "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(item.icon)
  640. }, null, 2
  641. /* CLASS */
  642. ), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(item.label), 1
  643. /* TEXT */
  644. )], 8
  645. /* PROPS */
  646. , _hoisted_3)) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_AppSubSidebar, {
  647. items: item.items
  648. }, null, 8
  649. /* PROPS */
  650. , ["items"])], 64
  651. /* STABLE_FRAGMENT */
  652. ))], 2
  653. /* CLASS */
  654. )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)], 64
  655. /* STABLE_FRAGMENT */
  656. );
  657. }), 256
  658. /* UNKEYED_FRAGMENT */
  659. ))])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true);
  660. }
  661. /***/ }),
  662. /***/ "./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":
  663. /*!*******************************************************************************************************************************************************************************************************************************************************************************************!*\
  664. !*** ./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 ***!
  665. \*******************************************************************************************************************************************************************************************************************************************************************************************/
  666. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  667. "use strict";
  668. __webpack_require__.r(__webpack_exports__);
  669. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  670. /* harmony export */ "render": () => (/* binding */ render)
  671. /* harmony export */ });
  672. /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
  673. var _withScopeId = function _withScopeId(n) {
  674. return (0,vue__WEBPACK_IMPORTED_MODULE_0__.pushScopeId)("data-v-42bf62a4"), n = n(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.popScopeId)(), n;
  675. };
  676. var _hoisted_1 = {
  677. "class": "layout-topbar"
  678. };
  679. var _hoisted_2 = /*#__PURE__*/_withScopeId(function () {
  680. return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("img", {
  681. alt: "Logo",
  682. src: "/images/logo.svg",
  683. "class": "md:mr-3"
  684. }, null, -1
  685. /* HOISTED */
  686. );
  687. });
  688. var _hoisted_3 = /*#__PURE__*/_withScopeId(function () {
  689. return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", null, "Parkirin", -1
  690. /* HOISTED */
  691. );
  692. });
  693. var _hoisted_4 = /*#__PURE__*/_withScopeId(function () {
  694. return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("i", {
  695. "class": "pi pi-bars"
  696. }, null, -1
  697. /* HOISTED */
  698. );
  699. });
  700. var _hoisted_5 = [_hoisted_4];
  701. var _hoisted_6 = {
  702. "class": "p-link layout-topbar-menu-button layout-topbar-button"
  703. };
  704. var _hoisted_7 = /*#__PURE__*/_withScopeId(function () {
  705. return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("i", {
  706. "class": "pi pi-ellipsis-v"
  707. }, null, -1
  708. /* HOISTED */
  709. );
  710. });
  711. var _hoisted_8 = [_hoisted_7];
  712. var _hoisted_9 = {
  713. "class": "layout-topbar-menu hidden lg:flex origin-top"
  714. };
  715. var _hoisted_10 = {
  716. "class": "align-self-center"
  717. };
  718. var _hoisted_11 = {
  719. "class": "hidden lg:inline"
  720. };
  721. var _hoisted_12 = /*#__PURE__*/_withScopeId(function () {
  722. return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("i", {
  723. "class": "pi pi-user"
  724. }, null, -1
  725. /* HOISTED */
  726. );
  727. });
  728. var _hoisted_13 = /*#__PURE__*/_withScopeId(function () {
  729. return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", null, "Profil Saya", -1
  730. /* HOISTED */
  731. );
  732. });
  733. var _hoisted_14 = /*#__PURE__*/_withScopeId(function () {
  734. return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("i", {
  735. "class": "pi pi-sign-out"
  736. }, null, -1
  737. /* HOISTED */
  738. );
  739. });
  740. var _hoisted_15 = /*#__PURE__*/_withScopeId(function () {
  741. return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", null, "Sign Out", -1
  742. /* HOISTED */
  743. );
  744. });
  745. function render(_ctx, _cache, $props, $setup, $data, $options) {
  746. var _directive_styleclass = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveDirective)("styleclass");
  747. 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"], {
  748. href: "/",
  749. "class": "layout-topbar-logo"
  750. }, {
  751. "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
  752. return [_hoisted_2, _hoisted_3];
  753. }),
  754. _: 1
  755. /* STABLE */
  756. }), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("button", {
  757. "class": "p-link layout-menu-button layout-topbar-button",
  758. onClick: _cache[0] || (_cache[0] = function ($event) {
  759. return _ctx.$emit('menu-toggle', $event);
  760. })
  761. }, _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, {
  762. selector: '@next',
  763. enterClass: 'hidden',
  764. enterActiveClass: 'scalein',
  765. leaveToClass: 'hidden',
  766. leaveActiveClass: 'fadeout',
  767. hideOnOutsideClick: true
  768. }]]), (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
  769. /* TEXT */
  770. )]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("li", null, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)($setup["Link"], {
  771. href: _ctx.route('users.show', _ctx.$page.props.auth.user.id),
  772. "class": "p-link layout-topbar-button"
  773. }, {
  774. "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
  775. return [_hoisted_12, _hoisted_13];
  776. }),
  777. _: 1
  778. /* STABLE */
  779. }, 8
  780. /* PROPS */
  781. , ["href"])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("li", null, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)($setup["Link"], {
  782. href: _ctx.route('logout'),
  783. as: "button",
  784. method: "post",
  785. "class": "p-link layout-topbar-button"
  786. }, {
  787. "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
  788. return [_hoisted_14, _hoisted_15];
  789. }),
  790. _: 1
  791. /* STABLE */
  792. }, 8
  793. /* PROPS */
  794. , ["href"])])])]);
  795. }
  796. /***/ }),
  797. /***/ "./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":
  798. /*!**********************************************************************************************************************************************************************************************************************************************************************************************!*\
  799. !*** ./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 ***!
  800. \**********************************************************************************************************************************************************************************************************************************************************************************************/
  801. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  802. "use strict";
  803. __webpack_require__.r(__webpack_exports__);
  804. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  805. /* harmony export */ "render": () => (/* binding */ render)
  806. /* harmony export */ });
  807. /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
  808. var _withScopeId = function _withScopeId(n) {
  809. return (0,vue__WEBPACK_IMPORTED_MODULE_0__.pushScopeId)("data-v-549bf5ac"), n = n(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.popScopeId)(), n;
  810. };
  811. var _hoisted_1 = {
  812. "class": "layout-sidebar"
  813. };
  814. var _hoisted_2 = {
  815. "class": "layout-main-container"
  816. };
  817. var _hoisted_3 = {
  818. "class": "layout-main"
  819. };
  820. var _hoisted_4 = {
  821. key: 0,
  822. "class": "layout-mask p-component-overlay"
  823. };
  824. function render(_ctx, _cache, $props, $setup, $data, $options) {
  825. return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", {
  826. "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)($setup.containerClass),
  827. onClick: $setup.onWrapperClick
  828. }, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)($setup["AppTopBar"], {
  829. onMenuToggle: $setup.onMenuToggle
  830. }), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_1, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)($setup["AppSidebar"], {
  831. menu: $setup.menu[_ctx.$page.props.auth.user.role_id]
  832. }, null, 8
  833. /* PROPS */
  834. , ["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, {
  835. name: "layout-mask"
  836. }, {
  837. "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
  838. 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)];
  839. }),
  840. _: 1
  841. /* STABLE */
  842. })], 2
  843. /* CLASS */
  844. );
  845. }
  846. /***/ }),
  847. /***/ "./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/mutation/Report.vue?vue&type=template&id=289c9421":
  848. /*!********************************************************************************************************************************************************************************************************************************************************************************!*\
  849. !*** ./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/mutation/Report.vue?vue&type=template&id=289c9421 ***!
  850. \********************************************************************************************************************************************************************************************************************************************************************************/
  851. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  852. "use strict";
  853. __webpack_require__.r(__webpack_exports__);
  854. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  855. /* harmony export */ "render": () => (/* binding */ render)
  856. /* harmony export */ });
  857. /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
  858. var _hoisted_1 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("h1", null, "Laporan Mutasi", -1
  859. /* HOISTED */
  860. );
  861. var _hoisted_2 = {
  862. "class": "grid"
  863. };
  864. var _hoisted_3 = {
  865. "class": "col-12 md:col-8"
  866. };
  867. var _hoisted_4 = {
  868. "class": "grid"
  869. };
  870. var _hoisted_5 = {
  871. "class": "col-12 md:col-4"
  872. };
  873. var _hoisted_6 = {
  874. "class": "col-auto mt-2 ml-2"
  875. };
  876. var _hoisted_7 = {
  877. "class": "col-12 md:col-4 flex flex-column md:flex-row justify-content-end"
  878. };
  879. var _hoisted_8 = {
  880. key: 0,
  881. "class": "grid mt-5 ml-1"
  882. };
  883. var _hoisted_9 = {
  884. "class": "col-auto mr-7"
  885. };
  886. var _hoisted_10 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", {
  887. "class": "text-base"
  888. }, [/*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("i", {
  889. "class": "pi pi-wallet"
  890. }), /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)(" Pendapatan")], -1
  891. /* HOISTED */
  892. );
  893. var _hoisted_11 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("br", null, null, -1
  894. /* HOISTED */
  895. );
  896. var _hoisted_12 = {
  897. "class": "text-xl font-bold"
  898. };
  899. var _hoisted_13 = {
  900. "class": "col-auto mr-7"
  901. };
  902. var _hoisted_14 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", {
  903. "class": "text-base"
  904. }, [/*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("i", {
  905. "class": "pi pi-wallet"
  906. }), /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)(" Pengeluaran")], -1
  907. /* HOISTED */
  908. );
  909. var _hoisted_15 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("br", null, null, -1
  910. /* HOISTED */
  911. );
  912. var _hoisted_16 = {
  913. "class": "text-xl font-bold"
  914. };
  915. var _hoisted_17 = {
  916. "class": "col-auto"
  917. };
  918. var _hoisted_18 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", {
  919. "class": "text-base"
  920. }, [/*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("i", {
  921. "class": "pi pi-wallet"
  922. }), /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)(" Total ")], -1
  923. /* HOISTED */
  924. );
  925. var _hoisted_19 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("br", null, null, -1
  926. /* HOISTED */
  927. );
  928. var _hoisted_20 = {
  929. "class": "text-xl font-bold"
  930. };
  931. function render(_ctx, _cache, $props, $setup, $data, $options) {
  932. var _component_Calendar = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("Calendar");
  933. var _component_Button = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("Button");
  934. var _component_Column = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("Column");
  935. var _component_DataTable = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("DataTable");
  936. return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)($setup["DashboardLayout"], null, {
  937. "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
  938. return [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)($setup["Head"], {
  939. title: "Laporan Mutasi"
  940. }), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_DataTable, {
  941. "responsive-layout": "scroll",
  942. "column-resize-mode": "expand",
  943. value: $props.mutations.details.data,
  944. "row-hover": true,
  945. "striped-rows": true
  946. }, {
  947. header: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
  948. 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__.createElementVNode)("div", _hoisted_5, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Calendar, {
  949. "touch-u-i": "",
  950. "class": "w-full",
  951. modelValue: $setup.dates,
  952. "onUpdate:modelValue": _cache[0] || (_cache[0] = function ($event) {
  953. return $setup.dates = $event;
  954. }),
  955. "selection-mode": "range",
  956. placeholder: "filter waktu...",
  957. "date-format": "dd/mm/yy",
  958. "manual-input": false
  959. }, null, 8
  960. /* PROPS */
  961. , ["modelValue"])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_6, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Button, {
  962. label: "reset",
  963. "class": "p-button-link",
  964. onClick: $setup.filterReset
  965. })])])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_7, [$props.mutations.details.total ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)($setup["AppButtonLink"], {
  966. key: 0,
  967. label: "Export excel",
  968. "class-button": "p-button-outlined md:w-16rem",
  969. icon: "pi pi-file-excel",
  970. "inertia-link": false,
  971. href: $setup.exportExcelLink
  972. }, null, 8
  973. /* PROPS */
  974. , ["href"])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)])]), $props.mutations.totalAmount ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", _hoisted_8, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_9, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("h2", null, [_hoisted_10, _hoisted_11, (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", _hoisted_12, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.mutations.totalIncome), 1
  975. /* TEXT */
  976. )])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_13, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("h2", null, [_hoisted_14, _hoisted_15, (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", _hoisted_16, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.mutations.totalExpense), 1
  977. /* TEXT */
  978. )])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_17, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("h2", null, [_hoisted_18, _hoisted_19, (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", _hoisted_20, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.mutations.totalAmount), 1
  979. /* TEXT */
  980. )])])])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)];
  981. }),
  982. "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
  983. 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.tableHeader, function (value) {
  984. return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(_component_Column, {
  985. field: value.field,
  986. header: value.header,
  987. key: value.field
  988. }, null, 8
  989. /* PROPS */
  990. , ["field", "header"]);
  991. }), 128
  992. /* KEYED_FRAGMENT */
  993. )), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Column, null, {
  994. body: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function (_ref) {
  995. var data = _ref.data;
  996. return [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)($setup["AppButtonLink"], {
  997. icon: "pi pi-link",
  998. "class": "p-button-text p-button-icon-only p-button-rounded p-button-text",
  999. href: $setup.linkReference(data)
  1000. }, null, 8
  1001. /* PROPS */
  1002. , ["href"])];
  1003. }),
  1004. _: 1
  1005. /* STABLE */
  1006. })];
  1007. }),
  1008. _: 1
  1009. /* STABLE */
  1010. }, 8
  1011. /* PROPS */
  1012. , ["value"]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)($setup["AppPagination"], {
  1013. links: $props.mutations.details.links
  1014. }, null, 8
  1015. /* PROPS */
  1016. , ["links"])];
  1017. }),
  1018. _: 1
  1019. /* STABLE */
  1020. });
  1021. }
  1022. /***/ }),
  1023. /***/ "./resources/js/components/useDateRangeFilter.js":
  1024. /*!*******************************************************!*\
  1025. !*** ./resources/js/components/useDateRangeFilter.js ***!
  1026. \*******************************************************/
  1027. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  1028. "use strict";
  1029. __webpack_require__.r(__webpack_exports__);
  1030. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  1031. /* harmony export */ "useDateRangeFilter": () => (/* binding */ useDateRangeFilter)
  1032. /* harmony export */ });
  1033. /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
  1034. /* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! dayjs */ "./node_modules/dayjs/dayjs.min.js");
  1035. /* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(dayjs__WEBPACK_IMPORTED_MODULE_1__);
  1036. function useDateRangeFilter() {
  1037. var initialDateRage = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  1038. var dates = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(null);
  1039. var startDate = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(null);
  1040. var endDate = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(null);
  1041. (0,vue__WEBPACK_IMPORTED_MODULE_0__.onMounted)(function () {
  1042. if (initialDateRage[0] || initialDateRage[1]) {
  1043. if (initialDateRage[1]) {
  1044. dates.push([new Date(initialDateRage[0]), new Date(initialDateRage[1])]);
  1045. } else {
  1046. dates.push([new Date(props.initialDateRage[1]), null]);
  1047. }
  1048. }
  1049. });
  1050. (0,vue__WEBPACK_IMPORTED_MODULE_0__.watch)(dates, function () {
  1051. if (dates.value[1]) {
  1052. startDate.value = dayjs__WEBPACK_IMPORTED_MODULE_1___default()(dates.value[0]).format('YYYY-MM-DD');
  1053. endDate.value = dayjs__WEBPACK_IMPORTED_MODULE_1___default()(dates.value[1]).format('YYYY-MM-DD');
  1054. } else if (dates.value[0]) {
  1055. startDate.value = dayjs__WEBPACK_IMPORTED_MODULE_1___default()(dates.value[0]).format('YYYY-MM-DD');
  1056. endDate.value = null;
  1057. }
  1058. });
  1059. return {
  1060. dates: dates,
  1061. startDate: startDate,
  1062. endDate: endDate
  1063. };
  1064. }
  1065. /***/ }),
  1066. /***/ "./resources/js/pages/mutation/tableHeader.js":
  1067. /*!****************************************************!*\
  1068. !*** ./resources/js/pages/mutation/tableHeader.js ***!
  1069. \****************************************************/
  1070. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  1071. "use strict";
  1072. __webpack_require__.r(__webpack_exports__);
  1073. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  1074. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  1075. /* harmony export */ });
  1076. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ([{
  1077. field: 'createdAt',
  1078. header: 'Tanggal'
  1079. }, {
  1080. field: 'type',
  1081. header: 'Tipe'
  1082. }, {
  1083. field: 'amount',
  1084. header: 'Nilai'
  1085. }]);
  1086. /***/ }),
  1087. /***/ "./resources/js/utils/menu.js":
  1088. /*!************************************!*\
  1089. !*** ./resources/js/utils/menu.js ***!
  1090. \************************************/
  1091. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  1092. "use strict";
  1093. __webpack_require__.r(__webpack_exports__);
  1094. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  1095. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  1096. /* harmony export */ });
  1097. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
  1098. // Admin
  1099. 1: [{
  1100. label: 'Home',
  1101. items: [{
  1102. label: 'Dashboard',
  1103. icon: 'pi pi-home',
  1104. to: '/dashboards',
  1105. component: 'home/Index'
  1106. }]
  1107. }, {
  1108. label: 'Master',
  1109. items: [{
  1110. label: 'User',
  1111. icon: 'pi pi-user',
  1112. to: '/users',
  1113. component: 'user/Index'
  1114. }]
  1115. }],
  1116. // Supervisor
  1117. 2: [{
  1118. label: 'Home',
  1119. items: [{
  1120. label: 'Dashboard',
  1121. icon: 'pi pi-home',
  1122. to: '/dashboards',
  1123. component: 'home/Index'
  1124. }]
  1125. }, {
  1126. label: 'Menu',
  1127. items: [{
  1128. label: 'Pengeluaran',
  1129. icon: 'pi pi-wallet',
  1130. to: '/expenses',
  1131. component: 'expense/Index'
  1132. }, {
  1133. label: 'Laporan',
  1134. icon: 'pi pi-book',
  1135. items: [{
  1136. label: 'Mutasi',
  1137. icon: 'pi pi-circle',
  1138. to: '/reports/mutations',
  1139. component: 'mutation/Report'
  1140. }]
  1141. }]
  1142. }, {
  1143. label: 'Master',
  1144. items: [{
  1145. label: 'Jenis Kendaraan',
  1146. icon: 'pi pi-car',
  1147. to: '/type-vehicles',
  1148. component: 'typevehicle/Index'
  1149. }, {
  1150. label: 'Jenis Member',
  1151. icon: 'pi pi-id-card',
  1152. to: '/type-members',
  1153. component: 'typemember/Index'
  1154. }]
  1155. }, {
  1156. label: 'Pengaturan',
  1157. items: [{
  1158. label: 'Tarif Parkir',
  1159. icon: 'pi pi-car',
  1160. to: '/parking-fees/create',
  1161. component: 'parkingfee/Create'
  1162. }]
  1163. }],
  1164. // Operator
  1165. 3: [{
  1166. label: 'Home',
  1167. items: [{
  1168. label: 'Dashboard',
  1169. icon: 'pi pi-home',
  1170. to: '/dashboards',
  1171. component: 'home/Index'
  1172. }]
  1173. }, {
  1174. label: 'Menu',
  1175. items: [{
  1176. label: 'Pengeluaran',
  1177. icon: 'pi pi-wallet',
  1178. to: '/expenses',
  1179. component: 'expense/Index'
  1180. }, {
  1181. label: 'Member',
  1182. icon: 'pi pi-id-card',
  1183. to: '/members',
  1184. component: 'member/Index'
  1185. }, {
  1186. label: 'Top Up',
  1187. icon: 'pi pi-car',
  1188. to: '/top-ups',
  1189. component: 'topup/Index'
  1190. }]
  1191. }]
  1192. });
  1193. /***/ }),
  1194. /***/ "./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":
  1195. /*!***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  1196. !*** ./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 ***!
  1197. \***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  1198. /***/ ((module, __webpack_exports__, __webpack_require__) => {
  1199. "use strict";
  1200. __webpack_require__.r(__webpack_exports__);
  1201. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  1202. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  1203. /* harmony export */ });
  1204. /* 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");
  1205. /* 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__);
  1206. // Imports
  1207. var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
  1208. // Module
  1209. ___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}", ""]);
  1210. // Exports
  1211. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
  1212. /***/ }),
  1213. /***/ "./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":
  1214. /*!************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  1215. !*** ./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 ***!
  1216. \************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  1217. /***/ ((module, __webpack_exports__, __webpack_require__) => {
  1218. "use strict";
  1219. __webpack_require__.r(__webpack_exports__);
  1220. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  1221. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  1222. /* harmony export */ });
  1223. /* 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");
  1224. /* 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__);
  1225. // Imports
  1226. var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
  1227. // Module
  1228. ___CSS_LOADER_EXPORT___.push([module.id, ".layout-menu[data-v-22a4e926] {\n list-style-type: none;\n margin: 0;\n padding: 0;\n}", ""]);
  1229. // Exports
  1230. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
  1231. /***/ }),
  1232. /***/ "./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":
  1233. /*!***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  1234. !*** ./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 ***!
  1235. \***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  1236. /***/ ((module, __webpack_exports__, __webpack_require__) => {
  1237. "use strict";
  1238. __webpack_require__.r(__webpack_exports__);
  1239. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  1240. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  1241. /* harmony export */ });
  1242. /* 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");
  1243. /* 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__);
  1244. // Imports
  1245. var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
  1246. // Module
  1247. ___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}", ""]);
  1248. // Exports
  1249. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
  1250. /***/ }),
  1251. /***/ "./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":
  1252. /*!***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  1253. !*** ./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 ***!
  1254. \***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  1255. /***/ ((module, __webpack_exports__, __webpack_require__) => {
  1256. "use strict";
  1257. __webpack_require__.r(__webpack_exports__);
  1258. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  1259. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  1260. /* harmony export */ });
  1261. /* 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");
  1262. /* 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__);
  1263. // Imports
  1264. var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
  1265. // Module
  1266. ___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: 12px;\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}", ""]);
  1267. // Exports
  1268. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
  1269. /***/ }),
  1270. /***/ "./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":
  1271. /*!**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  1272. !*** ./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 ***!
  1273. \**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  1274. /***/ ((module, __webpack_exports__, __webpack_require__) => {
  1275. "use strict";
  1276. __webpack_require__.r(__webpack_exports__);
  1277. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  1278. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  1279. /* harmony export */ });
  1280. /* 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");
  1281. /* 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__);
  1282. // Imports
  1283. var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
  1284. // Module
  1285. ___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}", ""]);
  1286. // Exports
  1287. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
  1288. /***/ }),
  1289. /***/ "./node_modules/dayjs/dayjs.min.js":
  1290. /*!*****************************************!*\
  1291. !*** ./node_modules/dayjs/dayjs.min.js ***!
  1292. \*****************************************/
  1293. /***/ (function(module) {
  1294. !function(t,e){ true?module.exports=e():0}(this,(function(){"use strict";var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",f="month",h="quarter",c="year",d="date",$="Invalid Date",l=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},m=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},g={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,f),s=n-i<0,u=e.clone().add(r+(s?-1:1),f);return+(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:f,y:c,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:h}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},v="en",D={};D[v]=M;var p=function(t){return t instanceof _},S=function t(e,n,r){var i;if(!e)return v;if("string"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split("-");if(!i&&u.length>1)return t(u[0])}else{var a=e.name;D[a]=e,i=a}return!r&&i&&(v=i),i||!r&&v},w=function(t,e){if(p(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},O=g;O.l=S,O.i=p,O.w=function(t,e){return w(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=S(t.locale,null,!0),this.parse(t)}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(O.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(l);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.$x=t.x||{},this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return O},m.isValid=function(){return!(this.$d.toString()===$)},m.isSame=function(t,e){var n=w(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return w(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<w(t)},m.$g=function(t,e,n){return O.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!O.u(e)||e,h=O.p(t),$=function(t,e){var i=O.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},l=function(t,e){return O.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,g="set"+(this.$u?"UTC":"");switch(h){case c:return r?$(1,0):$(31,11);case f:return r?$(1,M):$(0,M+1);case o:var v=this.$locale().weekStart||0,D=(y<v?y+7:y)-v;return $(r?m-D:m+(6-D),M);case a:case d:return l(g+"Hours",0);case u:return l(g+"Minutes",1);case s:return l(g+"Seconds",2);case i:return l(g+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=O.p(t),h="set"+(this.$u?"UTC":""),$=(n={},n[a]=h+"Date",n[d]=h+"Date",n[f]=h+"Month",n[c]=h+"FullYear",n[u]=h+"Hours",n[s]=h+"Minutes",n[i]=h+"Seconds",n[r]=h+"Milliseconds",n)[o],l=o===a?this.$D+(e-this.$W):e;if(o===f||o===c){var y=this.clone().set(d,1);y.$d[$](l),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d}else $&&this.$d[$](l);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[O.p(t)]()},m.add=function(r,h){var d,$=this;r=Number(r);var l=O.p(h),y=function(t){var e=w($);return O.w(e.date(e.date()+Math.round(t*r)),$)};if(l===f)return this.set(f,this.$M+r);if(l===c)return this.set(c,this.$y+r);if(l===a)return y(1);if(l===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[l]||1,m=this.$d.getTime()+r*M;return O.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||$;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=O.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,f=n.months,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},c=function(t){return O.s(s%12||12,t,"0")},d=n.meridiem||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r},l={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:O.s(a+1,2,"0"),MMM:h(n.monthsShort,a,f,3),MMMM:h(f,a),D:this.$D,DD:O.s(this.$D,2,"0"),d:String(this.$W),dd:h(n.weekdaysMin,this.$W,o,2),ddd:h(n.weekdaysShort,this.$W,o,3),dddd:o[this.$W],H:String(s),HH:O.s(s,2,"0"),h:c(1),hh:c(2),a:d(s,u,!0),A:d(s,u,!1),m:String(u),mm:O.s(u,2,"0"),s:String(this.$s),ss:O.s(this.$s,2,"0"),SSS:O.s(this.$ms,3,"0"),Z:i};return r.replace(y,(function(t,e){return e||l[t]||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,$){var l,y=O.p(d),M=w(r),m=(M.utcOffset()-this.utcOffset())*e,g=this-M,v=O.m(this,M);return v=(l={},l[c]=v/12,l[f]=v,l[h]=v/3,l[o]=(g-m)/6048e5,l[a]=(g-m)/864e5,l[u]=g/n,l[s]=g/e,l[i]=g/t,l)[y]||g,$?v:O.a(v)},m.daysInMonth=function(){return this.endOf(f).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=S(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return O.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),T=_.prototype;return w.prototype=T,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",f],["$y",c],["$D",d]].forEach((function(t){T[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),w.extend=function(t,e){return t.$i||(t(e,_,w),t.$i=!0),w},w.locale=S,w.isDayjs=p,w.unix=function(t){return w(1e3*t)},w.en=D[v],w.Ls=D,w.p={},w}));
  1295. /***/ }),
  1296. /***/ "./node_modules/lodash/lodash.js":
  1297. /*!***************************************!*\
  1298. !*** ./node_modules/lodash/lodash.js ***!
  1299. \***************************************/
  1300. /***/ (function(module, exports, __webpack_require__) {
  1301. /* module decorator */ module = __webpack_require__.nmd(module);
  1302. var __WEBPACK_AMD_DEFINE_RESULT__;/**
  1303. * @license
  1304. * Lodash <https://lodash.com/>
  1305. * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
  1306. * Released under MIT license <https://lodash.com/license>
  1307. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  1308. * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  1309. */
  1310. ;(function() {
  1311. /** Used as a safe reference for `undefined` in pre-ES5 environments. */
  1312. var undefined;
  1313. /** Used as the semantic version number. */
  1314. var VERSION = '4.17.21';
  1315. /** Used as the size to enable large array optimizations. */
  1316. var LARGE_ARRAY_SIZE = 200;
  1317. /** Error message constants. */
  1318. var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',
  1319. FUNC_ERROR_TEXT = 'Expected a function',
  1320. INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`';
  1321. /** Used to stand-in for `undefined` hash values. */
  1322. var HASH_UNDEFINED = '__lodash_hash_undefined__';
  1323. /** Used as the maximum memoize cache size. */
  1324. var MAX_MEMOIZE_SIZE = 500;
  1325. /** Used as the internal argument placeholder. */
  1326. var PLACEHOLDER = '__lodash_placeholder__';
  1327. /** Used to compose bitmasks for cloning. */
  1328. var CLONE_DEEP_FLAG = 1,
  1329. CLONE_FLAT_FLAG = 2,
  1330. CLONE_SYMBOLS_FLAG = 4;
  1331. /** Used to compose bitmasks for value comparisons. */
  1332. var COMPARE_PARTIAL_FLAG = 1,
  1333. COMPARE_UNORDERED_FLAG = 2;
  1334. /** Used to compose bitmasks for function metadata. */
  1335. var WRAP_BIND_FLAG = 1,
  1336. WRAP_BIND_KEY_FLAG = 2,
  1337. WRAP_CURRY_BOUND_FLAG = 4,
  1338. WRAP_CURRY_FLAG = 8,
  1339. WRAP_CURRY_RIGHT_FLAG = 16,
  1340. WRAP_PARTIAL_FLAG = 32,
  1341. WRAP_PARTIAL_RIGHT_FLAG = 64,
  1342. WRAP_ARY_FLAG = 128,
  1343. WRAP_REARG_FLAG = 256,
  1344. WRAP_FLIP_FLAG = 512;
  1345. /** Used as default options for `_.truncate`. */
  1346. var DEFAULT_TRUNC_LENGTH = 30,
  1347. DEFAULT_TRUNC_OMISSION = '...';
  1348. /** Used to detect hot functions by number of calls within a span of milliseconds. */
  1349. var HOT_COUNT = 800,
  1350. HOT_SPAN = 16;
  1351. /** Used to indicate the type of lazy iteratees. */
  1352. var LAZY_FILTER_FLAG = 1,
  1353. LAZY_MAP_FLAG = 2,
  1354. LAZY_WHILE_FLAG = 3;
  1355. /** Used as references for various `Number` constants. */
  1356. var INFINITY = 1 / 0,
  1357. MAX_SAFE_INTEGER = 9007199254740991,
  1358. MAX_INTEGER = 1.7976931348623157e+308,
  1359. NAN = 0 / 0;
  1360. /** Used as references for the maximum length and index of an array. */
  1361. var MAX_ARRAY_LENGTH = 4294967295,
  1362. MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,
  1363. HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
  1364. /** Used to associate wrap methods with their bit flags. */
  1365. var wrapFlags = [
  1366. ['ary', WRAP_ARY_FLAG],
  1367. ['bind', WRAP_BIND_FLAG],
  1368. ['bindKey', WRAP_BIND_KEY_FLAG],
  1369. ['curry', WRAP_CURRY_FLAG],
  1370. ['curryRight', WRAP_CURRY_RIGHT_FLAG],
  1371. ['flip', WRAP_FLIP_FLAG],
  1372. ['partial', WRAP_PARTIAL_FLAG],
  1373. ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],
  1374. ['rearg', WRAP_REARG_FLAG]
  1375. ];
  1376. /** `Object#toString` result references. */
  1377. var argsTag = '[object Arguments]',
  1378. arrayTag = '[object Array]',
  1379. asyncTag = '[object AsyncFunction]',
  1380. boolTag = '[object Boolean]',
  1381. dateTag = '[object Date]',
  1382. domExcTag = '[object DOMException]',
  1383. errorTag = '[object Error]',
  1384. funcTag = '[object Function]',
  1385. genTag = '[object GeneratorFunction]',
  1386. mapTag = '[object Map]',
  1387. numberTag = '[object Number]',
  1388. nullTag = '[object Null]',
  1389. objectTag = '[object Object]',
  1390. promiseTag = '[object Promise]',
  1391. proxyTag = '[object Proxy]',
  1392. regexpTag = '[object RegExp]',
  1393. setTag = '[object Set]',
  1394. stringTag = '[object String]',
  1395. symbolTag = '[object Symbol]',
  1396. undefinedTag = '[object Undefined]',
  1397. weakMapTag = '[object WeakMap]',
  1398. weakSetTag = '[object WeakSet]';
  1399. var arrayBufferTag = '[object ArrayBuffer]',
  1400. dataViewTag = '[object DataView]',
  1401. float32Tag = '[object Float32Array]',
  1402. float64Tag = '[object Float64Array]',
  1403. int8Tag = '[object Int8Array]',
  1404. int16Tag = '[object Int16Array]',
  1405. int32Tag = '[object Int32Array]',
  1406. uint8Tag = '[object Uint8Array]',
  1407. uint8ClampedTag = '[object Uint8ClampedArray]',
  1408. uint16Tag = '[object Uint16Array]',
  1409. uint32Tag = '[object Uint32Array]';
  1410. /** Used to match empty string literals in compiled template source. */
  1411. var reEmptyStringLeading = /\b__p \+= '';/g,
  1412. reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
  1413. reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
  1414. /** Used to match HTML entities and HTML characters. */
  1415. var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,
  1416. reUnescapedHtml = /[&<>"']/g,
  1417. reHasEscapedHtml = RegExp(reEscapedHtml.source),
  1418. reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
  1419. /** Used to match template delimiters. */
  1420. var reEscape = /<%-([\s\S]+?)%>/g,
  1421. reEvaluate = /<%([\s\S]+?)%>/g,
  1422. reInterpolate = /<%=([\s\S]+?)%>/g;
  1423. /** Used to match property names within property paths. */
  1424. var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
  1425. reIsPlainProp = /^\w*$/,
  1426. rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
  1427. /**
  1428. * Used to match `RegExp`
  1429. * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
  1430. */
  1431. var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
  1432. reHasRegExpChar = RegExp(reRegExpChar.source);
  1433. /** Used to match leading whitespace. */
  1434. var reTrimStart = /^\s+/;
  1435. /** Used to match a single whitespace character. */
  1436. var reWhitespace = /\s/;
  1437. /** Used to match wrap detail comments. */
  1438. var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,
  1439. reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/,
  1440. reSplitDetails = /,? & /;
  1441. /** Used to match words composed of alphanumeric characters. */
  1442. var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
  1443. /**
  1444. * Used to validate the `validate` option in `_.template` variable.
  1445. *
  1446. * Forbids characters which could potentially change the meaning of the function argument definition:
  1447. * - "()," (modification of function parameters)
  1448. * - "=" (default value)
  1449. * - "[]{}" (destructuring of function parameters)
  1450. * - "/" (beginning of a comment)
  1451. * - whitespace
  1452. */
  1453. var reForbiddenIdentifierChars = /[()=,{}\[\]\/\s]/;
  1454. /** Used to match backslashes in property paths. */
  1455. var reEscapeChar = /\\(\\)?/g;
  1456. /**
  1457. * Used to match
  1458. * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).
  1459. */
  1460. var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
  1461. /** Used to match `RegExp` flags from their coerced string values. */
  1462. var reFlags = /\w*$/;
  1463. /** Used to detect bad signed hexadecimal string values. */
  1464. var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
  1465. /** Used to detect binary string values. */
  1466. var reIsBinary = /^0b[01]+$/i;
  1467. /** Used to detect host constructors (Safari). */
  1468. var reIsHostCtor = /^\[object .+?Constructor\]$/;
  1469. /** Used to detect octal string values. */
  1470. var reIsOctal = /^0o[0-7]+$/i;
  1471. /** Used to detect unsigned integer values. */
  1472. var reIsUint = /^(?:0|[1-9]\d*)$/;
  1473. /** Used to match Latin Unicode letters (excluding mathematical operators). */
  1474. var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
  1475. /** Used to ensure capturing order of template delimiters. */
  1476. var reNoMatch = /($^)/;
  1477. /** Used to match unescaped characters in compiled string literals. */
  1478. var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
  1479. /** Used to compose unicode character classes. */
  1480. var rsAstralRange = '\\ud800-\\udfff',
  1481. rsComboMarksRange = '\\u0300-\\u036f',
  1482. reComboHalfMarksRange = '\\ufe20-\\ufe2f',
  1483. rsComboSymbolsRange = '\\u20d0-\\u20ff',
  1484. rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
  1485. rsDingbatRange = '\\u2700-\\u27bf',
  1486. rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
  1487. rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
  1488. rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
  1489. rsPunctuationRange = '\\u2000-\\u206f',
  1490. 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',
  1491. rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
  1492. rsVarRange = '\\ufe0e\\ufe0f',
  1493. rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
  1494. /** Used to compose unicode capture groups. */
  1495. var rsApos = "['\u2019]",
  1496. rsAstral = '[' + rsAstralRange + ']',
  1497. rsBreak = '[' + rsBreakRange + ']',
  1498. rsCombo = '[' + rsComboRange + ']',
  1499. rsDigits = '\\d+',
  1500. rsDingbat = '[' + rsDingbatRange + ']',
  1501. rsLower = '[' + rsLowerRange + ']',
  1502. rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
  1503. rsFitz = '\\ud83c[\\udffb-\\udfff]',
  1504. rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
  1505. rsNonAstral = '[^' + rsAstralRange + ']',
  1506. rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
  1507. rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
  1508. rsUpper = '[' + rsUpperRange + ']',
  1509. rsZWJ = '\\u200d';
  1510. /** Used to compose unicode regexes. */
  1511. var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',
  1512. rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',
  1513. rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',
  1514. rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',
  1515. reOptMod = rsModifier + '?',
  1516. rsOptVar = '[' + rsVarRange + ']?',
  1517. rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
  1518. rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])',
  1519. rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])',
  1520. rsSeq = rsOptVar + reOptMod + rsOptJoin,
  1521. rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,
  1522. rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
  1523. /** Used to match apostrophes. */
  1524. var reApos = RegExp(rsApos, 'g');
  1525. /**
  1526. * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
  1527. * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
  1528. */
  1529. var reComboMark = RegExp(rsCombo, 'g');
  1530. /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
  1531. var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
  1532. /** Used to match complex or compound words. */
  1533. var reUnicodeWord = RegExp([
  1534. rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
  1535. rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',
  1536. rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,
  1537. rsUpper + '+' + rsOptContrUpper,
  1538. rsOrdUpper,
  1539. rsOrdLower,
  1540. rsDigits,
  1541. rsEmoji
  1542. ].join('|'), 'g');
  1543. /** 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/). */
  1544. var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');
  1545. /** Used to detect strings that need a more robust regexp to match words. */
  1546. 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 ]/;
  1547. /** Used to assign default `context` object properties. */
  1548. var contextProps = [
  1549. 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',
  1550. 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',
  1551. 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',
  1552. 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',
  1553. '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'
  1554. ];
  1555. /** Used to make template sourceURLs easier to identify. */
  1556. var templateCounter = -1;
  1557. /** Used to identify `toStringTag` values of typed arrays. */
  1558. var typedArrayTags = {};
  1559. typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
  1560. typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
  1561. typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
  1562. typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
  1563. typedArrayTags[uint32Tag] = true;
  1564. typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
  1565. typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
  1566. typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
  1567. typedArrayTags[errorTag] = typedArrayTags[funcTag] =
  1568. typedArrayTags[mapTag] = typedArrayTags[numberTag] =
  1569. typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
  1570. typedArrayTags[setTag] = typedArrayTags[stringTag] =
  1571. typedArrayTags[weakMapTag] = false;
  1572. /** Used to identify `toStringTag` values supported by `_.clone`. */
  1573. var cloneableTags = {};
  1574. cloneableTags[argsTag] = cloneableTags[arrayTag] =
  1575. cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
  1576. cloneableTags[boolTag] = cloneableTags[dateTag] =
  1577. cloneableTags[float32Tag] = cloneableTags[float64Tag] =
  1578. cloneableTags[int8Tag] = cloneableTags[int16Tag] =
  1579. cloneableTags[int32Tag] = cloneableTags[mapTag] =
  1580. cloneableTags[numberTag] = cloneableTags[objectTag] =
  1581. cloneableTags[regexpTag] = cloneableTags[setTag] =
  1582. cloneableTags[stringTag] = cloneableTags[symbolTag] =
  1583. cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
  1584. cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
  1585. cloneableTags[errorTag] = cloneableTags[funcTag] =
  1586. cloneableTags[weakMapTag] = false;
  1587. /** Used to map Latin Unicode letters to basic Latin letters. */
  1588. var deburredLetters = {
  1589. // Latin-1 Supplement block.
  1590. '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
  1591. '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
  1592. '\xc7': 'C', '\xe7': 'c',
  1593. '\xd0': 'D', '\xf0': 'd',
  1594. '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
  1595. '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
  1596. '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
  1597. '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
  1598. '\xd1': 'N', '\xf1': 'n',
  1599. '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
  1600. '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
  1601. '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
  1602. '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
  1603. '\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
  1604. '\xc6': 'Ae', '\xe6': 'ae',
  1605. '\xde': 'Th', '\xfe': 'th',
  1606. '\xdf': 'ss',
  1607. // Latin Extended-A block.
  1608. '\u0100': 'A', '\u0102': 'A', '\u0104': 'A',
  1609. '\u0101': 'a', '\u0103': 'a', '\u0105': 'a',
  1610. '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
  1611. '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
  1612. '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
  1613. '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
  1614. '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
  1615. '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
  1616. '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
  1617. '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
  1618. '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
  1619. '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
  1620. '\u0134': 'J', '\u0135': 'j',
  1621. '\u0136': 'K', '\u0137': 'k', '\u0138': 'k',
  1622. '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
  1623. '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
  1624. '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
  1625. '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
  1626. '\u014c': 'O', '\u014e': 'O', '\u0150': 'O',
  1627. '\u014d': 'o', '\u014f': 'o', '\u0151': 'o',
  1628. '\u0154': 'R', '\u0156': 'R', '\u0158': 'R',
  1629. '\u0155': 'r', '\u0157': 'r', '\u0159': 'r',
  1630. '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
  1631. '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's',
  1632. '\u0162': 'T', '\u0164': 'T', '\u0166': 'T',
  1633. '\u0163': 't', '\u0165': 't', '\u0167': 't',
  1634. '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
  1635. '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
  1636. '\u0174': 'W', '\u0175': 'w',
  1637. '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y',
  1638. '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z',
  1639. '\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
  1640. '\u0132': 'IJ', '\u0133': 'ij',
  1641. '\u0152': 'Oe', '\u0153': 'oe',
  1642. '\u0149': "'n", '\u017f': 's'
  1643. };
  1644. /** Used to map characters to HTML entities. */
  1645. var htmlEscapes = {
  1646. '&': '&amp;',
  1647. '<': '&lt;',
  1648. '>': '&gt;',
  1649. '"': '&quot;',
  1650. "'": '&#39;'
  1651. };
  1652. /** Used to map HTML entities to characters. */
  1653. var htmlUnescapes = {
  1654. '&amp;': '&',
  1655. '&lt;': '<',
  1656. '&gt;': '>',
  1657. '&quot;': '"',
  1658. '&#39;': "'"
  1659. };
  1660. /** Used to escape characters for inclusion in compiled string literals. */
  1661. var stringEscapes = {
  1662. '\\': '\\',
  1663. "'": "'",
  1664. '\n': 'n',
  1665. '\r': 'r',
  1666. '\u2028': 'u2028',
  1667. '\u2029': 'u2029'
  1668. };
  1669. /** Built-in method references without a dependency on `root`. */
  1670. var freeParseFloat = parseFloat,
  1671. freeParseInt = parseInt;
  1672. /** Detect free variable `global` from Node.js. */
  1673. var freeGlobal = typeof __webpack_require__.g == 'object' && __webpack_require__.g && __webpack_require__.g.Object === Object && __webpack_require__.g;
  1674. /** Detect free variable `self`. */
  1675. var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
  1676. /** Used as a reference to the global object. */
  1677. var root = freeGlobal || freeSelf || Function('return this')();
  1678. /** Detect free variable `exports`. */
  1679. var freeExports = true && exports && !exports.nodeType && exports;
  1680. /** Detect free variable `module`. */
  1681. var freeModule = freeExports && "object" == 'object' && module && !module.nodeType && module;
  1682. /** Detect the popular CommonJS extension `module.exports`. */
  1683. var moduleExports = freeModule && freeModule.exports === freeExports;
  1684. /** Detect free variable `process` from Node.js. */
  1685. var freeProcess = moduleExports && freeGlobal.process;
  1686. /** Used to access faster Node.js helpers. */
  1687. var nodeUtil = (function() {
  1688. try {
  1689. // Use `util.types` for Node.js 10+.
  1690. var types = freeModule && freeModule.require && freeModule.require('util').types;
  1691. if (types) {
  1692. return types;
  1693. }
  1694. // Legacy `process.binding('util')` for Node.js < 10.
  1695. return freeProcess && freeProcess.binding && freeProcess.binding('util');
  1696. } catch (e) {}
  1697. }());
  1698. /* Node.js helper references. */
  1699. var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,
  1700. nodeIsDate = nodeUtil && nodeUtil.isDate,
  1701. nodeIsMap = nodeUtil && nodeUtil.isMap,
  1702. nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,
  1703. nodeIsSet = nodeUtil && nodeUtil.isSet,
  1704. nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
  1705. /*--------------------------------------------------------------------------*/
  1706. /**
  1707. * A faster alternative to `Function#apply`, this function invokes `func`
  1708. * with the `this` binding of `thisArg` and the arguments of `args`.
  1709. *
  1710. * @private
  1711. * @param {Function} func The function to invoke.
  1712. * @param {*} thisArg The `this` binding of `func`.
  1713. * @param {Array} args The arguments to invoke `func` with.
  1714. * @returns {*} Returns the result of `func`.
  1715. */
  1716. function apply(func, thisArg, args) {
  1717. switch (args.length) {
  1718. case 0: return func.call(thisArg);
  1719. case 1: return func.call(thisArg, args[0]);
  1720. case 2: return func.call(thisArg, args[0], args[1]);
  1721. case 3: return func.call(thisArg, args[0], args[1], args[2]);
  1722. }
  1723. return func.apply(thisArg, args);
  1724. }
  1725. /**
  1726. * A specialized version of `baseAggregator` for arrays.
  1727. *
  1728. * @private
  1729. * @param {Array} [array] The array to iterate over.
  1730. * @param {Function} setter The function to set `accumulator` values.
  1731. * @param {Function} iteratee The iteratee to transform keys.
  1732. * @param {Object} accumulator The initial aggregated object.
  1733. * @returns {Function} Returns `accumulator`.
  1734. */
  1735. function arrayAggregator(array, setter, iteratee, accumulator) {
  1736. var index = -1,
  1737. length = array == null ? 0 : array.length;
  1738. while (++index < length) {
  1739. var value = array[index];
  1740. setter(accumulator, value, iteratee(value), array);
  1741. }
  1742. return accumulator;
  1743. }
  1744. /**
  1745. * A specialized version of `_.forEach` for arrays without support for
  1746. * iteratee shorthands.
  1747. *
  1748. * @private
  1749. * @param {Array} [array] The array to iterate over.
  1750. * @param {Function} iteratee The function invoked per iteration.
  1751. * @returns {Array} Returns `array`.
  1752. */
  1753. function arrayEach(array, iteratee) {
  1754. var index = -1,
  1755. length = array == null ? 0 : array.length;
  1756. while (++index < length) {
  1757. if (iteratee(array[index], index, array) === false) {
  1758. break;
  1759. }
  1760. }
  1761. return array;
  1762. }
  1763. /**
  1764. * A specialized version of `_.forEachRight` for arrays without support for
  1765. * iteratee shorthands.
  1766. *
  1767. * @private
  1768. * @param {Array} [array] The array to iterate over.
  1769. * @param {Function} iteratee The function invoked per iteration.
  1770. * @returns {Array} Returns `array`.
  1771. */
  1772. function arrayEachRight(array, iteratee) {
  1773. var length = array == null ? 0 : array.length;
  1774. while (length--) {
  1775. if (iteratee(array[length], length, array) === false) {
  1776. break;
  1777. }
  1778. }
  1779. return array;
  1780. }
  1781. /**
  1782. * A specialized version of `_.every` for arrays without support for
  1783. * iteratee shorthands.
  1784. *
  1785. * @private
  1786. * @param {Array} [array] The array to iterate over.
  1787. * @param {Function} predicate The function invoked per iteration.
  1788. * @returns {boolean} Returns `true` if all elements pass the predicate check,
  1789. * else `false`.
  1790. */
  1791. function arrayEvery(array, predicate) {
  1792. var index = -1,
  1793. length = array == null ? 0 : array.length;
  1794. while (++index < length) {
  1795. if (!predicate(array[index], index, array)) {
  1796. return false;
  1797. }
  1798. }
  1799. return true;
  1800. }
  1801. /**
  1802. * A specialized version of `_.filter` for arrays without support for
  1803. * iteratee shorthands.
  1804. *
  1805. * @private
  1806. * @param {Array} [array] The array to iterate over.
  1807. * @param {Function} predicate The function invoked per iteration.
  1808. * @returns {Array} Returns the new filtered array.
  1809. */
  1810. function arrayFilter(array, predicate) {
  1811. var index = -1,
  1812. length = array == null ? 0 : array.length,
  1813. resIndex = 0,
  1814. result = [];
  1815. while (++index < length) {
  1816. var value = array[index];
  1817. if (predicate(value, index, array)) {
  1818. result[resIndex++] = value;
  1819. }
  1820. }
  1821. return result;
  1822. }
  1823. /**
  1824. * A specialized version of `_.includes` for arrays without support for
  1825. * specifying an index to search from.
  1826. *
  1827. * @private
  1828. * @param {Array} [array] The array to inspect.
  1829. * @param {*} target The value to search for.
  1830. * @returns {boolean} Returns `true` if `target` is found, else `false`.
  1831. */
  1832. function arrayIncludes(array, value) {
  1833. var length = array == null ? 0 : array.length;
  1834. return !!length && baseIndexOf(array, value, 0) > -1;
  1835. }
  1836. /**
  1837. * This function is like `arrayIncludes` except that it accepts a comparator.
  1838. *
  1839. * @private
  1840. * @param {Array} [array] The array to inspect.
  1841. * @param {*} target The value to search for.
  1842. * @param {Function} comparator The comparator invoked per element.
  1843. * @returns {boolean} Returns `true` if `target` is found, else `false`.
  1844. */
  1845. function arrayIncludesWith(array, value, comparator) {
  1846. var index = -1,
  1847. length = array == null ? 0 : array.length;
  1848. while (++index < length) {
  1849. if (comparator(value, array[index])) {
  1850. return true;
  1851. }
  1852. }
  1853. return false;
  1854. }
  1855. /**
  1856. * A specialized version of `_.map` for arrays without support for iteratee
  1857. * shorthands.
  1858. *
  1859. * @private
  1860. * @param {Array} [array] The array to iterate over.
  1861. * @param {Function} iteratee The function invoked per iteration.
  1862. * @returns {Array} Returns the new mapped array.
  1863. */
  1864. function arrayMap(array, iteratee) {
  1865. var index = -1,
  1866. length = array == null ? 0 : array.length,
  1867. result = Array(length);
  1868. while (++index < length) {
  1869. result[index] = iteratee(array[index], index, array);
  1870. }
  1871. return result;
  1872. }
  1873. /**
  1874. * Appends the elements of `values` to `array`.
  1875. *
  1876. * @private
  1877. * @param {Array} array The array to modify.
  1878. * @param {Array} values The values to append.
  1879. * @returns {Array} Returns `array`.
  1880. */
  1881. function arrayPush(array, values) {
  1882. var index = -1,
  1883. length = values.length,
  1884. offset = array.length;
  1885. while (++index < length) {
  1886. array[offset + index] = values[index];
  1887. }
  1888. return array;
  1889. }
  1890. /**
  1891. * A specialized version of `_.reduce` for arrays without support for
  1892. * iteratee shorthands.
  1893. *
  1894. * @private
  1895. * @param {Array} [array] The array to iterate over.
  1896. * @param {Function} iteratee The function invoked per iteration.
  1897. * @param {*} [accumulator] The initial value.
  1898. * @param {boolean} [initAccum] Specify using the first element of `array` as
  1899. * the initial value.
  1900. * @returns {*} Returns the accumulated value.
  1901. */
  1902. function arrayReduce(array, iteratee, accumulator, initAccum) {
  1903. var index = -1,
  1904. length = array == null ? 0 : array.length;
  1905. if (initAccum && length) {
  1906. accumulator = array[++index];
  1907. }
  1908. while (++index < length) {
  1909. accumulator = iteratee(accumulator, array[index], index, array);
  1910. }
  1911. return accumulator;
  1912. }
  1913. /**
  1914. * A specialized version of `_.reduceRight` for arrays without support for
  1915. * iteratee shorthands.
  1916. *
  1917. * @private
  1918. * @param {Array} [array] The array to iterate over.
  1919. * @param {Function} iteratee The function invoked per iteration.
  1920. * @param {*} [accumulator] The initial value.
  1921. * @param {boolean} [initAccum] Specify using the last element of `array` as
  1922. * the initial value.
  1923. * @returns {*} Returns the accumulated value.
  1924. */
  1925. function arrayReduceRight(array, iteratee, accumulator, initAccum) {
  1926. var length = array == null ? 0 : array.length;
  1927. if (initAccum && length) {
  1928. accumulator = array[--length];
  1929. }
  1930. while (length--) {
  1931. accumulator = iteratee(accumulator, array[length], length, array);
  1932. }
  1933. return accumulator;
  1934. }
  1935. /**
  1936. * A specialized version of `_.some` for arrays without support for iteratee
  1937. * shorthands.
  1938. *
  1939. * @private
  1940. * @param {Array} [array] The array to iterate over.
  1941. * @param {Function} predicate The function invoked per iteration.
  1942. * @returns {boolean} Returns `true` if any element passes the predicate check,
  1943. * else `false`.
  1944. */
  1945. function arraySome(array, predicate) {
  1946. var index = -1,
  1947. length = array == null ? 0 : array.length;
  1948. while (++index < length) {
  1949. if (predicate(array[index], index, array)) {
  1950. return true;
  1951. }
  1952. }
  1953. return false;
  1954. }
  1955. /**
  1956. * Gets the size of an ASCII `string`.
  1957. *
  1958. * @private
  1959. * @param {string} string The string inspect.
  1960. * @returns {number} Returns the string size.
  1961. */
  1962. var asciiSize = baseProperty('length');
  1963. /**
  1964. * Converts an ASCII `string` to an array.
  1965. *
  1966. * @private
  1967. * @param {string} string The string to convert.
  1968. * @returns {Array} Returns the converted array.
  1969. */
  1970. function asciiToArray(string) {
  1971. return string.split('');
  1972. }
  1973. /**
  1974. * Splits an ASCII `string` into an array of its words.
  1975. *
  1976. * @private
  1977. * @param {string} The string to inspect.
  1978. * @returns {Array} Returns the words of `string`.
  1979. */
  1980. function asciiWords(string) {
  1981. return string.match(reAsciiWord) || [];
  1982. }
  1983. /**
  1984. * The base implementation of methods like `_.findKey` and `_.findLastKey`,
  1985. * without support for iteratee shorthands, which iterates over `collection`
  1986. * using `eachFunc`.
  1987. *
  1988. * @private
  1989. * @param {Array|Object} collection The collection to inspect.
  1990. * @param {Function} predicate The function invoked per iteration.
  1991. * @param {Function} eachFunc The function to iterate over `collection`.
  1992. * @returns {*} Returns the found element or its key, else `undefined`.
  1993. */
  1994. function baseFindKey(collection, predicate, eachFunc) {
  1995. var result;
  1996. eachFunc(collection, function(value, key, collection) {
  1997. if (predicate(value, key, collection)) {
  1998. result = key;
  1999. return false;
  2000. }
  2001. });
  2002. return result;
  2003. }
  2004. /**
  2005. * The base implementation of `_.findIndex` and `_.findLastIndex` without
  2006. * support for iteratee shorthands.
  2007. *
  2008. * @private
  2009. * @param {Array} array The array to inspect.
  2010. * @param {Function} predicate The function invoked per iteration.
  2011. * @param {number} fromIndex The index to search from.
  2012. * @param {boolean} [fromRight] Specify iterating from right to left.
  2013. * @returns {number} Returns the index of the matched value, else `-1`.
  2014. */
  2015. function baseFindIndex(array, predicate, fromIndex, fromRight) {
  2016. var length = array.length,
  2017. index = fromIndex + (fromRight ? 1 : -1);
  2018. while ((fromRight ? index-- : ++index < length)) {
  2019. if (predicate(array[index], index, array)) {
  2020. return index;
  2021. }
  2022. }
  2023. return -1;
  2024. }
  2025. /**
  2026. * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
  2027. *
  2028. * @private
  2029. * @param {Array} array The array to inspect.
  2030. * @param {*} value The value to search for.
  2031. * @param {number} fromIndex The index to search from.
  2032. * @returns {number} Returns the index of the matched value, else `-1`.
  2033. */
  2034. function baseIndexOf(array, value, fromIndex) {
  2035. return value === value
  2036. ? strictIndexOf(array, value, fromIndex)
  2037. : baseFindIndex(array, baseIsNaN, fromIndex);
  2038. }
  2039. /**
  2040. * This function is like `baseIndexOf` except that it accepts a comparator.
  2041. *
  2042. * @private
  2043. * @param {Array} array The array to inspect.
  2044. * @param {*} value The value to search for.
  2045. * @param {number} fromIndex The index to search from.
  2046. * @param {Function} comparator The comparator invoked per element.
  2047. * @returns {number} Returns the index of the matched value, else `-1`.
  2048. */
  2049. function baseIndexOfWith(array, value, fromIndex, comparator) {
  2050. var index = fromIndex - 1,
  2051. length = array.length;
  2052. while (++index < length) {
  2053. if (comparator(array[index], value)) {
  2054. return index;
  2055. }
  2056. }
  2057. return -1;
  2058. }
  2059. /**
  2060. * The base implementation of `_.isNaN` without support for number objects.
  2061. *
  2062. * @private
  2063. * @param {*} value The value to check.
  2064. * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
  2065. */
  2066. function baseIsNaN(value) {
  2067. return value !== value;
  2068. }
  2069. /**
  2070. * The base implementation of `_.mean` and `_.meanBy` without support for
  2071. * iteratee shorthands.
  2072. *
  2073. * @private
  2074. * @param {Array} array The array to iterate over.
  2075. * @param {Function} iteratee The function invoked per iteration.
  2076. * @returns {number} Returns the mean.
  2077. */
  2078. function baseMean(array, iteratee) {
  2079. var length = array == null ? 0 : array.length;
  2080. return length ? (baseSum(array, iteratee) / length) : NAN;
  2081. }
  2082. /**
  2083. * The base implementation of `_.property` without support for deep paths.
  2084. *
  2085. * @private
  2086. * @param {string} key The key of the property to get.
  2087. * @returns {Function} Returns the new accessor function.
  2088. */
  2089. function baseProperty(key) {
  2090. return function(object) {
  2091. return object == null ? undefined : object[key];
  2092. };
  2093. }
  2094. /**
  2095. * The base implementation of `_.propertyOf` without support for deep paths.
  2096. *
  2097. * @private
  2098. * @param {Object} object The object to query.
  2099. * @returns {Function} Returns the new accessor function.
  2100. */
  2101. function basePropertyOf(object) {
  2102. return function(key) {
  2103. return object == null ? undefined : object[key];
  2104. };
  2105. }
  2106. /**
  2107. * The base implementation of `_.reduce` and `_.reduceRight`, without support
  2108. * for iteratee shorthands, which iterates over `collection` using `eachFunc`.
  2109. *
  2110. * @private
  2111. * @param {Array|Object} collection The collection to iterate over.
  2112. * @param {Function} iteratee The function invoked per iteration.
  2113. * @param {*} accumulator The initial value.
  2114. * @param {boolean} initAccum Specify using the first or last element of
  2115. * `collection` as the initial value.
  2116. * @param {Function} eachFunc The function to iterate over `collection`.
  2117. * @returns {*} Returns the accumulated value.
  2118. */
  2119. function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
  2120. eachFunc(collection, function(value, index, collection) {
  2121. accumulator = initAccum
  2122. ? (initAccum = false, value)
  2123. : iteratee(accumulator, value, index, collection);
  2124. });
  2125. return accumulator;
  2126. }
  2127. /**
  2128. * The base implementation of `_.sortBy` which uses `comparer` to define the
  2129. * sort order of `array` and replaces criteria objects with their corresponding
  2130. * values.
  2131. *
  2132. * @private
  2133. * @param {Array} array The array to sort.
  2134. * @param {Function} comparer The function to define sort order.
  2135. * @returns {Array} Returns `array`.
  2136. */
  2137. function baseSortBy(array, comparer) {
  2138. var length = array.length;
  2139. array.sort(comparer);
  2140. while (length--) {
  2141. array[length] = array[length].value;
  2142. }
  2143. return array;
  2144. }
  2145. /**
  2146. * The base implementation of `_.sum` and `_.sumBy` without support for
  2147. * iteratee shorthands.
  2148. *
  2149. * @private
  2150. * @param {Array} array The array to iterate over.
  2151. * @param {Function} iteratee The function invoked per iteration.
  2152. * @returns {number} Returns the sum.
  2153. */
  2154. function baseSum(array, iteratee) {
  2155. var result,
  2156. index = -1,
  2157. length = array.length;
  2158. while (++index < length) {
  2159. var current = iteratee(array[index]);
  2160. if (current !== undefined) {
  2161. result = result === undefined ? current : (result + current);
  2162. }
  2163. }
  2164. return result;
  2165. }
  2166. /**
  2167. * The base implementation of `_.times` without support for iteratee shorthands
  2168. * or max array length checks.
  2169. *
  2170. * @private
  2171. * @param {number} n The number of times to invoke `iteratee`.
  2172. * @param {Function} iteratee The function invoked per iteration.
  2173. * @returns {Array} Returns the array of results.
  2174. */
  2175. function baseTimes(n, iteratee) {
  2176. var index = -1,
  2177. result = Array(n);
  2178. while (++index < n) {
  2179. result[index] = iteratee(index);
  2180. }
  2181. return result;
  2182. }
  2183. /**
  2184. * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array
  2185. * of key-value pairs for `object` corresponding to the property names of `props`.
  2186. *
  2187. * @private
  2188. * @param {Object} object The object to query.
  2189. * @param {Array} props The property names to get values for.
  2190. * @returns {Object} Returns the key-value pairs.
  2191. */
  2192. function baseToPairs(object, props) {
  2193. return arrayMap(props, function(key) {
  2194. return [key, object[key]];
  2195. });
  2196. }
  2197. /**
  2198. * The base implementation of `_.trim`.
  2199. *
  2200. * @private
  2201. * @param {string} string The string to trim.
  2202. * @returns {string} Returns the trimmed string.
  2203. */
  2204. function baseTrim(string) {
  2205. return string
  2206. ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')
  2207. : string;
  2208. }
  2209. /**
  2210. * The base implementation of `_.unary` without support for storing metadata.
  2211. *
  2212. * @private
  2213. * @param {Function} func The function to cap arguments for.
  2214. * @returns {Function} Returns the new capped function.
  2215. */
  2216. function baseUnary(func) {
  2217. return function(value) {
  2218. return func(value);
  2219. };
  2220. }
  2221. /**
  2222. * The base implementation of `_.values` and `_.valuesIn` which creates an
  2223. * array of `object` property values corresponding to the property names
  2224. * of `props`.
  2225. *
  2226. * @private
  2227. * @param {Object} object The object to query.
  2228. * @param {Array} props The property names to get values for.
  2229. * @returns {Object} Returns the array of property values.
  2230. */
  2231. function baseValues(object, props) {
  2232. return arrayMap(props, function(key) {
  2233. return object[key];
  2234. });
  2235. }
  2236. /**
  2237. * Checks if a `cache` value for `key` exists.
  2238. *
  2239. * @private
  2240. * @param {Object} cache The cache to query.
  2241. * @param {string} key The key of the entry to check.
  2242. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  2243. */
  2244. function cacheHas(cache, key) {
  2245. return cache.has(key);
  2246. }
  2247. /**
  2248. * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol
  2249. * that is not found in the character symbols.
  2250. *
  2251. * @private
  2252. * @param {Array} strSymbols The string symbols to inspect.
  2253. * @param {Array} chrSymbols The character symbols to find.
  2254. * @returns {number} Returns the index of the first unmatched string symbol.
  2255. */
  2256. function charsStartIndex(strSymbols, chrSymbols) {
  2257. var index = -1,
  2258. length = strSymbols.length;
  2259. while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
  2260. return index;
  2261. }
  2262. /**
  2263. * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol
  2264. * that is not found in the character symbols.
  2265. *
  2266. * @private
  2267. * @param {Array} strSymbols The string symbols to inspect.
  2268. * @param {Array} chrSymbols The character symbols to find.
  2269. * @returns {number} Returns the index of the last unmatched string symbol.
  2270. */
  2271. function charsEndIndex(strSymbols, chrSymbols) {
  2272. var index = strSymbols.length;
  2273. while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
  2274. return index;
  2275. }
  2276. /**
  2277. * Gets the number of `placeholder` occurrences in `array`.
  2278. *
  2279. * @private
  2280. * @param {Array} array The array to inspect.
  2281. * @param {*} placeholder The placeholder to search for.
  2282. * @returns {number} Returns the placeholder count.
  2283. */
  2284. function countHolders(array, placeholder) {
  2285. var length = array.length,
  2286. result = 0;
  2287. while (length--) {
  2288. if (array[length] === placeholder) {
  2289. ++result;
  2290. }
  2291. }
  2292. return result;
  2293. }
  2294. /**
  2295. * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
  2296. * letters to basic Latin letters.
  2297. *
  2298. * @private
  2299. * @param {string} letter The matched letter to deburr.
  2300. * @returns {string} Returns the deburred letter.
  2301. */
  2302. var deburrLetter = basePropertyOf(deburredLetters);
  2303. /**
  2304. * Used by `_.escape` to convert characters to HTML entities.
  2305. *
  2306. * @private
  2307. * @param {string} chr The matched character to escape.
  2308. * @returns {string} Returns the escaped character.
  2309. */
  2310. var escapeHtmlChar = basePropertyOf(htmlEscapes);
  2311. /**
  2312. * Used by `_.template` to escape characters for inclusion in compiled string literals.
  2313. *
  2314. * @private
  2315. * @param {string} chr The matched character to escape.
  2316. * @returns {string} Returns the escaped character.
  2317. */
  2318. function escapeStringChar(chr) {
  2319. return '\\' + stringEscapes[chr];
  2320. }
  2321. /**
  2322. * Gets the value at `key` of `object`.
  2323. *
  2324. * @private
  2325. * @param {Object} [object] The object to query.
  2326. * @param {string} key The key of the property to get.
  2327. * @returns {*} Returns the property value.
  2328. */
  2329. function getValue(object, key) {
  2330. return object == null ? undefined : object[key];
  2331. }
  2332. /**
  2333. * Checks if `string` contains Unicode symbols.
  2334. *
  2335. * @private
  2336. * @param {string} string The string to inspect.
  2337. * @returns {boolean} Returns `true` if a symbol is found, else `false`.
  2338. */
  2339. function hasUnicode(string) {
  2340. return reHasUnicode.test(string);
  2341. }
  2342. /**
  2343. * Checks if `string` contains a word composed of Unicode symbols.
  2344. *
  2345. * @private
  2346. * @param {string} string The string to inspect.
  2347. * @returns {boolean} Returns `true` if a word is found, else `false`.
  2348. */
  2349. function hasUnicodeWord(string) {
  2350. return reHasUnicodeWord.test(string);
  2351. }
  2352. /**
  2353. * Converts `iterator` to an array.
  2354. *
  2355. * @private
  2356. * @param {Object} iterator The iterator to convert.
  2357. * @returns {Array} Returns the converted array.
  2358. */
  2359. function iteratorToArray(iterator) {
  2360. var data,
  2361. result = [];
  2362. while (!(data = iterator.next()).done) {
  2363. result.push(data.value);
  2364. }
  2365. return result;
  2366. }
  2367. /**
  2368. * Converts `map` to its key-value pairs.
  2369. *
  2370. * @private
  2371. * @param {Object} map The map to convert.
  2372. * @returns {Array} Returns the key-value pairs.
  2373. */
  2374. function mapToArray(map) {
  2375. var index = -1,
  2376. result = Array(map.size);
  2377. map.forEach(function(value, key) {
  2378. result[++index] = [key, value];
  2379. });
  2380. return result;
  2381. }
  2382. /**
  2383. * Creates a unary function that invokes `func` with its argument transformed.
  2384. *
  2385. * @private
  2386. * @param {Function} func The function to wrap.
  2387. * @param {Function} transform The argument transform.
  2388. * @returns {Function} Returns the new function.
  2389. */
  2390. function overArg(func, transform) {
  2391. return function(arg) {
  2392. return func(transform(arg));
  2393. };
  2394. }
  2395. /**
  2396. * Replaces all `placeholder` elements in `array` with an internal placeholder
  2397. * and returns an array of their indexes.
  2398. *
  2399. * @private
  2400. * @param {Array} array The array to modify.
  2401. * @param {*} placeholder The placeholder to replace.
  2402. * @returns {Array} Returns the new array of placeholder indexes.
  2403. */
  2404. function replaceHolders(array, placeholder) {
  2405. var index = -1,
  2406. length = array.length,
  2407. resIndex = 0,
  2408. result = [];
  2409. while (++index < length) {
  2410. var value = array[index];
  2411. if (value === placeholder || value === PLACEHOLDER) {
  2412. array[index] = PLACEHOLDER;
  2413. result[resIndex++] = index;
  2414. }
  2415. }
  2416. return result;
  2417. }
  2418. /**
  2419. * Converts `set` to an array of its values.
  2420. *
  2421. * @private
  2422. * @param {Object} set The set to convert.
  2423. * @returns {Array} Returns the values.
  2424. */
  2425. function setToArray(set) {
  2426. var index = -1,
  2427. result = Array(set.size);
  2428. set.forEach(function(value) {
  2429. result[++index] = value;
  2430. });
  2431. return result;
  2432. }
  2433. /**
  2434. * Converts `set` to its value-value pairs.
  2435. *
  2436. * @private
  2437. * @param {Object} set The set to convert.
  2438. * @returns {Array} Returns the value-value pairs.
  2439. */
  2440. function setToPairs(set) {
  2441. var index = -1,
  2442. result = Array(set.size);
  2443. set.forEach(function(value) {
  2444. result[++index] = [value, value];
  2445. });
  2446. return result;
  2447. }
  2448. /**
  2449. * A specialized version of `_.indexOf` which performs strict equality
  2450. * comparisons of values, i.e. `===`.
  2451. *
  2452. * @private
  2453. * @param {Array} array The array to inspect.
  2454. * @param {*} value The value to search for.
  2455. * @param {number} fromIndex The index to search from.
  2456. * @returns {number} Returns the index of the matched value, else `-1`.
  2457. */
  2458. function strictIndexOf(array, value, fromIndex) {
  2459. var index = fromIndex - 1,
  2460. length = array.length;
  2461. while (++index < length) {
  2462. if (array[index] === value) {
  2463. return index;
  2464. }
  2465. }
  2466. return -1;
  2467. }
  2468. /**
  2469. * A specialized version of `_.lastIndexOf` which performs strict equality
  2470. * comparisons of values, i.e. `===`.
  2471. *
  2472. * @private
  2473. * @param {Array} array The array to inspect.
  2474. * @param {*} value The value to search for.
  2475. * @param {number} fromIndex The index to search from.
  2476. * @returns {number} Returns the index of the matched value, else `-1`.
  2477. */
  2478. function strictLastIndexOf(array, value, fromIndex) {
  2479. var index = fromIndex + 1;
  2480. while (index--) {
  2481. if (array[index] === value) {
  2482. return index;
  2483. }
  2484. }
  2485. return index;
  2486. }
  2487. /**
  2488. * Gets the number of symbols in `string`.
  2489. *
  2490. * @private
  2491. * @param {string} string The string to inspect.
  2492. * @returns {number} Returns the string size.
  2493. */
  2494. function stringSize(string) {
  2495. return hasUnicode(string)
  2496. ? unicodeSize(string)
  2497. : asciiSize(string);
  2498. }
  2499. /**
  2500. * Converts `string` to an array.
  2501. *
  2502. * @private
  2503. * @param {string} string The string to convert.
  2504. * @returns {Array} Returns the converted array.
  2505. */
  2506. function stringToArray(string) {
  2507. return hasUnicode(string)
  2508. ? unicodeToArray(string)
  2509. : asciiToArray(string);
  2510. }
  2511. /**
  2512. * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
  2513. * character of `string`.
  2514. *
  2515. * @private
  2516. * @param {string} string The string to inspect.
  2517. * @returns {number} Returns the index of the last non-whitespace character.
  2518. */
  2519. function trimmedEndIndex(string) {
  2520. var index = string.length;
  2521. while (index-- && reWhitespace.test(string.charAt(index))) {}
  2522. return index;
  2523. }
  2524. /**
  2525. * Used by `_.unescape` to convert HTML entities to characters.
  2526. *
  2527. * @private
  2528. * @param {string} chr The matched character to unescape.
  2529. * @returns {string} Returns the unescaped character.
  2530. */
  2531. var unescapeHtmlChar = basePropertyOf(htmlUnescapes);
  2532. /**
  2533. * Gets the size of a Unicode `string`.
  2534. *
  2535. * @private
  2536. * @param {string} string The string inspect.
  2537. * @returns {number} Returns the string size.
  2538. */
  2539. function unicodeSize(string) {
  2540. var result = reUnicode.lastIndex = 0;
  2541. while (reUnicode.test(string)) {
  2542. ++result;
  2543. }
  2544. return result;
  2545. }
  2546. /**
  2547. * Converts a Unicode `string` to an array.
  2548. *
  2549. * @private
  2550. * @param {string} string The string to convert.
  2551. * @returns {Array} Returns the converted array.
  2552. */
  2553. function unicodeToArray(string) {
  2554. return string.match(reUnicode) || [];
  2555. }
  2556. /**
  2557. * Splits a Unicode `string` into an array of its words.
  2558. *
  2559. * @private
  2560. * @param {string} The string to inspect.
  2561. * @returns {Array} Returns the words of `string`.
  2562. */
  2563. function unicodeWords(string) {
  2564. return string.match(reUnicodeWord) || [];
  2565. }
  2566. /*--------------------------------------------------------------------------*/
  2567. /**
  2568. * Create a new pristine `lodash` function using the `context` object.
  2569. *
  2570. * @static
  2571. * @memberOf _
  2572. * @since 1.1.0
  2573. * @category Util
  2574. * @param {Object} [context=root] The context object.
  2575. * @returns {Function} Returns a new `lodash` function.
  2576. * @example
  2577. *
  2578. * _.mixin({ 'foo': _.constant('foo') });
  2579. *
  2580. * var lodash = _.runInContext();
  2581. * lodash.mixin({ 'bar': lodash.constant('bar') });
  2582. *
  2583. * _.isFunction(_.foo);
  2584. * // => true
  2585. * _.isFunction(_.bar);
  2586. * // => false
  2587. *
  2588. * lodash.isFunction(lodash.foo);
  2589. * // => false
  2590. * lodash.isFunction(lodash.bar);
  2591. * // => true
  2592. *
  2593. * // Create a suped-up `defer` in Node.js.
  2594. * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;
  2595. */
  2596. var runInContext = (function runInContext(context) {
  2597. context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));
  2598. /** Built-in constructor references. */
  2599. var Array = context.Array,
  2600. Date = context.Date,
  2601. Error = context.Error,
  2602. Function = context.Function,
  2603. Math = context.Math,
  2604. Object = context.Object,
  2605. RegExp = context.RegExp,
  2606. String = context.String,
  2607. TypeError = context.TypeError;
  2608. /** Used for built-in method references. */
  2609. var arrayProto = Array.prototype,
  2610. funcProto = Function.prototype,
  2611. objectProto = Object.prototype;
  2612. /** Used to detect overreaching core-js shims. */
  2613. var coreJsData = context['__core-js_shared__'];
  2614. /** Used to resolve the decompiled source of functions. */
  2615. var funcToString = funcProto.toString;
  2616. /** Used to check objects for own properties. */
  2617. var hasOwnProperty = objectProto.hasOwnProperty;
  2618. /** Used to generate unique IDs. */
  2619. var idCounter = 0;
  2620. /** Used to detect methods masquerading as native. */
  2621. var maskSrcKey = (function() {
  2622. var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
  2623. return uid ? ('Symbol(src)_1.' + uid) : '';
  2624. }());
  2625. /**
  2626. * Used to resolve the
  2627. * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
  2628. * of values.
  2629. */
  2630. var nativeObjectToString = objectProto.toString;
  2631. /** Used to infer the `Object` constructor. */
  2632. var objectCtorString = funcToString.call(Object);
  2633. /** Used to restore the original `_` reference in `_.noConflict`. */
  2634. var oldDash = root._;
  2635. /** Used to detect if a method is native. */
  2636. var reIsNative = RegExp('^' +
  2637. funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
  2638. .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
  2639. );
  2640. /** Built-in value references. */
  2641. var Buffer = moduleExports ? context.Buffer : undefined,
  2642. Symbol = context.Symbol,
  2643. Uint8Array = context.Uint8Array,
  2644. allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,
  2645. getPrototype = overArg(Object.getPrototypeOf, Object),
  2646. objectCreate = Object.create,
  2647. propertyIsEnumerable = objectProto.propertyIsEnumerable,
  2648. splice = arrayProto.splice,
  2649. spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,
  2650. symIterator = Symbol ? Symbol.iterator : undefined,
  2651. symToStringTag = Symbol ? Symbol.toStringTag : undefined;
  2652. var defineProperty = (function() {
  2653. try {
  2654. var func = getNative(Object, 'defineProperty');
  2655. func({}, '', {});
  2656. return func;
  2657. } catch (e) {}
  2658. }());
  2659. /** Mocked built-ins. */
  2660. var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,
  2661. ctxNow = Date && Date.now !== root.Date.now && Date.now,
  2662. ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
  2663. /* Built-in method references for those with the same name as other `lodash` methods. */
  2664. var nativeCeil = Math.ceil,
  2665. nativeFloor = Math.floor,
  2666. nativeGetSymbols = Object.getOwnPropertySymbols,
  2667. nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
  2668. nativeIsFinite = context.isFinite,
  2669. nativeJoin = arrayProto.join,
  2670. nativeKeys = overArg(Object.keys, Object),
  2671. nativeMax = Math.max,
  2672. nativeMin = Math.min,
  2673. nativeNow = Date.now,
  2674. nativeParseInt = context.parseInt,
  2675. nativeRandom = Math.random,
  2676. nativeReverse = arrayProto.reverse;
  2677. /* Built-in method references that are verified to be native. */
  2678. var DataView = getNative(context, 'DataView'),
  2679. Map = getNative(context, 'Map'),
  2680. Promise = getNative(context, 'Promise'),
  2681. Set = getNative(context, 'Set'),
  2682. WeakMap = getNative(context, 'WeakMap'),
  2683. nativeCreate = getNative(Object, 'create');
  2684. /** Used to store function metadata. */
  2685. var metaMap = WeakMap && new WeakMap;
  2686. /** Used to lookup unminified function names. */
  2687. var realNames = {};
  2688. /** Used to detect maps, sets, and weakmaps. */
  2689. var dataViewCtorString = toSource(DataView),
  2690. mapCtorString = toSource(Map),
  2691. promiseCtorString = toSource(Promise),
  2692. setCtorString = toSource(Set),
  2693. weakMapCtorString = toSource(WeakMap);
  2694. /** Used to convert symbols to primitives and strings. */
  2695. var symbolProto = Symbol ? Symbol.prototype : undefined,
  2696. symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,
  2697. symbolToString = symbolProto ? symbolProto.toString : undefined;
  2698. /*------------------------------------------------------------------------*/
  2699. /**
  2700. * Creates a `lodash` object which wraps `value` to enable implicit method
  2701. * chain sequences. Methods that operate on and return arrays, collections,
  2702. * and functions can be chained together. Methods that retrieve a single value
  2703. * or may return a primitive value will automatically end the chain sequence
  2704. * and return the unwrapped value. Otherwise, the value must be unwrapped
  2705. * with `_#value`.
  2706. *
  2707. * Explicit chain sequences, which must be unwrapped with `_#value`, may be
  2708. * enabled using `_.chain`.
  2709. *
  2710. * The execution of chained methods is lazy, that is, it's deferred until
  2711. * `_#value` is implicitly or explicitly called.
  2712. *
  2713. * Lazy evaluation allows several methods to support shortcut fusion.
  2714. * Shortcut fusion is an optimization to merge iteratee calls; this avoids
  2715. * the creation of intermediate arrays and can greatly reduce the number of
  2716. * iteratee executions. Sections of a chain sequence qualify for shortcut
  2717. * fusion if the section is applied to an array and iteratees accept only
  2718. * one argument. The heuristic for whether a section qualifies for shortcut
  2719. * fusion is subject to change.
  2720. *
  2721. * Chaining is supported in custom builds as long as the `_#value` method is
  2722. * directly or indirectly included in the build.
  2723. *
  2724. * In addition to lodash methods, wrappers have `Array` and `String` methods.
  2725. *
  2726. * The wrapper `Array` methods are:
  2727. * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`
  2728. *
  2729. * The wrapper `String` methods are:
  2730. * `replace` and `split`
  2731. *
  2732. * The wrapper methods that support shortcut fusion are:
  2733. * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,
  2734. * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,
  2735. * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`
  2736. *
  2737. * The chainable wrapper methods are:
  2738. * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,
  2739. * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,
  2740. * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,
  2741. * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,
  2742. * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,
  2743. * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,
  2744. * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,
  2745. * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,
  2746. * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,
  2747. * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,
  2748. * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,
  2749. * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,
  2750. * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,
  2751. * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,
  2752. * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,
  2753. * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,
  2754. * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,
  2755. * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,
  2756. * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,
  2757. * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,
  2758. * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,
  2759. * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,
  2760. * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,
  2761. * `zipObject`, `zipObjectDeep`, and `zipWith`
  2762. *
  2763. * The wrapper methods that are **not** chainable by default are:
  2764. * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,
  2765. * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,
  2766. * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,
  2767. * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,
  2768. * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,
  2769. * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,
  2770. * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,
  2771. * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,
  2772. * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,
  2773. * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,
  2774. * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,
  2775. * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,
  2776. * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,
  2777. * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,
  2778. * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,
  2779. * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,
  2780. * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,
  2781. * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,
  2782. * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,
  2783. * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,
  2784. * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,
  2785. * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,
  2786. * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,
  2787. * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,
  2788. * `upperFirst`, `value`, and `words`
  2789. *
  2790. * @name _
  2791. * @constructor
  2792. * @category Seq
  2793. * @param {*} value The value to wrap in a `lodash` instance.
  2794. * @returns {Object} Returns the new `lodash` wrapper instance.
  2795. * @example
  2796. *
  2797. * function square(n) {
  2798. * return n * n;
  2799. * }
  2800. *
  2801. * var wrapped = _([1, 2, 3]);
  2802. *
  2803. * // Returns an unwrapped value.
  2804. * wrapped.reduce(_.add);
  2805. * // => 6
  2806. *
  2807. * // Returns a wrapped value.
  2808. * var squares = wrapped.map(square);
  2809. *
  2810. * _.isArray(squares);
  2811. * // => false
  2812. *
  2813. * _.isArray(squares.value());
  2814. * // => true
  2815. */
  2816. function lodash(value) {
  2817. if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
  2818. if (value instanceof LodashWrapper) {
  2819. return value;
  2820. }
  2821. if (hasOwnProperty.call(value, '__wrapped__')) {
  2822. return wrapperClone(value);
  2823. }
  2824. }
  2825. return new LodashWrapper(value);
  2826. }
  2827. /**
  2828. * The base implementation of `_.create` without support for assigning
  2829. * properties to the created object.
  2830. *
  2831. * @private
  2832. * @param {Object} proto The object to inherit from.
  2833. * @returns {Object} Returns the new object.
  2834. */
  2835. var baseCreate = (function() {
  2836. function object() {}
  2837. return function(proto) {
  2838. if (!isObject(proto)) {
  2839. return {};
  2840. }
  2841. if (objectCreate) {
  2842. return objectCreate(proto);
  2843. }
  2844. object.prototype = proto;
  2845. var result = new object;
  2846. object.prototype = undefined;
  2847. return result;
  2848. };
  2849. }());
  2850. /**
  2851. * The function whose prototype chain sequence wrappers inherit from.
  2852. *
  2853. * @private
  2854. */
  2855. function baseLodash() {
  2856. // No operation performed.
  2857. }
  2858. /**
  2859. * The base constructor for creating `lodash` wrapper objects.
  2860. *
  2861. * @private
  2862. * @param {*} value The value to wrap.
  2863. * @param {boolean} [chainAll] Enable explicit method chain sequences.
  2864. */
  2865. function LodashWrapper(value, chainAll) {
  2866. this.__wrapped__ = value;
  2867. this.__actions__ = [];
  2868. this.__chain__ = !!chainAll;
  2869. this.__index__ = 0;
  2870. this.__values__ = undefined;
  2871. }
  2872. /**
  2873. * By default, the template delimiters used by lodash are like those in
  2874. * embedded Ruby (ERB) as well as ES2015 template strings. Change the
  2875. * following template settings to use alternative delimiters.
  2876. *
  2877. * @static
  2878. * @memberOf _
  2879. * @type {Object}
  2880. */
  2881. lodash.templateSettings = {
  2882. /**
  2883. * Used to detect `data` property values to be HTML-escaped.
  2884. *
  2885. * @memberOf _.templateSettings
  2886. * @type {RegExp}
  2887. */
  2888. 'escape': reEscape,
  2889. /**
  2890. * Used to detect code to be evaluated.
  2891. *
  2892. * @memberOf _.templateSettings
  2893. * @type {RegExp}
  2894. */
  2895. 'evaluate': reEvaluate,
  2896. /**
  2897. * Used to detect `data` property values to inject.
  2898. *
  2899. * @memberOf _.templateSettings
  2900. * @type {RegExp}
  2901. */
  2902. 'interpolate': reInterpolate,
  2903. /**
  2904. * Used to reference the data object in the template text.
  2905. *
  2906. * @memberOf _.templateSettings
  2907. * @type {string}
  2908. */
  2909. 'variable': '',
  2910. /**
  2911. * Used to import variables into the compiled template.
  2912. *
  2913. * @memberOf _.templateSettings
  2914. * @type {Object}
  2915. */
  2916. 'imports': {
  2917. /**
  2918. * A reference to the `lodash` function.
  2919. *
  2920. * @memberOf _.templateSettings.imports
  2921. * @type {Function}
  2922. */
  2923. '_': lodash
  2924. }
  2925. };
  2926. // Ensure wrappers are instances of `baseLodash`.
  2927. lodash.prototype = baseLodash.prototype;
  2928. lodash.prototype.constructor = lodash;
  2929. LodashWrapper.prototype = baseCreate(baseLodash.prototype);
  2930. LodashWrapper.prototype.constructor = LodashWrapper;
  2931. /*------------------------------------------------------------------------*/
  2932. /**
  2933. * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.
  2934. *
  2935. * @private
  2936. * @constructor
  2937. * @param {*} value The value to wrap.
  2938. */
  2939. function LazyWrapper(value) {
  2940. this.__wrapped__ = value;
  2941. this.__actions__ = [];
  2942. this.__dir__ = 1;
  2943. this.__filtered__ = false;
  2944. this.__iteratees__ = [];
  2945. this.__takeCount__ = MAX_ARRAY_LENGTH;
  2946. this.__views__ = [];
  2947. }
  2948. /**
  2949. * Creates a clone of the lazy wrapper object.
  2950. *
  2951. * @private
  2952. * @name clone
  2953. * @memberOf LazyWrapper
  2954. * @returns {Object} Returns the cloned `LazyWrapper` object.
  2955. */
  2956. function lazyClone() {
  2957. var result = new LazyWrapper(this.__wrapped__);
  2958. result.__actions__ = copyArray(this.__actions__);
  2959. result.__dir__ = this.__dir__;
  2960. result.__filtered__ = this.__filtered__;
  2961. result.__iteratees__ = copyArray(this.__iteratees__);
  2962. result.__takeCount__ = this.__takeCount__;
  2963. result.__views__ = copyArray(this.__views__);
  2964. return result;
  2965. }
  2966. /**
  2967. * Reverses the direction of lazy iteration.
  2968. *
  2969. * @private
  2970. * @name reverse
  2971. * @memberOf LazyWrapper
  2972. * @returns {Object} Returns the new reversed `LazyWrapper` object.
  2973. */
  2974. function lazyReverse() {
  2975. if (this.__filtered__) {
  2976. var result = new LazyWrapper(this);
  2977. result.__dir__ = -1;
  2978. result.__filtered__ = true;
  2979. } else {
  2980. result = this.clone();
  2981. result.__dir__ *= -1;
  2982. }
  2983. return result;
  2984. }
  2985. /**
  2986. * Extracts the unwrapped value from its lazy wrapper.
  2987. *
  2988. * @private
  2989. * @name value
  2990. * @memberOf LazyWrapper
  2991. * @returns {*} Returns the unwrapped value.
  2992. */
  2993. function lazyValue() {
  2994. var array = this.__wrapped__.value(),
  2995. dir = this.__dir__,
  2996. isArr = isArray(array),
  2997. isRight = dir < 0,
  2998. arrLength = isArr ? array.length : 0,
  2999. view = getView(0, arrLength, this.__views__),
  3000. start = view.start,
  3001. end = view.end,
  3002. length = end - start,
  3003. index = isRight ? end : (start - 1),
  3004. iteratees = this.__iteratees__,
  3005. iterLength = iteratees.length,
  3006. resIndex = 0,
  3007. takeCount = nativeMin(length, this.__takeCount__);
  3008. if (!isArr || (!isRight && arrLength == length && takeCount == length)) {
  3009. return baseWrapperValue(array, this.__actions__);
  3010. }
  3011. var result = [];
  3012. outer:
  3013. while (length-- && resIndex < takeCount) {
  3014. index += dir;
  3015. var iterIndex = -1,
  3016. value = array[index];
  3017. while (++iterIndex < iterLength) {
  3018. var data = iteratees[iterIndex],
  3019. iteratee = data.iteratee,
  3020. type = data.type,
  3021. computed = iteratee(value);
  3022. if (type == LAZY_MAP_FLAG) {
  3023. value = computed;
  3024. } else if (!computed) {
  3025. if (type == LAZY_FILTER_FLAG) {
  3026. continue outer;
  3027. } else {
  3028. break outer;
  3029. }
  3030. }
  3031. }
  3032. result[resIndex++] = value;
  3033. }
  3034. return result;
  3035. }
  3036. // Ensure `LazyWrapper` is an instance of `baseLodash`.
  3037. LazyWrapper.prototype = baseCreate(baseLodash.prototype);
  3038. LazyWrapper.prototype.constructor = LazyWrapper;
  3039. /*------------------------------------------------------------------------*/
  3040. /**
  3041. * Creates a hash object.
  3042. *
  3043. * @private
  3044. * @constructor
  3045. * @param {Array} [entries] The key-value pairs to cache.
  3046. */
  3047. function Hash(entries) {
  3048. var index = -1,
  3049. length = entries == null ? 0 : entries.length;
  3050. this.clear();
  3051. while (++index < length) {
  3052. var entry = entries[index];
  3053. this.set(entry[0], entry[1]);
  3054. }
  3055. }
  3056. /**
  3057. * Removes all key-value entries from the hash.
  3058. *
  3059. * @private
  3060. * @name clear
  3061. * @memberOf Hash
  3062. */
  3063. function hashClear() {
  3064. this.__data__ = nativeCreate ? nativeCreate(null) : {};
  3065. this.size = 0;
  3066. }
  3067. /**
  3068. * Removes `key` and its value from the hash.
  3069. *
  3070. * @private
  3071. * @name delete
  3072. * @memberOf Hash
  3073. * @param {Object} hash The hash to modify.
  3074. * @param {string} key The key of the value to remove.
  3075. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  3076. */
  3077. function hashDelete(key) {
  3078. var result = this.has(key) && delete this.__data__[key];
  3079. this.size -= result ? 1 : 0;
  3080. return result;
  3081. }
  3082. /**
  3083. * Gets the hash value for `key`.
  3084. *
  3085. * @private
  3086. * @name get
  3087. * @memberOf Hash
  3088. * @param {string} key The key of the value to get.
  3089. * @returns {*} Returns the entry value.
  3090. */
  3091. function hashGet(key) {
  3092. var data = this.__data__;
  3093. if (nativeCreate) {
  3094. var result = data[key];
  3095. return result === HASH_UNDEFINED ? undefined : result;
  3096. }
  3097. return hasOwnProperty.call(data, key) ? data[key] : undefined;
  3098. }
  3099. /**
  3100. * Checks if a hash value for `key` exists.
  3101. *
  3102. * @private
  3103. * @name has
  3104. * @memberOf Hash
  3105. * @param {string} key The key of the entry to check.
  3106. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  3107. */
  3108. function hashHas(key) {
  3109. var data = this.__data__;
  3110. return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
  3111. }
  3112. /**
  3113. * Sets the hash `key` to `value`.
  3114. *
  3115. * @private
  3116. * @name set
  3117. * @memberOf Hash
  3118. * @param {string} key The key of the value to set.
  3119. * @param {*} value The value to set.
  3120. * @returns {Object} Returns the hash instance.
  3121. */
  3122. function hashSet(key, value) {
  3123. var data = this.__data__;
  3124. this.size += this.has(key) ? 0 : 1;
  3125. data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
  3126. return this;
  3127. }
  3128. // Add methods to `Hash`.
  3129. Hash.prototype.clear = hashClear;
  3130. Hash.prototype['delete'] = hashDelete;
  3131. Hash.prototype.get = hashGet;
  3132. Hash.prototype.has = hashHas;
  3133. Hash.prototype.set = hashSet;
  3134. /*------------------------------------------------------------------------*/
  3135. /**
  3136. * Creates an list cache object.
  3137. *
  3138. * @private
  3139. * @constructor
  3140. * @param {Array} [entries] The key-value pairs to cache.
  3141. */
  3142. function ListCache(entries) {
  3143. var index = -1,
  3144. length = entries == null ? 0 : entries.length;
  3145. this.clear();
  3146. while (++index < length) {
  3147. var entry = entries[index];
  3148. this.set(entry[0], entry[1]);
  3149. }
  3150. }
  3151. /**
  3152. * Removes all key-value entries from the list cache.
  3153. *
  3154. * @private
  3155. * @name clear
  3156. * @memberOf ListCache
  3157. */
  3158. function listCacheClear() {
  3159. this.__data__ = [];
  3160. this.size = 0;
  3161. }
  3162. /**
  3163. * Removes `key` and its value from the list cache.
  3164. *
  3165. * @private
  3166. * @name delete
  3167. * @memberOf ListCache
  3168. * @param {string} key The key of the value to remove.
  3169. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  3170. */
  3171. function listCacheDelete(key) {
  3172. var data = this.__data__,
  3173. index = assocIndexOf(data, key);
  3174. if (index < 0) {
  3175. return false;
  3176. }
  3177. var lastIndex = data.length - 1;
  3178. if (index == lastIndex) {
  3179. data.pop();
  3180. } else {
  3181. splice.call(data, index, 1);
  3182. }
  3183. --this.size;
  3184. return true;
  3185. }
  3186. /**
  3187. * Gets the list cache value for `key`.
  3188. *
  3189. * @private
  3190. * @name get
  3191. * @memberOf ListCache
  3192. * @param {string} key The key of the value to get.
  3193. * @returns {*} Returns the entry value.
  3194. */
  3195. function listCacheGet(key) {
  3196. var data = this.__data__,
  3197. index = assocIndexOf(data, key);
  3198. return index < 0 ? undefined : data[index][1];
  3199. }
  3200. /**
  3201. * Checks if a list cache value for `key` exists.
  3202. *
  3203. * @private
  3204. * @name has
  3205. * @memberOf ListCache
  3206. * @param {string} key The key of the entry to check.
  3207. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  3208. */
  3209. function listCacheHas(key) {
  3210. return assocIndexOf(this.__data__, key) > -1;
  3211. }
  3212. /**
  3213. * Sets the list cache `key` to `value`.
  3214. *
  3215. * @private
  3216. * @name set
  3217. * @memberOf ListCache
  3218. * @param {string} key The key of the value to set.
  3219. * @param {*} value The value to set.
  3220. * @returns {Object} Returns the list cache instance.
  3221. */
  3222. function listCacheSet(key, value) {
  3223. var data = this.__data__,
  3224. index = assocIndexOf(data, key);
  3225. if (index < 0) {
  3226. ++this.size;
  3227. data.push([key, value]);
  3228. } else {
  3229. data[index][1] = value;
  3230. }
  3231. return this;
  3232. }
  3233. // Add methods to `ListCache`.
  3234. ListCache.prototype.clear = listCacheClear;
  3235. ListCache.prototype['delete'] = listCacheDelete;
  3236. ListCache.prototype.get = listCacheGet;
  3237. ListCache.prototype.has = listCacheHas;
  3238. ListCache.prototype.set = listCacheSet;
  3239. /*------------------------------------------------------------------------*/
  3240. /**
  3241. * Creates a map cache object to store key-value pairs.
  3242. *
  3243. * @private
  3244. * @constructor
  3245. * @param {Array} [entries] The key-value pairs to cache.
  3246. */
  3247. function MapCache(entries) {
  3248. var index = -1,
  3249. length = entries == null ? 0 : entries.length;
  3250. this.clear();
  3251. while (++index < length) {
  3252. var entry = entries[index];
  3253. this.set(entry[0], entry[1]);
  3254. }
  3255. }
  3256. /**
  3257. * Removes all key-value entries from the map.
  3258. *
  3259. * @private
  3260. * @name clear
  3261. * @memberOf MapCache
  3262. */
  3263. function mapCacheClear() {
  3264. this.size = 0;
  3265. this.__data__ = {
  3266. 'hash': new Hash,
  3267. 'map': new (Map || ListCache),
  3268. 'string': new Hash
  3269. };
  3270. }
  3271. /**
  3272. * Removes `key` and its value from the map.
  3273. *
  3274. * @private
  3275. * @name delete
  3276. * @memberOf MapCache
  3277. * @param {string} key The key of the value to remove.
  3278. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  3279. */
  3280. function mapCacheDelete(key) {
  3281. var result = getMapData(this, key)['delete'](key);
  3282. this.size -= result ? 1 : 0;
  3283. return result;
  3284. }
  3285. /**
  3286. * Gets the map value for `key`.
  3287. *
  3288. * @private
  3289. * @name get
  3290. * @memberOf MapCache
  3291. * @param {string} key The key of the value to get.
  3292. * @returns {*} Returns the entry value.
  3293. */
  3294. function mapCacheGet(key) {
  3295. return getMapData(this, key).get(key);
  3296. }
  3297. /**
  3298. * Checks if a map value for `key` exists.
  3299. *
  3300. * @private
  3301. * @name has
  3302. * @memberOf MapCache
  3303. * @param {string} key The key of the entry to check.
  3304. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  3305. */
  3306. function mapCacheHas(key) {
  3307. return getMapData(this, key).has(key);
  3308. }
  3309. /**
  3310. * Sets the map `key` to `value`.
  3311. *
  3312. * @private
  3313. * @name set
  3314. * @memberOf MapCache
  3315. * @param {string} key The key of the value to set.
  3316. * @param {*} value The value to set.
  3317. * @returns {Object} Returns the map cache instance.
  3318. */
  3319. function mapCacheSet(key, value) {
  3320. var data = getMapData(this, key),
  3321. size = data.size;
  3322. data.set(key, value);
  3323. this.size += data.size == size ? 0 : 1;
  3324. return this;
  3325. }
  3326. // Add methods to `MapCache`.
  3327. MapCache.prototype.clear = mapCacheClear;
  3328. MapCache.prototype['delete'] = mapCacheDelete;
  3329. MapCache.prototype.get = mapCacheGet;
  3330. MapCache.prototype.has = mapCacheHas;
  3331. MapCache.prototype.set = mapCacheSet;
  3332. /*------------------------------------------------------------------------*/
  3333. /**
  3334. *
  3335. * Creates an array cache object to store unique values.
  3336. *
  3337. * @private
  3338. * @constructor
  3339. * @param {Array} [values] The values to cache.
  3340. */
  3341. function SetCache(values) {
  3342. var index = -1,
  3343. length = values == null ? 0 : values.length;
  3344. this.__data__ = new MapCache;
  3345. while (++index < length) {
  3346. this.add(values[index]);
  3347. }
  3348. }
  3349. /**
  3350. * Adds `value` to the array cache.
  3351. *
  3352. * @private
  3353. * @name add
  3354. * @memberOf SetCache
  3355. * @alias push
  3356. * @param {*} value The value to cache.
  3357. * @returns {Object} Returns the cache instance.
  3358. */
  3359. function setCacheAdd(value) {
  3360. this.__data__.set(value, HASH_UNDEFINED);
  3361. return this;
  3362. }
  3363. /**
  3364. * Checks if `value` is in the array cache.
  3365. *
  3366. * @private
  3367. * @name has
  3368. * @memberOf SetCache
  3369. * @param {*} value The value to search for.
  3370. * @returns {number} Returns `true` if `value` is found, else `false`.
  3371. */
  3372. function setCacheHas(value) {
  3373. return this.__data__.has(value);
  3374. }
  3375. // Add methods to `SetCache`.
  3376. SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
  3377. SetCache.prototype.has = setCacheHas;
  3378. /*------------------------------------------------------------------------*/
  3379. /**
  3380. * Creates a stack cache object to store key-value pairs.
  3381. *
  3382. * @private
  3383. * @constructor
  3384. * @param {Array} [entries] The key-value pairs to cache.
  3385. */
  3386. function Stack(entries) {
  3387. var data = this.__data__ = new ListCache(entries);
  3388. this.size = data.size;
  3389. }
  3390. /**
  3391. * Removes all key-value entries from the stack.
  3392. *
  3393. * @private
  3394. * @name clear
  3395. * @memberOf Stack
  3396. */
  3397. function stackClear() {
  3398. this.__data__ = new ListCache;
  3399. this.size = 0;
  3400. }
  3401. /**
  3402. * Removes `key` and its value from the stack.
  3403. *
  3404. * @private
  3405. * @name delete
  3406. * @memberOf Stack
  3407. * @param {string} key The key of the value to remove.
  3408. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  3409. */
  3410. function stackDelete(key) {
  3411. var data = this.__data__,
  3412. result = data['delete'](key);
  3413. this.size = data.size;
  3414. return result;
  3415. }
  3416. /**
  3417. * Gets the stack value for `key`.
  3418. *
  3419. * @private
  3420. * @name get
  3421. * @memberOf Stack
  3422. * @param {string} key The key of the value to get.
  3423. * @returns {*} Returns the entry value.
  3424. */
  3425. function stackGet(key) {
  3426. return this.__data__.get(key);
  3427. }
  3428. /**
  3429. * Checks if a stack value for `key` exists.
  3430. *
  3431. * @private
  3432. * @name has
  3433. * @memberOf Stack
  3434. * @param {string} key The key of the entry to check.
  3435. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  3436. */
  3437. function stackHas(key) {
  3438. return this.__data__.has(key);
  3439. }
  3440. /**
  3441. * Sets the stack `key` to `value`.
  3442. *
  3443. * @private
  3444. * @name set
  3445. * @memberOf Stack
  3446. * @param {string} key The key of the value to set.
  3447. * @param {*} value The value to set.
  3448. * @returns {Object} Returns the stack cache instance.
  3449. */
  3450. function stackSet(key, value) {
  3451. var data = this.__data__;
  3452. if (data instanceof ListCache) {
  3453. var pairs = data.__data__;
  3454. if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
  3455. pairs.push([key, value]);
  3456. this.size = ++data.size;
  3457. return this;
  3458. }
  3459. data = this.__data__ = new MapCache(pairs);
  3460. }
  3461. data.set(key, value);
  3462. this.size = data.size;
  3463. return this;
  3464. }
  3465. // Add methods to `Stack`.
  3466. Stack.prototype.clear = stackClear;
  3467. Stack.prototype['delete'] = stackDelete;
  3468. Stack.prototype.get = stackGet;
  3469. Stack.prototype.has = stackHas;
  3470. Stack.prototype.set = stackSet;
  3471. /*------------------------------------------------------------------------*/
  3472. /**
  3473. * Creates an array of the enumerable property names of the array-like `value`.
  3474. *
  3475. * @private
  3476. * @param {*} value The value to query.
  3477. * @param {boolean} inherited Specify returning inherited property names.
  3478. * @returns {Array} Returns the array of property names.
  3479. */
  3480. function arrayLikeKeys(value, inherited) {
  3481. var isArr = isArray(value),
  3482. isArg = !isArr && isArguments(value),
  3483. isBuff = !isArr && !isArg && isBuffer(value),
  3484. isType = !isArr && !isArg && !isBuff && isTypedArray(value),
  3485. skipIndexes = isArr || isArg || isBuff || isType,
  3486. result = skipIndexes ? baseTimes(value.length, String) : [],
  3487. length = result.length;
  3488. for (var key in value) {
  3489. if ((inherited || hasOwnProperty.call(value, key)) &&
  3490. !(skipIndexes && (
  3491. // Safari 9 has enumerable `arguments.length` in strict mode.
  3492. key == 'length' ||
  3493. // Node.js 0.10 has enumerable non-index properties on buffers.
  3494. (isBuff && (key == 'offset' || key == 'parent')) ||
  3495. // PhantomJS 2 has enumerable non-index properties on typed arrays.
  3496. (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
  3497. // Skip index properties.
  3498. isIndex(key, length)
  3499. ))) {
  3500. result.push(key);
  3501. }
  3502. }
  3503. return result;
  3504. }
  3505. /**
  3506. * A specialized version of `_.sample` for arrays.
  3507. *
  3508. * @private
  3509. * @param {Array} array The array to sample.
  3510. * @returns {*} Returns the random element.
  3511. */
  3512. function arraySample(array) {
  3513. var length = array.length;
  3514. return length ? array[baseRandom(0, length - 1)] : undefined;
  3515. }
  3516. /**
  3517. * A specialized version of `_.sampleSize` for arrays.
  3518. *
  3519. * @private
  3520. * @param {Array} array The array to sample.
  3521. * @param {number} n The number of elements to sample.
  3522. * @returns {Array} Returns the random elements.
  3523. */
  3524. function arraySampleSize(array, n) {
  3525. return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));
  3526. }
  3527. /**
  3528. * A specialized version of `_.shuffle` for arrays.
  3529. *
  3530. * @private
  3531. * @param {Array} array The array to shuffle.
  3532. * @returns {Array} Returns the new shuffled array.
  3533. */
  3534. function arrayShuffle(array) {
  3535. return shuffleSelf(copyArray(array));
  3536. }
  3537. /**
  3538. * This function is like `assignValue` except that it doesn't assign
  3539. * `undefined` values.
  3540. *
  3541. * @private
  3542. * @param {Object} object The object to modify.
  3543. * @param {string} key The key of the property to assign.
  3544. * @param {*} value The value to assign.
  3545. */
  3546. function assignMergeValue(object, key, value) {
  3547. if ((value !== undefined && !eq(object[key], value)) ||
  3548. (value === undefined && !(key in object))) {
  3549. baseAssignValue(object, key, value);
  3550. }
  3551. }
  3552. /**
  3553. * Assigns `value` to `key` of `object` if the existing value is not equivalent
  3554. * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  3555. * for equality comparisons.
  3556. *
  3557. * @private
  3558. * @param {Object} object The object to modify.
  3559. * @param {string} key The key of the property to assign.
  3560. * @param {*} value The value to assign.
  3561. */
  3562. function assignValue(object, key, value) {
  3563. var objValue = object[key];
  3564. if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
  3565. (value === undefined && !(key in object))) {
  3566. baseAssignValue(object, key, value);
  3567. }
  3568. }
  3569. /**
  3570. * Gets the index at which the `key` is found in `array` of key-value pairs.
  3571. *
  3572. * @private
  3573. * @param {Array} array The array to inspect.
  3574. * @param {*} key The key to search for.
  3575. * @returns {number} Returns the index of the matched value, else `-1`.
  3576. */
  3577. function assocIndexOf(array, key) {
  3578. var length = array.length;
  3579. while (length--) {
  3580. if (eq(array[length][0], key)) {
  3581. return length;
  3582. }
  3583. }
  3584. return -1;
  3585. }
  3586. /**
  3587. * Aggregates elements of `collection` on `accumulator` with keys transformed
  3588. * by `iteratee` and values set by `setter`.
  3589. *
  3590. * @private
  3591. * @param {Array|Object} collection The collection to iterate over.
  3592. * @param {Function} setter The function to set `accumulator` values.
  3593. * @param {Function} iteratee The iteratee to transform keys.
  3594. * @param {Object} accumulator The initial aggregated object.
  3595. * @returns {Function} Returns `accumulator`.
  3596. */
  3597. function baseAggregator(collection, setter, iteratee, accumulator) {
  3598. baseEach(collection, function(value, key, collection) {
  3599. setter(accumulator, value, iteratee(value), collection);
  3600. });
  3601. return accumulator;
  3602. }
  3603. /**
  3604. * The base implementation of `_.assign` without support for multiple sources
  3605. * or `customizer` functions.
  3606. *
  3607. * @private
  3608. * @param {Object} object The destination object.
  3609. * @param {Object} source The source object.
  3610. * @returns {Object} Returns `object`.
  3611. */
  3612. function baseAssign(object, source) {
  3613. return object && copyObject(source, keys(source), object);
  3614. }
  3615. /**
  3616. * The base implementation of `_.assignIn` without support for multiple sources
  3617. * or `customizer` functions.
  3618. *
  3619. * @private
  3620. * @param {Object} object The destination object.
  3621. * @param {Object} source The source object.
  3622. * @returns {Object} Returns `object`.
  3623. */
  3624. function baseAssignIn(object, source) {
  3625. return object && copyObject(source, keysIn(source), object);
  3626. }
  3627. /**
  3628. * The base implementation of `assignValue` and `assignMergeValue` without
  3629. * value checks.
  3630. *
  3631. * @private
  3632. * @param {Object} object The object to modify.
  3633. * @param {string} key The key of the property to assign.
  3634. * @param {*} value The value to assign.
  3635. */
  3636. function baseAssignValue(object, key, value) {
  3637. if (key == '__proto__' && defineProperty) {
  3638. defineProperty(object, key, {
  3639. 'configurable': true,
  3640. 'enumerable': true,
  3641. 'value': value,
  3642. 'writable': true
  3643. });
  3644. } else {
  3645. object[key] = value;
  3646. }
  3647. }
  3648. /**
  3649. * The base implementation of `_.at` without support for individual paths.
  3650. *
  3651. * @private
  3652. * @param {Object} object The object to iterate over.
  3653. * @param {string[]} paths The property paths to pick.
  3654. * @returns {Array} Returns the picked elements.
  3655. */
  3656. function baseAt(object, paths) {
  3657. var index = -1,
  3658. length = paths.length,
  3659. result = Array(length),
  3660. skip = object == null;
  3661. while (++index < length) {
  3662. result[index] = skip ? undefined : get(object, paths[index]);
  3663. }
  3664. return result;
  3665. }
  3666. /**
  3667. * The base implementation of `_.clamp` which doesn't coerce arguments.
  3668. *
  3669. * @private
  3670. * @param {number} number The number to clamp.
  3671. * @param {number} [lower] The lower bound.
  3672. * @param {number} upper The upper bound.
  3673. * @returns {number} Returns the clamped number.
  3674. */
  3675. function baseClamp(number, lower, upper) {
  3676. if (number === number) {
  3677. if (upper !== undefined) {
  3678. number = number <= upper ? number : upper;
  3679. }
  3680. if (lower !== undefined) {
  3681. number = number >= lower ? number : lower;
  3682. }
  3683. }
  3684. return number;
  3685. }
  3686. /**
  3687. * The base implementation of `_.clone` and `_.cloneDeep` which tracks
  3688. * traversed objects.
  3689. *
  3690. * @private
  3691. * @param {*} value The value to clone.
  3692. * @param {boolean} bitmask The bitmask flags.
  3693. * 1 - Deep clone
  3694. * 2 - Flatten inherited properties
  3695. * 4 - Clone symbols
  3696. * @param {Function} [customizer] The function to customize cloning.
  3697. * @param {string} [key] The key of `value`.
  3698. * @param {Object} [object] The parent object of `value`.
  3699. * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
  3700. * @returns {*} Returns the cloned value.
  3701. */
  3702. function baseClone(value, bitmask, customizer, key, object, stack) {
  3703. var result,
  3704. isDeep = bitmask & CLONE_DEEP_FLAG,
  3705. isFlat = bitmask & CLONE_FLAT_FLAG,
  3706. isFull = bitmask & CLONE_SYMBOLS_FLAG;
  3707. if (customizer) {
  3708. result = object ? customizer(value, key, object, stack) : customizer(value);
  3709. }
  3710. if (result !== undefined) {
  3711. return result;
  3712. }
  3713. if (!isObject(value)) {
  3714. return value;
  3715. }
  3716. var isArr = isArray(value);
  3717. if (isArr) {
  3718. result = initCloneArray(value);
  3719. if (!isDeep) {
  3720. return copyArray(value, result);
  3721. }
  3722. } else {
  3723. var tag = getTag(value),
  3724. isFunc = tag == funcTag || tag == genTag;
  3725. if (isBuffer(value)) {
  3726. return cloneBuffer(value, isDeep);
  3727. }
  3728. if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
  3729. result = (isFlat || isFunc) ? {} : initCloneObject(value);
  3730. if (!isDeep) {
  3731. return isFlat
  3732. ? copySymbolsIn(value, baseAssignIn(result, value))
  3733. : copySymbols(value, baseAssign(result, value));
  3734. }
  3735. } else {
  3736. if (!cloneableTags[tag]) {
  3737. return object ? value : {};
  3738. }
  3739. result = initCloneByTag(value, tag, isDeep);
  3740. }
  3741. }
  3742. // Check for circular references and return its corresponding clone.
  3743. stack || (stack = new Stack);
  3744. var stacked = stack.get(value);
  3745. if (stacked) {
  3746. return stacked;
  3747. }
  3748. stack.set(value, result);
  3749. if (isSet(value)) {
  3750. value.forEach(function(subValue) {
  3751. result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
  3752. });
  3753. } else if (isMap(value)) {
  3754. value.forEach(function(subValue, key) {
  3755. result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
  3756. });
  3757. }
  3758. var keysFunc = isFull
  3759. ? (isFlat ? getAllKeysIn : getAllKeys)
  3760. : (isFlat ? keysIn : keys);
  3761. var props = isArr ? undefined : keysFunc(value);
  3762. arrayEach(props || value, function(subValue, key) {
  3763. if (props) {
  3764. key = subValue;
  3765. subValue = value[key];
  3766. }
  3767. // Recursively populate clone (susceptible to call stack limits).
  3768. assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
  3769. });
  3770. return result;
  3771. }
  3772. /**
  3773. * The base implementation of `_.conforms` which doesn't clone `source`.
  3774. *
  3775. * @private
  3776. * @param {Object} source The object of property predicates to conform to.
  3777. * @returns {Function} Returns the new spec function.
  3778. */
  3779. function baseConforms(source) {
  3780. var props = keys(source);
  3781. return function(object) {
  3782. return baseConformsTo(object, source, props);
  3783. };
  3784. }
  3785. /**
  3786. * The base implementation of `_.conformsTo` which accepts `props` to check.
  3787. *
  3788. * @private
  3789. * @param {Object} object The object to inspect.
  3790. * @param {Object} source The object of property predicates to conform to.
  3791. * @returns {boolean} Returns `true` if `object` conforms, else `false`.
  3792. */
  3793. function baseConformsTo(object, source, props) {
  3794. var length = props.length;
  3795. if (object == null) {
  3796. return !length;
  3797. }
  3798. object = Object(object);
  3799. while (length--) {
  3800. var key = props[length],
  3801. predicate = source[key],
  3802. value = object[key];
  3803. if ((value === undefined && !(key in object)) || !predicate(value)) {
  3804. return false;
  3805. }
  3806. }
  3807. return true;
  3808. }
  3809. /**
  3810. * The base implementation of `_.delay` and `_.defer` which accepts `args`
  3811. * to provide to `func`.
  3812. *
  3813. * @private
  3814. * @param {Function} func The function to delay.
  3815. * @param {number} wait The number of milliseconds to delay invocation.
  3816. * @param {Array} args The arguments to provide to `func`.
  3817. * @returns {number|Object} Returns the timer id or timeout object.
  3818. */
  3819. function baseDelay(func, wait, args) {
  3820. if (typeof func != 'function') {
  3821. throw new TypeError(FUNC_ERROR_TEXT);
  3822. }
  3823. return setTimeout(function() { func.apply(undefined, args); }, wait);
  3824. }
  3825. /**
  3826. * The base implementation of methods like `_.difference` without support
  3827. * for excluding multiple arrays or iteratee shorthands.
  3828. *
  3829. * @private
  3830. * @param {Array} array The array to inspect.
  3831. * @param {Array} values The values to exclude.
  3832. * @param {Function} [iteratee] The iteratee invoked per element.
  3833. * @param {Function} [comparator] The comparator invoked per element.
  3834. * @returns {Array} Returns the new array of filtered values.
  3835. */
  3836. function baseDifference(array, values, iteratee, comparator) {
  3837. var index = -1,
  3838. includes = arrayIncludes,
  3839. isCommon = true,
  3840. length = array.length,
  3841. result = [],
  3842. valuesLength = values.length;
  3843. if (!length) {
  3844. return result;
  3845. }
  3846. if (iteratee) {
  3847. values = arrayMap(values, baseUnary(iteratee));
  3848. }
  3849. if (comparator) {
  3850. includes = arrayIncludesWith;
  3851. isCommon = false;
  3852. }
  3853. else if (values.length >= LARGE_ARRAY_SIZE) {
  3854. includes = cacheHas;
  3855. isCommon = false;
  3856. values = new SetCache(values);
  3857. }
  3858. outer:
  3859. while (++index < length) {
  3860. var value = array[index],
  3861. computed = iteratee == null ? value : iteratee(value);
  3862. value = (comparator || value !== 0) ? value : 0;
  3863. if (isCommon && computed === computed) {
  3864. var valuesIndex = valuesLength;
  3865. while (valuesIndex--) {
  3866. if (values[valuesIndex] === computed) {
  3867. continue outer;
  3868. }
  3869. }
  3870. result.push(value);
  3871. }
  3872. else if (!includes(values, computed, comparator)) {
  3873. result.push(value);
  3874. }
  3875. }
  3876. return result;
  3877. }
  3878. /**
  3879. * The base implementation of `_.forEach` without support for iteratee shorthands.
  3880. *
  3881. * @private
  3882. * @param {Array|Object} collection The collection to iterate over.
  3883. * @param {Function} iteratee The function invoked per iteration.
  3884. * @returns {Array|Object} Returns `collection`.
  3885. */
  3886. var baseEach = createBaseEach(baseForOwn);
  3887. /**
  3888. * The base implementation of `_.forEachRight` without support for iteratee shorthands.
  3889. *
  3890. * @private
  3891. * @param {Array|Object} collection The collection to iterate over.
  3892. * @param {Function} iteratee The function invoked per iteration.
  3893. * @returns {Array|Object} Returns `collection`.
  3894. */
  3895. var baseEachRight = createBaseEach(baseForOwnRight, true);
  3896. /**
  3897. * The base implementation of `_.every` without support for iteratee shorthands.
  3898. *
  3899. * @private
  3900. * @param {Array|Object} collection The collection to iterate over.
  3901. * @param {Function} predicate The function invoked per iteration.
  3902. * @returns {boolean} Returns `true` if all elements pass the predicate check,
  3903. * else `false`
  3904. */
  3905. function baseEvery(collection, predicate) {
  3906. var result = true;
  3907. baseEach(collection, function(value, index, collection) {
  3908. result = !!predicate(value, index, collection);
  3909. return result;
  3910. });
  3911. return result;
  3912. }
  3913. /**
  3914. * The base implementation of methods like `_.max` and `_.min` which accepts a
  3915. * `comparator` to determine the extremum value.
  3916. *
  3917. * @private
  3918. * @param {Array} array The array to iterate over.
  3919. * @param {Function} iteratee The iteratee invoked per iteration.
  3920. * @param {Function} comparator The comparator used to compare values.
  3921. * @returns {*} Returns the extremum value.
  3922. */
  3923. function baseExtremum(array, iteratee, comparator) {
  3924. var index = -1,
  3925. length = array.length;
  3926. while (++index < length) {
  3927. var value = array[index],
  3928. current = iteratee(value);
  3929. if (current != null && (computed === undefined
  3930. ? (current === current && !isSymbol(current))
  3931. : comparator(current, computed)
  3932. )) {
  3933. var computed = current,
  3934. result = value;
  3935. }
  3936. }
  3937. return result;
  3938. }
  3939. /**
  3940. * The base implementation of `_.fill` without an iteratee call guard.
  3941. *
  3942. * @private
  3943. * @param {Array} array The array to fill.
  3944. * @param {*} value The value to fill `array` with.
  3945. * @param {number} [start=0] The start position.
  3946. * @param {number} [end=array.length] The end position.
  3947. * @returns {Array} Returns `array`.
  3948. */
  3949. function baseFill(array, value, start, end) {
  3950. var length = array.length;
  3951. start = toInteger(start);
  3952. if (start < 0) {
  3953. start = -start > length ? 0 : (length + start);
  3954. }
  3955. end = (end === undefined || end > length) ? length : toInteger(end);
  3956. if (end < 0) {
  3957. end += length;
  3958. }
  3959. end = start > end ? 0 : toLength(end);
  3960. while (start < end) {
  3961. array[start++] = value;
  3962. }
  3963. return array;
  3964. }
  3965. /**
  3966. * The base implementation of `_.filter` without support for iteratee shorthands.
  3967. *
  3968. * @private
  3969. * @param {Array|Object} collection The collection to iterate over.
  3970. * @param {Function} predicate The function invoked per iteration.
  3971. * @returns {Array} Returns the new filtered array.
  3972. */
  3973. function baseFilter(collection, predicate) {
  3974. var result = [];
  3975. baseEach(collection, function(value, index, collection) {
  3976. if (predicate(value, index, collection)) {
  3977. result.push(value);
  3978. }
  3979. });
  3980. return result;
  3981. }
  3982. /**
  3983. * The base implementation of `_.flatten` with support for restricting flattening.
  3984. *
  3985. * @private
  3986. * @param {Array} array The array to flatten.
  3987. * @param {number} depth The maximum recursion depth.
  3988. * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
  3989. * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
  3990. * @param {Array} [result=[]] The initial result value.
  3991. * @returns {Array} Returns the new flattened array.
  3992. */
  3993. function baseFlatten(array, depth, predicate, isStrict, result) {
  3994. var index = -1,
  3995. length = array.length;
  3996. predicate || (predicate = isFlattenable);
  3997. result || (result = []);
  3998. while (++index < length) {
  3999. var value = array[index];
  4000. if (depth > 0 && predicate(value)) {
  4001. if (depth > 1) {
  4002. // Recursively flatten arrays (susceptible to call stack limits).
  4003. baseFlatten(value, depth - 1, predicate, isStrict, result);
  4004. } else {
  4005. arrayPush(result, value);
  4006. }
  4007. } else if (!isStrict) {
  4008. result[result.length] = value;
  4009. }
  4010. }
  4011. return result;
  4012. }
  4013. /**
  4014. * The base implementation of `baseForOwn` which iterates over `object`
  4015. * properties returned by `keysFunc` and invokes `iteratee` for each property.
  4016. * Iteratee functions may exit iteration early by explicitly returning `false`.
  4017. *
  4018. * @private
  4019. * @param {Object} object The object to iterate over.
  4020. * @param {Function} iteratee The function invoked per iteration.
  4021. * @param {Function} keysFunc The function to get the keys of `object`.
  4022. * @returns {Object} Returns `object`.
  4023. */
  4024. var baseFor = createBaseFor();
  4025. /**
  4026. * This function is like `baseFor` except that it iterates over properties
  4027. * in the opposite order.
  4028. *
  4029. * @private
  4030. * @param {Object} object The object to iterate over.
  4031. * @param {Function} iteratee The function invoked per iteration.
  4032. * @param {Function} keysFunc The function to get the keys of `object`.
  4033. * @returns {Object} Returns `object`.
  4034. */
  4035. var baseForRight = createBaseFor(true);
  4036. /**
  4037. * The base implementation of `_.forOwn` without support for iteratee shorthands.
  4038. *
  4039. * @private
  4040. * @param {Object} object The object to iterate over.
  4041. * @param {Function} iteratee The function invoked per iteration.
  4042. * @returns {Object} Returns `object`.
  4043. */
  4044. function baseForOwn(object, iteratee) {
  4045. return object && baseFor(object, iteratee, keys);
  4046. }
  4047. /**
  4048. * The base implementation of `_.forOwnRight` without support for iteratee shorthands.
  4049. *
  4050. * @private
  4051. * @param {Object} object The object to iterate over.
  4052. * @param {Function} iteratee The function invoked per iteration.
  4053. * @returns {Object} Returns `object`.
  4054. */
  4055. function baseForOwnRight(object, iteratee) {
  4056. return object && baseForRight(object, iteratee, keys);
  4057. }
  4058. /**
  4059. * The base implementation of `_.functions` which creates an array of
  4060. * `object` function property names filtered from `props`.
  4061. *
  4062. * @private
  4063. * @param {Object} object The object to inspect.
  4064. * @param {Array} props The property names to filter.
  4065. * @returns {Array} Returns the function names.
  4066. */
  4067. function baseFunctions(object, props) {
  4068. return arrayFilter(props, function(key) {
  4069. return isFunction(object[key]);
  4070. });
  4071. }
  4072. /**
  4073. * The base implementation of `_.get` without support for default values.
  4074. *
  4075. * @private
  4076. * @param {Object} object The object to query.
  4077. * @param {Array|string} path The path of the property to get.
  4078. * @returns {*} Returns the resolved value.
  4079. */
  4080. function baseGet(object, path) {
  4081. path = castPath(path, object);
  4082. var index = 0,
  4083. length = path.length;
  4084. while (object != null && index < length) {
  4085. object = object[toKey(path[index++])];
  4086. }
  4087. return (index && index == length) ? object : undefined;
  4088. }
  4089. /**
  4090. * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
  4091. * `keysFunc` and `symbolsFunc` to get the enumerable property names and
  4092. * symbols of `object`.
  4093. *
  4094. * @private
  4095. * @param {Object} object The object to query.
  4096. * @param {Function} keysFunc The function to get the keys of `object`.
  4097. * @param {Function} symbolsFunc The function to get the symbols of `object`.
  4098. * @returns {Array} Returns the array of property names and symbols.
  4099. */
  4100. function baseGetAllKeys(object, keysFunc, symbolsFunc) {
  4101. var result = keysFunc(object);
  4102. return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
  4103. }
  4104. /**
  4105. * The base implementation of `getTag` without fallbacks for buggy environments.
  4106. *
  4107. * @private
  4108. * @param {*} value The value to query.
  4109. * @returns {string} Returns the `toStringTag`.
  4110. */
  4111. function baseGetTag(value) {
  4112. if (value == null) {
  4113. return value === undefined ? undefinedTag : nullTag;
  4114. }
  4115. return (symToStringTag && symToStringTag in Object(value))
  4116. ? getRawTag(value)
  4117. : objectToString(value);
  4118. }
  4119. /**
  4120. * The base implementation of `_.gt` which doesn't coerce arguments.
  4121. *
  4122. * @private
  4123. * @param {*} value The value to compare.
  4124. * @param {*} other The other value to compare.
  4125. * @returns {boolean} Returns `true` if `value` is greater than `other`,
  4126. * else `false`.
  4127. */
  4128. function baseGt(value, other) {
  4129. return value > other;
  4130. }
  4131. /**
  4132. * The base implementation of `_.has` without support for deep paths.
  4133. *
  4134. * @private
  4135. * @param {Object} [object] The object to query.
  4136. * @param {Array|string} key The key to check.
  4137. * @returns {boolean} Returns `true` if `key` exists, else `false`.
  4138. */
  4139. function baseHas(object, key) {
  4140. return object != null && hasOwnProperty.call(object, key);
  4141. }
  4142. /**
  4143. * The base implementation of `_.hasIn` without support for deep paths.
  4144. *
  4145. * @private
  4146. * @param {Object} [object] The object to query.
  4147. * @param {Array|string} key The key to check.
  4148. * @returns {boolean} Returns `true` if `key` exists, else `false`.
  4149. */
  4150. function baseHasIn(object, key) {
  4151. return object != null && key in Object(object);
  4152. }
  4153. /**
  4154. * The base implementation of `_.inRange` which doesn't coerce arguments.
  4155. *
  4156. * @private
  4157. * @param {number} number The number to check.
  4158. * @param {number} start The start of the range.
  4159. * @param {number} end The end of the range.
  4160. * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
  4161. */
  4162. function baseInRange(number, start, end) {
  4163. return number >= nativeMin(start, end) && number < nativeMax(start, end);
  4164. }
  4165. /**
  4166. * The base implementation of methods like `_.intersection`, without support
  4167. * for iteratee shorthands, that accepts an array of arrays to inspect.
  4168. *
  4169. * @private
  4170. * @param {Array} arrays The arrays to inspect.
  4171. * @param {Function} [iteratee] The iteratee invoked per element.
  4172. * @param {Function} [comparator] The comparator invoked per element.
  4173. * @returns {Array} Returns the new array of shared values.
  4174. */
  4175. function baseIntersection(arrays, iteratee, comparator) {
  4176. var includes = comparator ? arrayIncludesWith : arrayIncludes,
  4177. length = arrays[0].length,
  4178. othLength = arrays.length,
  4179. othIndex = othLength,
  4180. caches = Array(othLength),
  4181. maxLength = Infinity,
  4182. result = [];
  4183. while (othIndex--) {
  4184. var array = arrays[othIndex];
  4185. if (othIndex && iteratee) {
  4186. array = arrayMap(array, baseUnary(iteratee));
  4187. }
  4188. maxLength = nativeMin(array.length, maxLength);
  4189. caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))
  4190. ? new SetCache(othIndex && array)
  4191. : undefined;
  4192. }
  4193. array = arrays[0];
  4194. var index = -1,
  4195. seen = caches[0];
  4196. outer:
  4197. while (++index < length && result.length < maxLength) {
  4198. var value = array[index],
  4199. computed = iteratee ? iteratee(value) : value;
  4200. value = (comparator || value !== 0) ? value : 0;
  4201. if (!(seen
  4202. ? cacheHas(seen, computed)
  4203. : includes(result, computed, comparator)
  4204. )) {
  4205. othIndex = othLength;
  4206. while (--othIndex) {
  4207. var cache = caches[othIndex];
  4208. if (!(cache
  4209. ? cacheHas(cache, computed)
  4210. : includes(arrays[othIndex], computed, comparator))
  4211. ) {
  4212. continue outer;
  4213. }
  4214. }
  4215. if (seen) {
  4216. seen.push(computed);
  4217. }
  4218. result.push(value);
  4219. }
  4220. }
  4221. return result;
  4222. }
  4223. /**
  4224. * The base implementation of `_.invert` and `_.invertBy` which inverts
  4225. * `object` with values transformed by `iteratee` and set by `setter`.
  4226. *
  4227. * @private
  4228. * @param {Object} object The object to iterate over.
  4229. * @param {Function} setter The function to set `accumulator` values.
  4230. * @param {Function} iteratee The iteratee to transform values.
  4231. * @param {Object} accumulator The initial inverted object.
  4232. * @returns {Function} Returns `accumulator`.
  4233. */
  4234. function baseInverter(object, setter, iteratee, accumulator) {
  4235. baseForOwn(object, function(value, key, object) {
  4236. setter(accumulator, iteratee(value), key, object);
  4237. });
  4238. return accumulator;
  4239. }
  4240. /**
  4241. * The base implementation of `_.invoke` without support for individual
  4242. * method arguments.
  4243. *
  4244. * @private
  4245. * @param {Object} object The object to query.
  4246. * @param {Array|string} path The path of the method to invoke.
  4247. * @param {Array} args The arguments to invoke the method with.
  4248. * @returns {*} Returns the result of the invoked method.
  4249. */
  4250. function baseInvoke(object, path, args) {
  4251. path = castPath(path, object);
  4252. object = parent(object, path);
  4253. var func = object == null ? object : object[toKey(last(path))];
  4254. return func == null ? undefined : apply(func, object, args);
  4255. }
  4256. /**
  4257. * The base implementation of `_.isArguments`.
  4258. *
  4259. * @private
  4260. * @param {*} value The value to check.
  4261. * @returns {boolean} Returns `true` if `value` is an `arguments` object,
  4262. */
  4263. function baseIsArguments(value) {
  4264. return isObjectLike(value) && baseGetTag(value) == argsTag;
  4265. }
  4266. /**
  4267. * The base implementation of `_.isArrayBuffer` without Node.js optimizations.
  4268. *
  4269. * @private
  4270. * @param {*} value The value to check.
  4271. * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
  4272. */
  4273. function baseIsArrayBuffer(value) {
  4274. return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;
  4275. }
  4276. /**
  4277. * The base implementation of `_.isDate` without Node.js optimizations.
  4278. *
  4279. * @private
  4280. * @param {*} value The value to check.
  4281. * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
  4282. */
  4283. function baseIsDate(value) {
  4284. return isObjectLike(value) && baseGetTag(value) == dateTag;
  4285. }
  4286. /**
  4287. * The base implementation of `_.isEqual` which supports partial comparisons
  4288. * and tracks traversed objects.
  4289. *
  4290. * @private
  4291. * @param {*} value The value to compare.
  4292. * @param {*} other The other value to compare.
  4293. * @param {boolean} bitmask The bitmask flags.
  4294. * 1 - Unordered comparison
  4295. * 2 - Partial comparison
  4296. * @param {Function} [customizer] The function to customize comparisons.
  4297. * @param {Object} [stack] Tracks traversed `value` and `other` objects.
  4298. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  4299. */
  4300. function baseIsEqual(value, other, bitmask, customizer, stack) {
  4301. if (value === other) {
  4302. return true;
  4303. }
  4304. if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
  4305. return value !== value && other !== other;
  4306. }
  4307. return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
  4308. }
  4309. /**
  4310. * A specialized version of `baseIsEqual` for arrays and objects which performs
  4311. * deep comparisons and tracks traversed objects enabling objects with circular
  4312. * references to be compared.
  4313. *
  4314. * @private
  4315. * @param {Object} object The object to compare.
  4316. * @param {Object} other The other object to compare.
  4317. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  4318. * @param {Function} customizer The function to customize comparisons.
  4319. * @param {Function} equalFunc The function to determine equivalents of values.
  4320. * @param {Object} [stack] Tracks traversed `object` and `other` objects.
  4321. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  4322. */
  4323. function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
  4324. var objIsArr = isArray(object),
  4325. othIsArr = isArray(other),
  4326. objTag = objIsArr ? arrayTag : getTag(object),
  4327. othTag = othIsArr ? arrayTag : getTag(other);
  4328. objTag = objTag == argsTag ? objectTag : objTag;
  4329. othTag = othTag == argsTag ? objectTag : othTag;
  4330. var objIsObj = objTag == objectTag,
  4331. othIsObj = othTag == objectTag,
  4332. isSameTag = objTag == othTag;
  4333. if (isSameTag && isBuffer(object)) {
  4334. if (!isBuffer(other)) {
  4335. return false;
  4336. }
  4337. objIsArr = true;
  4338. objIsObj = false;
  4339. }
  4340. if (isSameTag && !objIsObj) {
  4341. stack || (stack = new Stack);
  4342. return (objIsArr || isTypedArray(object))
  4343. ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
  4344. : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
  4345. }
  4346. if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
  4347. var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
  4348. othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
  4349. if (objIsWrapped || othIsWrapped) {
  4350. var objUnwrapped = objIsWrapped ? object.value() : object,
  4351. othUnwrapped = othIsWrapped ? other.value() : other;
  4352. stack || (stack = new Stack);
  4353. return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
  4354. }
  4355. }
  4356. if (!isSameTag) {
  4357. return false;
  4358. }
  4359. stack || (stack = new Stack);
  4360. return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
  4361. }
  4362. /**
  4363. * The base implementation of `_.isMap` without Node.js optimizations.
  4364. *
  4365. * @private
  4366. * @param {*} value The value to check.
  4367. * @returns {boolean} Returns `true` if `value` is a map, else `false`.
  4368. */
  4369. function baseIsMap(value) {
  4370. return isObjectLike(value) && getTag(value) == mapTag;
  4371. }
  4372. /**
  4373. * The base implementation of `_.isMatch` without support for iteratee shorthands.
  4374. *
  4375. * @private
  4376. * @param {Object} object The object to inspect.
  4377. * @param {Object} source The object of property values to match.
  4378. * @param {Array} matchData The property names, values, and compare flags to match.
  4379. * @param {Function} [customizer] The function to customize comparisons.
  4380. * @returns {boolean} Returns `true` if `object` is a match, else `false`.
  4381. */
  4382. function baseIsMatch(object, source, matchData, customizer) {
  4383. var index = matchData.length,
  4384. length = index,
  4385. noCustomizer = !customizer;
  4386. if (object == null) {
  4387. return !length;
  4388. }
  4389. object = Object(object);
  4390. while (index--) {
  4391. var data = matchData[index];
  4392. if ((noCustomizer && data[2])
  4393. ? data[1] !== object[data[0]]
  4394. : !(data[0] in object)
  4395. ) {
  4396. return false;
  4397. }
  4398. }
  4399. while (++index < length) {
  4400. data = matchData[index];
  4401. var key = data[0],
  4402. objValue = object[key],
  4403. srcValue = data[1];
  4404. if (noCustomizer && data[2]) {
  4405. if (objValue === undefined && !(key in object)) {
  4406. return false;
  4407. }
  4408. } else {
  4409. var stack = new Stack;
  4410. if (customizer) {
  4411. var result = customizer(objValue, srcValue, key, object, source, stack);
  4412. }
  4413. if (!(result === undefined
  4414. ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)
  4415. : result
  4416. )) {
  4417. return false;
  4418. }
  4419. }
  4420. }
  4421. return true;
  4422. }
  4423. /**
  4424. * The base implementation of `_.isNative` without bad shim checks.
  4425. *
  4426. * @private
  4427. * @param {*} value The value to check.
  4428. * @returns {boolean} Returns `true` if `value` is a native function,
  4429. * else `false`.
  4430. */
  4431. function baseIsNative(value) {
  4432. if (!isObject(value) || isMasked(value)) {
  4433. return false;
  4434. }
  4435. var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
  4436. return pattern.test(toSource(value));
  4437. }
  4438. /**
  4439. * The base implementation of `_.isRegExp` without Node.js optimizations.
  4440. *
  4441. * @private
  4442. * @param {*} value The value to check.
  4443. * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
  4444. */
  4445. function baseIsRegExp(value) {
  4446. return isObjectLike(value) && baseGetTag(value) == regexpTag;
  4447. }
  4448. /**
  4449. * The base implementation of `_.isSet` without Node.js optimizations.
  4450. *
  4451. * @private
  4452. * @param {*} value The value to check.
  4453. * @returns {boolean} Returns `true` if `value` is a set, else `false`.
  4454. */
  4455. function baseIsSet(value) {
  4456. return isObjectLike(value) && getTag(value) == setTag;
  4457. }
  4458. /**
  4459. * The base implementation of `_.isTypedArray` without Node.js optimizations.
  4460. *
  4461. * @private
  4462. * @param {*} value The value to check.
  4463. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
  4464. */
  4465. function baseIsTypedArray(value) {
  4466. return isObjectLike(value) &&
  4467. isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
  4468. }
  4469. /**
  4470. * The base implementation of `_.iteratee`.
  4471. *
  4472. * @private
  4473. * @param {*} [value=_.identity] The value to convert to an iteratee.
  4474. * @returns {Function} Returns the iteratee.
  4475. */
  4476. function baseIteratee(value) {
  4477. // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
  4478. // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
  4479. if (typeof value == 'function') {
  4480. return value;
  4481. }
  4482. if (value == null) {
  4483. return identity;
  4484. }
  4485. if (typeof value == 'object') {
  4486. return isArray(value)
  4487. ? baseMatchesProperty(value[0], value[1])
  4488. : baseMatches(value);
  4489. }
  4490. return property(value);
  4491. }
  4492. /**
  4493. * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
  4494. *
  4495. * @private
  4496. * @param {Object} object The object to query.
  4497. * @returns {Array} Returns the array of property names.
  4498. */
  4499. function baseKeys(object) {
  4500. if (!isPrototype(object)) {
  4501. return nativeKeys(object);
  4502. }
  4503. var result = [];
  4504. for (var key in Object(object)) {
  4505. if (hasOwnProperty.call(object, key) && key != 'constructor') {
  4506. result.push(key);
  4507. }
  4508. }
  4509. return result;
  4510. }
  4511. /**
  4512. * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
  4513. *
  4514. * @private
  4515. * @param {Object} object The object to query.
  4516. * @returns {Array} Returns the array of property names.
  4517. */
  4518. function baseKeysIn(object) {
  4519. if (!isObject(object)) {
  4520. return nativeKeysIn(object);
  4521. }
  4522. var isProto = isPrototype(object),
  4523. result = [];
  4524. for (var key in object) {
  4525. if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
  4526. result.push(key);
  4527. }
  4528. }
  4529. return result;
  4530. }
  4531. /**
  4532. * The base implementation of `_.lt` which doesn't coerce arguments.
  4533. *
  4534. * @private
  4535. * @param {*} value The value to compare.
  4536. * @param {*} other The other value to compare.
  4537. * @returns {boolean} Returns `true` if `value` is less than `other`,
  4538. * else `false`.
  4539. */
  4540. function baseLt(value, other) {
  4541. return value < other;
  4542. }
  4543. /**
  4544. * The base implementation of `_.map` without support for iteratee shorthands.
  4545. *
  4546. * @private
  4547. * @param {Array|Object} collection The collection to iterate over.
  4548. * @param {Function} iteratee The function invoked per iteration.
  4549. * @returns {Array} Returns the new mapped array.
  4550. */
  4551. function baseMap(collection, iteratee) {
  4552. var index = -1,
  4553. result = isArrayLike(collection) ? Array(collection.length) : [];
  4554. baseEach(collection, function(value, key, collection) {
  4555. result[++index] = iteratee(value, key, collection);
  4556. });
  4557. return result;
  4558. }
  4559. /**
  4560. * The base implementation of `_.matches` which doesn't clone `source`.
  4561. *
  4562. * @private
  4563. * @param {Object} source The object of property values to match.
  4564. * @returns {Function} Returns the new spec function.
  4565. */
  4566. function baseMatches(source) {
  4567. var matchData = getMatchData(source);
  4568. if (matchData.length == 1 && matchData[0][2]) {
  4569. return matchesStrictComparable(matchData[0][0], matchData[0][1]);
  4570. }
  4571. return function(object) {
  4572. return object === source || baseIsMatch(object, source, matchData);
  4573. };
  4574. }
  4575. /**
  4576. * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
  4577. *
  4578. * @private
  4579. * @param {string} path The path of the property to get.
  4580. * @param {*} srcValue The value to match.
  4581. * @returns {Function} Returns the new spec function.
  4582. */
  4583. function baseMatchesProperty(path, srcValue) {
  4584. if (isKey(path) && isStrictComparable(srcValue)) {
  4585. return matchesStrictComparable(toKey(path), srcValue);
  4586. }
  4587. return function(object) {
  4588. var objValue = get(object, path);
  4589. return (objValue === undefined && objValue === srcValue)
  4590. ? hasIn(object, path)
  4591. : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
  4592. };
  4593. }
  4594. /**
  4595. * The base implementation of `_.merge` without support for multiple sources.
  4596. *
  4597. * @private
  4598. * @param {Object} object The destination object.
  4599. * @param {Object} source The source object.
  4600. * @param {number} srcIndex The index of `source`.
  4601. * @param {Function} [customizer] The function to customize merged values.
  4602. * @param {Object} [stack] Tracks traversed source values and their merged
  4603. * counterparts.
  4604. */
  4605. function baseMerge(object, source, srcIndex, customizer, stack) {
  4606. if (object === source) {
  4607. return;
  4608. }
  4609. baseFor(source, function(srcValue, key) {
  4610. stack || (stack = new Stack);
  4611. if (isObject(srcValue)) {
  4612. baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
  4613. }
  4614. else {
  4615. var newValue = customizer
  4616. ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)
  4617. : undefined;
  4618. if (newValue === undefined) {
  4619. newValue = srcValue;
  4620. }
  4621. assignMergeValue(object, key, newValue);
  4622. }
  4623. }, keysIn);
  4624. }
  4625. /**
  4626. * A specialized version of `baseMerge` for arrays and objects which performs
  4627. * deep merges and tracks traversed objects enabling objects with circular
  4628. * references to be merged.
  4629. *
  4630. * @private
  4631. * @param {Object} object The destination object.
  4632. * @param {Object} source The source object.
  4633. * @param {string} key The key of the value to merge.
  4634. * @param {number} srcIndex The index of `source`.
  4635. * @param {Function} mergeFunc The function to merge values.
  4636. * @param {Function} [customizer] The function to customize assigned values.
  4637. * @param {Object} [stack] Tracks traversed source values and their merged
  4638. * counterparts.
  4639. */
  4640. function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
  4641. var objValue = safeGet(object, key),
  4642. srcValue = safeGet(source, key),
  4643. stacked = stack.get(srcValue);
  4644. if (stacked) {
  4645. assignMergeValue(object, key, stacked);
  4646. return;
  4647. }
  4648. var newValue = customizer
  4649. ? customizer(objValue, srcValue, (key + ''), object, source, stack)
  4650. : undefined;
  4651. var isCommon = newValue === undefined;
  4652. if (isCommon) {
  4653. var isArr = isArray(srcValue),
  4654. isBuff = !isArr && isBuffer(srcValue),
  4655. isTyped = !isArr && !isBuff && isTypedArray(srcValue);
  4656. newValue = srcValue;
  4657. if (isArr || isBuff || isTyped) {
  4658. if (isArray(objValue)) {
  4659. newValue = objValue;
  4660. }
  4661. else if (isArrayLikeObject(objValue)) {
  4662. newValue = copyArray(objValue);
  4663. }
  4664. else if (isBuff) {
  4665. isCommon = false;
  4666. newValue = cloneBuffer(srcValue, true);
  4667. }
  4668. else if (isTyped) {
  4669. isCommon = false;
  4670. newValue = cloneTypedArray(srcValue, true);
  4671. }
  4672. else {
  4673. newValue = [];
  4674. }
  4675. }
  4676. else if (isPlainObject(srcValue) || isArguments(srcValue)) {
  4677. newValue = objValue;
  4678. if (isArguments(objValue)) {
  4679. newValue = toPlainObject(objValue);
  4680. }
  4681. else if (!isObject(objValue) || isFunction(objValue)) {
  4682. newValue = initCloneObject(srcValue);
  4683. }
  4684. }
  4685. else {
  4686. isCommon = false;
  4687. }
  4688. }
  4689. if (isCommon) {
  4690. // Recursively merge objects and arrays (susceptible to call stack limits).
  4691. stack.set(srcValue, newValue);
  4692. mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
  4693. stack['delete'](srcValue);
  4694. }
  4695. assignMergeValue(object, key, newValue);
  4696. }
  4697. /**
  4698. * The base implementation of `_.nth` which doesn't coerce arguments.
  4699. *
  4700. * @private
  4701. * @param {Array} array The array to query.
  4702. * @param {number} n The index of the element to return.
  4703. * @returns {*} Returns the nth element of `array`.
  4704. */
  4705. function baseNth(array, n) {
  4706. var length = array.length;
  4707. if (!length) {
  4708. return;
  4709. }
  4710. n += n < 0 ? length : 0;
  4711. return isIndex(n, length) ? array[n] : undefined;
  4712. }
  4713. /**
  4714. * The base implementation of `_.orderBy` without param guards.
  4715. *
  4716. * @private
  4717. * @param {Array|Object} collection The collection to iterate over.
  4718. * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
  4719. * @param {string[]} orders The sort orders of `iteratees`.
  4720. * @returns {Array} Returns the new sorted array.
  4721. */
  4722. function baseOrderBy(collection, iteratees, orders) {
  4723. if (iteratees.length) {
  4724. iteratees = arrayMap(iteratees, function(iteratee) {
  4725. if (isArray(iteratee)) {
  4726. return function(value) {
  4727. return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);
  4728. }
  4729. }
  4730. return iteratee;
  4731. });
  4732. } else {
  4733. iteratees = [identity];
  4734. }
  4735. var index = -1;
  4736. iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
  4737. var result = baseMap(collection, function(value, key, collection) {
  4738. var criteria = arrayMap(iteratees, function(iteratee) {
  4739. return iteratee(value);
  4740. });
  4741. return { 'criteria': criteria, 'index': ++index, 'value': value };
  4742. });
  4743. return baseSortBy(result, function(object, other) {
  4744. return compareMultiple(object, other, orders);
  4745. });
  4746. }
  4747. /**
  4748. * The base implementation of `_.pick` without support for individual
  4749. * property identifiers.
  4750. *
  4751. * @private
  4752. * @param {Object} object The source object.
  4753. * @param {string[]} paths The property paths to pick.
  4754. * @returns {Object} Returns the new object.
  4755. */
  4756. function basePick(object, paths) {
  4757. return basePickBy(object, paths, function(value, path) {
  4758. return hasIn(object, path);
  4759. });
  4760. }
  4761. /**
  4762. * The base implementation of `_.pickBy` without support for iteratee shorthands.
  4763. *
  4764. * @private
  4765. * @param {Object} object The source object.
  4766. * @param {string[]} paths The property paths to pick.
  4767. * @param {Function} predicate The function invoked per property.
  4768. * @returns {Object} Returns the new object.
  4769. */
  4770. function basePickBy(object, paths, predicate) {
  4771. var index = -1,
  4772. length = paths.length,
  4773. result = {};
  4774. while (++index < length) {
  4775. var path = paths[index],
  4776. value = baseGet(object, path);
  4777. if (predicate(value, path)) {
  4778. baseSet(result, castPath(path, object), value);
  4779. }
  4780. }
  4781. return result;
  4782. }
  4783. /**
  4784. * A specialized version of `baseProperty` which supports deep paths.
  4785. *
  4786. * @private
  4787. * @param {Array|string} path The path of the property to get.
  4788. * @returns {Function} Returns the new accessor function.
  4789. */
  4790. function basePropertyDeep(path) {
  4791. return function(object) {
  4792. return baseGet(object, path);
  4793. };
  4794. }
  4795. /**
  4796. * The base implementation of `_.pullAllBy` without support for iteratee
  4797. * shorthands.
  4798. *
  4799. * @private
  4800. * @param {Array} array The array to modify.
  4801. * @param {Array} values The values to remove.
  4802. * @param {Function} [iteratee] The iteratee invoked per element.
  4803. * @param {Function} [comparator] The comparator invoked per element.
  4804. * @returns {Array} Returns `array`.
  4805. */
  4806. function basePullAll(array, values, iteratee, comparator) {
  4807. var indexOf = comparator ? baseIndexOfWith : baseIndexOf,
  4808. index = -1,
  4809. length = values.length,
  4810. seen = array;
  4811. if (array === values) {
  4812. values = copyArray(values);
  4813. }
  4814. if (iteratee) {
  4815. seen = arrayMap(array, baseUnary(iteratee));
  4816. }
  4817. while (++index < length) {
  4818. var fromIndex = 0,
  4819. value = values[index],
  4820. computed = iteratee ? iteratee(value) : value;
  4821. while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {
  4822. if (seen !== array) {
  4823. splice.call(seen, fromIndex, 1);
  4824. }
  4825. splice.call(array, fromIndex, 1);
  4826. }
  4827. }
  4828. return array;
  4829. }
  4830. /**
  4831. * The base implementation of `_.pullAt` without support for individual
  4832. * indexes or capturing the removed elements.
  4833. *
  4834. * @private
  4835. * @param {Array} array The array to modify.
  4836. * @param {number[]} indexes The indexes of elements to remove.
  4837. * @returns {Array} Returns `array`.
  4838. */
  4839. function basePullAt(array, indexes) {
  4840. var length = array ? indexes.length : 0,
  4841. lastIndex = length - 1;
  4842. while (length--) {
  4843. var index = indexes[length];
  4844. if (length == lastIndex || index !== previous) {
  4845. var previous = index;
  4846. if (isIndex(index)) {
  4847. splice.call(array, index, 1);
  4848. } else {
  4849. baseUnset(array, index);
  4850. }
  4851. }
  4852. }
  4853. return array;
  4854. }
  4855. /**
  4856. * The base implementation of `_.random` without support for returning
  4857. * floating-point numbers.
  4858. *
  4859. * @private
  4860. * @param {number} lower The lower bound.
  4861. * @param {number} upper The upper bound.
  4862. * @returns {number} Returns the random number.
  4863. */
  4864. function baseRandom(lower, upper) {
  4865. return lower + nativeFloor(nativeRandom() * (upper - lower + 1));
  4866. }
  4867. /**
  4868. * The base implementation of `_.range` and `_.rangeRight` which doesn't
  4869. * coerce arguments.
  4870. *
  4871. * @private
  4872. * @param {number} start The start of the range.
  4873. * @param {number} end The end of the range.
  4874. * @param {number} step The value to increment or decrement by.
  4875. * @param {boolean} [fromRight] Specify iterating from right to left.
  4876. * @returns {Array} Returns the range of numbers.
  4877. */
  4878. function baseRange(start, end, step, fromRight) {
  4879. var index = -1,
  4880. length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),
  4881. result = Array(length);
  4882. while (length--) {
  4883. result[fromRight ? length : ++index] = start;
  4884. start += step;
  4885. }
  4886. return result;
  4887. }
  4888. /**
  4889. * The base implementation of `_.repeat` which doesn't coerce arguments.
  4890. *
  4891. * @private
  4892. * @param {string} string The string to repeat.
  4893. * @param {number} n The number of times to repeat the string.
  4894. * @returns {string} Returns the repeated string.
  4895. */
  4896. function baseRepeat(string, n) {
  4897. var result = '';
  4898. if (!string || n < 1 || n > MAX_SAFE_INTEGER) {
  4899. return result;
  4900. }
  4901. // Leverage the exponentiation by squaring algorithm for a faster repeat.
  4902. // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.
  4903. do {
  4904. if (n % 2) {
  4905. result += string;
  4906. }
  4907. n = nativeFloor(n / 2);
  4908. if (n) {
  4909. string += string;
  4910. }
  4911. } while (n);
  4912. return result;
  4913. }
  4914. /**
  4915. * The base implementation of `_.rest` which doesn't validate or coerce arguments.
  4916. *
  4917. * @private
  4918. * @param {Function} func The function to apply a rest parameter to.
  4919. * @param {number} [start=func.length-1] The start position of the rest parameter.
  4920. * @returns {Function} Returns the new function.
  4921. */
  4922. function baseRest(func, start) {
  4923. return setToString(overRest(func, start, identity), func + '');
  4924. }
  4925. /**
  4926. * The base implementation of `_.sample`.
  4927. *
  4928. * @private
  4929. * @param {Array|Object} collection The collection to sample.
  4930. * @returns {*} Returns the random element.
  4931. */
  4932. function baseSample(collection) {
  4933. return arraySample(values(collection));
  4934. }
  4935. /**
  4936. * The base implementation of `_.sampleSize` without param guards.
  4937. *
  4938. * @private
  4939. * @param {Array|Object} collection The collection to sample.
  4940. * @param {number} n The number of elements to sample.
  4941. * @returns {Array} Returns the random elements.
  4942. */
  4943. function baseSampleSize(collection, n) {
  4944. var array = values(collection);
  4945. return shuffleSelf(array, baseClamp(n, 0, array.length));
  4946. }
  4947. /**
  4948. * The base implementation of `_.set`.
  4949. *
  4950. * @private
  4951. * @param {Object} object The object to modify.
  4952. * @param {Array|string} path The path of the property to set.
  4953. * @param {*} value The value to set.
  4954. * @param {Function} [customizer] The function to customize path creation.
  4955. * @returns {Object} Returns `object`.
  4956. */
  4957. function baseSet(object, path, value, customizer) {
  4958. if (!isObject(object)) {
  4959. return object;
  4960. }
  4961. path = castPath(path, object);
  4962. var index = -1,
  4963. length = path.length,
  4964. lastIndex = length - 1,
  4965. nested = object;
  4966. while (nested != null && ++index < length) {
  4967. var key = toKey(path[index]),
  4968. newValue = value;
  4969. if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
  4970. return object;
  4971. }
  4972. if (index != lastIndex) {
  4973. var objValue = nested[key];
  4974. newValue = customizer ? customizer(objValue, key, nested) : undefined;
  4975. if (newValue === undefined) {
  4976. newValue = isObject(objValue)
  4977. ? objValue
  4978. : (isIndex(path[index + 1]) ? [] : {});
  4979. }
  4980. }
  4981. assignValue(nested, key, newValue);
  4982. nested = nested[key];
  4983. }
  4984. return object;
  4985. }
  4986. /**
  4987. * The base implementation of `setData` without support for hot loop shorting.
  4988. *
  4989. * @private
  4990. * @param {Function} func The function to associate metadata with.
  4991. * @param {*} data The metadata.
  4992. * @returns {Function} Returns `func`.
  4993. */
  4994. var baseSetData = !metaMap ? identity : function(func, data) {
  4995. metaMap.set(func, data);
  4996. return func;
  4997. };
  4998. /**
  4999. * The base implementation of `setToString` without support for hot loop shorting.
  5000. *
  5001. * @private
  5002. * @param {Function} func The function to modify.
  5003. * @param {Function} string The `toString` result.
  5004. * @returns {Function} Returns `func`.
  5005. */
  5006. var baseSetToString = !defineProperty ? identity : function(func, string) {
  5007. return defineProperty(func, 'toString', {
  5008. 'configurable': true,
  5009. 'enumerable': false,
  5010. 'value': constant(string),
  5011. 'writable': true
  5012. });
  5013. };
  5014. /**
  5015. * The base implementation of `_.shuffle`.
  5016. *
  5017. * @private
  5018. * @param {Array|Object} collection The collection to shuffle.
  5019. * @returns {Array} Returns the new shuffled array.
  5020. */
  5021. function baseShuffle(collection) {
  5022. return shuffleSelf(values(collection));
  5023. }
  5024. /**
  5025. * The base implementation of `_.slice` without an iteratee call guard.
  5026. *
  5027. * @private
  5028. * @param {Array} array The array to slice.
  5029. * @param {number} [start=0] The start position.
  5030. * @param {number} [end=array.length] The end position.
  5031. * @returns {Array} Returns the slice of `array`.
  5032. */
  5033. function baseSlice(array, start, end) {
  5034. var index = -1,
  5035. length = array.length;
  5036. if (start < 0) {
  5037. start = -start > length ? 0 : (length + start);
  5038. }
  5039. end = end > length ? length : end;
  5040. if (end < 0) {
  5041. end += length;
  5042. }
  5043. length = start > end ? 0 : ((end - start) >>> 0);
  5044. start >>>= 0;
  5045. var result = Array(length);
  5046. while (++index < length) {
  5047. result[index] = array[index + start];
  5048. }
  5049. return result;
  5050. }
  5051. /**
  5052. * The base implementation of `_.some` without support for iteratee shorthands.
  5053. *
  5054. * @private
  5055. * @param {Array|Object} collection The collection to iterate over.
  5056. * @param {Function} predicate The function invoked per iteration.
  5057. * @returns {boolean} Returns `true` if any element passes the predicate check,
  5058. * else `false`.
  5059. */
  5060. function baseSome(collection, predicate) {
  5061. var result;
  5062. baseEach(collection, function(value, index, collection) {
  5063. result = predicate(value, index, collection);
  5064. return !result;
  5065. });
  5066. return !!result;
  5067. }
  5068. /**
  5069. * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which
  5070. * performs a binary search of `array` to determine the index at which `value`
  5071. * should be inserted into `array` in order to maintain its sort order.
  5072. *
  5073. * @private
  5074. * @param {Array} array The sorted array to inspect.
  5075. * @param {*} value The value to evaluate.
  5076. * @param {boolean} [retHighest] Specify returning the highest qualified index.
  5077. * @returns {number} Returns the index at which `value` should be inserted
  5078. * into `array`.
  5079. */
  5080. function baseSortedIndex(array, value, retHighest) {
  5081. var low = 0,
  5082. high = array == null ? low : array.length;
  5083. if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
  5084. while (low < high) {
  5085. var mid = (low + high) >>> 1,
  5086. computed = array[mid];
  5087. if (computed !== null && !isSymbol(computed) &&
  5088. (retHighest ? (computed <= value) : (computed < value))) {
  5089. low = mid + 1;
  5090. } else {
  5091. high = mid;
  5092. }
  5093. }
  5094. return high;
  5095. }
  5096. return baseSortedIndexBy(array, value, identity, retHighest);
  5097. }
  5098. /**
  5099. * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`
  5100. * which invokes `iteratee` for `value` and each element of `array` to compute
  5101. * their sort ranking. The iteratee is invoked with one argument; (value).
  5102. *
  5103. * @private
  5104. * @param {Array} array The sorted array to inspect.
  5105. * @param {*} value The value to evaluate.
  5106. * @param {Function} iteratee The iteratee invoked per element.
  5107. * @param {boolean} [retHighest] Specify returning the highest qualified index.
  5108. * @returns {number} Returns the index at which `value` should be inserted
  5109. * into `array`.
  5110. */
  5111. function baseSortedIndexBy(array, value, iteratee, retHighest) {
  5112. var low = 0,
  5113. high = array == null ? 0 : array.length;
  5114. if (high === 0) {
  5115. return 0;
  5116. }
  5117. value = iteratee(value);
  5118. var valIsNaN = value !== value,
  5119. valIsNull = value === null,
  5120. valIsSymbol = isSymbol(value),
  5121. valIsUndefined = value === undefined;
  5122. while (low < high) {
  5123. var mid = nativeFloor((low + high) / 2),
  5124. computed = iteratee(array[mid]),
  5125. othIsDefined = computed !== undefined,
  5126. othIsNull = computed === null,
  5127. othIsReflexive = computed === computed,
  5128. othIsSymbol = isSymbol(computed);
  5129. if (valIsNaN) {
  5130. var setLow = retHighest || othIsReflexive;
  5131. } else if (valIsUndefined) {
  5132. setLow = othIsReflexive && (retHighest || othIsDefined);
  5133. } else if (valIsNull) {
  5134. setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);
  5135. } else if (valIsSymbol) {
  5136. setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);
  5137. } else if (othIsNull || othIsSymbol) {
  5138. setLow = false;
  5139. } else {
  5140. setLow = retHighest ? (computed <= value) : (computed < value);
  5141. }
  5142. if (setLow) {
  5143. low = mid + 1;
  5144. } else {
  5145. high = mid;
  5146. }
  5147. }
  5148. return nativeMin(high, MAX_ARRAY_INDEX);
  5149. }
  5150. /**
  5151. * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without
  5152. * support for iteratee shorthands.
  5153. *
  5154. * @private
  5155. * @param {Array} array The array to inspect.
  5156. * @param {Function} [iteratee] The iteratee invoked per element.
  5157. * @returns {Array} Returns the new duplicate free array.
  5158. */
  5159. function baseSortedUniq(array, iteratee) {
  5160. var index = -1,
  5161. length = array.length,
  5162. resIndex = 0,
  5163. result = [];
  5164. while (++index < length) {
  5165. var value = array[index],
  5166. computed = iteratee ? iteratee(value) : value;
  5167. if (!index || !eq(computed, seen)) {
  5168. var seen = computed;
  5169. result[resIndex++] = value === 0 ? 0 : value;
  5170. }
  5171. }
  5172. return result;
  5173. }
  5174. /**
  5175. * The base implementation of `_.toNumber` which doesn't ensure correct
  5176. * conversions of binary, hexadecimal, or octal string values.
  5177. *
  5178. * @private
  5179. * @param {*} value The value to process.
  5180. * @returns {number} Returns the number.
  5181. */
  5182. function baseToNumber(value) {
  5183. if (typeof value == 'number') {
  5184. return value;
  5185. }
  5186. if (isSymbol(value)) {
  5187. return NAN;
  5188. }
  5189. return +value;
  5190. }
  5191. /**
  5192. * The base implementation of `_.toString` which doesn't convert nullish
  5193. * values to empty strings.
  5194. *
  5195. * @private
  5196. * @param {*} value The value to process.
  5197. * @returns {string} Returns the string.
  5198. */
  5199. function baseToString(value) {
  5200. // Exit early for strings to avoid a performance hit in some environments.
  5201. if (typeof value == 'string') {
  5202. return value;
  5203. }
  5204. if (isArray(value)) {
  5205. // Recursively convert values (susceptible to call stack limits).
  5206. return arrayMap(value, baseToString) + '';
  5207. }
  5208. if (isSymbol(value)) {
  5209. return symbolToString ? symbolToString.call(value) : '';
  5210. }
  5211. var result = (value + '');
  5212. return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
  5213. }
  5214. /**
  5215. * The base implementation of `_.uniqBy` without support for iteratee shorthands.
  5216. *
  5217. * @private
  5218. * @param {Array} array The array to inspect.
  5219. * @param {Function} [iteratee] The iteratee invoked per element.
  5220. * @param {Function} [comparator] The comparator invoked per element.
  5221. * @returns {Array} Returns the new duplicate free array.
  5222. */
  5223. function baseUniq(array, iteratee, comparator) {
  5224. var index = -1,
  5225. includes = arrayIncludes,
  5226. length = array.length,
  5227. isCommon = true,
  5228. result = [],
  5229. seen = result;
  5230. if (comparator) {
  5231. isCommon = false;
  5232. includes = arrayIncludesWith;
  5233. }
  5234. else if (length >= LARGE_ARRAY_SIZE) {
  5235. var set = iteratee ? null : createSet(array);
  5236. if (set) {
  5237. return setToArray(set);
  5238. }
  5239. isCommon = false;
  5240. includes = cacheHas;
  5241. seen = new SetCache;
  5242. }
  5243. else {
  5244. seen = iteratee ? [] : result;
  5245. }
  5246. outer:
  5247. while (++index < length) {
  5248. var value = array[index],
  5249. computed = iteratee ? iteratee(value) : value;
  5250. value = (comparator || value !== 0) ? value : 0;
  5251. if (isCommon && computed === computed) {
  5252. var seenIndex = seen.length;
  5253. while (seenIndex--) {
  5254. if (seen[seenIndex] === computed) {
  5255. continue outer;
  5256. }
  5257. }
  5258. if (iteratee) {
  5259. seen.push(computed);
  5260. }
  5261. result.push(value);
  5262. }
  5263. else if (!includes(seen, computed, comparator)) {
  5264. if (seen !== result) {
  5265. seen.push(computed);
  5266. }
  5267. result.push(value);
  5268. }
  5269. }
  5270. return result;
  5271. }
  5272. /**
  5273. * The base implementation of `_.unset`.
  5274. *
  5275. * @private
  5276. * @param {Object} object The object to modify.
  5277. * @param {Array|string} path The property path to unset.
  5278. * @returns {boolean} Returns `true` if the property is deleted, else `false`.
  5279. */
  5280. function baseUnset(object, path) {
  5281. path = castPath(path, object);
  5282. object = parent(object, path);
  5283. return object == null || delete object[toKey(last(path))];
  5284. }
  5285. /**
  5286. * The base implementation of `_.update`.
  5287. *
  5288. * @private
  5289. * @param {Object} object The object to modify.
  5290. * @param {Array|string} path The path of the property to update.
  5291. * @param {Function} updater The function to produce the updated value.
  5292. * @param {Function} [customizer] The function to customize path creation.
  5293. * @returns {Object} Returns `object`.
  5294. */
  5295. function baseUpdate(object, path, updater, customizer) {
  5296. return baseSet(object, path, updater(baseGet(object, path)), customizer);
  5297. }
  5298. /**
  5299. * The base implementation of methods like `_.dropWhile` and `_.takeWhile`
  5300. * without support for iteratee shorthands.
  5301. *
  5302. * @private
  5303. * @param {Array} array The array to query.
  5304. * @param {Function} predicate The function invoked per iteration.
  5305. * @param {boolean} [isDrop] Specify dropping elements instead of taking them.
  5306. * @param {boolean} [fromRight] Specify iterating from right to left.
  5307. * @returns {Array} Returns the slice of `array`.
  5308. */
  5309. function baseWhile(array, predicate, isDrop, fromRight) {
  5310. var length = array.length,
  5311. index = fromRight ? length : -1;
  5312. while ((fromRight ? index-- : ++index < length) &&
  5313. predicate(array[index], index, array)) {}
  5314. return isDrop
  5315. ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))
  5316. : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));
  5317. }
  5318. /**
  5319. * The base implementation of `wrapperValue` which returns the result of
  5320. * performing a sequence of actions on the unwrapped `value`, where each
  5321. * successive action is supplied the return value of the previous.
  5322. *
  5323. * @private
  5324. * @param {*} value The unwrapped value.
  5325. * @param {Array} actions Actions to perform to resolve the unwrapped value.
  5326. * @returns {*} Returns the resolved value.
  5327. */
  5328. function baseWrapperValue(value, actions) {
  5329. var result = value;
  5330. if (result instanceof LazyWrapper) {
  5331. result = result.value();
  5332. }
  5333. return arrayReduce(actions, function(result, action) {
  5334. return action.func.apply(action.thisArg, arrayPush([result], action.args));
  5335. }, result);
  5336. }
  5337. /**
  5338. * The base implementation of methods like `_.xor`, without support for
  5339. * iteratee shorthands, that accepts an array of arrays to inspect.
  5340. *
  5341. * @private
  5342. * @param {Array} arrays The arrays to inspect.
  5343. * @param {Function} [iteratee] The iteratee invoked per element.
  5344. * @param {Function} [comparator] The comparator invoked per element.
  5345. * @returns {Array} Returns the new array of values.
  5346. */
  5347. function baseXor(arrays, iteratee, comparator) {
  5348. var length = arrays.length;
  5349. if (length < 2) {
  5350. return length ? baseUniq(arrays[0]) : [];
  5351. }
  5352. var index = -1,
  5353. result = Array(length);
  5354. while (++index < length) {
  5355. var array = arrays[index],
  5356. othIndex = -1;
  5357. while (++othIndex < length) {
  5358. if (othIndex != index) {
  5359. result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);
  5360. }
  5361. }
  5362. }
  5363. return baseUniq(baseFlatten(result, 1), iteratee, comparator);
  5364. }
  5365. /**
  5366. * This base implementation of `_.zipObject` which assigns values using `assignFunc`.
  5367. *
  5368. * @private
  5369. * @param {Array} props The property identifiers.
  5370. * @param {Array} values The property values.
  5371. * @param {Function} assignFunc The function to assign values.
  5372. * @returns {Object} Returns the new object.
  5373. */
  5374. function baseZipObject(props, values, assignFunc) {
  5375. var index = -1,
  5376. length = props.length,
  5377. valsLength = values.length,
  5378. result = {};
  5379. while (++index < length) {
  5380. var value = index < valsLength ? values[index] : undefined;
  5381. assignFunc(result, props[index], value);
  5382. }
  5383. return result;
  5384. }
  5385. /**
  5386. * Casts `value` to an empty array if it's not an array like object.
  5387. *
  5388. * @private
  5389. * @param {*} value The value to inspect.
  5390. * @returns {Array|Object} Returns the cast array-like object.
  5391. */
  5392. function castArrayLikeObject(value) {
  5393. return isArrayLikeObject(value) ? value : [];
  5394. }
  5395. /**
  5396. * Casts `value` to `identity` if it's not a function.
  5397. *
  5398. * @private
  5399. * @param {*} value The value to inspect.
  5400. * @returns {Function} Returns cast function.
  5401. */
  5402. function castFunction(value) {
  5403. return typeof value == 'function' ? value : identity;
  5404. }
  5405. /**
  5406. * Casts `value` to a path array if it's not one.
  5407. *
  5408. * @private
  5409. * @param {*} value The value to inspect.
  5410. * @param {Object} [object] The object to query keys on.
  5411. * @returns {Array} Returns the cast property path array.
  5412. */
  5413. function castPath(value, object) {
  5414. if (isArray(value)) {
  5415. return value;
  5416. }
  5417. return isKey(value, object) ? [value] : stringToPath(toString(value));
  5418. }
  5419. /**
  5420. * A `baseRest` alias which can be replaced with `identity` by module
  5421. * replacement plugins.
  5422. *
  5423. * @private
  5424. * @type {Function}
  5425. * @param {Function} func The function to apply a rest parameter to.
  5426. * @returns {Function} Returns the new function.
  5427. */
  5428. var castRest = baseRest;
  5429. /**
  5430. * Casts `array` to a slice if it's needed.
  5431. *
  5432. * @private
  5433. * @param {Array} array The array to inspect.
  5434. * @param {number} start The start position.
  5435. * @param {number} [end=array.length] The end position.
  5436. * @returns {Array} Returns the cast slice.
  5437. */
  5438. function castSlice(array, start, end) {
  5439. var length = array.length;
  5440. end = end === undefined ? length : end;
  5441. return (!start && end >= length) ? array : baseSlice(array, start, end);
  5442. }
  5443. /**
  5444. * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout).
  5445. *
  5446. * @private
  5447. * @param {number|Object} id The timer id or timeout object of the timer to clear.
  5448. */
  5449. var clearTimeout = ctxClearTimeout || function(id) {
  5450. return root.clearTimeout(id);
  5451. };
  5452. /**
  5453. * Creates a clone of `buffer`.
  5454. *
  5455. * @private
  5456. * @param {Buffer} buffer The buffer to clone.
  5457. * @param {boolean} [isDeep] Specify a deep clone.
  5458. * @returns {Buffer} Returns the cloned buffer.
  5459. */
  5460. function cloneBuffer(buffer, isDeep) {
  5461. if (isDeep) {
  5462. return buffer.slice();
  5463. }
  5464. var length = buffer.length,
  5465. result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
  5466. buffer.copy(result);
  5467. return result;
  5468. }
  5469. /**
  5470. * Creates a clone of `arrayBuffer`.
  5471. *
  5472. * @private
  5473. * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
  5474. * @returns {ArrayBuffer} Returns the cloned array buffer.
  5475. */
  5476. function cloneArrayBuffer(arrayBuffer) {
  5477. var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
  5478. new Uint8Array(result).set(new Uint8Array(arrayBuffer));
  5479. return result;
  5480. }
  5481. /**
  5482. * Creates a clone of `dataView`.
  5483. *
  5484. * @private
  5485. * @param {Object} dataView The data view to clone.
  5486. * @param {boolean} [isDeep] Specify a deep clone.
  5487. * @returns {Object} Returns the cloned data view.
  5488. */
  5489. function cloneDataView(dataView, isDeep) {
  5490. var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
  5491. return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
  5492. }
  5493. /**
  5494. * Creates a clone of `regexp`.
  5495. *
  5496. * @private
  5497. * @param {Object} regexp The regexp to clone.
  5498. * @returns {Object} Returns the cloned regexp.
  5499. */
  5500. function cloneRegExp(regexp) {
  5501. var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
  5502. result.lastIndex = regexp.lastIndex;
  5503. return result;
  5504. }
  5505. /**
  5506. * Creates a clone of the `symbol` object.
  5507. *
  5508. * @private
  5509. * @param {Object} symbol The symbol object to clone.
  5510. * @returns {Object} Returns the cloned symbol object.
  5511. */
  5512. function cloneSymbol(symbol) {
  5513. return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
  5514. }
  5515. /**
  5516. * Creates a clone of `typedArray`.
  5517. *
  5518. * @private
  5519. * @param {Object} typedArray The typed array to clone.
  5520. * @param {boolean} [isDeep] Specify a deep clone.
  5521. * @returns {Object} Returns the cloned typed array.
  5522. */
  5523. function cloneTypedArray(typedArray, isDeep) {
  5524. var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
  5525. return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
  5526. }
  5527. /**
  5528. * Compares values to sort them in ascending order.
  5529. *
  5530. * @private
  5531. * @param {*} value The value to compare.
  5532. * @param {*} other The other value to compare.
  5533. * @returns {number} Returns the sort order indicator for `value`.
  5534. */
  5535. function compareAscending(value, other) {
  5536. if (value !== other) {
  5537. var valIsDefined = value !== undefined,
  5538. valIsNull = value === null,
  5539. valIsReflexive = value === value,
  5540. valIsSymbol = isSymbol(value);
  5541. var othIsDefined = other !== undefined,
  5542. othIsNull = other === null,
  5543. othIsReflexive = other === other,
  5544. othIsSymbol = isSymbol(other);
  5545. if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||
  5546. (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||
  5547. (valIsNull && othIsDefined && othIsReflexive) ||
  5548. (!valIsDefined && othIsReflexive) ||
  5549. !valIsReflexive) {
  5550. return 1;
  5551. }
  5552. if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||
  5553. (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||
  5554. (othIsNull && valIsDefined && valIsReflexive) ||
  5555. (!othIsDefined && valIsReflexive) ||
  5556. !othIsReflexive) {
  5557. return -1;
  5558. }
  5559. }
  5560. return 0;
  5561. }
  5562. /**
  5563. * Used by `_.orderBy` to compare multiple properties of a value to another
  5564. * and stable sort them.
  5565. *
  5566. * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,
  5567. * specify an order of "desc" for descending or "asc" for ascending sort order
  5568. * of corresponding values.
  5569. *
  5570. * @private
  5571. * @param {Object} object The object to compare.
  5572. * @param {Object} other The other object to compare.
  5573. * @param {boolean[]|string[]} orders The order to sort by for each property.
  5574. * @returns {number} Returns the sort order indicator for `object`.
  5575. */
  5576. function compareMultiple(object, other, orders) {
  5577. var index = -1,
  5578. objCriteria = object.criteria,
  5579. othCriteria = other.criteria,
  5580. length = objCriteria.length,
  5581. ordersLength = orders.length;
  5582. while (++index < length) {
  5583. var result = compareAscending(objCriteria[index], othCriteria[index]);
  5584. if (result) {
  5585. if (index >= ordersLength) {
  5586. return result;
  5587. }
  5588. var order = orders[index];
  5589. return result * (order == 'desc' ? -1 : 1);
  5590. }
  5591. }
  5592. // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
  5593. // that causes it, under certain circumstances, to provide the same value for
  5594. // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247
  5595. // for more details.
  5596. //
  5597. // This also ensures a stable sort in V8 and other engines.
  5598. // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.
  5599. return object.index - other.index;
  5600. }
  5601. /**
  5602. * Creates an array that is the composition of partially applied arguments,
  5603. * placeholders, and provided arguments into a single array of arguments.
  5604. *
  5605. * @private
  5606. * @param {Array} args The provided arguments.
  5607. * @param {Array} partials The arguments to prepend to those provided.
  5608. * @param {Array} holders The `partials` placeholder indexes.
  5609. * @params {boolean} [isCurried] Specify composing for a curried function.
  5610. * @returns {Array} Returns the new array of composed arguments.
  5611. */
  5612. function composeArgs(args, partials, holders, isCurried) {
  5613. var argsIndex = -1,
  5614. argsLength = args.length,
  5615. holdersLength = holders.length,
  5616. leftIndex = -1,
  5617. leftLength = partials.length,
  5618. rangeLength = nativeMax(argsLength - holdersLength, 0),
  5619. result = Array(leftLength + rangeLength),
  5620. isUncurried = !isCurried;
  5621. while (++leftIndex < leftLength) {
  5622. result[leftIndex] = partials[leftIndex];
  5623. }
  5624. while (++argsIndex < holdersLength) {
  5625. if (isUncurried || argsIndex < argsLength) {
  5626. result[holders[argsIndex]] = args[argsIndex];
  5627. }
  5628. }
  5629. while (rangeLength--) {
  5630. result[leftIndex++] = args[argsIndex++];
  5631. }
  5632. return result;
  5633. }
  5634. /**
  5635. * This function is like `composeArgs` except that the arguments composition
  5636. * is tailored for `_.partialRight`.
  5637. *
  5638. * @private
  5639. * @param {Array} args The provided arguments.
  5640. * @param {Array} partials The arguments to append to those provided.
  5641. * @param {Array} holders The `partials` placeholder indexes.
  5642. * @params {boolean} [isCurried] Specify composing for a curried function.
  5643. * @returns {Array} Returns the new array of composed arguments.
  5644. */
  5645. function composeArgsRight(args, partials, holders, isCurried) {
  5646. var argsIndex = -1,
  5647. argsLength = args.length,
  5648. holdersIndex = -1,
  5649. holdersLength = holders.length,
  5650. rightIndex = -1,
  5651. rightLength = partials.length,
  5652. rangeLength = nativeMax(argsLength - holdersLength, 0),
  5653. result = Array(rangeLength + rightLength),
  5654. isUncurried = !isCurried;
  5655. while (++argsIndex < rangeLength) {
  5656. result[argsIndex] = args[argsIndex];
  5657. }
  5658. var offset = argsIndex;
  5659. while (++rightIndex < rightLength) {
  5660. result[offset + rightIndex] = partials[rightIndex];
  5661. }
  5662. while (++holdersIndex < holdersLength) {
  5663. if (isUncurried || argsIndex < argsLength) {
  5664. result[offset + holders[holdersIndex]] = args[argsIndex++];
  5665. }
  5666. }
  5667. return result;
  5668. }
  5669. /**
  5670. * Copies the values of `source` to `array`.
  5671. *
  5672. * @private
  5673. * @param {Array} source The array to copy values from.
  5674. * @param {Array} [array=[]] The array to copy values to.
  5675. * @returns {Array} Returns `array`.
  5676. */
  5677. function copyArray(source, array) {
  5678. var index = -1,
  5679. length = source.length;
  5680. array || (array = Array(length));
  5681. while (++index < length) {
  5682. array[index] = source[index];
  5683. }
  5684. return array;
  5685. }
  5686. /**
  5687. * Copies properties of `source` to `object`.
  5688. *
  5689. * @private
  5690. * @param {Object} source The object to copy properties from.
  5691. * @param {Array} props The property identifiers to copy.
  5692. * @param {Object} [object={}] The object to copy properties to.
  5693. * @param {Function} [customizer] The function to customize copied values.
  5694. * @returns {Object} Returns `object`.
  5695. */
  5696. function copyObject(source, props, object, customizer) {
  5697. var isNew = !object;
  5698. object || (object = {});
  5699. var index = -1,
  5700. length = props.length;
  5701. while (++index < length) {
  5702. var key = props[index];
  5703. var newValue = customizer
  5704. ? customizer(object[key], source[key], key, object, source)
  5705. : undefined;
  5706. if (newValue === undefined) {
  5707. newValue = source[key];
  5708. }
  5709. if (isNew) {
  5710. baseAssignValue(object, key, newValue);
  5711. } else {
  5712. assignValue(object, key, newValue);
  5713. }
  5714. }
  5715. return object;
  5716. }
  5717. /**
  5718. * Copies own symbols of `source` to `object`.
  5719. *
  5720. * @private
  5721. * @param {Object} source The object to copy symbols from.
  5722. * @param {Object} [object={}] The object to copy symbols to.
  5723. * @returns {Object} Returns `object`.
  5724. */
  5725. function copySymbols(source, object) {
  5726. return copyObject(source, getSymbols(source), object);
  5727. }
  5728. /**
  5729. * Copies own and inherited symbols of `source` to `object`.
  5730. *
  5731. * @private
  5732. * @param {Object} source The object to copy symbols from.
  5733. * @param {Object} [object={}] The object to copy symbols to.
  5734. * @returns {Object} Returns `object`.
  5735. */
  5736. function copySymbolsIn(source, object) {
  5737. return copyObject(source, getSymbolsIn(source), object);
  5738. }
  5739. /**
  5740. * Creates a function like `_.groupBy`.
  5741. *
  5742. * @private
  5743. * @param {Function} setter The function to set accumulator values.
  5744. * @param {Function} [initializer] The accumulator object initializer.
  5745. * @returns {Function} Returns the new aggregator function.
  5746. */
  5747. function createAggregator(setter, initializer) {
  5748. return function(collection, iteratee) {
  5749. var func = isArray(collection) ? arrayAggregator : baseAggregator,
  5750. accumulator = initializer ? initializer() : {};
  5751. return func(collection, setter, getIteratee(iteratee, 2), accumulator);
  5752. };
  5753. }
  5754. /**
  5755. * Creates a function like `_.assign`.
  5756. *
  5757. * @private
  5758. * @param {Function} assigner The function to assign values.
  5759. * @returns {Function} Returns the new assigner function.
  5760. */
  5761. function createAssigner(assigner) {
  5762. return baseRest(function(object, sources) {
  5763. var index = -1,
  5764. length = sources.length,
  5765. customizer = length > 1 ? sources[length - 1] : undefined,
  5766. guard = length > 2 ? sources[2] : undefined;
  5767. customizer = (assigner.length > 3 && typeof customizer == 'function')
  5768. ? (length--, customizer)
  5769. : undefined;
  5770. if (guard && isIterateeCall(sources[0], sources[1], guard)) {
  5771. customizer = length < 3 ? undefined : customizer;
  5772. length = 1;
  5773. }
  5774. object = Object(object);
  5775. while (++index < length) {
  5776. var source = sources[index];
  5777. if (source) {
  5778. assigner(object, source, index, customizer);
  5779. }
  5780. }
  5781. return object;
  5782. });
  5783. }
  5784. /**
  5785. * Creates a `baseEach` or `baseEachRight` function.
  5786. *
  5787. * @private
  5788. * @param {Function} eachFunc The function to iterate over a collection.
  5789. * @param {boolean} [fromRight] Specify iterating from right to left.
  5790. * @returns {Function} Returns the new base function.
  5791. */
  5792. function createBaseEach(eachFunc, fromRight) {
  5793. return function(collection, iteratee) {
  5794. if (collection == null) {
  5795. return collection;
  5796. }
  5797. if (!isArrayLike(collection)) {
  5798. return eachFunc(collection, iteratee);
  5799. }
  5800. var length = collection.length,
  5801. index = fromRight ? length : -1,
  5802. iterable = Object(collection);
  5803. while ((fromRight ? index-- : ++index < length)) {
  5804. if (iteratee(iterable[index], index, iterable) === false) {
  5805. break;
  5806. }
  5807. }
  5808. return collection;
  5809. };
  5810. }
  5811. /**
  5812. * Creates a base function for methods like `_.forIn` and `_.forOwn`.
  5813. *
  5814. * @private
  5815. * @param {boolean} [fromRight] Specify iterating from right to left.
  5816. * @returns {Function} Returns the new base function.
  5817. */
  5818. function createBaseFor(fromRight) {
  5819. return function(object, iteratee, keysFunc) {
  5820. var index = -1,
  5821. iterable = Object(object),
  5822. props = keysFunc(object),
  5823. length = props.length;
  5824. while (length--) {
  5825. var key = props[fromRight ? length : ++index];
  5826. if (iteratee(iterable[key], key, iterable) === false) {
  5827. break;
  5828. }
  5829. }
  5830. return object;
  5831. };
  5832. }
  5833. /**
  5834. * Creates a function that wraps `func` to invoke it with the optional `this`
  5835. * binding of `thisArg`.
  5836. *
  5837. * @private
  5838. * @param {Function} func The function to wrap.
  5839. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  5840. * @param {*} [thisArg] The `this` binding of `func`.
  5841. * @returns {Function} Returns the new wrapped function.
  5842. */
  5843. function createBind(func, bitmask, thisArg) {
  5844. var isBind = bitmask & WRAP_BIND_FLAG,
  5845. Ctor = createCtor(func);
  5846. function wrapper() {
  5847. var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
  5848. return fn.apply(isBind ? thisArg : this, arguments);
  5849. }
  5850. return wrapper;
  5851. }
  5852. /**
  5853. * Creates a function like `_.lowerFirst`.
  5854. *
  5855. * @private
  5856. * @param {string} methodName The name of the `String` case method to use.
  5857. * @returns {Function} Returns the new case function.
  5858. */
  5859. function createCaseFirst(methodName) {
  5860. return function(string) {
  5861. string = toString(string);
  5862. var strSymbols = hasUnicode(string)
  5863. ? stringToArray(string)
  5864. : undefined;
  5865. var chr = strSymbols
  5866. ? strSymbols[0]
  5867. : string.charAt(0);
  5868. var trailing = strSymbols
  5869. ? castSlice(strSymbols, 1).join('')
  5870. : string.slice(1);
  5871. return chr[methodName]() + trailing;
  5872. };
  5873. }
  5874. /**
  5875. * Creates a function like `_.camelCase`.
  5876. *
  5877. * @private
  5878. * @param {Function} callback The function to combine each word.
  5879. * @returns {Function} Returns the new compounder function.
  5880. */
  5881. function createCompounder(callback) {
  5882. return function(string) {
  5883. return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');
  5884. };
  5885. }
  5886. /**
  5887. * Creates a function that produces an instance of `Ctor` regardless of
  5888. * whether it was invoked as part of a `new` expression or by `call` or `apply`.
  5889. *
  5890. * @private
  5891. * @param {Function} Ctor The constructor to wrap.
  5892. * @returns {Function} Returns the new wrapped function.
  5893. */
  5894. function createCtor(Ctor) {
  5895. return function() {
  5896. // Use a `switch` statement to work with class constructors. See
  5897. // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist
  5898. // for more details.
  5899. var args = arguments;
  5900. switch (args.length) {
  5901. case 0: return new Ctor;
  5902. case 1: return new Ctor(args[0]);
  5903. case 2: return new Ctor(args[0], args[1]);
  5904. case 3: return new Ctor(args[0], args[1], args[2]);
  5905. case 4: return new Ctor(args[0], args[1], args[2], args[3]);
  5906. case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);
  5907. case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
  5908. case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
  5909. }
  5910. var thisBinding = baseCreate(Ctor.prototype),
  5911. result = Ctor.apply(thisBinding, args);
  5912. // Mimic the constructor's `return` behavior.
  5913. // See https://es5.github.io/#x13.2.2 for more details.
  5914. return isObject(result) ? result : thisBinding;
  5915. };
  5916. }
  5917. /**
  5918. * Creates a function that wraps `func` to enable currying.
  5919. *
  5920. * @private
  5921. * @param {Function} func The function to wrap.
  5922. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  5923. * @param {number} arity The arity of `func`.
  5924. * @returns {Function} Returns the new wrapped function.
  5925. */
  5926. function createCurry(func, bitmask, arity) {
  5927. var Ctor = createCtor(func);
  5928. function wrapper() {
  5929. var length = arguments.length,
  5930. args = Array(length),
  5931. index = length,
  5932. placeholder = getHolder(wrapper);
  5933. while (index--) {
  5934. args[index] = arguments[index];
  5935. }
  5936. var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)
  5937. ? []
  5938. : replaceHolders(args, placeholder);
  5939. length -= holders.length;
  5940. if (length < arity) {
  5941. return createRecurry(
  5942. func, bitmask, createHybrid, wrapper.placeholder, undefined,
  5943. args, holders, undefined, undefined, arity - length);
  5944. }
  5945. var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
  5946. return apply(fn, this, args);
  5947. }
  5948. return wrapper;
  5949. }
  5950. /**
  5951. * Creates a `_.find` or `_.findLast` function.
  5952. *
  5953. * @private
  5954. * @param {Function} findIndexFunc The function to find the collection index.
  5955. * @returns {Function} Returns the new find function.
  5956. */
  5957. function createFind(findIndexFunc) {
  5958. return function(collection, predicate, fromIndex) {
  5959. var iterable = Object(collection);
  5960. if (!isArrayLike(collection)) {
  5961. var iteratee = getIteratee(predicate, 3);
  5962. collection = keys(collection);
  5963. predicate = function(key) { return iteratee(iterable[key], key, iterable); };
  5964. }
  5965. var index = findIndexFunc(collection, predicate, fromIndex);
  5966. return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;
  5967. };
  5968. }
  5969. /**
  5970. * Creates a `_.flow` or `_.flowRight` function.
  5971. *
  5972. * @private
  5973. * @param {boolean} [fromRight] Specify iterating from right to left.
  5974. * @returns {Function} Returns the new flow function.
  5975. */
  5976. function createFlow(fromRight) {
  5977. return flatRest(function(funcs) {
  5978. var length = funcs.length,
  5979. index = length,
  5980. prereq = LodashWrapper.prototype.thru;
  5981. if (fromRight) {
  5982. funcs.reverse();
  5983. }
  5984. while (index--) {
  5985. var func = funcs[index];
  5986. if (typeof func != 'function') {
  5987. throw new TypeError(FUNC_ERROR_TEXT);
  5988. }
  5989. if (prereq && !wrapper && getFuncName(func) == 'wrapper') {
  5990. var wrapper = new LodashWrapper([], true);
  5991. }
  5992. }
  5993. index = wrapper ? index : length;
  5994. while (++index < length) {
  5995. func = funcs[index];
  5996. var funcName = getFuncName(func),
  5997. data = funcName == 'wrapper' ? getData(func) : undefined;
  5998. if (data && isLaziable(data[0]) &&
  5999. data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&
  6000. !data[4].length && data[9] == 1
  6001. ) {
  6002. wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
  6003. } else {
  6004. wrapper = (func.length == 1 && isLaziable(func))
  6005. ? wrapper[funcName]()
  6006. : wrapper.thru(func);
  6007. }
  6008. }
  6009. return function() {
  6010. var args = arguments,
  6011. value = args[0];
  6012. if (wrapper && args.length == 1 && isArray(value)) {
  6013. return wrapper.plant(value).value();
  6014. }
  6015. var index = 0,
  6016. result = length ? funcs[index].apply(this, args) : value;
  6017. while (++index < length) {
  6018. result = funcs[index].call(this, result);
  6019. }
  6020. return result;
  6021. };
  6022. });
  6023. }
  6024. /**
  6025. * Creates a function that wraps `func` to invoke it with optional `this`
  6026. * binding of `thisArg`, partial application, and currying.
  6027. *
  6028. * @private
  6029. * @param {Function|string} func The function or method name to wrap.
  6030. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  6031. * @param {*} [thisArg] The `this` binding of `func`.
  6032. * @param {Array} [partials] The arguments to prepend to those provided to
  6033. * the new function.
  6034. * @param {Array} [holders] The `partials` placeholder indexes.
  6035. * @param {Array} [partialsRight] The arguments to append to those provided
  6036. * to the new function.
  6037. * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.
  6038. * @param {Array} [argPos] The argument positions of the new function.
  6039. * @param {number} [ary] The arity cap of `func`.
  6040. * @param {number} [arity] The arity of `func`.
  6041. * @returns {Function} Returns the new wrapped function.
  6042. */
  6043. function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {
  6044. var isAry = bitmask & WRAP_ARY_FLAG,
  6045. isBind = bitmask & WRAP_BIND_FLAG,
  6046. isBindKey = bitmask & WRAP_BIND_KEY_FLAG,
  6047. isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),
  6048. isFlip = bitmask & WRAP_FLIP_FLAG,
  6049. Ctor = isBindKey ? undefined : createCtor(func);
  6050. function wrapper() {
  6051. var length = arguments.length,
  6052. args = Array(length),
  6053. index = length;
  6054. while (index--) {
  6055. args[index] = arguments[index];
  6056. }
  6057. if (isCurried) {
  6058. var placeholder = getHolder(wrapper),
  6059. holdersCount = countHolders(args, placeholder);
  6060. }
  6061. if (partials) {
  6062. args = composeArgs(args, partials, holders, isCurried);
  6063. }
  6064. if (partialsRight) {
  6065. args = composeArgsRight(args, partialsRight, holdersRight, isCurried);
  6066. }
  6067. length -= holdersCount;
  6068. if (isCurried && length < arity) {
  6069. var newHolders = replaceHolders(args, placeholder);
  6070. return createRecurry(
  6071. func, bitmask, createHybrid, wrapper.placeholder, thisArg,
  6072. args, newHolders, argPos, ary, arity - length
  6073. );
  6074. }
  6075. var thisBinding = isBind ? thisArg : this,
  6076. fn = isBindKey ? thisBinding[func] : func;
  6077. length = args.length;
  6078. if (argPos) {
  6079. args = reorder(args, argPos);
  6080. } else if (isFlip && length > 1) {
  6081. args.reverse();
  6082. }
  6083. if (isAry && ary < length) {
  6084. args.length = ary;
  6085. }
  6086. if (this && this !== root && this instanceof wrapper) {
  6087. fn = Ctor || createCtor(fn);
  6088. }
  6089. return fn.apply(thisBinding, args);
  6090. }
  6091. return wrapper;
  6092. }
  6093. /**
  6094. * Creates a function like `_.invertBy`.
  6095. *
  6096. * @private
  6097. * @param {Function} setter The function to set accumulator values.
  6098. * @param {Function} toIteratee The function to resolve iteratees.
  6099. * @returns {Function} Returns the new inverter function.
  6100. */
  6101. function createInverter(setter, toIteratee) {
  6102. return function(object, iteratee) {
  6103. return baseInverter(object, setter, toIteratee(iteratee), {});
  6104. };
  6105. }
  6106. /**
  6107. * Creates a function that performs a mathematical operation on two values.
  6108. *
  6109. * @private
  6110. * @param {Function} operator The function to perform the operation.
  6111. * @param {number} [defaultValue] The value used for `undefined` arguments.
  6112. * @returns {Function} Returns the new mathematical operation function.
  6113. */
  6114. function createMathOperation(operator, defaultValue) {
  6115. return function(value, other) {
  6116. var result;
  6117. if (value === undefined && other === undefined) {
  6118. return defaultValue;
  6119. }
  6120. if (value !== undefined) {
  6121. result = value;
  6122. }
  6123. if (other !== undefined) {
  6124. if (result === undefined) {
  6125. return other;
  6126. }
  6127. if (typeof value == 'string' || typeof other == 'string') {
  6128. value = baseToString(value);
  6129. other = baseToString(other);
  6130. } else {
  6131. value = baseToNumber(value);
  6132. other = baseToNumber(other);
  6133. }
  6134. result = operator(value, other);
  6135. }
  6136. return result;
  6137. };
  6138. }
  6139. /**
  6140. * Creates a function like `_.over`.
  6141. *
  6142. * @private
  6143. * @param {Function} arrayFunc The function to iterate over iteratees.
  6144. * @returns {Function} Returns the new over function.
  6145. */
  6146. function createOver(arrayFunc) {
  6147. return flatRest(function(iteratees) {
  6148. iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
  6149. return baseRest(function(args) {
  6150. var thisArg = this;
  6151. return arrayFunc(iteratees, function(iteratee) {
  6152. return apply(iteratee, thisArg, args);
  6153. });
  6154. });
  6155. });
  6156. }
  6157. /**
  6158. * Creates the padding for `string` based on `length`. The `chars` string
  6159. * is truncated if the number of characters exceeds `length`.
  6160. *
  6161. * @private
  6162. * @param {number} length The padding length.
  6163. * @param {string} [chars=' '] The string used as padding.
  6164. * @returns {string} Returns the padding for `string`.
  6165. */
  6166. function createPadding(length, chars) {
  6167. chars = chars === undefined ? ' ' : baseToString(chars);
  6168. var charsLength = chars.length;
  6169. if (charsLength < 2) {
  6170. return charsLength ? baseRepeat(chars, length) : chars;
  6171. }
  6172. var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));
  6173. return hasUnicode(chars)
  6174. ? castSlice(stringToArray(result), 0, length).join('')
  6175. : result.slice(0, length);
  6176. }
  6177. /**
  6178. * Creates a function that wraps `func` to invoke it with the `this` binding
  6179. * of `thisArg` and `partials` prepended to the arguments it receives.
  6180. *
  6181. * @private
  6182. * @param {Function} func The function to wrap.
  6183. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  6184. * @param {*} thisArg The `this` binding of `func`.
  6185. * @param {Array} partials The arguments to prepend to those provided to
  6186. * the new function.
  6187. * @returns {Function} Returns the new wrapped function.
  6188. */
  6189. function createPartial(func, bitmask, thisArg, partials) {
  6190. var isBind = bitmask & WRAP_BIND_FLAG,
  6191. Ctor = createCtor(func);
  6192. function wrapper() {
  6193. var argsIndex = -1,
  6194. argsLength = arguments.length,
  6195. leftIndex = -1,
  6196. leftLength = partials.length,
  6197. args = Array(leftLength + argsLength),
  6198. fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
  6199. while (++leftIndex < leftLength) {
  6200. args[leftIndex] = partials[leftIndex];
  6201. }
  6202. while (argsLength--) {
  6203. args[leftIndex++] = arguments[++argsIndex];
  6204. }
  6205. return apply(fn, isBind ? thisArg : this, args);
  6206. }
  6207. return wrapper;
  6208. }
  6209. /**
  6210. * Creates a `_.range` or `_.rangeRight` function.
  6211. *
  6212. * @private
  6213. * @param {boolean} [fromRight] Specify iterating from right to left.
  6214. * @returns {Function} Returns the new range function.
  6215. */
  6216. function createRange(fromRight) {
  6217. return function(start, end, step) {
  6218. if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {
  6219. end = step = undefined;
  6220. }
  6221. // Ensure the sign of `-0` is preserved.
  6222. start = toFinite(start);
  6223. if (end === undefined) {
  6224. end = start;
  6225. start = 0;
  6226. } else {
  6227. end = toFinite(end);
  6228. }
  6229. step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);
  6230. return baseRange(start, end, step, fromRight);
  6231. };
  6232. }
  6233. /**
  6234. * Creates a function that performs a relational operation on two values.
  6235. *
  6236. * @private
  6237. * @param {Function} operator The function to perform the operation.
  6238. * @returns {Function} Returns the new relational operation function.
  6239. */
  6240. function createRelationalOperation(operator) {
  6241. return function(value, other) {
  6242. if (!(typeof value == 'string' && typeof other == 'string')) {
  6243. value = toNumber(value);
  6244. other = toNumber(other);
  6245. }
  6246. return operator(value, other);
  6247. };
  6248. }
  6249. /**
  6250. * Creates a function that wraps `func` to continue currying.
  6251. *
  6252. * @private
  6253. * @param {Function} func The function to wrap.
  6254. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  6255. * @param {Function} wrapFunc The function to create the `func` wrapper.
  6256. * @param {*} placeholder The placeholder value.
  6257. * @param {*} [thisArg] The `this` binding of `func`.
  6258. * @param {Array} [partials] The arguments to prepend to those provided to
  6259. * the new function.
  6260. * @param {Array} [holders] The `partials` placeholder indexes.
  6261. * @param {Array} [argPos] The argument positions of the new function.
  6262. * @param {number} [ary] The arity cap of `func`.
  6263. * @param {number} [arity] The arity of `func`.
  6264. * @returns {Function} Returns the new wrapped function.
  6265. */
  6266. function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {
  6267. var isCurry = bitmask & WRAP_CURRY_FLAG,
  6268. newHolders = isCurry ? holders : undefined,
  6269. newHoldersRight = isCurry ? undefined : holders,
  6270. newPartials = isCurry ? partials : undefined,
  6271. newPartialsRight = isCurry ? undefined : partials;
  6272. bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);
  6273. bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);
  6274. if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {
  6275. bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);
  6276. }
  6277. var newData = [
  6278. func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,
  6279. newHoldersRight, argPos, ary, arity
  6280. ];
  6281. var result = wrapFunc.apply(undefined, newData);
  6282. if (isLaziable(func)) {
  6283. setData(result, newData);
  6284. }
  6285. result.placeholder = placeholder;
  6286. return setWrapToString(result, func, bitmask);
  6287. }
  6288. /**
  6289. * Creates a function like `_.round`.
  6290. *
  6291. * @private
  6292. * @param {string} methodName The name of the `Math` method to use when rounding.
  6293. * @returns {Function} Returns the new round function.
  6294. */
  6295. function createRound(methodName) {
  6296. var func = Math[methodName];
  6297. return function(number, precision) {
  6298. number = toNumber(number);
  6299. precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
  6300. if (precision && nativeIsFinite(number)) {
  6301. // Shift with exponential notation to avoid floating-point issues.
  6302. // See [MDN](https://mdn.io/round#Examples) for more details.
  6303. var pair = (toString(number) + 'e').split('e'),
  6304. value = func(pair[0] + 'e' + (+pair[1] + precision));
  6305. pair = (toString(value) + 'e').split('e');
  6306. return +(pair[0] + 'e' + (+pair[1] - precision));
  6307. }
  6308. return func(number);
  6309. };
  6310. }
  6311. /**
  6312. * Creates a set object of `values`.
  6313. *
  6314. * @private
  6315. * @param {Array} values The values to add to the set.
  6316. * @returns {Object} Returns the new set.
  6317. */
  6318. var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {
  6319. return new Set(values);
  6320. };
  6321. /**
  6322. * Creates a `_.toPairs` or `_.toPairsIn` function.
  6323. *
  6324. * @private
  6325. * @param {Function} keysFunc The function to get the keys of a given object.
  6326. * @returns {Function} Returns the new pairs function.
  6327. */
  6328. function createToPairs(keysFunc) {
  6329. return function(object) {
  6330. var tag = getTag(object);
  6331. if (tag == mapTag) {
  6332. return mapToArray(object);
  6333. }
  6334. if (tag == setTag) {
  6335. return setToPairs(object);
  6336. }
  6337. return baseToPairs(object, keysFunc(object));
  6338. };
  6339. }
  6340. /**
  6341. * Creates a function that either curries or invokes `func` with optional
  6342. * `this` binding and partially applied arguments.
  6343. *
  6344. * @private
  6345. * @param {Function|string} func The function or method name to wrap.
  6346. * @param {number} bitmask The bitmask flags.
  6347. * 1 - `_.bind`
  6348. * 2 - `_.bindKey`
  6349. * 4 - `_.curry` or `_.curryRight` of a bound function
  6350. * 8 - `_.curry`
  6351. * 16 - `_.curryRight`
  6352. * 32 - `_.partial`
  6353. * 64 - `_.partialRight`
  6354. * 128 - `_.rearg`
  6355. * 256 - `_.ary`
  6356. * 512 - `_.flip`
  6357. * @param {*} [thisArg] The `this` binding of `func`.
  6358. * @param {Array} [partials] The arguments to be partially applied.
  6359. * @param {Array} [holders] The `partials` placeholder indexes.
  6360. * @param {Array} [argPos] The argument positions of the new function.
  6361. * @param {number} [ary] The arity cap of `func`.
  6362. * @param {number} [arity] The arity of `func`.
  6363. * @returns {Function} Returns the new wrapped function.
  6364. */
  6365. function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {
  6366. var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;
  6367. if (!isBindKey && typeof func != 'function') {
  6368. throw new TypeError(FUNC_ERROR_TEXT);
  6369. }
  6370. var length = partials ? partials.length : 0;
  6371. if (!length) {
  6372. bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);
  6373. partials = holders = undefined;
  6374. }
  6375. ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);
  6376. arity = arity === undefined ? arity : toInteger(arity);
  6377. length -= holders ? holders.length : 0;
  6378. if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {
  6379. var partialsRight = partials,
  6380. holdersRight = holders;
  6381. partials = holders = undefined;
  6382. }
  6383. var data = isBindKey ? undefined : getData(func);
  6384. var newData = [
  6385. func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,
  6386. argPos, ary, arity
  6387. ];
  6388. if (data) {
  6389. mergeData(newData, data);
  6390. }
  6391. func = newData[0];
  6392. bitmask = newData[1];
  6393. thisArg = newData[2];
  6394. partials = newData[3];
  6395. holders = newData[4];
  6396. arity = newData[9] = newData[9] === undefined
  6397. ? (isBindKey ? 0 : func.length)
  6398. : nativeMax(newData[9] - length, 0);
  6399. if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {
  6400. bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);
  6401. }
  6402. if (!bitmask || bitmask == WRAP_BIND_FLAG) {
  6403. var result = createBind(func, bitmask, thisArg);
  6404. } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {
  6405. result = createCurry(func, bitmask, arity);
  6406. } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {
  6407. result = createPartial(func, bitmask, thisArg, partials);
  6408. } else {
  6409. result = createHybrid.apply(undefined, newData);
  6410. }
  6411. var setter = data ? baseSetData : setData;
  6412. return setWrapToString(setter(result, newData), func, bitmask);
  6413. }
  6414. /**
  6415. * Used by `_.defaults` to customize its `_.assignIn` use to assign properties
  6416. * of source objects to the destination object for all destination properties
  6417. * that resolve to `undefined`.
  6418. *
  6419. * @private
  6420. * @param {*} objValue The destination value.
  6421. * @param {*} srcValue The source value.
  6422. * @param {string} key The key of the property to assign.
  6423. * @param {Object} object The parent object of `objValue`.
  6424. * @returns {*} Returns the value to assign.
  6425. */
  6426. function customDefaultsAssignIn(objValue, srcValue, key, object) {
  6427. if (objValue === undefined ||
  6428. (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {
  6429. return srcValue;
  6430. }
  6431. return objValue;
  6432. }
  6433. /**
  6434. * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source
  6435. * objects into destination objects that are passed thru.
  6436. *
  6437. * @private
  6438. * @param {*} objValue The destination value.
  6439. * @param {*} srcValue The source value.
  6440. * @param {string} key The key of the property to merge.
  6441. * @param {Object} object The parent object of `objValue`.
  6442. * @param {Object} source The parent object of `srcValue`.
  6443. * @param {Object} [stack] Tracks traversed source values and their merged
  6444. * counterparts.
  6445. * @returns {*} Returns the value to assign.
  6446. */
  6447. function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {
  6448. if (isObject(objValue) && isObject(srcValue)) {
  6449. // Recursively merge objects and arrays (susceptible to call stack limits).
  6450. stack.set(srcValue, objValue);
  6451. baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);
  6452. stack['delete'](srcValue);
  6453. }
  6454. return objValue;
  6455. }
  6456. /**
  6457. * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain
  6458. * objects.
  6459. *
  6460. * @private
  6461. * @param {*} value The value to inspect.
  6462. * @param {string} key The key of the property to inspect.
  6463. * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.
  6464. */
  6465. function customOmitClone(value) {
  6466. return isPlainObject(value) ? undefined : value;
  6467. }
  6468. /**
  6469. * A specialized version of `baseIsEqualDeep` for arrays with support for
  6470. * partial deep comparisons.
  6471. *
  6472. * @private
  6473. * @param {Array} array The array to compare.
  6474. * @param {Array} other The other array to compare.
  6475. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  6476. * @param {Function} customizer The function to customize comparisons.
  6477. * @param {Function} equalFunc The function to determine equivalents of values.
  6478. * @param {Object} stack Tracks traversed `array` and `other` objects.
  6479. * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
  6480. */
  6481. function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
  6482. var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
  6483. arrLength = array.length,
  6484. othLength = other.length;
  6485. if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
  6486. return false;
  6487. }
  6488. // Check that cyclic values are equal.
  6489. var arrStacked = stack.get(array);
  6490. var othStacked = stack.get(other);
  6491. if (arrStacked && othStacked) {
  6492. return arrStacked == other && othStacked == array;
  6493. }
  6494. var index = -1,
  6495. result = true,
  6496. seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;
  6497. stack.set(array, other);
  6498. stack.set(other, array);
  6499. // Ignore non-index properties.
  6500. while (++index < arrLength) {
  6501. var arrValue = array[index],
  6502. othValue = other[index];
  6503. if (customizer) {
  6504. var compared = isPartial
  6505. ? customizer(othValue, arrValue, index, other, array, stack)
  6506. : customizer(arrValue, othValue, index, array, other, stack);
  6507. }
  6508. if (compared !== undefined) {
  6509. if (compared) {
  6510. continue;
  6511. }
  6512. result = false;
  6513. break;
  6514. }
  6515. // Recursively compare arrays (susceptible to call stack limits).
  6516. if (seen) {
  6517. if (!arraySome(other, function(othValue, othIndex) {
  6518. if (!cacheHas(seen, othIndex) &&
  6519. (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
  6520. return seen.push(othIndex);
  6521. }
  6522. })) {
  6523. result = false;
  6524. break;
  6525. }
  6526. } else if (!(
  6527. arrValue === othValue ||
  6528. equalFunc(arrValue, othValue, bitmask, customizer, stack)
  6529. )) {
  6530. result = false;
  6531. break;
  6532. }
  6533. }
  6534. stack['delete'](array);
  6535. stack['delete'](other);
  6536. return result;
  6537. }
  6538. /**
  6539. * A specialized version of `baseIsEqualDeep` for comparing objects of
  6540. * the same `toStringTag`.
  6541. *
  6542. * **Note:** This function only supports comparing values with tags of
  6543. * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
  6544. *
  6545. * @private
  6546. * @param {Object} object The object to compare.
  6547. * @param {Object} other The other object to compare.
  6548. * @param {string} tag The `toStringTag` of the objects to compare.
  6549. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  6550. * @param {Function} customizer The function to customize comparisons.
  6551. * @param {Function} equalFunc The function to determine equivalents of values.
  6552. * @param {Object} stack Tracks traversed `object` and `other` objects.
  6553. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  6554. */
  6555. function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
  6556. switch (tag) {
  6557. case dataViewTag:
  6558. if ((object.byteLength != other.byteLength) ||
  6559. (object.byteOffset != other.byteOffset)) {
  6560. return false;
  6561. }
  6562. object = object.buffer;
  6563. other = other.buffer;
  6564. case arrayBufferTag:
  6565. if ((object.byteLength != other.byteLength) ||
  6566. !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
  6567. return false;
  6568. }
  6569. return true;
  6570. case boolTag:
  6571. case dateTag:
  6572. case numberTag:
  6573. // Coerce booleans to `1` or `0` and dates to milliseconds.
  6574. // Invalid dates are coerced to `NaN`.
  6575. return eq(+object, +other);
  6576. case errorTag:
  6577. return object.name == other.name && object.message == other.message;
  6578. case regexpTag:
  6579. case stringTag:
  6580. // Coerce regexes to strings and treat strings, primitives and objects,
  6581. // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
  6582. // for more details.
  6583. return object == (other + '');
  6584. case mapTag:
  6585. var convert = mapToArray;
  6586. case setTag:
  6587. var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
  6588. convert || (convert = setToArray);
  6589. if (object.size != other.size && !isPartial) {
  6590. return false;
  6591. }
  6592. // Assume cyclic values are equal.
  6593. var stacked = stack.get(object);
  6594. if (stacked) {
  6595. return stacked == other;
  6596. }
  6597. bitmask |= COMPARE_UNORDERED_FLAG;
  6598. // Recursively compare objects (susceptible to call stack limits).
  6599. stack.set(object, other);
  6600. var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
  6601. stack['delete'](object);
  6602. return result;
  6603. case symbolTag:
  6604. if (symbolValueOf) {
  6605. return symbolValueOf.call(object) == symbolValueOf.call(other);
  6606. }
  6607. }
  6608. return false;
  6609. }
  6610. /**
  6611. * A specialized version of `baseIsEqualDeep` for objects with support for
  6612. * partial deep comparisons.
  6613. *
  6614. * @private
  6615. * @param {Object} object The object to compare.
  6616. * @param {Object} other The other object to compare.
  6617. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  6618. * @param {Function} customizer The function to customize comparisons.
  6619. * @param {Function} equalFunc The function to determine equivalents of values.
  6620. * @param {Object} stack Tracks traversed `object` and `other` objects.
  6621. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  6622. */
  6623. function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
  6624. var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
  6625. objProps = getAllKeys(object),
  6626. objLength = objProps.length,
  6627. othProps = getAllKeys(other),
  6628. othLength = othProps.length;
  6629. if (objLength != othLength && !isPartial) {
  6630. return false;
  6631. }
  6632. var index = objLength;
  6633. while (index--) {
  6634. var key = objProps[index];
  6635. if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
  6636. return false;
  6637. }
  6638. }
  6639. // Check that cyclic values are equal.
  6640. var objStacked = stack.get(object);
  6641. var othStacked = stack.get(other);
  6642. if (objStacked && othStacked) {
  6643. return objStacked == other && othStacked == object;
  6644. }
  6645. var result = true;
  6646. stack.set(object, other);
  6647. stack.set(other, object);
  6648. var skipCtor = isPartial;
  6649. while (++index < objLength) {
  6650. key = objProps[index];
  6651. var objValue = object[key],
  6652. othValue = other[key];
  6653. if (customizer) {
  6654. var compared = isPartial
  6655. ? customizer(othValue, objValue, key, other, object, stack)
  6656. : customizer(objValue, othValue, key, object, other, stack);
  6657. }
  6658. // Recursively compare objects (susceptible to call stack limits).
  6659. if (!(compared === undefined
  6660. ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
  6661. : compared
  6662. )) {
  6663. result = false;
  6664. break;
  6665. }
  6666. skipCtor || (skipCtor = key == 'constructor');
  6667. }
  6668. if (result && !skipCtor) {
  6669. var objCtor = object.constructor,
  6670. othCtor = other.constructor;
  6671. // Non `Object` object instances with different constructors are not equal.
  6672. if (objCtor != othCtor &&
  6673. ('constructor' in object && 'constructor' in other) &&
  6674. !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
  6675. typeof othCtor == 'function' && othCtor instanceof othCtor)) {
  6676. result = false;
  6677. }
  6678. }
  6679. stack['delete'](object);
  6680. stack['delete'](other);
  6681. return result;
  6682. }
  6683. /**
  6684. * A specialized version of `baseRest` which flattens the rest array.
  6685. *
  6686. * @private
  6687. * @param {Function} func The function to apply a rest parameter to.
  6688. * @returns {Function} Returns the new function.
  6689. */
  6690. function flatRest(func) {
  6691. return setToString(overRest(func, undefined, flatten), func + '');
  6692. }
  6693. /**
  6694. * Creates an array of own enumerable property names and symbols of `object`.
  6695. *
  6696. * @private
  6697. * @param {Object} object The object to query.
  6698. * @returns {Array} Returns the array of property names and symbols.
  6699. */
  6700. function getAllKeys(object) {
  6701. return baseGetAllKeys(object, keys, getSymbols);
  6702. }
  6703. /**
  6704. * Creates an array of own and inherited enumerable property names and
  6705. * symbols of `object`.
  6706. *
  6707. * @private
  6708. * @param {Object} object The object to query.
  6709. * @returns {Array} Returns the array of property names and symbols.
  6710. */
  6711. function getAllKeysIn(object) {
  6712. return baseGetAllKeys(object, keysIn, getSymbolsIn);
  6713. }
  6714. /**
  6715. * Gets metadata for `func`.
  6716. *
  6717. * @private
  6718. * @param {Function} func The function to query.
  6719. * @returns {*} Returns the metadata for `func`.
  6720. */
  6721. var getData = !metaMap ? noop : function(func) {
  6722. return metaMap.get(func);
  6723. };
  6724. /**
  6725. * Gets the name of `func`.
  6726. *
  6727. * @private
  6728. * @param {Function} func The function to query.
  6729. * @returns {string} Returns the function name.
  6730. */
  6731. function getFuncName(func) {
  6732. var result = (func.name + ''),
  6733. array = realNames[result],
  6734. length = hasOwnProperty.call(realNames, result) ? array.length : 0;
  6735. while (length--) {
  6736. var data = array[length],
  6737. otherFunc = data.func;
  6738. if (otherFunc == null || otherFunc == func) {
  6739. return data.name;
  6740. }
  6741. }
  6742. return result;
  6743. }
  6744. /**
  6745. * Gets the argument placeholder value for `func`.
  6746. *
  6747. * @private
  6748. * @param {Function} func The function to inspect.
  6749. * @returns {*} Returns the placeholder value.
  6750. */
  6751. function getHolder(func) {
  6752. var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;
  6753. return object.placeholder;
  6754. }
  6755. /**
  6756. * Gets the appropriate "iteratee" function. If `_.iteratee` is customized,
  6757. * this function returns the custom method, otherwise it returns `baseIteratee`.
  6758. * If arguments are provided, the chosen function is invoked with them and
  6759. * its result is returned.
  6760. *
  6761. * @private
  6762. * @param {*} [value] The value to convert to an iteratee.
  6763. * @param {number} [arity] The arity of the created iteratee.
  6764. * @returns {Function} Returns the chosen function or its result.
  6765. */
  6766. function getIteratee() {
  6767. var result = lodash.iteratee || iteratee;
  6768. result = result === iteratee ? baseIteratee : result;
  6769. return arguments.length ? result(arguments[0], arguments[1]) : result;
  6770. }
  6771. /**
  6772. * Gets the data for `map`.
  6773. *
  6774. * @private
  6775. * @param {Object} map The map to query.
  6776. * @param {string} key The reference key.
  6777. * @returns {*} Returns the map data.
  6778. */
  6779. function getMapData(map, key) {
  6780. var data = map.__data__;
  6781. return isKeyable(key)
  6782. ? data[typeof key == 'string' ? 'string' : 'hash']
  6783. : data.map;
  6784. }
  6785. /**
  6786. * Gets the property names, values, and compare flags of `object`.
  6787. *
  6788. * @private
  6789. * @param {Object} object The object to query.
  6790. * @returns {Array} Returns the match data of `object`.
  6791. */
  6792. function getMatchData(object) {
  6793. var result = keys(object),
  6794. length = result.length;
  6795. while (length--) {
  6796. var key = result[length],
  6797. value = object[key];
  6798. result[length] = [key, value, isStrictComparable(value)];
  6799. }
  6800. return result;
  6801. }
  6802. /**
  6803. * Gets the native function at `key` of `object`.
  6804. *
  6805. * @private
  6806. * @param {Object} object The object to query.
  6807. * @param {string} key The key of the method to get.
  6808. * @returns {*} Returns the function if it's native, else `undefined`.
  6809. */
  6810. function getNative(object, key) {
  6811. var value = getValue(object, key);
  6812. return baseIsNative(value) ? value : undefined;
  6813. }
  6814. /**
  6815. * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
  6816. *
  6817. * @private
  6818. * @param {*} value The value to query.
  6819. * @returns {string} Returns the raw `toStringTag`.
  6820. */
  6821. function getRawTag(value) {
  6822. var isOwn = hasOwnProperty.call(value, symToStringTag),
  6823. tag = value[symToStringTag];
  6824. try {
  6825. value[symToStringTag] = undefined;
  6826. var unmasked = true;
  6827. } catch (e) {}
  6828. var result = nativeObjectToString.call(value);
  6829. if (unmasked) {
  6830. if (isOwn) {
  6831. value[symToStringTag] = tag;
  6832. } else {
  6833. delete value[symToStringTag];
  6834. }
  6835. }
  6836. return result;
  6837. }
  6838. /**
  6839. * Creates an array of the own enumerable symbols of `object`.
  6840. *
  6841. * @private
  6842. * @param {Object} object The object to query.
  6843. * @returns {Array} Returns the array of symbols.
  6844. */
  6845. var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
  6846. if (object == null) {
  6847. return [];
  6848. }
  6849. object = Object(object);
  6850. return arrayFilter(nativeGetSymbols(object), function(symbol) {
  6851. return propertyIsEnumerable.call(object, symbol);
  6852. });
  6853. };
  6854. /**
  6855. * Creates an array of the own and inherited enumerable symbols of `object`.
  6856. *
  6857. * @private
  6858. * @param {Object} object The object to query.
  6859. * @returns {Array} Returns the array of symbols.
  6860. */
  6861. var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
  6862. var result = [];
  6863. while (object) {
  6864. arrayPush(result, getSymbols(object));
  6865. object = getPrototype(object);
  6866. }
  6867. return result;
  6868. };
  6869. /**
  6870. * Gets the `toStringTag` of `value`.
  6871. *
  6872. * @private
  6873. * @param {*} value The value to query.
  6874. * @returns {string} Returns the `toStringTag`.
  6875. */
  6876. var getTag = baseGetTag;
  6877. // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
  6878. if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
  6879. (Map && getTag(new Map) != mapTag) ||
  6880. (Promise && getTag(Promise.resolve()) != promiseTag) ||
  6881. (Set && getTag(new Set) != setTag) ||
  6882. (WeakMap && getTag(new WeakMap) != weakMapTag)) {
  6883. getTag = function(value) {
  6884. var result = baseGetTag(value),
  6885. Ctor = result == objectTag ? value.constructor : undefined,
  6886. ctorString = Ctor ? toSource(Ctor) : '';
  6887. if (ctorString) {
  6888. switch (ctorString) {
  6889. case dataViewCtorString: return dataViewTag;
  6890. case mapCtorString: return mapTag;
  6891. case promiseCtorString: return promiseTag;
  6892. case setCtorString: return setTag;
  6893. case weakMapCtorString: return weakMapTag;
  6894. }
  6895. }
  6896. return result;
  6897. };
  6898. }
  6899. /**
  6900. * Gets the view, applying any `transforms` to the `start` and `end` positions.
  6901. *
  6902. * @private
  6903. * @param {number} start The start of the view.
  6904. * @param {number} end The end of the view.
  6905. * @param {Array} transforms The transformations to apply to the view.
  6906. * @returns {Object} Returns an object containing the `start` and `end`
  6907. * positions of the view.
  6908. */
  6909. function getView(start, end, transforms) {
  6910. var index = -1,
  6911. length = transforms.length;
  6912. while (++index < length) {
  6913. var data = transforms[index],
  6914. size = data.size;
  6915. switch (data.type) {
  6916. case 'drop': start += size; break;
  6917. case 'dropRight': end -= size; break;
  6918. case 'take': end = nativeMin(end, start + size); break;
  6919. case 'takeRight': start = nativeMax(start, end - size); break;
  6920. }
  6921. }
  6922. return { 'start': start, 'end': end };
  6923. }
  6924. /**
  6925. * Extracts wrapper details from the `source` body comment.
  6926. *
  6927. * @private
  6928. * @param {string} source The source to inspect.
  6929. * @returns {Array} Returns the wrapper details.
  6930. */
  6931. function getWrapDetails(source) {
  6932. var match = source.match(reWrapDetails);
  6933. return match ? match[1].split(reSplitDetails) : [];
  6934. }
  6935. /**
  6936. * Checks if `path` exists on `object`.
  6937. *
  6938. * @private
  6939. * @param {Object} object The object to query.
  6940. * @param {Array|string} path The path to check.
  6941. * @param {Function} hasFunc The function to check properties.
  6942. * @returns {boolean} Returns `true` if `path` exists, else `false`.
  6943. */
  6944. function hasPath(object, path, hasFunc) {
  6945. path = castPath(path, object);
  6946. var index = -1,
  6947. length = path.length,
  6948. result = false;
  6949. while (++index < length) {
  6950. var key = toKey(path[index]);
  6951. if (!(result = object != null && hasFunc(object, key))) {
  6952. break;
  6953. }
  6954. object = object[key];
  6955. }
  6956. if (result || ++index != length) {
  6957. return result;
  6958. }
  6959. length = object == null ? 0 : object.length;
  6960. return !!length && isLength(length) && isIndex(key, length) &&
  6961. (isArray(object) || isArguments(object));
  6962. }
  6963. /**
  6964. * Initializes an array clone.
  6965. *
  6966. * @private
  6967. * @param {Array} array The array to clone.
  6968. * @returns {Array} Returns the initialized clone.
  6969. */
  6970. function initCloneArray(array) {
  6971. var length = array.length,
  6972. result = new array.constructor(length);
  6973. // Add properties assigned by `RegExp#exec`.
  6974. if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
  6975. result.index = array.index;
  6976. result.input = array.input;
  6977. }
  6978. return result;
  6979. }
  6980. /**
  6981. * Initializes an object clone.
  6982. *
  6983. * @private
  6984. * @param {Object} object The object to clone.
  6985. * @returns {Object} Returns the initialized clone.
  6986. */
  6987. function initCloneObject(object) {
  6988. return (typeof object.constructor == 'function' && !isPrototype(object))
  6989. ? baseCreate(getPrototype(object))
  6990. : {};
  6991. }
  6992. /**
  6993. * Initializes an object clone based on its `toStringTag`.
  6994. *
  6995. * **Note:** This function only supports cloning values with tags of
  6996. * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
  6997. *
  6998. * @private
  6999. * @param {Object} object The object to clone.
  7000. * @param {string} tag The `toStringTag` of the object to clone.
  7001. * @param {boolean} [isDeep] Specify a deep clone.
  7002. * @returns {Object} Returns the initialized clone.
  7003. */
  7004. function initCloneByTag(object, tag, isDeep) {
  7005. var Ctor = object.constructor;
  7006. switch (tag) {
  7007. case arrayBufferTag:
  7008. return cloneArrayBuffer(object);
  7009. case boolTag:
  7010. case dateTag:
  7011. return new Ctor(+object);
  7012. case dataViewTag:
  7013. return cloneDataView(object, isDeep);
  7014. case float32Tag: case float64Tag:
  7015. case int8Tag: case int16Tag: case int32Tag:
  7016. case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
  7017. return cloneTypedArray(object, isDeep);
  7018. case mapTag:
  7019. return new Ctor;
  7020. case numberTag:
  7021. case stringTag:
  7022. return new Ctor(object);
  7023. case regexpTag:
  7024. return cloneRegExp(object);
  7025. case setTag:
  7026. return new Ctor;
  7027. case symbolTag:
  7028. return cloneSymbol(object);
  7029. }
  7030. }
  7031. /**
  7032. * Inserts wrapper `details` in a comment at the top of the `source` body.
  7033. *
  7034. * @private
  7035. * @param {string} source The source to modify.
  7036. * @returns {Array} details The details to insert.
  7037. * @returns {string} Returns the modified source.
  7038. */
  7039. function insertWrapDetails(source, details) {
  7040. var length = details.length;
  7041. if (!length) {
  7042. return source;
  7043. }
  7044. var lastIndex = length - 1;
  7045. details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];
  7046. details = details.join(length > 2 ? ', ' : ' ');
  7047. return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n');
  7048. }
  7049. /**
  7050. * Checks if `value` is a flattenable `arguments` object or array.
  7051. *
  7052. * @private
  7053. * @param {*} value The value to check.
  7054. * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
  7055. */
  7056. function isFlattenable(value) {
  7057. return isArray(value) || isArguments(value) ||
  7058. !!(spreadableSymbol && value && value[spreadableSymbol]);
  7059. }
  7060. /**
  7061. * Checks if `value` is a valid array-like index.
  7062. *
  7063. * @private
  7064. * @param {*} value The value to check.
  7065. * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
  7066. * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
  7067. */
  7068. function isIndex(value, length) {
  7069. var type = typeof value;
  7070. length = length == null ? MAX_SAFE_INTEGER : length;
  7071. return !!length &&
  7072. (type == 'number' ||
  7073. (type != 'symbol' && reIsUint.test(value))) &&
  7074. (value > -1 && value % 1 == 0 && value < length);
  7075. }
  7076. /**
  7077. * Checks if the given arguments are from an iteratee call.
  7078. *
  7079. * @private
  7080. * @param {*} value The potential iteratee value argument.
  7081. * @param {*} index The potential iteratee index or key argument.
  7082. * @param {*} object The potential iteratee object argument.
  7083. * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
  7084. * else `false`.
  7085. */
  7086. function isIterateeCall(value, index, object) {
  7087. if (!isObject(object)) {
  7088. return false;
  7089. }
  7090. var type = typeof index;
  7091. if (type == 'number'
  7092. ? (isArrayLike(object) && isIndex(index, object.length))
  7093. : (type == 'string' && index in object)
  7094. ) {
  7095. return eq(object[index], value);
  7096. }
  7097. return false;
  7098. }
  7099. /**
  7100. * Checks if `value` is a property name and not a property path.
  7101. *
  7102. * @private
  7103. * @param {*} value The value to check.
  7104. * @param {Object} [object] The object to query keys on.
  7105. * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
  7106. */
  7107. function isKey(value, object) {
  7108. if (isArray(value)) {
  7109. return false;
  7110. }
  7111. var type = typeof value;
  7112. if (type == 'number' || type == 'symbol' || type == 'boolean' ||
  7113. value == null || isSymbol(value)) {
  7114. return true;
  7115. }
  7116. return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
  7117. (object != null && value in Object(object));
  7118. }
  7119. /**
  7120. * Checks if `value` is suitable for use as unique object key.
  7121. *
  7122. * @private
  7123. * @param {*} value The value to check.
  7124. * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
  7125. */
  7126. function isKeyable(value) {
  7127. var type = typeof value;
  7128. return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
  7129. ? (value !== '__proto__')
  7130. : (value === null);
  7131. }
  7132. /**
  7133. * Checks if `func` has a lazy counterpart.
  7134. *
  7135. * @private
  7136. * @param {Function} func The function to check.
  7137. * @returns {boolean} Returns `true` if `func` has a lazy counterpart,
  7138. * else `false`.
  7139. */
  7140. function isLaziable(func) {
  7141. var funcName = getFuncName(func),
  7142. other = lodash[funcName];
  7143. if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {
  7144. return false;
  7145. }
  7146. if (func === other) {
  7147. return true;
  7148. }
  7149. var data = getData(other);
  7150. return !!data && func === data[0];
  7151. }
  7152. /**
  7153. * Checks if `func` has its source masked.
  7154. *
  7155. * @private
  7156. * @param {Function} func The function to check.
  7157. * @returns {boolean} Returns `true` if `func` is masked, else `false`.
  7158. */
  7159. function isMasked(func) {
  7160. return !!maskSrcKey && (maskSrcKey in func);
  7161. }
  7162. /**
  7163. * Checks if `func` is capable of being masked.
  7164. *
  7165. * @private
  7166. * @param {*} value The value to check.
  7167. * @returns {boolean} Returns `true` if `func` is maskable, else `false`.
  7168. */
  7169. var isMaskable = coreJsData ? isFunction : stubFalse;
  7170. /**
  7171. * Checks if `value` is likely a prototype object.
  7172. *
  7173. * @private
  7174. * @param {*} value The value to check.
  7175. * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
  7176. */
  7177. function isPrototype(value) {
  7178. var Ctor = value && value.constructor,
  7179. proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
  7180. return value === proto;
  7181. }
  7182. /**
  7183. * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
  7184. *
  7185. * @private
  7186. * @param {*} value The value to check.
  7187. * @returns {boolean} Returns `true` if `value` if suitable for strict
  7188. * equality comparisons, else `false`.
  7189. */
  7190. function isStrictComparable(value) {
  7191. return value === value && !isObject(value);
  7192. }
  7193. /**
  7194. * A specialized version of `matchesProperty` for source values suitable
  7195. * for strict equality comparisons, i.e. `===`.
  7196. *
  7197. * @private
  7198. * @param {string} key The key of the property to get.
  7199. * @param {*} srcValue The value to match.
  7200. * @returns {Function} Returns the new spec function.
  7201. */
  7202. function matchesStrictComparable(key, srcValue) {
  7203. return function(object) {
  7204. if (object == null) {
  7205. return false;
  7206. }
  7207. return object[key] === srcValue &&
  7208. (srcValue !== undefined || (key in Object(object)));
  7209. };
  7210. }
  7211. /**
  7212. * A specialized version of `_.memoize` which clears the memoized function's
  7213. * cache when it exceeds `MAX_MEMOIZE_SIZE`.
  7214. *
  7215. * @private
  7216. * @param {Function} func The function to have its output memoized.
  7217. * @returns {Function} Returns the new memoized function.
  7218. */
  7219. function memoizeCapped(func) {
  7220. var result = memoize(func, function(key) {
  7221. if (cache.size === MAX_MEMOIZE_SIZE) {
  7222. cache.clear();
  7223. }
  7224. return key;
  7225. });
  7226. var cache = result.cache;
  7227. return result;
  7228. }
  7229. /**
  7230. * Merges the function metadata of `source` into `data`.
  7231. *
  7232. * Merging metadata reduces the number of wrappers used to invoke a function.
  7233. * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`
  7234. * may be applied regardless of execution order. Methods like `_.ary` and
  7235. * `_.rearg` modify function arguments, making the order in which they are
  7236. * executed important, preventing the merging of metadata. However, we make
  7237. * an exception for a safe combined case where curried functions have `_.ary`
  7238. * and or `_.rearg` applied.
  7239. *
  7240. * @private
  7241. * @param {Array} data The destination metadata.
  7242. * @param {Array} source The source metadata.
  7243. * @returns {Array} Returns `data`.
  7244. */
  7245. function mergeData(data, source) {
  7246. var bitmask = data[1],
  7247. srcBitmask = source[1],
  7248. newBitmask = bitmask | srcBitmask,
  7249. isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);
  7250. var isCombo =
  7251. ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||
  7252. ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||
  7253. ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));
  7254. // Exit early if metadata can't be merged.
  7255. if (!(isCommon || isCombo)) {
  7256. return data;
  7257. }
  7258. // Use source `thisArg` if available.
  7259. if (srcBitmask & WRAP_BIND_FLAG) {
  7260. data[2] = source[2];
  7261. // Set when currying a bound function.
  7262. newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;
  7263. }
  7264. // Compose partial arguments.
  7265. var value = source[3];
  7266. if (value) {
  7267. var partials = data[3];
  7268. data[3] = partials ? composeArgs(partials, value, source[4]) : value;
  7269. data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];
  7270. }
  7271. // Compose partial right arguments.
  7272. value = source[5];
  7273. if (value) {
  7274. partials = data[5];
  7275. data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;
  7276. data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];
  7277. }
  7278. // Use source `argPos` if available.
  7279. value = source[7];
  7280. if (value) {
  7281. data[7] = value;
  7282. }
  7283. // Use source `ary` if it's smaller.
  7284. if (srcBitmask & WRAP_ARY_FLAG) {
  7285. data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);
  7286. }
  7287. // Use source `arity` if one is not provided.
  7288. if (data[9] == null) {
  7289. data[9] = source[9];
  7290. }
  7291. // Use source `func` and merge bitmasks.
  7292. data[0] = source[0];
  7293. data[1] = newBitmask;
  7294. return data;
  7295. }
  7296. /**
  7297. * This function is like
  7298. * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
  7299. * except that it includes inherited enumerable properties.
  7300. *
  7301. * @private
  7302. * @param {Object} object The object to query.
  7303. * @returns {Array} Returns the array of property names.
  7304. */
  7305. function nativeKeysIn(object) {
  7306. var result = [];
  7307. if (object != null) {
  7308. for (var key in Object(object)) {
  7309. result.push(key);
  7310. }
  7311. }
  7312. return result;
  7313. }
  7314. /**
  7315. * Converts `value` to a string using `Object.prototype.toString`.
  7316. *
  7317. * @private
  7318. * @param {*} value The value to convert.
  7319. * @returns {string} Returns the converted string.
  7320. */
  7321. function objectToString(value) {
  7322. return nativeObjectToString.call(value);
  7323. }
  7324. /**
  7325. * A specialized version of `baseRest` which transforms the rest array.
  7326. *
  7327. * @private
  7328. * @param {Function} func The function to apply a rest parameter to.
  7329. * @param {number} [start=func.length-1] The start position of the rest parameter.
  7330. * @param {Function} transform The rest array transform.
  7331. * @returns {Function} Returns the new function.
  7332. */
  7333. function overRest(func, start, transform) {
  7334. start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
  7335. return function() {
  7336. var args = arguments,
  7337. index = -1,
  7338. length = nativeMax(args.length - start, 0),
  7339. array = Array(length);
  7340. while (++index < length) {
  7341. array[index] = args[start + index];
  7342. }
  7343. index = -1;
  7344. var otherArgs = Array(start + 1);
  7345. while (++index < start) {
  7346. otherArgs[index] = args[index];
  7347. }
  7348. otherArgs[start] = transform(array);
  7349. return apply(func, this, otherArgs);
  7350. };
  7351. }
  7352. /**
  7353. * Gets the parent value at `path` of `object`.
  7354. *
  7355. * @private
  7356. * @param {Object} object The object to query.
  7357. * @param {Array} path The path to get the parent value of.
  7358. * @returns {*} Returns the parent value.
  7359. */
  7360. function parent(object, path) {
  7361. return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
  7362. }
  7363. /**
  7364. * Reorder `array` according to the specified indexes where the element at
  7365. * the first index is assigned as the first element, the element at
  7366. * the second index is assigned as the second element, and so on.
  7367. *
  7368. * @private
  7369. * @param {Array} array The array to reorder.
  7370. * @param {Array} indexes The arranged array indexes.
  7371. * @returns {Array} Returns `array`.
  7372. */
  7373. function reorder(array, indexes) {
  7374. var arrLength = array.length,
  7375. length = nativeMin(indexes.length, arrLength),
  7376. oldArray = copyArray(array);
  7377. while (length--) {
  7378. var index = indexes[length];
  7379. array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;
  7380. }
  7381. return array;
  7382. }
  7383. /**
  7384. * Gets the value at `key`, unless `key` is "__proto__" or "constructor".
  7385. *
  7386. * @private
  7387. * @param {Object} object The object to query.
  7388. * @param {string} key The key of the property to get.
  7389. * @returns {*} Returns the property value.
  7390. */
  7391. function safeGet(object, key) {
  7392. if (key === 'constructor' && typeof object[key] === 'function') {
  7393. return;
  7394. }
  7395. if (key == '__proto__') {
  7396. return;
  7397. }
  7398. return object[key];
  7399. }
  7400. /**
  7401. * Sets metadata for `func`.
  7402. *
  7403. * **Note:** If this function becomes hot, i.e. is invoked a lot in a short
  7404. * period of time, it will trip its breaker and transition to an identity
  7405. * function to avoid garbage collection pauses in V8. See
  7406. * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)
  7407. * for more details.
  7408. *
  7409. * @private
  7410. * @param {Function} func The function to associate metadata with.
  7411. * @param {*} data The metadata.
  7412. * @returns {Function} Returns `func`.
  7413. */
  7414. var setData = shortOut(baseSetData);
  7415. /**
  7416. * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout).
  7417. *
  7418. * @private
  7419. * @param {Function} func The function to delay.
  7420. * @param {number} wait The number of milliseconds to delay invocation.
  7421. * @returns {number|Object} Returns the timer id or timeout object.
  7422. */
  7423. var setTimeout = ctxSetTimeout || function(func, wait) {
  7424. return root.setTimeout(func, wait);
  7425. };
  7426. /**
  7427. * Sets the `toString` method of `func` to return `string`.
  7428. *
  7429. * @private
  7430. * @param {Function} func The function to modify.
  7431. * @param {Function} string The `toString` result.
  7432. * @returns {Function} Returns `func`.
  7433. */
  7434. var setToString = shortOut(baseSetToString);
  7435. /**
  7436. * Sets the `toString` method of `wrapper` to mimic the source of `reference`
  7437. * with wrapper details in a comment at the top of the source body.
  7438. *
  7439. * @private
  7440. * @param {Function} wrapper The function to modify.
  7441. * @param {Function} reference The reference function.
  7442. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  7443. * @returns {Function} Returns `wrapper`.
  7444. */
  7445. function setWrapToString(wrapper, reference, bitmask) {
  7446. var source = (reference + '');
  7447. return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));
  7448. }
  7449. /**
  7450. * Creates a function that'll short out and invoke `identity` instead
  7451. * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
  7452. * milliseconds.
  7453. *
  7454. * @private
  7455. * @param {Function} func The function to restrict.
  7456. * @returns {Function} Returns the new shortable function.
  7457. */
  7458. function shortOut(func) {
  7459. var count = 0,
  7460. lastCalled = 0;
  7461. return function() {
  7462. var stamp = nativeNow(),
  7463. remaining = HOT_SPAN - (stamp - lastCalled);
  7464. lastCalled = stamp;
  7465. if (remaining > 0) {
  7466. if (++count >= HOT_COUNT) {
  7467. return arguments[0];
  7468. }
  7469. } else {
  7470. count = 0;
  7471. }
  7472. return func.apply(undefined, arguments);
  7473. };
  7474. }
  7475. /**
  7476. * A specialized version of `_.shuffle` which mutates and sets the size of `array`.
  7477. *
  7478. * @private
  7479. * @param {Array} array The array to shuffle.
  7480. * @param {number} [size=array.length] The size of `array`.
  7481. * @returns {Array} Returns `array`.
  7482. */
  7483. function shuffleSelf(array, size) {
  7484. var index = -1,
  7485. length = array.length,
  7486. lastIndex = length - 1;
  7487. size = size === undefined ? length : size;
  7488. while (++index < size) {
  7489. var rand = baseRandom(index, lastIndex),
  7490. value = array[rand];
  7491. array[rand] = array[index];
  7492. array[index] = value;
  7493. }
  7494. array.length = size;
  7495. return array;
  7496. }
  7497. /**
  7498. * Converts `string` to a property path array.
  7499. *
  7500. * @private
  7501. * @param {string} string The string to convert.
  7502. * @returns {Array} Returns the property path array.
  7503. */
  7504. var stringToPath = memoizeCapped(function(string) {
  7505. var result = [];
  7506. if (string.charCodeAt(0) === 46 /* . */) {
  7507. result.push('');
  7508. }
  7509. string.replace(rePropName, function(match, number, quote, subString) {
  7510. result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
  7511. });
  7512. return result;
  7513. });
  7514. /**
  7515. * Converts `value` to a string key if it's not a string or symbol.
  7516. *
  7517. * @private
  7518. * @param {*} value The value to inspect.
  7519. * @returns {string|symbol} Returns the key.
  7520. */
  7521. function toKey(value) {
  7522. if (typeof value == 'string' || isSymbol(value)) {
  7523. return value;
  7524. }
  7525. var result = (value + '');
  7526. return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
  7527. }
  7528. /**
  7529. * Converts `func` to its source code.
  7530. *
  7531. * @private
  7532. * @param {Function} func The function to convert.
  7533. * @returns {string} Returns the source code.
  7534. */
  7535. function toSource(func) {
  7536. if (func != null) {
  7537. try {
  7538. return funcToString.call(func);
  7539. } catch (e) {}
  7540. try {
  7541. return (func + '');
  7542. } catch (e) {}
  7543. }
  7544. return '';
  7545. }
  7546. /**
  7547. * Updates wrapper `details` based on `bitmask` flags.
  7548. *
  7549. * @private
  7550. * @returns {Array} details The details to modify.
  7551. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  7552. * @returns {Array} Returns `details`.
  7553. */
  7554. function updateWrapDetails(details, bitmask) {
  7555. arrayEach(wrapFlags, function(pair) {
  7556. var value = '_.' + pair[0];
  7557. if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {
  7558. details.push(value);
  7559. }
  7560. });
  7561. return details.sort();
  7562. }
  7563. /**
  7564. * Creates a clone of `wrapper`.
  7565. *
  7566. * @private
  7567. * @param {Object} wrapper The wrapper to clone.
  7568. * @returns {Object} Returns the cloned wrapper.
  7569. */
  7570. function wrapperClone(wrapper) {
  7571. if (wrapper instanceof LazyWrapper) {
  7572. return wrapper.clone();
  7573. }
  7574. var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);
  7575. result.__actions__ = copyArray(wrapper.__actions__);
  7576. result.__index__ = wrapper.__index__;
  7577. result.__values__ = wrapper.__values__;
  7578. return result;
  7579. }
  7580. /*------------------------------------------------------------------------*/
  7581. /**
  7582. * Creates an array of elements split into groups the length of `size`.
  7583. * If `array` can't be split evenly, the final chunk will be the remaining
  7584. * elements.
  7585. *
  7586. * @static
  7587. * @memberOf _
  7588. * @since 3.0.0
  7589. * @category Array
  7590. * @param {Array} array The array to process.
  7591. * @param {number} [size=1] The length of each chunk
  7592. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  7593. * @returns {Array} Returns the new array of chunks.
  7594. * @example
  7595. *
  7596. * _.chunk(['a', 'b', 'c', 'd'], 2);
  7597. * // => [['a', 'b'], ['c', 'd']]
  7598. *
  7599. * _.chunk(['a', 'b', 'c', 'd'], 3);
  7600. * // => [['a', 'b', 'c'], ['d']]
  7601. */
  7602. function chunk(array, size, guard) {
  7603. if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {
  7604. size = 1;
  7605. } else {
  7606. size = nativeMax(toInteger(size), 0);
  7607. }
  7608. var length = array == null ? 0 : array.length;
  7609. if (!length || size < 1) {
  7610. return [];
  7611. }
  7612. var index = 0,
  7613. resIndex = 0,
  7614. result = Array(nativeCeil(length / size));
  7615. while (index < length) {
  7616. result[resIndex++] = baseSlice(array, index, (index += size));
  7617. }
  7618. return result;
  7619. }
  7620. /**
  7621. * Creates an array with all falsey values removed. The values `false`, `null`,
  7622. * `0`, `""`, `undefined`, and `NaN` are falsey.
  7623. *
  7624. * @static
  7625. * @memberOf _
  7626. * @since 0.1.0
  7627. * @category Array
  7628. * @param {Array} array The array to compact.
  7629. * @returns {Array} Returns the new array of filtered values.
  7630. * @example
  7631. *
  7632. * _.compact([0, 1, false, 2, '', 3]);
  7633. * // => [1, 2, 3]
  7634. */
  7635. function compact(array) {
  7636. var index = -1,
  7637. length = array == null ? 0 : array.length,
  7638. resIndex = 0,
  7639. result = [];
  7640. while (++index < length) {
  7641. var value = array[index];
  7642. if (value) {
  7643. result[resIndex++] = value;
  7644. }
  7645. }
  7646. return result;
  7647. }
  7648. /**
  7649. * Creates a new array concatenating `array` with any additional arrays
  7650. * and/or values.
  7651. *
  7652. * @static
  7653. * @memberOf _
  7654. * @since 4.0.0
  7655. * @category Array
  7656. * @param {Array} array The array to concatenate.
  7657. * @param {...*} [values] The values to concatenate.
  7658. * @returns {Array} Returns the new concatenated array.
  7659. * @example
  7660. *
  7661. * var array = [1];
  7662. * var other = _.concat(array, 2, [3], [[4]]);
  7663. *
  7664. * console.log(other);
  7665. * // => [1, 2, 3, [4]]
  7666. *
  7667. * console.log(array);
  7668. * // => [1]
  7669. */
  7670. function concat() {
  7671. var length = arguments.length;
  7672. if (!length) {
  7673. return [];
  7674. }
  7675. var args = Array(length - 1),
  7676. array = arguments[0],
  7677. index = length;
  7678. while (index--) {
  7679. args[index - 1] = arguments[index];
  7680. }
  7681. return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));
  7682. }
  7683. /**
  7684. * Creates an array of `array` values not included in the other given arrays
  7685. * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  7686. * for equality comparisons. The order and references of result values are
  7687. * determined by the first array.
  7688. *
  7689. * **Note:** Unlike `_.pullAll`, this method returns a new array.
  7690. *
  7691. * @static
  7692. * @memberOf _
  7693. * @since 0.1.0
  7694. * @category Array
  7695. * @param {Array} array The array to inspect.
  7696. * @param {...Array} [values] The values to exclude.
  7697. * @returns {Array} Returns the new array of filtered values.
  7698. * @see _.without, _.xor
  7699. * @example
  7700. *
  7701. * _.difference([2, 1], [2, 3]);
  7702. * // => [1]
  7703. */
  7704. var difference = baseRest(function(array, values) {
  7705. return isArrayLikeObject(array)
  7706. ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))
  7707. : [];
  7708. });
  7709. /**
  7710. * This method is like `_.difference` except that it accepts `iteratee` which
  7711. * is invoked for each element of `array` and `values` to generate the criterion
  7712. * by which they're compared. The order and references of result values are
  7713. * determined by the first array. The iteratee is invoked with one argument:
  7714. * (value).
  7715. *
  7716. * **Note:** Unlike `_.pullAllBy`, this method returns a new array.
  7717. *
  7718. * @static
  7719. * @memberOf _
  7720. * @since 4.0.0
  7721. * @category Array
  7722. * @param {Array} array The array to inspect.
  7723. * @param {...Array} [values] The values to exclude.
  7724. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  7725. * @returns {Array} Returns the new array of filtered values.
  7726. * @example
  7727. *
  7728. * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);
  7729. * // => [1.2]
  7730. *
  7731. * // The `_.property` iteratee shorthand.
  7732. * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');
  7733. * // => [{ 'x': 2 }]
  7734. */
  7735. var differenceBy = baseRest(function(array, values) {
  7736. var iteratee = last(values);
  7737. if (isArrayLikeObject(iteratee)) {
  7738. iteratee = undefined;
  7739. }
  7740. return isArrayLikeObject(array)
  7741. ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2))
  7742. : [];
  7743. });
  7744. /**
  7745. * This method is like `_.difference` except that it accepts `comparator`
  7746. * which is invoked to compare elements of `array` to `values`. The order and
  7747. * references of result values are determined by the first array. The comparator
  7748. * is invoked with two arguments: (arrVal, othVal).
  7749. *
  7750. * **Note:** Unlike `_.pullAllWith`, this method returns a new array.
  7751. *
  7752. * @static
  7753. * @memberOf _
  7754. * @since 4.0.0
  7755. * @category Array
  7756. * @param {Array} array The array to inspect.
  7757. * @param {...Array} [values] The values to exclude.
  7758. * @param {Function} [comparator] The comparator invoked per element.
  7759. * @returns {Array} Returns the new array of filtered values.
  7760. * @example
  7761. *
  7762. * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
  7763. *
  7764. * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);
  7765. * // => [{ 'x': 2, 'y': 1 }]
  7766. */
  7767. var differenceWith = baseRest(function(array, values) {
  7768. var comparator = last(values);
  7769. if (isArrayLikeObject(comparator)) {
  7770. comparator = undefined;
  7771. }
  7772. return isArrayLikeObject(array)
  7773. ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)
  7774. : [];
  7775. });
  7776. /**
  7777. * Creates a slice of `array` with `n` elements dropped from the beginning.
  7778. *
  7779. * @static
  7780. * @memberOf _
  7781. * @since 0.5.0
  7782. * @category Array
  7783. * @param {Array} array The array to query.
  7784. * @param {number} [n=1] The number of elements to drop.
  7785. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  7786. * @returns {Array} Returns the slice of `array`.
  7787. * @example
  7788. *
  7789. * _.drop([1, 2, 3]);
  7790. * // => [2, 3]
  7791. *
  7792. * _.drop([1, 2, 3], 2);
  7793. * // => [3]
  7794. *
  7795. * _.drop([1, 2, 3], 5);
  7796. * // => []
  7797. *
  7798. * _.drop([1, 2, 3], 0);
  7799. * // => [1, 2, 3]
  7800. */
  7801. function drop(array, n, guard) {
  7802. var length = array == null ? 0 : array.length;
  7803. if (!length) {
  7804. return [];
  7805. }
  7806. n = (guard || n === undefined) ? 1 : toInteger(n);
  7807. return baseSlice(array, n < 0 ? 0 : n, length);
  7808. }
  7809. /**
  7810. * Creates a slice of `array` with `n` elements dropped from the end.
  7811. *
  7812. * @static
  7813. * @memberOf _
  7814. * @since 3.0.0
  7815. * @category Array
  7816. * @param {Array} array The array to query.
  7817. * @param {number} [n=1] The number of elements to drop.
  7818. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  7819. * @returns {Array} Returns the slice of `array`.
  7820. * @example
  7821. *
  7822. * _.dropRight([1, 2, 3]);
  7823. * // => [1, 2]
  7824. *
  7825. * _.dropRight([1, 2, 3], 2);
  7826. * // => [1]
  7827. *
  7828. * _.dropRight([1, 2, 3], 5);
  7829. * // => []
  7830. *
  7831. * _.dropRight([1, 2, 3], 0);
  7832. * // => [1, 2, 3]
  7833. */
  7834. function dropRight(array, n, guard) {
  7835. var length = array == null ? 0 : array.length;
  7836. if (!length) {
  7837. return [];
  7838. }
  7839. n = (guard || n === undefined) ? 1 : toInteger(n);
  7840. n = length - n;
  7841. return baseSlice(array, 0, n < 0 ? 0 : n);
  7842. }
  7843. /**
  7844. * Creates a slice of `array` excluding elements dropped from the end.
  7845. * Elements are dropped until `predicate` returns falsey. The predicate is
  7846. * invoked with three arguments: (value, index, array).
  7847. *
  7848. * @static
  7849. * @memberOf _
  7850. * @since 3.0.0
  7851. * @category Array
  7852. * @param {Array} array The array to query.
  7853. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  7854. * @returns {Array} Returns the slice of `array`.
  7855. * @example
  7856. *
  7857. * var users = [
  7858. * { 'user': 'barney', 'active': true },
  7859. * { 'user': 'fred', 'active': false },
  7860. * { 'user': 'pebbles', 'active': false }
  7861. * ];
  7862. *
  7863. * _.dropRightWhile(users, function(o) { return !o.active; });
  7864. * // => objects for ['barney']
  7865. *
  7866. * // The `_.matches` iteratee shorthand.
  7867. * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });
  7868. * // => objects for ['barney', 'fred']
  7869. *
  7870. * // The `_.matchesProperty` iteratee shorthand.
  7871. * _.dropRightWhile(users, ['active', false]);
  7872. * // => objects for ['barney']
  7873. *
  7874. * // The `_.property` iteratee shorthand.
  7875. * _.dropRightWhile(users, 'active');
  7876. * // => objects for ['barney', 'fred', 'pebbles']
  7877. */
  7878. function dropRightWhile(array, predicate) {
  7879. return (array && array.length)
  7880. ? baseWhile(array, getIteratee(predicate, 3), true, true)
  7881. : [];
  7882. }
  7883. /**
  7884. * Creates a slice of `array` excluding elements dropped from the beginning.
  7885. * Elements are dropped until `predicate` returns falsey. The predicate is
  7886. * invoked with three arguments: (value, index, array).
  7887. *
  7888. * @static
  7889. * @memberOf _
  7890. * @since 3.0.0
  7891. * @category Array
  7892. * @param {Array} array The array to query.
  7893. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  7894. * @returns {Array} Returns the slice of `array`.
  7895. * @example
  7896. *
  7897. * var users = [
  7898. * { 'user': 'barney', 'active': false },
  7899. * { 'user': 'fred', 'active': false },
  7900. * { 'user': 'pebbles', 'active': true }
  7901. * ];
  7902. *
  7903. * _.dropWhile(users, function(o) { return !o.active; });
  7904. * // => objects for ['pebbles']
  7905. *
  7906. * // The `_.matches` iteratee shorthand.
  7907. * _.dropWhile(users, { 'user': 'barney', 'active': false });
  7908. * // => objects for ['fred', 'pebbles']
  7909. *
  7910. * // The `_.matchesProperty` iteratee shorthand.
  7911. * _.dropWhile(users, ['active', false]);
  7912. * // => objects for ['pebbles']
  7913. *
  7914. * // The `_.property` iteratee shorthand.
  7915. * _.dropWhile(users, 'active');
  7916. * // => objects for ['barney', 'fred', 'pebbles']
  7917. */
  7918. function dropWhile(array, predicate) {
  7919. return (array && array.length)
  7920. ? baseWhile(array, getIteratee(predicate, 3), true)
  7921. : [];
  7922. }
  7923. /**
  7924. * Fills elements of `array` with `value` from `start` up to, but not
  7925. * including, `end`.
  7926. *
  7927. * **Note:** This method mutates `array`.
  7928. *
  7929. * @static
  7930. * @memberOf _
  7931. * @since 3.2.0
  7932. * @category Array
  7933. * @param {Array} array The array to fill.
  7934. * @param {*} value The value to fill `array` with.
  7935. * @param {number} [start=0] The start position.
  7936. * @param {number} [end=array.length] The end position.
  7937. * @returns {Array} Returns `array`.
  7938. * @example
  7939. *
  7940. * var array = [1, 2, 3];
  7941. *
  7942. * _.fill(array, 'a');
  7943. * console.log(array);
  7944. * // => ['a', 'a', 'a']
  7945. *
  7946. * _.fill(Array(3), 2);
  7947. * // => [2, 2, 2]
  7948. *
  7949. * _.fill([4, 6, 8, 10], '*', 1, 3);
  7950. * // => [4, '*', '*', 10]
  7951. */
  7952. function fill(array, value, start, end) {
  7953. var length = array == null ? 0 : array.length;
  7954. if (!length) {
  7955. return [];
  7956. }
  7957. if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {
  7958. start = 0;
  7959. end = length;
  7960. }
  7961. return baseFill(array, value, start, end);
  7962. }
  7963. /**
  7964. * This method is like `_.find` except that it returns the index of the first
  7965. * element `predicate` returns truthy for instead of the element itself.
  7966. *
  7967. * @static
  7968. * @memberOf _
  7969. * @since 1.1.0
  7970. * @category Array
  7971. * @param {Array} array The array to inspect.
  7972. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  7973. * @param {number} [fromIndex=0] The index to search from.
  7974. * @returns {number} Returns the index of the found element, else `-1`.
  7975. * @example
  7976. *
  7977. * var users = [
  7978. * { 'user': 'barney', 'active': false },
  7979. * { 'user': 'fred', 'active': false },
  7980. * { 'user': 'pebbles', 'active': true }
  7981. * ];
  7982. *
  7983. * _.findIndex(users, function(o) { return o.user == 'barney'; });
  7984. * // => 0
  7985. *
  7986. * // The `_.matches` iteratee shorthand.
  7987. * _.findIndex(users, { 'user': 'fred', 'active': false });
  7988. * // => 1
  7989. *
  7990. * // The `_.matchesProperty` iteratee shorthand.
  7991. * _.findIndex(users, ['active', false]);
  7992. * // => 0
  7993. *
  7994. * // The `_.property` iteratee shorthand.
  7995. * _.findIndex(users, 'active');
  7996. * // => 2
  7997. */
  7998. function findIndex(array, predicate, fromIndex) {
  7999. var length = array == null ? 0 : array.length;
  8000. if (!length) {
  8001. return -1;
  8002. }
  8003. var index = fromIndex == null ? 0 : toInteger(fromIndex);
  8004. if (index < 0) {
  8005. index = nativeMax(length + index, 0);
  8006. }
  8007. return baseFindIndex(array, getIteratee(predicate, 3), index);
  8008. }
  8009. /**
  8010. * This method is like `_.findIndex` except that it iterates over elements
  8011. * of `collection` from right to left.
  8012. *
  8013. * @static
  8014. * @memberOf _
  8015. * @since 2.0.0
  8016. * @category Array
  8017. * @param {Array} array The array to inspect.
  8018. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  8019. * @param {number} [fromIndex=array.length-1] The index to search from.
  8020. * @returns {number} Returns the index of the found element, else `-1`.
  8021. * @example
  8022. *
  8023. * var users = [
  8024. * { 'user': 'barney', 'active': true },
  8025. * { 'user': 'fred', 'active': false },
  8026. * { 'user': 'pebbles', 'active': false }
  8027. * ];
  8028. *
  8029. * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });
  8030. * // => 2
  8031. *
  8032. * // The `_.matches` iteratee shorthand.
  8033. * _.findLastIndex(users, { 'user': 'barney', 'active': true });
  8034. * // => 0
  8035. *
  8036. * // The `_.matchesProperty` iteratee shorthand.
  8037. * _.findLastIndex(users, ['active', false]);
  8038. * // => 2
  8039. *
  8040. * // The `_.property` iteratee shorthand.
  8041. * _.findLastIndex(users, 'active');
  8042. * // => 0
  8043. */
  8044. function findLastIndex(array, predicate, fromIndex) {
  8045. var length = array == null ? 0 : array.length;
  8046. if (!length) {
  8047. return -1;
  8048. }
  8049. var index = length - 1;
  8050. if (fromIndex !== undefined) {
  8051. index = toInteger(fromIndex);
  8052. index = fromIndex < 0
  8053. ? nativeMax(length + index, 0)
  8054. : nativeMin(index, length - 1);
  8055. }
  8056. return baseFindIndex(array, getIteratee(predicate, 3), index, true);
  8057. }
  8058. /**
  8059. * Flattens `array` a single level deep.
  8060. *
  8061. * @static
  8062. * @memberOf _
  8063. * @since 0.1.0
  8064. * @category Array
  8065. * @param {Array} array The array to flatten.
  8066. * @returns {Array} Returns the new flattened array.
  8067. * @example
  8068. *
  8069. * _.flatten([1, [2, [3, [4]], 5]]);
  8070. * // => [1, 2, [3, [4]], 5]
  8071. */
  8072. function flatten(array) {
  8073. var length = array == null ? 0 : array.length;
  8074. return length ? baseFlatten(array, 1) : [];
  8075. }
  8076. /**
  8077. * Recursively flattens `array`.
  8078. *
  8079. * @static
  8080. * @memberOf _
  8081. * @since 3.0.0
  8082. * @category Array
  8083. * @param {Array} array The array to flatten.
  8084. * @returns {Array} Returns the new flattened array.
  8085. * @example
  8086. *
  8087. * _.flattenDeep([1, [2, [3, [4]], 5]]);
  8088. * // => [1, 2, 3, 4, 5]
  8089. */
  8090. function flattenDeep(array) {
  8091. var length = array == null ? 0 : array.length;
  8092. return length ? baseFlatten(array, INFINITY) : [];
  8093. }
  8094. /**
  8095. * Recursively flatten `array` up to `depth` times.
  8096. *
  8097. * @static
  8098. * @memberOf _
  8099. * @since 4.4.0
  8100. * @category Array
  8101. * @param {Array} array The array to flatten.
  8102. * @param {number} [depth=1] The maximum recursion depth.
  8103. * @returns {Array} Returns the new flattened array.
  8104. * @example
  8105. *
  8106. * var array = [1, [2, [3, [4]], 5]];
  8107. *
  8108. * _.flattenDepth(array, 1);
  8109. * // => [1, 2, [3, [4]], 5]
  8110. *
  8111. * _.flattenDepth(array, 2);
  8112. * // => [1, 2, 3, [4], 5]
  8113. */
  8114. function flattenDepth(array, depth) {
  8115. var length = array == null ? 0 : array.length;
  8116. if (!length) {
  8117. return [];
  8118. }
  8119. depth = depth === undefined ? 1 : toInteger(depth);
  8120. return baseFlatten(array, depth);
  8121. }
  8122. /**
  8123. * The inverse of `_.toPairs`; this method returns an object composed
  8124. * from key-value `pairs`.
  8125. *
  8126. * @static
  8127. * @memberOf _
  8128. * @since 4.0.0
  8129. * @category Array
  8130. * @param {Array} pairs The key-value pairs.
  8131. * @returns {Object} Returns the new object.
  8132. * @example
  8133. *
  8134. * _.fromPairs([['a', 1], ['b', 2]]);
  8135. * // => { 'a': 1, 'b': 2 }
  8136. */
  8137. function fromPairs(pairs) {
  8138. var index = -1,
  8139. length = pairs == null ? 0 : pairs.length,
  8140. result = {};
  8141. while (++index < length) {
  8142. var pair = pairs[index];
  8143. result[pair[0]] = pair[1];
  8144. }
  8145. return result;
  8146. }
  8147. /**
  8148. * Gets the first element of `array`.
  8149. *
  8150. * @static
  8151. * @memberOf _
  8152. * @since 0.1.0
  8153. * @alias first
  8154. * @category Array
  8155. * @param {Array} array The array to query.
  8156. * @returns {*} Returns the first element of `array`.
  8157. * @example
  8158. *
  8159. * _.head([1, 2, 3]);
  8160. * // => 1
  8161. *
  8162. * _.head([]);
  8163. * // => undefined
  8164. */
  8165. function head(array) {
  8166. return (array && array.length) ? array[0] : undefined;
  8167. }
  8168. /**
  8169. * Gets the index at which the first occurrence of `value` is found in `array`
  8170. * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  8171. * for equality comparisons. If `fromIndex` is negative, it's used as the
  8172. * offset from the end of `array`.
  8173. *
  8174. * @static
  8175. * @memberOf _
  8176. * @since 0.1.0
  8177. * @category Array
  8178. * @param {Array} array The array to inspect.
  8179. * @param {*} value The value to search for.
  8180. * @param {number} [fromIndex=0] The index to search from.
  8181. * @returns {number} Returns the index of the matched value, else `-1`.
  8182. * @example
  8183. *
  8184. * _.indexOf([1, 2, 1, 2], 2);
  8185. * // => 1
  8186. *
  8187. * // Search from the `fromIndex`.
  8188. * _.indexOf([1, 2, 1, 2], 2, 2);
  8189. * // => 3
  8190. */
  8191. function indexOf(array, value, fromIndex) {
  8192. var length = array == null ? 0 : array.length;
  8193. if (!length) {
  8194. return -1;
  8195. }
  8196. var index = fromIndex == null ? 0 : toInteger(fromIndex);
  8197. if (index < 0) {
  8198. index = nativeMax(length + index, 0);
  8199. }
  8200. return baseIndexOf(array, value, index);
  8201. }
  8202. /**
  8203. * Gets all but 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 {Array} Returns the slice of `array`.
  8211. * @example
  8212. *
  8213. * _.initial([1, 2, 3]);
  8214. * // => [1, 2]
  8215. */
  8216. function initial(array) {
  8217. var length = array == null ? 0 : array.length;
  8218. return length ? baseSlice(array, 0, -1) : [];
  8219. }
  8220. /**
  8221. * Creates an array of unique values that are included in all given arrays
  8222. * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  8223. * for equality comparisons. The order and references of result values are
  8224. * determined by the first array.
  8225. *
  8226. * @static
  8227. * @memberOf _
  8228. * @since 0.1.0
  8229. * @category Array
  8230. * @param {...Array} [arrays] The arrays to inspect.
  8231. * @returns {Array} Returns the new array of intersecting values.
  8232. * @example
  8233. *
  8234. * _.intersection([2, 1], [2, 3]);
  8235. * // => [2]
  8236. */
  8237. var intersection = baseRest(function(arrays) {
  8238. var mapped = arrayMap(arrays, castArrayLikeObject);
  8239. return (mapped.length && mapped[0] === arrays[0])
  8240. ? baseIntersection(mapped)
  8241. : [];
  8242. });
  8243. /**
  8244. * This method is like `_.intersection` except that it accepts `iteratee`
  8245. * which is invoked for each element of each `arrays` to generate the criterion
  8246. * by which they're compared. The order and references of result values are
  8247. * determined by the first array. The iteratee is invoked with one argument:
  8248. * (value).
  8249. *
  8250. * @static
  8251. * @memberOf _
  8252. * @since 4.0.0
  8253. * @category Array
  8254. * @param {...Array} [arrays] The arrays to inspect.
  8255. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  8256. * @returns {Array} Returns the new array of intersecting values.
  8257. * @example
  8258. *
  8259. * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);
  8260. * // => [2.1]
  8261. *
  8262. * // The `_.property` iteratee shorthand.
  8263. * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
  8264. * // => [{ 'x': 1 }]
  8265. */
  8266. var intersectionBy = baseRest(function(arrays) {
  8267. var iteratee = last(arrays),
  8268. mapped = arrayMap(arrays, castArrayLikeObject);
  8269. if (iteratee === last(mapped)) {
  8270. iteratee = undefined;
  8271. } else {
  8272. mapped.pop();
  8273. }
  8274. return (mapped.length && mapped[0] === arrays[0])
  8275. ? baseIntersection(mapped, getIteratee(iteratee, 2))
  8276. : [];
  8277. });
  8278. /**
  8279. * This method is like `_.intersection` except that it accepts `comparator`
  8280. * which is invoked to compare elements of `arrays`. The order and references
  8281. * of result values are determined by the first array. The comparator is
  8282. * invoked with two arguments: (arrVal, othVal).
  8283. *
  8284. * @static
  8285. * @memberOf _
  8286. * @since 4.0.0
  8287. * @category Array
  8288. * @param {...Array} [arrays] The arrays to inspect.
  8289. * @param {Function} [comparator] The comparator invoked per element.
  8290. * @returns {Array} Returns the new array of intersecting values.
  8291. * @example
  8292. *
  8293. * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
  8294. * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
  8295. *
  8296. * _.intersectionWith(objects, others, _.isEqual);
  8297. * // => [{ 'x': 1, 'y': 2 }]
  8298. */
  8299. var intersectionWith = baseRest(function(arrays) {
  8300. var comparator = last(arrays),
  8301. mapped = arrayMap(arrays, castArrayLikeObject);
  8302. comparator = typeof comparator == 'function' ? comparator : undefined;
  8303. if (comparator) {
  8304. mapped.pop();
  8305. }
  8306. return (mapped.length && mapped[0] === arrays[0])
  8307. ? baseIntersection(mapped, undefined, comparator)
  8308. : [];
  8309. });
  8310. /**
  8311. * Converts all elements in `array` into a string separated by `separator`.
  8312. *
  8313. * @static
  8314. * @memberOf _
  8315. * @since 4.0.0
  8316. * @category Array
  8317. * @param {Array} array The array to convert.
  8318. * @param {string} [separator=','] The element separator.
  8319. * @returns {string} Returns the joined string.
  8320. * @example
  8321. *
  8322. * _.join(['a', 'b', 'c'], '~');
  8323. * // => 'a~b~c'
  8324. */
  8325. function join(array, separator) {
  8326. return array == null ? '' : nativeJoin.call(array, separator);
  8327. }
  8328. /**
  8329. * Gets the last element of `array`.
  8330. *
  8331. * @static
  8332. * @memberOf _
  8333. * @since 0.1.0
  8334. * @category Array
  8335. * @param {Array} array The array to query.
  8336. * @returns {*} Returns the last element of `array`.
  8337. * @example
  8338. *
  8339. * _.last([1, 2, 3]);
  8340. * // => 3
  8341. */
  8342. function last(array) {
  8343. var length = array == null ? 0 : array.length;
  8344. return length ? array[length - 1] : undefined;
  8345. }
  8346. /**
  8347. * This method is like `_.indexOf` except that it iterates over elements of
  8348. * `array` from right to left.
  8349. *
  8350. * @static
  8351. * @memberOf _
  8352. * @since 0.1.0
  8353. * @category Array
  8354. * @param {Array} array The array to inspect.
  8355. * @param {*} value The value to search for.
  8356. * @param {number} [fromIndex=array.length-1] The index to search from.
  8357. * @returns {number} Returns the index of the matched value, else `-1`.
  8358. * @example
  8359. *
  8360. * _.lastIndexOf([1, 2, 1, 2], 2);
  8361. * // => 3
  8362. *
  8363. * // Search from the `fromIndex`.
  8364. * _.lastIndexOf([1, 2, 1, 2], 2, 2);
  8365. * // => 1
  8366. */
  8367. function lastIndexOf(array, value, fromIndex) {
  8368. var length = array == null ? 0 : array.length;
  8369. if (!length) {
  8370. return -1;
  8371. }
  8372. var index = length;
  8373. if (fromIndex !== undefined) {
  8374. index = toInteger(fromIndex);
  8375. index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);
  8376. }
  8377. return value === value
  8378. ? strictLastIndexOf(array, value, index)
  8379. : baseFindIndex(array, baseIsNaN, index, true);
  8380. }
  8381. /**
  8382. * Gets the element at index `n` of `array`. If `n` is negative, the nth
  8383. * element from the end is returned.
  8384. *
  8385. * @static
  8386. * @memberOf _
  8387. * @since 4.11.0
  8388. * @category Array
  8389. * @param {Array} array The array to query.
  8390. * @param {number} [n=0] The index of the element to return.
  8391. * @returns {*} Returns the nth element of `array`.
  8392. * @example
  8393. *
  8394. * var array = ['a', 'b', 'c', 'd'];
  8395. *
  8396. * _.nth(array, 1);
  8397. * // => 'b'
  8398. *
  8399. * _.nth(array, -2);
  8400. * // => 'c';
  8401. */
  8402. function nth(array, n) {
  8403. return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;
  8404. }
  8405. /**
  8406. * Removes all given values from `array` using
  8407. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  8408. * for equality comparisons.
  8409. *
  8410. * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`
  8411. * to remove elements from an array by predicate.
  8412. *
  8413. * @static
  8414. * @memberOf _
  8415. * @since 2.0.0
  8416. * @category Array
  8417. * @param {Array} array The array to modify.
  8418. * @param {...*} [values] The values to remove.
  8419. * @returns {Array} Returns `array`.
  8420. * @example
  8421. *
  8422. * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
  8423. *
  8424. * _.pull(array, 'a', 'c');
  8425. * console.log(array);
  8426. * // => ['b', 'b']
  8427. */
  8428. var pull = baseRest(pullAll);
  8429. /**
  8430. * This method is like `_.pull` except that it accepts an array of values to remove.
  8431. *
  8432. * **Note:** Unlike `_.difference`, this method mutates `array`.
  8433. *
  8434. * @static
  8435. * @memberOf _
  8436. * @since 4.0.0
  8437. * @category Array
  8438. * @param {Array} array The array to modify.
  8439. * @param {Array} values The values to remove.
  8440. * @returns {Array} Returns `array`.
  8441. * @example
  8442. *
  8443. * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
  8444. *
  8445. * _.pullAll(array, ['a', 'c']);
  8446. * console.log(array);
  8447. * // => ['b', 'b']
  8448. */
  8449. function pullAll(array, values) {
  8450. return (array && array.length && values && values.length)
  8451. ? basePullAll(array, values)
  8452. : array;
  8453. }
  8454. /**
  8455. * This method is like `_.pullAll` except that it accepts `iteratee` which is
  8456. * invoked for each element of `array` and `values` to generate the criterion
  8457. * by which they're compared. The iteratee is invoked with one argument: (value).
  8458. *
  8459. * **Note:** Unlike `_.differenceBy`, this method mutates `array`.
  8460. *
  8461. * @static
  8462. * @memberOf _
  8463. * @since 4.0.0
  8464. * @category Array
  8465. * @param {Array} array The array to modify.
  8466. * @param {Array} values The values to remove.
  8467. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  8468. * @returns {Array} Returns `array`.
  8469. * @example
  8470. *
  8471. * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];
  8472. *
  8473. * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');
  8474. * console.log(array);
  8475. * // => [{ 'x': 2 }]
  8476. */
  8477. function pullAllBy(array, values, iteratee) {
  8478. return (array && array.length && values && values.length)
  8479. ? basePullAll(array, values, getIteratee(iteratee, 2))
  8480. : array;
  8481. }
  8482. /**
  8483. * This method is like `_.pullAll` except that it accepts `comparator` which
  8484. * is invoked to compare elements of `array` to `values`. The comparator is
  8485. * invoked with two arguments: (arrVal, othVal).
  8486. *
  8487. * **Note:** Unlike `_.differenceWith`, this method mutates `array`.
  8488. *
  8489. * @static
  8490. * @memberOf _
  8491. * @since 4.6.0
  8492. * @category Array
  8493. * @param {Array} array The array to modify.
  8494. * @param {Array} values The values to remove.
  8495. * @param {Function} [comparator] The comparator invoked per element.
  8496. * @returns {Array} Returns `array`.
  8497. * @example
  8498. *
  8499. * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];
  8500. *
  8501. * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);
  8502. * console.log(array);
  8503. * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]
  8504. */
  8505. function pullAllWith(array, values, comparator) {
  8506. return (array && array.length && values && values.length)
  8507. ? basePullAll(array, values, undefined, comparator)
  8508. : array;
  8509. }
  8510. /**
  8511. * Removes elements from `array` corresponding to `indexes` and returns an
  8512. * array of removed elements.
  8513. *
  8514. * **Note:** Unlike `_.at`, this method mutates `array`.
  8515. *
  8516. * @static
  8517. * @memberOf _
  8518. * @since 3.0.0
  8519. * @category Array
  8520. * @param {Array} array The array to modify.
  8521. * @param {...(number|number[])} [indexes] The indexes of elements to remove.
  8522. * @returns {Array} Returns the new array of removed elements.
  8523. * @example
  8524. *
  8525. * var array = ['a', 'b', 'c', 'd'];
  8526. * var pulled = _.pullAt(array, [1, 3]);
  8527. *
  8528. * console.log(array);
  8529. * // => ['a', 'c']
  8530. *
  8531. * console.log(pulled);
  8532. * // => ['b', 'd']
  8533. */
  8534. var pullAt = flatRest(function(array, indexes) {
  8535. var length = array == null ? 0 : array.length,
  8536. result = baseAt(array, indexes);
  8537. basePullAt(array, arrayMap(indexes, function(index) {
  8538. return isIndex(index, length) ? +index : index;
  8539. }).sort(compareAscending));
  8540. return result;
  8541. });
  8542. /**
  8543. * Removes all elements from `array` that `predicate` returns truthy for
  8544. * and returns an array of the removed elements. The predicate is invoked
  8545. * with three arguments: (value, index, array).
  8546. *
  8547. * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`
  8548. * to pull elements from an array by value.
  8549. *
  8550. * @static
  8551. * @memberOf _
  8552. * @since 2.0.0
  8553. * @category Array
  8554. * @param {Array} array The array to modify.
  8555. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  8556. * @returns {Array} Returns the new array of removed elements.
  8557. * @example
  8558. *
  8559. * var array = [1, 2, 3, 4];
  8560. * var evens = _.remove(array, function(n) {
  8561. * return n % 2 == 0;
  8562. * });
  8563. *
  8564. * console.log(array);
  8565. * // => [1, 3]
  8566. *
  8567. * console.log(evens);
  8568. * // => [2, 4]
  8569. */
  8570. function remove(array, predicate) {
  8571. var result = [];
  8572. if (!(array && array.length)) {
  8573. return result;
  8574. }
  8575. var index = -1,
  8576. indexes = [],
  8577. length = array.length;
  8578. predicate = getIteratee(predicate, 3);
  8579. while (++index < length) {
  8580. var value = array[index];
  8581. if (predicate(value, index, array)) {
  8582. result.push(value);
  8583. indexes.push(index);
  8584. }
  8585. }
  8586. basePullAt(array, indexes);
  8587. return result;
  8588. }
  8589. /**
  8590. * Reverses `array` so that the first element becomes the last, the second
  8591. * element becomes the second to last, and so on.
  8592. *
  8593. * **Note:** This method mutates `array` and is based on
  8594. * [`Array#reverse`](https://mdn.io/Array/reverse).
  8595. *
  8596. * @static
  8597. * @memberOf _
  8598. * @since 4.0.0
  8599. * @category Array
  8600. * @param {Array} array The array to modify.
  8601. * @returns {Array} Returns `array`.
  8602. * @example
  8603. *
  8604. * var array = [1, 2, 3];
  8605. *
  8606. * _.reverse(array);
  8607. * // => [3, 2, 1]
  8608. *
  8609. * console.log(array);
  8610. * // => [3, 2, 1]
  8611. */
  8612. function reverse(array) {
  8613. return array == null ? array : nativeReverse.call(array);
  8614. }
  8615. /**
  8616. * Creates a slice of `array` from `start` up to, but not including, `end`.
  8617. *
  8618. * **Note:** This method is used instead of
  8619. * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are
  8620. * returned.
  8621. *
  8622. * @static
  8623. * @memberOf _
  8624. * @since 3.0.0
  8625. * @category Array
  8626. * @param {Array} array The array to slice.
  8627. * @param {number} [start=0] The start position.
  8628. * @param {number} [end=array.length] The end position.
  8629. * @returns {Array} Returns the slice of `array`.
  8630. */
  8631. function slice(array, start, end) {
  8632. var length = array == null ? 0 : array.length;
  8633. if (!length) {
  8634. return [];
  8635. }
  8636. if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {
  8637. start = 0;
  8638. end = length;
  8639. }
  8640. else {
  8641. start = start == null ? 0 : toInteger(start);
  8642. end = end === undefined ? length : toInteger(end);
  8643. }
  8644. return baseSlice(array, start, end);
  8645. }
  8646. /**
  8647. * Uses a binary search to determine the lowest index at which `value`
  8648. * should be inserted into `array` in order to maintain its sort order.
  8649. *
  8650. * @static
  8651. * @memberOf _
  8652. * @since 0.1.0
  8653. * @category Array
  8654. * @param {Array} array The sorted array to inspect.
  8655. * @param {*} value The value to evaluate.
  8656. * @returns {number} Returns the index at which `value` should be inserted
  8657. * into `array`.
  8658. * @example
  8659. *
  8660. * _.sortedIndex([30, 50], 40);
  8661. * // => 1
  8662. */
  8663. function sortedIndex(array, value) {
  8664. return baseSortedIndex(array, value);
  8665. }
  8666. /**
  8667. * This method is like `_.sortedIndex` except that it accepts `iteratee`
  8668. * which is invoked for `value` and each element of `array` to compute their
  8669. * sort ranking. The iteratee is invoked with one argument: (value).
  8670. *
  8671. * @static
  8672. * @memberOf _
  8673. * @since 4.0.0
  8674. * @category Array
  8675. * @param {Array} array The sorted array to inspect.
  8676. * @param {*} value The value to evaluate.
  8677. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  8678. * @returns {number} Returns the index at which `value` should be inserted
  8679. * into `array`.
  8680. * @example
  8681. *
  8682. * var objects = [{ 'x': 4 }, { 'x': 5 }];
  8683. *
  8684. * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
  8685. * // => 0
  8686. *
  8687. * // The `_.property` iteratee shorthand.
  8688. * _.sortedIndexBy(objects, { 'x': 4 }, 'x');
  8689. * // => 0
  8690. */
  8691. function sortedIndexBy(array, value, iteratee) {
  8692. return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));
  8693. }
  8694. /**
  8695. * This method is like `_.indexOf` except that it performs a binary
  8696. * search on a sorted `array`.
  8697. *
  8698. * @static
  8699. * @memberOf _
  8700. * @since 4.0.0
  8701. * @category Array
  8702. * @param {Array} array The array to inspect.
  8703. * @param {*} value The value to search for.
  8704. * @returns {number} Returns the index of the matched value, else `-1`.
  8705. * @example
  8706. *
  8707. * _.sortedIndexOf([4, 5, 5, 5, 6], 5);
  8708. * // => 1
  8709. */
  8710. function sortedIndexOf(array, value) {
  8711. var length = array == null ? 0 : array.length;
  8712. if (length) {
  8713. var index = baseSortedIndex(array, value);
  8714. if (index < length && eq(array[index], value)) {
  8715. return index;
  8716. }
  8717. }
  8718. return -1;
  8719. }
  8720. /**
  8721. * This method is like `_.sortedIndex` except that it returns the highest
  8722. * index at which `value` should be inserted into `array` in order to
  8723. * maintain its sort order.
  8724. *
  8725. * @static
  8726. * @memberOf _
  8727. * @since 3.0.0
  8728. * @category Array
  8729. * @param {Array} array The sorted array to inspect.
  8730. * @param {*} value The value to evaluate.
  8731. * @returns {number} Returns the index at which `value` should be inserted
  8732. * into `array`.
  8733. * @example
  8734. *
  8735. * _.sortedLastIndex([4, 5, 5, 5, 6], 5);
  8736. * // => 4
  8737. */
  8738. function sortedLastIndex(array, value) {
  8739. return baseSortedIndex(array, value, true);
  8740. }
  8741. /**
  8742. * This method is like `_.sortedLastIndex` except that it accepts `iteratee`
  8743. * which is invoked for `value` and each element of `array` to compute their
  8744. * sort ranking. The iteratee is invoked with one argument: (value).
  8745. *
  8746. * @static
  8747. * @memberOf _
  8748. * @since 4.0.0
  8749. * @category Array
  8750. * @param {Array} array The sorted array to inspect.
  8751. * @param {*} value The value to evaluate.
  8752. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  8753. * @returns {number} Returns the index at which `value` should be inserted
  8754. * into `array`.
  8755. * @example
  8756. *
  8757. * var objects = [{ 'x': 4 }, { 'x': 5 }];
  8758. *
  8759. * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
  8760. * // => 1
  8761. *
  8762. * // The `_.property` iteratee shorthand.
  8763. * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');
  8764. * // => 1
  8765. */
  8766. function sortedLastIndexBy(array, value, iteratee) {
  8767. return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);
  8768. }
  8769. /**
  8770. * This method is like `_.lastIndexOf` except that it performs a binary
  8771. * search on a sorted `array`.
  8772. *
  8773. * @static
  8774. * @memberOf _
  8775. * @since 4.0.0
  8776. * @category Array
  8777. * @param {Array} array The array to inspect.
  8778. * @param {*} value The value to search for.
  8779. * @returns {number} Returns the index of the matched value, else `-1`.
  8780. * @example
  8781. *
  8782. * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);
  8783. * // => 3
  8784. */
  8785. function sortedLastIndexOf(array, value) {
  8786. var length = array == null ? 0 : array.length;
  8787. if (length) {
  8788. var index = baseSortedIndex(array, value, true) - 1;
  8789. if (eq(array[index], value)) {
  8790. return index;
  8791. }
  8792. }
  8793. return -1;
  8794. }
  8795. /**
  8796. * This method is like `_.uniq` except that it's designed and optimized
  8797. * for sorted arrays.
  8798. *
  8799. * @static
  8800. * @memberOf _
  8801. * @since 4.0.0
  8802. * @category Array
  8803. * @param {Array} array The array to inspect.
  8804. * @returns {Array} Returns the new duplicate free array.
  8805. * @example
  8806. *
  8807. * _.sortedUniq([1, 1, 2]);
  8808. * // => [1, 2]
  8809. */
  8810. function sortedUniq(array) {
  8811. return (array && array.length)
  8812. ? baseSortedUniq(array)
  8813. : [];
  8814. }
  8815. /**
  8816. * This method is like `_.uniqBy` except that it's designed and optimized
  8817. * for sorted arrays.
  8818. *
  8819. * @static
  8820. * @memberOf _
  8821. * @since 4.0.0
  8822. * @category Array
  8823. * @param {Array} array The array to inspect.
  8824. * @param {Function} [iteratee] The iteratee invoked per element.
  8825. * @returns {Array} Returns the new duplicate free array.
  8826. * @example
  8827. *
  8828. * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);
  8829. * // => [1.1, 2.3]
  8830. */
  8831. function sortedUniqBy(array, iteratee) {
  8832. return (array && array.length)
  8833. ? baseSortedUniq(array, getIteratee(iteratee, 2))
  8834. : [];
  8835. }
  8836. /**
  8837. * Gets all but the first element of `array`.
  8838. *
  8839. * @static
  8840. * @memberOf _
  8841. * @since 4.0.0
  8842. * @category Array
  8843. * @param {Array} array The array to query.
  8844. * @returns {Array} Returns the slice of `array`.
  8845. * @example
  8846. *
  8847. * _.tail([1, 2, 3]);
  8848. * // => [2, 3]
  8849. */
  8850. function tail(array) {
  8851. var length = array == null ? 0 : array.length;
  8852. return length ? baseSlice(array, 1, length) : [];
  8853. }
  8854. /**
  8855. * Creates a slice of `array` with `n` elements taken from the beginning.
  8856. *
  8857. * @static
  8858. * @memberOf _
  8859. * @since 0.1.0
  8860. * @category Array
  8861. * @param {Array} array The array to query.
  8862. * @param {number} [n=1] The number of elements to take.
  8863. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  8864. * @returns {Array} Returns the slice of `array`.
  8865. * @example
  8866. *
  8867. * _.take([1, 2, 3]);
  8868. * // => [1]
  8869. *
  8870. * _.take([1, 2, 3], 2);
  8871. * // => [1, 2]
  8872. *
  8873. * _.take([1, 2, 3], 5);
  8874. * // => [1, 2, 3]
  8875. *
  8876. * _.take([1, 2, 3], 0);
  8877. * // => []
  8878. */
  8879. function take(array, n, guard) {
  8880. if (!(array && array.length)) {
  8881. return [];
  8882. }
  8883. n = (guard || n === undefined) ? 1 : toInteger(n);
  8884. return baseSlice(array, 0, n < 0 ? 0 : n);
  8885. }
  8886. /**
  8887. * Creates a slice of `array` with `n` elements taken from the end.
  8888. *
  8889. * @static
  8890. * @memberOf _
  8891. * @since 3.0.0
  8892. * @category Array
  8893. * @param {Array} array The array to query.
  8894. * @param {number} [n=1] The number of elements to take.
  8895. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  8896. * @returns {Array} Returns the slice of `array`.
  8897. * @example
  8898. *
  8899. * _.takeRight([1, 2, 3]);
  8900. * // => [3]
  8901. *
  8902. * _.takeRight([1, 2, 3], 2);
  8903. * // => [2, 3]
  8904. *
  8905. * _.takeRight([1, 2, 3], 5);
  8906. * // => [1, 2, 3]
  8907. *
  8908. * _.takeRight([1, 2, 3], 0);
  8909. * // => []
  8910. */
  8911. function takeRight(array, n, guard) {
  8912. var length = array == null ? 0 : array.length;
  8913. if (!length) {
  8914. return [];
  8915. }
  8916. n = (guard || n === undefined) ? 1 : toInteger(n);
  8917. n = length - n;
  8918. return baseSlice(array, n < 0 ? 0 : n, length);
  8919. }
  8920. /**
  8921. * Creates a slice of `array` with elements taken from the end. Elements are
  8922. * taken until `predicate` returns falsey. The predicate is invoked with
  8923. * three arguments: (value, index, array).
  8924. *
  8925. * @static
  8926. * @memberOf _
  8927. * @since 3.0.0
  8928. * @category Array
  8929. * @param {Array} array The array to query.
  8930. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  8931. * @returns {Array} Returns the slice of `array`.
  8932. * @example
  8933. *
  8934. * var users = [
  8935. * { 'user': 'barney', 'active': true },
  8936. * { 'user': 'fred', 'active': false },
  8937. * { 'user': 'pebbles', 'active': false }
  8938. * ];
  8939. *
  8940. * _.takeRightWhile(users, function(o) { return !o.active; });
  8941. * // => objects for ['fred', 'pebbles']
  8942. *
  8943. * // The `_.matches` iteratee shorthand.
  8944. * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });
  8945. * // => objects for ['pebbles']
  8946. *
  8947. * // The `_.matchesProperty` iteratee shorthand.
  8948. * _.takeRightWhile(users, ['active', false]);
  8949. * // => objects for ['fred', 'pebbles']
  8950. *
  8951. * // The `_.property` iteratee shorthand.
  8952. * _.takeRightWhile(users, 'active');
  8953. * // => []
  8954. */
  8955. function takeRightWhile(array, predicate) {
  8956. return (array && array.length)
  8957. ? baseWhile(array, getIteratee(predicate, 3), false, true)
  8958. : [];
  8959. }
  8960. /**
  8961. * Creates a slice of `array` with elements taken from the beginning. Elements
  8962. * are taken until `predicate` returns falsey. The predicate is invoked with
  8963. * three arguments: (value, index, array).
  8964. *
  8965. * @static
  8966. * @memberOf _
  8967. * @since 3.0.0
  8968. * @category Array
  8969. * @param {Array} array The array to query.
  8970. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  8971. * @returns {Array} Returns the slice of `array`.
  8972. * @example
  8973. *
  8974. * var users = [
  8975. * { 'user': 'barney', 'active': false },
  8976. * { 'user': 'fred', 'active': false },
  8977. * { 'user': 'pebbles', 'active': true }
  8978. * ];
  8979. *
  8980. * _.takeWhile(users, function(o) { return !o.active; });
  8981. * // => objects for ['barney', 'fred']
  8982. *
  8983. * // The `_.matches` iteratee shorthand.
  8984. * _.takeWhile(users, { 'user': 'barney', 'active': false });
  8985. * // => objects for ['barney']
  8986. *
  8987. * // The `_.matchesProperty` iteratee shorthand.
  8988. * _.takeWhile(users, ['active', false]);
  8989. * // => objects for ['barney', 'fred']
  8990. *
  8991. * // The `_.property` iteratee shorthand.
  8992. * _.takeWhile(users, 'active');
  8993. * // => []
  8994. */
  8995. function takeWhile(array, predicate) {
  8996. return (array && array.length)
  8997. ? baseWhile(array, getIteratee(predicate, 3))
  8998. : [];
  8999. }
  9000. /**
  9001. * Creates an array of unique values, in order, from all given arrays using
  9002. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  9003. * for equality comparisons.
  9004. *
  9005. * @static
  9006. * @memberOf _
  9007. * @since 0.1.0
  9008. * @category Array
  9009. * @param {...Array} [arrays] The arrays to inspect.
  9010. * @returns {Array} Returns the new array of combined values.
  9011. * @example
  9012. *
  9013. * _.union([2], [1, 2]);
  9014. * // => [2, 1]
  9015. */
  9016. var union = baseRest(function(arrays) {
  9017. return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));
  9018. });
  9019. /**
  9020. * This method is like `_.union` except that it accepts `iteratee` which is
  9021. * invoked for each element of each `arrays` to generate the criterion by
  9022. * which uniqueness is computed. Result values are chosen from the first
  9023. * array in which the value occurs. The iteratee is invoked with one argument:
  9024. * (value).
  9025. *
  9026. * @static
  9027. * @memberOf _
  9028. * @since 4.0.0
  9029. * @category Array
  9030. * @param {...Array} [arrays] The arrays to inspect.
  9031. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  9032. * @returns {Array} Returns the new array of combined values.
  9033. * @example
  9034. *
  9035. * _.unionBy([2.1], [1.2, 2.3], Math.floor);
  9036. * // => [2.1, 1.2]
  9037. *
  9038. * // The `_.property` iteratee shorthand.
  9039. * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
  9040. * // => [{ 'x': 1 }, { 'x': 2 }]
  9041. */
  9042. var unionBy = baseRest(function(arrays) {
  9043. var iteratee = last(arrays);
  9044. if (isArrayLikeObject(iteratee)) {
  9045. iteratee = undefined;
  9046. }
  9047. return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2));
  9048. });
  9049. /**
  9050. * This method is like `_.union` except that it accepts `comparator` which
  9051. * is invoked to compare elements of `arrays`. Result values are chosen from
  9052. * the first array in which the value occurs. The comparator is invoked
  9053. * with two arguments: (arrVal, othVal).
  9054. *
  9055. * @static
  9056. * @memberOf _
  9057. * @since 4.0.0
  9058. * @category Array
  9059. * @param {...Array} [arrays] The arrays to inspect.
  9060. * @param {Function} [comparator] The comparator invoked per element.
  9061. * @returns {Array} Returns the new array of combined values.
  9062. * @example
  9063. *
  9064. * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
  9065. * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
  9066. *
  9067. * _.unionWith(objects, others, _.isEqual);
  9068. * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
  9069. */
  9070. var unionWith = baseRest(function(arrays) {
  9071. var comparator = last(arrays);
  9072. comparator = typeof comparator == 'function' ? comparator : undefined;
  9073. return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);
  9074. });
  9075. /**
  9076. * Creates a duplicate-free version of an array, using
  9077. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  9078. * for equality comparisons, in which only the first occurrence of each element
  9079. * is kept. The order of result values is determined by the order they occur
  9080. * in the array.
  9081. *
  9082. * @static
  9083. * @memberOf _
  9084. * @since 0.1.0
  9085. * @category Array
  9086. * @param {Array} array The array to inspect.
  9087. * @returns {Array} Returns the new duplicate free array.
  9088. * @example
  9089. *
  9090. * _.uniq([2, 1, 2]);
  9091. * // => [2, 1]
  9092. */
  9093. function uniq(array) {
  9094. return (array && array.length) ? baseUniq(array) : [];
  9095. }
  9096. /**
  9097. * This method is like `_.uniq` except that it accepts `iteratee` which is
  9098. * invoked for each element in `array` to generate the criterion by which
  9099. * uniqueness is computed. The order of result values is determined by the
  9100. * order they occur in the array. The iteratee is invoked with one argument:
  9101. * (value).
  9102. *
  9103. * @static
  9104. * @memberOf _
  9105. * @since 4.0.0
  9106. * @category Array
  9107. * @param {Array} array The array to inspect.
  9108. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  9109. * @returns {Array} Returns the new duplicate free array.
  9110. * @example
  9111. *
  9112. * _.uniqBy([2.1, 1.2, 2.3], Math.floor);
  9113. * // => [2.1, 1.2]
  9114. *
  9115. * // The `_.property` iteratee shorthand.
  9116. * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
  9117. * // => [{ 'x': 1 }, { 'x': 2 }]
  9118. */
  9119. function uniqBy(array, iteratee) {
  9120. return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : [];
  9121. }
  9122. /**
  9123. * This method is like `_.uniq` except that it accepts `comparator` which
  9124. * is invoked to compare elements of `array`. The order of result values is
  9125. * determined by the order they occur in the array.The comparator is invoked
  9126. * with two arguments: (arrVal, othVal).
  9127. *
  9128. * @static
  9129. * @memberOf _
  9130. * @since 4.0.0
  9131. * @category Array
  9132. * @param {Array} array The array to inspect.
  9133. * @param {Function} [comparator] The comparator invoked per element.
  9134. * @returns {Array} Returns the new duplicate free array.
  9135. * @example
  9136. *
  9137. * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];
  9138. *
  9139. * _.uniqWith(objects, _.isEqual);
  9140. * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]
  9141. */
  9142. function uniqWith(array, comparator) {
  9143. comparator = typeof comparator == 'function' ? comparator : undefined;
  9144. return (array && array.length) ? baseUniq(array, undefined, comparator) : [];
  9145. }
  9146. /**
  9147. * This method is like `_.zip` except that it accepts an array of grouped
  9148. * elements and creates an array regrouping the elements to their pre-zip
  9149. * configuration.
  9150. *
  9151. * @static
  9152. * @memberOf _
  9153. * @since 1.2.0
  9154. * @category Array
  9155. * @param {Array} array The array of grouped elements to process.
  9156. * @returns {Array} Returns the new array of regrouped elements.
  9157. * @example
  9158. *
  9159. * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);
  9160. * // => [['a', 1, true], ['b', 2, false]]
  9161. *
  9162. * _.unzip(zipped);
  9163. * // => [['a', 'b'], [1, 2], [true, false]]
  9164. */
  9165. function unzip(array) {
  9166. if (!(array && array.length)) {
  9167. return [];
  9168. }
  9169. var length = 0;
  9170. array = arrayFilter(array, function(group) {
  9171. if (isArrayLikeObject(group)) {
  9172. length = nativeMax(group.length, length);
  9173. return true;
  9174. }
  9175. });
  9176. return baseTimes(length, function(index) {
  9177. return arrayMap(array, baseProperty(index));
  9178. });
  9179. }
  9180. /**
  9181. * This method is like `_.unzip` except that it accepts `iteratee` to specify
  9182. * how regrouped values should be combined. The iteratee is invoked with the
  9183. * elements of each group: (...group).
  9184. *
  9185. * @static
  9186. * @memberOf _
  9187. * @since 3.8.0
  9188. * @category Array
  9189. * @param {Array} array The array of grouped elements to process.
  9190. * @param {Function} [iteratee=_.identity] The function to combine
  9191. * regrouped values.
  9192. * @returns {Array} Returns the new array of regrouped elements.
  9193. * @example
  9194. *
  9195. * var zipped = _.zip([1, 2], [10, 20], [100, 200]);
  9196. * // => [[1, 10, 100], [2, 20, 200]]
  9197. *
  9198. * _.unzipWith(zipped, _.add);
  9199. * // => [3, 30, 300]
  9200. */
  9201. function unzipWith(array, iteratee) {
  9202. if (!(array && array.length)) {
  9203. return [];
  9204. }
  9205. var result = unzip(array);
  9206. if (iteratee == null) {
  9207. return result;
  9208. }
  9209. return arrayMap(result, function(group) {
  9210. return apply(iteratee, undefined, group);
  9211. });
  9212. }
  9213. /**
  9214. * Creates an array excluding all given values using
  9215. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  9216. * for equality comparisons.
  9217. *
  9218. * **Note:** Unlike `_.pull`, this method returns a new array.
  9219. *
  9220. * @static
  9221. * @memberOf _
  9222. * @since 0.1.0
  9223. * @category Array
  9224. * @param {Array} array The array to inspect.
  9225. * @param {...*} [values] The values to exclude.
  9226. * @returns {Array} Returns the new array of filtered values.
  9227. * @see _.difference, _.xor
  9228. * @example
  9229. *
  9230. * _.without([2, 1, 2, 3], 1, 2);
  9231. * // => [3]
  9232. */
  9233. var without = baseRest(function(array, values) {
  9234. return isArrayLikeObject(array)
  9235. ? baseDifference(array, values)
  9236. : [];
  9237. });
  9238. /**
  9239. * Creates an array of unique values that is the
  9240. * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)
  9241. * of the given arrays. The order of result values is determined by the order
  9242. * they occur in the arrays.
  9243. *
  9244. * @static
  9245. * @memberOf _
  9246. * @since 2.4.0
  9247. * @category Array
  9248. * @param {...Array} [arrays] The arrays to inspect.
  9249. * @returns {Array} Returns the new array of filtered values.
  9250. * @see _.difference, _.without
  9251. * @example
  9252. *
  9253. * _.xor([2, 1], [2, 3]);
  9254. * // => [1, 3]
  9255. */
  9256. var xor = baseRest(function(arrays) {
  9257. return baseXor(arrayFilter(arrays, isArrayLikeObject));
  9258. });
  9259. /**
  9260. * This method is like `_.xor` except that it accepts `iteratee` which is
  9261. * invoked for each element of each `arrays` to generate the criterion by
  9262. * which by which they're compared. The order of result values is determined
  9263. * by the order they occur in the arrays. The iteratee is invoked with one
  9264. * argument: (value).
  9265. *
  9266. * @static
  9267. * @memberOf _
  9268. * @since 4.0.0
  9269. * @category Array
  9270. * @param {...Array} [arrays] The arrays to inspect.
  9271. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  9272. * @returns {Array} Returns the new array of filtered values.
  9273. * @example
  9274. *
  9275. * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);
  9276. * // => [1.2, 3.4]
  9277. *
  9278. * // The `_.property` iteratee shorthand.
  9279. * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
  9280. * // => [{ 'x': 2 }]
  9281. */
  9282. var xorBy = baseRest(function(arrays) {
  9283. var iteratee = last(arrays);
  9284. if (isArrayLikeObject(iteratee)) {
  9285. iteratee = undefined;
  9286. }
  9287. return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));
  9288. });
  9289. /**
  9290. * This method is like `_.xor` except that it accepts `comparator` which is
  9291. * invoked to compare elements of `arrays`. The order of result values is
  9292. * determined by the order they occur in the arrays. The comparator is invoked
  9293. * with two arguments: (arrVal, othVal).
  9294. *
  9295. * @static
  9296. * @memberOf _
  9297. * @since 4.0.0
  9298. * @category Array
  9299. * @param {...Array} [arrays] The arrays to inspect.
  9300. * @param {Function} [comparator] The comparator invoked per element.
  9301. * @returns {Array} Returns the new array of filtered values.
  9302. * @example
  9303. *
  9304. * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
  9305. * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
  9306. *
  9307. * _.xorWith(objects, others, _.isEqual);
  9308. * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
  9309. */
  9310. var xorWith = baseRest(function(arrays) {
  9311. var comparator = last(arrays);
  9312. comparator = typeof comparator == 'function' ? comparator : undefined;
  9313. return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);
  9314. });
  9315. /**
  9316. * Creates an array of grouped elements, the first of which contains the
  9317. * first elements of the given arrays, the second of which contains the
  9318. * second elements of the given arrays, and so on.
  9319. *
  9320. * @static
  9321. * @memberOf _
  9322. * @since 0.1.0
  9323. * @category Array
  9324. * @param {...Array} [arrays] The arrays to process.
  9325. * @returns {Array} Returns the new array of grouped elements.
  9326. * @example
  9327. *
  9328. * _.zip(['a', 'b'], [1, 2], [true, false]);
  9329. * // => [['a', 1, true], ['b', 2, false]]
  9330. */
  9331. var zip = baseRest(unzip);
  9332. /**
  9333. * This method is like `_.fromPairs` except that it accepts two arrays,
  9334. * one of property identifiers and one of corresponding values.
  9335. *
  9336. * @static
  9337. * @memberOf _
  9338. * @since 0.4.0
  9339. * @category Array
  9340. * @param {Array} [props=[]] The property identifiers.
  9341. * @param {Array} [values=[]] The property values.
  9342. * @returns {Object} Returns the new object.
  9343. * @example
  9344. *
  9345. * _.zipObject(['a', 'b'], [1, 2]);
  9346. * // => { 'a': 1, 'b': 2 }
  9347. */
  9348. function zipObject(props, values) {
  9349. return baseZipObject(props || [], values || [], assignValue);
  9350. }
  9351. /**
  9352. * This method is like `_.zipObject` except that it supports property paths.
  9353. *
  9354. * @static
  9355. * @memberOf _
  9356. * @since 4.1.0
  9357. * @category Array
  9358. * @param {Array} [props=[]] The property identifiers.
  9359. * @param {Array} [values=[]] The property values.
  9360. * @returns {Object} Returns the new object.
  9361. * @example
  9362. *
  9363. * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);
  9364. * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }
  9365. */
  9366. function zipObjectDeep(props, values) {
  9367. return baseZipObject(props || [], values || [], baseSet);
  9368. }
  9369. /**
  9370. * This method is like `_.zip` except that it accepts `iteratee` to specify
  9371. * how grouped values should be combined. The iteratee is invoked with the
  9372. * elements of each group: (...group).
  9373. *
  9374. * @static
  9375. * @memberOf _
  9376. * @since 3.8.0
  9377. * @category Array
  9378. * @param {...Array} [arrays] The arrays to process.
  9379. * @param {Function} [iteratee=_.identity] The function to combine
  9380. * grouped values.
  9381. * @returns {Array} Returns the new array of grouped elements.
  9382. * @example
  9383. *
  9384. * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {
  9385. * return a + b + c;
  9386. * });
  9387. * // => [111, 222]
  9388. */
  9389. var zipWith = baseRest(function(arrays) {
  9390. var length = arrays.length,
  9391. iteratee = length > 1 ? arrays[length - 1] : undefined;
  9392. iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;
  9393. return unzipWith(arrays, iteratee);
  9394. });
  9395. /*------------------------------------------------------------------------*/
  9396. /**
  9397. * Creates a `lodash` wrapper instance that wraps `value` with explicit method
  9398. * chain sequences enabled. The result of such sequences must be unwrapped
  9399. * with `_#value`.
  9400. *
  9401. * @static
  9402. * @memberOf _
  9403. * @since 1.3.0
  9404. * @category Seq
  9405. * @param {*} value The value to wrap.
  9406. * @returns {Object} Returns the new `lodash` wrapper instance.
  9407. * @example
  9408. *
  9409. * var users = [
  9410. * { 'user': 'barney', 'age': 36 },
  9411. * { 'user': 'fred', 'age': 40 },
  9412. * { 'user': 'pebbles', 'age': 1 }
  9413. * ];
  9414. *
  9415. * var youngest = _
  9416. * .chain(users)
  9417. * .sortBy('age')
  9418. * .map(function(o) {
  9419. * return o.user + ' is ' + o.age;
  9420. * })
  9421. * .head()
  9422. * .value();
  9423. * // => 'pebbles is 1'
  9424. */
  9425. function chain(value) {
  9426. var result = lodash(value);
  9427. result.__chain__ = true;
  9428. return result;
  9429. }
  9430. /**
  9431. * This method invokes `interceptor` and returns `value`. The interceptor
  9432. * is invoked with one argument; (value). The purpose of this method is to
  9433. * "tap into" a method chain sequence in order to modify intermediate results.
  9434. *
  9435. * @static
  9436. * @memberOf _
  9437. * @since 0.1.0
  9438. * @category Seq
  9439. * @param {*} value The value to provide to `interceptor`.
  9440. * @param {Function} interceptor The function to invoke.
  9441. * @returns {*} Returns `value`.
  9442. * @example
  9443. *
  9444. * _([1, 2, 3])
  9445. * .tap(function(array) {
  9446. * // Mutate input array.
  9447. * array.pop();
  9448. * })
  9449. * .reverse()
  9450. * .value();
  9451. * // => [2, 1]
  9452. */
  9453. function tap(value, interceptor) {
  9454. interceptor(value);
  9455. return value;
  9456. }
  9457. /**
  9458. * This method is like `_.tap` except that it returns the result of `interceptor`.
  9459. * The purpose of this method is to "pass thru" values replacing intermediate
  9460. * results in a method chain sequence.
  9461. *
  9462. * @static
  9463. * @memberOf _
  9464. * @since 3.0.0
  9465. * @category Seq
  9466. * @param {*} value The value to provide to `interceptor`.
  9467. * @param {Function} interceptor The function to invoke.
  9468. * @returns {*} Returns the result of `interceptor`.
  9469. * @example
  9470. *
  9471. * _(' abc ')
  9472. * .chain()
  9473. * .trim()
  9474. * .thru(function(value) {
  9475. * return [value];
  9476. * })
  9477. * .value();
  9478. * // => ['abc']
  9479. */
  9480. function thru(value, interceptor) {
  9481. return interceptor(value);
  9482. }
  9483. /**
  9484. * This method is the wrapper version of `_.at`.
  9485. *
  9486. * @name at
  9487. * @memberOf _
  9488. * @since 1.0.0
  9489. * @category Seq
  9490. * @param {...(string|string[])} [paths] The property paths to pick.
  9491. * @returns {Object} Returns the new `lodash` wrapper instance.
  9492. * @example
  9493. *
  9494. * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
  9495. *
  9496. * _(object).at(['a[0].b.c', 'a[1]']).value();
  9497. * // => [3, 4]
  9498. */
  9499. var wrapperAt = flatRest(function(paths) {
  9500. var length = paths.length,
  9501. start = length ? paths[0] : 0,
  9502. value = this.__wrapped__,
  9503. interceptor = function(object) { return baseAt(object, paths); };
  9504. if (length > 1 || this.__actions__.length ||
  9505. !(value instanceof LazyWrapper) || !isIndex(start)) {
  9506. return this.thru(interceptor);
  9507. }
  9508. value = value.slice(start, +start + (length ? 1 : 0));
  9509. value.__actions__.push({
  9510. 'func': thru,
  9511. 'args': [interceptor],
  9512. 'thisArg': undefined
  9513. });
  9514. return new LodashWrapper(value, this.__chain__).thru(function(array) {
  9515. if (length && !array.length) {
  9516. array.push(undefined);
  9517. }
  9518. return array;
  9519. });
  9520. });
  9521. /**
  9522. * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.
  9523. *
  9524. * @name chain
  9525. * @memberOf _
  9526. * @since 0.1.0
  9527. * @category Seq
  9528. * @returns {Object} Returns the new `lodash` wrapper instance.
  9529. * @example
  9530. *
  9531. * var users = [
  9532. * { 'user': 'barney', 'age': 36 },
  9533. * { 'user': 'fred', 'age': 40 }
  9534. * ];
  9535. *
  9536. * // A sequence without explicit chaining.
  9537. * _(users).head();
  9538. * // => { 'user': 'barney', 'age': 36 }
  9539. *
  9540. * // A sequence with explicit chaining.
  9541. * _(users)
  9542. * .chain()
  9543. * .head()
  9544. * .pick('user')
  9545. * .value();
  9546. * // => { 'user': 'barney' }
  9547. */
  9548. function wrapperChain() {
  9549. return chain(this);
  9550. }
  9551. /**
  9552. * Executes the chain sequence and returns the wrapped result.
  9553. *
  9554. * @name commit
  9555. * @memberOf _
  9556. * @since 3.2.0
  9557. * @category Seq
  9558. * @returns {Object} Returns the new `lodash` wrapper instance.
  9559. * @example
  9560. *
  9561. * var array = [1, 2];
  9562. * var wrapped = _(array).push(3);
  9563. *
  9564. * console.log(array);
  9565. * // => [1, 2]
  9566. *
  9567. * wrapped = wrapped.commit();
  9568. * console.log(array);
  9569. * // => [1, 2, 3]
  9570. *
  9571. * wrapped.last();
  9572. * // => 3
  9573. *
  9574. * console.log(array);
  9575. * // => [1, 2, 3]
  9576. */
  9577. function wrapperCommit() {
  9578. return new LodashWrapper(this.value(), this.__chain__);
  9579. }
  9580. /**
  9581. * Gets the next value on a wrapped object following the
  9582. * [iterator protocol](https://mdn.io/iteration_protocols#iterator).
  9583. *
  9584. * @name next
  9585. * @memberOf _
  9586. * @since 4.0.0
  9587. * @category Seq
  9588. * @returns {Object} Returns the next iterator value.
  9589. * @example
  9590. *
  9591. * var wrapped = _([1, 2]);
  9592. *
  9593. * wrapped.next();
  9594. * // => { 'done': false, 'value': 1 }
  9595. *
  9596. * wrapped.next();
  9597. * // => { 'done': false, 'value': 2 }
  9598. *
  9599. * wrapped.next();
  9600. * // => { 'done': true, 'value': undefined }
  9601. */
  9602. function wrapperNext() {
  9603. if (this.__values__ === undefined) {
  9604. this.__values__ = toArray(this.value());
  9605. }
  9606. var done = this.__index__ >= this.__values__.length,
  9607. value = done ? undefined : this.__values__[this.__index__++];
  9608. return { 'done': done, 'value': value };
  9609. }
  9610. /**
  9611. * Enables the wrapper to be iterable.
  9612. *
  9613. * @name Symbol.iterator
  9614. * @memberOf _
  9615. * @since 4.0.0
  9616. * @category Seq
  9617. * @returns {Object} Returns the wrapper object.
  9618. * @example
  9619. *
  9620. * var wrapped = _([1, 2]);
  9621. *
  9622. * wrapped[Symbol.iterator]() === wrapped;
  9623. * // => true
  9624. *
  9625. * Array.from(wrapped);
  9626. * // => [1, 2]
  9627. */
  9628. function wrapperToIterator() {
  9629. return this;
  9630. }
  9631. /**
  9632. * Creates a clone of the chain sequence planting `value` as the wrapped value.
  9633. *
  9634. * @name plant
  9635. * @memberOf _
  9636. * @since 3.2.0
  9637. * @category Seq
  9638. * @param {*} value The value to plant.
  9639. * @returns {Object} Returns the new `lodash` wrapper instance.
  9640. * @example
  9641. *
  9642. * function square(n) {
  9643. * return n * n;
  9644. * }
  9645. *
  9646. * var wrapped = _([1, 2]).map(square);
  9647. * var other = wrapped.plant([3, 4]);
  9648. *
  9649. * other.value();
  9650. * // => [9, 16]
  9651. *
  9652. * wrapped.value();
  9653. * // => [1, 4]
  9654. */
  9655. function wrapperPlant(value) {
  9656. var result,
  9657. parent = this;
  9658. while (parent instanceof baseLodash) {
  9659. var clone = wrapperClone(parent);
  9660. clone.__index__ = 0;
  9661. clone.__values__ = undefined;
  9662. if (result) {
  9663. previous.__wrapped__ = clone;
  9664. } else {
  9665. result = clone;
  9666. }
  9667. var previous = clone;
  9668. parent = parent.__wrapped__;
  9669. }
  9670. previous.__wrapped__ = value;
  9671. return result;
  9672. }
  9673. /**
  9674. * This method is the wrapper version of `_.reverse`.
  9675. *
  9676. * **Note:** This method mutates the wrapped array.
  9677. *
  9678. * @name reverse
  9679. * @memberOf _
  9680. * @since 0.1.0
  9681. * @category Seq
  9682. * @returns {Object} Returns the new `lodash` wrapper instance.
  9683. * @example
  9684. *
  9685. * var array = [1, 2, 3];
  9686. *
  9687. * _(array).reverse().value()
  9688. * // => [3, 2, 1]
  9689. *
  9690. * console.log(array);
  9691. * // => [3, 2, 1]
  9692. */
  9693. function wrapperReverse() {
  9694. var value = this.__wrapped__;
  9695. if (value instanceof LazyWrapper) {
  9696. var wrapped = value;
  9697. if (this.__actions__.length) {
  9698. wrapped = new LazyWrapper(this);
  9699. }
  9700. wrapped = wrapped.reverse();
  9701. wrapped.__actions__.push({
  9702. 'func': thru,
  9703. 'args': [reverse],
  9704. 'thisArg': undefined
  9705. });
  9706. return new LodashWrapper(wrapped, this.__chain__);
  9707. }
  9708. return this.thru(reverse);
  9709. }
  9710. /**
  9711. * Executes the chain sequence to resolve the unwrapped value.
  9712. *
  9713. * @name value
  9714. * @memberOf _
  9715. * @since 0.1.0
  9716. * @alias toJSON, valueOf
  9717. * @category Seq
  9718. * @returns {*} Returns the resolved unwrapped value.
  9719. * @example
  9720. *
  9721. * _([1, 2, 3]).value();
  9722. * // => [1, 2, 3]
  9723. */
  9724. function wrapperValue() {
  9725. return baseWrapperValue(this.__wrapped__, this.__actions__);
  9726. }
  9727. /*------------------------------------------------------------------------*/
  9728. /**
  9729. * Creates an object composed of keys generated from the results of running
  9730. * each element of `collection` thru `iteratee`. The corresponding value of
  9731. * each key is the number of times the key was returned by `iteratee`. The
  9732. * iteratee is invoked with one argument: (value).
  9733. *
  9734. * @static
  9735. * @memberOf _
  9736. * @since 0.5.0
  9737. * @category Collection
  9738. * @param {Array|Object} collection The collection to iterate over.
  9739. * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
  9740. * @returns {Object} Returns the composed aggregate object.
  9741. * @example
  9742. *
  9743. * _.countBy([6.1, 4.2, 6.3], Math.floor);
  9744. * // => { '4': 1, '6': 2 }
  9745. *
  9746. * // The `_.property` iteratee shorthand.
  9747. * _.countBy(['one', 'two', 'three'], 'length');
  9748. * // => { '3': 2, '5': 1 }
  9749. */
  9750. var countBy = createAggregator(function(result, value, key) {
  9751. if (hasOwnProperty.call(result, key)) {
  9752. ++result[key];
  9753. } else {
  9754. baseAssignValue(result, key, 1);
  9755. }
  9756. });
  9757. /**
  9758. * Checks if `predicate` returns truthy for **all** elements of `collection`.
  9759. * Iteration is stopped once `predicate` returns falsey. The predicate is
  9760. * invoked with three arguments: (value, index|key, collection).
  9761. *
  9762. * **Note:** This method returns `true` for
  9763. * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because
  9764. * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of
  9765. * elements of empty collections.
  9766. *
  9767. * @static
  9768. * @memberOf _
  9769. * @since 0.1.0
  9770. * @category Collection
  9771. * @param {Array|Object} collection The collection to iterate over.
  9772. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  9773. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  9774. * @returns {boolean} Returns `true` if all elements pass the predicate check,
  9775. * else `false`.
  9776. * @example
  9777. *
  9778. * _.every([true, 1, null, 'yes'], Boolean);
  9779. * // => false
  9780. *
  9781. * var users = [
  9782. * { 'user': 'barney', 'age': 36, 'active': false },
  9783. * { 'user': 'fred', 'age': 40, 'active': false }
  9784. * ];
  9785. *
  9786. * // The `_.matches` iteratee shorthand.
  9787. * _.every(users, { 'user': 'barney', 'active': false });
  9788. * // => false
  9789. *
  9790. * // The `_.matchesProperty` iteratee shorthand.
  9791. * _.every(users, ['active', false]);
  9792. * // => true
  9793. *
  9794. * // The `_.property` iteratee shorthand.
  9795. * _.every(users, 'active');
  9796. * // => false
  9797. */
  9798. function every(collection, predicate, guard) {
  9799. var func = isArray(collection) ? arrayEvery : baseEvery;
  9800. if (guard && isIterateeCall(collection, predicate, guard)) {
  9801. predicate = undefined;
  9802. }
  9803. return func(collection, getIteratee(predicate, 3));
  9804. }
  9805. /**
  9806. * Iterates over elements of `collection`, returning an array of all elements
  9807. * `predicate` returns truthy for. The predicate is invoked with three
  9808. * arguments: (value, index|key, collection).
  9809. *
  9810. * **Note:** Unlike `_.remove`, this method returns a new array.
  9811. *
  9812. * @static
  9813. * @memberOf _
  9814. * @since 0.1.0
  9815. * @category Collection
  9816. * @param {Array|Object} collection The collection to iterate over.
  9817. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  9818. * @returns {Array} Returns the new filtered array.
  9819. * @see _.reject
  9820. * @example
  9821. *
  9822. * var users = [
  9823. * { 'user': 'barney', 'age': 36, 'active': true },
  9824. * { 'user': 'fred', 'age': 40, 'active': false }
  9825. * ];
  9826. *
  9827. * _.filter(users, function(o) { return !o.active; });
  9828. * // => objects for ['fred']
  9829. *
  9830. * // The `_.matches` iteratee shorthand.
  9831. * _.filter(users, { 'age': 36, 'active': true });
  9832. * // => objects for ['barney']
  9833. *
  9834. * // The `_.matchesProperty` iteratee shorthand.
  9835. * _.filter(users, ['active', false]);
  9836. * // => objects for ['fred']
  9837. *
  9838. * // The `_.property` iteratee shorthand.
  9839. * _.filter(users, 'active');
  9840. * // => objects for ['barney']
  9841. *
  9842. * // Combining several predicates using `_.overEvery` or `_.overSome`.
  9843. * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));
  9844. * // => objects for ['fred', 'barney']
  9845. */
  9846. function filter(collection, predicate) {
  9847. var func = isArray(collection) ? arrayFilter : baseFilter;
  9848. return func(collection, getIteratee(predicate, 3));
  9849. }
  9850. /**
  9851. * Iterates over elements of `collection`, returning the first element
  9852. * `predicate` returns truthy for. The predicate is invoked with three
  9853. * arguments: (value, index|key, collection).
  9854. *
  9855. * @static
  9856. * @memberOf _
  9857. * @since 0.1.0
  9858. * @category Collection
  9859. * @param {Array|Object} collection The collection to inspect.
  9860. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  9861. * @param {number} [fromIndex=0] The index to search from.
  9862. * @returns {*} Returns the matched element, else `undefined`.
  9863. * @example
  9864. *
  9865. * var users = [
  9866. * { 'user': 'barney', 'age': 36, 'active': true },
  9867. * { 'user': 'fred', 'age': 40, 'active': false },
  9868. * { 'user': 'pebbles', 'age': 1, 'active': true }
  9869. * ];
  9870. *
  9871. * _.find(users, function(o) { return o.age < 40; });
  9872. * // => object for 'barney'
  9873. *
  9874. * // The `_.matches` iteratee shorthand.
  9875. * _.find(users, { 'age': 1, 'active': true });
  9876. * // => object for 'pebbles'
  9877. *
  9878. * // The `_.matchesProperty` iteratee shorthand.
  9879. * _.find(users, ['active', false]);
  9880. * // => object for 'fred'
  9881. *
  9882. * // The `_.property` iteratee shorthand.
  9883. * _.find(users, 'active');
  9884. * // => object for 'barney'
  9885. */
  9886. var find = createFind(findIndex);
  9887. /**
  9888. * This method is like `_.find` except that it iterates over elements of
  9889. * `collection` from right to left.
  9890. *
  9891. * @static
  9892. * @memberOf _
  9893. * @since 2.0.0
  9894. * @category Collection
  9895. * @param {Array|Object} collection The collection to inspect.
  9896. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  9897. * @param {number} [fromIndex=collection.length-1] The index to search from.
  9898. * @returns {*} Returns the matched element, else `undefined`.
  9899. * @example
  9900. *
  9901. * _.findLast([1, 2, 3, 4], function(n) {
  9902. * return n % 2 == 1;
  9903. * });
  9904. * // => 3
  9905. */
  9906. var findLast = createFind(findLastIndex);
  9907. /**
  9908. * Creates a flattened array of values by running each element in `collection`
  9909. * thru `iteratee` and flattening the mapped results. The iteratee is invoked
  9910. * with three arguments: (value, index|key, collection).
  9911. *
  9912. * @static
  9913. * @memberOf _
  9914. * @since 4.0.0
  9915. * @category Collection
  9916. * @param {Array|Object} collection The collection to iterate over.
  9917. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  9918. * @returns {Array} Returns the new flattened array.
  9919. * @example
  9920. *
  9921. * function duplicate(n) {
  9922. * return [n, n];
  9923. * }
  9924. *
  9925. * _.flatMap([1, 2], duplicate);
  9926. * // => [1, 1, 2, 2]
  9927. */
  9928. function flatMap(collection, iteratee) {
  9929. return baseFlatten(map(collection, iteratee), 1);
  9930. }
  9931. /**
  9932. * This method is like `_.flatMap` except that it recursively flattens the
  9933. * mapped results.
  9934. *
  9935. * @static
  9936. * @memberOf _
  9937. * @since 4.7.0
  9938. * @category Collection
  9939. * @param {Array|Object} collection The collection to iterate over.
  9940. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  9941. * @returns {Array} Returns the new flattened array.
  9942. * @example
  9943. *
  9944. * function duplicate(n) {
  9945. * return [[[n, n]]];
  9946. * }
  9947. *
  9948. * _.flatMapDeep([1, 2], duplicate);
  9949. * // => [1, 1, 2, 2]
  9950. */
  9951. function flatMapDeep(collection, iteratee) {
  9952. return baseFlatten(map(collection, iteratee), INFINITY);
  9953. }
  9954. /**
  9955. * This method is like `_.flatMap` except that it recursively flattens the
  9956. * mapped results up to `depth` times.
  9957. *
  9958. * @static
  9959. * @memberOf _
  9960. * @since 4.7.0
  9961. * @category Collection
  9962. * @param {Array|Object} collection The collection to iterate over.
  9963. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  9964. * @param {number} [depth=1] The maximum recursion depth.
  9965. * @returns {Array} Returns the new flattened array.
  9966. * @example
  9967. *
  9968. * function duplicate(n) {
  9969. * return [[[n, n]]];
  9970. * }
  9971. *
  9972. * _.flatMapDepth([1, 2], duplicate, 2);
  9973. * // => [[1, 1], [2, 2]]
  9974. */
  9975. function flatMapDepth(collection, iteratee, depth) {
  9976. depth = depth === undefined ? 1 : toInteger(depth);
  9977. return baseFlatten(map(collection, iteratee), depth);
  9978. }
  9979. /**
  9980. * Iterates over elements of `collection` and invokes `iteratee` for each element.
  9981. * The iteratee is invoked with three arguments: (value, index|key, collection).
  9982. * Iteratee functions may exit iteration early by explicitly returning `false`.
  9983. *
  9984. * **Note:** As with other "Collections" methods, objects with a "length"
  9985. * property are iterated like arrays. To avoid this behavior use `_.forIn`
  9986. * or `_.forOwn` for object iteration.
  9987. *
  9988. * @static
  9989. * @memberOf _
  9990. * @since 0.1.0
  9991. * @alias each
  9992. * @category Collection
  9993. * @param {Array|Object} collection The collection to iterate over.
  9994. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  9995. * @returns {Array|Object} Returns `collection`.
  9996. * @see _.forEachRight
  9997. * @example
  9998. *
  9999. * _.forEach([1, 2], function(value) {
  10000. * console.log(value);
  10001. * });
  10002. * // => Logs `1` then `2`.
  10003. *
  10004. * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
  10005. * console.log(key);
  10006. * });
  10007. * // => Logs 'a' then 'b' (iteration order is not guaranteed).
  10008. */
  10009. function forEach(collection, iteratee) {
  10010. var func = isArray(collection) ? arrayEach : baseEach;
  10011. return func(collection, getIteratee(iteratee, 3));
  10012. }
  10013. /**
  10014. * This method is like `_.forEach` except that it iterates over elements of
  10015. * `collection` from right to left.
  10016. *
  10017. * @static
  10018. * @memberOf _
  10019. * @since 2.0.0
  10020. * @alias eachRight
  10021. * @category Collection
  10022. * @param {Array|Object} collection The collection to iterate over.
  10023. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  10024. * @returns {Array|Object} Returns `collection`.
  10025. * @see _.forEach
  10026. * @example
  10027. *
  10028. * _.forEachRight([1, 2], function(value) {
  10029. * console.log(value);
  10030. * });
  10031. * // => Logs `2` then `1`.
  10032. */
  10033. function forEachRight(collection, iteratee) {
  10034. var func = isArray(collection) ? arrayEachRight : baseEachRight;
  10035. return func(collection, getIteratee(iteratee, 3));
  10036. }
  10037. /**
  10038. * Creates an object composed of keys generated from the results of running
  10039. * each element of `collection` thru `iteratee`. The order of grouped values
  10040. * is determined by the order they occur in `collection`. The corresponding
  10041. * value of each key is an array of elements responsible for generating the
  10042. * key. The iteratee is invoked with one argument: (value).
  10043. *
  10044. * @static
  10045. * @memberOf _
  10046. * @since 0.1.0
  10047. * @category Collection
  10048. * @param {Array|Object} collection The collection to iterate over.
  10049. * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
  10050. * @returns {Object} Returns the composed aggregate object.
  10051. * @example
  10052. *
  10053. * _.groupBy([6.1, 4.2, 6.3], Math.floor);
  10054. * // => { '4': [4.2], '6': [6.1, 6.3] }
  10055. *
  10056. * // The `_.property` iteratee shorthand.
  10057. * _.groupBy(['one', 'two', 'three'], 'length');
  10058. * // => { '3': ['one', 'two'], '5': ['three'] }
  10059. */
  10060. var groupBy = createAggregator(function(result, value, key) {
  10061. if (hasOwnProperty.call(result, key)) {
  10062. result[key].push(value);
  10063. } else {
  10064. baseAssignValue(result, key, [value]);
  10065. }
  10066. });
  10067. /**
  10068. * Checks if `value` is in `collection`. If `collection` is a string, it's
  10069. * checked for a substring of `value`, otherwise
  10070. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  10071. * is used for equality comparisons. If `fromIndex` is negative, it's used as
  10072. * the offset from the end of `collection`.
  10073. *
  10074. * @static
  10075. * @memberOf _
  10076. * @since 0.1.0
  10077. * @category Collection
  10078. * @param {Array|Object|string} collection The collection to inspect.
  10079. * @param {*} value The value to search for.
  10080. * @param {number} [fromIndex=0] The index to search from.
  10081. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
  10082. * @returns {boolean} Returns `true` if `value` is found, else `false`.
  10083. * @example
  10084. *
  10085. * _.includes([1, 2, 3], 1);
  10086. * // => true
  10087. *
  10088. * _.includes([1, 2, 3], 1, 2);
  10089. * // => false
  10090. *
  10091. * _.includes({ 'a': 1, 'b': 2 }, 1);
  10092. * // => true
  10093. *
  10094. * _.includes('abcd', 'bc');
  10095. * // => true
  10096. */
  10097. function includes(collection, value, fromIndex, guard) {
  10098. collection = isArrayLike(collection) ? collection : values(collection);
  10099. fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;
  10100. var length = collection.length;
  10101. if (fromIndex < 0) {
  10102. fromIndex = nativeMax(length + fromIndex, 0);
  10103. }
  10104. return isString(collection)
  10105. ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)
  10106. : (!!length && baseIndexOf(collection, value, fromIndex) > -1);
  10107. }
  10108. /**
  10109. * Invokes the method at `path` of each element in `collection`, returning
  10110. * an array of the results of each invoked method. Any additional arguments
  10111. * are provided to each invoked method. If `path` is a function, it's invoked
  10112. * for, and `this` bound to, each element in `collection`.
  10113. *
  10114. * @static
  10115. * @memberOf _
  10116. * @since 4.0.0
  10117. * @category Collection
  10118. * @param {Array|Object} collection The collection to iterate over.
  10119. * @param {Array|Function|string} path The path of the method to invoke or
  10120. * the function invoked per iteration.
  10121. * @param {...*} [args] The arguments to invoke each method with.
  10122. * @returns {Array} Returns the array of results.
  10123. * @example
  10124. *
  10125. * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');
  10126. * // => [[1, 5, 7], [1, 2, 3]]
  10127. *
  10128. * _.invokeMap([123, 456], String.prototype.split, '');
  10129. * // => [['1', '2', '3'], ['4', '5', '6']]
  10130. */
  10131. var invokeMap = baseRest(function(collection, path, args) {
  10132. var index = -1,
  10133. isFunc = typeof path == 'function',
  10134. result = isArrayLike(collection) ? Array(collection.length) : [];
  10135. baseEach(collection, function(value) {
  10136. result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);
  10137. });
  10138. return result;
  10139. });
  10140. /**
  10141. * Creates an object composed of keys generated from the results of running
  10142. * each element of `collection` thru `iteratee`. The corresponding value of
  10143. * each key is the last element responsible for generating the key. The
  10144. * iteratee is invoked with one argument: (value).
  10145. *
  10146. * @static
  10147. * @memberOf _
  10148. * @since 4.0.0
  10149. * @category Collection
  10150. * @param {Array|Object} collection The collection to iterate over.
  10151. * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
  10152. * @returns {Object} Returns the composed aggregate object.
  10153. * @example
  10154. *
  10155. * var array = [
  10156. * { 'dir': 'left', 'code': 97 },
  10157. * { 'dir': 'right', 'code': 100 }
  10158. * ];
  10159. *
  10160. * _.keyBy(array, function(o) {
  10161. * return String.fromCharCode(o.code);
  10162. * });
  10163. * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
  10164. *
  10165. * _.keyBy(array, 'dir');
  10166. * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }
  10167. */
  10168. var keyBy = createAggregator(function(result, value, key) {
  10169. baseAssignValue(result, key, value);
  10170. });
  10171. /**
  10172. * Creates an array of values by running each element in `collection` thru
  10173. * `iteratee`. The iteratee is invoked with three arguments:
  10174. * (value, index|key, collection).
  10175. *
  10176. * Many lodash methods are guarded to work as iteratees for methods like
  10177. * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
  10178. *
  10179. * The guarded methods are:
  10180. * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
  10181. * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
  10182. * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
  10183. * `template`, `trim`, `trimEnd`, `trimStart`, and `words`
  10184. *
  10185. * @static
  10186. * @memberOf _
  10187. * @since 0.1.0
  10188. * @category Collection
  10189. * @param {Array|Object} collection The collection to iterate over.
  10190. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  10191. * @returns {Array} Returns the new mapped array.
  10192. * @example
  10193. *
  10194. * function square(n) {
  10195. * return n * n;
  10196. * }
  10197. *
  10198. * _.map([4, 8], square);
  10199. * // => [16, 64]
  10200. *
  10201. * _.map({ 'a': 4, 'b': 8 }, square);
  10202. * // => [16, 64] (iteration order is not guaranteed)
  10203. *
  10204. * var users = [
  10205. * { 'user': 'barney' },
  10206. * { 'user': 'fred' }
  10207. * ];
  10208. *
  10209. * // The `_.property` iteratee shorthand.
  10210. * _.map(users, 'user');
  10211. * // => ['barney', 'fred']
  10212. */
  10213. function map(collection, iteratee) {
  10214. var func = isArray(collection) ? arrayMap : baseMap;
  10215. return func(collection, getIteratee(iteratee, 3));
  10216. }
  10217. /**
  10218. * This method is like `_.sortBy` except that it allows specifying the sort
  10219. * orders of the iteratees to sort by. If `orders` is unspecified, all values
  10220. * are sorted in ascending order. Otherwise, specify an order of "desc" for
  10221. * descending or "asc" for ascending sort order of corresponding values.
  10222. *
  10223. * @static
  10224. * @memberOf _
  10225. * @since 4.0.0
  10226. * @category Collection
  10227. * @param {Array|Object} collection The collection to iterate over.
  10228. * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]
  10229. * The iteratees to sort by.
  10230. * @param {string[]} [orders] The sort orders of `iteratees`.
  10231. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
  10232. * @returns {Array} Returns the new sorted array.
  10233. * @example
  10234. *
  10235. * var users = [
  10236. * { 'user': 'fred', 'age': 48 },
  10237. * { 'user': 'barney', 'age': 34 },
  10238. * { 'user': 'fred', 'age': 40 },
  10239. * { 'user': 'barney', 'age': 36 }
  10240. * ];
  10241. *
  10242. * // Sort by `user` in ascending order and by `age` in descending order.
  10243. * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);
  10244. * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
  10245. */
  10246. function orderBy(collection, iteratees, orders, guard) {
  10247. if (collection == null) {
  10248. return [];
  10249. }
  10250. if (!isArray(iteratees)) {
  10251. iteratees = iteratees == null ? [] : [iteratees];
  10252. }
  10253. orders = guard ? undefined : orders;
  10254. if (!isArray(orders)) {
  10255. orders = orders == null ? [] : [orders];
  10256. }
  10257. return baseOrderBy(collection, iteratees, orders);
  10258. }
  10259. /**
  10260. * Creates an array of elements split into two groups, the first of which
  10261. * contains elements `predicate` returns truthy for, the second of which
  10262. * contains elements `predicate` returns falsey for. The predicate is
  10263. * invoked with one argument: (value).
  10264. *
  10265. * @static
  10266. * @memberOf _
  10267. * @since 3.0.0
  10268. * @category Collection
  10269. * @param {Array|Object} collection The collection to iterate over.
  10270. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  10271. * @returns {Array} Returns the array of grouped elements.
  10272. * @example
  10273. *
  10274. * var users = [
  10275. * { 'user': 'barney', 'age': 36, 'active': false },
  10276. * { 'user': 'fred', 'age': 40, 'active': true },
  10277. * { 'user': 'pebbles', 'age': 1, 'active': false }
  10278. * ];
  10279. *
  10280. * _.partition(users, function(o) { return o.active; });
  10281. * // => objects for [['fred'], ['barney', 'pebbles']]
  10282. *
  10283. * // The `_.matches` iteratee shorthand.
  10284. * _.partition(users, { 'age': 1, 'active': false });
  10285. * // => objects for [['pebbles'], ['barney', 'fred']]
  10286. *
  10287. * // The `_.matchesProperty` iteratee shorthand.
  10288. * _.partition(users, ['active', false]);
  10289. * // => objects for [['barney', 'pebbles'], ['fred']]
  10290. *
  10291. * // The `_.property` iteratee shorthand.
  10292. * _.partition(users, 'active');
  10293. * // => objects for [['fred'], ['barney', 'pebbles']]
  10294. */
  10295. var partition = createAggregator(function(result, value, key) {
  10296. result[key ? 0 : 1].push(value);
  10297. }, function() { return [[], []]; });
  10298. /**
  10299. * Reduces `collection` to a value which is the accumulated result of running
  10300. * each element in `collection` thru `iteratee`, where each successive
  10301. * invocation is supplied the return value of the previous. If `accumulator`
  10302. * is not given, the first element of `collection` is used as the initial
  10303. * value. The iteratee is invoked with four arguments:
  10304. * (accumulator, value, index|key, collection).
  10305. *
  10306. * Many lodash methods are guarded to work as iteratees for methods like
  10307. * `_.reduce`, `_.reduceRight`, and `_.transform`.
  10308. *
  10309. * The guarded methods are:
  10310. * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,
  10311. * and `sortBy`
  10312. *
  10313. * @static
  10314. * @memberOf _
  10315. * @since 0.1.0
  10316. * @category Collection
  10317. * @param {Array|Object} collection The collection to iterate over.
  10318. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  10319. * @param {*} [accumulator] The initial value.
  10320. * @returns {*} Returns the accumulated value.
  10321. * @see _.reduceRight
  10322. * @example
  10323. *
  10324. * _.reduce([1, 2], function(sum, n) {
  10325. * return sum + n;
  10326. * }, 0);
  10327. * // => 3
  10328. *
  10329. * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
  10330. * (result[value] || (result[value] = [])).push(key);
  10331. * return result;
  10332. * }, {});
  10333. * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
  10334. */
  10335. function reduce(collection, iteratee, accumulator) {
  10336. var func = isArray(collection) ? arrayReduce : baseReduce,
  10337. initAccum = arguments.length < 3;
  10338. return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);
  10339. }
  10340. /**
  10341. * This method is like `_.reduce` except that it iterates over elements of
  10342. * `collection` from right to left.
  10343. *
  10344. * @static
  10345. * @memberOf _
  10346. * @since 0.1.0
  10347. * @category Collection
  10348. * @param {Array|Object} collection The collection to iterate over.
  10349. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  10350. * @param {*} [accumulator] The initial value.
  10351. * @returns {*} Returns the accumulated value.
  10352. * @see _.reduce
  10353. * @example
  10354. *
  10355. * var array = [[0, 1], [2, 3], [4, 5]];
  10356. *
  10357. * _.reduceRight(array, function(flattened, other) {
  10358. * return flattened.concat(other);
  10359. * }, []);
  10360. * // => [4, 5, 2, 3, 0, 1]
  10361. */
  10362. function reduceRight(collection, iteratee, accumulator) {
  10363. var func = isArray(collection) ? arrayReduceRight : baseReduce,
  10364. initAccum = arguments.length < 3;
  10365. return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);
  10366. }
  10367. /**
  10368. * The opposite of `_.filter`; this method returns the elements of `collection`
  10369. * that `predicate` does **not** return truthy for.
  10370. *
  10371. * @static
  10372. * @memberOf _
  10373. * @since 0.1.0
  10374. * @category Collection
  10375. * @param {Array|Object} collection The collection to iterate over.
  10376. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  10377. * @returns {Array} Returns the new filtered array.
  10378. * @see _.filter
  10379. * @example
  10380. *
  10381. * var users = [
  10382. * { 'user': 'barney', 'age': 36, 'active': false },
  10383. * { 'user': 'fred', 'age': 40, 'active': true }
  10384. * ];
  10385. *
  10386. * _.reject(users, function(o) { return !o.active; });
  10387. * // => objects for ['fred']
  10388. *
  10389. * // The `_.matches` iteratee shorthand.
  10390. * _.reject(users, { 'age': 40, 'active': true });
  10391. * // => objects for ['barney']
  10392. *
  10393. * // The `_.matchesProperty` iteratee shorthand.
  10394. * _.reject(users, ['active', false]);
  10395. * // => objects for ['fred']
  10396. *
  10397. * // The `_.property` iteratee shorthand.
  10398. * _.reject(users, 'active');
  10399. * // => objects for ['barney']
  10400. */
  10401. function reject(collection, predicate) {
  10402. var func = isArray(collection) ? arrayFilter : baseFilter;
  10403. return func(collection, negate(getIteratee(predicate, 3)));
  10404. }
  10405. /**
  10406. * Gets a random element from `collection`.
  10407. *
  10408. * @static
  10409. * @memberOf _
  10410. * @since 2.0.0
  10411. * @category Collection
  10412. * @param {Array|Object} collection The collection to sample.
  10413. * @returns {*} Returns the random element.
  10414. * @example
  10415. *
  10416. * _.sample([1, 2, 3, 4]);
  10417. * // => 2
  10418. */
  10419. function sample(collection) {
  10420. var func = isArray(collection) ? arraySample : baseSample;
  10421. return func(collection);
  10422. }
  10423. /**
  10424. * Gets `n` random elements at unique keys from `collection` up to the
  10425. * size of `collection`.
  10426. *
  10427. * @static
  10428. * @memberOf _
  10429. * @since 4.0.0
  10430. * @category Collection
  10431. * @param {Array|Object} collection The collection to sample.
  10432. * @param {number} [n=1] The number of elements to sample.
  10433. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  10434. * @returns {Array} Returns the random elements.
  10435. * @example
  10436. *
  10437. * _.sampleSize([1, 2, 3], 2);
  10438. * // => [3, 1]
  10439. *
  10440. * _.sampleSize([1, 2, 3], 4);
  10441. * // => [2, 3, 1]
  10442. */
  10443. function sampleSize(collection, n, guard) {
  10444. if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {
  10445. n = 1;
  10446. } else {
  10447. n = toInteger(n);
  10448. }
  10449. var func = isArray(collection) ? arraySampleSize : baseSampleSize;
  10450. return func(collection, n);
  10451. }
  10452. /**
  10453. * Creates an array of shuffled values, using a version of the
  10454. * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).
  10455. *
  10456. * @static
  10457. * @memberOf _
  10458. * @since 0.1.0
  10459. * @category Collection
  10460. * @param {Array|Object} collection The collection to shuffle.
  10461. * @returns {Array} Returns the new shuffled array.
  10462. * @example
  10463. *
  10464. * _.shuffle([1, 2, 3, 4]);
  10465. * // => [4, 1, 3, 2]
  10466. */
  10467. function shuffle(collection) {
  10468. var func = isArray(collection) ? arrayShuffle : baseShuffle;
  10469. return func(collection);
  10470. }
  10471. /**
  10472. * Gets the size of `collection` by returning its length for array-like
  10473. * values or the number of own enumerable string keyed properties for objects.
  10474. *
  10475. * @static
  10476. * @memberOf _
  10477. * @since 0.1.0
  10478. * @category Collection
  10479. * @param {Array|Object|string} collection The collection to inspect.
  10480. * @returns {number} Returns the collection size.
  10481. * @example
  10482. *
  10483. * _.size([1, 2, 3]);
  10484. * // => 3
  10485. *
  10486. * _.size({ 'a': 1, 'b': 2 });
  10487. * // => 2
  10488. *
  10489. * _.size('pebbles');
  10490. * // => 7
  10491. */
  10492. function size(collection) {
  10493. if (collection == null) {
  10494. return 0;
  10495. }
  10496. if (isArrayLike(collection)) {
  10497. return isString(collection) ? stringSize(collection) : collection.length;
  10498. }
  10499. var tag = getTag(collection);
  10500. if (tag == mapTag || tag == setTag) {
  10501. return collection.size;
  10502. }
  10503. return baseKeys(collection).length;
  10504. }
  10505. /**
  10506. * Checks if `predicate` returns truthy for **any** element of `collection`.
  10507. * Iteration is stopped once `predicate` returns truthy. The predicate is
  10508. * invoked with three arguments: (value, index|key, collection).
  10509. *
  10510. * @static
  10511. * @memberOf _
  10512. * @since 0.1.0
  10513. * @category Collection
  10514. * @param {Array|Object} collection The collection to iterate over.
  10515. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  10516. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  10517. * @returns {boolean} Returns `true` if any element passes the predicate check,
  10518. * else `false`.
  10519. * @example
  10520. *
  10521. * _.some([null, 0, 'yes', false], Boolean);
  10522. * // => true
  10523. *
  10524. * var users = [
  10525. * { 'user': 'barney', 'active': true },
  10526. * { 'user': 'fred', 'active': false }
  10527. * ];
  10528. *
  10529. * // The `_.matches` iteratee shorthand.
  10530. * _.some(users, { 'user': 'barney', 'active': false });
  10531. * // => false
  10532. *
  10533. * // The `_.matchesProperty` iteratee shorthand.
  10534. * _.some(users, ['active', false]);
  10535. * // => true
  10536. *
  10537. * // The `_.property` iteratee shorthand.
  10538. * _.some(users, 'active');
  10539. * // => true
  10540. */
  10541. function some(collection, predicate, guard) {
  10542. var func = isArray(collection) ? arraySome : baseSome;
  10543. if (guard && isIterateeCall(collection, predicate, guard)) {
  10544. predicate = undefined;
  10545. }
  10546. return func(collection, getIteratee(predicate, 3));
  10547. }
  10548. /**
  10549. * Creates an array of elements, sorted in ascending order by the results of
  10550. * running each element in a collection thru each iteratee. This method
  10551. * performs a stable sort, that is, it preserves the original sort order of
  10552. * equal elements. The iteratees are invoked with one argument: (value).
  10553. *
  10554. * @static
  10555. * @memberOf _
  10556. * @since 0.1.0
  10557. * @category Collection
  10558. * @param {Array|Object} collection The collection to iterate over.
  10559. * @param {...(Function|Function[])} [iteratees=[_.identity]]
  10560. * The iteratees to sort by.
  10561. * @returns {Array} Returns the new sorted array.
  10562. * @example
  10563. *
  10564. * var users = [
  10565. * { 'user': 'fred', 'age': 48 },
  10566. * { 'user': 'barney', 'age': 36 },
  10567. * { 'user': 'fred', 'age': 30 },
  10568. * { 'user': 'barney', 'age': 34 }
  10569. * ];
  10570. *
  10571. * _.sortBy(users, [function(o) { return o.user; }]);
  10572. * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]
  10573. *
  10574. * _.sortBy(users, ['user', 'age']);
  10575. * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]
  10576. */
  10577. var sortBy = baseRest(function(collection, iteratees) {
  10578. if (collection == null) {
  10579. return [];
  10580. }
  10581. var length = iteratees.length;
  10582. if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
  10583. iteratees = [];
  10584. } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
  10585. iteratees = [iteratees[0]];
  10586. }
  10587. return baseOrderBy(collection, baseFlatten(iteratees, 1), []);
  10588. });
  10589. /*------------------------------------------------------------------------*/
  10590. /**
  10591. * Gets the timestamp of the number of milliseconds that have elapsed since
  10592. * the Unix epoch (1 January 1970 00:00:00 UTC).
  10593. *
  10594. * @static
  10595. * @memberOf _
  10596. * @since 2.4.0
  10597. * @category Date
  10598. * @returns {number} Returns the timestamp.
  10599. * @example
  10600. *
  10601. * _.defer(function(stamp) {
  10602. * console.log(_.now() - stamp);
  10603. * }, _.now());
  10604. * // => Logs the number of milliseconds it took for the deferred invocation.
  10605. */
  10606. var now = ctxNow || function() {
  10607. return root.Date.now();
  10608. };
  10609. /*------------------------------------------------------------------------*/
  10610. /**
  10611. * The opposite of `_.before`; this method creates a function that invokes
  10612. * `func` once it's called `n` or more times.
  10613. *
  10614. * @static
  10615. * @memberOf _
  10616. * @since 0.1.0
  10617. * @category Function
  10618. * @param {number} n The number of calls before `func` is invoked.
  10619. * @param {Function} func The function to restrict.
  10620. * @returns {Function} Returns the new restricted function.
  10621. * @example
  10622. *
  10623. * var saves = ['profile', 'settings'];
  10624. *
  10625. * var done = _.after(saves.length, function() {
  10626. * console.log('done saving!');
  10627. * });
  10628. *
  10629. * _.forEach(saves, function(type) {
  10630. * asyncSave({ 'type': type, 'complete': done });
  10631. * });
  10632. * // => Logs 'done saving!' after the two async saves have completed.
  10633. */
  10634. function after(n, func) {
  10635. if (typeof func != 'function') {
  10636. throw new TypeError(FUNC_ERROR_TEXT);
  10637. }
  10638. n = toInteger(n);
  10639. return function() {
  10640. if (--n < 1) {
  10641. return func.apply(this, arguments);
  10642. }
  10643. };
  10644. }
  10645. /**
  10646. * Creates a function that invokes `func`, with up to `n` arguments,
  10647. * ignoring any additional arguments.
  10648. *
  10649. * @static
  10650. * @memberOf _
  10651. * @since 3.0.0
  10652. * @category Function
  10653. * @param {Function} func The function to cap arguments for.
  10654. * @param {number} [n=func.length] The arity cap.
  10655. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  10656. * @returns {Function} Returns the new capped function.
  10657. * @example
  10658. *
  10659. * _.map(['6', '8', '10'], _.ary(parseInt, 1));
  10660. * // => [6, 8, 10]
  10661. */
  10662. function ary(func, n, guard) {
  10663. n = guard ? undefined : n;
  10664. n = (func && n == null) ? func.length : n;
  10665. return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);
  10666. }
  10667. /**
  10668. * Creates a function that invokes `func`, with the `this` binding and arguments
  10669. * of the created function, while it's called less than `n` times. Subsequent
  10670. * calls to the created function return the result of the last `func` invocation.
  10671. *
  10672. * @static
  10673. * @memberOf _
  10674. * @since 3.0.0
  10675. * @category Function
  10676. * @param {number} n The number of calls at which `func` is no longer invoked.
  10677. * @param {Function} func The function to restrict.
  10678. * @returns {Function} Returns the new restricted function.
  10679. * @example
  10680. *
  10681. * jQuery(element).on('click', _.before(5, addContactToList));
  10682. * // => Allows adding up to 4 contacts to the list.
  10683. */
  10684. function before(n, func) {
  10685. var result;
  10686. if (typeof func != 'function') {
  10687. throw new TypeError(FUNC_ERROR_TEXT);
  10688. }
  10689. n = toInteger(n);
  10690. return function() {
  10691. if (--n > 0) {
  10692. result = func.apply(this, arguments);
  10693. }
  10694. if (n <= 1) {
  10695. func = undefined;
  10696. }
  10697. return result;
  10698. };
  10699. }
  10700. /**
  10701. * Creates a function that invokes `func` with the `this` binding of `thisArg`
  10702. * and `partials` prepended to the arguments it receives.
  10703. *
  10704. * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
  10705. * may be used as a placeholder for partially applied arguments.
  10706. *
  10707. * **Note:** Unlike native `Function#bind`, this method doesn't set the "length"
  10708. * property of bound functions.
  10709. *
  10710. * @static
  10711. * @memberOf _
  10712. * @since 0.1.0
  10713. * @category Function
  10714. * @param {Function} func The function to bind.
  10715. * @param {*} thisArg The `this` binding of `func`.
  10716. * @param {...*} [partials] The arguments to be partially applied.
  10717. * @returns {Function} Returns the new bound function.
  10718. * @example
  10719. *
  10720. * function greet(greeting, punctuation) {
  10721. * return greeting + ' ' + this.user + punctuation;
  10722. * }
  10723. *
  10724. * var object = { 'user': 'fred' };
  10725. *
  10726. * var bound = _.bind(greet, object, 'hi');
  10727. * bound('!');
  10728. * // => 'hi fred!'
  10729. *
  10730. * // Bound with placeholders.
  10731. * var bound = _.bind(greet, object, _, '!');
  10732. * bound('hi');
  10733. * // => 'hi fred!'
  10734. */
  10735. var bind = baseRest(function(func, thisArg, partials) {
  10736. var bitmask = WRAP_BIND_FLAG;
  10737. if (partials.length) {
  10738. var holders = replaceHolders(partials, getHolder(bind));
  10739. bitmask |= WRAP_PARTIAL_FLAG;
  10740. }
  10741. return createWrap(func, bitmask, thisArg, partials, holders);
  10742. });
  10743. /**
  10744. * Creates a function that invokes the method at `object[key]` with `partials`
  10745. * prepended to the arguments it receives.
  10746. *
  10747. * This method differs from `_.bind` by allowing bound functions to reference
  10748. * methods that may be redefined or don't yet exist. See
  10749. * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)
  10750. * for more details.
  10751. *
  10752. * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic
  10753. * builds, may be used as a placeholder for partially applied arguments.
  10754. *
  10755. * @static
  10756. * @memberOf _
  10757. * @since 0.10.0
  10758. * @category Function
  10759. * @param {Object} object The object to invoke the method on.
  10760. * @param {string} key The key of the method.
  10761. * @param {...*} [partials] The arguments to be partially applied.
  10762. * @returns {Function} Returns the new bound function.
  10763. * @example
  10764. *
  10765. * var object = {
  10766. * 'user': 'fred',
  10767. * 'greet': function(greeting, punctuation) {
  10768. * return greeting + ' ' + this.user + punctuation;
  10769. * }
  10770. * };
  10771. *
  10772. * var bound = _.bindKey(object, 'greet', 'hi');
  10773. * bound('!');
  10774. * // => 'hi fred!'
  10775. *
  10776. * object.greet = function(greeting, punctuation) {
  10777. * return greeting + 'ya ' + this.user + punctuation;
  10778. * };
  10779. *
  10780. * bound('!');
  10781. * // => 'hiya fred!'
  10782. *
  10783. * // Bound with placeholders.
  10784. * var bound = _.bindKey(object, 'greet', _, '!');
  10785. * bound('hi');
  10786. * // => 'hiya fred!'
  10787. */
  10788. var bindKey = baseRest(function(object, key, partials) {
  10789. var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;
  10790. if (partials.length) {
  10791. var holders = replaceHolders(partials, getHolder(bindKey));
  10792. bitmask |= WRAP_PARTIAL_FLAG;
  10793. }
  10794. return createWrap(key, bitmask, object, partials, holders);
  10795. });
  10796. /**
  10797. * Creates a function that accepts arguments of `func` and either invokes
  10798. * `func` returning its result, if at least `arity` number of arguments have
  10799. * been provided, or returns a function that accepts the remaining `func`
  10800. * arguments, and so on. The arity of `func` may be specified if `func.length`
  10801. * is not sufficient.
  10802. *
  10803. * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,
  10804. * may be used as a placeholder for provided arguments.
  10805. *
  10806. * **Note:** This method doesn't set the "length" property of curried functions.
  10807. *
  10808. * @static
  10809. * @memberOf _
  10810. * @since 2.0.0
  10811. * @category Function
  10812. * @param {Function} func The function to curry.
  10813. * @param {number} [arity=func.length] The arity of `func`.
  10814. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  10815. * @returns {Function} Returns the new curried function.
  10816. * @example
  10817. *
  10818. * var abc = function(a, b, c) {
  10819. * return [a, b, c];
  10820. * };
  10821. *
  10822. * var curried = _.curry(abc);
  10823. *
  10824. * curried(1)(2)(3);
  10825. * // => [1, 2, 3]
  10826. *
  10827. * curried(1, 2)(3);
  10828. * // => [1, 2, 3]
  10829. *
  10830. * curried(1, 2, 3);
  10831. * // => [1, 2, 3]
  10832. *
  10833. * // Curried with placeholders.
  10834. * curried(1)(_, 3)(2);
  10835. * // => [1, 2, 3]
  10836. */
  10837. function curry(func, arity, guard) {
  10838. arity = guard ? undefined : arity;
  10839. var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
  10840. result.placeholder = curry.placeholder;
  10841. return result;
  10842. }
  10843. /**
  10844. * This method is like `_.curry` except that arguments are applied to `func`
  10845. * in the manner of `_.partialRight` instead of `_.partial`.
  10846. *
  10847. * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic
  10848. * builds, may be used as a placeholder for provided arguments.
  10849. *
  10850. * **Note:** This method doesn't set the "length" property of curried functions.
  10851. *
  10852. * @static
  10853. * @memberOf _
  10854. * @since 3.0.0
  10855. * @category Function
  10856. * @param {Function} func The function to curry.
  10857. * @param {number} [arity=func.length] The arity of `func`.
  10858. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  10859. * @returns {Function} Returns the new curried function.
  10860. * @example
  10861. *
  10862. * var abc = function(a, b, c) {
  10863. * return [a, b, c];
  10864. * };
  10865. *
  10866. * var curried = _.curryRight(abc);
  10867. *
  10868. * curried(3)(2)(1);
  10869. * // => [1, 2, 3]
  10870. *
  10871. * curried(2, 3)(1);
  10872. * // => [1, 2, 3]
  10873. *
  10874. * curried(1, 2, 3);
  10875. * // => [1, 2, 3]
  10876. *
  10877. * // Curried with placeholders.
  10878. * curried(3)(1, _)(2);
  10879. * // => [1, 2, 3]
  10880. */
  10881. function curryRight(func, arity, guard) {
  10882. arity = guard ? undefined : arity;
  10883. var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
  10884. result.placeholder = curryRight.placeholder;
  10885. return result;
  10886. }
  10887. /**
  10888. * Creates a debounced function that delays invoking `func` until after `wait`
  10889. * milliseconds have elapsed since the last time the debounced function was
  10890. * invoked. The debounced function comes with a `cancel` method to cancel
  10891. * delayed `func` invocations and a `flush` method to immediately invoke them.
  10892. * Provide `options` to indicate whether `func` should be invoked on the
  10893. * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
  10894. * with the last arguments provided to the debounced function. Subsequent
  10895. * calls to the debounced function return the result of the last `func`
  10896. * invocation.
  10897. *
  10898. * **Note:** If `leading` and `trailing` options are `true`, `func` is
  10899. * invoked on the trailing edge of the timeout only if the debounced function
  10900. * is invoked more than once during the `wait` timeout.
  10901. *
  10902. * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
  10903. * until to the next tick, similar to `setTimeout` with a timeout of `0`.
  10904. *
  10905. * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
  10906. * for details over the differences between `_.debounce` and `_.throttle`.
  10907. *
  10908. * @static
  10909. * @memberOf _
  10910. * @since 0.1.0
  10911. * @category Function
  10912. * @param {Function} func The function to debounce.
  10913. * @param {number} [wait=0] The number of milliseconds to delay.
  10914. * @param {Object} [options={}] The options object.
  10915. * @param {boolean} [options.leading=false]
  10916. * Specify invoking on the leading edge of the timeout.
  10917. * @param {number} [options.maxWait]
  10918. * The maximum time `func` is allowed to be delayed before it's invoked.
  10919. * @param {boolean} [options.trailing=true]
  10920. * Specify invoking on the trailing edge of the timeout.
  10921. * @returns {Function} Returns the new debounced function.
  10922. * @example
  10923. *
  10924. * // Avoid costly calculations while the window size is in flux.
  10925. * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
  10926. *
  10927. * // Invoke `sendMail` when clicked, debouncing subsequent calls.
  10928. * jQuery(element).on('click', _.debounce(sendMail, 300, {
  10929. * 'leading': true,
  10930. * 'trailing': false
  10931. * }));
  10932. *
  10933. * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
  10934. * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
  10935. * var source = new EventSource('/stream');
  10936. * jQuery(source).on('message', debounced);
  10937. *
  10938. * // Cancel the trailing debounced invocation.
  10939. * jQuery(window).on('popstate', debounced.cancel);
  10940. */
  10941. function debounce(func, wait, options) {
  10942. var lastArgs,
  10943. lastThis,
  10944. maxWait,
  10945. result,
  10946. timerId,
  10947. lastCallTime,
  10948. lastInvokeTime = 0,
  10949. leading = false,
  10950. maxing = false,
  10951. trailing = true;
  10952. if (typeof func != 'function') {
  10953. throw new TypeError(FUNC_ERROR_TEXT);
  10954. }
  10955. wait = toNumber(wait) || 0;
  10956. if (isObject(options)) {
  10957. leading = !!options.leading;
  10958. maxing = 'maxWait' in options;
  10959. maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
  10960. trailing = 'trailing' in options ? !!options.trailing : trailing;
  10961. }
  10962. function invokeFunc(time) {
  10963. var args = lastArgs,
  10964. thisArg = lastThis;
  10965. lastArgs = lastThis = undefined;
  10966. lastInvokeTime = time;
  10967. result = func.apply(thisArg, args);
  10968. return result;
  10969. }
  10970. function leadingEdge(time) {
  10971. // Reset any `maxWait` timer.
  10972. lastInvokeTime = time;
  10973. // Start the timer for the trailing edge.
  10974. timerId = setTimeout(timerExpired, wait);
  10975. // Invoke the leading edge.
  10976. return leading ? invokeFunc(time) : result;
  10977. }
  10978. function remainingWait(time) {
  10979. var timeSinceLastCall = time - lastCallTime,
  10980. timeSinceLastInvoke = time - lastInvokeTime,
  10981. timeWaiting = wait - timeSinceLastCall;
  10982. return maxing
  10983. ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
  10984. : timeWaiting;
  10985. }
  10986. function shouldInvoke(time) {
  10987. var timeSinceLastCall = time - lastCallTime,
  10988. timeSinceLastInvoke = time - lastInvokeTime;
  10989. // Either this is the first call, activity has stopped and we're at the
  10990. // trailing edge, the system time has gone backwards and we're treating
  10991. // it as the trailing edge, or we've hit the `maxWait` limit.
  10992. return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
  10993. (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
  10994. }
  10995. function timerExpired() {
  10996. var time = now();
  10997. if (shouldInvoke(time)) {
  10998. return trailingEdge(time);
  10999. }
  11000. // Restart the timer.
  11001. timerId = setTimeout(timerExpired, remainingWait(time));
  11002. }
  11003. function trailingEdge(time) {
  11004. timerId = undefined;
  11005. // Only invoke if we have `lastArgs` which means `func` has been
  11006. // debounced at least once.
  11007. if (trailing && lastArgs) {
  11008. return invokeFunc(time);
  11009. }
  11010. lastArgs = lastThis = undefined;
  11011. return result;
  11012. }
  11013. function cancel() {
  11014. if (timerId !== undefined) {
  11015. clearTimeout(timerId);
  11016. }
  11017. lastInvokeTime = 0;
  11018. lastArgs = lastCallTime = lastThis = timerId = undefined;
  11019. }
  11020. function flush() {
  11021. return timerId === undefined ? result : trailingEdge(now());
  11022. }
  11023. function debounced() {
  11024. var time = now(),
  11025. isInvoking = shouldInvoke(time);
  11026. lastArgs = arguments;
  11027. lastThis = this;
  11028. lastCallTime = time;
  11029. if (isInvoking) {
  11030. if (timerId === undefined) {
  11031. return leadingEdge(lastCallTime);
  11032. }
  11033. if (maxing) {
  11034. // Handle invocations in a tight loop.
  11035. clearTimeout(timerId);
  11036. timerId = setTimeout(timerExpired, wait);
  11037. return invokeFunc(lastCallTime);
  11038. }
  11039. }
  11040. if (timerId === undefined) {
  11041. timerId = setTimeout(timerExpired, wait);
  11042. }
  11043. return result;
  11044. }
  11045. debounced.cancel = cancel;
  11046. debounced.flush = flush;
  11047. return debounced;
  11048. }
  11049. /**
  11050. * Defers invoking the `func` until the current call stack has cleared. Any
  11051. * additional arguments are provided to `func` when it's invoked.
  11052. *
  11053. * @static
  11054. * @memberOf _
  11055. * @since 0.1.0
  11056. * @category Function
  11057. * @param {Function} func The function to defer.
  11058. * @param {...*} [args] The arguments to invoke `func` with.
  11059. * @returns {number} Returns the timer id.
  11060. * @example
  11061. *
  11062. * _.defer(function(text) {
  11063. * console.log(text);
  11064. * }, 'deferred');
  11065. * // => Logs 'deferred' after one millisecond.
  11066. */
  11067. var defer = baseRest(function(func, args) {
  11068. return baseDelay(func, 1, args);
  11069. });
  11070. /**
  11071. * Invokes `func` after `wait` milliseconds. Any additional arguments are
  11072. * provided to `func` when it's invoked.
  11073. *
  11074. * @static
  11075. * @memberOf _
  11076. * @since 0.1.0
  11077. * @category Function
  11078. * @param {Function} func The function to delay.
  11079. * @param {number} wait The number of milliseconds to delay invocation.
  11080. * @param {...*} [args] The arguments to invoke `func` with.
  11081. * @returns {number} Returns the timer id.
  11082. * @example
  11083. *
  11084. * _.delay(function(text) {
  11085. * console.log(text);
  11086. * }, 1000, 'later');
  11087. * // => Logs 'later' after one second.
  11088. */
  11089. var delay = baseRest(function(func, wait, args) {
  11090. return baseDelay(func, toNumber(wait) || 0, args);
  11091. });
  11092. /**
  11093. * Creates a function that invokes `func` with arguments reversed.
  11094. *
  11095. * @static
  11096. * @memberOf _
  11097. * @since 4.0.0
  11098. * @category Function
  11099. * @param {Function} func The function to flip arguments for.
  11100. * @returns {Function} Returns the new flipped function.
  11101. * @example
  11102. *
  11103. * var flipped = _.flip(function() {
  11104. * return _.toArray(arguments);
  11105. * });
  11106. *
  11107. * flipped('a', 'b', 'c', 'd');
  11108. * // => ['d', 'c', 'b', 'a']
  11109. */
  11110. function flip(func) {
  11111. return createWrap(func, WRAP_FLIP_FLAG);
  11112. }
  11113. /**
  11114. * Creates a function that memoizes the result of `func`. If `resolver` is
  11115. * provided, it determines the cache key for storing the result based on the
  11116. * arguments provided to the memoized function. By default, the first argument
  11117. * provided to the memoized function is used as the map cache key. The `func`
  11118. * is invoked with the `this` binding of the memoized function.
  11119. *
  11120. * **Note:** The cache is exposed as the `cache` property on the memoized
  11121. * function. Its creation may be customized by replacing the `_.memoize.Cache`
  11122. * constructor with one whose instances implement the
  11123. * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
  11124. * method interface of `clear`, `delete`, `get`, `has`, and `set`.
  11125. *
  11126. * @static
  11127. * @memberOf _
  11128. * @since 0.1.0
  11129. * @category Function
  11130. * @param {Function} func The function to have its output memoized.
  11131. * @param {Function} [resolver] The function to resolve the cache key.
  11132. * @returns {Function} Returns the new memoized function.
  11133. * @example
  11134. *
  11135. * var object = { 'a': 1, 'b': 2 };
  11136. * var other = { 'c': 3, 'd': 4 };
  11137. *
  11138. * var values = _.memoize(_.values);
  11139. * values(object);
  11140. * // => [1, 2]
  11141. *
  11142. * values(other);
  11143. * // => [3, 4]
  11144. *
  11145. * object.a = 2;
  11146. * values(object);
  11147. * // => [1, 2]
  11148. *
  11149. * // Modify the result cache.
  11150. * values.cache.set(object, ['a', 'b']);
  11151. * values(object);
  11152. * // => ['a', 'b']
  11153. *
  11154. * // Replace `_.memoize.Cache`.
  11155. * _.memoize.Cache = WeakMap;
  11156. */
  11157. function memoize(func, resolver) {
  11158. if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
  11159. throw new TypeError(FUNC_ERROR_TEXT);
  11160. }
  11161. var memoized = function() {
  11162. var args = arguments,
  11163. key = resolver ? resolver.apply(this, args) : args[0],
  11164. cache = memoized.cache;
  11165. if (cache.has(key)) {
  11166. return cache.get(key);
  11167. }
  11168. var result = func.apply(this, args);
  11169. memoized.cache = cache.set(key, result) || cache;
  11170. return result;
  11171. };
  11172. memoized.cache = new (memoize.Cache || MapCache);
  11173. return memoized;
  11174. }
  11175. // Expose `MapCache`.
  11176. memoize.Cache = MapCache;
  11177. /**
  11178. * Creates a function that negates the result of the predicate `func`. The
  11179. * `func` predicate is invoked with the `this` binding and arguments of the
  11180. * created function.
  11181. *
  11182. * @static
  11183. * @memberOf _
  11184. * @since 3.0.0
  11185. * @category Function
  11186. * @param {Function} predicate The predicate to negate.
  11187. * @returns {Function} Returns the new negated function.
  11188. * @example
  11189. *
  11190. * function isEven(n) {
  11191. * return n % 2 == 0;
  11192. * }
  11193. *
  11194. * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));
  11195. * // => [1, 3, 5]
  11196. */
  11197. function negate(predicate) {
  11198. if (typeof predicate != 'function') {
  11199. throw new TypeError(FUNC_ERROR_TEXT);
  11200. }
  11201. return function() {
  11202. var args = arguments;
  11203. switch (args.length) {
  11204. case 0: return !predicate.call(this);
  11205. case 1: return !predicate.call(this, args[0]);
  11206. case 2: return !predicate.call(this, args[0], args[1]);
  11207. case 3: return !predicate.call(this, args[0], args[1], args[2]);
  11208. }
  11209. return !predicate.apply(this, args);
  11210. };
  11211. }
  11212. /**
  11213. * Creates a function that is restricted to invoking `func` once. Repeat calls
  11214. * to the function return the value of the first invocation. The `func` is
  11215. * invoked with the `this` binding and arguments of the created function.
  11216. *
  11217. * @static
  11218. * @memberOf _
  11219. * @since 0.1.0
  11220. * @category Function
  11221. * @param {Function} func The function to restrict.
  11222. * @returns {Function} Returns the new restricted function.
  11223. * @example
  11224. *
  11225. * var initialize = _.once(createApplication);
  11226. * initialize();
  11227. * initialize();
  11228. * // => `createApplication` is invoked once
  11229. */
  11230. function once(func) {
  11231. return before(2, func);
  11232. }
  11233. /**
  11234. * Creates a function that invokes `func` with its arguments transformed.
  11235. *
  11236. * @static
  11237. * @since 4.0.0
  11238. * @memberOf _
  11239. * @category Function
  11240. * @param {Function} func The function to wrap.
  11241. * @param {...(Function|Function[])} [transforms=[_.identity]]
  11242. * The argument transforms.
  11243. * @returns {Function} Returns the new function.
  11244. * @example
  11245. *
  11246. * function doubled(n) {
  11247. * return n * 2;
  11248. * }
  11249. *
  11250. * function square(n) {
  11251. * return n * n;
  11252. * }
  11253. *
  11254. * var func = _.overArgs(function(x, y) {
  11255. * return [x, y];
  11256. * }, [square, doubled]);
  11257. *
  11258. * func(9, 3);
  11259. * // => [81, 6]
  11260. *
  11261. * func(10, 5);
  11262. * // => [100, 10]
  11263. */
  11264. var overArgs = castRest(function(func, transforms) {
  11265. transforms = (transforms.length == 1 && isArray(transforms[0]))
  11266. ? arrayMap(transforms[0], baseUnary(getIteratee()))
  11267. : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));
  11268. var funcsLength = transforms.length;
  11269. return baseRest(function(args) {
  11270. var index = -1,
  11271. length = nativeMin(args.length, funcsLength);
  11272. while (++index < length) {
  11273. args[index] = transforms[index].call(this, args[index]);
  11274. }
  11275. return apply(func, this, args);
  11276. });
  11277. });
  11278. /**
  11279. * Creates a function that invokes `func` with `partials` prepended to the
  11280. * arguments it receives. This method is like `_.bind` except it does **not**
  11281. * alter the `this` binding.
  11282. *
  11283. * The `_.partial.placeholder` value, which defaults to `_` in monolithic
  11284. * builds, may be used as a placeholder for partially applied arguments.
  11285. *
  11286. * **Note:** This method doesn't set the "length" property of partially
  11287. * applied functions.
  11288. *
  11289. * @static
  11290. * @memberOf _
  11291. * @since 0.2.0
  11292. * @category Function
  11293. * @param {Function} func The function to partially apply arguments to.
  11294. * @param {...*} [partials] The arguments to be partially applied.
  11295. * @returns {Function} Returns the new partially applied function.
  11296. * @example
  11297. *
  11298. * function greet(greeting, name) {
  11299. * return greeting + ' ' + name;
  11300. * }
  11301. *
  11302. * var sayHelloTo = _.partial(greet, 'hello');
  11303. * sayHelloTo('fred');
  11304. * // => 'hello fred'
  11305. *
  11306. * // Partially applied with placeholders.
  11307. * var greetFred = _.partial(greet, _, 'fred');
  11308. * greetFred('hi');
  11309. * // => 'hi fred'
  11310. */
  11311. var partial = baseRest(function(func, partials) {
  11312. var holders = replaceHolders(partials, getHolder(partial));
  11313. return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);
  11314. });
  11315. /**
  11316. * This method is like `_.partial` except that partially applied arguments
  11317. * are appended to the arguments it receives.
  11318. *
  11319. * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic
  11320. * builds, may be used as a placeholder for partially applied arguments.
  11321. *
  11322. * **Note:** This method doesn't set the "length" property of partially
  11323. * applied functions.
  11324. *
  11325. * @static
  11326. * @memberOf _
  11327. * @since 1.0.0
  11328. * @category Function
  11329. * @param {Function} func The function to partially apply arguments to.
  11330. * @param {...*} [partials] The arguments to be partially applied.
  11331. * @returns {Function} Returns the new partially applied function.
  11332. * @example
  11333. *
  11334. * function greet(greeting, name) {
  11335. * return greeting + ' ' + name;
  11336. * }
  11337. *
  11338. * var greetFred = _.partialRight(greet, 'fred');
  11339. * greetFred('hi');
  11340. * // => 'hi fred'
  11341. *
  11342. * // Partially applied with placeholders.
  11343. * var sayHelloTo = _.partialRight(greet, 'hello', _);
  11344. * sayHelloTo('fred');
  11345. * // => 'hello fred'
  11346. */
  11347. var partialRight = baseRest(function(func, partials) {
  11348. var holders = replaceHolders(partials, getHolder(partialRight));
  11349. return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);
  11350. });
  11351. /**
  11352. * Creates a function that invokes `func` with arguments arranged according
  11353. * to the specified `indexes` where the argument value at the first index is
  11354. * provided as the first argument, the argument value at the second index is
  11355. * provided as the second argument, and so on.
  11356. *
  11357. * @static
  11358. * @memberOf _
  11359. * @since 3.0.0
  11360. * @category Function
  11361. * @param {Function} func The function to rearrange arguments for.
  11362. * @param {...(number|number[])} indexes The arranged argument indexes.
  11363. * @returns {Function} Returns the new function.
  11364. * @example
  11365. *
  11366. * var rearged = _.rearg(function(a, b, c) {
  11367. * return [a, b, c];
  11368. * }, [2, 0, 1]);
  11369. *
  11370. * rearged('b', 'c', 'a')
  11371. * // => ['a', 'b', 'c']
  11372. */
  11373. var rearg = flatRest(function(func, indexes) {
  11374. return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);
  11375. });
  11376. /**
  11377. * Creates a function that invokes `func` with the `this` binding of the
  11378. * created function and arguments from `start` and beyond provided as
  11379. * an array.
  11380. *
  11381. * **Note:** This method is based on the
  11382. * [rest parameter](https://mdn.io/rest_parameters).
  11383. *
  11384. * @static
  11385. * @memberOf _
  11386. * @since 4.0.0
  11387. * @category Function
  11388. * @param {Function} func The function to apply a rest parameter to.
  11389. * @param {number} [start=func.length-1] The start position of the rest parameter.
  11390. * @returns {Function} Returns the new function.
  11391. * @example
  11392. *
  11393. * var say = _.rest(function(what, names) {
  11394. * return what + ' ' + _.initial(names).join(', ') +
  11395. * (_.size(names) > 1 ? ', & ' : '') + _.last(names);
  11396. * });
  11397. *
  11398. * say('hello', 'fred', 'barney', 'pebbles');
  11399. * // => 'hello fred, barney, & pebbles'
  11400. */
  11401. function rest(func, start) {
  11402. if (typeof func != 'function') {
  11403. throw new TypeError(FUNC_ERROR_TEXT);
  11404. }
  11405. start = start === undefined ? start : toInteger(start);
  11406. return baseRest(func, start);
  11407. }
  11408. /**
  11409. * Creates a function that invokes `func` with the `this` binding of the
  11410. * create function and an array of arguments much like
  11411. * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).
  11412. *
  11413. * **Note:** This method is based on the
  11414. * [spread operator](https://mdn.io/spread_operator).
  11415. *
  11416. * @static
  11417. * @memberOf _
  11418. * @since 3.2.0
  11419. * @category Function
  11420. * @param {Function} func The function to spread arguments over.
  11421. * @param {number} [start=0] The start position of the spread.
  11422. * @returns {Function} Returns the new function.
  11423. * @example
  11424. *
  11425. * var say = _.spread(function(who, what) {
  11426. * return who + ' says ' + what;
  11427. * });
  11428. *
  11429. * say(['fred', 'hello']);
  11430. * // => 'fred says hello'
  11431. *
  11432. * var numbers = Promise.all([
  11433. * Promise.resolve(40),
  11434. * Promise.resolve(36)
  11435. * ]);
  11436. *
  11437. * numbers.then(_.spread(function(x, y) {
  11438. * return x + y;
  11439. * }));
  11440. * // => a Promise of 76
  11441. */
  11442. function spread(func, start) {
  11443. if (typeof func != 'function') {
  11444. throw new TypeError(FUNC_ERROR_TEXT);
  11445. }
  11446. start = start == null ? 0 : nativeMax(toInteger(start), 0);
  11447. return baseRest(function(args) {
  11448. var array = args[start],
  11449. otherArgs = castSlice(args, 0, start);
  11450. if (array) {
  11451. arrayPush(otherArgs, array);
  11452. }
  11453. return apply(func, this, otherArgs);
  11454. });
  11455. }
  11456. /**
  11457. * Creates a throttled function that only invokes `func` at most once per
  11458. * every `wait` milliseconds. The throttled function comes with a `cancel`
  11459. * method to cancel delayed `func` invocations and a `flush` method to
  11460. * immediately invoke them. Provide `options` to indicate whether `func`
  11461. * should be invoked on the leading and/or trailing edge of the `wait`
  11462. * timeout. The `func` is invoked with the last arguments provided to the
  11463. * throttled function. Subsequent calls to the throttled function return the
  11464. * result of the last `func` invocation.
  11465. *
  11466. * **Note:** If `leading` and `trailing` options are `true`, `func` is
  11467. * invoked on the trailing edge of the timeout only if the throttled function
  11468. * is invoked more than once during the `wait` timeout.
  11469. *
  11470. * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
  11471. * until to the next tick, similar to `setTimeout` with a timeout of `0`.
  11472. *
  11473. * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
  11474. * for details over the differences between `_.throttle` and `_.debounce`.
  11475. *
  11476. * @static
  11477. * @memberOf _
  11478. * @since 0.1.0
  11479. * @category Function
  11480. * @param {Function} func The function to throttle.
  11481. * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
  11482. * @param {Object} [options={}] The options object.
  11483. * @param {boolean} [options.leading=true]
  11484. * Specify invoking on the leading edge of the timeout.
  11485. * @param {boolean} [options.trailing=true]
  11486. * Specify invoking on the trailing edge of the timeout.
  11487. * @returns {Function} Returns the new throttled function.
  11488. * @example
  11489. *
  11490. * // Avoid excessively updating the position while scrolling.
  11491. * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
  11492. *
  11493. * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
  11494. * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
  11495. * jQuery(element).on('click', throttled);
  11496. *
  11497. * // Cancel the trailing throttled invocation.
  11498. * jQuery(window).on('popstate', throttled.cancel);
  11499. */
  11500. function throttle(func, wait, options) {
  11501. var leading = true,
  11502. trailing = true;
  11503. if (typeof func != 'function') {
  11504. throw new TypeError(FUNC_ERROR_TEXT);
  11505. }
  11506. if (isObject(options)) {
  11507. leading = 'leading' in options ? !!options.leading : leading;
  11508. trailing = 'trailing' in options ? !!options.trailing : trailing;
  11509. }
  11510. return debounce(func, wait, {
  11511. 'leading': leading,
  11512. 'maxWait': wait,
  11513. 'trailing': trailing
  11514. });
  11515. }
  11516. /**
  11517. * Creates a function that accepts up to one argument, ignoring any
  11518. * additional arguments.
  11519. *
  11520. * @static
  11521. * @memberOf _
  11522. * @since 4.0.0
  11523. * @category Function
  11524. * @param {Function} func The function to cap arguments for.
  11525. * @returns {Function} Returns the new capped function.
  11526. * @example
  11527. *
  11528. * _.map(['6', '8', '10'], _.unary(parseInt));
  11529. * // => [6, 8, 10]
  11530. */
  11531. function unary(func) {
  11532. return ary(func, 1);
  11533. }
  11534. /**
  11535. * Creates a function that provides `value` to `wrapper` as its first
  11536. * argument. Any additional arguments provided to the function are appended
  11537. * to those provided to the `wrapper`. The wrapper is invoked with the `this`
  11538. * binding of the created function.
  11539. *
  11540. * @static
  11541. * @memberOf _
  11542. * @since 0.1.0
  11543. * @category Function
  11544. * @param {*} value The value to wrap.
  11545. * @param {Function} [wrapper=identity] The wrapper function.
  11546. * @returns {Function} Returns the new function.
  11547. * @example
  11548. *
  11549. * var p = _.wrap(_.escape, function(func, text) {
  11550. * return '<p>' + func(text) + '</p>';
  11551. * });
  11552. *
  11553. * p('fred, barney, & pebbles');
  11554. * // => '<p>fred, barney, &amp; pebbles</p>'
  11555. */
  11556. function wrap(value, wrapper) {
  11557. return partial(castFunction(wrapper), value);
  11558. }
  11559. /*------------------------------------------------------------------------*/
  11560. /**
  11561. * Casts `value` as an array if it's not one.
  11562. *
  11563. * @static
  11564. * @memberOf _
  11565. * @since 4.4.0
  11566. * @category Lang
  11567. * @param {*} value The value to inspect.
  11568. * @returns {Array} Returns the cast array.
  11569. * @example
  11570. *
  11571. * _.castArray(1);
  11572. * // => [1]
  11573. *
  11574. * _.castArray({ 'a': 1 });
  11575. * // => [{ 'a': 1 }]
  11576. *
  11577. * _.castArray('abc');
  11578. * // => ['abc']
  11579. *
  11580. * _.castArray(null);
  11581. * // => [null]
  11582. *
  11583. * _.castArray(undefined);
  11584. * // => [undefined]
  11585. *
  11586. * _.castArray();
  11587. * // => []
  11588. *
  11589. * var array = [1, 2, 3];
  11590. * console.log(_.castArray(array) === array);
  11591. * // => true
  11592. */
  11593. function castArray() {
  11594. if (!arguments.length) {
  11595. return [];
  11596. }
  11597. var value = arguments[0];
  11598. return isArray(value) ? value : [value];
  11599. }
  11600. /**
  11601. * Creates a shallow clone of `value`.
  11602. *
  11603. * **Note:** This method is loosely based on the
  11604. * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)
  11605. * and supports cloning arrays, array buffers, booleans, date objects, maps,
  11606. * numbers, `Object` objects, regexes, sets, strings, symbols, and typed
  11607. * arrays. The own enumerable properties of `arguments` objects are cloned
  11608. * as plain objects. An empty object is returned for uncloneable values such
  11609. * as error objects, functions, DOM nodes, and WeakMaps.
  11610. *
  11611. * @static
  11612. * @memberOf _
  11613. * @since 0.1.0
  11614. * @category Lang
  11615. * @param {*} value The value to clone.
  11616. * @returns {*} Returns the cloned value.
  11617. * @see _.cloneDeep
  11618. * @example
  11619. *
  11620. * var objects = [{ 'a': 1 }, { 'b': 2 }];
  11621. *
  11622. * var shallow = _.clone(objects);
  11623. * console.log(shallow[0] === objects[0]);
  11624. * // => true
  11625. */
  11626. function clone(value) {
  11627. return baseClone(value, CLONE_SYMBOLS_FLAG);
  11628. }
  11629. /**
  11630. * This method is like `_.clone` except that it accepts `customizer` which
  11631. * is invoked to produce the cloned value. If `customizer` returns `undefined`,
  11632. * cloning is handled by the method instead. The `customizer` is invoked with
  11633. * up to four arguments; (value [, index|key, object, stack]).
  11634. *
  11635. * @static
  11636. * @memberOf _
  11637. * @since 4.0.0
  11638. * @category Lang
  11639. * @param {*} value The value to clone.
  11640. * @param {Function} [customizer] The function to customize cloning.
  11641. * @returns {*} Returns the cloned value.
  11642. * @see _.cloneDeepWith
  11643. * @example
  11644. *
  11645. * function customizer(value) {
  11646. * if (_.isElement(value)) {
  11647. * return value.cloneNode(false);
  11648. * }
  11649. * }
  11650. *
  11651. * var el = _.cloneWith(document.body, customizer);
  11652. *
  11653. * console.log(el === document.body);
  11654. * // => false
  11655. * console.log(el.nodeName);
  11656. * // => 'BODY'
  11657. * console.log(el.childNodes.length);
  11658. * // => 0
  11659. */
  11660. function cloneWith(value, customizer) {
  11661. customizer = typeof customizer == 'function' ? customizer : undefined;
  11662. return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);
  11663. }
  11664. /**
  11665. * This method is like `_.clone` except that it recursively clones `value`.
  11666. *
  11667. * @static
  11668. * @memberOf _
  11669. * @since 1.0.0
  11670. * @category Lang
  11671. * @param {*} value The value to recursively clone.
  11672. * @returns {*} Returns the deep cloned value.
  11673. * @see _.clone
  11674. * @example
  11675. *
  11676. * var objects = [{ 'a': 1 }, { 'b': 2 }];
  11677. *
  11678. * var deep = _.cloneDeep(objects);
  11679. * console.log(deep[0] === objects[0]);
  11680. * // => false
  11681. */
  11682. function cloneDeep(value) {
  11683. return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
  11684. }
  11685. /**
  11686. * This method is like `_.cloneWith` except that it recursively clones `value`.
  11687. *
  11688. * @static
  11689. * @memberOf _
  11690. * @since 4.0.0
  11691. * @category Lang
  11692. * @param {*} value The value to recursively clone.
  11693. * @param {Function} [customizer] The function to customize cloning.
  11694. * @returns {*} Returns the deep cloned value.
  11695. * @see _.cloneWith
  11696. * @example
  11697. *
  11698. * function customizer(value) {
  11699. * if (_.isElement(value)) {
  11700. * return value.cloneNode(true);
  11701. * }
  11702. * }
  11703. *
  11704. * var el = _.cloneDeepWith(document.body, customizer);
  11705. *
  11706. * console.log(el === document.body);
  11707. * // => false
  11708. * console.log(el.nodeName);
  11709. * // => 'BODY'
  11710. * console.log(el.childNodes.length);
  11711. * // => 20
  11712. */
  11713. function cloneDeepWith(value, customizer) {
  11714. customizer = typeof customizer == 'function' ? customizer : undefined;
  11715. return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);
  11716. }
  11717. /**
  11718. * Checks if `object` conforms to `source` by invoking the predicate
  11719. * properties of `source` with the corresponding property values of `object`.
  11720. *
  11721. * **Note:** This method is equivalent to `_.conforms` when `source` is
  11722. * partially applied.
  11723. *
  11724. * @static
  11725. * @memberOf _
  11726. * @since 4.14.0
  11727. * @category Lang
  11728. * @param {Object} object The object to inspect.
  11729. * @param {Object} source The object of property predicates to conform to.
  11730. * @returns {boolean} Returns `true` if `object` conforms, else `false`.
  11731. * @example
  11732. *
  11733. * var object = { 'a': 1, 'b': 2 };
  11734. *
  11735. * _.conformsTo(object, { 'b': function(n) { return n > 1; } });
  11736. * // => true
  11737. *
  11738. * _.conformsTo(object, { 'b': function(n) { return n > 2; } });
  11739. * // => false
  11740. */
  11741. function conformsTo(object, source) {
  11742. return source == null || baseConformsTo(object, source, keys(source));
  11743. }
  11744. /**
  11745. * Performs a
  11746. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  11747. * comparison between two values to determine if they are equivalent.
  11748. *
  11749. * @static
  11750. * @memberOf _
  11751. * @since 4.0.0
  11752. * @category Lang
  11753. * @param {*} value The value to compare.
  11754. * @param {*} other The other value to compare.
  11755. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  11756. * @example
  11757. *
  11758. * var object = { 'a': 1 };
  11759. * var other = { 'a': 1 };
  11760. *
  11761. * _.eq(object, object);
  11762. * // => true
  11763. *
  11764. * _.eq(object, other);
  11765. * // => false
  11766. *
  11767. * _.eq('a', 'a');
  11768. * // => true
  11769. *
  11770. * _.eq('a', Object('a'));
  11771. * // => false
  11772. *
  11773. * _.eq(NaN, NaN);
  11774. * // => true
  11775. */
  11776. function eq(value, other) {
  11777. return value === other || (value !== value && other !== other);
  11778. }
  11779. /**
  11780. * Checks if `value` is greater than `other`.
  11781. *
  11782. * @static
  11783. * @memberOf _
  11784. * @since 3.9.0
  11785. * @category Lang
  11786. * @param {*} value The value to compare.
  11787. * @param {*} other The other value to compare.
  11788. * @returns {boolean} Returns `true` if `value` is greater than `other`,
  11789. * else `false`.
  11790. * @see _.lt
  11791. * @example
  11792. *
  11793. * _.gt(3, 1);
  11794. * // => true
  11795. *
  11796. * _.gt(3, 3);
  11797. * // => false
  11798. *
  11799. * _.gt(1, 3);
  11800. * // => false
  11801. */
  11802. var gt = createRelationalOperation(baseGt);
  11803. /**
  11804. * Checks if `value` is greater than or equal to `other`.
  11805. *
  11806. * @static
  11807. * @memberOf _
  11808. * @since 3.9.0
  11809. * @category Lang
  11810. * @param {*} value The value to compare.
  11811. * @param {*} other The other value to compare.
  11812. * @returns {boolean} Returns `true` if `value` is greater than or equal to
  11813. * `other`, else `false`.
  11814. * @see _.lte
  11815. * @example
  11816. *
  11817. * _.gte(3, 1);
  11818. * // => true
  11819. *
  11820. * _.gte(3, 3);
  11821. * // => true
  11822. *
  11823. * _.gte(1, 3);
  11824. * // => false
  11825. */
  11826. var gte = createRelationalOperation(function(value, other) {
  11827. return value >= other;
  11828. });
  11829. /**
  11830. * Checks if `value` is likely an `arguments` object.
  11831. *
  11832. * @static
  11833. * @memberOf _
  11834. * @since 0.1.0
  11835. * @category Lang
  11836. * @param {*} value The value to check.
  11837. * @returns {boolean} Returns `true` if `value` is an `arguments` object,
  11838. * else `false`.
  11839. * @example
  11840. *
  11841. * _.isArguments(function() { return arguments; }());
  11842. * // => true
  11843. *
  11844. * _.isArguments([1, 2, 3]);
  11845. * // => false
  11846. */
  11847. var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
  11848. return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
  11849. !propertyIsEnumerable.call(value, 'callee');
  11850. };
  11851. /**
  11852. * Checks if `value` is classified as an `Array` object.
  11853. *
  11854. * @static
  11855. * @memberOf _
  11856. * @since 0.1.0
  11857. * @category Lang
  11858. * @param {*} value The value to check.
  11859. * @returns {boolean} Returns `true` if `value` is an array, else `false`.
  11860. * @example
  11861. *
  11862. * _.isArray([1, 2, 3]);
  11863. * // => true
  11864. *
  11865. * _.isArray(document.body.children);
  11866. * // => false
  11867. *
  11868. * _.isArray('abc');
  11869. * // => false
  11870. *
  11871. * _.isArray(_.noop);
  11872. * // => false
  11873. */
  11874. var isArray = Array.isArray;
  11875. /**
  11876. * Checks if `value` is classified as an `ArrayBuffer` object.
  11877. *
  11878. * @static
  11879. * @memberOf _
  11880. * @since 4.3.0
  11881. * @category Lang
  11882. * @param {*} value The value to check.
  11883. * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
  11884. * @example
  11885. *
  11886. * _.isArrayBuffer(new ArrayBuffer(2));
  11887. * // => true
  11888. *
  11889. * _.isArrayBuffer(new Array(2));
  11890. * // => false
  11891. */
  11892. var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;
  11893. /**
  11894. * Checks if `value` is array-like. A value is considered array-like if it's
  11895. * not a function and has a `value.length` that's an integer greater than or
  11896. * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
  11897. *
  11898. * @static
  11899. * @memberOf _
  11900. * @since 4.0.0
  11901. * @category Lang
  11902. * @param {*} value The value to check.
  11903. * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
  11904. * @example
  11905. *
  11906. * _.isArrayLike([1, 2, 3]);
  11907. * // => true
  11908. *
  11909. * _.isArrayLike(document.body.children);
  11910. * // => true
  11911. *
  11912. * _.isArrayLike('abc');
  11913. * // => true
  11914. *
  11915. * _.isArrayLike(_.noop);
  11916. * // => false
  11917. */
  11918. function isArrayLike(value) {
  11919. return value != null && isLength(value.length) && !isFunction(value);
  11920. }
  11921. /**
  11922. * This method is like `_.isArrayLike` except that it also checks if `value`
  11923. * is an object.
  11924. *
  11925. * @static
  11926. * @memberOf _
  11927. * @since 4.0.0
  11928. * @category Lang
  11929. * @param {*} value The value to check.
  11930. * @returns {boolean} Returns `true` if `value` is an array-like object,
  11931. * else `false`.
  11932. * @example
  11933. *
  11934. * _.isArrayLikeObject([1, 2, 3]);
  11935. * // => true
  11936. *
  11937. * _.isArrayLikeObject(document.body.children);
  11938. * // => true
  11939. *
  11940. * _.isArrayLikeObject('abc');
  11941. * // => false
  11942. *
  11943. * _.isArrayLikeObject(_.noop);
  11944. * // => false
  11945. */
  11946. function isArrayLikeObject(value) {
  11947. return isObjectLike(value) && isArrayLike(value);
  11948. }
  11949. /**
  11950. * Checks if `value` is classified as a boolean primitive or object.
  11951. *
  11952. * @static
  11953. * @memberOf _
  11954. * @since 0.1.0
  11955. * @category Lang
  11956. * @param {*} value The value to check.
  11957. * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.
  11958. * @example
  11959. *
  11960. * _.isBoolean(false);
  11961. * // => true
  11962. *
  11963. * _.isBoolean(null);
  11964. * // => false
  11965. */
  11966. function isBoolean(value) {
  11967. return value === true || value === false ||
  11968. (isObjectLike(value) && baseGetTag(value) == boolTag);
  11969. }
  11970. /**
  11971. * Checks if `value` is a buffer.
  11972. *
  11973. * @static
  11974. * @memberOf _
  11975. * @since 4.3.0
  11976. * @category Lang
  11977. * @param {*} value The value to check.
  11978. * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
  11979. * @example
  11980. *
  11981. * _.isBuffer(new Buffer(2));
  11982. * // => true
  11983. *
  11984. * _.isBuffer(new Uint8Array(2));
  11985. * // => false
  11986. */
  11987. var isBuffer = nativeIsBuffer || stubFalse;
  11988. /**
  11989. * Checks if `value` is classified as a `Date` object.
  11990. *
  11991. * @static
  11992. * @memberOf _
  11993. * @since 0.1.0
  11994. * @category Lang
  11995. * @param {*} value The value to check.
  11996. * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
  11997. * @example
  11998. *
  11999. * _.isDate(new Date);
  12000. * // => true
  12001. *
  12002. * _.isDate('Mon April 23 2012');
  12003. * // => false
  12004. */
  12005. var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;
  12006. /**
  12007. * Checks if `value` is likely a DOM element.
  12008. *
  12009. * @static
  12010. * @memberOf _
  12011. * @since 0.1.0
  12012. * @category Lang
  12013. * @param {*} value The value to check.
  12014. * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.
  12015. * @example
  12016. *
  12017. * _.isElement(document.body);
  12018. * // => true
  12019. *
  12020. * _.isElement('<body>');
  12021. * // => false
  12022. */
  12023. function isElement(value) {
  12024. return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);
  12025. }
  12026. /**
  12027. * Checks if `value` is an empty object, collection, map, or set.
  12028. *
  12029. * Objects are considered empty if they have no own enumerable string keyed
  12030. * properties.
  12031. *
  12032. * Array-like values such as `arguments` objects, arrays, buffers, strings, or
  12033. * jQuery-like collections are considered empty if they have a `length` of `0`.
  12034. * Similarly, maps and sets are considered empty if they have a `size` of `0`.
  12035. *
  12036. * @static
  12037. * @memberOf _
  12038. * @since 0.1.0
  12039. * @category Lang
  12040. * @param {*} value The value to check.
  12041. * @returns {boolean} Returns `true` if `value` is empty, else `false`.
  12042. * @example
  12043. *
  12044. * _.isEmpty(null);
  12045. * // => true
  12046. *
  12047. * _.isEmpty(true);
  12048. * // => true
  12049. *
  12050. * _.isEmpty(1);
  12051. * // => true
  12052. *
  12053. * _.isEmpty([1, 2, 3]);
  12054. * // => false
  12055. *
  12056. * _.isEmpty({ 'a': 1 });
  12057. * // => false
  12058. */
  12059. function isEmpty(value) {
  12060. if (value == null) {
  12061. return true;
  12062. }
  12063. if (isArrayLike(value) &&
  12064. (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||
  12065. isBuffer(value) || isTypedArray(value) || isArguments(value))) {
  12066. return !value.length;
  12067. }
  12068. var tag = getTag(value);
  12069. if (tag == mapTag || tag == setTag) {
  12070. return !value.size;
  12071. }
  12072. if (isPrototype(value)) {
  12073. return !baseKeys(value).length;
  12074. }
  12075. for (var key in value) {
  12076. if (hasOwnProperty.call(value, key)) {
  12077. return false;
  12078. }
  12079. }
  12080. return true;
  12081. }
  12082. /**
  12083. * Performs a deep comparison between two values to determine if they are
  12084. * equivalent.
  12085. *
  12086. * **Note:** This method supports comparing arrays, array buffers, booleans,
  12087. * date objects, error objects, maps, numbers, `Object` objects, regexes,
  12088. * sets, strings, symbols, and typed arrays. `Object` objects are compared
  12089. * by their own, not inherited, enumerable properties. Functions and DOM
  12090. * nodes are compared by strict equality, i.e. `===`.
  12091. *
  12092. * @static
  12093. * @memberOf _
  12094. * @since 0.1.0
  12095. * @category Lang
  12096. * @param {*} value The value to compare.
  12097. * @param {*} other The other value to compare.
  12098. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  12099. * @example
  12100. *
  12101. * var object = { 'a': 1 };
  12102. * var other = { 'a': 1 };
  12103. *
  12104. * _.isEqual(object, other);
  12105. * // => true
  12106. *
  12107. * object === other;
  12108. * // => false
  12109. */
  12110. function isEqual(value, other) {
  12111. return baseIsEqual(value, other);
  12112. }
  12113. /**
  12114. * This method is like `_.isEqual` except that it accepts `customizer` which
  12115. * is invoked to compare values. If `customizer` returns `undefined`, comparisons
  12116. * are handled by the method instead. The `customizer` is invoked with up to
  12117. * six arguments: (objValue, othValue [, index|key, object, other, stack]).
  12118. *
  12119. * @static
  12120. * @memberOf _
  12121. * @since 4.0.0
  12122. * @category Lang
  12123. * @param {*} value The value to compare.
  12124. * @param {*} other The other value to compare.
  12125. * @param {Function} [customizer] The function to customize comparisons.
  12126. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  12127. * @example
  12128. *
  12129. * function isGreeting(value) {
  12130. * return /^h(?:i|ello)$/.test(value);
  12131. * }
  12132. *
  12133. * function customizer(objValue, othValue) {
  12134. * if (isGreeting(objValue) && isGreeting(othValue)) {
  12135. * return true;
  12136. * }
  12137. * }
  12138. *
  12139. * var array = ['hello', 'goodbye'];
  12140. * var other = ['hi', 'goodbye'];
  12141. *
  12142. * _.isEqualWith(array, other, customizer);
  12143. * // => true
  12144. */
  12145. function isEqualWith(value, other, customizer) {
  12146. customizer = typeof customizer == 'function' ? customizer : undefined;
  12147. var result = customizer ? customizer(value, other) : undefined;
  12148. return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;
  12149. }
  12150. /**
  12151. * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,
  12152. * `SyntaxError`, `TypeError`, or `URIError` object.
  12153. *
  12154. * @static
  12155. * @memberOf _
  12156. * @since 3.0.0
  12157. * @category Lang
  12158. * @param {*} value The value to check.
  12159. * @returns {boolean} Returns `true` if `value` is an error object, else `false`.
  12160. * @example
  12161. *
  12162. * _.isError(new Error);
  12163. * // => true
  12164. *
  12165. * _.isError(Error);
  12166. * // => false
  12167. */
  12168. function isError(value) {
  12169. if (!isObjectLike(value)) {
  12170. return false;
  12171. }
  12172. var tag = baseGetTag(value);
  12173. return tag == errorTag || tag == domExcTag ||
  12174. (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));
  12175. }
  12176. /**
  12177. * Checks if `value` is a finite primitive number.
  12178. *
  12179. * **Note:** This method is based on
  12180. * [`Number.isFinite`](https://mdn.io/Number/isFinite).
  12181. *
  12182. * @static
  12183. * @memberOf _
  12184. * @since 0.1.0
  12185. * @category Lang
  12186. * @param {*} value The value to check.
  12187. * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.
  12188. * @example
  12189. *
  12190. * _.isFinite(3);
  12191. * // => true
  12192. *
  12193. * _.isFinite(Number.MIN_VALUE);
  12194. * // => true
  12195. *
  12196. * _.isFinite(Infinity);
  12197. * // => false
  12198. *
  12199. * _.isFinite('3');
  12200. * // => false
  12201. */
  12202. function isFinite(value) {
  12203. return typeof value == 'number' && nativeIsFinite(value);
  12204. }
  12205. /**
  12206. * Checks if `value` is classified as a `Function` object.
  12207. *
  12208. * @static
  12209. * @memberOf _
  12210. * @since 0.1.0
  12211. * @category Lang
  12212. * @param {*} value The value to check.
  12213. * @returns {boolean} Returns `true` if `value` is a function, else `false`.
  12214. * @example
  12215. *
  12216. * _.isFunction(_);
  12217. * // => true
  12218. *
  12219. * _.isFunction(/abc/);
  12220. * // => false
  12221. */
  12222. function isFunction(value) {
  12223. if (!isObject(value)) {
  12224. return false;
  12225. }
  12226. // The use of `Object#toString` avoids issues with the `typeof` operator
  12227. // in Safari 9 which returns 'object' for typed arrays and other constructors.
  12228. var tag = baseGetTag(value);
  12229. return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
  12230. }
  12231. /**
  12232. * Checks if `value` is an integer.
  12233. *
  12234. * **Note:** This method is based on
  12235. * [`Number.isInteger`](https://mdn.io/Number/isInteger).
  12236. *
  12237. * @static
  12238. * @memberOf _
  12239. * @since 4.0.0
  12240. * @category Lang
  12241. * @param {*} value The value to check.
  12242. * @returns {boolean} Returns `true` if `value` is an integer, else `false`.
  12243. * @example
  12244. *
  12245. * _.isInteger(3);
  12246. * // => true
  12247. *
  12248. * _.isInteger(Number.MIN_VALUE);
  12249. * // => false
  12250. *
  12251. * _.isInteger(Infinity);
  12252. * // => false
  12253. *
  12254. * _.isInteger('3');
  12255. * // => false
  12256. */
  12257. function isInteger(value) {
  12258. return typeof value == 'number' && value == toInteger(value);
  12259. }
  12260. /**
  12261. * Checks if `value` is a valid array-like length.
  12262. *
  12263. * **Note:** This method is loosely based on
  12264. * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
  12265. *
  12266. * @static
  12267. * @memberOf _
  12268. * @since 4.0.0
  12269. * @category Lang
  12270. * @param {*} value The value to check.
  12271. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
  12272. * @example
  12273. *
  12274. * _.isLength(3);
  12275. * // => true
  12276. *
  12277. * _.isLength(Number.MIN_VALUE);
  12278. * // => false
  12279. *
  12280. * _.isLength(Infinity);
  12281. * // => false
  12282. *
  12283. * _.isLength('3');
  12284. * // => false
  12285. */
  12286. function isLength(value) {
  12287. return typeof value == 'number' &&
  12288. value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
  12289. }
  12290. /**
  12291. * Checks if `value` is the
  12292. * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
  12293. * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
  12294. *
  12295. * @static
  12296. * @memberOf _
  12297. * @since 0.1.0
  12298. * @category Lang
  12299. * @param {*} value The value to check.
  12300. * @returns {boolean} Returns `true` if `value` is an object, else `false`.
  12301. * @example
  12302. *
  12303. * _.isObject({});
  12304. * // => true
  12305. *
  12306. * _.isObject([1, 2, 3]);
  12307. * // => true
  12308. *
  12309. * _.isObject(_.noop);
  12310. * // => true
  12311. *
  12312. * _.isObject(null);
  12313. * // => false
  12314. */
  12315. function isObject(value) {
  12316. var type = typeof value;
  12317. return value != null && (type == 'object' || type == 'function');
  12318. }
  12319. /**
  12320. * Checks if `value` is object-like. A value is object-like if it's not `null`
  12321. * and has a `typeof` result of "object".
  12322. *
  12323. * @static
  12324. * @memberOf _
  12325. * @since 4.0.0
  12326. * @category Lang
  12327. * @param {*} value The value to check.
  12328. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  12329. * @example
  12330. *
  12331. * _.isObjectLike({});
  12332. * // => true
  12333. *
  12334. * _.isObjectLike([1, 2, 3]);
  12335. * // => true
  12336. *
  12337. * _.isObjectLike(_.noop);
  12338. * // => false
  12339. *
  12340. * _.isObjectLike(null);
  12341. * // => false
  12342. */
  12343. function isObjectLike(value) {
  12344. return value != null && typeof value == 'object';
  12345. }
  12346. /**
  12347. * Checks if `value` is classified as a `Map` object.
  12348. *
  12349. * @static
  12350. * @memberOf _
  12351. * @since 4.3.0
  12352. * @category Lang
  12353. * @param {*} value The value to check.
  12354. * @returns {boolean} Returns `true` if `value` is a map, else `false`.
  12355. * @example
  12356. *
  12357. * _.isMap(new Map);
  12358. * // => true
  12359. *
  12360. * _.isMap(new WeakMap);
  12361. * // => false
  12362. */
  12363. var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
  12364. /**
  12365. * Performs a partial deep comparison between `object` and `source` to
  12366. * determine if `object` contains equivalent property values.
  12367. *
  12368. * **Note:** This method is equivalent to `_.matches` when `source` is
  12369. * partially applied.
  12370. *
  12371. * Partial comparisons will match empty array and empty object `source`
  12372. * values against any array or object value, respectively. See `_.isEqual`
  12373. * for a list of supported value comparisons.
  12374. *
  12375. * @static
  12376. * @memberOf _
  12377. * @since 3.0.0
  12378. * @category Lang
  12379. * @param {Object} object The object to inspect.
  12380. * @param {Object} source The object of property values to match.
  12381. * @returns {boolean} Returns `true` if `object` is a match, else `false`.
  12382. * @example
  12383. *
  12384. * var object = { 'a': 1, 'b': 2 };
  12385. *
  12386. * _.isMatch(object, { 'b': 2 });
  12387. * // => true
  12388. *
  12389. * _.isMatch(object, { 'b': 1 });
  12390. * // => false
  12391. */
  12392. function isMatch(object, source) {
  12393. return object === source || baseIsMatch(object, source, getMatchData(source));
  12394. }
  12395. /**
  12396. * This method is like `_.isMatch` except that it accepts `customizer` which
  12397. * is invoked to compare values. If `customizer` returns `undefined`, comparisons
  12398. * are handled by the method instead. The `customizer` is invoked with five
  12399. * arguments: (objValue, srcValue, index|key, object, source).
  12400. *
  12401. * @static
  12402. * @memberOf _
  12403. * @since 4.0.0
  12404. * @category Lang
  12405. * @param {Object} object The object to inspect.
  12406. * @param {Object} source The object of property values to match.
  12407. * @param {Function} [customizer] The function to customize comparisons.
  12408. * @returns {boolean} Returns `true` if `object` is a match, else `false`.
  12409. * @example
  12410. *
  12411. * function isGreeting(value) {
  12412. * return /^h(?:i|ello)$/.test(value);
  12413. * }
  12414. *
  12415. * function customizer(objValue, srcValue) {
  12416. * if (isGreeting(objValue) && isGreeting(srcValue)) {
  12417. * return true;
  12418. * }
  12419. * }
  12420. *
  12421. * var object = { 'greeting': 'hello' };
  12422. * var source = { 'greeting': 'hi' };
  12423. *
  12424. * _.isMatchWith(object, source, customizer);
  12425. * // => true
  12426. */
  12427. function isMatchWith(object, source, customizer) {
  12428. customizer = typeof customizer == 'function' ? customizer : undefined;
  12429. return baseIsMatch(object, source, getMatchData(source), customizer);
  12430. }
  12431. /**
  12432. * Checks if `value` is `NaN`.
  12433. *
  12434. * **Note:** This method is based on
  12435. * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as
  12436. * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for
  12437. * `undefined` and other non-number values.
  12438. *
  12439. * @static
  12440. * @memberOf _
  12441. * @since 0.1.0
  12442. * @category Lang
  12443. * @param {*} value The value to check.
  12444. * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
  12445. * @example
  12446. *
  12447. * _.isNaN(NaN);
  12448. * // => true
  12449. *
  12450. * _.isNaN(new Number(NaN));
  12451. * // => true
  12452. *
  12453. * isNaN(undefined);
  12454. * // => true
  12455. *
  12456. * _.isNaN(undefined);
  12457. * // => false
  12458. */
  12459. function isNaN(value) {
  12460. // An `NaN` primitive is the only value that is not equal to itself.
  12461. // Perform the `toStringTag` check first to avoid errors with some
  12462. // ActiveX objects in IE.
  12463. return isNumber(value) && value != +value;
  12464. }
  12465. /**
  12466. * Checks if `value` is a pristine native function.
  12467. *
  12468. * **Note:** This method can't reliably detect native functions in the presence
  12469. * of the core-js package because core-js circumvents this kind of detection.
  12470. * Despite multiple requests, the core-js maintainer has made it clear: any
  12471. * attempt to fix the detection will be obstructed. As a result, we're left
  12472. * with little choice but to throw an error. Unfortunately, this also affects
  12473. * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),
  12474. * which rely on core-js.
  12475. *
  12476. * @static
  12477. * @memberOf _
  12478. * @since 3.0.0
  12479. * @category Lang
  12480. * @param {*} value The value to check.
  12481. * @returns {boolean} Returns `true` if `value` is a native function,
  12482. * else `false`.
  12483. * @example
  12484. *
  12485. * _.isNative(Array.prototype.push);
  12486. * // => true
  12487. *
  12488. * _.isNative(_);
  12489. * // => false
  12490. */
  12491. function isNative(value) {
  12492. if (isMaskable(value)) {
  12493. throw new Error(CORE_ERROR_TEXT);
  12494. }
  12495. return baseIsNative(value);
  12496. }
  12497. /**
  12498. * Checks if `value` is `null`.
  12499. *
  12500. * @static
  12501. * @memberOf _
  12502. * @since 0.1.0
  12503. * @category Lang
  12504. * @param {*} value The value to check.
  12505. * @returns {boolean} Returns `true` if `value` is `null`, else `false`.
  12506. * @example
  12507. *
  12508. * _.isNull(null);
  12509. * // => true
  12510. *
  12511. * _.isNull(void 0);
  12512. * // => false
  12513. */
  12514. function isNull(value) {
  12515. return value === null;
  12516. }
  12517. /**
  12518. * Checks if `value` is `null` or `undefined`.
  12519. *
  12520. * @static
  12521. * @memberOf _
  12522. * @since 4.0.0
  12523. * @category Lang
  12524. * @param {*} value The value to check.
  12525. * @returns {boolean} Returns `true` if `value` is nullish, else `false`.
  12526. * @example
  12527. *
  12528. * _.isNil(null);
  12529. * // => true
  12530. *
  12531. * _.isNil(void 0);
  12532. * // => true
  12533. *
  12534. * _.isNil(NaN);
  12535. * // => false
  12536. */
  12537. function isNil(value) {
  12538. return value == null;
  12539. }
  12540. /**
  12541. * Checks if `value` is classified as a `Number` primitive or object.
  12542. *
  12543. * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are
  12544. * classified as numbers, use the `_.isFinite` method.
  12545. *
  12546. * @static
  12547. * @memberOf _
  12548. * @since 0.1.0
  12549. * @category Lang
  12550. * @param {*} value The value to check.
  12551. * @returns {boolean} Returns `true` if `value` is a number, else `false`.
  12552. * @example
  12553. *
  12554. * _.isNumber(3);
  12555. * // => true
  12556. *
  12557. * _.isNumber(Number.MIN_VALUE);
  12558. * // => true
  12559. *
  12560. * _.isNumber(Infinity);
  12561. * // => true
  12562. *
  12563. * _.isNumber('3');
  12564. * // => false
  12565. */
  12566. function isNumber(value) {
  12567. return typeof value == 'number' ||
  12568. (isObjectLike(value) && baseGetTag(value) == numberTag);
  12569. }
  12570. /**
  12571. * Checks if `value` is a plain object, that is, an object created by the
  12572. * `Object` constructor or one with a `[[Prototype]]` of `null`.
  12573. *
  12574. * @static
  12575. * @memberOf _
  12576. * @since 0.8.0
  12577. * @category Lang
  12578. * @param {*} value The value to check.
  12579. * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
  12580. * @example
  12581. *
  12582. * function Foo() {
  12583. * this.a = 1;
  12584. * }
  12585. *
  12586. * _.isPlainObject(new Foo);
  12587. * // => false
  12588. *
  12589. * _.isPlainObject([1, 2, 3]);
  12590. * // => false
  12591. *
  12592. * _.isPlainObject({ 'x': 0, 'y': 0 });
  12593. * // => true
  12594. *
  12595. * _.isPlainObject(Object.create(null));
  12596. * // => true
  12597. */
  12598. function isPlainObject(value) {
  12599. if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
  12600. return false;
  12601. }
  12602. var proto = getPrototype(value);
  12603. if (proto === null) {
  12604. return true;
  12605. }
  12606. var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
  12607. return typeof Ctor == 'function' && Ctor instanceof Ctor &&
  12608. funcToString.call(Ctor) == objectCtorString;
  12609. }
  12610. /**
  12611. * Checks if `value` is classified as a `RegExp` object.
  12612. *
  12613. * @static
  12614. * @memberOf _
  12615. * @since 0.1.0
  12616. * @category Lang
  12617. * @param {*} value The value to check.
  12618. * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
  12619. * @example
  12620. *
  12621. * _.isRegExp(/abc/);
  12622. * // => true
  12623. *
  12624. * _.isRegExp('/abc/');
  12625. * // => false
  12626. */
  12627. var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;
  12628. /**
  12629. * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754
  12630. * double precision number which isn't the result of a rounded unsafe integer.
  12631. *
  12632. * **Note:** This method is based on
  12633. * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).
  12634. *
  12635. * @static
  12636. * @memberOf _
  12637. * @since 4.0.0
  12638. * @category Lang
  12639. * @param {*} value The value to check.
  12640. * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.
  12641. * @example
  12642. *
  12643. * _.isSafeInteger(3);
  12644. * // => true
  12645. *
  12646. * _.isSafeInteger(Number.MIN_VALUE);
  12647. * // => false
  12648. *
  12649. * _.isSafeInteger(Infinity);
  12650. * // => false
  12651. *
  12652. * _.isSafeInteger('3');
  12653. * // => false
  12654. */
  12655. function isSafeInteger(value) {
  12656. return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;
  12657. }
  12658. /**
  12659. * Checks if `value` is classified as a `Set` object.
  12660. *
  12661. * @static
  12662. * @memberOf _
  12663. * @since 4.3.0
  12664. * @category Lang
  12665. * @param {*} value The value to check.
  12666. * @returns {boolean} Returns `true` if `value` is a set, else `false`.
  12667. * @example
  12668. *
  12669. * _.isSet(new Set);
  12670. * // => true
  12671. *
  12672. * _.isSet(new WeakSet);
  12673. * // => false
  12674. */
  12675. var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
  12676. /**
  12677. * Checks if `value` is classified as a `String` primitive or object.
  12678. *
  12679. * @static
  12680. * @since 0.1.0
  12681. * @memberOf _
  12682. * @category Lang
  12683. * @param {*} value The value to check.
  12684. * @returns {boolean} Returns `true` if `value` is a string, else `false`.
  12685. * @example
  12686. *
  12687. * _.isString('abc');
  12688. * // => true
  12689. *
  12690. * _.isString(1);
  12691. * // => false
  12692. */
  12693. function isString(value) {
  12694. return typeof value == 'string' ||
  12695. (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);
  12696. }
  12697. /**
  12698. * Checks if `value` is classified as a `Symbol` primitive or object.
  12699. *
  12700. * @static
  12701. * @memberOf _
  12702. * @since 4.0.0
  12703. * @category Lang
  12704. * @param {*} value The value to check.
  12705. * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
  12706. * @example
  12707. *
  12708. * _.isSymbol(Symbol.iterator);
  12709. * // => true
  12710. *
  12711. * _.isSymbol('abc');
  12712. * // => false
  12713. */
  12714. function isSymbol(value) {
  12715. return typeof value == 'symbol' ||
  12716. (isObjectLike(value) && baseGetTag(value) == symbolTag);
  12717. }
  12718. /**
  12719. * Checks if `value` is classified as a typed array.
  12720. *
  12721. * @static
  12722. * @memberOf _
  12723. * @since 3.0.0
  12724. * @category Lang
  12725. * @param {*} value The value to check.
  12726. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
  12727. * @example
  12728. *
  12729. * _.isTypedArray(new Uint8Array);
  12730. * // => true
  12731. *
  12732. * _.isTypedArray([]);
  12733. * // => false
  12734. */
  12735. var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
  12736. /**
  12737. * Checks if `value` is `undefined`.
  12738. *
  12739. * @static
  12740. * @since 0.1.0
  12741. * @memberOf _
  12742. * @category Lang
  12743. * @param {*} value The value to check.
  12744. * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
  12745. * @example
  12746. *
  12747. * _.isUndefined(void 0);
  12748. * // => true
  12749. *
  12750. * _.isUndefined(null);
  12751. * // => false
  12752. */
  12753. function isUndefined(value) {
  12754. return value === undefined;
  12755. }
  12756. /**
  12757. * Checks if `value` is classified as a `WeakMap` object.
  12758. *
  12759. * @static
  12760. * @memberOf _
  12761. * @since 4.3.0
  12762. * @category Lang
  12763. * @param {*} value The value to check.
  12764. * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.
  12765. * @example
  12766. *
  12767. * _.isWeakMap(new WeakMap);
  12768. * // => true
  12769. *
  12770. * _.isWeakMap(new Map);
  12771. * // => false
  12772. */
  12773. function isWeakMap(value) {
  12774. return isObjectLike(value) && getTag(value) == weakMapTag;
  12775. }
  12776. /**
  12777. * Checks if `value` is classified as a `WeakSet` object.
  12778. *
  12779. * @static
  12780. * @memberOf _
  12781. * @since 4.3.0
  12782. * @category Lang
  12783. * @param {*} value The value to check.
  12784. * @returns {boolean} Returns `true` if `value` is a weak set, else `false`.
  12785. * @example
  12786. *
  12787. * _.isWeakSet(new WeakSet);
  12788. * // => true
  12789. *
  12790. * _.isWeakSet(new Set);
  12791. * // => false
  12792. */
  12793. function isWeakSet(value) {
  12794. return isObjectLike(value) && baseGetTag(value) == weakSetTag;
  12795. }
  12796. /**
  12797. * Checks if `value` is less than `other`.
  12798. *
  12799. * @static
  12800. * @memberOf _
  12801. * @since 3.9.0
  12802. * @category Lang
  12803. * @param {*} value The value to compare.
  12804. * @param {*} other The other value to compare.
  12805. * @returns {boolean} Returns `true` if `value` is less than `other`,
  12806. * else `false`.
  12807. * @see _.gt
  12808. * @example
  12809. *
  12810. * _.lt(1, 3);
  12811. * // => true
  12812. *
  12813. * _.lt(3, 3);
  12814. * // => false
  12815. *
  12816. * _.lt(3, 1);
  12817. * // => false
  12818. */
  12819. var lt = createRelationalOperation(baseLt);
  12820. /**
  12821. * Checks if `value` is less than or equal to `other`.
  12822. *
  12823. * @static
  12824. * @memberOf _
  12825. * @since 3.9.0
  12826. * @category Lang
  12827. * @param {*} value The value to compare.
  12828. * @param {*} other The other value to compare.
  12829. * @returns {boolean} Returns `true` if `value` is less than or equal to
  12830. * `other`, else `false`.
  12831. * @see _.gte
  12832. * @example
  12833. *
  12834. * _.lte(1, 3);
  12835. * // => true
  12836. *
  12837. * _.lte(3, 3);
  12838. * // => true
  12839. *
  12840. * _.lte(3, 1);
  12841. * // => false
  12842. */
  12843. var lte = createRelationalOperation(function(value, other) {
  12844. return value <= other;
  12845. });
  12846. /**
  12847. * Converts `value` to an array.
  12848. *
  12849. * @static
  12850. * @since 0.1.0
  12851. * @memberOf _
  12852. * @category Lang
  12853. * @param {*} value The value to convert.
  12854. * @returns {Array} Returns the converted array.
  12855. * @example
  12856. *
  12857. * _.toArray({ 'a': 1, 'b': 2 });
  12858. * // => [1, 2]
  12859. *
  12860. * _.toArray('abc');
  12861. * // => ['a', 'b', 'c']
  12862. *
  12863. * _.toArray(1);
  12864. * // => []
  12865. *
  12866. * _.toArray(null);
  12867. * // => []
  12868. */
  12869. function toArray(value) {
  12870. if (!value) {
  12871. return [];
  12872. }
  12873. if (isArrayLike(value)) {
  12874. return isString(value) ? stringToArray(value) : copyArray(value);
  12875. }
  12876. if (symIterator && value[symIterator]) {
  12877. return iteratorToArray(value[symIterator]());
  12878. }
  12879. var tag = getTag(value),
  12880. func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);
  12881. return func(value);
  12882. }
  12883. /**
  12884. * Converts `value` to a finite number.
  12885. *
  12886. * @static
  12887. * @memberOf _
  12888. * @since 4.12.0
  12889. * @category Lang
  12890. * @param {*} value The value to convert.
  12891. * @returns {number} Returns the converted number.
  12892. * @example
  12893. *
  12894. * _.toFinite(3.2);
  12895. * // => 3.2
  12896. *
  12897. * _.toFinite(Number.MIN_VALUE);
  12898. * // => 5e-324
  12899. *
  12900. * _.toFinite(Infinity);
  12901. * // => 1.7976931348623157e+308
  12902. *
  12903. * _.toFinite('3.2');
  12904. * // => 3.2
  12905. */
  12906. function toFinite(value) {
  12907. if (!value) {
  12908. return value === 0 ? value : 0;
  12909. }
  12910. value = toNumber(value);
  12911. if (value === INFINITY || value === -INFINITY) {
  12912. var sign = (value < 0 ? -1 : 1);
  12913. return sign * MAX_INTEGER;
  12914. }
  12915. return value === value ? value : 0;
  12916. }
  12917. /**
  12918. * Converts `value` to an integer.
  12919. *
  12920. * **Note:** This method is loosely based on
  12921. * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
  12922. *
  12923. * @static
  12924. * @memberOf _
  12925. * @since 4.0.0
  12926. * @category Lang
  12927. * @param {*} value The value to convert.
  12928. * @returns {number} Returns the converted integer.
  12929. * @example
  12930. *
  12931. * _.toInteger(3.2);
  12932. * // => 3
  12933. *
  12934. * _.toInteger(Number.MIN_VALUE);
  12935. * // => 0
  12936. *
  12937. * _.toInteger(Infinity);
  12938. * // => 1.7976931348623157e+308
  12939. *
  12940. * _.toInteger('3.2');
  12941. * // => 3
  12942. */
  12943. function toInteger(value) {
  12944. var result = toFinite(value),
  12945. remainder = result % 1;
  12946. return result === result ? (remainder ? result - remainder : result) : 0;
  12947. }
  12948. /**
  12949. * Converts `value` to an integer suitable for use as the length of an
  12950. * array-like object.
  12951. *
  12952. * **Note:** This method is based on
  12953. * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
  12954. *
  12955. * @static
  12956. * @memberOf _
  12957. * @since 4.0.0
  12958. * @category Lang
  12959. * @param {*} value The value to convert.
  12960. * @returns {number} Returns the converted integer.
  12961. * @example
  12962. *
  12963. * _.toLength(3.2);
  12964. * // => 3
  12965. *
  12966. * _.toLength(Number.MIN_VALUE);
  12967. * // => 0
  12968. *
  12969. * _.toLength(Infinity);
  12970. * // => 4294967295
  12971. *
  12972. * _.toLength('3.2');
  12973. * // => 3
  12974. */
  12975. function toLength(value) {
  12976. return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;
  12977. }
  12978. /**
  12979. * Converts `value` to a number.
  12980. *
  12981. * @static
  12982. * @memberOf _
  12983. * @since 4.0.0
  12984. * @category Lang
  12985. * @param {*} value The value to process.
  12986. * @returns {number} Returns the number.
  12987. * @example
  12988. *
  12989. * _.toNumber(3.2);
  12990. * // => 3.2
  12991. *
  12992. * _.toNumber(Number.MIN_VALUE);
  12993. * // => 5e-324
  12994. *
  12995. * _.toNumber(Infinity);
  12996. * // => Infinity
  12997. *
  12998. * _.toNumber('3.2');
  12999. * // => 3.2
  13000. */
  13001. function toNumber(value) {
  13002. if (typeof value == 'number') {
  13003. return value;
  13004. }
  13005. if (isSymbol(value)) {
  13006. return NAN;
  13007. }
  13008. if (isObject(value)) {
  13009. var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
  13010. value = isObject(other) ? (other + '') : other;
  13011. }
  13012. if (typeof value != 'string') {
  13013. return value === 0 ? value : +value;
  13014. }
  13015. value = baseTrim(value);
  13016. var isBinary = reIsBinary.test(value);
  13017. return (isBinary || reIsOctal.test(value))
  13018. ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
  13019. : (reIsBadHex.test(value) ? NAN : +value);
  13020. }
  13021. /**
  13022. * Converts `value` to a plain object flattening inherited enumerable string
  13023. * keyed properties of `value` to own properties of the plain object.
  13024. *
  13025. * @static
  13026. * @memberOf _
  13027. * @since 3.0.0
  13028. * @category Lang
  13029. * @param {*} value The value to convert.
  13030. * @returns {Object} Returns the converted plain object.
  13031. * @example
  13032. *
  13033. * function Foo() {
  13034. * this.b = 2;
  13035. * }
  13036. *
  13037. * Foo.prototype.c = 3;
  13038. *
  13039. * _.assign({ 'a': 1 }, new Foo);
  13040. * // => { 'a': 1, 'b': 2 }
  13041. *
  13042. * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
  13043. * // => { 'a': 1, 'b': 2, 'c': 3 }
  13044. */
  13045. function toPlainObject(value) {
  13046. return copyObject(value, keysIn(value));
  13047. }
  13048. /**
  13049. * Converts `value` to a safe integer. A safe integer can be compared and
  13050. * represented correctly.
  13051. *
  13052. * @static
  13053. * @memberOf _
  13054. * @since 4.0.0
  13055. * @category Lang
  13056. * @param {*} value The value to convert.
  13057. * @returns {number} Returns the converted integer.
  13058. * @example
  13059. *
  13060. * _.toSafeInteger(3.2);
  13061. * // => 3
  13062. *
  13063. * _.toSafeInteger(Number.MIN_VALUE);
  13064. * // => 0
  13065. *
  13066. * _.toSafeInteger(Infinity);
  13067. * // => 9007199254740991
  13068. *
  13069. * _.toSafeInteger('3.2');
  13070. * // => 3
  13071. */
  13072. function toSafeInteger(value) {
  13073. return value
  13074. ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)
  13075. : (value === 0 ? value : 0);
  13076. }
  13077. /**
  13078. * Converts `value` to a string. An empty string is returned for `null`
  13079. * and `undefined` values. The sign of `-0` is preserved.
  13080. *
  13081. * @static
  13082. * @memberOf _
  13083. * @since 4.0.0
  13084. * @category Lang
  13085. * @param {*} value The value to convert.
  13086. * @returns {string} Returns the converted string.
  13087. * @example
  13088. *
  13089. * _.toString(null);
  13090. * // => ''
  13091. *
  13092. * _.toString(-0);
  13093. * // => '-0'
  13094. *
  13095. * _.toString([1, 2, 3]);
  13096. * // => '1,2,3'
  13097. */
  13098. function toString(value) {
  13099. return value == null ? '' : baseToString(value);
  13100. }
  13101. /*------------------------------------------------------------------------*/
  13102. /**
  13103. * Assigns own enumerable string keyed properties of source objects to the
  13104. * destination object. Source objects are applied from left to right.
  13105. * Subsequent sources overwrite property assignments of previous sources.
  13106. *
  13107. * **Note:** This method mutates `object` and is loosely based on
  13108. * [`Object.assign`](https://mdn.io/Object/assign).
  13109. *
  13110. * @static
  13111. * @memberOf _
  13112. * @since 0.10.0
  13113. * @category Object
  13114. * @param {Object} object The destination object.
  13115. * @param {...Object} [sources] The source objects.
  13116. * @returns {Object} Returns `object`.
  13117. * @see _.assignIn
  13118. * @example
  13119. *
  13120. * function Foo() {
  13121. * this.a = 1;
  13122. * }
  13123. *
  13124. * function Bar() {
  13125. * this.c = 3;
  13126. * }
  13127. *
  13128. * Foo.prototype.b = 2;
  13129. * Bar.prototype.d = 4;
  13130. *
  13131. * _.assign({ 'a': 0 }, new Foo, new Bar);
  13132. * // => { 'a': 1, 'c': 3 }
  13133. */
  13134. var assign = createAssigner(function(object, source) {
  13135. if (isPrototype(source) || isArrayLike(source)) {
  13136. copyObject(source, keys(source), object);
  13137. return;
  13138. }
  13139. for (var key in source) {
  13140. if (hasOwnProperty.call(source, key)) {
  13141. assignValue(object, key, source[key]);
  13142. }
  13143. }
  13144. });
  13145. /**
  13146. * This method is like `_.assign` except that it iterates over own and
  13147. * inherited source properties.
  13148. *
  13149. * **Note:** This method mutates `object`.
  13150. *
  13151. * @static
  13152. * @memberOf _
  13153. * @since 4.0.0
  13154. * @alias extend
  13155. * @category Object
  13156. * @param {Object} object The destination object.
  13157. * @param {...Object} [sources] The source objects.
  13158. * @returns {Object} Returns `object`.
  13159. * @see _.assign
  13160. * @example
  13161. *
  13162. * function Foo() {
  13163. * this.a = 1;
  13164. * }
  13165. *
  13166. * function Bar() {
  13167. * this.c = 3;
  13168. * }
  13169. *
  13170. * Foo.prototype.b = 2;
  13171. * Bar.prototype.d = 4;
  13172. *
  13173. * _.assignIn({ 'a': 0 }, new Foo, new Bar);
  13174. * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }
  13175. */
  13176. var assignIn = createAssigner(function(object, source) {
  13177. copyObject(source, keysIn(source), object);
  13178. });
  13179. /**
  13180. * This method is like `_.assignIn` except that it accepts `customizer`
  13181. * which is invoked to produce the assigned values. If `customizer` returns
  13182. * `undefined`, assignment is handled by the method instead. The `customizer`
  13183. * is invoked with five arguments: (objValue, srcValue, key, object, source).
  13184. *
  13185. * **Note:** This method mutates `object`.
  13186. *
  13187. * @static
  13188. * @memberOf _
  13189. * @since 4.0.0
  13190. * @alias extendWith
  13191. * @category Object
  13192. * @param {Object} object The destination object.
  13193. * @param {...Object} sources The source objects.
  13194. * @param {Function} [customizer] The function to customize assigned values.
  13195. * @returns {Object} Returns `object`.
  13196. * @see _.assignWith
  13197. * @example
  13198. *
  13199. * function customizer(objValue, srcValue) {
  13200. * return _.isUndefined(objValue) ? srcValue : objValue;
  13201. * }
  13202. *
  13203. * var defaults = _.partialRight(_.assignInWith, customizer);
  13204. *
  13205. * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
  13206. * // => { 'a': 1, 'b': 2 }
  13207. */
  13208. var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {
  13209. copyObject(source, keysIn(source), object, customizer);
  13210. });
  13211. /**
  13212. * This method is like `_.assign` except that it accepts `customizer`
  13213. * which is invoked to produce the assigned values. If `customizer` returns
  13214. * `undefined`, assignment is handled by the method instead. The `customizer`
  13215. * is invoked with five arguments: (objValue, srcValue, key, object, source).
  13216. *
  13217. * **Note:** This method mutates `object`.
  13218. *
  13219. * @static
  13220. * @memberOf _
  13221. * @since 4.0.0
  13222. * @category Object
  13223. * @param {Object} object The destination object.
  13224. * @param {...Object} sources The source objects.
  13225. * @param {Function} [customizer] The function to customize assigned values.
  13226. * @returns {Object} Returns `object`.
  13227. * @see _.assignInWith
  13228. * @example
  13229. *
  13230. * function customizer(objValue, srcValue) {
  13231. * return _.isUndefined(objValue) ? srcValue : objValue;
  13232. * }
  13233. *
  13234. * var defaults = _.partialRight(_.assignWith, customizer);
  13235. *
  13236. * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
  13237. * // => { 'a': 1, 'b': 2 }
  13238. */
  13239. var assignWith = createAssigner(function(object, source, srcIndex, customizer) {
  13240. copyObject(source, keys(source), object, customizer);
  13241. });
  13242. /**
  13243. * Creates an array of values corresponding to `paths` of `object`.
  13244. *
  13245. * @static
  13246. * @memberOf _
  13247. * @since 1.0.0
  13248. * @category Object
  13249. * @param {Object} object The object to iterate over.
  13250. * @param {...(string|string[])} [paths] The property paths to pick.
  13251. * @returns {Array} Returns the picked values.
  13252. * @example
  13253. *
  13254. * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
  13255. *
  13256. * _.at(object, ['a[0].b.c', 'a[1]']);
  13257. * // => [3, 4]
  13258. */
  13259. var at = flatRest(baseAt);
  13260. /**
  13261. * Creates an object that inherits from the `prototype` object. If a
  13262. * `properties` object is given, its own enumerable string keyed properties
  13263. * are assigned to the created object.
  13264. *
  13265. * @static
  13266. * @memberOf _
  13267. * @since 2.3.0
  13268. * @category Object
  13269. * @param {Object} prototype The object to inherit from.
  13270. * @param {Object} [properties] The properties to assign to the object.
  13271. * @returns {Object} Returns the new object.
  13272. * @example
  13273. *
  13274. * function Shape() {
  13275. * this.x = 0;
  13276. * this.y = 0;
  13277. * }
  13278. *
  13279. * function Circle() {
  13280. * Shape.call(this);
  13281. * }
  13282. *
  13283. * Circle.prototype = _.create(Shape.prototype, {
  13284. * 'constructor': Circle
  13285. * });
  13286. *
  13287. * var circle = new Circle;
  13288. * circle instanceof Circle;
  13289. * // => true
  13290. *
  13291. * circle instanceof Shape;
  13292. * // => true
  13293. */
  13294. function create(prototype, properties) {
  13295. var result = baseCreate(prototype);
  13296. return properties == null ? result : baseAssign(result, properties);
  13297. }
  13298. /**
  13299. * Assigns own and inherited enumerable string keyed properties of source
  13300. * objects to the destination object for all destination properties that
  13301. * resolve to `undefined`. Source objects are applied from left to right.
  13302. * Once a property is set, additional values of the same property are ignored.
  13303. *
  13304. * **Note:** This method mutates `object`.
  13305. *
  13306. * @static
  13307. * @since 0.1.0
  13308. * @memberOf _
  13309. * @category Object
  13310. * @param {Object} object The destination object.
  13311. * @param {...Object} [sources] The source objects.
  13312. * @returns {Object} Returns `object`.
  13313. * @see _.defaultsDeep
  13314. * @example
  13315. *
  13316. * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
  13317. * // => { 'a': 1, 'b': 2 }
  13318. */
  13319. var defaults = baseRest(function(object, sources) {
  13320. object = Object(object);
  13321. var index = -1;
  13322. var length = sources.length;
  13323. var guard = length > 2 ? sources[2] : undefined;
  13324. if (guard && isIterateeCall(sources[0], sources[1], guard)) {
  13325. length = 1;
  13326. }
  13327. while (++index < length) {
  13328. var source = sources[index];
  13329. var props = keysIn(source);
  13330. var propsIndex = -1;
  13331. var propsLength = props.length;
  13332. while (++propsIndex < propsLength) {
  13333. var key = props[propsIndex];
  13334. var value = object[key];
  13335. if (value === undefined ||
  13336. (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {
  13337. object[key] = source[key];
  13338. }
  13339. }
  13340. }
  13341. return object;
  13342. });
  13343. /**
  13344. * This method is like `_.defaults` except that it recursively assigns
  13345. * default properties.
  13346. *
  13347. * **Note:** This method mutates `object`.
  13348. *
  13349. * @static
  13350. * @memberOf _
  13351. * @since 3.10.0
  13352. * @category Object
  13353. * @param {Object} object The destination object.
  13354. * @param {...Object} [sources] The source objects.
  13355. * @returns {Object} Returns `object`.
  13356. * @see _.defaults
  13357. * @example
  13358. *
  13359. * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });
  13360. * // => { 'a': { 'b': 2, 'c': 3 } }
  13361. */
  13362. var defaultsDeep = baseRest(function(args) {
  13363. args.push(undefined, customDefaultsMerge);
  13364. return apply(mergeWith, undefined, args);
  13365. });
  13366. /**
  13367. * This method is like `_.find` except that it returns the key of the first
  13368. * element `predicate` returns truthy for instead of the element itself.
  13369. *
  13370. * @static
  13371. * @memberOf _
  13372. * @since 1.1.0
  13373. * @category Object
  13374. * @param {Object} object The object to inspect.
  13375. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  13376. * @returns {string|undefined} Returns the key of the matched element,
  13377. * else `undefined`.
  13378. * @example
  13379. *
  13380. * var users = {
  13381. * 'barney': { 'age': 36, 'active': true },
  13382. * 'fred': { 'age': 40, 'active': false },
  13383. * 'pebbles': { 'age': 1, 'active': true }
  13384. * };
  13385. *
  13386. * _.findKey(users, function(o) { return o.age < 40; });
  13387. * // => 'barney' (iteration order is not guaranteed)
  13388. *
  13389. * // The `_.matches` iteratee shorthand.
  13390. * _.findKey(users, { 'age': 1, 'active': true });
  13391. * // => 'pebbles'
  13392. *
  13393. * // The `_.matchesProperty` iteratee shorthand.
  13394. * _.findKey(users, ['active', false]);
  13395. * // => 'fred'
  13396. *
  13397. * // The `_.property` iteratee shorthand.
  13398. * _.findKey(users, 'active');
  13399. * // => 'barney'
  13400. */
  13401. function findKey(object, predicate) {
  13402. return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);
  13403. }
  13404. /**
  13405. * This method is like `_.findKey` except that it iterates over elements of
  13406. * a collection in the opposite order.
  13407. *
  13408. * @static
  13409. * @memberOf _
  13410. * @since 2.0.0
  13411. * @category Object
  13412. * @param {Object} object The object to inspect.
  13413. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  13414. * @returns {string|undefined} Returns the key of the matched element,
  13415. * else `undefined`.
  13416. * @example
  13417. *
  13418. * var users = {
  13419. * 'barney': { 'age': 36, 'active': true },
  13420. * 'fred': { 'age': 40, 'active': false },
  13421. * 'pebbles': { 'age': 1, 'active': true }
  13422. * };
  13423. *
  13424. * _.findLastKey(users, function(o) { return o.age < 40; });
  13425. * // => returns 'pebbles' assuming `_.findKey` returns 'barney'
  13426. *
  13427. * // The `_.matches` iteratee shorthand.
  13428. * _.findLastKey(users, { 'age': 36, 'active': true });
  13429. * // => 'barney'
  13430. *
  13431. * // The `_.matchesProperty` iteratee shorthand.
  13432. * _.findLastKey(users, ['active', false]);
  13433. * // => 'fred'
  13434. *
  13435. * // The `_.property` iteratee shorthand.
  13436. * _.findLastKey(users, 'active');
  13437. * // => 'pebbles'
  13438. */
  13439. function findLastKey(object, predicate) {
  13440. return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);
  13441. }
  13442. /**
  13443. * Iterates over own and inherited enumerable string keyed properties of an
  13444. * object and invokes `iteratee` for each property. The iteratee is invoked
  13445. * with three arguments: (value, key, object). Iteratee functions may exit
  13446. * iteration early by explicitly returning `false`.
  13447. *
  13448. * @static
  13449. * @memberOf _
  13450. * @since 0.3.0
  13451. * @category Object
  13452. * @param {Object} object The object to iterate over.
  13453. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  13454. * @returns {Object} Returns `object`.
  13455. * @see _.forInRight
  13456. * @example
  13457. *
  13458. * function Foo() {
  13459. * this.a = 1;
  13460. * this.b = 2;
  13461. * }
  13462. *
  13463. * Foo.prototype.c = 3;
  13464. *
  13465. * _.forIn(new Foo, function(value, key) {
  13466. * console.log(key);
  13467. * });
  13468. * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).
  13469. */
  13470. function forIn(object, iteratee) {
  13471. return object == null
  13472. ? object
  13473. : baseFor(object, getIteratee(iteratee, 3), keysIn);
  13474. }
  13475. /**
  13476. * This method is like `_.forIn` except that it iterates over properties of
  13477. * `object` in the opposite order.
  13478. *
  13479. * @static
  13480. * @memberOf _
  13481. * @since 2.0.0
  13482. * @category Object
  13483. * @param {Object} object The object to iterate over.
  13484. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  13485. * @returns {Object} Returns `object`.
  13486. * @see _.forIn
  13487. * @example
  13488. *
  13489. * function Foo() {
  13490. * this.a = 1;
  13491. * this.b = 2;
  13492. * }
  13493. *
  13494. * Foo.prototype.c = 3;
  13495. *
  13496. * _.forInRight(new Foo, function(value, key) {
  13497. * console.log(key);
  13498. * });
  13499. * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.
  13500. */
  13501. function forInRight(object, iteratee) {
  13502. return object == null
  13503. ? object
  13504. : baseForRight(object, getIteratee(iteratee, 3), keysIn);
  13505. }
  13506. /**
  13507. * Iterates over own enumerable string keyed properties of an object and
  13508. * invokes `iteratee` for each property. The iteratee is invoked with three
  13509. * arguments: (value, key, object). Iteratee functions may exit iteration
  13510. * early by explicitly returning `false`.
  13511. *
  13512. * @static
  13513. * @memberOf _
  13514. * @since 0.3.0
  13515. * @category Object
  13516. * @param {Object} object The object to iterate over.
  13517. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  13518. * @returns {Object} Returns `object`.
  13519. * @see _.forOwnRight
  13520. * @example
  13521. *
  13522. * function Foo() {
  13523. * this.a = 1;
  13524. * this.b = 2;
  13525. * }
  13526. *
  13527. * Foo.prototype.c = 3;
  13528. *
  13529. * _.forOwn(new Foo, function(value, key) {
  13530. * console.log(key);
  13531. * });
  13532. * // => Logs 'a' then 'b' (iteration order is not guaranteed).
  13533. */
  13534. function forOwn(object, iteratee) {
  13535. return object && baseForOwn(object, getIteratee(iteratee, 3));
  13536. }
  13537. /**
  13538. * This method is like `_.forOwn` except that it iterates over properties of
  13539. * `object` in the opposite order.
  13540. *
  13541. * @static
  13542. * @memberOf _
  13543. * @since 2.0.0
  13544. * @category Object
  13545. * @param {Object} object The object to iterate over.
  13546. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  13547. * @returns {Object} Returns `object`.
  13548. * @see _.forOwn
  13549. * @example
  13550. *
  13551. * function Foo() {
  13552. * this.a = 1;
  13553. * this.b = 2;
  13554. * }
  13555. *
  13556. * Foo.prototype.c = 3;
  13557. *
  13558. * _.forOwnRight(new Foo, function(value, key) {
  13559. * console.log(key);
  13560. * });
  13561. * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.
  13562. */
  13563. function forOwnRight(object, iteratee) {
  13564. return object && baseForOwnRight(object, getIteratee(iteratee, 3));
  13565. }
  13566. /**
  13567. * Creates an array of function property names from own enumerable properties
  13568. * of `object`.
  13569. *
  13570. * @static
  13571. * @since 0.1.0
  13572. * @memberOf _
  13573. * @category Object
  13574. * @param {Object} object The object to inspect.
  13575. * @returns {Array} Returns the function names.
  13576. * @see _.functionsIn
  13577. * @example
  13578. *
  13579. * function Foo() {
  13580. * this.a = _.constant('a');
  13581. * this.b = _.constant('b');
  13582. * }
  13583. *
  13584. * Foo.prototype.c = _.constant('c');
  13585. *
  13586. * _.functions(new Foo);
  13587. * // => ['a', 'b']
  13588. */
  13589. function functions(object) {
  13590. return object == null ? [] : baseFunctions(object, keys(object));
  13591. }
  13592. /**
  13593. * Creates an array of function property names from own and inherited
  13594. * enumerable properties of `object`.
  13595. *
  13596. * @static
  13597. * @memberOf _
  13598. * @since 4.0.0
  13599. * @category Object
  13600. * @param {Object} object The object to inspect.
  13601. * @returns {Array} Returns the function names.
  13602. * @see _.functions
  13603. * @example
  13604. *
  13605. * function Foo() {
  13606. * this.a = _.constant('a');
  13607. * this.b = _.constant('b');
  13608. * }
  13609. *
  13610. * Foo.prototype.c = _.constant('c');
  13611. *
  13612. * _.functionsIn(new Foo);
  13613. * // => ['a', 'b', 'c']
  13614. */
  13615. function functionsIn(object) {
  13616. return object == null ? [] : baseFunctions(object, keysIn(object));
  13617. }
  13618. /**
  13619. * Gets the value at `path` of `object`. If the resolved value is
  13620. * `undefined`, the `defaultValue` is returned in its place.
  13621. *
  13622. * @static
  13623. * @memberOf _
  13624. * @since 3.7.0
  13625. * @category Object
  13626. * @param {Object} object The object to query.
  13627. * @param {Array|string} path The path of the property to get.
  13628. * @param {*} [defaultValue] The value returned for `undefined` resolved values.
  13629. * @returns {*} Returns the resolved value.
  13630. * @example
  13631. *
  13632. * var object = { 'a': [{ 'b': { 'c': 3 } }] };
  13633. *
  13634. * _.get(object, 'a[0].b.c');
  13635. * // => 3
  13636. *
  13637. * _.get(object, ['a', '0', 'b', 'c']);
  13638. * // => 3
  13639. *
  13640. * _.get(object, 'a.b.c', 'default');
  13641. * // => 'default'
  13642. */
  13643. function get(object, path, defaultValue) {
  13644. var result = object == null ? undefined : baseGet(object, path);
  13645. return result === undefined ? defaultValue : result;
  13646. }
  13647. /**
  13648. * Checks if `path` is a direct property of `object`.
  13649. *
  13650. * @static
  13651. * @since 0.1.0
  13652. * @memberOf _
  13653. * @category Object
  13654. * @param {Object} object The object to query.
  13655. * @param {Array|string} path The path to check.
  13656. * @returns {boolean} Returns `true` if `path` exists, else `false`.
  13657. * @example
  13658. *
  13659. * var object = { 'a': { 'b': 2 } };
  13660. * var other = _.create({ 'a': _.create({ 'b': 2 }) });
  13661. *
  13662. * _.has(object, 'a');
  13663. * // => true
  13664. *
  13665. * _.has(object, 'a.b');
  13666. * // => true
  13667. *
  13668. * _.has(object, ['a', 'b']);
  13669. * // => true
  13670. *
  13671. * _.has(other, 'a');
  13672. * // => false
  13673. */
  13674. function has(object, path) {
  13675. return object != null && hasPath(object, path, baseHas);
  13676. }
  13677. /**
  13678. * Checks if `path` is a direct or inherited property of `object`.
  13679. *
  13680. * @static
  13681. * @memberOf _
  13682. * @since 4.0.0
  13683. * @category Object
  13684. * @param {Object} object The object to query.
  13685. * @param {Array|string} path The path to check.
  13686. * @returns {boolean} Returns `true` if `path` exists, else `false`.
  13687. * @example
  13688. *
  13689. * var object = _.create({ 'a': _.create({ 'b': 2 }) });
  13690. *
  13691. * _.hasIn(object, 'a');
  13692. * // => true
  13693. *
  13694. * _.hasIn(object, 'a.b');
  13695. * // => true
  13696. *
  13697. * _.hasIn(object, ['a', 'b']);
  13698. * // => true
  13699. *
  13700. * _.hasIn(object, 'b');
  13701. * // => false
  13702. */
  13703. function hasIn(object, path) {
  13704. return object != null && hasPath(object, path, baseHasIn);
  13705. }
  13706. /**
  13707. * Creates an object composed of the inverted keys and values of `object`.
  13708. * If `object` contains duplicate values, subsequent values overwrite
  13709. * property assignments of previous values.
  13710. *
  13711. * @static
  13712. * @memberOf _
  13713. * @since 0.7.0
  13714. * @category Object
  13715. * @param {Object} object The object to invert.
  13716. * @returns {Object} Returns the new inverted object.
  13717. * @example
  13718. *
  13719. * var object = { 'a': 1, 'b': 2, 'c': 1 };
  13720. *
  13721. * _.invert(object);
  13722. * // => { '1': 'c', '2': 'b' }
  13723. */
  13724. var invert = createInverter(function(result, value, key) {
  13725. if (value != null &&
  13726. typeof value.toString != 'function') {
  13727. value = nativeObjectToString.call(value);
  13728. }
  13729. result[value] = key;
  13730. }, constant(identity));
  13731. /**
  13732. * This method is like `_.invert` except that the inverted object is generated
  13733. * from the results of running each element of `object` thru `iteratee`. The
  13734. * corresponding inverted value of each inverted key is an array of keys
  13735. * responsible for generating the inverted value. The iteratee is invoked
  13736. * with one argument: (value).
  13737. *
  13738. * @static
  13739. * @memberOf _
  13740. * @since 4.1.0
  13741. * @category Object
  13742. * @param {Object} object The object to invert.
  13743. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  13744. * @returns {Object} Returns the new inverted object.
  13745. * @example
  13746. *
  13747. * var object = { 'a': 1, 'b': 2, 'c': 1 };
  13748. *
  13749. * _.invertBy(object);
  13750. * // => { '1': ['a', 'c'], '2': ['b'] }
  13751. *
  13752. * _.invertBy(object, function(value) {
  13753. * return 'group' + value;
  13754. * });
  13755. * // => { 'group1': ['a', 'c'], 'group2': ['b'] }
  13756. */
  13757. var invertBy = createInverter(function(result, value, key) {
  13758. if (value != null &&
  13759. typeof value.toString != 'function') {
  13760. value = nativeObjectToString.call(value);
  13761. }
  13762. if (hasOwnProperty.call(result, value)) {
  13763. result[value].push(key);
  13764. } else {
  13765. result[value] = [key];
  13766. }
  13767. }, getIteratee);
  13768. /**
  13769. * Invokes the method at `path` of `object`.
  13770. *
  13771. * @static
  13772. * @memberOf _
  13773. * @since 4.0.0
  13774. * @category Object
  13775. * @param {Object} object The object to query.
  13776. * @param {Array|string} path The path of the method to invoke.
  13777. * @param {...*} [args] The arguments to invoke the method with.
  13778. * @returns {*} Returns the result of the invoked method.
  13779. * @example
  13780. *
  13781. * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };
  13782. *
  13783. * _.invoke(object, 'a[0].b.c.slice', 1, 3);
  13784. * // => [2, 3]
  13785. */
  13786. var invoke = baseRest(baseInvoke);
  13787. /**
  13788. * Creates an array of the own enumerable property names of `object`.
  13789. *
  13790. * **Note:** Non-object values are coerced to objects. See the
  13791. * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
  13792. * for more details.
  13793. *
  13794. * @static
  13795. * @since 0.1.0
  13796. * @memberOf _
  13797. * @category Object
  13798. * @param {Object} object The object to query.
  13799. * @returns {Array} Returns the array of property names.
  13800. * @example
  13801. *
  13802. * function Foo() {
  13803. * this.a = 1;
  13804. * this.b = 2;
  13805. * }
  13806. *
  13807. * Foo.prototype.c = 3;
  13808. *
  13809. * _.keys(new Foo);
  13810. * // => ['a', 'b'] (iteration order is not guaranteed)
  13811. *
  13812. * _.keys('hi');
  13813. * // => ['0', '1']
  13814. */
  13815. function keys(object) {
  13816. return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
  13817. }
  13818. /**
  13819. * Creates an array of the own and inherited enumerable property names of `object`.
  13820. *
  13821. * **Note:** Non-object values are coerced to objects.
  13822. *
  13823. * @static
  13824. * @memberOf _
  13825. * @since 3.0.0
  13826. * @category Object
  13827. * @param {Object} object The object to query.
  13828. * @returns {Array} Returns the array of property names.
  13829. * @example
  13830. *
  13831. * function Foo() {
  13832. * this.a = 1;
  13833. * this.b = 2;
  13834. * }
  13835. *
  13836. * Foo.prototype.c = 3;
  13837. *
  13838. * _.keysIn(new Foo);
  13839. * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
  13840. */
  13841. function keysIn(object) {
  13842. return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
  13843. }
  13844. /**
  13845. * The opposite of `_.mapValues`; this method creates an object with the
  13846. * same values as `object` and keys generated by running each own enumerable
  13847. * string keyed property of `object` thru `iteratee`. The iteratee is invoked
  13848. * with three arguments: (value, key, object).
  13849. *
  13850. * @static
  13851. * @memberOf _
  13852. * @since 3.8.0
  13853. * @category Object
  13854. * @param {Object} object The object to iterate over.
  13855. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  13856. * @returns {Object} Returns the new mapped object.
  13857. * @see _.mapValues
  13858. * @example
  13859. *
  13860. * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {
  13861. * return key + value;
  13862. * });
  13863. * // => { 'a1': 1, 'b2': 2 }
  13864. */
  13865. function mapKeys(object, iteratee) {
  13866. var result = {};
  13867. iteratee = getIteratee(iteratee, 3);
  13868. baseForOwn(object, function(value, key, object) {
  13869. baseAssignValue(result, iteratee(value, key, object), value);
  13870. });
  13871. return result;
  13872. }
  13873. /**
  13874. * Creates an object with the same keys as `object` and values generated
  13875. * by running each own enumerable string keyed property of `object` thru
  13876. * `iteratee`. The iteratee is invoked with three arguments:
  13877. * (value, key, object).
  13878. *
  13879. * @static
  13880. * @memberOf _
  13881. * @since 2.4.0
  13882. * @category Object
  13883. * @param {Object} object The object to iterate over.
  13884. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  13885. * @returns {Object} Returns the new mapped object.
  13886. * @see _.mapKeys
  13887. * @example
  13888. *
  13889. * var users = {
  13890. * 'fred': { 'user': 'fred', 'age': 40 },
  13891. * 'pebbles': { 'user': 'pebbles', 'age': 1 }
  13892. * };
  13893. *
  13894. * _.mapValues(users, function(o) { return o.age; });
  13895. * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
  13896. *
  13897. * // The `_.property` iteratee shorthand.
  13898. * _.mapValues(users, 'age');
  13899. * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
  13900. */
  13901. function mapValues(object, iteratee) {
  13902. var result = {};
  13903. iteratee = getIteratee(iteratee, 3);
  13904. baseForOwn(object, function(value, key, object) {
  13905. baseAssignValue(result, key, iteratee(value, key, object));
  13906. });
  13907. return result;
  13908. }
  13909. /**
  13910. * This method is like `_.assign` except that it recursively merges own and
  13911. * inherited enumerable string keyed properties of source objects into the
  13912. * destination object. Source properties that resolve to `undefined` are
  13913. * skipped if a destination value exists. Array and plain object properties
  13914. * are merged recursively. Other objects and value types are overridden by
  13915. * assignment. Source objects are applied from left to right. Subsequent
  13916. * sources overwrite property assignments of previous sources.
  13917. *
  13918. * **Note:** This method mutates `object`.
  13919. *
  13920. * @static
  13921. * @memberOf _
  13922. * @since 0.5.0
  13923. * @category Object
  13924. * @param {Object} object The destination object.
  13925. * @param {...Object} [sources] The source objects.
  13926. * @returns {Object} Returns `object`.
  13927. * @example
  13928. *
  13929. * var object = {
  13930. * 'a': [{ 'b': 2 }, { 'd': 4 }]
  13931. * };
  13932. *
  13933. * var other = {
  13934. * 'a': [{ 'c': 3 }, { 'e': 5 }]
  13935. * };
  13936. *
  13937. * _.merge(object, other);
  13938. * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
  13939. */
  13940. var merge = createAssigner(function(object, source, srcIndex) {
  13941. baseMerge(object, source, srcIndex);
  13942. });
  13943. /**
  13944. * This method is like `_.merge` except that it accepts `customizer` which
  13945. * is invoked to produce the merged values of the destination and source
  13946. * properties. If `customizer` returns `undefined`, merging is handled by the
  13947. * method instead. The `customizer` is invoked with six arguments:
  13948. * (objValue, srcValue, key, object, source, stack).
  13949. *
  13950. * **Note:** This method mutates `object`.
  13951. *
  13952. * @static
  13953. * @memberOf _
  13954. * @since 4.0.0
  13955. * @category Object
  13956. * @param {Object} object The destination object.
  13957. * @param {...Object} sources The source objects.
  13958. * @param {Function} customizer The function to customize assigned values.
  13959. * @returns {Object} Returns `object`.
  13960. * @example
  13961. *
  13962. * function customizer(objValue, srcValue) {
  13963. * if (_.isArray(objValue)) {
  13964. * return objValue.concat(srcValue);
  13965. * }
  13966. * }
  13967. *
  13968. * var object = { 'a': [1], 'b': [2] };
  13969. * var other = { 'a': [3], 'b': [4] };
  13970. *
  13971. * _.mergeWith(object, other, customizer);
  13972. * // => { 'a': [1, 3], 'b': [2, 4] }
  13973. */
  13974. var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {
  13975. baseMerge(object, source, srcIndex, customizer);
  13976. });
  13977. /**
  13978. * The opposite of `_.pick`; this method creates an object composed of the
  13979. * own and inherited enumerable property paths of `object` that are not omitted.
  13980. *
  13981. * **Note:** This method is considerably slower than `_.pick`.
  13982. *
  13983. * @static
  13984. * @since 0.1.0
  13985. * @memberOf _
  13986. * @category Object
  13987. * @param {Object} object The source object.
  13988. * @param {...(string|string[])} [paths] The property paths to omit.
  13989. * @returns {Object} Returns the new object.
  13990. * @example
  13991. *
  13992. * var object = { 'a': 1, 'b': '2', 'c': 3 };
  13993. *
  13994. * _.omit(object, ['a', 'c']);
  13995. * // => { 'b': '2' }
  13996. */
  13997. var omit = flatRest(function(object, paths) {
  13998. var result = {};
  13999. if (object == null) {
  14000. return result;
  14001. }
  14002. var isDeep = false;
  14003. paths = arrayMap(paths, function(path) {
  14004. path = castPath(path, object);
  14005. isDeep || (isDeep = path.length > 1);
  14006. return path;
  14007. });
  14008. copyObject(object, getAllKeysIn(object), result);
  14009. if (isDeep) {
  14010. result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
  14011. }
  14012. var length = paths.length;
  14013. while (length--) {
  14014. baseUnset(result, paths[length]);
  14015. }
  14016. return result;
  14017. });
  14018. /**
  14019. * The opposite of `_.pickBy`; this method creates an object composed of
  14020. * the own and inherited enumerable string keyed properties of `object` that
  14021. * `predicate` doesn't return truthy for. The predicate is invoked with two
  14022. * arguments: (value, key).
  14023. *
  14024. * @static
  14025. * @memberOf _
  14026. * @since 4.0.0
  14027. * @category Object
  14028. * @param {Object} object The source object.
  14029. * @param {Function} [predicate=_.identity] The function invoked per property.
  14030. * @returns {Object} Returns the new object.
  14031. * @example
  14032. *
  14033. * var object = { 'a': 1, 'b': '2', 'c': 3 };
  14034. *
  14035. * _.omitBy(object, _.isNumber);
  14036. * // => { 'b': '2' }
  14037. */
  14038. function omitBy(object, predicate) {
  14039. return pickBy(object, negate(getIteratee(predicate)));
  14040. }
  14041. /**
  14042. * Creates an object composed of the picked `object` properties.
  14043. *
  14044. * @static
  14045. * @since 0.1.0
  14046. * @memberOf _
  14047. * @category Object
  14048. * @param {Object} object The source object.
  14049. * @param {...(string|string[])} [paths] The property paths to pick.
  14050. * @returns {Object} Returns the new object.
  14051. * @example
  14052. *
  14053. * var object = { 'a': 1, 'b': '2', 'c': 3 };
  14054. *
  14055. * _.pick(object, ['a', 'c']);
  14056. * // => { 'a': 1, 'c': 3 }
  14057. */
  14058. var pick = flatRest(function(object, paths) {
  14059. return object == null ? {} : basePick(object, paths);
  14060. });
  14061. /**
  14062. * Creates an object composed of the `object` properties `predicate` returns
  14063. * truthy for. The predicate is invoked with two arguments: (value, key).
  14064. *
  14065. * @static
  14066. * @memberOf _
  14067. * @since 4.0.0
  14068. * @category Object
  14069. * @param {Object} object The source object.
  14070. * @param {Function} [predicate=_.identity] The function invoked per property.
  14071. * @returns {Object} Returns the new object.
  14072. * @example
  14073. *
  14074. * var object = { 'a': 1, 'b': '2', 'c': 3 };
  14075. *
  14076. * _.pickBy(object, _.isNumber);
  14077. * // => { 'a': 1, 'c': 3 }
  14078. */
  14079. function pickBy(object, predicate) {
  14080. if (object == null) {
  14081. return {};
  14082. }
  14083. var props = arrayMap(getAllKeysIn(object), function(prop) {
  14084. return [prop];
  14085. });
  14086. predicate = getIteratee(predicate);
  14087. return basePickBy(object, props, function(value, path) {
  14088. return predicate(value, path[0]);
  14089. });
  14090. }
  14091. /**
  14092. * This method is like `_.get` except that if the resolved value is a
  14093. * function it's invoked with the `this` binding of its parent object and
  14094. * its result is returned.
  14095. *
  14096. * @static
  14097. * @since 0.1.0
  14098. * @memberOf _
  14099. * @category Object
  14100. * @param {Object} object The object to query.
  14101. * @param {Array|string} path The path of the property to resolve.
  14102. * @param {*} [defaultValue] The value returned for `undefined` resolved values.
  14103. * @returns {*} Returns the resolved value.
  14104. * @example
  14105. *
  14106. * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };
  14107. *
  14108. * _.result(object, 'a[0].b.c1');
  14109. * // => 3
  14110. *
  14111. * _.result(object, 'a[0].b.c2');
  14112. * // => 4
  14113. *
  14114. * _.result(object, 'a[0].b.c3', 'default');
  14115. * // => 'default'
  14116. *
  14117. * _.result(object, 'a[0].b.c3', _.constant('default'));
  14118. * // => 'default'
  14119. */
  14120. function result(object, path, defaultValue) {
  14121. path = castPath(path, object);
  14122. var index = -1,
  14123. length = path.length;
  14124. // Ensure the loop is entered when path is empty.
  14125. if (!length) {
  14126. length = 1;
  14127. object = undefined;
  14128. }
  14129. while (++index < length) {
  14130. var value = object == null ? undefined : object[toKey(path[index])];
  14131. if (value === undefined) {
  14132. index = length;
  14133. value = defaultValue;
  14134. }
  14135. object = isFunction(value) ? value.call(object) : value;
  14136. }
  14137. return object;
  14138. }
  14139. /**
  14140. * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,
  14141. * it's created. Arrays are created for missing index properties while objects
  14142. * are created for all other missing properties. Use `_.setWith` to customize
  14143. * `path` creation.
  14144. *
  14145. * **Note:** This method mutates `object`.
  14146. *
  14147. * @static
  14148. * @memberOf _
  14149. * @since 3.7.0
  14150. * @category Object
  14151. * @param {Object} object The object to modify.
  14152. * @param {Array|string} path The path of the property to set.
  14153. * @param {*} value The value to set.
  14154. * @returns {Object} Returns `object`.
  14155. * @example
  14156. *
  14157. * var object = { 'a': [{ 'b': { 'c': 3 } }] };
  14158. *
  14159. * _.set(object, 'a[0].b.c', 4);
  14160. * console.log(object.a[0].b.c);
  14161. * // => 4
  14162. *
  14163. * _.set(object, ['x', '0', 'y', 'z'], 5);
  14164. * console.log(object.x[0].y.z);
  14165. * // => 5
  14166. */
  14167. function set(object, path, value) {
  14168. return object == null ? object : baseSet(object, path, value);
  14169. }
  14170. /**
  14171. * This method is like `_.set` except that it accepts `customizer` which is
  14172. * invoked to produce the objects of `path`. If `customizer` returns `undefined`
  14173. * path creation is handled by the method instead. The `customizer` is invoked
  14174. * with three arguments: (nsValue, key, nsObject).
  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 set.
  14184. * @param {*} value The value to set.
  14185. * @param {Function} [customizer] The function to customize assigned values.
  14186. * @returns {Object} Returns `object`.
  14187. * @example
  14188. *
  14189. * var object = {};
  14190. *
  14191. * _.setWith(object, '[0][1]', 'a', Object);
  14192. * // => { '0': { '1': 'a' } }
  14193. */
  14194. function setWith(object, path, value, customizer) {
  14195. customizer = typeof customizer == 'function' ? customizer : undefined;
  14196. return object == null ? object : baseSet(object, path, value, customizer);
  14197. }
  14198. /**
  14199. * Creates an array of own enumerable string keyed-value pairs for `object`
  14200. * which can be consumed by `_.fromPairs`. If `object` is a map or set, its
  14201. * entries are returned.
  14202. *
  14203. * @static
  14204. * @memberOf _
  14205. * @since 4.0.0
  14206. * @alias entries
  14207. * @category Object
  14208. * @param {Object} object The object to query.
  14209. * @returns {Array} Returns the key-value pairs.
  14210. * @example
  14211. *
  14212. * function Foo() {
  14213. * this.a = 1;
  14214. * this.b = 2;
  14215. * }
  14216. *
  14217. * Foo.prototype.c = 3;
  14218. *
  14219. * _.toPairs(new Foo);
  14220. * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)
  14221. */
  14222. var toPairs = createToPairs(keys);
  14223. /**
  14224. * Creates an array of own and inherited enumerable string keyed-value pairs
  14225. * for `object` which can be consumed by `_.fromPairs`. If `object` is a map
  14226. * or set, its entries are returned.
  14227. *
  14228. * @static
  14229. * @memberOf _
  14230. * @since 4.0.0
  14231. * @alias entriesIn
  14232. * @category Object
  14233. * @param {Object} object The object to query.
  14234. * @returns {Array} Returns the key-value pairs.
  14235. * @example
  14236. *
  14237. * function Foo() {
  14238. * this.a = 1;
  14239. * this.b = 2;
  14240. * }
  14241. *
  14242. * Foo.prototype.c = 3;
  14243. *
  14244. * _.toPairsIn(new Foo);
  14245. * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)
  14246. */
  14247. var toPairsIn = createToPairs(keysIn);
  14248. /**
  14249. * An alternative to `_.reduce`; this method transforms `object` to a new
  14250. * `accumulator` object which is the result of running each of its own
  14251. * enumerable string keyed properties thru `iteratee`, with each invocation
  14252. * potentially mutating the `accumulator` object. If `accumulator` is not
  14253. * provided, a new object with the same `[[Prototype]]` will be used. The
  14254. * iteratee is invoked with four arguments: (accumulator, value, key, object).
  14255. * Iteratee functions may exit iteration early by explicitly returning `false`.
  14256. *
  14257. * @static
  14258. * @memberOf _
  14259. * @since 1.3.0
  14260. * @category Object
  14261. * @param {Object} object The object to iterate over.
  14262. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  14263. * @param {*} [accumulator] The custom accumulator value.
  14264. * @returns {*} Returns the accumulated value.
  14265. * @example
  14266. *
  14267. * _.transform([2, 3, 4], function(result, n) {
  14268. * result.push(n *= n);
  14269. * return n % 2 == 0;
  14270. * }, []);
  14271. * // => [4, 9]
  14272. *
  14273. * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
  14274. * (result[value] || (result[value] = [])).push(key);
  14275. * }, {});
  14276. * // => { '1': ['a', 'c'], '2': ['b'] }
  14277. */
  14278. function transform(object, iteratee, accumulator) {
  14279. var isArr = isArray(object),
  14280. isArrLike = isArr || isBuffer(object) || isTypedArray(object);
  14281. iteratee = getIteratee(iteratee, 4);
  14282. if (accumulator == null) {
  14283. var Ctor = object && object.constructor;
  14284. if (isArrLike) {
  14285. accumulator = isArr ? new Ctor : [];
  14286. }
  14287. else if (isObject(object)) {
  14288. accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
  14289. }
  14290. else {
  14291. accumulator = {};
  14292. }
  14293. }
  14294. (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {
  14295. return iteratee(accumulator, value, index, object);
  14296. });
  14297. return accumulator;
  14298. }
  14299. /**
  14300. * Removes the property at `path` of `object`.
  14301. *
  14302. * **Note:** This method mutates `object`.
  14303. *
  14304. * @static
  14305. * @memberOf _
  14306. * @since 4.0.0
  14307. * @category Object
  14308. * @param {Object} object The object to modify.
  14309. * @param {Array|string} path The path of the property to unset.
  14310. * @returns {boolean} Returns `true` if the property is deleted, else `false`.
  14311. * @example
  14312. *
  14313. * var object = { 'a': [{ 'b': { 'c': 7 } }] };
  14314. * _.unset(object, 'a[0].b.c');
  14315. * // => true
  14316. *
  14317. * console.log(object);
  14318. * // => { 'a': [{ 'b': {} }] };
  14319. *
  14320. * _.unset(object, ['a', '0', 'b', 'c']);
  14321. * // => true
  14322. *
  14323. * console.log(object);
  14324. * // => { 'a': [{ 'b': {} }] };
  14325. */
  14326. function unset(object, path) {
  14327. return object == null ? true : baseUnset(object, path);
  14328. }
  14329. /**
  14330. * This method is like `_.set` except that accepts `updater` to produce the
  14331. * value to set. Use `_.updateWith` to customize `path` creation. The `updater`
  14332. * is invoked with one argument: (value).
  14333. *
  14334. * **Note:** This method mutates `object`.
  14335. *
  14336. * @static
  14337. * @memberOf _
  14338. * @since 4.6.0
  14339. * @category Object
  14340. * @param {Object} object The object to modify.
  14341. * @param {Array|string} path The path of the property to set.
  14342. * @param {Function} updater The function to produce the updated value.
  14343. * @returns {Object} Returns `object`.
  14344. * @example
  14345. *
  14346. * var object = { 'a': [{ 'b': { 'c': 3 } }] };
  14347. *
  14348. * _.update(object, 'a[0].b.c', function(n) { return n * n; });
  14349. * console.log(object.a[0].b.c);
  14350. * // => 9
  14351. *
  14352. * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });
  14353. * console.log(object.x[0].y.z);
  14354. * // => 0
  14355. */
  14356. function update(object, path, updater) {
  14357. return object == null ? object : baseUpdate(object, path, castFunction(updater));
  14358. }
  14359. /**
  14360. * This method is like `_.update` except that it accepts `customizer` which is
  14361. * invoked to produce the objects of `path`. If `customizer` returns `undefined`
  14362. * path creation is handled by the method instead. The `customizer` is invoked
  14363. * with three arguments: (nsValue, key, nsObject).
  14364. *
  14365. * **Note:** This method mutates `object`.
  14366. *
  14367. * @static
  14368. * @memberOf _
  14369. * @since 4.6.0
  14370. * @category Object
  14371. * @param {Object} object The object to modify.
  14372. * @param {Array|string} path The path of the property to set.
  14373. * @param {Function} updater The function to produce the updated value.
  14374. * @param {Function} [customizer] The function to customize assigned values.
  14375. * @returns {Object} Returns `object`.
  14376. * @example
  14377. *
  14378. * var object = {};
  14379. *
  14380. * _.updateWith(object, '[0][1]', _.constant('a'), Object);
  14381. * // => { '0': { '1': 'a' } }
  14382. */
  14383. function updateWith(object, path, updater, customizer) {
  14384. customizer = typeof customizer == 'function' ? customizer : undefined;
  14385. return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);
  14386. }
  14387. /**
  14388. * Creates an array of the own enumerable string keyed property values of `object`.
  14389. *
  14390. * **Note:** Non-object values are coerced to objects.
  14391. *
  14392. * @static
  14393. * @since 0.1.0
  14394. * @memberOf _
  14395. * @category Object
  14396. * @param {Object} object The object to query.
  14397. * @returns {Array} Returns the array of property values.
  14398. * @example
  14399. *
  14400. * function Foo() {
  14401. * this.a = 1;
  14402. * this.b = 2;
  14403. * }
  14404. *
  14405. * Foo.prototype.c = 3;
  14406. *
  14407. * _.values(new Foo);
  14408. * // => [1, 2] (iteration order is not guaranteed)
  14409. *
  14410. * _.values('hi');
  14411. * // => ['h', 'i']
  14412. */
  14413. function values(object) {
  14414. return object == null ? [] : baseValues(object, keys(object));
  14415. }
  14416. /**
  14417. * Creates an array of the own and inherited enumerable string keyed property
  14418. * values of `object`.
  14419. *
  14420. * **Note:** Non-object values are coerced to objects.
  14421. *
  14422. * @static
  14423. * @memberOf _
  14424. * @since 3.0.0
  14425. * @category Object
  14426. * @param {Object} object The object to query.
  14427. * @returns {Array} Returns the array of property values.
  14428. * @example
  14429. *
  14430. * function Foo() {
  14431. * this.a = 1;
  14432. * this.b = 2;
  14433. * }
  14434. *
  14435. * Foo.prototype.c = 3;
  14436. *
  14437. * _.valuesIn(new Foo);
  14438. * // => [1, 2, 3] (iteration order is not guaranteed)
  14439. */
  14440. function valuesIn(object) {
  14441. return object == null ? [] : baseValues(object, keysIn(object));
  14442. }
  14443. /*------------------------------------------------------------------------*/
  14444. /**
  14445. * Clamps `number` within the inclusive `lower` and `upper` bounds.
  14446. *
  14447. * @static
  14448. * @memberOf _
  14449. * @since 4.0.0
  14450. * @category Number
  14451. * @param {number} number The number to clamp.
  14452. * @param {number} [lower] The lower bound.
  14453. * @param {number} upper The upper bound.
  14454. * @returns {number} Returns the clamped number.
  14455. * @example
  14456. *
  14457. * _.clamp(-10, -5, 5);
  14458. * // => -5
  14459. *
  14460. * _.clamp(10, -5, 5);
  14461. * // => 5
  14462. */
  14463. function clamp(number, lower, upper) {
  14464. if (upper === undefined) {
  14465. upper = lower;
  14466. lower = undefined;
  14467. }
  14468. if (upper !== undefined) {
  14469. upper = toNumber(upper);
  14470. upper = upper === upper ? upper : 0;
  14471. }
  14472. if (lower !== undefined) {
  14473. lower = toNumber(lower);
  14474. lower = lower === lower ? lower : 0;
  14475. }
  14476. return baseClamp(toNumber(number), lower, upper);
  14477. }
  14478. /**
  14479. * Checks if `n` is between `start` and up to, but not including, `end`. If
  14480. * `end` is not specified, it's set to `start` with `start` then set to `0`.
  14481. * If `start` is greater than `end` the params are swapped to support
  14482. * negative ranges.
  14483. *
  14484. * @static
  14485. * @memberOf _
  14486. * @since 3.3.0
  14487. * @category Number
  14488. * @param {number} number The number to check.
  14489. * @param {number} [start=0] The start of the range.
  14490. * @param {number} end The end of the range.
  14491. * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
  14492. * @see _.range, _.rangeRight
  14493. * @example
  14494. *
  14495. * _.inRange(3, 2, 4);
  14496. * // => true
  14497. *
  14498. * _.inRange(4, 8);
  14499. * // => true
  14500. *
  14501. * _.inRange(4, 2);
  14502. * // => false
  14503. *
  14504. * _.inRange(2, 2);
  14505. * // => false
  14506. *
  14507. * _.inRange(1.2, 2);
  14508. * // => true
  14509. *
  14510. * _.inRange(5.2, 4);
  14511. * // => false
  14512. *
  14513. * _.inRange(-3, -2, -6);
  14514. * // => true
  14515. */
  14516. function inRange(number, start, end) {
  14517. start = toFinite(start);
  14518. if (end === undefined) {
  14519. end = start;
  14520. start = 0;
  14521. } else {
  14522. end = toFinite(end);
  14523. }
  14524. number = toNumber(number);
  14525. return baseInRange(number, start, end);
  14526. }
  14527. /**
  14528. * Produces a random number between the inclusive `lower` and `upper` bounds.
  14529. * If only one argument is provided a number between `0` and the given number
  14530. * is returned. If `floating` is `true`, or either `lower` or `upper` are
  14531. * floats, a floating-point number is returned instead of an integer.
  14532. *
  14533. * **Note:** JavaScript follows the IEEE-754 standard for resolving
  14534. * floating-point values which can produce unexpected results.
  14535. *
  14536. * @static
  14537. * @memberOf _
  14538. * @since 0.7.0
  14539. * @category Number
  14540. * @param {number} [lower=0] The lower bound.
  14541. * @param {number} [upper=1] The upper bound.
  14542. * @param {boolean} [floating] Specify returning a floating-point number.
  14543. * @returns {number} Returns the random number.
  14544. * @example
  14545. *
  14546. * _.random(0, 5);
  14547. * // => an integer between 0 and 5
  14548. *
  14549. * _.random(5);
  14550. * // => also an integer between 0 and 5
  14551. *
  14552. * _.random(5, true);
  14553. * // => a floating-point number between 0 and 5
  14554. *
  14555. * _.random(1.2, 5.2);
  14556. * // => a floating-point number between 1.2 and 5.2
  14557. */
  14558. function random(lower, upper, floating) {
  14559. if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {
  14560. upper = floating = undefined;
  14561. }
  14562. if (floating === undefined) {
  14563. if (typeof upper == 'boolean') {
  14564. floating = upper;
  14565. upper = undefined;
  14566. }
  14567. else if (typeof lower == 'boolean') {
  14568. floating = lower;
  14569. lower = undefined;
  14570. }
  14571. }
  14572. if (lower === undefined && upper === undefined) {
  14573. lower = 0;
  14574. upper = 1;
  14575. }
  14576. else {
  14577. lower = toFinite(lower);
  14578. if (upper === undefined) {
  14579. upper = lower;
  14580. lower = 0;
  14581. } else {
  14582. upper = toFinite(upper);
  14583. }
  14584. }
  14585. if (lower > upper) {
  14586. var temp = lower;
  14587. lower = upper;
  14588. upper = temp;
  14589. }
  14590. if (floating || lower % 1 || upper % 1) {
  14591. var rand = nativeRandom();
  14592. return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);
  14593. }
  14594. return baseRandom(lower, upper);
  14595. }
  14596. /*------------------------------------------------------------------------*/
  14597. /**
  14598. * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
  14599. *
  14600. * @static
  14601. * @memberOf _
  14602. * @since 3.0.0
  14603. * @category String
  14604. * @param {string} [string=''] The string to convert.
  14605. * @returns {string} Returns the camel cased string.
  14606. * @example
  14607. *
  14608. * _.camelCase('Foo Bar');
  14609. * // => 'fooBar'
  14610. *
  14611. * _.camelCase('--foo-bar--');
  14612. * // => 'fooBar'
  14613. *
  14614. * _.camelCase('__FOO_BAR__');
  14615. * // => 'fooBar'
  14616. */
  14617. var camelCase = createCompounder(function(result, word, index) {
  14618. word = word.toLowerCase();
  14619. return result + (index ? capitalize(word) : word);
  14620. });
  14621. /**
  14622. * Converts the first character of `string` to upper case and the remaining
  14623. * to lower case.
  14624. *
  14625. * @static
  14626. * @memberOf _
  14627. * @since 3.0.0
  14628. * @category String
  14629. * @param {string} [string=''] The string to capitalize.
  14630. * @returns {string} Returns the capitalized string.
  14631. * @example
  14632. *
  14633. * _.capitalize('FRED');
  14634. * // => 'Fred'
  14635. */
  14636. function capitalize(string) {
  14637. return upperFirst(toString(string).toLowerCase());
  14638. }
  14639. /**
  14640. * Deburrs `string` by converting
  14641. * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
  14642. * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
  14643. * letters to basic Latin letters and removing
  14644. * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
  14645. *
  14646. * @static
  14647. * @memberOf _
  14648. * @since 3.0.0
  14649. * @category String
  14650. * @param {string} [string=''] The string to deburr.
  14651. * @returns {string} Returns the deburred string.
  14652. * @example
  14653. *
  14654. * _.deburr('déjà vu');
  14655. * // => 'deja vu'
  14656. */
  14657. function deburr(string) {
  14658. string = toString(string);
  14659. return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');
  14660. }
  14661. /**
  14662. * Checks if `string` ends with the given target string.
  14663. *
  14664. * @static
  14665. * @memberOf _
  14666. * @since 3.0.0
  14667. * @category String
  14668. * @param {string} [string=''] The string to inspect.
  14669. * @param {string} [target] The string to search for.
  14670. * @param {number} [position=string.length] The position to search up to.
  14671. * @returns {boolean} Returns `true` if `string` ends with `target`,
  14672. * else `false`.
  14673. * @example
  14674. *
  14675. * _.endsWith('abc', 'c');
  14676. * // => true
  14677. *
  14678. * _.endsWith('abc', 'b');
  14679. * // => false
  14680. *
  14681. * _.endsWith('abc', 'b', 2);
  14682. * // => true
  14683. */
  14684. function endsWith(string, target, position) {
  14685. string = toString(string);
  14686. target = baseToString(target);
  14687. var length = string.length;
  14688. position = position === undefined
  14689. ? length
  14690. : baseClamp(toInteger(position), 0, length);
  14691. var end = position;
  14692. position -= target.length;
  14693. return position >= 0 && string.slice(position, end) == target;
  14694. }
  14695. /**
  14696. * Converts the characters "&", "<", ">", '"', and "'" in `string` to their
  14697. * corresponding HTML entities.
  14698. *
  14699. * **Note:** No other characters are escaped. To escape additional
  14700. * characters use a third-party library like [_he_](https://mths.be/he).
  14701. *
  14702. * Though the ">" character is escaped for symmetry, characters like
  14703. * ">" and "/" don't need escaping in HTML and have no special meaning
  14704. * unless they're part of a tag or unquoted attribute value. See
  14705. * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
  14706. * (under "semi-related fun fact") for more details.
  14707. *
  14708. * When working with HTML you should always
  14709. * [quote attribute values](http://wonko.com/post/html-escaping) to reduce
  14710. * XSS vectors.
  14711. *
  14712. * @static
  14713. * @since 0.1.0
  14714. * @memberOf _
  14715. * @category String
  14716. * @param {string} [string=''] The string to escape.
  14717. * @returns {string} Returns the escaped string.
  14718. * @example
  14719. *
  14720. * _.escape('fred, barney, & pebbles');
  14721. * // => 'fred, barney, &amp; pebbles'
  14722. */
  14723. function escape(string) {
  14724. string = toString(string);
  14725. return (string && reHasUnescapedHtml.test(string))
  14726. ? string.replace(reUnescapedHtml, escapeHtmlChar)
  14727. : string;
  14728. }
  14729. /**
  14730. * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+",
  14731. * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`.
  14732. *
  14733. * @static
  14734. * @memberOf _
  14735. * @since 3.0.0
  14736. * @category String
  14737. * @param {string} [string=''] The string to escape.
  14738. * @returns {string} Returns the escaped string.
  14739. * @example
  14740. *
  14741. * _.escapeRegExp('[lodash](https://lodash.com/)');
  14742. * // => '\[lodash\]\(https://lodash\.com/\)'
  14743. */
  14744. function escapeRegExp(string) {
  14745. string = toString(string);
  14746. return (string && reHasRegExpChar.test(string))
  14747. ? string.replace(reRegExpChar, '\\$&')
  14748. : string;
  14749. }
  14750. /**
  14751. * Converts `string` to
  14752. * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).
  14753. *
  14754. * @static
  14755. * @memberOf _
  14756. * @since 3.0.0
  14757. * @category String
  14758. * @param {string} [string=''] The string to convert.
  14759. * @returns {string} Returns the kebab cased string.
  14760. * @example
  14761. *
  14762. * _.kebabCase('Foo Bar');
  14763. * // => 'foo-bar'
  14764. *
  14765. * _.kebabCase('fooBar');
  14766. * // => 'foo-bar'
  14767. *
  14768. * _.kebabCase('__FOO_BAR__');
  14769. * // => 'foo-bar'
  14770. */
  14771. var kebabCase = createCompounder(function(result, word, index) {
  14772. return result + (index ? '-' : '') + word.toLowerCase();
  14773. });
  14774. /**
  14775. * Converts `string`, as space separated words, to lower case.
  14776. *
  14777. * @static
  14778. * @memberOf _
  14779. * @since 4.0.0
  14780. * @category String
  14781. * @param {string} [string=''] The string to convert.
  14782. * @returns {string} Returns the lower cased string.
  14783. * @example
  14784. *
  14785. * _.lowerCase('--Foo-Bar--');
  14786. * // => 'foo bar'
  14787. *
  14788. * _.lowerCase('fooBar');
  14789. * // => 'foo bar'
  14790. *
  14791. * _.lowerCase('__FOO_BAR__');
  14792. * // => 'foo bar'
  14793. */
  14794. var lowerCase = createCompounder(function(result, word, index) {
  14795. return result + (index ? ' ' : '') + word.toLowerCase();
  14796. });
  14797. /**
  14798. * Converts the first character of `string` to lower case.
  14799. *
  14800. * @static
  14801. * @memberOf _
  14802. * @since 4.0.0
  14803. * @category String
  14804. * @param {string} [string=''] The string to convert.
  14805. * @returns {string} Returns the converted string.
  14806. * @example
  14807. *
  14808. * _.lowerFirst('Fred');
  14809. * // => 'fred'
  14810. *
  14811. * _.lowerFirst('FRED');
  14812. * // => 'fRED'
  14813. */
  14814. var lowerFirst = createCaseFirst('toLowerCase');
  14815. /**
  14816. * Pads `string` on the left and right sides if it's shorter than `length`.
  14817. * Padding characters are truncated if they can't be evenly divided by `length`.
  14818. *
  14819. * @static
  14820. * @memberOf _
  14821. * @since 3.0.0
  14822. * @category String
  14823. * @param {string} [string=''] The string to pad.
  14824. * @param {number} [length=0] The padding length.
  14825. * @param {string} [chars=' '] The string used as padding.
  14826. * @returns {string} Returns the padded string.
  14827. * @example
  14828. *
  14829. * _.pad('abc', 8);
  14830. * // => ' abc '
  14831. *
  14832. * _.pad('abc', 8, '_-');
  14833. * // => '_-abc_-_'
  14834. *
  14835. * _.pad('abc', 3);
  14836. * // => 'abc'
  14837. */
  14838. function pad(string, length, chars) {
  14839. string = toString(string);
  14840. length = toInteger(length);
  14841. var strLength = length ? stringSize(string) : 0;
  14842. if (!length || strLength >= length) {
  14843. return string;
  14844. }
  14845. var mid = (length - strLength) / 2;
  14846. return (
  14847. createPadding(nativeFloor(mid), chars) +
  14848. string +
  14849. createPadding(nativeCeil(mid), chars)
  14850. );
  14851. }
  14852. /**
  14853. * Pads `string` on the right side if it's shorter than `length`. Padding
  14854. * characters are truncated if they exceed `length`.
  14855. *
  14856. * @static
  14857. * @memberOf _
  14858. * @since 4.0.0
  14859. * @category String
  14860. * @param {string} [string=''] The string to pad.
  14861. * @param {number} [length=0] The padding length.
  14862. * @param {string} [chars=' '] The string used as padding.
  14863. * @returns {string} Returns the padded string.
  14864. * @example
  14865. *
  14866. * _.padEnd('abc', 6);
  14867. * // => 'abc '
  14868. *
  14869. * _.padEnd('abc', 6, '_-');
  14870. * // => 'abc_-_'
  14871. *
  14872. * _.padEnd('abc', 3);
  14873. * // => 'abc'
  14874. */
  14875. function padEnd(string, length, chars) {
  14876. string = toString(string);
  14877. length = toInteger(length);
  14878. var strLength = length ? stringSize(string) : 0;
  14879. return (length && strLength < length)
  14880. ? (string + createPadding(length - strLength, chars))
  14881. : string;
  14882. }
  14883. /**
  14884. * Pads `string` on the left side if it's shorter than `length`. Padding
  14885. * characters are truncated if they exceed `length`.
  14886. *
  14887. * @static
  14888. * @memberOf _
  14889. * @since 4.0.0
  14890. * @category String
  14891. * @param {string} [string=''] The string to pad.
  14892. * @param {number} [length=0] The padding length.
  14893. * @param {string} [chars=' '] The string used as padding.
  14894. * @returns {string} Returns the padded string.
  14895. * @example
  14896. *
  14897. * _.padStart('abc', 6);
  14898. * // => ' abc'
  14899. *
  14900. * _.padStart('abc', 6, '_-');
  14901. * // => '_-_abc'
  14902. *
  14903. * _.padStart('abc', 3);
  14904. * // => 'abc'
  14905. */
  14906. function padStart(string, length, chars) {
  14907. string = toString(string);
  14908. length = toInteger(length);
  14909. var strLength = length ? stringSize(string) : 0;
  14910. return (length && strLength < length)
  14911. ? (createPadding(length - strLength, chars) + string)
  14912. : string;
  14913. }
  14914. /**
  14915. * Converts `string` to an integer of the specified radix. If `radix` is
  14916. * `undefined` or `0`, a `radix` of `10` is used unless `value` is a
  14917. * hexadecimal, in which case a `radix` of `16` is used.
  14918. *
  14919. * **Note:** This method aligns with the
  14920. * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.
  14921. *
  14922. * @static
  14923. * @memberOf _
  14924. * @since 1.1.0
  14925. * @category String
  14926. * @param {string} string The string to convert.
  14927. * @param {number} [radix=10] The radix to interpret `value` by.
  14928. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  14929. * @returns {number} Returns the converted integer.
  14930. * @example
  14931. *
  14932. * _.parseInt('08');
  14933. * // => 8
  14934. *
  14935. * _.map(['6', '08', '10'], _.parseInt);
  14936. * // => [6, 8, 10]
  14937. */
  14938. function parseInt(string, radix, guard) {
  14939. if (guard || radix == null) {
  14940. radix = 0;
  14941. } else if (radix) {
  14942. radix = +radix;
  14943. }
  14944. return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);
  14945. }
  14946. /**
  14947. * Repeats the given string `n` times.
  14948. *
  14949. * @static
  14950. * @memberOf _
  14951. * @since 3.0.0
  14952. * @category String
  14953. * @param {string} [string=''] The string to repeat.
  14954. * @param {number} [n=1] The number of times to repeat the string.
  14955. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  14956. * @returns {string} Returns the repeated string.
  14957. * @example
  14958. *
  14959. * _.repeat('*', 3);
  14960. * // => '***'
  14961. *
  14962. * _.repeat('abc', 2);
  14963. * // => 'abcabc'
  14964. *
  14965. * _.repeat('abc', 0);
  14966. * // => ''
  14967. */
  14968. function repeat(string, n, guard) {
  14969. if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {
  14970. n = 1;
  14971. } else {
  14972. n = toInteger(n);
  14973. }
  14974. return baseRepeat(toString(string), n);
  14975. }
  14976. /**
  14977. * Replaces matches for `pattern` in `string` with `replacement`.
  14978. *
  14979. * **Note:** This method is based on
  14980. * [`String#replace`](https://mdn.io/String/replace).
  14981. *
  14982. * @static
  14983. * @memberOf _
  14984. * @since 4.0.0
  14985. * @category String
  14986. * @param {string} [string=''] The string to modify.
  14987. * @param {RegExp|string} pattern The pattern to replace.
  14988. * @param {Function|string} replacement The match replacement.
  14989. * @returns {string} Returns the modified string.
  14990. * @example
  14991. *
  14992. * _.replace('Hi Fred', 'Fred', 'Barney');
  14993. * // => 'Hi Barney'
  14994. */
  14995. function replace() {
  14996. var args = arguments,
  14997. string = toString(args[0]);
  14998. return args.length < 3 ? string : string.replace(args[1], args[2]);
  14999. }
  15000. /**
  15001. * Converts `string` to
  15002. * [snake case](https://en.wikipedia.org/wiki/Snake_case).
  15003. *
  15004. * @static
  15005. * @memberOf _
  15006. * @since 3.0.0
  15007. * @category String
  15008. * @param {string} [string=''] The string to convert.
  15009. * @returns {string} Returns the snake cased string.
  15010. * @example
  15011. *
  15012. * _.snakeCase('Foo Bar');
  15013. * // => 'foo_bar'
  15014. *
  15015. * _.snakeCase('fooBar');
  15016. * // => 'foo_bar'
  15017. *
  15018. * _.snakeCase('--FOO-BAR--');
  15019. * // => 'foo_bar'
  15020. */
  15021. var snakeCase = createCompounder(function(result, word, index) {
  15022. return result + (index ? '_' : '') + word.toLowerCase();
  15023. });
  15024. /**
  15025. * Splits `string` by `separator`.
  15026. *
  15027. * **Note:** This method is based on
  15028. * [`String#split`](https://mdn.io/String/split).
  15029. *
  15030. * @static
  15031. * @memberOf _
  15032. * @since 4.0.0
  15033. * @category String
  15034. * @param {string} [string=''] The string to split.
  15035. * @param {RegExp|string} separator The separator pattern to split by.
  15036. * @param {number} [limit] The length to truncate results to.
  15037. * @returns {Array} Returns the string segments.
  15038. * @example
  15039. *
  15040. * _.split('a-b-c', '-', 2);
  15041. * // => ['a', 'b']
  15042. */
  15043. function split(string, separator, limit) {
  15044. if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {
  15045. separator = limit = undefined;
  15046. }
  15047. limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;
  15048. if (!limit) {
  15049. return [];
  15050. }
  15051. string = toString(string);
  15052. if (string && (
  15053. typeof separator == 'string' ||
  15054. (separator != null && !isRegExp(separator))
  15055. )) {
  15056. separator = baseToString(separator);
  15057. if (!separator && hasUnicode(string)) {
  15058. return castSlice(stringToArray(string), 0, limit);
  15059. }
  15060. }
  15061. return string.split(separator, limit);
  15062. }
  15063. /**
  15064. * Converts `string` to
  15065. * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).
  15066. *
  15067. * @static
  15068. * @memberOf _
  15069. * @since 3.1.0
  15070. * @category String
  15071. * @param {string} [string=''] The string to convert.
  15072. * @returns {string} Returns the start cased string.
  15073. * @example
  15074. *
  15075. * _.startCase('--foo-bar--');
  15076. * // => 'Foo Bar'
  15077. *
  15078. * _.startCase('fooBar');
  15079. * // => 'Foo Bar'
  15080. *
  15081. * _.startCase('__FOO_BAR__');
  15082. * // => 'FOO BAR'
  15083. */
  15084. var startCase = createCompounder(function(result, word, index) {
  15085. return result + (index ? ' ' : '') + upperFirst(word);
  15086. });
  15087. /**
  15088. * Checks if `string` starts with the given target string.
  15089. *
  15090. * @static
  15091. * @memberOf _
  15092. * @since 3.0.0
  15093. * @category String
  15094. * @param {string} [string=''] The string to inspect.
  15095. * @param {string} [target] The string to search for.
  15096. * @param {number} [position=0] The position to search from.
  15097. * @returns {boolean} Returns `true` if `string` starts with `target`,
  15098. * else `false`.
  15099. * @example
  15100. *
  15101. * _.startsWith('abc', 'a');
  15102. * // => true
  15103. *
  15104. * _.startsWith('abc', 'b');
  15105. * // => false
  15106. *
  15107. * _.startsWith('abc', 'b', 1);
  15108. * // => true
  15109. */
  15110. function startsWith(string, target, position) {
  15111. string = toString(string);
  15112. position = position == null
  15113. ? 0
  15114. : baseClamp(toInteger(position), 0, string.length);
  15115. target = baseToString(target);
  15116. return string.slice(position, position + target.length) == target;
  15117. }
  15118. /**
  15119. * Creates a compiled template function that can interpolate data properties
  15120. * in "interpolate" delimiters, HTML-escape interpolated data properties in
  15121. * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data
  15122. * properties may be accessed as free variables in the template. If a setting
  15123. * object is given, it takes precedence over `_.templateSettings` values.
  15124. *
  15125. * **Note:** In the development build `_.template` utilizes
  15126. * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
  15127. * for easier debugging.
  15128. *
  15129. * For more information on precompiling templates see
  15130. * [lodash's custom builds documentation](https://lodash.com/custom-builds).
  15131. *
  15132. * For more information on Chrome extension sandboxes see
  15133. * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).
  15134. *
  15135. * @static
  15136. * @since 0.1.0
  15137. * @memberOf _
  15138. * @category String
  15139. * @param {string} [string=''] The template string.
  15140. * @param {Object} [options={}] The options object.
  15141. * @param {RegExp} [options.escape=_.templateSettings.escape]
  15142. * The HTML "escape" delimiter.
  15143. * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]
  15144. * The "evaluate" delimiter.
  15145. * @param {Object} [options.imports=_.templateSettings.imports]
  15146. * An object to import into the template as free variables.
  15147. * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]
  15148. * The "interpolate" delimiter.
  15149. * @param {string} [options.sourceURL='lodash.templateSources[n]']
  15150. * The sourceURL of the compiled template.
  15151. * @param {string} [options.variable='obj']
  15152. * The data object variable name.
  15153. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  15154. * @returns {Function} Returns the compiled template function.
  15155. * @example
  15156. *
  15157. * // Use the "interpolate" delimiter to create a compiled template.
  15158. * var compiled = _.template('hello <%= user %>!');
  15159. * compiled({ 'user': 'fred' });
  15160. * // => 'hello fred!'
  15161. *
  15162. * // Use the HTML "escape" delimiter to escape data property values.
  15163. * var compiled = _.template('<b><%- value %></b>');
  15164. * compiled({ 'value': '<script>' });
  15165. * // => '<b>&lt;script&gt;</b>'
  15166. *
  15167. * // Use the "evaluate" delimiter to execute JavaScript and generate HTML.
  15168. * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');
  15169. * compiled({ 'users': ['fred', 'barney'] });
  15170. * // => '<li>fred</li><li>barney</li>'
  15171. *
  15172. * // Use the internal `print` function in "evaluate" delimiters.
  15173. * var compiled = _.template('<% print("hello " + user); %>!');
  15174. * compiled({ 'user': 'barney' });
  15175. * // => 'hello barney!'
  15176. *
  15177. * // Use the ES template literal delimiter as an "interpolate" delimiter.
  15178. * // Disable support by replacing the "interpolate" delimiter.
  15179. * var compiled = _.template('hello ${ user }!');
  15180. * compiled({ 'user': 'pebbles' });
  15181. * // => 'hello pebbles!'
  15182. *
  15183. * // Use backslashes to treat delimiters as plain text.
  15184. * var compiled = _.template('<%= "\\<%- value %\\>" %>');
  15185. * compiled({ 'value': 'ignored' });
  15186. * // => '<%- value %>'
  15187. *
  15188. * // Use the `imports` option to import `jQuery` as `jq`.
  15189. * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';
  15190. * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });
  15191. * compiled({ 'users': ['fred', 'barney'] });
  15192. * // => '<li>fred</li><li>barney</li>'
  15193. *
  15194. * // Use the `sourceURL` option to specify a custom sourceURL for the template.
  15195. * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });
  15196. * compiled(data);
  15197. * // => Find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector.
  15198. *
  15199. * // Use the `variable` option to ensure a with-statement isn't used in the compiled template.
  15200. * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });
  15201. * compiled.source;
  15202. * // => function(data) {
  15203. * // var __t, __p = '';
  15204. * // __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';
  15205. * // return __p;
  15206. * // }
  15207. *
  15208. * // Use custom template delimiters.
  15209. * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g;
  15210. * var compiled = _.template('hello {{ user }}!');
  15211. * compiled({ 'user': 'mustache' });
  15212. * // => 'hello mustache!'
  15213. *
  15214. * // Use the `source` property to inline compiled templates for meaningful
  15215. * // line numbers in error messages and stack traces.
  15216. * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\
  15217. * var JST = {\
  15218. * "main": ' + _.template(mainText).source + '\
  15219. * };\
  15220. * ');
  15221. */
  15222. function template(string, options, guard) {
  15223. // Based on John Resig's `tmpl` implementation
  15224. // (http://ejohn.org/blog/javascript-micro-templating/)
  15225. // and Laura Doktorova's doT.js (https://github.com/olado/doT).
  15226. var settings = lodash.templateSettings;
  15227. if (guard && isIterateeCall(string, options, guard)) {
  15228. options = undefined;
  15229. }
  15230. string = toString(string);
  15231. options = assignInWith({}, options, settings, customDefaultsAssignIn);
  15232. var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn),
  15233. importsKeys = keys(imports),
  15234. importsValues = baseValues(imports, importsKeys);
  15235. var isEscaping,
  15236. isEvaluating,
  15237. index = 0,
  15238. interpolate = options.interpolate || reNoMatch,
  15239. source = "__p += '";
  15240. // Compile the regexp to match each delimiter.
  15241. var reDelimiters = RegExp(
  15242. (options.escape || reNoMatch).source + '|' +
  15243. interpolate.source + '|' +
  15244. (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +
  15245. (options.evaluate || reNoMatch).source + '|$'
  15246. , 'g');
  15247. // Use a sourceURL for easier debugging.
  15248. // The sourceURL gets injected into the source that's eval-ed, so be careful
  15249. // to normalize all kinds of whitespace, so e.g. newlines (and unicode versions of it) can't sneak in
  15250. // and escape the comment, thus injecting code that gets evaled.
  15251. var sourceURL = '//# sourceURL=' +
  15252. (hasOwnProperty.call(options, 'sourceURL')
  15253. ? (options.sourceURL + '').replace(/\s/g, ' ')
  15254. : ('lodash.templateSources[' + (++templateCounter) + ']')
  15255. ) + '\n';
  15256. string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
  15257. interpolateValue || (interpolateValue = esTemplateValue);
  15258. // Escape characters that can't be included in string literals.
  15259. source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);
  15260. // Replace delimiters with snippets.
  15261. if (escapeValue) {
  15262. isEscaping = true;
  15263. source += "' +\n__e(" + escapeValue + ") +\n'";
  15264. }
  15265. if (evaluateValue) {
  15266. isEvaluating = true;
  15267. source += "';\n" + evaluateValue + ";\n__p += '";
  15268. }
  15269. if (interpolateValue) {
  15270. source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
  15271. }
  15272. index = offset + match.length;
  15273. // The JS engine embedded in Adobe products needs `match` returned in
  15274. // order to produce the correct `offset` value.
  15275. return match;
  15276. });
  15277. source += "';\n";
  15278. // If `variable` is not specified wrap a with-statement around the generated
  15279. // code to add the data object to the top of the scope chain.
  15280. var variable = hasOwnProperty.call(options, 'variable') && options.variable;
  15281. if (!variable) {
  15282. source = 'with (obj) {\n' + source + '\n}\n';
  15283. }
  15284. // Throw an error if a forbidden character was found in `variable`, to prevent
  15285. // potential command injection attacks.
  15286. else if (reForbiddenIdentifierChars.test(variable)) {
  15287. throw new Error(INVALID_TEMPL_VAR_ERROR_TEXT);
  15288. }
  15289. // Cleanup code by stripping empty strings.
  15290. source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)
  15291. .replace(reEmptyStringMiddle, '$1')
  15292. .replace(reEmptyStringTrailing, '$1;');
  15293. // Frame code as the function body.
  15294. source = 'function(' + (variable || 'obj') + ') {\n' +
  15295. (variable
  15296. ? ''
  15297. : 'obj || (obj = {});\n'
  15298. ) +
  15299. "var __t, __p = ''" +
  15300. (isEscaping
  15301. ? ', __e = _.escape'
  15302. : ''
  15303. ) +
  15304. (isEvaluating
  15305. ? ', __j = Array.prototype.join;\n' +
  15306. "function print() { __p += __j.call(arguments, '') }\n"
  15307. : ';\n'
  15308. ) +
  15309. source +
  15310. 'return __p\n}';
  15311. var result = attempt(function() {
  15312. return Function(importsKeys, sourceURL + 'return ' + source)
  15313. .apply(undefined, importsValues);
  15314. });
  15315. // Provide the compiled function's source by its `toString` method or
  15316. // the `source` property as a convenience for inlining compiled templates.
  15317. result.source = source;
  15318. if (isError(result)) {
  15319. throw result;
  15320. }
  15321. return result;
  15322. }
  15323. /**
  15324. * Converts `string`, as a whole, to lower case just like
  15325. * [String#toLowerCase](https://mdn.io/toLowerCase).
  15326. *
  15327. * @static
  15328. * @memberOf _
  15329. * @since 4.0.0
  15330. * @category String
  15331. * @param {string} [string=''] The string to convert.
  15332. * @returns {string} Returns the lower cased string.
  15333. * @example
  15334. *
  15335. * _.toLower('--Foo-Bar--');
  15336. * // => '--foo-bar--'
  15337. *
  15338. * _.toLower('fooBar');
  15339. * // => 'foobar'
  15340. *
  15341. * _.toLower('__FOO_BAR__');
  15342. * // => '__foo_bar__'
  15343. */
  15344. function toLower(value) {
  15345. return toString(value).toLowerCase();
  15346. }
  15347. /**
  15348. * Converts `string`, as a whole, to upper case just like
  15349. * [String#toUpperCase](https://mdn.io/toUpperCase).
  15350. *
  15351. * @static
  15352. * @memberOf _
  15353. * @since 4.0.0
  15354. * @category String
  15355. * @param {string} [string=''] The string to convert.
  15356. * @returns {string} Returns the upper cased string.
  15357. * @example
  15358. *
  15359. * _.toUpper('--foo-bar--');
  15360. * // => '--FOO-BAR--'
  15361. *
  15362. * _.toUpper('fooBar');
  15363. * // => 'FOOBAR'
  15364. *
  15365. * _.toUpper('__foo_bar__');
  15366. * // => '__FOO_BAR__'
  15367. */
  15368. function toUpper(value) {
  15369. return toString(value).toUpperCase();
  15370. }
  15371. /**
  15372. * Removes leading and trailing whitespace or specified characters from `string`.
  15373. *
  15374. * @static
  15375. * @memberOf _
  15376. * @since 3.0.0
  15377. * @category String
  15378. * @param {string} [string=''] The string to trim.
  15379. * @param {string} [chars=whitespace] The characters to trim.
  15380. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  15381. * @returns {string} Returns the trimmed string.
  15382. * @example
  15383. *
  15384. * _.trim(' abc ');
  15385. * // => 'abc'
  15386. *
  15387. * _.trim('-_-abc-_-', '_-');
  15388. * // => 'abc'
  15389. *
  15390. * _.map([' foo ', ' bar '], _.trim);
  15391. * // => ['foo', 'bar']
  15392. */
  15393. function trim(string, chars, guard) {
  15394. string = toString(string);
  15395. if (string && (guard || chars === undefined)) {
  15396. return baseTrim(string);
  15397. }
  15398. if (!string || !(chars = baseToString(chars))) {
  15399. return string;
  15400. }
  15401. var strSymbols = stringToArray(string),
  15402. chrSymbols = stringToArray(chars),
  15403. start = charsStartIndex(strSymbols, chrSymbols),
  15404. end = charsEndIndex(strSymbols, chrSymbols) + 1;
  15405. return castSlice(strSymbols, start, end).join('');
  15406. }
  15407. /**
  15408. * Removes trailing whitespace or specified characters from `string`.
  15409. *
  15410. * @static
  15411. * @memberOf _
  15412. * @since 4.0.0
  15413. * @category String
  15414. * @param {string} [string=''] The string to trim.
  15415. * @param {string} [chars=whitespace] The characters to trim.
  15416. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  15417. * @returns {string} Returns the trimmed string.
  15418. * @example
  15419. *
  15420. * _.trimEnd(' abc ');
  15421. * // => ' abc'
  15422. *
  15423. * _.trimEnd('-_-abc-_-', '_-');
  15424. * // => '-_-abc'
  15425. */
  15426. function trimEnd(string, chars, guard) {
  15427. string = toString(string);
  15428. if (string && (guard || chars === undefined)) {
  15429. return string.slice(0, trimmedEndIndex(string) + 1);
  15430. }
  15431. if (!string || !(chars = baseToString(chars))) {
  15432. return string;
  15433. }
  15434. var strSymbols = stringToArray(string),
  15435. end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;
  15436. return castSlice(strSymbols, 0, end).join('');
  15437. }
  15438. /**
  15439. * Removes leading whitespace or specified characters from `string`.
  15440. *
  15441. * @static
  15442. * @memberOf _
  15443. * @since 4.0.0
  15444. * @category String
  15445. * @param {string} [string=''] The string to trim.
  15446. * @param {string} [chars=whitespace] The characters to trim.
  15447. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  15448. * @returns {string} Returns the trimmed string.
  15449. * @example
  15450. *
  15451. * _.trimStart(' abc ');
  15452. * // => 'abc '
  15453. *
  15454. * _.trimStart('-_-abc-_-', '_-');
  15455. * // => 'abc-_-'
  15456. */
  15457. function trimStart(string, chars, guard) {
  15458. string = toString(string);
  15459. if (string && (guard || chars === undefined)) {
  15460. return string.replace(reTrimStart, '');
  15461. }
  15462. if (!string || !(chars = baseToString(chars))) {
  15463. return string;
  15464. }
  15465. var strSymbols = stringToArray(string),
  15466. start = charsStartIndex(strSymbols, stringToArray(chars));
  15467. return castSlice(strSymbols, start).join('');
  15468. }
  15469. /**
  15470. * Truncates `string` if it's longer than the given maximum string length.
  15471. * The last characters of the truncated string are replaced with the omission
  15472. * string which defaults to "...".
  15473. *
  15474. * @static
  15475. * @memberOf _
  15476. * @since 4.0.0
  15477. * @category String
  15478. * @param {string} [string=''] The string to truncate.
  15479. * @param {Object} [options={}] The options object.
  15480. * @param {number} [options.length=30] The maximum string length.
  15481. * @param {string} [options.omission='...'] The string to indicate text is omitted.
  15482. * @param {RegExp|string} [options.separator] The separator pattern to truncate to.
  15483. * @returns {string} Returns the truncated string.
  15484. * @example
  15485. *
  15486. * _.truncate('hi-diddly-ho there, neighborino');
  15487. * // => 'hi-diddly-ho there, neighbo...'
  15488. *
  15489. * _.truncate('hi-diddly-ho there, neighborino', {
  15490. * 'length': 24,
  15491. * 'separator': ' '
  15492. * });
  15493. * // => 'hi-diddly-ho there,...'
  15494. *
  15495. * _.truncate('hi-diddly-ho there, neighborino', {
  15496. * 'length': 24,
  15497. * 'separator': /,? +/
  15498. * });
  15499. * // => 'hi-diddly-ho there...'
  15500. *
  15501. * _.truncate('hi-diddly-ho there, neighborino', {
  15502. * 'omission': ' [...]'
  15503. * });
  15504. * // => 'hi-diddly-ho there, neig [...]'
  15505. */
  15506. function truncate(string, options) {
  15507. var length = DEFAULT_TRUNC_LENGTH,
  15508. omission = DEFAULT_TRUNC_OMISSION;
  15509. if (isObject(options)) {
  15510. var separator = 'separator' in options ? options.separator : separator;
  15511. length = 'length' in options ? toInteger(options.length) : length;
  15512. omission = 'omission' in options ? baseToString(options.omission) : omission;
  15513. }
  15514. string = toString(string);
  15515. var strLength = string.length;
  15516. if (hasUnicode(string)) {
  15517. var strSymbols = stringToArray(string);
  15518. strLength = strSymbols.length;
  15519. }
  15520. if (length >= strLength) {
  15521. return string;
  15522. }
  15523. var end = length - stringSize(omission);
  15524. if (end < 1) {
  15525. return omission;
  15526. }
  15527. var result = strSymbols
  15528. ? castSlice(strSymbols, 0, end).join('')
  15529. : string.slice(0, end);
  15530. if (separator === undefined) {
  15531. return result + omission;
  15532. }
  15533. if (strSymbols) {
  15534. end += (result.length - end);
  15535. }
  15536. if (isRegExp(separator)) {
  15537. if (string.slice(end).search(separator)) {
  15538. var match,
  15539. substring = result;
  15540. if (!separator.global) {
  15541. separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g');
  15542. }
  15543. separator.lastIndex = 0;
  15544. while ((match = separator.exec(substring))) {
  15545. var newEnd = match.index;
  15546. }
  15547. result = result.slice(0, newEnd === undefined ? end : newEnd);
  15548. }
  15549. } else if (string.indexOf(baseToString(separator), end) != end) {
  15550. var index = result.lastIndexOf(separator);
  15551. if (index > -1) {
  15552. result = result.slice(0, index);
  15553. }
  15554. }
  15555. return result + omission;
  15556. }
  15557. /**
  15558. * The inverse of `_.escape`; this method converts the HTML entities
  15559. * `&amp;`, `&lt;`, `&gt;`, `&quot;`, and `&#39;` in `string` to
  15560. * their corresponding characters.
  15561. *
  15562. * **Note:** No other HTML entities are unescaped. To unescape additional
  15563. * HTML entities use a third-party library like [_he_](https://mths.be/he).
  15564. *
  15565. * @static
  15566. * @memberOf _
  15567. * @since 0.6.0
  15568. * @category String
  15569. * @param {string} [string=''] The string to unescape.
  15570. * @returns {string} Returns the unescaped string.
  15571. * @example
  15572. *
  15573. * _.unescape('fred, barney, &amp; pebbles');
  15574. * // => 'fred, barney, & pebbles'
  15575. */
  15576. function unescape(string) {
  15577. string = toString(string);
  15578. return (string && reHasEscapedHtml.test(string))
  15579. ? string.replace(reEscapedHtml, unescapeHtmlChar)
  15580. : string;
  15581. }
  15582. /**
  15583. * Converts `string`, as space separated words, to upper case.
  15584. *
  15585. * @static
  15586. * @memberOf _
  15587. * @since 4.0.0
  15588. * @category String
  15589. * @param {string} [string=''] The string to convert.
  15590. * @returns {string} Returns the upper cased string.
  15591. * @example
  15592. *
  15593. * _.upperCase('--foo-bar');
  15594. * // => 'FOO BAR'
  15595. *
  15596. * _.upperCase('fooBar');
  15597. * // => 'FOO BAR'
  15598. *
  15599. * _.upperCase('__foo_bar__');
  15600. * // => 'FOO BAR'
  15601. */
  15602. var upperCase = createCompounder(function(result, word, index) {
  15603. return result + (index ? ' ' : '') + word.toUpperCase();
  15604. });
  15605. /**
  15606. * Converts the first character of `string` to upper case.
  15607. *
  15608. * @static
  15609. * @memberOf _
  15610. * @since 4.0.0
  15611. * @category String
  15612. * @param {string} [string=''] The string to convert.
  15613. * @returns {string} Returns the converted string.
  15614. * @example
  15615. *
  15616. * _.upperFirst('fred');
  15617. * // => 'Fred'
  15618. *
  15619. * _.upperFirst('FRED');
  15620. * // => 'FRED'
  15621. */
  15622. var upperFirst = createCaseFirst('toUpperCase');
  15623. /**
  15624. * Splits `string` into an array of its words.
  15625. *
  15626. * @static
  15627. * @memberOf _
  15628. * @since 3.0.0
  15629. * @category String
  15630. * @param {string} [string=''] The string to inspect.
  15631. * @param {RegExp|string} [pattern] The pattern to match words.
  15632. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  15633. * @returns {Array} Returns the words of `string`.
  15634. * @example
  15635. *
  15636. * _.words('fred, barney, & pebbles');
  15637. * // => ['fred', 'barney', 'pebbles']
  15638. *
  15639. * _.words('fred, barney, & pebbles', /[^, ]+/g);
  15640. * // => ['fred', 'barney', '&', 'pebbles']
  15641. */
  15642. function words(string, pattern, guard) {
  15643. string = toString(string);
  15644. pattern = guard ? undefined : pattern;
  15645. if (pattern === undefined) {
  15646. return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);
  15647. }
  15648. return string.match(pattern) || [];
  15649. }
  15650. /*------------------------------------------------------------------------*/
  15651. /**
  15652. * Attempts to invoke `func`, returning either the result or the caught error
  15653. * object. Any additional arguments are provided to `func` when it's invoked.
  15654. *
  15655. * @static
  15656. * @memberOf _
  15657. * @since 3.0.0
  15658. * @category Util
  15659. * @param {Function} func The function to attempt.
  15660. * @param {...*} [args] The arguments to invoke `func` with.
  15661. * @returns {*} Returns the `func` result or error object.
  15662. * @example
  15663. *
  15664. * // Avoid throwing errors for invalid selectors.
  15665. * var elements = _.attempt(function(selector) {
  15666. * return document.querySelectorAll(selector);
  15667. * }, '>_>');
  15668. *
  15669. * if (_.isError(elements)) {
  15670. * elements = [];
  15671. * }
  15672. */
  15673. var attempt = baseRest(function(func, args) {
  15674. try {
  15675. return apply(func, undefined, args);
  15676. } catch (e) {
  15677. return isError(e) ? e : new Error(e);
  15678. }
  15679. });
  15680. /**
  15681. * Binds methods of an object to the object itself, overwriting the existing
  15682. * method.
  15683. *
  15684. * **Note:** This method doesn't set the "length" property of bound functions.
  15685. *
  15686. * @static
  15687. * @since 0.1.0
  15688. * @memberOf _
  15689. * @category Util
  15690. * @param {Object} object The object to bind and assign the bound methods to.
  15691. * @param {...(string|string[])} methodNames The object method names to bind.
  15692. * @returns {Object} Returns `object`.
  15693. * @example
  15694. *
  15695. * var view = {
  15696. * 'label': 'docs',
  15697. * 'click': function() {
  15698. * console.log('clicked ' + this.label);
  15699. * }
  15700. * };
  15701. *
  15702. * _.bindAll(view, ['click']);
  15703. * jQuery(element).on('click', view.click);
  15704. * // => Logs 'clicked docs' when clicked.
  15705. */
  15706. var bindAll = flatRest(function(object, methodNames) {
  15707. arrayEach(methodNames, function(key) {
  15708. key = toKey(key);
  15709. baseAssignValue(object, key, bind(object[key], object));
  15710. });
  15711. return object;
  15712. });
  15713. /**
  15714. * Creates a function that iterates over `pairs` and invokes the corresponding
  15715. * function of the first predicate to return truthy. The predicate-function
  15716. * pairs are invoked with the `this` binding and arguments of the created
  15717. * function.
  15718. *
  15719. * @static
  15720. * @memberOf _
  15721. * @since 4.0.0
  15722. * @category Util
  15723. * @param {Array} pairs The predicate-function pairs.
  15724. * @returns {Function} Returns the new composite function.
  15725. * @example
  15726. *
  15727. * var func = _.cond([
  15728. * [_.matches({ 'a': 1 }), _.constant('matches A')],
  15729. * [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],
  15730. * [_.stubTrue, _.constant('no match')]
  15731. * ]);
  15732. *
  15733. * func({ 'a': 1, 'b': 2 });
  15734. * // => 'matches A'
  15735. *
  15736. * func({ 'a': 0, 'b': 1 });
  15737. * // => 'matches B'
  15738. *
  15739. * func({ 'a': '1', 'b': '2' });
  15740. * // => 'no match'
  15741. */
  15742. function cond(pairs) {
  15743. var length = pairs == null ? 0 : pairs.length,
  15744. toIteratee = getIteratee();
  15745. pairs = !length ? [] : arrayMap(pairs, function(pair) {
  15746. if (typeof pair[1] != 'function') {
  15747. throw new TypeError(FUNC_ERROR_TEXT);
  15748. }
  15749. return [toIteratee(pair[0]), pair[1]];
  15750. });
  15751. return baseRest(function(args) {
  15752. var index = -1;
  15753. while (++index < length) {
  15754. var pair = pairs[index];
  15755. if (apply(pair[0], this, args)) {
  15756. return apply(pair[1], this, args);
  15757. }
  15758. }
  15759. });
  15760. }
  15761. /**
  15762. * Creates a function that invokes the predicate properties of `source` with
  15763. * the corresponding property values of a given object, returning `true` if
  15764. * all predicates return truthy, else `false`.
  15765. *
  15766. * **Note:** The created function is equivalent to `_.conformsTo` with
  15767. * `source` partially applied.
  15768. *
  15769. * @static
  15770. * @memberOf _
  15771. * @since 4.0.0
  15772. * @category Util
  15773. * @param {Object} source The object of property predicates to conform to.
  15774. * @returns {Function} Returns the new spec function.
  15775. * @example
  15776. *
  15777. * var objects = [
  15778. * { 'a': 2, 'b': 1 },
  15779. * { 'a': 1, 'b': 2 }
  15780. * ];
  15781. *
  15782. * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } }));
  15783. * // => [{ 'a': 1, 'b': 2 }]
  15784. */
  15785. function conforms(source) {
  15786. return baseConforms(baseClone(source, CLONE_DEEP_FLAG));
  15787. }
  15788. /**
  15789. * Creates a function that returns `value`.
  15790. *
  15791. * @static
  15792. * @memberOf _
  15793. * @since 2.4.0
  15794. * @category Util
  15795. * @param {*} value The value to return from the new function.
  15796. * @returns {Function} Returns the new constant function.
  15797. * @example
  15798. *
  15799. * var objects = _.times(2, _.constant({ 'a': 1 }));
  15800. *
  15801. * console.log(objects);
  15802. * // => [{ 'a': 1 }, { 'a': 1 }]
  15803. *
  15804. * console.log(objects[0] === objects[1]);
  15805. * // => true
  15806. */
  15807. function constant(value) {
  15808. return function() {
  15809. return value;
  15810. };
  15811. }
  15812. /**
  15813. * Checks `value` to determine whether a default value should be returned in
  15814. * its place. The `defaultValue` is returned if `value` is `NaN`, `null`,
  15815. * or `undefined`.
  15816. *
  15817. * @static
  15818. * @memberOf _
  15819. * @since 4.14.0
  15820. * @category Util
  15821. * @param {*} value The value to check.
  15822. * @param {*} defaultValue The default value.
  15823. * @returns {*} Returns the resolved value.
  15824. * @example
  15825. *
  15826. * _.defaultTo(1, 10);
  15827. * // => 1
  15828. *
  15829. * _.defaultTo(undefined, 10);
  15830. * // => 10
  15831. */
  15832. function defaultTo(value, defaultValue) {
  15833. return (value == null || value !== value) ? defaultValue : value;
  15834. }
  15835. /**
  15836. * Creates a function that returns the result of invoking the given functions
  15837. * with the `this` binding of the created function, where each successive
  15838. * invocation is supplied the return value of the previous.
  15839. *
  15840. * @static
  15841. * @memberOf _
  15842. * @since 3.0.0
  15843. * @category Util
  15844. * @param {...(Function|Function[])} [funcs] The functions to invoke.
  15845. * @returns {Function} Returns the new composite function.
  15846. * @see _.flowRight
  15847. * @example
  15848. *
  15849. * function square(n) {
  15850. * return n * n;
  15851. * }
  15852. *
  15853. * var addSquare = _.flow([_.add, square]);
  15854. * addSquare(1, 2);
  15855. * // => 9
  15856. */
  15857. var flow = createFlow();
  15858. /**
  15859. * This method is like `_.flow` except that it creates a function that
  15860. * invokes the given functions from right to left.
  15861. *
  15862. * @static
  15863. * @since 3.0.0
  15864. * @memberOf _
  15865. * @category Util
  15866. * @param {...(Function|Function[])} [funcs] The functions to invoke.
  15867. * @returns {Function} Returns the new composite function.
  15868. * @see _.flow
  15869. * @example
  15870. *
  15871. * function square(n) {
  15872. * return n * n;
  15873. * }
  15874. *
  15875. * var addSquare = _.flowRight([square, _.add]);
  15876. * addSquare(1, 2);
  15877. * // => 9
  15878. */
  15879. var flowRight = createFlow(true);
  15880. /**
  15881. * This method returns the first argument it receives.
  15882. *
  15883. * @static
  15884. * @since 0.1.0
  15885. * @memberOf _
  15886. * @category Util
  15887. * @param {*} value Any value.
  15888. * @returns {*} Returns `value`.
  15889. * @example
  15890. *
  15891. * var object = { 'a': 1 };
  15892. *
  15893. * console.log(_.identity(object) === object);
  15894. * // => true
  15895. */
  15896. function identity(value) {
  15897. return value;
  15898. }
  15899. /**
  15900. * Creates a function that invokes `func` with the arguments of the created
  15901. * function. If `func` is a property name, the created function returns the
  15902. * property value for a given element. If `func` is an array or object, the
  15903. * created function returns `true` for elements that contain the equivalent
  15904. * source properties, otherwise it returns `false`.
  15905. *
  15906. * @static
  15907. * @since 4.0.0
  15908. * @memberOf _
  15909. * @category Util
  15910. * @param {*} [func=_.identity] The value to convert to a callback.
  15911. * @returns {Function} Returns the callback.
  15912. * @example
  15913. *
  15914. * var users = [
  15915. * { 'user': 'barney', 'age': 36, 'active': true },
  15916. * { 'user': 'fred', 'age': 40, 'active': false }
  15917. * ];
  15918. *
  15919. * // The `_.matches` iteratee shorthand.
  15920. * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));
  15921. * // => [{ 'user': 'barney', 'age': 36, 'active': true }]
  15922. *
  15923. * // The `_.matchesProperty` iteratee shorthand.
  15924. * _.filter(users, _.iteratee(['user', 'fred']));
  15925. * // => [{ 'user': 'fred', 'age': 40 }]
  15926. *
  15927. * // The `_.property` iteratee shorthand.
  15928. * _.map(users, _.iteratee('user'));
  15929. * // => ['barney', 'fred']
  15930. *
  15931. * // Create custom iteratee shorthands.
  15932. * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {
  15933. * return !_.isRegExp(func) ? iteratee(func) : function(string) {
  15934. * return func.test(string);
  15935. * };
  15936. * });
  15937. *
  15938. * _.filter(['abc', 'def'], /ef/);
  15939. * // => ['def']
  15940. */
  15941. function iteratee(func) {
  15942. return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG));
  15943. }
  15944. /**
  15945. * Creates a function that performs a partial deep comparison between a given
  15946. * object and `source`, returning `true` if the given object has equivalent
  15947. * property values, else `false`.
  15948. *
  15949. * **Note:** The created function is equivalent to `_.isMatch` with `source`
  15950. * partially applied.
  15951. *
  15952. * Partial comparisons will match empty array and empty object `source`
  15953. * values against any array or object value, respectively. See `_.isEqual`
  15954. * for a list of supported value comparisons.
  15955. *
  15956. * **Note:** Multiple values can be checked by combining several matchers
  15957. * using `_.overSome`
  15958. *
  15959. * @static
  15960. * @memberOf _
  15961. * @since 3.0.0
  15962. * @category Util
  15963. * @param {Object} source The object of property values to match.
  15964. * @returns {Function} Returns the new spec function.
  15965. * @example
  15966. *
  15967. * var objects = [
  15968. * { 'a': 1, 'b': 2, 'c': 3 },
  15969. * { 'a': 4, 'b': 5, 'c': 6 }
  15970. * ];
  15971. *
  15972. * _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));
  15973. * // => [{ 'a': 4, 'b': 5, 'c': 6 }]
  15974. *
  15975. * // Checking for several possible values
  15976. * _.filter(objects, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })]));
  15977. * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]
  15978. */
  15979. function matches(source) {
  15980. return baseMatches(baseClone(source, CLONE_DEEP_FLAG));
  15981. }
  15982. /**
  15983. * Creates a function that performs a partial deep comparison between the
  15984. * value at `path` of a given object to `srcValue`, returning `true` if the
  15985. * object value is equivalent, else `false`.
  15986. *
  15987. * **Note:** Partial comparisons will match empty array and empty object
  15988. * `srcValue` values against any array or object value, respectively. See
  15989. * `_.isEqual` for a list of supported value comparisons.
  15990. *
  15991. * **Note:** Multiple values can be checked by combining several matchers
  15992. * using `_.overSome`
  15993. *
  15994. * @static
  15995. * @memberOf _
  15996. * @since 3.2.0
  15997. * @category Util
  15998. * @param {Array|string} path The path of the property to get.
  15999. * @param {*} srcValue The value to match.
  16000. * @returns {Function} Returns the new spec function.
  16001. * @example
  16002. *
  16003. * var objects = [
  16004. * { 'a': 1, 'b': 2, 'c': 3 },
  16005. * { 'a': 4, 'b': 5, 'c': 6 }
  16006. * ];
  16007. *
  16008. * _.find(objects, _.matchesProperty('a', 4));
  16009. * // => { 'a': 4, 'b': 5, 'c': 6 }
  16010. *
  16011. * // Checking for several possible values
  16012. * _.filter(objects, _.overSome([_.matchesProperty('a', 1), _.matchesProperty('a', 4)]));
  16013. * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]
  16014. */
  16015. function matchesProperty(path, srcValue) {
  16016. return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));
  16017. }
  16018. /**
  16019. * Creates a function that invokes the method at `path` of a given object.
  16020. * Any additional arguments are provided to the invoked method.
  16021. *
  16022. * @static
  16023. * @memberOf _
  16024. * @since 3.7.0
  16025. * @category Util
  16026. * @param {Array|string} path The path of the method to invoke.
  16027. * @param {...*} [args] The arguments to invoke the method with.
  16028. * @returns {Function} Returns the new invoker function.
  16029. * @example
  16030. *
  16031. * var objects = [
  16032. * { 'a': { 'b': _.constant(2) } },
  16033. * { 'a': { 'b': _.constant(1) } }
  16034. * ];
  16035. *
  16036. * _.map(objects, _.method('a.b'));
  16037. * // => [2, 1]
  16038. *
  16039. * _.map(objects, _.method(['a', 'b']));
  16040. * // => [2, 1]
  16041. */
  16042. var method = baseRest(function(path, args) {
  16043. return function(object) {
  16044. return baseInvoke(object, path, args);
  16045. };
  16046. });
  16047. /**
  16048. * The opposite of `_.method`; this method creates a function that invokes
  16049. * the method at a given path of `object`. Any additional arguments are
  16050. * provided to the invoked method.
  16051. *
  16052. * @static
  16053. * @memberOf _
  16054. * @since 3.7.0
  16055. * @category Util
  16056. * @param {Object} object The object to query.
  16057. * @param {...*} [args] The arguments to invoke the method with.
  16058. * @returns {Function} Returns the new invoker function.
  16059. * @example
  16060. *
  16061. * var array = _.times(3, _.constant),
  16062. * object = { 'a': array, 'b': array, 'c': array };
  16063. *
  16064. * _.map(['a[2]', 'c[0]'], _.methodOf(object));
  16065. * // => [2, 0]
  16066. *
  16067. * _.map([['a', '2'], ['c', '0']], _.methodOf(object));
  16068. * // => [2, 0]
  16069. */
  16070. var methodOf = baseRest(function(object, args) {
  16071. return function(path) {
  16072. return baseInvoke(object, path, args);
  16073. };
  16074. });
  16075. /**
  16076. * Adds all own enumerable string keyed function properties of a source
  16077. * object to the destination object. If `object` is a function, then methods
  16078. * are added to its prototype as well.
  16079. *
  16080. * **Note:** Use `_.runInContext` to create a pristine `lodash` function to
  16081. * avoid conflicts caused by modifying the original.
  16082. *
  16083. * @static
  16084. * @since 0.1.0
  16085. * @memberOf _
  16086. * @category Util
  16087. * @param {Function|Object} [object=lodash] The destination object.
  16088. * @param {Object} source The object of functions to add.
  16089. * @param {Object} [options={}] The options object.
  16090. * @param {boolean} [options.chain=true] Specify whether mixins are chainable.
  16091. * @returns {Function|Object} Returns `object`.
  16092. * @example
  16093. *
  16094. * function vowels(string) {
  16095. * return _.filter(string, function(v) {
  16096. * return /[aeiou]/i.test(v);
  16097. * });
  16098. * }
  16099. *
  16100. * _.mixin({ 'vowels': vowels });
  16101. * _.vowels('fred');
  16102. * // => ['e']
  16103. *
  16104. * _('fred').vowels().value();
  16105. * // => ['e']
  16106. *
  16107. * _.mixin({ 'vowels': vowels }, { 'chain': false });
  16108. * _('fred').vowels();
  16109. * // => ['e']
  16110. */
  16111. function mixin(object, source, options) {
  16112. var props = keys(source),
  16113. methodNames = baseFunctions(source, props);
  16114. if (options == null &&
  16115. !(isObject(source) && (methodNames.length || !props.length))) {
  16116. options = source;
  16117. source = object;
  16118. object = this;
  16119. methodNames = baseFunctions(source, keys(source));
  16120. }
  16121. var chain = !(isObject(options) && 'chain' in options) || !!options.chain,
  16122. isFunc = isFunction(object);
  16123. arrayEach(methodNames, function(methodName) {
  16124. var func = source[methodName];
  16125. object[methodName] = func;
  16126. if (isFunc) {
  16127. object.prototype[methodName] = function() {
  16128. var chainAll = this.__chain__;
  16129. if (chain || chainAll) {
  16130. var result = object(this.__wrapped__),
  16131. actions = result.__actions__ = copyArray(this.__actions__);
  16132. actions.push({ 'func': func, 'args': arguments, 'thisArg': object });
  16133. result.__chain__ = chainAll;
  16134. return result;
  16135. }
  16136. return func.apply(object, arrayPush([this.value()], arguments));
  16137. };
  16138. }
  16139. });
  16140. return object;
  16141. }
  16142. /**
  16143. * Reverts the `_` variable to its previous value and returns a reference to
  16144. * the `lodash` function.
  16145. *
  16146. * @static
  16147. * @since 0.1.0
  16148. * @memberOf _
  16149. * @category Util
  16150. * @returns {Function} Returns the `lodash` function.
  16151. * @example
  16152. *
  16153. * var lodash = _.noConflict();
  16154. */
  16155. function noConflict() {
  16156. if (root._ === this) {
  16157. root._ = oldDash;
  16158. }
  16159. return this;
  16160. }
  16161. /**
  16162. * This method returns `undefined`.
  16163. *
  16164. * @static
  16165. * @memberOf _
  16166. * @since 2.3.0
  16167. * @category Util
  16168. * @example
  16169. *
  16170. * _.times(2, _.noop);
  16171. * // => [undefined, undefined]
  16172. */
  16173. function noop() {
  16174. // No operation performed.
  16175. }
  16176. /**
  16177. * Creates a function that gets the argument at index `n`. If `n` is negative,
  16178. * the nth argument from the end is returned.
  16179. *
  16180. * @static
  16181. * @memberOf _
  16182. * @since 4.0.0
  16183. * @category Util
  16184. * @param {number} [n=0] The index of the argument to return.
  16185. * @returns {Function} Returns the new pass-thru function.
  16186. * @example
  16187. *
  16188. * var func = _.nthArg(1);
  16189. * func('a', 'b', 'c', 'd');
  16190. * // => 'b'
  16191. *
  16192. * var func = _.nthArg(-2);
  16193. * func('a', 'b', 'c', 'd');
  16194. * // => 'c'
  16195. */
  16196. function nthArg(n) {
  16197. n = toInteger(n);
  16198. return baseRest(function(args) {
  16199. return baseNth(args, n);
  16200. });
  16201. }
  16202. /**
  16203. * Creates a function that invokes `iteratees` with the arguments it receives
  16204. * and returns their results.
  16205. *
  16206. * @static
  16207. * @memberOf _
  16208. * @since 4.0.0
  16209. * @category Util
  16210. * @param {...(Function|Function[])} [iteratees=[_.identity]]
  16211. * The iteratees to invoke.
  16212. * @returns {Function} Returns the new function.
  16213. * @example
  16214. *
  16215. * var func = _.over([Math.max, Math.min]);
  16216. *
  16217. * func(1, 2, 3, 4);
  16218. * // => [4, 1]
  16219. */
  16220. var over = createOver(arrayMap);
  16221. /**
  16222. * Creates a function that checks if **all** of the `predicates` return
  16223. * truthy when invoked with the arguments it receives.
  16224. *
  16225. * Following shorthands are possible for providing predicates.
  16226. * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.
  16227. * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.
  16228. *
  16229. * @static
  16230. * @memberOf _
  16231. * @since 4.0.0
  16232. * @category Util
  16233. * @param {...(Function|Function[])} [predicates=[_.identity]]
  16234. * The predicates to check.
  16235. * @returns {Function} Returns the new function.
  16236. * @example
  16237. *
  16238. * var func = _.overEvery([Boolean, isFinite]);
  16239. *
  16240. * func('1');
  16241. * // => true
  16242. *
  16243. * func(null);
  16244. * // => false
  16245. *
  16246. * func(NaN);
  16247. * // => false
  16248. */
  16249. var overEvery = createOver(arrayEvery);
  16250. /**
  16251. * Creates a function that checks if **any** of the `predicates` return
  16252. * truthy when invoked with the arguments it receives.
  16253. *
  16254. * Following shorthands are possible for providing predicates.
  16255. * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.
  16256. * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.
  16257. *
  16258. * @static
  16259. * @memberOf _
  16260. * @since 4.0.0
  16261. * @category Util
  16262. * @param {...(Function|Function[])} [predicates=[_.identity]]
  16263. * The predicates to check.
  16264. * @returns {Function} Returns the new function.
  16265. * @example
  16266. *
  16267. * var func = _.overSome([Boolean, isFinite]);
  16268. *
  16269. * func('1');
  16270. * // => true
  16271. *
  16272. * func(null);
  16273. * // => true
  16274. *
  16275. * func(NaN);
  16276. * // => false
  16277. *
  16278. * var matchesFunc = _.overSome([{ 'a': 1 }, { 'a': 2 }])
  16279. * var matchesPropertyFunc = _.overSome([['a', 1], ['a', 2]])
  16280. */
  16281. var overSome = createOver(arraySome);
  16282. /**
  16283. * Creates a function that returns the value at `path` of a given object.
  16284. *
  16285. * @static
  16286. * @memberOf _
  16287. * @since 2.4.0
  16288. * @category Util
  16289. * @param {Array|string} path The path of the property to get.
  16290. * @returns {Function} Returns the new accessor function.
  16291. * @example
  16292. *
  16293. * var objects = [
  16294. * { 'a': { 'b': 2 } },
  16295. * { 'a': { 'b': 1 } }
  16296. * ];
  16297. *
  16298. * _.map(objects, _.property('a.b'));
  16299. * // => [2, 1]
  16300. *
  16301. * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
  16302. * // => [1, 2]
  16303. */
  16304. function property(path) {
  16305. return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
  16306. }
  16307. /**
  16308. * The opposite of `_.property`; this method creates a function that returns
  16309. * the value at a given path of `object`.
  16310. *
  16311. * @static
  16312. * @memberOf _
  16313. * @since 3.0.0
  16314. * @category Util
  16315. * @param {Object} object The object to query.
  16316. * @returns {Function} Returns the new accessor function.
  16317. * @example
  16318. *
  16319. * var array = [0, 1, 2],
  16320. * object = { 'a': array, 'b': array, 'c': array };
  16321. *
  16322. * _.map(['a[2]', 'c[0]'], _.propertyOf(object));
  16323. * // => [2, 0]
  16324. *
  16325. * _.map([['a', '2'], ['c', '0']], _.propertyOf(object));
  16326. * // => [2, 0]
  16327. */
  16328. function propertyOf(object) {
  16329. return function(path) {
  16330. return object == null ? undefined : baseGet(object, path);
  16331. };
  16332. }
  16333. /**
  16334. * Creates an array of numbers (positive and/or negative) progressing from
  16335. * `start` up to, but not including, `end`. A step of `-1` is used if a negative
  16336. * `start` is specified without an `end` or `step`. If `end` is not specified,
  16337. * it's set to `start` with `start` then set to `0`.
  16338. *
  16339. * **Note:** JavaScript follows the IEEE-754 standard for resolving
  16340. * floating-point values which can produce unexpected results.
  16341. *
  16342. * @static
  16343. * @since 0.1.0
  16344. * @memberOf _
  16345. * @category Util
  16346. * @param {number} [start=0] The start of the range.
  16347. * @param {number} end The end of the range.
  16348. * @param {number} [step=1] The value to increment or decrement by.
  16349. * @returns {Array} Returns the range of numbers.
  16350. * @see _.inRange, _.rangeRight
  16351. * @example
  16352. *
  16353. * _.range(4);
  16354. * // => [0, 1, 2, 3]
  16355. *
  16356. * _.range(-4);
  16357. * // => [0, -1, -2, -3]
  16358. *
  16359. * _.range(1, 5);
  16360. * // => [1, 2, 3, 4]
  16361. *
  16362. * _.range(0, 20, 5);
  16363. * // => [0, 5, 10, 15]
  16364. *
  16365. * _.range(0, -4, -1);
  16366. * // => [0, -1, -2, -3]
  16367. *
  16368. * _.range(1, 4, 0);
  16369. * // => [1, 1, 1]
  16370. *
  16371. * _.range(0);
  16372. * // => []
  16373. */
  16374. var range = createRange();
  16375. /**
  16376. * This method is like `_.range` except that it populates values in
  16377. * descending order.
  16378. *
  16379. * @static
  16380. * @memberOf _
  16381. * @since 4.0.0
  16382. * @category Util
  16383. * @param {number} [start=0] The start of the range.
  16384. * @param {number} end The end of the range.
  16385. * @param {number} [step=1] The value to increment or decrement by.
  16386. * @returns {Array} Returns the range of numbers.
  16387. * @see _.inRange, _.range
  16388. * @example
  16389. *
  16390. * _.rangeRight(4);
  16391. * // => [3, 2, 1, 0]
  16392. *
  16393. * _.rangeRight(-4);
  16394. * // => [-3, -2, -1, 0]
  16395. *
  16396. * _.rangeRight(1, 5);
  16397. * // => [4, 3, 2, 1]
  16398. *
  16399. * _.rangeRight(0, 20, 5);
  16400. * // => [15, 10, 5, 0]
  16401. *
  16402. * _.rangeRight(0, -4, -1);
  16403. * // => [-3, -2, -1, 0]
  16404. *
  16405. * _.rangeRight(1, 4, 0);
  16406. * // => [1, 1, 1]
  16407. *
  16408. * _.rangeRight(0);
  16409. * // => []
  16410. */
  16411. var rangeRight = createRange(true);
  16412. /**
  16413. * This method returns a new empty array.
  16414. *
  16415. * @static
  16416. * @memberOf _
  16417. * @since 4.13.0
  16418. * @category Util
  16419. * @returns {Array} Returns the new empty array.
  16420. * @example
  16421. *
  16422. * var arrays = _.times(2, _.stubArray);
  16423. *
  16424. * console.log(arrays);
  16425. * // => [[], []]
  16426. *
  16427. * console.log(arrays[0] === arrays[1]);
  16428. * // => false
  16429. */
  16430. function stubArray() {
  16431. return [];
  16432. }
  16433. /**
  16434. * This method returns `false`.
  16435. *
  16436. * @static
  16437. * @memberOf _
  16438. * @since 4.13.0
  16439. * @category Util
  16440. * @returns {boolean} Returns `false`.
  16441. * @example
  16442. *
  16443. * _.times(2, _.stubFalse);
  16444. * // => [false, false]
  16445. */
  16446. function stubFalse() {
  16447. return false;
  16448. }
  16449. /**
  16450. * This method returns a new empty object.
  16451. *
  16452. * @static
  16453. * @memberOf _
  16454. * @since 4.13.0
  16455. * @category Util
  16456. * @returns {Object} Returns the new empty object.
  16457. * @example
  16458. *
  16459. * var objects = _.times(2, _.stubObject);
  16460. *
  16461. * console.log(objects);
  16462. * // => [{}, {}]
  16463. *
  16464. * console.log(objects[0] === objects[1]);
  16465. * // => false
  16466. */
  16467. function stubObject() {
  16468. return {};
  16469. }
  16470. /**
  16471. * This method returns an empty string.
  16472. *
  16473. * @static
  16474. * @memberOf _
  16475. * @since 4.13.0
  16476. * @category Util
  16477. * @returns {string} Returns the empty string.
  16478. * @example
  16479. *
  16480. * _.times(2, _.stubString);
  16481. * // => ['', '']
  16482. */
  16483. function stubString() {
  16484. return '';
  16485. }
  16486. /**
  16487. * This method returns `true`.
  16488. *
  16489. * @static
  16490. * @memberOf _
  16491. * @since 4.13.0
  16492. * @category Util
  16493. * @returns {boolean} Returns `true`.
  16494. * @example
  16495. *
  16496. * _.times(2, _.stubTrue);
  16497. * // => [true, true]
  16498. */
  16499. function stubTrue() {
  16500. return true;
  16501. }
  16502. /**
  16503. * Invokes the iteratee `n` times, returning an array of the results of
  16504. * each invocation. The iteratee is invoked with one argument; (index).
  16505. *
  16506. * @static
  16507. * @since 0.1.0
  16508. * @memberOf _
  16509. * @category Util
  16510. * @param {number} n The number of times to invoke `iteratee`.
  16511. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  16512. * @returns {Array} Returns the array of results.
  16513. * @example
  16514. *
  16515. * _.times(3, String);
  16516. * // => ['0', '1', '2']
  16517. *
  16518. * _.times(4, _.constant(0));
  16519. * // => [0, 0, 0, 0]
  16520. */
  16521. function times(n, iteratee) {
  16522. n = toInteger(n);
  16523. if (n < 1 || n > MAX_SAFE_INTEGER) {
  16524. return [];
  16525. }
  16526. var index = MAX_ARRAY_LENGTH,
  16527. length = nativeMin(n, MAX_ARRAY_LENGTH);
  16528. iteratee = getIteratee(iteratee);
  16529. n -= MAX_ARRAY_LENGTH;
  16530. var result = baseTimes(length, iteratee);
  16531. while (++index < n) {
  16532. iteratee(index);
  16533. }
  16534. return result;
  16535. }
  16536. /**
  16537. * Converts `value` to a property path array.
  16538. *
  16539. * @static
  16540. * @memberOf _
  16541. * @since 4.0.0
  16542. * @category Util
  16543. * @param {*} value The value to convert.
  16544. * @returns {Array} Returns the new property path array.
  16545. * @example
  16546. *
  16547. * _.toPath('a.b.c');
  16548. * // => ['a', 'b', 'c']
  16549. *
  16550. * _.toPath('a[0].b.c');
  16551. * // => ['a', '0', 'b', 'c']
  16552. */
  16553. function toPath(value) {
  16554. if (isArray(value)) {
  16555. return arrayMap(value, toKey);
  16556. }
  16557. return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));
  16558. }
  16559. /**
  16560. * Generates a unique ID. If `prefix` is given, the ID is appended to it.
  16561. *
  16562. * @static
  16563. * @since 0.1.0
  16564. * @memberOf _
  16565. * @category Util
  16566. * @param {string} [prefix=''] The value to prefix the ID with.
  16567. * @returns {string} Returns the unique ID.
  16568. * @example
  16569. *
  16570. * _.uniqueId('contact_');
  16571. * // => 'contact_104'
  16572. *
  16573. * _.uniqueId();
  16574. * // => '105'
  16575. */
  16576. function uniqueId(prefix) {
  16577. var id = ++idCounter;
  16578. return toString(prefix) + id;
  16579. }
  16580. /*------------------------------------------------------------------------*/
  16581. /**
  16582. * Adds two numbers.
  16583. *
  16584. * @static
  16585. * @memberOf _
  16586. * @since 3.4.0
  16587. * @category Math
  16588. * @param {number} augend The first number in an addition.
  16589. * @param {number} addend The second number in an addition.
  16590. * @returns {number} Returns the total.
  16591. * @example
  16592. *
  16593. * _.add(6, 4);
  16594. * // => 10
  16595. */
  16596. var add = createMathOperation(function(augend, addend) {
  16597. return augend + addend;
  16598. }, 0);
  16599. /**
  16600. * Computes `number` rounded up to `precision`.
  16601. *
  16602. * @static
  16603. * @memberOf _
  16604. * @since 3.10.0
  16605. * @category Math
  16606. * @param {number} number The number to round up.
  16607. * @param {number} [precision=0] The precision to round up to.
  16608. * @returns {number} Returns the rounded up number.
  16609. * @example
  16610. *
  16611. * _.ceil(4.006);
  16612. * // => 5
  16613. *
  16614. * _.ceil(6.004, 2);
  16615. * // => 6.01
  16616. *
  16617. * _.ceil(6040, -2);
  16618. * // => 6100
  16619. */
  16620. var ceil = createRound('ceil');
  16621. /**
  16622. * Divide two numbers.
  16623. *
  16624. * @static
  16625. * @memberOf _
  16626. * @since 4.7.0
  16627. * @category Math
  16628. * @param {number} dividend The first number in a division.
  16629. * @param {number} divisor The second number in a division.
  16630. * @returns {number} Returns the quotient.
  16631. * @example
  16632. *
  16633. * _.divide(6, 4);
  16634. * // => 1.5
  16635. */
  16636. var divide = createMathOperation(function(dividend, divisor) {
  16637. return dividend / divisor;
  16638. }, 1);
  16639. /**
  16640. * Computes `number` rounded down to `precision`.
  16641. *
  16642. * @static
  16643. * @memberOf _
  16644. * @since 3.10.0
  16645. * @category Math
  16646. * @param {number} number The number to round down.
  16647. * @param {number} [precision=0] The precision to round down to.
  16648. * @returns {number} Returns the rounded down number.
  16649. * @example
  16650. *
  16651. * _.floor(4.006);
  16652. * // => 4
  16653. *
  16654. * _.floor(0.046, 2);
  16655. * // => 0.04
  16656. *
  16657. * _.floor(4060, -2);
  16658. * // => 4000
  16659. */
  16660. var floor = createRound('floor');
  16661. /**
  16662. * Computes the maximum value of `array`. If `array` is empty or falsey,
  16663. * `undefined` is returned.
  16664. *
  16665. * @static
  16666. * @since 0.1.0
  16667. * @memberOf _
  16668. * @category Math
  16669. * @param {Array} array The array to iterate over.
  16670. * @returns {*} Returns the maximum value.
  16671. * @example
  16672. *
  16673. * _.max([4, 2, 8, 6]);
  16674. * // => 8
  16675. *
  16676. * _.max([]);
  16677. * // => undefined
  16678. */
  16679. function max(array) {
  16680. return (array && array.length)
  16681. ? baseExtremum(array, identity, baseGt)
  16682. : undefined;
  16683. }
  16684. /**
  16685. * This method is like `_.max` except that it accepts `iteratee` which is
  16686. * invoked for each element in `array` to generate the criterion by which
  16687. * the value is ranked. The iteratee is invoked with one argument: (value).
  16688. *
  16689. * @static
  16690. * @memberOf _
  16691. * @since 4.0.0
  16692. * @category Math
  16693. * @param {Array} array The array to iterate over.
  16694. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  16695. * @returns {*} Returns the maximum value.
  16696. * @example
  16697. *
  16698. * var objects = [{ 'n': 1 }, { 'n': 2 }];
  16699. *
  16700. * _.maxBy(objects, function(o) { return o.n; });
  16701. * // => { 'n': 2 }
  16702. *
  16703. * // The `_.property` iteratee shorthand.
  16704. * _.maxBy(objects, 'n');
  16705. * // => { 'n': 2 }
  16706. */
  16707. function maxBy(array, iteratee) {
  16708. return (array && array.length)
  16709. ? baseExtremum(array, getIteratee(iteratee, 2), baseGt)
  16710. : undefined;
  16711. }
  16712. /**
  16713. * Computes the mean of the values in `array`.
  16714. *
  16715. * @static
  16716. * @memberOf _
  16717. * @since 4.0.0
  16718. * @category Math
  16719. * @param {Array} array The array to iterate over.
  16720. * @returns {number} Returns the mean.
  16721. * @example
  16722. *
  16723. * _.mean([4, 2, 8, 6]);
  16724. * // => 5
  16725. */
  16726. function mean(array) {
  16727. return baseMean(array, identity);
  16728. }
  16729. /**
  16730. * This method is like `_.mean` except that it accepts `iteratee` which is
  16731. * invoked for each element in `array` to generate the value to be averaged.
  16732. * The iteratee is invoked with one argument: (value).
  16733. *
  16734. * @static
  16735. * @memberOf _
  16736. * @since 4.7.0
  16737. * @category Math
  16738. * @param {Array} array The array to iterate over.
  16739. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  16740. * @returns {number} Returns the mean.
  16741. * @example
  16742. *
  16743. * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
  16744. *
  16745. * _.meanBy(objects, function(o) { return o.n; });
  16746. * // => 5
  16747. *
  16748. * // The `_.property` iteratee shorthand.
  16749. * _.meanBy(objects, 'n');
  16750. * // => 5
  16751. */
  16752. function meanBy(array, iteratee) {
  16753. return baseMean(array, getIteratee(iteratee, 2));
  16754. }
  16755. /**
  16756. * Computes the minimum value of `array`. If `array` is empty or falsey,
  16757. * `undefined` is returned.
  16758. *
  16759. * @static
  16760. * @since 0.1.0
  16761. * @memberOf _
  16762. * @category Math
  16763. * @param {Array} array The array to iterate over.
  16764. * @returns {*} Returns the minimum value.
  16765. * @example
  16766. *
  16767. * _.min([4, 2, 8, 6]);
  16768. * // => 2
  16769. *
  16770. * _.min([]);
  16771. * // => undefined
  16772. */
  16773. function min(array) {
  16774. return (array && array.length)
  16775. ? baseExtremum(array, identity, baseLt)
  16776. : undefined;
  16777. }
  16778. /**
  16779. * This method is like `_.min` except that it accepts `iteratee` which is
  16780. * invoked for each element in `array` to generate the criterion by which
  16781. * the value is ranked. The iteratee is invoked with one argument: (value).
  16782. *
  16783. * @static
  16784. * @memberOf _
  16785. * @since 4.0.0
  16786. * @category Math
  16787. * @param {Array} array The array to iterate over.
  16788. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  16789. * @returns {*} Returns the minimum value.
  16790. * @example
  16791. *
  16792. * var objects = [{ 'n': 1 }, { 'n': 2 }];
  16793. *
  16794. * _.minBy(objects, function(o) { return o.n; });
  16795. * // => { 'n': 1 }
  16796. *
  16797. * // The `_.property` iteratee shorthand.
  16798. * _.minBy(objects, 'n');
  16799. * // => { 'n': 1 }
  16800. */
  16801. function minBy(array, iteratee) {
  16802. return (array && array.length)
  16803. ? baseExtremum(array, getIteratee(iteratee, 2), baseLt)
  16804. : undefined;
  16805. }
  16806. /**
  16807. * Multiply two numbers.
  16808. *
  16809. * @static
  16810. * @memberOf _
  16811. * @since 4.7.0
  16812. * @category Math
  16813. * @param {number} multiplier The first number in a multiplication.
  16814. * @param {number} multiplicand The second number in a multiplication.
  16815. * @returns {number} Returns the product.
  16816. * @example
  16817. *
  16818. * _.multiply(6, 4);
  16819. * // => 24
  16820. */
  16821. var multiply = createMathOperation(function(multiplier, multiplicand) {
  16822. return multiplier * multiplicand;
  16823. }, 1);
  16824. /**
  16825. * Computes `number` rounded to `precision`.
  16826. *
  16827. * @static
  16828. * @memberOf _
  16829. * @since 3.10.0
  16830. * @category Math
  16831. * @param {number} number The number to round.
  16832. * @param {number} [precision=0] The precision to round to.
  16833. * @returns {number} Returns the rounded number.
  16834. * @example
  16835. *
  16836. * _.round(4.006);
  16837. * // => 4
  16838. *
  16839. * _.round(4.006, 2);
  16840. * // => 4.01
  16841. *
  16842. * _.round(4060, -2);
  16843. * // => 4100
  16844. */
  16845. var round = createRound('round');
  16846. /**
  16847. * Subtract two numbers.
  16848. *
  16849. * @static
  16850. * @memberOf _
  16851. * @since 4.0.0
  16852. * @category Math
  16853. * @param {number} minuend The first number in a subtraction.
  16854. * @param {number} subtrahend The second number in a subtraction.
  16855. * @returns {number} Returns the difference.
  16856. * @example
  16857. *
  16858. * _.subtract(6, 4);
  16859. * // => 2
  16860. */
  16861. var subtract = createMathOperation(function(minuend, subtrahend) {
  16862. return minuend - subtrahend;
  16863. }, 0);
  16864. /**
  16865. * Computes the sum of the values in `array`.
  16866. *
  16867. * @static
  16868. * @memberOf _
  16869. * @since 3.4.0
  16870. * @category Math
  16871. * @param {Array} array The array to iterate over.
  16872. * @returns {number} Returns the sum.
  16873. * @example
  16874. *
  16875. * _.sum([4, 2, 8, 6]);
  16876. * // => 20
  16877. */
  16878. function sum(array) {
  16879. return (array && array.length)
  16880. ? baseSum(array, identity)
  16881. : 0;
  16882. }
  16883. /**
  16884. * This method is like `_.sum` except that it accepts `iteratee` which is
  16885. * invoked for each element in `array` to generate the value to be summed.
  16886. * The iteratee is invoked with one argument: (value).
  16887. *
  16888. * @static
  16889. * @memberOf _
  16890. * @since 4.0.0
  16891. * @category Math
  16892. * @param {Array} array The array to iterate over.
  16893. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  16894. * @returns {number} Returns the sum.
  16895. * @example
  16896. *
  16897. * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
  16898. *
  16899. * _.sumBy(objects, function(o) { return o.n; });
  16900. * // => 20
  16901. *
  16902. * // The `_.property` iteratee shorthand.
  16903. * _.sumBy(objects, 'n');
  16904. * // => 20
  16905. */
  16906. function sumBy(array, iteratee) {
  16907. return (array && array.length)
  16908. ? baseSum(array, getIteratee(iteratee, 2))
  16909. : 0;
  16910. }
  16911. /*------------------------------------------------------------------------*/
  16912. // Add methods that return wrapped values in chain sequences.
  16913. lodash.after = after;
  16914. lodash.ary = ary;
  16915. lodash.assign = assign;
  16916. lodash.assignIn = assignIn;
  16917. lodash.assignInWith = assignInWith;
  16918. lodash.assignWith = assignWith;
  16919. lodash.at = at;
  16920. lodash.before = before;
  16921. lodash.bind = bind;
  16922. lodash.bindAll = bindAll;
  16923. lodash.bindKey = bindKey;
  16924. lodash.castArray = castArray;
  16925. lodash.chain = chain;
  16926. lodash.chunk = chunk;
  16927. lodash.compact = compact;
  16928. lodash.concat = concat;
  16929. lodash.cond = cond;
  16930. lodash.conforms = conforms;
  16931. lodash.constant = constant;
  16932. lodash.countBy = countBy;
  16933. lodash.create = create;
  16934. lodash.curry = curry;
  16935. lodash.curryRight = curryRight;
  16936. lodash.debounce = debounce;
  16937. lodash.defaults = defaults;
  16938. lodash.defaultsDeep = defaultsDeep;
  16939. lodash.defer = defer;
  16940. lodash.delay = delay;
  16941. lodash.difference = difference;
  16942. lodash.differenceBy = differenceBy;
  16943. lodash.differenceWith = differenceWith;
  16944. lodash.drop = drop;
  16945. lodash.dropRight = dropRight;
  16946. lodash.dropRightWhile = dropRightWhile;
  16947. lodash.dropWhile = dropWhile;
  16948. lodash.fill = fill;
  16949. lodash.filter = filter;
  16950. lodash.flatMap = flatMap;
  16951. lodash.flatMapDeep = flatMapDeep;
  16952. lodash.flatMapDepth = flatMapDepth;
  16953. lodash.flatten = flatten;
  16954. lodash.flattenDeep = flattenDeep;
  16955. lodash.flattenDepth = flattenDepth;
  16956. lodash.flip = flip;
  16957. lodash.flow = flow;
  16958. lodash.flowRight = flowRight;
  16959. lodash.fromPairs = fromPairs;
  16960. lodash.functions = functions;
  16961. lodash.functionsIn = functionsIn;
  16962. lodash.groupBy = groupBy;
  16963. lodash.initial = initial;
  16964. lodash.intersection = intersection;
  16965. lodash.intersectionBy = intersectionBy;
  16966. lodash.intersectionWith = intersectionWith;
  16967. lodash.invert = invert;
  16968. lodash.invertBy = invertBy;
  16969. lodash.invokeMap = invokeMap;
  16970. lodash.iteratee = iteratee;
  16971. lodash.keyBy = keyBy;
  16972. lodash.keys = keys;
  16973. lodash.keysIn = keysIn;
  16974. lodash.map = map;
  16975. lodash.mapKeys = mapKeys;
  16976. lodash.mapValues = mapValues;
  16977. lodash.matches = matches;
  16978. lodash.matchesProperty = matchesProperty;
  16979. lodash.memoize = memoize;
  16980. lodash.merge = merge;
  16981. lodash.mergeWith = mergeWith;
  16982. lodash.method = method;
  16983. lodash.methodOf = methodOf;
  16984. lodash.mixin = mixin;
  16985. lodash.negate = negate;
  16986. lodash.nthArg = nthArg;
  16987. lodash.omit = omit;
  16988. lodash.omitBy = omitBy;
  16989. lodash.once = once;
  16990. lodash.orderBy = orderBy;
  16991. lodash.over = over;
  16992. lodash.overArgs = overArgs;
  16993. lodash.overEvery = overEvery;
  16994. lodash.overSome = overSome;
  16995. lodash.partial = partial;
  16996. lodash.partialRight = partialRight;
  16997. lodash.partition = partition;
  16998. lodash.pick = pick;
  16999. lodash.pickBy = pickBy;
  17000. lodash.property = property;
  17001. lodash.propertyOf = propertyOf;
  17002. lodash.pull = pull;
  17003. lodash.pullAll = pullAll;
  17004. lodash.pullAllBy = pullAllBy;
  17005. lodash.pullAllWith = pullAllWith;
  17006. lodash.pullAt = pullAt;
  17007. lodash.range = range;
  17008. lodash.rangeRight = rangeRight;
  17009. lodash.rearg = rearg;
  17010. lodash.reject = reject;
  17011. lodash.remove = remove;
  17012. lodash.rest = rest;
  17013. lodash.reverse = reverse;
  17014. lodash.sampleSize = sampleSize;
  17015. lodash.set = set;
  17016. lodash.setWith = setWith;
  17017. lodash.shuffle = shuffle;
  17018. lodash.slice = slice;
  17019. lodash.sortBy = sortBy;
  17020. lodash.sortedUniq = sortedUniq;
  17021. lodash.sortedUniqBy = sortedUniqBy;
  17022. lodash.split = split;
  17023. lodash.spread = spread;
  17024. lodash.tail = tail;
  17025. lodash.take = take;
  17026. lodash.takeRight = takeRight;
  17027. lodash.takeRightWhile = takeRightWhile;
  17028. lodash.takeWhile = takeWhile;
  17029. lodash.tap = tap;
  17030. lodash.throttle = throttle;
  17031. lodash.thru = thru;
  17032. lodash.toArray = toArray;
  17033. lodash.toPairs = toPairs;
  17034. lodash.toPairsIn = toPairsIn;
  17035. lodash.toPath = toPath;
  17036. lodash.toPlainObject = toPlainObject;
  17037. lodash.transform = transform;
  17038. lodash.unary = unary;
  17039. lodash.union = union;
  17040. lodash.unionBy = unionBy;
  17041. lodash.unionWith = unionWith;
  17042. lodash.uniq = uniq;
  17043. lodash.uniqBy = uniqBy;
  17044. lodash.uniqWith = uniqWith;
  17045. lodash.unset = unset;
  17046. lodash.unzip = unzip;
  17047. lodash.unzipWith = unzipWith;
  17048. lodash.update = update;
  17049. lodash.updateWith = updateWith;
  17050. lodash.values = values;
  17051. lodash.valuesIn = valuesIn;
  17052. lodash.without = without;
  17053. lodash.words = words;
  17054. lodash.wrap = wrap;
  17055. lodash.xor = xor;
  17056. lodash.xorBy = xorBy;
  17057. lodash.xorWith = xorWith;
  17058. lodash.zip = zip;
  17059. lodash.zipObject = zipObject;
  17060. lodash.zipObjectDeep = zipObjectDeep;
  17061. lodash.zipWith = zipWith;
  17062. // Add aliases.
  17063. lodash.entries = toPairs;
  17064. lodash.entriesIn = toPairsIn;
  17065. lodash.extend = assignIn;
  17066. lodash.extendWith = assignInWith;
  17067. // Add methods to `lodash.prototype`.
  17068. mixin(lodash, lodash);
  17069. /*------------------------------------------------------------------------*/
  17070. // Add methods that return unwrapped values in chain sequences.
  17071. lodash.add = add;
  17072. lodash.attempt = attempt;
  17073. lodash.camelCase = camelCase;
  17074. lodash.capitalize = capitalize;
  17075. lodash.ceil = ceil;
  17076. lodash.clamp = clamp;
  17077. lodash.clone = clone;
  17078. lodash.cloneDeep = cloneDeep;
  17079. lodash.cloneDeepWith = cloneDeepWith;
  17080. lodash.cloneWith = cloneWith;
  17081. lodash.conformsTo = conformsTo;
  17082. lodash.deburr = deburr;
  17083. lodash.defaultTo = defaultTo;
  17084. lodash.divide = divide;
  17085. lodash.endsWith = endsWith;
  17086. lodash.eq = eq;
  17087. lodash.escape = escape;
  17088. lodash.escapeRegExp = escapeRegExp;
  17089. lodash.every = every;
  17090. lodash.find = find;
  17091. lodash.findIndex = findIndex;
  17092. lodash.findKey = findKey;
  17093. lodash.findLast = findLast;
  17094. lodash.findLastIndex = findLastIndex;
  17095. lodash.findLastKey = findLastKey;
  17096. lodash.floor = floor;
  17097. lodash.forEach = forEach;
  17098. lodash.forEachRight = forEachRight;
  17099. lodash.forIn = forIn;
  17100. lodash.forInRight = forInRight;
  17101. lodash.forOwn = forOwn;
  17102. lodash.forOwnRight = forOwnRight;
  17103. lodash.get = get;
  17104. lodash.gt = gt;
  17105. lodash.gte = gte;
  17106. lodash.has = has;
  17107. lodash.hasIn = hasIn;
  17108. lodash.head = head;
  17109. lodash.identity = identity;
  17110. lodash.includes = includes;
  17111. lodash.indexOf = indexOf;
  17112. lodash.inRange = inRange;
  17113. lodash.invoke = invoke;
  17114. lodash.isArguments = isArguments;
  17115. lodash.isArray = isArray;
  17116. lodash.isArrayBuffer = isArrayBuffer;
  17117. lodash.isArrayLike = isArrayLike;
  17118. lodash.isArrayLikeObject = isArrayLikeObject;
  17119. lodash.isBoolean = isBoolean;
  17120. lodash.isBuffer = isBuffer;
  17121. lodash.isDate = isDate;
  17122. lodash.isElement = isElement;
  17123. lodash.isEmpty = isEmpty;
  17124. lodash.isEqual = isEqual;
  17125. lodash.isEqualWith = isEqualWith;
  17126. lodash.isError = isError;
  17127. lodash.isFinite = isFinite;
  17128. lodash.isFunction = isFunction;
  17129. lodash.isInteger = isInteger;
  17130. lodash.isLength = isLength;
  17131. lodash.isMap = isMap;
  17132. lodash.isMatch = isMatch;
  17133. lodash.isMatchWith = isMatchWith;
  17134. lodash.isNaN = isNaN;
  17135. lodash.isNative = isNative;
  17136. lodash.isNil = isNil;
  17137. lodash.isNull = isNull;
  17138. lodash.isNumber = isNumber;
  17139. lodash.isObject = isObject;
  17140. lodash.isObjectLike = isObjectLike;
  17141. lodash.isPlainObject = isPlainObject;
  17142. lodash.isRegExp = isRegExp;
  17143. lodash.isSafeInteger = isSafeInteger;
  17144. lodash.isSet = isSet;
  17145. lodash.isString = isString;
  17146. lodash.isSymbol = isSymbol;
  17147. lodash.isTypedArray = isTypedArray;
  17148. lodash.isUndefined = isUndefined;
  17149. lodash.isWeakMap = isWeakMap;
  17150. lodash.isWeakSet = isWeakSet;
  17151. lodash.join = join;
  17152. lodash.kebabCase = kebabCase;
  17153. lodash.last = last;
  17154. lodash.lastIndexOf = lastIndexOf;
  17155. lodash.lowerCase = lowerCase;
  17156. lodash.lowerFirst = lowerFirst;
  17157. lodash.lt = lt;
  17158. lodash.lte = lte;
  17159. lodash.max = max;
  17160. lodash.maxBy = maxBy;
  17161. lodash.mean = mean;
  17162. lodash.meanBy = meanBy;
  17163. lodash.min = min;
  17164. lodash.minBy = minBy;
  17165. lodash.stubArray = stubArray;
  17166. lodash.stubFalse = stubFalse;
  17167. lodash.stubObject = stubObject;
  17168. lodash.stubString = stubString;
  17169. lodash.stubTrue = stubTrue;
  17170. lodash.multiply = multiply;
  17171. lodash.nth = nth;
  17172. lodash.noConflict = noConflict;
  17173. lodash.noop = noop;
  17174. lodash.now = now;
  17175. lodash.pad = pad;
  17176. lodash.padEnd = padEnd;
  17177. lodash.padStart = padStart;
  17178. lodash.parseInt = parseInt;
  17179. lodash.random = random;
  17180. lodash.reduce = reduce;
  17181. lodash.reduceRight = reduceRight;
  17182. lodash.repeat = repeat;
  17183. lodash.replace = replace;
  17184. lodash.result = result;
  17185. lodash.round = round;
  17186. lodash.runInContext = runInContext;
  17187. lodash.sample = sample;
  17188. lodash.size = size;
  17189. lodash.snakeCase = snakeCase;
  17190. lodash.some = some;
  17191. lodash.sortedIndex = sortedIndex;
  17192. lodash.sortedIndexBy = sortedIndexBy;
  17193. lodash.sortedIndexOf = sortedIndexOf;
  17194. lodash.sortedLastIndex = sortedLastIndex;
  17195. lodash.sortedLastIndexBy = sortedLastIndexBy;
  17196. lodash.sortedLastIndexOf = sortedLastIndexOf;
  17197. lodash.startCase = startCase;
  17198. lodash.startsWith = startsWith;
  17199. lodash.subtract = subtract;
  17200. lodash.sum = sum;
  17201. lodash.sumBy = sumBy;
  17202. lodash.template = template;
  17203. lodash.times = times;
  17204. lodash.toFinite = toFinite;
  17205. lodash.toInteger = toInteger;
  17206. lodash.toLength = toLength;
  17207. lodash.toLower = toLower;
  17208. lodash.toNumber = toNumber;
  17209. lodash.toSafeInteger = toSafeInteger;
  17210. lodash.toString = toString;
  17211. lodash.toUpper = toUpper;
  17212. lodash.trim = trim;
  17213. lodash.trimEnd = trimEnd;
  17214. lodash.trimStart = trimStart;
  17215. lodash.truncate = truncate;
  17216. lodash.unescape = unescape;
  17217. lodash.uniqueId = uniqueId;
  17218. lodash.upperCase = upperCase;
  17219. lodash.upperFirst = upperFirst;
  17220. // Add aliases.
  17221. lodash.each = forEach;
  17222. lodash.eachRight = forEachRight;
  17223. lodash.first = head;
  17224. mixin(lodash, (function() {
  17225. var source = {};
  17226. baseForOwn(lodash, function(func, methodName) {
  17227. if (!hasOwnProperty.call(lodash.prototype, methodName)) {
  17228. source[methodName] = func;
  17229. }
  17230. });
  17231. return source;
  17232. }()), { 'chain': false });
  17233. /*------------------------------------------------------------------------*/
  17234. /**
  17235. * The semantic version number.
  17236. *
  17237. * @static
  17238. * @memberOf _
  17239. * @type {string}
  17240. */
  17241. lodash.VERSION = VERSION;
  17242. // Assign default placeholders.
  17243. arrayEach(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function(methodName) {
  17244. lodash[methodName].placeholder = lodash;
  17245. });
  17246. // Add `LazyWrapper` methods for `_.drop` and `_.take` variants.
  17247. arrayEach(['drop', 'take'], function(methodName, index) {
  17248. LazyWrapper.prototype[methodName] = function(n) {
  17249. n = n === undefined ? 1 : nativeMax(toInteger(n), 0);
  17250. var result = (this.__filtered__ && !index)
  17251. ? new LazyWrapper(this)
  17252. : this.clone();
  17253. if (result.__filtered__) {
  17254. result.__takeCount__ = nativeMin(n, result.__takeCount__);
  17255. } else {
  17256. result.__views__.push({
  17257. 'size': nativeMin(n, MAX_ARRAY_LENGTH),
  17258. 'type': methodName + (result.__dir__ < 0 ? 'Right' : '')
  17259. });
  17260. }
  17261. return result;
  17262. };
  17263. LazyWrapper.prototype[methodName + 'Right'] = function(n) {
  17264. return this.reverse()[methodName](n).reverse();
  17265. };
  17266. });
  17267. // Add `LazyWrapper` methods that accept an `iteratee` value.
  17268. arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) {
  17269. var type = index + 1,
  17270. isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;
  17271. LazyWrapper.prototype[methodName] = function(iteratee) {
  17272. var result = this.clone();
  17273. result.__iteratees__.push({
  17274. 'iteratee': getIteratee(iteratee, 3),
  17275. 'type': type
  17276. });
  17277. result.__filtered__ = result.__filtered__ || isFilter;
  17278. return result;
  17279. };
  17280. });
  17281. // Add `LazyWrapper` methods for `_.head` and `_.last`.
  17282. arrayEach(['head', 'last'], function(methodName, index) {
  17283. var takeName = 'take' + (index ? 'Right' : '');
  17284. LazyWrapper.prototype[methodName] = function() {
  17285. return this[takeName](1).value()[0];
  17286. };
  17287. });
  17288. // Add `LazyWrapper` methods for `_.initial` and `_.tail`.
  17289. arrayEach(['initial', 'tail'], function(methodName, index) {
  17290. var dropName = 'drop' + (index ? '' : 'Right');
  17291. LazyWrapper.prototype[methodName] = function() {
  17292. return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);
  17293. };
  17294. });
  17295. LazyWrapper.prototype.compact = function() {
  17296. return this.filter(identity);
  17297. };
  17298. LazyWrapper.prototype.find = function(predicate) {
  17299. return this.filter(predicate).head();
  17300. };
  17301. LazyWrapper.prototype.findLast = function(predicate) {
  17302. return this.reverse().find(predicate);
  17303. };
  17304. LazyWrapper.prototype.invokeMap = baseRest(function(path, args) {
  17305. if (typeof path == 'function') {
  17306. return new LazyWrapper(this);
  17307. }
  17308. return this.map(function(value) {
  17309. return baseInvoke(value, path, args);
  17310. });
  17311. });
  17312. LazyWrapper.prototype.reject = function(predicate) {
  17313. return this.filter(negate(getIteratee(predicate)));
  17314. };
  17315. LazyWrapper.prototype.slice = function(start, end) {
  17316. start = toInteger(start);
  17317. var result = this;
  17318. if (result.__filtered__ && (start > 0 || end < 0)) {
  17319. return new LazyWrapper(result);
  17320. }
  17321. if (start < 0) {
  17322. result = result.takeRight(-start);
  17323. } else if (start) {
  17324. result = result.drop(start);
  17325. }
  17326. if (end !== undefined) {
  17327. end = toInteger(end);
  17328. result = end < 0 ? result.dropRight(-end) : result.take(end - start);
  17329. }
  17330. return result;
  17331. };
  17332. LazyWrapper.prototype.takeRightWhile = function(predicate) {
  17333. return this.reverse().takeWhile(predicate).reverse();
  17334. };
  17335. LazyWrapper.prototype.toArray = function() {
  17336. return this.take(MAX_ARRAY_LENGTH);
  17337. };
  17338. // Add `LazyWrapper` methods to `lodash.prototype`.
  17339. baseForOwn(LazyWrapper.prototype, function(func, methodName) {
  17340. var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName),
  17341. isTaker = /^(?:head|last)$/.test(methodName),
  17342. lodashFunc = lodash[isTaker ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName],
  17343. retUnwrapped = isTaker || /^find/.test(methodName);
  17344. if (!lodashFunc) {
  17345. return;
  17346. }
  17347. lodash.prototype[methodName] = function() {
  17348. var value = this.__wrapped__,
  17349. args = isTaker ? [1] : arguments,
  17350. isLazy = value instanceof LazyWrapper,
  17351. iteratee = args[0],
  17352. useLazy = isLazy || isArray(value);
  17353. var interceptor = function(value) {
  17354. var result = lodashFunc.apply(lodash, arrayPush([value], args));
  17355. return (isTaker && chainAll) ? result[0] : result;
  17356. };
  17357. if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {
  17358. // Avoid lazy use if the iteratee has a "length" value other than `1`.
  17359. isLazy = useLazy = false;
  17360. }
  17361. var chainAll = this.__chain__,
  17362. isHybrid = !!this.__actions__.length,
  17363. isUnwrapped = retUnwrapped && !chainAll,
  17364. onlyLazy = isLazy && !isHybrid;
  17365. if (!retUnwrapped && useLazy) {
  17366. value = onlyLazy ? value : new LazyWrapper(this);
  17367. var result = func.apply(value, args);
  17368. result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });
  17369. return new LodashWrapper(result, chainAll);
  17370. }
  17371. if (isUnwrapped && onlyLazy) {
  17372. return func.apply(this, args);
  17373. }
  17374. result = this.thru(interceptor);
  17375. return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result;
  17376. };
  17377. });
  17378. // Add `Array` methods to `lodash.prototype`.
  17379. arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {
  17380. var func = arrayProto[methodName],
  17381. chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',
  17382. retUnwrapped = /^(?:pop|shift)$/.test(methodName);
  17383. lodash.prototype[methodName] = function() {
  17384. var args = arguments;
  17385. if (retUnwrapped && !this.__chain__) {
  17386. var value = this.value();
  17387. return func.apply(isArray(value) ? value : [], args);
  17388. }
  17389. return this[chainName](function(value) {
  17390. return func.apply(isArray(value) ? value : [], args);
  17391. });
  17392. };
  17393. });
  17394. // Map minified method names to their real names.
  17395. baseForOwn(LazyWrapper.prototype, function(func, methodName) {
  17396. var lodashFunc = lodash[methodName];
  17397. if (lodashFunc) {
  17398. var key = lodashFunc.name + '';
  17399. if (!hasOwnProperty.call(realNames, key)) {
  17400. realNames[key] = [];
  17401. }
  17402. realNames[key].push({ 'name': methodName, 'func': lodashFunc });
  17403. }
  17404. });
  17405. realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [{
  17406. 'name': 'wrapper',
  17407. 'func': undefined
  17408. }];
  17409. // Add methods to `LazyWrapper`.
  17410. LazyWrapper.prototype.clone = lazyClone;
  17411. LazyWrapper.prototype.reverse = lazyReverse;
  17412. LazyWrapper.prototype.value = lazyValue;
  17413. // Add chain sequence methods to the `lodash` wrapper.
  17414. lodash.prototype.at = wrapperAt;
  17415. lodash.prototype.chain = wrapperChain;
  17416. lodash.prototype.commit = wrapperCommit;
  17417. lodash.prototype.next = wrapperNext;
  17418. lodash.prototype.plant = wrapperPlant;
  17419. lodash.prototype.reverse = wrapperReverse;
  17420. lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;
  17421. // Add lazy aliases.
  17422. lodash.prototype.first = lodash.prototype.head;
  17423. if (symIterator) {
  17424. lodash.prototype[symIterator] = wrapperToIterator;
  17425. }
  17426. return lodash;
  17427. });
  17428. /*--------------------------------------------------------------------------*/
  17429. // Export lodash.
  17430. var _ = runInContext();
  17431. // Some AMD build optimizers, like r.js, check for condition patterns like:
  17432. if (true) {
  17433. // Expose Lodash on the global object to prevent errors when Lodash is
  17434. // loaded by a script tag in the presence of an AMD loader.
  17435. // See http://requirejs.org/docs/errors.html#mismatch for more details.
  17436. // Use `_.noConflict` to remove Lodash from the global object.
  17437. root._ = _;
  17438. // Define as an anonymous module so, through path mapping, it can be
  17439. // referenced as the "underscore" module.
  17440. !(__WEBPACK_AMD_DEFINE_RESULT__ = (function() {
  17441. return _;
  17442. }).call(exports, __webpack_require__, exports, module),
  17443. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  17444. }
  17445. // Check for `exports` after `define` in case a build optimizer adds it.
  17446. else {}
  17447. }.call(this));
  17448. /***/ }),
  17449. /***/ "./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":
  17450. /*!***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  17451. !*** ./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 ***!
  17452. \***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  17453. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17454. "use strict";
  17455. __webpack_require__.r(__webpack_exports__);
  17456. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17457. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17458. /* harmony export */ });
  17459. /* 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");
  17460. /* 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__);
  17461. /* 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");
  17462. var options = {};
  17463. options.insert = "head";
  17464. options.singleton = false;
  17465. 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);
  17466. /* 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 || {});
  17467. /***/ }),
  17468. /***/ "./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":
  17469. /*!****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  17470. !*** ./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 ***!
  17471. \****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  17472. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17473. "use strict";
  17474. __webpack_require__.r(__webpack_exports__);
  17475. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17476. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17477. /* harmony export */ });
  17478. /* 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");
  17479. /* 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__);
  17480. /* 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");
  17481. var options = {};
  17482. options.insert = "head";
  17483. options.singleton = false;
  17484. 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);
  17485. /* 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 || {});
  17486. /***/ }),
  17487. /***/ "./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":
  17488. /*!*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  17489. !*** ./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 ***!
  17490. \*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  17491. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17492. "use strict";
  17493. __webpack_require__.r(__webpack_exports__);
  17494. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17495. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17496. /* harmony export */ });
  17497. /* 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");
  17498. /* 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__);
  17499. /* 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");
  17500. var options = {};
  17501. options.insert = "head";
  17502. options.singleton = false;
  17503. 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);
  17504. /* 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 || {});
  17505. /***/ }),
  17506. /***/ "./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":
  17507. /*!***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  17508. !*** ./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 ***!
  17509. \***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  17510. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17511. "use strict";
  17512. __webpack_require__.r(__webpack_exports__);
  17513. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17514. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17515. /* harmony export */ });
  17516. /* 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");
  17517. /* 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__);
  17518. /* 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");
  17519. var options = {};
  17520. options.insert = "head";
  17521. options.singleton = false;
  17522. 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);
  17523. /* 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 || {});
  17524. /***/ }),
  17525. /***/ "./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":
  17526. /*!******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  17527. !*** ./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 ***!
  17528. \******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  17529. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17530. "use strict";
  17531. __webpack_require__.r(__webpack_exports__);
  17532. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17533. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17534. /* harmony export */ });
  17535. /* 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");
  17536. /* 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__);
  17537. /* 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");
  17538. var options = {};
  17539. options.insert = "head";
  17540. options.singleton = false;
  17541. 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);
  17542. /* 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 || {});
  17543. /***/ }),
  17544. /***/ "./node_modules/vue-loader/dist/exportHelper.js":
  17545. /*!******************************************************!*\
  17546. !*** ./node_modules/vue-loader/dist/exportHelper.js ***!
  17547. \******************************************************/
  17548. /***/ ((__unused_webpack_module, exports) => {
  17549. "use strict";
  17550. Object.defineProperty(exports, "__esModule", ({ value: true }));
  17551. // runtime helper for setting properties on components
  17552. // in a tree-shakable way
  17553. exports["default"] = (sfc, props) => {
  17554. const target = sfc.__vccOpts || sfc;
  17555. for (const [key, val] of props) {
  17556. target[key] = val;
  17557. }
  17558. return target;
  17559. };
  17560. /***/ }),
  17561. /***/ "./resources/js/components/AppButtonLink.vue":
  17562. /*!***************************************************!*\
  17563. !*** ./resources/js/components/AppButtonLink.vue ***!
  17564. \***************************************************/
  17565. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17566. "use strict";
  17567. __webpack_require__.r(__webpack_exports__);
  17568. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17569. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17570. /* harmony export */ });
  17571. /* 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");
  17572. /* 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");
  17573. /* 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");
  17574. ;
  17575. 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"]])
  17576. /* hot reload */
  17577. if (false) {}
  17578. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
  17579. /***/ }),
  17580. /***/ "./resources/js/components/AppFooter.vue":
  17581. /*!***********************************************!*\
  17582. !*** ./resources/js/components/AppFooter.vue ***!
  17583. \***********************************************/
  17584. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17585. "use strict";
  17586. __webpack_require__.r(__webpack_exports__);
  17587. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17588. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17589. /* harmony export */ });
  17590. /* 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");
  17591. /* 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");
  17592. /* 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");
  17593. const script = {}
  17594. ;
  17595. 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"]])
  17596. /* hot reload */
  17597. if (false) {}
  17598. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
  17599. /***/ }),
  17600. /***/ "./resources/js/components/AppMessage.vue":
  17601. /*!************************************************!*\
  17602. !*** ./resources/js/components/AppMessage.vue ***!
  17603. \************************************************/
  17604. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17605. "use strict";
  17606. __webpack_require__.r(__webpack_exports__);
  17607. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17608. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17609. /* harmony export */ });
  17610. /* 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");
  17611. /* 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");
  17612. /* 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");
  17613. ;
  17614. 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"]])
  17615. /* hot reload */
  17616. if (false) {}
  17617. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
  17618. /***/ }),
  17619. /***/ "./resources/js/components/AppPagination.vue":
  17620. /*!***************************************************!*\
  17621. !*** ./resources/js/components/AppPagination.vue ***!
  17622. \***************************************************/
  17623. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17624. "use strict";
  17625. __webpack_require__.r(__webpack_exports__);
  17626. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17627. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17628. /* harmony export */ });
  17629. /* 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");
  17630. /* 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");
  17631. /* 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");
  17632. ;
  17633. 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"]])
  17634. /* hot reload */
  17635. if (false) {}
  17636. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
  17637. /***/ }),
  17638. /***/ "./resources/js/components/AppSidebar.vue":
  17639. /*!************************************************!*\
  17640. !*** ./resources/js/components/AppSidebar.vue ***!
  17641. \************************************************/
  17642. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17643. "use strict";
  17644. __webpack_require__.r(__webpack_exports__);
  17645. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17646. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17647. /* harmony export */ });
  17648. /* 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");
  17649. /* 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");
  17650. /* 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");
  17651. /* 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");
  17652. ;
  17653. 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"]])
  17654. /* hot reload */
  17655. if (false) {}
  17656. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
  17657. /***/ }),
  17658. /***/ "./resources/js/components/AppSubSidebar.vue":
  17659. /*!***************************************************!*\
  17660. !*** ./resources/js/components/AppSubSidebar.vue ***!
  17661. \***************************************************/
  17662. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17663. "use strict";
  17664. __webpack_require__.r(__webpack_exports__);
  17665. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17666. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17667. /* harmony export */ });
  17668. /* 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");
  17669. /* 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");
  17670. /* 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");
  17671. /* 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");
  17672. ;
  17673. 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"]])
  17674. /* hot reload */
  17675. if (false) {}
  17676. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
  17677. /***/ }),
  17678. /***/ "./resources/js/components/AppTopBar.vue":
  17679. /*!***********************************************!*\
  17680. !*** ./resources/js/components/AppTopBar.vue ***!
  17681. \***********************************************/
  17682. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17683. "use strict";
  17684. __webpack_require__.r(__webpack_exports__);
  17685. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17686. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17687. /* harmony export */ });
  17688. /* 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");
  17689. /* 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");
  17690. /* 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");
  17691. /* 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");
  17692. ;
  17693. 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"]])
  17694. /* hot reload */
  17695. if (false) {}
  17696. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
  17697. /***/ }),
  17698. /***/ "./resources/js/layouts/DashboardLayout.vue":
  17699. /*!**************************************************!*\
  17700. !*** ./resources/js/layouts/DashboardLayout.vue ***!
  17701. \**************************************************/
  17702. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17703. "use strict";
  17704. __webpack_require__.r(__webpack_exports__);
  17705. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17706. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17707. /* harmony export */ });
  17708. /* 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");
  17709. /* 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");
  17710. /* 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");
  17711. /* 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");
  17712. ;
  17713. 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"]])
  17714. /* hot reload */
  17715. if (false) {}
  17716. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
  17717. /***/ }),
  17718. /***/ "./resources/js/pages/mutation/Report.vue":
  17719. /*!************************************************!*\
  17720. !*** ./resources/js/pages/mutation/Report.vue ***!
  17721. \************************************************/
  17722. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17723. "use strict";
  17724. __webpack_require__.r(__webpack_exports__);
  17725. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17726. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17727. /* harmony export */ });
  17728. /* harmony import */ var _Report_vue_vue_type_template_id_289c9421__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Report.vue?vue&type=template&id=289c9421 */ "./resources/js/pages/mutation/Report.vue?vue&type=template&id=289c9421");
  17729. /* harmony import */ var _Report_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Report.vue?vue&type=script&setup=true&lang=js */ "./resources/js/pages/mutation/Report.vue?vue&type=script&setup=true&lang=js");
  17730. /* 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");
  17731. ;
  17732. 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"])(_Report_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_1__["default"], [['render',_Report_vue_vue_type_template_id_289c9421__WEBPACK_IMPORTED_MODULE_0__.render],['__file',"resources/js/pages/mutation/Report.vue"]])
  17733. /* hot reload */
  17734. if (false) {}
  17735. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
  17736. /***/ }),
  17737. /***/ "./resources/js/components/AppButtonLink.vue?vue&type=script&setup=true&lang=js":
  17738. /*!**************************************************************************************!*\
  17739. !*** ./resources/js/components/AppButtonLink.vue?vue&type=script&setup=true&lang=js ***!
  17740. \**************************************************************************************/
  17741. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17742. "use strict";
  17743. __webpack_require__.r(__webpack_exports__);
  17744. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17745. /* 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"])
  17746. /* harmony export */ });
  17747. /* 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");
  17748. /***/ }),
  17749. /***/ "./resources/js/components/AppMessage.vue?vue&type=script&setup=true&lang=js":
  17750. /*!***********************************************************************************!*\
  17751. !*** ./resources/js/components/AppMessage.vue?vue&type=script&setup=true&lang=js ***!
  17752. \***********************************************************************************/
  17753. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17754. "use strict";
  17755. __webpack_require__.r(__webpack_exports__);
  17756. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17757. /* 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"])
  17758. /* harmony export */ });
  17759. /* 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");
  17760. /***/ }),
  17761. /***/ "./resources/js/components/AppPagination.vue?vue&type=script&setup=true&lang=js":
  17762. /*!**************************************************************************************!*\
  17763. !*** ./resources/js/components/AppPagination.vue?vue&type=script&setup=true&lang=js ***!
  17764. \**************************************************************************************/
  17765. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17766. "use strict";
  17767. __webpack_require__.r(__webpack_exports__);
  17768. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17769. /* 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"])
  17770. /* harmony export */ });
  17771. /* 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");
  17772. /***/ }),
  17773. /***/ "./resources/js/components/AppSidebar.vue?vue&type=script&setup=true&lang=js":
  17774. /*!***********************************************************************************!*\
  17775. !*** ./resources/js/components/AppSidebar.vue?vue&type=script&setup=true&lang=js ***!
  17776. \***********************************************************************************/
  17777. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17778. "use strict";
  17779. __webpack_require__.r(__webpack_exports__);
  17780. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17781. /* 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"])
  17782. /* harmony export */ });
  17783. /* 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");
  17784. /***/ }),
  17785. /***/ "./resources/js/components/AppSubSidebar.vue?vue&type=script&setup=true&lang=js":
  17786. /*!**************************************************************************************!*\
  17787. !*** ./resources/js/components/AppSubSidebar.vue?vue&type=script&setup=true&lang=js ***!
  17788. \**************************************************************************************/
  17789. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17790. "use strict";
  17791. __webpack_require__.r(__webpack_exports__);
  17792. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17793. /* 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"])
  17794. /* harmony export */ });
  17795. /* 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");
  17796. /***/ }),
  17797. /***/ "./resources/js/components/AppTopBar.vue?vue&type=script&setup=true&lang=js":
  17798. /*!**********************************************************************************!*\
  17799. !*** ./resources/js/components/AppTopBar.vue?vue&type=script&setup=true&lang=js ***!
  17800. \**********************************************************************************/
  17801. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17802. "use strict";
  17803. __webpack_require__.r(__webpack_exports__);
  17804. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17805. /* 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"])
  17806. /* harmony export */ });
  17807. /* 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");
  17808. /***/ }),
  17809. /***/ "./resources/js/layouts/DashboardLayout.vue?vue&type=script&setup=true&lang=js":
  17810. /*!*************************************************************************************!*\
  17811. !*** ./resources/js/layouts/DashboardLayout.vue?vue&type=script&setup=true&lang=js ***!
  17812. \*************************************************************************************/
  17813. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17814. "use strict";
  17815. __webpack_require__.r(__webpack_exports__);
  17816. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17817. /* 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"])
  17818. /* harmony export */ });
  17819. /* 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");
  17820. /***/ }),
  17821. /***/ "./resources/js/pages/mutation/Report.vue?vue&type=script&setup=true&lang=js":
  17822. /*!***********************************************************************************!*\
  17823. !*** ./resources/js/pages/mutation/Report.vue?vue&type=script&setup=true&lang=js ***!
  17824. \***********************************************************************************/
  17825. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17826. "use strict";
  17827. __webpack_require__.r(__webpack_exports__);
  17828. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17829. /* 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_Report_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_0__["default"])
  17830. /* harmony export */ });
  17831. /* 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_Report_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]!./Report.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/mutation/Report.vue?vue&type=script&setup=true&lang=js");
  17832. /***/ }),
  17833. /***/ "./resources/js/components/AppButtonLink.vue?vue&type=template&id=c3621f1c":
  17834. /*!*********************************************************************************!*\
  17835. !*** ./resources/js/components/AppButtonLink.vue?vue&type=template&id=c3621f1c ***!
  17836. \*********************************************************************************/
  17837. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17838. "use strict";
  17839. __webpack_require__.r(__webpack_exports__);
  17840. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17841. /* 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)
  17842. /* harmony export */ });
  17843. /* 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");
  17844. /***/ }),
  17845. /***/ "./resources/js/components/AppFooter.vue?vue&type=template&id=4ab6097e&scoped=true":
  17846. /*!*****************************************************************************************!*\
  17847. !*** ./resources/js/components/AppFooter.vue?vue&type=template&id=4ab6097e&scoped=true ***!
  17848. \*****************************************************************************************/
  17849. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17850. "use strict";
  17851. __webpack_require__.r(__webpack_exports__);
  17852. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17853. /* 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)
  17854. /* harmony export */ });
  17855. /* 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");
  17856. /***/ }),
  17857. /***/ "./resources/js/components/AppMessage.vue?vue&type=template&id=07159051":
  17858. /*!******************************************************************************!*\
  17859. !*** ./resources/js/components/AppMessage.vue?vue&type=template&id=07159051 ***!
  17860. \******************************************************************************/
  17861. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17862. "use strict";
  17863. __webpack_require__.r(__webpack_exports__);
  17864. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17865. /* 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)
  17866. /* harmony export */ });
  17867. /* 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");
  17868. /***/ }),
  17869. /***/ "./resources/js/components/AppPagination.vue?vue&type=template&id=4da56ec0":
  17870. /*!*********************************************************************************!*\
  17871. !*** ./resources/js/components/AppPagination.vue?vue&type=template&id=4da56ec0 ***!
  17872. \*********************************************************************************/
  17873. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17874. "use strict";
  17875. __webpack_require__.r(__webpack_exports__);
  17876. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17877. /* 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)
  17878. /* harmony export */ });
  17879. /* 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");
  17880. /***/ }),
  17881. /***/ "./resources/js/components/AppSidebar.vue?vue&type=template&id=22a4e926&scoped=true":
  17882. /*!******************************************************************************************!*\
  17883. !*** ./resources/js/components/AppSidebar.vue?vue&type=template&id=22a4e926&scoped=true ***!
  17884. \******************************************************************************************/
  17885. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17886. "use strict";
  17887. __webpack_require__.r(__webpack_exports__);
  17888. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17889. /* 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)
  17890. /* harmony export */ });
  17891. /* 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");
  17892. /***/ }),
  17893. /***/ "./resources/js/components/AppSubSidebar.vue?vue&type=template&id=0addd9bc&scoped=true":
  17894. /*!*********************************************************************************************!*\
  17895. !*** ./resources/js/components/AppSubSidebar.vue?vue&type=template&id=0addd9bc&scoped=true ***!
  17896. \*********************************************************************************************/
  17897. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17898. "use strict";
  17899. __webpack_require__.r(__webpack_exports__);
  17900. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17901. /* 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)
  17902. /* harmony export */ });
  17903. /* 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");
  17904. /***/ }),
  17905. /***/ "./resources/js/components/AppTopBar.vue?vue&type=template&id=42bf62a4&scoped=true":
  17906. /*!*****************************************************************************************!*\
  17907. !*** ./resources/js/components/AppTopBar.vue?vue&type=template&id=42bf62a4&scoped=true ***!
  17908. \*****************************************************************************************/
  17909. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17910. "use strict";
  17911. __webpack_require__.r(__webpack_exports__);
  17912. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17913. /* 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)
  17914. /* harmony export */ });
  17915. /* 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");
  17916. /***/ }),
  17917. /***/ "./resources/js/layouts/DashboardLayout.vue?vue&type=template&id=549bf5ac&scoped=true":
  17918. /*!********************************************************************************************!*\
  17919. !*** ./resources/js/layouts/DashboardLayout.vue?vue&type=template&id=549bf5ac&scoped=true ***!
  17920. \********************************************************************************************/
  17921. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17922. "use strict";
  17923. __webpack_require__.r(__webpack_exports__);
  17924. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17925. /* 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)
  17926. /* harmony export */ });
  17927. /* 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");
  17928. /***/ }),
  17929. /***/ "./resources/js/pages/mutation/Report.vue?vue&type=template&id=289c9421":
  17930. /*!******************************************************************************!*\
  17931. !*** ./resources/js/pages/mutation/Report.vue?vue&type=template&id=289c9421 ***!
  17932. \******************************************************************************/
  17933. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17934. "use strict";
  17935. __webpack_require__.r(__webpack_exports__);
  17936. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17937. /* 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_Report_vue_vue_type_template_id_289c9421__WEBPACK_IMPORTED_MODULE_0__.render)
  17938. /* harmony export */ });
  17939. /* 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_Report_vue_vue_type_template_id_289c9421__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]!./Report.vue?vue&type=template&id=289c9421 */ "./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/mutation/Report.vue?vue&type=template&id=289c9421");
  17940. /***/ }),
  17941. /***/ "./resources/js/components/AppFooter.vue?vue&type=style&index=0&id=4ab6097e&lang=scss&scoped=true":
  17942. /*!********************************************************************************************************!*\
  17943. !*** ./resources/js/components/AppFooter.vue?vue&type=style&index=0&id=4ab6097e&lang=scss&scoped=true ***!
  17944. \********************************************************************************************************/
  17945. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17946. "use strict";
  17947. __webpack_require__.r(__webpack_exports__);
  17948. /* 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");
  17949. /***/ }),
  17950. /***/ "./resources/js/components/AppSidebar.vue?vue&type=style&index=0&id=22a4e926&lang=scss&scoped=true":
  17951. /*!*********************************************************************************************************!*\
  17952. !*** ./resources/js/components/AppSidebar.vue?vue&type=style&index=0&id=22a4e926&lang=scss&scoped=true ***!
  17953. \*********************************************************************************************************/
  17954. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17955. "use strict";
  17956. __webpack_require__.r(__webpack_exports__);
  17957. /* 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");
  17958. /***/ }),
  17959. /***/ "./resources/js/components/AppSubSidebar.vue?vue&type=style&index=0&id=0addd9bc&lang=scss&scoped=true":
  17960. /*!************************************************************************************************************!*\
  17961. !*** ./resources/js/components/AppSubSidebar.vue?vue&type=style&index=0&id=0addd9bc&lang=scss&scoped=true ***!
  17962. \************************************************************************************************************/
  17963. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17964. "use strict";
  17965. __webpack_require__.r(__webpack_exports__);
  17966. /* 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");
  17967. /***/ }),
  17968. /***/ "./resources/js/components/AppTopBar.vue?vue&type=style&index=0&id=42bf62a4&lang=scss&scoped=true":
  17969. /*!********************************************************************************************************!*\
  17970. !*** ./resources/js/components/AppTopBar.vue?vue&type=style&index=0&id=42bf62a4&lang=scss&scoped=true ***!
  17971. \********************************************************************************************************/
  17972. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17973. "use strict";
  17974. __webpack_require__.r(__webpack_exports__);
  17975. /* 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");
  17976. /***/ }),
  17977. /***/ "./resources/js/layouts/DashboardLayout.vue?vue&type=style&index=0&id=549bf5ac&lang=scss&scoped=true":
  17978. /*!***********************************************************************************************************!*\
  17979. !*** ./resources/js/layouts/DashboardLayout.vue?vue&type=style&index=0&id=549bf5ac&lang=scss&scoped=true ***!
  17980. \***********************************************************************************************************/
  17981. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17982. "use strict";
  17983. __webpack_require__.r(__webpack_exports__);
  17984. /* 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");
  17985. /***/ })
  17986. }]);