12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625 |
- define('handlebars/utils',['exports'], function (exports) {
- 'use strict';
- exports.__esModule = true;
- exports.extend = extend;
- exports.indexOf = indexOf;
- exports.escapeExpression = escapeExpression;
- exports.isEmpty = isEmpty;
- exports.createFrame = createFrame;
- exports.blockParams = blockParams;
- exports.appendContextPath = appendContextPath;
- var escape = {
- '&': '&',
- '<': '<',
- '>': '>',
- '"': '"',
- "'": ''',
- '`': '`',
- '=': '='
- };
- var badChars = /[&<>"'`=]/g,
- possible = /[&<>"'`=]/;
- function escapeChar(chr) {
- return escape[chr];
- }
- function extend(obj ) {
- for (var i = 1; i < arguments.length; i++) {
- for (var key in arguments[i]) {
- if (Object.prototype.hasOwnProperty.call(arguments[i], key)) {
- obj[key] = arguments[i][key];
- }
- }
- }
- return obj;
- }
- var toString = Object.prototype.toString;
- exports.toString = toString;
-
-
-
- var isFunction = function isFunction(value) {
- return typeof value === 'function';
- };
-
-
- if (isFunction(/x/)) {
- exports.isFunction = isFunction = function (value) {
- return typeof value === 'function' && toString.call(value) === '[object Function]';
- };
- }
- exports.isFunction = isFunction;
-
-
- var isArray = Array.isArray || function (value) {
- return value && typeof value === 'object' ? toString.call(value) === '[object Array]' : false;
- };
- exports.isArray = isArray;
-
- function indexOf(array, value) {
- for (var i = 0, len = array.length; i < len; i++) {
- if (array[i] === value) {
- return i;
- }
- }
- return -1;
- }
- function escapeExpression(string) {
- if (typeof string !== 'string') {
-
- if (string && string.toHTML) {
- return string.toHTML();
- } else if (string == null) {
- return '';
- } else if (!string) {
- return string + '';
- }
-
-
-
- string = '' + string;
- }
- if (!possible.test(string)) {
- return string;
- }
- return string.replace(badChars, escapeChar);
- }
- function isEmpty(value) {
- if (!value && value !== 0) {
- return true;
- } else if (isArray(value) && value.length === 0) {
- return true;
- } else {
- return false;
- }
- }
- function createFrame(object) {
- var frame = extend({}, object);
- frame._parent = object;
- return frame;
- }
- function blockParams(params, ids) {
- params.path = ids;
- return params;
- }
- function appendContextPath(contextPath, id) {
- return (contextPath ? contextPath + '.' : '') + id;
- }
- });
- ;
- define('handlebars/exception',['exports', 'module'], function (exports, module) {
- 'use strict';
- var errorProps = ['description', 'fileName', 'lineNumber', 'endLineNumber', 'message', 'name', 'number', 'stack'];
- function Exception(message, node) {
- var loc = node && node.loc,
- line = undefined,
- endLineNumber = undefined,
- column = undefined,
- endColumn = undefined;
- if (loc) {
- line = loc.start.line;
- endLineNumber = loc.end.line;
- column = loc.start.column;
- endColumn = loc.end.column;
- message += ' - ' + line + ':' + column;
- }
- var tmp = Error.prototype.constructor.call(this, message);
-
- for (var idx = 0; idx < errorProps.length; idx++) {
- this[errorProps[idx]] = tmp[errorProps[idx]];
- }
-
- if (Error.captureStackTrace) {
- Error.captureStackTrace(this, Exception);
- }
- try {
- if (loc) {
- this.lineNumber = line;
- this.endLineNumber = endLineNumber;
-
-
- if (Object.defineProperty) {
- Object.defineProperty(this, 'column', {
- value: column,
- enumerable: true
- });
- Object.defineProperty(this, 'endColumn', {
- value: endColumn,
- enumerable: true
- });
- } else {
- this.column = column;
- this.endColumn = endColumn;
- }
- }
- } catch (nop) {
-
- }
- }
- Exception.prototype = new Error();
- module.exports = Exception;
- });
- ;
- define('handlebars/helpers/block-helper-missing',['exports', 'module', '../utils'], function (exports, module, _utils) {
- 'use strict';
- module.exports = function (instance) {
- instance.registerHelper('blockHelperMissing', function (context, options) {
- var inverse = options.inverse,
- fn = options.fn;
- if (context === true) {
- return fn(this);
- } else if (context === false || context == null) {
- return inverse(this);
- } else if (_utils.isArray(context)) {
- if (context.length > 0) {
- if (options.ids) {
- options.ids = [options.name];
- }
- return instance.helpers.each(context, options);
- } else {
- return inverse(this);
- }
- } else {
- if (options.data && options.ids) {
- var data = _utils.createFrame(options.data);
- data.contextPath = _utils.appendContextPath(options.data.contextPath, options.name);
- options = { data: data };
- }
- return fn(context, options);
- }
- });
- };
- });
- ;
- define('handlebars/helpers/each',['exports', 'module', '../utils', '../exception'], function (exports, module, _utils, _exception) {
- 'use strict';
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
- var _Exception = _interopRequireDefault(_exception);
- module.exports = function (instance) {
- instance.registerHelper('each', function (context, options) {
- if (!options) {
- throw new _Exception['default']('Must pass iterator to #each');
- }
- var fn = options.fn,
- inverse = options.inverse,
- i = 0,
- ret = '',
- data = undefined,
- contextPath = undefined;
- if (options.data && options.ids) {
- contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]) + '.';
- }
- if (_utils.isFunction(context)) {
- context = context.call(this);
- }
- if (options.data) {
- data = _utils.createFrame(options.data);
- }
- function execIteration(field, index, last) {
- if (data) {
- data.key = field;
- data.index = index;
- data.first = index === 0;
- data.last = !!last;
- if (contextPath) {
- data.contextPath = contextPath + field;
- }
- }
- ret = ret + fn(context[field], {
- data: data,
- blockParams: _utils.blockParams([context[field], field], [contextPath + field, null])
- });
- }
- if (context && typeof context === 'object') {
- if (_utils.isArray(context)) {
- for (var j = context.length; i < j; i++) {
- if (i in context) {
- execIteration(i, i, i === context.length - 1);
- }
- }
- } else if (global.Symbol && context[global.Symbol.iterator]) {
- var newContext = [];
- var iterator = context[global.Symbol.iterator]();
- for (var it = iterator.next(); !it.done; it = iterator.next()) {
- newContext.push(it.value);
- }
- context = newContext;
- for (var j = context.length; i < j; i++) {
- execIteration(i, i, i === context.length - 1);
- }
- } else {
- (function () {
- var priorKey = undefined;
- Object.keys(context).forEach(function (key) {
-
-
-
- if (priorKey !== undefined) {
- execIteration(priorKey, i - 1);
- }
- priorKey = key;
- i++;
- });
- if (priorKey !== undefined) {
- execIteration(priorKey, i - 1, true);
- }
- })();
- }
- }
- if (i === 0) {
- ret = inverse(this);
- }
- return ret;
- });
- };
- });
- ;
- define('handlebars/helpers/helper-missing',['exports', 'module', '../exception'], function (exports, module, _exception) {
- 'use strict';
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
- var _Exception = _interopRequireDefault(_exception);
- module.exports = function (instance) {
- instance.registerHelper('helperMissing', function () /* [args, ]options */{
- if (arguments.length === 1) {
-
- return undefined;
- } else {
-
- throw new _Exception['default']('Missing helper: "' + arguments[arguments.length - 1].name + '"');
- }
- });
- };
- });
- ;
- define('handlebars/helpers/if',['exports', 'module', '../utils', '../exception'], function (exports, module, _utils, _exception) {
- 'use strict';
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
- var _Exception = _interopRequireDefault(_exception);
- module.exports = function (instance) {
- instance.registerHelper('if', function (conditional, options) {
- if (arguments.length != 2) {
- throw new _Exception['default']('#if requires exactly one argument');
- }
- if (_utils.isFunction(conditional)) {
- conditional = conditional.call(this);
- }
-
-
-
- if (!options.hash.includeZero && !conditional || _utils.isEmpty(conditional)) {
- return options.inverse(this);
- } else {
- return options.fn(this);
- }
- });
- instance.registerHelper('unless', function (conditional, options) {
- if (arguments.length != 2) {
- throw new _Exception['default']('#unless requires exactly one argument');
- }
- return instance.helpers['if'].call(this, conditional, {
- fn: options.inverse,
- inverse: options.fn,
- hash: options.hash
- });
- });
- };
- });
- ;
- define('handlebars/helpers/log',['exports', 'module'], function (exports, module) {
- 'use strict';
- module.exports = function (instance) {
- instance.registerHelper('log', function () /* message, options */{
- var args = [undefined],
- options = arguments[arguments.length - 1];
- for (var i = 0; i < arguments.length - 1; i++) {
- args.push(arguments[i]);
- }
- var level = 1;
- if (options.hash.level != null) {
- level = options.hash.level;
- } else if (options.data && options.data.level != null) {
- level = options.data.level;
- }
- args[0] = level;
- instance.log.apply(instance, args);
- });
- };
- });
- ;
- define('handlebars/helpers/lookup',['exports', 'module'], function (exports, module) {
- 'use strict';
- module.exports = function (instance) {
- instance.registerHelper('lookup', function (obj, field, options) {
- if (!obj) {
-
- return obj;
- }
- return options.lookupProperty(obj, field);
- });
- };
- });
- ;
- define('handlebars/helpers/with',['exports', 'module', '../utils', '../exception'], function (exports, module, _utils, _exception) {
- 'use strict';
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
- var _Exception = _interopRequireDefault(_exception);
- module.exports = function (instance) {
- instance.registerHelper('with', function (context, options) {
- if (arguments.length != 2) {
- throw new _Exception['default']('#with requires exactly one argument');
- }
- if (_utils.isFunction(context)) {
- context = context.call(this);
- }
- var fn = options.fn;
- if (!_utils.isEmpty(context)) {
- var data = options.data;
- if (options.data && options.ids) {
- data = _utils.createFrame(options.data);
- data.contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]);
- }
- return fn(context, {
- data: data,
- blockParams: _utils.blockParams([context], [data && data.contextPath])
- });
- } else {
- return options.inverse(this);
- }
- });
- };
- });
- ;
- define('handlebars/helpers',['exports', './helpers/block-helper-missing', './helpers/each', './helpers/helper-missing', './helpers/if', './helpers/log', './helpers/lookup', './helpers/with'], function (exports, _helpersBlockHelperMissing, _helpersEach, _helpersHelperMissing, _helpersIf, _helpersLog, _helpersLookup, _helpersWith) {
- 'use strict';
- exports.__esModule = true;
- exports.registerDefaultHelpers = registerDefaultHelpers;
- exports.moveHelperToHooks = moveHelperToHooks;
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
- var _registerBlockHelperMissing = _interopRequireDefault(_helpersBlockHelperMissing);
- var _registerEach = _interopRequireDefault(_helpersEach);
- var _registerHelperMissing = _interopRequireDefault(_helpersHelperMissing);
- var _registerIf = _interopRequireDefault(_helpersIf);
- var _registerLog = _interopRequireDefault(_helpersLog);
- var _registerLookup = _interopRequireDefault(_helpersLookup);
- var _registerWith = _interopRequireDefault(_helpersWith);
- function registerDefaultHelpers(instance) {
- _registerBlockHelperMissing['default'](instance);
- _registerEach['default'](instance);
- _registerHelperMissing['default'](instance);
- _registerIf['default'](instance);
- _registerLog['default'](instance);
- _registerLookup['default'](instance);
- _registerWith['default'](instance);
- }
- function moveHelperToHooks(instance, helperName, keepHelper) {
- if (instance.helpers[helperName]) {
- instance.hooks[helperName] = instance.helpers[helperName];
- if (!keepHelper) {
- delete instance.helpers[helperName];
- }
- }
- }
- });
- ;
- define('handlebars/decorators/inline',['exports', 'module', '../utils'], function (exports, module, _utils) {
- 'use strict';
- module.exports = function (instance) {
- instance.registerDecorator('inline', function (fn, props, container, options) {
- var ret = fn;
- if (!props.partials) {
- props.partials = {};
- ret = function (context, options) {
-
- var original = container.partials;
- container.partials = _utils.extend({}, original, props.partials);
- var ret = fn(context, options);
- container.partials = original;
- return ret;
- };
- }
- props.partials[options.args[0]] = options.fn;
- return ret;
- });
- };
- });
- ;
- define('handlebars/decorators',['exports', './decorators/inline'], function (exports, _decoratorsInline) {
- 'use strict';
- exports.__esModule = true;
- exports.registerDefaultDecorators = registerDefaultDecorators;
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
- var _registerInline = _interopRequireDefault(_decoratorsInline);
- function registerDefaultDecorators(instance) {
- _registerInline['default'](instance);
- }
- });
- ;
- define('handlebars/logger',['exports', 'module', './utils'], function (exports, module, _utils) {
- 'use strict';
- var logger = {
- methodMap: ['debug', 'info', 'warn', 'error'],
- level: 'info',
-
- lookupLevel: function lookupLevel(level) {
- if (typeof level === 'string') {
- var levelMap = _utils.indexOf(logger.methodMap, level.toLowerCase());
- if (levelMap >= 0) {
- level = levelMap;
- } else {
- level = parseInt(level, 10);
- }
- }
- return level;
- },
-
- log: function log(level) {
- level = logger.lookupLevel(level);
- if (typeof console !== 'undefined' && logger.lookupLevel(logger.level) <= level) {
- var method = logger.methodMap[level];
-
- if (!console[method]) {
- method = 'log';
- }
- for (var _len = arguments.length, message = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
- message[_key - 1] = arguments[_key];
- }
- console[method].apply(console, message);
- }
- }
- };
- module.exports = logger;
- });
- ;
- define('handlebars/internal/create-new-lookup-object',['exports', '../utils'], function (exports, _utils) {
- 'use strict';
- exports.__esModule = true;
- exports.createNewLookupObject = createNewLookupObject;
-
- function createNewLookupObject() {
- for (var _len = arguments.length, sources = Array(_len), _key = 0; _key < _len; _key++) {
- sources[_key] = arguments[_key];
- }
- return _utils.extend.apply(undefined, [Object.create(null)].concat(sources));
- }
- });
- ;
- define('handlebars/internal/proto-access',['exports', './create-new-lookup-object', '../logger'], function (exports, _createNewLookupObject, _logger) {
- 'use strict';
- exports.__esModule = true;
- exports.createProtoAccessControl = createProtoAccessControl;
- exports.resultIsAllowed = resultIsAllowed;
- exports.resetLoggedProperties = resetLoggedProperties;
- var loggedProperties = Object.create(null);
- function createProtoAccessControl(runtimeOptions) {
- var defaultMethodWhiteList = Object.create(null);
- defaultMethodWhiteList['constructor'] = false;
- defaultMethodWhiteList['__defineGetter__'] = false;
- defaultMethodWhiteList['__defineSetter__'] = false;
- defaultMethodWhiteList['__lookupGetter__'] = false;
- var defaultPropertyWhiteList = Object.create(null);
-
- defaultPropertyWhiteList['__proto__'] = false;
- return {
- properties: {
- whitelist: _createNewLookupObject.createNewLookupObject(defaultPropertyWhiteList, runtimeOptions.allowedProtoProperties),
- defaultValue: runtimeOptions.allowProtoPropertiesByDefault
- },
- methods: {
- whitelist: _createNewLookupObject.createNewLookupObject(defaultMethodWhiteList, runtimeOptions.allowedProtoMethods),
- defaultValue: runtimeOptions.allowProtoMethodsByDefault
- }
- };
- }
- function resultIsAllowed(result, protoAccessControl, propertyName) {
- if (typeof result === 'function') {
- return checkWhiteList(protoAccessControl.methods, propertyName);
- } else {
- return checkWhiteList(protoAccessControl.properties, propertyName);
- }
- }
- function checkWhiteList(protoAccessControlForType, propertyName) {
- if (protoAccessControlForType.whitelist[propertyName] !== undefined) {
- return protoAccessControlForType.whitelist[propertyName] === true;
- }
- if (protoAccessControlForType.defaultValue !== undefined) {
- return protoAccessControlForType.defaultValue;
- }
- logUnexpecedPropertyAccessOnce(propertyName);
- return false;
- }
- function logUnexpecedPropertyAccessOnce(propertyName) {
- if (loggedProperties[propertyName] !== true) {
- loggedProperties[propertyName] = true;
- _logger.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');
- }
- }
- function resetLoggedProperties() {
- Object.keys(loggedProperties).forEach(function (propertyName) {
- delete loggedProperties[propertyName];
- });
- }
- });
- ;
- define('handlebars/base',['exports', './utils', './exception', './helpers', './decorators', './logger', './internal/proto-access'], function (exports, _utils, _exception, _helpers, _decorators, _logger, _internalProtoAccess) {
- 'use strict';
- exports.__esModule = true;
- exports.HandlebarsEnvironment = HandlebarsEnvironment;
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
- var _Exception = _interopRequireDefault(_exception);
- var _logger2 = _interopRequireDefault(_logger);
- var VERSION = '4.7.7';
- exports.VERSION = VERSION;
- var COMPILER_REVISION = 8;
- exports.COMPILER_REVISION = COMPILER_REVISION;
- var LAST_COMPATIBLE_COMPILER_REVISION = 7;
- exports.LAST_COMPATIBLE_COMPILER_REVISION = LAST_COMPATIBLE_COMPILER_REVISION;
- var REVISION_CHANGES = {
- 1: '<= 1.0.rc.2',
- 2: '== 1.0.0-rc.3',
- 3: '== 1.0.0-rc.4',
- 4: '== 1.x.x',
- 5: '== 2.0.0-alpha.x',
- 6: '>= 2.0.0-beta.1',
- 7: '>= 4.0.0 <4.3.0',
- 8: '>= 4.3.0'
- };
- exports.REVISION_CHANGES = REVISION_CHANGES;
- var objectType = '[object Object]';
- function HandlebarsEnvironment(helpers, partials, decorators) {
- this.helpers = helpers || {};
- this.partials = partials || {};
- this.decorators = decorators || {};
- _helpers.registerDefaultHelpers(this);
- _decorators.registerDefaultDecorators(this);
- }
- HandlebarsEnvironment.prototype = {
- constructor: HandlebarsEnvironment,
- logger: _logger2['default'],
- log: _logger2['default'].log,
- registerHelper: function registerHelper(name, fn) {
- if (_utils.toString.call(name) === objectType) {
- if (fn) {
- throw new _Exception['default']('Arg not supported with multiple helpers');
- }
- _utils.extend(this.helpers, name);
- } else {
- this.helpers[name] = fn;
- }
- },
- unregisterHelper: function unregisterHelper(name) {
- delete this.helpers[name];
- },
- registerPartial: function registerPartial(name, partial) {
- if (_utils.toString.call(name) === objectType) {
- _utils.extend(this.partials, name);
- } else {
- if (typeof partial === 'undefined') {
- throw new _Exception['default']('Attempting to register a partial called "' + name + '" as undefined');
- }
- this.partials[name] = partial;
- }
- },
- unregisterPartial: function unregisterPartial(name) {
- delete this.partials[name];
- },
- registerDecorator: function registerDecorator(name, fn) {
- if (_utils.toString.call(name) === objectType) {
- if (fn) {
- throw new _Exception['default']('Arg not supported with multiple decorators');
- }
- _utils.extend(this.decorators, name);
- } else {
- this.decorators[name] = fn;
- }
- },
- unregisterDecorator: function unregisterDecorator(name) {
- delete this.decorators[name];
- },
-
- resetLoggedPropertyAccesses: function resetLoggedPropertyAccesses() {
- _internalProtoAccess.resetLoggedProperties();
- }
- };
- var log = _logger2['default'].log;
- exports.log = log;
- exports.createFrame = _utils.createFrame;
- exports.logger = _logger2['default'];
- });
- ;
- define('handlebars/safe-string',['exports', 'module'], function (exports, module) {
-
- 'use strict';
- function SafeString(string) {
- this.string = string;
- }
- SafeString.prototype.toString = SafeString.prototype.toHTML = function () {
- return '' + this.string;
- };
- module.exports = SafeString;
- });
- ;
- define('handlebars/internal/wrapHelper',['exports'], function (exports) {
- 'use strict';
- exports.__esModule = true;
- exports.wrapHelper = wrapHelper;
- function wrapHelper(helper, transformOptionsFn) {
- if (typeof helper !== 'function') {
-
-
- return helper;
- }
- var wrapper = function wrapper() /* dynamic arguments */{
- var options = arguments[arguments.length - 1];
- arguments[arguments.length - 1] = transformOptionsFn(options);
- return helper.apply(this, arguments);
- };
- return wrapper;
- }
- });
- ;
- define('handlebars/runtime',['exports', './utils', './exception', './base', './helpers', './internal/wrapHelper', './internal/proto-access'], function (exports, _utils, _exception, _base, _helpers, _internalWrapHelper, _internalProtoAccess) {
- 'use strict';
- exports.__esModule = true;
- exports.checkRevision = checkRevision;
- exports.template = template;
- exports.wrapProgram = wrapProgram;
- exports.resolvePartial = resolvePartial;
- exports.invokePartial = invokePartial;
- exports.noop = noop;
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
- var _Exception = _interopRequireDefault(_exception);
- function checkRevision(compilerInfo) {
- var compilerRevision = compilerInfo && compilerInfo[0] || 1,
- currentRevision = _base.COMPILER_REVISION;
- if (compilerRevision >= _base.LAST_COMPATIBLE_COMPILER_REVISION && compilerRevision <= _base.COMPILER_REVISION) {
- return;
- }
- if (compilerRevision < _base.LAST_COMPATIBLE_COMPILER_REVISION) {
- var runtimeVersions = _base.REVISION_CHANGES[currentRevision],
- compilerVersions = _base.REVISION_CHANGES[compilerRevision];
- throw new _Exception['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 + ').');
- } else {
-
- throw new _Exception['default']('Template was precompiled with a newer version of Handlebars than the current runtime. ' + 'Please update your runtime to a newer version (' + compilerInfo[1] + ').');
- }
- }
- function template(templateSpec, env) {
-
- if (!env) {
- throw new _Exception['default']('No environment passed to template');
- }
- if (!templateSpec || !templateSpec.main) {
- throw new _Exception['default']('Unknown template object: ' + typeof templateSpec);
- }
- templateSpec.main.decorator = templateSpec.main_d;
-
-
- env.VM.checkRevision(templateSpec.compiler);
-
- var templateWasPrecompiledWithCompilerV7 = templateSpec.compiler && templateSpec.compiler[0] === 7;
- function invokePartialWrapper(partial, context, options) {
- if (options.hash) {
- context = _utils.extend({}, context, options.hash);
- if (options.ids) {
- options.ids[0] = true;
- }
- }
- partial = env.VM.resolvePartial.call(this, partial, context, options);
- var extendedOptions = _utils.extend({}, options, {
- hooks: this.hooks,
- protoAccessControl: this.protoAccessControl
- });
- var result = env.VM.invokePartial.call(this, partial, context, extendedOptions);
- if (result == null && env.compile) {
- options.partials[options.name] = env.compile(partial, templateSpec.compilerOptions, env);
- result = options.partials[options.name](context, extendedOptions);
- }
- if (result != null) {
- if (options.indent) {
- var lines = result.split('\n');
- for (var i = 0, l = lines.length; i < l; i++) {
- if (!lines[i] && i + 1 === l) {
- break;
- }
- lines[i] = options.indent + lines[i];
- }
- result = lines.join('\n');
- }
- return result;
- } else {
- throw new _Exception['default']('The partial ' + options.name + ' could not be compiled when running in runtime-only mode');
- }
- }
-
- var container = {
- strict: function strict(obj, name, loc) {
- if (!obj || !(name in obj)) {
- throw new _Exception['default']('"' + name + '" not defined in ' + obj, {
- loc: loc
- });
- }
- return container.lookupProperty(obj, name);
- },
- lookupProperty: function lookupProperty(parent, propertyName) {
- var result = parent[propertyName];
- if (result == null) {
- return result;
- }
- if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
- return result;
- }
- if (_internalProtoAccess.resultIsAllowed(result, container.protoAccessControl, propertyName)) {
- return result;
- }
- return undefined;
- },
- lookup: function lookup(depths, name) {
- var len = depths.length;
- for (var i = 0; i < len; i++) {
- var result = depths[i] && container.lookupProperty(depths[i], name);
- if (result != null) {
- return depths[i][name];
- }
- }
- },
- lambda: function lambda(current, context) {
- return typeof current === 'function' ? current.call(context) : current;
- },
- escapeExpression: _utils.escapeExpression,
- invokePartial: invokePartialWrapper,
- fn: function fn(i) {
- var ret = templateSpec[i];
- ret.decorator = templateSpec[i + '_d'];
- return ret;
- },
- programs: [],
- program: function program(i, data, declaredBlockParams, blockParams, depths) {
- var programWrapper = this.programs[i],
- fn = this.fn(i);
- if (data || depths || blockParams || declaredBlockParams) {
- programWrapper = wrapProgram(this, i, fn, data, declaredBlockParams, blockParams, depths);
- } else if (!programWrapper) {
- programWrapper = this.programs[i] = wrapProgram(this, i, fn);
- }
- return programWrapper;
- },
- data: function data(value, depth) {
- while (value && depth--) {
- value = value._parent;
- }
- return value;
- },
- mergeIfNeeded: function mergeIfNeeded(param, common) {
- var obj = param || common;
- if (param && common && param !== common) {
- obj = _utils.extend({}, common, param);
- }
- return obj;
- },
-
- nullContext: Object.seal({}),
- noop: env.VM.noop,
- compilerInfo: templateSpec.compiler
- };
- function ret(context) {
- var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
- var data = options.data;
- ret._setup(options);
- if (!options.partial && templateSpec.useData) {
- data = initData(context, data);
- }
- var depths = undefined,
- blockParams = templateSpec.useBlockParams ? [] : undefined;
- if (templateSpec.useDepths) {
- if (options.depths) {
- depths = context != options.depths[0] ? [context].concat(options.depths) : options.depths;
- } else {
- depths = [context];
- }
- }
- function main(context ) {
- return '' + templateSpec.main(container, context, container.helpers, container.partials, data, blockParams, depths);
- }
- main = executeDecorators(templateSpec.main, main, container, options.depths || [], data, blockParams);
- return main(context, options);
- }
- ret.isTop = true;
- ret._setup = function (options) {
- if (!options.partial) {
- var mergedHelpers = _utils.extend({}, env.helpers, options.helpers);
- wrapHelpersToPassLookupProperty(mergedHelpers, container);
- container.helpers = mergedHelpers;
- if (templateSpec.usePartial) {
-
- container.partials = container.mergeIfNeeded(options.partials, env.partials);
- }
- if (templateSpec.usePartial || templateSpec.useDecorators) {
- container.decorators = _utils.extend({}, env.decorators, options.decorators);
- }
- container.hooks = {};
- container.protoAccessControl = _internalProtoAccess.createProtoAccessControl(options);
- var keepHelperInHelpers = options.allowCallsToHelperMissing || templateWasPrecompiledWithCompilerV7;
- _helpers.moveHelperToHooks(container, 'helperMissing', keepHelperInHelpers);
- _helpers.moveHelperToHooks(container, 'blockHelperMissing', keepHelperInHelpers);
- } else {
- container.protoAccessControl = options.protoAccessControl;
- container.helpers = options.helpers;
- container.partials = options.partials;
- container.decorators = options.decorators;
- container.hooks = options.hooks;
- }
- };
- ret._child = function (i, data, blockParams, depths) {
- if (templateSpec.useBlockParams && !blockParams) {
- throw new _Exception['default']('must pass block params');
- }
- if (templateSpec.useDepths && !depths) {
- throw new _Exception['default']('must pass parent depths');
- }
- return wrapProgram(container, i, templateSpec[i], data, 0, blockParams, depths);
- };
- return ret;
- }
- function wrapProgram(container, i, fn, data, declaredBlockParams, blockParams, depths) {
- function prog(context) {
- var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
- var currentDepths = depths;
- if (depths && context != depths[0] && !(context === container.nullContext && depths[0] === null)) {
- currentDepths = [context].concat(depths);
- }
- return fn(container, context, container.helpers, container.partials, options.data || data, blockParams && [options.blockParams].concat(blockParams), currentDepths);
- }
- prog = executeDecorators(fn, prog, container, depths, data, blockParams);
- prog.program = i;
- prog.depth = depths ? depths.length : 0;
- prog.blockParams = declaredBlockParams || 0;
- return prog;
- }
-
- function resolvePartial(partial, context, options) {
- if (!partial) {
- if (options.name === '@partial-block') {
- partial = options.data['partial-block'];
- } else {
- partial = options.partials[options.name];
- }
- } else if (!partial.call && !options.name) {
-
- options.name = partial;
- partial = options.partials[partial];
- }
- return partial;
- }
- function invokePartial(partial, context, options) {
-
- var currentPartialBlock = options.data && options.data['partial-block'];
- options.partial = true;
- if (options.ids) {
- options.data.contextPath = options.ids[0] || options.data.contextPath;
- }
- var partialBlock = undefined;
- if (options.fn && options.fn !== noop) {
- (function () {
- options.data = _base.createFrame(options.data);
-
- var fn = options.fn;
- partialBlock = options.data['partial-block'] = function partialBlockWrapper(context) {
- var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
-
-
- options.data = _base.createFrame(options.data);
- options.data['partial-block'] = currentPartialBlock;
- return fn(context, options);
- };
- if (fn.partials) {
- options.partials = _utils.extend({}, options.partials, fn.partials);
- }
- })();
- }
- if (partial === undefined && partialBlock) {
- partial = partialBlock;
- }
- if (partial === undefined) {
- throw new _Exception['default']('The partial ' + options.name + ' could not be found');
- } else if (partial instanceof Function) {
- return partial(context, options);
- }
- }
- function noop() {
- return '';
- }
- function initData(context, data) {
- if (!data || !('root' in data)) {
- data = data ? _base.createFrame(data) : {};
- data.root = context;
- }
- return data;
- }
- function executeDecorators(fn, prog, container, depths, data, blockParams) {
- if (fn.decorator) {
- var props = {};
- prog = fn.decorator(prog, props, container, depths && depths[0], data, blockParams, depths);
- _utils.extend(prog, props);
- }
- return prog;
- }
- function wrapHelpersToPassLookupProperty(mergedHelpers, container) {
- Object.keys(mergedHelpers).forEach(function (helperName) {
- var helper = mergedHelpers[helperName];
- mergedHelpers[helperName] = passLookupPropertyOption(helper, container);
- });
- }
- function passLookupPropertyOption(helper, container) {
- var lookupProperty = container.lookupProperty;
- return _internalWrapHelper.wrapHelper(helper, function (options) {
- return _utils.extend({ lookupProperty: lookupProperty }, options);
- });
- }
- });
- ;
- define('handlebars/no-conflict',['exports', 'module'], function (exports, module) {
- 'use strict';
- module.exports = function (Handlebars) {
-
- var root = typeof global !== 'undefined' ? global : window,
- $Handlebars = root.Handlebars;
-
- Handlebars.noConflict = function () {
- if (root.Handlebars === Handlebars) {
- root.Handlebars = $Handlebars;
- }
- return Handlebars;
- };
- };
- });
- ;
- define('handlebars.runtime',['exports', 'module', './handlebars/base', './handlebars/safe-string', './handlebars/exception', './handlebars/utils', './handlebars/runtime', './handlebars/no-conflict'], function (exports, module, _handlebarsBase, _handlebarsSafeString, _handlebarsException, _handlebarsUtils, _handlebarsRuntime, _handlebarsNoConflict) {
- 'use strict';
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
-
-
- var _SafeString = _interopRequireDefault(_handlebarsSafeString);
- var _Exception = _interopRequireDefault(_handlebarsException);
- var _noConflict = _interopRequireDefault(_handlebarsNoConflict);
-
- function create() {
- var hb = new _handlebarsBase.HandlebarsEnvironment();
- _handlebarsUtils.extend(hb, _handlebarsBase);
- hb.SafeString = _SafeString['default'];
- hb.Exception = _Exception['default'];
- hb.Utils = _handlebarsUtils;
- hb.escapeExpression = _handlebarsUtils.escapeExpression;
- hb.VM = _handlebarsRuntime;
- hb.template = function (spec) {
- return _handlebarsRuntime.template(spec, hb);
- };
- return hb;
- }
- var inst = create();
- inst.create = create;
- _noConflict['default'](inst);
- inst['default'] = inst;
- module.exports = inst;
- });
- ;
- define('handlebars/compiler/ast',['exports', 'module'], function (exports, module) {
- 'use strict';
- var AST = {
-
- helpers: {
-
-
-
- helperExpression: function helperExpression(node) {
- return node.type === 'SubExpression' || (node.type === 'MustacheStatement' || node.type === 'BlockStatement') && !!(node.params && node.params.length || node.hash);
- },
- scopedId: function scopedId(path) {
- return (/^\.|this\b/.test(path.original)
- );
- },
-
-
- simpleId: function simpleId(path) {
- return path.parts.length === 1 && !AST.helpers.scopedId(path) && !path.depth;
- }
- }
- };
-
-
- module.exports = AST;
- });
- ;
- define('handlebars/compiler/parser',["exports", "module"], function (exports, module) {
-
-
- "use strict";
- var handlebars = (function () {
- var parser = { trace: function trace() {},
- yy: {},
- 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 },
- 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" },
- 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]],
- performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
- var $0 = $$.length - 1;
- switch (yystate) {
- case 1:
- return $$[$0 - 1];
- break;
- case 2:
- this.$ = yy.prepareProgram($$[$0]);
- break;
- case 3:
- this.$ = $$[$0];
- break;
- case 4:
- this.$ = $$[$0];
- break;
- case 5:
- this.$ = $$[$0];
- break;
- case 6:
- this.$ = $$[$0];
- break;
- case 7:
- this.$ = $$[$0];
- break;
- case 8:
- this.$ = $$[$0];
- break;
- case 9:
- this.$ = {
- type: 'CommentStatement',
- value: yy.stripComment($$[$0]),
- strip: yy.stripFlags($$[$0], $$[$0]),
- loc: yy.locInfo(this._$)
- };
- break;
- case 10:
- this.$ = {
- type: 'ContentStatement',
- original: $$[$0],
- value: $$[$0],
- loc: yy.locInfo(this._$)
- };
- break;
- case 11:
- this.$ = yy.prepareRawBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$);
- break;
- case 12:
- this.$ = { path: $$[$0 - 3], params: $$[$0 - 2], hash: $$[$0 - 1] };
- break;
- case 13:
- this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], false, this._$);
- break;
- case 14:
- this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], true, this._$);
- break;
- case 15:
- this.$ = { open: $$[$0 - 5], path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) };
- break;
- case 16:
- this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) };
- break;
- case 17:
- this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) };
- break;
- case 18:
- this.$ = { strip: yy.stripFlags($$[$0 - 1], $$[$0 - 1]), program: $$[$0] };
- break;
- case 19:
- var inverse = yy.prepareBlock($$[$0 - 2], $$[$0 - 1], $$[$0], $$[$0], false, this._$),
- program = yy.prepareProgram([inverse], $$[$0 - 1].loc);
- program.chained = true;
- this.$ = { strip: $$[$0 - 2].strip, program: program, chain: true };
- break;
- case 20:
- this.$ = $$[$0];
- break;
- case 21:
- this.$ = { path: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 2], $$[$0]) };
- break;
- case 22:
- this.$ = yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$);
- break;
- case 23:
- this.$ = yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$);
- break;
- case 24:
- this.$ = {
- type: 'PartialStatement',
- name: $$[$0 - 3],
- params: $$[$0 - 2],
- hash: $$[$0 - 1],
- indent: '',
- strip: yy.stripFlags($$[$0 - 4], $$[$0]),
- loc: yy.locInfo(this._$)
- };
- break;
- case 25:
- this.$ = yy.preparePartialBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$);
- break;
- case 26:
- this.$ = { path: $$[$0 - 3], params: $$[$0 - 2], hash: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 4], $$[$0]) };
- break;
- case 27:
- this.$ = $$[$0];
- break;
- case 28:
- this.$ = $$[$0];
- break;
- case 29:
- this.$ = {
- type: 'SubExpression',
- path: $$[$0 - 3],
- params: $$[$0 - 2],
- hash: $$[$0 - 1],
- loc: yy.locInfo(this._$)
- };
- break;
- case 30:
- this.$ = { type: 'Hash', pairs: $$[$0], loc: yy.locInfo(this._$) };
- break;
- case 31:
- this.$ = { type: 'HashPair', key: yy.id($$[$0 - 2]), value: $$[$0], loc: yy.locInfo(this._$) };
- break;
- case 32:
- this.$ = yy.id($$[$0 - 1]);
- break;
- case 33:
- this.$ = $$[$0];
- break;
- case 34:
- this.$ = $$[$0];
- break;
- case 35:
- this.$ = { type: 'StringLiteral', value: $$[$0], original: $$[$0], loc: yy.locInfo(this._$) };
- break;
- case 36:
- this.$ = { type: 'NumberLiteral', value: Number($$[$0]), original: Number($$[$0]), loc: yy.locInfo(this._$) };
- break;
- case 37:
- this.$ = { type: 'BooleanLiteral', value: $$[$0] === 'true', original: $$[$0] === 'true', loc: yy.locInfo(this._$) };
- break;
- case 38:
- this.$ = { type: 'UndefinedLiteral', original: undefined, value: undefined, loc: yy.locInfo(this._$) };
- break;
- case 39:
- this.$ = { type: 'NullLiteral', original: null, value: null, loc: yy.locInfo(this._$) };
- break;
- case 40:
- this.$ = $$[$0];
- break;
- case 41:
- this.$ = $$[$0];
- break;
- case 42:
- this.$ = yy.preparePath(true, $$[$0], this._$);
- break;
- case 43:
- this.$ = yy.preparePath(false, $$[$0], this._$);
- break;
- case 44:
- $$[$0 - 2].push({ part: yy.id($$[$0]), original: $$[$0], separator: $$[$0 - 1] });this.$ = $$[$0 - 2];
- break;
- case 45:
- this.$ = [{ part: yy.id($$[$0]), original: $$[$0] }];
- break;
- case 46:
- this.$ = [];
- break;
- case 47:
- $$[$0 - 1].push($$[$0]);
- break;
- case 48:
- this.$ = [];
- break;
- case 49:
- $$[$0 - 1].push($$[$0]);
- break;
- case 50:
- this.$ = [];
- break;
- case 51:
- $$[$0 - 1].push($$[$0]);
- break;
- case 58:
- this.$ = [];
- break;
- case 59:
- $$[$0 - 1].push($$[$0]);
- break;
- case 64:
- this.$ = [];
- break;
- case 65:
- $$[$0 - 1].push($$[$0]);
- break;
- case 70:
- this.$ = [];
- break;
- case 71:
- $$[$0 - 1].push($$[$0]);
- break;
- case 78:
- this.$ = [];
- break;
- case 79:
- $$[$0 - 1].push($$[$0]);
- break;
- case 82:
- this.$ = [];
- break;
- case 83:
- $$[$0 - 1].push($$[$0]);
- break;
- case 86:
- this.$ = [];
- break;
- case 87:
- $$[$0 - 1].push($$[$0]);
- break;
- case 90:
- this.$ = [];
- break;
- case 91:
- $$[$0 - 1].push($$[$0]);
- break;
- case 94:
- this.$ = [];
- break;
- case 95:
- $$[$0 - 1].push($$[$0]);
- break;
- case 98:
- this.$ = [$$[$0]];
- break;
- case 99:
- $$[$0 - 1].push($$[$0]);
- break;
- case 100:
- this.$ = [$$[$0]];
- break;
- case 101:
- $$[$0 - 1].push($$[$0]);
- break;
- }
- },
- 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] }],
- 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] },
- parseError: function parseError(str, hash) {
- throw new Error(str);
- },
- parse: function parse(input) {
- var self = this,
- stack = [0],
- vstack = [null],
- lstack = [],
- table = this.table,
- yytext = "",
- yylineno = 0,
- yyleng = 0,
- recovering = 0,
- TERROR = 2,
- EOF = 1;
- this.lexer.setInput(input);
- this.lexer.yy = this.yy;
- this.yy.lexer = this.lexer;
- this.yy.parser = this;
- if (typeof this.lexer.yylloc == "undefined") this.lexer.yylloc = {};
- var yyloc = this.lexer.yylloc;
- lstack.push(yyloc);
- var ranges = this.lexer.options && this.lexer.options.ranges;
- if (typeof this.yy.parseError === "function") this.parseError = this.yy.parseError;
- function popStack(n) {
- stack.length = stack.length - 2 * n;
- vstack.length = vstack.length - n;
- lstack.length = lstack.length - n;
- }
- function lex() {
- var token;
- token = self.lexer.lex() || 1;
- if (typeof token !== "number") {
- token = self.symbols_[token] || token;
- }
- return token;
- }
- var symbol,
- preErrorSymbol,
- state,
- action,
- a,
- r,
- yyval = {},
- p,
- len,
- newState,
- expected;
- while (true) {
- state = stack[stack.length - 1];
- if (this.defaultActions[state]) {
- action = this.defaultActions[state];
- } else {
- if (symbol === null || typeof symbol == "undefined") {
- symbol = lex();
- }
- action = table[state] && table[state][symbol];
- }
- if (typeof action === "undefined" || !action.length || !action[0]) {
- var errStr = "";
- if (!recovering) {
- expected = [];
- for (p in table[state]) if (this.terminals_[p] && p > 2) {
- expected.push("'" + this.terminals_[p] + "'");
- }
- if (this.lexer.showPosition) {
- errStr = "Parse error on line " + (yylineno + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
- } else {
- errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == 1 ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
- }
- this.parseError(errStr, { text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected });
- }
- }
- if (action[0] instanceof Array && action.length > 1) {
- throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
- }
- switch (action[0]) {
- case 1:
- stack.push(symbol);
- vstack.push(this.lexer.yytext);
- lstack.push(this.lexer.yylloc);
- stack.push(action[1]);
- symbol = null;
- if (!preErrorSymbol) {
- yyleng = this.lexer.yyleng;
- yytext = this.lexer.yytext;
- yylineno = this.lexer.yylineno;
- yyloc = this.lexer.yylloc;
- if (recovering > 0) recovering--;
- } else {
- symbol = preErrorSymbol;
- preErrorSymbol = null;
- }
- break;
- case 2:
- len = this.productions_[action[1]][1];
- yyval.$ = vstack[vstack.length - len];
- 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 };
- if (ranges) {
- yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];
- }
- r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack);
- if (typeof r !== "undefined") {
- return r;
- }
- if (len) {
- stack = stack.slice(0, -1 * len * 2);
- vstack = vstack.slice(0, -1 * len);
- lstack = lstack.slice(0, -1 * len);
- }
- stack.push(this.productions_[action[1]][0]);
- vstack.push(yyval.$);
- lstack.push(yyval._$);
- newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
- stack.push(newState);
- break;
- case 3:
- return true;
- }
- }
- return true;
- }
- };
-
- var lexer = (function () {
- var lexer = { EOF: 1,
- parseError: function parseError(str, hash) {
- if (this.yy.parser) {
- this.yy.parser.parseError(str, hash);
- } else {
- throw new Error(str);
- }
- },
- setInput: function setInput(input) {
- this._input = input;
- this._more = this._less = this.done = false;
- this.yylineno = this.yyleng = 0;
- this.yytext = this.matched = this.match = '';
- this.conditionStack = ['INITIAL'];
- this.yylloc = { first_line: 1, first_column: 0, last_line: 1, last_column: 0 };
- if (this.options.ranges) this.yylloc.range = [0, 0];
- this.offset = 0;
- return this;
- },
- input: function input() {
- var ch = this._input[0];
- this.yytext += ch;
- this.yyleng++;
- this.offset++;
- this.match += ch;
- this.matched += ch;
- var lines = ch.match(/(?:\r\n?|\n).*/g);
- if (lines) {
- this.yylineno++;
- this.yylloc.last_line++;
- } else {
- this.yylloc.last_column++;
- }
- if (this.options.ranges) this.yylloc.range[1]++;
- this._input = this._input.slice(1);
- return ch;
- },
- unput: function unput(ch) {
- var len = ch.length;
- var lines = ch.split(/(?:\r\n?|\n)/g);
- this._input = ch + this._input;
- this.yytext = this.yytext.substr(0, this.yytext.length - len - 1);
-
- this.offset -= len;
- var oldLines = this.match.split(/(?:\r\n?|\n)/g);
- this.match = this.match.substr(0, this.match.length - 1);
- this.matched = this.matched.substr(0, this.matched.length - 1);
- if (lines.length - 1) this.yylineno -= lines.length - 1;
- var r = this.yylloc.range;
- this.yylloc = { first_line: this.yylloc.first_line,
- last_line: this.yylineno + 1,
- first_column: this.yylloc.first_column,
- 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
- };
- if (this.options.ranges) {
- this.yylloc.range = [r[0], r[0] + this.yyleng - len];
- }
- return this;
- },
- more: function more() {
- this._more = true;
- return this;
- },
- less: function less(n) {
- this.unput(this.match.slice(n));
- },
- pastInput: function pastInput() {
- var past = this.matched.substr(0, this.matched.length - this.match.length);
- return (past.length > 20 ? '...' : '') + past.substr(-20).replace(/\n/g, "");
- },
- upcomingInput: function upcomingInput() {
- var next = this.match;
- if (next.length < 20) {
- next += this._input.substr(0, 20 - next.length);
- }
- return (next.substr(0, 20) + (next.length > 20 ? '...' : '')).replace(/\n/g, "");
- },
- showPosition: function showPosition() {
- var pre = this.pastInput();
- var c = new Array(pre.length + 1).join("-");
- return pre + this.upcomingInput() + "\n" + c + "^";
- },
- next: function next() {
- if (this.done) {
- return this.EOF;
- }
- if (!this._input) this.done = true;
- var token, match, tempMatch, index, col, lines;
- if (!this._more) {
- this.yytext = '';
- this.match = '';
- }
- var rules = this._currentRules();
- for (var i = 0; i < rules.length; i++) {
- tempMatch = this._input.match(this.rules[rules[i]]);
- if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
- match = tempMatch;
- index = i;
- if (!this.options.flex) break;
- }
- }
- if (match) {
- lines = match[0].match(/(?:\r\n?|\n).*/g);
- if (lines) this.yylineno += lines.length;
- this.yylloc = { first_line: this.yylloc.last_line,
- last_line: this.yylineno + 1,
- first_column: this.yylloc.last_column,
- last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length };
- this.yytext += match[0];
- this.match += match[0];
- this.matches = match;
- this.yyleng = this.yytext.length;
- if (this.options.ranges) {
- this.yylloc.range = [this.offset, this.offset += this.yyleng];
- }
- this._more = false;
- this._input = this._input.slice(match[0].length);
- this.matched += match[0];
- token = this.performAction.call(this, this.yy, this, rules[index], this.conditionStack[this.conditionStack.length - 1]);
- if (this.done && this._input) this.done = false;
- if (token) return token;else return;
- }
- if (this._input === "") {
- return this.EOF;
- } else {
- return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), { text: "", token: null, line: this.yylineno });
- }
- },
- lex: function lex() {
- var r = this.next();
- if (typeof r !== 'undefined') {
- return r;
- } else {
- return this.lex();
- }
- },
- begin: function begin(condition) {
- this.conditionStack.push(condition);
- },
- popState: function popState() {
- return this.conditionStack.pop();
- },
- _currentRules: function _currentRules() {
- return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
- },
- topState: function topState() {
- return this.conditionStack[this.conditionStack.length - 2];
- },
- pushState: function begin(condition) {
- this.begin(condition);
- } };
- lexer.options = {};
- lexer.performAction = function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
- function strip(start, end) {
- return yy_.yytext = yy_.yytext.substring(start, yy_.yyleng - end + start);
- }
- var YYSTATE = YY_START;
- switch ($avoiding_name_collisions) {
- case 0:
- if (yy_.yytext.slice(-2) === "\\\\") {
- strip(0, 1);
- this.begin("mu");
- } else if (yy_.yytext.slice(-1) === "\\") {
- strip(0, 1);
- this.begin("emu");
- } else {
- this.begin("mu");
- }
- if (yy_.yytext) return 15;
- break;
- case 1:
- return 15;
- break;
- case 2:
- this.popState();
- return 15;
- break;
- case 3:
- this.begin('raw');return 15;
- break;
- case 4:
- this.popState();
-
-
-
- if (this.conditionStack[this.conditionStack.length - 1] === 'raw') {
- return 15;
- } else {
- strip(5, 9);
- return 'END_RAW_BLOCK';
- }
- break;
- case 5:
- return 15;
- break;
- case 6:
- this.popState();
- return 14;
- break;
- case 7:
- return 65;
- break;
- case 8:
- return 68;
- break;
- case 9:
- return 19;
- break;
- case 10:
- this.popState();
- this.begin('raw');
- return 23;
- break;
- case 11:
- return 55;
- break;
- case 12:
- return 60;
- break;
- case 13:
- return 29;
- break;
- case 14:
- return 47;
- break;
- case 15:
- this.popState();return 44;
- break;
- case 16:
- this.popState();return 44;
- break;
- case 17:
- return 34;
- break;
- case 18:
- return 39;
- break;
- case 19:
- return 51;
- break;
- case 20:
- return 48;
- break;
- case 21:
- this.unput(yy_.yytext);
- this.popState();
- this.begin('com');
- break;
- case 22:
- this.popState();
- return 14;
- break;
- case 23:
- return 48;
- break;
- case 24:
- return 73;
- break;
- case 25:
- return 72;
- break;
- case 26:
- return 72;
- break;
- case 27:
- return 87;
- break;
- case 28:
-
- break;
- case 29:
- this.popState();return 54;
- break;
- case 30:
- this.popState();return 33;
- break;
- case 31:
- yy_.yytext = strip(1, 2).replace(/\\"/g, '"');return 80;
- break;
- case 32:
- yy_.yytext = strip(1, 2).replace(/\\'/g, "'");return 80;
- break;
- case 33:
- return 85;
- break;
- case 34:
- return 82;
- break;
- case 35:
- return 82;
- break;
- case 36:
- return 83;
- break;
- case 37:
- return 84;
- break;
- case 38:
- return 81;
- break;
- case 39:
- return 75;
- break;
- case 40:
- return 77;
- break;
- case 41:
- return 72;
- break;
- case 42:
- yy_.yytext = yy_.yytext.replace(/\\([\\\]])/g, '$1');return 72;
- break;
- case 43:
- return 'INVALID';
- break;
- case 44:
- return 5;
- break;
- }
- };
- 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\/.)|]))))/, /^(?:\[(\\\]|[^\]])*\])/, /^(?:.)/, /^(?:$)/];
- 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 } };
- return lexer;
- })();
- parser.lexer = lexer;
- function Parser() {
- this.yy = {};
- }Parser.prototype = parser;parser.Parser = Parser;
- return new Parser();
- })();module.exports = handlebars;
- });
- ;
- define('handlebars/compiler/visitor',['exports', 'module', '../exception'], function (exports, module, _exception) {
- 'use strict';
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
- var _Exception = _interopRequireDefault(_exception);
- function Visitor() {
- this.parents = [];
- }
- Visitor.prototype = {
- constructor: Visitor,
- mutating: false,
- // Visits a given value. If mutating, will replace the value if necessary.
- acceptKey: function acceptKey(node, name) {
- var value = this.accept(node[name]);
- if (this.mutating) {
-
-
- if (value && !Visitor.prototype[value.type]) {
- throw new _Exception['default']('Unexpected node type "' + value.type + '" found when accepting ' + name + ' on ' + node.type);
- }
- node[name] = value;
- }
- },
-
-
- acceptRequired: function acceptRequired(node, name) {
- this.acceptKey(node, name);
- if (!node[name]) {
- throw new _Exception['default'](node.type + ' requires ' + name);
- }
- },
-
-
- acceptArray: function acceptArray(array) {
- for (var i = 0, l = array.length; i < l; i++) {
- this.acceptKey(array, i);
- if (!array[i]) {
- array.splice(i, 1);
- i--;
- l--;
- }
- }
- },
- accept: function accept(object) {
- if (!object) {
- return;
- }
-
- if (!this[object.type]) {
- throw new _Exception['default']('Unknown type: ' + object.type, object);
- }
- if (this.current) {
- this.parents.unshift(this.current);
- }
- this.current = object;
- var ret = this[object.type](object);
- this.current = this.parents.shift();
- if (!this.mutating || ret) {
- return ret;
- } else if (ret !== false) {
- return object;
- }
- },
- Program: function Program(program) {
- this.acceptArray(program.body);
- },
- MustacheStatement: visitSubExpression,
- Decorator: visitSubExpression,
- BlockStatement: visitBlock,
- DecoratorBlock: visitBlock,
- PartialStatement: visitPartial,
- PartialBlockStatement: function PartialBlockStatement(partial) {
- visitPartial.call(this, partial);
- this.acceptKey(partial, 'program');
- },
- ContentStatement: function ContentStatement() /* content */{},
- CommentStatement: function CommentStatement() /* comment */{},
- SubExpression: visitSubExpression,
- PathExpression: function PathExpression() /* path */{},
- StringLiteral: function StringLiteral() /* string */{},
- NumberLiteral: function NumberLiteral() /* number */{},
- BooleanLiteral: function BooleanLiteral() /* bool */{},
- UndefinedLiteral: function UndefinedLiteral() /* literal */{},
- NullLiteral: function NullLiteral() /* literal */{},
- Hash: function Hash(hash) {
- this.acceptArray(hash.pairs);
- },
- HashPair: function HashPair(pair) {
- this.acceptRequired(pair, 'value');
- }
- };
- function visitSubExpression(mustache) {
- this.acceptRequired(mustache, 'path');
- this.acceptArray(mustache.params);
- this.acceptKey(mustache, 'hash');
- }
- function visitBlock(block) {
- visitSubExpression.call(this, block);
- this.acceptKey(block, 'program');
- this.acceptKey(block, 'inverse');
- }
- function visitPartial(partial) {
- this.acceptRequired(partial, 'name');
- this.acceptArray(partial.params);
- this.acceptKey(partial, 'hash');
- }
- module.exports = Visitor;
- });
- ;
- define('handlebars/compiler/whitespace-control',['exports', 'module', './visitor'], function (exports, module, _visitor) {
- 'use strict';
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
- var _Visitor = _interopRequireDefault(_visitor);
- function WhitespaceControl() {
- var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
- this.options = options;
- }
- WhitespaceControl.prototype = new _Visitor['default']();
- WhitespaceControl.prototype.Program = function (program) {
- var doStandalone = !this.options.ignoreStandalone;
- var isRoot = !this.isRootSeen;
- this.isRootSeen = true;
- var body = program.body;
- for (var i = 0, l = body.length; i < l; i++) {
- var current = body[i],
- strip = this.accept(current);
- if (!strip) {
- continue;
- }
- var _isPrevWhitespace = isPrevWhitespace(body, i, isRoot),
- _isNextWhitespace = isNextWhitespace(body, i, isRoot),
- openStandalone = strip.openStandalone && _isPrevWhitespace,
- closeStandalone = strip.closeStandalone && _isNextWhitespace,
- inlineStandalone = strip.inlineStandalone && _isPrevWhitespace && _isNextWhitespace;
- if (strip.close) {
- omitRight(body, i, true);
- }
- if (strip.open) {
- omitLeft(body, i, true);
- }
- if (doStandalone && inlineStandalone) {
- omitRight(body, i);
- if (omitLeft(body, i)) {
-
- if (current.type === 'PartialStatement') {
-
- current.indent = /([ \t]+$)/.exec(body[i - 1].original)[1];
- }
- }
- }
- if (doStandalone && openStandalone) {
- omitRight((current.program || current.inverse).body);
-
- omitLeft(body, i);
- }
- if (doStandalone && closeStandalone) {
-
- omitRight(body, i);
- omitLeft((current.inverse || current.program).body);
- }
- }
- return program;
- };
- WhitespaceControl.prototype.BlockStatement = WhitespaceControl.prototype.DecoratorBlock = WhitespaceControl.prototype.PartialBlockStatement = function (block) {
- this.accept(block.program);
- this.accept(block.inverse);
-
- var program = block.program || block.inverse,
- inverse = block.program && block.inverse,
- firstInverse = inverse,
- lastInverse = inverse;
- if (inverse && inverse.chained) {
- firstInverse = inverse.body[0].program;
-
- while (lastInverse.chained) {
- lastInverse = lastInverse.body[lastInverse.body.length - 1].program;
- }
- }
- var strip = {
- open: block.openStrip.open,
- close: block.closeStrip.close,
-
-
- openStandalone: isNextWhitespace(program.body),
- closeStandalone: isPrevWhitespace((firstInverse || program).body)
- };
- if (block.openStrip.close) {
- omitRight(program.body, null, true);
- }
- if (inverse) {
- var inverseStrip = block.inverseStrip;
- if (inverseStrip.open) {
- omitLeft(program.body, null, true);
- }
- if (inverseStrip.close) {
- omitRight(firstInverse.body, null, true);
- }
- if (block.closeStrip.open) {
- omitLeft(lastInverse.body, null, true);
- }
-
- if (!this.options.ignoreStandalone && isPrevWhitespace(program.body) && isNextWhitespace(firstInverse.body)) {
- omitLeft(program.body);
- omitRight(firstInverse.body);
- }
- } else if (block.closeStrip.open) {
- omitLeft(program.body, null, true);
- }
- return strip;
- };
- WhitespaceControl.prototype.Decorator = WhitespaceControl.prototype.MustacheStatement = function (mustache) {
- return mustache.strip;
- };
- WhitespaceControl.prototype.PartialStatement = WhitespaceControl.prototype.CommentStatement = function (node) {
-
- var strip = node.strip || {};
- return {
- inlineStandalone: true,
- open: strip.open,
- close: strip.close
- };
- };
- function isPrevWhitespace(body, i, isRoot) {
- if (i === undefined) {
- i = body.length;
- }
-
-
- var prev = body[i - 1],
- sibling = body[i - 2];
- if (!prev) {
- return isRoot;
- }
- if (prev.type === 'ContentStatement') {
- return (sibling || !isRoot ? /\r?\n\s*?$/ : /(^|\r?\n)\s*?$/).test(prev.original);
- }
- }
- function isNextWhitespace(body, i, isRoot) {
- if (i === undefined) {
- i = -1;
- }
- var next = body[i + 1],
- sibling = body[i + 2];
- if (!next) {
- return isRoot;
- }
- if (next.type === 'ContentStatement') {
- return (sibling || !isRoot ? /^\s*?\r?\n/ : /^\s*?(\r?\n|$)/).test(next.original);
- }
- }
-
-
-
-
-
-
-
- function omitRight(body, i, multiple) {
- var current = body[i == null ? 0 : i + 1];
- if (!current || current.type !== 'ContentStatement' || !multiple && current.rightStripped) {
- return;
- }
- var original = current.value;
- current.value = current.value.replace(multiple ? /^\s+/ : /^[ \t]*\r?\n?/, '');
- current.rightStripped = current.value !== original;
- }
-
-
-
-
-
-
-
- function omitLeft(body, i, multiple) {
- var current = body[i == null ? body.length - 1 : i - 1];
- if (!current || current.type !== 'ContentStatement' || !multiple && current.leftStripped) {
- return;
- }
-
- var original = current.value;
- current.value = current.value.replace(multiple ? /\s+$/ : /[ \t]+$/, '');
- current.leftStripped = current.value !== original;
- return current.leftStripped;
- }
- module.exports = WhitespaceControl;
- });
- ;
- define('handlebars/compiler/helpers',['exports', '../exception'], function (exports, _exception) {
- 'use strict';
- exports.__esModule = true;
- exports.SourceLocation = SourceLocation;
- exports.id = id;
- exports.stripFlags = stripFlags;
- exports.stripComment = stripComment;
- exports.preparePath = preparePath;
- exports.prepareMustache = prepareMustache;
- exports.prepareRawBlock = prepareRawBlock;
- exports.prepareBlock = prepareBlock;
- exports.prepareProgram = prepareProgram;
- exports.preparePartialBlock = preparePartialBlock;
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
- var _Exception = _interopRequireDefault(_exception);
- function validateClose(open, close) {
- close = close.path ? close.path.original : close;
- if (open.path.original !== close) {
- var errorNode = { loc: open.path.loc };
- throw new _Exception['default'](open.path.original + " doesn't match " + close, errorNode);
- }
- }
- function SourceLocation(source, locInfo) {
- this.source = source;
- this.start = {
- line: locInfo.first_line,
- column: locInfo.first_column
- };
- this.end = {
- line: locInfo.last_line,
- column: locInfo.last_column
- };
- }
- function id(token) {
- if (/^\[.*\]$/.test(token)) {
- return token.substring(1, token.length - 1);
- } else {
- return token;
- }
- }
- function stripFlags(open, close) {
- return {
- open: open.charAt(2) === '~',
- close: close.charAt(close.length - 3) === '~'
- };
- }
- function stripComment(comment) {
- return comment.replace(/^\{\{~?!-?-?/, '').replace(/-?-?~?\}\}$/, '');
- }
- function preparePath(data, parts, loc) {
- loc = this.locInfo(loc);
- var original = data ? '@' : '',
- dig = [],
- depth = 0;
- for (var i = 0, l = parts.length; i < l; i++) {
- var part = parts[i].part,
-
-
- isLiteral = parts[i].original !== part;
- original += (parts[i].separator || '') + part;
- if (!isLiteral && (part === '..' || part === '.' || part === 'this')) {
- if (dig.length > 0) {
- throw new _Exception['default']('Invalid path: ' + original, { loc: loc });
- } else if (part === '..') {
- depth++;
- }
- } else {
- dig.push(part);
- }
- }
- return {
- type: 'PathExpression',
- data: data,
- depth: depth,
- parts: dig,
- original: original,
- loc: loc
- };
- }
- function prepareMustache(path, params, hash, open, strip, locInfo) {
-
- var escapeFlag = open.charAt(3) || open.charAt(2),
- escaped = escapeFlag !== '{' && escapeFlag !== '&';
- var decorator = /\*/.test(open);
- return {
- type: decorator ? 'Decorator' : 'MustacheStatement',
- path: path,
- params: params,
- hash: hash,
- escaped: escaped,
- strip: strip,
- loc: this.locInfo(locInfo)
- };
- }
- function prepareRawBlock(openRawBlock, contents, close, locInfo) {
- validateClose(openRawBlock, close);
- locInfo = this.locInfo(locInfo);
- var program = {
- type: 'Program',
- body: contents,
- strip: {},
- loc: locInfo
- };
- return {
- type: 'BlockStatement',
- path: openRawBlock.path,
- params: openRawBlock.params,
- hash: openRawBlock.hash,
- program: program,
- openStrip: {},
- inverseStrip: {},
- closeStrip: {},
- loc: locInfo
- };
- }
- function prepareBlock(openBlock, program, inverseAndProgram, close, inverted, locInfo) {
- if (close && close.path) {
- validateClose(openBlock, close);
- }
- var decorator = /\*/.test(openBlock.open);
- program.blockParams = openBlock.blockParams;
- var inverse = undefined,
- inverseStrip = undefined;
- if (inverseAndProgram) {
- if (decorator) {
- throw new _Exception['default']('Unexpected inverse block on decorator', inverseAndProgram);
- }
- if (inverseAndProgram.chain) {
- inverseAndProgram.program.body[0].closeStrip = close.strip;
- }
- inverseStrip = inverseAndProgram.strip;
- inverse = inverseAndProgram.program;
- }
- if (inverted) {
- inverted = inverse;
- inverse = program;
- program = inverted;
- }
- return {
- type: decorator ? 'DecoratorBlock' : 'BlockStatement',
- path: openBlock.path,
- params: openBlock.params,
- hash: openBlock.hash,
- program: program,
- inverse: inverse,
- openStrip: openBlock.strip,
- inverseStrip: inverseStrip,
- closeStrip: close && close.strip,
- loc: this.locInfo(locInfo)
- };
- }
- function prepareProgram(statements, loc) {
- if (!loc && statements.length) {
- var firstLoc = statements[0].loc,
- lastLoc = statements[statements.length - 1].loc;
-
- if (firstLoc && lastLoc) {
- loc = {
- source: firstLoc.source,
- start: {
- line: firstLoc.start.line,
- column: firstLoc.start.column
- },
- end: {
- line: lastLoc.end.line,
- column: lastLoc.end.column
- }
- };
- }
- }
- return {
- type: 'Program',
- body: statements,
- strip: {},
- loc: loc
- };
- }
- function preparePartialBlock(open, program, close, locInfo) {
- validateClose(open, close);
- return {
- type: 'PartialBlockStatement',
- name: open.path,
- params: open.params,
- hash: open.hash,
- program: program,
- openStrip: open.strip,
- closeStrip: close && close.strip,
- loc: this.locInfo(locInfo)
- };
- }
- });
- ;
- define('handlebars/compiler/base',['exports', './parser', './whitespace-control', './helpers', '../utils'], function (exports, _parser, _whitespaceControl, _helpers, _utils) {
- 'use strict';
- exports.__esModule = true;
- exports.parseWithoutProcessing = parseWithoutProcessing;
- exports.parse = parse;
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
- var _parser2 = _interopRequireDefault(_parser);
- var _WhitespaceControl = _interopRequireDefault(_whitespaceControl);
- exports.parser = _parser2['default'];
- var yy = {};
- _utils.extend(yy, _helpers);
- function parseWithoutProcessing(input, options) {
-
- if (input.type === 'Program') {
- return input;
- }
- _parser2['default'].yy = yy;
-
- yy.locInfo = function (locInfo) {
- return new yy.SourceLocation(options && options.srcName, locInfo);
- };
- var ast = _parser2['default'].parse(input);
- return ast;
- }
- function parse(input, options) {
- var ast = parseWithoutProcessing(input, options);
- var strip = new _WhitespaceControl['default'](options);
- return strip.accept(ast);
- }
- });
- ;
- define('handlebars/compiler/compiler',['exports', '../exception', '../utils', './ast'], function (exports, _exception, _utils, _ast) {
-
- 'use strict';
- exports.__esModule = true;
- exports.Compiler = Compiler;
- exports.precompile = precompile;
- exports.compile = compile;
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
- var _Exception = _interopRequireDefault(_exception);
- var _AST = _interopRequireDefault(_ast);
- var slice = [].slice;
- function Compiler() {}
-
-
-
-
- Compiler.prototype = {
- compiler: Compiler,
- equals: function equals(other) {
- var len = this.opcodes.length;
- if (other.opcodes.length !== len) {
- return false;
- }
- for (var i = 0; i < len; i++) {
- var opcode = this.opcodes[i],
- otherOpcode = other.opcodes[i];
- if (opcode.opcode !== otherOpcode.opcode || !argEquals(opcode.args, otherOpcode.args)) {
- return false;
- }
- }
-
-
- len = this.children.length;
- for (var i = 0; i < len; i++) {
- if (!this.children[i].equals(other.children[i])) {
- return false;
- }
- }
- return true;
- },
- guid: 0,
- compile: function compile(program, options) {
- this.sourceNode = [];
- this.opcodes = [];
- this.children = [];
- this.options = options;
- this.stringParams = options.stringParams;
- this.trackIds = options.trackIds;
- options.blockParams = options.blockParams || [];
- options.knownHelpers = _utils.extend(Object.create(null), {
- helperMissing: true,
- blockHelperMissing: true,
- each: true,
- 'if': true,
- unless: true,
- 'with': true,
- log: true,
- lookup: true
- }, options.knownHelpers);
- return this.accept(program);
- },
- compileProgram: function compileProgram(program) {
- var childCompiler = new this.compiler(),
-
- result = childCompiler.compile(program, this.options),
- guid = this.guid++;
- this.usePartial = this.usePartial || result.usePartial;
- this.children[guid] = result;
- this.useDepths = this.useDepths || result.useDepths;
- return guid;
- },
- accept: function accept(node) {
-
- if (!this[node.type]) {
- throw new _Exception['default']('Unknown type: ' + node.type, node);
- }
- this.sourceNode.unshift(node);
- var ret = this[node.type](node);
- this.sourceNode.shift();
- return ret;
- },
- Program: function Program(program) {
- this.options.blockParams.unshift(program.blockParams);
- var body = program.body,
- bodyLength = body.length;
- for (var i = 0; i < bodyLength; i++) {
- this.accept(body[i]);
- }
- this.options.blockParams.shift();
- this.isSimple = bodyLength === 1;
- this.blockParams = program.blockParams ? program.blockParams.length : 0;
- return this;
- },
- BlockStatement: function BlockStatement(block) {
- transformLiteralToPath(block);
- var program = block.program,
- inverse = block.inverse;
- program = program && this.compileProgram(program);
- inverse = inverse && this.compileProgram(inverse);
- var type = this.classifySexpr(block);
- if (type === 'helper') {
- this.helperSexpr(block, program, inverse);
- } else if (type === 'simple') {
- this.simpleSexpr(block);
-
-
- this.opcode('pushProgram', program);
- this.opcode('pushProgram', inverse);
- this.opcode('emptyHash');
- this.opcode('blockValue', block.path.original);
- } else {
- this.ambiguousSexpr(block, program, inverse);
-
-
- this.opcode('pushProgram', program);
- this.opcode('pushProgram', inverse);
- this.opcode('emptyHash');
- this.opcode('ambiguousBlockValue');
- }
- this.opcode('append');
- },
- DecoratorBlock: function DecoratorBlock(decorator) {
- var program = decorator.program && this.compileProgram(decorator.program);
- var params = this.setupFullMustacheParams(decorator, program, undefined),
- path = decorator.path;
- this.useDecorators = true;
- this.opcode('registerDecorator', params.length, path.original);
- },
- PartialStatement: function PartialStatement(partial) {
- this.usePartial = true;
- var program = partial.program;
- if (program) {
- program = this.compileProgram(partial.program);
- }
- var params = partial.params;
- if (params.length > 1) {
- throw new _Exception['default']('Unsupported number of partial arguments: ' + params.length, partial);
- } else if (!params.length) {
- if (this.options.explicitPartialContext) {
- this.opcode('pushLiteral', 'undefined');
- } else {
- params.push({ type: 'PathExpression', parts: [], depth: 0 });
- }
- }
- var partialName = partial.name.original,
- isDynamic = partial.name.type === 'SubExpression';
- if (isDynamic) {
- this.accept(partial.name);
- }
- this.setupFullMustacheParams(partial, program, undefined, true);
- var indent = partial.indent || '';
- if (this.options.preventIndent && indent) {
- this.opcode('appendContent', indent);
- indent = '';
- }
- this.opcode('invokePartial', isDynamic, partialName, indent);
- this.opcode('append');
- },
- PartialBlockStatement: function PartialBlockStatement(partialBlock) {
- this.PartialStatement(partialBlock);
- },
- MustacheStatement: function MustacheStatement(mustache) {
- this.SubExpression(mustache);
- if (mustache.escaped && !this.options.noEscape) {
- this.opcode('appendEscaped');
- } else {
- this.opcode('append');
- }
- },
- Decorator: function Decorator(decorator) {
- this.DecoratorBlock(decorator);
- },
- ContentStatement: function ContentStatement(content) {
- if (content.value) {
- this.opcode('appendContent', content.value);
- }
- },
- CommentStatement: function CommentStatement() {},
- SubExpression: function SubExpression(sexpr) {
- transformLiteralToPath(sexpr);
- var type = this.classifySexpr(sexpr);
- if (type === 'simple') {
- this.simpleSexpr(sexpr);
- } else if (type === 'helper') {
- this.helperSexpr(sexpr);
- } else {
- this.ambiguousSexpr(sexpr);
- }
- },
- ambiguousSexpr: function ambiguousSexpr(sexpr, program, inverse) {
- var path = sexpr.path,
- name = path.parts[0],
- isBlock = program != null || inverse != null;
- this.opcode('getContext', path.depth);
- this.opcode('pushProgram', program);
- this.opcode('pushProgram', inverse);
- path.strict = true;
- this.accept(path);
- this.opcode('invokeAmbiguous', name, isBlock);
- },
- simpleSexpr: function simpleSexpr(sexpr) {
- var path = sexpr.path;
- path.strict = true;
- this.accept(path);
- this.opcode('resolvePossibleLambda');
- },
- helperSexpr: function helperSexpr(sexpr, program, inverse) {
- var params = this.setupFullMustacheParams(sexpr, program, inverse),
- path = sexpr.path,
- name = path.parts[0];
- if (this.options.knownHelpers[name]) {
- this.opcode('invokeKnownHelper', params.length, name);
- } else if (this.options.knownHelpersOnly) {
- throw new _Exception['default']('You specified knownHelpersOnly, but used the unknown helper ' + name, sexpr);
- } else {
- path.strict = true;
- path.falsy = true;
- this.accept(path);
- this.opcode('invokeHelper', params.length, path.original, _AST['default'].helpers.simpleId(path));
- }
- },
- PathExpression: function PathExpression(path) {
- this.addDepth(path.depth);
- this.opcode('getContext', path.depth);
- var name = path.parts[0],
- scoped = _AST['default'].helpers.scopedId(path),
- blockParamId = !path.depth && !scoped && this.blockParamIndex(name);
- if (blockParamId) {
- this.opcode('lookupBlockParam', blockParamId, path.parts);
- } else if (!name) {
-
- this.opcode('pushContext');
- } else if (path.data) {
- this.options.data = true;
- this.opcode('lookupData', path.depth, path.parts, path.strict);
- } else {
- this.opcode('lookupOnContext', path.parts, path.falsy, path.strict, scoped);
- }
- },
- StringLiteral: function StringLiteral(string) {
- this.opcode('pushString', string.value);
- },
- NumberLiteral: function NumberLiteral(number) {
- this.opcode('pushLiteral', number.value);
- },
- BooleanLiteral: function BooleanLiteral(bool) {
- this.opcode('pushLiteral', bool.value);
- },
- UndefinedLiteral: function UndefinedLiteral() {
- this.opcode('pushLiteral', 'undefined');
- },
- NullLiteral: function NullLiteral() {
- this.opcode('pushLiteral', 'null');
- },
- Hash: function Hash(hash) {
- var pairs = hash.pairs,
- i = 0,
- l = pairs.length;
- this.opcode('pushHash');
- for (; i < l; i++) {
- this.pushParam(pairs[i].value);
- }
- while (i--) {
- this.opcode('assignToHash', pairs[i].key);
- }
- this.opcode('popHash');
- },
-
- opcode: function opcode(name) {
- this.opcodes.push({
- opcode: name,
- args: slice.call(arguments, 1),
- loc: this.sourceNode[0].loc
- });
- },
- addDepth: function addDepth(depth) {
- if (!depth) {
- return;
- }
- this.useDepths = true;
- },
- classifySexpr: function classifySexpr(sexpr) {
- var isSimple = _AST['default'].helpers.simpleId(sexpr.path);
- var isBlockParam = isSimple && !!this.blockParamIndex(sexpr.path.parts[0]);
-
-
- var isHelper = !isBlockParam && _AST['default'].helpers.helperExpression(sexpr);
-
-
-
- var isEligible = !isBlockParam && (isHelper || isSimple);
-
-
- if (isEligible && !isHelper) {
- var _name = sexpr.path.parts[0],
- options = this.options;
- if (options.knownHelpers[_name]) {
- isHelper = true;
- } else if (options.knownHelpersOnly) {
- isEligible = false;
- }
- }
- if (isHelper) {
- return 'helper';
- } else if (isEligible) {
- return 'ambiguous';
- } else {
- return 'simple';
- }
- },
- pushParams: function pushParams(params) {
- for (var i = 0, l = params.length; i < l; i++) {
- this.pushParam(params[i]);
- }
- },
- pushParam: function pushParam(val) {
- var value = val.value != null ? val.value : val.original || '';
- if (this.stringParams) {
- if (value.replace) {
- value = value.replace(/^(\.?\.\/)*/g, '').replace(/\//g, '.');
- }
- if (val.depth) {
- this.addDepth(val.depth);
- }
- this.opcode('getContext', val.depth || 0);
- this.opcode('pushStringParam', value, val.type);
- if (val.type === 'SubExpression') {
-
-
- this.accept(val);
- }
- } else {
- if (this.trackIds) {
- var blockParamIndex = undefined;
- if (val.parts && !_AST['default'].helpers.scopedId(val) && !val.depth) {
- blockParamIndex = this.blockParamIndex(val.parts[0]);
- }
- if (blockParamIndex) {
- var blockParamChild = val.parts.slice(1).join('.');
- this.opcode('pushId', 'BlockParam', blockParamIndex, blockParamChild);
- } else {
- value = val.original || value;
- if (value.replace) {
- value = value.replace(/^this(?:\.|$)/, '').replace(/^\.\//, '').replace(/^\.$/, '');
- }
- this.opcode('pushId', val.type, value);
- }
- }
- this.accept(val);
- }
- },
- setupFullMustacheParams: function setupFullMustacheParams(sexpr, program, inverse, omitEmpty) {
- var params = sexpr.params;
- this.pushParams(params);
- this.opcode('pushProgram', program);
- this.opcode('pushProgram', inverse);
- if (sexpr.hash) {
- this.accept(sexpr.hash);
- } else {
- this.opcode('emptyHash', omitEmpty);
- }
- return params;
- },
- blockParamIndex: function blockParamIndex(name) {
- for (var depth = 0, len = this.options.blockParams.length; depth < len; depth++) {
- var blockParams = this.options.blockParams[depth],
- param = blockParams && _utils.indexOf(blockParams, name);
- if (blockParams && param >= 0) {
- return [depth, param];
- }
- }
- }
- };
- function precompile(input, options, env) {
- if (input == null || typeof input !== 'string' && input.type !== 'Program') {
- throw new _Exception['default']('You must pass a string or Handlebars AST to Handlebars.precompile. You passed ' + input);
- }
- options = options || {};
- if (!('data' in options)) {
- options.data = true;
- }
- if (options.compat) {
- options.useDepths = true;
- }
- var ast = env.parse(input, options),
- environment = new env.Compiler().compile(ast, options);
- return new env.JavaScriptCompiler().compile(environment, options);
- }
- function compile(input, options, env) {
- if (options === undefined) options = {};
- if (input == null || typeof input !== 'string' && input.type !== 'Program') {
- throw new _Exception['default']('You must pass a string or Handlebars AST to Handlebars.compile. You passed ' + input);
- }
- options = _utils.extend({}, options);
- if (!('data' in options)) {
- options.data = true;
- }
- if (options.compat) {
- options.useDepths = true;
- }
- var compiled = undefined;
- function compileInput() {
- var ast = env.parse(input, options),
- environment = new env.Compiler().compile(ast, options),
- templateSpec = new env.JavaScriptCompiler().compile(environment, options, undefined, true);
- return env.template(templateSpec);
- }
-
- function ret(context, execOptions) {
- if (!compiled) {
- compiled = compileInput();
- }
- return compiled.call(this, context, execOptions);
- }
- ret._setup = function (setupOptions) {
- if (!compiled) {
- compiled = compileInput();
- }
- return compiled._setup(setupOptions);
- };
- ret._child = function (i, data, blockParams, depths) {
- if (!compiled) {
- compiled = compileInput();
- }
- return compiled._child(i, data, blockParams, depths);
- };
- return ret;
- }
- function argEquals(a, b) {
- if (a === b) {
- return true;
- }
- if (_utils.isArray(a) && _utils.isArray(b) && a.length === b.length) {
- for (var i = 0; i < a.length; i++) {
- if (!argEquals(a[i], b[i])) {
- return false;
- }
- }
- return true;
- }
- }
- function transformLiteralToPath(sexpr) {
- if (!sexpr.path.parts) {
- var literal = sexpr.path;
-
-
- sexpr.path = {
- type: 'PathExpression',
- data: false,
- depth: 0,
- parts: [literal.original + ''],
- original: literal.original + '',
- loc: literal.loc
- };
- }
- }
- });
- ;
- define('handlebars/compiler/code-gen',['exports', 'module', '../utils'], function (exports, module, _utils) {
-
- 'use strict';
- var SourceNode = undefined;
- try {
-
- if (typeof define !== 'function' || !define.amd) {
-
-
- var SourceMap = require('source-map');
- SourceNode = SourceMap.SourceNode;
- }
- } catch (err) {}
-
-
- if (!SourceNode) {
- SourceNode = function (line, column, srcFile, chunks) {
- this.src = '';
- if (chunks) {
- this.add(chunks);
- }
- };
-
- SourceNode.prototype = {
- add: function add(chunks) {
- if (_utils.isArray(chunks)) {
- chunks = chunks.join('');
- }
- this.src += chunks;
- },
- prepend: function prepend(chunks) {
- if (_utils.isArray(chunks)) {
- chunks = chunks.join('');
- }
- this.src = chunks + this.src;
- },
- toStringWithSourceMap: function toStringWithSourceMap() {
- return { code: this.toString() };
- },
- toString: function toString() {
- return this.src;
- }
- };
- }
- function castChunk(chunk, codeGen, loc) {
- if (_utils.isArray(chunk)) {
- var ret = [];
- for (var i = 0, len = chunk.length; i < len; i++) {
- ret.push(codeGen.wrap(chunk[i], loc));
- }
- return ret;
- } else if (typeof chunk === 'boolean' || typeof chunk === 'number') {
-
- return chunk + '';
- }
- return chunk;
- }
- function CodeGen(srcFile) {
- this.srcFile = srcFile;
- this.source = [];
- }
- CodeGen.prototype = {
- isEmpty: function isEmpty() {
- return !this.source.length;
- },
- prepend: function prepend(source, loc) {
- this.source.unshift(this.wrap(source, loc));
- },
- push: function push(source, loc) {
- this.source.push(this.wrap(source, loc));
- },
- merge: function merge() {
- var source = this.empty();
- this.each(function (line) {
- source.add([' ', line, '\n']);
- });
- return source;
- },
- each: function each(iter) {
- for (var i = 0, len = this.source.length; i < len; i++) {
- iter(this.source[i]);
- }
- },
- empty: function empty() {
- var loc = this.currentLocation || { start: {} };
- return new SourceNode(loc.start.line, loc.start.column, this.srcFile);
- },
- wrap: function wrap(chunk) {
- var loc = arguments.length <= 1 || arguments[1] === undefined ? this.currentLocation || { start: {} } : arguments[1];
- if (chunk instanceof SourceNode) {
- return chunk;
- }
- chunk = castChunk(chunk, this, loc);
- return new SourceNode(loc.start.line, loc.start.column, this.srcFile, chunk);
- },
- functionCall: function functionCall(fn, type, params) {
- params = this.generateList(params);
- return this.wrap([fn, type ? '.' + type + '(' : '(', params, ')']);
- },
- quotedString: function quotedString(str) {
- return '"' + (str + '').replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/\n/g, '\\n').replace(/\r/g, '\\r').replace(/\u2028/g, '\\u2028')
- .replace(/\u2029/g, '\\u2029') + '"';
- },
- objectLiteral: function objectLiteral(obj) {
-
- var _this = this;
- var pairs = [];
- Object.keys(obj).forEach(function (key) {
- var value = castChunk(obj[key], _this);
- if (value !== 'undefined') {
- pairs.push([_this.quotedString(key), ':', value]);
- }
- });
- var ret = this.generateList(pairs);
- ret.prepend('{');
- ret.add('}');
- return ret;
- },
- generateList: function generateList(entries) {
- var ret = this.empty();
- for (var i = 0, len = entries.length; i < len; i++) {
- if (i) {
- ret.add(',');
- }
- ret.add(castChunk(entries[i], this));
- }
- return ret;
- },
- generateArray: function generateArray(entries) {
- var ret = this.generateList(entries);
- ret.prepend('[');
- ret.add(']');
- return ret;
- }
- };
- module.exports = CodeGen;
- });
- ;
- define('handlebars/compiler/javascript-compiler',['exports', 'module', '../base', '../exception', '../utils', './code-gen'], function (exports, module, _base, _exception, _utils, _codeGen) {
- 'use strict';
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
- var _Exception = _interopRequireDefault(_exception);
- var _CodeGen = _interopRequireDefault(_codeGen);
- function Literal(value) {
- this.value = value;
- }
- function JavaScriptCompiler() {}
- JavaScriptCompiler.prototype = {
-
-
- nameLookup: function nameLookup(parent, name ) {
- return this.internalNameLookup(parent, name);
- },
- depthedLookup: function depthedLookup(name) {
- return [this.aliasable('container.lookup'), '(depths, ', JSON.stringify(name), ')'];
- },
- compilerInfo: function compilerInfo() {
- var revision = _base.COMPILER_REVISION,
- versions = _base.REVISION_CHANGES[revision];
- return [revision, versions];
- },
- appendToBuffer: function appendToBuffer(source, location, explicit) {
-
- if (!_utils.isArray(source)) {
- source = [source];
- }
- source = this.source.wrap(source, location);
- if (this.environment.isSimple) {
- return ['return ', source, ';'];
- } else if (explicit) {
-
-
-
- return ['buffer += ', source, ';'];
- } else {
- source.appendToBuffer = true;
- return source;
- }
- },
- initializeBuffer: function initializeBuffer() {
- return this.quotedString('');
- },
-
- internalNameLookup: function internalNameLookup(parent, name) {
- this.lookupPropertyFunctionIsUsed = true;
- return ['lookupProperty(', parent, ',', JSON.stringify(name), ')'];
- },
- lookupPropertyFunctionIsUsed: false,
- compile: function compile(environment, options, context, asObject) {
- this.environment = environment;
- this.options = options;
- this.stringParams = this.options.stringParams;
- this.trackIds = this.options.trackIds;
- this.precompile = !asObject;
- this.name = this.environment.name;
- this.isChild = !!context;
- this.context = context || {
- decorators: [],
- programs: [],
- environments: []
- };
- this.preamble();
- this.stackSlot = 0;
- this.stackVars = [];
- this.aliases = {};
- this.registers = { list: [] };
- this.hashes = [];
- this.compileStack = [];
- this.inlineStack = [];
- this.blockParams = [];
- this.compileChildren(environment, options);
- this.useDepths = this.useDepths || environment.useDepths || environment.useDecorators || this.options.compat;
- this.useBlockParams = this.useBlockParams || environment.useBlockParams;
- var opcodes = environment.opcodes,
- opcode = undefined,
- firstLoc = undefined,
- i = undefined,
- l = undefined;
- for (i = 0, l = opcodes.length; i < l; i++) {
- opcode = opcodes[i];
- this.source.currentLocation = opcode.loc;
- firstLoc = firstLoc || opcode.loc;
- this[opcode.opcode].apply(this, opcode.args);
- }
-
- this.source.currentLocation = firstLoc;
- this.pushSource('');
-
- if (this.stackSlot || this.inlineStack.length || this.compileStack.length) {
- throw new _Exception['default']('Compile completed with content left on stack');
- }
- if (!this.decorators.isEmpty()) {
- this.useDecorators = true;
- this.decorators.prepend(['var decorators = container.decorators, ', this.lookupPropertyFunctionVarDeclaration(), ';\n']);
- this.decorators.push('return fn;');
- if (asObject) {
- this.decorators = Function.apply(this, ['fn', 'props', 'container', 'depth0', 'data', 'blockParams', 'depths', this.decorators.merge()]);
- } else {
- this.decorators.prepend('function(fn, props, container, depth0, data, blockParams, depths) {\n');
- this.decorators.push('}\n');
- this.decorators = this.decorators.merge();
- }
- } else {
- this.decorators = undefined;
- }
- var fn = this.createFunctionContext(asObject);
- if (!this.isChild) {
- var ret = {
- compiler: this.compilerInfo(),
- main: fn
- };
- if (this.decorators) {
- ret.main_d = this.decorators;
- ret.useDecorators = true;
- }
- var _context = this.context;
- var programs = _context.programs;
- var decorators = _context.decorators;
- for (i = 0, l = programs.length; i < l; i++) {
- if (programs[i]) {
- ret[i] = programs[i];
- if (decorators[i]) {
- ret[i + '_d'] = decorators[i];
- ret.useDecorators = true;
- }
- }
- }
- if (this.environment.usePartial) {
- ret.usePartial = true;
- }
- if (this.options.data) {
- ret.useData = true;
- }
- if (this.useDepths) {
- ret.useDepths = true;
- }
- if (this.useBlockParams) {
- ret.useBlockParams = true;
- }
- if (this.options.compat) {
- ret.compat = true;
- }
- if (!asObject) {
- ret.compiler = JSON.stringify(ret.compiler);
- this.source.currentLocation = { start: { line: 1, column: 0 } };
- ret = this.objectLiteral(ret);
- if (options.srcName) {
- ret = ret.toStringWithSourceMap({ file: options.destName });
- ret.map = ret.map && ret.map.toString();
- } else {
- ret = ret.toString();
- }
- } else {
- ret.compilerOptions = this.options;
- }
- return ret;
- } else {
- return fn;
- }
- },
- preamble: function preamble() {
-
-
- this.lastContext = 0;
- this.source = new _CodeGen['default'](this.options.srcName);
- this.decorators = new _CodeGen['default'](this.options.srcName);
- },
- createFunctionContext: function createFunctionContext(asObject) {
-
- var _this = this;
- var varDeclarations = '';
- var locals = this.stackVars.concat(this.registers.list);
- if (locals.length > 0) {
- varDeclarations += ', ' + locals.join(', ');
- }
-
-
-
-
-
-
- var aliasCount = 0;
- Object.keys(this.aliases).forEach(function (alias) {
- var node = _this.aliases[alias];
- if (node.children && node.referenceCount > 1) {
- varDeclarations += ', alias' + ++aliasCount + '=' + alias;
- node.children[0] = 'alias' + aliasCount;
- }
- });
- if (this.lookupPropertyFunctionIsUsed) {
- varDeclarations += ', ' + this.lookupPropertyFunctionVarDeclaration();
- }
- var params = ['container', 'depth0', 'helpers', 'partials', 'data'];
- if (this.useBlockParams || this.useDepths) {
- params.push('blockParams');
- }
- if (this.useDepths) {
- params.push('depths');
- }
-
- var source = this.mergeSource(varDeclarations);
- if (asObject) {
- params.push(source);
- return Function.apply(this, params);
- } else {
- return this.source.wrap(['function(', params.join(','), ') {\n ', source, '}']);
- }
- },
- mergeSource: function mergeSource(varDeclarations) {
- var isSimple = this.environment.isSimple,
- appendOnly = !this.forceBuffer,
- appendFirst = undefined,
- sourceSeen = undefined,
- bufferStart = undefined,
- bufferEnd = undefined;
- this.source.each(function (line) {
- if (line.appendToBuffer) {
- if (bufferStart) {
- line.prepend(' + ');
- } else {
- bufferStart = line;
- }
- bufferEnd = line;
- } else {
- if (bufferStart) {
- if (!sourceSeen) {
- appendFirst = true;
- } else {
- bufferStart.prepend('buffer += ');
- }
- bufferEnd.add(';');
- bufferStart = bufferEnd = undefined;
- }
- sourceSeen = true;
- if (!isSimple) {
- appendOnly = false;
- }
- }
- });
- if (appendOnly) {
- if (bufferStart) {
- bufferStart.prepend('return ');
- bufferEnd.add(';');
- } else if (!sourceSeen) {
- this.source.push('return "";');
- }
- } else {
- varDeclarations += ', buffer = ' + (appendFirst ? '' : this.initializeBuffer());
- if (bufferStart) {
- bufferStart.prepend('return buffer + ');
- bufferEnd.add(';');
- } else {
- this.source.push('return buffer;');
- }
- }
- if (varDeclarations) {
- this.source.prepend('var ' + varDeclarations.substring(2) + (appendFirst ? '' : ';\n'));
- }
- return this.source.merge();
- },
- lookupPropertyFunctionVarDeclaration: function lookupPropertyFunctionVarDeclaration() {
- 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();
- },
-
-
-
-
-
-
-
-
-
- blockValue: function blockValue(name) {
- var blockHelperMissing = this.aliasable('container.hooks.blockHelperMissing'),
- params = [this.contextName(0)];
- this.setupHelperArgs(name, 0, params);
- var blockName = this.popStack();
- params.splice(1, 0, blockName);
- this.push(this.source.functionCall(blockHelperMissing, 'call', params));
- },
-
-
-
-
-
-
- ambiguousBlockValue: function ambiguousBlockValue() {
-
- var blockHelperMissing = this.aliasable('container.hooks.blockHelperMissing'),
- params = [this.contextName(0)];
- this.setupHelperArgs('', 0, params, true);
- this.flushInline();
- var current = this.topStack();
- params.splice(1, 0, current);
- this.pushSource(['if (!', this.lastHelper, ') { ', current, ' = ', this.source.functionCall(blockHelperMissing, 'call', params), '}']);
- },
-
-
-
-
-
-
- appendContent: function appendContent(content) {
- if (this.pendingContent) {
- content = this.pendingContent + content;
- } else {
- this.pendingLocation = this.source.currentLocation;
- }
- this.pendingContent = content;
- },
-
-
-
-
-
-
-
-
-
- append: function append() {
- if (this.isInline()) {
- this.replaceStack(function (current) {
- return [' != null ? ', current, ' : ""'];
- });
- this.pushSource(this.appendToBuffer(this.popStack()));
- } else {
- var local = this.popStack();
- this.pushSource(['if (', local, ' != null) { ', this.appendToBuffer(local, undefined, true), ' }']);
- if (this.environment.isSimple) {
- this.pushSource(['else { ', this.appendToBuffer("''", undefined, true), ' }']);
- }
- }
- },
-
-
-
-
-
-
- appendEscaped: function appendEscaped() {
- this.pushSource(this.appendToBuffer([this.aliasable('container.escapeExpression'), '(', this.popStack(), ')']));
- },
-
-
-
-
-
-
-
- getContext: function getContext(depth) {
- this.lastContext = depth;
- },
-
-
-
-
-
-
- pushContext: function pushContext() {
- this.pushStackLiteral(this.contextName(this.lastContext));
- },
-
-
-
-
-
-
-
- lookupOnContext: function lookupOnContext(parts, falsy, strict, scoped) {
- var i = 0;
- if (!scoped && this.options.compat && !this.lastContext) {
-
-
- this.push(this.depthedLookup(parts[i++]));
- } else {
- this.pushContext();
- }
- this.resolvePath('context', parts, i, falsy, strict);
- },
-
-
-
-
-
-
-
- lookupBlockParam: function lookupBlockParam(blockParamId, parts) {
- this.useBlockParams = true;
- this.push(['blockParams[', blockParamId[0], '][', blockParamId[1], ']']);
- this.resolvePath('context', parts, 1);
- },
-
-
-
-
-
-
- lookupData: function lookupData(depth, parts, strict) {
- if (!depth) {
- this.pushStackLiteral('data');
- } else {
- this.pushStackLiteral('container.data(data, ' + depth + ')');
- }
- this.resolvePath('data', parts, 0, true, strict);
- },
- resolvePath: function resolvePath(type, parts, i, falsy, strict) {
-
- var _this2 = this;
- if (this.options.strict || this.options.assumeObjects) {
- this.push(strictLookup(this.options.strict && strict, this, parts, type));
- return;
- }
- var len = parts.length;
- for (; i < len; i++) {
-
- this.replaceStack(function (current) {
- var lookup = _this2.nameLookup(current, parts[i], type);
-
-
- if (!falsy) {
- return [' != null ? ', lookup, ' : ', current];
- } else {
-
- return [' && ', lookup];
- }
- });
-
- }
- },
-
-
-
-
-
-
-
- resolvePossibleLambda: function resolvePossibleLambda() {
- this.push([this.aliasable('container.lambda'), '(', this.popStack(), ', ', this.contextName(0), ')']);
- },
-
-
-
-
-
-
-
-
- pushStringParam: function pushStringParam(string, type) {
- this.pushContext();
- this.pushString(type);
-
-
- if (type !== 'SubExpression') {
- if (typeof string === 'string') {
- this.pushString(string);
- } else {
- this.pushStackLiteral(string);
- }
- }
- },
- emptyHash: function emptyHash(omitEmpty) {
- if (this.trackIds) {
- this.push('{}');
- }
- if (this.stringParams) {
- this.push('{}');
- this.push('{}');
- }
- this.pushStackLiteral(omitEmpty ? 'undefined' : '{}');
- },
- pushHash: function pushHash() {
- if (this.hash) {
- this.hashes.push(this.hash);
- }
- this.hash = { values: {}, types: [], contexts: [], ids: [] };
- },
- popHash: function popHash() {
- var hash = this.hash;
- this.hash = this.hashes.pop();
- if (this.trackIds) {
- this.push(this.objectLiteral(hash.ids));
- }
- if (this.stringParams) {
- this.push(this.objectLiteral(hash.contexts));
- this.push(this.objectLiteral(hash.types));
- }
- this.push(this.objectLiteral(hash.values));
- },
-
-
-
-
-
-
- pushString: function pushString(string) {
- this.pushStackLiteral(this.quotedString(string));
- },
-
-
-
-
-
-
-
-
- pushLiteral: function pushLiteral(value) {
- this.pushStackLiteral(value);
- },
-
-
-
-
-
-
-
-
- pushProgram: function pushProgram(guid) {
- if (guid != null) {
- this.pushStackLiteral(this.programExpression(guid));
- } else {
- this.pushStackLiteral(null);
- }
- },
-
-
-
-
-
-
-
- registerDecorator: function registerDecorator(paramSize, name) {
- var foundDecorator = this.nameLookup('decorators', name, 'decorator'),
- options = this.setupHelperArgs(name, paramSize);
- this.decorators.push(['fn = ', this.decorators.functionCall(foundDecorator, '', ['fn', 'props', 'container', options]), ' || fn;']);
- },
-
-
-
-
-
-
-
-
-
- invokeHelper: function invokeHelper(paramSize, name, isSimple) {
- var nonHelper = this.popStack(),
- helper = this.setupHelper(paramSize, name);
- var possibleFunctionCalls = [];
- if (isSimple) {
-
- possibleFunctionCalls.push(helper.name);
- }
-
- possibleFunctionCalls.push(nonHelper);
- if (!this.options.strict) {
- possibleFunctionCalls.push(this.aliasable('container.hooks.helperMissing'));
- }
- var functionLookupCode = ['(', this.itemsSeparatedBy(possibleFunctionCalls, '||'), ')'];
- var functionCall = this.source.functionCall(functionLookupCode, 'call', helper.callParams);
- this.push(functionCall);
- },
- itemsSeparatedBy: function itemsSeparatedBy(items, separator) {
- var result = [];
- result.push(items[0]);
- for (var i = 1; i < items.length; i++) {
- result.push(separator, items[i]);
- }
- return result;
- },
-
-
-
-
-
-
-
- invokeKnownHelper: function invokeKnownHelper(paramSize, name) {
- var helper = this.setupHelper(paramSize, name);
- this.push(this.source.functionCall(helper.name, 'call', helper.callParams));
- },
-
-
-
-
-
-
-
-
-
-
-
-
- invokeAmbiguous: function invokeAmbiguous(name, helperCall) {
- this.useRegister('helper');
- var nonHelper = this.popStack();
- this.emptyHash();
- var helper = this.setupHelper(0, name, helperCall);
- var helperName = this.lastHelper = this.nameLookup('helpers', name, 'helper');
- var lookup = ['(', '(helper = ', helperName, ' || ', nonHelper, ')'];
- if (!this.options.strict) {
- lookup[0] = '(helper = ';
- lookup.push(' != null ? helper : ', this.aliasable('container.hooks.helperMissing'));
- }
- this.push(['(', lookup, helper.paramsInit ? ['),(', helper.paramsInit] : [], '),', '(typeof helper === ', this.aliasable('"function"'), ' ? ', this.source.functionCall('helper', 'call', helper.callParams), ' : helper))']);
- },
-
-
-
-
-
-
-
- invokePartial: function invokePartial(isDynamic, name, indent) {
- var params = [],
- options = this.setupParams(name, 1, params);
- if (isDynamic) {
- name = this.popStack();
- delete options.name;
- }
- if (indent) {
- options.indent = JSON.stringify(indent);
- }
- options.helpers = 'helpers';
- options.partials = 'partials';
- options.decorators = 'container.decorators';
- if (!isDynamic) {
- params.unshift(this.nameLookup('partials', name, 'partial'));
- } else {
- params.unshift(name);
- }
- if (this.options.compat) {
- options.depths = 'depths';
- }
- options = this.objectLiteral(options);
- params.push(options);
- this.push(this.source.functionCall('container.invokePartial', '', params));
- },
-
-
-
-
-
-
- assignToHash: function assignToHash(key) {
- var value = this.popStack(),
- context = undefined,
- type = undefined,
- id = undefined;
- if (this.trackIds) {
- id = this.popStack();
- }
- if (this.stringParams) {
- type = this.popStack();
- context = this.popStack();
- }
- var hash = this.hash;
- if (context) {
- hash.contexts[key] = context;
- }
- if (type) {
- hash.types[key] = type;
- }
- if (id) {
- hash.ids[key] = id;
- }
- hash.values[key] = value;
- },
- pushId: function pushId(type, name, child) {
- if (type === 'BlockParam') {
- this.pushStackLiteral('blockParams[' + name[0] + '].path[' + name[1] + ']' + (child ? ' + ' + JSON.stringify('.' + child) : ''));
- } else if (type === 'PathExpression') {
- this.pushString(name);
- } else if (type === 'SubExpression') {
- this.pushStackLiteral('true');
- } else {
- this.pushStackLiteral('null');
- }
- },
-
- compiler: JavaScriptCompiler,
- compileChildren: function compileChildren(environment, options) {
- var children = environment.children,
- child = undefined,
- compiler = undefined;
- for (var i = 0, l = children.length; i < l; i++) {
- child = children[i];
- compiler = new this.compiler();
- var existing = this.matchExistingProgram(child);
- if (existing == null) {
- this.context.programs.push('');
- var index = this.context.programs.length;
- child.index = index;
- child.name = 'program' + index;
- this.context.programs[index] = compiler.compile(child, options, this.context, !this.precompile);
- this.context.decorators[index] = compiler.decorators;
- this.context.environments[index] = child;
- this.useDepths = this.useDepths || compiler.useDepths;
- this.useBlockParams = this.useBlockParams || compiler.useBlockParams;
- child.useDepths = this.useDepths;
- child.useBlockParams = this.useBlockParams;
- } else {
- child.index = existing.index;
- child.name = 'program' + existing.index;
- this.useDepths = this.useDepths || existing.useDepths;
- this.useBlockParams = this.useBlockParams || existing.useBlockParams;
- }
- }
- },
- matchExistingProgram: function matchExistingProgram(child) {
- for (var i = 0, len = this.context.environments.length; i < len; i++) {
- var environment = this.context.environments[i];
- if (environment && environment.equals(child)) {
- return environment;
- }
- }
- },
- programExpression: function programExpression(guid) {
- var child = this.environment.children[guid],
- programParams = [child.index, 'data', child.blockParams];
- if (this.useBlockParams || this.useDepths) {
- programParams.push('blockParams');
- }
- if (this.useDepths) {
- programParams.push('depths');
- }
- return 'container.program(' + programParams.join(', ') + ')';
- },
- useRegister: function useRegister(name) {
- if (!this.registers[name]) {
- this.registers[name] = true;
- this.registers.list.push(name);
- }
- },
- push: function push(expr) {
- if (!(expr instanceof Literal)) {
- expr = this.source.wrap(expr);
- }
- this.inlineStack.push(expr);
- return expr;
- },
- pushStackLiteral: function pushStackLiteral(item) {
- this.push(new Literal(item));
- },
- pushSource: function pushSource(source) {
- if (this.pendingContent) {
- this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent), this.pendingLocation));
- this.pendingContent = undefined;
- }
- if (source) {
- this.source.push(source);
- }
- },
- replaceStack: function replaceStack(callback) {
- var prefix = ['('],
- stack = undefined,
- createdStack = undefined,
- usedLiteral = undefined;
-
- if (!this.isInline()) {
- throw new _Exception['default']('replaceStack on non-inline');
- }
-
- var top = this.popStack(true);
- if (top instanceof Literal) {
-
- stack = [top.value];
- prefix = ['(', stack];
- usedLiteral = true;
- } else {
-
- createdStack = true;
- var _name = this.incrStack();
- prefix = ['((', this.push(_name), ' = ', top, ')'];
- stack = this.topStack();
- }
- var item = callback.call(this, stack);
- if (!usedLiteral) {
- this.popStack();
- }
- if (createdStack) {
- this.stackSlot--;
- }
- this.push(prefix.concat(item, ')'));
- },
- incrStack: function incrStack() {
- this.stackSlot++;
- if (this.stackSlot > this.stackVars.length) {
- this.stackVars.push('stack' + this.stackSlot);
- }
- return this.topStackName();
- },
- topStackName: function topStackName() {
- return 'stack' + this.stackSlot;
- },
- flushInline: function flushInline() {
- var inlineStack = this.inlineStack;
- this.inlineStack = [];
- for (var i = 0, len = inlineStack.length; i < len; i++) {
- var entry = inlineStack[i];
-
- if (entry instanceof Literal) {
- this.compileStack.push(entry);
- } else {
- var stack = this.incrStack();
- this.pushSource([stack, ' = ', entry, ';']);
- this.compileStack.push(stack);
- }
- }
- },
- isInline: function isInline() {
- return this.inlineStack.length;
- },
- popStack: function popStack(wrapped) {
- var inline = this.isInline(),
- item = (inline ? this.inlineStack : this.compileStack).pop();
- if (!wrapped && item instanceof Literal) {
- return item.value;
- } else {
- if (!inline) {
-
- if (!this.stackSlot) {
- throw new _Exception['default']('Invalid stack pop');
- }
- this.stackSlot--;
- }
- return item;
- }
- },
- topStack: function topStack() {
- var stack = this.isInline() ? this.inlineStack : this.compileStack,
- item = stack[stack.length - 1];
-
- if (item instanceof Literal) {
- return item.value;
- } else {
- return item;
- }
- },
- contextName: function contextName(context) {
- if (this.useDepths && context) {
- return 'depths[' + context + ']';
- } else {
- return 'depth' + context;
- }
- },
- quotedString: function quotedString(str) {
- return this.source.quotedString(str);
- },
- objectLiteral: function objectLiteral(obj) {
- return this.source.objectLiteral(obj);
- },
- aliasable: function aliasable(name) {
- var ret = this.aliases[name];
- if (ret) {
- ret.referenceCount++;
- return ret;
- }
- ret = this.aliases[name] = this.source.wrap(name);
- ret.aliasable = true;
- ret.referenceCount = 1;
- return ret;
- },
- setupHelper: function setupHelper(paramSize, name, blockHelper) {
- var params = [],
- paramsInit = this.setupHelperArgs(name, paramSize, params, blockHelper);
- var foundHelper = this.nameLookup('helpers', name, 'helper'),
- callContext = this.aliasable(this.contextName(0) + ' != null ? ' + this.contextName(0) + ' : (container.nullContext || {})');
- return {
- params: params,
- paramsInit: paramsInit,
- name: foundHelper,
- callParams: [callContext].concat(params)
- };
- },
- setupParams: function setupParams(helper, paramSize, params) {
- var options = {},
- contexts = [],
- types = [],
- ids = [],
- objectArgs = !params,
- param = undefined;
- if (objectArgs) {
- params = [];
- }
- options.name = this.quotedString(helper);
- options.hash = this.popStack();
- if (this.trackIds) {
- options.hashIds = this.popStack();
- }
- if (this.stringParams) {
- options.hashTypes = this.popStack();
- options.hashContexts = this.popStack();
- }
- var inverse = this.popStack(),
- program = this.popStack();
-
-
- if (program || inverse) {
- options.fn = program || 'container.noop';
- options.inverse = inverse || 'container.noop';
- }
-
-
- var i = paramSize;
- while (i--) {
- param = this.popStack();
- params[i] = param;
- if (this.trackIds) {
- ids[i] = this.popStack();
- }
- if (this.stringParams) {
- types[i] = this.popStack();
- contexts[i] = this.popStack();
- }
- }
- if (objectArgs) {
- options.args = this.source.generateArray(params);
- }
- if (this.trackIds) {
- options.ids = this.source.generateArray(ids);
- }
- if (this.stringParams) {
- options.types = this.source.generateArray(types);
- options.contexts = this.source.generateArray(contexts);
- }
- if (this.options.data) {
- options.data = 'data';
- }
- if (this.useBlockParams) {
- options.blockParams = 'blockParams';
- }
- return options;
- },
- setupHelperArgs: function setupHelperArgs(helper, paramSize, params, useRegister) {
- var options = this.setupParams(helper, paramSize, params);
- options.loc = JSON.stringify(this.source.currentLocation);
- options = this.objectLiteral(options);
- if (useRegister) {
- this.useRegister('options');
- params.push('options');
- return ['options=', options];
- } else if (params) {
- params.push(options);
- return '';
- } else {
- return options;
- }
- }
- };
- (function () {
- 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(' ');
- var compilerWords = JavaScriptCompiler.RESERVED_WORDS = {};
- for (var i = 0, l = reservedWords.length; i < l; i++) {
- compilerWords[reservedWords[i]] = true;
- }
- })();
-
- JavaScriptCompiler.isValidJavaScriptVariableName = function (name) {
- return !JavaScriptCompiler.RESERVED_WORDS[name] && /^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(name);
- };
- function strictLookup(requireTerminal, compiler, parts, type) {
- var stack = compiler.popStack(),
- i = 0,
- len = parts.length;
- if (requireTerminal) {
- len--;
- }
- for (; i < len; i++) {
- stack = compiler.nameLookup(stack, parts[i], type);
- }
- if (requireTerminal) {
- return [compiler.aliasable('container.strict'), '(', stack, ', ', compiler.quotedString(parts[i]), ', ', JSON.stringify(compiler.source.currentLocation), ' )'];
- } else {
- return stack;
- }
- }
- module.exports = JavaScriptCompiler;
- });
- ;
- define('handlebars',['exports', 'module', './handlebars.runtime', './handlebars/compiler/ast', './handlebars/compiler/base', './handlebars/compiler/compiler', './handlebars/compiler/javascript-compiler', './handlebars/compiler/visitor', './handlebars/no-conflict'], function (exports, module, _handlebarsRuntime, _handlebarsCompilerAst, _handlebarsCompilerBase, _handlebarsCompilerCompiler, _handlebarsCompilerJavascriptCompiler, _handlebarsCompilerVisitor, _handlebarsNoConflict) {
- 'use strict';
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
- var _runtime = _interopRequireDefault(_handlebarsRuntime);
-
- var _AST = _interopRequireDefault(_handlebarsCompilerAst);
- var _JavaScriptCompiler = _interopRequireDefault(_handlebarsCompilerJavascriptCompiler);
- var _Visitor = _interopRequireDefault(_handlebarsCompilerVisitor);
- var _noConflict = _interopRequireDefault(_handlebarsNoConflict);
- var _create = _runtime['default'].create;
- function create() {
- var hb = _create();
- hb.compile = function (input, options) {
- return _handlebarsCompilerCompiler.compile(input, options, hb);
- };
- hb.precompile = function (input, options) {
- return _handlebarsCompilerCompiler.precompile(input, options, hb);
- };
- hb.AST = _AST['default'];
- hb.Compiler = _handlebarsCompilerCompiler.Compiler;
- hb.JavaScriptCompiler = _JavaScriptCompiler['default'];
- hb.Parser = _handlebarsCompilerBase.parser;
- hb.parse = _handlebarsCompilerBase.parse;
- hb.parseWithoutProcessing = _handlebarsCompilerBase.parseWithoutProcessing;
- return hb;
- }
- var inst = create();
- inst.create = create;
- _noConflict['default'](inst);
- inst.Visitor = _Visitor['default'];
- inst['default'] = inst;
- module.exports = inst;
- });
- ;
|