handlebars.js 197 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972
  1. /**!
  2. @license
  3. handlebars v4.7.8
  4. Copyright (C) 2011-2019 by Yehuda Katz
  5. Permission is hereby granted, free of charge, to any person obtaining a copy
  6. of this software and associated documentation files (the "Software"), to deal
  7. in the Software without restriction, including without limitation the rights
  8. to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  9. copies of the Software, and to permit persons to whom the Software is
  10. furnished to do so, subject to the following conditions:
  11. The above copyright notice and this permission notice shall be included in
  12. all copies or substantial portions of the Software.
  13. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  14. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  15. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  16. AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  17. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  18. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  19. THE SOFTWARE.
  20. */
  21. (function webpackUniversalModuleDefinition(root, factory) {
  22. if(typeof exports === 'object' && typeof module === 'object')
  23. module.exports = factory();
  24. else if(typeof define === 'function' && define.amd)
  25. define([], factory);
  26. else if(typeof exports === 'object')
  27. exports["Handlebars"] = factory();
  28. else
  29. root["Handlebars"] = factory();
  30. })(this, function() {
  31. return /******/ (function(modules) { // webpackBootstrap
  32. /******/ // The module cache
  33. /******/ var installedModules = {};
  34. /******/ // The require function
  35. /******/ function __webpack_require__(moduleId) {
  36. /******/ // Check if module is in cache
  37. /******/ if(installedModules[moduleId])
  38. /******/ return installedModules[moduleId].exports;
  39. /******/ // Create a new module (and put it into the cache)
  40. /******/ var module = installedModules[moduleId] = {
  41. /******/ exports: {},
  42. /******/ id: moduleId,
  43. /******/ loaded: false
  44. /******/ };
  45. /******/ // Execute the module function
  46. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  47. /******/ // Flag the module as loaded
  48. /******/ module.loaded = true;
  49. /******/ // Return the exports of the module
  50. /******/ return module.exports;
  51. /******/ }
  52. /******/ // expose the modules object (__webpack_modules__)
  53. /******/ __webpack_require__.m = modules;
  54. /******/ // expose the module cache
  55. /******/ __webpack_require__.c = installedModules;
  56. /******/ // __webpack_public_path__
  57. /******/ __webpack_require__.p = "";
  58. /******/ // Load entry module and return exports
  59. /******/ return __webpack_require__(0);
  60. /******/ })
  61. /************************************************************************/
  62. /******/ ([
  63. /* 0 */
  64. /***/ (function(module, exports, __webpack_require__) {
  65. 'use strict';
  66. var _interopRequireDefault = __webpack_require__(1)['default'];
  67. exports.__esModule = true;
  68. var _handlebarsRuntime = __webpack_require__(2);
  69. var _handlebarsRuntime2 = _interopRequireDefault(_handlebarsRuntime);
  70. // Compiler imports
  71. var _handlebarsCompilerAst = __webpack_require__(84);
  72. var _handlebarsCompilerAst2 = _interopRequireDefault(_handlebarsCompilerAst);
  73. var _handlebarsCompilerBase = __webpack_require__(85);
  74. var _handlebarsCompilerCompiler = __webpack_require__(90);
  75. var _handlebarsCompilerJavascriptCompiler = __webpack_require__(91);
  76. var _handlebarsCompilerJavascriptCompiler2 = _interopRequireDefault(_handlebarsCompilerJavascriptCompiler);
  77. var _handlebarsCompilerVisitor = __webpack_require__(88);
  78. var _handlebarsCompilerVisitor2 = _interopRequireDefault(_handlebarsCompilerVisitor);
  79. var _handlebarsNoConflict = __webpack_require__(83);
  80. var _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict);
  81. var _create = _handlebarsRuntime2['default'].create;
  82. function create() {
  83. var hb = _create();
  84. hb.compile = function (input, options) {
  85. return _handlebarsCompilerCompiler.compile(input, options, hb);
  86. };
  87. hb.precompile = function (input, options) {
  88. return _handlebarsCompilerCompiler.precompile(input, options, hb);
  89. };
  90. hb.AST = _handlebarsCompilerAst2['default'];
  91. hb.Compiler = _handlebarsCompilerCompiler.Compiler;
  92. hb.JavaScriptCompiler = _handlebarsCompilerJavascriptCompiler2['default'];
  93. hb.Parser = _handlebarsCompilerBase.parser;
  94. hb.parse = _handlebarsCompilerBase.parse;
  95. hb.parseWithoutProcessing = _handlebarsCompilerBase.parseWithoutProcessing;
  96. return hb;
  97. }
  98. var inst = create();
  99. inst.create = create;
  100. _handlebarsNoConflict2['default'](inst);
  101. inst.Visitor = _handlebarsCompilerVisitor2['default'];
  102. inst['default'] = inst;
  103. exports['default'] = inst;
  104. module.exports = exports['default'];
  105. /***/ }),
  106. /* 1 */
  107. /***/ (function(module, exports) {
  108. "use strict";
  109. exports["default"] = function (obj) {
  110. return obj && obj.__esModule ? obj : {
  111. "default": obj
  112. };
  113. };
  114. exports.__esModule = true;
  115. /***/ }),
  116. /* 2 */
  117. /***/ (function(module, exports, __webpack_require__) {
  118. 'use strict';
  119. var _interopRequireWildcard = __webpack_require__(3)['default'];
  120. var _interopRequireDefault = __webpack_require__(1)['default'];
  121. exports.__esModule = true;
  122. var _handlebarsBase = __webpack_require__(4);
  123. var base = _interopRequireWildcard(_handlebarsBase);
  124. // Each of these augment the Handlebars object. No need to setup here.
  125. // (This is done to easily share code between commonjs and browse envs)
  126. var _handlebarsSafeString = __webpack_require__(77);
  127. var _handlebarsSafeString2 = _interopRequireDefault(_handlebarsSafeString);
  128. var _handlebarsException = __webpack_require__(6);
  129. var _handlebarsException2 = _interopRequireDefault(_handlebarsException);
  130. var _handlebarsUtils = __webpack_require__(5);
  131. var Utils = _interopRequireWildcard(_handlebarsUtils);
  132. var _handlebarsRuntime = __webpack_require__(78);
  133. var runtime = _interopRequireWildcard(_handlebarsRuntime);
  134. var _handlebarsNoConflict = __webpack_require__(83);
  135. var _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict);
  136. // For compatibility and usage outside of module systems, make the Handlebars object a namespace
  137. function create() {
  138. var hb = new base.HandlebarsEnvironment();
  139. Utils.extend(hb, base);
  140. hb.SafeString = _handlebarsSafeString2['default'];
  141. hb.Exception = _handlebarsException2['default'];
  142. hb.Utils = Utils;
  143. hb.escapeExpression = Utils.escapeExpression;
  144. hb.VM = runtime;
  145. hb.template = function (spec) {
  146. return runtime.template(spec, hb);
  147. };
  148. return hb;
  149. }
  150. var inst = create();
  151. inst.create = create;
  152. _handlebarsNoConflict2['default'](inst);
  153. inst['default'] = inst;
  154. exports['default'] = inst;
  155. module.exports = exports['default'];
  156. /***/ }),
  157. /* 3 */
  158. /***/ (function(module, exports) {
  159. "use strict";
  160. exports["default"] = function (obj) {
  161. if (obj && obj.__esModule) {
  162. return obj;
  163. } else {
  164. var newObj = {};
  165. if (obj != null) {
  166. for (var key in obj) {
  167. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  168. }
  169. }
  170. newObj["default"] = obj;
  171. return newObj;
  172. }
  173. };
  174. exports.__esModule = true;
  175. /***/ }),
  176. /* 4 */
  177. /***/ (function(module, exports, __webpack_require__) {
  178. 'use strict';
  179. var _interopRequireDefault = __webpack_require__(1)['default'];
  180. exports.__esModule = true;
  181. exports.HandlebarsEnvironment = HandlebarsEnvironment;
  182. var _utils = __webpack_require__(5);
  183. var _exception = __webpack_require__(6);
  184. var _exception2 = _interopRequireDefault(_exception);
  185. var _helpers = __webpack_require__(10);
  186. var _decorators = __webpack_require__(70);
  187. var _logger = __webpack_require__(72);
  188. var _logger2 = _interopRequireDefault(_logger);
  189. var _internalProtoAccess = __webpack_require__(73);
  190. var VERSION = '4.7.8';
  191. exports.VERSION = VERSION;
  192. var COMPILER_REVISION = 8;
  193. exports.COMPILER_REVISION = COMPILER_REVISION;
  194. var LAST_COMPATIBLE_COMPILER_REVISION = 7;
  195. exports.LAST_COMPATIBLE_COMPILER_REVISION = LAST_COMPATIBLE_COMPILER_REVISION;
  196. var REVISION_CHANGES = {
  197. 1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it
  198. 2: '== 1.0.0-rc.3',
  199. 3: '== 1.0.0-rc.4',
  200. 4: '== 1.x.x',
  201. 5: '== 2.0.0-alpha.x',
  202. 6: '>= 2.0.0-beta.1',
  203. 7: '>= 4.0.0 <4.3.0',
  204. 8: '>= 4.3.0'
  205. };
  206. exports.REVISION_CHANGES = REVISION_CHANGES;
  207. var objectType = '[object Object]';
  208. function HandlebarsEnvironment(helpers, partials, decorators) {
  209. this.helpers = helpers || {};
  210. this.partials = partials || {};
  211. this.decorators = decorators || {};
  212. _helpers.registerDefaultHelpers(this);
  213. _decorators.registerDefaultDecorators(this);
  214. }
  215. HandlebarsEnvironment.prototype = {
  216. constructor: HandlebarsEnvironment,
  217. logger: _logger2['default'],
  218. log: _logger2['default'].log,
  219. registerHelper: function registerHelper(name, fn) {
  220. if (_utils.toString.call(name) === objectType) {
  221. if (fn) {
  222. throw new _exception2['default']('Arg not supported with multiple helpers');
  223. }
  224. _utils.extend(this.helpers, name);
  225. } else {
  226. this.helpers[name] = fn;
  227. }
  228. },
  229. unregisterHelper: function unregisterHelper(name) {
  230. delete this.helpers[name];
  231. },
  232. registerPartial: function registerPartial(name, partial) {
  233. if (_utils.toString.call(name) === objectType) {
  234. _utils.extend(this.partials, name);
  235. } else {
  236. if (typeof partial === 'undefined') {
  237. throw new _exception2['default']('Attempting to register a partial called "' + name + '" as undefined');
  238. }
  239. this.partials[name] = partial;
  240. }
  241. },
  242. unregisterPartial: function unregisterPartial(name) {
  243. delete this.partials[name];
  244. },
  245. registerDecorator: function registerDecorator(name, fn) {
  246. if (_utils.toString.call(name) === objectType) {
  247. if (fn) {
  248. throw new _exception2['default']('Arg not supported with multiple decorators');
  249. }
  250. _utils.extend(this.decorators, name);
  251. } else {
  252. this.decorators[name] = fn;
  253. }
  254. },
  255. unregisterDecorator: function unregisterDecorator(name) {
  256. delete this.decorators[name];
  257. },
  258. /**
  259. * Reset the memory of illegal property accesses that have already been logged.
  260. * @deprecated should only be used in handlebars test-cases
  261. */
  262. resetLoggedPropertyAccesses: function resetLoggedPropertyAccesses() {
  263. _internalProtoAccess.resetLoggedProperties();
  264. }
  265. };
  266. var log = _logger2['default'].log;
  267. exports.log = log;
  268. exports.createFrame = _utils.createFrame;
  269. exports.logger = _logger2['default'];
  270. /***/ }),
  271. /* 5 */
  272. /***/ (function(module, exports) {
  273. 'use strict';
  274. exports.__esModule = true;
  275. exports.extend = extend;
  276. exports.indexOf = indexOf;
  277. exports.escapeExpression = escapeExpression;
  278. exports.isEmpty = isEmpty;
  279. exports.createFrame = createFrame;
  280. exports.blockParams = blockParams;
  281. exports.appendContextPath = appendContextPath;
  282. var escape = {
  283. '&': '&amp;',
  284. '<': '&lt;',
  285. '>': '&gt;',
  286. '"': '&quot;',
  287. "'": '&#x27;',
  288. '`': '&#x60;',
  289. '=': '&#x3D;'
  290. };
  291. var badChars = /[&<>"'`=]/g,
  292. possible = /[&<>"'`=]/;
  293. function escapeChar(chr) {
  294. return escape[chr];
  295. }
  296. function extend(obj /* , ...source */) {
  297. for (var i = 1; i < arguments.length; i++) {
  298. for (var key in arguments[i]) {
  299. if (Object.prototype.hasOwnProperty.call(arguments[i], key)) {
  300. obj[key] = arguments[i][key];
  301. }
  302. }
  303. }
  304. return obj;
  305. }
  306. var toString = Object.prototype.toString;
  307. exports.toString = toString;
  308. // Sourced from lodash
  309. // https://github.com/bestiejs/lodash/blob/master/LICENSE.txt
  310. /* eslint-disable func-style */
  311. var isFunction = function isFunction(value) {
  312. return typeof value === 'function';
  313. };
  314. // fallback for older versions of Chrome and Safari
  315. /* istanbul ignore next */
  316. if (isFunction(/x/)) {
  317. exports.isFunction = isFunction = function (value) {
  318. return typeof value === 'function' && toString.call(value) === '[object Function]';
  319. };
  320. }
  321. exports.isFunction = isFunction;
  322. /* eslint-enable func-style */
  323. /* istanbul ignore next */
  324. var isArray = Array.isArray || function (value) {
  325. return value && typeof value === 'object' ? toString.call(value) === '[object Array]' : false;
  326. };
  327. exports.isArray = isArray;
  328. // Older IE versions do not directly support indexOf so we must implement our own, sadly.
  329. function indexOf(array, value) {
  330. for (var i = 0, len = array.length; i < len; i++) {
  331. if (array[i] === value) {
  332. return i;
  333. }
  334. }
  335. return -1;
  336. }
  337. function escapeExpression(string) {
  338. if (typeof string !== 'string') {
  339. // don't escape SafeStrings, since they're already safe
  340. if (string && string.toHTML) {
  341. return string.toHTML();
  342. } else if (string == null) {
  343. return '';
  344. } else if (!string) {
  345. return string + '';
  346. }
  347. // Force a string conversion as this will be done by the append regardless and
  348. // the regex test will do this transparently behind the scenes, causing issues if
  349. // an object's to string has escaped characters in it.
  350. string = '' + string;
  351. }
  352. if (!possible.test(string)) {
  353. return string;
  354. }
  355. return string.replace(badChars, escapeChar);
  356. }
  357. function isEmpty(value) {
  358. if (!value && value !== 0) {
  359. return true;
  360. } else if (isArray(value) && value.length === 0) {
  361. return true;
  362. } else {
  363. return false;
  364. }
  365. }
  366. function createFrame(object) {
  367. var frame = extend({}, object);
  368. frame._parent = object;
  369. return frame;
  370. }
  371. function blockParams(params, ids) {
  372. params.path = ids;
  373. return params;
  374. }
  375. function appendContextPath(contextPath, id) {
  376. return (contextPath ? contextPath + '.' : '') + id;
  377. }
  378. /***/ }),
  379. /* 6 */
  380. /***/ (function(module, exports, __webpack_require__) {
  381. 'use strict';
  382. var _Object$defineProperty = __webpack_require__(7)['default'];
  383. exports.__esModule = true;
  384. var errorProps = ['description', 'fileName', 'lineNumber', 'endLineNumber', 'message', 'name', 'number', 'stack'];
  385. function Exception(message, node) {
  386. var loc = node && node.loc,
  387. line = undefined,
  388. endLineNumber = undefined,
  389. column = undefined,
  390. endColumn = undefined;
  391. if (loc) {
  392. line = loc.start.line;
  393. endLineNumber = loc.end.line;
  394. column = loc.start.column;
  395. endColumn = loc.end.column;
  396. message += ' - ' + line + ':' + column;
  397. }
  398. var tmp = Error.prototype.constructor.call(this, message);
  399. // Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work.
  400. for (var idx = 0; idx < errorProps.length; idx++) {
  401. this[errorProps[idx]] = tmp[errorProps[idx]];
  402. }
  403. /* istanbul ignore else */
  404. if (Error.captureStackTrace) {
  405. Error.captureStackTrace(this, Exception);
  406. }
  407. try {
  408. if (loc) {
  409. this.lineNumber = line;
  410. this.endLineNumber = endLineNumber;
  411. // Work around issue under safari where we can't directly set the column value
  412. /* istanbul ignore next */
  413. if (_Object$defineProperty) {
  414. Object.defineProperty(this, 'column', {
  415. value: column,
  416. enumerable: true
  417. });
  418. Object.defineProperty(this, 'endColumn', {
  419. value: endColumn,
  420. enumerable: true
  421. });
  422. } else {
  423. this.column = column;
  424. this.endColumn = endColumn;
  425. }
  426. }
  427. } catch (nop) {
  428. /* Ignore if the browser is very particular */
  429. }
  430. }
  431. Exception.prototype = new Error();
  432. exports['default'] = Exception;
  433. module.exports = exports['default'];
  434. /***/ }),
  435. /* 7 */
  436. /***/ (function(module, exports, __webpack_require__) {
  437. module.exports = { "default": __webpack_require__(8), __esModule: true };
  438. /***/ }),
  439. /* 8 */
  440. /***/ (function(module, exports, __webpack_require__) {
  441. var $ = __webpack_require__(9);
  442. module.exports = function defineProperty(it, key, desc){
  443. return $.setDesc(it, key, desc);
  444. };
  445. /***/ }),
  446. /* 9 */
  447. /***/ (function(module, exports) {
  448. var $Object = Object;
  449. module.exports = {
  450. create: $Object.create,
  451. getProto: $Object.getPrototypeOf,
  452. isEnum: {}.propertyIsEnumerable,
  453. getDesc: $Object.getOwnPropertyDescriptor,
  454. setDesc: $Object.defineProperty,
  455. setDescs: $Object.defineProperties,
  456. getKeys: $Object.keys,
  457. getNames: $Object.getOwnPropertyNames,
  458. getSymbols: $Object.getOwnPropertySymbols,
  459. each: [].forEach
  460. };
  461. /***/ }),
  462. /* 10 */
  463. /***/ (function(module, exports, __webpack_require__) {
  464. 'use strict';
  465. var _interopRequireDefault = __webpack_require__(1)['default'];
  466. exports.__esModule = true;
  467. exports.registerDefaultHelpers = registerDefaultHelpers;
  468. exports.moveHelperToHooks = moveHelperToHooks;
  469. var _helpersBlockHelperMissing = __webpack_require__(11);
  470. var _helpersBlockHelperMissing2 = _interopRequireDefault(_helpersBlockHelperMissing);
  471. var _helpersEach = __webpack_require__(12);
  472. var _helpersEach2 = _interopRequireDefault(_helpersEach);
  473. var _helpersHelperMissing = __webpack_require__(65);
  474. var _helpersHelperMissing2 = _interopRequireDefault(_helpersHelperMissing);
  475. var _helpersIf = __webpack_require__(66);
  476. var _helpersIf2 = _interopRequireDefault(_helpersIf);
  477. var _helpersLog = __webpack_require__(67);
  478. var _helpersLog2 = _interopRequireDefault(_helpersLog);
  479. var _helpersLookup = __webpack_require__(68);
  480. var _helpersLookup2 = _interopRequireDefault(_helpersLookup);
  481. var _helpersWith = __webpack_require__(69);
  482. var _helpersWith2 = _interopRequireDefault(_helpersWith);
  483. function registerDefaultHelpers(instance) {
  484. _helpersBlockHelperMissing2['default'](instance);
  485. _helpersEach2['default'](instance);
  486. _helpersHelperMissing2['default'](instance);
  487. _helpersIf2['default'](instance);
  488. _helpersLog2['default'](instance);
  489. _helpersLookup2['default'](instance);
  490. _helpersWith2['default'](instance);
  491. }
  492. function moveHelperToHooks(instance, helperName, keepHelper) {
  493. if (instance.helpers[helperName]) {
  494. instance.hooks[helperName] = instance.helpers[helperName];
  495. if (!keepHelper) {
  496. delete instance.helpers[helperName];
  497. }
  498. }
  499. }
  500. /***/ }),
  501. /* 11 */
  502. /***/ (function(module, exports, __webpack_require__) {
  503. 'use strict';
  504. exports.__esModule = true;
  505. var _utils = __webpack_require__(5);
  506. exports['default'] = function (instance) {
  507. instance.registerHelper('blockHelperMissing', function (context, options) {
  508. var inverse = options.inverse,
  509. fn = options.fn;
  510. if (context === true) {
  511. return fn(this);
  512. } else if (context === false || context == null) {
  513. return inverse(this);
  514. } else if (_utils.isArray(context)) {
  515. if (context.length > 0) {
  516. if (options.ids) {
  517. options.ids = [options.name];
  518. }
  519. return instance.helpers.each(context, options);
  520. } else {
  521. return inverse(this);
  522. }
  523. } else {
  524. if (options.data && options.ids) {
  525. var data = _utils.createFrame(options.data);
  526. data.contextPath = _utils.appendContextPath(options.data.contextPath, options.name);
  527. options = { data: data };
  528. }
  529. return fn(context, options);
  530. }
  531. });
  532. };
  533. module.exports = exports['default'];
  534. /***/ }),
  535. /* 12 */
  536. /***/ (function(module, exports, __webpack_require__) {
  537. 'use strict';
  538. var _Symbol = __webpack_require__(13)['default'];
  539. var _Symbol$iterator = __webpack_require__(43)['default'];
  540. var _getIterator = __webpack_require__(55)['default'];
  541. var _Object$keys = __webpack_require__(60)['default'];
  542. var _interopRequireDefault = __webpack_require__(1)['default'];
  543. exports.__esModule = true;
  544. var _utils = __webpack_require__(5);
  545. var _exception = __webpack_require__(6);
  546. var _exception2 = _interopRequireDefault(_exception);
  547. exports['default'] = function (instance) {
  548. instance.registerHelper('each', function (context, options) {
  549. if (!options) {
  550. throw new _exception2['default']('Must pass iterator to #each');
  551. }
  552. var fn = options.fn,
  553. inverse = options.inverse,
  554. i = 0,
  555. ret = '',
  556. data = undefined,
  557. contextPath = undefined;
  558. if (options.data && options.ids) {
  559. contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]) + '.';
  560. }
  561. if (_utils.isFunction(context)) {
  562. context = context.call(this);
  563. }
  564. if (options.data) {
  565. data = _utils.createFrame(options.data);
  566. }
  567. function execIteration(field, index, last) {
  568. if (data) {
  569. data.key = field;
  570. data.index = index;
  571. data.first = index === 0;
  572. data.last = !!last;
  573. if (contextPath) {
  574. data.contextPath = contextPath + field;
  575. }
  576. }
  577. ret = ret + fn(context[field], {
  578. data: data,
  579. blockParams: _utils.blockParams([context[field], field], [contextPath + field, null])
  580. });
  581. }
  582. if (context && typeof context === 'object') {
  583. if (_utils.isArray(context)) {
  584. for (var j = context.length; i < j; i++) {
  585. if (i in context) {
  586. execIteration(i, i, i === context.length - 1);
  587. }
  588. }
  589. } else if (typeof _Symbol === 'function' && context[_Symbol$iterator]) {
  590. var newContext = [];
  591. var iterator = _getIterator(context);
  592. for (var it = iterator.next(); !it.done; it = iterator.next()) {
  593. newContext.push(it.value);
  594. }
  595. context = newContext;
  596. for (var j = context.length; i < j; i++) {
  597. execIteration(i, i, i === context.length - 1);
  598. }
  599. } else {
  600. (function () {
  601. var priorKey = undefined;
  602. _Object$keys(context).forEach(function (key) {
  603. // We're running the iterations one step out of sync so we can detect
  604. // the last iteration without have to scan the object twice and create
  605. // an itermediate keys array.
  606. if (priorKey !== undefined) {
  607. execIteration(priorKey, i - 1);
  608. }
  609. priorKey = key;
  610. i++;
  611. });
  612. if (priorKey !== undefined) {
  613. execIteration(priorKey, i - 1, true);
  614. }
  615. })();
  616. }
  617. }
  618. if (i === 0) {
  619. ret = inverse(this);
  620. }
  621. return ret;
  622. });
  623. };
  624. module.exports = exports['default'];
  625. /***/ }),
  626. /* 13 */
  627. /***/ (function(module, exports, __webpack_require__) {
  628. module.exports = { "default": __webpack_require__(14), __esModule: true };
  629. /***/ }),
  630. /* 14 */
  631. /***/ (function(module, exports, __webpack_require__) {
  632. __webpack_require__(15);
  633. __webpack_require__(42);
  634. module.exports = __webpack_require__(21).Symbol;
  635. /***/ }),
  636. /* 15 */
  637. /***/ (function(module, exports, __webpack_require__) {
  638. 'use strict';
  639. // ECMAScript 6 symbols shim
  640. var $ = __webpack_require__(9)
  641. , global = __webpack_require__(16)
  642. , has = __webpack_require__(17)
  643. , DESCRIPTORS = __webpack_require__(18)
  644. , $export = __webpack_require__(20)
  645. , redefine = __webpack_require__(24)
  646. , $fails = __webpack_require__(19)
  647. , shared = __webpack_require__(27)
  648. , setToStringTag = __webpack_require__(28)
  649. , uid = __webpack_require__(30)
  650. , wks = __webpack_require__(29)
  651. , keyOf = __webpack_require__(31)
  652. , $names = __webpack_require__(36)
  653. , enumKeys = __webpack_require__(37)
  654. , isArray = __webpack_require__(38)
  655. , anObject = __webpack_require__(39)
  656. , toIObject = __webpack_require__(32)
  657. , createDesc = __webpack_require__(26)
  658. , getDesc = $.getDesc
  659. , setDesc = $.setDesc
  660. , _create = $.create
  661. , getNames = $names.get
  662. , $Symbol = global.Symbol
  663. , $JSON = global.JSON
  664. , _stringify = $JSON && $JSON.stringify
  665. , setter = false
  666. , HIDDEN = wks('_hidden')
  667. , isEnum = $.isEnum
  668. , SymbolRegistry = shared('symbol-registry')
  669. , AllSymbols = shared('symbols')
  670. , useNative = typeof $Symbol == 'function'
  671. , ObjectProto = Object.prototype;
  672. // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
  673. var setSymbolDesc = DESCRIPTORS && $fails(function(){
  674. return _create(setDesc({}, 'a', {
  675. get: function(){ return setDesc(this, 'a', {value: 7}).a; }
  676. })).a != 7;
  677. }) ? function(it, key, D){
  678. var protoDesc = getDesc(ObjectProto, key);
  679. if(protoDesc)delete ObjectProto[key];
  680. setDesc(it, key, D);
  681. if(protoDesc && it !== ObjectProto)setDesc(ObjectProto, key, protoDesc);
  682. } : setDesc;
  683. var wrap = function(tag){
  684. var sym = AllSymbols[tag] = _create($Symbol.prototype);
  685. sym._k = tag;
  686. DESCRIPTORS && setter && setSymbolDesc(ObjectProto, tag, {
  687. configurable: true,
  688. set: function(value){
  689. if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false;
  690. setSymbolDesc(this, tag, createDesc(1, value));
  691. }
  692. });
  693. return sym;
  694. };
  695. var isSymbol = function(it){
  696. return typeof it == 'symbol';
  697. };
  698. var $defineProperty = function defineProperty(it, key, D){
  699. if(D && has(AllSymbols, key)){
  700. if(!D.enumerable){
  701. if(!has(it, HIDDEN))setDesc(it, HIDDEN, createDesc(1, {}));
  702. it[HIDDEN][key] = true;
  703. } else {
  704. if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false;
  705. D = _create(D, {enumerable: createDesc(0, false)});
  706. } return setSymbolDesc(it, key, D);
  707. } return setDesc(it, key, D);
  708. };
  709. var $defineProperties = function defineProperties(it, P){
  710. anObject(it);
  711. var keys = enumKeys(P = toIObject(P))
  712. , i = 0
  713. , l = keys.length
  714. , key;
  715. while(l > i)$defineProperty(it, key = keys[i++], P[key]);
  716. return it;
  717. };
  718. var $create = function create(it, P){
  719. return P === undefined ? _create(it) : $defineProperties(_create(it), P);
  720. };
  721. var $propertyIsEnumerable = function propertyIsEnumerable(key){
  722. var E = isEnum.call(this, key);
  723. return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key]
  724. ? E : true;
  725. };
  726. var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){
  727. var D = getDesc(it = toIObject(it), key);
  728. if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true;
  729. return D;
  730. };
  731. var $getOwnPropertyNames = function getOwnPropertyNames(it){
  732. var names = getNames(toIObject(it))
  733. , result = []
  734. , i = 0
  735. , key;
  736. while(names.length > i)if(!has(AllSymbols, key = names[i++]) && key != HIDDEN)result.push(key);
  737. return result;
  738. };
  739. var $getOwnPropertySymbols = function getOwnPropertySymbols(it){
  740. var names = getNames(toIObject(it))
  741. , result = []
  742. , i = 0
  743. , key;
  744. while(names.length > i)if(has(AllSymbols, key = names[i++]))result.push(AllSymbols[key]);
  745. return result;
  746. };
  747. var $stringify = function stringify(it){
  748. if(it === undefined || isSymbol(it))return; // IE8 returns string on undefined
  749. var args = [it]
  750. , i = 1
  751. , $$ = arguments
  752. , replacer, $replacer;
  753. while($$.length > i)args.push($$[i++]);
  754. replacer = args[1];
  755. if(typeof replacer == 'function')$replacer = replacer;
  756. if($replacer || !isArray(replacer))replacer = function(key, value){
  757. if($replacer)value = $replacer.call(this, key, value);
  758. if(!isSymbol(value))return value;
  759. };
  760. args[1] = replacer;
  761. return _stringify.apply($JSON, args);
  762. };
  763. var buggyJSON = $fails(function(){
  764. var S = $Symbol();
  765. // MS Edge converts symbol values to JSON as {}
  766. // WebKit converts symbol values to JSON as null
  767. // V8 throws on boxed symbols
  768. return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}';
  769. });
  770. // 19.4.1.1 Symbol([description])
  771. if(!useNative){
  772. $Symbol = function Symbol(){
  773. if(isSymbol(this))throw TypeError('Symbol is not a constructor');
  774. return wrap(uid(arguments.length > 0 ? arguments[0] : undefined));
  775. };
  776. redefine($Symbol.prototype, 'toString', function toString(){
  777. return this._k;
  778. });
  779. isSymbol = function(it){
  780. return it instanceof $Symbol;
  781. };
  782. $.create = $create;
  783. $.isEnum = $propertyIsEnumerable;
  784. $.getDesc = $getOwnPropertyDescriptor;
  785. $.setDesc = $defineProperty;
  786. $.setDescs = $defineProperties;
  787. $.getNames = $names.get = $getOwnPropertyNames;
  788. $.getSymbols = $getOwnPropertySymbols;
  789. if(DESCRIPTORS && !__webpack_require__(41)){
  790. redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);
  791. }
  792. }
  793. var symbolStatics = {
  794. // 19.4.2.1 Symbol.for(key)
  795. 'for': function(key){
  796. return has(SymbolRegistry, key += '')
  797. ? SymbolRegistry[key]
  798. : SymbolRegistry[key] = $Symbol(key);
  799. },
  800. // 19.4.2.5 Symbol.keyFor(sym)
  801. keyFor: function keyFor(key){
  802. return keyOf(SymbolRegistry, key);
  803. },
  804. useSetter: function(){ setter = true; },
  805. useSimple: function(){ setter = false; }
  806. };
  807. // 19.4.2.2 Symbol.hasInstance
  808. // 19.4.2.3 Symbol.isConcatSpreadable
  809. // 19.4.2.4 Symbol.iterator
  810. // 19.4.2.6 Symbol.match
  811. // 19.4.2.8 Symbol.replace
  812. // 19.4.2.9 Symbol.search
  813. // 19.4.2.10 Symbol.species
  814. // 19.4.2.11 Symbol.split
  815. // 19.4.2.12 Symbol.toPrimitive
  816. // 19.4.2.13 Symbol.toStringTag
  817. // 19.4.2.14 Symbol.unscopables
  818. $.each.call((
  819. 'hasInstance,isConcatSpreadable,iterator,match,replace,search,' +
  820. 'species,split,toPrimitive,toStringTag,unscopables'
  821. ).split(','), function(it){
  822. var sym = wks(it);
  823. symbolStatics[it] = useNative ? sym : wrap(sym);
  824. });
  825. setter = true;
  826. $export($export.G + $export.W, {Symbol: $Symbol});
  827. $export($export.S, 'Symbol', symbolStatics);
  828. $export($export.S + $export.F * !useNative, 'Object', {
  829. // 19.1.2.2 Object.create(O [, Properties])
  830. create: $create,
  831. // 19.1.2.4 Object.defineProperty(O, P, Attributes)
  832. defineProperty: $defineProperty,
  833. // 19.1.2.3 Object.defineProperties(O, Properties)
  834. defineProperties: $defineProperties,
  835. // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
  836. getOwnPropertyDescriptor: $getOwnPropertyDescriptor,
  837. // 19.1.2.7 Object.getOwnPropertyNames(O)
  838. getOwnPropertyNames: $getOwnPropertyNames,
  839. // 19.1.2.8 Object.getOwnPropertySymbols(O)
  840. getOwnPropertySymbols: $getOwnPropertySymbols
  841. });
  842. // 24.3.2 JSON.stringify(value [, replacer [, space]])
  843. $JSON && $export($export.S + $export.F * (!useNative || buggyJSON), 'JSON', {stringify: $stringify});
  844. // 19.4.3.5 Symbol.prototype[@@toStringTag]
  845. setToStringTag($Symbol, 'Symbol');
  846. // 20.2.1.9 Math[@@toStringTag]
  847. setToStringTag(Math, 'Math', true);
  848. // 24.3.3 JSON[@@toStringTag]
  849. setToStringTag(global.JSON, 'JSON', true);
  850. /***/ }),
  851. /* 16 */
  852. /***/ (function(module, exports) {
  853. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  854. var global = module.exports = typeof window != 'undefined' && window.Math == Math
  855. ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();
  856. if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef
  857. /***/ }),
  858. /* 17 */
  859. /***/ (function(module, exports) {
  860. var hasOwnProperty = {}.hasOwnProperty;
  861. module.exports = function(it, key){
  862. return hasOwnProperty.call(it, key);
  863. };
  864. /***/ }),
  865. /* 18 */
  866. /***/ (function(module, exports, __webpack_require__) {
  867. // Thank's IE8 for his funny defineProperty
  868. module.exports = !__webpack_require__(19)(function(){
  869. return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7;
  870. });
  871. /***/ }),
  872. /* 19 */
  873. /***/ (function(module, exports) {
  874. module.exports = function(exec){
  875. try {
  876. return !!exec();
  877. } catch(e){
  878. return true;
  879. }
  880. };
  881. /***/ }),
  882. /* 20 */
  883. /***/ (function(module, exports, __webpack_require__) {
  884. var global = __webpack_require__(16)
  885. , core = __webpack_require__(21)
  886. , ctx = __webpack_require__(22)
  887. , PROTOTYPE = 'prototype';
  888. var $export = function(type, name, source){
  889. var IS_FORCED = type & $export.F
  890. , IS_GLOBAL = type & $export.G
  891. , IS_STATIC = type & $export.S
  892. , IS_PROTO = type & $export.P
  893. , IS_BIND = type & $export.B
  894. , IS_WRAP = type & $export.W
  895. , exports = IS_GLOBAL ? core : core[name] || (core[name] = {})
  896. , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]
  897. , key, own, out;
  898. if(IS_GLOBAL)source = name;
  899. for(key in source){
  900. // contains in native
  901. own = !IS_FORCED && target && key in target;
  902. if(own && key in exports)continue;
  903. // export native or passed
  904. out = own ? target[key] : source[key];
  905. // prevent global pollution for namespaces
  906. exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
  907. // bind timers to global for call from export context
  908. : IS_BIND && own ? ctx(out, global)
  909. // wrap global constructors for prevent change them in library
  910. : IS_WRAP && target[key] == out ? (function(C){
  911. var F = function(param){
  912. return this instanceof C ? new C(param) : C(param);
  913. };
  914. F[PROTOTYPE] = C[PROTOTYPE];
  915. return F;
  916. // make static versions for prototype methods
  917. })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
  918. if(IS_PROTO)(exports[PROTOTYPE] || (exports[PROTOTYPE] = {}))[key] = out;
  919. }
  920. };
  921. // type bitmap
  922. $export.F = 1; // forced
  923. $export.G = 2; // global
  924. $export.S = 4; // static
  925. $export.P = 8; // proto
  926. $export.B = 16; // bind
  927. $export.W = 32; // wrap
  928. module.exports = $export;
  929. /***/ }),
  930. /* 21 */
  931. /***/ (function(module, exports) {
  932. var core = module.exports = {version: '1.2.6'};
  933. if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef
  934. /***/ }),
  935. /* 22 */
  936. /***/ (function(module, exports, __webpack_require__) {
  937. // optional / simple context binding
  938. var aFunction = __webpack_require__(23);
  939. module.exports = function(fn, that, length){
  940. aFunction(fn);
  941. if(that === undefined)return fn;
  942. switch(length){
  943. case 1: return function(a){
  944. return fn.call(that, a);
  945. };
  946. case 2: return function(a, b){
  947. return fn.call(that, a, b);
  948. };
  949. case 3: return function(a, b, c){
  950. return fn.call(that, a, b, c);
  951. };
  952. }
  953. return function(/* ...args */){
  954. return fn.apply(that, arguments);
  955. };
  956. };
  957. /***/ }),
  958. /* 23 */
  959. /***/ (function(module, exports) {
  960. module.exports = function(it){
  961. if(typeof it != 'function')throw TypeError(it + ' is not a function!');
  962. return it;
  963. };
  964. /***/ }),
  965. /* 24 */
  966. /***/ (function(module, exports, __webpack_require__) {
  967. module.exports = __webpack_require__(25);
  968. /***/ }),
  969. /* 25 */
  970. /***/ (function(module, exports, __webpack_require__) {
  971. var $ = __webpack_require__(9)
  972. , createDesc = __webpack_require__(26);
  973. module.exports = __webpack_require__(18) ? function(object, key, value){
  974. return $.setDesc(object, key, createDesc(1, value));
  975. } : function(object, key, value){
  976. object[key] = value;
  977. return object;
  978. };
  979. /***/ }),
  980. /* 26 */
  981. /***/ (function(module, exports) {
  982. module.exports = function(bitmap, value){
  983. return {
  984. enumerable : !(bitmap & 1),
  985. configurable: !(bitmap & 2),
  986. writable : !(bitmap & 4),
  987. value : value
  988. };
  989. };
  990. /***/ }),
  991. /* 27 */
  992. /***/ (function(module, exports, __webpack_require__) {
  993. var global = __webpack_require__(16)
  994. , SHARED = '__core-js_shared__'
  995. , store = global[SHARED] || (global[SHARED] = {});
  996. module.exports = function(key){
  997. return store[key] || (store[key] = {});
  998. };
  999. /***/ }),
  1000. /* 28 */
  1001. /***/ (function(module, exports, __webpack_require__) {
  1002. var def = __webpack_require__(9).setDesc
  1003. , has = __webpack_require__(17)
  1004. , TAG = __webpack_require__(29)('toStringTag');
  1005. module.exports = function(it, tag, stat){
  1006. if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag});
  1007. };
  1008. /***/ }),
  1009. /* 29 */
  1010. /***/ (function(module, exports, __webpack_require__) {
  1011. var store = __webpack_require__(27)('wks')
  1012. , uid = __webpack_require__(30)
  1013. , Symbol = __webpack_require__(16).Symbol;
  1014. module.exports = function(name){
  1015. return store[name] || (store[name] =
  1016. Symbol && Symbol[name] || (Symbol || uid)('Symbol.' + name));
  1017. };
  1018. /***/ }),
  1019. /* 30 */
  1020. /***/ (function(module, exports) {
  1021. var id = 0
  1022. , px = Math.random();
  1023. module.exports = function(key){
  1024. return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
  1025. };
  1026. /***/ }),
  1027. /* 31 */
  1028. /***/ (function(module, exports, __webpack_require__) {
  1029. var $ = __webpack_require__(9)
  1030. , toIObject = __webpack_require__(32);
  1031. module.exports = function(object, el){
  1032. var O = toIObject(object)
  1033. , keys = $.getKeys(O)
  1034. , length = keys.length
  1035. , index = 0
  1036. , key;
  1037. while(length > index)if(O[key = keys[index++]] === el)return key;
  1038. };
  1039. /***/ }),
  1040. /* 32 */
  1041. /***/ (function(module, exports, __webpack_require__) {
  1042. // to indexed object, toObject with fallback for non-array-like ES3 strings
  1043. var IObject = __webpack_require__(33)
  1044. , defined = __webpack_require__(35);
  1045. module.exports = function(it){
  1046. return IObject(defined(it));
  1047. };
  1048. /***/ }),
  1049. /* 33 */
  1050. /***/ (function(module, exports, __webpack_require__) {
  1051. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  1052. var cof = __webpack_require__(34);
  1053. module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){
  1054. return cof(it) == 'String' ? it.split('') : Object(it);
  1055. };
  1056. /***/ }),
  1057. /* 34 */
  1058. /***/ (function(module, exports) {
  1059. var toString = {}.toString;
  1060. module.exports = function(it){
  1061. return toString.call(it).slice(8, -1);
  1062. };
  1063. /***/ }),
  1064. /* 35 */
  1065. /***/ (function(module, exports) {
  1066. // 7.2.1 RequireObjectCoercible(argument)
  1067. module.exports = function(it){
  1068. if(it == undefined)throw TypeError("Can't call method on " + it);
  1069. return it;
  1070. };
  1071. /***/ }),
  1072. /* 36 */
  1073. /***/ (function(module, exports, __webpack_require__) {
  1074. // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
  1075. var toIObject = __webpack_require__(32)
  1076. , getNames = __webpack_require__(9).getNames
  1077. , toString = {}.toString;
  1078. var windowNames = typeof window == 'object' && Object.getOwnPropertyNames
  1079. ? Object.getOwnPropertyNames(window) : [];
  1080. var getWindowNames = function(it){
  1081. try {
  1082. return getNames(it);
  1083. } catch(e){
  1084. return windowNames.slice();
  1085. }
  1086. };
  1087. module.exports.get = function getOwnPropertyNames(it){
  1088. if(windowNames && toString.call(it) == '[object Window]')return getWindowNames(it);
  1089. return getNames(toIObject(it));
  1090. };
  1091. /***/ }),
  1092. /* 37 */
  1093. /***/ (function(module, exports, __webpack_require__) {
  1094. // all enumerable object keys, includes symbols
  1095. var $ = __webpack_require__(9);
  1096. module.exports = function(it){
  1097. var keys = $.getKeys(it)
  1098. , getSymbols = $.getSymbols;
  1099. if(getSymbols){
  1100. var symbols = getSymbols(it)
  1101. , isEnum = $.isEnum
  1102. , i = 0
  1103. , key;
  1104. while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))keys.push(key);
  1105. }
  1106. return keys;
  1107. };
  1108. /***/ }),
  1109. /* 38 */
  1110. /***/ (function(module, exports, __webpack_require__) {
  1111. // 7.2.2 IsArray(argument)
  1112. var cof = __webpack_require__(34);
  1113. module.exports = Array.isArray || function(arg){
  1114. return cof(arg) == 'Array';
  1115. };
  1116. /***/ }),
  1117. /* 39 */
  1118. /***/ (function(module, exports, __webpack_require__) {
  1119. var isObject = __webpack_require__(40);
  1120. module.exports = function(it){
  1121. if(!isObject(it))throw TypeError(it + ' is not an object!');
  1122. return it;
  1123. };
  1124. /***/ }),
  1125. /* 40 */
  1126. /***/ (function(module, exports) {
  1127. module.exports = function(it){
  1128. return typeof it === 'object' ? it !== null : typeof it === 'function';
  1129. };
  1130. /***/ }),
  1131. /* 41 */
  1132. /***/ (function(module, exports) {
  1133. module.exports = true;
  1134. /***/ }),
  1135. /* 42 */
  1136. /***/ (function(module, exports) {
  1137. /***/ }),
  1138. /* 43 */
  1139. /***/ (function(module, exports, __webpack_require__) {
  1140. module.exports = { "default": __webpack_require__(44), __esModule: true };
  1141. /***/ }),
  1142. /* 44 */
  1143. /***/ (function(module, exports, __webpack_require__) {
  1144. __webpack_require__(45);
  1145. __webpack_require__(51);
  1146. module.exports = __webpack_require__(29)('iterator');
  1147. /***/ }),
  1148. /* 45 */
  1149. /***/ (function(module, exports, __webpack_require__) {
  1150. 'use strict';
  1151. var $at = __webpack_require__(46)(true);
  1152. // 21.1.3.27 String.prototype[@@iterator]()
  1153. __webpack_require__(48)(String, 'String', function(iterated){
  1154. this._t = String(iterated); // target
  1155. this._i = 0; // next index
  1156. // 21.1.5.2.1 %StringIteratorPrototype%.next()
  1157. }, function(){
  1158. var O = this._t
  1159. , index = this._i
  1160. , point;
  1161. if(index >= O.length)return {value: undefined, done: true};
  1162. point = $at(O, index);
  1163. this._i += point.length;
  1164. return {value: point, done: false};
  1165. });
  1166. /***/ }),
  1167. /* 46 */
  1168. /***/ (function(module, exports, __webpack_require__) {
  1169. var toInteger = __webpack_require__(47)
  1170. , defined = __webpack_require__(35);
  1171. // true -> String#at
  1172. // false -> String#codePointAt
  1173. module.exports = function(TO_STRING){
  1174. return function(that, pos){
  1175. var s = String(defined(that))
  1176. , i = toInteger(pos)
  1177. , l = s.length
  1178. , a, b;
  1179. if(i < 0 || i >= l)return TO_STRING ? '' : undefined;
  1180. a = s.charCodeAt(i);
  1181. return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff
  1182. ? TO_STRING ? s.charAt(i) : a
  1183. : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
  1184. };
  1185. };
  1186. /***/ }),
  1187. /* 47 */
  1188. /***/ (function(module, exports) {
  1189. // 7.1.4 ToInteger
  1190. var ceil = Math.ceil
  1191. , floor = Math.floor;
  1192. module.exports = function(it){
  1193. return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
  1194. };
  1195. /***/ }),
  1196. /* 48 */
  1197. /***/ (function(module, exports, __webpack_require__) {
  1198. 'use strict';
  1199. var LIBRARY = __webpack_require__(41)
  1200. , $export = __webpack_require__(20)
  1201. , redefine = __webpack_require__(24)
  1202. , hide = __webpack_require__(25)
  1203. , has = __webpack_require__(17)
  1204. , Iterators = __webpack_require__(49)
  1205. , $iterCreate = __webpack_require__(50)
  1206. , setToStringTag = __webpack_require__(28)
  1207. , getProto = __webpack_require__(9).getProto
  1208. , ITERATOR = __webpack_require__(29)('iterator')
  1209. , BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next`
  1210. , FF_ITERATOR = '@@iterator'
  1211. , KEYS = 'keys'
  1212. , VALUES = 'values';
  1213. var returnThis = function(){ return this; };
  1214. module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){
  1215. $iterCreate(Constructor, NAME, next);
  1216. var getMethod = function(kind){
  1217. if(!BUGGY && kind in proto)return proto[kind];
  1218. switch(kind){
  1219. case KEYS: return function keys(){ return new Constructor(this, kind); };
  1220. case VALUES: return function values(){ return new Constructor(this, kind); };
  1221. } return function entries(){ return new Constructor(this, kind); };
  1222. };
  1223. var TAG = NAME + ' Iterator'
  1224. , DEF_VALUES = DEFAULT == VALUES
  1225. , VALUES_BUG = false
  1226. , proto = Base.prototype
  1227. , $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]
  1228. , $default = $native || getMethod(DEFAULT)
  1229. , methods, key;
  1230. // Fix native
  1231. if($native){
  1232. var IteratorPrototype = getProto($default.call(new Base));
  1233. // Set @@toStringTag to native iterators
  1234. setToStringTag(IteratorPrototype, TAG, true);
  1235. // FF fix
  1236. if(!LIBRARY && has(proto, FF_ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis);
  1237. // fix Array#{values, @@iterator}.name in V8 / FF
  1238. if(DEF_VALUES && $native.name !== VALUES){
  1239. VALUES_BUG = true;
  1240. $default = function values(){ return $native.call(this); };
  1241. }
  1242. }
  1243. // Define iterator
  1244. if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){
  1245. hide(proto, ITERATOR, $default);
  1246. }
  1247. // Plug for library
  1248. Iterators[NAME] = $default;
  1249. Iterators[TAG] = returnThis;
  1250. if(DEFAULT){
  1251. methods = {
  1252. values: DEF_VALUES ? $default : getMethod(VALUES),
  1253. keys: IS_SET ? $default : getMethod(KEYS),
  1254. entries: !DEF_VALUES ? $default : getMethod('entries')
  1255. };
  1256. if(FORCED)for(key in methods){
  1257. if(!(key in proto))redefine(proto, key, methods[key]);
  1258. } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
  1259. }
  1260. return methods;
  1261. };
  1262. /***/ }),
  1263. /* 49 */
  1264. /***/ (function(module, exports) {
  1265. module.exports = {};
  1266. /***/ }),
  1267. /* 50 */
  1268. /***/ (function(module, exports, __webpack_require__) {
  1269. 'use strict';
  1270. var $ = __webpack_require__(9)
  1271. , descriptor = __webpack_require__(26)
  1272. , setToStringTag = __webpack_require__(28)
  1273. , IteratorPrototype = {};
  1274. // 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
  1275. __webpack_require__(25)(IteratorPrototype, __webpack_require__(29)('iterator'), function(){ return this; });
  1276. module.exports = function(Constructor, NAME, next){
  1277. Constructor.prototype = $.create(IteratorPrototype, {next: descriptor(1, next)});
  1278. setToStringTag(Constructor, NAME + ' Iterator');
  1279. };
  1280. /***/ }),
  1281. /* 51 */
  1282. /***/ (function(module, exports, __webpack_require__) {
  1283. __webpack_require__(52);
  1284. var Iterators = __webpack_require__(49);
  1285. Iterators.NodeList = Iterators.HTMLCollection = Iterators.Array;
  1286. /***/ }),
  1287. /* 52 */
  1288. /***/ (function(module, exports, __webpack_require__) {
  1289. 'use strict';
  1290. var addToUnscopables = __webpack_require__(53)
  1291. , step = __webpack_require__(54)
  1292. , Iterators = __webpack_require__(49)
  1293. , toIObject = __webpack_require__(32);
  1294. // 22.1.3.4 Array.prototype.entries()
  1295. // 22.1.3.13 Array.prototype.keys()
  1296. // 22.1.3.29 Array.prototype.values()
  1297. // 22.1.3.30 Array.prototype[@@iterator]()
  1298. module.exports = __webpack_require__(48)(Array, 'Array', function(iterated, kind){
  1299. this._t = toIObject(iterated); // target
  1300. this._i = 0; // next index
  1301. this._k = kind; // kind
  1302. // 22.1.5.2.1 %ArrayIteratorPrototype%.next()
  1303. }, function(){
  1304. var O = this._t
  1305. , kind = this._k
  1306. , index = this._i++;
  1307. if(!O || index >= O.length){
  1308. this._t = undefined;
  1309. return step(1);
  1310. }
  1311. if(kind == 'keys' )return step(0, index);
  1312. if(kind == 'values')return step(0, O[index]);
  1313. return step(0, [index, O[index]]);
  1314. }, 'values');
  1315. // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
  1316. Iterators.Arguments = Iterators.Array;
  1317. addToUnscopables('keys');
  1318. addToUnscopables('values');
  1319. addToUnscopables('entries');
  1320. /***/ }),
  1321. /* 53 */
  1322. /***/ (function(module, exports) {
  1323. module.exports = function(){ /* empty */ };
  1324. /***/ }),
  1325. /* 54 */
  1326. /***/ (function(module, exports) {
  1327. module.exports = function(done, value){
  1328. return {value: value, done: !!done};
  1329. };
  1330. /***/ }),
  1331. /* 55 */
  1332. /***/ (function(module, exports, __webpack_require__) {
  1333. module.exports = { "default": __webpack_require__(56), __esModule: true };
  1334. /***/ }),
  1335. /* 56 */
  1336. /***/ (function(module, exports, __webpack_require__) {
  1337. __webpack_require__(51);
  1338. __webpack_require__(45);
  1339. module.exports = __webpack_require__(57);
  1340. /***/ }),
  1341. /* 57 */
  1342. /***/ (function(module, exports, __webpack_require__) {
  1343. var anObject = __webpack_require__(39)
  1344. , get = __webpack_require__(58);
  1345. module.exports = __webpack_require__(21).getIterator = function(it){
  1346. var iterFn = get(it);
  1347. if(typeof iterFn != 'function')throw TypeError(it + ' is not iterable!');
  1348. return anObject(iterFn.call(it));
  1349. };
  1350. /***/ }),
  1351. /* 58 */
  1352. /***/ (function(module, exports, __webpack_require__) {
  1353. var classof = __webpack_require__(59)
  1354. , ITERATOR = __webpack_require__(29)('iterator')
  1355. , Iterators = __webpack_require__(49);
  1356. module.exports = __webpack_require__(21).getIteratorMethod = function(it){
  1357. if(it != undefined)return it[ITERATOR]
  1358. || it['@@iterator']
  1359. || Iterators[classof(it)];
  1360. };
  1361. /***/ }),
  1362. /* 59 */
  1363. /***/ (function(module, exports, __webpack_require__) {
  1364. // getting tag from 19.1.3.6 Object.prototype.toString()
  1365. var cof = __webpack_require__(34)
  1366. , TAG = __webpack_require__(29)('toStringTag')
  1367. // ES3 wrong here
  1368. , ARG = cof(function(){ return arguments; }()) == 'Arguments';
  1369. module.exports = function(it){
  1370. var O, T, B;
  1371. return it === undefined ? 'Undefined' : it === null ? 'Null'
  1372. // @@toStringTag case
  1373. : typeof (T = (O = Object(it))[TAG]) == 'string' ? T
  1374. // builtinTag case
  1375. : ARG ? cof(O)
  1376. // ES3 arguments fallback
  1377. : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;
  1378. };
  1379. /***/ }),
  1380. /* 60 */
  1381. /***/ (function(module, exports, __webpack_require__) {
  1382. module.exports = { "default": __webpack_require__(61), __esModule: true };
  1383. /***/ }),
  1384. /* 61 */
  1385. /***/ (function(module, exports, __webpack_require__) {
  1386. __webpack_require__(62);
  1387. module.exports = __webpack_require__(21).Object.keys;
  1388. /***/ }),
  1389. /* 62 */
  1390. /***/ (function(module, exports, __webpack_require__) {
  1391. // 19.1.2.14 Object.keys(O)
  1392. var toObject = __webpack_require__(63);
  1393. __webpack_require__(64)('keys', function($keys){
  1394. return function keys(it){
  1395. return $keys(toObject(it));
  1396. };
  1397. });
  1398. /***/ }),
  1399. /* 63 */
  1400. /***/ (function(module, exports, __webpack_require__) {
  1401. // 7.1.13 ToObject(argument)
  1402. var defined = __webpack_require__(35);
  1403. module.exports = function(it){
  1404. return Object(defined(it));
  1405. };
  1406. /***/ }),
  1407. /* 64 */
  1408. /***/ (function(module, exports, __webpack_require__) {
  1409. // most Object methods by ES6 should accept primitives
  1410. var $export = __webpack_require__(20)
  1411. , core = __webpack_require__(21)
  1412. , fails = __webpack_require__(19);
  1413. module.exports = function(KEY, exec){
  1414. var fn = (core.Object || {})[KEY] || Object[KEY]
  1415. , exp = {};
  1416. exp[KEY] = exec(fn);
  1417. $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp);
  1418. };
  1419. /***/ }),
  1420. /* 65 */
  1421. /***/ (function(module, exports, __webpack_require__) {
  1422. 'use strict';
  1423. var _interopRequireDefault = __webpack_require__(1)['default'];
  1424. exports.__esModule = true;
  1425. var _exception = __webpack_require__(6);
  1426. var _exception2 = _interopRequireDefault(_exception);
  1427. exports['default'] = function (instance) {
  1428. instance.registerHelper('helperMissing', function () /* [args, ]options */{
  1429. if (arguments.length === 1) {
  1430. // A missing field in a {{foo}} construct.
  1431. return undefined;
  1432. } else {
  1433. // Someone is actually trying to call something, blow up.
  1434. throw new _exception2['default']('Missing helper: "' + arguments[arguments.length - 1].name + '"');
  1435. }
  1436. });
  1437. };
  1438. module.exports = exports['default'];
  1439. /***/ }),
  1440. /* 66 */
  1441. /***/ (function(module, exports, __webpack_require__) {
  1442. 'use strict';
  1443. var _interopRequireDefault = __webpack_require__(1)['default'];
  1444. exports.__esModule = true;
  1445. var _utils = __webpack_require__(5);
  1446. var _exception = __webpack_require__(6);
  1447. var _exception2 = _interopRequireDefault(_exception);
  1448. exports['default'] = function (instance) {
  1449. instance.registerHelper('if', function (conditional, options) {
  1450. if (arguments.length != 2) {
  1451. throw new _exception2['default']('#if requires exactly one argument');
  1452. }
  1453. if (_utils.isFunction(conditional)) {
  1454. conditional = conditional.call(this);
  1455. }
  1456. // Default behavior is to render the positive path if the value is truthy and not empty.
  1457. // The `includeZero` option may be set to treat the condtional as purely not empty based on the
  1458. // behavior of isEmpty. Effectively this determines if 0 is handled by the positive path or negative.
  1459. if (!options.hash.includeZero && !conditional || _utils.isEmpty(conditional)) {
  1460. return options.inverse(this);
  1461. } else {
  1462. return options.fn(this);
  1463. }
  1464. });
  1465. instance.registerHelper('unless', function (conditional, options) {
  1466. if (arguments.length != 2) {
  1467. throw new _exception2['default']('#unless requires exactly one argument');
  1468. }
  1469. return instance.helpers['if'].call(this, conditional, {
  1470. fn: options.inverse,
  1471. inverse: options.fn,
  1472. hash: options.hash
  1473. });
  1474. });
  1475. };
  1476. module.exports = exports['default'];
  1477. /***/ }),
  1478. /* 67 */
  1479. /***/ (function(module, exports) {
  1480. 'use strict';
  1481. exports.__esModule = true;
  1482. exports['default'] = function (instance) {
  1483. instance.registerHelper('log', function () /* message, options */{
  1484. var args = [undefined],
  1485. options = arguments[arguments.length - 1];
  1486. for (var i = 0; i < arguments.length - 1; i++) {
  1487. args.push(arguments[i]);
  1488. }
  1489. var level = 1;
  1490. if (options.hash.level != null) {
  1491. level = options.hash.level;
  1492. } else if (options.data && options.data.level != null) {
  1493. level = options.data.level;
  1494. }
  1495. args[0] = level;
  1496. instance.log.apply(instance, args);
  1497. });
  1498. };
  1499. module.exports = exports['default'];
  1500. /***/ }),
  1501. /* 68 */
  1502. /***/ (function(module, exports) {
  1503. 'use strict';
  1504. exports.__esModule = true;
  1505. exports['default'] = function (instance) {
  1506. instance.registerHelper('lookup', function (obj, field, options) {
  1507. if (!obj) {
  1508. // Note for 5.0: Change to "obj == null" in 5.0
  1509. return obj;
  1510. }
  1511. return options.lookupProperty(obj, field);
  1512. });
  1513. };
  1514. module.exports = exports['default'];
  1515. /***/ }),
  1516. /* 69 */
  1517. /***/ (function(module, exports, __webpack_require__) {
  1518. 'use strict';
  1519. var _interopRequireDefault = __webpack_require__(1)['default'];
  1520. exports.__esModule = true;
  1521. var _utils = __webpack_require__(5);
  1522. var _exception = __webpack_require__(6);
  1523. var _exception2 = _interopRequireDefault(_exception);
  1524. exports['default'] = function (instance) {
  1525. instance.registerHelper('with', function (context, options) {
  1526. if (arguments.length != 2) {
  1527. throw new _exception2['default']('#with requires exactly one argument');
  1528. }
  1529. if (_utils.isFunction(context)) {
  1530. context = context.call(this);
  1531. }
  1532. var fn = options.fn;
  1533. if (!_utils.isEmpty(context)) {
  1534. var data = options.data;
  1535. if (options.data && options.ids) {
  1536. data = _utils.createFrame(options.data);
  1537. data.contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]);
  1538. }
  1539. return fn(context, {
  1540. data: data,
  1541. blockParams: _utils.blockParams([context], [data && data.contextPath])
  1542. });
  1543. } else {
  1544. return options.inverse(this);
  1545. }
  1546. });
  1547. };
  1548. module.exports = exports['default'];
  1549. /***/ }),
  1550. /* 70 */
  1551. /***/ (function(module, exports, __webpack_require__) {
  1552. 'use strict';
  1553. var _interopRequireDefault = __webpack_require__(1)['default'];
  1554. exports.__esModule = true;
  1555. exports.registerDefaultDecorators = registerDefaultDecorators;
  1556. var _decoratorsInline = __webpack_require__(71);
  1557. var _decoratorsInline2 = _interopRequireDefault(_decoratorsInline);
  1558. function registerDefaultDecorators(instance) {
  1559. _decoratorsInline2['default'](instance);
  1560. }
  1561. /***/ }),
  1562. /* 71 */
  1563. /***/ (function(module, exports, __webpack_require__) {
  1564. 'use strict';
  1565. exports.__esModule = true;
  1566. var _utils = __webpack_require__(5);
  1567. exports['default'] = function (instance) {
  1568. instance.registerDecorator('inline', function (fn, props, container, options) {
  1569. var ret = fn;
  1570. if (!props.partials) {
  1571. props.partials = {};
  1572. ret = function (context, options) {
  1573. // Create a new partials stack frame prior to exec.
  1574. var original = container.partials;
  1575. container.partials = _utils.extend({}, original, props.partials);
  1576. var ret = fn(context, options);
  1577. container.partials = original;
  1578. return ret;
  1579. };
  1580. }
  1581. props.partials[options.args[0]] = options.fn;
  1582. return ret;
  1583. });
  1584. };
  1585. module.exports = exports['default'];
  1586. /***/ }),
  1587. /* 72 */
  1588. /***/ (function(module, exports, __webpack_require__) {
  1589. 'use strict';
  1590. exports.__esModule = true;
  1591. var _utils = __webpack_require__(5);
  1592. var logger = {
  1593. methodMap: ['debug', 'info', 'warn', 'error'],
  1594. level: 'info',
  1595. // Maps a given level value to the `methodMap` indexes above.
  1596. lookupLevel: function lookupLevel(level) {
  1597. if (typeof level === 'string') {
  1598. var levelMap = _utils.indexOf(logger.methodMap, level.toLowerCase());
  1599. if (levelMap >= 0) {
  1600. level = levelMap;
  1601. } else {
  1602. level = parseInt(level, 10);
  1603. }
  1604. }
  1605. return level;
  1606. },
  1607. // Can be overridden in the host environment
  1608. log: function log(level) {
  1609. level = logger.lookupLevel(level);
  1610. if (typeof console !== 'undefined' && logger.lookupLevel(logger.level) <= level) {
  1611. var method = logger.methodMap[level];
  1612. // eslint-disable-next-line no-console
  1613. if (!console[method]) {
  1614. method = 'log';
  1615. }
  1616. for (var _len = arguments.length, message = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
  1617. message[_key - 1] = arguments[_key];
  1618. }
  1619. console[method].apply(console, message); // eslint-disable-line no-console
  1620. }
  1621. }
  1622. };
  1623. exports['default'] = logger;
  1624. module.exports = exports['default'];
  1625. /***/ }),
  1626. /* 73 */
  1627. /***/ (function(module, exports, __webpack_require__) {
  1628. 'use strict';
  1629. var _Object$create = __webpack_require__(74)['default'];
  1630. var _Object$keys = __webpack_require__(60)['default'];
  1631. var _interopRequireDefault = __webpack_require__(1)['default'];
  1632. exports.__esModule = true;
  1633. exports.createProtoAccessControl = createProtoAccessControl;
  1634. exports.resultIsAllowed = resultIsAllowed;
  1635. exports.resetLoggedProperties = resetLoggedProperties;
  1636. var _createNewLookupObject = __webpack_require__(76);
  1637. var _logger = __webpack_require__(72);
  1638. var _logger2 = _interopRequireDefault(_logger);
  1639. var loggedProperties = _Object$create(null);
  1640. function createProtoAccessControl(runtimeOptions) {
  1641. var defaultMethodWhiteList = _Object$create(null);
  1642. defaultMethodWhiteList['constructor'] = false;
  1643. defaultMethodWhiteList['__defineGetter__'] = false;
  1644. defaultMethodWhiteList['__defineSetter__'] = false;
  1645. defaultMethodWhiteList['__lookupGetter__'] = false;
  1646. var defaultPropertyWhiteList = _Object$create(null);
  1647. // eslint-disable-next-line no-proto
  1648. defaultPropertyWhiteList['__proto__'] = false;
  1649. return {
  1650. properties: {
  1651. whitelist: _createNewLookupObject.createNewLookupObject(defaultPropertyWhiteList, runtimeOptions.allowedProtoProperties),
  1652. defaultValue: runtimeOptions.allowProtoPropertiesByDefault
  1653. },
  1654. methods: {
  1655. whitelist: _createNewLookupObject.createNewLookupObject(defaultMethodWhiteList, runtimeOptions.allowedProtoMethods),
  1656. defaultValue: runtimeOptions.allowProtoMethodsByDefault
  1657. }
  1658. };
  1659. }
  1660. function resultIsAllowed(result, protoAccessControl, propertyName) {
  1661. if (typeof result === 'function') {
  1662. return checkWhiteList(protoAccessControl.methods, propertyName);
  1663. } else {
  1664. return checkWhiteList(protoAccessControl.properties, propertyName);
  1665. }
  1666. }
  1667. function checkWhiteList(protoAccessControlForType, propertyName) {
  1668. if (protoAccessControlForType.whitelist[propertyName] !== undefined) {
  1669. return protoAccessControlForType.whitelist[propertyName] === true;
  1670. }
  1671. if (protoAccessControlForType.defaultValue !== undefined) {
  1672. return protoAccessControlForType.defaultValue;
  1673. }
  1674. logUnexpecedPropertyAccessOnce(propertyName);
  1675. return false;
  1676. }
  1677. function logUnexpecedPropertyAccessOnce(propertyName) {
  1678. if (loggedProperties[propertyName] !== true) {
  1679. loggedProperties[propertyName] = true;
  1680. _logger2['default'].log('error', 'Handlebars: Access has been denied to resolve the property "' + propertyName + '" because it is not an "own property" of its parent.\n' + 'You can add a runtime option to disable the check or this warning:\n' + 'See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details');
  1681. }
  1682. }
  1683. function resetLoggedProperties() {
  1684. _Object$keys(loggedProperties).forEach(function (propertyName) {
  1685. delete loggedProperties[propertyName];
  1686. });
  1687. }
  1688. /***/ }),
  1689. /* 74 */
  1690. /***/ (function(module, exports, __webpack_require__) {
  1691. module.exports = { "default": __webpack_require__(75), __esModule: true };
  1692. /***/ }),
  1693. /* 75 */
  1694. /***/ (function(module, exports, __webpack_require__) {
  1695. var $ = __webpack_require__(9);
  1696. module.exports = function create(P, D){
  1697. return $.create(P, D);
  1698. };
  1699. /***/ }),
  1700. /* 76 */
  1701. /***/ (function(module, exports, __webpack_require__) {
  1702. 'use strict';
  1703. var _Object$create = __webpack_require__(74)['default'];
  1704. exports.__esModule = true;
  1705. exports.createNewLookupObject = createNewLookupObject;
  1706. var _utils = __webpack_require__(5);
  1707. /**
  1708. * Create a new object with "null"-prototype to avoid truthy results on prototype properties.
  1709. * The resulting object can be used with "object[property]" to check if a property exists
  1710. * @param {...object} sources a varargs parameter of source objects that will be merged
  1711. * @returns {object}
  1712. */
  1713. function createNewLookupObject() {
  1714. for (var _len = arguments.length, sources = Array(_len), _key = 0; _key < _len; _key++) {
  1715. sources[_key] = arguments[_key];
  1716. }
  1717. return _utils.extend.apply(undefined, [_Object$create(null)].concat(sources));
  1718. }
  1719. /***/ }),
  1720. /* 77 */
  1721. /***/ (function(module, exports) {
  1722. // Build out our basic SafeString type
  1723. 'use strict';
  1724. exports.__esModule = true;
  1725. function SafeString(string) {
  1726. this.string = string;
  1727. }
  1728. SafeString.prototype.toString = SafeString.prototype.toHTML = function () {
  1729. return '' + this.string;
  1730. };
  1731. exports['default'] = SafeString;
  1732. module.exports = exports['default'];
  1733. /***/ }),
  1734. /* 78 */
  1735. /***/ (function(module, exports, __webpack_require__) {
  1736. 'use strict';
  1737. var _Object$seal = __webpack_require__(79)['default'];
  1738. var _Object$keys = __webpack_require__(60)['default'];
  1739. var _interopRequireWildcard = __webpack_require__(3)['default'];
  1740. var _interopRequireDefault = __webpack_require__(1)['default'];
  1741. exports.__esModule = true;
  1742. exports.checkRevision = checkRevision;
  1743. exports.template = template;
  1744. exports.wrapProgram = wrapProgram;
  1745. exports.resolvePartial = resolvePartial;
  1746. exports.invokePartial = invokePartial;
  1747. exports.noop = noop;
  1748. var _utils = __webpack_require__(5);
  1749. var Utils = _interopRequireWildcard(_utils);
  1750. var _exception = __webpack_require__(6);
  1751. var _exception2 = _interopRequireDefault(_exception);
  1752. var _base = __webpack_require__(4);
  1753. var _helpers = __webpack_require__(10);
  1754. var _internalWrapHelper = __webpack_require__(82);
  1755. var _internalProtoAccess = __webpack_require__(73);
  1756. function checkRevision(compilerInfo) {
  1757. var compilerRevision = compilerInfo && compilerInfo[0] || 1,
  1758. currentRevision = _base.COMPILER_REVISION;
  1759. if (compilerRevision >= _base.LAST_COMPATIBLE_COMPILER_REVISION && compilerRevision <= _base.COMPILER_REVISION) {
  1760. return;
  1761. }
  1762. if (compilerRevision < _base.LAST_COMPATIBLE_COMPILER_REVISION) {
  1763. var runtimeVersions = _base.REVISION_CHANGES[currentRevision],
  1764. compilerVersions = _base.REVISION_CHANGES[compilerRevision];
  1765. throw new _exception2['default']('Template was precompiled with an older version of Handlebars than the current runtime. ' + 'Please update your precompiler to a newer version (' + runtimeVersions + ') or downgrade your runtime to an older version (' + compilerVersions + ').');
  1766. } else {
  1767. // Use the embedded version info since the runtime doesn't know about this revision yet
  1768. throw new _exception2['default']('Template was precompiled with a newer version of Handlebars than the current runtime. ' + 'Please update your runtime to a newer version (' + compilerInfo[1] + ').');
  1769. }
  1770. }
  1771. function template(templateSpec, env) {
  1772. /* istanbul ignore next */
  1773. if (!env) {
  1774. throw new _exception2['default']('No environment passed to template');
  1775. }
  1776. if (!templateSpec || !templateSpec.main) {
  1777. throw new _exception2['default']('Unknown template object: ' + typeof templateSpec);
  1778. }
  1779. templateSpec.main.decorator = templateSpec.main_d;
  1780. // Note: Using env.VM references rather than local var references throughout this section to allow
  1781. // for external users to override these as pseudo-supported APIs.
  1782. env.VM.checkRevision(templateSpec.compiler);
  1783. // backwards compatibility for precompiled templates with compiler-version 7 (<4.3.0)
  1784. var templateWasPrecompiledWithCompilerV7 = templateSpec.compiler && templateSpec.compiler[0] === 7;
  1785. function invokePartialWrapper(partial, context, options) {
  1786. if (options.hash) {
  1787. context = Utils.extend({}, context, options.hash);
  1788. if (options.ids) {
  1789. options.ids[0] = true;
  1790. }
  1791. }
  1792. partial = env.VM.resolvePartial.call(this, partial, context, options);
  1793. var extendedOptions = Utils.extend({}, options, {
  1794. hooks: this.hooks,
  1795. protoAccessControl: this.protoAccessControl
  1796. });
  1797. var result = env.VM.invokePartial.call(this, partial, context, extendedOptions);
  1798. if (result == null && env.compile) {
  1799. options.partials[options.name] = env.compile(partial, templateSpec.compilerOptions, env);
  1800. result = options.partials[options.name](context, extendedOptions);
  1801. }
  1802. if (result != null) {
  1803. if (options.indent) {
  1804. var lines = result.split('\n');
  1805. for (var i = 0, l = lines.length; i < l; i++) {
  1806. if (!lines[i] && i + 1 === l) {
  1807. break;
  1808. }
  1809. lines[i] = options.indent + lines[i];
  1810. }
  1811. result = lines.join('\n');
  1812. }
  1813. return result;
  1814. } else {
  1815. throw new _exception2['default']('The partial ' + options.name + ' could not be compiled when running in runtime-only mode');
  1816. }
  1817. }
  1818. // Just add water
  1819. var container = {
  1820. strict: function strict(obj, name, loc) {
  1821. if (!obj || !(name in obj)) {
  1822. throw new _exception2['default']('"' + name + '" not defined in ' + obj, {
  1823. loc: loc
  1824. });
  1825. }
  1826. return container.lookupProperty(obj, name);
  1827. },
  1828. lookupProperty: function lookupProperty(parent, propertyName) {
  1829. var result = parent[propertyName];
  1830. if (result == null) {
  1831. return result;
  1832. }
  1833. if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
  1834. return result;
  1835. }
  1836. if (_internalProtoAccess.resultIsAllowed(result, container.protoAccessControl, propertyName)) {
  1837. return result;
  1838. }
  1839. return undefined;
  1840. },
  1841. lookup: function lookup(depths, name) {
  1842. var len = depths.length;
  1843. for (var i = 0; i < len; i++) {
  1844. var result = depths[i] && container.lookupProperty(depths[i], name);
  1845. if (result != null) {
  1846. return depths[i][name];
  1847. }
  1848. }
  1849. },
  1850. lambda: function lambda(current, context) {
  1851. return typeof current === 'function' ? current.call(context) : current;
  1852. },
  1853. escapeExpression: Utils.escapeExpression,
  1854. invokePartial: invokePartialWrapper,
  1855. fn: function fn(i) {
  1856. var ret = templateSpec[i];
  1857. ret.decorator = templateSpec[i + '_d'];
  1858. return ret;
  1859. },
  1860. programs: [],
  1861. program: function program(i, data, declaredBlockParams, blockParams, depths) {
  1862. var programWrapper = this.programs[i],
  1863. fn = this.fn(i);
  1864. if (data || depths || blockParams || declaredBlockParams) {
  1865. programWrapper = wrapProgram(this, i, fn, data, declaredBlockParams, blockParams, depths);
  1866. } else if (!programWrapper) {
  1867. programWrapper = this.programs[i] = wrapProgram(this, i, fn);
  1868. }
  1869. return programWrapper;
  1870. },
  1871. data: function data(value, depth) {
  1872. while (value && depth--) {
  1873. value = value._parent;
  1874. }
  1875. return value;
  1876. },
  1877. mergeIfNeeded: function mergeIfNeeded(param, common) {
  1878. var obj = param || common;
  1879. if (param && common && param !== common) {
  1880. obj = Utils.extend({}, common, param);
  1881. }
  1882. return obj;
  1883. },
  1884. // An empty object to use as replacement for null-contexts
  1885. nullContext: _Object$seal({}),
  1886. noop: env.VM.noop,
  1887. compilerInfo: templateSpec.compiler
  1888. };
  1889. function ret(context) {
  1890. var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
  1891. var data = options.data;
  1892. ret._setup(options);
  1893. if (!options.partial && templateSpec.useData) {
  1894. data = initData(context, data);
  1895. }
  1896. var depths = undefined,
  1897. blockParams = templateSpec.useBlockParams ? [] : undefined;
  1898. if (templateSpec.useDepths) {
  1899. if (options.depths) {
  1900. depths = context != options.depths[0] ? [context].concat(options.depths) : options.depths;
  1901. } else {
  1902. depths = [context];
  1903. }
  1904. }
  1905. function main(context /*, options*/) {
  1906. return '' + templateSpec.main(container, context, container.helpers, container.partials, data, blockParams, depths);
  1907. }
  1908. main = executeDecorators(templateSpec.main, main, container, options.depths || [], data, blockParams);
  1909. return main(context, options);
  1910. }
  1911. ret.isTop = true;
  1912. ret._setup = function (options) {
  1913. if (!options.partial) {
  1914. var mergedHelpers = Utils.extend({}, env.helpers, options.helpers);
  1915. wrapHelpersToPassLookupProperty(mergedHelpers, container);
  1916. container.helpers = mergedHelpers;
  1917. if (templateSpec.usePartial) {
  1918. // Use mergeIfNeeded here to prevent compiling global partials multiple times
  1919. container.partials = container.mergeIfNeeded(options.partials, env.partials);
  1920. }
  1921. if (templateSpec.usePartial || templateSpec.useDecorators) {
  1922. container.decorators = Utils.extend({}, env.decorators, options.decorators);
  1923. }
  1924. container.hooks = {};
  1925. container.protoAccessControl = _internalProtoAccess.createProtoAccessControl(options);
  1926. var keepHelperInHelpers = options.allowCallsToHelperMissing || templateWasPrecompiledWithCompilerV7;
  1927. _helpers.moveHelperToHooks(container, 'helperMissing', keepHelperInHelpers);
  1928. _helpers.moveHelperToHooks(container, 'blockHelperMissing', keepHelperInHelpers);
  1929. } else {
  1930. container.protoAccessControl = options.protoAccessControl; // internal option
  1931. container.helpers = options.helpers;
  1932. container.partials = options.partials;
  1933. container.decorators = options.decorators;
  1934. container.hooks = options.hooks;
  1935. }
  1936. };
  1937. ret._child = function (i, data, blockParams, depths) {
  1938. if (templateSpec.useBlockParams && !blockParams) {
  1939. throw new _exception2['default']('must pass block params');
  1940. }
  1941. if (templateSpec.useDepths && !depths) {
  1942. throw new _exception2['default']('must pass parent depths');
  1943. }
  1944. return wrapProgram(container, i, templateSpec[i], data, 0, blockParams, depths);
  1945. };
  1946. return ret;
  1947. }
  1948. function wrapProgram(container, i, fn, data, declaredBlockParams, blockParams, depths) {
  1949. function prog(context) {
  1950. var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
  1951. var currentDepths = depths;
  1952. if (depths && context != depths[0] && !(context === container.nullContext && depths[0] === null)) {
  1953. currentDepths = [context].concat(depths);
  1954. }
  1955. return fn(container, context, container.helpers, container.partials, options.data || data, blockParams && [options.blockParams].concat(blockParams), currentDepths);
  1956. }
  1957. prog = executeDecorators(fn, prog, container, depths, data, blockParams);
  1958. prog.program = i;
  1959. prog.depth = depths ? depths.length : 0;
  1960. prog.blockParams = declaredBlockParams || 0;
  1961. return prog;
  1962. }
  1963. /**
  1964. * This is currently part of the official API, therefore implementation details should not be changed.
  1965. */
  1966. function resolvePartial(partial, context, options) {
  1967. if (!partial) {
  1968. if (options.name === '@partial-block') {
  1969. partial = options.data['partial-block'];
  1970. } else {
  1971. partial = options.partials[options.name];
  1972. }
  1973. } else if (!partial.call && !options.name) {
  1974. // This is a dynamic partial that returned a string
  1975. options.name = partial;
  1976. partial = options.partials[partial];
  1977. }
  1978. return partial;
  1979. }
  1980. function invokePartial(partial, context, options) {
  1981. // Use the current closure context to save the partial-block if this partial
  1982. var currentPartialBlock = options.data && options.data['partial-block'];
  1983. options.partial = true;
  1984. if (options.ids) {
  1985. options.data.contextPath = options.ids[0] || options.data.contextPath;
  1986. }
  1987. var partialBlock = undefined;
  1988. if (options.fn && options.fn !== noop) {
  1989. (function () {
  1990. options.data = _base.createFrame(options.data);
  1991. // Wrapper function to get access to currentPartialBlock from the closure
  1992. var fn = options.fn;
  1993. partialBlock = options.data['partial-block'] = function partialBlockWrapper(context) {
  1994. var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
  1995. // Restore the partial-block from the closure for the execution of the block
  1996. // i.e. the part inside the block of the partial call.
  1997. options.data = _base.createFrame(options.data);
  1998. options.data['partial-block'] = currentPartialBlock;
  1999. return fn(context, options);
  2000. };
  2001. if (fn.partials) {
  2002. options.partials = Utils.extend({}, options.partials, fn.partials);
  2003. }
  2004. })();
  2005. }
  2006. if (partial === undefined && partialBlock) {
  2007. partial = partialBlock;
  2008. }
  2009. if (partial === undefined) {
  2010. throw new _exception2['default']('The partial ' + options.name + ' could not be found');
  2011. } else if (partial instanceof Function) {
  2012. return partial(context, options);
  2013. }
  2014. }
  2015. function noop() {
  2016. return '';
  2017. }
  2018. function initData(context, data) {
  2019. if (!data || !('root' in data)) {
  2020. data = data ? _base.createFrame(data) : {};
  2021. data.root = context;
  2022. }
  2023. return data;
  2024. }
  2025. function executeDecorators(fn, prog, container, depths, data, blockParams) {
  2026. if (fn.decorator) {
  2027. var props = {};
  2028. prog = fn.decorator(prog, props, container, depths && depths[0], data, blockParams, depths);
  2029. Utils.extend(prog, props);
  2030. }
  2031. return prog;
  2032. }
  2033. function wrapHelpersToPassLookupProperty(mergedHelpers, container) {
  2034. _Object$keys(mergedHelpers).forEach(function (helperName) {
  2035. var helper = mergedHelpers[helperName];
  2036. mergedHelpers[helperName] = passLookupPropertyOption(helper, container);
  2037. });
  2038. }
  2039. function passLookupPropertyOption(helper, container) {
  2040. var lookupProperty = container.lookupProperty;
  2041. return _internalWrapHelper.wrapHelper(helper, function (options) {
  2042. return Utils.extend({ lookupProperty: lookupProperty }, options);
  2043. });
  2044. }
  2045. /***/ }),
  2046. /* 79 */
  2047. /***/ (function(module, exports, __webpack_require__) {
  2048. module.exports = { "default": __webpack_require__(80), __esModule: true };
  2049. /***/ }),
  2050. /* 80 */
  2051. /***/ (function(module, exports, __webpack_require__) {
  2052. __webpack_require__(81);
  2053. module.exports = __webpack_require__(21).Object.seal;
  2054. /***/ }),
  2055. /* 81 */
  2056. /***/ (function(module, exports, __webpack_require__) {
  2057. // 19.1.2.17 Object.seal(O)
  2058. var isObject = __webpack_require__(40);
  2059. __webpack_require__(64)('seal', function($seal){
  2060. return function seal(it){
  2061. return $seal && isObject(it) ? $seal(it) : it;
  2062. };
  2063. });
  2064. /***/ }),
  2065. /* 82 */
  2066. /***/ (function(module, exports) {
  2067. 'use strict';
  2068. exports.__esModule = true;
  2069. exports.wrapHelper = wrapHelper;
  2070. function wrapHelper(helper, transformOptionsFn) {
  2071. if (typeof helper !== 'function') {
  2072. // This should not happen, but apparently it does in https://github.com/wycats/handlebars.js/issues/1639
  2073. // We try to make the wrapper least-invasive by not wrapping it, if the helper is not a function.
  2074. return helper;
  2075. }
  2076. var wrapper = function wrapper() /* dynamic arguments */{
  2077. var options = arguments[arguments.length - 1];
  2078. arguments[arguments.length - 1] = transformOptionsFn(options);
  2079. return helper.apply(this, arguments);
  2080. };
  2081. return wrapper;
  2082. }
  2083. /***/ }),
  2084. /* 83 */
  2085. /***/ (function(module, exports) {
  2086. /* global globalThis */
  2087. 'use strict';
  2088. exports.__esModule = true;
  2089. exports['default'] = function (Handlebars) {
  2090. /* istanbul ignore next */
  2091. // https://mathiasbynens.be/notes/globalthis
  2092. (function () {
  2093. if (typeof globalThis === 'object') return;
  2094. Object.prototype.__defineGetter__('__magic__', function () {
  2095. return this;
  2096. });
  2097. __magic__.globalThis = __magic__; // eslint-disable-line no-undef
  2098. delete Object.prototype.__magic__;
  2099. })();
  2100. var $Handlebars = globalThis.Handlebars;
  2101. /* istanbul ignore next */
  2102. Handlebars.noConflict = function () {
  2103. if (globalThis.Handlebars === Handlebars) {
  2104. globalThis.Handlebars = $Handlebars;
  2105. }
  2106. return Handlebars;
  2107. };
  2108. };
  2109. module.exports = exports['default'];
  2110. /***/ }),
  2111. /* 84 */
  2112. /***/ (function(module, exports) {
  2113. 'use strict';
  2114. exports.__esModule = true;
  2115. var AST = {
  2116. // Public API used to evaluate derived attributes regarding AST nodes
  2117. helpers: {
  2118. // a mustache is definitely a helper if:
  2119. // * it is an eligible helper, and
  2120. // * it has at least one parameter or hash segment
  2121. helperExpression: function helperExpression(node) {
  2122. return node.type === 'SubExpression' || (node.type === 'MustacheStatement' || node.type === 'BlockStatement') && !!(node.params && node.params.length || node.hash);
  2123. },
  2124. scopedId: function scopedId(path) {
  2125. return (/^\.|this\b/.test(path.original)
  2126. );
  2127. },
  2128. // an ID is simple if it only has one part, and that part is not
  2129. // `..` or `this`.
  2130. simpleId: function simpleId(path) {
  2131. return path.parts.length === 1 && !AST.helpers.scopedId(path) && !path.depth;
  2132. }
  2133. }
  2134. };
  2135. // Must be exported as an object rather than the root of the module as the jison lexer
  2136. // must modify the object to operate properly.
  2137. exports['default'] = AST;
  2138. module.exports = exports['default'];
  2139. /***/ }),
  2140. /* 85 */
  2141. /***/ (function(module, exports, __webpack_require__) {
  2142. 'use strict';
  2143. var _interopRequireDefault = __webpack_require__(1)['default'];
  2144. var _interopRequireWildcard = __webpack_require__(3)['default'];
  2145. exports.__esModule = true;
  2146. exports.parseWithoutProcessing = parseWithoutProcessing;
  2147. exports.parse = parse;
  2148. var _parser = __webpack_require__(86);
  2149. var _parser2 = _interopRequireDefault(_parser);
  2150. var _whitespaceControl = __webpack_require__(87);
  2151. var _whitespaceControl2 = _interopRequireDefault(_whitespaceControl);
  2152. var _helpers = __webpack_require__(89);
  2153. var Helpers = _interopRequireWildcard(_helpers);
  2154. var _utils = __webpack_require__(5);
  2155. exports.parser = _parser2['default'];
  2156. var yy = {};
  2157. _utils.extend(yy, Helpers);
  2158. function parseWithoutProcessing(input, options) {
  2159. // Just return if an already-compiled AST was passed in.
  2160. if (input.type === 'Program') {
  2161. return input;
  2162. }
  2163. _parser2['default'].yy = yy;
  2164. // Altering the shared object here, but this is ok as parser is a sync operation
  2165. yy.locInfo = function (locInfo) {
  2166. return new yy.SourceLocation(options && options.srcName, locInfo);
  2167. };
  2168. var ast = _parser2['default'].parse(input);
  2169. return ast;
  2170. }
  2171. function parse(input, options) {
  2172. var ast = parseWithoutProcessing(input, options);
  2173. var strip = new _whitespaceControl2['default'](options);
  2174. return strip.accept(ast);
  2175. }
  2176. /***/ }),
  2177. /* 86 */
  2178. /***/ (function(module, exports) {
  2179. // File ignored in coverage tests via setting in .istanbul.yml
  2180. /* Jison generated parser */
  2181. "use strict";
  2182. exports.__esModule = true;
  2183. var handlebars = (function () {
  2184. var parser = { trace: function trace() {},
  2185. yy: {},
  2186. symbols_: { "error": 2, "root": 3, "program": 4, "EOF": 5, "program_repetition0": 6, "statement": 7, "mustache": 8, "block": 9, "rawBlock": 10, "partial": 11, "partialBlock": 12, "content": 13, "COMMENT": 14, "CONTENT": 15, "openRawBlock": 16, "rawBlock_repetition0": 17, "END_RAW_BLOCK": 18, "OPEN_RAW_BLOCK": 19, "helperName": 20, "openRawBlock_repetition0": 21, "openRawBlock_option0": 22, "CLOSE_RAW_BLOCK": 23, "openBlock": 24, "block_option0": 25, "closeBlock": 26, "openInverse": 27, "block_option1": 28, "OPEN_BLOCK": 29, "openBlock_repetition0": 30, "openBlock_option0": 31, "openBlock_option1": 32, "CLOSE": 33, "OPEN_INVERSE": 34, "openInverse_repetition0": 35, "openInverse_option0": 36, "openInverse_option1": 37, "openInverseChain": 38, "OPEN_INVERSE_CHAIN": 39, "openInverseChain_repetition0": 40, "openInverseChain_option0": 41, "openInverseChain_option1": 42, "inverseAndProgram": 43, "INVERSE": 44, "inverseChain": 45, "inverseChain_option0": 46, "OPEN_ENDBLOCK": 47, "OPEN": 48, "mustache_repetition0": 49, "mustache_option0": 50, "OPEN_UNESCAPED": 51, "mustache_repetition1": 52, "mustache_option1": 53, "CLOSE_UNESCAPED": 54, "OPEN_PARTIAL": 55, "partialName": 56, "partial_repetition0": 57, "partial_option0": 58, "openPartialBlock": 59, "OPEN_PARTIAL_BLOCK": 60, "openPartialBlock_repetition0": 61, "openPartialBlock_option0": 62, "param": 63, "sexpr": 64, "OPEN_SEXPR": 65, "sexpr_repetition0": 66, "sexpr_option0": 67, "CLOSE_SEXPR": 68, "hash": 69, "hash_repetition_plus0": 70, "hashSegment": 71, "ID": 72, "EQUALS": 73, "blockParams": 74, "OPEN_BLOCK_PARAMS": 75, "blockParams_repetition_plus0": 76, "CLOSE_BLOCK_PARAMS": 77, "path": 78, "dataName": 79, "STRING": 80, "NUMBER": 81, "BOOLEAN": 82, "UNDEFINED": 83, "NULL": 84, "DATA": 85, "pathSegments": 86, "SEP": 87, "$accept": 0, "$end": 1 },
  2187. terminals_: { 2: "error", 5: "EOF", 14: "COMMENT", 15: "CONTENT", 18: "END_RAW_BLOCK", 19: "OPEN_RAW_BLOCK", 23: "CLOSE_RAW_BLOCK", 29: "OPEN_BLOCK", 33: "CLOSE", 34: "OPEN_INVERSE", 39: "OPEN_INVERSE_CHAIN", 44: "INVERSE", 47: "OPEN_ENDBLOCK", 48: "OPEN", 51: "OPEN_UNESCAPED", 54: "CLOSE_UNESCAPED", 55: "OPEN_PARTIAL", 60: "OPEN_PARTIAL_BLOCK", 65: "OPEN_SEXPR", 68: "CLOSE_SEXPR", 72: "ID", 73: "EQUALS", 75: "OPEN_BLOCK_PARAMS", 77: "CLOSE_BLOCK_PARAMS", 80: "STRING", 81: "NUMBER", 82: "BOOLEAN", 83: "UNDEFINED", 84: "NULL", 85: "DATA", 87: "SEP" },
  2188. productions_: [0, [3, 2], [4, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [13, 1], [10, 3], [16, 5], [9, 4], [9, 4], [24, 6], [27, 6], [38, 6], [43, 2], [45, 3], [45, 1], [26, 3], [8, 5], [8, 5], [11, 5], [12, 3], [59, 5], [63, 1], [63, 1], [64, 5], [69, 1], [71, 3], [74, 3], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [56, 1], [56, 1], [79, 2], [78, 1], [86, 3], [86, 1], [6, 0], [6, 2], [17, 0], [17, 2], [21, 0], [21, 2], [22, 0], [22, 1], [25, 0], [25, 1], [28, 0], [28, 1], [30, 0], [30, 2], [31, 0], [31, 1], [32, 0], [32, 1], [35, 0], [35, 2], [36, 0], [36, 1], [37, 0], [37, 1], [40, 0], [40, 2], [41, 0], [41, 1], [42, 0], [42, 1], [46, 0], [46, 1], [49, 0], [49, 2], [50, 0], [50, 1], [52, 0], [52, 2], [53, 0], [53, 1], [57, 0], [57, 2], [58, 0], [58, 1], [61, 0], [61, 2], [62, 0], [62, 1], [66, 0], [66, 2], [67, 0], [67, 1], [70, 1], [70, 2], [76, 1], [76, 2]],
  2189. performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
  2190. var $0 = $$.length - 1;
  2191. switch (yystate) {
  2192. case 1:
  2193. return $$[$0 - 1];
  2194. break;
  2195. case 2:
  2196. this.$ = yy.prepareProgram($$[$0]);
  2197. break;
  2198. case 3:
  2199. this.$ = $$[$0];
  2200. break;
  2201. case 4:
  2202. this.$ = $$[$0];
  2203. break;
  2204. case 5:
  2205. this.$ = $$[$0];
  2206. break;
  2207. case 6:
  2208. this.$ = $$[$0];
  2209. break;
  2210. case 7:
  2211. this.$ = $$[$0];
  2212. break;
  2213. case 8:
  2214. this.$ = $$[$0];
  2215. break;
  2216. case 9:
  2217. this.$ = {
  2218. type: 'CommentStatement',
  2219. value: yy.stripComment($$[$0]),
  2220. strip: yy.stripFlags($$[$0], $$[$0]),
  2221. loc: yy.locInfo(this._$)
  2222. };
  2223. break;
  2224. case 10:
  2225. this.$ = {
  2226. type: 'ContentStatement',
  2227. original: $$[$0],
  2228. value: $$[$0],
  2229. loc: yy.locInfo(this._$)
  2230. };
  2231. break;
  2232. case 11:
  2233. this.$ = yy.prepareRawBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$);
  2234. break;
  2235. case 12:
  2236. this.$ = { path: $$[$0 - 3], params: $$[$0 - 2], hash: $$[$0 - 1] };
  2237. break;
  2238. case 13:
  2239. this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], false, this._$);
  2240. break;
  2241. case 14:
  2242. this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], true, this._$);
  2243. break;
  2244. case 15:
  2245. this.$ = { open: $$[$0 - 5], path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) };
  2246. break;
  2247. case 16:
  2248. this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) };
  2249. break;
  2250. case 17:
  2251. this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) };
  2252. break;
  2253. case 18:
  2254. this.$ = { strip: yy.stripFlags($$[$0 - 1], $$[$0 - 1]), program: $$[$0] };
  2255. break;
  2256. case 19:
  2257. var inverse = yy.prepareBlock($$[$0 - 2], $$[$0 - 1], $$[$0], $$[$0], false, this._$),
  2258. program = yy.prepareProgram([inverse], $$[$0 - 1].loc);
  2259. program.chained = true;
  2260. this.$ = { strip: $$[$0 - 2].strip, program: program, chain: true };
  2261. break;
  2262. case 20:
  2263. this.$ = $$[$0];
  2264. break;
  2265. case 21:
  2266. this.$ = { path: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 2], $$[$0]) };
  2267. break;
  2268. case 22:
  2269. this.$ = yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$);
  2270. break;
  2271. case 23:
  2272. this.$ = yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$);
  2273. break;
  2274. case 24:
  2275. this.$ = {
  2276. type: 'PartialStatement',
  2277. name: $$[$0 - 3],
  2278. params: $$[$0 - 2],
  2279. hash: $$[$0 - 1],
  2280. indent: '',
  2281. strip: yy.stripFlags($$[$0 - 4], $$[$0]),
  2282. loc: yy.locInfo(this._$)
  2283. };
  2284. break;
  2285. case 25:
  2286. this.$ = yy.preparePartialBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$);
  2287. break;
  2288. case 26:
  2289. this.$ = { path: $$[$0 - 3], params: $$[$0 - 2], hash: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 4], $$[$0]) };
  2290. break;
  2291. case 27:
  2292. this.$ = $$[$0];
  2293. break;
  2294. case 28:
  2295. this.$ = $$[$0];
  2296. break;
  2297. case 29:
  2298. this.$ = {
  2299. type: 'SubExpression',
  2300. path: $$[$0 - 3],
  2301. params: $$[$0 - 2],
  2302. hash: $$[$0 - 1],
  2303. loc: yy.locInfo(this._$)
  2304. };
  2305. break;
  2306. case 30:
  2307. this.$ = { type: 'Hash', pairs: $$[$0], loc: yy.locInfo(this._$) };
  2308. break;
  2309. case 31:
  2310. this.$ = { type: 'HashPair', key: yy.id($$[$0 - 2]), value: $$[$0], loc: yy.locInfo(this._$) };
  2311. break;
  2312. case 32:
  2313. this.$ = yy.id($$[$0 - 1]);
  2314. break;
  2315. case 33:
  2316. this.$ = $$[$0];
  2317. break;
  2318. case 34:
  2319. this.$ = $$[$0];
  2320. break;
  2321. case 35:
  2322. this.$ = { type: 'StringLiteral', value: $$[$0], original: $$[$0], loc: yy.locInfo(this._$) };
  2323. break;
  2324. case 36:
  2325. this.$ = { type: 'NumberLiteral', value: Number($$[$0]), original: Number($$[$0]), loc: yy.locInfo(this._$) };
  2326. break;
  2327. case 37:
  2328. this.$ = { type: 'BooleanLiteral', value: $$[$0] === 'true', original: $$[$0] === 'true', loc: yy.locInfo(this._$) };
  2329. break;
  2330. case 38:
  2331. this.$ = { type: 'UndefinedLiteral', original: undefined, value: undefined, loc: yy.locInfo(this._$) };
  2332. break;
  2333. case 39:
  2334. this.$ = { type: 'NullLiteral', original: null, value: null, loc: yy.locInfo(this._$) };
  2335. break;
  2336. case 40:
  2337. this.$ = $$[$0];
  2338. break;
  2339. case 41:
  2340. this.$ = $$[$0];
  2341. break;
  2342. case 42:
  2343. this.$ = yy.preparePath(true, $$[$0], this._$);
  2344. break;
  2345. case 43:
  2346. this.$ = yy.preparePath(false, $$[$0], this._$);
  2347. break;
  2348. case 44:
  2349. $$[$0 - 2].push({ part: yy.id($$[$0]), original: $$[$0], separator: $$[$0 - 1] });this.$ = $$[$0 - 2];
  2350. break;
  2351. case 45:
  2352. this.$ = [{ part: yy.id($$[$0]), original: $$[$0] }];
  2353. break;
  2354. case 46:
  2355. this.$ = [];
  2356. break;
  2357. case 47:
  2358. $$[$0 - 1].push($$[$0]);
  2359. break;
  2360. case 48:
  2361. this.$ = [];
  2362. break;
  2363. case 49:
  2364. $$[$0 - 1].push($$[$0]);
  2365. break;
  2366. case 50:
  2367. this.$ = [];
  2368. break;
  2369. case 51:
  2370. $$[$0 - 1].push($$[$0]);
  2371. break;
  2372. case 58:
  2373. this.$ = [];
  2374. break;
  2375. case 59:
  2376. $$[$0 - 1].push($$[$0]);
  2377. break;
  2378. case 64:
  2379. this.$ = [];
  2380. break;
  2381. case 65:
  2382. $$[$0 - 1].push($$[$0]);
  2383. break;
  2384. case 70:
  2385. this.$ = [];
  2386. break;
  2387. case 71:
  2388. $$[$0 - 1].push($$[$0]);
  2389. break;
  2390. case 78:
  2391. this.$ = [];
  2392. break;
  2393. case 79:
  2394. $$[$0 - 1].push($$[$0]);
  2395. break;
  2396. case 82:
  2397. this.$ = [];
  2398. break;
  2399. case 83:
  2400. $$[$0 - 1].push($$[$0]);
  2401. break;
  2402. case 86:
  2403. this.$ = [];
  2404. break;
  2405. case 87:
  2406. $$[$0 - 1].push($$[$0]);
  2407. break;
  2408. case 90:
  2409. this.$ = [];
  2410. break;
  2411. case 91:
  2412. $$[$0 - 1].push($$[$0]);
  2413. break;
  2414. case 94:
  2415. this.$ = [];
  2416. break;
  2417. case 95:
  2418. $$[$0 - 1].push($$[$0]);
  2419. break;
  2420. case 98:
  2421. this.$ = [$$[$0]];
  2422. break;
  2423. case 99:
  2424. $$[$0 - 1].push($$[$0]);
  2425. break;
  2426. case 100:
  2427. this.$ = [$$[$0]];
  2428. break;
  2429. case 101:
  2430. $$[$0 - 1].push($$[$0]);
  2431. break;
  2432. }
  2433. },
  2434. table: [{ 3: 1, 4: 2, 5: [2, 46], 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 1: [3] }, { 5: [1, 4] }, { 5: [2, 2], 7: 5, 8: 6, 9: 7, 10: 8, 11: 9, 12: 10, 13: 11, 14: [1, 12], 15: [1, 20], 16: 17, 19: [1, 23], 24: 15, 27: 16, 29: [1, 21], 34: [1, 22], 39: [2, 2], 44: [2, 2], 47: [2, 2], 48: [1, 13], 51: [1, 14], 55: [1, 18], 59: 19, 60: [1, 24] }, { 1: [2, 1] }, { 5: [2, 47], 14: [2, 47], 15: [2, 47], 19: [2, 47], 29: [2, 47], 34: [2, 47], 39: [2, 47], 44: [2, 47], 47: [2, 47], 48: [2, 47], 51: [2, 47], 55: [2, 47], 60: [2, 47] }, { 5: [2, 3], 14: [2, 3], 15: [2, 3], 19: [2, 3], 29: [2, 3], 34: [2, 3], 39: [2, 3], 44: [2, 3], 47: [2, 3], 48: [2, 3], 51: [2, 3], 55: [2, 3], 60: [2, 3] }, { 5: [2, 4], 14: [2, 4], 15: [2, 4], 19: [2, 4], 29: [2, 4], 34: [2, 4], 39: [2, 4], 44: [2, 4], 47: [2, 4], 48: [2, 4], 51: [2, 4], 55: [2, 4], 60: [2, 4] }, { 5: [2, 5], 14: [2, 5], 15: [2, 5], 19: [2, 5], 29: [2, 5], 34: [2, 5], 39: [2, 5], 44: [2, 5], 47: [2, 5], 48: [2, 5], 51: [2, 5], 55: [2, 5], 60: [2, 5] }, { 5: [2, 6], 14: [2, 6], 15: [2, 6], 19: [2, 6], 29: [2, 6], 34: [2, 6], 39: [2, 6], 44: [2, 6], 47: [2, 6], 48: [2, 6], 51: [2, 6], 55: [2, 6], 60: [2, 6] }, { 5: [2, 7], 14: [2, 7], 15: [2, 7], 19: [2, 7], 29: [2, 7], 34: [2, 7], 39: [2, 7], 44: [2, 7], 47: [2, 7], 48: [2, 7], 51: [2, 7], 55: [2, 7], 60: [2, 7] }, { 5: [2, 8], 14: [2, 8], 15: [2, 8], 19: [2, 8], 29: [2, 8], 34: [2, 8], 39: [2, 8], 44: [2, 8], 47: [2, 8], 48: [2, 8], 51: [2, 8], 55: [2, 8], 60: [2, 8] }, { 5: [2, 9], 14: [2, 9], 15: [2, 9], 19: [2, 9], 29: [2, 9], 34: [2, 9], 39: [2, 9], 44: [2, 9], 47: [2, 9], 48: [2, 9], 51: [2, 9], 55: [2, 9], 60: [2, 9] }, { 20: 25, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 36, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 37, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 39: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 4: 38, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 15: [2, 48], 17: 39, 18: [2, 48] }, { 20: 41, 56: 40, 64: 42, 65: [1, 43], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 44, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 5: [2, 10], 14: [2, 10], 15: [2, 10], 18: [2, 10], 19: [2, 10], 29: [2, 10], 34: [2, 10], 39: [2, 10], 44: [2, 10], 47: [2, 10], 48: [2, 10], 51: [2, 10], 55: [2, 10], 60: [2, 10] }, { 20: 45, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 46, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 47, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 41, 56: 48, 64: 42, 65: [1, 43], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [2, 78], 49: 49, 65: [2, 78], 72: [2, 78], 80: [2, 78], 81: [2, 78], 82: [2, 78], 83: [2, 78], 84: [2, 78], 85: [2, 78] }, { 23: [2, 33], 33: [2, 33], 54: [2, 33], 65: [2, 33], 68: [2, 33], 72: [2, 33], 75: [2, 33], 80: [2, 33], 81: [2, 33], 82: [2, 33], 83: [2, 33], 84: [2, 33], 85: [2, 33] }, { 23: [2, 34], 33: [2, 34], 54: [2, 34], 65: [2, 34], 68: [2, 34], 72: [2, 34], 75: [2, 34], 80: [2, 34], 81: [2, 34], 82: [2, 34], 83: [2, 34], 84: [2, 34], 85: [2, 34] }, { 23: [2, 35], 33: [2, 35], 54: [2, 35], 65: [2, 35], 68: [2, 35], 72: [2, 35], 75: [2, 35], 80: [2, 35], 81: [2, 35], 82: [2, 35], 83: [2, 35], 84: [2, 35], 85: [2, 35] }, { 23: [2, 36], 33: [2, 36], 54: [2, 36], 65: [2, 36], 68: [2, 36], 72: [2, 36], 75: [2, 36], 80: [2, 36], 81: [2, 36], 82: [2, 36], 83: [2, 36], 84: [2, 36], 85: [2, 36] }, { 23: [2, 37], 33: [2, 37], 54: [2, 37], 65: [2, 37], 68: [2, 37], 72: [2, 37], 75: [2, 37], 80: [2, 37], 81: [2, 37], 82: [2, 37], 83: [2, 37], 84: [2, 37], 85: [2, 37] }, { 23: [2, 38], 33: [2, 38], 54: [2, 38], 65: [2, 38], 68: [2, 38], 72: [2, 38], 75: [2, 38], 80: [2, 38], 81: [2, 38], 82: [2, 38], 83: [2, 38], 84: [2, 38], 85: [2, 38] }, { 23: [2, 39], 33: [2, 39], 54: [2, 39], 65: [2, 39], 68: [2, 39], 72: [2, 39], 75: [2, 39], 80: [2, 39], 81: [2, 39], 82: [2, 39], 83: [2, 39], 84: [2, 39], 85: [2, 39] }, { 23: [2, 43], 33: [2, 43], 54: [2, 43], 65: [2, 43], 68: [2, 43], 72: [2, 43], 75: [2, 43], 80: [2, 43], 81: [2, 43], 82: [2, 43], 83: [2, 43], 84: [2, 43], 85: [2, 43], 87: [1, 50] }, { 72: [1, 35], 86: 51 }, { 23: [2, 45], 33: [2, 45], 54: [2, 45], 65: [2, 45], 68: [2, 45], 72: [2, 45], 75: [2, 45], 80: [2, 45], 81: [2, 45], 82: [2, 45], 83: [2, 45], 84: [2, 45], 85: [2, 45], 87: [2, 45] }, { 52: 52, 54: [2, 82], 65: [2, 82], 72: [2, 82], 80: [2, 82], 81: [2, 82], 82: [2, 82], 83: [2, 82], 84: [2, 82], 85: [2, 82] }, { 25: 53, 38: 55, 39: [1, 57], 43: 56, 44: [1, 58], 45: 54, 47: [2, 54] }, { 28: 59, 43: 60, 44: [1, 58], 47: [2, 56] }, { 13: 62, 15: [1, 20], 18: [1, 61] }, { 33: [2, 86], 57: 63, 65: [2, 86], 72: [2, 86], 80: [2, 86], 81: [2, 86], 82: [2, 86], 83: [2, 86], 84: [2, 86], 85: [2, 86] }, { 33: [2, 40], 65: [2, 40], 72: [2, 40], 80: [2, 40], 81: [2, 40], 82: [2, 40], 83: [2, 40], 84: [2, 40], 85: [2, 40] }, { 33: [2, 41], 65: [2, 41], 72: [2, 41], 80: [2, 41], 81: [2, 41], 82: [2, 41], 83: [2, 41], 84: [2, 41], 85: [2, 41] }, { 20: 64, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 26: 65, 47: [1, 66] }, { 30: 67, 33: [2, 58], 65: [2, 58], 72: [2, 58], 75: [2, 58], 80: [2, 58], 81: [2, 58], 82: [2, 58], 83: [2, 58], 84: [2, 58], 85: [2, 58] }, { 33: [2, 64], 35: 68, 65: [2, 64], 72: [2, 64], 75: [2, 64], 80: [2, 64], 81: [2, 64], 82: [2, 64], 83: [2, 64], 84: [2, 64], 85: [2, 64] }, { 21: 69, 23: [2, 50], 65: [2, 50], 72: [2, 50], 80: [2, 50], 81: [2, 50], 82: [2, 50], 83: [2, 50], 84: [2, 50], 85: [2, 50] }, { 33: [2, 90], 61: 70, 65: [2, 90], 72: [2, 90], 80: [2, 90], 81: [2, 90], 82: [2, 90], 83: [2, 90], 84: [2, 90], 85: [2, 90] }, { 20: 74, 33: [2, 80], 50: 71, 63: 72, 64: 75, 65: [1, 43], 69: 73, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 72: [1, 79] }, { 23: [2, 42], 33: [2, 42], 54: [2, 42], 65: [2, 42], 68: [2, 42], 72: [2, 42], 75: [2, 42], 80: [2, 42], 81: [2, 42], 82: [2, 42], 83: [2, 42], 84: [2, 42], 85: [2, 42], 87: [1, 50] }, { 20: 74, 53: 80, 54: [2, 84], 63: 81, 64: 75, 65: [1, 43], 69: 82, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 26: 83, 47: [1, 66] }, { 47: [2, 55] }, { 4: 84, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 39: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 47: [2, 20] }, { 20: 85, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 86, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 26: 87, 47: [1, 66] }, { 47: [2, 57] }, { 5: [2, 11], 14: [2, 11], 15: [2, 11], 19: [2, 11], 29: [2, 11], 34: [2, 11], 39: [2, 11], 44: [2, 11], 47: [2, 11], 48: [2, 11], 51: [2, 11], 55: [2, 11], 60: [2, 11] }, { 15: [2, 49], 18: [2, 49] }, { 20: 74, 33: [2, 88], 58: 88, 63: 89, 64: 75, 65: [1, 43], 69: 90, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 65: [2, 94], 66: 91, 68: [2, 94], 72: [2, 94], 80: [2, 94], 81: [2, 94], 82: [2, 94], 83: [2, 94], 84: [2, 94], 85: [2, 94] }, { 5: [2, 25], 14: [2, 25], 15: [2, 25], 19: [2, 25], 29: [2, 25], 34: [2, 25], 39: [2, 25], 44: [2, 25], 47: [2, 25], 48: [2, 25], 51: [2, 25], 55: [2, 25], 60: [2, 25] }, { 20: 92, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 74, 31: 93, 33: [2, 60], 63: 94, 64: 75, 65: [1, 43], 69: 95, 70: 76, 71: 77, 72: [1, 78], 75: [2, 60], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 74, 33: [2, 66], 36: 96, 63: 97, 64: 75, 65: [1, 43], 69: 98, 70: 76, 71: 77, 72: [1, 78], 75: [2, 66], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 74, 22: 99, 23: [2, 52], 63: 100, 64: 75, 65: [1, 43], 69: 101, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 74, 33: [2, 92], 62: 102, 63: 103, 64: 75, 65: [1, 43], 69: 104, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [1, 105] }, { 33: [2, 79], 65: [2, 79], 72: [2, 79], 80: [2, 79], 81: [2, 79], 82: [2, 79], 83: [2, 79], 84: [2, 79], 85: [2, 79] }, { 33: [2, 81] }, { 23: [2, 27], 33: [2, 27], 54: [2, 27], 65: [2, 27], 68: [2, 27], 72: [2, 27], 75: [2, 27], 80: [2, 27], 81: [2, 27], 82: [2, 27], 83: [2, 27], 84: [2, 27], 85: [2, 27] }, { 23: [2, 28], 33: [2, 28], 54: [2, 28], 65: [2, 28], 68: [2, 28], 72: [2, 28], 75: [2, 28], 80: [2, 28], 81: [2, 28], 82: [2, 28], 83: [2, 28], 84: [2, 28], 85: [2, 28] }, { 23: [2, 30], 33: [2, 30], 54: [2, 30], 68: [2, 30], 71: 106, 72: [1, 107], 75: [2, 30] }, { 23: [2, 98], 33: [2, 98], 54: [2, 98], 68: [2, 98], 72: [2, 98], 75: [2, 98] }, { 23: [2, 45], 33: [2, 45], 54: [2, 45], 65: [2, 45], 68: [2, 45], 72: [2, 45], 73: [1, 108], 75: [2, 45], 80: [2, 45], 81: [2, 45], 82: [2, 45], 83: [2, 45], 84: [2, 45], 85: [2, 45], 87: [2, 45] }, { 23: [2, 44], 33: [2, 44], 54: [2, 44], 65: [2, 44], 68: [2, 44], 72: [2, 44], 75: [2, 44], 80: [2, 44], 81: [2, 44], 82: [2, 44], 83: [2, 44], 84: [2, 44], 85: [2, 44], 87: [2, 44] }, { 54: [1, 109] }, { 54: [2, 83], 65: [2, 83], 72: [2, 83], 80: [2, 83], 81: [2, 83], 82: [2, 83], 83: [2, 83], 84: [2, 83], 85: [2, 83] }, { 54: [2, 85] }, { 5: [2, 13], 14: [2, 13], 15: [2, 13], 19: [2, 13], 29: [2, 13], 34: [2, 13], 39: [2, 13], 44: [2, 13], 47: [2, 13], 48: [2, 13], 51: [2, 13], 55: [2, 13], 60: [2, 13] }, { 38: 55, 39: [1, 57], 43: 56, 44: [1, 58], 45: 111, 46: 110, 47: [2, 76] }, { 33: [2, 70], 40: 112, 65: [2, 70], 72: [2, 70], 75: [2, 70], 80: [2, 70], 81: [2, 70], 82: [2, 70], 83: [2, 70], 84: [2, 70], 85: [2, 70] }, { 47: [2, 18] }, { 5: [2, 14], 14: [2, 14], 15: [2, 14], 19: [2, 14], 29: [2, 14], 34: [2, 14], 39: [2, 14], 44: [2, 14], 47: [2, 14], 48: [2, 14], 51: [2, 14], 55: [2, 14], 60: [2, 14] }, { 33: [1, 113] }, { 33: [2, 87], 65: [2, 87], 72: [2, 87], 80: [2, 87], 81: [2, 87], 82: [2, 87], 83: [2, 87], 84: [2, 87], 85: [2, 87] }, { 33: [2, 89] }, { 20: 74, 63: 115, 64: 75, 65: [1, 43], 67: 114, 68: [2, 96], 69: 116, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [1, 117] }, { 32: 118, 33: [2, 62], 74: 119, 75: [1, 120] }, { 33: [2, 59], 65: [2, 59], 72: [2, 59], 75: [2, 59], 80: [2, 59], 81: [2, 59], 82: [2, 59], 83: [2, 59], 84: [2, 59], 85: [2, 59] }, { 33: [2, 61], 75: [2, 61] }, { 33: [2, 68], 37: 121, 74: 122, 75: [1, 120] }, { 33: [2, 65], 65: [2, 65], 72: [2, 65], 75: [2, 65], 80: [2, 65], 81: [2, 65], 82: [2, 65], 83: [2, 65], 84: [2, 65], 85: [2, 65] }, { 33: [2, 67], 75: [2, 67] }, { 23: [1, 123] }, { 23: [2, 51], 65: [2, 51], 72: [2, 51], 80: [2, 51], 81: [2, 51], 82: [2, 51], 83: [2, 51], 84: [2, 51], 85: [2, 51] }, { 23: [2, 53] }, { 33: [1, 124] }, { 33: [2, 91], 65: [2, 91], 72: [2, 91], 80: [2, 91], 81: [2, 91], 82: [2, 91], 83: [2, 91], 84: [2, 91], 85: [2, 91] }, { 33: [2, 93] }, { 5: [2, 22], 14: [2, 22], 15: [2, 22], 19: [2, 22], 29: [2, 22], 34: [2, 22], 39: [2, 22], 44: [2, 22], 47: [2, 22], 48: [2, 22], 51: [2, 22], 55: [2, 22], 60: [2, 22] }, { 23: [2, 99], 33: [2, 99], 54: [2, 99], 68: [2, 99], 72: [2, 99], 75: [2, 99] }, { 73: [1, 108] }, { 20: 74, 63: 125, 64: 75, 65: [1, 43], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 5: [2, 23], 14: [2, 23], 15: [2, 23], 19: [2, 23], 29: [2, 23], 34: [2, 23], 39: [2, 23], 44: [2, 23], 47: [2, 23], 48: [2, 23], 51: [2, 23], 55: [2, 23], 60: [2, 23] }, { 47: [2, 19] }, { 47: [2, 77] }, { 20: 74, 33: [2, 72], 41: 126, 63: 127, 64: 75, 65: [1, 43], 69: 128, 70: 76, 71: 77, 72: [1, 78], 75: [2, 72], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 5: [2, 24], 14: [2, 24], 15: [2, 24], 19: [2, 24], 29: [2, 24], 34: [2, 24], 39: [2, 24], 44: [2, 24], 47: [2, 24], 48: [2, 24], 51: [2, 24], 55: [2, 24], 60: [2, 24] }, { 68: [1, 129] }, { 65: [2, 95], 68: [2, 95], 72: [2, 95], 80: [2, 95], 81: [2, 95], 82: [2, 95], 83: [2, 95], 84: [2, 95], 85: [2, 95] }, { 68: [2, 97] }, { 5: [2, 21], 14: [2, 21], 15: [2, 21], 19: [2, 21], 29: [2, 21], 34: [2, 21], 39: [2, 21], 44: [2, 21], 47: [2, 21], 48: [2, 21], 51: [2, 21], 55: [2, 21], 60: [2, 21] }, { 33: [1, 130] }, { 33: [2, 63] }, { 72: [1, 132], 76: 131 }, { 33: [1, 133] }, { 33: [2, 69] }, { 15: [2, 12], 18: [2, 12] }, { 14: [2, 26], 15: [2, 26], 19: [2, 26], 29: [2, 26], 34: [2, 26], 47: [2, 26], 48: [2, 26], 51: [2, 26], 55: [2, 26], 60: [2, 26] }, { 23: [2, 31], 33: [2, 31], 54: [2, 31], 68: [2, 31], 72: [2, 31], 75: [2, 31] }, { 33: [2, 74], 42: 134, 74: 135, 75: [1, 120] }, { 33: [2, 71], 65: [2, 71], 72: [2, 71], 75: [2, 71], 80: [2, 71], 81: [2, 71], 82: [2, 71], 83: [2, 71], 84: [2, 71], 85: [2, 71] }, { 33: [2, 73], 75: [2, 73] }, { 23: [2, 29], 33: [2, 29], 54: [2, 29], 65: [2, 29], 68: [2, 29], 72: [2, 29], 75: [2, 29], 80: [2, 29], 81: [2, 29], 82: [2, 29], 83: [2, 29], 84: [2, 29], 85: [2, 29] }, { 14: [2, 15], 15: [2, 15], 19: [2, 15], 29: [2, 15], 34: [2, 15], 39: [2, 15], 44: [2, 15], 47: [2, 15], 48: [2, 15], 51: [2, 15], 55: [2, 15], 60: [2, 15] }, { 72: [1, 137], 77: [1, 136] }, { 72: [2, 100], 77: [2, 100] }, { 14: [2, 16], 15: [2, 16], 19: [2, 16], 29: [2, 16], 34: [2, 16], 44: [2, 16], 47: [2, 16], 48: [2, 16], 51: [2, 16], 55: [2, 16], 60: [2, 16] }, { 33: [1, 138] }, { 33: [2, 75] }, { 33: [2, 32] }, { 72: [2, 101], 77: [2, 101] }, { 14: [2, 17], 15: [2, 17], 19: [2, 17], 29: [2, 17], 34: [2, 17], 39: [2, 17], 44: [2, 17], 47: [2, 17], 48: [2, 17], 51: [2, 17], 55: [2, 17], 60: [2, 17] }],
  2435. defaultActions: { 4: [2, 1], 54: [2, 55], 56: [2, 20], 60: [2, 57], 73: [2, 81], 82: [2, 85], 86: [2, 18], 90: [2, 89], 101: [2, 53], 104: [2, 93], 110: [2, 19], 111: [2, 77], 116: [2, 97], 119: [2, 63], 122: [2, 69], 135: [2, 75], 136: [2, 32] },
  2436. parseError: function parseError(str, hash) {
  2437. throw new Error(str);
  2438. },
  2439. parse: function parse(input) {
  2440. var self = this,
  2441. stack = [0],
  2442. vstack = [null],
  2443. lstack = [],
  2444. table = this.table,
  2445. yytext = "",
  2446. yylineno = 0,
  2447. yyleng = 0,
  2448. recovering = 0,
  2449. TERROR = 2,
  2450. EOF = 1;
  2451. this.lexer.setInput(input);
  2452. this.lexer.yy = this.yy;
  2453. this.yy.lexer = this.lexer;
  2454. this.yy.parser = this;
  2455. if (typeof this.lexer.yylloc == "undefined") this.lexer.yylloc = {};
  2456. var yyloc = this.lexer.yylloc;
  2457. lstack.push(yyloc);
  2458. var ranges = this.lexer.options && this.lexer.options.ranges;
  2459. if (typeof this.yy.parseError === "function") this.parseError = this.yy.parseError;
  2460. function popStack(n) {
  2461. stack.length = stack.length - 2 * n;
  2462. vstack.length = vstack.length - n;
  2463. lstack.length = lstack.length - n;
  2464. }
  2465. function lex() {
  2466. var token;
  2467. token = self.lexer.lex() || 1;
  2468. if (typeof token !== "number") {
  2469. token = self.symbols_[token] || token;
  2470. }
  2471. return token;
  2472. }
  2473. var symbol,
  2474. preErrorSymbol,
  2475. state,
  2476. action,
  2477. a,
  2478. r,
  2479. yyval = {},
  2480. p,
  2481. len,
  2482. newState,
  2483. expected;
  2484. while (true) {
  2485. state = stack[stack.length - 1];
  2486. if (this.defaultActions[state]) {
  2487. action = this.defaultActions[state];
  2488. } else {
  2489. if (symbol === null || typeof symbol == "undefined") {
  2490. symbol = lex();
  2491. }
  2492. action = table[state] && table[state][symbol];
  2493. }
  2494. if (typeof action === "undefined" || !action.length || !action[0]) {
  2495. var errStr = "";
  2496. if (!recovering) {
  2497. expected = [];
  2498. for (p in table[state]) if (this.terminals_[p] && p > 2) {
  2499. expected.push("'" + this.terminals_[p] + "'");
  2500. }
  2501. if (this.lexer.showPosition) {
  2502. errStr = "Parse error on line " + (yylineno + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
  2503. } else {
  2504. errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == 1 ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
  2505. }
  2506. this.parseError(errStr, { text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected });
  2507. }
  2508. }
  2509. if (action[0] instanceof Array && action.length > 1) {
  2510. throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
  2511. }
  2512. switch (action[0]) {
  2513. case 1:
  2514. stack.push(symbol);
  2515. vstack.push(this.lexer.yytext);
  2516. lstack.push(this.lexer.yylloc);
  2517. stack.push(action[1]);
  2518. symbol = null;
  2519. if (!preErrorSymbol) {
  2520. yyleng = this.lexer.yyleng;
  2521. yytext = this.lexer.yytext;
  2522. yylineno = this.lexer.yylineno;
  2523. yyloc = this.lexer.yylloc;
  2524. if (recovering > 0) recovering--;
  2525. } else {
  2526. symbol = preErrorSymbol;
  2527. preErrorSymbol = null;
  2528. }
  2529. break;
  2530. case 2:
  2531. len = this.productions_[action[1]][1];
  2532. yyval.$ = vstack[vstack.length - len];
  2533. yyval._$ = { first_line: lstack[lstack.length - (len || 1)].first_line, last_line: lstack[lstack.length - 1].last_line, first_column: lstack[lstack.length - (len || 1)].first_column, last_column: lstack[lstack.length - 1].last_column };
  2534. if (ranges) {
  2535. yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];
  2536. }
  2537. r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack);
  2538. if (typeof r !== "undefined") {
  2539. return r;
  2540. }
  2541. if (len) {
  2542. stack = stack.slice(0, -1 * len * 2);
  2543. vstack = vstack.slice(0, -1 * len);
  2544. lstack = lstack.slice(0, -1 * len);
  2545. }
  2546. stack.push(this.productions_[action[1]][0]);
  2547. vstack.push(yyval.$);
  2548. lstack.push(yyval._$);
  2549. newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
  2550. stack.push(newState);
  2551. break;
  2552. case 3:
  2553. return true;
  2554. }
  2555. }
  2556. return true;
  2557. }
  2558. };
  2559. /* Jison generated lexer */
  2560. var lexer = (function () {
  2561. var lexer = { EOF: 1,
  2562. parseError: function parseError(str, hash) {
  2563. if (this.yy.parser) {
  2564. this.yy.parser.parseError(str, hash);
  2565. } else {
  2566. throw new Error(str);
  2567. }
  2568. },
  2569. setInput: function setInput(input) {
  2570. this._input = input;
  2571. this._more = this._less = this.done = false;
  2572. this.yylineno = this.yyleng = 0;
  2573. this.yytext = this.matched = this.match = '';
  2574. this.conditionStack = ['INITIAL'];
  2575. this.yylloc = { first_line: 1, first_column: 0, last_line: 1, last_column: 0 };
  2576. if (this.options.ranges) this.yylloc.range = [0, 0];
  2577. this.offset = 0;
  2578. return this;
  2579. },
  2580. input: function input() {
  2581. var ch = this._input[0];
  2582. this.yytext += ch;
  2583. this.yyleng++;
  2584. this.offset++;
  2585. this.match += ch;
  2586. this.matched += ch;
  2587. var lines = ch.match(/(?:\r\n?|\n).*/g);
  2588. if (lines) {
  2589. this.yylineno++;
  2590. this.yylloc.last_line++;
  2591. } else {
  2592. this.yylloc.last_column++;
  2593. }
  2594. if (this.options.ranges) this.yylloc.range[1]++;
  2595. this._input = this._input.slice(1);
  2596. return ch;
  2597. },
  2598. unput: function unput(ch) {
  2599. var len = ch.length;
  2600. var lines = ch.split(/(?:\r\n?|\n)/g);
  2601. this._input = ch + this._input;
  2602. this.yytext = this.yytext.substr(0, this.yytext.length - len - 1);
  2603. //this.yyleng -= len;
  2604. this.offset -= len;
  2605. var oldLines = this.match.split(/(?:\r\n?|\n)/g);
  2606. this.match = this.match.substr(0, this.match.length - 1);
  2607. this.matched = this.matched.substr(0, this.matched.length - 1);
  2608. if (lines.length - 1) this.yylineno -= lines.length - 1;
  2609. var r = this.yylloc.range;
  2610. this.yylloc = { first_line: this.yylloc.first_line,
  2611. last_line: this.yylineno + 1,
  2612. first_column: this.yylloc.first_column,
  2613. last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
  2614. };
  2615. if (this.options.ranges) {
  2616. this.yylloc.range = [r[0], r[0] + this.yyleng - len];
  2617. }
  2618. return this;
  2619. },
  2620. more: function more() {
  2621. this._more = true;
  2622. return this;
  2623. },
  2624. less: function less(n) {
  2625. this.unput(this.match.slice(n));
  2626. },
  2627. pastInput: function pastInput() {
  2628. var past = this.matched.substr(0, this.matched.length - this.match.length);
  2629. return (past.length > 20 ? '...' : '') + past.substr(-20).replace(/\n/g, "");
  2630. },
  2631. upcomingInput: function upcomingInput() {
  2632. var next = this.match;
  2633. if (next.length < 20) {
  2634. next += this._input.substr(0, 20 - next.length);
  2635. }
  2636. return (next.substr(0, 20) + (next.length > 20 ? '...' : '')).replace(/\n/g, "");
  2637. },
  2638. showPosition: function showPosition() {
  2639. var pre = this.pastInput();
  2640. var c = new Array(pre.length + 1).join("-");
  2641. return pre + this.upcomingInput() + "\n" + c + "^";
  2642. },
  2643. next: function next() {
  2644. if (this.done) {
  2645. return this.EOF;
  2646. }
  2647. if (!this._input) this.done = true;
  2648. var token, match, tempMatch, index, col, lines;
  2649. if (!this._more) {
  2650. this.yytext = '';
  2651. this.match = '';
  2652. }
  2653. var rules = this._currentRules();
  2654. for (var i = 0; i < rules.length; i++) {
  2655. tempMatch = this._input.match(this.rules[rules[i]]);
  2656. if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
  2657. match = tempMatch;
  2658. index = i;
  2659. if (!this.options.flex) break;
  2660. }
  2661. }
  2662. if (match) {
  2663. lines = match[0].match(/(?:\r\n?|\n).*/g);
  2664. if (lines) this.yylineno += lines.length;
  2665. this.yylloc = { first_line: this.yylloc.last_line,
  2666. last_line: this.yylineno + 1,
  2667. first_column: this.yylloc.last_column,
  2668. last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length };
  2669. this.yytext += match[0];
  2670. this.match += match[0];
  2671. this.matches = match;
  2672. this.yyleng = this.yytext.length;
  2673. if (this.options.ranges) {
  2674. this.yylloc.range = [this.offset, this.offset += this.yyleng];
  2675. }
  2676. this._more = false;
  2677. this._input = this._input.slice(match[0].length);
  2678. this.matched += match[0];
  2679. token = this.performAction.call(this, this.yy, this, rules[index], this.conditionStack[this.conditionStack.length - 1]);
  2680. if (this.done && this._input) this.done = false;
  2681. if (token) return token;else return;
  2682. }
  2683. if (this._input === "") {
  2684. return this.EOF;
  2685. } else {
  2686. return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), { text: "", token: null, line: this.yylineno });
  2687. }
  2688. },
  2689. lex: function lex() {
  2690. var r = this.next();
  2691. if (typeof r !== 'undefined') {
  2692. return r;
  2693. } else {
  2694. return this.lex();
  2695. }
  2696. },
  2697. begin: function begin(condition) {
  2698. this.conditionStack.push(condition);
  2699. },
  2700. popState: function popState() {
  2701. return this.conditionStack.pop();
  2702. },
  2703. _currentRules: function _currentRules() {
  2704. return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
  2705. },
  2706. topState: function topState() {
  2707. return this.conditionStack[this.conditionStack.length - 2];
  2708. },
  2709. pushState: function begin(condition) {
  2710. this.begin(condition);
  2711. } };
  2712. lexer.options = {};
  2713. lexer.performAction = function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
  2714. function strip(start, end) {
  2715. return yy_.yytext = yy_.yytext.substring(start, yy_.yyleng - end + start);
  2716. }
  2717. var YYSTATE = YY_START;
  2718. switch ($avoiding_name_collisions) {
  2719. case 0:
  2720. if (yy_.yytext.slice(-2) === "\\\\") {
  2721. strip(0, 1);
  2722. this.begin("mu");
  2723. } else if (yy_.yytext.slice(-1) === "\\") {
  2724. strip(0, 1);
  2725. this.begin("emu");
  2726. } else {
  2727. this.begin("mu");
  2728. }
  2729. if (yy_.yytext) return 15;
  2730. break;
  2731. case 1:
  2732. return 15;
  2733. break;
  2734. case 2:
  2735. this.popState();
  2736. return 15;
  2737. break;
  2738. case 3:
  2739. this.begin('raw');return 15;
  2740. break;
  2741. case 4:
  2742. this.popState();
  2743. // Should be using `this.topState()` below, but it currently
  2744. // returns the second top instead of the first top. Opened an
  2745. // issue about it at https://github.com/zaach/jison/issues/291
  2746. if (this.conditionStack[this.conditionStack.length - 1] === 'raw') {
  2747. return 15;
  2748. } else {
  2749. strip(5, 9);
  2750. return 'END_RAW_BLOCK';
  2751. }
  2752. break;
  2753. case 5:
  2754. return 15;
  2755. break;
  2756. case 6:
  2757. this.popState();
  2758. return 14;
  2759. break;
  2760. case 7:
  2761. return 65;
  2762. break;
  2763. case 8:
  2764. return 68;
  2765. break;
  2766. case 9:
  2767. return 19;
  2768. break;
  2769. case 10:
  2770. this.popState();
  2771. this.begin('raw');
  2772. return 23;
  2773. break;
  2774. case 11:
  2775. return 55;
  2776. break;
  2777. case 12:
  2778. return 60;
  2779. break;
  2780. case 13:
  2781. return 29;
  2782. break;
  2783. case 14:
  2784. return 47;
  2785. break;
  2786. case 15:
  2787. this.popState();return 44;
  2788. break;
  2789. case 16:
  2790. this.popState();return 44;
  2791. break;
  2792. case 17:
  2793. return 34;
  2794. break;
  2795. case 18:
  2796. return 39;
  2797. break;
  2798. case 19:
  2799. return 51;
  2800. break;
  2801. case 20:
  2802. return 48;
  2803. break;
  2804. case 21:
  2805. this.unput(yy_.yytext);
  2806. this.popState();
  2807. this.begin('com');
  2808. break;
  2809. case 22:
  2810. this.popState();
  2811. return 14;
  2812. break;
  2813. case 23:
  2814. return 48;
  2815. break;
  2816. case 24:
  2817. return 73;
  2818. break;
  2819. case 25:
  2820. return 72;
  2821. break;
  2822. case 26:
  2823. return 72;
  2824. break;
  2825. case 27:
  2826. return 87;
  2827. break;
  2828. case 28:
  2829. // ignore whitespace
  2830. break;
  2831. case 29:
  2832. this.popState();return 54;
  2833. break;
  2834. case 30:
  2835. this.popState();return 33;
  2836. break;
  2837. case 31:
  2838. yy_.yytext = strip(1, 2).replace(/\\"/g, '"');return 80;
  2839. break;
  2840. case 32:
  2841. yy_.yytext = strip(1, 2).replace(/\\'/g, "'");return 80;
  2842. break;
  2843. case 33:
  2844. return 85;
  2845. break;
  2846. case 34:
  2847. return 82;
  2848. break;
  2849. case 35:
  2850. return 82;
  2851. break;
  2852. case 36:
  2853. return 83;
  2854. break;
  2855. case 37:
  2856. return 84;
  2857. break;
  2858. case 38:
  2859. return 81;
  2860. break;
  2861. case 39:
  2862. return 75;
  2863. break;
  2864. case 40:
  2865. return 77;
  2866. break;
  2867. case 41:
  2868. return 72;
  2869. break;
  2870. case 42:
  2871. yy_.yytext = yy_.yytext.replace(/\\([\\\]])/g, '$1');return 72;
  2872. break;
  2873. case 43:
  2874. return 'INVALID';
  2875. break;
  2876. case 44:
  2877. return 5;
  2878. break;
  2879. }
  2880. };
  2881. lexer.rules = [/^(?:[^\x00]*?(?=(\{\{)))/, /^(?:[^\x00]+)/, /^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/, /^(?:\{\{\{\{(?=[^/]))/, /^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/, /^(?:[^\x00]+?(?=(\{\{\{\{)))/, /^(?:[\s\S]*?--(~)?\}\})/, /^(?:\()/, /^(?:\))/, /^(?:\{\{\{\{)/, /^(?:\}\}\}\})/, /^(?:\{\{(~)?>)/, /^(?:\{\{(~)?#>)/, /^(?:\{\{(~)?#\*?)/, /^(?:\{\{(~)?\/)/, /^(?:\{\{(~)?\^\s*(~)?\}\})/, /^(?:\{\{(~)?\s*else\s*(~)?\}\})/, /^(?:\{\{(~)?\^)/, /^(?:\{\{(~)?\s*else\b)/, /^(?:\{\{(~)?\{)/, /^(?:\{\{(~)?&)/, /^(?:\{\{(~)?!--)/, /^(?:\{\{(~)?![\s\S]*?\}\})/, /^(?:\{\{(~)?\*?)/, /^(?:=)/, /^(?:\.\.)/, /^(?:\.(?=([=~}\s\/.)|])))/, /^(?:[\/.])/, /^(?:\s+)/, /^(?:\}(~)?\}\})/, /^(?:(~)?\}\})/, /^(?:"(\\["]|[^"])*")/, /^(?:'(\\[']|[^'])*')/, /^(?:@)/, /^(?:true(?=([~}\s)])))/, /^(?:false(?=([~}\s)])))/, /^(?:undefined(?=([~}\s)])))/, /^(?:null(?=([~}\s)])))/, /^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/, /^(?:as\s+\|)/, /^(?:\|)/, /^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/, /^(?:\[(\\\]|[^\]])*\])/, /^(?:.)/, /^(?:$)/];
  2882. lexer.conditions = { "mu": { "rules": [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44], "inclusive": false }, "emu": { "rules": [2], "inclusive": false }, "com": { "rules": [6], "inclusive": false }, "raw": { "rules": [3, 4, 5], "inclusive": false }, "INITIAL": { "rules": [0, 1, 44], "inclusive": true } };
  2883. return lexer;
  2884. })();
  2885. parser.lexer = lexer;
  2886. function Parser() {
  2887. this.yy = {};
  2888. }Parser.prototype = parser;parser.Parser = Parser;
  2889. return new Parser();
  2890. })();exports["default"] = handlebars;
  2891. module.exports = exports["default"];
  2892. /***/ }),
  2893. /* 87 */
  2894. /***/ (function(module, exports, __webpack_require__) {
  2895. 'use strict';
  2896. var _interopRequireDefault = __webpack_require__(1)['default'];
  2897. exports.__esModule = true;
  2898. var _visitor = __webpack_require__(88);
  2899. var _visitor2 = _interopRequireDefault(_visitor);
  2900. function WhitespaceControl() {
  2901. var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
  2902. this.options = options;
  2903. }
  2904. WhitespaceControl.prototype = new _visitor2['default']();
  2905. WhitespaceControl.prototype.Program = function (program) {
  2906. var doStandalone = !this.options.ignoreStandalone;
  2907. var isRoot = !this.isRootSeen;
  2908. this.isRootSeen = true;
  2909. var body = program.body;
  2910. for (var i = 0, l = body.length; i < l; i++) {
  2911. var current = body[i],
  2912. strip = this.accept(current);
  2913. if (!strip) {
  2914. continue;
  2915. }
  2916. var _isPrevWhitespace = isPrevWhitespace(body, i, isRoot),
  2917. _isNextWhitespace = isNextWhitespace(body, i, isRoot),
  2918. openStandalone = strip.openStandalone && _isPrevWhitespace,
  2919. closeStandalone = strip.closeStandalone && _isNextWhitespace,
  2920. inlineStandalone = strip.inlineStandalone && _isPrevWhitespace && _isNextWhitespace;
  2921. if (strip.close) {
  2922. omitRight(body, i, true);
  2923. }
  2924. if (strip.open) {
  2925. omitLeft(body, i, true);
  2926. }
  2927. if (doStandalone && inlineStandalone) {
  2928. omitRight(body, i);
  2929. if (omitLeft(body, i)) {
  2930. // If we are on a standalone node, save the indent info for partials
  2931. if (current.type === 'PartialStatement') {
  2932. // Pull out the whitespace from the final line
  2933. current.indent = /([ \t]+$)/.exec(body[i - 1].original)[1];
  2934. }
  2935. }
  2936. }
  2937. if (doStandalone && openStandalone) {
  2938. omitRight((current.program || current.inverse).body);
  2939. // Strip out the previous content node if it's whitespace only
  2940. omitLeft(body, i);
  2941. }
  2942. if (doStandalone && closeStandalone) {
  2943. // Always strip the next node
  2944. omitRight(body, i);
  2945. omitLeft((current.inverse || current.program).body);
  2946. }
  2947. }
  2948. return program;
  2949. };
  2950. WhitespaceControl.prototype.BlockStatement = WhitespaceControl.prototype.DecoratorBlock = WhitespaceControl.prototype.PartialBlockStatement = function (block) {
  2951. this.accept(block.program);
  2952. this.accept(block.inverse);
  2953. // Find the inverse program that is involed with whitespace stripping.
  2954. var program = block.program || block.inverse,
  2955. inverse = block.program && block.inverse,
  2956. firstInverse = inverse,
  2957. lastInverse = inverse;
  2958. if (inverse && inverse.chained) {
  2959. firstInverse = inverse.body[0].program;
  2960. // Walk the inverse chain to find the last inverse that is actually in the chain.
  2961. while (lastInverse.chained) {
  2962. lastInverse = lastInverse.body[lastInverse.body.length - 1].program;
  2963. }
  2964. }
  2965. var strip = {
  2966. open: block.openStrip.open,
  2967. close: block.closeStrip.close,
  2968. // Determine the standalone candiacy. Basically flag our content as being possibly standalone
  2969. // so our parent can determine if we actually are standalone
  2970. openStandalone: isNextWhitespace(program.body),
  2971. closeStandalone: isPrevWhitespace((firstInverse || program).body)
  2972. };
  2973. if (block.openStrip.close) {
  2974. omitRight(program.body, null, true);
  2975. }
  2976. if (inverse) {
  2977. var inverseStrip = block.inverseStrip;
  2978. if (inverseStrip.open) {
  2979. omitLeft(program.body, null, true);
  2980. }
  2981. if (inverseStrip.close) {
  2982. omitRight(firstInverse.body, null, true);
  2983. }
  2984. if (block.closeStrip.open) {
  2985. omitLeft(lastInverse.body, null, true);
  2986. }
  2987. // Find standalone else statments
  2988. if (!this.options.ignoreStandalone && isPrevWhitespace(program.body) && isNextWhitespace(firstInverse.body)) {
  2989. omitLeft(program.body);
  2990. omitRight(firstInverse.body);
  2991. }
  2992. } else if (block.closeStrip.open) {
  2993. omitLeft(program.body, null, true);
  2994. }
  2995. return strip;
  2996. };
  2997. WhitespaceControl.prototype.Decorator = WhitespaceControl.prototype.MustacheStatement = function (mustache) {
  2998. return mustache.strip;
  2999. };
  3000. WhitespaceControl.prototype.PartialStatement = WhitespaceControl.prototype.CommentStatement = function (node) {
  3001. /* istanbul ignore next */
  3002. var strip = node.strip || {};
  3003. return {
  3004. inlineStandalone: true,
  3005. open: strip.open,
  3006. close: strip.close
  3007. };
  3008. };
  3009. function isPrevWhitespace(body, i, isRoot) {
  3010. if (i === undefined) {
  3011. i = body.length;
  3012. }
  3013. // Nodes that end with newlines are considered whitespace (but are special
  3014. // cased for strip operations)
  3015. var prev = body[i - 1],
  3016. sibling = body[i - 2];
  3017. if (!prev) {
  3018. return isRoot;
  3019. }
  3020. if (prev.type === 'ContentStatement') {
  3021. return (sibling || !isRoot ? /\r?\n\s*?$/ : /(^|\r?\n)\s*?$/).test(prev.original);
  3022. }
  3023. }
  3024. function isNextWhitespace(body, i, isRoot) {
  3025. if (i === undefined) {
  3026. i = -1;
  3027. }
  3028. var next = body[i + 1],
  3029. sibling = body[i + 2];
  3030. if (!next) {
  3031. return isRoot;
  3032. }
  3033. if (next.type === 'ContentStatement') {
  3034. return (sibling || !isRoot ? /^\s*?\r?\n/ : /^\s*?(\r?\n|$)/).test(next.original);
  3035. }
  3036. }
  3037. // Marks the node to the right of the position as omitted.
  3038. // I.e. {{foo}}' ' will mark the ' ' node as omitted.
  3039. //
  3040. // If i is undefined, then the first child will be marked as such.
  3041. //
  3042. // If mulitple is truthy then all whitespace will be stripped out until non-whitespace
  3043. // content is met.
  3044. function omitRight(body, i, multiple) {
  3045. var current = body[i == null ? 0 : i + 1];
  3046. if (!current || current.type !== 'ContentStatement' || !multiple && current.rightStripped) {
  3047. return;
  3048. }
  3049. var original = current.value;
  3050. current.value = current.value.replace(multiple ? /^\s+/ : /^[ \t]*\r?\n?/, '');
  3051. current.rightStripped = current.value !== original;
  3052. }
  3053. // Marks the node to the left of the position as omitted.
  3054. // I.e. ' '{{foo}} will mark the ' ' node as omitted.
  3055. //
  3056. // If i is undefined then the last child will be marked as such.
  3057. //
  3058. // If mulitple is truthy then all whitespace will be stripped out until non-whitespace
  3059. // content is met.
  3060. function omitLeft(body, i, multiple) {
  3061. var current = body[i == null ? body.length - 1 : i - 1];
  3062. if (!current || current.type !== 'ContentStatement' || !multiple && current.leftStripped) {
  3063. return;
  3064. }
  3065. // We omit the last node if it's whitespace only and not preceded by a non-content node.
  3066. var original = current.value;
  3067. current.value = current.value.replace(multiple ? /\s+$/ : /[ \t]+$/, '');
  3068. current.leftStripped = current.value !== original;
  3069. return current.leftStripped;
  3070. }
  3071. exports['default'] = WhitespaceControl;
  3072. module.exports = exports['default'];
  3073. /***/ }),
  3074. /* 88 */
  3075. /***/ (function(module, exports, __webpack_require__) {
  3076. 'use strict';
  3077. var _interopRequireDefault = __webpack_require__(1)['default'];
  3078. exports.__esModule = true;
  3079. var _exception = __webpack_require__(6);
  3080. var _exception2 = _interopRequireDefault(_exception);
  3081. function Visitor() {
  3082. this.parents = [];
  3083. }
  3084. Visitor.prototype = {
  3085. constructor: Visitor,
  3086. mutating: false,
  3087. // Visits a given value. If mutating, will replace the value if necessary.
  3088. acceptKey: function acceptKey(node, name) {
  3089. var value = this.accept(node[name]);
  3090. if (this.mutating) {
  3091. // Hacky sanity check: This may have a few false positives for type for the helper
  3092. // methods but will generally do the right thing without a lot of overhead.
  3093. if (value && !Visitor.prototype[value.type]) {
  3094. throw new _exception2['default']('Unexpected node type "' + value.type + '" found when accepting ' + name + ' on ' + node.type);
  3095. }
  3096. node[name] = value;
  3097. }
  3098. },
  3099. // Performs an accept operation with added sanity check to ensure
  3100. // required keys are not removed.
  3101. acceptRequired: function acceptRequired(node, name) {
  3102. this.acceptKey(node, name);
  3103. if (!node[name]) {
  3104. throw new _exception2['default'](node.type + ' requires ' + name);
  3105. }
  3106. },
  3107. // Traverses a given array. If mutating, empty respnses will be removed
  3108. // for child elements.
  3109. acceptArray: function acceptArray(array) {
  3110. for (var i = 0, l = array.length; i < l; i++) {
  3111. this.acceptKey(array, i);
  3112. if (!array[i]) {
  3113. array.splice(i, 1);
  3114. i--;
  3115. l--;
  3116. }
  3117. }
  3118. },
  3119. accept: function accept(object) {
  3120. if (!object) {
  3121. return;
  3122. }
  3123. /* istanbul ignore next: Sanity code */
  3124. if (!this[object.type]) {
  3125. throw new _exception2['default']('Unknown type: ' + object.type, object);
  3126. }
  3127. if (this.current) {
  3128. this.parents.unshift(this.current);
  3129. }
  3130. this.current = object;
  3131. var ret = this[object.type](object);
  3132. this.current = this.parents.shift();
  3133. if (!this.mutating || ret) {
  3134. return ret;
  3135. } else if (ret !== false) {
  3136. return object;
  3137. }
  3138. },
  3139. Program: function Program(program) {
  3140. this.acceptArray(program.body);
  3141. },
  3142. MustacheStatement: visitSubExpression,
  3143. Decorator: visitSubExpression,
  3144. BlockStatement: visitBlock,
  3145. DecoratorBlock: visitBlock,
  3146. PartialStatement: visitPartial,
  3147. PartialBlockStatement: function PartialBlockStatement(partial) {
  3148. visitPartial.call(this, partial);
  3149. this.acceptKey(partial, 'program');
  3150. },
  3151. ContentStatement: function ContentStatement() /* content */{},
  3152. CommentStatement: function CommentStatement() /* comment */{},
  3153. SubExpression: visitSubExpression,
  3154. PathExpression: function PathExpression() /* path */{},
  3155. StringLiteral: function StringLiteral() /* string */{},
  3156. NumberLiteral: function NumberLiteral() /* number */{},
  3157. BooleanLiteral: function BooleanLiteral() /* bool */{},
  3158. UndefinedLiteral: function UndefinedLiteral() /* literal */{},
  3159. NullLiteral: function NullLiteral() /* literal */{},
  3160. Hash: function Hash(hash) {
  3161. this.acceptArray(hash.pairs);
  3162. },
  3163. HashPair: function HashPair(pair) {
  3164. this.acceptRequired(pair, 'value');
  3165. }
  3166. };
  3167. function visitSubExpression(mustache) {
  3168. this.acceptRequired(mustache, 'path');
  3169. this.acceptArray(mustache.params);
  3170. this.acceptKey(mustache, 'hash');
  3171. }
  3172. function visitBlock(block) {
  3173. visitSubExpression.call(this, block);
  3174. this.acceptKey(block, 'program');
  3175. this.acceptKey(block, 'inverse');
  3176. }
  3177. function visitPartial(partial) {
  3178. this.acceptRequired(partial, 'name');
  3179. this.acceptArray(partial.params);
  3180. this.acceptKey(partial, 'hash');
  3181. }
  3182. exports['default'] = Visitor;
  3183. module.exports = exports['default'];
  3184. /***/ }),
  3185. /* 89 */
  3186. /***/ (function(module, exports, __webpack_require__) {
  3187. 'use strict';
  3188. var _interopRequireDefault = __webpack_require__(1)['default'];
  3189. exports.__esModule = true;
  3190. exports.SourceLocation = SourceLocation;
  3191. exports.id = id;
  3192. exports.stripFlags = stripFlags;
  3193. exports.stripComment = stripComment;
  3194. exports.preparePath = preparePath;
  3195. exports.prepareMustache = prepareMustache;
  3196. exports.prepareRawBlock = prepareRawBlock;
  3197. exports.prepareBlock = prepareBlock;
  3198. exports.prepareProgram = prepareProgram;
  3199. exports.preparePartialBlock = preparePartialBlock;
  3200. var _exception = __webpack_require__(6);
  3201. var _exception2 = _interopRequireDefault(_exception);
  3202. function validateClose(open, close) {
  3203. close = close.path ? close.path.original : close;
  3204. if (open.path.original !== close) {
  3205. var errorNode = { loc: open.path.loc };
  3206. throw new _exception2['default'](open.path.original + " doesn't match " + close, errorNode);
  3207. }
  3208. }
  3209. function SourceLocation(source, locInfo) {
  3210. this.source = source;
  3211. this.start = {
  3212. line: locInfo.first_line,
  3213. column: locInfo.first_column
  3214. };
  3215. this.end = {
  3216. line: locInfo.last_line,
  3217. column: locInfo.last_column
  3218. };
  3219. }
  3220. function id(token) {
  3221. if (/^\[.*\]$/.test(token)) {
  3222. return token.substring(1, token.length - 1);
  3223. } else {
  3224. return token;
  3225. }
  3226. }
  3227. function stripFlags(open, close) {
  3228. return {
  3229. open: open.charAt(2) === '~',
  3230. close: close.charAt(close.length - 3) === '~'
  3231. };
  3232. }
  3233. function stripComment(comment) {
  3234. return comment.replace(/^\{\{~?!-?-?/, '').replace(/-?-?~?\}\}$/, '');
  3235. }
  3236. function preparePath(data, parts, loc) {
  3237. loc = this.locInfo(loc);
  3238. var original = data ? '@' : '',
  3239. dig = [],
  3240. depth = 0;
  3241. for (var i = 0, l = parts.length; i < l; i++) {
  3242. var part = parts[i].part,
  3243. // If we have [] syntax then we do not treat path references as operators,
  3244. // i.e. foo.[this] resolves to approximately context.foo['this']
  3245. isLiteral = parts[i].original !== part;
  3246. original += (parts[i].separator || '') + part;
  3247. if (!isLiteral && (part === '..' || part === '.' || part === 'this')) {
  3248. if (dig.length > 0) {
  3249. throw new _exception2['default']('Invalid path: ' + original, { loc: loc });
  3250. } else if (part === '..') {
  3251. depth++;
  3252. }
  3253. } else {
  3254. dig.push(part);
  3255. }
  3256. }
  3257. return {
  3258. type: 'PathExpression',
  3259. data: data,
  3260. depth: depth,
  3261. parts: dig,
  3262. original: original,
  3263. loc: loc
  3264. };
  3265. }
  3266. function prepareMustache(path, params, hash, open, strip, locInfo) {
  3267. // Must use charAt to support IE pre-10
  3268. var escapeFlag = open.charAt(3) || open.charAt(2),
  3269. escaped = escapeFlag !== '{' && escapeFlag !== '&';
  3270. var decorator = /\*/.test(open);
  3271. return {
  3272. type: decorator ? 'Decorator' : 'MustacheStatement',
  3273. path: path,
  3274. params: params,
  3275. hash: hash,
  3276. escaped: escaped,
  3277. strip: strip,
  3278. loc: this.locInfo(locInfo)
  3279. };
  3280. }
  3281. function prepareRawBlock(openRawBlock, contents, close, locInfo) {
  3282. validateClose(openRawBlock, close);
  3283. locInfo = this.locInfo(locInfo);
  3284. var program = {
  3285. type: 'Program',
  3286. body: contents,
  3287. strip: {},
  3288. loc: locInfo
  3289. };
  3290. return {
  3291. type: 'BlockStatement',
  3292. path: openRawBlock.path,
  3293. params: openRawBlock.params,
  3294. hash: openRawBlock.hash,
  3295. program: program,
  3296. openStrip: {},
  3297. inverseStrip: {},
  3298. closeStrip: {},
  3299. loc: locInfo
  3300. };
  3301. }
  3302. function prepareBlock(openBlock, program, inverseAndProgram, close, inverted, locInfo) {
  3303. if (close && close.path) {
  3304. validateClose(openBlock, close);
  3305. }
  3306. var decorator = /\*/.test(openBlock.open);
  3307. program.blockParams = openBlock.blockParams;
  3308. var inverse = undefined,
  3309. inverseStrip = undefined;
  3310. if (inverseAndProgram) {
  3311. if (decorator) {
  3312. throw new _exception2['default']('Unexpected inverse block on decorator', inverseAndProgram);
  3313. }
  3314. if (inverseAndProgram.chain) {
  3315. inverseAndProgram.program.body[0].closeStrip = close.strip;
  3316. }
  3317. inverseStrip = inverseAndProgram.strip;
  3318. inverse = inverseAndProgram.program;
  3319. }
  3320. if (inverted) {
  3321. inverted = inverse;
  3322. inverse = program;
  3323. program = inverted;
  3324. }
  3325. return {
  3326. type: decorator ? 'DecoratorBlock' : 'BlockStatement',
  3327. path: openBlock.path,
  3328. params: openBlock.params,
  3329. hash: openBlock.hash,
  3330. program: program,
  3331. inverse: inverse,
  3332. openStrip: openBlock.strip,
  3333. inverseStrip: inverseStrip,
  3334. closeStrip: close && close.strip,
  3335. loc: this.locInfo(locInfo)
  3336. };
  3337. }
  3338. function prepareProgram(statements, loc) {
  3339. if (!loc && statements.length) {
  3340. var firstLoc = statements[0].loc,
  3341. lastLoc = statements[statements.length - 1].loc;
  3342. /* istanbul ignore else */
  3343. if (firstLoc && lastLoc) {
  3344. loc = {
  3345. source: firstLoc.source,
  3346. start: {
  3347. line: firstLoc.start.line,
  3348. column: firstLoc.start.column
  3349. },
  3350. end: {
  3351. line: lastLoc.end.line,
  3352. column: lastLoc.end.column
  3353. }
  3354. };
  3355. }
  3356. }
  3357. return {
  3358. type: 'Program',
  3359. body: statements,
  3360. strip: {},
  3361. loc: loc
  3362. };
  3363. }
  3364. function preparePartialBlock(open, program, close, locInfo) {
  3365. validateClose(open, close);
  3366. return {
  3367. type: 'PartialBlockStatement',
  3368. name: open.path,
  3369. params: open.params,
  3370. hash: open.hash,
  3371. program: program,
  3372. openStrip: open.strip,
  3373. closeStrip: close && close.strip,
  3374. loc: this.locInfo(locInfo)
  3375. };
  3376. }
  3377. /***/ }),
  3378. /* 90 */
  3379. /***/ (function(module, exports, __webpack_require__) {
  3380. /* eslint-disable new-cap */
  3381. 'use strict';
  3382. var _Object$create = __webpack_require__(74)['default'];
  3383. var _interopRequireDefault = __webpack_require__(1)['default'];
  3384. exports.__esModule = true;
  3385. exports.Compiler = Compiler;
  3386. exports.precompile = precompile;
  3387. exports.compile = compile;
  3388. var _exception = __webpack_require__(6);
  3389. var _exception2 = _interopRequireDefault(_exception);
  3390. var _utils = __webpack_require__(5);
  3391. var _ast = __webpack_require__(84);
  3392. var _ast2 = _interopRequireDefault(_ast);
  3393. var slice = [].slice;
  3394. function Compiler() {}
  3395. // the foundHelper register will disambiguate helper lookup from finding a
  3396. // function in a context. This is necessary for mustache compatibility, which
  3397. // requires that context functions in blocks are evaluated by blockHelperMissing,
  3398. // and then proceed as if the resulting value was provided to blockHelperMissing.
  3399. Compiler.prototype = {
  3400. compiler: Compiler,
  3401. equals: function equals(other) {
  3402. var len = this.opcodes.length;
  3403. if (other.opcodes.length !== len) {
  3404. return false;
  3405. }
  3406. for (var i = 0; i < len; i++) {
  3407. var opcode = this.opcodes[i],
  3408. otherOpcode = other.opcodes[i];
  3409. if (opcode.opcode !== otherOpcode.opcode || !argEquals(opcode.args, otherOpcode.args)) {
  3410. return false;
  3411. }
  3412. }
  3413. // We know that length is the same between the two arrays because they are directly tied
  3414. // to the opcode behavior above.
  3415. len = this.children.length;
  3416. for (var i = 0; i < len; i++) {
  3417. if (!this.children[i].equals(other.children[i])) {
  3418. return false;
  3419. }
  3420. }
  3421. return true;
  3422. },
  3423. guid: 0,
  3424. compile: function compile(program, options) {
  3425. this.sourceNode = [];
  3426. this.opcodes = [];
  3427. this.children = [];
  3428. this.options = options;
  3429. this.stringParams = options.stringParams;
  3430. this.trackIds = options.trackIds;
  3431. options.blockParams = options.blockParams || [];
  3432. options.knownHelpers = _utils.extend(_Object$create(null), {
  3433. helperMissing: true,
  3434. blockHelperMissing: true,
  3435. each: true,
  3436. 'if': true,
  3437. unless: true,
  3438. 'with': true,
  3439. log: true,
  3440. lookup: true
  3441. }, options.knownHelpers);
  3442. return this.accept(program);
  3443. },
  3444. compileProgram: function compileProgram(program) {
  3445. var childCompiler = new this.compiler(),
  3446. // eslint-disable-line new-cap
  3447. result = childCompiler.compile(program, this.options),
  3448. guid = this.guid++;
  3449. this.usePartial = this.usePartial || result.usePartial;
  3450. this.children[guid] = result;
  3451. this.useDepths = this.useDepths || result.useDepths;
  3452. return guid;
  3453. },
  3454. accept: function accept(node) {
  3455. /* istanbul ignore next: Sanity code */
  3456. if (!this[node.type]) {
  3457. throw new _exception2['default']('Unknown type: ' + node.type, node);
  3458. }
  3459. this.sourceNode.unshift(node);
  3460. var ret = this[node.type](node);
  3461. this.sourceNode.shift();
  3462. return ret;
  3463. },
  3464. Program: function Program(program) {
  3465. this.options.blockParams.unshift(program.blockParams);
  3466. var body = program.body,
  3467. bodyLength = body.length;
  3468. for (var i = 0; i < bodyLength; i++) {
  3469. this.accept(body[i]);
  3470. }
  3471. this.options.blockParams.shift();
  3472. this.isSimple = bodyLength === 1;
  3473. this.blockParams = program.blockParams ? program.blockParams.length : 0;
  3474. return this;
  3475. },
  3476. BlockStatement: function BlockStatement(block) {
  3477. transformLiteralToPath(block);
  3478. var program = block.program,
  3479. inverse = block.inverse;
  3480. program = program && this.compileProgram(program);
  3481. inverse = inverse && this.compileProgram(inverse);
  3482. var type = this.classifySexpr(block);
  3483. if (type === 'helper') {
  3484. this.helperSexpr(block, program, inverse);
  3485. } else if (type === 'simple') {
  3486. this.simpleSexpr(block);
  3487. // now that the simple mustache is resolved, we need to
  3488. // evaluate it by executing `blockHelperMissing`
  3489. this.opcode('pushProgram', program);
  3490. this.opcode('pushProgram', inverse);
  3491. this.opcode('emptyHash');
  3492. this.opcode('blockValue', block.path.original);
  3493. } else {
  3494. this.ambiguousSexpr(block, program, inverse);
  3495. // now that the simple mustache is resolved, we need to
  3496. // evaluate it by executing `blockHelperMissing`
  3497. this.opcode('pushProgram', program);
  3498. this.opcode('pushProgram', inverse);
  3499. this.opcode('emptyHash');
  3500. this.opcode('ambiguousBlockValue');
  3501. }
  3502. this.opcode('append');
  3503. },
  3504. DecoratorBlock: function DecoratorBlock(decorator) {
  3505. var program = decorator.program && this.compileProgram(decorator.program);
  3506. var params = this.setupFullMustacheParams(decorator, program, undefined),
  3507. path = decorator.path;
  3508. this.useDecorators = true;
  3509. this.opcode('registerDecorator', params.length, path.original);
  3510. },
  3511. PartialStatement: function PartialStatement(partial) {
  3512. this.usePartial = true;
  3513. var program = partial.program;
  3514. if (program) {
  3515. program = this.compileProgram(partial.program);
  3516. }
  3517. var params = partial.params;
  3518. if (params.length > 1) {
  3519. throw new _exception2['default']('Unsupported number of partial arguments: ' + params.length, partial);
  3520. } else if (!params.length) {
  3521. if (this.options.explicitPartialContext) {
  3522. this.opcode('pushLiteral', 'undefined');
  3523. } else {
  3524. params.push({ type: 'PathExpression', parts: [], depth: 0 });
  3525. }
  3526. }
  3527. var partialName = partial.name.original,
  3528. isDynamic = partial.name.type === 'SubExpression';
  3529. if (isDynamic) {
  3530. this.accept(partial.name);
  3531. }
  3532. this.setupFullMustacheParams(partial, program, undefined, true);
  3533. var indent = partial.indent || '';
  3534. if (this.options.preventIndent && indent) {
  3535. this.opcode('appendContent', indent);
  3536. indent = '';
  3537. }
  3538. this.opcode('invokePartial', isDynamic, partialName, indent);
  3539. this.opcode('append');
  3540. },
  3541. PartialBlockStatement: function PartialBlockStatement(partialBlock) {
  3542. this.PartialStatement(partialBlock);
  3543. },
  3544. MustacheStatement: function MustacheStatement(mustache) {
  3545. this.SubExpression(mustache);
  3546. if (mustache.escaped && !this.options.noEscape) {
  3547. this.opcode('appendEscaped');
  3548. } else {
  3549. this.opcode('append');
  3550. }
  3551. },
  3552. Decorator: function Decorator(decorator) {
  3553. this.DecoratorBlock(decorator);
  3554. },
  3555. ContentStatement: function ContentStatement(content) {
  3556. if (content.value) {
  3557. this.opcode('appendContent', content.value);
  3558. }
  3559. },
  3560. CommentStatement: function CommentStatement() {},
  3561. SubExpression: function SubExpression(sexpr) {
  3562. transformLiteralToPath(sexpr);
  3563. var type = this.classifySexpr(sexpr);
  3564. if (type === 'simple') {
  3565. this.simpleSexpr(sexpr);
  3566. } else if (type === 'helper') {
  3567. this.helperSexpr(sexpr);
  3568. } else {
  3569. this.ambiguousSexpr(sexpr);
  3570. }
  3571. },
  3572. ambiguousSexpr: function ambiguousSexpr(sexpr, program, inverse) {
  3573. var path = sexpr.path,
  3574. name = path.parts[0],
  3575. isBlock = program != null || inverse != null;
  3576. this.opcode('getContext', path.depth);
  3577. this.opcode('pushProgram', program);
  3578. this.opcode('pushProgram', inverse);
  3579. path.strict = true;
  3580. this.accept(path);
  3581. this.opcode('invokeAmbiguous', name, isBlock);
  3582. },
  3583. simpleSexpr: function simpleSexpr(sexpr) {
  3584. var path = sexpr.path;
  3585. path.strict = true;
  3586. this.accept(path);
  3587. this.opcode('resolvePossibleLambda');
  3588. },
  3589. helperSexpr: function helperSexpr(sexpr, program, inverse) {
  3590. var params = this.setupFullMustacheParams(sexpr, program, inverse),
  3591. path = sexpr.path,
  3592. name = path.parts[0];
  3593. if (this.options.knownHelpers[name]) {
  3594. this.opcode('invokeKnownHelper', params.length, name);
  3595. } else if (this.options.knownHelpersOnly) {
  3596. throw new _exception2['default']('You specified knownHelpersOnly, but used the unknown helper ' + name, sexpr);
  3597. } else {
  3598. path.strict = true;
  3599. path.falsy = true;
  3600. this.accept(path);
  3601. this.opcode('invokeHelper', params.length, path.original, _ast2['default'].helpers.simpleId(path));
  3602. }
  3603. },
  3604. PathExpression: function PathExpression(path) {
  3605. this.addDepth(path.depth);
  3606. this.opcode('getContext', path.depth);
  3607. var name = path.parts[0],
  3608. scoped = _ast2['default'].helpers.scopedId(path),
  3609. blockParamId = !path.depth && !scoped && this.blockParamIndex(name);
  3610. if (blockParamId) {
  3611. this.opcode('lookupBlockParam', blockParamId, path.parts);
  3612. } else if (!name) {
  3613. // Context reference, i.e. `{{foo .}}` or `{{foo ..}}`
  3614. this.opcode('pushContext');
  3615. } else if (path.data) {
  3616. this.options.data = true;
  3617. this.opcode('lookupData', path.depth, path.parts, path.strict);
  3618. } else {
  3619. this.opcode('lookupOnContext', path.parts, path.falsy, path.strict, scoped);
  3620. }
  3621. },
  3622. StringLiteral: function StringLiteral(string) {
  3623. this.opcode('pushString', string.value);
  3624. },
  3625. NumberLiteral: function NumberLiteral(number) {
  3626. this.opcode('pushLiteral', number.value);
  3627. },
  3628. BooleanLiteral: function BooleanLiteral(bool) {
  3629. this.opcode('pushLiteral', bool.value);
  3630. },
  3631. UndefinedLiteral: function UndefinedLiteral() {
  3632. this.opcode('pushLiteral', 'undefined');
  3633. },
  3634. NullLiteral: function NullLiteral() {
  3635. this.opcode('pushLiteral', 'null');
  3636. },
  3637. Hash: function Hash(hash) {
  3638. var pairs = hash.pairs,
  3639. i = 0,
  3640. l = pairs.length;
  3641. this.opcode('pushHash');
  3642. for (; i < l; i++) {
  3643. this.pushParam(pairs[i].value);
  3644. }
  3645. while (i--) {
  3646. this.opcode('assignToHash', pairs[i].key);
  3647. }
  3648. this.opcode('popHash');
  3649. },
  3650. // HELPERS
  3651. opcode: function opcode(name) {
  3652. this.opcodes.push({
  3653. opcode: name,
  3654. args: slice.call(arguments, 1),
  3655. loc: this.sourceNode[0].loc
  3656. });
  3657. },
  3658. addDepth: function addDepth(depth) {
  3659. if (!depth) {
  3660. return;
  3661. }
  3662. this.useDepths = true;
  3663. },
  3664. classifySexpr: function classifySexpr(sexpr) {
  3665. var isSimple = _ast2['default'].helpers.simpleId(sexpr.path);
  3666. var isBlockParam = isSimple && !!this.blockParamIndex(sexpr.path.parts[0]);
  3667. // a mustache is an eligible helper if:
  3668. // * its id is simple (a single part, not `this` or `..`)
  3669. var isHelper = !isBlockParam && _ast2['default'].helpers.helperExpression(sexpr);
  3670. // if a mustache is an eligible helper but not a definite
  3671. // helper, it is ambiguous, and will be resolved in a later
  3672. // pass or at runtime.
  3673. var isEligible = !isBlockParam && (isHelper || isSimple);
  3674. // if ambiguous, we can possibly resolve the ambiguity now
  3675. // An eligible helper is one that does not have a complex path, i.e. `this.foo`, `../foo` etc.
  3676. if (isEligible && !isHelper) {
  3677. var _name = sexpr.path.parts[0],
  3678. options = this.options;
  3679. if (options.knownHelpers[_name]) {
  3680. isHelper = true;
  3681. } else if (options.knownHelpersOnly) {
  3682. isEligible = false;
  3683. }
  3684. }
  3685. if (isHelper) {
  3686. return 'helper';
  3687. } else if (isEligible) {
  3688. return 'ambiguous';
  3689. } else {
  3690. return 'simple';
  3691. }
  3692. },
  3693. pushParams: function pushParams(params) {
  3694. for (var i = 0, l = params.length; i < l; i++) {
  3695. this.pushParam(params[i]);
  3696. }
  3697. },
  3698. pushParam: function pushParam(val) {
  3699. var value = val.value != null ? val.value : val.original || '';
  3700. if (this.stringParams) {
  3701. if (value.replace) {
  3702. value = value.replace(/^(\.?\.\/)*/g, '').replace(/\//g, '.');
  3703. }
  3704. if (val.depth) {
  3705. this.addDepth(val.depth);
  3706. }
  3707. this.opcode('getContext', val.depth || 0);
  3708. this.opcode('pushStringParam', value, val.type);
  3709. if (val.type === 'SubExpression') {
  3710. // SubExpressions get evaluated and passed in
  3711. // in string params mode.
  3712. this.accept(val);
  3713. }
  3714. } else {
  3715. if (this.trackIds) {
  3716. var blockParamIndex = undefined;
  3717. if (val.parts && !_ast2['default'].helpers.scopedId(val) && !val.depth) {
  3718. blockParamIndex = this.blockParamIndex(val.parts[0]);
  3719. }
  3720. if (blockParamIndex) {
  3721. var blockParamChild = val.parts.slice(1).join('.');
  3722. this.opcode('pushId', 'BlockParam', blockParamIndex, blockParamChild);
  3723. } else {
  3724. value = val.original || value;
  3725. if (value.replace) {
  3726. value = value.replace(/^this(?:\.|$)/, '').replace(/^\.\//, '').replace(/^\.$/, '');
  3727. }
  3728. this.opcode('pushId', val.type, value);
  3729. }
  3730. }
  3731. this.accept(val);
  3732. }
  3733. },
  3734. setupFullMustacheParams: function setupFullMustacheParams(sexpr, program, inverse, omitEmpty) {
  3735. var params = sexpr.params;
  3736. this.pushParams(params);
  3737. this.opcode('pushProgram', program);
  3738. this.opcode('pushProgram', inverse);
  3739. if (sexpr.hash) {
  3740. this.accept(sexpr.hash);
  3741. } else {
  3742. this.opcode('emptyHash', omitEmpty);
  3743. }
  3744. return params;
  3745. },
  3746. blockParamIndex: function blockParamIndex(name) {
  3747. for (var depth = 0, len = this.options.blockParams.length; depth < len; depth++) {
  3748. var blockParams = this.options.blockParams[depth],
  3749. param = blockParams && _utils.indexOf(blockParams, name);
  3750. if (blockParams && param >= 0) {
  3751. return [depth, param];
  3752. }
  3753. }
  3754. }
  3755. };
  3756. function precompile(input, options, env) {
  3757. if (input == null || typeof input !== 'string' && input.type !== 'Program') {
  3758. throw new _exception2['default']('You must pass a string or Handlebars AST to Handlebars.precompile. You passed ' + input);
  3759. }
  3760. options = options || {};
  3761. if (!('data' in options)) {
  3762. options.data = true;
  3763. }
  3764. if (options.compat) {
  3765. options.useDepths = true;
  3766. }
  3767. var ast = env.parse(input, options),
  3768. environment = new env.Compiler().compile(ast, options);
  3769. return new env.JavaScriptCompiler().compile(environment, options);
  3770. }
  3771. function compile(input, options, env) {
  3772. if (options === undefined) options = {};
  3773. if (input == null || typeof input !== 'string' && input.type !== 'Program') {
  3774. throw new _exception2['default']('You must pass a string or Handlebars AST to Handlebars.compile. You passed ' + input);
  3775. }
  3776. options = _utils.extend({}, options);
  3777. if (!('data' in options)) {
  3778. options.data = true;
  3779. }
  3780. if (options.compat) {
  3781. options.useDepths = true;
  3782. }
  3783. var compiled = undefined;
  3784. function compileInput() {
  3785. var ast = env.parse(input, options),
  3786. environment = new env.Compiler().compile(ast, options),
  3787. templateSpec = new env.JavaScriptCompiler().compile(environment, options, undefined, true);
  3788. return env.template(templateSpec);
  3789. }
  3790. // Template is only compiled on first use and cached after that point.
  3791. function ret(context, execOptions) {
  3792. if (!compiled) {
  3793. compiled = compileInput();
  3794. }
  3795. return compiled.call(this, context, execOptions);
  3796. }
  3797. ret._setup = function (setupOptions) {
  3798. if (!compiled) {
  3799. compiled = compileInput();
  3800. }
  3801. return compiled._setup(setupOptions);
  3802. };
  3803. ret._child = function (i, data, blockParams, depths) {
  3804. if (!compiled) {
  3805. compiled = compileInput();
  3806. }
  3807. return compiled._child(i, data, blockParams, depths);
  3808. };
  3809. return ret;
  3810. }
  3811. function argEquals(a, b) {
  3812. if (a === b) {
  3813. return true;
  3814. }
  3815. if (_utils.isArray(a) && _utils.isArray(b) && a.length === b.length) {
  3816. for (var i = 0; i < a.length; i++) {
  3817. if (!argEquals(a[i], b[i])) {
  3818. return false;
  3819. }
  3820. }
  3821. return true;
  3822. }
  3823. }
  3824. function transformLiteralToPath(sexpr) {
  3825. if (!sexpr.path.parts) {
  3826. var literal = sexpr.path;
  3827. // Casting to string here to make false and 0 literal values play nicely with the rest
  3828. // of the system.
  3829. sexpr.path = {
  3830. type: 'PathExpression',
  3831. data: false,
  3832. depth: 0,
  3833. parts: [literal.original + ''],
  3834. original: literal.original + '',
  3835. loc: literal.loc
  3836. };
  3837. }
  3838. }
  3839. /***/ }),
  3840. /* 91 */
  3841. /***/ (function(module, exports, __webpack_require__) {
  3842. 'use strict';
  3843. var _Object$keys = __webpack_require__(60)['default'];
  3844. var _interopRequireDefault = __webpack_require__(1)['default'];
  3845. exports.__esModule = true;
  3846. var _base = __webpack_require__(4);
  3847. var _exception = __webpack_require__(6);
  3848. var _exception2 = _interopRequireDefault(_exception);
  3849. var _utils = __webpack_require__(5);
  3850. var _codeGen = __webpack_require__(92);
  3851. var _codeGen2 = _interopRequireDefault(_codeGen);
  3852. function Literal(value) {
  3853. this.value = value;
  3854. }
  3855. function JavaScriptCompiler() {}
  3856. JavaScriptCompiler.prototype = {
  3857. // PUBLIC API: You can override these methods in a subclass to provide
  3858. // alternative compiled forms for name lookup and buffering semantics
  3859. nameLookup: function nameLookup(parent, name /*, type */) {
  3860. return this.internalNameLookup(parent, name);
  3861. },
  3862. depthedLookup: function depthedLookup(name) {
  3863. return [this.aliasable('container.lookup'), '(depths, ', JSON.stringify(name), ')'];
  3864. },
  3865. compilerInfo: function compilerInfo() {
  3866. var revision = _base.COMPILER_REVISION,
  3867. versions = _base.REVISION_CHANGES[revision];
  3868. return [revision, versions];
  3869. },
  3870. appendToBuffer: function appendToBuffer(source, location, explicit) {
  3871. // Force a source as this simplifies the merge logic.
  3872. if (!_utils.isArray(source)) {
  3873. source = [source];
  3874. }
  3875. source = this.source.wrap(source, location);
  3876. if (this.environment.isSimple) {
  3877. return ['return ', source, ';'];
  3878. } else if (explicit) {
  3879. // This is a case where the buffer operation occurs as a child of another
  3880. // construct, generally braces. We have to explicitly output these buffer
  3881. // operations to ensure that the emitted code goes in the correct location.
  3882. return ['buffer += ', source, ';'];
  3883. } else {
  3884. source.appendToBuffer = true;
  3885. return source;
  3886. }
  3887. },
  3888. initializeBuffer: function initializeBuffer() {
  3889. return this.quotedString('');
  3890. },
  3891. // END PUBLIC API
  3892. internalNameLookup: function internalNameLookup(parent, name) {
  3893. this.lookupPropertyFunctionIsUsed = true;
  3894. return ['lookupProperty(', parent, ',', JSON.stringify(name), ')'];
  3895. },
  3896. lookupPropertyFunctionIsUsed: false,
  3897. compile: function compile(environment, options, context, asObject) {
  3898. this.environment = environment;
  3899. this.options = options;
  3900. this.stringParams = this.options.stringParams;
  3901. this.trackIds = this.options.trackIds;
  3902. this.precompile = !asObject;
  3903. this.name = this.environment.name;
  3904. this.isChild = !!context;
  3905. this.context = context || {
  3906. decorators: [],
  3907. programs: [],
  3908. environments: []
  3909. };
  3910. this.preamble();
  3911. this.stackSlot = 0;
  3912. this.stackVars = [];
  3913. this.aliases = {};
  3914. this.registers = { list: [] };
  3915. this.hashes = [];
  3916. this.compileStack = [];
  3917. this.inlineStack = [];
  3918. this.blockParams = [];
  3919. this.compileChildren(environment, options);
  3920. this.useDepths = this.useDepths || environment.useDepths || environment.useDecorators || this.options.compat;
  3921. this.useBlockParams = this.useBlockParams || environment.useBlockParams;
  3922. var opcodes = environment.opcodes,
  3923. opcode = undefined,
  3924. firstLoc = undefined,
  3925. i = undefined,
  3926. l = undefined;
  3927. for (i = 0, l = opcodes.length; i < l; i++) {
  3928. opcode = opcodes[i];
  3929. this.source.currentLocation = opcode.loc;
  3930. firstLoc = firstLoc || opcode.loc;
  3931. this[opcode.opcode].apply(this, opcode.args);
  3932. }
  3933. // Flush any trailing content that might be pending.
  3934. this.source.currentLocation = firstLoc;
  3935. this.pushSource('');
  3936. /* istanbul ignore next */
  3937. if (this.stackSlot || this.inlineStack.length || this.compileStack.length) {
  3938. throw new _exception2['default']('Compile completed with content left on stack');
  3939. }
  3940. if (!this.decorators.isEmpty()) {
  3941. this.useDecorators = true;
  3942. this.decorators.prepend(['var decorators = container.decorators, ', this.lookupPropertyFunctionVarDeclaration(), ';\n']);
  3943. this.decorators.push('return fn;');
  3944. if (asObject) {
  3945. this.decorators = Function.apply(this, ['fn', 'props', 'container', 'depth0', 'data', 'blockParams', 'depths', this.decorators.merge()]);
  3946. } else {
  3947. this.decorators.prepend('function(fn, props, container, depth0, data, blockParams, depths) {\n');
  3948. this.decorators.push('}\n');
  3949. this.decorators = this.decorators.merge();
  3950. }
  3951. } else {
  3952. this.decorators = undefined;
  3953. }
  3954. var fn = this.createFunctionContext(asObject);
  3955. if (!this.isChild) {
  3956. var ret = {
  3957. compiler: this.compilerInfo(),
  3958. main: fn
  3959. };
  3960. if (this.decorators) {
  3961. ret.main_d = this.decorators; // eslint-disable-line camelcase
  3962. ret.useDecorators = true;
  3963. }
  3964. var _context = this.context;
  3965. var programs = _context.programs;
  3966. var decorators = _context.decorators;
  3967. for (i = 0, l = programs.length; i < l; i++) {
  3968. if (programs[i]) {
  3969. ret[i] = programs[i];
  3970. if (decorators[i]) {
  3971. ret[i + '_d'] = decorators[i];
  3972. ret.useDecorators = true;
  3973. }
  3974. }
  3975. }
  3976. if (this.environment.usePartial) {
  3977. ret.usePartial = true;
  3978. }
  3979. if (this.options.data) {
  3980. ret.useData = true;
  3981. }
  3982. if (this.useDepths) {
  3983. ret.useDepths = true;
  3984. }
  3985. if (this.useBlockParams) {
  3986. ret.useBlockParams = true;
  3987. }
  3988. if (this.options.compat) {
  3989. ret.compat = true;
  3990. }
  3991. if (!asObject) {
  3992. ret.compiler = JSON.stringify(ret.compiler);
  3993. this.source.currentLocation = { start: { line: 1, column: 0 } };
  3994. ret = this.objectLiteral(ret);
  3995. if (options.srcName) {
  3996. ret = ret.toStringWithSourceMap({ file: options.destName });
  3997. ret.map = ret.map && ret.map.toString();
  3998. } else {
  3999. ret = ret.toString();
  4000. }
  4001. } else {
  4002. ret.compilerOptions = this.options;
  4003. }
  4004. return ret;
  4005. } else {
  4006. return fn;
  4007. }
  4008. },
  4009. preamble: function preamble() {
  4010. // track the last context pushed into place to allow skipping the
  4011. // getContext opcode when it would be a noop
  4012. this.lastContext = 0;
  4013. this.source = new _codeGen2['default'](this.options.srcName);
  4014. this.decorators = new _codeGen2['default'](this.options.srcName);
  4015. },
  4016. createFunctionContext: function createFunctionContext(asObject) {
  4017. // istanbul ignore next
  4018. var _this = this;
  4019. var varDeclarations = '';
  4020. var locals = this.stackVars.concat(this.registers.list);
  4021. if (locals.length > 0) {
  4022. varDeclarations += ', ' + locals.join(', ');
  4023. }
  4024. // Generate minimizer alias mappings
  4025. //
  4026. // When using true SourceNodes, this will update all references to the given alias
  4027. // as the source nodes are reused in situ. For the non-source node compilation mode,
  4028. // aliases will not be used, but this case is already being run on the client and
  4029. // we aren't concern about minimizing the template size.
  4030. var aliasCount = 0;
  4031. _Object$keys(this.aliases).forEach(function (alias) {
  4032. var node = _this.aliases[alias];
  4033. if (node.children && node.referenceCount > 1) {
  4034. varDeclarations += ', alias' + ++aliasCount + '=' + alias;
  4035. node.children[0] = 'alias' + aliasCount;
  4036. }
  4037. });
  4038. if (this.lookupPropertyFunctionIsUsed) {
  4039. varDeclarations += ', ' + this.lookupPropertyFunctionVarDeclaration();
  4040. }
  4041. var params = ['container', 'depth0', 'helpers', 'partials', 'data'];
  4042. if (this.useBlockParams || this.useDepths) {
  4043. params.push('blockParams');
  4044. }
  4045. if (this.useDepths) {
  4046. params.push('depths');
  4047. }
  4048. // Perform a second pass over the output to merge content when possible
  4049. var source = this.mergeSource(varDeclarations);
  4050. if (asObject) {
  4051. params.push(source);
  4052. return Function.apply(this, params);
  4053. } else {
  4054. return this.source.wrap(['function(', params.join(','), ') {\n ', source, '}']);
  4055. }
  4056. },
  4057. mergeSource: function mergeSource(varDeclarations) {
  4058. var isSimple = this.environment.isSimple,
  4059. appendOnly = !this.forceBuffer,
  4060. appendFirst = undefined,
  4061. sourceSeen = undefined,
  4062. bufferStart = undefined,
  4063. bufferEnd = undefined;
  4064. this.source.each(function (line) {
  4065. if (line.appendToBuffer) {
  4066. if (bufferStart) {
  4067. line.prepend(' + ');
  4068. } else {
  4069. bufferStart = line;
  4070. }
  4071. bufferEnd = line;
  4072. } else {
  4073. if (bufferStart) {
  4074. if (!sourceSeen) {
  4075. appendFirst = true;
  4076. } else {
  4077. bufferStart.prepend('buffer += ');
  4078. }
  4079. bufferEnd.add(';');
  4080. bufferStart = bufferEnd = undefined;
  4081. }
  4082. sourceSeen = true;
  4083. if (!isSimple) {
  4084. appendOnly = false;
  4085. }
  4086. }
  4087. });
  4088. if (appendOnly) {
  4089. if (bufferStart) {
  4090. bufferStart.prepend('return ');
  4091. bufferEnd.add(';');
  4092. } else if (!sourceSeen) {
  4093. this.source.push('return "";');
  4094. }
  4095. } else {
  4096. varDeclarations += ', buffer = ' + (appendFirst ? '' : this.initializeBuffer());
  4097. if (bufferStart) {
  4098. bufferStart.prepend('return buffer + ');
  4099. bufferEnd.add(';');
  4100. } else {
  4101. this.source.push('return buffer;');
  4102. }
  4103. }
  4104. if (varDeclarations) {
  4105. this.source.prepend('var ' + varDeclarations.substring(2) + (appendFirst ? '' : ';\n'));
  4106. }
  4107. return this.source.merge();
  4108. },
  4109. lookupPropertyFunctionVarDeclaration: function lookupPropertyFunctionVarDeclaration() {
  4110. return '\n lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n }\n '.trim();
  4111. },
  4112. // [blockValue]
  4113. //
  4114. // On stack, before: hash, inverse, program, value
  4115. // On stack, after: return value of blockHelperMissing
  4116. //
  4117. // The purpose of this opcode is to take a block of the form
  4118. // `{{#this.foo}}...{{/this.foo}}`, resolve the value of `foo`, and
  4119. // replace it on the stack with the result of properly
  4120. // invoking blockHelperMissing.
  4121. blockValue: function blockValue(name) {
  4122. var blockHelperMissing = this.aliasable('container.hooks.blockHelperMissing'),
  4123. params = [this.contextName(0)];
  4124. this.setupHelperArgs(name, 0, params);
  4125. var blockName = this.popStack();
  4126. params.splice(1, 0, blockName);
  4127. this.push(this.source.functionCall(blockHelperMissing, 'call', params));
  4128. },
  4129. // [ambiguousBlockValue]
  4130. //
  4131. // On stack, before: hash, inverse, program, value
  4132. // Compiler value, before: lastHelper=value of last found helper, if any
  4133. // On stack, after, if no lastHelper: same as [blockValue]
  4134. // On stack, after, if lastHelper: value
  4135. ambiguousBlockValue: function ambiguousBlockValue() {
  4136. // We're being a bit cheeky and reusing the options value from the prior exec
  4137. var blockHelperMissing = this.aliasable('container.hooks.blockHelperMissing'),
  4138. params = [this.contextName(0)];
  4139. this.setupHelperArgs('', 0, params, true);
  4140. this.flushInline();
  4141. var current = this.topStack();
  4142. params.splice(1, 0, current);
  4143. this.pushSource(['if (!', this.lastHelper, ') { ', current, ' = ', this.source.functionCall(blockHelperMissing, 'call', params), '}']);
  4144. },
  4145. // [appendContent]
  4146. //
  4147. // On stack, before: ...
  4148. // On stack, after: ...
  4149. //
  4150. // Appends the string value of `content` to the current buffer
  4151. appendContent: function appendContent(content) {
  4152. if (this.pendingContent) {
  4153. content = this.pendingContent + content;
  4154. } else {
  4155. this.pendingLocation = this.source.currentLocation;
  4156. }
  4157. this.pendingContent = content;
  4158. },
  4159. // [append]
  4160. //
  4161. // On stack, before: value, ...
  4162. // On stack, after: ...
  4163. //
  4164. // Coerces `value` to a String and appends it to the current buffer.
  4165. //
  4166. // If `value` is truthy, or 0, it is coerced into a string and appended
  4167. // Otherwise, the empty string is appended
  4168. append: function append() {
  4169. if (this.isInline()) {
  4170. this.replaceStack(function (current) {
  4171. return [' != null ? ', current, ' : ""'];
  4172. });
  4173. this.pushSource(this.appendToBuffer(this.popStack()));
  4174. } else {
  4175. var local = this.popStack();
  4176. this.pushSource(['if (', local, ' != null) { ', this.appendToBuffer(local, undefined, true), ' }']);
  4177. if (this.environment.isSimple) {
  4178. this.pushSource(['else { ', this.appendToBuffer("''", undefined, true), ' }']);
  4179. }
  4180. }
  4181. },
  4182. // [appendEscaped]
  4183. //
  4184. // On stack, before: value, ...
  4185. // On stack, after: ...
  4186. //
  4187. // Escape `value` and append it to the buffer
  4188. appendEscaped: function appendEscaped() {
  4189. this.pushSource(this.appendToBuffer([this.aliasable('container.escapeExpression'), '(', this.popStack(), ')']));
  4190. },
  4191. // [getContext]
  4192. //
  4193. // On stack, before: ...
  4194. // On stack, after: ...
  4195. // Compiler value, after: lastContext=depth
  4196. //
  4197. // Set the value of the `lastContext` compiler value to the depth
  4198. getContext: function getContext(depth) {
  4199. this.lastContext = depth;
  4200. },
  4201. // [pushContext]
  4202. //
  4203. // On stack, before: ...
  4204. // On stack, after: currentContext, ...
  4205. //
  4206. // Pushes the value of the current context onto the stack.
  4207. pushContext: function pushContext() {
  4208. this.pushStackLiteral(this.contextName(this.lastContext));
  4209. },
  4210. // [lookupOnContext]
  4211. //
  4212. // On stack, before: ...
  4213. // On stack, after: currentContext[name], ...
  4214. //
  4215. // Looks up the value of `name` on the current context and pushes
  4216. // it onto the stack.
  4217. lookupOnContext: function lookupOnContext(parts, falsy, strict, scoped) {
  4218. var i = 0;
  4219. if (!scoped && this.options.compat && !this.lastContext) {
  4220. // The depthed query is expected to handle the undefined logic for the root level that
  4221. // is implemented below, so we evaluate that directly in compat mode
  4222. this.push(this.depthedLookup(parts[i++]));
  4223. } else {
  4224. this.pushContext();
  4225. }
  4226. this.resolvePath('context', parts, i, falsy, strict);
  4227. },
  4228. // [lookupBlockParam]
  4229. //
  4230. // On stack, before: ...
  4231. // On stack, after: blockParam[name], ...
  4232. //
  4233. // Looks up the value of `parts` on the given block param and pushes
  4234. // it onto the stack.
  4235. lookupBlockParam: function lookupBlockParam(blockParamId, parts) {
  4236. this.useBlockParams = true;
  4237. this.push(['blockParams[', blockParamId[0], '][', blockParamId[1], ']']);
  4238. this.resolvePath('context', parts, 1);
  4239. },
  4240. // [lookupData]
  4241. //
  4242. // On stack, before: ...
  4243. // On stack, after: data, ...
  4244. //
  4245. // Push the data lookup operator
  4246. lookupData: function lookupData(depth, parts, strict) {
  4247. if (!depth) {
  4248. this.pushStackLiteral('data');
  4249. } else {
  4250. this.pushStackLiteral('container.data(data, ' + depth + ')');
  4251. }
  4252. this.resolvePath('data', parts, 0, true, strict);
  4253. },
  4254. resolvePath: function resolvePath(type, parts, i, falsy, strict) {
  4255. // istanbul ignore next
  4256. var _this2 = this;
  4257. if (this.options.strict || this.options.assumeObjects) {
  4258. this.push(strictLookup(this.options.strict && strict, this, parts, i, type));
  4259. return;
  4260. }
  4261. var len = parts.length;
  4262. for (; i < len; i++) {
  4263. /* eslint-disable no-loop-func */
  4264. this.replaceStack(function (current) {
  4265. var lookup = _this2.nameLookup(current, parts[i], type);
  4266. // We want to ensure that zero and false are handled properly if the context (falsy flag)
  4267. // needs to have the special handling for these values.
  4268. if (!falsy) {
  4269. return [' != null ? ', lookup, ' : ', current];
  4270. } else {
  4271. // Otherwise we can use generic falsy handling
  4272. return [' && ', lookup];
  4273. }
  4274. });
  4275. /* eslint-enable no-loop-func */
  4276. }
  4277. },
  4278. // [resolvePossibleLambda]
  4279. //
  4280. // On stack, before: value, ...
  4281. // On stack, after: resolved value, ...
  4282. //
  4283. // If the `value` is a lambda, replace it on the stack by
  4284. // the return value of the lambda
  4285. resolvePossibleLambda: function resolvePossibleLambda() {
  4286. this.push([this.aliasable('container.lambda'), '(', this.popStack(), ', ', this.contextName(0), ')']);
  4287. },
  4288. // [pushStringParam]
  4289. //
  4290. // On stack, before: ...
  4291. // On stack, after: string, currentContext, ...
  4292. //
  4293. // This opcode is designed for use in string mode, which
  4294. // provides the string value of a parameter along with its
  4295. // depth rather than resolving it immediately.
  4296. pushStringParam: function pushStringParam(string, type) {
  4297. this.pushContext();
  4298. this.pushString(type);
  4299. // If it's a subexpression, the string result
  4300. // will be pushed after this opcode.
  4301. if (type !== 'SubExpression') {
  4302. if (typeof string === 'string') {
  4303. this.pushString(string);
  4304. } else {
  4305. this.pushStackLiteral(string);
  4306. }
  4307. }
  4308. },
  4309. emptyHash: function emptyHash(omitEmpty) {
  4310. if (this.trackIds) {
  4311. this.push('{}'); // hashIds
  4312. }
  4313. if (this.stringParams) {
  4314. this.push('{}'); // hashContexts
  4315. this.push('{}'); // hashTypes
  4316. }
  4317. this.pushStackLiteral(omitEmpty ? 'undefined' : '{}');
  4318. },
  4319. pushHash: function pushHash() {
  4320. if (this.hash) {
  4321. this.hashes.push(this.hash);
  4322. }
  4323. this.hash = { values: {}, types: [], contexts: [], ids: [] };
  4324. },
  4325. popHash: function popHash() {
  4326. var hash = this.hash;
  4327. this.hash = this.hashes.pop();
  4328. if (this.trackIds) {
  4329. this.push(this.objectLiteral(hash.ids));
  4330. }
  4331. if (this.stringParams) {
  4332. this.push(this.objectLiteral(hash.contexts));
  4333. this.push(this.objectLiteral(hash.types));
  4334. }
  4335. this.push(this.objectLiteral(hash.values));
  4336. },
  4337. // [pushString]
  4338. //
  4339. // On stack, before: ...
  4340. // On stack, after: quotedString(string), ...
  4341. //
  4342. // Push a quoted version of `string` onto the stack
  4343. pushString: function pushString(string) {
  4344. this.pushStackLiteral(this.quotedString(string));
  4345. },
  4346. // [pushLiteral]
  4347. //
  4348. // On stack, before: ...
  4349. // On stack, after: value, ...
  4350. //
  4351. // Pushes a value onto the stack. This operation prevents
  4352. // the compiler from creating a temporary variable to hold
  4353. // it.
  4354. pushLiteral: function pushLiteral(value) {
  4355. this.pushStackLiteral(value);
  4356. },
  4357. // [pushProgram]
  4358. //
  4359. // On stack, before: ...
  4360. // On stack, after: program(guid), ...
  4361. //
  4362. // Push a program expression onto the stack. This takes
  4363. // a compile-time guid and converts it into a runtime-accessible
  4364. // expression.
  4365. pushProgram: function pushProgram(guid) {
  4366. if (guid != null) {
  4367. this.pushStackLiteral(this.programExpression(guid));
  4368. } else {
  4369. this.pushStackLiteral(null);
  4370. }
  4371. },
  4372. // [registerDecorator]
  4373. //
  4374. // On stack, before: hash, program, params..., ...
  4375. // On stack, after: ...
  4376. //
  4377. // Pops off the decorator's parameters, invokes the decorator,
  4378. // and inserts the decorator into the decorators list.
  4379. registerDecorator: function registerDecorator(paramSize, name) {
  4380. var foundDecorator = this.nameLookup('decorators', name, 'decorator'),
  4381. options = this.setupHelperArgs(name, paramSize);
  4382. this.decorators.push(['fn = ', this.decorators.functionCall(foundDecorator, '', ['fn', 'props', 'container', options]), ' || fn;']);
  4383. },
  4384. // [invokeHelper]
  4385. //
  4386. // On stack, before: hash, inverse, program, params..., ...
  4387. // On stack, after: result of helper invocation
  4388. //
  4389. // Pops off the helper's parameters, invokes the helper,
  4390. // and pushes the helper's return value onto the stack.
  4391. //
  4392. // If the helper is not found, `helperMissing` is called.
  4393. invokeHelper: function invokeHelper(paramSize, name, isSimple) {
  4394. var nonHelper = this.popStack(),
  4395. helper = this.setupHelper(paramSize, name);
  4396. var possibleFunctionCalls = [];
  4397. if (isSimple) {
  4398. // direct call to helper
  4399. possibleFunctionCalls.push(helper.name);
  4400. }
  4401. // call a function from the input object
  4402. possibleFunctionCalls.push(nonHelper);
  4403. if (!this.options.strict) {
  4404. possibleFunctionCalls.push(this.aliasable('container.hooks.helperMissing'));
  4405. }
  4406. var functionLookupCode = ['(', this.itemsSeparatedBy(possibleFunctionCalls, '||'), ')'];
  4407. var functionCall = this.source.functionCall(functionLookupCode, 'call', helper.callParams);
  4408. this.push(functionCall);
  4409. },
  4410. itemsSeparatedBy: function itemsSeparatedBy(items, separator) {
  4411. var result = [];
  4412. result.push(items[0]);
  4413. for (var i = 1; i < items.length; i++) {
  4414. result.push(separator, items[i]);
  4415. }
  4416. return result;
  4417. },
  4418. // [invokeKnownHelper]
  4419. //
  4420. // On stack, before: hash, inverse, program, params..., ...
  4421. // On stack, after: result of helper invocation
  4422. //
  4423. // This operation is used when the helper is known to exist,
  4424. // so a `helperMissing` fallback is not required.
  4425. invokeKnownHelper: function invokeKnownHelper(paramSize, name) {
  4426. var helper = this.setupHelper(paramSize, name);
  4427. this.push(this.source.functionCall(helper.name, 'call', helper.callParams));
  4428. },
  4429. // [invokeAmbiguous]
  4430. //
  4431. // On stack, before: hash, inverse, program, params..., ...
  4432. // On stack, after: result of disambiguation
  4433. //
  4434. // This operation is used when an expression like `{{foo}}`
  4435. // is provided, but we don't know at compile-time whether it
  4436. // is a helper or a path.
  4437. //
  4438. // This operation emits more code than the other options,
  4439. // and can be avoided by passing the `knownHelpers` and
  4440. // `knownHelpersOnly` flags at compile-time.
  4441. invokeAmbiguous: function invokeAmbiguous(name, helperCall) {
  4442. this.useRegister('helper');
  4443. var nonHelper = this.popStack();
  4444. this.emptyHash();
  4445. var helper = this.setupHelper(0, name, helperCall);
  4446. var helperName = this.lastHelper = this.nameLookup('helpers', name, 'helper');
  4447. var lookup = ['(', '(helper = ', helperName, ' || ', nonHelper, ')'];
  4448. if (!this.options.strict) {
  4449. lookup[0] = '(helper = ';
  4450. lookup.push(' != null ? helper : ', this.aliasable('container.hooks.helperMissing'));
  4451. }
  4452. this.push(['(', lookup, helper.paramsInit ? ['),(', helper.paramsInit] : [], '),', '(typeof helper === ', this.aliasable('"function"'), ' ? ', this.source.functionCall('helper', 'call', helper.callParams), ' : helper))']);
  4453. },
  4454. // [invokePartial]
  4455. //
  4456. // On stack, before: context, ...
  4457. // On stack after: result of partial invocation
  4458. //
  4459. // This operation pops off a context, invokes a partial with that context,
  4460. // and pushes the result of the invocation back.
  4461. invokePartial: function invokePartial(isDynamic, name, indent) {
  4462. var params = [],
  4463. options = this.setupParams(name, 1, params);
  4464. if (isDynamic) {
  4465. name = this.popStack();
  4466. delete options.name;
  4467. }
  4468. if (indent) {
  4469. options.indent = JSON.stringify(indent);
  4470. }
  4471. options.helpers = 'helpers';
  4472. options.partials = 'partials';
  4473. options.decorators = 'container.decorators';
  4474. if (!isDynamic) {
  4475. params.unshift(this.nameLookup('partials', name, 'partial'));
  4476. } else {
  4477. params.unshift(name);
  4478. }
  4479. if (this.options.compat) {
  4480. options.depths = 'depths';
  4481. }
  4482. options = this.objectLiteral(options);
  4483. params.push(options);
  4484. this.push(this.source.functionCall('container.invokePartial', '', params));
  4485. },
  4486. // [assignToHash]
  4487. //
  4488. // On stack, before: value, ..., hash, ...
  4489. // On stack, after: ..., hash, ...
  4490. //
  4491. // Pops a value off the stack and assigns it to the current hash
  4492. assignToHash: function assignToHash(key) {
  4493. var value = this.popStack(),
  4494. context = undefined,
  4495. type = undefined,
  4496. id = undefined;
  4497. if (this.trackIds) {
  4498. id = this.popStack();
  4499. }
  4500. if (this.stringParams) {
  4501. type = this.popStack();
  4502. context = this.popStack();
  4503. }
  4504. var hash = this.hash;
  4505. if (context) {
  4506. hash.contexts[key] = context;
  4507. }
  4508. if (type) {
  4509. hash.types[key] = type;
  4510. }
  4511. if (id) {
  4512. hash.ids[key] = id;
  4513. }
  4514. hash.values[key] = value;
  4515. },
  4516. pushId: function pushId(type, name, child) {
  4517. if (type === 'BlockParam') {
  4518. this.pushStackLiteral('blockParams[' + name[0] + '].path[' + name[1] + ']' + (child ? ' + ' + JSON.stringify('.' + child) : ''));
  4519. } else if (type === 'PathExpression') {
  4520. this.pushString(name);
  4521. } else if (type === 'SubExpression') {
  4522. this.pushStackLiteral('true');
  4523. } else {
  4524. this.pushStackLiteral('null');
  4525. }
  4526. },
  4527. // HELPERS
  4528. compiler: JavaScriptCompiler,
  4529. compileChildren: function compileChildren(environment, options) {
  4530. var children = environment.children,
  4531. child = undefined,
  4532. compiler = undefined;
  4533. for (var i = 0, l = children.length; i < l; i++) {
  4534. child = children[i];
  4535. compiler = new this.compiler(); // eslint-disable-line new-cap
  4536. var existing = this.matchExistingProgram(child);
  4537. if (existing == null) {
  4538. this.context.programs.push(''); // Placeholder to prevent name conflicts for nested children
  4539. var index = this.context.programs.length;
  4540. child.index = index;
  4541. child.name = 'program' + index;
  4542. this.context.programs[index] = compiler.compile(child, options, this.context, !this.precompile);
  4543. this.context.decorators[index] = compiler.decorators;
  4544. this.context.environments[index] = child;
  4545. this.useDepths = this.useDepths || compiler.useDepths;
  4546. this.useBlockParams = this.useBlockParams || compiler.useBlockParams;
  4547. child.useDepths = this.useDepths;
  4548. child.useBlockParams = this.useBlockParams;
  4549. } else {
  4550. child.index = existing.index;
  4551. child.name = 'program' + existing.index;
  4552. this.useDepths = this.useDepths || existing.useDepths;
  4553. this.useBlockParams = this.useBlockParams || existing.useBlockParams;
  4554. }
  4555. }
  4556. },
  4557. matchExistingProgram: function matchExistingProgram(child) {
  4558. for (var i = 0, len = this.context.environments.length; i < len; i++) {
  4559. var environment = this.context.environments[i];
  4560. if (environment && environment.equals(child)) {
  4561. return environment;
  4562. }
  4563. }
  4564. },
  4565. programExpression: function programExpression(guid) {
  4566. var child = this.environment.children[guid],
  4567. programParams = [child.index, 'data', child.blockParams];
  4568. if (this.useBlockParams || this.useDepths) {
  4569. programParams.push('blockParams');
  4570. }
  4571. if (this.useDepths) {
  4572. programParams.push('depths');
  4573. }
  4574. return 'container.program(' + programParams.join(', ') + ')';
  4575. },
  4576. useRegister: function useRegister(name) {
  4577. if (!this.registers[name]) {
  4578. this.registers[name] = true;
  4579. this.registers.list.push(name);
  4580. }
  4581. },
  4582. push: function push(expr) {
  4583. if (!(expr instanceof Literal)) {
  4584. expr = this.source.wrap(expr);
  4585. }
  4586. this.inlineStack.push(expr);
  4587. return expr;
  4588. },
  4589. pushStackLiteral: function pushStackLiteral(item) {
  4590. this.push(new Literal(item));
  4591. },
  4592. pushSource: function pushSource(source) {
  4593. if (this.pendingContent) {
  4594. this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent), this.pendingLocation));
  4595. this.pendingContent = undefined;
  4596. }
  4597. if (source) {
  4598. this.source.push(source);
  4599. }
  4600. },
  4601. replaceStack: function replaceStack(callback) {
  4602. var prefix = ['('],
  4603. stack = undefined,
  4604. createdStack = undefined,
  4605. usedLiteral = undefined;
  4606. /* istanbul ignore next */
  4607. if (!this.isInline()) {
  4608. throw new _exception2['default']('replaceStack on non-inline');
  4609. }
  4610. // We want to merge the inline statement into the replacement statement via ','
  4611. var top = this.popStack(true);
  4612. if (top instanceof Literal) {
  4613. // Literals do not need to be inlined
  4614. stack = [top.value];
  4615. prefix = ['(', stack];
  4616. usedLiteral = true;
  4617. } else {
  4618. // Get or create the current stack name for use by the inline
  4619. createdStack = true;
  4620. var _name = this.incrStack();
  4621. prefix = ['((', this.push(_name), ' = ', top, ')'];
  4622. stack = this.topStack();
  4623. }
  4624. var item = callback.call(this, stack);
  4625. if (!usedLiteral) {
  4626. this.popStack();
  4627. }
  4628. if (createdStack) {
  4629. this.stackSlot--;
  4630. }
  4631. this.push(prefix.concat(item, ')'));
  4632. },
  4633. incrStack: function incrStack() {
  4634. this.stackSlot++;
  4635. if (this.stackSlot > this.stackVars.length) {
  4636. this.stackVars.push('stack' + this.stackSlot);
  4637. }
  4638. return this.topStackName();
  4639. },
  4640. topStackName: function topStackName() {
  4641. return 'stack' + this.stackSlot;
  4642. },
  4643. flushInline: function flushInline() {
  4644. var inlineStack = this.inlineStack;
  4645. this.inlineStack = [];
  4646. for (var i = 0, len = inlineStack.length; i < len; i++) {
  4647. var entry = inlineStack[i];
  4648. /* istanbul ignore if */
  4649. if (entry instanceof Literal) {
  4650. this.compileStack.push(entry);
  4651. } else {
  4652. var stack = this.incrStack();
  4653. this.pushSource([stack, ' = ', entry, ';']);
  4654. this.compileStack.push(stack);
  4655. }
  4656. }
  4657. },
  4658. isInline: function isInline() {
  4659. return this.inlineStack.length;
  4660. },
  4661. popStack: function popStack(wrapped) {
  4662. var inline = this.isInline(),
  4663. item = (inline ? this.inlineStack : this.compileStack).pop();
  4664. if (!wrapped && item instanceof Literal) {
  4665. return item.value;
  4666. } else {
  4667. if (!inline) {
  4668. /* istanbul ignore next */
  4669. if (!this.stackSlot) {
  4670. throw new _exception2['default']('Invalid stack pop');
  4671. }
  4672. this.stackSlot--;
  4673. }
  4674. return item;
  4675. }
  4676. },
  4677. topStack: function topStack() {
  4678. var stack = this.isInline() ? this.inlineStack : this.compileStack,
  4679. item = stack[stack.length - 1];
  4680. /* istanbul ignore if */
  4681. if (item instanceof Literal) {
  4682. return item.value;
  4683. } else {
  4684. return item;
  4685. }
  4686. },
  4687. contextName: function contextName(context) {
  4688. if (this.useDepths && context) {
  4689. return 'depths[' + context + ']';
  4690. } else {
  4691. return 'depth' + context;
  4692. }
  4693. },
  4694. quotedString: function quotedString(str) {
  4695. return this.source.quotedString(str);
  4696. },
  4697. objectLiteral: function objectLiteral(obj) {
  4698. return this.source.objectLiteral(obj);
  4699. },
  4700. aliasable: function aliasable(name) {
  4701. var ret = this.aliases[name];
  4702. if (ret) {
  4703. ret.referenceCount++;
  4704. return ret;
  4705. }
  4706. ret = this.aliases[name] = this.source.wrap(name);
  4707. ret.aliasable = true;
  4708. ret.referenceCount = 1;
  4709. return ret;
  4710. },
  4711. setupHelper: function setupHelper(paramSize, name, blockHelper) {
  4712. var params = [],
  4713. paramsInit = this.setupHelperArgs(name, paramSize, params, blockHelper);
  4714. var foundHelper = this.nameLookup('helpers', name, 'helper'),
  4715. callContext = this.aliasable(this.contextName(0) + ' != null ? ' + this.contextName(0) + ' : (container.nullContext || {})');
  4716. return {
  4717. params: params,
  4718. paramsInit: paramsInit,
  4719. name: foundHelper,
  4720. callParams: [callContext].concat(params)
  4721. };
  4722. },
  4723. setupParams: function setupParams(helper, paramSize, params) {
  4724. var options = {},
  4725. contexts = [],
  4726. types = [],
  4727. ids = [],
  4728. objectArgs = !params,
  4729. param = undefined;
  4730. if (objectArgs) {
  4731. params = [];
  4732. }
  4733. options.name = this.quotedString(helper);
  4734. options.hash = this.popStack();
  4735. if (this.trackIds) {
  4736. options.hashIds = this.popStack();
  4737. }
  4738. if (this.stringParams) {
  4739. options.hashTypes = this.popStack();
  4740. options.hashContexts = this.popStack();
  4741. }
  4742. var inverse = this.popStack(),
  4743. program = this.popStack();
  4744. // Avoid setting fn and inverse if neither are set. This allows
  4745. // helpers to do a check for `if (options.fn)`
  4746. if (program || inverse) {
  4747. options.fn = program || 'container.noop';
  4748. options.inverse = inverse || 'container.noop';
  4749. }
  4750. // The parameters go on to the stack in order (making sure that they are evaluated in order)
  4751. // so we need to pop them off the stack in reverse order
  4752. var i = paramSize;
  4753. while (i--) {
  4754. param = this.popStack();
  4755. params[i] = param;
  4756. if (this.trackIds) {
  4757. ids[i] = this.popStack();
  4758. }
  4759. if (this.stringParams) {
  4760. types[i] = this.popStack();
  4761. contexts[i] = this.popStack();
  4762. }
  4763. }
  4764. if (objectArgs) {
  4765. options.args = this.source.generateArray(params);
  4766. }
  4767. if (this.trackIds) {
  4768. options.ids = this.source.generateArray(ids);
  4769. }
  4770. if (this.stringParams) {
  4771. options.types = this.source.generateArray(types);
  4772. options.contexts = this.source.generateArray(contexts);
  4773. }
  4774. if (this.options.data) {
  4775. options.data = 'data';
  4776. }
  4777. if (this.useBlockParams) {
  4778. options.blockParams = 'blockParams';
  4779. }
  4780. return options;
  4781. },
  4782. setupHelperArgs: function setupHelperArgs(helper, paramSize, params, useRegister) {
  4783. var options = this.setupParams(helper, paramSize, params);
  4784. options.loc = JSON.stringify(this.source.currentLocation);
  4785. options = this.objectLiteral(options);
  4786. if (useRegister) {
  4787. this.useRegister('options');
  4788. params.push('options');
  4789. return ['options=', options];
  4790. } else if (params) {
  4791. params.push(options);
  4792. return '';
  4793. } else {
  4794. return options;
  4795. }
  4796. }
  4797. };
  4798. (function () {
  4799. var reservedWords = ('break else new var' + ' case finally return void' + ' catch for switch while' + ' continue function this with' + ' default if throw' + ' delete in try' + ' do instanceof typeof' + ' abstract enum int short' + ' boolean export interface static' + ' byte extends long super' + ' char final native synchronized' + ' class float package throws' + ' const goto private transient' + ' debugger implements protected volatile' + ' double import public let yield await' + ' null true false').split(' ');
  4800. var compilerWords = JavaScriptCompiler.RESERVED_WORDS = {};
  4801. for (var i = 0, l = reservedWords.length; i < l; i++) {
  4802. compilerWords[reservedWords[i]] = true;
  4803. }
  4804. })();
  4805. /**
  4806. * @deprecated May be removed in the next major version
  4807. */
  4808. JavaScriptCompiler.isValidJavaScriptVariableName = function (name) {
  4809. return !JavaScriptCompiler.RESERVED_WORDS[name] && /^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(name);
  4810. };
  4811. function strictLookup(requireTerminal, compiler, parts, i, type) {
  4812. var stack = compiler.popStack(),
  4813. len = parts.length;
  4814. if (requireTerminal) {
  4815. len--;
  4816. }
  4817. for (; i < len; i++) {
  4818. stack = compiler.nameLookup(stack, parts[i], type);
  4819. }
  4820. if (requireTerminal) {
  4821. return [compiler.aliasable('container.strict'), '(', stack, ', ', compiler.quotedString(parts[i]), ', ', JSON.stringify(compiler.source.currentLocation), ' )'];
  4822. } else {
  4823. return stack;
  4824. }
  4825. }
  4826. exports['default'] = JavaScriptCompiler;
  4827. module.exports = exports['default'];
  4828. /***/ }),
  4829. /* 92 */
  4830. /***/ (function(module, exports, __webpack_require__) {
  4831. /* global define, require */
  4832. 'use strict';
  4833. var _Object$keys = __webpack_require__(60)['default'];
  4834. exports.__esModule = true;
  4835. var _utils = __webpack_require__(5);
  4836. var SourceNode = undefined;
  4837. try {
  4838. /* istanbul ignore next */
  4839. if (false) {
  4840. // We don't support this in AMD environments. For these environments, we assume that
  4841. // they are running on the browser and thus have no need for the source-map library.
  4842. var SourceMap = require('source-map');
  4843. SourceNode = SourceMap.SourceNode;
  4844. }
  4845. } catch (err) {}
  4846. /* NOP */
  4847. /* istanbul ignore if: tested but not covered in istanbul due to dist build */
  4848. if (!SourceNode) {
  4849. SourceNode = function (line, column, srcFile, chunks) {
  4850. this.src = '';
  4851. if (chunks) {
  4852. this.add(chunks);
  4853. }
  4854. };
  4855. /* istanbul ignore next */
  4856. SourceNode.prototype = {
  4857. add: function add(chunks) {
  4858. if (_utils.isArray(chunks)) {
  4859. chunks = chunks.join('');
  4860. }
  4861. this.src += chunks;
  4862. },
  4863. prepend: function prepend(chunks) {
  4864. if (_utils.isArray(chunks)) {
  4865. chunks = chunks.join('');
  4866. }
  4867. this.src = chunks + this.src;
  4868. },
  4869. toStringWithSourceMap: function toStringWithSourceMap() {
  4870. return { code: this.toString() };
  4871. },
  4872. toString: function toString() {
  4873. return this.src;
  4874. }
  4875. };
  4876. }
  4877. function castChunk(chunk, codeGen, loc) {
  4878. if (_utils.isArray(chunk)) {
  4879. var ret = [];
  4880. for (var i = 0, len = chunk.length; i < len; i++) {
  4881. ret.push(codeGen.wrap(chunk[i], loc));
  4882. }
  4883. return ret;
  4884. } else if (typeof chunk === 'boolean' || typeof chunk === 'number') {
  4885. // Handle primitives that the SourceNode will throw up on
  4886. return chunk + '';
  4887. }
  4888. return chunk;
  4889. }
  4890. function CodeGen(srcFile) {
  4891. this.srcFile = srcFile;
  4892. this.source = [];
  4893. }
  4894. CodeGen.prototype = {
  4895. isEmpty: function isEmpty() {
  4896. return !this.source.length;
  4897. },
  4898. prepend: function prepend(source, loc) {
  4899. this.source.unshift(this.wrap(source, loc));
  4900. },
  4901. push: function push(source, loc) {
  4902. this.source.push(this.wrap(source, loc));
  4903. },
  4904. merge: function merge() {
  4905. var source = this.empty();
  4906. this.each(function (line) {
  4907. source.add([' ', line, '\n']);
  4908. });
  4909. return source;
  4910. },
  4911. each: function each(iter) {
  4912. for (var i = 0, len = this.source.length; i < len; i++) {
  4913. iter(this.source[i]);
  4914. }
  4915. },
  4916. empty: function empty() {
  4917. var loc = this.currentLocation || { start: {} };
  4918. return new SourceNode(loc.start.line, loc.start.column, this.srcFile);
  4919. },
  4920. wrap: function wrap(chunk) {
  4921. var loc = arguments.length <= 1 || arguments[1] === undefined ? this.currentLocation || { start: {} } : arguments[1];
  4922. if (chunk instanceof SourceNode) {
  4923. return chunk;
  4924. }
  4925. chunk = castChunk(chunk, this, loc);
  4926. return new SourceNode(loc.start.line, loc.start.column, this.srcFile, chunk);
  4927. },
  4928. functionCall: function functionCall(fn, type, params) {
  4929. params = this.generateList(params);
  4930. return this.wrap([fn, type ? '.' + type + '(' : '(', params, ')']);
  4931. },
  4932. quotedString: function quotedString(str) {
  4933. return '"' + (str + '').replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/\n/g, '\\n').replace(/\r/g, '\\r').replace(/\u2028/g, '\\u2028') // Per Ecma-262 7.3 + 7.8.4
  4934. .replace(/\u2029/g, '\\u2029') + '"';
  4935. },
  4936. objectLiteral: function objectLiteral(obj) {
  4937. // istanbul ignore next
  4938. var _this = this;
  4939. var pairs = [];
  4940. _Object$keys(obj).forEach(function (key) {
  4941. var value = castChunk(obj[key], _this);
  4942. if (value !== 'undefined') {
  4943. pairs.push([_this.quotedString(key), ':', value]);
  4944. }
  4945. });
  4946. var ret = this.generateList(pairs);
  4947. ret.prepend('{');
  4948. ret.add('}');
  4949. return ret;
  4950. },
  4951. generateList: function generateList(entries) {
  4952. var ret = this.empty();
  4953. for (var i = 0, len = entries.length; i < len; i++) {
  4954. if (i) {
  4955. ret.add(',');
  4956. }
  4957. ret.add(castChunk(entries[i], this));
  4958. }
  4959. return ret;
  4960. },
  4961. generateArray: function generateArray(entries) {
  4962. var ret = this.generateList(entries);
  4963. ret.prepend('[');
  4964. ret.add(']');
  4965. return ret;
  4966. }
  4967. };
  4968. exports['default'] = CodeGen;
  4969. module.exports = exports['default'];
  4970. /***/ })
  4971. /******/ ])
  4972. });
  4973. ;