From a34166e0aa8182a702f555ddc6e483f99d603169 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Fri, 27 Mar 2015 20:19:39 +0100 Subject: [PATCH] Add support for `onparse`, `onstringify` callbacks --- Readme.md | 4 +++- index.js | 11 ++++++++++ mdast-yaml.js | 11 ++++++++++ mdast-yaml.min.js | 2 +- test/index.js | 56 +++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 82 insertions(+), 2 deletions(-) diff --git a/Readme.md b/Readme.md index 834653d..ae09a13 100644 --- a/Readme.md +++ b/Readme.md @@ -109,7 +109,9 @@ Adds a `yaml` property to [**YAML**](https://github.com/wooorm/mdast/blob/master * `library` (`Object?`, default: [`nodeca/js-yaml`](https://github.com/nodeca/js-yaml)); * `parse` (`string?`, default [`"safeLoad"`](https://github.com/nodeca/js-yaml#safeload-string---options-)); * `stringify` (`string?`, default [`"safeDump"`](https://github.com/nodeca/js-yaml#safedump-object---options-)); - * `prettify` (`boolean?`, default: `true`) — When true, the node’s content will be overwritten by the result of `library[stringify](node.yaml)`. + * `prettify` (`boolean?`, default: `true`) — When true, the node’s content will be overwritten by the result of `library[stringify](node.yaml)`; + * `onparse` (`function(Node)`, default `function () {}`) — Invoked when YAML is parsed, during parsing; + * `onstringify` (`function(Node)`, default `function () {}`) — Invoked when YAML is stringified, during stringification. ## License diff --git a/index.js b/index.js index 5db11dd..213cf07 100644 --- a/index.js +++ b/index.js @@ -10,6 +10,11 @@ try { jsYAML = require('js-yaml'); } catch (exception) {} +/** + * No-operation. + */ +function noop() {} + /** * Remove trailing newline. * @@ -31,6 +36,7 @@ function removeLastLine(value) { function parse(tokenize, settings) { var parser = settings.library || jsYAML; var method = settings.parse || 'safeLoad'; + var callback = settings.onparse || noop; /** * Parse YAML, if available, using the bound @@ -52,6 +58,8 @@ function parse(tokenize, settings) { }); eat($0)(node); + + callback(node, this); }; } @@ -64,6 +72,7 @@ function parse(tokenize, settings) { function stringify(compile, settings) { var stringifier = settings.library || jsYAML; var method = settings.stringify || 'safeDump'; + var callback = settings.onstringify || noop; if (settings.prettify === false) { return compile; @@ -81,6 +90,8 @@ function stringify(compile, settings) { node.value = removeLastLine(stringifier[method](node.yaml)); } + callback(node, this); + return compile.apply(this, arguments); }; } diff --git a/mdast-yaml.js b/mdast-yaml.js index 9c3c23d..658bf96 100644 --- a/mdast-yaml.js +++ b/mdast-yaml.js @@ -11,6 +11,11 @@ try { jsYAML = require('js-yaml'); } catch (exception) {} +/** + * No-operation. + */ +function noop() {} + /** * Remove trailing newline. * @@ -32,6 +37,7 @@ function removeLastLine(value) { function parse(tokenize, settings) { var parser = settings.library || jsYAML; var method = settings.parse || 'safeLoad'; + var callback = settings.onparse || noop; /** * Parse YAML, if available, using the bound @@ -53,6 +59,8 @@ function parse(tokenize, settings) { }); eat($0)(node); + + callback(node, this); }; } @@ -65,6 +73,7 @@ function parse(tokenize, settings) { function stringify(compile, settings) { var stringifier = settings.library || jsYAML; var method = settings.stringify || 'safeDump'; + var callback = settings.onstringify || noop; if (settings.prettify === false) { return compile; @@ -82,6 +91,8 @@ function stringify(compile, settings) { node.value = removeLastLine(stringifier[method](node.yaml)); } + callback(node, this); + return compile.apply(this, arguments); }; } diff --git a/mdast-yaml.min.js b/mdast-yaml.min.js index 18f16e7..f0c6c60 100644 --- a/mdast-yaml.min.js +++ b/mdast-yaml.min.js @@ -1 +1 @@ -!function(b,a){typeof exports==='object'&&typeof module!=='undefined'?module.exports=b():typeof define==='function'&&define.amd?define([],b):(typeof window!=='undefined'?a=window:typeof global!=='undefined'?a=global:typeof self!=='undefined'?a=self:a=this,a.mdastYAML=b())}(function(){var a;return function a(b,c,e){function f(d,k){if(!c[d]){if(!b[d]){var i=typeof require=='function'&&require;if(!k&&i)return i(d,!0);if(g)return g(d,!0);var j=new Error("Cannot find module '"+d+"'");throw j.code='MODULE_NOT_FOUND',j}var h=c[d]={exports:{}};b[d][0].call(h.exports,function(c){var a=b[d][1][c];return f(a?a:c)},h,h.exports,a,b,c,e)}return c[d].exports}var g=typeof require=='function'&&require;for(var d=0;d1024&&(c+='? '),c+=a.dump+': ',!b(a,k,l,!1,!1))continue;c+=a.dump,f+=c}a.tag=h,a.dump='{'+f+'}'}function O(a,e,o,p){var h='',l=a.tag,j=Object.keys(o),d,m,k,n,f,c;for(d=0,m=j.length;d1024,f&&(a.dump&&g===a.dump.charCodeAt(0)?c+='?':c+='? '),c+=a.dump,f&&(c+=i(a,e)),!b(a,e+1,n,!0,f))continue;a.dump&&g===a.dump.charCodeAt(0)?c+=':':c+=': ',c+=a.dump,h+=c}a.tag=l,a.dump=h||'{}'}function o(c,f,k){var h,i,g,l,a,b;for(i=k?c.explicitTypes:c.implicitTypes,g=0,l=i.length;g tag resolver accepts not "'+b+'" style');c.dump=h}return!0}return!1}function b(a,c,h,i,j){a.tag=null,a.dump=h,o(a,h,!1)||o(a,h,!0);var f=e.call(a.dump);i&&(i=0>a.flowLevel||a.flowLevel>c),(null!==a.tag&&'?'!==a.tag||2!==a.indent&&c>0)&&(j=!1);var k='[object Object]'===f||'[object Array]'===f,b,g;if(k&&(b=a.duplicates.indexOf(h),g=b!==-1),g&&a.usedDuplicates[b])a.dump='*ref_'+b;else{if(k&&g&&!a.usedDuplicates[b]&&(a.usedDuplicates[b]=!0),'[object Object]'===f)i&&0!==Object.keys(a.dump).length?(O(a,c,a.dump,j),g&&(a.dump='&ref_'+b+(0===c?'\n':'')+a.dump)):(P(a,c,a.dump),g&&(a.dump='&ref_'+b+' '+a.dump));else if('[object Array]'===f)i&&0!==a.dump.length?(Q(a,c,a.dump,j),g&&(a.dump='&ref_'+b+(0===c?'\n':'')+a.dump)):(R(a,c,a.dump),g&&(a.dump='&ref_'+b+' '+a.dump));else if('[object String]'===f)'?'!==a.tag&&M(a,a.dump);else if(a.skipInvalid)return!1;else throw new d('unacceptable kind of an object to dump '+f);null!==a.tag&&'?'!==a.tag&&(a.dump='!<'+a.tag+'> '+a.dump)}return!0}function S(f,e){var c=[],a=[],b,d;for(h(f,c,a),b=0,d=a.length;b>10)+55296,(a-65536&1023)+56320)}function W(b,a){this.input=b,this.filename=a.filename||null,this.schema=a.schema||G,this.onWarning=a.onWarning||null,this.legacy=a.legacy||!1,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=b.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function P(a,b){return new z(b,new L(a.filename,a.input,a.position,a.line,a.position-a.lineStart))}function a(a,b){throw P(a,b)}function o(a,c){var b=P(a,c);if(!a.onWarning)throw b;a.onWarning.call(null,b)}function f(e,f,g,i){var b,h,c,d;if(f1&&(b.result+=d.repeat('\n',a-1))}function a4(a,u,n){var o,j,k,h,l,m,q,r,t=a.kind,p=a.result,d;if(d=a.input.charCodeAt(a.position),c(d)||i(d)||35===d||38===d||42===d||33===d||124===d||62===d||39===d||34===d||37===d||64===d||96===d)return!1;if((63===d||45===d)&&(j=a.input.charCodeAt(a.position+1),c(j)||n&&i(j)))return!1;a.kind='scalar',a.result='',k=h=a.position,l=!1;while(0!==d){if(58===d){if(j=a.input.charCodeAt(a.position+1),c(j)||n&&i(j))break}else if(35===d){if(o=a.input.charCodeAt(a.position-1),c(o))break}else if(a.position===a.lineStart&&s(a)||n&&i(d))break;else if(e(d))if(m=a.line,q=a.lineStart,r=a.lineIndent,b(a,!1,-1),a.lineIndent>=u){l=!0,d=a.input.charCodeAt(a.position);continue}else{a.position=h,a.line=m,a.lineStart=q,a.lineIndent=r;break}l&&(f(a,k,h,!1),y(a,a.line-m),k=h=a.position,l=!1),g(d)||(h=a.position+1),d=a.input.charCodeAt(++a.position)}return f(a,k,h,!1),a.result?!0:(a.kind=t,a.result=p,!1)}function a5(c,i){var d,g,h;if(d=c.input.charCodeAt(c.position),39!==d)return!1;c.kind='scalar',c.result='',c.position++,g=h=c.position;while(0!==(d=c.input.charCodeAt(c.position)))if(39===d){if(f(c,g,c.position,!0),d=c.input.charCodeAt(++c.position),!(39===d))return!0;g=h=c.position,c.position++}else e(d)?(f(c,g,h,!0),y(c,b(c,!1,i)),g=h=c.position):c.position===c.lineStart&&s(c)?a(c,'unexpected end of the document within a single quoted scalar'):(c.position++,h=c.position);a(c,'unexpected end of the stream within a single quoted scalar')}function a6(c,l){var g,h,k,i,j,d;if(d=c.input.charCodeAt(c.position),34!==d)return!1;c.kind='scalar',c.result='',c.position++,g=h=c.position;while(0!==(d=c.input.charCodeAt(c.position)))if(34===d)return f(c,g,c.position,!0),c.position++,!0;else if(92===d){if(f(c,g,c.position,!0),d=c.input.charCodeAt(++c.position),e(d))b(c,!1,l);else if(d<256&&w[d])c.result+=u[d],c.position++;else if((j=$(d))>0){for(k=j,i=0;k>0;k--)d=c.input.charCodeAt(++c.position),(j=Z(d))>=0?i=(i<<4)+j:a(c,'expected hexadecimal character');c.result+=U(i),c.position++}else a(c,'unknown escape sequence');g=h=c.position}else e(d)?(f(c,g,h,!0),y(c,b(c,!1,l)),g=h=c.position):c.position===c.lineStart&&s(c)?a(c,'unexpected end of the document within a double quoted scalar'):(c.position++,h=c.position);a(c,'unexpected end of the stream within a double quoted scalar')}function S(d,g){var m=!0,s,t=d.tag,f,v=d.anchor,u,r,p,q,o,h,i,k,e;if(e=d.input.charCodeAt(d.position),e===91)r=93,o=!1,f=[];else if(e===123)r=125,o=!0,f={};else return!1;null!==d.anchor&&(d.anchorMap[d.anchor]=f),e=d.input.charCodeAt(++d.position);while(0!==e){if(b(d,!0,g),e=d.input.charCodeAt(d.position),e===r)return d.position++,d.tag=t,d.anchor=v,d.kind=o?'mapping':'sequence',d.result=f,!0;m||a(d,'missed comma between flow collection entries'),i=h=k=null,p=q=!1,63===e&&(u=d.input.charCodeAt(d.position+1),c(u)&&(p=q=!0,d.position++,b(d,!0,g))),s=d.line,l(d,g,n,!1,!0),i=d.tag,h=d.result,b(d,!0,g),e=d.input.charCodeAt(d.position),(q||d.line===s)&&58===e&&(p=!0,e=d.input.charCodeAt(++d.position),b(d,!0,g),l(d,g,n,!1,!0),k=d.result),o?j(d,f,i,h,k):p?f.push(j(d,null,i,h,k)):f.push(h),b(d,!0,g),e=d.input.charCodeAt(d.position),44===e?(m=!0,e=d.input.charCodeAt(++d.position)):m=!1}a(d,'unexpected end of the stream within a flow collection')}function T(b,p){var o,m,k=r,i=!1,j=p,h=0,l=!1,n,c;if(c=b.input.charCodeAt(b.position),c===124)m=!1;else if(c===62)m=!0;else return!1;b.kind='scalar',b.result='';while(0!==c)if(c=b.input.charCodeAt(++b.position),43===c||45===c)r===k?k=43===c?D:J:a(b,'repeat of a chomping mode identifier');else if((n=a0(c))>=0)n===0?a(b,'bad explicit indentation width of a block scalar; it cannot be less than one'):i?a(b,'repeat of an indentation width identifier'):(j=p+n-1,i=!0);else break;if(g(c)){do c=b.input.charCodeAt(++b.position);while(g(c));if(35===c)do c=b.input.charCodeAt(++b.position);while(!e(c)&&0!==c)}while(0!==c){v(b),b.lineIndent=0,c=b.input.charCodeAt(b.position);while((!i||b.lineIndentj&&(j=b.lineIndent),e(c)){h++;continue}if(b.lineIndentg)&&0!==e)a(d,'bad indentation of a sequence entry');else if(d.lineIndento)&&(l(d,o,p,!0,q)&&(f?h=d.result:n=d.result),f||(j(d,m,i,h,n),i=h=n=null),b(d,!0,-1),e=d.input.charCodeAt(d.position)),d.lineIndent>o&&0!==e)a(d,'bad indentation of a mapping entry');else if(d.lineIndentf?d=1:c.lineIndent===f?d=0:c.lineIndentf?d=1:c.lineIndent===f?d=0:c.lineIndent tag; it should be "'+e.kind+'", not "'+c.kind+'"'),e.resolve(c.result)?(c.result=e.construct(c.result),null!==c.anchor&&(c.anchorMap[c.anchor]=c.result)):a(c,'cannot resolve a node with !<'+c.tag+'> explicit tag')):o(c,'unknown tag !<'+c.tag+'>');return null!==c.tag||null!==c.anchor||i}function _(d){var n=d.position,i,h,j,m=!1,f;d.version=null,d.checkLineBreaks=d.legacy,d.tagMap={},d.anchorMap={};while(0!==(f=d.input.charCodeAt(d.position))){if(b(d,!0,-1),f=d.input.charCodeAt(d.position),d.lineIndent>0||37!==f)break;m=!0,f=d.input.charCodeAt(++d.position),i=d.position;while(0!==f&&!c(f))f=d.input.charCodeAt(++d.position);h=d.input.slice(i,d.position),j=[],h.length<1&&a(d,'directive name must not be less than one character in length');while(0!==f){while(g(f))f=d.input.charCodeAt(++d.position);if(35===f){do f=d.input.charCodeAt(++d.position);while(0!==f&&!e(f));break}if(e(f))break;i=d.position;while(0!==f&&!c(f))f=d.input.charCodeAt(++d.position);j.push(d.input.slice(i,d.position))}0!==f&&v(d),k.call(t,h)?t[h](d,h,j):o(d,'unknown document directive "'+h+'"')}if(b(d,!0,-1),0===d.lineIndent&&45===d.input.charCodeAt(d.position)&&45===d.input.charCodeAt(d.position+1)&&45===d.input.charCodeAt(d.position+2)?(d.position+=3,b(d,!0,-1)):m&&a(d,'directives end mark is expected'),l(d,d.lineIndent-1,p,!1,!0),b(d,!0,-1),d.checkLineBreaks&&M.test(d.input.slice(n,d.position))&&o(d,'non-ASCII line breaks are interpreted as content'),d.documents.push(d.result),d.position===d.lineStart&&s(d)){46===d.input.charCodeAt(d.position)&&(d.position+=3,b(d,!0,-1));return}if(d.position0&&-1==='\r\n…\u2028\u2029'.indexOf(this.buffer.charAt(c-1)))if(c-=1,this.position-c>f/2-1){g=' ... ',c+=5;break}h='',d=this.position;while(df/2-1){h=' ... ',d-=5;break}return i=this.buffer.slice(c,d),b.repeat(' ',e)+g+i+h+'\n'+b.repeat(' ',e+this.position-c+g.length)+'^'},a.prototype.toString=function a(d){var c,b='';return this.name&&(b+='in "'+this.name+'" '),b+='at line '+(this.line+1)+', column '+(this.column+1),d||(c=this.getSnippet(),c&&(b+=':\n'+c)),b},d.exports=a},{'./common':4}],9:[function(c,g,i){'use strict';function d(c,e,a){var b=[];return c.include.forEach(function(b){a=d(b,e,a)}),c[e].forEach(function(c){a.forEach(function(a,d){a.tag===c.tag&&b.push(d)}),a.push(c)}),a.filter(function(c,a){return-1===b.indexOf(a)})}function h(){function d(a){b[a.tag]=a}var b={},a,c;for(a=0,c=arguments.length;a64)continue;if(d<0)return!1;e+=6}return e%8===0}function i(j){var e,f,g=j.replace(/[\r\n=]/g,''),h=g.length,i=b,c=0,d=[];for(e=0;e>16&255),d.push(c>>8&255),d.push(c&255)),c=c<<6|i.indexOf(g.charAt(e));return f=h%4*6,f===0?(d.push(c>>16&255),d.push(c>>8&255),d.push(c&255)):f===18?(d.push(c>>10&255),d.push(c>>2&255)):f===12&&d.push(c>>4&255),a?new a(d):d}function g(h){var a='',d=0,e,f,g=h.length,c=b;for(e=0;e>18&63],a+=c[d>>12&63],a+=c[d>>6&63],a+=c[d&63]),d=(d<<8)+h[e];return f=g%3,f===0?(a+=c[d>>18&63],a+=c[d>>12&63],a+=c[d>>6&63],a+=c[d&63]):f===2?(a+=c[d>>10&63],a+=c[d>>4&63],a+=c[d<<2&63],a+=c[64]):f===1&&(a+=c[d>>2&63],a+=c[d<<4&63],a+=c[64],a+=c[64]),a}function h(b){return a&&a.isBuffer(b)}var a=d('buffer').Buffer,c=d('../type'),b='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r';f.exports=new c('tag:yaml.org,2002:binary',{kind:'scalar',resolve:e,construct:i,predicate:h,represent:g})},{'../type':15,buffer:undefined}],17:[function(b,c,g){'use strict';function d(a){if(null===a)return!1;var b=a.length;return b===4&&(a==='true'||a==='True'||a==='TRUE')||b===5&&(a==='false'||a==='False'||a==='FALSE')}function e(a){return a==='true'||a==='True'||a==='TRUE'}function f(a){return'[object Boolean]'===Object.prototype.toString.call(a)}var a=b('../type');c.exports=new a('tag:yaml.org,2002:bool',{kind:'scalar',resolve:d,construct:e,predicate:f,represent:{lowercase:function(a){return a?'true':'false'},uppercase:function(a){return a?'TRUE':'FALSE'},camelcase:function(a){return a?'True':'False'}},defaultStyle:'lowercase'})},{'../type':15}],18:[function(d,f,j){'use strict';function e(a){return null===a?!1:b.test(a)?!0:!1}function i(e){var a,b,c,d;return a=e.replace(/_/g,'').toLowerCase(),b='-'===a[0]?-1:1,d=[],0<='+-'.indexOf(a[0])&&(a=a.slice(1)),'.inf'===a?1===b?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:'.nan'===a?NaN:0<=a.indexOf(':')?(a.split(':').forEach(function(a){d.unshift(parseFloat(a,10))}),a=0,c=1,d.forEach(function(b){a+=b*c,c*=60}),b*a):b*parseFloat(a,10)}function g(b,c){if(isNaN(b))switch(c){case'lowercase':return'.nan';case'uppercase':return'.NAN';case'camelcase':return'.NaN'}else if(Number.POSITIVE_INFINITY===b)switch(c){case'lowercase':return'.inf';case'uppercase':return'.INF';case'camelcase':return'.Inf'}else if(Number.NEGATIVE_INFINITY===b)switch(c){case'lowercase':return'-.inf';case'uppercase':return'-.INF';case'camelcase':return'-.Inf'}else return a.isNegativeZero(b)?'-0.0':b.toString(10)}function h(b){return'[object Number]'===Object.prototype.toString.call(b)&&(0!==b%1||a.isNegativeZero(b))}var a=d('../common'),c=d('../type'),b=new RegExp('^(?:[-+]?(?:[0-9][0-9_]*)\\.[0-9_]*(?:[eE][-+][0-9]+)?|\\.[0-9_]+(?:[eE][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$');f.exports=new c('tag:yaml.org,2002:float',{kind:'scalar',resolve:e,construct:i,predicate:h,represent:g,defaultStyle:'lowercase'})},{'../common':4,'../type':15}],19:[function(c,g,k){'use strict';function e(a){return 48<=a&&a<=57||65<=a&&a<=70||97<=a&&a<=102}function f(a){return 48<=a&&a<=55}function d(a){return 48<=a&&a<=57}function h(c){if(null===c)return!1;var h=c.length,a=0,g=!1,b;if(!h)return!1;if(b=c[a],(b==='-'||b==='+')&&(b=c[++a]),b==='0'){if(a+1===h)return!0;if(b=c[++a],b==='b'){for(a++;a3)return!1;if(a[a.length-b.length-1]!=='/')return!1;a=a.slice(1,a.length-b.length-1)}try{var e=new RegExp(a,b);return!0}catch(a){return!1}}function e(d){var a=d,c=/\/([gim]*)$/.exec(d),b='';return'/'===a[0]&&(c&&(b=c[1]),a=a.slice(1,a.length-b.length-1)),new RegExp(a,b)}function f(b){var a='/'+b.source+'/';return b.global&&(a+='g'),b.multiline&&(a+='m'),b.ignoreCase&&(a+='i'),a}function g(a){return'[object RegExp]'===Object.prototype.toString.call(a)}var a=b('../../type');c.exports=new a('tag:yaml.org,2002:js/regexp',{kind:'scalar',resolve:d,construct:e,predicate:g,represent:f})},{'../../type':15}],22:[function(b,c,h){'use strict';function d(){return!0}function e(){return undefined}function f(){return''}function g(a){return void 0===a}var a=b('../../type');c.exports=new a('tag:yaml.org,2002:js/undefined',{kind:'scalar',resolve:d,construct:e,predicate:g,represent:f})},{'../../type':15}],23:[function(b,c,d){'use strict';var a=b('../type');c.exports=new a('tag:yaml.org,2002:map',{kind:'mapping',construct:function(a){return null!==a?a:{}}})},{'../type':15}],24:[function(b,c,e){'use strict';function d(a){return'<<'===a||null===a}var a=b('../type');c.exports=new a('tag:yaml.org,2002:merge',{kind:'scalar',resolve:d})},{'../type':15}],25:[function(b,c,g){'use strict';function d(a){if(null===a)return!0;var b=a.length;return b===1&&a==='~'||b===4&&(a==='null'||a==='Null'||a==='NULL')}function e(){return null}function f(a){return null===a}var a=b('../type');c.exports=new a('tag:yaml.org,2002:null',{kind:'scalar',resolve:d,construct:e,predicate:f,represent:{canonical:function(){return'~'},lowercase:function(){return'null'},uppercase:function(){return'NULL'},camelcase:function(){return'Null'}},defaultStyle:'lowercase'})},{'../type':15}],26:[function(d,e,h){'use strict';function f(i){if(null===i)return!0;var g=[],a,j,d,e,f,h=i;for(a=0,j=h.length;a=48&&a<=57}function a6(a){return'0123456789abcdefABCDEF'.indexOf(a)>=0}function J(a){return'01234567'.indexOf(a)>=0}function aV(a){return a===32||a===9||a===11||a===12||a===160||a>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(a)>=0}function K(a){return a===10||a===13||a===8232||a===8233}function I(a){return a===36||a===95||a>=65&&a<=90||a>=97&&a<=122||a===92||a>=128&&a5.NonAsciiIdentifierStart.test(String.fromCharCode(a))}function S(a){return a===36||a===95||a>=65&&a<=90||a>=97&&a<=122||a>=48&&a<=57||a===92||a>=128&&a5.NonAsciiIdentifierPart.test(String.fromCharCode(a))}function ax(a){switch(a){case'class':case'enum':case'export':case'extends':case'import':case'super':return!0;default:return!1}}function N(a){switch(a){case'implements':case'interface':case'package':case'private':case'protected':case'public':case'static':case'yield':case'let':return!0;default:return!1}}function z(a){return a==='eval'||a==='arguments'}function bh(a){if(n&&N(a))return!0;switch(a.length){case 2:return a==='if'||a==='in'||a==='do';case 3:return a==='var'||a==='for'||a==='new'||a==='try'||a==='let';case 4:return a==='this'||a==='else'||a==='case'||a==='void'||a==='with'||a==='enum';case 5:return a==='while'||a==='break'||a==='catch'||a==='throw'||a==='const'||a==='yield'||a==='class'||a==='super';case 6:return a==='return'||a==='typeof'||a==='delete'||a==='switch'||a==='export'||a==='import';case 7:return a==='default'||a==='finally'||a==='extends';case 8:return a==='function'||a==='continue'||a==='debugger';case 10:return a==='instanceof';default:return!1}}function a8(d,e,c,g,h){var a;if(L(typeof c==='number','Comment must have valid position'),f.lastCommentStart>=c)return;f.lastCommentStart=c,a={type:d,value:e},b.range&&(a.range=[c,g]),b.loc&&(a.loc=h),b.comments.push(a),b.attachComment&&(b.leadingComments.push(a),b.trailingComments.push(a))}function a7(f){var d,e,h,g;d=a-f,e={start:{line:j,column:a-m-f}};while(a=o&&p();else if(d===42){if(c.charCodeAt(a+1)===47){++a,++a,b.comments&&(g=c.slice(e+2,a-2),f.end={line:j,column:a-m},a8('Block',g,e,a,f));return}++a}else++a;p()}function H(){var b,d;d=a===0;while(a1114111||d!=='}')&&p(),b<=65535?String.fromCharCode(b):(e=(b-65536>>10)+55296,f=(b-65536&1023)+56320,String.fromCharCode(e,f))}function ao(){var b,d;b=c.charCodeAt(a++),d=String.fromCharCode(b),b===92&&(c.charCodeAt(a)!==117&&p(),++a,b=V('u'),(!b||b==='\\'||!I(b.charCodeAt(0)))&&p(),d=b);while(a>>=')return a+=4,{type:d.Punctuator,value:k,lineNumber:j,lineStart:m,start:e,end:a};if(g=k.substr(0,3),g==='>>>'||g==='<<='||g==='>>=')return a+=3,{type:d.Punctuator,value:g,lineNumber:j,lineStart:m,start:e,end:a};if(i=g.substr(0,2),h===i[1]&&'+-<>&|'.indexOf(h)>=0||i==='=>')return a+=2,{type:d.Punctuator,value:i,lineNumber:j,lineStart:m,start:e,end:a};if('<>=!+-*%&|^/'.indexOf(h)>=0)return++a,{type:d.Punctuator,value:h,lineNumber:j,lineStart:m,start:e,end:a};p()}function aY(e){var b='';while(a=0&&a=0&&(a=a.replace(/\\u\{([0-9a-fA-F]+)\}/g,function(b,a){if(parseInt(a,16)<=1114111)return'x';v(i.InvalidRegExp)}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,'x'));try{d=new RegExp(a)}catch(a){v(i.InvalidRegExp)}try{return new RegExp(b,c)}catch(a){return null}}function bf(){var b,d,e,f,g;b=c[a],L(b==='/','Regular expression literal must start with a slash'),d=c[a++],e=!1,f=!1;while(a0&&(c=b.tokens[b.tokens.length-1],c.range[0]===e&&c.type==='Punctuator'&&(c.value==='/'||c.value==='/=')&&b.tokens.pop()),b.tokens.push({type:'RegularExpression',value:d.literal,regex:d.regex,range:[e,a],loc:f})),d}function au(a){return a.type===d.Identifier||a.type===d.Keyword||a.type===d.BooleanLiteral||a.type===d.NullLiteral}function av(){var c,a;if(c=b.tokens[b.tokens.length-1],!c)return M();if(c.type==='Punctuator'){if(c.value===']')return D();if(c.value===')')return a=b.tokens[b.openParenToken-1],a&&a.type==='Keyword'&&(a.value==='if'||a.value==='while'||a.value==='for'||a.value==='with')?M():D();if(c.value==='}'){if(b.tokens[b.openCurlyToken-3]&&b.tokens[b.openCurlyToken-3].type==='Keyword'){if(a=b.tokens[b.openCurlyToken-4],!a)return D()}else if(b.tokens[b.openCurlyToken-4]&&b.tokens[b.openCurlyToken-4].type==='Keyword'){if(a=b.tokens[b.openCurlyToken-5],!a)return M()}else return D();return a9.indexOf(a.value)>=0?D():M()}return M()}return c.type==='Keyword'&&c.value!=='this'?M():D()}function a4(){var e;return H(),a>=o?{type:d.EOF,lineNumber:j,lineStart:m,start:a,end:a}:(e=c.charCodeAt(a),I(e)?aU():e===40||e===41||e===59?D():e===39||e===34?bb():e===46?E(c.charCodeAt(a+1))?al():D():E(e)?al():b.tokenize&&e===47?av():D())}function ah(){var f,e,h,g;return H(),f={start:{line:j,column:a-m}},e=a4(),f.end={line:j,column:a-m},e.type!==d.EOF&&(h=c.slice(e.start,e.end),g={type:A[e.type],value:h,range:[e.start,e.end],loc:f},e.regex&&(g.regex={pattern:e.regex.pattern,flags:e.regex.flags}),b.tokens.push(g)),e}function l(){var c;return c=e,a=c.end,j=c.lineNumber,m=c.lineStart,e=b.tokens!==void 0?ah():a4(),a=c.end,j=c.lineNumber,m=c.lineStart,c}function a3(){var c,d,f;c=a,d=j,f=m,e=b.tokens!==void 0?ah():a4(),a=c,j=d,m=f}function af(){this.line=j,this.column=a-m}function aZ(){this.start=new af,this.end=null}function a$(a){a.type===d.StringLiteral?this.start={line:a.startLineNumber,column:a.start-a.startLineStart}:this.start={line:a.lineNumber,column:a.start-a.lineStart},this.end=null}function q(){a=e.start,e.type===d.StringLiteral?(j=e.startLineNumber,m=e.startLineStart):(j=e.lineNumber,m=e.lineStart),b.range&&(this.range=[a,0]),b.loc&&(this.loc=new aZ)}function w(a){b.range&&(this.range=[a.start,0]),b.loc&&(this.loc=new a$(a))}function R(){var c,b,d,e;return c=a,b=j,d=m,H(),e=j!==b,a=c,j=b,m=d,e}function Y(b,c,d){var a=new Error('Line '+b+': '+d);return a.index=c,a.lineNumber=b,a.column=c-m+1,a.description=d,a}function v(d){var b,c;throw b=Array.prototype.slice.call(arguments,1),c=d.replace(/%(\d)/g,function(c,a){return L(a>='||a==='>>>='||a==='&='||a==='^='||a==='|=')}function B(){var b,f=a,g=j,i=m,k=e;if(c.charCodeAt(a)===59||h(';')){l();return}if(b=j,H(),j!==b){a=f,j=g,m=i,e=k;return}e.type!==d.EOF&&!h('}')&&p(e)}function W(a){return a.type===g.Identifier||a.type===g.MemberExpression}function aW(){var a=[],b=new q;k('[');while(!h(']'))h(',')?(l(),a.push(null)):(a.push(y()),h(']')||k(','));return l(),b.finishArrayExpression(a)}function Z(a,b){var c,d,e=new q;return c=n,d=T(),b&&n&&z(a[0].name)&&u(b,i.StrictParamName),n=c,e.finishFunctionExpression(null,a,[],d)}function aa(){var a,b,c;return a=n,n=!0,b=a2(),c=Z(b.params),n=a,c}function _(){var a,b=new q;return a=l(),a.type===d.StringLiteral||a.type===d.NumericLiteral?(n&&a.octal&&u(a,i.StrictOctalLiteral),b.finishLiteral(a)):b.finishIdentifier(a.value)}function b2(){var b,f,g,a,i,c=new q;if(b=e,b.type===d.Identifier)return g=_(),b.value==='get'&&!(h(':')||h('('))?(f=_(),k('('),k(')'),a=Z([]),c.finishProperty('get',f,a,!1,!1)):b.value==='set'&&!(h(':')||h('('))?(f=_(),k('('),b=e,b.type!==d.Identifier?(k(')'),u(b),a=Z([])):(i=[F()],k(')'),a=Z(i,b)),c.finishProperty('set',f,a,!1,!1)):h(':')?(l(),a=y(),c.finishProperty('init',g,a,!1,!1)):h('(')?(a=aa(),c.finishProperty('init',g,a,!0,!1)):(a=g,c.finishProperty('init',g,a,!1,!0));if(b.type===d.EOF||b.type===d.Punctuator)p(b);else{if(f=_(),h(':'))return l(),a=y(),c.finishProperty('init',f,a,!1,!1);if(h('('))return a=aa(),c.finishProperty('init',f,a,!0,!1);p(l())}}function b5(){var e=[],a,f,c,b,d={},j=String,l=new q;k('{');while(!h('}'))a=b2(),a.key.type===g.Identifier?f=a.key.name:f=j(a.key.value),b=a.kind==='init'?G.Data:a.kind==='get'?G.Get:G.Set,c='$'+f,Object.prototype.hasOwnProperty.call(d,c)?(d[c]===G.Data?n&&b===G.Data?x(i.StrictDuplicateProperty):b!==G.Data&&x(i.AccessorDataProperty):b===G.Data?x(i.AccessorDataProperty):d[c]&b&&x(i.AccessorGetSet),d[c]|=b):d[c]=b,e.push(a),h('}')||ac();return k('}'),l.finishObjectExpression(e)}function b6(){var a;return k('('),h(')')?(l(),O.ArrowParameterPlaceHolder):(++f.parenthesisCount,a=s(),k(')'),a)}function ar(){var f,g,a,c;if(h('('))return b6();if(h('['))return aW();if(h('{'))return b5();if(f=e.type,c=new q,f===d.Identifier)a=c.finishIdentifier(l().value);else if(f===d.StringLiteral||f===d.NumericLiteral)n&&e.octal&&u(e,i.StrictOctalLiteral),a=c.finishLiteral(l());else if(f===d.Keyword){if(t('function'))return a_();t('this')?(l(),a=c.finishThisExpression()):p(l())}else f===d.BooleanLiteral?(g=l(),g.value=g.value==='true',a=c.finishLiteral(g)):f===d.NullLiteral?(g=l(),g.value=null,a=c.finishLiteral(g)):h('/')||h('/=')?(b.tokens!==void 0?a=c.finishLiteral(M()):a=c.finishLiteral(ak()),a3()):p(l());return a}function aj(){var b=[];if(k('('),!h(')'))while(a':case'<=':case'>=':case'instanceof':a=7;break;case'in':a=c?7:0;break;case'<<':case'>>':case'>>>':a=8;break;case'+':case'-':a=9;break;case'*':case'/':case'%':a=11;break;default:break}return a}function bi(){var m,c,b,d,h,a,j,k,g,i;if(m=e,g=P(),g===O.ArrowParameterPlaceHolder)return g;if(d=e,h=ag(d,f.allowIn),h===0)return g;d.prec=h,l(),c=[m,e],j=P(),a=[g,d,j];while((h=ag(e,f.allowIn))>0){while(a.length>2&&h<=a[a.length-2].prec)j=a.pop(),k=a.pop().value,g=a.pop(),c.pop(),b=new w(c[c.length-1]).finishBinaryExpression(k,g,j),a.push(b);d=l(),d.prec=h,a.push(d),c.push(e),b=P(),a.push(b)}i=a.length-1,b=a[i],c.pop();while(i>1)b=new w(c.pop()).finishBinaryExpression(a[i-1].value,a[i-2],b),i-=2;return b}function bj(){var a,b,c,d,g;return g=e,a=bi(),a===O.ArrowParameterPlaceHolder?a:(h('?')&&(l(),b=f.allowIn,f.allowIn=!0,c=y(),f.allowIn=b,k(':'),d=y(),a=new w(g).finishConditionalExpression(a,c,d)),a)}function bk(){return h('{')?T():y()}function $(k){var e,h,a,d,c,f,b,l,j;for(d=[],c=[],f=0,l=null,b={paramSet:{}},e=0,h=k.length;e'),c=n,b=bk(),n&&a.firstRestricted&&p(a.firstRestricted,a.message),n&&a.stricted&&u(a.stricted,a.message),n=c,d.finishArrowFunctionExpression(a.params,a.defaults,b,b.type!==g.BlockStatement)}function y(){var d,c,a,k,b,j;return d=f.parenthesisCount,j=e,c=e,a=bj(),(a===O.ArrowParameterPlaceHolder||h('=>'))&&(f.parenthesisCount===d||f.parenthesisCount===d+1)&&(a.type===g.Identifier?b=$([a]):a.type===g.AssignmentExpression?b=$([a]):a.type===g.SequenceExpression?b=$(a.expressions):a===O.ArrowParameterPlaceHolder&&(b=$([])),b)?at(b,new w(j)):(aA()&&(W(a)||x(i.InvalidLHSInAssignment),n&&a.type===g.Identifier&&z(a.name)&&u(c,i.StrictLHSAssignment),c=l(),k=y(),a=new w(j).finishAssignmentExpression(c.value,a,k)),a)}function s(){var b,d=e,c;if(b=y(),h(',')){c=[b];while(a0?1:0,m=0,o=c.length,e=null,f={allowIn:!0,labelSet:{},inFunctionBody:!1,inIteration:!1,inSwitch:!1,lastCommentStart:-1},b={},g=g||{},g.tokens=!0,b.tokens=[],b.tokenize=!0,b.openParenToken=-1,b.openCurlyToken=-1,b.range=typeof g.range==='boolean'&&g.range,b.loc=typeof g.loc==='boolean'&&g.loc,typeof g.comment==='boolean'&&g.comment&&(b.comments=[]),typeof g.tolerant==='boolean'&&g.tolerant&&(b.errors=[]);try{if(a3(),e.type===d.EOF)return b.tokens;l();while(e.type!==d.EOF)try{l()}catch(a){if(b.errors){b.errors.push(a);break}else throw a}ab(),i=b.tokens,b.comments!==void 0&&(i.comments=b.comments),b.errors!==void 0&&(i.errors=b.errors)}catch(a){throw a}finally{b={}}return i}function b4(g,d){var h,i;i=String,typeof g!=='string'&&!(g instanceof String)&&(g=i(g)),c=g,a=0,j=c.length>0?1:0,m=0,o=c.length,e=null,f={allowIn:!0,labelSet:{},parenthesisCount:0,inFunctionBody:!1,inIteration:!1,inSwitch:!1,lastCommentStart:-1},b={},d!==void 0&&(b.range=typeof d.range==='boolean'&&d.range,b.loc=typeof d.loc==='boolean'&&d.loc,b.attachComment=typeof d.attachComment==='boolean'&&d.attachComment,b.loc&&d.source!==null&&d.source!==undefined&&(b.source=i(d.source)),typeof d.tokens==='boolean'&&d.tokens&&(b.tokens=[]),typeof d.comment==='boolean'&&d.comment&&(b.comments=[]),typeof d.tolerant==='boolean'&&d.tolerant&&(b.errors=[]),b.attachComment&&(b.range=!0,b.comments=[],b.bottomRightStack=[],b.trailingComments=[],b.leadingComments=[]));try{h=b1(),b.comments!==void 0&&(h.comments=b.comments),b.tokens!==void 0&&(ab(),h.tokens=b.tokens),b.errors!==void 0&&(h.errors=b.errors)}catch(a){throw a}finally{b={}}return h}var d,A,a9,g,O,G,i,a5,c,n,a,j,m,o,e,f,b;d={BooleanLiteral:1,EOF:2,Identifier:3,Keyword:4,NullLiteral:5,NumericLiteral:6,Punctuator:7,StringLiteral:8,RegularExpression:9},A={},A[d.BooleanLiteral]='Boolean',A[d.EOF]='',A[d.Identifier]='Identifier',A[d.Keyword]='Keyword',A[d.NullLiteral]='Null',A[d.NumericLiteral]='Numeric',A[d.Punctuator]='Punctuator',A[d.StringLiteral]='String',A[d.RegularExpression]='RegularExpression',a9=['(','{','[','in','typeof','instanceof','new','return','case','delete','throw','void','=','+=','-=','*=','/=','%=','<<=','>>=','>>>=','&=','|=','^=',',','+','-','*','/','%','++','--','<<','>>','>>>','&','|','^','!','~','&&','||','?',':','===','==','>=','<=','<','>','!=','!=='],g={AssignmentExpression:'AssignmentExpression',ArrayExpression:'ArrayExpression',ArrowFunctionExpression:'ArrowFunctionExpression',BlockStatement:'BlockStatement',BinaryExpression:'BinaryExpression',BreakStatement:'BreakStatement',CallExpression:'CallExpression',CatchClause:'CatchClause',ConditionalExpression:'ConditionalExpression',ContinueStatement:'ContinueStatement',DoWhileStatement:'DoWhileStatement',DebuggerStatement:'DebuggerStatement',EmptyStatement:'EmptyStatement',ExpressionStatement:'ExpressionStatement',ForStatement:'ForStatement',ForInStatement:'ForInStatement',FunctionDeclaration:'FunctionDeclaration',FunctionExpression:'FunctionExpression',Identifier:'Identifier',IfStatement:'IfStatement',Literal:'Literal',LabeledStatement:'LabeledStatement',LogicalExpression:'LogicalExpression',MemberExpression:'MemberExpression',NewExpression:'NewExpression',ObjectExpression:'ObjectExpression',Program:'Program',Property:'Property',ReturnStatement:'ReturnStatement',SequenceExpression:'SequenceExpression',SwitchStatement:'SwitchStatement',SwitchCase:'SwitchCase',ThisExpression:'ThisExpression',ThrowStatement:'ThrowStatement',TryStatement:'TryStatement',UnaryExpression:'UnaryExpression',UpdateExpression:'UpdateExpression',VariableDeclaration:'VariableDeclaration',VariableDeclarator:'VariableDeclarator',WhileStatement:'WhileStatement',WithStatement:'WithStatement'},O={ArrowParameterPlaceHolder:{type:'ArrowParameterPlaceHolder'}},G={Data:1,Get:2,Set:4},i={UnexpectedToken:'Unexpected token %0',UnexpectedNumber:'Unexpected number',UnexpectedString:'Unexpected string',UnexpectedIdentifier:'Unexpected identifier',UnexpectedReserved:'Unexpected reserved word',UnexpectedEOS:'Unexpected end of input',NewlineAfterThrow:'Illegal newline after throw',InvalidRegExp:'Invalid regular expression',UnterminatedRegExp:'Invalid regular expression: missing /',InvalidLHSInAssignment:'Invalid left-hand side in assignment',InvalidLHSInForIn:'Invalid left-hand side in for-in',MultipleDefaultsInSwitch:'More than one default clause in switch statement',NoCatchOrFinally:'Missing catch or finally after try',UnknownLabel:"Undefined label '%0'",Redeclaration:"%0 '%1' has already been declared",IllegalContinue:'Illegal continue statement',IllegalBreak:'Illegal break statement',IllegalReturn:'Illegal return statement',StrictModeWith:'Strict mode code may not include a with statement',StrictCatchVariable:'Catch variable may not be eval or arguments in strict mode',StrictVarName:'Variable name may not be eval or arguments in strict mode',StrictParamName:'Parameter name eval or arguments is not allowed in strict mode',StrictParamDupe:'Strict mode function may not have duplicate parameter names',StrictFunctionName:'Function name may not be eval or arguments in strict mode',StrictOctalLiteral:'Octal literals are not allowed in strict mode.',StrictDelete:'Delete of an unqualified identifier in strict mode.',StrictDuplicateProperty:'Duplicate data property in object literal not allowed in strict mode',AccessorDataProperty:'Object literal may not have data and accessor property with the same name',AccessorGetSet:'Object literal may not have multiple get/set accessors with the same name',StrictLHSAssignment:'Assignment to eval or arguments is not allowed in strict mode',StrictLHSPostfix:'Postfix increment/decrement may not have eval or arguments operand in strict mode',StrictLHSPrefix:'Prefix increment/decrement may not have eval or arguments operand in strict mode',StrictReservedWord:'Use of future reserved word in strict mode'},a5={NonAsciiIdentifierStart:new RegExp('[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢲऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞭꞰꞱꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭟꭤꭥꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]'),NonAsciiIdentifierPart:new RegExp('[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԯԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠ-ࢲࣤ-ॣ०-९ॱ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఀ-ఃఅ-ఌఎ-ఐఒ-నప-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಁ-ಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲഁ-ഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟ෦-෯ෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤞᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧ᪰-᪽ᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶ᳸᳹ᴀ-᷵᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‌‍‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚝꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞭꞰꞱꟷ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꧠ-ꧾꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭟꭤꭥꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︭︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]')},w.prototype=q.prototype={processComment:function(){var d,h,e,i=b.bottomRightStack,c,f,a=i[i.length-1];if(this.type===g.Program&&this.body.length>0)return;if(b.trailingComments.length>0){for(e=[],c=b.trailingComments.length-1;c>=0;--c)f=b.trailingComments[c],f.range[0]>=this.range[1]&&(e.unshift(f),b.trailingComments.splice(c,1));b.trailingComments=[]}else a&&a.trailingComments&&a.trailingComments[0].range[0]>=this.range[1]&&(e=a.trailingComments,delete a.trailingComments);if(a)while(a&&a.range[0]>=this.range[0])d=a,a=i.pop();if(d)d.leadingComments&&d.leadingComments[d.leadingComments.length-1].range[1]<=this.range[0]&&(this.leadingComments=d.leadingComments,d.leadingComments=undefined);else if(b.leadingComments.length>0)for(h=[],c=b.leadingComments.length-1;c>=0;--c)f=b.leadingComments[c],f.range[1]<=this.range[0]&&(h.unshift(f),b.leadingComments.splice(c,1));h&&h.length>0&&(this.leadingComments=h),e&&e.length>0&&(this.trailingComments=e),i.push(this)},finish:function(){b.range&&(this.range[1]=a),b.loc&&(this.loc.end=new af,b.source&&(this.loc.source=b.source)),b.attachComment&&this.processComment()},finishArrayExpression:function(a){return this.type=g.ArrayExpression,this.elements=a,this.finish(),this},finishArrowFunctionExpression:function(a,b,c,d){return this.type=g.ArrowFunctionExpression,this.id=null,this.params=a,this.defaults=b,this.body=c,this.rest=null,this.generator=!1,this.expression=d,this.finish(),this},finishAssignmentExpression:function(a,b,c){return this.type=g.AssignmentExpression,this.operator=a,this.left=b,this.right=c,this.finish(),this},finishBinaryExpression:function(a,b,c){return this.type=a==='||'||a==='&&'?g.LogicalExpression:g.BinaryExpression,this.operator=a,this.left=b,this.right=c,this.finish(),this},finishBlockStatement:function(a){return this.type=g.BlockStatement,this.body=a,this.finish(),this},finishBreakStatement:function(a){return this.type=g.BreakStatement,this.label=a,this.finish(),this},finishCallExpression:function(a,b){return this.type=g.CallExpression,this.callee=a,this.arguments=b,this.finish(),this},finishCatchClause:function(a,b){return this.type=g.CatchClause,this.param=a,this.body=b,this.finish(),this},finishConditionalExpression:function(a,b,c){return this.type=g.ConditionalExpression,this.test=a,this.consequent=b,this.alternate=c,this.finish(),this},finishContinueStatement:function(a){return this.type=g.ContinueStatement,this.label=a,this.finish(),this},finishDebuggerStatement:function(){return this.type=g.DebuggerStatement,this.finish(),this},finishDoWhileStatement:function(a,b){return this.type=g.DoWhileStatement,this.body=a,this.test=b,this.finish(),this},finishEmptyStatement:function(){return this.type=g.EmptyStatement,this.finish(),this},finishExpressionStatement:function(a){return this.type=g.ExpressionStatement,this.expression=a,this.finish(),this},finishForStatement:function(a,b,c,d){return this.type=g.ForStatement,this.init=a,this.test=b,this.update=c,this.body=d,this.finish(),this},finishForInStatement:function(a,b,c){return this.type=g.ForInStatement,this.left=a,this.right=b,this.body=c,this.each=!1,this.finish(),this},finishFunctionDeclaration:function(a,b,c,d){return this.type=g.FunctionDeclaration,this.id=a,this.params=b,this.defaults=c,this.body=d,this.rest=null,this.generator=!1,this.expression=!1,this.finish(),this},finishFunctionExpression:function(a,b,c,d){return this.type=g.FunctionExpression,this.id=a,this.params=b,this.defaults=c,this.body=d,this.rest=null,this.generator=!1,this.expression=!1,this.finish(),this},finishIdentifier:function(a){return this.type=g.Identifier,this.name=a,this.finish(),this},finishIfStatement:function(a,b,c){return this.type=g.IfStatement,this.test=a,this.consequent=b,this.alternate=c,this.finish(),this},finishLabeledStatement:function(a,b){return this.type=g.LabeledStatement,this.label=a,this.body=b,this.finish(),this},finishLiteral:function(a){return this.type=g.Literal,this.value=a.value,this.raw=c.slice(a.start,a.end),a.regex&&(this.regex=a.regex),this.finish(),this},finishMemberExpression:function(a,b,c){return this.type=g.MemberExpression,this.computed=a==='[',this.object=b,this.property=c,this.finish(),this},finishNewExpression:function(a,b){return this.type=g.NewExpression,this.callee=a,this.arguments=b,this.finish(),this},finishObjectExpression:function(a){return this.type=g.ObjectExpression,this.properties=a,this.finish(),this},finishPostfixExpression:function(a,b){return this.type=g.UpdateExpression,this.operator=a,this.argument=b,this.prefix=!1,this.finish(),this},finishProgram:function(a){return this.type=g.Program,this.body=a,this.finish(),this},finishProperty:function(a,b,c,d,e){return this.type=g.Property,this.key=b,this.value=c,this.kind=a,this.method=d,this.shorthand=e,this.finish(),this},finishReturnStatement:function(a){return this.type=g.ReturnStatement,this.argument=a,this.finish(),this},finishSequenceExpression:function(a){return this.type=g.SequenceExpression,this.expressions=a,this.finish(),this},finishSwitchCase:function(a,b){return this.type=g.SwitchCase,this.test=a,this.consequent=b,this.finish(),this},finishSwitchStatement:function(a,b){return this.type=g.SwitchStatement,this.discriminant=a,this.cases=b,this.finish(),this},finishThisExpression:function(){return this.type=g.ThisExpression,this.finish(),this},finishThrowStatement:function(a){return this.type=g.ThrowStatement,this.argument=a,this.finish(),this},finishTryStatement:function(a,b,c,d){return this.type=g.TryStatement,this.block=a,this.guardedHandlers=b,this.handlers=c,this.finalizer=d,this.finish(),this},finishUnaryExpression:function(a,b){return this.type=a==='++'||a==='--'?g.UpdateExpression:g.UnaryExpression,this.operator=a,this.argument=b,this.prefix=!0,this.finish(),this},finishVariableDeclaration:function(a,b){return this.type=g.VariableDeclaration,this.declarations=a,this.kind=b,this.finish(),this},finishVariableDeclarator:function(a,b){return this.type=g.VariableDeclarator,this.id=a,this.init=b,this.finish(),this},finishWhileStatement:function(a,b){return this.type=g.WhileStatement,this.test=a,this.body=b,this.finish(),this},finishWithStatement:function(a,b){return this.type=g.WithStatement,this.object=a,this.body=b,this.finish(),this}},U.version='2.0.0',U.tokenize=b3,U.parse=b4,U.Syntax=function(b,a){a={},typeof Object.create==='function'&&(a=Object.create(null));for(b in g)g.hasOwnProperty(b)&&(a[b]=g[b]);return typeof Object.freeze==='function'&&Object.freeze(a),a}()})},{}]},{},[1])(1)}) +!function(b,a){typeof exports==='object'&&typeof module!=='undefined'?module.exports=b():typeof define==='function'&&define.amd?define([],b):(typeof window!=='undefined'?a=window:typeof global!=='undefined'?a=global:typeof self!=='undefined'?a=self:a=this,a.mdastYAML=b())}(function(){var a;return function a(b,c,e){function f(d,k){if(!c[d]){if(!b[d]){var i=typeof require=='function'&&require;if(!k&&i)return i(d,!0);if(g)return g(d,!0);var j=new Error("Cannot find module '"+d+"'");throw j.code='MODULE_NOT_FOUND',j}var h=c[d]={exports:{}};b[d][0].call(h.exports,function(c){var a=b[d][1][c];return f(a?a:c)},h,h.exports,a,b,c,e)}return c[d].exports}var g=typeof require=='function'&&require;for(var d=0;d1024&&(c+='? '),c+=a.dump+': ',!b(a,k,l,!1,!1))continue;c+=a.dump,f+=c}a.tag=h,a.dump='{'+f+'}'}function O(a,e,o,p){var h='',l=a.tag,j=Object.keys(o),d,m,k,n,f,c;for(d=0,m=j.length;d1024,f&&(a.dump&&g===a.dump.charCodeAt(0)?c+='?':c+='? '),c+=a.dump,f&&(c+=i(a,e)),!b(a,e+1,n,!0,f))continue;a.dump&&g===a.dump.charCodeAt(0)?c+=':':c+=': ',c+=a.dump,h+=c}a.tag=l,a.dump=h||'{}'}function o(c,f,k){var h,i,g,l,a,b;for(i=k?c.explicitTypes:c.implicitTypes,g=0,l=i.length;g tag resolver accepts not "'+b+'" style');c.dump=h}return!0}return!1}function b(a,c,h,i,j){a.tag=null,a.dump=h,o(a,h,!1)||o(a,h,!0);var f=e.call(a.dump);i&&(i=0>a.flowLevel||a.flowLevel>c),(null!==a.tag&&'?'!==a.tag||2!==a.indent&&c>0)&&(j=!1);var k='[object Object]'===f||'[object Array]'===f,b,g;if(k&&(b=a.duplicates.indexOf(h),g=b!==-1),g&&a.usedDuplicates[b])a.dump='*ref_'+b;else{if(k&&g&&!a.usedDuplicates[b]&&(a.usedDuplicates[b]=!0),'[object Object]'===f)i&&0!==Object.keys(a.dump).length?(O(a,c,a.dump,j),g&&(a.dump='&ref_'+b+(0===c?'\n':'')+a.dump)):(P(a,c,a.dump),g&&(a.dump='&ref_'+b+' '+a.dump));else if('[object Array]'===f)i&&0!==a.dump.length?(Q(a,c,a.dump,j),g&&(a.dump='&ref_'+b+(0===c?'\n':'')+a.dump)):(R(a,c,a.dump),g&&(a.dump='&ref_'+b+' '+a.dump));else if('[object String]'===f)'?'!==a.tag&&M(a,a.dump);else if(a.skipInvalid)return!1;else throw new d('unacceptable kind of an object to dump '+f);null!==a.tag&&'?'!==a.tag&&(a.dump='!<'+a.tag+'> '+a.dump)}return!0}function S(f,e){var c=[],a=[],b,d;for(h(f,c,a),b=0,d=a.length;b>10)+55296,(a-65536&1023)+56320)}function W(b,a){this.input=b,this.filename=a.filename||null,this.schema=a.schema||G,this.onWarning=a.onWarning||null,this.legacy=a.legacy||!1,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=b.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function P(a,b){return new z(b,new L(a.filename,a.input,a.position,a.line,a.position-a.lineStart))}function a(a,b){throw P(a,b)}function o(a,c){var b=P(a,c);if(!a.onWarning)throw b;a.onWarning.call(null,b)}function f(e,f,g,i){var b,h,c,d;if(f1&&(b.result+=d.repeat('\n',a-1))}function a4(a,u,n){var o,j,k,h,l,m,q,r,t=a.kind,p=a.result,d;if(d=a.input.charCodeAt(a.position),c(d)||i(d)||35===d||38===d||42===d||33===d||124===d||62===d||39===d||34===d||37===d||64===d||96===d)return!1;if((63===d||45===d)&&(j=a.input.charCodeAt(a.position+1),c(j)||n&&i(j)))return!1;a.kind='scalar',a.result='',k=h=a.position,l=!1;while(0!==d){if(58===d){if(j=a.input.charCodeAt(a.position+1),c(j)||n&&i(j))break}else if(35===d){if(o=a.input.charCodeAt(a.position-1),c(o))break}else if(a.position===a.lineStart&&s(a)||n&&i(d))break;else if(e(d))if(m=a.line,q=a.lineStart,r=a.lineIndent,b(a,!1,-1),a.lineIndent>=u){l=!0,d=a.input.charCodeAt(a.position);continue}else{a.position=h,a.line=m,a.lineStart=q,a.lineIndent=r;break}l&&(f(a,k,h,!1),y(a,a.line-m),k=h=a.position,l=!1),g(d)||(h=a.position+1),d=a.input.charCodeAt(++a.position)}return f(a,k,h,!1),a.result?!0:(a.kind=t,a.result=p,!1)}function a5(c,i){var d,g,h;if(d=c.input.charCodeAt(c.position),39!==d)return!1;c.kind='scalar',c.result='',c.position++,g=h=c.position;while(0!==(d=c.input.charCodeAt(c.position)))if(39===d){if(f(c,g,c.position,!0),d=c.input.charCodeAt(++c.position),!(39===d))return!0;g=h=c.position,c.position++}else e(d)?(f(c,g,h,!0),y(c,b(c,!1,i)),g=h=c.position):c.position===c.lineStart&&s(c)?a(c,'unexpected end of the document within a single quoted scalar'):(c.position++,h=c.position);a(c,'unexpected end of the stream within a single quoted scalar')}function a6(c,l){var g,h,k,i,j,d;if(d=c.input.charCodeAt(c.position),34!==d)return!1;c.kind='scalar',c.result='',c.position++,g=h=c.position;while(0!==(d=c.input.charCodeAt(c.position)))if(34===d)return f(c,g,c.position,!0),c.position++,!0;else if(92===d){if(f(c,g,c.position,!0),d=c.input.charCodeAt(++c.position),e(d))b(c,!1,l);else if(d<256&&w[d])c.result+=u[d],c.position++;else if((j=$(d))>0){for(k=j,i=0;k>0;k--)d=c.input.charCodeAt(++c.position),(j=Z(d))>=0?i=(i<<4)+j:a(c,'expected hexadecimal character');c.result+=U(i),c.position++}else a(c,'unknown escape sequence');g=h=c.position}else e(d)?(f(c,g,h,!0),y(c,b(c,!1,l)),g=h=c.position):c.position===c.lineStart&&s(c)?a(c,'unexpected end of the document within a double quoted scalar'):(c.position++,h=c.position);a(c,'unexpected end of the stream within a double quoted scalar')}function S(d,g){var m=!0,s,t=d.tag,f,v=d.anchor,u,r,p,q,o,h,i,k,e;if(e=d.input.charCodeAt(d.position),e===91)r=93,o=!1,f=[];else if(e===123)r=125,o=!0,f={};else return!1;null!==d.anchor&&(d.anchorMap[d.anchor]=f),e=d.input.charCodeAt(++d.position);while(0!==e){if(b(d,!0,g),e=d.input.charCodeAt(d.position),e===r)return d.position++,d.tag=t,d.anchor=v,d.kind=o?'mapping':'sequence',d.result=f,!0;m||a(d,'missed comma between flow collection entries'),i=h=k=null,p=q=!1,63===e&&(u=d.input.charCodeAt(d.position+1),c(u)&&(p=q=!0,d.position++,b(d,!0,g))),s=d.line,l(d,g,n,!1,!0),i=d.tag,h=d.result,b(d,!0,g),e=d.input.charCodeAt(d.position),(q||d.line===s)&&58===e&&(p=!0,e=d.input.charCodeAt(++d.position),b(d,!0,g),l(d,g,n,!1,!0),k=d.result),o?j(d,f,i,h,k):p?f.push(j(d,null,i,h,k)):f.push(h),b(d,!0,g),e=d.input.charCodeAt(d.position),44===e?(m=!0,e=d.input.charCodeAt(++d.position)):m=!1}a(d,'unexpected end of the stream within a flow collection')}function T(b,p){var o,m,k=r,i=!1,j=p,h=0,l=!1,n,c;if(c=b.input.charCodeAt(b.position),c===124)m=!1;else if(c===62)m=!0;else return!1;b.kind='scalar',b.result='';while(0!==c)if(c=b.input.charCodeAt(++b.position),43===c||45===c)r===k?k=43===c?D:J:a(b,'repeat of a chomping mode identifier');else if((n=a0(c))>=0)n===0?a(b,'bad explicit indentation width of a block scalar; it cannot be less than one'):i?a(b,'repeat of an indentation width identifier'):(j=p+n-1,i=!0);else break;if(g(c)){do c=b.input.charCodeAt(++b.position);while(g(c));if(35===c)do c=b.input.charCodeAt(++b.position);while(!e(c)&&0!==c)}while(0!==c){v(b),b.lineIndent=0,c=b.input.charCodeAt(b.position);while((!i||b.lineIndentj&&(j=b.lineIndent),e(c)){h++;continue}if(b.lineIndentg)&&0!==e)a(d,'bad indentation of a sequence entry');else if(d.lineIndento)&&(l(d,o,p,!0,q)&&(f?h=d.result:n=d.result),f||(j(d,m,i,h,n),i=h=n=null),b(d,!0,-1),e=d.input.charCodeAt(d.position)),d.lineIndent>o&&0!==e)a(d,'bad indentation of a mapping entry');else if(d.lineIndentf?d=1:c.lineIndent===f?d=0:c.lineIndentf?d=1:c.lineIndent===f?d=0:c.lineIndent tag; it should be "'+e.kind+'", not "'+c.kind+'"'),e.resolve(c.result)?(c.result=e.construct(c.result),null!==c.anchor&&(c.anchorMap[c.anchor]=c.result)):a(c,'cannot resolve a node with !<'+c.tag+'> explicit tag')):o(c,'unknown tag !<'+c.tag+'>');return null!==c.tag||null!==c.anchor||i}function _(d){var n=d.position,i,h,j,m=!1,f;d.version=null,d.checkLineBreaks=d.legacy,d.tagMap={},d.anchorMap={};while(0!==(f=d.input.charCodeAt(d.position))){if(b(d,!0,-1),f=d.input.charCodeAt(d.position),d.lineIndent>0||37!==f)break;m=!0,f=d.input.charCodeAt(++d.position),i=d.position;while(0!==f&&!c(f))f=d.input.charCodeAt(++d.position);h=d.input.slice(i,d.position),j=[],h.length<1&&a(d,'directive name must not be less than one character in length');while(0!==f){while(g(f))f=d.input.charCodeAt(++d.position);if(35===f){do f=d.input.charCodeAt(++d.position);while(0!==f&&!e(f));break}if(e(f))break;i=d.position;while(0!==f&&!c(f))f=d.input.charCodeAt(++d.position);j.push(d.input.slice(i,d.position))}0!==f&&v(d),k.call(t,h)?t[h](d,h,j):o(d,'unknown document directive "'+h+'"')}if(b(d,!0,-1),0===d.lineIndent&&45===d.input.charCodeAt(d.position)&&45===d.input.charCodeAt(d.position+1)&&45===d.input.charCodeAt(d.position+2)?(d.position+=3,b(d,!0,-1)):m&&a(d,'directives end mark is expected'),l(d,d.lineIndent-1,p,!1,!0),b(d,!0,-1),d.checkLineBreaks&&M.test(d.input.slice(n,d.position))&&o(d,'non-ASCII line breaks are interpreted as content'),d.documents.push(d.result),d.position===d.lineStart&&s(d)){46===d.input.charCodeAt(d.position)&&(d.position+=3,b(d,!0,-1));return}if(d.position0&&-1==='\r\n…\u2028\u2029'.indexOf(this.buffer.charAt(c-1)))if(c-=1,this.position-c>f/2-1){g=' ... ',c+=5;break}h='',d=this.position;while(df/2-1){h=' ... ',d-=5;break}return i=this.buffer.slice(c,d),b.repeat(' ',e)+g+i+h+'\n'+b.repeat(' ',e+this.position-c+g.length)+'^'},a.prototype.toString=function a(d){var c,b='';return this.name&&(b+='in "'+this.name+'" '),b+='at line '+(this.line+1)+', column '+(this.column+1),d||(c=this.getSnippet(),c&&(b+=':\n'+c)),b},d.exports=a},{'./common':4}],9:[function(c,g,i){'use strict';function d(c,e,a){var b=[];return c.include.forEach(function(b){a=d(b,e,a)}),c[e].forEach(function(c){a.forEach(function(a,d){a.tag===c.tag&&b.push(d)}),a.push(c)}),a.filter(function(c,a){return-1===b.indexOf(a)})}function h(){function d(a){b[a.tag]=a}var b={},a,c;for(a=0,c=arguments.length;a64)continue;if(d<0)return!1;e+=6}return e%8===0}function i(j){var e,f,g=j.replace(/[\r\n=]/g,''),h=g.length,i=b,c=0,d=[];for(e=0;e>16&255),d.push(c>>8&255),d.push(c&255)),c=c<<6|i.indexOf(g.charAt(e));return f=h%4*6,f===0?(d.push(c>>16&255),d.push(c>>8&255),d.push(c&255)):f===18?(d.push(c>>10&255),d.push(c>>2&255)):f===12&&d.push(c>>4&255),a?new a(d):d}function g(h){var a='',d=0,e,f,g=h.length,c=b;for(e=0;e>18&63],a+=c[d>>12&63],a+=c[d>>6&63],a+=c[d&63]),d=(d<<8)+h[e];return f=g%3,f===0?(a+=c[d>>18&63],a+=c[d>>12&63],a+=c[d>>6&63],a+=c[d&63]):f===2?(a+=c[d>>10&63],a+=c[d>>4&63],a+=c[d<<2&63],a+=c[64]):f===1&&(a+=c[d>>2&63],a+=c[d<<4&63],a+=c[64],a+=c[64]),a}function h(b){return a&&a.isBuffer(b)}var a=d('buffer').Buffer,c=d('../type'),b='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r';f.exports=new c('tag:yaml.org,2002:binary',{kind:'scalar',resolve:e,construct:i,predicate:h,represent:g})},{'../type':15,buffer:undefined}],17:[function(b,c,g){'use strict';function d(a){if(null===a)return!1;var b=a.length;return b===4&&(a==='true'||a==='True'||a==='TRUE')||b===5&&(a==='false'||a==='False'||a==='FALSE')}function e(a){return a==='true'||a==='True'||a==='TRUE'}function f(a){return'[object Boolean]'===Object.prototype.toString.call(a)}var a=b('../type');c.exports=new a('tag:yaml.org,2002:bool',{kind:'scalar',resolve:d,construct:e,predicate:f,represent:{lowercase:function(a){return a?'true':'false'},uppercase:function(a){return a?'TRUE':'FALSE'},camelcase:function(a){return a?'True':'False'}},defaultStyle:'lowercase'})},{'../type':15}],18:[function(d,f,j){'use strict';function e(a){return null===a?!1:b.test(a)?!0:!1}function i(e){var a,b,c,d;return a=e.replace(/_/g,'').toLowerCase(),b='-'===a[0]?-1:1,d=[],0<='+-'.indexOf(a[0])&&(a=a.slice(1)),'.inf'===a?1===b?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:'.nan'===a?NaN:0<=a.indexOf(':')?(a.split(':').forEach(function(a){d.unshift(parseFloat(a,10))}),a=0,c=1,d.forEach(function(b){a+=b*c,c*=60}),b*a):b*parseFloat(a,10)}function g(b,c){if(isNaN(b))switch(c){case'lowercase':return'.nan';case'uppercase':return'.NAN';case'camelcase':return'.NaN'}else if(Number.POSITIVE_INFINITY===b)switch(c){case'lowercase':return'.inf';case'uppercase':return'.INF';case'camelcase':return'.Inf'}else if(Number.NEGATIVE_INFINITY===b)switch(c){case'lowercase':return'-.inf';case'uppercase':return'-.INF';case'camelcase':return'-.Inf'}else return a.isNegativeZero(b)?'-0.0':b.toString(10)}function h(b){return'[object Number]'===Object.prototype.toString.call(b)&&(0!==b%1||a.isNegativeZero(b))}var a=d('../common'),c=d('../type'),b=new RegExp('^(?:[-+]?(?:[0-9][0-9_]*)\\.[0-9_]*(?:[eE][-+][0-9]+)?|\\.[0-9_]+(?:[eE][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$');f.exports=new c('tag:yaml.org,2002:float',{kind:'scalar',resolve:e,construct:i,predicate:h,represent:g,defaultStyle:'lowercase'})},{'../common':4,'../type':15}],19:[function(c,g,k){'use strict';function e(a){return 48<=a&&a<=57||65<=a&&a<=70||97<=a&&a<=102}function f(a){return 48<=a&&a<=55}function d(a){return 48<=a&&a<=57}function h(c){if(null===c)return!1;var h=c.length,a=0,g=!1,b;if(!h)return!1;if(b=c[a],(b==='-'||b==='+')&&(b=c[++a]),b==='0'){if(a+1===h)return!0;if(b=c[++a],b==='b'){for(a++;a3)return!1;if(a[a.length-b.length-1]!=='/')return!1;a=a.slice(1,a.length-b.length-1)}try{var e=new RegExp(a,b);return!0}catch(a){return!1}}function e(d){var a=d,c=/\/([gim]*)$/.exec(d),b='';return'/'===a[0]&&(c&&(b=c[1]),a=a.slice(1,a.length-b.length-1)),new RegExp(a,b)}function f(b){var a='/'+b.source+'/';return b.global&&(a+='g'),b.multiline&&(a+='m'),b.ignoreCase&&(a+='i'),a}function g(a){return'[object RegExp]'===Object.prototype.toString.call(a)}var a=b('../../type');c.exports=new a('tag:yaml.org,2002:js/regexp',{kind:'scalar',resolve:d,construct:e,predicate:g,represent:f})},{'../../type':15}],22:[function(b,c,h){'use strict';function d(){return!0}function e(){return undefined}function f(){return''}function g(a){return void 0===a}var a=b('../../type');c.exports=new a('tag:yaml.org,2002:js/undefined',{kind:'scalar',resolve:d,construct:e,predicate:g,represent:f})},{'../../type':15}],23:[function(b,c,d){'use strict';var a=b('../type');c.exports=new a('tag:yaml.org,2002:map',{kind:'mapping',construct:function(a){return null!==a?a:{}}})},{'../type':15}],24:[function(b,c,e){'use strict';function d(a){return'<<'===a||null===a}var a=b('../type');c.exports=new a('tag:yaml.org,2002:merge',{kind:'scalar',resolve:d})},{'../type':15}],25:[function(b,c,g){'use strict';function d(a){if(null===a)return!0;var b=a.length;return b===1&&a==='~'||b===4&&(a==='null'||a==='Null'||a==='NULL')}function e(){return null}function f(a){return null===a}var a=b('../type');c.exports=new a('tag:yaml.org,2002:null',{kind:'scalar',resolve:d,construct:e,predicate:f,represent:{canonical:function(){return'~'},lowercase:function(){return'null'},uppercase:function(){return'NULL'},camelcase:function(){return'Null'}},defaultStyle:'lowercase'})},{'../type':15}],26:[function(d,e,h){'use strict';function f(i){if(null===i)return!0;var g=[],a,j,d,e,f,h=i;for(a=0,j=h.length;a=48&&a<=57}function a6(a){return'0123456789abcdefABCDEF'.indexOf(a)>=0}function J(a){return'01234567'.indexOf(a)>=0}function aV(a){return a===32||a===9||a===11||a===12||a===160||a>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(a)>=0}function K(a){return a===10||a===13||a===8232||a===8233}function I(a){return a===36||a===95||a>=65&&a<=90||a>=97&&a<=122||a===92||a>=128&&a5.NonAsciiIdentifierStart.test(String.fromCharCode(a))}function S(a){return a===36||a===95||a>=65&&a<=90||a>=97&&a<=122||a>=48&&a<=57||a===92||a>=128&&a5.NonAsciiIdentifierPart.test(String.fromCharCode(a))}function ax(a){switch(a){case'class':case'enum':case'export':case'extends':case'import':case'super':return!0;default:return!1}}function N(a){switch(a){case'implements':case'interface':case'package':case'private':case'protected':case'public':case'static':case'yield':case'let':return!0;default:return!1}}function z(a){return a==='eval'||a==='arguments'}function bh(a){if(n&&N(a))return!0;switch(a.length){case 2:return a==='if'||a==='in'||a==='do';case 3:return a==='var'||a==='for'||a==='new'||a==='try'||a==='let';case 4:return a==='this'||a==='else'||a==='case'||a==='void'||a==='with'||a==='enum';case 5:return a==='while'||a==='break'||a==='catch'||a==='throw'||a==='const'||a==='yield'||a==='class'||a==='super';case 6:return a==='return'||a==='typeof'||a==='delete'||a==='switch'||a==='export'||a==='import';case 7:return a==='default'||a==='finally'||a==='extends';case 8:return a==='function'||a==='continue'||a==='debugger';case 10:return a==='instanceof';default:return!1}}function a8(d,e,c,g,h){var a;if(L(typeof c==='number','Comment must have valid position'),f.lastCommentStart>=c)return;f.lastCommentStart=c,a={type:d,value:e},b.range&&(a.range=[c,g]),b.loc&&(a.loc=h),b.comments.push(a),b.attachComment&&(b.leadingComments.push(a),b.trailingComments.push(a))}function a7(f){var d,e,h,g;d=a-f,e={start:{line:j,column:a-m-f}};while(a=o&&p();else if(d===42){if(c.charCodeAt(a+1)===47){++a,++a,b.comments&&(g=c.slice(e+2,a-2),f.end={line:j,column:a-m},a8('Block',g,e,a,f));return}++a}else++a;p()}function H(){var b,d;d=a===0;while(a1114111||d!=='}')&&p(),b<=65535?String.fromCharCode(b):(e=(b-65536>>10)+55296,f=(b-65536&1023)+56320,String.fromCharCode(e,f))}function ao(){var b,d;b=c.charCodeAt(a++),d=String.fromCharCode(b),b===92&&(c.charCodeAt(a)!==117&&p(),++a,b=V('u'),(!b||b==='\\'||!I(b.charCodeAt(0)))&&p(),d=b);while(a>>=')return a+=4,{type:d.Punctuator,value:k,lineNumber:j,lineStart:m,start:e,end:a};if(g=k.substr(0,3),g==='>>>'||g==='<<='||g==='>>=')return a+=3,{type:d.Punctuator,value:g,lineNumber:j,lineStart:m,start:e,end:a};if(i=g.substr(0,2),h===i[1]&&'+-<>&|'.indexOf(h)>=0||i==='=>')return a+=2,{type:d.Punctuator,value:i,lineNumber:j,lineStart:m,start:e,end:a};if('<>=!+-*%&|^/'.indexOf(h)>=0)return++a,{type:d.Punctuator,value:h,lineNumber:j,lineStart:m,start:e,end:a};p()}function aY(e){var b='';while(a=0&&a=0&&(a=a.replace(/\\u\{([0-9a-fA-F]+)\}/g,function(b,a){if(parseInt(a,16)<=1114111)return'x';v(i.InvalidRegExp)}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,'x'));try{d=new RegExp(a)}catch(a){v(i.InvalidRegExp)}try{return new RegExp(b,c)}catch(a){return null}}function bf(){var b,d,e,f,g;b=c[a],L(b==='/','Regular expression literal must start with a slash'),d=c[a++],e=!1,f=!1;while(a0&&(c=b.tokens[b.tokens.length-1],c.range[0]===e&&c.type==='Punctuator'&&(c.value==='/'||c.value==='/=')&&b.tokens.pop()),b.tokens.push({type:'RegularExpression',value:d.literal,regex:d.regex,range:[e,a],loc:f})),d}function au(a){return a.type===d.Identifier||a.type===d.Keyword||a.type===d.BooleanLiteral||a.type===d.NullLiteral}function av(){var c,a;if(c=b.tokens[b.tokens.length-1],!c)return M();if(c.type==='Punctuator'){if(c.value===']')return D();if(c.value===')')return a=b.tokens[b.openParenToken-1],a&&a.type==='Keyword'&&(a.value==='if'||a.value==='while'||a.value==='for'||a.value==='with')?M():D();if(c.value==='}'){if(b.tokens[b.openCurlyToken-3]&&b.tokens[b.openCurlyToken-3].type==='Keyword'){if(a=b.tokens[b.openCurlyToken-4],!a)return D()}else if(b.tokens[b.openCurlyToken-4]&&b.tokens[b.openCurlyToken-4].type==='Keyword'){if(a=b.tokens[b.openCurlyToken-5],!a)return M()}else return D();return a9.indexOf(a.value)>=0?D():M()}return M()}return c.type==='Keyword'&&c.value!=='this'?M():D()}function a4(){var e;return H(),a>=o?{type:d.EOF,lineNumber:j,lineStart:m,start:a,end:a}:(e=c.charCodeAt(a),I(e)?aU():e===40||e===41||e===59?D():e===39||e===34?bb():e===46?E(c.charCodeAt(a+1))?al():D():E(e)?al():b.tokenize&&e===47?av():D())}function ah(){var f,e,h,g;return H(),f={start:{line:j,column:a-m}},e=a4(),f.end={line:j,column:a-m},e.type!==d.EOF&&(h=c.slice(e.start,e.end),g={type:A[e.type],value:h,range:[e.start,e.end],loc:f},e.regex&&(g.regex={pattern:e.regex.pattern,flags:e.regex.flags}),b.tokens.push(g)),e}function l(){var c;return c=e,a=c.end,j=c.lineNumber,m=c.lineStart,e=b.tokens!==void 0?ah():a4(),a=c.end,j=c.lineNumber,m=c.lineStart,c}function a3(){var c,d,f;c=a,d=j,f=m,e=b.tokens!==void 0?ah():a4(),a=c,j=d,m=f}function af(){this.line=j,this.column=a-m}function aZ(){this.start=new af,this.end=null}function a$(a){a.type===d.StringLiteral?this.start={line:a.startLineNumber,column:a.start-a.startLineStart}:this.start={line:a.lineNumber,column:a.start-a.lineStart},this.end=null}function q(){a=e.start,e.type===d.StringLiteral?(j=e.startLineNumber,m=e.startLineStart):(j=e.lineNumber,m=e.lineStart),b.range&&(this.range=[a,0]),b.loc&&(this.loc=new aZ)}function w(a){b.range&&(this.range=[a.start,0]),b.loc&&(this.loc=new a$(a))}function R(){var c,b,d,e;return c=a,b=j,d=m,H(),e=j!==b,a=c,j=b,m=d,e}function Y(b,c,d){var a=new Error('Line '+b+': '+d);return a.index=c,a.lineNumber=b,a.column=c-m+1,a.description=d,a}function v(d){var b,c;throw b=Array.prototype.slice.call(arguments,1),c=d.replace(/%(\d)/g,function(c,a){return L(a>='||a==='>>>='||a==='&='||a==='^='||a==='|=')}function B(){var b,f=a,g=j,i=m,k=e;if(c.charCodeAt(a)===59||h(';')){l();return}if(b=j,H(),j!==b){a=f,j=g,m=i,e=k;return}e.type!==d.EOF&&!h('}')&&p(e)}function W(a){return a.type===g.Identifier||a.type===g.MemberExpression}function aW(){var a=[],b=new q;k('[');while(!h(']'))h(',')?(l(),a.push(null)):(a.push(y()),h(']')||k(','));return l(),b.finishArrayExpression(a)}function Z(a,b){var c,d,e=new q;return c=n,d=T(),b&&n&&z(a[0].name)&&u(b,i.StrictParamName),n=c,e.finishFunctionExpression(null,a,[],d)}function aa(){var a,b,c;return a=n,n=!0,b=a2(),c=Z(b.params),n=a,c}function _(){var a,b=new q;return a=l(),a.type===d.StringLiteral||a.type===d.NumericLiteral?(n&&a.octal&&u(a,i.StrictOctalLiteral),b.finishLiteral(a)):b.finishIdentifier(a.value)}function b2(){var b,f,g,a,i,c=new q;if(b=e,b.type===d.Identifier)return g=_(),b.value==='get'&&!(h(':')||h('('))?(f=_(),k('('),k(')'),a=Z([]),c.finishProperty('get',f,a,!1,!1)):b.value==='set'&&!(h(':')||h('('))?(f=_(),k('('),b=e,b.type!==d.Identifier?(k(')'),u(b),a=Z([])):(i=[F()],k(')'),a=Z(i,b)),c.finishProperty('set',f,a,!1,!1)):h(':')?(l(),a=y(),c.finishProperty('init',g,a,!1,!1)):h('(')?(a=aa(),c.finishProperty('init',g,a,!0,!1)):(a=g,c.finishProperty('init',g,a,!1,!0));if(b.type===d.EOF||b.type===d.Punctuator)p(b);else{if(f=_(),h(':'))return l(),a=y(),c.finishProperty('init',f,a,!1,!1);if(h('('))return a=aa(),c.finishProperty('init',f,a,!0,!1);p(l())}}function b5(){var e=[],a,f,c,b,d={},j=String,l=new q;k('{');while(!h('}'))a=b2(),a.key.type===g.Identifier?f=a.key.name:f=j(a.key.value),b=a.kind==='init'?G.Data:a.kind==='get'?G.Get:G.Set,c='$'+f,Object.prototype.hasOwnProperty.call(d,c)?(d[c]===G.Data?n&&b===G.Data?x(i.StrictDuplicateProperty):b!==G.Data&&x(i.AccessorDataProperty):b===G.Data?x(i.AccessorDataProperty):d[c]&b&&x(i.AccessorGetSet),d[c]|=b):d[c]=b,e.push(a),h('}')||ac();return k('}'),l.finishObjectExpression(e)}function b6(){var a;return k('('),h(')')?(l(),O.ArrowParameterPlaceHolder):(++f.parenthesisCount,a=s(),k(')'),a)}function ar(){var f,g,a,c;if(h('('))return b6();if(h('['))return aW();if(h('{'))return b5();if(f=e.type,c=new q,f===d.Identifier)a=c.finishIdentifier(l().value);else if(f===d.StringLiteral||f===d.NumericLiteral)n&&e.octal&&u(e,i.StrictOctalLiteral),a=c.finishLiteral(l());else if(f===d.Keyword){if(t('function'))return a_();t('this')?(l(),a=c.finishThisExpression()):p(l())}else f===d.BooleanLiteral?(g=l(),g.value=g.value==='true',a=c.finishLiteral(g)):f===d.NullLiteral?(g=l(),g.value=null,a=c.finishLiteral(g)):h('/')||h('/=')?(b.tokens!==void 0?a=c.finishLiteral(M()):a=c.finishLiteral(ak()),a3()):p(l());return a}function aj(){var b=[];if(k('('),!h(')'))while(a':case'<=':case'>=':case'instanceof':a=7;break;case'in':a=c?7:0;break;case'<<':case'>>':case'>>>':a=8;break;case'+':case'-':a=9;break;case'*':case'/':case'%':a=11;break;default:break}return a}function bi(){var m,c,b,d,h,a,j,k,g,i;if(m=e,g=P(),g===O.ArrowParameterPlaceHolder)return g;if(d=e,h=ag(d,f.allowIn),h===0)return g;d.prec=h,l(),c=[m,e],j=P(),a=[g,d,j];while((h=ag(e,f.allowIn))>0){while(a.length>2&&h<=a[a.length-2].prec)j=a.pop(),k=a.pop().value,g=a.pop(),c.pop(),b=new w(c[c.length-1]).finishBinaryExpression(k,g,j),a.push(b);d=l(),d.prec=h,a.push(d),c.push(e),b=P(),a.push(b)}i=a.length-1,b=a[i],c.pop();while(i>1)b=new w(c.pop()).finishBinaryExpression(a[i-1].value,a[i-2],b),i-=2;return b}function bj(){var a,b,c,d,g;return g=e,a=bi(),a===O.ArrowParameterPlaceHolder?a:(h('?')&&(l(),b=f.allowIn,f.allowIn=!0,c=y(),f.allowIn=b,k(':'),d=y(),a=new w(g).finishConditionalExpression(a,c,d)),a)}function bk(){return h('{')?T():y()}function $(k){var e,h,a,d,c,f,b,l,j;for(d=[],c=[],f=0,l=null,b={paramSet:{}},e=0,h=k.length;e'),c=n,b=bk(),n&&a.firstRestricted&&p(a.firstRestricted,a.message),n&&a.stricted&&u(a.stricted,a.message),n=c,d.finishArrowFunctionExpression(a.params,a.defaults,b,b.type!==g.BlockStatement)}function y(){var d,c,a,k,b,j;return d=f.parenthesisCount,j=e,c=e,a=bj(),(a===O.ArrowParameterPlaceHolder||h('=>'))&&(f.parenthesisCount===d||f.parenthesisCount===d+1)&&(a.type===g.Identifier?b=$([a]):a.type===g.AssignmentExpression?b=$([a]):a.type===g.SequenceExpression?b=$(a.expressions):a===O.ArrowParameterPlaceHolder&&(b=$([])),b)?at(b,new w(j)):(aA()&&(W(a)||x(i.InvalidLHSInAssignment),n&&a.type===g.Identifier&&z(a.name)&&u(c,i.StrictLHSAssignment),c=l(),k=y(),a=new w(j).finishAssignmentExpression(c.value,a,k)),a)}function s(){var b,d=e,c;if(b=y(),h(',')){c=[b];while(a0?1:0,m=0,o=c.length,e=null,f={allowIn:!0,labelSet:{},inFunctionBody:!1,inIteration:!1,inSwitch:!1,lastCommentStart:-1},b={},g=g||{},g.tokens=!0,b.tokens=[],b.tokenize=!0,b.openParenToken=-1,b.openCurlyToken=-1,b.range=typeof g.range==='boolean'&&g.range,b.loc=typeof g.loc==='boolean'&&g.loc,typeof g.comment==='boolean'&&g.comment&&(b.comments=[]),typeof g.tolerant==='boolean'&&g.tolerant&&(b.errors=[]);try{if(a3(),e.type===d.EOF)return b.tokens;l();while(e.type!==d.EOF)try{l()}catch(a){if(b.errors){b.errors.push(a);break}else throw a}ab(),i=b.tokens,b.comments!==void 0&&(i.comments=b.comments),b.errors!==void 0&&(i.errors=b.errors)}catch(a){throw a}finally{b={}}return i}function b4(g,d){var h,i;i=String,typeof g!=='string'&&!(g instanceof String)&&(g=i(g)),c=g,a=0,j=c.length>0?1:0,m=0,o=c.length,e=null,f={allowIn:!0,labelSet:{},parenthesisCount:0,inFunctionBody:!1,inIteration:!1,inSwitch:!1,lastCommentStart:-1},b={},d!==void 0&&(b.range=typeof d.range==='boolean'&&d.range,b.loc=typeof d.loc==='boolean'&&d.loc,b.attachComment=typeof d.attachComment==='boolean'&&d.attachComment,b.loc&&d.source!==null&&d.source!==undefined&&(b.source=i(d.source)),typeof d.tokens==='boolean'&&d.tokens&&(b.tokens=[]),typeof d.comment==='boolean'&&d.comment&&(b.comments=[]),typeof d.tolerant==='boolean'&&d.tolerant&&(b.errors=[]),b.attachComment&&(b.range=!0,b.comments=[],b.bottomRightStack=[],b.trailingComments=[],b.leadingComments=[]));try{h=b1(),b.comments!==void 0&&(h.comments=b.comments),b.tokens!==void 0&&(ab(),h.tokens=b.tokens),b.errors!==void 0&&(h.errors=b.errors)}catch(a){throw a}finally{b={}}return h}var d,A,a9,g,O,G,i,a5,c,n,a,j,m,o,e,f,b;d={BooleanLiteral:1,EOF:2,Identifier:3,Keyword:4,NullLiteral:5,NumericLiteral:6,Punctuator:7,StringLiteral:8,RegularExpression:9},A={},A[d.BooleanLiteral]='Boolean',A[d.EOF]='',A[d.Identifier]='Identifier',A[d.Keyword]='Keyword',A[d.NullLiteral]='Null',A[d.NumericLiteral]='Numeric',A[d.Punctuator]='Punctuator',A[d.StringLiteral]='String',A[d.RegularExpression]='RegularExpression',a9=['(','{','[','in','typeof','instanceof','new','return','case','delete','throw','void','=','+=','-=','*=','/=','%=','<<=','>>=','>>>=','&=','|=','^=',',','+','-','*','/','%','++','--','<<','>>','>>>','&','|','^','!','~','&&','||','?',':','===','==','>=','<=','<','>','!=','!=='],g={AssignmentExpression:'AssignmentExpression',ArrayExpression:'ArrayExpression',ArrowFunctionExpression:'ArrowFunctionExpression',BlockStatement:'BlockStatement',BinaryExpression:'BinaryExpression',BreakStatement:'BreakStatement',CallExpression:'CallExpression',CatchClause:'CatchClause',ConditionalExpression:'ConditionalExpression',ContinueStatement:'ContinueStatement',DoWhileStatement:'DoWhileStatement',DebuggerStatement:'DebuggerStatement',EmptyStatement:'EmptyStatement',ExpressionStatement:'ExpressionStatement',ForStatement:'ForStatement',ForInStatement:'ForInStatement',FunctionDeclaration:'FunctionDeclaration',FunctionExpression:'FunctionExpression',Identifier:'Identifier',IfStatement:'IfStatement',Literal:'Literal',LabeledStatement:'LabeledStatement',LogicalExpression:'LogicalExpression',MemberExpression:'MemberExpression',NewExpression:'NewExpression',ObjectExpression:'ObjectExpression',Program:'Program',Property:'Property',ReturnStatement:'ReturnStatement',SequenceExpression:'SequenceExpression',SwitchStatement:'SwitchStatement',SwitchCase:'SwitchCase',ThisExpression:'ThisExpression',ThrowStatement:'ThrowStatement',TryStatement:'TryStatement',UnaryExpression:'UnaryExpression',UpdateExpression:'UpdateExpression',VariableDeclaration:'VariableDeclaration',VariableDeclarator:'VariableDeclarator',WhileStatement:'WhileStatement',WithStatement:'WithStatement'},O={ArrowParameterPlaceHolder:{type:'ArrowParameterPlaceHolder'}},G={Data:1,Get:2,Set:4},i={UnexpectedToken:'Unexpected token %0',UnexpectedNumber:'Unexpected number',UnexpectedString:'Unexpected string',UnexpectedIdentifier:'Unexpected identifier',UnexpectedReserved:'Unexpected reserved word',UnexpectedEOS:'Unexpected end of input',NewlineAfterThrow:'Illegal newline after throw',InvalidRegExp:'Invalid regular expression',UnterminatedRegExp:'Invalid regular expression: missing /',InvalidLHSInAssignment:'Invalid left-hand side in assignment',InvalidLHSInForIn:'Invalid left-hand side in for-in',MultipleDefaultsInSwitch:'More than one default clause in switch statement',NoCatchOrFinally:'Missing catch or finally after try',UnknownLabel:"Undefined label '%0'",Redeclaration:"%0 '%1' has already been declared",IllegalContinue:'Illegal continue statement',IllegalBreak:'Illegal break statement',IllegalReturn:'Illegal return statement',StrictModeWith:'Strict mode code may not include a with statement',StrictCatchVariable:'Catch variable may not be eval or arguments in strict mode',StrictVarName:'Variable name may not be eval or arguments in strict mode',StrictParamName:'Parameter name eval or arguments is not allowed in strict mode',StrictParamDupe:'Strict mode function may not have duplicate parameter names',StrictFunctionName:'Function name may not be eval or arguments in strict mode',StrictOctalLiteral:'Octal literals are not allowed in strict mode.',StrictDelete:'Delete of an unqualified identifier in strict mode.',StrictDuplicateProperty:'Duplicate data property in object literal not allowed in strict mode',AccessorDataProperty:'Object literal may not have data and accessor property with the same name',AccessorGetSet:'Object literal may not have multiple get/set accessors with the same name',StrictLHSAssignment:'Assignment to eval or arguments is not allowed in strict mode',StrictLHSPostfix:'Postfix increment/decrement may not have eval or arguments operand in strict mode',StrictLHSPrefix:'Prefix increment/decrement may not have eval or arguments operand in strict mode',StrictReservedWord:'Use of future reserved word in strict mode'},a5={NonAsciiIdentifierStart:new RegExp('[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢲऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞭꞰꞱꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭟꭤꭥꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]'),NonAsciiIdentifierPart:new RegExp('[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԯԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠ-ࢲࣤ-ॣ०-९ॱ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఀ-ఃఅ-ఌఎ-ఐఒ-నప-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಁ-ಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲഁ-ഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟ෦-෯ෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤞᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧ᪰-᪽ᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶ᳸᳹ᴀ-᷵᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‌‍‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚝꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞭꞰꞱꟷ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꧠ-ꧾꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭟꭤꭥꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︭︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]')},w.prototype=q.prototype={processComment:function(){var d,h,e,i=b.bottomRightStack,c,f,a=i[i.length-1];if(this.type===g.Program&&this.body.length>0)return;if(b.trailingComments.length>0){for(e=[],c=b.trailingComments.length-1;c>=0;--c)f=b.trailingComments[c],f.range[0]>=this.range[1]&&(e.unshift(f),b.trailingComments.splice(c,1));b.trailingComments=[]}else a&&a.trailingComments&&a.trailingComments[0].range[0]>=this.range[1]&&(e=a.trailingComments,delete a.trailingComments);if(a)while(a&&a.range[0]>=this.range[0])d=a,a=i.pop();if(d)d.leadingComments&&d.leadingComments[d.leadingComments.length-1].range[1]<=this.range[0]&&(this.leadingComments=d.leadingComments,d.leadingComments=undefined);else if(b.leadingComments.length>0)for(h=[],c=b.leadingComments.length-1;c>=0;--c)f=b.leadingComments[c],f.range[1]<=this.range[0]&&(h.unshift(f),b.leadingComments.splice(c,1));h&&h.length>0&&(this.leadingComments=h),e&&e.length>0&&(this.trailingComments=e),i.push(this)},finish:function(){b.range&&(this.range[1]=a),b.loc&&(this.loc.end=new af,b.source&&(this.loc.source=b.source)),b.attachComment&&this.processComment()},finishArrayExpression:function(a){return this.type=g.ArrayExpression,this.elements=a,this.finish(),this},finishArrowFunctionExpression:function(a,b,c,d){return this.type=g.ArrowFunctionExpression,this.id=null,this.params=a,this.defaults=b,this.body=c,this.rest=null,this.generator=!1,this.expression=d,this.finish(),this},finishAssignmentExpression:function(a,b,c){return this.type=g.AssignmentExpression,this.operator=a,this.left=b,this.right=c,this.finish(),this},finishBinaryExpression:function(a,b,c){return this.type=a==='||'||a==='&&'?g.LogicalExpression:g.BinaryExpression,this.operator=a,this.left=b,this.right=c,this.finish(),this},finishBlockStatement:function(a){return this.type=g.BlockStatement,this.body=a,this.finish(),this},finishBreakStatement:function(a){return this.type=g.BreakStatement,this.label=a,this.finish(),this},finishCallExpression:function(a,b){return this.type=g.CallExpression,this.callee=a,this.arguments=b,this.finish(),this},finishCatchClause:function(a,b){return this.type=g.CatchClause,this.param=a,this.body=b,this.finish(),this},finishConditionalExpression:function(a,b,c){return this.type=g.ConditionalExpression,this.test=a,this.consequent=b,this.alternate=c,this.finish(),this},finishContinueStatement:function(a){return this.type=g.ContinueStatement,this.label=a,this.finish(),this},finishDebuggerStatement:function(){return this.type=g.DebuggerStatement,this.finish(),this},finishDoWhileStatement:function(a,b){return this.type=g.DoWhileStatement,this.body=a,this.test=b,this.finish(),this},finishEmptyStatement:function(){return this.type=g.EmptyStatement,this.finish(),this},finishExpressionStatement:function(a){return this.type=g.ExpressionStatement,this.expression=a,this.finish(),this},finishForStatement:function(a,b,c,d){return this.type=g.ForStatement,this.init=a,this.test=b,this.update=c,this.body=d,this.finish(),this},finishForInStatement:function(a,b,c){return this.type=g.ForInStatement,this.left=a,this.right=b,this.body=c,this.each=!1,this.finish(),this},finishFunctionDeclaration:function(a,b,c,d){return this.type=g.FunctionDeclaration,this.id=a,this.params=b,this.defaults=c,this.body=d,this.rest=null,this.generator=!1,this.expression=!1,this.finish(),this},finishFunctionExpression:function(a,b,c,d){return this.type=g.FunctionExpression,this.id=a,this.params=b,this.defaults=c,this.body=d,this.rest=null,this.generator=!1,this.expression=!1,this.finish(),this},finishIdentifier:function(a){return this.type=g.Identifier,this.name=a,this.finish(),this},finishIfStatement:function(a,b,c){return this.type=g.IfStatement,this.test=a,this.consequent=b,this.alternate=c,this.finish(),this},finishLabeledStatement:function(a,b){return this.type=g.LabeledStatement,this.label=a,this.body=b,this.finish(),this},finishLiteral:function(a){return this.type=g.Literal,this.value=a.value,this.raw=c.slice(a.start,a.end),a.regex&&(this.regex=a.regex),this.finish(),this},finishMemberExpression:function(a,b,c){return this.type=g.MemberExpression,this.computed=a==='[',this.object=b,this.property=c,this.finish(),this},finishNewExpression:function(a,b){return this.type=g.NewExpression,this.callee=a,this.arguments=b,this.finish(),this},finishObjectExpression:function(a){return this.type=g.ObjectExpression,this.properties=a,this.finish(),this},finishPostfixExpression:function(a,b){return this.type=g.UpdateExpression,this.operator=a,this.argument=b,this.prefix=!1,this.finish(),this},finishProgram:function(a){return this.type=g.Program,this.body=a,this.finish(),this},finishProperty:function(a,b,c,d,e){return this.type=g.Property,this.key=b,this.value=c,this.kind=a,this.method=d,this.shorthand=e,this.finish(),this},finishReturnStatement:function(a){return this.type=g.ReturnStatement,this.argument=a,this.finish(),this},finishSequenceExpression:function(a){return this.type=g.SequenceExpression,this.expressions=a,this.finish(),this},finishSwitchCase:function(a,b){return this.type=g.SwitchCase,this.test=a,this.consequent=b,this.finish(),this},finishSwitchStatement:function(a,b){return this.type=g.SwitchStatement,this.discriminant=a,this.cases=b,this.finish(),this},finishThisExpression:function(){return this.type=g.ThisExpression,this.finish(),this},finishThrowStatement:function(a){return this.type=g.ThrowStatement,this.argument=a,this.finish(),this},finishTryStatement:function(a,b,c,d){return this.type=g.TryStatement,this.block=a,this.guardedHandlers=b,this.handlers=c,this.finalizer=d,this.finish(),this},finishUnaryExpression:function(a,b){return this.type=a==='++'||a==='--'?g.UpdateExpression:g.UnaryExpression,this.operator=a,this.argument=b,this.prefix=!0,this.finish(),this},finishVariableDeclaration:function(a,b){return this.type=g.VariableDeclaration,this.declarations=a,this.kind=b,this.finish(),this},finishVariableDeclarator:function(a,b){return this.type=g.VariableDeclarator,this.id=a,this.init=b,this.finish(),this},finishWhileStatement:function(a,b){return this.type=g.WhileStatement,this.test=a,this.body=b,this.finish(),this},finishWithStatement:function(a,b){return this.type=g.WithStatement,this.object=a,this.body=b,this.finish(),this}},U.version='2.0.0',U.tokenize=b3,U.parse=b4,U.Syntax=function(b,a){a={},typeof Object.create==='function'&&(a=Object.create(null));for(b in g)g.hasOwnProperty(b)&&(a[b]=g[b]);return typeof Object.freeze==='function'&&Object.freeze(a),a}()})},{}]},{},[1])(1)}) diff --git a/test/index.js b/test/index.js index 7c6e7c4..328b267 100644 --- a/test/index.js +++ b/test/index.js @@ -143,4 +143,60 @@ describe('mdast-yaml()', function () { assert('yaml' in ast); assert(ast.yaml === 'hello'); }); + + it('should accept `onparse`', function () { + var isInvoked; + + /** + * Assertion. + */ + function onparse(node) { + assert(node.type === 'yaml'); + assert(node.value === '"hello": "world"'); + assert(node.yaml.hello === 'world'); + + isInvoked = true; + } + + yaml([ + '---', + '"hello": "world"', + '---', + '', + '# Foo bar', + '' + ].join('\n'), { + 'onparse': onparse + }); + + assert(isInvoked === true); + }); + + it('should accept `onstringify`', function () { + var isInvoked; + + /** + * Assertion. + */ + function onstringify(node) { + assert(node.type === 'yaml'); + assert(node.value === 'hello: world'); + assert(node.yaml.hello === 'world'); + + isInvoked = true; + } + + yaml([ + '---', + '"hello": "world"', + '---', + '', + '# Foo bar', + '' + ].join('\n'), { + 'onstringify': onstringify + }); + + assert(isInvoked === true); + }); });